Length Function Snippets


09 February, 2012   

Syntax for the Length function

PHP code to create a human readable string that will look more close to dictionary words, useful for captchas.

02 February, 2013   

An array that could dynamically adjust its size for a fluctuating capacity by SunnyD

Find the length of the array before using it in the for function

Sometimes you need to generate passwords for customers automatically when a new account is created. This code allows you choose the desired length and strength for the password and it is very flexible.

04 December, 2018   

PHP Code to create Unique AlphaNumeric

30 October, 2013   

Find a key from a list of values​​. parameters: sbValues​​: List of Values 'A;B;C;D' sbToken: Key 'B' sbSeparator: ',' or any defined sbValues

28 January, 2013   

Converts integer to left-zero padded string, len chars long.

13 March, 2014   

Delphi code example for [UNIT] ROT1 Encrypt Strings

22 August, 2012   

This JavaScript code will enable you to display text within your status bar that is typed line by line.

02 February, 2013   

Example code for Generic Array To String Function

A JavaScript implementation of the famous sprintf() function

06 June, 2011   

This reorders the elements of an array into a random order.

03 April, 2014   

JavaScript functions to add, fetch or delete browser's cookies

18 May, 2011   

To randomize an array we loop over the length of the array, removing an object chosen at random and then adding it back onto the Array’s end position. Think of this as having a deck of cards where you pick a card at random from the deck and move it to the top of the stack repeated for the total number of cards in the deck. It’s important to...

Add Non-Breaking Space on Title to Prevent Widows

08 February, 2014   

How to set/get/delete Cookies

13 November, 2014   

Here is a form that asks for Name and Email address. When the form is submitted the Email address is verified first. If you put in a Name and a correct Email address, an anchor element is displayed allowing the user to download the file, two cookies are created storing the Name and Email address. If the user goes BACK in the browser and tries...

18 September, 2013   

If you don’t need human readable string, then use this function instead, which will create a random string you can use for user id’s etc.

23 May, 2018   

Add to bookmarks bar, select text, click it to get the word count.