Questions tagged [overwrite]

Overwriting is a process of replacing content with other content in place. It can be physically replaced on storage, or overridden with newer version of content type.

Overwriting is a process of replacing content with other content in place. It can be physically replaced on storage, or overridden with newer version of content type.
Not to be confused with Override in Object Oriented Programming.

1479 questions
11
votes
5 answers

How to copy certain files (w/o folder hierarchy), but do not overwrite existing files?

I need to copy all *.doc files (but not folders whose names match *.doc) from a network folder \\server\source (including files in all nested folders) to a local folder C:\destination without preserving the nested folders hierarchy (i.e. all files…
Vladimir Reshetnikov
  • 11,750
  • 4
  • 30
  • 51
11
votes
5 answers

Merge "Defaults" array with "Input" array? PHP Which Function?

Lets say you are having a user provide information. Array 1 But not all is required. So you have defaults. Array 2 Does PHP have a function which will overwrite all array values of Array 2 based on if they are supplied in Array 1, and not empty?
Orangeman555
  • 1,179
  • 2
  • 21
  • 45
10
votes
4 answers

Insert Where Not Exists-Without Primary Key

I have 3 tables: dentists, groups, and groupdentlink. Many dentists link to many groups through the groupdentlink table. So I'm trying to make a query where it will insert rows into groupdentlink (linking all dentists in the state with all the…
Brian Barrus
  • 385
  • 3
  • 6
  • 17
10
votes
2 answers

Maven overwrite resource file in dependency

I have two Maven modules, A and B. A is a dependency of B. Both modules have a resource file named default.properties located in src/main/resources. I need to keep the filenames the same and the location of the file the same in both projects because…
user1040535
  • 201
  • 1
  • 3
  • 14
10
votes
2 answers

How to extend django admin view?

i want to display additional sidebar in my django admin index. I have created templates/admin/index.html and it show up. Now i need some data from model. To do this I have created index function in the file admin/views.py def index(request): …
kierzniak
  • 606
  • 5
  • 15
10
votes
1 answer

Windows: Overwrite File In Use

I am trying to write a utility that will allow moving files in Windows, and when it finds a file in use, will set that file to be moved on reboot. It seems that MoveFileEx (http://msdn.microsoft.com/en-us/library/aa365240(VS.85).aspx) is the right…
singpolyma
  • 10,999
  • 5
  • 47
  • 71
10
votes
3 answers

Overwrite resource file with maven assembly plugin

I use maven-assembly-plugin with "jar-with-dependencies" to package jar. There are 2 dependencies artifact having log-back.xml. The second artifact is depend on the first one. I want to have log-back.xml of the second artifact in final jar, but it…
Loc Phan
  • 4,304
  • 4
  • 29
  • 35
10
votes
2 answers

Only copy modified files in maven-war-plugin

I'm currently using maven 3.x with the maven-war-plugin. For developer builds I would like to be able to use the war:exploaded goal, but only copy resources that have changed. Is there a way to do this? I've been looking through the docs and have…
davija
  • 301
  • 2
  • 3
  • 10
10
votes
2 answers

Import and overwrite duplicate rows

I'm importing some rows to my postgres database like so: psql -U postgres import_test < 1432798324_data Where my import_test is my database and 1432798324_data file is just plain text formatted like: COPY cars FROM stdin;
Robert
  • 681
  • 1
  • 6
  • 19
10
votes
3 answers

Read and Writing to a file simultaneously in java

I'm reading a file line by line, and I am trying to make it so that if I get to a line that fits my specific parameters (in my case if it begins with a certain word), that I can overwrite that line. My current code: try { FileInputStream fis =…
iphonedev7
  • 295
  • 1
  • 7
  • 17
9
votes
5 answers

Gradle exclude java class from lib replaced by own class to avoid duplicate

In Android Studio, there is a specific file (src/org/luaj/vm2/lib/jse/JavaMethod.java) that I need to overwrite from a package that is pulled in via Gradle (dependencies {compile 'org.luaj:luaj-jse:3.0.1'}). I copied the file into my source…
Dakusan
  • 6,504
  • 5
  • 32
  • 45
9
votes
1 answer

Loopback: Passing multiple object types in a remote method

I have an issue where when I pass two object types as a remote method argument, the first argument gets overwritten by the second argument. Below is code and results. How could I go about not having the second argument not overwrite the first…
emarel
  • 371
  • 7
  • 30
9
votes
4 answers

Overwrite file on server (PHP)

I am making an Android application that need to be able to push files onto a server. For this I'm using POST and fopen/fwrite but this method only appends to the file and using unlink before writing to the file has no effect. (file_put_contents has…
Luke Pring
  • 992
  • 3
  • 11
  • 16
9
votes
4 answers

What's the best way to reset a char[] in C?

I use a string: char word[100]; I add some chars to each position starting at 0. But then I need be able to clear all those positions so that I can start add new characters starting at 0. If I don't do that then if the second string is shorten…
goe
  • 5,207
  • 14
  • 45
  • 49
9
votes
2 answers

How to directly overwrite with 'unexpand' (spaces-to-tabs conversion)?

I'm trying to use something along the lines of unexpand -t 4 *.php but am unsure how to write this command to do what I want. Weirdly, unexpand -t 4 file.php > file.php gives me an empty file. (i.e. overwriting file.php with nothing) I can…
jezmck
  • 1,138
  • 3
  • 18
  • 38