You searched for the word(s): userid:2189
Page 1 of 6 (52 items) 1 2 3 4 5 Next > ... Last »
  • Class instance variable for ruby modules

    Sorry if the title is a bit misleading, but this post talks about the scenario such that I have several classes, all extending the same module, and I need to avoid using shared or class variables (@@) in the module because the classes extending the module may change the shared or class variable at the same time and cause problem. So basically we have: class Test extend TestModule end class TestTwo extend TestModule end module TestModule @@val def somemethod #do something with @@val end end And the
    Posted to Nuo Yan (Weblog) by Nuo Yan on Thu, Aug 20 2009
    Filed under: 5. Programming
  • Don't forget the port number when replicating CouchDB

    In the afternoon I needed to replicate a database from my co-worker's CoudhDB using CouchDBX. In the replicator, I entered my co-worker's database's path like the following: And I selected to replicate to one of my existing databases. Everything seemed to be right (I could ping and telnet my co-worker's IP and CouchDB port 5984 without problem), but CouchDBX returned error 500, could not connect to remote database. After a series of diagnostics, we finally
    Posted to Nuo Yan (Weblog) by Nuo Yan on Thu, Jul 16 2009
    Filed under: 5. Programming
  • Creating a Merb Rack middleware for running in Merb applications

    There are a lot of resources on the Internet showing how to write and run a standalone rack application or middleware, but few showing how to write one to run in other Merb applications. This is actually very easy, so I'm going to share how I did it. Hopefully to be helpful to people in such need. The goal is to have a rack middleware in a merb application, which can be installed as gem, and then can be ued in other merb applications. First , create the merb application: $ merb-gen app application_name
    Posted to Nuo Yan (Weblog) by Nuo Yan on Mon, Jul 13 2009
    Filed under: 5. Programming
  • Modify bind address for couchdb 0.9.0

    By default couchdb only binds to so it's not accepting requests from other IP addresses. The bind address setting can be modified in the configuration file. For 0.9.0, by default, the default configuration file is located at /usr/local/etc/couchdb/default.ini, and the local configuration file is located at /usr/local/etc/couchdb/local.ini. Settings in the local configuration file will override those in the default one. Bind address is in the [httpd] section [httpd] port = 5984 bind_address
    Posted to Nuo Yan (Weblog) by Nuo Yan on Thu, May 28 2009
    Filed under: 8. Other (Technical), 5. Programming
  • Making an executable standalone Merb Slice gem

    I have a standalone Merb Slice which can be started by running the "slice" command in its top directory. Today I needed to make a gem file for this Slice so that people can install the gem and start it directly by running the Slice's name, for example, "foo". So I created the Rakefile, in which I specified the executable file in the following way: --- Code: Rakefile --- spec = do |s| s.rubyforge_project = 'merb' = GEM_NAME s.version =
    Posted to Nuo Yan (Weblog) by Nuo Yan on Thu, May 21 2009
    Filed under: 5. Programming
  • Testing exceptions with RSpec

    I'm new to ruby and rspec. I wrote a ruby function and wanted to check whether it throws an exception or not in a certain situation with rspec, but I realized should_raise function no longer worked in the rspec version I was using (1.2.2). I tried to find information on the Internet and I found that I should use raise_error. However, when I wrote something like: it "description" do"parameterName").should raise_error end It did not work. Finally I learned the
    Posted to Nuo Yan (Weblog) by Nuo Yan on Mon, Apr 20 2009
    Filed under: 5. Programming
  • Writing and Project Samples

    PROGRAMMING AND WRITING 1. Windows Mobile Starter Kits: Tic Tac Toe and Home Screen Alarm Plugin Description: These two projects were completed when I was working at Microsoft Mobile and Embedded Devices Content Publishing Team (Summer 07). Both programs were written in C++ with easy to understand documentations. I was involved in the design, development, testing and documentation processes. The Tic Tac Toe project focused on Windows Mobile Ink APIs and screen resolution awareness; the Home Screen
    Posted to Nuo Yan (Weblog) by Nuo Yan on Wed, Feb 11 2009
    Filed under: 7. Writing and Project Samples
  • Using Eclipse to add/update files to CVS

    The command-line based CVS tool is hard to use for first time users; many GUI-based CVS tools are not really well designed to be easy to use either. I’m not against the point that developers and testers should learn how to use a technical tool in no time even though the tool is hard to use, but developers and testers have their schedules and need to be efficient. Having an efficient way to add and update files to CVS is very necessary. Eclipse is the tool I use to deal with CVS file operations
    Posted to Nuo Yan (Weblog) by Nuo Yan on Tue, Feb 10 2009
    Filed under: 8. Other (Technical), 5. Programming
  • How to connect Remote Spy++ to Windows Mobile emulators in Visual Studio 2008

    I don’t see any problem doing so, but I got a question from a comment of one of my earlier post. The question states “ Hello! Could you please tell more about how to make Remote Spy++ connect to WM 5.0 emulator, which I got with MSVS2008? I've read some articles at, but they say you can't connect to Windows Mobile, only Windows CE... ” So I want to explain the process to connect Remote Spy to Windows Mobile emulator in Visual Studio 2008. Here are the steps
    Posted to Nuo Yan (Weblog) by Nuo Yan on Thu, Aug 28 2008
    Filed under: 3. Windows Mobile
  • No way to join the social – Is the lack of global languages support on Zune a problem, or not at all?

    It’s been a pretty long time since the first generation of Zune came out. Microsoft wants to attract us as potential users to join the social – they made pretty good media sharing and community features so that to distinct from similar products made by other companies. However, Zune has a very serious usability problem that even though a huge amount of users have been complaining all the time, it’s never been solved. It is the lack of support for most of the global languages. It’s true that Zune
    Posted to Nuo Yan (Weblog) by Nuo Yan on Fri, May 16 2008
    Filed under: 9. Other (Non-technical), 6. Usability
Page 1 of 6 (52 items) 1 2 3 4 5 Next > ... Last »