Sudo install OpenGL & SDL on Ubuntu

A quick and easy way would be to type the following in one line with single spaces in the Terminal. This way of installing OpenGL and SDL libraries only applies to Ubuntu. sudo apt-get install nvidia-glx-new-dev libglew1.4-dev libsdl1.2-dev libsdl-ttf2.0-dev libsdl-image1.2-dev libsdl-mixer1.2-dev

By Andrew Odendaal, ago

How To Modify Hosts File On Windows

The hosts file is located at the following address: C:\windows\system32\drivers\etc\ or %systemroot%\system32\drivers\etc\ But you will need to open Notepad with “Run as Administrator” first and then open it through there otherwise it will give a permissions problem

By Andrew Odendaal, ago

Get all directories in PHP

I think this may be the fastest way to get a list of all the directories in a given folder/directory using PHP. [code lang=”php”]$directories = array_filter(glob(‘*’), ‘is_dir’);[/code] ..and of course you can also add a path to it if you need to: [code lang=”php”]$directories = array_filter(glob($myPath.’*’), ‘is_dir’);[/code]

By Andrew Odendaal, ago

Warning: mysql_affected_rows(): supplied argument is not a valid MySQL-Link resource

Warning: mysql_affected_rows(): supplied argument is not a valid MySQL-Link resource You have just gotten a warning when trying to check if an inserted row was successful but when calling mysql_affected_rows(mysql_query(“INSERT INTO……”)) you get a warning telling you that the supplied argument is not a valid MySQL-Link resource. This is because Read more…

By Andrew Odendaal, ago