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
6
votes
3 answers

Force derived class to call base function

If I derive a class from another one and overwrite a function, I can call the base function by calling Base::myFunction() inside the implementation of myFunc in the derived class. However- is there a way to define in my Base class that the base…
Mat
  • 11,263
  • 10
  • 45
  • 48
6
votes
1 answer

MAC : How to merge folder so that we only overwrite when source files is newer than destination files?

It seems like very basic command. However even after an hour of searching the solution, I still can't find something that works. So I have two big folders (with many files and many subfolder, the mega back-up). I'd like to combine these two folders…
Fleea
  • 69
  • 1
  • 3
5
votes
2 answers

Set and get a static variable from two different classes in Java

Lets say I have 3 Classes: A, Data, and B I pass a variable from class A which sets that passed variable to a private variable in class Data. Then in class B, I want to call that specific variable which has been changed. So I do Data data = new…
user1062898
  • 109
  • 2
  • 2
  • 10
5
votes
2 answers

How can you change single entries in an excel file with R and not the entire data sheet?

I have an excel file with some data in it. I want to use R to run some statistics on said sheet and then save some values into different columns in the original Excel Sheet. Is there any way to do this without always "overwriting" the whole excel…
ikempf
  • 153
  • 1
  • 10
5
votes
1 answer

How do I overwrite text in VB.NET

I once got taught how to append a text file ussing the following code, but how do I overwrite the file every time I press button one (nobody taught me that)? Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)…
Mac
  • 63
  • 1
  • 2
  • 5
5
votes
2 answers

Overwrite worksheet using googlesheets in R

I have 2 questions. How do you overwrite a worksheet in an existing spreadsheet using the googlesheets package in R? How do you create a new worksheet in an existing spreadsheet using the googlesheets package in R? I could not find anything in…
Simon
  • 621
  • 4
  • 21
5
votes
2 answers

Replace a specific line in a file using Ruby

I have a text file (a.txt) that looks like the following. open close open open close open I need to find a way to replace the 3rd line with "close". I did some search and most method involve searching for the line than replace it. Can't really do…
Evilmuffin
  • 214
  • 4
  • 14
5
votes
4 answers

Why am I able to define same function twice in javascript?

I have a javascript file in which I write a bunch of jquery functions. I have a function to return the angular scope. I found out that if I were to write the same function twice, the code still executes. function getngScope() { alert(2); …
Undefined Variable
  • 4,196
  • 10
  • 40
  • 69
5
votes
1 answer

How to overwrite existing file?

I want to overwriting file that I have saved before, my saveAs code: public void saveAs(){ judul = jTextJudul.getText(); s = area.getText(); if(s.length()>0){//jika s terisi try { …
5
votes
1 answer

How do I overwrite X bytes on offset Y with fwrite()?

All I can find using fopen() and fwrite() in C is to delete all contents and start writing again or append to the end of the file. What if I need to go to some offset in the file and overwrite a few bytes? Is that possible with some function?
rfgamaral
  • 16,546
  • 57
  • 163
  • 275
5
votes
1 answer

Recover overwritten file with eclipse git

I've overwritten one of my local changes in Eclipse to one of the files by mistake! How can I get my local changes back? I'm using Git in Eclipse and in the Team Synchronize window I clicked Overwrite to one of the files I did not want to!
Bankin
  • 777
  • 1
  • 16
  • 31
5
votes
2 answers

Disable overwrite mode in WPF TextBox (when pressing the Insert key)

When the user presses the Insert key in a WPF TextBox, the control toggles between insert and overwrite mode. Usually, this is visualised by using a different cursor (line vs. block) but that's not the case here. Since there is absolutely no way for…
ygoe
  • 18,655
  • 23
  • 113
  • 210
5
votes
1 answer

codeigniter upload encrypt_name uniqueness

1. Does codeigniter's upload library's encrypt_name option check to be unique? I know that the overwrite option is important. If overwrite is TRUE, it would overwrite and if it's FALSE, it would rename the file by adding a number at the end of the…
Mohammad Naji
  • 5,372
  • 10
  • 54
  • 79
5
votes
1 answer

How to overwrite a settermethod in Mockito?

I can't seem to figure out how to mock a simple setter method using Mockito. I have the following class: class MyClass { private SomeObject someObject; public void setSomeObject(SomeObject someObject) { this.someObject =…
Lonelyisland
  • 1
  • 1
  • 6
5
votes
3 answers

overriding pure virtual operators

I'm trying to create a counter interface that forces all derived classes to implement this interface: class CounterInterface { public: virtual CounterInterface& operator ++ () = 0; virtual CounterInterface operator ++ (int) = 0; virtual…
user1903875
  • 51
  • 1
  • 2