Maths are present in our everyday life. As a popular TV show states: “We all use math every day”. In client-side web development we need to appeal –among other subjects– to geometry and trigonometry in the moment that we require to build applications with a high level of animations and interactivity.
Read MoreTransformations and transitions in CSS3
I have been thinking since long time ago into making a basic tutorial about transformations and transitions in CSS3. This kind of technique allows us to transform HTML elements and even animate them without appeal to JavaScript. Using CSS3 animations the calculations are made by the GPU instead of the CPU, and most of the time this ends in smoother and preciser animations because the calculations can be made using non-integer numbers.
Read MoreFull-text search in JavaScript
There is a newer post with a better method to perform a full-text search in JavaScript.
Some time ago, I needed to create a full-text search in JavaScript in a project that I was working on. The requirement was to search the text directly in the DOM modifying it and highlighting the relevant results.
The majority of the scripts on the internet, explain how to search a text inside a string, but many of them focused on verifying if the text is present or not, using for it the indexOf or the search methods of the String object.
Read MoreRoman numerals in JavaScript
Some years ago I developed a small Action Script 3 class to work with Roman numerals using regular expressions. As ActionScript is barely used on these days, I decided to port this class to JavaScript.
Read MorePHP class to create image thumbanils
Some years ago, I wrote a PHP class to create image thumbnails because I needed it for a project. There were needed certain things that I could not able to find in other PHP classes, and I decided to create one with my specific needs. Today, after some improvements and fixes to perfect it, I have decided to share it with anyone that wants to use it.
Read Morestr_pad PHP function in JavaScript
Introduction to str_pad
Many times one needs to fill a string with another string using JavaScript. To achieve this, there is a useful function in PHP called str_pad. This function can pad a string to a certain length with another string. In this way, we are able to achieve that a certain data has always the same length, e.g.: