Welcome To Snipplr
Everyone's Recent Snippets Tagged c
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
<a href="javascript:(function(){var%20ids=[];jQuery('*').each(function(){if(this.id&&this.id!==''){if(ids[this.id]){console.log('duplicate%20id%20found:%20'+this.id,this,ids[this.id])}else{ids[this.id]=this}}});})();">Find duplicate IDs</a> (drag me...
1
2155
posted 17 years ago by krunkosaurus
Replace *SERVERNAME* with the name of the server name in the web.config
2
2138
posted 17 years ago by jink
Excellent article on using a CSS Template layout system that makes customizing web pages a step easier.
3
2076
posted 17 years ago by donjuanito909
Code snippet prevents caching of the page by setting http header values and a LAST MODIFIED header to prevent google from caching too long. This should go into the page load event.
1
2073
posted 17 years ago by jink
This OnSize function resizes one large control in a dialog.
The one control grows horizontally and vertically to fill the dialog. It's position remains unchanged.
Other controls (buttons etc) would typically be above the one resizable control.
0
4305
posted 17 years ago by jimfred
Intelligent logging for javascript (also compatible with Firebug). Thanks to Prototype.js, PPK, and Danny Goodman for the idea!
2
1574
posted 17 years ago by jschilling
Switches body class between .portrait and .landscape for, you guessed it, portrait and landscape mode on the iphone.
0
2279
posted 17 years ago by ira
Useful little spippet for a button anchor where the text may change.
0
2233
posted 17 years ago by 1man
get the list of dirs
process that list to cmd expressions
run the file with cmd exprssns
0
1508
posted 17 years ago by rowntreerob
Ever wanted nested stylesheets?
I have!
Now you can have them! If you code your stylesheets as JSON and parse them using JSS 0.1. You could have the following:
JSS({
'html': {
'body': {
background: '#ff...
0
1945
posted 17 years ago by dom111
Administering more than one node at a time through the Drupal admin interface is like drinking a milkshake through a buckytube.
[How to use phpmyadmin and sql to perform mass operations on nodes](http://drupal.org/node/134535)
1
2042
posted 17 years ago by zachharkey
Based on some comments in [StackOverflow Question](http://stackoverflow.com/questions/95875/javascript-check-to-see-if-a-variable-is-an-object "How to check if a variable is an object")
3
2299
posted 17 years ago by jasonseney
Recently moved my Wordpress blog to a tumblr account while I was removing a hosting account, wrote this script to do the transfer for me using Wordpress' Export feature and Tumblr's API.
It's rough around the edges but gets the job done!
2
2992
posted 17 years ago by shakefon
This is the modified GWT HTML host page for your module. As you can see, the only modified element is the path to the GWT bootstrap script, the original declaration was the GWT 1.5 way, the new declaration is the [GWT 1.6 way](http://code.google.com/...
0
1497
posted 17 years ago by salvadordiaz
Say that you have a collection of objects empty but for IDs.
You want to do a foreach loop through those objects and lookup detail one at a time.
Unfortunately, in the foreach, you can't replace the references, you can only copy the new detail...
1
2562
posted 17 years ago by rengber
Don't run the dev server as an actual web server. I'm just doing this so I can work remotely on a vm.
0
3878
posted 17 years ago by tclancy
Dado un objeto original, este método copia los valores de ese objeto en un segundo objeto de la misma clase, utilizando reflection.
0
1803
posted 17 years ago by delm
Esta función devuelve un string aleatoreo con un largo aleatoreo, con un mÃnimo y un máximo.
El uso más común es solo especificar el largo máximo.
Especialmente útil para pruebas unitarias.
NOTA: depende de http://snipplr.com/view/14580/n...
1
1573
posted 17 years ago by delm