similar to: Mocking to spec a sort_by method

Displaying 17 results from an estimated 17 matches similar to: "Mocking to spec a sort_by method"

2005 Feb 07
2
questions sur R
bonjour, Je suis actuellement en derniere annee d'ecole d'ingenieur en informatique et statistiques et je dois réaliser mon projet de fin d'études sur le logiciel R. En fait, je dois réaliser un scoring sous R puis le meme sous SAS et comparer les resultats. Mon fichier se prete à une regression logistique. J'ai donc utilisé la fonction glm sous R et Catmod sous SAS seumement, je
2006 Jul 20
3
sort_by with via a parent models child
I am having a problem with ruby''s sort_by function. I want to sort a list of parent model objects based on the children of the parent models. Normally you might say sortedList = modelList.sort_by { |model| model[''someAttribute''] } What I am tring to do is sortedList = modelList.sort_by{ |model| model.children.find(:first, order=>"price desc" ).price}
2012 Apr 04
0
[LLVMdev] GSoC Proposal: Table-Driven Decompilation
On 04/04/2012 07:08 AM, Charles Davis wrote: > Hi, > > Here's one of my proposals for GSoC 2012. What do you think? > > Chip > > Project Title: Table-Driven Decompilation > > Abstract: > Over the years, the LLVM family has grown to include nearly every type of build tool in existence. One of the few missing is a decompiler. LLVM's TableGen tool could
2006 Jul 31
9
Problems with ever-increasing ID value
I have a script that I am using to populate a database from a CSV file: RAILS_ENV = ''development'' require File.dirname(__FILE__) + ''/../../config/environment'' require ''csv'' # Destroy existing data Residence.destroy_all # IMPORT DATA FROM apartments.csv db_file = "#{RAILS_ROOT}/db/apartments.csv" CSV.open(db_file, "r",
2006 Aug 16
5
Dreamhost FastCGI: incomplete headers (0 bytes) errors
Sorry to trouble the list with another Dreamhost problem, but looking through the archives I see nothing that can solve my problem. I have installed my app as per http://wiki.dreamhost.com/index.php/Ruby_on_Rails#Quick_Start_Guide_August_2006 with a symbolic link from my_domain.tld in ~/ to ~/apps/residence/public/ I get the Rails welcome screen. I have uploaded my app directory etc, and
2006 Jan 23
1
How to set-up LCR
How to set-up LCR ? a. which companies can be used with LCR? b. how to set-up & maintain LCR? c. multiple connection to one gateway? Example: +886223456789 could be reachable via a. ENUM free b. Dundi free c. Voipstunt free d. Voipbuster free e. Nufone $ f. Voipstunt $ g. others with 4 concurrent connections $$ h. others with 3 concurrent connections $$ I am looking
2006 Aug 16
6
Experience with ferret on Dreamhost ?
Does anybody have experience with running ferret on dreamhost ? My app is running ok until I install the acts_as_ferret plugin, at which point I get "Rails application failed to start properly" errors. I''ve used script/console to confirm that I can require ''ferret'' and make a new Index object . Everything appears to be ok in that respect. Unfortunately
2006 Aug 16
3
gems vs plugins
Hi, Is there an easy way of converting a gem to a plugin, or at least something you can dump into $RAILS_ROOT/vendor? I''m uncomfortable having stuff like capistrano, the shipping gem, builder, autotest being installed globally as a gem instead of being installed for each application. What do you think? Joe
2006 Jul 09
4
Search terms in URL
I have set up a ferret search using the examples in the demo app. Is it possible to have the search terms included in the URL, so that, for example, users can bookmark a search results page ? Chris -- Posted via http://www.ruby-forum.com/.
2009 May 13
2
File compare word by word
Is there a utility that compares files word by word, instead of whole lines or single bytes? I found that I can simulate this by replacing all the spaces in a file with linefeeds, then 'diff -B' the results, but that's kind of awkward and hard to read when differences that matter come up. (For the record, I tried using OOo's document comparer, converting to text and using diff,
2006 Aug 12
2
How to add # anchor to ferret generated url ?
I have the following action in my controller def search @query = params[:query] || '''' unless @query.blank? @results = Residence.find_by_contents @query end end In my View I have <div id="search-box"> <%= form_tag( { :action => ''search''}, :method => ''get'')%> <input type="text"
2006 Jul 27
2
is there an easy way to move data from one table and copy it
to another? i would like my website to be able to have the user to fill out a web form. i then would like to have a view of my own to either accept or reject what the user filled out. if i accept it, i want the info deleted from where it was stored and then store it to the ''public'' database. i guess its all of a matter of saving each field in the form to a temp table. when
2012 Apr 04
4
[LLVMdev] GSoC Proposal: Table-Driven Decompilation
Hi, Here's one of my proposals for GSoC 2012. What do you think? Chip Project Title: Table-Driven Decompilation Abstract: Over the years, the LLVM family has grown to include nearly every type of build tool in existence. One of the few missing is a decompiler. LLVM's TableGen tool could potentially accelerate development of such a tool; most backends already have the information needed
2003 Jan 21
5
French traduction
I''v finished the french translation of the QuickStart Guides named "Basic two-interface firewall" As i''v not found the email of Tom Eastep i post this news here. I''m translating now the "Standalone", and after i will do the "Three interface" If there is some french guys here, may be they can read to find some errors ?! :) cya -- VETSEL
2007 Sep 05
5
RSpec for dummies screencast?
Does anyone know of any RSpec screencasts for dummies, like me :) I have a Java background, but I have never written a java test in my life. I''ve never learned about TDD or BDD so I''m totally blank on everything that has anything to do with testing and stuff. Where should I start?!? ;) Christian... --~--~---------~--~----~------------~-------~--~----~ You received this
2007 Sep 07
7
Simple websites (no DB?) with Rails??
I have been learning Rails and building small things over the last several months. Question I have that has been surprising difficult to figure out is this (I know it seems somewhat nonsensical but ignore that). I recently started getting a few requests for basic website to be built, small businesses, stores, even individual people. How would one about doing such a thing using Rails? I may not
2006 Oct 03
8
Ferret install, rake failing on make
I''m currently trying to install the latest version of Ferret (0.10.9) on my Ubuntu Dapper (6.06) system. I have tried the gem, but it does not generate the ferret_ext.so file. Ideally I would prefer to install from the gem, but if source works, I''m fine with that too. I am now trying an install from source, but when I run the command ''$ rake ext'' I get the