Questions tagged [clone]

A clone is a copy of an object with all of the same attributes, data, and methods as the original object. Or a software system that is designed to mimic another system.

A clone is a copy of an object with all of the same attributes, data, and methods as the original.

In practice, an object is cloned when you want to duplicate the original exactly and then change it in some way, such as changing a due date on a recurring task or linking it to a different object in a database hierarchy.

In computing, a clone is a hardware or software system that is designed to mimic another system.

See Also:

4519 questions
2
votes
2 answers

Unable to create accurate copy of a Kinetic.js stage / layer

I'm trying to build in a change history, rather than a diff style history, I've opted to save the entire object. This becomes problematic because each copy of the object updates along side the original object. The Kinetic.Node.clone method seemed…
Korvin Szanto
  • 4,531
  • 4
  • 19
  • 49
2
votes
4 answers

super.clone() operation not works in Derived Class

This is raised because of the technical difficulties faced in my Project. Problem: I need to clone a Object of a Class where it extended the properties(Inheritance) from a third party library class(where we don't have access to modify its…
omega
  • 592
  • 2
  • 5
  • 21
2
votes
2 answers

How to write my own clone function

Every object-oriented language (or language which supports OOP), be it C++, Java, Python, PHP has a clone function of its own, which can return a deep or shallow copy of an object. Can anybody tell me how to create my own clone function from…
SexyBeast
  • 7,913
  • 28
  • 108
  • 196
2
votes
1 answer

cloned accordion is not functioning like original accordion

I’m using jquery accordion in a web application. And I want to use this accordion in multiple places. So, I thought of cloning it. But the cloned accordion is only giving me the image of original clone and it’s not functioning like that of original…
poonam
  • 43
  • 1
  • 9
2
votes
2 answers

Why a SELECT in a cloned DIV has a wrong behavior when refreshed?

I'm using the .clone() function of jQuery Mobile to clone a div in a form so I can have repeatable sections, but now I have a problem with nested selects. Once the div is cloned and the nested selects are updated with the new id, something strange…
bontoJR
  • 6,995
  • 1
  • 26
  • 40
2
votes
0 answers

Object cloning with cyclic reference chain

I'm running some operations on a graph in memory, which modify the graph itself. I need to repeat these operations some number of times, and subsequent repetitions must work on a fresh copy of the graph. Since the graph is generated by parsing a…
Andy Hunt
  • 1,053
  • 1
  • 11
  • 26
2
votes
1 answer

Lazy list clone

I have a List with a large amount of elements in it. I need to create a copy of this list to perform operations on it without altering the original list. However, the operations typically only access a small proportion of the elements of the list,…
Strigoides
  • 4,329
  • 5
  • 23
  • 25
2
votes
2 answers

clone() not working internet explorer 8

I have this code: openPopup.hide(); var substr = popupId.split('-'); var clone = $("#popup"+substr[1]).clone(true); $("#popup"+substr[1]).remove(); $(openPopup).html(clone); $.dimScreenStop(); It works well in IE 7, IE 9,…
JohnSmith
  • 417
  • 4
  • 10
  • 21
2
votes
3 answers

C# Cloning Objects that implement neither IClonable or ISerializable

I've tried everything I can think of and cannot figure this out. Basically, I'm making an Outlook 2010 Add-In that makes adjustments to incoming HTML formatted emails for the purposes of making them more Accessible to visually-impaired users…
2
votes
3 answers

git shallow clone along with branch

I have to deal with a git repo that contains some binaries. I would be REALLY grateful if someone could explain this to me >git clone --depth 1 -- ssh://git/foo/bar.git test_d Cloning into 'test_d'... remote: Counting objects: 289, done. remote:…
GiM
  • 460
  • 4
  • 13
2
votes
1 answer

Cloning elements that have Twitter Bootstrap popover produces a popup in the wrong place

I have had problems getting Bootstrap popovers working with dynamically created elements (but that's for a different question). So as a workaround, and because the content of these popover elements is not actually dynamic itself, I decided to…
Bletch
  • 486
  • 7
  • 9
2
votes
1 answer

Creating Clones of Forms using jQuery

using jQuery, how can you create a clone of a form without modifying the original form when a different value is selected in the clone. Currently, when selecting a value in the cloned form, the results that is returned is added to the results of the…
user1655304
2
votes
2 answers

jquery clone drag

i m having a problem in appending a tag over an area. I am tring to append the clone of #Normal_Tag1_div to #droppable after changing the id. I also want to make that clone draggable over #droppable only . How can i do…
Nishima
2
votes
2 answers

jquery clone id

can anyone tell me how can i make an element draggable by cloning it and at the same time changing its id so that i access the cloned element and apply changes over it. I have an application of post its . i want to drag the tag over an area and…
Nishima
2
votes
3 answers

jquery clone problem

Can anyone tell me how can i clone an element and then change its id. Can anyone provide me with some sample code. i want to generate a clone with a different id the code given below. $("#Normal_Tag1_div").draggable({ helper:'clone', …
Nishima