similar to: how to access a hash within a hash in ruby?

Displaying 20 results from an estimated 100 matches similar to: "how to access a hash within a hash in ruby?"

2006 Jul 29
9
export to a CSV or XLS file
hello everyone, Any idea how can i export a resultset from a database to a CSV or XLS file from the application ? would like the user to have the option to export selected data to a CSV/XLS file. Any plugins or libraries avaiable to accomplish this ? Thanks for your time, VASU. -- Posted via http://www.ruby-forum.com/.
2006 Apr 08
7
text_field and arrays
Hi, I''m trying to do a bulk update on an array with the helper text_field. I''m trying to create an inputfield for every object in the array, but I''m not getting it right... example: class ClassA @arrayB[] end HTML (code with error): <% 0.upto(9) do |index| %> <%= text_field ''ClassA'', ''arrayB[index]'' %> non
2006 May 02
4
ordering after a inject
Hi, My results are getting out of order after I do the following command: count = result.inject({}) { |hsh, row| hsh[row[''name'']] = row[''count''].to_i; hsh } Why? Here are more specifics: My complete method is this (based off of acts_as_taggable code - not'' DHHs, but the original one): def self.sql_to_count_plays(lookback) sql =
2012 Jan 27
2
to_json performance
Originally posted on github, reported to the right place. I would like to open a discussion about how `to_json` and `as_json` operates in Rails from a performance standpoint. I''m using Rails 3.2 but this issue applies to almost all versions of Rails. Our use case presents the challenge in sending out potentially large JSON (or XML, but we''ll focus on JSON rendering here)
2006 Jul 13
2
Getting data from the select menu
I am using a select menu to allow people to pick an item and be taken to a new page containing that item''s data. Pretty straightforward stuff. Except that I cannot quite figure out how to do this in Rails. I do not understand how to grab the variable from the select menu. Any suggestions? -- Posted via http://www.ruby-forum.com/.
2010 May 04
2
R for web browser
Hi Everyone, Does anyone know of any projects for running an interactive R session within a web browser? I'm looking for something similar to the one on the Ruby website (http://tryruby.org), except for R. Thanks for your responses in advance! Lanna ----- Lanna Jin lannajin at gmail.com 510-898-8525 -- View this message in context:
2015 May 18
2
[LLVMdev] copy value of a global's data field to another global
getInitializer returns the complete initializer of the global. My globals are complex nested structs, from which I want to extract e.g. one double datafield. Example: >From a struct Stuct having double,array(3xint),float fields, I could extract the second int value using the index sequence 0,1,1 with getGetElementPtr. This gives me a constantPointer, but I would need to get a constInt...
2006 May 16
1
Nice Ruby tutorial for begginers
http://tryruby.hobix.com/
2006 Feb 09
1
Irb Web Interface
I was wondering how to give the Ruby on Rails console a web interface like this website http://tryruby.hobix.com/. -- Posted via http://www.ruby-forum.com/.
2006 Aug 17
4
Directory Help
I am a newbie to ruby on rails. I am using the pragmatic programmers agile development with rails book. I am at the beginning, i have installed MySQL and ruby on rails but the book asks me to "create a directory". Being a person who has only ever done a basic ruby trial (at tryruby.hobix.com) and learnt extremely basic HTML is there anyone out there who can help me and give me
2006 Jul 12
12
pass hash as parameter
Hello, How can I pass a hash as parameter from a template with url_for? e.g. : if I have test = { :a => "a", :b => "b" } How can I pass that with my request? Is it possible to pass nested hash''es to? Right now, url_for :action => :test, test doesn''t seem to work. Thank you, --
2006 Apr 06
6
Flexible data schema in a database?
I figured I pose this to the list and see if any one can build a better mousetrap. The problem: 1. Store hierarchical data in a database, but without knowing the hierarchy beforehand. 2. Allow the user to define there own hierarchy, and allow the system to support multiple hierarchies. Call it a cataloging system, we have an object and we want to add data about that object to the system. Now
2001 Dec 11
1
how can i have the total for each level using table,ftable,xtabs etc. etc. ?
I have a list with four fields and 3500 records, from a MySQL table. How can i have the total for each level using table, ftable, xtabs? ex: print(ftable(table[,"field1"]~table[,"field2"])) thanks Danilo Maurizio Veneto Lavoro - Area Osservatorio - -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2015 May 17
2
[LLVMdev] copy value of a global's data field to another global
Hi all, I can get access to the data stored in globals as follows: GlobalVariable* pGvarAct=_set_a_valid_global_; const_ptr_indicesVec=_the_indexes_ llvm::Constant* pConst; pConst=ConstantExpr::getGetElementPtr(pGvarAct, const_ptr_indicesVec); and e.g. use this to repalece an argumrnt of an instruction like: I->setOperand(someArgumentIndex,pConst); However, getGetElementPtr returns a
2012 May 30
3
Need help installing a ruby on rails script
Hello. Im only used to PHP and Perl/CGI scripts. Ruby scripts are VERY confusing. I have no idea how to install ruby script. Could somebody plaese tell me how? Thank you. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/OPhf9HB28E4J. To
2006 Nov 08
10
axis command and excel time format
Hi to all, I have some problems to get the times-scale to the x-axis the times are coming from an excel sheet f. e [1] "0:01:00" "0:02:00" "0:03:00" "0:04:00" "0:05:00" "0:06:00" "0:07:00" [8] "0:08:00" "0:09:00" "0:10:00" "0:11:00" "0:12:00" "0:13:00"
2006 Feb 21
6
What do I need to learn Ruby, Rails, JavaScript, AJAX?
So I''ve sort of come to the conclusion that if I wanna get stuff done, I need to either A) Find some dang money and pay people to do it or B) Do it myself. I''m opting for B. Soooo...now I''ve got some programming/technologies to learn. I''m self-employed and I can afford to take a month (or 2) off to totally immerse myself in this and learn how to do it.
2015 Feb 27
0
[LLVMdev] using a structs datafield as operand
Hi all, I need to exchange operands of e.g. instructions by others of the same type. Suppose I need to replace a double typed operand; a possible candidate could be a double typed datafield of a struct. The typefinder shows how to recursively crawl types using llvm::Type::subtype_reverse_iterator and thereby compiles a list of types occuring in the module. I could determine when I arrived at
2005 Dec 30
6
Suggestion for New User
I, like many people, am starting to learn Ruby because of Rails. I am going through several tutorials and am understanding the concepts without too much difficulty, but the one area I am having trouble with is learning the new language. I am not a trained programmer. Rather, I learned how to program out of necessity and therefore lack some of the background that many of you have. I am
2006 Dec 23
7
OT: any recommendation for scripting language
Right now, I am using SAS and S+/R. As a new year resolution, I am planning to learn a scripting language. from statisticians' point of view, which scripting language is worth to learn, perl, python, or any other recommendation? (Most likely, I will be learning it in windows.) Since I am not in research, I will prefer one widely used in industry and related to statistical work. if you