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
grep --color='auto' -P -n "[\x80-\xFF]" <file> |
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
# Usage: | |
# ruby zlib_deflate_tests.rb < input_file | |
# | |
# Robert Haines | |
require 'zlib' | |
puts "Tests for Ruby Zlib\n-------------------\n\n" | |
comp = [ |
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 bingo(max) | |
seen = [] | |
while(seen.size < max) | |
r = Random.rand(1..max) | |
next if seen.include?(r) | |
seen << r | |
end |