Welcome To Snipplr


Everyone's Recent Snippets



1 ... 13 14 15 16 17 ... 552
I can't say I can rely on mb_detect_encoding(). Had some freaky false positives a while back. The following code will detect when you need to enconde or decode it.
1 3129 posted 11 years ago by fackz
A PHP function for calculating the distance between two UK postcodes
0 2476 posted 11 years ago by mickeywilko
durr
0 2217 posted 11 years ago by olesla
Cross platform development is usually an interesting puzzle to solve. Developers will have to concentrate on meeting the requirement and also focus on getting it done for multiple platforms. We would like to showcase a small html and control file tha...
0 4500 posted 11 years ago by w2ssolutions
let commandOutput = executeCommand("/bin/echo", ["Hello, I am here!"]) println("Command output: \(commandOutput)")
0 4162 posted 11 years ago by nguyenvu
check email address whether valid or not by checking list of MX servers and send email command - will work as long as the SMTP server of target domain not be protected / the VRVY not be disabled in MX server.
1 2271 posted 11 years ago by brm
Copy file as current date as name file to destination directory
0 4664 posted 11 years ago by brm
Simple backup script using Rsync
0 4072 posted 11 years ago by brm
Script using tar to backup new file created 1 day before
1 4185 posted 11 years ago by brm
Get Current Server Path in PHP
1 2686 posted 11 years ago by ursdeep
To do this for any object in JavaScript will not be simple or straightforward. You will run into the problem of erroneously picking up attributes from the object's prototype that should be left in the prototype and not copied to the new instance. If,...
0 4529 posted 11 years ago by BrentS
PHP pagination simple algorithms;
0 1923 posted 11 years ago by mus7afa
remove border in excel from C#
0 3402 posted 11 years ago by billi8324
An Utility to Search Text in All Files of Any Directory in PHP
1 5774 posted 11 years ago by ursdeep
Allow login from specific IP Address
0 2316 posted 11 years ago by nbpurohit
Disable "Add to basket" button for price zero
0 2056 posted 11 years ago by nbpurohit
Shorthand for Ternary Operator in PHP
1 3326 posted 11 years ago by ursdeep
delete Operator don’t impact the length of Array in JavaScript
1 4465 posted 11 years ago by ursdeep
Different ways to change the Maximum Execution time for PHP Scripts
1 3586 posted 11 years ago by ursdeep
[The original problem was stated as a SQL (SQL Server 2008) problem. This Perl script demonstrates the desired outcome for the problem statement.] PROBLEM STATEMENT: Please help me with SQL Query and requirement is as below: Below is the Da...
0 4213 posted 11 years ago by bvwatson
Courtesy Kevin Chard at WPSnipp.com. Adding this snippet to the functions.php of your wordpress theme will redirect your search to the post automatically when wordpress only returns a single search result.
1 2666 posted 11 years ago by adambundy
One day I got to wondering if it was possible to get a Python script to modify itself. After a few searches I found a solution that I present here. I did not write this code, but feel that it should be "paid forward" so others know that it is possibl...
1 4406 posted 11 years ago by BustACode
This snippet allows an array or multiple arrays to be re-sorted using multiple key fields.
0 2117 posted 11 years ago by COBOLdinosaur
The key to making it work is the event listener that get added using the DOM method that binds it to the mousemove event and declares the event handler. Most event can be bound to a handler this way.
0 3235 posted 11 years ago by COBOLdinosaur
This is damn crazy! sQlite does not have all the trig functions need to do distances. So here is how you load that into sQlite on the fly.
0 2013 posted 11 years ago by brownrl
# HTML 5 Starter Template Use this when creating a new HTML page.
0 4479 posted 11 years ago by GertjandW
Created as reply to question on ittoolbox.com:"Need your help in writing a query to pull audit history i.e. Last updated by a user 'XYZ' and for the same record key (ID) the second last record in the audit history table. i.e. Last update by this user...
0 4168 posted 11 years ago by bvwatson
Written as reply to question on ittoolbox.com:"I need to execute a query in vb which can find multiple value provided by the user to find from a single column of a table." [http://database.ittoolbox.com/groups/technical-functional/sql-l/query-to-fin...
0 2426 posted 11 years ago by bvwatson
Moving a wordpress site for local dev, to staging, to production? This SQL snippet has done the job more often than not. It may not be 100% full proof but it has saved my butt hundreds of times. Please, if you know other tables or enhancements share...
0 3056 posted 11 years ago by brownrl
1 ... 13 14 15 16 17 ... 552