It rains a lot in Bay area, but it is getting closer to spring. I started to see more plants are growing. I saw a few new plant in a flower bed of the backyard today. It has blue flowers which look like clusters of little blue bells.
I did an image search with [Blue flower little bells] and got "Muscari". More specifically, it looks like Muscari armeniacum and typically called as Grape Hyacinth. It is a perennial obviously as I didn't plant but it was there from last year. Originally it grows in Southeastern Europe to Caucasus. The name suggests that it was from around Armenia. It is a flowering bulb. It requires very little care. It blooms early spring and that's why I see the flower now. It grows to 6 to 8 inches tall (really?). It likes sun and is okay in partial shade.
Wednesday, February 24, 2010
Thursday, July 2, 2009
Set NetBeans interface back to US English
I use Mac OS X in Japanese, but I like most of my development tools run in English.
I upgraded my NetBeans today to 6.7 and it detects my OS language and NetBeans showed up in Japanese.
http://blogs.sun.com/tao/entry/set_netbeans_user_interface_language
The fix mentioned in the page above worked for me. On OS X, the netbeans.conf file is in
/Applications/NetBeans 6.7.app/Contents/Resources/NetBeans/etc/netbeans.conf
Sunday, June 14, 2009
Blue biting flower is...
I didn't know this plant's name, but it flowers now. As blue flowers with a black stem is pretty unique, I felt I can tell now. The flower looks like biting something!
With a little bit of search, I could find the name of the plant. I believe it is Salvia guaranitica.
Tuesday, June 2, 2009
Gnucash said "This account register is read-only."
When I started up GnuCash, I saw a dialog box saying "This account register is read-only".
This account may not be edited. If you want to edit transactions in this register, please open the account option and turn off the placeholder checkbox.The error message is not good because it is not obvious that what "This account" mean. A post on Gmane (originally posted comp.gnome.apps.gnucash.user newsgroup) explains it. http://article.gmane.org/gmane.comp.gnome.apps.gnucash.user/24490
Monday, March 30, 2009
superclass mismatch for class Item
I had an "superclass mismatch for class Item" when I ran rake db:migrate.
It was because I defined the same class twice. The model class is Item and I happened to have another class Item in my migration.
mir% grep -R 'class Item' . ./test/unit/item_test.rb:class ItemTest < Test::Unit::TestCase ./app/models/item.rb:class Item < ActiveRecord::Base ./db/migrate/20090325060057_item.rb:class Item < ActiveRecord::MigrationI changed the class name in 20090325060057_item.rb from Item to AlterItem, but this was not enough. This gives me rather hard to corelate error message:
undefined method `migrate' for Item(id: integer, created_at: datetime, updated_at: datetime):Class /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:1833:in `method_missing_without_paginate' /usr/lib/ruby/gems/1.8/gems/mislav-will_paginate-2.3.8/lib/will_paginate/finder.rb:170:in `method_missing'It turned out that it was caused by filename and class name mismatch. I had to change the filename to 20090325060057_alter_item.rb to match with AlterItem class name.
Decluttered My Desk
It is hard to say whether I am an organized person or not. I am fairly meticulous about details, but my desk ended up like this recently.
Originally, I was thinking of adjusting the height of the desk and considering to replace my office desk. My research was to use Flickr to get ideas by searching "office desk" tags. I came across a very clean desk with a computer.
A blog post refers another attempt: "Declutter Your Desk by Van Mardian". It looked like a doable and cheap solution to me. So, I decided to do it as my weekend project (and I forgot the original attempt of buying a new desk!).
I've purchased a peg board, cable ties, and shackles from OSH and Home Depot, and put most of the devices to the peg board. Physical work wasn't hard, but figuring out an suitable layout was. My first attempt was not optimal but I just line the devices up and it worked out okay. It has two cable taps, a cable modem, a wifi router, a network hub, a skype phone base, two external hard drives, an usb hub, and a usb audio output.
I flipped the desk back and connected a bunch of cables, and it looks quite well. The USB hub and audio jack are accessible from the front.
Most of the clutters were just needed to be cleaned up, but there were also a couple of things on the desk such as an USB audio, external hard drives, and an USB hub. They actually made the desk look cluttered even if I cleaned up. I'm satisfied with the improvement.
There are still things under the desk and it is clear that they needs to be tidied up. It sounds a lot easier task as most of the stuff has been already handled.
![]() |
| 送信者 for gacooh |
![]() |
| The cable mess |
![]() |
| 送信者 for gacooh |
![]() |
| 送信者 for gacooh |
![]() |
| 送信者 for gacooh |
![]() |
| 送信者 for gacooh |
![]() |
| 送信者 for gacooh |
Wednesday, March 25, 2009
attr_accessor is a method
Somehow I thought the action of defining a class is an declaration and doesn't execute statements, but I was wrong.
class MyClass
put "Hello world"
def MyMethod
puts "output from MyMethod"
end
end
The Ruby code above actually spits "Hello world". I tried this with Python and Python did the same.
The reason I wondered this was Ruby's attr_accessor.
class MyClass attr_accessor :a endIt looked to me like an declaration of @a to have accessors, but it isn't. attr_accessor is an method implemented in Module class and it is not a reserved word. The truth is that attr_accessor is executed when the source code is interpreted and it defines accessor methods. AH!
Subscribe to:
Posts (Atom)










