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
<?php | |
class Variadic { | |
function say(...$messages) { | |
foreach ($messages as $message) { | |
echo $message . " "; | |
} | |
echo "\n"; | |
} | |
} |
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
class Data { | |
public String format(List<String> datas) { | |
StringBuilder result = new StringBuilder(); | |
boolean first = true; | |
for(String data : datas) { | |
if(first) { | |
first = false; | |
} else { | |
result.append(", "); |
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
public class FizzBuzzTest { | |
FizzBuzz fizzBuzz = new FizzBuzz(); | |
@Test | |
public void countOneSayOne() { | |
String said = fizzBuzz.say(1); | |
assertEquals("1", said); | |
} | |
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
public static RegisterRule newInstance(String validatorRule) { | |
if ("NameEmptyRule".equals(validatorRule)) { | |
return new NameEmptyRule(); | |
} else if ("NameFormatRule".equals(validatorRule)) { | |
return new NameFormatRule(); | |
} else if ("EmailEmptyRule".equals(validatorRule)) { | |
return new EmailEmptyRule(); | |
} | |
return null; | |
} |
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
{ | |
"title": "My Music", | |
"services": { | |
"query": { | |
"list": { | |
"0": { | |
"query": "*", | |
"alias": "", | |
"color": "#7EB26D", | |
"id": 0 |
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
[WARN] 2014-02-19 19:26:03.175 [pool-2-thread-8] com.example.logstash.Starter - Sleeping for 9457ms | |
[WARN] 2014-02-19 19:26:03.176 [pool-2-thread-2] com.example.logstash.Starter - Sleeping for 1584ms | |
[INFO] 2014-02-19 19:26:05.687 [main] com.example.logstash.Starter - Result null | |
[INFO] 2014-02-19 19:26:05.687 [main] com.example.logstash.Starter - Result null | |
[ERROR] 2014-02-19 19:26:08.695 [main] com.example.logstash.Starter - null | |
java.util.concurrent.TimeoutException: null | |
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:258) ~[na:1.7.0_13] | |
at java.util.concurrent.FutureTask.get(FutureTask.java:119) ~[na:1.7.0_13] | |
at com.example.logstash.Starter.main(Starter.java:43) ~[classes/:na] | |
[ERROR] 2014-02-19 19:26:11.696 [main] com.example.logstash.Starter - null |
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
$curl -XPOST http://localhost:9200/demo/post/1 | |
{ | |
"author": "Somkiat", | |
"title": "My first post" | |
} |
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
Widget w = getMyWidget(); | |
if (w.getParent() != null) { | |
Panel parent = w.getParent(); | |
parent.remove(w); | |
} |
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
[1] "coderwall-protips-bot" | |
[2] "NoSQLDigest" | |
[3] "Twitter for Websites" | |
[4] "mikutter" | |
[5] "TweetDeck" | |
[6] "Tweetbot for iΟS" | |
[7] "Mobile Web (M5)" | |
[8] "Hootsuite" | |
[9] "TweetDeck" | |
[10] "Twitter Web Client" |
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
public class Email { | |
public void send() { | |
} | |
} |