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
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:id="pedb"> | |
<teiHeader> | |
<fileDesc> | |
<titleStmt> | |
<title>Database of persons</title> | |
</titleStmt> | |
<publicationStmt> | |
<ab/> | |
</publicationStmt> | |
<sourceDesc> |
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 java.io.IOException | |
import java.nio.file.{Files, Path, StandardOpenOption} | |
import java.util.zip.{ZipEntry, ZipInputStream} | |
import cats.effect.{IO, Resource} | |
object Unzip { | |
@throws[IOException] |
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 java.util.Optional; | |
import java.util.function.Supplier; | |
// See https://stackoverflow.com/questions/46864834/best-design-pattern-for-managing-asymmetrical-resource-use | |
public class AsymmetricalLockingExample { | |
public static void main(String args[]) throws Exception { | |
try (final ManagedRelease<Collection> mcol = | |
new ManagedRelease<>(getCollection("col1 name", LockMode.WRITE_LOCK))) { |
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
(:~ | |
: XQuery to display the dependencies of an Ant target. | |
: | |
: There are two modes of operation: | |
: 1) Display all targets and immediate dependencies, specified by $project-file | |
: 2) Show a tree of a single targets dependencies, this happens when $target-name is set as well. | |
: | |
: External parameters: | |
: $project-file The initial Ant file to start parsing from (imports will be expanded) | |
: $target-name If specified we examine only a single target and produce a tree of all dependencies (recursively) |
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
alias=jdk1.8 | |
section=non-free | |
jre servertool /usr/lib/jvm/jdk1.8/jre/bin/servertool | |
jre keytool /usr/lib/jvm/jdk1.8/jre/bin/keytool | |
jre java /usr/lib/jvm/jdk1.8/jre/bin/java | |
jre jcontrol /usr/lib/jvm/jdk1.8/jre/bin/jcontrol | |
jre rmid /usr/lib/jvm/jdk1.8/jre/bin/rmid | |
jre ControlPanel /usr/lib/jvm/jdk1.8/jre/bin/ControlPanel | |
jre rmiregistry /usr/lib/jvm/jdk1.8/jre/bin/rmiregistry | |
jre orbd /usr/lib/jvm/jdk1.8/jre/bin/orbd |
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 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. |
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
/* | |
* 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. | |
* |
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 comptest; | |
import org.rocksdb.*; | |
import static java.nio.charset.StandardCharsets.UTF_8; | |
/** | |
* Created by aretter on 14/06/2016. | |
*/ | |
public class CompTest { |
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 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 |
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
xquery version "3.0"; | |
(:~ | |
: Anonymous function recursion in XQuery | |
: | |
: @author Adam Retter <[email protected]> | |
:) | |
let $factorialHelper := function($f, $x) { | |
if($x eq 0) then |