Welcome To Snipplr


Everyone's Recent Snippets



1 ... 447 448 449 450 451 ... 554
how to rollback data on grails' service .... for myutil --> please look at
0 975 posted 16 years ago by callmeblessed
I need to create all table in InnoDB in my grails application. you can add this / edit the following code on grails-app/conf/Datasource.groovy
1 1456 posted 16 years ago by callmeblessed
how to "beautify" or tidying your code using vim ?
1 1218 posted 16 years ago by callmeblessed
how to render GSP template as String ? g:render is taglib in gsp (<g:render> ) but you can call it on your controller using g.render().
0 1463 posted 16 years ago by callmeblessed
how to read error message as string instead of complicated codes. usually people using taglib to read error messages. but how to read it in controller/service if you, for example, want to log or render just the message. here is how to do that.
0 1194 posted 16 years ago by callmeblessed
how to call session from grails service (spring service)
0 1218 posted 16 years ago by callmeblessed
how to loop an array / collection / list but with index. instead of using each{} closure, you can use eachWithIndex{} closure
1 999 posted 16 years ago by callmeblessed
Usage: define('PIRATE',bindec('0001')); // 1 define('NINJA',bindec('0010')); // 2 define('JEDI',bindec('0100')); // 4 define('ADMIN',bindec('1000')); // 8 $rpermit = array(PIRATE,JEDI); // Equivilent Flags '0101'...
0 665 posted 16 years ago by Jdub7
2 919 posted 16 years ago by Jdub7
There's been a popular trend to use JavaScript to add target="_blank" to anchors with rel="external". So in the name of making everything in my site Prototype based I worked out a script to do just that.
2 1032 posted 16 years ago by fruehjahr
Paste this code in your HTML to display the current year. This script is commonly used in the © copyright's current year.
4 1094 posted 16 years ago by variantstudios
0 709 posted 16 years ago by kevinberny
0 877 posted 16 years ago by archlight
0 640 posted 16 years ago by kevinberny
6 1164 posted 16 years ago by AlexWolfe
1 818 posted 16 years ago by burnsra
Wordpress function
1 1102 posted 16 years ago by Tate
Grab http://blog.kissmetrics.com/common/images/required.png as example for a required image . NOTE: You probably don't want to use this trcik, but rather go for the defacto standard of a red asterisk to mark something required. An asterisk is lang...
1 1046 posted 16 years ago by berkes
Doesn't work on Windows, obviously
1 989 posted 16 years ago by tclancy
In this example below I am moving the "recent blogs" module in "My Home" to the very top. I have placed this code in the footer of my Affiliate Center wrapped in script tags. For maximum efficiency: 1) Use the inspect tool in Firebug to find the...
0 887 posted 16 years ago by krunkosaurus
This clean little script assumes you have a simple "A-name" style jump to some cool stuff at the bottom of the page that you want people to see. ID your link "browse" and your good. Certainly you could scroll to another ID on the page if you are so...
0 851 posted 16 years ago by esquareda
This is a basic script that will redirect a non-member to the login page with a custom message. Place the code between script tags in your Affiliate Center header. To use: 1) replace loginPage variable with your *login URL. 2) replace accessMe...
0 701 posted 16 years ago by krunkosaurus
Use the Ka.Util.getLocationParam utility method to get the mediaType GET parameter: --<br> For more tips and tricks checkout the <a href="http://www.kickdeveloper.com/resources">KickApps resources page</a>.
0 872 posted 16 years ago by krunkosaurus
This is a general set of style sheet commands that you can add to your CSS. It basically creates styles for very general actions that we take when creating layouts. This will make it easy to float, clear, and position elements by giving them a generi...
1 878 posted 16 years ago by AlexWolfe
wordpress function return html list with all posts grouped by month
1 777 posted 16 years ago by miziomon
1 1006 posted 16 years ago by Wiederkehr
1 ... 447 448 449 450 451 ... 554