Skip to content

Instantly share code, notes, and snippets.

package com.github.tauty.rufa.rules;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@tauty
tauty / gist:9181486
Created February 24, 2014 03:28
newInstance even if the class object specified represent of anonymous class.
package com.github.tauty.rufa;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
public class Util {
public static <T> T newInstance(Class<T> clazz) {
try {
return generate(getConstructor(clazz));
package com.github.tauty.study.quiz;
import java.util.Arrays;
/**
* Created by tetsuo.uchiumi on 12/17/14.
*/
public class LightSwitchingPuzzle {
public static void main(String[] args) {
package tetz42.util;
import static tetz42.util.ObjDumper4j.*;
import java.util.HashMap;
public class Investigation_HashMapBehaviour {
/**
* @param args
*/
#
# Copyright 2015 tetsuo.ohta[at]gmail.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@tauty
tauty / WrapperBuilder
Created June 19, 2015 03:24
Build a template of wrapper
/*
* Copyright 2014 - 2015 tetsuo.ohta[at]gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@tauty
tauty / gist:90f3039847ccb1f104de
Last active December 14, 2015 07:38
Perl to Java sample code
#
# perl part start
#
use strict;
use warnings;
use IPC::Open2;
my $cmd = "java InteractiveSample";
# コマンドを入出力モードで起動する
@tauty
tauty / build.gradle
Created April 14, 2017 10:01
The build script which allows you to develop lombok extension easily.
// This is based on a question of StackOverflow below:
// http://stackoverflow.com/questions/35550460/writing-custom-lombok-annotation-handlers
group 'com.github.tauty'
version '1.0-SNAPSHOT'
apply plugin: 'java'
sourceCompatibility = 1.8
repositories {
/*
* Copyright 2022 tetsuo.ohta[at]gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software