One easy JavaScript function that will check or uncheck all the checkboxes in a form that’s being passed as the first argument to the function.
Validate a String For a Certain Amount of Numbers
Using regular expressions in Ruby you can validate a string for a certain amount of numbers.
Validate phone number using RegEx and JavaScript
A function to validate phone numbers using JavaScript and regular expressions. It will work with all valid US phone numbers in all popular formats.
Check if an URL is Available
Generate Random Password using Ruby
This code defines a function that allows you to generate an easily readable password of the specified length, containing only valid characters.
Strip HTML tags using Ruby
The StripHtml function strips all the HTML tags in the passed string but preserves the ones specified in the PreserveTags array.
Swap string case using JavaScript
The SwapCase function turns lowercase characters into uppercase and uppercase characters into lowercase.
Inverse Hex Colors
With this function you can get the inverse of a color passed into as a hex value.
Get Real Angle Value
Given a large angle, or a negative angle, a number equal to 0 or bigger, and smaller than 360 is returned.
Introducing operators
You’ll get familiar with JavaScript’s operators. Assignment operators, arithmetic operators, comparison operators, logical and conditional operators… This is another chapter of my old, unfinished book, ‘JavaScript Class’. You’ll get familiar with operators really soon, that’s because you already know the basics of them. Yes, you do. You learned about them in your first years of […]