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

Overwrite array in JavaScript

How do I overwrite (or unset and then set) an array? Seems like "array = new_array" doesn't work.
Ivar
  • 4,344
  • 6
  • 38
  • 53
4
votes
2 answers

Format and Pointers/Hex Values (Memory Overwrite)

In my Delphi XE2 32-bit application (Update 4 Hotfix 1 Version 16.0.4504.48759) , I'm using the Format() routine to log pointer values. For example: Format('MyObject (%p)', [Pointer(MyObject)]); However, the resulting string sometimes contains…
Doug
  • 317
  • 2
  • 5
  • 12
4
votes
2 answers

MySQL Export into outfile and overwrite

I'm interested in exporting a mysql select statement into a file on a samba share. Everything works fine until I try to update a file. For example, I have mysql exporting into outfile peachtree.csv and when the data changes I want it to over…
Colin Inskeep
  • 261
  • 3
  • 6
  • 16
4
votes
3 answers

Overwrite the variable in xsl

I just need to overwrite the variable in xsl Example: x=0 if x=0 then x=3 I need to change the value of variable. I am very new to xsl, please help me how to achieve this. This may be silly but I don't have any idea..
Ironman
  • 556
  • 3
  • 7
  • 21
4
votes
5 answers

Disallow variable overwrite in PHP

Is it possible to prevent variables from being overwritten in PHP? I am making a system that has some reserved variables and I don't want them to be replaced with something else after a certain point. It is possible? If not, what can I do to…
Vinicius Tavares
  • 666
  • 7
  • 28
4
votes
1 answer

Overwriting Native Methods in Javascript

I'm doing some analysis of some Javascript and I want to keep javascript enabled, but disable all alert() boxes and self.location redirects. Currently I'm using a regex proxy, but that seems like overkill. I can override some native methods but not…
Joel P.
  • 41
  • 1
  • 5
4
votes
3 answers

How to override model's constructor correctly in CakePHP

I have troubles with testing Model in CakePHP 2.0 and it seems the problem is on the model's constructor. public function __construct(){ parent::__construct(); $this->_pagi_cuantos = 2; } Even if I delete all its content, I still getting…
Alvaro
  • 40,778
  • 30
  • 164
  • 336
3
votes
4 answers

Is it allowed to write an instance of Derived over an instance of Base?

Say, the code class Derived: public Base {....} Base* b_ptr = new( malloc(sizeof(Derived)) ) Base(1); b_ptr->f(2); Derived* d_ptr = new(b_ptr) Derived(3); b_ptr->g(4); d_ptr->f(5); seems to be reasonable and LSP is…
user1123502
  • 378
  • 3
  • 13
3
votes
2 answers

Overwrite {} in python

I want to make a dict int which you can access like that: >>> my_dict["property'] = 3 >>> my_dict.property 3 So I've made this one: class DictAsMember(dict): def __getattr__(self, name): return self[name] This works fine, but if you…
Félix
  • 579
  • 4
  • 21
3
votes
0 answers

Overwrite sass variables defined on svelte npm package

How can I overwrite sass variables defined in a svelte package? I've published an npm package built with sveltekit & sass. In my main sass file I've defined some variables for components colours. After importing the package in a demo project, I've…
3
votes
0 answers

AWS Glue ETL Job: Bookmark or Overwrite - Best practice?

I have a JDBC connection to an RDS instance and a crawler set up to populate the Data Catalog. What's the best practice when setting up scheduled runs in order to avoid duplicates and still make the run as efficient as possible? The ETL job output…
3
votes
3 answers

Output Redirection produces empty file ONLY with jq

I'm having an interesting issue. I'm using jq to minify JSON from a batch script, and I want it to replace the file it reads from. While there is probably a better solution, this, while it should work on paper, it does not work in…
BellCube
  • 43
  • 1
  • 6
3
votes
1 answer

How can I overwrite an assets image in Flutter having a source image?

I'm fairly new to Dart and Flutter, and I'm having trouble to overwrite an existing assets image from a source image. My attempt: try { File localFile = File('assets/images/myImage.png'); …
3
votes
2 answers

python logging.basicConfig doesn't overwrite the existing log file

I'm using Python logging.basicConfig method, passing it some arguments including filemode = "w". If it's not specified, it defaults to "a", appending. However, despite specifying it to overwrite the existing log file, it's yet appending. import…
3
votes
3 answers

How to overrwite directory using kubectl cp

I am copying a local directory into Kubernetes pod using kubectl cp command kubectl cp test $POD:/tmp It copies the test directory into Kubernetes pod /tmp directory. Now I want to overwrite the test directory in the pod. I did not find any option…
Kishore
  • 5,761
  • 5
  • 28
  • 53