LastNext54321Page 1 of 5Record 1 to 10 of 41

Code Snippets

Favourite
VOTE 0

Sample Code To Split Large File Into Multiple Smaller Files | C#

Code Snippet » By Blue Cloud On Aug 22, 2012 1:41:18 AM ,

This function can be used to split large file into a number of smaller files.

Categories : Programming | Tags : file IO, split, File, File Operation
Favourite
VOTE 0

How to Read Contents of a File Using AJAX? | JavaScript

Code Snippet » By Blue Cloud On Jun 04, 2012 10:09:45 AM ,

For the security concern, client-side JavaScript does not provide any way to read, write, create, delete, or list files or directories on the client/server computer. But one can use Ajax to read the file. This code snippet can be used to read from a text file.

Categories : Programming | Tags : ajax, File
Favourite
VOTE 0

How to Reverse the Order of Words in T-SQL? | SQL

Code Snippet » By Blue Cloud On May 01, 2012 1:47:16 AM ,

The build-in function REVERSE just reverse the characters of a word or text. It does not reverse the word order of a string. So, If you want to reverse the order of words in a string, this simple t-sql function can be used. It will return reversed word order of given string.

Favourite
VOTE 0

Automatically Set the Featured Image in WordPress | PHP

Code Snippet » By Blue Cloud On Apr 03, 2012 4:09:04 AM ,

I found one of the cool function for wordpress users. This function will automatically sets the first image of the post as default featured image, if no image was chosen. But you can still choose any image if you want.

Favourite
VOTE 0

SQL Function to Generate HTML to Draw Pagination | SQL

Code Snippet » By Blue Cloud On Mar 08, 2012 7:14:08 AM ,

When you fetch the data from database, you may get hundreds or even thousands of rows. Showing all of those rows in a single page is not a good idea. You should definitely split that records into multipal pages. That is called pagination. Normally, developers use the sever side language such as VB.NET, C#, PHP to generate it. However, different developer use different styles of pagination with different languages. T-SQL can also be used to draw paging control. This is the SQL Server User-Defined Function to generate it.

Favourite
VOTE 0

Internet Explorer HTML5 Enabler Script | JavaScript

Code Snippet » By Susan Haynes On Feb 21, 2012 5:59:13 PM ,

The JavaScript workaround to enable HTML5 elements in versions of Internet Explorer that do not support it. That is widely known as HTML Shiv. There is also a version called HTML Shim which does the same thing.

Favourite
VOTE 0

Display the Current DateTime of Server | PHP

Code Snippet » By Susan Haynes On Feb 09, 2012 8:00:01 AM ,

A PHP script display the server's current datetime.

Favourite
VOTE 0

A PHP Page Parse Timer | PHP

Code Snippet » By Susan Haynes On Feb 09, 2012 7:47:00 AM ,

The code will time how long it takes to for the PHP code on the page to process.

Favourite
VOTE 0

PHP Get User IP | PHP

Code Snippet » By Blue Cloud On Feb 09, 2012 7:34:05 AM ,

A PHP script to display the user's IP Address. Just palce this code wherever you want the IP Address to display.

Categories : Web Development, Programming, PHP | Tags : IP Address
Favourite
VOTE 0

JavaScript Function getElementByClassName | JavaScript

Code Snippet » By Si Thu On Feb 07, 2012 10:02:16 PM ,

This is one of the useful function in my code bank. This function can be used to find the elements by css class name. If you don't use jQuery, it will be definitely helpful for you.

LastNext54321Page 1 of 5Record 1 to 10 of 41