This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Run the BootStrap.groovy script within the Grails Console | |
| // http://derekmarley.com/2010/10/27/grails-bootstrap-within-the-grails-console/ | |
| new BootStrap().init(ctx.servletContext) | |
| // Create toString method | |
| // http://groovy.codehaus.org/gapi/groovy/transform/ToString.html | |
| @ToString // Annotate class | |
| foo.toString() // usage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // String, need to escape backslashes | |
| def bs = '\\\\' | |
| // Slashy Strings: /abc/ | |
| // String literal not needing additional backslashes to escape special characters. | |
| def path = /C:\dev\source/ | |
| // G-Strings (double-quotes) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| REQUIREMENTS: | |
| --------- | |
| 1) JQuery is required | |
| 2) Create a element with the id of "console-log" | |
| EX: <div id="console-log"></div> | |
| USAGE: | |
| --------- | |
| console.log('hello'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Engine.java | |
| public interface Engine { | |
| void start(); | |
| void stop(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Volatility { | |
| static int NEXT_IN_LINE = 0; | |
| public static void main(String[] args) throws Exception { | |
| new CustomerInLine().start(); | |
| new Queue().start(); | |
| } | |
| static class CustomerInLine extends Thread { |
NewerOlder