. PHP offers two convenient functions to format (and print) Currency: money_format() and number_format() . The first can be used in conjunction with setlocale() to set the format type according to their own country, for example:
Category 'D'
Very short snippet: Currency format in PHP
Very short snippet: PHP isset_post ()
Often you have to check if a variable in the POST was sent and, if not, assign a default value. Instead of using the syntax:
1 |
WordPress: customize the navigation between the posts
WordPress offers many features to navigate through the various posts and pages forward and backward. These are used within the themes, often in a completely interchangeably, although they contain some differences. This, in fact, create some confusion in the choice of the function to use. Here are some notes:
Overloading
Overloading is a really useful feature of some object-oriented programming languages. However, no tuti OO languages support it, and some of the "implementing" or so limited or different. In general, functions or methods, overloading allows you to create two or more functions / methods that have the same name but accept different parameters, for example:
Very short trick: disable the resizing of a textarea on Safari
In any browser developed starting from the rendering engine WebKit (as apputo Safari or Chrome ), the fields textarea show, in the lower right, the characteristic feature of resizing. If such specificity can be really useful in certain cases, in others it is transformed into an element annoying.
jQuery Simple Slider 1.1.0
l'attributo rel in questo modo: Inspired by the suggestion that Santino Bivacqua I added jQuery Simple Slider can be set for each single slide a timeOut different tags by inserting in li the attribute rel in this way:
jQuery Simple Slider
jQuery Simple Slider allows you to quickly create a feature slide show from a simple list UL/LI :
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 |
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).






Latest Comments
Giovambattista Fazioli : @ Nik: I'm happy! Good luck then!
Nik : I have Monday examining information on java, thanks to me you have been very useful, the book I was unclear ...
Mark : Thank you very much, I've lit
I solved it by setting [cc_objc] / / OptionViewController.m - ...
Giovambattista Fazioli : @ Mark: I suggest you think a more correct approach. If you run the subclass of the tab ...
louis : very clear and simple I have to admit that writing a pa hardly use delegates created by ...