- http://
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/sh | |
ASCII_OFFSET=65 | |
Handle_invalid_input () { | |
VALID_INPUT_REGEX=^[A-Z]$ | |
if ! [[ $1 =~ $VALID_INPUT_REGEX ]]; then | |
echo INVALID INPUT | |
exit 1 | |
fi | |
} |
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
import sys | |
def drawdiamond(start,end): | |
charA="A" | |
indentation=" " | |
char = chr(start+ord(charA)) | |
if start ==0: | |
diamond=(indentation*end)+charA | |
else: | |
diamond=(indentation*(end-start)) + char + (indentation*((start*2)-1)) + char |
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
#!/usr/bin/env ruby | |
puts (/[A-Za-z]/ === ARGV[0] ? ('A'..ARGV[0].upcase) | |
.map.with_index {|c,i| | |
(' ' * (26 - i)).chars | |
.concat([c]) | |
.concat((' ' * (2*i)).chars) | |
.reverse | |
.drop(1) | |
.reverse |
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 com.adaptionsoft.games.trivia; | |
import static org.junit.Assert.*; | |
import com.adaptionsoft.games.trivia.runner.GameRunner; | |
import org.junit.Before; | |
import org.junit.Test; | |
import java.io.*; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; |
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
[2013-06-04 07:25:48,066][INFO ][node ] [prod-inbox-es-router01] {0.20.6}[27907]: stopping ... | |
[2013-06-04 07:25:48,116][INFO ][node ] [prod-inbox-es-router01] {0.20.6}[27907]: stopped | |
[2013-06-04 07:25:48,117][INFO ][node ] [prod-inbox-es-router01] {0.20.6}[27907]: closing ... | |
[2013-06-04 07:25:48,127][INFO ][node ] [prod-inbox-es-router01] {0.20.6}[27907]: closed | |
[2013-06-04 07:25:49,914][WARN ][common.jna ] Unknown mlockall error 0 | |
[2013-06-04 07:25:49,924][INFO ][node ] [prod-inbox-es-router01] {0.20.6}[9317]: initializing ... | |
[2013-06-04 07:25:49,935][INFO ][plugins ] [prod-inbox-es-router01] loaded [], sites [bigdesk, paramedic] | |
[2013-06-04 07:25:54,498][INFO ][node ] [prod-inbox-es-router01] {0.20.6}[9317]: initialized | |
[2013-06-04 07:25:54,499][INFO ][node ] [prod-inbox-es-router01] {0.20.6}[9317]: starting ... | |
[2013-06-04 07:25:54,62 |
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
[2013-06-04 07:25:48,088][INFO ][discovery.zen ] [prod-inbox-es-data03] master_left [[prod-inbox-es-router01][Wfe3q4zMSYqQw6hjCKiugw][inet[/10.112.14.11:9300]]{data=false}], reason [shut_down] | |
[2013-06-04 07:25:48,116][INFO ][discovery.zen ] [prod-inbox-es-data03] master_left [[prod-inbox-es-router01][Wfe3q4zMSYqQw6hjCKiugw][inet[/10.112.14.11:9300]]{data=false}], reason [transport disconnected (with verified connect)] | |
[2013-06-04 07:25:48,404][INFO ][cluster.service ] [prod-inbox-es-data03] master {new [prod-inbox-es-data03][8dojzQ98R7W4gYUZjfC_Jg][inet[/10.112.14.13:9300]], previous [prod-inbox-es-router01][Wfe3q4zMSYqQw6hjCKiugw][inet[/10.112.14.11:9300]]{data=false}}, removed {[prod-inbox-es-router01][Wfe3q4zMSYqQw6hjCKiugw][inet[/10.112.14.11:9300]]{data=false},}, reason: zen-disco-master_failed ([prod-inbox-es-router01][Wfe3q4zMSYqQw6hjCKiugw][inet[/10.112.14.11:9300]]{data=false}) | |
[2013-06-04 07:25:48,541][WARN ][cluster.action.shard ] [prod-inbox-es-data03] failed to |
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
[2013-06-04 07:25:48,112][INFO ][discovery.zen ] [prod-inbox-es-router00] master_left [[prod-inbox-es-router01][Wfe3q4zMSYqQw6hjCKiugw][inet[/10.112.14.11:9300]]{data=false}], reason [transport disconnected (with verified connect)] | |
[2013-06-04 07:25:48,114][INFO ][cluster.service ] [prod-inbox-es-router00] master {new [prod-inbox-es-data03][8dojzQ98R7W4gYUZjfC_Jg][inet[/10.112.14.13:9300]], previous [prod-inbox-es-router01][Wfe3q4zMSYqQw6hjCKiugw][inet[/10.112.14.11:9300]]{data=false}}, removed {[prod-inbox-es-router01][Wfe3q4zMSYqQw6hjCKiugw][inet[/10.112.14.11:9300]]{data=false},}, reason: zen-disco-master_failed ([prod-inbox-es-router01][Wfe3q4zMSYqQw6hjCKiugw][inet[/10.112.14.11:9300]]{data=false}) | |
[2013-06-04 07:25:48,121][INFO ][discovery.zen ] [prod-inbox-es-router00] master_left [[prod-inbox-es-router01][Wfe3q4zMSYqQw6hjCKiugw][inet[/10.112.14.11:9300]]{data=false}], reason [shut_down] | |
[2013-06-04 07:25:48,122][INFO ][cluster.service ] [prod-inbox-es-router00] d |
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
{ | |
"query": { | |
"nested": { | |
"query": { | |
"range": { | |
"date": { | |
"from": "2013-01-01T00:00:00+00:00", | |
"to": "2013-01-02T00:00:00+00:00" | |
} | |
} |
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
{ | |
"userId": 1234567, | |
"source": { | |
"id": 12345622, | |
"date": "2013-01-01T17:29:31.83264+00:00", | |
"type": "purchase" | |
} | |
} |
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
{ | |
"id":"123456-789122", | |
"userId":1234567, | |
"source":{ | |
"id":3333333, | |
"date":"2011-03-19T16:24:09.623", | |
"type":"some-type" | |
}, | |
"release":{ | |
"shopProductId":3333333, |
NewerOlder