Welcome To Snipplr
Everyone's Recent Snippets Tagged c
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
When you use the `+` operator on an Array, it converts it to a string.` [].toString()` is the same as `[].join(',')`, which gives an empty string in case the array value is `undefined` or `null`. This also works in Javascript `([undefined] + "b" ===...
0
1670
posted 14 years ago by luizlopes
Esta función devuelve true si el argumento está codificado en utf8
0
1837
posted 14 years ago by n19ht
Overwrite LoadViewSate and SaveViewState page methods.
SaveViewState is called on initial page load and that is the place to save your negated flag to Session.
This value should be compared in LoadViewState and if the values are the same it means...
0
1794
posted 14 years ago by Neven
This code gets the current caretIndex in the textfield and then inserts the specified string at that point. The caretIndex position is then updated using setSelection, ready for the next insertion. This was developed to be used with an on-screen keyb...
0
3171
posted 14 years ago by adrianparr
an operator that implements true prototypal Object inheritance in JavaScript
0
2206
posted 14 years ago by luizlopes
A quick snippet that removes the 'px' when accessing a value through jquery, and converts it into an integer.
0
1793
posted 14 years ago by cessnajumpin
If not have access to edit json, setting url possible is:
url: 'http://graph.facebook.com/4/?callback=getDatosUsuario'
0
2042
posted 14 years ago by nicolaspar
Send an email to all registered users when a post is published, for wordpress 3.1+
0
1956
posted 14 years ago by eniris
Bytes per second isn't granular enough to get a real idea of how your network is really being used.
0
1562
posted 14 years ago by mattsn0w
JSLint requires the body of every `for in` statement should be wrapped in an `if` statement
0
2339
posted 14 years ago by luizlopes
Remember to change flashvars (src, poster) and the size of the player in swfobject.embedSWF parameters (428, 240)
0
3012
posted 14 years ago by carlskov
img1.png is closest to the viewer and img4.png furthest.
This will create a feeling of stuff moving around when resizing the browserwindow.
0
1696
posted 14 years ago by Barlon