jQuery Simple Slider allows you to quickly create a feature slide show from a simple list UL/LI :
Archive January, 2009
jQuery Simple Slider
Wordpress: bugs in the installation of plugins from a ZIP archive
With WordPress 2.7 you can install a plugin by selecting the package directly. zip file on your computer. This "store" is transferred to our server where it is "extracted". Unfortunately some developers when they create. Zip file from the Mac, also fit into this archive folders (and files) on the Mac, the plugin is not necessary, as the folder __MACOSX .
Very short trick: take random elements from an array in PHP
The function shuffle() PHP "mixes" literally the elements of an array:
1 2 3 4 |
Mathematics: resize in proportion
ci viene chiesto di renderlo più piccolo del 20%! Given a large rectangular object w and high h we are asked to make it smaller by 20%! First of all, we decrease of 20% its width:
1 | object.width object.width = - ((object.width * 20) / 100) |
from which
1 | object.width object.width = - (object.width * 0.2) |
from which
1 | object.width = object.width * (1-0.2) |
For the height is exactly the same.
When there's a third object, ie there has been given the percentage to be removed from our object, but by a third party, we have:
1 2 3 | rate = object.width / object.height object.width = terzo.width * (1-0.2) object.height = object.width / installments |
Undolog: workstations between past and present
The other day I happened to have in my hands some old photos with my first computer! So I was reminded of pictures of my current position and compare it with the "time" has passed. The photographs are found naturally of poor quality compared with today, another sign of the times!
jQuery Plugin footer caption: add captions to images
jquery.footercaption.js is a plugin for jQuery that can dynamically add captions to images and other elements on the page ( click here for a demo).
Actionscript 3.0 for beginners: lesson # 5
Who has started to develop code with scripting languages like Javascript or Actionscript itself, might not know all the concept of data type. With some high-level languages, in fact, he used to - at best - to declare variables without giving a specific data type, not counting those languages that do not require any statement (such as PHP - not in the strict version 5 ).
The mathematical programming in
As a developer uses math? And how much mathematics you need to know to know and be able to develop well?
If you have a passion for programming most likely you can overcome all obstacles due to lack some math. However if in addition to the passion you have a decent knowledge of mathematics and logic, our "life" as a developer will surely gain. It is however clear that not all programmers need to struggle with problems "mathematical". Much, indeed everything, depends on the type of program you are developing. A phone book certainly has much less of a mathematical play like PacMan! Although not always true. Ultimately it depends "part" of code that we are developing.
Centering an element
Who develops such as user interface (UI), has certainly had to deal with situations that required at least once tangled with multiplication and division. Once I happened to run into a code that was centered horizontally through a window to the screen. The function (do not carry the original code in C for easy reading at all) was written this way:
1 | window.x = (screen.width / 2) - (window.width / 2) |
Probably the programmer when he wrote it - correctly - in reasoned this way:
- I find the center of the screen
( screen.width / 2 ) - Position the window in the middle of the screen
( window.x = screen.width ) - Since in this way would be centered only the upper left corner of the window, also subtract half the width of the window
( window.width / 2)for "centering" the whole -
window.x = ( screen.width / 2 ) – ( window.width / 2 )
Up here the logic and passion have definitely helped our developer. However, further improvement could be done just to avoid the two divisions, namely:
1 | window.x = (screen.width - window.x) / 2 |
The knowledge of fractions, and therefore a bit 'of elementary mathematics, the CPU would have saved a division too: one of the greatest amongst other things!
If we want to be "geeks" or perfectionists, we may, depending on the programming language we use, improve it further by writing:
1 | window.x = (screen.width - window.x) >> 1 |
Where >> indicates the logical operation of "moving" to the right by one bit - known to very fast operation. Move right one bit value is equivalent to divide by 2!
Wordpress: functions.php, some useful function
Taking up the excellent post of Francis Gaven WordPress Little Trick - functions.php and nested comments on the usefulness of file functions.php in this WordPress theme, here are other useful features to use for all your themes:
WordPress: revision management and dell'autosave
. The new features of WordPress revisions can be controlled and set via define global WP_POST_REVISION . Its definition can be inserted in the file wp-config.php :






Latest Comments
Gabriel : Hello, interesting article. I would need something similar but with some changes. In a ...
sebastian : Great share - thank you!
Subject : very helpful indeed! I tried it and it is just what I needed. Now I wonder how do I get ...
vik : With strategic help!
Pepper : Hi there, I do not know if you're one of the creators of the WP plugin Bannerize. I have spotted a ...