Skip to content

Instantly share code, notes, and snippets.

View horitaku1124's full-sized avatar

Horimatsu Takuya horitaku1124

  • Tokyo
View GitHub Profile
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
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;
}
}
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
// 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) {
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
import org.junit.internal.runners.InitializationError;
import org.junit.internal.runners.JUnit4ClassRunner;
public class CustomRunner extends JUnit4ClassRunner {
public CustomRunner(Class<?> klass) throws InitializationError {
super(klass);
}
protected void validate() throws InitializationError {
@horitaku1124
horitaku1124 / IndexFiles.java
Last active February 20, 2019 12:43
Lucene
package com.github.horitaku1124.java_searcher;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.Path;
@horitaku1124
horitaku1124 / calc.html
Last active January 20, 2019 14:25
Inventory Calcration
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="./jquery-3.3.1.min.js"></script>
<title>Document</title>
<style>
body {
@horitaku1124
horitaku1124 / multi_stage_build.dockerfile
Last active January 17, 2019 14:58
sample multi stage build
FROM centos:latest as builder
MAINTAINER Horimatsu Takuya
WORKDIR /root
RUN yum install -y git ruby gcc make httpd-devel openssl-devel bison
RUN git clone https://github.com/matsumotory/mod_mruby.git
WORKDIR /root/mod_mruby
RUN chmod +x build.sh
RUN ./build.sh
<?php
$queries = [];
while (true) {
$query = fgets(STDIN);
if (empty($query)) {
break;
}
$queries []= $query;
}