Welcome To Snipplr


Everyone's Recent Snippets



1 ... 408 409 410 411 412 ... 552
Assign methods to a Function prototype when you intend to create instances of the type of object. Use object literals when you just need a container for functions.
0 2200 posted 17 years ago by segdeha
More of a setQueryString
0 1697 posted 17 years ago by iloveitaly
0 1535 posted 17 years ago by bhubbard
0 1603 posted 17 years ago by bhubbard
0 1546 posted 17 years ago by sinecera
When you have a URL like this http://mysite/newsletters/index/2007 The find('first') method adds the 2007 value as ID parameter WTF!?
0 1621 posted 17 years ago by sveggiani
0 1481 posted 17 years ago by sinecera
0 1592 posted 17 years ago by sinecera
Use javascript to add a class of last onto the first and the last li tags in the navigation (add to global.js). Then use css to style. For instance, if the first li is home, you can set the css to hide this link (if you want the logo to act as your h...
5 2530 posted 17 years ago by kstetson
Div will fade in on load or fade in on click
1 2441 posted 17 years ago by kstetson
To arrange multiple dynamic sidebars in wordpress, add the following code snippet into functions.php. The sidebar should then appear in the dropdown menu in wordpress under the widgets section. Next, go into your sidebar.php file & edit the dynamic s...
2 1801 posted 17 years ago by kstetson
Wordpress has a built in class that you can style to style the down nav state for the page you are on. Adjust div name accordingly.
1 2300 posted 17 years ago by kstetson
Self-updating copyright
1 1746 posted 17 years ago by fabi
This is a @property to take care of jsonp stuff if you're using CherryPy. In your Javascript, (you're using JQuery, right?) you can do ` $.ajax({url:"localhost:8080/MyMethod", data:{'arg1':'foo'}, dataType:"jsonp", success:onMyMethodComplete}); `...
0 1568 posted 17 years ago by ndnichols
2 2066 posted 17 years ago by randyjhunt
1 3026 posted 17 years ago by benjaminpearson
0 2321 posted 17 years ago by dividespace
This is just something very simple that I needed to do. It outputs an xml without any change at all.
1 1714 posted 17 years ago by gryzzly
Use this function to print out all the rows in a table. Specify columns to show using the columnstring parameter: tablulardata(tablename, columnstring); ie: tabluardata("users","username=Username|fname=First Name|lname=Last Name");
1 1944 posted 17 years ago by kilrizzy
Use this function to pull all columns from a single database field. getrowdata(tablename,rowid,prefix); You would call this function like: getrowdata("users",$_SESSION['user'],"user_"); The prefix is the prefix you want for the array names,...
1 2161 posted 17 years ago by kilrizzy
This code within your CakePHP Controller to include a Model.
0 1727 posted 17 years ago by jdbartlett
1 ... 408 409 410 411 412 ... 552