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
| #!/usr/local/bin/ruby | |
| # -*- coding: cp932 -*- | |
| require 'win32ole' | |
| require 'delegate' | |
| require 'singleton' | |
| require 'util' | |
| module VISIO | |
| module VisioConsts |
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
| # -*- coding: cp932 -*- | |
| # Graphics Layer for JWCAD | |
| require 'util' | |
| require 'singleton' | |
| module JWCAD | |
| class JwCadDevice | |
| JwcTempDir = "g:/KD/program/jww" | |
| JwcZahyoDir = "c:/tmp" | |
| JwcTempName = "foo.txt" |
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
| ((0123456789)_?)* | |
| user system total real | |
| oni 4.898000 0.032000 4.930000 ( 5.840000) | |
| ren 17.706000 0.109000 17.815000 ( 25.846000) | |
| re0 1.311000 0.000000 1.311000 ( 1.359000) | |
| re1 0.889000 0.000000 0.889000 ( 1.237000) | |
| re2 0.733000 0.000000 0.733000 ( 1.341000) | |
| re3 0.640000 0.000000 0.640000 ( 1.110000) | |
| (a?){512}a{512} | |
| user system total real |
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
| unsigned int gcd(unsigned int u, unsigned int v) | |
| { | |
| // simple cases (termination) | |
| if (u == v) | |
| return u; | |
| if (u == 0) | |
| return v; | |
| if (v == 0) | |
| return u; | |
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
| unsigned int gcd(unsigned int u, unsigned int v) | |
| { | |
| // simple cases (termination) | |
| if (u == v) | |
| return u; | |
| if (u == 0) | |
| return v; | |
| if (v == 0) | |
| return u; | |
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
| unsigned int gcd(unsigned int u, unsigned int v) | |
| { | |
| // simple cases (termination) | |
| if (u == v) | |
| return u; | |
| if (u == 0) | |
| return v; | |
| if (v == 0) | |
| return u; | |
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
| unsigned int gcd(unsigned int u, unsigned int v) | |
| { | |
| // simple cases (termination) | |
| if (u == v) | |
| return u; | |
| if (u == 0) | |
| return v; | |
| if (v == 0) | |
| return u; | |
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
| #from http://www.bagley.org/~doug/shootout/bench/lists/lists.ruby | |
| 1 426866388 NUM = 300 | |
| 1 1026 SIZE = 10000 | |
| 1 331 def test_lists() | |
| # create a list of integers (Li1) from 1 to SIZE | |
| 600 307773 li1 = (1..SIZE).to_a | |
| # copy the list to li2 (not by individual items) | |
| 300 270204 li2 = li1.dup |
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
| # The Computer Language Benchmarks Game | |
| # http://shootout.alioth.debian.org/ | |
| # | |
| # contributed by Karl von Laudermann | |
| # modified by Jeremy Echols | |
| 1 353732212 size = 600 # ARGV[0].to_i | |
| 1 738 puts "P4\n#{size} #{size}" | |
| 1 10125467 ITER = 49 # Iterations - 1 for easy for..in looping |
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
| #!/usr/bin/ruby | |
| # -*- mode: ruby -*- | |
| # $Id: matrix-ruby.code,v 1.4 2004/11/13 07:42:14 bfulgham Exp $ | |
| # http://www.bagley.org/~doug/shootout/ | |
| 1 20 n = 60 #Integer(ARGV.shift || 1) | |
| 1 7 size = 40 | |
| 3 7 def mkmatrix(rows, cols) |