Welcome To Snipplr
Everyone's Recent Snippets Tagged c
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Dictionaries cant be sorted, so you need to transform it into a list and sort that one!
0
1084
posted 15 years ago by magicrebirth
// Taken from :
// http://www.west-wind.com/weblog/posts/42319.aspx
0
1281
posted 15 years ago by delikassap
jQuery has a built in method that allows developers to store information inside elements. Learn how to use the .data() method and view some examples of how this can be used.
1
1482
posted 15 years ago by neal_grosskopf
Turning a dictionary into a list or an iterator is easy. To get a list of keys, you can just cast the dict into a list. It's cleaner, though to call .keys() on the dictionary to get a list of the keys, or .iterkeys() to get an iterator. Similarly, yo...
0
1232
posted 15 years ago by magicrebirth
this is all the actions needed for auth and the users login/register system
0
1086
posted 15 years ago by sevennbsp
this is the entire app_controller code with auth setup and use in it.
0
1078
posted 15 years ago by sevennbsp
If you accidentally exit while doing an interactive rebase, you can clean it with this command.
0
1364
posted 15 years ago by stayce
Another common use of Auth component variables is to allow access to certain methods without the user being logged in (by default Auth restricts access to every action except the login and logout methods).
0
1387
posted 15 years ago by TioSolid
cleanly display the memory used so you know when your going over, especially useful for memory hog drupal sites.
1
1329
posted 15 years ago by electblake
the os x version of realpath works differently than the linux version; the following allows you to attain the same functionality in a shell on os x as `readlink -f $0` on a standard linux dist.
0
1629
posted 15 years ago by iloveitaly
Makes same-page links scroll smoothly instead of jumping around the page.
2
1357
posted 15 years ago by zachdunn
Un objeto QMenu tiene siempre un objeto QAction, aunque no lo hayas creado tú. Por esta razón si queremos ocultar un QMenu vacÃo no nos sirve llamar al método setHidden (o a setVisible) como normalmente harÃas.
0
1037
posted 15 years ago by Bloomy