copy

c++ array to vector issue

Hi, Im trying to copy an array to a vector, however, when the data is copied to the vector its different from that of the original array. int arraySize = 640000; std::vector<unsigned char> vector_buffer; unsigned char buffer[arraySize]; populateArray(&buffer); for(int i = 0; i < arraySize; i++) cout << buffer[i]; // this pri...

Copy one datagrid 2 columns to another datagrid

Copy one datagrid 2 columns to another datagrid in C# ...

Copying an object using a constructor, Java

So lets say I want to make a deep copy of an object, but using its contsructor. So I have: public class PositionList { private Position[] data = new Position[0]; private int size = 0; public PositionList(PositionList other, boolean deepCopy) { if (deepCopy==true){ size=other.getSize(); for (int i=0;i<data.le...

Deep copy of an object array

I want to make a deep copy of an object array using a constructor. public class PositionList { private Position[] data = new Position[0]; public PositionList(PositionList other, boolean deepCopy) { if (deepCopy){ size=other.getSize(); data=new Position[other.data.length]; for (int i=0;i<d...

duplicating php resources

are there any way to duplicate the resources produced by functions such as mysql_query? it may sound dumb but i wanted to reuse such resources so that i won't retype the mysql_query() again and again just to use have a resource..like for example $rsrc = mysql_query('SELECT * FROM `table` LIMIT 0,1'); $rows = mysql_fetch_array($rsrc); ...

Javascript - follow link, copy URL and change original?

Hi all, I don't know if this is even possible in Javascript as am pretty new to it, but hopefully someone will be able to help! I want some Javascript (ideally jQuery) that will follow all the links with a certain word in on a page and then on the next page, there will be a link to an image. I want to copy that link and then go back a...

WinApi ShellExecuteEx - using verb 'copy' on a file list

Hello, is it possible to use ShellExecuteEx to copy or cut a group of files in a given directory ? The Windows function works fine on a single file but I can't find anywhere any tips over the subject (with a file list). I don't expect any alternative method ( such as xcopy) because I need the windows shell function undo/redo after perfo...

Does copy allocate the required memory ?

Hi, Here is an example taken from Apple iPhone SDK project: @interface EADSessionController : NSObject <EAAccessoryDelegate, NSStreamDelegate> { EAAccessory *_accessory; EASession *_session; NSString *_protocolString; NSMutableData *_writeData; NSMutableData *_readData; } ... // initialize the accessory with the ...

Sybase: How to select records from a huge table and insert into another table in chunks

Sybase problem: The selected values of column1 (id) of a huge_tbl table (60 million+ records) needs to be copied into small_tbl table which is comparatively small. The criteria to select rows from the huge_tbl depends on column2 values (mydate). huge_tbl: - id is primary key of huge_table - mydate column is a datetime field. - There is...

Javascript fastest way to duplicate an Array - slice vs for loop

In order to duplicate an Array in Javascript, does anyone know (and maybe tested) if it's faster to use slice method: var dup_array = original_array.slice(); or doing a for loop: for(var i = 0, l = original_array.lenght; i < l; ++i) dup_array[i] = original_array[i]; UPDATE: (just to clarify myself) I know both ways do only a ...

Is there a way to get this C# code to automatically overwrite files?

Is there a way to get this code to automatically overwrite files? // Requires project reference to Microsoft.VisualBasic using Microsoft.VisualBasic.FileIO; class FileProgress { static void Main() { string sourcePath = @"C:\Users\public\documents\"; string destinationPath = @"C:\testFolder"; FileSystem.CopyDirect...

XSLT copying without xsl:copy-of

I've got some *.xml with elements like : <app-method name="leave-accrual-status-details" kind="enquiry"> <title>...</title> <required-roles> <role name="authenticated"/> </required-roles> <asd> <param name="..." datatype="dt:int" control="hidden" call-kind="..." data-kind="..."/> </asd> <data-engine s...

Copy and Paste from an Excel Spreadsheet to a ASP.NET Control

I would like to be able to copy one row and five columns from an Excel spreadsheet to a table like structure on a ASP.NET web form. The idea is keeping the data in the exact row and column from Excel to the table like control on the ASP.NET web-form. Then I want to be able to save to the contents of the ASP.NET control to a database b...

Cannot copy Dictionary 'Value' to a List - C#

Hello, Having followed a tutorial I have a hashtable that contains a TcpClient object that matches with the string of a connected user. After reading about the pro's and cons of a hashtable it was recommended that using a Dictionary is preferred due to it being generic, thus more flexible. From here an array is made that contains the V...

php shared host and mod_security

I'm having difficulty with a php script using copy() on a shared remote host. I've read here the host may simply not allow the use of the copy() function. I started a trouble ticket and the trouble was half fixed and blamed on mod_security. I persisted and now my script is working. A strange last response, after the fix was this: "Unfor...

Need help making HTML's

Hi to all the gurus out there. Anybody whos ever worked in an office enviroment will vouch that the boss somtimes expects the imposible. todays one such day for me. The story starts with an idea to automatically attach unlimited amounts of PDF's to an emial, ussing the Acrobat program. Quickly you begin to understand that Adobe can o...

how to clone content of a div to another div

HI I want to copy the content of a selected div to another div with jquery clone. but I dont want to append it anywhere what I mean is when we make a clone of a div with jquery (correct me if i am wrong) we have to set its position and it will dynamically create a new division which is displayed. but I want to get the content of a se...

Copy and paste text with automated URL added

Hi, I just copied a couple of lines of text of businessinsider.com in to a word document. With that I pasted the text, two lines were automatically aded. It sais read more: http:// the url of the article. I was surprised so I tried the same copy and paste with text from other websites but I didn;t got the same result. I've looked in th...

Is it possible to put strings in the copy buffer?

Preferentially using the standard libraries. ...

Flex - Copying a Single frame ftoma Video

I'm working with video in Flex. I'd like to be able to pause the video at a certain point and copy the displayed frame as an image, and save it to a database. I'm wondering if anybody knows how I might copy a single frame from a paused video? Thanks --Matt ...