file

Redirecting std output from Process object to file in .net

Is there a simple way how to launch a process in .NET and redirect its output(s) to a file? I know that in Win API I can pass a file handle to the CreateProcess function. In .NET I can do something like startInfo.RedirectStandardOutput = true; and then use BeginOutputReadLine and StandardOutput to get the data and save it to a file. ...

C++: Where does the ofstream class save the files to?

I moved from Windows to Mac and now I'm experiencing a problem with the file input/output classes: ifstream & ofstream. In Windows when you run with g++/Code Blocks ofstream out("output.txt"); out << "TEST"; out.close(); A new file "output.txt" will be created in the same directory. However in MAC OS X, this file is created in my h...

I write a MySQL table into an output file (working on Unix) but I can not enter the file directory (permission denied)

When I output a whole table into an output file named 'Arshan.txt' this command works well but I can not access the output file created. When I access /usr/local/mysql/data it says permission denied. Any help will be appreciated. Thanks in advance. ...

how to automatic deleting files to a folder in ubuntu?

hello. how to automatic deleting files to a folder in ubuntu?, I need to do a script to delete files from a folder that is filled with the execution of a process on my server. thanks for your answers and hel ...

How can I change audio file header? Iphone.

I am working on changing audio file header. Here, after recording with AVAudioRecorder, I got an audio file on disk. And I want to change audio file header's property to change audio file's samplerate. Here is the code, but not works. - (void) changeProperty { CFURLRef inFileRef; inFileRef = (CFURLRef)[self getRecordFileURL]; ...

Getting file modification time on UNIX using utime in C.

I have been told by a professor that you can get a file's last modification time by using utime.h. However, the man page seem to cite that utime() only sets this value. How can I look up the last time a file was changed in C on a UNIX system? ...

is there is a config file in qt?

is there is a config file in qt? ...

Suitable hash function for data corruption

What is the most suitable hash function for file integrity checking (checksums) to detect corruption? I need to consider the following: Wide range of file size (1 kb to 10GB+) Lots of different file types Large collection of files (+/-100 TB and growing) Do larger files require higher digest sizes (SHA-1 vs SHA 512)? I see that the S...

renaming all files in a director tree appending the parent folder name to all the files in their subdirectories

Hi. - I have a number of directories in Z:\AEPMDOCS These directories also have one or more subdirectories with files in them - how can I rename all the files within the directory tree to include the first Directory at he begining of the Filename. EXAMPLE Z:\AEPMDOCS\JONESA\test1.txt should become Z:\AEPMDOCS\JONESA\JONESA-test1.t...

how to define the "depends" for the running kernel

package A depends on package B-kmod and B-kmod has several variants. like B-kmod--{generic,pae-generic} etc. and in turn B-kmod depends on linux-image of the same flavor. i'd like A to have depends on B-kmod-$(uname -r). how to express this in control file? ...

How to store data that remains after uninstall

I want to store some data that should remain also after application uninstall and to be accessible by a new version of this application. Share preferences/files are not a solution as they are removed when program is uninstalled, also writing to internal memory is not a solution (also removed with uninstall). Writing to external public fo...

C# Reading from a custom file

Okay so, I have read that .INI files have become obsolete now and the .NET Framework creators want us to use .XML files. However, I feel that it would be difficult for some of my users to use .XML files so I thought of creating a custom config file. I have a list string which has 3 parameters (it is actually the snippet function in Scin...

How can I determine if it's ok to change this word... python script

The goal is to read through html files and change all instances of MyWord to Myword; except, must NOT change the word if it is found inside or as part of a path, file name or script: href="..." src="..." url(...) class="..." id="..." script inline or linked (file name) --> <script ...></script> styles inline or linked (file name) --> ...

Mysql: How to call sql script file from other sql script file?

Suppose I have wrote script Table_ABC.sql which creates table ABC. I have created many such scripts for each of required tables. Now i want to write a script that call all of these script files in a sequence so basically I want another script file createTables.sql. Mysql provides option to execute a script file from "mysql" shell applica...

Python: How to ensure the last line of code has completed?

Hi, I'm doing some kind of complex operation, it needs the last line(s) of code has completed, then proceed to the next step, for example. I need to ensure a file has written on the disk then read it. Always, the next line of code fires while the file haven't written on disk , and thus error came up. How resolve this? Okay.. picture.s...

Get image from canvas in C#

I have a canvas (HTML5) on my website and I would like to get the content of this canvas and convert it into a file stream in my C# code behind and save this file stream as an image. Is this possible in C# or is there a workaround? Thanks ...

What are the best wat to check file exits or not in webapplication ?

Hello, I have created a web application which is creating and updating the xml file on daily basis. i.e. Creating a xml as currentdate.xml. This have all the records of user's visited i.e IP, refferer, visited page and some more. So the same file updating from multiple users at same time. So what are the best practice to check the fi...

File upload in Resteasy

How to upload files using RESTEasy framework ? ...

loading qm file

I'm trying to use translation files. I went through all the procedures: created ts file, translated it, but when I'm running the application again, it does not change. I worked on the nokia example, just like in the instructions. What could be my problem? int main(int argc, char *argv[]) { QApplication app(argc, argv); QTrans...

shell script writing to a new file

Quick question: If I do the following, will it create the file, or do I have to do that separately? echo "output" > file.txt ...