Calculate Usage Memory Snippets

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...

This snippet will check memory and then print initial, final and peak usages.

C code example for useful macros, functions and tricks

22 January, 2012   

C++ example code for showing how to allocate and free memory

19 October, 2013   

Mysql code shows how to calculate last 7 days

26 June, 2013   

Clear memory, clear console and close all figures.

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

02 March, 2014   

Delphi code example to get process memory usage

MySQL code example to calculate age from Date Of Birth

C code snippet to dynamically create and initialize 4d array

Source code for dynamically create and initialise 4d array

The array is formed dynamically using malloc.

06 August, 2012   

Showing how to work with dynamically allocated arrays

How to calculate distance between Mouse and Element

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

PHP code to calculate the difference between two dates

23 August, 2014   

Correctly calculate the date of Easter Sunday.

This function will not recurs subdirectories - it will only return a list of sub folder on the "first" level.

When developing applications that need to operate on files and directories it is a common task to, for example, get the list of all sub-directories for a given directory.

24 July, 2014   

Calculate distance between two zip codes or postal codes.