Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View verhas's full-sized avatar
🌔
strolling along the time dimension in the universe

Peter Verhas verhas

🌔
strolling along the time dimension in the universe
View GitHub Profile
@verhas
verhas / gist:e789d700d3c9abc6afa0
Created August 26, 2014 11:44
Java type name, simple name and canonical name example
package pakage.subpackage.evensubberpackage;
import org.junit.Assert;
import org.junit.Test;
public class WhatIsMyName {
@Test
public void classHasName() {
final Class<?> klass = WhatIsMyName.class;
final String simpleNameExpected = "WhatIsMyName";
package arpad.kosa;
import org.junit.Assert;
import org.junit.Test;
import java.io.*;
public class TestOneNumberGame {
private static final String SAMPLE_GAME = "1 1 2 3 5 4 Arpad\n1 1 2 3 5 3 Elod\n2 2 2 2 2 2 Ond";
private static final String SAMPLE_GAME_NO_ONE = "3 1 2 3 5 4 Arpad\n3 1 2 3 5 3 Elod\n2 2 2 2 2 2 Ond";
package arpad.kosa;
import java.io.*;
import java.util.*;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
public class OneNumberGame {
List<Player> players = new ArrayList<>();
$ git clone git@github.com:verhas/javageci.git
Cloning into 'javageci'...
remote: Enumerating objects: 1131, done.
remote: Counting objects: 100% (1131/1131), done.
remote: Compressing objects: 100% (606/606), done.
remote: Total 7866 (delta 361), reused 937 (delta 229), pack-reused 6735
Receiving objects: 100% (7866/7866), 1.58 MiB | 2.56 MiB/s, done.
Resolving deltas: 100% (2776/2776), done.
Peter_Verhas@EPCHZURW0142 MINGW64 ~/Dropbox/github/tmp
package packt.java9.network.connect;
import java.util.function.Function;
public class RuntTimeExceptionWrapper {
public static <T> T lame(ExceptionalSupplier<T> z) {
try {
return z.apply();
} catch (Exception e) {
throw new WrapperException(e);
package javax0.j9regex.samples;
import org.junit.Test;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import static org.junit.Assert.assertEquals;