This file contains hidden or 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
$ ~/opt/bin/erlc tak.erl | |
$ ~/opt/bin/erl -noshell -s tak bm -s init stop | |
1.277981 | |
1.243637 | |
1.241756 | |
1.239656 | |
1.239023 | |
$ ~/opt/bin/erlc +native tak.erl |
This file contains hidden or 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 "win32ole" | |
sleep 5 | |
ai = WIN32OLE.new("AutoItX3.Control") | |
ai.Send("{ENTER}") | |
This file contains hidden or 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
*.rbc | |
*.pyc |
This file contains hidden or 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
$ time ruby1.8.6 pidigits.rb 10000 | |
real 0m33.041s | |
user 0m30.546s | |
sys 0m2.076s | |
$ time jruby --server pidigits.rb 10000 > /dev/null | |
real 1m25.524s | |
user 1m23.693s |
This file contains hidden or 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
# vim: ft=ruby | |
# This file is execute by IRB - Iteractive Ruby | |
# author: Radosław Bułat | |
begin | |
# CORE (should work for all ruby implementation and platforms) | |
require "rbconfig" | |
# FEATURE: Color output support | |
module StringColors |
This file contains hidden or 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
diff --git a/ext/ruby_fann/fann_augment.h b/ext/ruby_fann/fann_augment.h | |
index a51be4c..2c977c5 100644 | |
--- a/ext/ruby_fann/fann_augment.h | |
+++ b/ext/ruby_fann/fann_augment.h | |
@@ -19,9 +19,9 @@ FANN_EXTERNAL struct fann_train_data * FANN_API fann_create_train_from_rb_ary( | |
unsigned int i, j; | |
fann_type *data_input, *data_output; | |
struct fann_train_data *data = (struct fann_train_data *)malloc(sizeof(struct fann_train_data)); | |
- unsigned int num_input = RARRAY(RARRAY(inputs)->ptr[0])->len; | |
- unsigned int num_output =RARRAY(RARRAY(outputs)->ptr[0])->len; |
This file contains hidden or 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 "mkmf" | |
create_makefile("null") |
This file contains hidden or 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
def check() = true | |
def check2() : Boolean = return true | |
def check3() = return true // why it can't work? |
This file contains hidden or 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
begin | |
#raise | |
#raise Timeout::Error.new('fuckme') | |
raise ScriptError | |
rescue Timeout::Error,RuntimeError,ScriptError => e | |
puts "OK" | |
end |
This file contains hidden or 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
// How to force IE to invoke "onchange" event after changing radio or checkbox inputs (jQuery example) | |
$(function () { | |
if ($.browser.msie) { | |
$("input:radio, input:checkbox").click(function () { | |
this.blur(); | |
this.focus(); | |
}); | |
} | |
}); |
OlderNewer