Welcome To Snipplr


Everyone's Recent Snippets Tagged c



1 ... 416 417 418 419 420 ... 553
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 1759 posted 16 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 2348 posted 16 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 1056 posted 16 years ago by salvadordiaz
Works in IE not Firefox/Mozilla.
0 1426 posted 16 years ago by hotdiggity
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 1983 posted 16 years ago by rengber
2 1268 posted 16 years ago by kristarella
0 3601 posted 16 years ago by statsplank
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 3346 posted 16 years ago by tclancy
0 1222 posted 16 years ago by jturmel
Dado un objeto original, este método copia los valores de ese objeto en un segundo objeto de la misma clase, utilizando reflection.
0 1290 posted 16 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 1172 posted 16 years ago by delm
When you hover over the “message” div, the “controls” div inside it will appear, along with all of its content, giving you the same functionality as used by the Twitter web app. There may be an issue with accessibility because screen reade...
0 1279 posted 16 years ago by justinseiter
In case you don't feel like loading 3 pages to edit a single url alias.
1 1478 posted 16 years ago by zachharkey
This is a simple script that will allow you to crop an image that you upload from a form.
1 1422 posted 16 years ago by aristoworks
This is how NetTuts does their filterable Portfolio.
3 1507 posted 16 years ago by conspirator
Min-height of an element that works in all browsers.
2 1696 posted 16 years ago by avantsi
Transform text (eg. from a WYSIWYG) into nicely formatted HTML paragraphs. (Credits: Ludo Magnocavallo's LightPress). [this is a solid starting point - but a lot of HTML elements are missing]
3 1198 posted 16 years ago by iroybot
HRs are a pain in the ass to style, so why bother? Wrap them in a DIV with a class of HR instead. (In your stylesheet, set .hr hr { display: none }). This also ports the class of the HR up to the new parent DIV, allowing you to make a few differen...
1 1062 posted 16 years ago by dougunderscorenelson
This adds a class to focused form elements (helpful for IE6/7), as well as adds a class to the input's parent (in this case, named "form-field").
1 1345 posted 16 years ago by dougunderscorenelson
Quick script to find button elements (and elements with the "button" class) and wrap their innards in spans. Good for making rounded-corner buttons.
0 1102 posted 16 years ago by dougunderscorenelson
since the script observes mouseout, it should fire mouseleave events before mouseenter to preserve correct order.
1 1666 posted 16 years ago by pdswan
This will return a list of all the tables in a certain database along with their row count.
1 1480 posted 16 years ago by blackf0rk
Easily create a SINGLE USE ONLY (Singleton) Class Object with this template.
1 1611 posted 16 years ago by allnatural
3 1258 posted 16 years ago by g0mer
This turns the about page into a featured category post page. The principles for just a regular custom page template with sidebars is there too.
3 2505 posted 16 years ago by kristarella
This provides a teaser, with content from a custom feild, or the excerpt if no field exists. Everything except the title and edit link need to be turned off in the options.
3 1361 posted 16 years ago by kristarella
displayed filename and line number. //normal use d( $arg ); //some arguments d( $arg1 , $arg2 , ... );
0 1144 posted 16 years ago by ikimozu
1 ... 416 417 418 419 420 ... 553