search for: cheung

Displaying 20 results from an estimated 781 matches for "cheung".

Did you mean: cheng
2008 Apr 16
8
Will acts_as_taggable_on_steroids and better_nested_set work together?
I am having this crazy problem where it ONLY shows up in testing. This is my test code <code> def test_should_destroy task1 = Task.new(:description => "tmp", :done => false, :user => User.find_by_login(''admin'')) assert task1.save assert task1.destroy end </code> This is my task model
2007 Dec 23
7
Help with error "undefined method `downcase' for nil:NilClass" after migration
Hi all, I have a rails 1.5.2 application. I''ve frozen the application via the "rake rails:freeze:gems" command. This application worked well on a server I previously had it installed on. My server was getting really slow, and I requested that I be moved to a new server. When I perform a "gem list rails" command on my new host, I receive only version 1.2.6. Since
2009 Mar 25
11
ActiveRecord: Nested :include erroneous behavior
Hi, Found a simple example breaking on moving to 2.2 from 2.0. This example illustrates the usage of nested :include finder options. class Book < ActiveRecord::Base has_many :distributors end class Distributor < ActiveRecord::Base belongs_to :book has_many :agents end class Agent < ActiveRecord::Base belongs_to :distributor has_many :shops end class Shop <
2008 Oct 08
11
Using image_tag and send_data
I am using image_tag to load an image that I''ve saved to the database (using attachment_fu if you''re curious but that''s probably not relevant here): VIEW <%= image_tag ''/photo/get_image/5'' %> CONTROLLER def get_image @photo=Photo.find(params[:id]) send_data(DbFile.find(@photo.db_file_id).data, :type =>
2006 Jul 03
13
Eager loading ActiveRecord objects
I have a complex graph of ActiveRecord entities that I want to load with one big honkin'' join query to avoid ripple loading. It''s for a report. However :include doesn''t get me all the way there because I want to load parents of parents (or children of children). I don''t mind doing the SQL by hand but I''m not quite sure what to do to get the result
2011 Jan 08
9
options_for_select.
Even reading the documentation I can not figure out what is the select_tag difference between this: <% = select_tag (bags [], "options_for_select (bags.collect @ {| bb | [bb.bag_type, bb.id]}, ruser.bags.collect @ {| ub | ub.id}), {: multiple => true,: id => "bags"})%> and this: <% = select_tag "bags [], " options_for_select (bags.collect @ {| bb
2010 Feb 25
10
ajax.updater problem
Hi everyone I´know that it is not a ajax forum, but Im using ajax ina program created with rails code and I think that I´m not the unique person who use the Ajax. UpdaterPeriodically. My problem is that my program doesn´t refresh the div tag, following it´s my source code. Anyone can say me why it doesn´t work? <head> <%= javascript_include_tag ''prototype'' %>
2008 Sep 24
5
Re: save blob to file?
Frederick Cheung wrote: > On 14 Aug 2008, at 15:11, John Griffiths wrote: > >> >> hope someone can help with this, >> >> in my mysql table i''ve got a blob column storing images inside the >> database, it''s also got the filetype and filesize. >> >> n...
2007 Sep 25
21
form_for and partials
I love form_for, but I really hate <% form_for :person, @person, :url => {...} do |f| %> ... <%= render :partial => ''form'', :locals => {''f'' => f} ... <% end %> I''ve been thinking of instead allowing <% form_for :person, @person, :url => {...} do |f| %> ... <%= f.partial ''form''
2004 Jun 23
6
R 1.9.1 compilation error (on AIX 5.1)
...bit on powerpc-ibm-aix5.1.0.0 using xlc/xlf. The compile went fine, and the only part of make check that failed was internet.R (since there's no 'Net access from that box). The GCC on that box is probably too outdated to try, unfortunately. Best, Andy > On Wed, 23 Jun 2004, Frankie Cheung wrote: > > > Dear Sir/Madam, > > > > I encounter some problem duuring compilation of R 1.9.1 on > AIX 5.1, after > > running "./configure" then I type "make" to compile: > > > > # make > > ..... > > gcc -I../../src/extra/...
2008 Oct 08
9
Plugins and the test environment
Hi guys. I''m writing a plugin for use in the test environment. However, when I run ``rake test'''' or ``rake spec'''', RAILS_ENV is set to "development" when my plugin''s init.rb is run. How do you configure a plugin to load require a file in the test environment? Thanks, Nick --~--~---------~--~----~------------~-------~--~----~ You
2008 Oct 07
2
Statistically significant in linear and non-linear model
...necessary to test these variables in a non-linear model? Since most of non-linear form of a variable can be represented to a linear combination using Taylor's theorem, so I wonder whether the non-linear form is also not statistically significant in such a situation. Best Regards Hsiao-nan Cheung 2008/10/08 [[alternative HTML version deleted]]
2008 Jun 07
5
Can create record but can not update it => has_many through
Hi All, I have a problem using has_many through association. I can create a product without problem, but when i edit it, i got this NoMethodError: undefined method `reciters='' for #<Product:0xb71a77e8> Did i miss something to code? I provided the codes below. Please help Thanks, Dida product_controller.rb ====================== def create @product =
2008 Aug 24
11
link_to_function check javascript attribute
How could I check the value of an javascript object''s attribute? <div id="new_item_details" style="display:none"></div> <%= link_to_function("Show details...", nil, :id => "show_details") do |page| page.visual_effect(:toggle_blind, :new_item_details) if (page[:new_item_details].style.visibility ==
2003 Aug 21
3
authentication error
I have setup a Rysnc server in Mandrake 9.1 When I add a auth user into my Rsync.conf and rsync.secrets, it do not work, everytime it shows [root@html]# rsync chris@mandrake82::XXXXX/.html/. / Password: @ERROR: auth failed on module XXXXX rsync: connection unexpectedly closed (89 bytes read so far) rsync error: error in rsync protocol data stream (code 12) at io.c(165) This is my rsync's
2010 Aug 24
5
Reading pem file in ruby on rails
hi, i have a certificate file in pem format. i need to read the pem file. Need help on how to read the certificate in ruby on rails Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2009 Sep 22
2
[LLVMdev] getting debug info
Hi all, I am wondering if someone can give me pointers to how to use the DI* classes defined in DebugInfo.h. In particular, I am confused about how to get a MDNode from the GlobalVariable's that hold the debug info so that they can be passed into the DI* classes, and the difference between MDNode and NamedMDNode in general. Thanks for your help. Alvin
2009 Sep 22
0
[LLVMdev] getting debug info
On Mon, Sep 21, 2009 at 9:34 PM, Alvin Cheung <alvin.cheung at gmail.com> wrote: > Hi all, > > I am wondering if someone can give me pointers to how to use the DI* classes > defined in DebugInfo.h.  In particular, I am confused about how to get a MDNode > from the GlobalVariable's that hold the debug info so that they...
2009 Sep 22
1
[LLVMdev] getting debug info
...res, and I am wondering if there is a way for me to look up the debug info associated with a Type * directly instead of building a custom map from Type * to DICompositeType by iterating through the type iterator in DebugInfoFinder. Devang Patel wrote: > On Mon, Sep 21, 2009 at 9:34 PM, Alvin Cheung <alvin.cheung at gmail.com> wrote: >> Hi all, >> >> I am wondering if someone can give me pointers to how to use the DI* classes >> defined in DebugInfo.h. In particular, I am confused about how to get a MDNode >> from the GlobalVariable's that hold the debu...
2012 May 31
1
Automated essay scoring by R
...tomated essay scoring study are using the package of the R open source software. I am a new learner of R and I would like to know which package of R can be used to serve this purpose and how to do then. Grateful if you could give me the guidance. Thank you very much for your help. Regards, Andrew Cheung [[alternative HTML version deleted]]