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
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> python -c "import django; print(django.get_version())"
And you will get:
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.
- PostGIS website
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.
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:
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 with duplicate emails in the “email” field
So we do it like this:
Just to make searches easier for the rest of the world.
Very, very simple example:
<?xml version="1.0" encoding="utf-8"?>
private function init():void
This maximizes the window on creation complete. Dirty.
More reading about NativeWindow:
- NativeWindow – Adobe ActionScript® 3 (AS3 ) API Reference
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’, with id, id_user,id_event
Lets assume i want to remove a user (id_user=1) from the system and all his events.
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 for help on this);
- a love of zombies – not really necessary but it helps.
Off we go, read on.
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 on your friend’s websites)
So read on for the mini tutorial/reference.
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 -, but i found the following to be the fastest and simplest: