Have you encountered the following PHP error (or something similar) before in your Windows Vista? Warning: session_start() [function.session-start]: open(C:\Users\YOURNAME\AppData\Local\Temp\php\session\sess_ficdel21e6lupsojqdk62ofts5, O_RDWR) failed: No such file or directory (2) in C:\webapp\folder\index.php on line 24 The solution to the above error is really simple. … [Read more...]
WordPress Plugin – Default Trackbacks
Default Trackbacks is a wordpress plugin that sends trackback to a list of preset URLs. It is enhanced version of my old Default Trackback. The old Default Trackbacks plugin store a list of predefiend URLs in text file while the new one store the list of URLs in Wordpress database. … [Read more...]
C#: Unix Time to .Net DateTime and Vice Versa
For some reasons, some programmer might store time values as Unix timestamp in database instead of standard SQL DateTime data type. The main reason to store time values as Unix timestamp is unknown but what I guess is for maximum database compatibility. Some old database does not support SQL DateTime data type. … [Read more...]
Java: Randomly sort values in a array (the generic way) in single pass
Few years back (yes, about 4 years back), I wrote an article about randomly sort query results in MySQL. The main problem in randomly sort query results is that when you have a very large data in your database and the statement to sort the result may change the data execution plan causing DMBS does not choose the right plan. Therefore, sometime it is more wise to sort it in … [Read more...]
PHP: Short URL Algorithm Implementation
Few months ago, I introduced a simple algorithm that allow users to implement their own short URL into their system. Today, I have some spare time so I decided to write the short URL algorithm's implementation in PHP. At first, we define a function called shorturl() that receives a URL as the input and returns an array that contains 4 hashed values (each 6 … [Read more...]