jq is useful to slice, filter, map and transform structured json data.
brew install jq
package be.objectify.example.jooq; | |
import java.sql.SQLException; | |
import java.sql.SQLFeatureNotSupportedException; | |
import java.sql.Types; | |
import java.util.Objects; | |
import com.fasterxml.jackson.databind.JsonNode; | |
import org.jooq.Binding; | |
import org.jooq.BindingGetResultSetContext; | |
import org.jooq.BindingGetSQLInputContext; |
@Entity | |
public class Entity { | |
@Id | |
@GeneratedValue | |
private Long id; | |
@Convert(converter = JpaJsonConverter.class) | |
private Map<String, String> customMap; | |
} |
Every application ever written can be viewed as some sort of transformation on data. Data can come from different sources, such as a network or a file or user input or the Large Hadron Collider. It can come from many sources all at once to be merged and aggregated in interesting ways, and it can be produced into many different output sinks, such as a network or files or graphical user interfaces. You might produce your output all at once, as a big data dump at the end of the world (right before your program shuts down), or you might produce it more incrementally. Every application fits into this model.
The scalaz-stream project is an attempt to make it easy to construct, test and scale programs that fit within this model (which is to say, everything). It does this by providing an abstraction around a "stream" of data, which is really just this notion of some number of data being sequentially pulled out of some unspecified data source. On top of this abstraction, sca
validate: validate the schema, makes no changes to the database. | |
update: update the schema. | |
create: creates the schema, destroying previous data. | |
create-drop: drop the schema at the end of the session. |
realm=Sonatype Nexus Repository Manager | |
host=nexus.company.com | |
user=admin | |
password=admin123 |
private static final String knownKey = "{SSH2.PUBLIC.KEY}"; | |
public void start() { | |
SshServer sshd = SshServer.setUpDefaultServer(); | |
sshd.setPort(22999); | |
sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider("hostkey.ser")); | |
sshd.setPublickeyAuthenticator(new PublickeyAuthenticator() { | |
public boolean authenticate(String username, PublicKey key, ServerSession session) { | |
if(key instanceof RSAPublicKey) { |
package com.thoughtworks.futureeither | |
import concurrent.{Await, Future} | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import concurrent.duration.FiniteDuration | |
import java.util.concurrent.TimeUnit | |
class FutureEither[L, R](private val future: Future[Either[L, R]]) { | |
def flatMap[R2](block: R => FutureEither[L, R2]): FutureEither[L, R2] = { |