similar to: Updating only some of the fields of a table.

Displaying 20 results from an estimated 100000 matches similar to: "Updating only some of the fields of a table."

2009 May 11
0
updating join table (HMT) with checkbox and extra fields
Hi, I''ve been breaking my head over this thing with no success. Here is my table layout - class User < AR has_many :memberships has_many :groups, :through => :memberships ... class Group < AR has_many :memberships has_many :users, :through => :memberships ... class Membership < AR belongs_to :user, :class_name => "User", :foreign_key =>
2006 Mar 04
16
Unacceptibly slow.
I currently have a fairly simple Rails application running on FreeBSD under Apache 1.3 and normal CGI, and the performance I''m getting is alarmingly poor. I realize CGI or WebBrick are quite a bit slower than FastCGI, and I''ll probably use one of those instead when I have the time. However, I''m just curious if CGI is really supposed to be that slow, or if
2003 May 23
1
Fw: write.table only writes the first 256 variables/columns
Thanks. I was "believing" an Excel import of the file - as you say, a re-import into R still has 333 columns. I shall look elsewhere for the cause of the mysterious truncation. Stuart > ----- Original Message ----- > From: "Thomas Lumley" <tlumley at u.washington.edu> > To: "Stuart Leask" <stuart.leask at nottingham.ac.uk> > Cc:
2006 Jul 18
2
how to generate calculated db fields
I''m trying to generate a "page slug" i.e. a url sanitized id from some text in my model that I want to be saved into the database and I''m not seeing how I can do it. The closest I''ve come to getting this to work has been... class Page < ActiveRecord::Base attr :name before_save :generate_slug def generate_slug self.slug = self.name.gsub
2009 Mar 18
2
Updating wine with GIT
Hi. Ive used git for some time to download an update wine sources. However, Ive notices a couple of things i dont understand quite much. My general procedure to download sources and compile is this: git clone git://source.winehq.org/git/wine.git ~/wine-git cd ~/wine-git ./configure --prefix=/usr make sudo checkinstall --fstrans=no --pkgversion=1.1.12 Here I've noticed that I have to
2010 Dec 30
3
rake db:seed with has_many through (m:n with seperate table)
My model consists of users and tasks (m:n), the relation is stored in a seperate table sharedtabs (that contains some extra fields). Between tabs and tasks there is a 1:n relation. I have trouble writing my seed.rb: works: (1) tab = Tab.create(:name => ''Admin'', :category => 0) tab.tasks.create(:name => ''Admin_Tab1_Private Task 1'') works: (2)
2017 Jun 27
3
Testing utility for building and updating CFG
Hi folks, I’m working on adding an API for incremental updates to DominatorTree and I noticed that there isn’t a simple way to quickly build and update CFG (just for testing) -- one has to either build CFG programmatically, or write IR by hand and manually map pointers to basic blocks. The downside is that it tends to be pretty verbose and not easy to update (e.g. adding a new edge often involves
2007 Feb 15
1
wildcard fields
Hey all, is there a way to wildcard field searches? As in: - a document like {:title => ''foo'', :description1 => ''bar'', :description2 => ''bar2''} I''d search: index.search("description*: search query") I understand the example above is silly, but it''s enough to make the question understandable :-)
2011 May 04
1
General "nil" reference class object
Dear John and others, I've been wondering about whether there's any way to indicate a "nil" reference class object, which will represent "no value", and be tested for, but not fail the internal type checking. NULL is the obvious choice (or seems so to me), but can only be used if an explicit class union is created: > Foo <- setRefClass("Foo") > Bar
2006 Feb 28
6
Activerecord equivalent of the SQL "SUM()" function.
Search doesn''t seem to be working, so forgive me if I''m covering old ground here, but I''m having a difficult time figuring out how to implement a "SUM()" function using Active record. Obviously, I could just create a query, but I''d rather make it part of my active record object. Basically I have an object called "Report <
2011 Jun 28
1
Using Match in a lookup table
Hi All, I'm having a few problems using match and a lookup table, previous Googling show numerous solutions to matching a lookup table to a dataset, My situation is slightly different as i have multiple lookup tables, (that i cannot merge - for integrity reasons) that i wish to match against my data, and each of these files is large, so lots of for / if conditions are not ideal. (withstanding
2006 Jun 02
1
Grouping models - table name conflicts
Hi all, it''s my first time posting on the list - this is something I couldn''t find anywhere else If I create two models, using ruby script/generate model foo/bar ruby script/generate model baz/bar then the generator has no problem making app/models/foo/bar.rb and app/models/baz/bar.rb, however the migrate files it creates both try to "create_table :bars" I thought
2006 Apr 02
2
Delaying table attribute load using ActiveRecord
Hi all, I came accross the following problem lately: I got a table with several BLOB fields (Oracle DB) and I have ActiveRecord reading those fields whenever records are loaded using finder methods. This behavior is just fine in 99.9% of the time, but considering BLOB data is not small, it is considerably slowing down search access :(. So basically, I thought about building a :has_one
2001 Jul 10
4
accessing a table
Hi, all. I'm sure this is a simple question, but I'm having problems figuring it out myself... I have a table: > currenttable <- table(junk[-1],junk[-n]) > currenttable bar foo junk bar 2 2 0 foo 1 0 0 junk 0 0 1 and I'd like to know the result of the cell currenttable(bar,foo). what is the best way to get that result? thanks!
2006 Jan 04
0
Multiple fields on table X linked to one field on table Y
I have two tables, Users and Projects. Each project has a Project Manager, and each project also has an Expert. Both fields are links to an ID from the Users table. However, neither of them is entitled "user_id." Is there a way to tell the Projects model to reference the Users table for both of these fields, the fields being "project_manager" and "expert" ? Thanks!
2008 Jun 30
1
2.7.0 breaks read.table
Hi, yes a bold statement, but I get different behaviour from 2.6.2 and 2.7.0 in read.table, and I don't find any documentation in http://cran.r-project.org/src/base/NEWS. A file like (space delimited): foo + . bar - . 2.7.0: > tab <- read.table("test.txt",as.is=TRUE) > tab V1 V2 V3 1 foom 0 0 2 bar 0 0 while until now and on 2.6.2 > tab <-
2008 Jan 09
0
problem with checkboxes updating table
I''m having issues getting checkboxes to update a cross-reference table correctly. I keep seeing entries in the locations_users table, for location_id and user_id, "11" and "2", respectively. The user id is fine, but there is no such location with id 11. There are only 5 locations and their ids go from 1-5! I can''t seem to find where the 11 is coming from.
2007 Oct 11
1
A read.table mystery (data for Framemaker Mac)
Dear list, I have to read some clinical data a file coming from Filemaker on Macintosh (Ugh ! But it could be worse and come from Excel...). Exporting via Excel is out of question since the file has 467 columns and 121 lines (+ headers), which is out of reach of Excel. So I received an "mer"" files, which is what Filemaker exports as a text file. It seems to be a semicolon
2010 Feb 03
0
"read.table" and "scan" skips newlines which "count.fields" finds in Thai textfile
Hi there, I have some problems reading in a Thai text. Some of the newlines are skipped. (see the contents of my file below) R>count.fields ("my.txt", sep='\n', quote="") [1] 1 1 1 Three lines with one item each, right? R> scan("my.txt", what="", sep="\t", quote="") Read 2 items [1] "?\x83???\x88
2005 Dec 05
1
count.fields vs read.table
Dear R-help, I am using R 2.1.1 on Windows XP. I have a tab-delimited data file that has been exported by SAS. The file is reasonably big so I apologise that I can't give a good toy example. I do this: table(count.fields("t1.txt", sep="\t", quote="\"")) 248 809 So I have 809 lines, each with 248 fields. There's something wrong with