That was probably a major factor in the success of the C64: the fact that you could use a normal TV as a monitor. It wasn't great, but it worked. But I'm glad we had PAL TVs and not NTSC...
How can PAL ruin the gaming experience when (a) gaming on screens at home was a very new thing and (b) there wasn’t an alternative around (it’s not like people who used PAL had easy access to NTSC for comparison)?!
the gamers say that because the games were made in the states & japan, then exported to europe, the game just would run at a lower clock rate to match the 50 hz.
I just scored rather nicely with a quick Python / C question. stackoverflow.com/questions/41143393/… I guess the behaviour of the OP's code is a bit mysterious if you don't know what's going on, and people like it when mysteries are solved.
So it turns out that md5 cycles have an average length of 2**64, which rather dashes the plan of certain users to optimize certain parts of certain coding challenges...
@Kevin FWIW, there are some good cycle detection algorithms at en.wikipedia.org/wiki/Cycle_detection I coded Brent's algorithm in Python to detect MD5 cycles a few years ago, but it's not very fast. :)
@AndrasDeak It depends how you're usingthe MD5. Eg, it's perfectly safe to use it in a HMAC en.wikipedia.org/wiki/… although the security of the MD5 hash function itself is severely compromised - the currently known " attacks on HMAC-MD5 do not seem to indicate a practical vulnerability when used as a message authentication code."
So all of HMAC-MD5's practical vulnerabilities are unknown to the community, so when you do get pwned, you won't even know how it was done, which is even worse! Solution: switch to a hash algorithm with many more known vulnerabilities than unknown ones.
@PM2Ring is that essentially the "instead of comparing your entry to your plaintext password, I'm comparing it to the salted md5 hash of your password"?
I might even venture to guess that a string of length 1 can take up unlimited size by cramming together as many combining characters / zalgo marks as you can
... Unless adding the same combining character twice isn't valid, in which case your upper bound is the number of combining characters that exist.
To counter my earlier burn, I get the feeling that 2.7 hashlib has to do more work turning the hex digest into a string than 3.X hashlib has to do turning the hex digest into a bytes, so my claim that 2.7 is better is spurious
The enterprising "well, actually"er would run benchmarks to determine the faster version, but I can't be bothered myself
On the gripping hand, if 2.7 strings and 3.X bytes are implemented in similar ways, then the difference would be negligible. Now we are thoroughly in territory that I know nothing about, and I'm out of hands, so I will let the issue rest.
Exactly. It could use multiple codepoints. But the bottom line is that codepoint numbers are in 0 <= i <= 0x10ffff although some of those codepoints are unassigned.
C:\Users\Kevin\Desktop>py -3
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:38:48) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> len("♪")
C:\Users\Kevin\Desktop>
According to my computer, the length of a unicode music note is "crash to desktop with no error message"
I came across this challenge to find the unique number on a list. I couldn't figure out, so I look into the solution. In the solution it show the code, but it doesn't not explain the code. Can anybody of you guys explain this code to me.
def singleNumber(A):
ret = A[0]
for i in range(1,len(A)):
ret ^= A[i]
return ret
A = [1,2,45,4,5,7,8,9,1,2,4,5,7,8,9]
result = singleNumber(A)
print (result)
@David ^ is the "bitwise xor" operator. Doing an xor with the same number twice is the same as not doing it at all; 23 ^ 7 ^ 7 is equal to 23. So when you xor ret with every value in A, any value that appears an even number of times cancels out with itself, leaving only the numbers that appear an odd number of times.
Almost all the Python code I've written that uses XOR is encryption-related. And you know what they say about rolling your own encryption. :)
One cute use of XOR is affectionately known as "Gosper's Hack". Given a starting integer n, it finds the next integer n that has the same number of 1 bits as n. See HAKMEM Item 175 for details.
Ralph William Gosper, Jr. (born April 26, 1943), known as Bill Gosper, is an American mathematician and programmer. Along with Richard Greenblatt, he may be considered to have founded the hacker community, and he holds a place of pride in the Lisp community.
== Becoming a hacker ==
In high school, Gosper was interested in model rockets until one of his friends was injured in a rocketry accident and contracted a fatal brain infection. Gosper enrolled in MIT in 1961, and he received his bachelor's degree in mathematics from MIT in 1965 despite becoming disaffected from the mathematics department...
A few years ago I "accidentally" invented an improved memory loop in Life. I say "accidentally" because it seemed pretty obvious to me, and I was surprised that it was new. Someone showed it to Bill Gosper, and he said "yeah, it's ok", or words to that effect. :)
"I'm having a lot of fun breaking things and then putting them back together, and just remembering the joy of turning a set of instructions into something useful and fun, like I did when I was a kid."
- Wil Wheaton, WIL WHEATON dot NET
damn wesley crusher writes his domain in upper case, and manages to use CSS in such a manner that the result looks almost identical to the 90s table layouts. clap clap.
@AndrasDeak Maybe. It's not in my HNQ list. But I did rush to get an answer in, and I saw it seconds after it was posted. I added more details after the initial submission, but it had already got 4 or 5 upvotes by then.
@David BTW, never use list as a variable name because that masks the built-in list type, which can lead to weird bugs. The same goes for other built-in type names like str, dict, and set. And for built-in function names like max and min
Clutching your arm with more strength than an old lady should have, but still brittle enough for you to shake her off and mumble "sorry, haven't got any change" in response to the prattling you weren't quite listening to
@KevinMGranger Oh, it wasn't a hit to the head. The pain was on my right side and in my arm...the pain in my arm kinda propagated to muscular pain in my neck which lead to the hadache
this has happened before....physio, advil, a few days, and back on the ice
@idjaw: I don't mean to discourage you, but it doesn't get any better.. if anything, though, that fact should encourage you to play as much as you can when you can still recover!
Oh, that's the key. """the setter didn't work at the time we call "Bar.bar", it because we are calling "TypeOfBar.bar.__set__", which is not "Bar.bar.__set__", """. Now it makes sense.
If I do too many sit-ups, my big toe starts to hurt. because I wedge my feet under the bureau to get leverage and the bureau has fairly sharp corners which prod me even if I wear two pairs of socks.
a musical movie with emma stone and ryan gosling google.ca/…
@corvid when you get messaged on linkedIn, they offer you three canned responses if you are interested or not. I get a lot in French, and sometimes I just want to use them, but they are always in English, so I have to re-write them. Would be great if they started venturing down supporting different languages
I'm trying to figure out the motivation by some people who add me on linkedIn. I recently had a car salesman wanting to connect with me. We have no mutual contacts. I don't get that one.
@AnttiHaapala I was going to say "like two billion" originally but I rounded down because I figured half of them wouldn't be able to understand the other half so it's not entirely fair to count it as one homogeneous group
Having lived in China, the development of the idea of a unified "Chinese people" is an impressive accomplishment. It's immediately clear to an outsider that there are countless subpopulations, far more different from each other than we'd use to distinguish a separate people in a European context. [Edited because it was too long a sentence..]
I have more in common with you guys, who live all over the world, than I have in common with the guy who runs the farm four blocks from my house. Patriotism is an outdated concept.
I have more in common with you guys in some ways than I have with members of my own family, but I don't think family is an outdated concept. In some ways that are very important to me, I also have more in common with some rice farmers in China without internet access than I do with most of you. Networks of connection can be complicated.
Where "all over the world" means North America or Europe, right? The room is more diverse than others, but it's still western-culture dominated. Unless there's someone I'm not considering, sorry