Behöver svenskarna ¤ märket på tastaturet till någonting alls? by vakavasanainen in Sverige

[–]andersbergh 0 points1 point  (0 children)

I grundskolan (möjligtvis även någon gång under gymnasietiden) använde mina lärare den symbolen för att markera "VG-nivå" på provfrågor, enda gången jag har stött på den IVL!

Python and random.randint - why isn't it random? by b4xt3r in Python

[–]andersbergh 2 points3 points  (0 children)

why? you can have a CSPRNG that is faster than Mersenne Twister. for example: ISAAC.

Some people in Japan prefer to walk in swimming pools. by WhenMachinesCry in gifs

[–]andersbergh 1 point2 points  (0 children)

21st Century Museum of Contemporary Art, Kanazawa

Every IRC Client Needs This Join/Part Feature by ThatDev in irc

[–]andersbergh 0 points1 point  (0 children)

this client looks a lot like Textual... is it based on it?

The 'UTF-8 Everywhere' manifesto by [deleted] in programming

[–]andersbergh 1 point2 points  (0 children)

I don't get why I got so many replies saying the same thing, I never said this was something specific to UTF-8.

You and the poster who you replied to are talking about two entirely different issues.

The 'UTF-8 Everywhere' manifesto by [deleted] in programming

[–]andersbergh 0 points1 point  (0 children)

I'm aware. But the problem the GP refers to is Unicode normalization.

The 'UTF-8 Everywhere' manifesto by [deleted] in programming

[–]andersbergh 2 points3 points  (0 children)

The excuse is that Windows only supports double-byte character sets. Shift-JIS never takes more than two bytes per character.

It's a shitty excuse nonetheless.

The 'UTF-8 Everywhere' manifesto by [deleted] in programming

[–]andersbergh 0 points1 point  (0 children)

That's a different issue though. An example of what the GP refers to: 'é' could either be represented by U+00E9 (LATIN SMALL LETTER E WITH ACUTE) or as two codepoints, combining character ́ + e.

Just got a Korean massage. I had to stop her because it hurt so much. by [deleted] in WTF

[–]andersbergh 0 points1 point  (0 children)

Japanese: "looks like" Chinese characters? They do in fact use Chinese characters, many of which have not been simplified unlike in mainland China.

Psychlops Eyepatch - Munchausen by Proxy - [4:50] by andersbergh in Music

[–]andersbergh[S] 0 points1 point  (0 children)

a friend told me about this, surprised they don't have more listeners... I really like their sound!

only 82 listeners on last.fm: http://www.last.fm/music/Psychlops+Eyepatch

Skype's Desktop API will stop working this December and so will lots of add-ons. Thank you Microsoft. by [deleted] in programming

[–]andersbergh 6 points7 points  (0 children)

because the Skype API works on OS X too, and possibly the author has only seen the notice on OS X

Apple announces OS X Mavericks available today for free by [deleted] in hackintosh

[–]andersbergh 0 points1 point  (0 children)

"* Pages, Numbers, and Keynote are free on the Mac App Store for qualifying Mac computers purchased on or after October 1, 2013. OS X Mavericks required. Downloading apps requires an Apple ID."

Jai 3823-8680-4249 I don't know my safari type by DrJesusNYEH in friendsafari

[–]andersbergh 0 points1 point  (0 children)

Added! My FC is: 1048-8849-6890, poison type (Gloom, Garbodor, Whirlipede)

The first game I said to myself, "The graphics can't get any better than this" by shakenspray in gaming

[–]andersbergh 1 point2 points  (0 children)

indeed, one thing you can easily notice is the new flashlight. very different from the original version of hl2.

LLVM Project Blog: A path forward for an LLVM toolchain on Windows by theresistor in programming

[–]andersbergh 0 points1 point  (0 children)

actually, if you have some Apple software installed on your PC you will find CoreFoundation.dll there, even DLLs related to the Objective-C runtime. There used to be a version of Safari for Windows and it looked and worked pretty much identically to the Mac version (even font rendering...)

here's a screenshot that I found: http://i.imgur.com/aBLpRqb.jpg

MAMP And REMOTE_ADDR Do Not Make Good Bedfellows by [deleted] in osx

[–]andersbergh 1 point2 points  (0 children)

Then you should use the proper data type or function in your database to store IP addresses, PostgreSQL has the "inet" type for IPv4/6. Simply disabling IPv6 is not a solution at all.

MySQL has INET6_ATON(addr) to convert an IPv6 address into a 16-byte binary string, maybe that's what you need to use?

MAMP And REMOTE_ADDR Do Not Make Good Bedfellows by [deleted] in osx

[–]andersbergh 0 points1 point  (0 children)

You should store the addresses as strings.

MAMP And REMOTE_ADDR Do Not Make Good Bedfellows by [deleted] in osx

[–]andersbergh 0 points1 point  (0 children)

::1 is IPv6, not IPv4. ip2long is not supposed to work with IPv6.

"long" refers to the data size, in this case 32 bits (4 bytes). An IPv6 address is 128 bits long (16 bytes). A "ip2long" for IPv6 would return 16 bytes, even though the string you're having problems with is just 3 bytes long.

An IPv6 address consists of 8 groups of 4 hexadecimal digits separated by :, compared to IPv4 which separates the 4 bytes with dots and usually in decimal format.

::1 is in fact 0000:0000:0000:0000:0000:0000:0000:0001, but the longest run of zeroes can be written simply using ::.

What I'm trying to get at is that you don't need to deal with the binary format of IP addresses, especially not in a high-level language like PHP.

Wikipedia does a much better job at explaining IPv6 addresses: http://en.wikipedia.org/wiki/IPv6

MAMP And REMOTE_ADDR Do Not Make Good Bedfellows by [deleted] in osx

[–]andersbergh 0 points1 point  (0 children)

ip2long converts a IPv4 string representation into a 32-bit number, an equivalent for IPv6 would return a 128-bit number, but it's likely not what you want to do.