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
interface A { | |
voia a(); | |
default int b() { | |
return 1; | |
} | |
} |
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
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)) |
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.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 |
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.io.OutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.PrintWriter; | |
import java.util.Scanner; | |
/** | |
* Built using CHelper plug-in | |
* Actual solution is at the top | |
* |
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.game; | |
import java.io.PrintWriter; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Scanner; | |
public class Dirichle { | |
public static class State { |
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
# coding=utf-8 | |
import sys | |
import numpy as np | |
from numpy.random import choice | |
class Action: | |
UP = 0 | |
RIGHT = 1 |
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
Основная идея - CLI(Command Line Interface) приложение для эмуляции работы банковской среды. Основные функции после запуска приложения: | |
1. Авторизация/регистрация по связке username/password. Также login/logout по связке клавиш. | |
2 Перевод денег по идентификатору пользователя, выгрузка/загрукза своих денег (берутся из ниоткуда, выходят в никуда) | |
3. Возможность получения всей своей истории переводов в cli/csv формате. | |
Потом можно добавить настоящую БД. | |
Типичный пример использования после старта приложения ниже |
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 Codec { | |
public static class TreeNode { | |
int val; | |
TreeNode left; | |
TreeNode right; | |
TreeNode(int x) { val = x; } | |
} | |
// Encodes a tree to a single string. | |
public String serialize(TreeNode root) { |
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
PROGRAM program_name; | |
Function fac(n: integer;): Integer; | |
VAR | |
n: Integer; | |
BEGIN | |
IF n = 1 THEN fac = 1 ELSE fac = n * fac(n - 1); | |
END; | |
BEGIN |
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
PROGRAM program_name; | |
CONST | |
e = 2.7182818; | |
a = 2 * 3; | |
VAR | |
a,b: Integer; | |
c: String; |
NewerOlder