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 org.junit.Test; | |
import java.sql.*; | |
import java.util.*; | |
import java.util.stream.Collectors; | |
import static java.lang.Class.forName; | |
public class DBLoader { | |
@Test |
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
// 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) { |
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
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 |
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 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; | |
} | |
} |
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
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl |
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 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 |
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
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 { |
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.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); |
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 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); |
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 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) |