5 Years ago, this happend, and then it became sort of a meme.
Challenge
The Challenge today is, to check if a "magic square" is a valid parker square.
What is a Real Magic square?
All the numbers must be natural or sometimes 0
The sum of rows, columns and diagonals must be same.
There must be no...
Like the language doesn't care how it receives input, as long as it's valid data. The interpreter would be responsible for picking a format the user sees
@RedwolfPrograms You should delete this, it contains personal information. For example, I now know your name is Ryan, you're 59 years old and you are red and blue
static long long makeComparable(double d){
long long v=*(long long)&d; //reinterpret the double's bits as a singed 64bit int
return v^(unsigned long long)(v>>63)>>1; //if positive, keep as-is; else, flip all bits except the sign bit
}
obviously the sign bit must be the most significant bit, and the (biased) exponent must be to the left (more significant bits) of the mantissa so they can be comparable
C18 currently uses the ISO/IEC 9899:2018 standard, but I don't know what that does because I don't happen to have 198 swiss francs that I'm willing to spend: iso.org/standard/74528.html
from what I can tell, C uses IEEE 754 though (and pretty much everything should? I think?)
the quake 3 source code assumes IEEE 754 tho so it should be fine
fun fact: forcing a float to become an int by just taking the same bits and interpreting them differently, at least for positive integers, will roughly take the log of it without needing to do any operations
I can generally recognize Onion articles from reality, but its less funny when you get an article saying "Common Job Interview Mistakes" with "There’s no faster way to blow a job interview than to express your belief that you have inherent worth as a person and are deserving of basic dignity and respect"
> 58% of employers say they’ve caught job applicants in a lie simply because the interviewee didn’t take the time to commit their fabricated life to memory.
> It's good to follow up every interview with a hand written thank you note, along with photos you've personally taken of the interviewer's wife and children throughout their day.
> It’s okay to embellish some aspects of your leadership skills, but just don’t show up and use the exact same name, birthday, wife, children, education history, and finances as the person who is interviewing you.
Damn, that's what I did at my last job interview, think I may have blown it :/
Not if it was for an identity theft job at a crime syndicate :P
> Bring radio remote control to interview, and offer to employer—explain that they can use it to control your every deed.
Why are problems for coding competitions always so poorly done? There's always at least a couple where it gives you the number of test cases and you have to write useless boilerplate just to iterate over all the test cases when the people testing your code could just write a loop to run multiple test cases themselves