Re: Counting words for visual details





I save each answer for each user, with the visual detail in one column
and the three words in an array in a single varchar column. E.g. for
Linear a user doing the survey might pick Word1,Word2,Word3.

What would be the best way to count the words picked for let's say
Linear? And also, count the ones most frequent.

( Not sure it's best to ask here or in Rails forum but I suspect it
could be here with some array or hash trick.)

Well, if you can create the query for the word array, then you can simply use the size() method to count the objects in the array:

word_array = ['Word1', 'Word2', 'Word3'] #query here instead
word_array.size # => 3

_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits.
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009
.



Relevant Pages

  • Re: PDA vs CCDs for spectroscopy
    ... Panavision ELIS-1024-EX, 4 um pixels for about $10. ... These linear array chips would require some work on your part as you ... so that's 220 electrons RMS readout noise typical, ...
    (sci.optics)
  • Re: find a number
    ... On Fri, 24 Mar 2006, Mark P wrote: ... I have an array of 1001 integers. ... There's also a cute algorithm for this problem which runs in linear ... obtain linear time even with quite a bit more space. ...
    (comp.programming)
  • Re: alligned memory allocation
    ... an array of bytes, on systems with linear address spaces. ... on Harvard architectures with linear address spaces. ... >implementation of the same for DJGPP is certainly such. ... Dan Pop ...
    (comp.lang.c)
  • Counting words for visual details
    ... I've made a survey in Rails where I want people to pick three words, ... and the three words in an array in a single varchar column. ... Linear a user doing the survey might pick Word1,Word2,Word3. ...
    (comp.lang.ruby)
  • Re: Using known arrays to calculate an array of new values
    ... It take the original array and adjust to the minimum ... Each qty value is adjusted by simple linear relationship. ... cumulative precip. ... Dim count_m As Integer ...
    (microsoft.public.excel.programming)