This file contains 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.io.File | |
import java.io.FileInputStream | |
import java.util.* | |
// Unique index for each Vertex | |
var currentIndex = 0 | |
class Vertex(private val index: Int = ++currentIndex) { | |
var terminate = false | |
val edges = mutableMapOf<Char, Vertex>() |
This file contains 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.io.BufferedWriter | |
import java.io.File | |
import java.io.FileInputStream | |
import java.util.* | |
import kotlin.test.assertTrue | |
const val FOLDER_PATH = "c:/data" | |
const val CHINESE_FILE_PATH = "$FOLDER_PATH/chinese.txt" | |
const val CHINESE_FILE_TEST_PATH = "$FOLDER_PATH/chinese_temp.txt" |
This file contains 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.richard1993.android.inputhack; | |
import android.app.Service; | |
import android.content.Intent; | |
import android.net.nsd.NsdManager; | |
import android.net.nsd.NsdServiceInfo; | |
import android.os.IBinder; | |
import android.util.Log; | |
import java.io.BufferedInputStream; |
OlderNewer