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
def testo(&block) | |
min_time = nil | |
total_time = 0 | |
1000.times do | |
break if total_time > 10 | |
ti1 = Time.now | |
res = block.call | |
ti2 = Time.now | |
if res == -1 | |
min_time = -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
class SearchByDocType | |
constructor: () -> | |
doc_type_select_listener() | |
doc_type_select_listener = () -> | |
def = new SearchByDocType.Default | |
first_type = new SearchByDocType.FirstType | |
second_type = new SearchByDocType.SecondType | |
if $('#document_type').length > 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
#!/usr/bin/ruby | |
# wol.rb: sends out a magic packet to wake up your PC | |
# | |
# Copyright (c) 2004 zunda <zunda at freeshell.org> | |
# | |
# This program is free software. You can re-distribute and/or | |
# modify this program under the same terms of ruby itself --- | |
# Ruby Distribution License or GNU General Public License. | |
# |