Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
The favicon is much normality in our days. Here the "apple-touch-icon" definition which is used when you save a bookmark to your home screen on an apple touch devices such as an iPad or iPhone. The interesting thing is that Android also supports its...
0
1083
posted 10 years ago by apphp-snippets
Brendan Eich is working on officially adding Math.TAU to JavaScript.
Until JavaScript has full support for the Math.TAU constant, you can add the following at the start of your programs to add support for the TAU constant.
0
786
posted 10 years ago by pmw57
The code to verify that a method was called.
The this.mockProvider.Verify verifies that GetBiAutoProcessConfigByKeys is called.
0
1009
posted 10 years ago by heathbo
alternating row color snippet for outputting query results in a html table
1
1027
posted 10 years ago by dreamstarter
coldfusion snippet to output a query recordset into multiple columns
1
1302
posted 10 years ago by dreamstarter
cd to directory, then run the line below to change any spaces in a filename to hyphens
0
1832
posted 10 years ago by flatearthcomms
This solution is based on Chrome specific CSS extension. Other browsers will ignore this rule.
0
1050
posted 10 years ago by apphp-snippets
simple preprocess function to alter the site name depending on the section of the site
0
871
posted 10 years ago by emijayne
The ExpectedException section under [TestMethod] is where you tell Moq what type of exception your listening for. If that exception is thrown, then this test will pass and it will stop running all the code under the target.CalculateProvisionalPrice....
0
1670
posted 10 years ago by heathbo
Example 1: I'm verifying that the list that is passed in has 3 attachments. SendMail is run later in the SendEmail method.
Example 2: I'm verifying that the object that is passed into the method has the appropriate values.
0
1333
posted 10 years ago by heathbo
This example of code allows you to create a new object in javascript (using simple inheritance) such that the class of the object is defined from a variable. After creating the object you may use it for your purposes.
0
883
posted 10 years ago by apphp-snippets
Code to replace your opening <html> tag with conditionally set IE classes, including IE10.
1
1186
posted 10 years ago by Japegrape
Data types and ranges for Microsoft Access, MySQL and SQL Server.
0
626
posted 10 years ago by chrispantelis
New SQL Record = Populate TimeStamp Field with GetDate() Function
0
885
posted 10 years ago by chrispantelis
Tiny python closure for combining redis keys with "format".
Uses a closure so it does not remake the base key each use.
0
888
posted 10 years ago by dsonbill
If you want to make a copy of the table including all of the data, then leave out the WHERE clause.
0
735
posted 10 years ago by chrispantelis
This will get the names of all the columns as one long string ready to use in a select statement. N.B. There is a list of column names to exclude (In this case '???COLUMNS_TO_EXCLUDE???')
0
1052
posted 10 years ago by imbraz
FME has designed efficient Canvas Drawing Plugin for WordPress that enables users to draw canvas online on separate paint book by utilizing basic drawing tools like brush, pencil, etc. This WordPress Plugin will create two additional pages on your we...
0
791
posted 10 years ago by alastarmason1
Sometimes you may need to change image properties 'on-the-fly'. The best example is when you want to display blog post short description, retrieve the first image and try to turn it into the thumbnail: change some properties and add a special class n...
0
981
posted 10 years ago by apphp-snippets
This simple code demonstrates how to change automatically site language, according to the visitor's country. If you implement this script in your site it will open the page in the language of your visitor.
0
1210
posted 10 years ago by apphp-snippets
Install LAMP Stack (Linux,Apache, Mysql, PHP)
Install PHP5 (Some applications require other PHP5 mods)
Install phpMyAdmin
0
834
posted 10 years ago by oxnard
use anonymous function that returns parameter passed to it to evaluate functions, constants, and expressions in HEREDOC
0
1111
posted 10 years ago by Queue
A simple effect using simple CSS. This is part of a collection of gradient effects
0
1052
posted 10 years ago by COBOLdinosaur
The following technical tip shows how php developers can protect their word documents in cloud using Aspose for Cloud SDK in php.
0
1286
posted 10 years ago by johansonkatherine