clone

How to copy large set of data in SQLServer db

I have a requirement to take a "snapshot" of a current database and clone it into the same database, with new Primary Keys. The schema in question consists of about 10 tables, but a few of the tables will potentially contain hundreds of thousands to 1 million records that need to be duplicated. What are my options here? I'm afraid tha...

jQuery Clone for showing single image

If we select multiple images, how can we show only single image when we are dragging? when I tried to drag, it was showing all the three selected images appended to it. As I'm showing the total count on drag images. My benchmark is Picasa Web Albums. ...

Mercurial clone issue

I'm using Mercurial and I've cloned a repo locally and upon hg push, I'm getting this: abort: cannot lock static-http repository What does this mean? Why can't it lock the static-http repository? Permission issue on the folder? ...

Deeply cloned Panel; controls don't redraw

Hello. I have problems with redrawing child controls of cloned panel. First, I'm not using IClonable. I'm using reflection. My code: public static Panel ClonePanel(Panel panel) { Panel newPanel = (Panel) CloneControl(panel); foreach (Control ctl in panel.Controls) { Control newCtl = CloneControl(ctl); newC...

git-svn clone Errors using git 1.5.1 and 1.6.5 and Subversion 1.4.2

Hello, I am trying to integrate git into my workflow. I'm starting it by using it to manage working copies of code cloned off of a Subversion repository. I've tried using both git 1.5.1 and 1.6.5. Both of these were built from source. I am using an official Debian package for Subversion. Using both versions of git yields the same error...

Why are Java enums not clonable?

Is there any reason why enums in Java cannot be cloned? The manual states that This guarantees that enums are never cloned, which is necessary to preserve their "singleton" status. But returning the instance itself would also preserve its status, and I would be able to handle associated enums the same way as other clonable objec...

jQuery not completely removing draggable/resizable

I'm trying to clone a draggable/resizable element with jQuery. The original element behaves as it should. When I clone it and then try to remove draggable and resizable via the 'destroy' call, it fails to remove the added classes and divs. You can see it in action (or inaction) at the following: jsbin example One of the textareas sho...

JQuery Clone is Conling final row's data

I am running into a problem. I was using: $(this).parents("tr:first").remove(); to delete the row the user clicked on and then: var row = $('#picTableDisplay tbody>tr:last').clone(true) .insertAfter('#picTableDisplay tbody>tr:last'); to replace a new (empty) row at the bottom of the table. But, when the table is full...

How to clone a CharArrayWriter?

In Java 1.5, how can I clone an instance of java.io.CharArrayWriter? CharArrayWriter x = new CharArrayWriter(200); x.write("foo bar bob"); CharArrayWriter y = x.clone(); // Object.clone() is not visible!! Thanks, mobiGeek ...

How to store a Reference Object I want to clone from? Use Singleton?

Situation: There is a Project Resource that has many Resources A each of them having many Resources B When a new Project is created it shall already start with clones of Resources A having clones of Resources B There shall be a Reference Project whose Resources A and B (through A) are cloned from Cloning is done because in this way new...

transform a select list into a ul list

I am trying to clone a select list into a standard ul list for enhanced javascript select box manipulation/styling. Basically, if I do this: $("#calendar select option").clone().appendTo("#test"); i get the following html <ul id="test"> <option>All Types</option> <option>Installation</option> <option>Music</option> <option>Performing ...

Binding does not have a Clone method, whats an effective way to copy it

I wish to copy a binding, this is so i can set a different source property on it without affecting the original binding. Is this just a case of setting all of the properties on the new binding to be the same as the old? ...

Is it possible to clone an IEnumerable<T> instance, saving a copy of the iteration state?

I'd like to create a copy of an IEnumerator<T> so that I can restart the enumeration process from a particular location in the collection. Clearly, there is no benefit to doing so for collections that implement IList, since we can remember the index of interest. Is there a clever way to accomplish this task using a combination of yield...

jQuery ui.draggable - changing the current dragged object (in fullCalendar)

Hello, I've just discovered the fullCalendar jQuery plugin which does pretty much everything I need for the appointment scheduling service I'm building. However, I've hit a small problem. There are "event" elements within fullCalendar agendaDay view which are draggable, however they are locked to the tds of available timeslots. I want...

To clone or not to clone

I wrote a Scale9Bitmap class in AS3 and it requires the dev to set the BitmapData and a Rectangle for the scale9Grid. I'm wondered what is customary for the public get functions of both. Do I return a clone of each to make it free of hanging references, but not as memory-friendly? or do I leave that up to the dev and return the original ...

git clone fails with "index-pack" failed?

So I created a remote repo that's not bare (because I need redmine to be able to read it), and it's set to be shared with the group (so git init --shared=group). I was able to push to the remote repo and now I'm trying to clone it. If I clone it over the net I get this: remote: Counting objects: 4648, done. remote: Compressi...

Clone a locally mounted repository

I keep my bare repositories on an AFS file server, mounted locally. When I clone them, I do git clone --no-hardlinks file:///afs/whereever.foo.bar/myrepository.git I frequently get the following: warning: remote HEAD refers to nonexistent ref, unable to checkout. and no files. This is easily fixed with git branch master or...

How to Clone HttpWebRequest?

I want to set some properties of an HttpWebRequest and then download some files asynchronously. However, I need one copy of HttpWebRequest for each download, so how can I clone it so that I don't have to copy each property "by hand"? ...

Is there an easy/built-in way to get an exact copy (clone) of a XAML element?

I need to make areas of XAML printable and so have make this button handler: private void Button_Click_Print(object sender, RoutedEventArgs e) { Customer.PrintReport(PrintableArea); } And in PrintReport I pack the frameworkelement into other elements in order to print it in a slightly different way than it is on the screen, like t...

A workaround to fix an IE bug with respect to the clone() method in jquery 1.3.2

Hi everyone....!! I am using the Jquery pagination plugin http://plugins.jquery.com/project/pagination to paginate the rows in a table. I also use a little tip provided in another SO question here to correct a bug in the original example... The code is working fine in FireFox and Chrome but not in IE6+... Here is my javascript t...