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
private static final String INPUT = "key=\"value\" withEqualsSign=\"Base64==\" isEmpty=\"\" withSpaces=\" s p a c e s \" withEscapeChar=\"aaa\\\\bbb\" withEscapeChar2=\"aaa\\\"bbb\" withEscapeChar3=\"aaa\\]bbb\""; | |
@Test | |
public void variousVariations() throws Exception { | |
final List<Map.Entry<String, String>> collect = KeyValueReaderIterable.stream(INPUT).collect(Collectors.toList()); | |
assertThat(collect, hasItem(new AbstractMap.SimpleEntry<>("key", "value"))); | |
assertThat(collect, hasItem(new AbstractMap.SimpleEntry<>("withEqualsSign", "Base64=="))); | |
assertThat(collect, hasItem(new AbstractMap.SimpleEntry<>("isEmpty", ""))); | |
assertThat(collect, hasItem(new AbstractMap.SimpleEntry<>("withSpaces", " s p a c e s "))); | |
assertThat(collect, hasItem(new AbstractMap.SimpleEntry<>("withEscapeChar", "aaa\\\\bbb"))); |
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 KeyValueReaderIterable extends KeyValueReader implements Iterable<Map.Entry<String, String>> { | |
/** | |
* Default constructor | |
* @param l line | |
*/ | |
public KeyValueReaderIterable(String l) { | |
super(l); | |
} |
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 KeyValueReader { | |
private final String line; | |
private int idx; | |
private int mark; | |
public KeyValueReader(String l) { | |
this.line = l; | |
} |
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
# Credit http://stackoverflow.com/a/2514279 | |
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |
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
{ | |
"exerciseId": 4321, | |
"end": "2016-04-12T12:49:12.123", | |
"start": "2016-04-12T12:39:12.123", | |
"gloveId": 1234, | |
"data": [ | |
{ | |
"timestamp": "2016-04-12T12:39:12.123", | |
"sensorAngles": { | |
"thumb": { |
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 java.io.ByteArrayOutputStream | |
import java.time.{Instant, ZonedDateTime} | |
import java.util.zip.GZIPOutputStream | |
import spray.json._ | |
import scala.util.Random | |
case class SensorRecord(timestamp: ZonedDateTime, sensor1: Int, sensor2: Int, sensor3: Int, sensor4: Int, sensor5: Int, sensor6: Int, sensor7: Int, sensor8: Int, sensor9: Int, sensor10: Int, sensor11: Int) |
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 streamingdatafx; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.net.ServerSocket; | |
import java.net.Socket; | |
import java.util.concurrent.Callable; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; |
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
git submodule add https://github.com/elucidator/builder-annotations |
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
<definitions xmlns:ns1="..." xmlns:tns="..." | |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" | |
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" | |
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" | |
name="MyService" | |
targetNamespace="..." | |
xmlns="http://schemas.xmlsoap.org/wsdl/"> | |
<types> | |
//SNIP | |
</types> |
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
<plugin> | |
<groupId>org.codehaus.mojo</groupId | |
<artifactId>jaxb2-maven-plugin</artifactId | |
<version>1.6</version> | |
<executions> | |
<execution> | |
<id>xjc</id> | |
<goals> | |
<goal>xjc</goal> | |
</goals> |
NewerOlder