similar to: how to get the count/index of the current row ?

Displaying 20 results from an estimated 100 matches similar to: "how to get the count/index of the current row ?"

2006 Feb 16
9
association not inserted automatically.
Hello, I am trying to write a sample application. I have class LineItem< ActiveRecord::Base belongs_to : order end && class Order < ActiveRecord::Base has_one :line_item end Now in the controller i am trying : def add @ord = Order.new(params[:ord]) @ord.line_item = LineItem.new(params[:lineitem]) if @ord.save redirect_to :action => ''list'' else render
2006 Feb 13
2
how to find the helpers code ?
Hello, i have the application set up on my radrails. I was looking at the view generated by scaffold and i see a bunch of names, after looking up internet i found that they are helpers and generate the HTML for us. Now, i wanted to look at the helper code for start_form_tag, so that based on that i could write some of my own helpers in my helper classes... but i could not find the code
2008 May 25
2
storing data from a txt file in ruby?
Hello Im trying to write a a ruby program that takes a list of books title ,author so on and i can read in the file with no problem but im trying to store the list into either a array or hash so i ca say run different methods view, delete ect.. anyhelp would be great this is what i have so far IO.foreach("book_list.txt") do |line| catalog=line.chomp.split(",")
2005 Dec 16
13
How to pass a collection to paginate?
There must be a better way to write this code: @project_pages, @projects= paginate :project, :per_page => 10, :conditions => ["account_id = ?", account] ?! If only I could pass the sub-collection account = ... @projects = account.project to paginate, instead of letting it extract it with a find :all + sql conditions Alain. -- Posted via
2013 Jun 26
1
Margins in dcast (reshape2)
Hi, I'd like to get mean values for the margins of my casted data.frame. For the casting I am using dcast() from reshape2. However, when I set the margins parameter (margins=c("grand\_row")) I get following error concerning an unrecognized escape character '\_'. So what is the correct command to get the outermost margins only in reshape2? /johannes [[alternative HTML
2006 Dec 18
2
AGI Help Please
List, I finally decided to break down & start playing with AGI scripts, but for the life of me, I can't figure out what I am doing wrong. Below is a super simple script to run a query in mysql to see how many call records there are for the extension calling in, then print the total in the CLI. This is all I get on the CLI: -- Executing AGI("SIP/216-0baa",
2006 Feb 27
2
Upload & Parse CSV
Hi All I was hoping you could help me. I need the ability to upload a large quantity of data via CSV - via an upload form. The CSV file then needs parsing and the data entering into the relevant module. Does anyone have experience of this or perhaps knows of a posting, generator, existing code or any help at all? I''ve been looking but not come across anything so far. I can do this
2012 Apr 27
5
How to cap table with active record
We want to use SQL/active record for logging but limit the table size so that older messages disappear off of the table Some process has to run periodically to do that. Suppose I want to keep my table size to not much bigger than 50,000,000 rows or so. What is the easiest, most efficient way to delete any extra rows that there may be ? This is an SQL/active record problem I have not encountered
2006 Jan 23
16
Adding form fields (extending a form) on the fly
Hello, I just can''t seem to find a way to extend a form dynamically in ROR. Say I am writing a recipe website. There is one form to enter the recipe. There is room for N number of ingredients (let''s say a text field for each ingredient name and selection list for the amount). What if the user wants to add more than N ingredients as he types them in? how do I do this without
2016 Apr 20
0
Matrix: How create a _row-oriented_ sparse Matrix (=dgRMatrix)?
>>>>> Henrik Bengtsson <henrik.bengtsson at gmail.com> >>>>> on Tue, 19 Apr 2016 14:04:11 -0700 writes: > Using the Matrix package, how can I create a row-oriented sparse > Matrix from scratch populated with some data? By default a > column-oriented one is created and I'm aware of the note that the > package is optimized for
2010 Jul 13
4
[LLVMdev] LoopInterchange Pass
Hi,   I developed a Loop Interchange pass. Please take a look. I have not incorporate data dependence analysis check. I can insert it when the LoopDependenceAnalysis is available.   Thank you Satya -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100713/654d5fd5/attachment.html> --------------
2008 Sep 26
6
Mapping hvm guest pages in Dom0
hello, I would like to map (Read/Write) pages owned by a HVM guest from my Dom0 Linux kernel module. I have access to the "machine frame numbers" of these pages. 1. What is the right interface to do this? kmap needs ''struct page'' ptrs which I doubt exist for pages owned by a HVM guest. Is there a hypercall to do this then? 2. Do I need to modify the HVM behavior in
2016 Apr 19
2
Matrix: How create a _row-oriented_ sparse Matrix (=dgRMatrix)?
Using the Matrix package, how can I create a row-oriented sparse Matrix from scratch populated with some data? By default a column-oriented one is created and I'm aware of the note that the package is optimized for column-oriented ones, but I'm only interested in using it for holding my sparse row-oriented data and doing basic subsetting by rows (even using drop=FALSE). Here is what I
2010 Jul 14
1
[LLVMdev] LoopInterchange Pass
--- On Tue, 7/13/10, Satya Jandhayala <satya_jandhayala at yahoo.com> wrote: From: Satya Jandhayala <satya_jandhayala at yahoo.com> Subject: LoopInterchange Pass To: llvmdev at cs.uiuc.edu Date: Tuesday, July 13, 2010, 12:06 PM Hi,   I developed a Loop Interchange pass. Please take a look. I have not incorporate data dependence analysis check. I can insert it when the
2010 Jul 14
0
[LLVMdev] LoopInterchange Pass
Hi Satya, On Tue, Jul 13, 2010 at 12:06 PM, Satya Jandhayala < satya_jandhayala at yahoo.com> wrote: > Hi, > > I developed a Loop Interchange pass. Please take a look. > I have not incorporate data dependence analysis check. I can insert it when > the LoopDependenceAnalysis is available. > Have you tried using include/llvm/Analysis/LoopDependenceAnalysis.h ? Please
2009 Oct 01
1
Java Script
Hi I am new to this group, i heard that this is a dedicated group with java script experts. if this is true then i want to be part of this. Please make me your friend. -Satya
2007 Oct 16
8
Xeno Linux never pins L1 tables ?
hi, I''m developing my own 32-bit (no PAE) paravirtualized kernel for xen with Mini-OS as a starting point. I am currently working on process page table support (equivalent of arch/i386/mm/pgtable-xen.c) and mostly following Linux for the moment. I noticed that linux-2.6.18-xen never pins an L1 table (a pte), yet __pgd_pin() walks the page directory and gives up write access on the kernel
2008 Oct 31
14
questions on zfs backups
On Thu, Oct 30, 2008 at 11:05 PM, Richard Elling <Richard.Elling at sun.com> wrote: > Philip Brown wrote: >> I''ve recently started down the road of production use for zfs, and am hitting my head on some paradigm shifts. I''d like to clarify whether my understanding is correct, and/or whether there are better ways of doing things. >> I have one question for
2016 Feb 23
4
[PATCH v3 0/4] [FOR COMMENTS ONLY] Rework inspection.
Previously posted: https://www.redhat.com/archives/libguestfs/2015-December/msg00038.html Inspection now really succeeds on a small number of simple guests. To test it out: $ ./run guestfish -v -x -a /tmp/centos-6.img ><fs> run ><fs> debug sh "guestfs-inspection --verbose" Rich.
2005 Jan 09
2
Bug#289529: logcheck: "Ghandi" should be "Gandhi" in README.how.to.interpret
Package: logcheck Version: 1.2.32 Severity: minor "Ghandi" should be "Gandhi" in README.how.to.interpret, assuming that you mean the Indian freedom fighter M.K. Gandhi a.k.a. Mahatma Gandhi. -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.7 Locale: LANG=C, LC_CTYPE=C