Eclipse PDT and gray file comparison window

Today I’ve bumped into some weird problem with PHP files comparison using Eclipse PDT and Subclipse (SVN). When a file was selected and “Compare with… Latest from Repository” option was chosen, the comparison window become gray, no code source was displayed and no error message was shown. It was just the same if you tried to compare a file with your local history or two separate files with each other....

January 17, 2011 · 1 min

MD5 checksum in PHP and BASH

I wondered why the same word has different MD5 checksum if I use the PHP md5(-) method and BASH md5sum command. What I mean is: <?php echo md5("sol"); ?> The result is: 12313a3d28f802e3a22b07d2e01c6dcf $ echo "sol"|md5sum The result is: 56717d999058f0e053d4b580c9396a92 It’s so because the echo command – by default – adds a newline character after its execution, so it really creates a MD5 checksum of: ‘sol\n’. To avoid it, you can use the -n echo switch which disables the trailing newline character for this command....

January 15, 2011 · 1 min