This file contains 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
javascript:jQuery('span.headerStatus').each(function(){var%20e=jQuery(this);e.append(jQuery('<a>').attr('href',e.attr('id').replace(/^Row.*_/,'javascript:Fion.deleteItem("deleteItem_')+'");').text('%C3%97'))});void(0) |
This file contains 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
class Tree | |
attr_accessor :children, :node_name | |
def initialize(tree) | |
@node_name = tree.keys.first | |
@children = [] | |
tree.values.first.each do |name, children| | |
@children << Tree.new({name => children}) | |
end | |
end |
This file contains 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
Io localAccesses := 15.28 | |
Io localSets := 7.48 | |
Io slotAccesses := 7.14 | |
Io slotSets := 3.62 | |
Io blockActivations := 0.47 | |
Io instantiations := 0.89 | |
Io cfuncActivations := 13.01 |
This file contains 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 static UUID fromByteArray(byte[] ary) { | |
if (ary.length < 16) | |
throw new IllegalArgumentException("array length must be >= 16"); | |
long msb = 0; | |
long lsb = 0; | |
for (int i=0; i<8; i++) | |
msb = (msb << 8) | (ary[i] & 0xff); | |
for (int i=8; i<16; i++) | |
lsb = (lsb << 8) | (ary[i] & 0xff); | |
return new UUID(msb, lsb); |
This file contains 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
require 'nkf' | |
# UTF-8とCP932がソースツリーに混在して頭がおかしくなりそうだったのでやっつけスクリプト書いた | |
# あとでまた使うかもしれないからgistにメモしておく | |
def mkdir_p(path, mode = 0700) | |
return if Dir.exist?(path) | |
parent = File.dirname(path) | |
mkdir_p(parent, mode) unless Dir.exist?(parent) | |
Dir.mkdir(path, mode) |
This file contains 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 groovy.swing.SwingBuilder | |
import javax.swing.SwingUtilities | |
def testEDT() { | |
new SwingBuilder().frame() { | |
if (SwingUtilities.isEventDispatchThread()) | |
println("I'm in EDT!") | |
else | |
println("I'm NOT in EDT!") | |
} |
This file contains 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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; Emacs設定ファイル | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; 起動後は untitled という名前のバッファを開く | |
(setq initial-scratch-buffer nil) | |
(setq initial-buffer-choice (switch-to-buffer "untitled")) | |
;; パッケージシステムの設定 | |
(require 'package) |
This file contains 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
cat `find . -name "*.java" -print` | sed -e '/¥/¥*/,/¥*¥//d' -e '/^[[:blank:]]*¥/¥/.*$/d' -e '/^[^[:graph:]]*$/d' | wc -l |
This file contains 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
use strict; | |
use warnings; | |
use Plack::Builder; | |
use Plack::App::Proxy; | |
builder { | |
enable 'Proxy::AddVia'; | |
enable sub { | |
my $app = shift; | |
return sub { |