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
ERROR [2017-12-26 19:49:03,004] com.coinmx.strategy.StrategyExecutor: Error while running strategy | |
! org.knowm.xchange.binance.dto.BinanceException: -1021: Timestamp for this request was 1000ms ahead of the server's time. | |
! at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) | |
! at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) | |
! at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) | |
! at java.lang.reflect.Constructor.newInstance(Constructor.java:422) | |
! at com.fasterxml.jackson.databind.introspect.AnnotatedConstructor.call(AnnotatedConstructor.java:124) | |
! at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:274) | |
! at com.fasterxml.jackson.databind.deser.ValueInstantiator.createFromObjectWith(ValueInstantiator.java:228) | |
! at com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator.build(PropertyBasedCreator.java:189) |
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
WARN [2017-12-26 19:48:52,633] org.knowm.xchange.binance.BinanceExchange: An exception occurred while loading the metadata | |
! java.lang.NullPointerException: null | |
! at org.knowm.xchange.binance.BinanceExchange.remoteInit(BinanceExchange.java:61) | |
! at org.knowm.xchange.BaseExchange.applySpecification(BaseExchange.java:111) | |
! at org.knowm.xchange.ExchangeFactory.createExchange(ExchangeFactory.java:134) | |
! at com.coinmx.CoinMXApplication.createExchange(CoinMXApplication.java:72) | |
! at com.coinmx.CoinMXApplication.createOrderManager(CoinMXApplication.java:60) | |
! at com.coinmx.CoinMXApplication.createStrategyExecutor(CoinMXApplication.java:53) | |
! at com.coinmx.CoinMXApplication.run(CoinMXApplication.java:47) | |
! at com.coinmx.CoinMXApplication.run(CoinMXApplication.java:25) |
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
/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java -Didea.launcher.port=7533 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 13 CE/IntelliJ IDEA 13 CE.app/bin" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/lib/tools.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/jav |
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
int dad[10000]; // super parent of each node | |
//union-find, path compression | |
int find(int x) | |
{ | |
return x == dad[x] ? x : dad[x] = find(dad[x]); | |
} | |
void unite(int x, int y) | |
{ |
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
#include <iostream> | |
#include <cmath> | |
#include <cstring> | |
#include <map> | |
#include <cstdio> | |
#include <algorithm> | |
#include <string> | |
#include <vector> | |
using namespace std; |
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
#include <iostream> | |
#include <cmath> | |
#include <cstring> | |
#include <map> | |
#include <cstdio> | |
#include <algorithm> | |
#include <string> | |
#include <vector> | |
using namespace std; |
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
int a[(1 << 17) + 1]; | |
int t[(1 << 17) + 1][18]; | |
// binary function | |
int f(int a, int b) | |
{ | |
return a + b; | |
} | |
// init segment tree |
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
int bs(int* arr, int l, int r, int v) | |
{ | |
if(l >= r) return -1; | |
int m = l + (r - l) / 2; | |
if(arr[m] > v) | |
{ | |
return bs(arr, l, m, v); | |
} | |
if(arr[m] < v) | |
{ |
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
void climbStair() | |
{ | |
printf("Climbed a stair!"); | |
} | |
void climbStairs(int stairs) | |
{ | |
if(stairs > 0) | |
{ | |
climbStair(); |
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 A { | |
private static A a; | |
// disable new operator | |
private A() {} | |
// thread-safe | |
public static synchronized A get() { |
NewerOlder