UserPreferences

KazuoMoriwaka/Journal/2003-06


EditKazuoMoriwaka/Journal/2003-06-02

Weather: fine!

Foods

Links

Words

BekiNet and DebianCult

They are appeared at some diaries and a wiki.

Page view was improved, but only a few person edit them.

Books

EditKazuoMoriwaka/Journal/2003-06-04

Weather: fine

Foods

Links

Words

EditKazuoMoriwaka/Journal/2003-06-05

Weather: fine

Foods

Links

Words

VA Linux

I visited VA Linux for job hanting. They have interesting plan to develop..

Used-book stores

Kanda-cho has many U-book stores, I browse many books and stores. It's very fan. I get トランプものがたり by Michihiro Matsuda.

BSD

I heard 'BSD' in TV, but it was not that. The word BSD means 'BS Digital' for them.

EditKazuoMoriwaka/Journal/2003-06-06

Weather: fine

Foods

Links

Words

EditKazuoMoriwaka/Journal/2003-06-07

Weather: fine

Foods

Links

Words

The Goal 2 I bought and read ザ・ゴール2. It was 800 yen at BookOff.

Thinking Process contains some processes to describe what I think for resolving problems. This is interesting.. and good programmer should be able to analyse problems.

EditKazuoMoriwaka/Journal/2003-06-09

Weather: cloudiness

Foods

Links

Words

TOEIC

I enter TOEIC test.

EditKazuoMoriwaka/Journal/2003-06-10

Weather: fine

Foods

Links

Words

Books

Google and TrackBack

TrackBack system and/or Referer listup system of Weblogs and Nikki Systems may be confuse Google PageRank system. They generate links to referer pages automatically. And these links may increase useless pages' PageRank. I wonder cheating for google search result.

xdkcal

I installed XdkCal. It has some troubles caused by timing of initialize its pixmap, but it has enough worth to use it.

Alpha blending support such as Mac OS X will help this kind of applications.


2003-06-18 01:36:47 -- ::ffff:218.226.215.92


2003-06-18 01:58:28 -- KazuoMoriwaka

日本人にありがちな間違いそのマンマです(;_;)ていうか頭の中でいまだにrとlがごっちゃなの(;-;)

EditKazuoMoriwaka/Journal/2003-06-11

Weather: cloudiness

Foods

Links

Words

pseudo papa

I became official(?) pseudo papa for Haruho-chan.

