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 org.test.uml | |
case class Object(name: String) { | |
def --(message: String) = (this, message) | |
def <--(message: String) = (this, message) | |
} | |
sealed trait Action | |
sealed case class Call(source: Object, verb: String, destination: Object) extends Action | |
sealed case class Async(source: Object, verb: String, destination: Object) extends Action |
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
validate_elements(ListOfLists) -> | |
lists:reverse(lists:foldl(fun(ValidationResult, Acc) -> | |
case ValidationResult of | |
ok -> Acc; | |
Else -> [Else | Acc] | |
end | |
end, [], lists:map(fun(Element) -> apply_validators(Element) end, ListOfLists))). |
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
lists:flatmap(fun(ListElement) -> apply_validators(ListElement) end, [[1,2,3], [4,5]]) |
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
%% Riak KV config | |
{riak_kv, [ | |
%% Storage_backend specifies the Erlang module defining the storage | |
%% mechanism that will be used on this node. | |
%{storage_backend, riak_kv_bitcask_backend}, | |
{storage_backend, riak_kv_eleveldb_backend}, |
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
String value = null; | |
if(weather.theSunIsUp()){ | |
value = "Nice"; | |
} | |
System.out.println("The weather is " + 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
2011-10-24 22:26:15 | |
Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.1-b02-383 mixed mode): | |
"elasticsearch[cached]-pool-1-thread-1" daemon prio=5 tid=7fe3a51e4800 nid=0x1175cc000 waiting for monitor entry [1175cb000] | |
java.lang.Thread.State: BLOCKED (on object monitor) | |
at org.elasticsearch.client.transport.TransportClientNodesService$SimpleNodeSampler.sample(TransportClientNodesService.java:253) | |
- waiting to lock <7f40c0048> (a org.elasticsearch.client.transport.TransportClientNodesService$SimpleNodeSampler) | |
at org.elasticsearch.client.transport.TransportClientNodesService$ScheduledNodeSampler.run(TransportClientNodesService.java:243) | |
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) | |
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) |
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
# Index | |
--------------------------------------------------------------------- | |
curl -XPUT http://localhost:9200/pictures/ -d ' | |
{ | |
"settings": { | |
"analysis": { | |
"analyzer": { | |
"index_analyzer": { | |
"tokenizer": "standard", |
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
name: ${HOSTNAME} | |
# The cluster should be named with the name of the AD domain | |
cluster: | |
name: bldrprod-0.14.0 | |
routing: | |
allocation: | |
# As small as possible, very large performance hits during recovery | |
concurrent_recoveries: 1 |
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
require 'thread' | |
class Context | |
class << self | |
def evaluate(&block) | |
self.new.instance_eval(&block) | |
end | |
end | |
def self.execute(&block) | |
self.new.instance_eval(&block) |
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
gem: --no-ri --no-rdoc |