Category Archives: Uncategorized

PHP: Something to watch out when using global scope variables, or "why globals doesn't (seem to) work!?"

Okay, I guess this is probably a childish mistake for an experienced PHP-er, but I myself got busted tonight, and maybe I’m not the only one 🙂 So, here it is. Consider the following small PHP program: <?php print_global_a(); $a … Continue reading

Posted in Uncategorized | Leave a comment

How to "un-commit" a revision from the top of a Subversion repository

Sometimes it may occur that a commit was performed in a subversion repository, that was not exactly what the original intention was. In such cases we would like to have an “undo” operation and bring the repository back to its … Continue reading

Posted in Uncategorized | 1 Comment

C++: calling a member function pointer

This article is about calling a member function (method) through a “function pointer”. I decided to write about it because it tricked me for a while, and I think this may be useful to others. I will start with a … Continue reading

Posted in Uncategorized | 4 Comments

How to convert FLAC to MP3 on command line

First install ffmpeg (WinFF on Windows) and LAME. Then to convert a .flac to .mp3 type this on the command line: ffmpeg -i “xxx.flac” -acodec libmp3lame -ab 128000 “xxx.mp3”

Posted in Uncategorized | 1 Comment

How to go off the record in Gmail when "Go off the record" is grayed

It is well known that due to a “bug in Gmail” [sic], it is possible to detect whether a user (that is apparently offline) is really offline (or has blocked you) or he/she is just hiding in invisible mode. To … Continue reading

Posted in Uncategorized | 10 Comments

Replace "\n" with new line characters, using Notepad++

In case you have a file which contains “escaped” new lines (\n), like this: and you want to replace the escaped new line sequences with actual new line characters, you can easily accomplish this task using Notepad++. First load your … Continue reading

Posted in Uncategorized | 64 Comments

PHP Extensions do not load on fresh WAMP installation

So, you just installed WampServer on your Windows PC but the smile went away from your face as soon as you tried to use mysql. PhpMyAdmin reports that it “cannot load mysqli extension” (or “cannot load mysql extension”), or your … Continue reading

Posted in Uncategorized | 8 Comments

Restore window's visibility (Windows 7)

Sometimes it can happen that an application window may get “locked out” of the visible area of your desktop. Especially when you are extending your desktop in multiple displays and later on one of these displays is disconnected, a program … Continue reading

Posted in Uncategorized | 2 Comments

counting and listing hard links on Linux

A hard link is actually nothing more than a regular directory entry, which in turn can be seen as a pointer to the actual file’s data on the disk. The cool thing about hard-links is that a file can be … Continue reading

Posted in Uncategorized | 14 Comments

Base-2 and Base-N logarithm calculation in Java

I was surprised today to see that the Math package does not provide a method that the calculation of an arbitrary base logarithm, even though it provides a log10() method for base-10 logarithms. One can easily calculate the logarithm of … Continue reading

Posted in Uncategorized | 5 Comments