There's... something peculiar going behind the scenes here. Code Golf should've flipped some switches but it hasn't, so I'll go look into why that's the case. — Grace Note ♦2 hours ago
I can program like a person can flip a coin and have it land on its side - technically I can, but even if I try, it'll take a long time to be successful
Though just to make sure, move(0) would just do nothing as opposed to throwing an error because of reasons (assuming int i=0;i<count;i++)
@El'endiaStarman "making" it land in its side is unlikely, but having it land on its side randomly after lots of attempts may be possible depending on the coin. A UK 1 pound coin is fairly small radius and fairly large depth, so settling edge on isn't out of the question.
@Eridan Do you want move() to default to move(1), or cause an error?
@Maltysen I tried programming in Java once, for a KotH. I managed to get it working but not to get it competitive. I did find it painful but I wasn't sure if that was just because I didn't know it...
I find it interesting that methods with the same name are different depending on if they take in a parameter or not. Would a theoretical add(double d) be different from both add(int i) and add()?
@Calvin'sHobbies Something that guesses at what message you saw last, so you can go back to where you left off/the chat moved on while you weren't reading.
If you leave the tab and come back, the current bottom message will have that dotted line below it if more messages appeared while you were away from the tab
@Quill I meant that "messages you haven't read yet" sounds impossible as there's no way of telling which messages you've seen. Then I had the moment of realisation - it's just "messages that haven't been on screen yet" regardless of whether you physically looked at them. Of course this will be obvious to lots of people, but the few like me who get easily confused could do with some hovertext :)
In information theory, perplexity is a measurement of how well a probability distribution or probability model predicts a sample. It may be used to compare probability models. A low perplexity indicates the probability distribution is good at predicting the sample.
== Perplexity of a probability distribution ==
The perplexity of a discrete probability distribution p is defined as
where H(p) is the entropy of the distribution and x ranges over events.
Perplexity of a random variable X may be defined as the perplexity of the distribution over its possible values x.
In the special case where p models...
In case anybody was actually curious what it meant.
Code Review is for exactly this situation - and they accept quite long code so you could put the entire thing in a question (as long as you don't mind releasing it under CC BY-SA 3.0)
Code Review is for exactly this situation - and they accept quite long code so you could put the entire thing in a question (as long as you don't mind releasing it under CC BY-SA 3.0)
I'm feeding everything in sequentially now. I think it would work better if I parse the html a bit more to get reply-chains fed in the right order and relationship, but I want a baseline first.
> The lowest perplexity that has been published on the Brown Corpus (1 million words of American English of varying topics and genres) as of 1992 is indeed about 247 per word, corresponding to a cross-entropy of log2247 = 7.95 bits per word or 1.75 bits per letter [1] using a trigram model. It is often possible to achieve lower perplexity on more specialized corpora, as they are more predictable.
Hmm. Well, ~250 perplexity is terrible. Using that model snapshot, it just spit out pretty random looking garbage words. Time to wait for double digits...
Another way to think of "magic numbers": if it's a constant you might change in the future, it's better to store it in a variable with a meaningful name.
Magic numbers are bad... I totally agree. But there's one magic number I find hard to fix:
'100' is a magic number.
Consider this code:
public double getPercent(double rate) {
return rate * 100;
}
public double getRate(double percent) {
return percent / 100;
}
Sonar will raise 2...