Skip to content

Instantly share code, notes, and snippets.

View toastkidjp's full-sized avatar
💻

Toast kid toastkidjp

💻
View GitHub Profile
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
package jp.toastkid.gui.jfx.wiki.name;
import java.io.File;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.impl.factory.Lists;
@toastkidjp
toastkidjp / MarkdownConverter.java
Created January 2, 2017 03:48
HTML to Markdown
package jp.toastkid.libs.markdown;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.collections.impl.factory.Lists;
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000737b584a, pid=15116, tid=0x000000000000246c
#
# JRE version: Java(TM) SE Runtime Environment (8.0_102-b14) (build 1.8.0_102-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.102-b14 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [glass.dll+0x2584a]
#
@toastkidjp
toastkidjp / file0.groovy
Last active February 20, 2017 09:14
Googleの入社試験(非公式)にGroovyでチャレンジしてみる ref: http://qiita.com/y_q1m/items/9b8b20cdd9cfea4cc078
int count = 0
(1..1000000).forEach{it ->
String str = Integer.toString(it)
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i)
if (c == '1') {
count++
}
}
if (it == count) {
@toastkidjp
toastkidjp / LicenseViewser.java
Created June 11, 2017 10:20
Android で LICENSE を読み込むアレ
/*
* Copyright (c) 2017 toastkidjp.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompany this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html.
*/
import android.content.Context;
import android.content.res.AssetManager;
@toastkidjp
toastkidjp / SuggestFetcher.java
Created June 11, 2017 10:36
Google Suggest API を引っ張ってくるアレ
import android.support.annotation.NonNull;
import android.util.Log;
import java.io.IOException;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.TimeUnit;
import io.reactivex.functions.Consumer;
│ AndroidManifest.xml
│ build-data.properties
│ classes.dex
│ classes10.dex
│ classes2.dex
│ classes3.dex
│ classes4.dex
│ classes5.dex
│ classes6.dex
│ classes7.dex
package jp.toastkid.tab;
import com.squareup.moshi.JsonAdapter;
import com.squareup.moshi.Moshi;
import okio.Buffer;
import org.junit.jupiter.api.Test;
import java.io.IOException;
@toastkidjp
toastkidjp / DownloadService.kt
Created August 23, 2017 12:24
動作未検証
import android.app.IntentService
import android.content.Context
import android.content.Intent
import android.os.IBinder
import jp.toastkid.yobidashi.search.suggestion.SuggestionParser
import okhttp3.*
import okio.Okio
import java.io.*
import java.net.HttpURLConnection
import java.net.URL