Python Code Snippets


09 July, 2013   

Show user's IP Address using a few lines of code, Place the code where you want the IP address to appear:

MySQL code to Find PHP code in database Drupal 6.x

13 February, 2013   

Place line numbers in text output format using CSS and PHP

How to Insert comments in the HTML source code

01 June, 2013   

How to Embed code for Windows Media

This simple program shows the size and ability of primitive data types to handle minimum and maximum values, to take care about it, while you write a program.

This simple program shows the size and ability of primitive data types to handle minimum and maximum values, to take care about it, while you write a program.

11 May, 2017   

The following code uses bitwise operators to determine if an unsigned integer, x, is a power of two.

09 February, 2013   

Very simple small code to generate random password

23 February, 2012   

XML Code to display XML data in an HTML table

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.

25 March, 2012   

when clicked on button it will open your source code

11 February, 2013   

File inputs can have an attribute of "multiple" which then allows multiple files to be selected in the file section dialog box.

09 May, 2011   

This is a general code to use when selecting an item from a MySQL database. This code isn't considered definitive and can be written in many varied ways. Note: This code requires you to connect to the MySQL database to work. Also, all field and table names need to be set up to match. This MYSQL Code using in PHP

If you've ever discovered that someone has linked to your web site within a frame, which means your site is stuck in their frame with their information displaying within another frame, you know how frustrating this can be. You want your visitors to visit your web site within their standard browser window - not within another web site's frame....

31 January, 2012   

Use this CSS code for frame borders and write below code between head tags

07 February, 2011   

If you don't set the wmode on a flash embed it will float over the top of an overlay which can be a pretty big deal. This is ideal in environment with lots of legacy video code or where users will be posting new code and teaching them about wmode is a lost cause. This should work in all browsers.

This code, when passed a MATLAB structure, will recursively go into it and print out the form of the struct.

Print variables with file and line number for debugging source code

22 February, 2012   

HTML code for Scroll Box. this box will grows scroll bars when it's contents are too large to fit in the box.