Skip to content

Instantly share code, notes, and snippets.

Index: lib/irb/completion.rb
===================================================================
--- lib/irb/completion.rb (revision 38221)
+++ lib/irb/completion.rb (working copy)
@@ -152,9 +152,10 @@
gv = eval("global_variables", bind).collect{|m| m.to_s}
lv = eval("local_variables", bind).collect{|m| m.to_s}
+ iv = eval("instance_variables", bind).collect{|m| m.to_s}
cv = eval("self.class.constants", bind).collect{|m| m.to_s}
# -*- coding: utf-8 -*-
r=:ok
e=Class.new(Exception)
th_s = Thread.current
begin
th = Thread.start{
Thread.async_interrupt_timing(Object => :on_blocking){
begin
Thread.current.raise RuntimeError
sleep
Index: thread.c
===================================================================
--- thread.c (revision 38172)
+++ thread.c (working copy)
@@ -4337,6 +4337,19 @@
return Qnil;
}
+static VALUE
+rb_mutex_lock_sure(VALUE self)
@tarui
tarui / README
Created September 12, 2011 10:55
DevQuiz のSlidingPuzzleを解くためのC++コードです。
(C++といいつつclassでカプセル化と途中での宣言を使っている意外はCですが)
あらかじめproblems.txtを用意し、更にresultsフォルダを作っておく必要あり。
途中で止めて再開出来る機能もあり。
二重ループの値それぞれと、その時に出来てるresultsのNoを指定
(多分コードを読まないと何のことだか分からないだろうけど
アルゴリズムはIDDFSにマンハッタン距離による枝狩りと言う事になるんでしょうか?