similar to: optimization

Displaying 20 results from an estimated 100 matches similar to: "optimization"

2007 Jan 03
3
Self-referential habtm with condition is broken
Here''s a simplistic model class. class Person < ActiveRecord::Base has_and_belongs_to_many :relatives, :class_name => ''Person'', :join_table => ''relatives'', :foreign_key => ''from_id'', :association_foreign_key => ''to_id'' has_and_belongs_to_many :brothers, :class_name =>
2006 Aug 14
1
2 foreign keys to one table
Hi, I have a messaging class that has to relationships to one table belongs_to :user, :foreign_key => "from_id" belongs_to :user, :foreign_key => "to_id" At the min I can specify message.user.login and it will return the username of last relationship to that table. how can I get it to bring back both references ie message.from.login and message.to.login thanks scott
2005 Dec 19
4
need some help designing my messaging system
I am trying to create a messaging system for my users but I''m having a hard time designing my db. This is what i have in mind, but I am not sure if its the best approach. user has_one inbox user has_one outbox inbox has_many messages outbox has_many messages inbox table user_id outbox table user_id messages table box_id (refers to either inbox or outbox - how?) from_id to_id
2005 Apr 27
5
Eager load mysteriously deletes records
Hi This looks like a bug in ActiveRecord. I am messing with eager loading (on 12.1) and all of a sudden records started disappearing from a table (and I am not doing anything delete related)!! The following line works OK:- @todos = Todo.find(:all, :include => [ :whens],:order => "position ASC") The following line is mysteriously deleteing :where rows from the DB after
2008 Aug 20
0
activeresource: self.prefix = .../:id/... (need to set :id?)
Hi All As I mentioned in my title I''m using activeresource and the model I''m using has the following prefix self.prefix = ''/institute/:institute_id/services/:service_id/'' All this is great, however I''m now in a situation where I need to save the model, but it translate the prefix as follows /providers/983783784/services//appointments/234234234 So,
2006 Jan 10
0
Paginate with two tables ?
First I read previous thread with similar problem but I don''t find answer (problem is little diffrent) Hello, I have problem with display information from two tables using paginate.. Here is code. ##### SQL create table subscribers ( id integer not null auto_increment, name varchar(32) not null, surname varchar(64) not null, create_timestamp DATETIME not null, modify_timestamp DATETIME
2012 Dec 18
1
Problem with srptools
Hello, I have a problem with the srptools to connect my Dom0 to the scst over IB ressources. *When i''m on the Debian kernel (without Dom0) * root@blade1:/# ibsrpdm -c id_ext=003048ffff9dd3b4,ioc_guid=003048ffff9dd3b4,dgid=fe80000000000000003048ffff9dd3b5,pkey=ffff,service_id=003048ffff9dd3b4
2018 Mar 14
3
the same function returning different values when called differently..
dear members, I have a function ygrpc which acts on the daily price increments of a stock. It returns the following values: ygrpc(PFC.NS,"h") [1] 2.149997 1.875000 0.750000 0.349991 2.100006 0.199997 4.000000 2.574996 0.500000 0.349999 1.500000 0.700001 [13] 0.500000 1.300003 0.449997 2.800003 2.724998 66.150002 0.550003 0.050003 1.224991 4.899994 1.375000
2018 Mar 14
0
Fwd: the same function returning different values when called differently..
Hi Akshay, (Please include r-help when replying) You have learned that PFC.NS and snl[[159]] are not identical. Now you have to figure out why they differ. This could also point to a bug or a logic error in your program. Figuring out how two objects differ can be a bit tricky, but with experience it becomes easier. (Some others may even have some suggestions for good ways to do it.) Basically
2019 Feb 04
2
acl_groups from LDAP issue
Hi! I have some trouble with userdb, ldap an extrafields for acl_groups. There is a script in python, which fetches the groups and sets the environment-variable ACL_GROUPS to this groups. It works when i log in to imap (thunderbird for example shows my? public folders which are protected by acl_groups). But when it try doveadm mailbox list -u user.name the mailboxes are not listed and with
2019 Feb 04
0
acl_groups from LDAP issue
Well, you don't have postlogin scripts when running doveadm. Those are executed by *-login and usually execute the actual protocol handler. Try env ACL_GROUPS=whatever doveadm mailbox list -u test.user Aki > On 04 February 2019 at 14:39 Jakobus Sch?rz <wertstoffe at nurfuerspam.de> wrote: > > > Hi! > > I have some trouble with userdb, ldap an extrafields for
2007 May 24
3
Help with Create and Update with options_for_select in a select_tag
I have a select_tag in my view that uses options_for_select with multiple = true. I am having trouble figuring out the Rails way to create and update that field. Please help. Models: ------------- Service has_many AccessControl AccessControl belongs_to Service application.rb ------------------------- $types = Array["Athens", "htpasswd", "IP", "None",
2008 Jul 10
7
Showing another controllers action
If I am in controller A and I want to show the index of controller B, how would I do that? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To
2008 Jul 16
2
belongs_to causing endless loop on first call to save!
Hi, I have a situation I''m hoping someone out there may be able to shed some light on. I have a Rails app (2.1.0 on Ruby 1.8.7) with a wizard-based sign up process, that has recently been changed from storing incremental data in the database to having a medium sized object graph living in the user session until the user completes the entire sign up process (this is a business
2010 Nov 30
4
Cucumber+Capybara rails 3 issue (Don't know where exactly)
When I''m executing cucumber tests, I noticed that sometimes rails app (in test env.) getting several the same requests (GET or POST) usually around 3, and it doesn''t render anything with empty HTTP status code. Have anyone met something similar to that issue? here is some example of log file: Started POST "/account" for 127.0.0.1 at 2010-11-30 22:34:17 +0200
2005 Jun 24
0
lighttpd - sporadic mysql errors
I''m getting a strange error in the production.log (I''m on a TxD shared server). The first entry is a successful request from right after restarting lighttpd and killing all the procs, the second is the error after accessing the site half an hour later without having changed anything. Restarting lighttpd resolves the issue. What might be going on?
2005 Apr 26
0
NoMethodError (undefined method `fetch_fields' for nil:NilClass)
Hi I''m new to Rails (and Ruby) and I can''t get it to work properly. Every time I want to do something with my database-connection (e.g. use scaffold) I get this, or something similiar (from development.log): >> Beneath this code there''s some more text << ------- Processing CategoryController#index (for 127.0.0.1 at Tue Apr 26 21:43:45 CEST 2005)
2010 Jun 08
3
partial matches across rows not columns
Hi R users, I am trying to omit rows of data based on partial matches an example of my data (seal_dist) is below: A quick break down of my coding and why I need to answer this - I am dealing with a colony of seals where for example A1 is a female with pup and A1.1 is that female's pup, the important part of the data here is DIST which tells the distance between one seal (ID) and another
2012 Mar 02
0
c/c++ Random Number Generators Benchmarks using OpenMP
Dear R gurus, I am interested in permutations-based cpu-intensive methods so I had to pay a little attention to Random Number Generators (RNG). For my needs, RNGs have to: 1) be fast. I profiled my algorithms, and for some the bottleneck was the RNG. 2) be scalable. Meaning that I want the RNG to remain fast as I add threads. 3) offer a long cycle length. Some basic generators have a
2010 Jun 01
2
storing output data from a loop that has varying row numbers
Hi All, I am trying to run a loop that will have varying numbers of rows with each output. Previously I have had the same number of rows so I would use (and I appreciate that this will no doubt achieve some gasps as being thoroughly inefficient!): xdfrow<-(0) xdfrow1<-(1:32) xdfrow2<-(33:64) xdfrow3<-(65:96) xdfrow4<-(97:128) xdfrow5<-(129:160) xdfrow6<-(161:192)