Welcome To Snipplr


Everyone's Recent Snippets



1 ... 348 349 350 351 352 ... 554
0 932 posted 15 years ago by magicrebirth
0 903 posted 15 years ago by magicrebirth
0 950 posted 15 years ago by magicrebirth
0 950 posted 15 years ago by magicrebirth
0 1040 posted 15 years ago by magicrebirth
example: a method on a model that outputs a list of tuples with (attribute_name.verbose, attribute_value)
0 1239 posted 15 years ago by magicrebirth
create a dictionary from the data in two lists
0 1131 posted 15 years ago by magicrebirth
// Is there a way in python to convert a list say [1,2,3,4] to a string and // also how to convert a string to a list? // use str() or repr() to convert to a string. // eval() will convert back to a list.
0 938 posted 15 years ago by magicrebirth
0 806 posted 15 years ago by magicrebirth
1 833 posted 15 years ago by magicrebirth
First: create a file under djangoapp/templatetags where you define your tags [e.g.: myadmin_tags.py]: Second: create the html snippets that get loaded in those tags [e.g., personfactoid_info.html]: Third: in mytemplates/admin/ modify change_for...
1 1342 posted 15 years ago by magicrebirth
This function takes anything which can be dumped into JSON and returns an HTTP response of it, with the right Content-type header.
2 1150 posted 15 years ago by magicrebirth
How to get actual category name in wordpress if is_category() is true
0 948 posted 15 years ago by AlessandroCoscia
This script will return the URL for the current page you're on, including category and tag pages.
3 1695 posted 15 years ago by jonhenshaw
How to access the build number in the WAR file (generated by the Maven build number plugin) from Java.
0 1006 posted 15 years ago by ff1959
I’ve made this class that can use normal session variables, or cookies. This class can use cookies in two ways: store a single variable in each cookie, or pack many variables, encrypt, and store them into cookies. Now I always use this class whe...
2 1251 posted 15 years ago by ginoplusio
1 1007 posted 15 years ago by ReeceMarsland
0 1073 posted 15 years ago by ff1959
I written this code to parse apache log in common log formats. It may have problems with irresponsible formatting like non-concluded into quotes request line. I welcome any modifications to my snippet because it was written if short time and this is...
0 1112 posted 15 years ago by mpontus
0 1196 posted 15 years ago by ReeceMarsland
1 ... 348 349 350 351 352 ... 554