Variable Snippets


An example C++ code for using the same variable name in different scopes by Ali Murad

A simple and practical way to show the format of the IEEE standard for binary floating-point numbers (IEEE 754) is to use a union, as shown in the following example:

30 January, 2012   

The following code block illustrates the use of TYPE..IS... and VARRAY. In this sample, a type v_arr is defined as an variable array of maximum 25 elements which are of type NUMBER(3). Then a variable v1 is defined as type v_arr . This sample code also demonstrates the use of %TYPE attribute.

Assigns the contents of a "url" to the string variable "result".

03 August, 2011   

By the below template we can make for-loop using xslt.

01 October, 2011   

An example of Variable Names in PL SQL

Source code for C++ program, declaring a number of variables of various types.

18 September, 2012   

Get the current title of the page using javascript and store it into a variable

21 January, 2011   

Sometimes the time set on your server isn't accurate to what your local time is. If you can't change it, you can adjust it yourself. If your server thought it was 12 midnight, but it was really 7 pm, this will roll the $today variable back five hours to be correct.

23 September, 2011   

An example Dates with the Ordinal Suffix . Below is the code that will do this.

This example has an ordinal suffix: Sunday 15th July

18 June, 2011   

Add a space (or other delimiter) only if a variable is set, in order to avoid ugly unnecessary spaces.

C code example for useful macros, functions and tricks

15 January, 2014   

Basic definition for a cursor in MSSQL

12 January, 2014   

How to get the visitor IP using the $_SERVER['REMOTE_ADDR'] variable.

13 April, 2011   

Connecting to a MySQL database to make the data from the database available in your Web application, can be done in many different ways. Here are two often used methods.

23 July, 2015   

Use a session variable that you store and increase after each false login. Don't forget to clear the session after you close an account or after the login was successful.

11 November, 2013   

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

03 October, 2013   

Basic commands for reading a text file one line at a time.

16 February, 2013   

Binds a php variable to an SQL statement using the bindParam() method