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
org/jruby/RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.gen:-1:in `call': IO error -- active_support/core_ext/string/xchar (LoadError) | |
from DynamicMethod.java:152:in `call' | |
from AliasMethod.java:64:in `call' | |
from CachingCallSite.java:273:in `cacheAndCall' | |
from CachingCallSite.java:112:in `call' | |
from custom_require.rb:36:in `rescue_line_31_3' | |
from custom_require.rb:31:in `rescue_1$RUBY$__rescue___2' | |
from custom_require.rb:-1:in `method__1$RUBY$require' | |
from custom_require#require:-1:in `call' |
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
../bin/jruby --fast ../bin/merb -I test_merb.rb | |
Error, could not compile; pass -d or -J-Djruby.jit.logging.verbose=true for more details | |
Error, could not compile; pass -J-Djruby.jit.logging.verbose=true for more details | |
Error, could not compile; pass -d or -J-Djruby.jit.logging.verbose=true for more details | |
Error, could not compile; pass -J-Djruby.jit.logging.verbose=true for more details | |
org/jruby/RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.gen:-1:in `call': IO error -- erubis/converter (LoadError) | |
from DynamicMethod.java:152:in `call' | |
from AliasMethod.java:64:in `call' | |
from CachingCallSite.java:273:in `cacheAndCall' | |
from CachingCallSite.java:112:in `call' |
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
(defun tak (x y z) | |
(if (>= y x) | |
z | |
(tak (tak (1- x) y z) | |
(tak (1- y) z x) | |
(tak (1- z) x y)))) | |
(defun call_tak () | |
(dotimes (i 10) (tak 24 16 8))) | |
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
# New utility method to return ancestors and siblings and children | |
def ancestors_siblings_children | |
query = "#{scope_condition} AND (#{self[left_col_name]} BETWEEN #{left_col_name} AND #{right_col_name}) OR #{parent_col_name} = #{self.id} OR id = #{self.id}" | |
unless self[parent_col_name].nil? | |
query << " OR #{parent_col_name} = #{self[parent_col_name]}" | |
end | |
base_set_class.find(:all, :conditions => query, :order => left_col_name ) | |
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
has_and_belongs_to_many :brand_product_ranges, :class_name => 'ProductRange', :finder_sql => 'SELECT product_ranges.* FROM product_ranges INNER JOIN categories_product_ranges ON product_ranges.id = categories_product_ranges.product_range_id INNER JOIN products ON product_ranges.id = products.product_range_id AND products.show_on_brand_site = "1" WHERE (categories_product_ranges.category_id = #{self.id} ) GROUP BY product_ranges.id ORDER BY position' |
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
<hosiawak> mam 2 hashe: [11:10] | |
<hosiawak> {"N/A"=>8, "France"=>8, "United Kingdom"=>19, "Germany"=>7, | |
"Poland"=>8}> | |
<hosiawak> {"N/A"=>1}> [11:11] | |
<hosiawak> jak zmergować te hashe dodając do siebie wartości kluczy ? | |
<hosiawak> czyli chcę uzyskać {"N/A"=>9, "France"=>8, "United Kingdom"=>19, | |
"Germany"=>7, "Poland"=>8}> [11:12] | |
<hosiawak> ? (btw. szkoda ze Hash#merge nie bierze bloku, przydalby sie tutaj) |
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
r = {} | |
(h1.keys | h2.keys).each {|k| r[k] = h1[k].to_i + h2[k].to_i} |
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
irb(main):030:0> src | |
=> "\n\t \t\nta\t\nsk: dupa\n\tdupa2" | |
irb(main):031:0> src.gsub(/[\n\t ]*(\w+)[\n\t]*(\w+): (\w+)([\n\t])+(\w+)/, '\1\2: \3\4\5') | |
=> "task: dupa\tdupa2" | |
irb(main):032: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
make `./build-support/factor.sh make-target` | |
make factor factor-ffi-test macosx.app CONFIG=vm/Config.macosx.x86.64 | |
g++ -c -Wall -O3 -fomit-frame-pointer -fPIC -DFACTOR_64 -m64 -o vm/os-unix.o vm/os-unix.cpp | |
vm/os-unix.cpp: In function ‘factor::stack_frame* factor::uap_stack_pointer(void*)’: | |
vm/os-unix.cpp:110: error: ‘struct mcontext’ has no member named ‘__ss’ | |
vm/os-unix.cpp: In function ‘void factor::memory_signal_handler(int, siginfo_t*, void*)’: | |
vm/os-unix.cpp:125: error: ‘struct mcontext’ has no member named ‘__ss’ | |
vm/os-unix.cpp: In function ‘void factor::misc_signal_handler(int, siginfo_t*, void*)’: | |
vm/os-unix.cpp:132: error: ‘struct mcontext’ has no member named ‘__ss’ | |
make[2]: *** [vm/os-unix.o] Error 1 |
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
scala> val src = "\n\t \t\nta\t\nsk: dupa\n\tdupa2" | |
src: java.lang.String = | |
ta | |
sk: dupa | |
dupa2 | |
scala> src.replaceAll("""[\n\t ]*(\w+)[\n\t]*(\w+): (\w+)([\n\t])+(\w+)""", """$1$2: $3$4$5""") | |
res1: java.lang.String = task: dupa dupa2 |
OlderNewer