overwrite

How do I prevent TFS from overwriting a label?

If i make a label in TFS, and later make a new label with the same name... then the old label is replaced by the new one. How do I prevent TFS from overwriting a label? ...

ClickOnce - Overwriting content files

Hi, I have a solution that is deployed using ClickOnce. It consists of an application, serveral referenced assemblies and a SQL Server Compact database. There is also an assembly which is not referenced by the main application, but simply loaded at runtime. This assembly needs to be deployed along with the application, in the same dir...

Rename existing files in XP useing a batch file (Backup purpose)

pkzip25 -add=all -dir=current -silent -locale -exclude=DistData.zip -exclude=extract.bat -exclude=run.bat -exclude=pkzip25.exe -exclude=extracted.txt -exclude=zipped.txt -exclude=.\STORE DistData.zip *.* pkzip25 -view -directories DistData.zip >zipped.txt copy DistData.zip ..\BKX\DistData_1.zip CD\BKX rename DistData_1.zip DistData_2.zi...

How do I Insert or Update (or overwrite) a record using NHibernate?

I need to write a row to the database regardless of whether it already exists or not. Before using NHibernate this was done with a stored procedure. The procedure would attempt an update and if no rows were modified it would fallback to an insert. This worked well because the application doesn't care if the record exists. With NHibernat...

Overwritten file with tar

I was trying to tar a file and ended up overwriting it. I was working in Xcode and I'm wondering if there is a way for me to recover the overwritten file. ...

Am I geting a structure copy here?

Here is a fake code sample vector<Fred> gFred; { // init gFred Fred &fred = gFred[0]; size_t z = 0; do { fred = gFred[z]; // do odd processing with fred z++; } while (fred.lastElementInSet == 0); } The thing that caught my attention was the fact that gFred[0] was being overwritte...

WPF WebBrowser Overwrite Javascript

Hi, I work with WPF WebBrowser control which different from WinForms and many recommendations from this excellent web site simply does not work in WPF. I try to find solution how I can overwrite particular javascript function btnSubmit_onclick() on a web page. This function generates confirm dialog (like "Are you sure?") which I want t...

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 call for this, however I cannot figure out what error code I'm looking for from GetLastErr...

Data integrity problem C#

Hi, my problem is that the assignment of decodedProxyExcerpt2 below overwrites decodedProxyExcerpt1 and I do not know why. Any clues? Thanks in advance. DecodedProxyExcerpt decodedProxyExcerpt1 = new DecodedProxyExcerpt(stepSize); if (audiofactory.MoveNext(stepSize)) { decodedProxyExcerpt1 = audio...

WiX-- always overwrite the previous version

Hi all, I have an installer of an application that needs to install over any existing version, regardless of version number. Instead, I've got an installer that constantly says that I need to go to add/remove programs. That's very frustrating behavior for my testers, since it just slows them down for no real reason in their minds-- th...

How do I overwrite a log file in log4j?

I have a log file that has the following appender added to it : logger.addAppender(new FileAppender(new PatternLayout(),"log.txt")); the thing is, each time I'm running my application, additional logging information gets appended to the same log file. What can I do to overwrite the file each time ? ...

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 specify multiple files okay, but don't know how to then overwrite each file. I could use ...

How to avoid clobbering files when creating a tar archive

This question notes that it is possible to overwrite files when creating a tar archive, and I'm trying to see how to avoid that situation. Normally, I'd use file roller, but the version installed is playing up a bit (using 1.1 Gb of memory), and I'm not the system administrator. I looked at --confirmation and --interactive, but that on...

Force git to overwrite local files on pull.

The scenario is following: my team member is modifying the templates for a website we are working on he is adding some images to the images directory (but forgets to add them under source control) he is sending later the images by mail to me i'm adding the images under the source control and push them to github together with other chan...

C++ variable data being overwritten

Hi, Been a few years since I've written C/C++, and now I'm facing a problem I just cannot seem to solve on my own. Given the following struct: struct InputData { float diameter; float length; int vertIndex; struct InputData *parent; vector<InputData*> children; bool deadEnd; InputData(float dia, float lngt...

One JS app Overwriting Another.

Forgive me as I ask what is wrong with my JS. I am really new to all of this. I've been redesigning my portfolio site and have hit a wall trying to put two different JavaScript applications together. I want my site to be just one page and use JS to view all the content. In order to do this I am using two different Jquery apps. This a...

Java - open existing file or create one if doesn't exist using IO streams

I was following instructions from a Java website (http://java.sun.com/docs/books/tutorial/essential/io/file.html#createStream) on creating or writing a file using an IO stream. However, the code it provides seems to be broken in multiple places: import static java.nio.file.StandardOpenOption.*; Path logfile = ...; //Convert the string...

JavaScript: Overwrite array

How do I overwrite (or unset and then set) an array? Seems like "array = new_array" doesn't work. Thank you in advance. ...

Java FileWriter overwrite

Hi Everyone, I have a piece of code that generates new data whenever there is new data available as InputStream . The same file is overwritten everytime. Sometimes the file becomes 0 kb before it gets written. A webservice reads these files at regular intervals. I need to avoid the case when the file is 0 bytes. How do it do this? Wil...

Help with for /f batch file

heres my code: start /realtime /b /wait .\jampDed.exe for /f "tokens=1-5 delims=:" %%d in ("%time%") do rename .\CIA_Secure_Host2\qconsole.log %%d-%%e-%%f start .\Serv.bat cmd this batch is supposed to run the program in a window, and when it quits, is supposed to rename the file qconsole.log to the current time, and then relaunch the...