This file contains 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
enum ChangeType { | |
CREATION(249 as short), | |
AMENDMENT(250 as short), | |
MODIFICATION(251 as short), | |
DELETED(523 as short) | |
// TODO: SYNTHESIS, ATTESTATION, UNKNOWN? | |
private final short value |
This file contains 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
[ | |
{ | |
"fields": { | |
"status": "During Check In" | |
}, | |
"required": false, | |
"name": "Check In", | |
"complete": true | |
}, | |
{ |
This file contains 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
/* | |
https://stackoverflow.com/questions/7380226/find-word-in-html | |
*/ | |
function wrapWord(el, word) | |
{ | |
var expr = new RegExp(word, "i"); | |
var nodes = [].slice.call(el.childNodes, 0); | |
for (var i = 0; i < nodes.length; i++) | |
{ | |
var node = nodes[i]; |
This file contains 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
package com.hussain.pf | |
import groovy.xml.MarkupBuilder | |
import org.apache.commons.lang.StringEscapeUtils | |
import org.codehaus.groovy.grails.plugins.web.taglib.ValidationTagLib | |
class CustomValidationTagLib extends ValidationTagLib { | |
/** |
This file contains 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
def ss = ["12345", "3.14159", "-200.5", "37,1", "1,111,111.55"] | |
def format = java.text.NumberFormat.getInstance() | |
println format.class // DecimalFormat | |
/* | |
12345 class java.lang.Long | |
3.14159 class java.lang.Double | |
-200.5 class java.lang.Double |
This file contains 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
// Line Format | |
// email, | |
// name <email>, | |
// "name" <email>, | |
// Group 2 will have the name if available | |
// Group 3 will have the email | |
def raw = $/ | |
aaa@mail.com, |
This file contains 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
import groovy.time.TimeCategory | |
random = new Random() | |
Date randomDate(Range<Date> range) { | |
def res = range.from + random.nextInt(range.to - range.from + 1) | |
use( TimeCategory ) { | |
res = res + random.nextInt(24).hours + random.nextInt(60).minutes + random.nextInt(60).seconds | |
} | |
res |
This file contains 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
<script> | |
// change the filter_select to filter items in the target select | |
filter_select = document.getElementById('filter_select_id'); | |
filter_select.onchange = function (ev) { | |
var target_select = document.getElementById('target_select_id'); | |
for (i = 0; i < target_select.children.length; i++) | |
{ | |
option = target_select.children[i]; | |
$(option).show(); // show option if previously hidden from selecting another filter |
This file contains 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
sudo apt-get install mysql-server | |
set the password for root user ("toor" for dev env) | |
# check mysql is installed | |
mysql -u root -p | |
toor | |
show databases; | |
exit; |
This file contains 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
I found that you can use the following to remove the openjdk-7-jre on Ubuntu 13.04: | |
sudo apt-get autoremove openjdk-7-jre | |
Press 'y' and then press enter when prompted to confirm this change. This should also clean up all the additional dependency libraries that were installed with it. | |
I also found you can use the following command to perform additional clean up: | |
sudo apt-get purge openjdk* |