free code snippets -

PHP, Javascript, CSS & mySQL code snippets

This section of our website contains public source code snippets in a variety of languages which are free to use. Snippets include single lines of code to whole functions and classes.

advertisement

Add string to field
in mysql
 

Allows you to add a string to end or start of a field to use when comparing or selecting data. The second argument is added to the end of the first

Select code

 

Center form on load
in vb6
 

Center a form on the screen on load. Centers the form that the code is put into when it first loads up.

Select code

 

Check if value is decimal
in vb6
 

Check if a value is decimal. Accepts values in both long/integer and string data types. Using this function a value such as 25.0 is not counted as a decimal.

Select code

 

Clear form
in vb6
 

Clears a form of all drawings (namely those greated with the .line method)

Select code

 

Remove all whitespace from string
in vb6
 

Remove all the whitespace from a string. This removes every instance of a space in the given string returning the new string as a string for Visual Basic 6 (VB6)

Select code

 

VB6 array count
in vb6
 

A function to count the elements in an array in Visual Basic 6

Select code

 

Delete file
in vb6
 

This line of VB code removes the file example.txt

Select code

 

Create and write to file
in vb6
 

Create a file called example.txt and write the text Hello world! into it

Select code

 

Remove outline from links
in css
 

A CSS snippet which removes the often ugly dotted outline around links (anchor tags)

Select code

 

Counting records
in mysql
 

This query will return the amount of records for the query

Select code

 

 
Tips & advice

Need coding help? Tips, tricks or advice? Check out our webmaster forums

advertisement