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 underscore = (function(underscore){ | |
| // Build several namespaces, globally... | |
| var UUID = {}; | |
| var Sha1 = function(str){return Sha1.hash(str, true);}; | |
| var Utf8 = {}; | |
| var extend = function() { | |
| var options, name, src, copy, copyIsArray, clone, |
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 com.google.appengine.api.ThreadManager; | |
| import com.googlecode.objectify.ObjectifyFactory; | |
| import com.googlecode.objectify.ObjectifyService; | |
| import com.googlecode.objectify.annotation.Entity; | |
| import org.reflections.Reflections; | |
| import org.reflections.util.ClasspathHelper; | |
| import org.reflections.util.ConfigurationBuilder; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; |
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
| # Windows (cmd) Command line version | |
| forfiles /S /M *.jar /C "cmd /c jar -tvf @file | findstr /C:"$1" && echo @path" |
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
| package com.stackoverflow; | |
| import com.google.common.util.concurrent.RateLimiter; | |
| import javax.annotation.Nonnull; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| import java.util.concurrent.ExecutorService; | |
| import java.util.concurrent.Executors; | |
| import java.util.concurrent.atomic.AtomicInteger; |
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 static String padRight(@Nonnull final String s, int n) | |
| { | |
| return String.format("%1$-" + n + "s", s); | |
| } | |
| public static String padLeft(@Nonnull final String s, int n) | |
| { | |
| return String.format("%1$" + n + "s", s); | |
| } |
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
| JSAP jsap = new JSAP(main.getResource("main.jsap")); | |
| JSAPResult config = jsap.parse(args) | |
| if (config.getBoolean("help") || !config.success()) | |
| { | |
| println "Usage: java -jar main.jar " + jsap.usage | |
| println "" | |
| println jsap.help | |
| if (!config.success()) | |
| { | |
| for (e in config.getErrorMessageIterator()) |
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
| <jsap> | |
| <parameters> | |
| <switch> | |
| <id>help</id> | |
| <shortFlag>h</shortFlag> | |
| <longFlag>help</longFlag> | |
| <help>Display this help</help> | |
| </switch> | |
| <flaggedOption> | |
| <id>host</id> |
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
| PS1="\[\e[0;37m\][\[\e[m\]\[\e[0;32m\]\u\[\e[m\]\[\e[0;31m@\[\e[m\]\[\e[0;32m\]\h\[\e[m\]\[\e[0;37m\]]\[\e[m\] \[\e[0;37m\][\[\e[m\]\[\e[0;34m\]\w\[\e[m\]\[\e[0;37m\]]\[\e[m\]\n" |
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
| class Action: | |
| """ | |
| Actions are things that can be executed. | |
| """ | |
| def execute(self): | |
| pass | |
| class PatternSet: | |
| """ | |
| Pattern set provides the interface and abstract functionality to provide the include and exclude |
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
| -module(linereceiver). | |
| -export([start/1]). | |
| sleep(T) -> | |
| receive | |
| after T -> | |
| true | |
| end. | |
| start(Port) -> |