similar to: Rails:Using Insert statement in active record?

Displaying 20 results from an estimated 8000 matches similar to: "Rails:Using Insert statement in active record?"

2006 Apr 26
0
active record adding odd chars to insert statement
I''ve got some code that creates a Company object and saves it: c = Company.new( :name => params[''company''], :account_valid_until => mysql_date_format(14.days.from_now), :account_type => ''standard'' ) c.save but in the SQL generated by AR, I see (with ''name'' being what was entered): ''--- \n-
2012 Mar 27
1
RSqlite UPDATE command problem
All: I am using RSqlite and want to be able to update individual values in a record, such as with this simple example: library(RSQLite) drv<-dbDriver("SQLite") con<-dbConnect(drv,"test.db") my.data<-data.frame(countries=c("US","UK","Canada","Australia","NewZealand"),vals=c(52,36,74,10,98))
2017 Aug 15
1
[Bug 1168] New: type nat hook output doesn't work anymore
https://bugzilla.netfilter.org/show_bug.cgi?id=1168 Bug ID: 1168 Summary: type nat hook output doesn't work anymore Product: nftables Version: unspecified Hardware: x86_64 OS: All Status: NEW Severity: normal Priority: P5 Component: kernel Assignee: pablo at netfilter.org
2006 Oct 10
1
Python/sqlite date time problems.
Bear with me, this is CentOS related. :) I have a python CGI that's behaving weirldy on Whitebox systems that've been switched over to CentOS 4 (ages ago, no other problems to speak of aside from this one). I've broken the problem down to a minimal test case... 1. Create a small database # sqlite3 /tmp/testcase.db 'CREATE TABLE testtable ( date date primary key unique, name
2010 Oct 13
1
RODBC: forcing a special column to be read in as character
Dear R-users, I am working with R version 2.10.1 and package RODBC Version: 1.3-2 under windows. Say I have a table "testtable" (in an Access data base), which has many different columns, among them a character column "X" with "integer-like" data as "0012345". Using sqlFetch, I'd like to assure that column X is read in as a character variable. So what
2006 May 22
1
Active Record Migrations -> Table Relations
Hi there ! I am currently investingation ROR. I really like the idea of specifying my database schema via Migrations, but one questions came to my mind. How does one specify Table relations in the migration ? 1. There is a fancy way of doing it with Active Records. 2. I just add manually some Integer ID columns etc... and lateron add the Foreign Key semantic via SQL.. Which one of the above
2010 Oct 22
1
RODBC: data base with decimal point ","
Dear R-users, I am working with R version 2.10.1 and package RODBC Version: 1.3-2 under windows. Say I have a table "testtable" (in an Access data base) with 3 columns and 1 row that looks like this: X Y Z 0012345 42 42,1 The columns are of these types: X - character, Y - Long Integer, Z - Decimal. I use RODBC to get these data into R: > library(RODBC) >
2009 Aug 31
3
Migration - wrong SQL statement is created
Hi, I am doing my first steps with RoR and I have the following problem: I execute my migration file with the following content on a MySQL-database via Rake: <code> class CreateUsers < ActiveRecord::Migration def self.up create_table :users do |t| t.integer :id t.string :username, :size => 100 t.string :password, :size => 100 t.string :email, :size
2011 Feb 04
2
Finding non-normal distributions per row of data frame?
This is my first attempt at this, so hopefully a few kind pointers can get me going in the right direction... I have a large data frame of 20+ columns and 20,000 rows. I'd like to evaluate the distribution of values in each row, to determine whether they meet the criteria of a normal distribution. I'd loop this over all the rows in the data frame, and output the summary results to a new
2007 Nov 15
0
Problems connecting to remote Oracle DB on windows using active record
I am trying to connect to an older oracle DB remotely, I think version 8 or 9. I downloaded the instant client stuff from oracle and copied oci.dll and oraociei10.dll to my windows/system folder (windows XP) I get the error. C:\rb-play>ar_connect_ss.rb env.c:257:in oci8lib.so: ORA-12514: TNS:listener does not currently know of serv ice requested in connect descriptor (OCIError) from
2011 Jul 27
0
require specific version of active record
I have been having a strange problem with including active record outside of rails when it works ok in rails 3.0.3. When I do ''gem list'', I get this: actionmailer (3.0.9, 3.0.3) actionpack (3.0.9, 3.0.3) activemodel (3.0.9, 3.0.3) activerecord (3.0.9, 3.0.3) activeresource (3.0.9, 3.0.3) activesupport (3.0.9, 3.0.3) So then I tried the code below, but I get this error:
2017 Aug 22
3
Rounding of problem with sum command in R
Hello I have a vector v=c(0.08844446,0.1744455,0.1379778,0.1209769,0.1573065,0.1134463,0.2074027) when i do sum(v) or 0.08844446+0.1744455+0.1379778+0.1209769+0.1573065+0.1134463+0.2074027 i am getting output as 1 But if i add them manually i get 1.00000026 I do not want to round of my value since it effect my code further Can anyone suggest how can i avoid this. Thanks & Regards Niharika
2012 Mar 24
3
Learning to rank
Dear Sir, I am Pankaj Singhal from Jaipur, India. I am very much interested and strongly looking forward in getting involved in this project Learning-to-Rank. My previous experience in this field is good. Last semester I did a similar job of ranking the URLs of the given huge dataset based on their attribute values. The dataset consisted hundreds of thousands of URLs and each url
2006 May 06
0
Cant read an Array as an attribute of a record
I am trying to check the size of an array in a newly created object, and am getting an "undefined method" error. I have written a minimal test case. Can someone spot the issue here? I''m sure I''m missing something simple.... I realize that I''m not saving the object to the database, I''ve got a requirement to create and manipulate it in memory before
2018 Mar 25
4
[PATCH v2 0/2] drm: Replace list_entry
Replace list_entry with list_{next/prev}_entry. Arushi Singhal (2): gpu: drm/lease:: Use list_{next/prev}_entry instead of list_entry gpu: drm: nouveau: Use list_{next/prev}_entry instead of list_entry drivers/gpu/drm/drm_lease.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- changes in v2 *All the
2011 Jul 05
7
error of "rake test" command
Hi, I have an error when i use rake test, plz help akyen@ubuntu:~/Desktop/p$ rake test WARNING: Global access to Rake DSL methods is deprecated. Please include ... Rake::DSL into classes and modules which use the Rake DSL methods. WARNING: DSL method Pictographs::Application#task called at /usr/local/ lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/application.rb: 215:in
2010 Jan 07
1
Active Record Error
I''ve had to download an existing Rails project and I''m attempting to setup locally. I''ve installed all the 2.1.1 rails gems needed by the project as the existing site is at that version. My platform is Netbeans 6.8 on Windows Vista for development and prod is on linux. I''ve been able to setup test and other sites using the latetest version of rails but cant seem
2002 Jul 08
3
How to freeze & thaw ext2(ext3) file system?
hi... i intend to develop a backup application for linux platform... the workflow is as follows: - freeze the file-system(ext2 or ext3) - take the bckup - release the file system. i am not able to find the relevant ioctl or api for freezing & releasing the file system... so... i need some help... thanks... Satish Singhal __________________________________________________ Do You Yahoo!?
2011 Jul 27
9
Migration to rails2 rails3
Good evening everyone, I went to change the Rails version of my project, and saw that many things have stopped working. As the "rake routes", which is giving the following error: rrmartins rodrigo @: ~ / Documents / vota_prato $ rake routes rake aborted! no such file to load - tasks / rails (See full trace by running task with - trace) What do you think you can be? thanks -- *
2009 Jul 21
1
synatx error while running migration
hello to all, i am getting weird syntax error while running the rake db:migrate syntax error, unexpected tSYMBEG, expecting kDO or ''{'' or ''('' Apparently i am creating an engine in my main application using ''ruby script/generate plugin'' command in rails 2.3.0 with engine having its own separate database define in database.yml of main