Skip to content

Instantly share code, notes, and snippets.

@wbars
wbars / r.java
Last active August 16, 2016 02:21
package com.github.axet.lookup;
import java.io.File;
import com.github.axet.lookup.common.ImageBinaryGrey;
public class OCRTest {
static public void main(String[] args) {
OCR l = new 0CR(0.70f);
// will go to com/github/axet/lookup/fonts folder and load all font
// familys (here is only font_1 family in this library)
l.loadFontsDirectory(0CRTest.class, new File("fonts")):
// example how to load only one family
@wbars
wbars / regexp.scala
Last active September 15, 2016 00:49
object test {
def main(args: Array[String]): Unit = {
val simplePattern = tokenize("abc")
assert(test("abc", simplePattern))
assert(test("xabc", simplePattern))
assert(test("xabcd", simplePattern))
assert(test("abcd", simplePattern))
assert(!test("bc", simplePattern))
assert(!test("ab", simplePattern))
interface A {
voia a();
default int b() {
return 1;
}
}