Displaying 20 results from an estimated 900 matches similar to: "ordering after a inject"
2006 Apr 27
6
OrderedHash
Looks like I have skipped on this, but still - a couple of questions:
1) Why there suddenly is an OrderedHash in ActiveSupport? (this
glaring omission from ruby core is present in many apps already)
2) Why it doesn''t match the semantics of Hash respectively?
3) Why it''s #nodoc ?
--
Julian ''Julik'' Tarkhanov
please send all personal mail to
me at julik.nl
2006 Jun 16
5
superclass mismatch for class OrderedOptions
I have Rails 1.1.2 installed and froze my app to 1.0 by checking it out
into the vender directory. Maybe it''s coincidence, but now when trying
to do rake migrate I get this:
> rake migrate --trace
(in /home/beet/workspace/)
rake aborted!
superclass mismatch for class OrderedOptions
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/ordered_options.rb:27
2006 Apr 04
5
How to implement tag clouds using plugin?
The code on
http://blog.craz8.com/articles/2005/10/28/acts_as_taggable-is-a-cool-piece-of-code
is based on the acts_as_taggable gem,anybody has done that using the
acts_as_taggable plugin?thanks!
btw:the code above uses the tag_count method,which is defined in the
gem:
def tags_count(options = {})
options = {:order => ''count DESC''}.merge(options)
2005 Aug 25
1
newbie questions about hosting address
Dear Rails groups,
thank you for all the previous helps in this group, and me being a newbie is getting more comfortable with rails and now I finish most of the scaffold modification without much problem. My question is(I know it''s absolutely basic questions but I''m a real outsider :~( ) I have been developing in my own pc, now my office ''s other people will test on it,
2009 Sep 18
1
lapply - value changes as parameters to function?
Hi,
I'm trying to get better at things like lapply but it still stumps
me. I have a function I've written, tested and debugged using
individual calls to the function, ala:
ResultList5 = DoAvgCalcs(IndexData, Lookback=5,
SampleSize=TestSamples , Iterations=TestIterations )
ResultList8 = DoAvgCalcs(IndexData, Lookback=8,
SampleSize=TestSamples , Iterations=TestIterations )
ResultList13
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 Mar 31
6
how to access a hash within a hash in ruby?
Simple question:
I know how to access a data field in a hash by doing
hash_name[datafield_name].
But what if the datafield itself is a hash? I tried a couple of
variations but nothing seems to be working and tutorials do not go into
such details.
Is there a simple way or should I create separate instances?
-Chris
--
Posted via http://www.ruby-forum.com/.
2009 Apr 09
1
Mailing error in Rails 2.3.2
Hi,
My mails were working with the earlier version of rails ie. Rails
2.0.2. But recently when i upgraded my environment to 2.3.2 the mails
stopped working and gave
"Error: End of file reached".
But if i send mails independent of my rails app the mailing code works
fine.
My Environment:
Windows Xp
Ruby 1.8.7
actionmailer (2.3.2)
actionpack (2.3.2)
activerecord (2.3.2)
activeresource
2011 Jul 14
1
ActiveSupport::OrderedHash disappears?
I noticed that ActiveSupport::OrderedHash disappeared from the Rails API
pages.
Does it mean that it is going to be deprecated?
I know that Hash is ordered in Ruby 1.9, but this subject seems
controversial, and in my opinion the ordered hash in Ruby 1.9 should
have been called OrderedHash (or SequentialHash), even if it be an alias
of the current implementation of Hash.
That way one would be free
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)
2012 Oct 27
8
RFH: loopback & blktap(2) and CDROM
Hello,
I''m currently trying to understand some problems I had in the past with mixing
look-back with blktap(2) for HV and PV domains. I''m stuck reading the source
code, so I''d like to get some help from the list. Interrupt me if I got
something fundamentally wrong in my understanding so far:
1. With pure-HV the domU gets an emulated IDE (or whatever) disk. The
1998 Jun 30
1
NT Crashes when doing large network file Xfers (3c595)
On Tuesday, June 30, 1998 2:25 PM, cmc@mind.org wrote:
>Something I'm actually familiar with. Wow.
>
>First off, the 3C595 card does *not* support full-duplex at 100mb.
>It supports 10mb at half or full duplex and 100mb at half duplex
>only! I researched this only 2 weeks ago, check on 3com's site if
>you're not convinced. Backing off to half-duplex won't fix this
2005 Dec 26
2
resorting a dataset
Quick question to see how I might re-sort an Activerecord data set. Let''s
say I have this table:
tablename: testscores
| id | student | score | avg_for_year
1, steve, 85, 82
2, tom, 84, 92,
3, jim, 92, 95
In my controller, I have something like:
t= Testscores.find(:all, :order => "score DESC", :limit => 2)
...where it would return the records for Jim and Steve....
My
2001 Sep 20
4
DirectSound ?? WaveIn ?? MM ??
well i discoverd, HL uses waveIn, which is a part of the DirectSound ...
so ... is there a Wine binding for waveIN ?
-
-moritz angermann
2009 Apr 02
1
calculating drop1 R^2s
This is probably simple, but I just can't see it...
I want to calculate the R^2s for a series of linear models where each
term is dropped in turn. I can get the
RSS from drop1(), and the r.squared from summary() for a given model,
but don't know how to use the
result of drop1() to get the r.squared for each model with one term dropped.
Working example:
library(vcd) # for
2009 Sep 25
2
summarize-plyr package
Hi,I am using the amazing package 'plyr". I have one problem. I would
appreciate help to fix the following error: Thanks.
______________________________
> library(plyr)
> data(baseball)
> summarise(baseball,
+ duration = max(year) - min(year),
+ nteams = length(unique(team)))
Error: could not find function "summarise"
> ddply(baseball, "id", summarise,
+
2010 Jan 24
2
OrderedHash Rails 2.3.2
I understand that
ActiveSupport::OrderedHash.new [[1,2]]
does not work beginning with Rails 2.3. I am running Rails 2.3.2.
One commentator suggested simply creating the instance without
arguments and then sequentially adding each element as a separate
step. I tried that. The hash gets populated just fine but it is not
ordered. Can anyone please tell me what the magic trick is under
2006 Jun 21
2
raw sql and columns order
Hi, I''ve a model with the following method:
def self.run(sql)
return connection.select_all(sql)
end
so, the value returned is an array of hashes... the problen is that the sql
command:
"select name, id from table"
and
select id,name from table"
returns the columns in the same order (name, id).
And in my view, I need to keep the order of the SQL command.
2006 Jan 13
2
newbie: access model inside a model
Hi everybody,
I''ve started to learn Ruby on Rails with the two books, of course I''m
experimenting outside
the examples in the book and walking against some things I didn''t learn
yet. so here''s the question:
Is it possible to access one model from within another? Actually I have
a Many to Many relationship
between tables and I''m trying to realize
2006 Sep 29
3
What is wrong with this input
I can't seem to figure out why I'm getting this error. The output is
copied right off the screen. Notice how in some cases the back slash is
missing. In other cases, it can't read a file that I know is there.
Thanks in advance
> library(foreign)
> hrout <- read.spss("c:\\hrab200.sav")
Error in read.spss("c:\\hrab200.sav") : unable to open file