Skip to content

Instantly share code, notes, and snippets.

@shelaf
shelaf / gist:74071df2bf96a51275b9befd7c6b0647
Last active June 12, 2017 12:27
WPFによるドロップダウンボタン実装試作
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
namespace WpfApplication1
{
/// <summary>
/// ドロップ ダウン メニューを表示する為のボタン コントロール クラスです。
@shelaf
shelaf / reflection test
Last active June 12, 2017 12:28
Javaでオーバーライドされた元のメソッドを呼ぶ
Class clazz = Application.class;
Method method = clazz.getDeclaredMethod("validate", String.class);
method.setAccessible(true);
method.invoke(null, "1w");
Field field = clazz.getSuperclass().getDeclaredField("validation");
field.setAccessible(true);
Validation v = (Validation) field.get(null);
assertEquals(1, v.errorsMap().size());
@shelaf
shelaf / gist:91eaa7bd20c6905f45fca70a7901a88e
Last active June 12, 2017 12:37
jQueryUIで複数ボタンのダイアログ実装試作
export module MyDialog {
export interface Button {
text: string,
method(): void
}
export function confirm(title: string, buttons: Button[]): void {
let button_set: any = {};
for (let button of buttons) {
@shelaf
shelaf / Happy-Hacking-Keyboard-Professional-JP-_JANSI_.kbd.json
Last active June 18, 2017 05:00
Happy Hacking Keyboard Professional JP (JANSI)
[
{
"name": "Happy Hacking Keyboard Professional JP (JANSI)"
},
[
{
"y": 0.3,
"c": "#a2a8b8",
"a": 6,
"f": 4
@shelaf
shelaf / Happy-Hacking-Keyboard-Professional-JP.kbd.json
Last active December 29, 2016 11:35
Happy Hacking Keyboard Professional JP
[
{
"name": "Happy Hacking Keyboard Professional JP"
},
[
{
"y": 0.3,
"c": "#a2a8b8",
"a": 6,
"f": 4
@shelaf
shelaf / Happy-Hacking-Keyboard-Professional_Professional2.kbd.json
Last active December 29, 2016 11:33
Happy Hacking Keyboard Professional/Professional2
[
{
"backcolor": "#ffffff",
"name": "Happy Hacking Keyboard Professional/Professional2"
},
[
{
"y": 0.3,
"c": "#a2a8b8",
"a": 6,