Skip to content

Instantly share code, notes, and snippets.

View Manjago's full-sized avatar

Kirill Temnenkov Manjago

View GitHub Profile
(+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[])[([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]]+([]+([]+[])[([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]]+([]+[][+!+[]])[+!+[]]+([]+![])[+!+[]+!+[]+!+[]]+([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+!![])[+!+[]]+([]+!![])[+!+[]+!+[]]+([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]]+([]+!![])[+!+[]]])[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+!![])[+!+[]]+([]+[][+[]])[+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+[][+!+[]])[+!+[]]+([]+([]+[])[([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]]+([]+[][+!+[]])[+!+[]]+([]+![])[+!+[]+!+[]+!+[]]+([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+!![])[+!+[]]+([]+!![])[+!+[]+!+[]]+([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]]+([]+!![])[+!+[]]])[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]](+!+[]+
@Manjago
Manjago / EasyTest.java
Created April 21, 2014 11:32
тест
import org.junit.Assert;
import org.junit.Test;
public class EasyTest {
@Test
public void test4() throws Exception {
Easy4 e = new Easy4();
e.init("4");
Assert.assertEquals("4", e.getResult());
}
package srobot;
import com.sun.jna.platform.win32.User32;
import com.sun.jna.platform.win32.WinDef;
import com.sun.jna.platform.win32.WinDef.HWND;
public class IsRunning {
public static void main(String[] args) {
HWND hwnd = User32.INSTANCE.FindWindow
(null, "Сапер");
package srobot;
import com.sun.jna.platform.win32.User32;
import com.sun.jna.platform.win32.WinDef.HWND;
public class IsRunning {
public static void main(String[] args) {
HWND hwnd = User32.INSTANCE.FindWindow
(null, "Сапер");
if (hwnd == null) {
new ScheduledThreadPoolExecutor(1).scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
// smth
}
},
initialDelay, MILLISEC_IN_DAY, TimeUnit.MILLISECONDS);
@Manjago
Manjago / String.java
Created December 30, 2013 13:29
equals
/**
* Compares this string to the specified object. The result is {@code
* true} if and only if the argument is not {@code null} and is a {@code
* String} object that represents the same sequence of characters as this
* object.
*
* @param anObject
* The object to compare this {@code String} against
*
* @return {@code true} if the given object represents a {@code String}
@Manjago
Manjago / TestOk.java
Created December 25, 2013 11:59
Success
import org.h2.jdbcx.JdbcConnectionPool;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Types;
public class TestOk {
public static void main(String[] args) throws SQLException {
JdbcConnectionPool cp = JdbcConnectionPool.create(
@Manjago
Manjago / TestFailOutput.txt
Created December 25, 2013 11:58
TestFail output
Exception in thread "main" org.h2.jdbc.JdbcSQLException: Параметр "#1" не установлен
Parameter "#1" is not set; SQL statement:
? = call IDENTITY() [90012-174]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
at org.h2.message.DbException.get(DbException.java:172)
at org.h2.message.DbException.get(DbException.java:149)
at org.h2.expression.Parameter.checkSet(Parameter.java:80)
at org.h2.command.Prepared.checkParameters(Prepared.java:163)
at org.h2.command.CommandContainer.query(CommandContainer.java:90)
at org.h2.command.Command.executeQuery(Command.java:196)
@Manjago
Manjago / TestFail.java
Created December 25, 2013 11:56
Test fail
import org.h2.jdbcx.JdbcConnectionPool;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Types;
public class TestFail {
public static void main(String[] args) throws SQLException {
JdbcConnectionPool cp = JdbcConnectionPool.create(
@Manjago
Manjago / Main.java
Created December 3, 2013 10:20
load plugins
for (String module : modules) {
{
int idx = module.indexOf(':');
if (idx < 0) {
logger.l2("Skipping config string " + module);
continue;
}
String className = module.substring(0, idx);
String config = module.substring(idx + 1);
try {