Monatsarchiv für Januar 2010

 
 

PHP: Easy and secure password hashing class

Everybody talks about security but most of the people still save md5(password) in their databases. This is not funny. Reversing a simple and even a average password is not that hard.
I once wrote this tiny class that generates secure enough password hashes.

Den ganzen Beitrag lesen...

PHP: FIFO queue with APC

A few days ago i needed a simple queue class that would also be persistent after the pagerequest. I first thought about putting this queue in SQL but did not want the whole SQL overhead and such and remembered a blog artice about memcache queues a once read. But i had no memcache for that project and used APC instead.

Den ganzen Beitrag lesen...

Lifehacks - My Collection

I like solving strange problems with my computer. But what i also like is finding cool tricks and hacks in real life.
This page will contain a collection of life hacks i know.

Den ganzen Beitrag lesen...

Fun: Knowlegde vs Time

I am currently writing my exams these weeks and found this graph on the internet. Somehow i did some marked similarities to my learning :D

funny-graphs-knowledge-time


PHP/MySQL: Warning: mysql_query(): Unable to save result set ...

Today i found a error in a tiny script i was working on.
The error Message looked like this:

Warning: mysql_query() [function.mysql-query]: Unable to save result set in /var/www/example.php on line 55

First i found a few hints about repairing or optimizing MySQL tables, but this did not work out.
After a few debugging outputs a realized that the query was not properly written.

Den ganzen Beitrag lesen...

ATI CCC changes CPU Throttle settings

I had a wierd problem with my notebook and a fresh Windows 7 installation.
For saving battery power a changes the minimum CPU speed to 1%, but somehow this settings was "forgotten" and resettet with the default value 100%.
But i managed to find out what happened really.

Den ganzen Beitrag lesen...

PHP: phpMyAdmin3 - deactivate slider effects

For all of you who liked phpMyAdmin2 where all relevant information was visible at any time, sould be annoyed be the new slider effects in phpMyAdmin3.
I did a short search for the config value to change this and found this solution.

Add this to your config.inc.php:

// Change slider behaviour
$cfg['InitialSlidersState'] = 'open';

And your sliders will start in visible state.

phpMyAdmin download:
http://www.phpmyadmin.net/home_page/downloads.php

PHP: floor() and ceil() are slow!

A workmate mentioned, that floor($i) could be replaced with (int)$i.
I found this very interresting and did some researched about that.

floor($i); will return a float that will have the lower value of $i.
A cast will just convert $i to an integer which will cut of all decimals.
So by symptoms, these two methods are equivalent. Even if floor returns a float, PHP does dynamic casting of its variables.


Den ganzen Beitrag lesen...