Welcome To Snipplr


Everyone's Recent Snippets



1 ... 348 349 350 351 352 ... 554
0 891 posted 15 years ago by magicrebirth
0 852 posted 15 years ago by magicrebirth
0 910 posted 15 years ago by magicrebirth
0 913 posted 15 years ago by magicrebirth
0 999 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 1200 posted 15 years ago by magicrebirth
create a dictionary from the data in two lists
0 1095 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 886 posted 15 years ago by magicrebirth
0 765 posted 15 years ago by magicrebirth
1 796 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 1306 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 1102 posted 15 years ago by magicrebirth
How to get actual category name in wordpress if is_category() is true
0 919 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 1648 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 960 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 1212 posted 15 years ago by ginoplusio
1 953 posted 15 years ago by ReeceMarsland
0 1032 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 1067 posted 15 years ago by mpontus
0 1163 posted 15 years ago by ReeceMarsland
1 ... 348 349 350 351 352 ... 554