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
// name: log | |
// scope: java->declaration | |
// set $CLASS_NAME$ to className() | |
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger($CLASS_NAME$.class); |
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
var examples = { | |
// Monday to Friday 9 to 1 and 3 to 7 | |
"Mon,Tue,Wed,Thu,Fri": "09:00-13:00,15:00-19:00", | |
// Saturdays, 9 to 2 | |
"Sat": "09:00-14:00", | |
// Sundays closed | |
"Sun": "", |
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
/** | |
This is a javascript port of the Base58 code present at | |
http://icoloma.blogspot.com.es/2010/03/create-your-own-bitly-using-base58.html | |
*/ | |
var Base58 = (function() { | |
var | |
BASE58_CHARS = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; | |
return { |
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
/** | |
* Creates a URL to be used in Google Maps. Useful for creating links where the javascript API is not available, e.g. in HTML mail. | |
* For info about each arguments, see http://mapki.com/wiki/Google_Map_Parameters | |
* @author icoloma | |
*/ | |
public class GoogleMapsUrlFactory { | |
private HashMap<String, String> params = Maps.newLinkedHashMap(); | |
public String build() { |
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
import java.util.List; | |
import java.util.Map; | |
import java.util.Set; | |
import com.google.common.collect.Lists; | |
import com.google.common.collect.Maps; | |
import com.google.common.collect.Sets; | |
/** | |
* Parses options and arguments provided in the command line. All option values must be preceded with "--" |
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
import static org.junit.Assert.assertEquals; | |
import static org.junit.Assert.assertFalse; | |
import static org.junit.Assert.assertTrue; | |
import java.math.BigDecimal; | |
import java.math.RoundingMode; | |
import java.util.HashSet; | |
import java.util.Set; | |
import org.junit.Test; |
NewerOlder