I want to hug her frequently. But Nara is too far ;-(

Now she learn some demeanor and say "ahh" or "uhh". How cute!

EditKazuoMoriwaka/Journal/2003-06-12

Weather: cloudishness

Foods

Links

Words

EditKazuoMoriwaka/Journal/2003-06-13

Weather: fine

Foods

Links

Words

EditKazuoMoriwaka/Journal/2003-06-17

Weather: cloudish

Foods

Links

Words

Where to go?

TokyoHouse

EditKazuoMoriwaka/Journal/2003-06-18

Weather: rain

Foods

Links

Words

EditKazuoMoriwaka/Journal/2003-06-19

Weather: rain and wind

Foods

Links

Words

EditKazuoMoriwaka/Journal/2003-06-20

Weather: fine

Foods

Links

Words

AregeCheck

EditKazuoMoriwaka/Journal/2003-06-22

Weather: rain

Foods

Links

Words

原付

I bought a book to get a ricense of bicycle with small motor.

EditKazuoMoriwaka/Journal/2003-06-23

Weather: rain

Foods

Links

Words

Theme

I use tDiary theme "なんとなくサバンナ" as default theme. http://www.tdiary.org/theme/savanna/README

I remove 'form text area' height limit.

Research

I feel like I progress my research for daily report... X(

Feelings

My feelings go to bad and hopeless.... It maybe indicate my drug doesn't work. I should talk with my doctor.

EditKazuoMoriwaka/Journal/2003-06-24

Weather: cloudiness

Foods

Links

Words

unzip http://tabesugi.net/memo/cur/cur.html#232136

How about it?

  1 
  2 
  3 
>>> a = zip("hoge", "huga")
>>> [map(lambda x: x[i], a) for i in xrange(len(a[0]))]
[['h', 'o', 'g', 'e'], ['h', 'u', 'g', 'a']]

This code does not look like Python, but work.

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/67671

  1 
  2 
  3 
  4 
  5 
  6 
  7 
  8 
  9 
 10 
 11 
 12 
 13 
 14 
 15 
 16 
 17 
 18 
 19 
 20 
def unzip(p, n):
    """Split a list-like object, 'p', into 'n' sub-lists by taking
    the next unused element of the main list and adding it to the
    next sub-list. A list of tuples (the sub-lists) is returned.
    Each of the sub-lists is of the same length; if p%n != 0, the
    shorter sub-lists are padded with 'None'.
        Example:
        >>> unzip(['a','b','c','d','e'], 3)
        [('a', 'd'), ('b', 'e'), ('c', None)]
    """
    (mlen, lft) = divmod(len(p),n)          # find length of longest sub-list
    if lft != 0: mlen += 1

    lst = [[None]*mlen for i in range(n)]   # initialize list of lists 

    for i in range(len(p)):
        (j, k) = divmod(i, n)
        lst[k][j] = p[i]

    return map(tuple, lst)

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/103702

  1 
  2 
  3 
  4 
  5 
  6 
  7 
  8 
  9 
 10 
 11 
 12 
 13 
def unzip(args):
    """
    inverse of zip. Given: ((1,"a"),(2,"b")) --> ((1,2),("a","b"))

    seq == unzip(zip(seq)) if seq is a rectangular matrix (all of its row has the same length.
    """
    result = []
    n = min(map(len,args))
    for i in range(n):result.append([])
    for i in range(len(args)):
        for j in range(n):
            result[j].append(args[i][j])
    return tuple(result)

Books


2003-06-26 02:19:38 -- KazuoMoriwaka

unzip code can be written as following

def unzip(z):
  return zip(*z)

EditKazuoMoriwaka/Journal/2003-06-25

Weather: cloudiness

Foods

Links

Words

Municipal tax

I paid municipal tax of last year. I went to a bank to draw my money to pay it. But threre are many ATMs at council...

EditKazuoMoriwaka/Journal/2003-06-28

Weather:

Foods

Links

Words

4-num to 10 from http://www.loveruby.net/~aamine/ja/tdiary/20030627.html#p03

I tryed it by python.

  1 
  2 
  3 
  4 
  5 
  6 
  7 
  8 
  9 
 10 
 11 
 12 
 13 
 14 
 15 
 16 
 17 
 18 
 19 
 20 
 21 
 22 
 23 
 24 
 25 
 26 
 27 
 28 
 29 
 30 
 31 
 32 
 33 
 34 
 35 
 36 
 37 
 38 
 39 
 40 
 41 
 42 
 43 
 44 
 45 
 46 
 47 
 48 
 49 
 50 
 51 
from __future__ import generators
import sys

def xcombinations(items, n):
    if n==0: yield []
    else:
        for i in xrange(len(items)):
            for cc in xcombinations(items[:i]+items[i+1:],n-1):
                yield [items[i]]+cc

def xselections(items, n):
    if n==0: yield []
    else:
        for i in xrange(len(items)):
            for ss in xselections(items, n-1):
                yield [items[i]]+ss

def xpermutations(items):
    return xcombinations(items, len(items))

def solve(target, numbers):
    paren = (
        "((%3.1f %c %3.1f) %c %3.1f) %c %3.1f",     # abc
        "(%3.1f %c %3.1f) %c (%3.1f %c %3.1f)",     # acb,cab
        "%3.1f %c ((%3.1f %c %3.1f) %c %3.1f)",     # bca
        "(%3.1f %c (%3.1f %c %3.1f)) %c %3.1f",     # bac
        "%3.1f %c (%3.1f %c (%3.1f %c %3.1f))",     # cba
        )

    exprs = "+-*/"

    for pattern in paren:
        for nums in xpermutations(numbers):
            for ope in xselections(exprs,3):
                params = []
                for i in range(3):
                    params.append(nums[i])
                    params.append(ope[i])
                params.append(nums[-1])
                expr = pattern % tuple(params)
                try:
                    if eval(expr) == target:
                        print expr, "=", eval(expr)
                except:
                    pass

def main():
    solve(24.0, [1.0,3.0,4.0,6.0])

if __name__ == "__main__":
    main()

I've little trouble with combination, so I checked PythonCookbook. There it is!

Google

I can't connect google.. Routing may be corrupted. X-(

traceroute to www.google.com (216.239.57.99), 30 hops max, 38 byte packets
 1  directstar-7725ff (192.168.0.1)  0.557 ms  0.469 ms  0.461 ms
 2  218.231.87.1.eo.eaccess.ne.jp (218.231.87.1)  17.781 ms  18.070 ms  17.948 ms
 3  218.231.94.17 (218.231.94.17)  18.528 ms  19.010 ms  19.039 ms
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  * * *

EditKazuoMoriwaka/Journal/2003-06-29

Weather: fine

Foods

Links

Words

rearrangement

I improved my room's arrangement

myroom.png

OpensourceAndMusic

Non-programmer can understand worth of opensource with a metaphor ... ?

EditKazuoMoriwaka/Journal/2003-06-30

Weather: rain

Foods

Links

Words

SWEST registration

annuity