Welcome To Snipplr


Everyone's Recent Snippets



1 ... 13 14 15 16 17 ... 553
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 2355 posted 10 years ago by fackz
A PHP function for calculating the distance between two UK postcodes
0 1733 posted 10 years ago by mickeywilko
durr
0 1485 posted 10 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 3525 posted 10 years ago by w2ssolutions
let commandOutput = executeCommand("/bin/echo", ["Hello, I am here!"]) println("Command output: \(commandOutput)")
0 3345 posted 10 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 1433 posted 10 years ago by brm
Copy file as current date as name file to destination directory
0 3787 posted 10 years ago by brm
Simple backup script using Rsync
0 3276 posted 10 years ago by brm
Script using tar to backup new file created 1 day before
1 3411 posted 10 years ago by brm
Get Current Server Path in PHP
1 1884 posted 10 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 3585 posted 10 years ago by BrentS
PHP pagination simple algorithms;
0 1286 posted 10 years ago by mus7afa
remove border in excel from C#
0 2397 posted 10 years ago by billi8324
An Utility to Search Text in All Files of Any Directory in PHP
1 1891 posted 10 years ago by ursdeep
Allow login from specific IP Address
0 1534 posted 10 years ago by nbpurohit
Disable "Add to basket" button for price zero
0 1322 posted 10 years ago by nbpurohit
Shorthand for Ternary Operator in PHP
1 2517 posted 10 years ago by ursdeep
delete Operator don’t impact the length of Array in JavaScript
1 3548 posted 10 years ago by ursdeep
Different ways to change the Maximum Execution time for PHP Scripts
1 2727 posted 10 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 3327 posted 10 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 1858 posted 10 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 3597 posted 10 years ago by BustACode
This snippet allows an array or multiple arrays to be re-sorted using multiple key fields.
0 1344 posted 10 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 2443 posted 10 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 1353 posted 10 years ago by brownrl
# HTML 5 Starter Template Use this when creating a new HTML page.
0 3661 posted 10 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 3365 posted 10 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 1539 posted 10 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 2314 posted 10 years ago by brownrl
1 ... 13 14 15 16 17 ... 553