jQuery is one of the most popular JavaScript frameworks, a fast and concise library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.
Wednesday, March 28, 2012
Friday, January 13, 2012
How to programatically change a template file in drupal 6
When building modules in drupal, you often would like to change the template file of a specific hook, for example page.tpl.php.
Drupal does not have a special function to do this, but you can play with these 2 functiones:
Drupal does not have a special function to do this, but you can play with these 2 functiones:
Wednesday, July 20, 2011
Singleton design pattern in PHP
You can find all the information you need on the web if you google singleton design pattern. So I'm not gonna fill your head with all the theory.
I'll tell you how you can implement it.
I'll tell you how you can implement it.
Thursday, June 23, 2011
How to fit an image in a rectangle area in PHP using GD
Have you ever had a fixed space in your design, and you must put an image that fits exactly there, while preserving the aspect ratio? Well, this is what i'll explain in this article.
Etichete:
gd2,
image manipulation,
image resize,
php,
php center image,
php image crop,
resize funtion
Tuesday, June 21, 2011
Using a transparent PNG image as watermark in PHP
Sure there are plenty of scripts on the internet that does this thing ... but very few explain this.
Etichete:
gd2,
image manipulation,
php,
png watermark,
watermark
Thursday, June 16, 2011
Calculate the distance using lattitude, longitude and ZIP codes in MySQL
So, assuming we have a table:
ZIP_CODES
zip_code | lattitude | longitude
We take this zip code from NY
$zip = 10001
$lat = 40.750742
$lon =-74.52976
What we need is the Earth radius (6371 km).
If we need to search the zip codes that are in a 10 km area, we could use this 'small' sintax:
ZIP_CODES
zip_code | lattitude | longitude
We take this zip code from NY
$zip = 10001
$lat = 40.750742
$lon =-74.52976
What we need is the Earth radius (6371 km).
If we need to search the zip codes that are in a 10 km area, we could use this 'small' sintax:
How to calculate age in MySQL
When programming, you hit yourself with many problems, that apparently are very simple, but require a rather difficult syntax.
On a site, i found a small problem - to calculate the age of the person and see if that person is between 2 selected ages.
On a site, i found a small problem - to calculate the age of the person and see if that person is between 2 selected ages.
Subscribe to:
Posts (Atom)