1,260 karma · joined Nov 2, 2009 (17y ago) · 479 submissions
comment 13y ago · link · parent
comment 13y ago · link · parent
(I spent several years reverse-engineering Command & Conquer RA2, I should know - that game has hacks and flukes everywhere.)
comment 13y ago · link · parent
[1] http://www.html5rocks.com/en/tutorials/pointerlock/intro/
comment 14y ago · link · parent
comment 14y ago · link · parent
comment 14y ago · link · parent
In other words, please answer each question in the context of a C compiler whose implementation-defined characteristics include two's complement signed integers, 8-bit chars, 16-bit shorts, and 32-bit ints. The long type is 32 bits on x86, but 64 bits on x86-64 (this is LP64, for those who care about such things).
comment 14y ago · link · parent
[1] http://www.reddit.com/r/programming/comments/tionj/linus_tor...
comment 14y ago · link · parent
comment 14y ago · link · parent
That's, of course, assuming that such an announcement is made in the first place. Last year the timthumb bug was being exploited and not all theme download sites bothered to alert the users that the themes were vulnerable.
comment 14y ago · link · parent
http://madebyevan.com/webgl-water/ might be more interesting then.
comment 14y ago · link · parent
Klarna also requires your Social Security Number, in those countries which use it, as well as other information: http://integration.klarna.com/en/testing/test-persons .
381.
JetBrains releases PhpStorm 3.0(jetbrains.com ↗)
1 points · by DCoder · 14y ago · discuss
comment 15y ago · link · parent
comment 15y ago · link · parent
comment 15y ago · link · parent
I mentioned C+++ Templates: The Complete Guide - it demonstrates a similar template (15.2.4) to add two values, and even with simple addition it points out a flaw similar to this one (and admittedly more likely to come up in the real world) - determining the return type for, say, int + char. Their solution is a traits class with a specialization for each pair of types. Sounds complicated, but then again, so is writing a template function to perform simple multiplication.
comment 15y ago · link · parent
template <class ttype>
ttype multiply(ttype a, ttype b)
{
return a * b;
}
int * int doesn't always fit in an int. C++ Templates: The Definitive Guide suggests using a traits class to solve problems like this. Templates are a complex subject in general, and I wouldn't recommend using them without having read the aforementioned book.comment 15y ago · link · parent
> I think PHP support on Windows is as good as on any other OS.
I have seen several things fail in that environment - escaping shell commands and arguments is problematic, invoking external executables is only reliable when full path is used [1], realpath() (used to, at least) chokes on / as a directory separator... Autoloading classes based on classname => filename can produce funny results. File uploads can work differently (case sensitive filenames - foo.jpg and foo.JPG can coexist in Linux, but not in Windows).
On the other hand, there are things like the new MSSQL PDO driver that only exist in the Windows world.
---
[1] Windows 2003 Server was running our app, which invoked Imagick similar to `convert $input.jpg $output.jpg`.
Worked just great for half a year.
Deployed to a second machine, Windows 2008 Server.
Command execution fails silently.
Change %PATH% to be identical to the old server's one.
Restart.
Still fails.
Compare phpinfo().
$_ENV['PATH'] in new server doesn't match %PATH% (it appears to be re-sorted with windows folders first), $_ENV['PATH'] in old server matches %PATH%.
Messing around with new %PATH% changes nothing, new server keeps giving PHP the silently-reordered %PATH%.
Nothing helps, short of specifying full path to `convert`.
A very fun thing to debug.
comment 15y ago · link · parent