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
Show hidden characters
{ | |
// This is the ruby default | |
"tab_size": 2, | |
// Set to true to insert spaces when tab is pressed | |
"translate_tabs_to_spaces": true, | |
// This shows all your whitespace, including spaces and tabs | |
// helps keep code clean and properly indented! | |
"draw_white_space": "all", |
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
#!/bin/bash | |
# | |
# Provides a function that allows you to choose a JDK. Just set the environment | |
# variable JDKS_ROOT to the directory containing multiple versions of the JDK | |
# and the function will prompt you to select one. JAVA_HOME and PATH will be cleaned | |
# up and set appropriately. | |
_macosx() | |
{ | |
if [ $(uname -s) = Darwin ]; then |
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
(defn isbn13? [isbn13] | |
(let [nums (map #(Integer/parseInt %) (re-seq #"\d" isbn13)) | |
first-nums (butlast nums) | |
sum (->> first-nums | |
(map vector (cycle [1 3])) | |
(map (partial apply *)) | |
(reduce +)) | |
last-num (last nums)] | |
(= last-num | |
(- 10 (mod sum 10))))) |
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
/* | |
* Added additional null checks when closing the ResultSet and Statements. | |
* | |
* Thanks to pihug12 and Grzegorz Oledzki at stackoverflow.com | |
* http://stackoverflow.com/questions/5332149/jdbc-scriptrunner-java-lang-nullpointerexception?tab=active#tab-top | |
*/ | |
/* | |
* Modified: Use logWriter in print(Object), JavaDoc comments, correct Typo. | |
*/ | |
/* |