Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
The following codes populate the country list into dropdown box based on browser's languages. The country information is getting from geolocation.com
0
2383
posted 12 years ago by Hexahow
Checks if two given arrays equal each other as php doesn't have a built in function for this.
0
2210
posted 12 years ago by MaxHudson
This will reset the tabindex of all input fields on a form after page load
0
1780
posted 12 years ago by bitsculptor
This is the second and last part of the encryption algorithm that I uploaded last week. It's the other-way-round program: it decrypts a password typed by user.
0
1554
posted 12 years ago by eiger824
Try to run Codeigniter in a subfolder of a Wordpress installation and want to remove index.php for clean URLs?
Put this code in a .htaccess file in your codeigniter directory ("cidir" in this example).
0
4777
posted 12 years ago by telltec
The following code allows only numeric characters to be entered.
1
2268
posted 12 years ago by jprochazka
It removes all standard C-style comments(/* 1-n */) and all single line comments("//"). Greedy matching.
0
3475
posted 12 years ago by XtreamIT
allows itmings to be set for colour transitions if this is put into mouseover/ hover block.
1
1137
posted 12 years ago by Dugzor
This will remove the items in a select box/list box that have been selected.
0
1273
posted 12 years ago by j100
If you are using the [TimThumb](http://code.google.com/p/timthumb/ "TimThumb on Google Code") script with a URL the contains tildes (~) and images are breaking, here is the fix...
I did not create this snippet but found it extremely useful so I th...
0
1755
posted 12 years ago by tacudtap
MySQL
La fonction COALESCE de MySQL permet de renvoyer une valeur par défaut si la valeur null est renvoyée initialement.
Le fonction COALESCE de MySQL permet de renvoyer une valeur par défaut si la valeur null est renvoyée initialement.
0
3581
posted 12 years ago by pruntrut
For some reason tidy inserts new lines before/after <![CDATA[ content in XML files. Since I like the benefits of a reformatted, readable XML...
... i run tidy first, then remove the spaces before/after the CDATA block:
0
2554
posted 12 years ago by iroybot
Handy code snippet for keeping track of the number of characters a user is entering into a textbox or textarea. It will dynamically update the count as the user is typing. This also works with copy & paste.
The top snippet will automatically calcu...
2
1275
posted 12 years ago by mattvbiggs
A C++ algorithm which encrypts an alphanumeric password, asking the user to choose the encryption level.
0
6693
posted 12 years ago by eiger824
To keep up on important incidents on your site without having to dig through server logs the alternative can be custom logs.
0
2232
posted 12 years ago by COBOLdinosaur
When box sizing is set, the padding, border and margin no longer add onto the total width or height of the element. Instead, they eat into the set width or height. So, if you have a box whose width is set to 300px, and padding set to 10px, then the t...
1
2453
posted 12 years ago by bmayzure
Cross-browser roll link effect in CSS3. Works in IE 10+, Webkit (Chrome/Safari/etc), Opera, Gecko (Firefox/Seamonkey/etc). Degrades nicely for unsupported browsers.
0
2284
posted 12 years ago by bmayzure
A simple CSS3 link-color transition effect. Fades from the base color to the active/focus color and back on rollover. A nice little added effect that's pretty well cross browser. Works with Webkit (Chrome/Safari/etc), Opera, Gecko (Firefox/Seamonkey/...
1
2407
posted 12 years ago by bmayzure
**Example of use:**
$bIsConnected = check_internet_connection();
$sText = ($bIsConnected) ? 'You are connected to the Internet.' : 'You are not connected to the Internet.';
echo $sText;
0
2492
posted 12 years ago by phpdev
ต้à¸à¸‡à¸¡à¸µà¸à¸¢à¹ˆà¸²à¸‡à¸™à¹‰à¸à¸¢ 8 ตัวà¸à¸±à¸à¸©à¸£
ต้à¸à¸‡à¸¡à¸µà¸•ัวà¸à¸±à¸à¸©à¸£à¸à¸±à¸‡à¸à¸¤à¸©à¸•ัวเล็ภ[a-z] à¹à¸¥à¸°à¸•ัวใหà¸à¹ˆ[A-Z] à¸à¸¢à¹ˆà¸²à¸‡à¸™à¹‰à¸à¸¢à¸à¸¢à¹ˆà¸²à¸‡à¸¥à¹ˆà¸°...
0
2297
posted 12 years ago by gaserland