View TestMerge1.java
package org.rocksdb;
import java.io.IOException;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
import java.util.List;
/**
* Created by aretter on 30/05/2017.
View recursive-serialize
/*
* eXist Open Source Native XML Database
* Copyright (C) 2001-2011 The eXist-db Project
* http://exist-db.org
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
View CompTest.java
package comptest;
import org.rocksdb.*;
import static java.nio.charset.StandardCharsets.UTF_8;
/**
* Created by aretter on 14/06/2016.
*/
public class CompTest {
View upload.scala
def storeUploadedFile(data: Source[ByteString, Any]): \/[Seq[Throwable], Future[DefaultPath]] = {
val tmpUpload = Path.createTempFile(prefix = "uploaded", dir = settings.TempDir, deleteOnExit = true)
try {
val os = new FileOutputStream(tmpUpload.jfile)
val sink = OutputStreamSink(() => os)
val f = data.runWith(sink).map(_ => tmpUpload)
f.onComplete { _ =>
info(s"Stored temporary uploaded PDF ${tmpUpload.path}")
os.close
View anon-recursion.xqy
xquery version "3.0";
(:~
: Anonymous function recursion in XQuery
:
: @author Adam Retter <adam.retter@googlemail.com>
:)
let $factorialHelper := function($f, $x) {
if($x eq 0) then
View TestingUnapply2.scala
Updating the code to:
```scala
import scala.reflect.ClassTag
object TestingUnapply {
sealed trait Thing
case class ThingA(a: String) extends Thing
case class ThingB(b: String, thingA: ThingA) extends Thing
View TestingUnapply.scala
object TestingUnapply {
sealed trait Thing
case class ThingA(a: String) extends Thing
case class ThingB(b: String, thingA: ThingA) extends Thing
val x: Thing = ThingA("hello")
val y: Thing = ThingB("goodbye", ThingA("maybe"))
process(x, new { def unapply(thing: ThingA) = ThingA.unapply(thing)})
View interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 5.196.205.132
netmask 255.255.255.255
broadcast 5.196.205.132
gateway 91.121.89.254
post-up /sbin/route add 91.121.89.254 dev eth0
View interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet static
address 91.121.89.146
netmask 255.255.255.0
View gist:9b3140e824424713966e
$ git show-ref --tags
44f824e4ead5e2516a6abf2db9cd91bf1e9a9a99 refs/tags/eXist-2.2
6f67af030cd534df60209e6e78c13a4cd88ff6fc refs/tags/eXist-2.2.RC1
28f90f702e9f8228485985f8bfe093d4392a8666 refs/tags/eXist-2.2.RC2
$ git checkout 6f67af030cd534df60209e6e78c13a4cd88ff6fc
Checking out files: 100% (2471/2471), done.
Note: checking out '6f67af030cd534df60209e6e78c13a4cd88ff6fc'.
You are in 'detached HEAD' state. You can look around, make experimental