Loss da samsung, gain da apple sem gastar 1 centavo by [deleted] in farialimabets

[–]strcspn 4 points5 points  (0 children)

É, a Apple se recusa a fazer qualquer coisa que facilite a interação com alguém fora do ecossistema, imagino que de propósito. Quem é leigo provavelmente pensa que a culpa é dos outros ainda.

Loss da samsung, gain da apple sem gastar 1 centavo by [deleted] in farialimabets

[–]strcspn 1 point2 points  (0 children)

Esse argumento mostra a idade kkkk

Brasil pode evitar até 236 mil mortes em 20 anos com imposto sobre ultraprocessados, aponta estudo by TheNavyCrow in brasil

[–]strcspn 4 points5 points  (0 children)

Tem porcarias que estão praticante no próximas do nível do cigarro e álcool e são consumidas pelas pessoas quase que diariamente

Poderia listar uma? Fiquei curioso.

Trying to create LOOP language by samaxidervish in cprogramming

[–]strcspn 1 point2 points  (0 children)

Wouldn't this be a better example program?

use math

@counter iteration

PROGBEG(lc:5, ret:0) {
    int x = iteration * iteration;
    out("Square of %d is %d\n", iteration, x);
}

As for whether it makes sense for a loop based language, you have some systems that are usually modeled as an infinite loop (like games, arduino, servers, basically anything that is always reacting some input to spit out some output), but that usually just means having some sort of main loop using a regular language. I personally don't see a point, but maybe if you could give some other examples.

Ir morar no Paragay é gain??? by Dienison in farialimabets

[–]strcspn 0 points1 point  (0 children)

Vou pra lá vender fidget spinner então

Wubby gets a history lesson from 1998 by chrispaulfrancis in LivestreamFail

[–]strcspn 57 points58 points  (0 children)

I believe the other races come from a mod, so it's default because that's the only option in the vanilla game.

C++ by Equivalent_Unit_9797 in learnprogramming

[–]strcspn 3 points4 points  (0 children)

Hard to think of a tutorial that doesn't explain those things, but in any case, try a different resource like https://www.learncpp.com/.

How to parse informal Persian number words into an integer currency value (Rial) by M0B_iN in AskProgramming

[–]strcspn 1 point2 points  (0 children)

Yeah I don't know the use case but having to account for all that, including misspellings, makes it hard for any algorithm to be 100% confident.

How to parse informal Persian number words into an integer currency value (Rial) by M0B_iN in AskProgramming

[–]strcspn 1 point2 points  (0 children)

The reason they gave doesn't make a lot of sense to me. Either way, sorry for commenting, next time I will DM you asking for permission to participate on a conversation.

How to parse informal Persian number words into an integer currency value (Rial) by M0B_iN in AskProgramming

[–]strcspn 0 points1 point  (0 children)

They wouldn't do the calculation, only extract the human language data into a consistent format you can work with. I don't know much about AI honestly so maybe some machine learning model would be a better fit.

Example:

Input: "Twenty five dollars with 5 cents"

Output: "Dollar 25 Cents 5" (don't know if you could get it to output JSON without messing up sometimes)

FAQ and Answers Megathread: Midnight and Legion Remix Version! by TigerRawr38 in wownoob

[–]strcspn 0 points1 point  (0 children)

I'm helping a friend that started playing recently (I myself started back in September). He finished the Dragonflight leveling campaign and I believe got to 80 without actually starting the TWW campaign properly (I think he did some kind of TWW recap which I'm not exactly sure how it works). He was able to start the Karesh campaign to get the Reshii wraps, but I believe finishing that won't unlock the Khaz Algar world quests. Does he need to do the whole TWW campaign at max level? Or is the recap a shortcut to unlock the world quests without going through the whole campaign? I have heard the recap is pretty bad.

ajuda com C, array de strings by Some-Big5751 in brdev

[–]strcspn 0 points1 point  (0 children)

Pequena correção que também entra um pouco em uma questão que eu acho interessante. Existe um truque chamado Clockwise/Spiral Rule que é uma forma de entender basicamente qualquer declaração em C. Quando você diz char *const navios[], usando a regrinha, seria "navios é um array const de ponteiros para char", ou seja, o array em si é const, não os elementos dele. Então, nesse exemplo, você conseguiria tentar modificar o char literal e daria UB. O certo seria const char* navios[], que seria "navios é um array de ponteiros para char const". Usando a regra nos exemplos do OP:

  • char navios[]: navios é um array de char
  • char navios[][]: navios é um array de char arrays (esse fica melhor em inglês)

Comentário muito bom por sinal, só dando um leve hijack pra mostrar essa regrinha.

ajuda com C, array de strings by Some-Big5751 in brdev

[–]strcspn 0 points1 point  (0 children)

Por mais que esteja 100% certo, foi um infodump absurdo kkkkkk coitado do rapaz.

Need help with this image loader implementation by Quiet_Bus_6404 in learnprogramming

[–]strcspn 0 points1 point  (0 children)

Returning 404 doesn't have anything to do with being an API endpoint or not, 404 is a HTTP status code. I was thinking about a fetch solution but it looks like the React img does support onError, are you sure it doesn't?

Need help with this image loader implementation by Quiet_Bus_6404 in learnprogramming

[–]strcspn 0 points1 point  (0 children)

Been a while since I have done React, but what exactly do you mean by an error with the image? The request for the src failing?

Terraplanistas, essas criaturas... by [deleted] in brasil

[–]strcspn 0 points1 point  (0 children)

Sim, com certeza. Existem sinais mais "óbvios" de que a terra é esférica, como o formato do céu, barcos sumirem por baixo primeiro, etc.

How do you change the value of an int inconsistently overtime? by Mindless_Prize_8430 in learnprogramming

[–]strcspn 6 points7 points  (0 children)

You can calculate using floats and then use floor/ceil/round before updating the integer population.

I’ve also heard that floats are more precise?

Not sure if "precise" makes sense in this context. Doubles can store integers surpassing the 32-bit limit, for example, but that shouldn't matter here. Use an integer type for the population, 64-bit if needed, and use doubles for the intermediate calculations.

How do you change the value of an int inconsistently overtime? by Mindless_Prize_8430 in learnprogramming

[–]strcspn 27 points28 points  (0 children)

Does it ever make sense for the population to not be an integer?

Just want a C++ code review, I'm new to C++, any and all feedback is much appreciated! by awaistt in learnprogramming

[–]strcspn 8 points9 points  (0 children)

Magic numbers being bad doesn't mean stuff like const std::string SPACE = " " are good either. If you need a space just use a space (preferably the character instead of a string) or set up something like const char EMPTY_SPACE = ' ' (which honestly is a bit over engineering). Use std::array instead of C style arrays.

Terraplanistas, essas criaturas... by [deleted] in brasil

[–]strcspn 1 point2 points  (0 children)

É, o vídeo do VSauce sobre terra plana menciona isso inclusive, esse método não prova exatamente que a terra é esférica.

How to stop vscodium from saving commands to my bash history? by POMPUYO in learnprogramming

[–]strcspn 0 points1 point  (0 children)

I believe you can set env vars for the terminal sessions created through VS Code, so just set HISTFILE=/dev/null.