Calculate Scripts Snippets

Scripts used to calculate Daylight Saving Time (DST) for the US and EU. Valid for years 1900 to 2099. [DST wasn't adopted until the 1950s-1960s for US and 1990s for the EU] By: brad degrandis

19 October, 2013   

Mysql code shows how to calculate last 7 days

04 October, 2012   

Turn a string into a readable url

Have you ever wanted to know how much memory one of your PHP scripts uses when it runs? You might want this information if your script has a memory leak or takes a long time to execute. If that's the case then there's a great built-in function called memory_get_usage, which will display the exact amount of memory being used by your script. This...

MySQL code example to calculate age from Date Of Birth

27 August, 2011   

The <noscript> tag is used to provide an alternate content for users that have disabled scripts in their browser or have a browser that doesn’t support client-side scripting. The noscript element can contain all the elements that you can find inside the body element of a normal HTML page. The content inside the noscript element will...

This is a PHP Class that calculates the size, number of files & folders of a specific directory.

How to calculate distance between Mouse and Element

22 April, 2012   

Example Mysql code for Selecting the minimum value

21 September, 2011   

Selecting the maximum value of the column in the brackets.

PHP code to calculate the difference between two dates

23 August, 2014   

Correctly calculate the date of Easter Sunday.

29 March, 2014   

How to convert strings to lowercase characters, and then clean them up for use in scripts, etc.

24 July, 2014   

Calculate distance between two zip codes or postal codes.

03 April, 2011   

Often when working on scripts alert boxes are placed inside loops as a debugging tool. You can sometimes end up with hundreds of alert boxes and no way to stop them. This script placed at the start of your code will give you an option to disable the alert boxes after a pre-determined number set by you.

When placed in startup scripts, this snippet activates every time user opens a file. It then traverses the directory path backwards and looks for user created project folders. If one is found, script offers to switch it on. This is very useful when working with a number of projects at a time.

11 November, 2013   

These are two JavaScript functions that should of course be properly called on "onkeyup" event in the appropriate fields.

13 June, 2011   

This C# code snippet calculates a Fibonacci number using recursion, i.e., the Fibonacci method calls itself when necessary.

30 August, 2011   

Calculates the total size of a MySQL database in KB/MB or GB...

Calculate the more near point belonging to a given segment.