copy

UITextView - preserving carriage returns on COPY - iPhone

Hello Everyone, When I try to copy text from a UITextView to say an Email message to compose and send, the carriage returns (new lines) of the text disappear and the text connects up into one LARGE paragraph. I am not sure why this is happening. How do I fix this? Thanks ...

Can a memory page be moved by modifying the page table?

Is it possible (on any reasonable OS, preferably Linux) to swap the contents of two memory pages by only modifying the page table and not actually moving any data? The motivation is a dense matrix transpose. If the data were blocked by page size it would be possible to transpose the data within a page (fits in cache) then swap pages to ...

How to paste text from one app to another using Cocoa?

I have read about NSPasteBoard in the Apple documentation, and how it allows for applications to write into the PasteBoard and allow other applications to read that text and use it. Could someone tell me how to paste text from am application (that sits in the status bar) into a NSTextField that is inside a different application. What ...

Why should the copy constructor accept its parameter by reference in C++?

Why copy constructor must be passed its parameter by reference? ...

Copy Selective Data from Database to Invoice, Based on Certain Criteria

For starters, here is an example of a microsoft excel database I am working with: Month/Address/Name/Description/Amount January/123 Street/Fred/Painting/100 January/456 Avenue/Scott/Flooring/400 January/789 Road/Scott/Plumbing/100 February/123 Street/Fred/Flooring/600 February/246 Lane/Fred/Electrical/300 March/789 Road/Scott/Drywall/15...

How to duplicate all data in a table except for a single column that should be changed.

I have a question regarding a unified insert query against tables with different data structures (Oracle). Let me elaborate with an example: tb_customers ( id NUMBER(3), name VARCHAR2(40), archive_id NUMBER(3) ) tb_suppliers ( id NUMBER(3), name VARCHAR2(40), contact VARCHAR2(40), xxx, xxx, archive_id NUMBER(3...

MS Access: Copy/Paste selected record programmatically?

Sorry for the lengthy introduction but I think it best to explain the context of my question. I have an Access 2003 database in which users need to create new records based upon pre-existing records already in the table. Some of the users of the database are more familiar with computers in general and create a new record by ... 1. Selec...

Copy from a password field in form

I was designing a form which asks the user to type in a password and then to verify again in the next field. I noticed however, that if I copy and paste from the first password field to the other, the values are not same. It seems my Firefox running on Mac OS X, copies the asterisk graphic instead, which has the value '\x95' Is it poss...

How do I use text in one cell to trigger row to be copied on another sheet in Excel?

I provide all of the cut lists for our cabinet manufacturing in Excel. I tally all parts for the entire job on the first worksheet in an Excel file, and then filter the rows based on the "Material" column, and manually copy/paste each row in to its own material-specific worksheet (example: I filter "Materials" column for "Maple Ply", and...

Shallow Copy in Java

Hello there! I already know, what a shallow copy is, but I'm not able to impliment it. Here's a short example. public class Shallow { String name; int number; public Shallow (Shallow s) { this.name = s.name; this.number = s.number; } } Test the implementation ... public class ShallowTest { public static void main (String[] arg...

Copy an array backwards? Array.Copy?

I have a List<T> that I want to be able to copy to an array backwards, meaning start from List.Count and copy maybe 5 items starting at the end of the list and working its way backwards. I could do this with a simple reverse for loop; however there is probably a faster/more efficient way of doing this so I thought I should ask. Can I use...

In terminal, merging multiple folders into one.

I have a backup directory created by WDBackup (western digital external HD backup util) that contains a directory for each day that it backed up and the incremental contents of just what was backed up. So the hierarchy looks like this: 20100101 My Documents Letter1.doc My Music Best Songs Every First Songs.mp3 My...

SQL Server 2005: When copy table structure to other database "CONSTRAINT" keywords lost

Snippet of original table: CREATE TABLE [dbo].[Batch]( [CustomerDepositMade] [money] NOT NULL CONSTRAINT [DF_Batch_CustomerDepositMade] DEFAULT (0) Snippet of copied table: CREATE TABLE [dbo].[Batch]( [CustomerDepositMade] [money] NOT NULL, Code for copy database: Server server = new Server(SourceSQLServ...

C++ vector reference parameter

Hello folks, let's say we have a class class MyClass { vector<vector<int > > myMatrice; public : MyClass(vector<vector<int > > &); } MyClass::MyClass(vector<vector<int > > & m) { myMatrice = m; } During the instanciation of MyClass, I pass a big vector < vector < int > > and I find that the object is actually copied and not ...

NSFileManager crashing in app delegate

I have this code in a method called from applicationDidFinishLaunching. It works in the simulator, but crashes on the iPhone. There are about 1,600 2KB mp3 files being copied in this operation. If I try to instantiate the app multiple times, it will eventually copy more each time until the app eventually will start without crashing. I am...

Extracting a reference from a c++ vector

Hello folks, I have a vector< vector< vector< int>>> and I would like to extract from it a vector< vector< int>> to process it individually. The problem is that when I write : myMatrix = myCube[anIndex]; the matrix is copied but I only want a reference in order to save memory. Can you please help me out ? Thanks a lot! ...

LLBLGen: Copy table from one database to another

I have two databases (SQL Server 2005) with the same table schemes. I need to copy data from source table to destination with some modification of data along the way. And if destination table already contains some data, then rows from source table should not override, but be added to the destination table. In our project we use LLBLGen...

How can I copy a SQL record which has related records in other tables to the same database?

Hi. I created a function in C# which allows me to copy a record and its related children to a new record and new related children in the same database. (This is for an application that allows the use of previous work as a template for new work.) Anyway, it works great... Here's a description of how it accomplishes the copy: It popul...

Routine for windows recursive copy of a folder - just subfolders with a certain name

Should be suitable for copying from UNC drive. Only subfolders named "XYZ" and their chidren are copied. Parent hierarchy is kept. Is there one line routine for doing that ? Generally speaking anything will do ( .Net , PowerShell ). ...

C# copy file to another directory using other domain/username/password

Hello, In c# 2008, I'm trying to copy a file to a destination path (for example \newserver\destinationFolder), that can be in another domain or using a different username/password than the current user. How can I specify these new network credentials before doing the File.Copy(...) ? Thank you! ...