Persistence.
Verbose logging with Objective C
A C macro for verbose logging, augmented with class name, method name and line.
#if DEBUG == 1 #define vLog(format, ...)NSLog(@"%s at line:%d – %@", __PRETTY_FUNCTION__, __LINE__, [NSString stringWithFormat:format, ##__VA_ARGS__]); #else #define vLog(format, ...) #endif
Go Gothenburg app
Go Gothenburg finally gets it’s own home in the blog. All fun and games.
Go there: Go Gothenburg
Posted in Misc
Leave a comment
Shorthand Vector
Short tip for fellow devs, it seems that old Flash CS4 has a problem compiling one of it's own language features. There's this cool shorthand for writing a Vector
var v:Vector.<int> = new <int>[];However this yields error
invalid xml nameEither stay away from compiling with Flash IDE at all (which would make you a happier human), or compile with Flash CS5 and onwards.
Server POST request magically transformed to GET
Spent quite some time trying to figure out why all my POST requests ended up as GET requests on the server.
<?php echo "REQ Method : " . $_SERVER['REQUEST_METHOD']; ?>Luckily I found the answer at Stackoverflow. which reminded me of the dumb rewrite rule i had set on my server.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^lazylady.se
RewriteRule (.*) http://www.lazylady.se/$1 [R=301,L]
This effectively rewrites all "lazylady.se" requests to "www.lazylady.se". To remedy the problem remove the rewrite rule from the server's root .htaccess.