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 kotlinx.coroutines.experimental.* | |
import java.math.BigInteger | |
import java.util.concurrent.atomic.AtomicBoolean | |
import java.util.concurrent.atomic.AtomicLong | |
import kotlin.system.measureTimeMillis | |
fun main(args: Array<String>) = runBlocking<Unit> { | |
var currN = AtomicLong(1); | |
var isInterrupted = AtomicBoolean(false); | |
var time = 0L; |
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 com.fasterxml.jackson.databind.JsonNode; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fasterxml.jackson.databind.node.ObjectNode; | |
import org.apache.http.HttpResponse; | |
import org.apache.http.client.methods.HttpGet; | |
import org.apache.http.conn.ClientConnectionManager; | |
import org.apache.http.conn.scheme.Scheme; | |
import org.apache.http.conn.scheme.SchemeRegistry; | |
import org.apache.http.conn.ssl.SSLSocketFactory; | |
import org.apache.http.conn.ssl.TrustStrategy; |
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 com.fasterxml.jackson.databind.JsonNode; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.squareup.okhttp.OkHttpClient; | |
import com.squareup.okhttp.Request; | |
import com.squareup.okhttp.Response; | |
import java.io.IOException; | |
public class BitfinexAccessor { | |
private static String urlOverHttps = "https://api.bitfinex.com/v1/pubticker/btcusd"; |
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 ru.zuma; | |
import java.util.ArrayDeque; | |
import static org.bytedeco.javacpp.opencv_core.*; | |
import static org.bytedeco.javacpp.opencv_objdetect.*; | |
public class AsyncClassifier extends Thread { | |
interface DetectionCallback { | |
void onDetections(RectVector detections); |
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
Not empty |
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 javafx.application.Application; | |
import javafx.event.ActionEvent; | |
import javafx.event.EventHandler; | |
import javafx.scene.Scene; | |
import javafx.scene.control.Button; | |
import javafx.scene.layout.StackPane; | |
import javafx.stage.Stage; | |
public class HelloWorld extends Application { | |
public static void main(String[] args) { |
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
fun trades(currency: String, timestamp: Long = -1L, limit_trades: Int = 0) : FundingBook { | |
val param1 = if (timestamp != -1L) "timestamp=$timestamp" else null | |
val param2 = if (limit_trades != 0) "limit_trades=$limit_trades" else null | |
val params : String | |
if (param1 == null) | |
if (param2 == null) | |
params = "" | |
else | |
params = "?$param2" |
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
ffmpeg -rtbufsize 64M -f dshow -video_size 640x480 -framerate 30 -pixel_format yuyv422 -i video="HD WebCam" -b:v 2M -maxrate 2M -bufsize 1M http://localhost:8090/feed.ffm -r 30 |
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
fun loadPageData(categoty: String = "technics") { | |
launchPrintThrowable { | |
runOnUiThread { | |
// Косяк | |
productList.clear() | |
productAdapter.notifyDataSetChanged() | |
} | |
val productsHits = CommiApi.instance |
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
@PostMapping(SIGN_UP_URL) | |
public void signUp(@Valid @RequestBody ApplicationUser user) { | |
user.setPassword(bCryptPasswordEncoder.encode(user.getPassword())); | |
try { | |
applicationUserRepository.save(user); | |
} catch (Throwable e) { | |
throw RepositoryExceptionExtractor.extract(e, logger, Thread.currentThread().getStackTrace()[1].getMethodName()); | |
} | |
} |
OlderNewer