Skip to content

Instantly share code, notes, and snippets.

View horitaku1124's full-sized avatar

Horimatsu Takuya horitaku1124

  • Tokyo
View GitHub Profile
import org.junit.Test;
import java.sql.*;
import java.util.*;
import java.util.stream.Collectors;
import static java.lang.Class.forName;
public class DBLoader {
@Test
// Save as "HelloJNI.c"
#include <jni.h> // JNI header provided by JDK
#include <stdio.h> // C Standard IO Header
#include <math.h>
#include <immintrin.h>
#include "HelloJNI.h" // Generated
JNIEXPORT jfloat JNICALL Java_HelloJNI_calcCoff
(JNIEnv * env, jobject jObj, jfloatArray array1, jint len1, jfloatArray array2) {
const string2 = `
0 The Class-Path
0 :: Spring Boot ::
0 name: default
1 1:34:23.868
1 1:34:23.868
1 1:34:23.870
1 1:34:23.871
1 1:34:23.917
1 1:34:23.917
public class TestVec1 {
private static int[] strToVec(String str, int len) {
int[] vec = new int[len];
for (int i = 0;i < len;i++) {
if (i < str.length()) {
vec[i] = str.charAt(i);
} else {
vec[i] = 0;
}
}
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
import numpy as np
from PIL import Image
from ISR.models import RDN
img_name = './data/meerkat.png'
img = Image.open(img_name)
print(img.size)
scale = 2
function formatString(...args) {
let format = args[0];
let result = format;
let matches = format.match(/(%(s|\d*d))/g);
for (let i = 0;i < matches.length;i++) {
let replaceFrom = matches[i];
let replaceTo = args[i + 1].toString();
if (replaceFrom === "%s" || replaceFrom === "%d") {
result = result.replace(matches[i], replaceTo);
} else {
import java.math.BigDecimal;
import java.math.RoundingMode;
class CalcPi {
public static void main(String[] args) {
var start = System.currentTimeMillis();
final long RADIUS = 3000000000L;
final long RADIUS_E2 = RADIUS * RADIUS;
long count = 0;
System.out.println("RADIUS_E2=" + RADIUS_E2);
package com.horitaku1124.java.event;
import java.io.IOException;
import java.nio.file.*;
import java.util.function.Consumer;
public class Eventer {
public static void getEvent(String filPath, Consumer<Path> callback) {
try {
Path filePath = Paths.get(filPath);
import numpy as np
from PIL import Image
from ISR.models import RDN
from tensorflow.compat.v1 import ConfigProto
from tensorflow.compat.v1 import InteractiveSession
config = ConfigProto()
config.gpu_options.allow_growth = True
session = InteractiveSession(config=config)