So you screwed up with your ninja manual inserts on some lost and forgotten table. In such a way that when your shiny django backoffice gives you a fullscreen yellow error about duplicate keys. What now? Well, you read and i will show you how to circumvent the system (well, kind of).
So we had this nice, unfinished project, publicly shared on a public server being indexed like a pig’s behind on google servers. Some searches on google had hits to full length urls to this unfinished project on the test server. Easily stopped using the robots.txt, except that its a Django site and its not as… Read More »
Ok, you want to create a function to be used several times (well, isnt that the main purpose of them?), but, depending on the call, you can have 1 argument or several. How do you go about doing it? Enter the world of optional parameter functions. Or something like that…after the jump. Here are three… Read More »
A very simple problem im sure all postgreSQL users/devs have come across one time or the other: So you have your shiny PostgreSQL Database in some nice server somehwre and you want to manually make some changes. Say you have tons of records on some table and want to replace a word with a different… Read More »
Just to keep things organized, i will leave this info here for one more hit on the interwebs. There are tons of parameters and tips and tricks, but i will just leave the bare basics. After the jump.
Extremely simple problem with a million solutions. These are just a couple of ways to do it. Go learn after the jump.
So, if you are in a hurry to create a super ninja class and dont have time to waste on stupid type-all-the-characters actions to create basic getter/setters, in NetBeans you can do this: After defining your attributes, for example: You can go to the menu “Refactor” (top menu) and choose “Encapsulate Fields…”, or the context… Read More »
So, you want to create a fancy cool table in PostgreSQL, filled with great fields of incomparable values, along with a nice auto increment primary key. You do something like this at table creation time:
To rapidly, and decently, validate email addresses, we can use something like this: The filter_var() returns the filtered data or FALSE if it fails Read about it, and more filters, here: – function filter_var()