copy

How to copy a template and insert content from another document?

雨燕双飞 提交于 2019-12-04 13:17:32
问题 I want to write a Google Docs script that copies a template (which just contains a container bound script) and appends the contents of another document chosen by the user. How would I accomplish this? I already have a way to select the file (the template has a static id), but figure out a way to copy all the content of the document (including inlineImages and hyperLinks) to the my new document. 回答1: I guess the only way is to copy elements one by one... there are a whole bunch of document

Ant copy task corrupts UTF-8 symbols

妖精的绣舞 提交于 2019-12-04 13:13:34
I have a .properties file with translations in Arabic. I am using it to replace strings in an html file. However, when I start the copy task, it completely corrupts the symbols and I get something like this: اÙÙØ²Ø§Ø¯Ø§Øª Any idea what's causing this and how I can fix it? build.xml <target name="copyAndReplace"> <copy todir="..." overwrite="yes" encoding="UTF-8"> <fileset dir="..." includes="*.html"></fileset> <filterset> <filtersfile file="***.properties" /> </filterset> </copy> </target> I see some possible problems: In Java, Properties files are assumed to have ISO-8859-1 encoding. Even if

.NET: How to copy files using Windows “Copy Files” dialog

青春壹個敷衍的年華 提交于 2019-12-04 13:01:16
.NET: How can I copy the files using Windows "Copy Files" dialog. I need to bulk copy multiple files. Does there exists any .NET 2.0 library/method that allows me to do it in crossplatform manner without invoking Windows platform specific libraries. Thanks in advance. In order to use the "Windows 'Copy Files' Dialog" you will be required to invoke "Windows platform specific libraries." SHFileOperation, it is well supported by the standard .NET framework. Add a reference to Microsoft.VisualBasic.dll and use the Microsoft.VisualBasic.FileIO.FileSystem.CopyDirectory() method. Several overloads

How can I preserve subgroups when changing role to public in Copy Headers build phase in XCode?

与世无争的帅哥 提交于 2019-12-04 12:28:25
currently, the hierarchy is flattened out, and all the headers files are copied into a single Headers directory, no matter what subfolder they were in, in my Classes folder. This is a problem when referencing the headers, if the headers have "include" statements that reference other headers in subfolders. in particular, this screws up BridgeSupport compilation. My understanding is the Copy Headers behavior always flattens the file structure. You can either add a custom file copy or a custom script at the end of the process that copies (cp -r) the headers from their original location to your

How do I use javascript to insert an svg use element into an svg group?

孤街浪徒 提交于 2019-12-04 12:03:24
I have an svg file containing a group with a single line element. I can make use of the use element and make several reference copies in any position I want them. However, I want to use javascript to add and remove the use element dynamically. Is there a way to use javascript to insert an svg use element of my line into my group? <svg version="1.1" id="ex1-3rds-quarter-s" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="323.333px" height="55.333px" viewBox="0 0 323.333 55.333" enable-background="new 0 0 323.333 55.333" xml:space="preserve">

piping postgres COPY in python with psycopg2

痴心易碎 提交于 2019-12-04 12:00:10
问题 I'm writing a script to do a copy of some data between two machines on the same network using psycopg2. I'm replacing some old, ugly bash that does the copy with psql -c -h remote.host "COPY table TO STDOUT" | psql -c "COPY table FROM STDIN" This seems like both the simplest and most efficient way to do the copy. It's easy to replicate in python with a stringIO or a temp-file, like so: buf = StringIO() from_curs = from_conn.cursor() to_curs = to_conn.cursor() from_curs.copy_expert("COPY table

Showing UIMenuController loses keyboard

泪湿孤枕 提交于 2019-12-04 11:35:20
问题 I'm making an iphone app similar to the Messages app that comes on the phone. I just set up the ability to copy messages via a UIMenuController, but if the keyboard is showing and someone tries to copy a message, the keyboard goes away (presumably because of my [cell becomeFirstResponder]; where cell is the message cell being copied). Is there a way to show the Copy message without losing the keyboard? - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath: (NSIndexPath

How do I write a yocto/bitbake recipe to copy a directory to the targe root file system

ぐ巨炮叔叔 提交于 2019-12-04 11:13:08
问题 I have a directory of 'binary' (i.e. not to be compiled) files and just want them to be installed onto my target root file system. I have looked at several articles, none of which seem to work for me. The desired functionality of this recipe is: myRecipe/myFiles/ --> myRootFs/dir/to/install My current attempt is: SRC_URI += "file://myDir" do_install() { install -d ${D}/path/to/dir/on/fs install -m ${WORKDIR}/myDir ${D}/path/to/dir/on/fs } I can't complain about the Yocto documentation overall

How do you automate copying file with path too deep issues in Windows?

不问归期 提交于 2019-12-04 10:46:30
I want to be able to selectively copy a list of files and preserve their directory structure. The problem is that there are quite a few files that their path exceeds 256 character. How is this problem usually handled? Edit: I should make it clear that I only want to selectively copy files, not folders. I don't think robocopy can be efficiently used to copy an individual file and it's folder structure effectively. I wrote a VBscript that checks path length and calls subst , as soon as a certain threshold is reached. These calls are stacked on each other so that in the middle of a recursion,

Holding down on text in iOS does not bring up the 'copy' button on jQueryMobile Dialog when using ajax

本秂侑毒 提交于 2019-12-04 10:41:30
I am talking about one of these Dialog boxes that pop up: http://jquerymobile.com/test/docs/pages/page-dialogs.html (short url for mobile http://bit.ly/KhCGVD ) Click 'Open Dialog' -- on that dialog box, nothing is copy-able in iOS without unless 'data-ajax="false"' is used in the link. (works fine on Android) Putting '-webkit-user-select: auto!important;' (or 'text' instead of 'auto') does nothing. Adding the javascript 'document.documentElement.style.webkitTouchCallout = "auto";' does nothing. I am desperate to make this work as I have built an entire thing around the assumption that copy