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
8
votes
1 answer

How to overwrite a function used in a module-method?

#!/usr/bin/env perl use warnings; use 5.012; use utf8; use WWW::Mechanize::Cached; use Some::Module qw(some_method); my $url = '...'; my $result = some_method( $url ); The some_method() uses itself get() form LWP::Simple. How could I overwrite…
sid_com
  • 24,137
  • 26
  • 96
  • 187
8
votes
1 answer

Java - Do not overwrite with bufferedwriter

I have a program that add persons to an arraylist. What I'm trying to do is add these persons to a text file as well but the program overwrites the first line so the persons get erased. How do I tell the compiler to write at the next free…
user1051477
  • 117
  • 1
  • 8
8
votes
3 answers

How to properly overwrite content of file using android storage access framework

>> Background I want to use the SAF (Storage Access Frameword) to save data files of my app to the user's desired location on storage media. I first create the file at app dedicated folder and then copy it to the file that users has selected from…
8
votes
4 answers

How to overwrite __repr__ method for an already-instantiated class python

I'm working with a 3rd-party library which has a poor repr for a class and I would like to overwrite it once an instance of that class has been created. I saw how to create bound methods in an existing object. class toy(): pass inst=…
Juan Felipe
  • 155
  • 1
  • 5
8
votes
4 answers

Firebase Firestore add data without overwrite

I am trying to add data to my firestore database. The firestore is this: Firestore db I have my php file that loads data into it with this code db.collection('events').doc('documentNameUsingUniqueEventID').set({id1:data1, id2:data2, id3:data3,…
Dennis
  • 372
  • 1
  • 2
  • 17
8
votes
2 answers

how to update google drive text file via google script?

I want Google script variable data into Google drive as text file and update that text file regulatory via Google script! The following code creates a text file and writes the data on it.I wonder how i can update the text file later ? function…
user1788736
  • 2,727
  • 20
  • 66
  • 110
8
votes
1 answer

geom_text writing all data on all facets

I used ggplot with facet_grid and I'd like to indicate on each facet the number of observations in each facet. I follow examples provided on many sites but when I get it to write anything, it writes all four observation numbers on top of each other…
Joseph Kreke
  • 667
  • 1
  • 7
  • 18
8
votes
3 answers

Write in an existing file without overwriting in Fortran

I have an existing file written by a Fortran program (formatted) and I would like to add few lines at the beginning of the file. The idea is to do so without making a copy of the original file. I could add a line at the end of the file…
maxhaz
  • 380
  • 1
  • 2
  • 8
8
votes
1 answer

overwrite previous file while uploading image in codeigniter

I'm uploading images in codeigniter, it's working great. But when I try to update the images, codeigniter automatically adds 1 at the end of each image. Which will add unused images in my images directory. How can I overwrite the existing image…
red one
  • 182
  • 1
  • 2
  • 11
8
votes
7 answers

jquery file upload - how to overwrite file NOT rename

I am struggling to update the Jquery file upload plugin so when you upload a file it just overwrites an existing file with the same name instead of renaming it with an upcount. I have applied the change covered in this link:…
user1746582
  • 579
  • 1
  • 9
  • 20
7
votes
3 answers

Make output of command appear on single line

Is it possible to get the output of a command - for example tar - to write each line of output to one line only? Example usage: tar -options -f dest source | [insert trickery here] and the output would show every file being processed without making…
Chris Watts
  • 6,197
  • 7
  • 49
  • 98
7
votes
4 answers

How to overwrite Spring service beans by name, using annotations only

Given I have a Spring bean configured as @Service("myService") public class DefaultService extends MyService { } and a class using this bean public class Consumer { @Autowired @Qualifier("myService") private MyService service; …
Lars Blumberg
  • 19,326
  • 11
  • 90
  • 127
7
votes
3 answers

Is there any other approach for updating a row in Big Query apart from overwriting the table?

I have a package data with some of its fields as following: packageid-->string status--->string status_type--->string scans--->record(repeated) scanid--->string status--->string scannedby--->string Per day, I have a data of 100 000…
hmims
  • 539
  • 8
  • 28
7
votes
5 answers

How to read and overwrite text file in C?

I have a text file text.txt that reads (for simplicity purposes) this is line one this is line two this is line three Again for simplicity's sake, I am just trying to set the first character in each line to 'x', so my desired result would be xhis…
Corey
  • 115
  • 1
  • 1
  • 6
7
votes
3 answers

Overwriting a file in python

I'm trying to over write a file in python so it only keeps the most up to date information read from a serial port. I've tried several different methods and read quite a few different posts but the file keeps writing the information over and over…