similar to: How to make a deep copy of ActiveRecord

Displaying 20 results from an estimated 20000 matches similar to: "How to make a deep copy of ActiveRecord"

2013 Sep 06
2
[Gluster-devel] GlusterFS 3.3.1 client crash (signal received: 6)
It's a pity I don't know how to re-create the issue. While there are 1-2 crashed clients in total 120 clients every day. Below is gdb result: (gdb) where #0 0x0000003267432885 in raise () from /lib64/libc.so.6 #1 0x0000003267434065 in abort () from /lib64/libc.so.6 #2 0x000000326746f7a7 in __libc_message () from /lib64/libc.so.6 #3 0x00000032674750c6 in malloc_printerr () from
2005 Jan 07
3
multicolumn primary keys in activerecord
hi, I''ve got the following tables in mysql notation: CREATE TABLE `nodes` ( `id` int(11) NOT NULL auto_increment, `parent_id` int(11) default ''0'', `group_id` int(11) default ''0'', PRIMARY KEY (`id`), ); CREATE TABLE `groups` ( `parent_id` int(11) NOT NULL default ''0'', `id` int(11) NOT NULL auto_increment,
2006 Aug 10
6
Getting started w/ Ruby on Rails
Hi, I would like to get started with RoR, since it seems to be a terriffic platform for Webdevelopment. However, I''m unsure what "level" you need to be on in terms of programming to get started? Best regards, Gustav -- Posted via http://www.ruby-forum.com/.
2006 May 17
6
ActiveRecord#to_param
Hello, to implement some some kind of optimistic locking, I want to build a view, where an object is displayed together with a link containing the data of the displayed object. My first try looked something like <%= object.object_discription %> <%= link_to "action", :action => "take_action", :data => object %> this won''t work because object is of
2011 Jun 16
1
Deep cloning an ActiveRecord
I have a situation where I want to duplicate an ActiveRecord including duplication of has_many relationships. I''ve seen a few plugins but it seems unclear if they will work on Rails3. So I was wondering if anyone has a good suggestion for a plugin they are currently using to do this? Basically I''m doing this because I have an object that I want to allow my users to edit. I
2012 Apr 14
1
deep copy?
Is putting a variable into a list a deep copy (and is tracemem the correct way to confirm)? warmstrong at krypton:~/dvl/R.packages$ R > x <- rnorm(1000) > tracemem(x) [1] "<0x3214c90>" > x.list <- list(x.in.list=x) tracemem[0x3214c90 -> 0x2af0a20]: > Is it possible to put a variable into a list without causing a deep copy (i.e. if you _really_ want the
2009 Jun 07
1
[LLVMdev] Basic Block / CFG Deep Copy?
Does LLVM offer any way of obtaining a deep copy of a CFG, that is all the basic blocks of a function and their instructions. I'm asking because I would like to implement continuations in my VM and I need to create a modified version of some functions. I thought a simple way of doing this would be to modify a copy of the code generated for the orignal function. This would be simpler than
2002 Jun 22
1
Samba 2.2.5 - Cannot copy The path is too deep
I recently installed Samba 2.2.5 from the FreeBSD ports. It seems Samba works fine when browsing the Samba server from WinXP client, etc. I can copy files from the Samba server, and even create small files and copy small files TO the Samba server. The problem seems to be if I try to copy any file greater than 16Kbytes or so to the Samba server. When I do so, Windows XP complains with an error:
2004 May 05
0
Can not copy file, "The Path is too deep"
This is Red Hat Enterprise Linux 3.0 server. It has the following samba packages installed: samba-3.0.2-6.3E samba-swat-3.0.2-6.3E redhat-config-samba-1.0.16-1 samba-common-3.0.2-6.3E samba-client-3.0.2-6.3E It is a standalone domain member server, joined to WinNT 4.0 domain. Everything works fine, except I could not copy large file from Windows to Samba share, always got this "The Path is
2004 May 05
0
Problem solved - Re: Can not copy file, "The Path is too deep"
It turned out that Samba can not handle the following situation: 2 network cards bonded together, and they are connected to different switches. Samba can handle the following situation: 2 network cards bonded together, and they are connected to the same switch. Thanks, Hai >>> "Hai Wu" <hwu3@wpo.it.luc.edu> 05/05/04 12:34 PM >>> This is Red Hat Enterprise
2006 Oct 11
5
Marshal Data too short error with ActiveRecord sess. storage
I''m seeing a "marshal data too short" error with an ActiveRecord store for my session data. Other posts say that this happens when the size of the session data exceeds the size of the "data" column in the sessions table. But my "data" column is a TEXT field so it seems unlikely that I could have blown it out. Has anyone else seen "marshal data too
2004 Apr 05
1
Deep copy in R
I am handling spatial data of huge volumes, so sensitive to the silent duplication of data in script programs. In the following R program, exactly when is the vector data deeply copied? Thanks in advance. 1 v <- 1:10000 2 z <- f(v) --------- function f ---------- 3 f <- function(x) { 4 y = x 5 y[10] = 1 6 xf = date.frame(x=x) 7 xf$x[10] = 1 8
2006 Jun 26
1
ActiveRecord, instance_eval, and PStore
I''m trying to add some per-object behaviors to objects descended from ActiveRecord, by using after_initialize() and instance_eval(), like this: def after_initialize self.instance_eval(File.read(''customers/default.rb'')) end (Ultimately the file path will be dynamic, this is just proof of concept.) default.rb just contains a few method definitions like this one: def
2016 Apr 05
1
Assignment operator and deep copy for calling C functions
Hi All, i have a problem in understanding what the assignment operator '<-' really is doing. If i create two numeric arrays in R and copy one into the other with '<-' and afterwards change one array by calling a C function, both arrays are changed! The problem I am facing can easily be seen in the following example: (The following R code and the C function is attached and
2013 Sep 05
1
Why does duplicate() make deep copies?
Some experimentation with the below function should convince you that the runtime of the bit inside sys.time is proportional to size*number*times. I think it should only be proportional to number*times. The function is only manipulating a list of references to vectors and not trying to make changes to the vectors themselves. overcopying <- function(size, number, times) { #Make a list of
2006 Apr 23
4
ActiveRecord: Exclude some columns while fetching
I have models with large TEXT, BLOB columns and I don''t wanna fetch them everytime. Is it possible to omit columns when fetching records from DB? Sorry, if it''s trivial, but I can''t find helpful information in docs.
2014 Mar 17
1
Deep copy of factor levels?
Hi It seems that selecting an element of a factor will copy its levels (Ubuntu 13.04, R 3.0.2). Below is the output of a script that creates a factor with 10000 elements and then calls as.list() on it. The new object seems to use more than 700 MB, and inspection of the levels of the individual elements of the list suggest that they are distinct objects. Perhaps some performance gain could
2015 Sep 21
3
New software based on libvirt
Hello, I'm introducing to you the decentralized cloud Cherrypop. Combining libvirt and LizardFS (as of now) it becomes a cloud completely without masters. Thus, any node is sufficient for the cloud to be up and therefore no wasted resources and no single point of failure. It's still pretty crude software but will work with some tinkering. Hope you try it and like it! For more
2013 Aug 21
1
Gluster 3.4 Samba VFS writes slow in Win 7 clients
Hello? We have used glusterfs3.4 with the lasted samba-glusterfs-vfs lib to test samba performance in windows client. two glusterfs server nodes export share with name of "gvol": hardwares: brick use a raid 5 logic disk with 8 * 2T SATA HDDs 10G network connection one linux client mount the "gvol" with cmd: [root at localhost current]# mount.cifs //192.168.100.133/gvol
2006 Jul 28
2
Delete has_many_and_belongs_to_many relation
Hi there, Just a simple question I guess, but I am unable to find an anwser... How to delete a hmabtm relation? Any help will be appreciated :) Thanks, Fabrice. -- Posted via http://www.ruby-forum.com/.