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 hornetq; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.concurrent.atomic.AtomicReference; | |
import javax.jms.Connection; | |
import javax.jms.ConnectionFactory; | |
import javax.jms.JMSException; | |
import javax.jms.Topic; |
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 Application extends Marionette.Application | |
constructor: (options) -> | |
super options | |
@_asyncInitCallbacks = [] | |
addAsyncInitializer: (initializer) -> | |
@_asyncInitCallbacks.push initializer | |
start: (options) -> |
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 UserViewModel extends Backbone.ViewModel | |
computed: | |
fullName: | |
observe: [ "firstName", "lastName" ] | |
value: -> (_.filter [ @get("firstName"), @get("lastName") ], (name) -> not _.str.isBlank name).join (" ") | |
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 bootstrap; | |
public final class Bootstrap { | |
public static void main(String[] args) { | |
new TomcatServer("../project/module").boot(8080); | |
} | |
private Bootstrap() {} |
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 d3 from 'd3/d3' | |
import Plottable from './plottable' | |
const findDOMNode = (node, tag) => { | |
tag = tag.toUpperCase() | |
while (node.parentNode) { | |
node = node.parentNode | |
if (node.tagName.toUpperCase().trim() === tag) { | |
return node | |
} |
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
const LINE_SYMBOL_FACTORY = (size) => { | |
let [ w, h ] = [ size / 2, size / 8 ]; | |
return `M ${-w},${-h} L ${w},${-h} ${w},${h} ${-w},${h} Z`; | |
} |
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
const existy = value => value !== null && value !== undefined | |
export function resolve (host, relative, params) { | |
const path = `${host}/${relative}` | |
if (params) { | |
return `${path}?${toQueryParams(params)}` | |
} | |
return 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 sandbox; | |
import java.time.Duration; | |
import java.util.Optional; | |
import java.util.concurrent.TimeoutException; | |
/** | |
* グローバルなロックを司るコンポーネントです。 | |
*/ | |
public interface LockManager { |
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
object ClassCollector { | |
private val KINDS = setOf(JavaFileObject.Kind.CLASS) | |
private val fileManager: JavaFileManager | |
init { | |
val compiler = ToolProvider.getSystemJavaCompiler() | |
fileManager = compiler.getStandardFileManager(DiagnosticCollector<JavaFileObject>(), null, null) | |
} |
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
on alfred_script(q) | |
tell application "Terminal" | |
activate | |
do script q | |
delay 0.5 | |
quit | |
end tell | |
end alfred_script |