Welcome To Snipplr


Everyone's Recent Snippets



1 ... 545 546 547 548 549 ... 554
added to the head section of the page
5 1115 posted 18 years ago by gux
3 959 posted 18 years ago by Corhol
0 1234 posted 18 years ago by zensir
1 1116 posted 18 years ago by zensir
Simple javascript email validation
29 6454 posted 18 years ago by arcturus
Shows how to create a DIV box that is scrollable and looks like a IFRAME.
6 1344 posted 18 years ago by hxseven
Shows how to upload a single file to a FTP server.
28 13593 posted 18 years ago by hxseven
Read a page's GET URL variables and return them as an associative array. ---- Example for URL http://www.example.com/index.html?hello=bonjour&goodevening=bonsoir var hash = getUrlVars(); alert(hash['hello']); // prints 'bonjour' alert(hash...
35 9092 posted 18 years ago by Roshambo
To assert the difference in values before and after some code blocks. Save this as assert_helper.rb and include it in your test_helper.rb
1 888 posted 18 years ago by ctran
This will return a random number between two given numbers.
4 1019 posted 18 years ago by ypmits
Don't forget to insantiate with an object or with 'this'.
1 854 posted 18 years ago by marc0047
7 1179 posted 18 years ago by brentroady
Una breve referencia de los meta carácteres y su significado en expresiones regulares en PHP. Esta referencia de expresiones regulares es muy interesante para tener a mano. Está recogida de un comentario del manual de php.net.
4 1132 posted 18 years ago by Navegante
Simple templating for innerHTML functions. Parses an input string (tmpl) for %(NAME) tokens, accepts an object (ns) as data and returns an output string.
1 1021 posted 18 years ago by mattgay
The ideal use of this code would be to save the Javascript code as a .js file. Then use the HTML code at the bottom to call it wherever you want on the web page.
1 1195 posted 18 years ago by Jaymoon
0 1005 posted 18 years ago by Jaymoon
(Applies to the HTML_Template_IT PEAR package) Useful script to find all global variables and put them in a format for an array. $t is the HTML_Template_IT(X) object.
0 1501 posted 18 years ago by pckujawa
The form method must be post and the enctype set as it is below. The hidden input for MAX_FILE_SIZE must also be included. The value is the max file size (in bytes?).
4 1141 posted 18 years ago by pckujawa
Use to redirect an html page after headers have already been sent. The 5 is the number of seconds before redirect to the URL.
1 1078 posted 18 years ago by pckujawa
Recorta el texto recibido al limite especificado de caracteres. Caracteristicas: * Si el texto es HTML el texto no contendra tags incompletos * Si el texto no es HTML no se recortaran palabras Notas: Se debe tener en cuenta que el texto pod...
1 849 posted 18 years ago by Navegante
Elimina las etiquetas de párrafo <P< y </P< (sin parámetros) y las sustituye por saltos de línea <BR />. En caso necesario inserta un <BR /> adicional para simular la separación de párrafos.
0 1032 posted 18 years ago by Navegante
It's a simple low pass filter with comparative graphs.
1 1345 posted 18 years ago by yuconner
Performance can be seen in link. This code, however, uses generator expression instead of list comprehension.
1 1086 posted 18 years ago by newtonapple
Find the process id using the dev
1 992 posted 18 years ago by yuconner
0 1319 posted 18 years ago by leoh
Took 0.164692 seconds for array[] Took 0.395778 seconds for array_push As you can see array_push is more than twice as slow. Here are the reasons. Array_push is a function call, Function calls are always slower. Array_push takes mixed parameters,...
0 4063 posted 18 years ago by mthorn
strcmp with matching strings took 0.207852 seconds strcmp with non-matching strings took 0.215276 seconds === with matching strings took 0.067122 seconds === with non-matching strings took 0.057305 seconds === is the clear winner. Function call...
0 2905 posted 18 years ago by mthorn
1 ... 545 546 547 548 549 ... 554