Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Usage:
Let's say we have an url: http://primera.vremenno.net?foo=yes&bar=no
var hash = getUrlVars();
alert(hash['foo']); // returns 'yes'
alert(hash['bar']); // returns 'no'
0
1024
posted 13 years ago by a1ias
HTML should look like this:
<div>
<p>Lorem ipsum here</p>
</div>
<div>
<img>
</div>
0
902
posted 13 years ago by a1ias
Well, many of you are used to just replace the lack of min / max width / height for IE with fixed dimensions, right? But you don’t need to do it anymore. IE is not a strict standards browser and sometimes we can take advantage of this to code thing...
0
975
posted 13 years ago by a1ias
If you are creating an admin module for Magento (learn creating admin module in Magento) then you would surely be asked to create grids (eg. for order listing). Creating grids can be somewhat difficult for the novice Magento programmers, but in this...
0
826
posted 13 years ago by necode
A collection is a Model type containing other Models, it is basically used in Magento to handle product lists (ie. from a category or a bundle option), but not only.
TO DO: Explain how Magento Implements a collection - Use this to explain how Mage...
0
766
posted 13 years ago by necode
send mail with attached file
examples: http://framework.zend.com/svn/framework/standard/trunk/tests/Zend/Mail/MailTest.php
0
889
posted 13 years ago by necode
Con estas instrucciones se pueden corregir los caracteres latinos que hayan sido almacenados erróneamente en una base de datos MySQL
1
1884
posted 13 years ago by n19ht
Estas 2 lÃneas muestran errores en tiempo de ejecución. Pegar donde se inicia el código.
0
848
posted 13 years ago by n19ht
This function validates the URL of a YouTube video. It supports four kinds of URL: ?v=, /v/, #!v=, and the short version (youtu.be).
To validate the ID a request to YouTube is made, this is done using a personal class utilizing cURL.
0
997
posted 13 years ago by peckham
Examples of different ways to truncate/round a decimal number.
0
1222
posted 13 years ago by adrianparr
Embedding Google’s +1 button is pretty easy and straightforward. All it takes is to include 2 code snippets in your web page. One goes in the header of the page, and the other one goes to wherever where you want the +1 button to render. To do so al...
0
778
posted 13 years ago by necode