This file contains 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 static Matcher<Callable<?>> raises(Matcher<? super Throwable> sub) { | |
return new FeatureMatcher<Callable<?>, Throwable>(sub, "thrown exception", "thrown exception") { | |
@Override | |
protected Throwable featureValueOf(Callable<?> thing) { | |
try { | |
thing.call(); | |
} catch (Throwable e) { | |
return e; | |
} | |
return null; |
This file contains 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 com.sun.net.httpserver.HttpServer; | |
import java.io.BufferedWriter; | |
import java.io.IOException; | |
import java.io.OutputStreamWriter; | |
import java.net.InetSocketAddress; | |
import java.net.URI; | |
import java.net.http.HttpClient; | |
import java.net.http.HttpRequest; | |
import java.net.http.HttpResponse; |
This file contains 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
PS C:\Users\IEUser\Downloads\jpackage-demo-master\jpackage-demo-master> .\gradlew.bat build | |
> Task :jpackage | |
jpackage argument list: | |
[create-app-image, --name, demo, --input, C:\Users\IEUser\Downloads\jpackage-demo-master\jpackage-demo-master\build\libs, --output, C:\Users\IEUser\Downloads\jpackage-demo-master\jpackage-demo-master\build/app-image, --main-jar, jpackage-demo.jar] | |
Creating app bundle: demo in C:\Users\IEUser\Downloads\jpackage-demo-master\jpackage-demo-master\build\app-image. | |
Adding modules: [java.rmi, jdk.management.jfr, jdk.jdi, jdk.charsets, jdk.xml.dom, java.xml, java.datatransfer, jdk.jstatd, jdk.httpserver, java.desktop, java.security.sasl, jdk.zipfs, java.base, jdk.crypto.ec, jdk.javadoc, jdk.management.agent, jdk.jshell, jdk.editpad, jdk.sctp, jdk.jsobject, java.sql.rowset, java.smartcardio, jdk.unsupported, jdk.jlink, jdk.scripting.nashorn, java.security.jgss, java.compiler, jdk.dynalink, jdk.unsupported.desktop, jdk.accessibility, jdk.security.jgss, java.sql, java.xml.crypto, java.l |
This file contains 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.ArrayList; | |
import java.util.LinkedHashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.stream.Collectors; | |
public class Combine { | |
public static class Item { | |
String name; |
This file contains 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
term | rate | forward | |
---|---|---|---|
0.0 | -0.0033133321508 | -0.0033133321508 | |
0.1 | -0.00329678287008599 | -0.003263684308657968 | |
0.2 | -0.003247135027943958 | -0.0031147407822318712 | |
0.30000000000000004 | -0.0031652069127224678 | -0.00289212724033709 | |
0.4 | -0.00307524118684741 | -0.002711931672110584 | |
0.5 | -0.0029812451740789943 | -0.002491961467903277 | |
0.6 | -0.002878499729047622 | -0.0022396014243447277 | |
0.7 | -0.0027726330307377965 | -0.002047717424672988 | |
0.7999999999999999 | -0.002674128906090226 | -0.0019474822563351547 |
This file contains 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
#include <iostream> | |
#include <vector> | |
#include <boost/make_shared.hpp> | |
#include <ql/indexes/ibor/euribor.hpp> | |
#include <ql/math/interpolations/all.hpp> | |
#include <ql/termstructures/yield/piecewiseyieldcurve.hpp> | |
#include <ql/termstructures/yield/ratehelpers.hpp> | |
#include <ql/time/daycounters/actual360.hpp> |
This file contains 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
#include <iostream> | |
#include <vector> | |
#include <boost/make_shared.hpp> | |
#include <ql/indexes/ibor/euribor.hpp> | |
#include <ql/math/interpolations/convexmonotoneinterpolation.hpp> | |
#include <ql/termstructures/yield/piecewiseyieldcurve.hpp> | |
#include <ql/termstructures/yield/ratehelpers.hpp> | |
#include <ql/time/daycounters/actual360.hpp> |
This file contains 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 Calculus { | |
public static void main(String[] args) { | |
double δx = 17.0; | |
double δy = 23.0; | |
double δxノδy = δx / δy; | |
System.out.println("δxノδy = " + δxノδy); | |
} | |
} |
This file contains 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.concurrent.ExecutionException; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.SynchronousQueue; | |
import java.util.concurrent.ThreadPoolExecutor; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.TimeoutException; | |
import java.util.concurrent.atomic.AtomicInteger; | |
import java.util.concurrent.atomic.AtomicReference; | |
import java.util.function.Consumer; |
This file contains 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
#include <iostream> | |
// modified from https://wandbox.org/permlink/YnHKdrHmMFiJsjOm | |
template <typename T, typename Deleter> | |
struct handle { | |
handle(T value, Deleter deleter = Deleter()) : value_(value), deleter_(deleter) { | |
} | |
~handle() { |