How to check Django version

Warning: count(): Parameter must be an array or an object that implements Countable in /home/wwwmani/public_html/42/wp-content/plugins/wp-shkshell/wp-shkshell.php on line 59

Since we are in the version theme, here’s how to check what version of django is installed in your python: From your python prompt: >>> import django >>> django.VERSION you will get something like this: $ (1,2,7, ‘final’, 0) Versions depending on your installation. Or you can type this on your command prompt (windows): c:\whatever>… Read More »

How to find out what version of PostGIS is installed

If you want to find out the version of your installed PostGis, you do this: You get a row like this: POSTGIS=”1.5.5″ GEOS=”3.3.5-CAPI-1.7.5″ PROJ=”Rel. 4.6.1, 21 August 2008″ LIBXML=”2.7.8″ USE_STATS Versions displayed will depend on your instalation, of course. External links: – PostGIS website

PHP error reporting – turning on or off

So you wrote this awesome php script, that does extreme stuff, but when you run it…it shows nothing. Empty browser. So whats going on? Well, for one, your php error reporting might be turned off by default. So how to turn it on? Read and learn. And forget tomorrow, like me.

Where is php.ini

If you are configuring some remote strange not safe for work server and you have the urge to edit the php.ini – assuming you have permissions to do it – you can find out where the file is like this: read on.

DELETE all duplicates from TABLE

If we have a long table with thousands of records with some duplicate contents and we want to trim it down to the bare essentials (no duplicates), here’s one (of several) way of doing it: For this, assume we have: – a table called “emails”, with fields: id_email, email – the table has several records… Read More »

Maximize Air window

Just to make searches easier for the rest of the world. Very, very simple example: This maximizes the window on creation complete. Dirty. More reading about NativeWindow: – NativeWindow – Adobe ActionScript® 3 (AS3 ) API Reference

DELETE rows using SELECT results – part 2

Theres already a post here about deleting rows from some table using results from a different query. This is basically the same but more raw/basic. So i have: – a table ‘events’ with id_event,title, etc. – a table ‘users’ with id_user, name, etc. – a table ‘rel_users_events’, which is a relationship between ‘users’ and ‘events’,… Read More »

Basic Git and GitHub usage

Leaving this here for all the people that want to get up and running with Git and GitHub in around 56 seconds. This mini tutorial assumes you already have: – a linux machine with git OR a windows machine with git installed (see links); – a github account/repo for the remote commits (see bottom links… Read More »

Preventing SQL injection in PHP/MySQL with PDO

This is a bit old but i wanted to add it here so it stays on record. SQL injection is the action to inject SQL code in web forms to perform a site attack and disrupt its services. For a better definition, go read wikipedia here (it even has some code for you to test… Read More »

Array shuffling in ActionScript3

Been wanting to add this post for a while. Pretty simple, really. So imagine you have an array: It can be any size, obviously. And you want to change the position of its items. Several ways to do so – like splicing the array, but i dont recommend it because theres a loss in speed… Read More »