This file contains hidden or 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
| @Override | |
| public Collection<Service> findAllByEnvironmentWithinDuration(Environment environment, Duration duration) { | |
| return DSL.using(dataSource, dialect) | |
| .select(field("s.name", field("s.pattern"), field("a.name"), field("e.name"))) | |
| .from(table("service").as("s")) | |
| .leftOuterJoin(table("application").as("a")) | |
| .on(field("s.application_id").equal(field("a.id"))) | |
| .leftOuterJoin(table("environment").as("e")) | |
| .on(field("a.environment_id").equal(field("e.id"))) | |
| .where(field("s.creation_time_millis").minus(duration.get(MILLIS)).greaterThan(0)) |
This file contains hidden or 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 fr.vidal.oss.crawler; | |
| import fr.vidal.oss.crawler.cache.UrlCache; | |
| import fr.vidal.oss.crawler.model.LinkedFeed; | |
| import fr.vidal.oss.crawler.parsing.Either; | |
| import fr.vidal.oss.crawler.parsing.FetchError; | |
| import fr.vidal.oss.jaxb.atom.core.Link; | |
| import reactor.Environment; | |
| import reactor.core.Dispatcher; | |
| import reactor.fn.Predicate; |
This file contains hidden or 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
| def fib(n:Int):Int = { | |
| @annotation.tailrec | |
| def _fib(count:Int, x1:Int, x2:Int):Int = { | |
| val current = x1+x2 | |
| if (count == n) current | |
| else _fib(count+1, x2, current) | |
| } | |
| if (n == 1) 0 | |
| else if (n == 2) 1 |
This file contains hidden or 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 Record { | |
| public Record record; | |
| } |
This file contains hidden or 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
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>net.biville.florent</groupId> | |
| <artifactId>test-liquigraph-neo4j3-liquigraph2</artifactId> | |
| <version>1.0-SNAPSHOT</version> | |
| <packaging>jar</packaging> | |
| <name>test-liquigraph-neo4j3-liquigraph2</name> |
This is based on the data published by Neo Technology.
The main difference lies in the introduction of labels and the export in Cypher rather than the raw Neo4j files. This offers a greater interoperability (the raw files do not work on Neo4j 3.x instances).
The dataset is in dr-who.cypher.
This file contains hidden or 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 org.junit.rules.TestRule; | |
| import org.junit.runner.Description; | |
| import org.junit.runners.model.Statement; | |
| import org.neo4j.graphdb.GraphDatabaseService; | |
| import org.neo4j.graphdb.Transaction; | |
| import java.lang.reflect.InvocationTargetException; | |
| import java.lang.reflect.Method; | |
| import java.util.function.BiFunction; |
This file contains hidden or 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
| 2018-01-02 13:29:13 | |
| Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.151-b12 mixed mode): | |
| "Attach Listener" #151 daemon prio=9 os_prio=0 tid=0x00007f6b89288800 nid=0x219a waiting on condition [0x0000000000000000] | |
| java.lang.Thread.State: RUNNABLE | |
| "BuilderThread 3" #76 prio=5 os_prio=0 tid=0x00007f6b89285800 nid=0x1bac waiting on condition [0x00007f6b6eb34000] | |
| java.lang.Thread.State: WAITING (parking) | |
| at sun.misc.Unsafe.park(Native Method) | |
| - parking to wait for <0x00000000807ff168> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) |
This file contains hidden or 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 org.assertj.core.util.Maps; | |
| import org.springframework.context.ApplicationContextInitializer; | |
| import org.springframework.context.ConfigurableApplicationContext; | |
| import org.springframework.core.env.MapPropertySource; | |
| import java.util.Map; | |
| import static org.springframework.util.SocketUtils.findAvailableTcpPort; | |
| public class CustomContextInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext> { |