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
-2
votes
2 answers

Output without overwriting

Is it possible to write text to a file without overwriting previous data? What I have done always is: StringBuffer sb = new StringBuffer(); BufferedReader in; PrintWriter out; try{ in = new BufferedReader( new FileReader("somefile.txt")); …
Mordechai
  • 15,437
  • 2
  • 41
  • 82
-3
votes
1 answer

concatenate words in a text file

I have exported a pdf file as a .txt and I observed that many words were broken into two parts due to line breaks. So, in this program, I want to join the words that are separated in the text while maintaining the correct words in the sentence. In…
Natalia Resende
  • 185
  • 1
  • 1
  • 15
-3
votes
1 answer

C++ How to overwrite data in text file in c++?

#include #include using namespace std; string dataFile = "data.txt"; int counter; int main() { string input =""; fstream data; data.open(dataFile, ios::app | ios::out | ios::in ); getline(data, input); if…
sa5mmm
  • 11
  • 5
-3
votes
1 answer

Batch file to copy & overwrite files regardless of file names

I need to create a batch file that runs a daily backup of 10 files on to our server. To provide a brief background, we use a payment system that spits these files out each day, we'd like to ensure these are uploaded on to the server daily however,…
Admaine
  • 43
  • 8
-3
votes
2 answers

Calling an overwritten child method from parent class?

I am wondering what would theoretically be the output of this code? Basically I am overwriting a method in the child class but I am calling that method in the parent class. I am hoping the output of this would be "Child" public class Animal { …
user3312266
  • 187
  • 1
  • 4
  • 14
-3
votes
3 answers

Code a webpage to self destruct after viewed

I have a message "my secret message" that I will type up on a html or php page. myexample.com/secretlink.html How can I make it that when someone accesses my page a timer maybe with JS will start(easy part) but when timer is up it activates a code…
Sammy7
  • 364
  • 6
  • 21
-3
votes
1 answer

how to change a php file from write to to overwrite

Hello I have a piece of code that writes to a text file, but I want the php file to completely overwrite the content of the text file, not just add to it, how must I rework my code to make it overwrite instead of just write. this is my code: …
parseguy
  • 129
  • 2
  • 17
-3
votes
4 answers

How can lists in a list be overwritten by new lists in a new list in Python?

If someone knows how to phrase the question to make it clearer, feel free to edit it! I have a list like this: a = [["Adolf", "10"], ["Hermann", "20"], ["Heinrich", "30"]] and I have an 'update' list like this: b = [["Rudolf", "40"], ["Adolf",…
d3pd
  • 7,935
  • 24
  • 76
  • 127
-3
votes
2 answers

Why is the variable of object of class box not being overwritten in another class?

public class Box{ public int length,width,height; public int volume; Box(int i, int j, int k){ this.length=i; this.width=j; this.height=k; } void setvolume(int i){ this.volume=i; } int…
Prabhjot Rai
  • 27
  • 1
  • 3
-3
votes
3 answers

How to overwrite whole page with new content with php?

I want to clear the other contents and rewrite the whole page with different content. I have: Mainpage: //blah blah, some pre-coded content Script.php
KevinT.
  • 272
  • 6
  • 16
-3
votes
1 answer

Why overwrite the ajax my content div width, if you click an internal links?

I have a function which load the internal links. The function is work fine except one thing. When you click a link, the content width is changed, to be smaller. I don't know why. { $(function() { $(".home…
-3
votes
3 answers

Python, adding a file into another file

I have to define a function: save_file(filename, new_list) which takes a file name and a new list and writes that list to the file in the correct format. So, for example, save_file(’file.txt’, load_file(’file.txt’)) (load_file is a predefined…
-3
votes
1 answer

java arraylist overwrites existing elements

I seem to have a frustrating problem - an element of my arraylist is overwritten. I have looked at many posts in many forums, but I have not managed to solve it. :chomp: In my program (which is actually a FBDK function block algorithm implemented…
Karel
  • 13
  • 1
  • 4
-4
votes
2 answers

CSV from a form php

I'm a begginer in PHP and I want to get data from a form which contains a name,a comment and a name of a photo the user selects, and put it in a csv.But when i try to write the date, the data i already have in the csv is overwrited.So every time I…
Reyes29
  • 1
  • 3
-4
votes
1 answer

Replace variable values whenever input is issued

I want to write a code that counts minutes in last three days. Let's say user makes an input every new day. He can see the sum of minutes for the last three days. I need to replace variables values whenever the new input is issued. So when the…
uberfella
  • 1
  • 1
1 2 3
98
99