Playhouse 2 Clean 1 TurnCatnip Alley 4 TurnPaper scratcher to be recycled in the kitchen Spray liquid at Catnip Alley moved to a back hallway Robin left early 11:00 am
Not so busy - 2 hr work
Clean 3, Double turn 3, Turn 1Double turn - (Spray + Wipe)*2PA - Playhouse Assistant
Playhouse AssistantAdel - arabic nameRobin8 Clean - 4 Turn
Lay Coleman 503-644-7414: Someday next week
Manny - Care GiverRobinClean 4 + Turn 0
悪因悪果 阿諛便佞 暗愚魯鈍 唯唯諾諾 陰鷙鉗伏 内股膏薬 玩人喪徳 偽詐術策 魚遊釜中 拱手傍観 曲学阿世 軽慮浅謀 傲岸不遜 厚顔無恥 高視闊歩 刻舟求剣 時代錯誤 前倨後恭 漱石枕流 朝真暮偽 田夫野人 俛首帖耳 皮相浅薄 百依百順 腹心内爛 旁若無人 無為…
CAT: 1st day at work Robin & Adel Check-in, Kitten Playpen (Catnip Alley) Food & water trays Change latex gloves for every cage Stool # - urine Y/N Litter, clay or paper Clean 4 + Turn 4 Viva Village: 1st letter Jean Corn, cc: Kathy Brown …
CAT: Interview 11am-12am Nancy Puro: Volunteer Manager, nancyp@catadoptionteam.org Teri Weisennberger, Outreach Assistant, teriw@catadoptionteam.org
All Configurations (Debug/Release) C/C++ > Command line > Additional options > /D BOOST_ALL_DYN_LIB C/C++ > General > Additional Include Direcotries: $(BOOST_ROOT) C/C++ > Precompile Header > Not Using Precompile Headers C/C++ > Code Gener…
Code Golf in Dec 2007 _=Array.new(11,0) $<.map{|$_|r=0 (0..9).map{|i|v=$_[3*i..3*i+1].to_i;_[i]+=v;r+=v} _[10]=r if r>_[10]} p _.max size: 116 entry date: 12/24/2007
matlab (and octave) has histogram and 2D data indexing: data = [1, 2, 3, 4; 2, 4, 6, 8; 3, 6, 9, 12; 5, 10, 15, 20]; dmin = min(data(:)) dmax = max(data(:)) his = hist(data(:), (dmin:dmax)); num = sum(his) mean = sum(his .* dmin:dmax) / nu…
In C, "strtok" destructively change a string into a series of strings: char str[] = "begin space tab\t\tcarrige-return\ncomma, period. end"; char delim[] = " \t\n,."; for (char* p = strtok(str,delim); p && printf("%s\n", p); p = strtok(0, …
RGL provides easy manipulation of graph: require 'rgl/adjacency' g = RGL::DirectedAdjacencyGraph.new IO.foreach(ARGV.shift) {|line| if line =~ /\s*([^\"]+)[\"\s]*->[\"\s]*([^\"\[\;]+)/ g.add_edge $1, $2 end } p "vertices: #{g.num_vertices}…
The visualization tool "dot" turns file dependency in a diagram. Given root file(s) , a ruby script below visits dependency files to put directed edges in a "dot" form: out = Array.new while path = ARGV.shift File::open(path) {|file| while…
My old Windows Me does not like the installed "irb.bat" script. Work around is to copy it to "irb" and edit to remove several top and bottom lines as below: 1,4d0 < @echo off < goto endofruby < #!/bin/ruby < # 24,26d19 < __END__ < :endofru…
Size: 262 (v4) submitted on 4/14/2007 def f(d)(0..2).find{|i|$a[i]&&$a[i][d.to_s]}end def m d,i,j k=(0..2).find{|k|k!=i&&k!=j} m(d-1,i,k)if d>1 puts"#{d} to #{"ABC"[j,1]}" m(d-1,k,j)if d>1 end $a=[];n=0 ($a<
[1] Launch a Rinda TupleSpace require 'rinda/tuplespace' DRb.start_service 'druby://:12345', Rinda::TupleSpace.new p DRb.uri DRb.thread.join Output provides URI of which machine/port the TupleSpace communicates with.[2] Start a server - in…
GLAT Question 17: "Consider a function which, for a given whole number n, returns the number of ones required when writing out all numbers between 0 and n. For example, f(13)=6. Notice that f(1)=1. What is the next largest n such that f(n)…
NPR Weekend Edition Sunday, April 1, 2007 Puzzle master Will Shortz quizzes:Take the names of two U.S. States, mix them all together, then rearrange the letters to form the names of two other U.S. States. What states are these? A Ruby solu…
Original: tklifegame.rb in "O-O Script Language Ruby," by Matz, ASCII 1999 Modifications to run on ruby 1.8: [1] hash clean up (ruby 1.8), "hash[key] = nil" --> "hash.delete key" [2] reduced screen size, 480x480 (tile size 6) --> 400x400 (…
Function zeros do not necessarily fall on the discretely desirable points. For example, the Colinear checking function shows a pattern of zeros in yellow, positives in red, and negatives in blue. require 'tk' root = TkRoot.new $canvas = Tk…
# "Spatial Tessellations: Concepts and Applications of Voronoi Diagrams," 2nd Ed. # A. Okabe, B. Boots, K, Sugihara, S.N. Chiu, Wiley 2000 # p.245 Algorithm 4.3.1, Ch4 Algorithms for Computing Voronoi Diagram # Given randomly generated 2D …
Euler's phi function: number of coprimes of an integer m phi(m) = m*Prod(1-1/p) [where p: prime number and p|m] def phi(m) r = (2..m) primes = r.inject(r){|p, i| p.select{|n| n==i || n%i!=0}} primes.inject(m){|e, p| e%p==0 ? e/p*(p-1) : e}…
Thanks to 記号ゴルファーΩ, code I posted on Musical Score reduces its size to 234: _='' $<.map{|$_|_<<chomp} k=a.size/12 (0...k).map{|i|$_=' '*12 (0..11).map{|j|$_[j]=_[k*j+i]} ($-=(~/\|/);$><<"FEDCBAGFE"[$_.index('o')-3,1])if i%4==0 $><<(~/\\{3}/?"/32":~/\\{2}/?"/16":~/\\{1}/?"/8":$-?"/4":'')+' 'if i%4==1…</chomp}>
Code Golf http://codegolf.com/musical-score a='' a=a+chomp while gets k=a.size/12 b=' '*12*k for i in 0...k for j in 0...12 b[12*i+j]=a[k*j+i] end $_=b[12*i...12*(i+1)] if i%4==0 print " FEDCBAGFE"[$_.index('o'),1] f=(~/\|/) end if i%4==1 …
A Carmichael number is an odd composite number n which satisfies Fermat's little theorem a^(n-1)-1=0 (mod n) for every choice of a satisfying (a,n)==1 (i.e., a and n are relatively prime) with 1 r = (2..101) primes = r.inject(r){|p, i| p.s…
about 500 lines of tk codes for Bisector CRUD #!/usr/bin/env ruby require 'tk' PntRad = 3 # Point radius of TkcOval ScrHgt = 600 # Screen Hight class Geom Infinity = 10*ScrHgt @@canvas = Hash.new attr_accessor :g def initialize @g = nil en…
class Array def power inject([[]]){|ps, e| ps + ps.map{|s| s + [e]}} end end p [1,2,3].power [[], [1], [2], [1, 2], [3], [1, 3], [2, 3], [1, 2, 3]]
Given a 8 by 8 grid and a robot that moves from the left bottom corner (0, 0) to the right top corner (7, 7) by stepping either right (East) or upward (North) in total 14 steps, find all possible paths.A sample solution: def C(i, j) if i =…