Search Results

Search found 72319 results on 2893 pages for 'file explorer'.

Page 101/2893 | < Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >

  • How do I clear the contents of a file using c?

    - by Eddy
    I'm writing some code so that at each iteration of a for loop it runs a functions which writes data into a file, like this: int main() { int i; /* Write data to file 100 times */ for(i = 0; i < 100; i++) writedata(); return 0; } void writedata() { /* Create file for displaying output */ FILE *data; data = fopen("output.dat", "a"); /* do other stuff */ ... } How do I get it so that when I run the program it will delete the file contents at the beginning of the program, but after that it will append data to the file? I know that using the "w" identifier in fopen() will open a new file that's empty, but I want to be able to 'append' data to the file each time it goes through the 'writedata()' function, hence the use of the "a" identifier.

    Read the article

  • Playing a .WAV file in .NET

    - by Mori
    I'm trying to write a SAMPLER program, where each key has a different sound (a WAV file). Can someone explain to me or give me a link to an explanation where i can learn how to play the WAV files? If it matters, I'm working with Microsoft Visual C# and using WinForms.

    Read the article

  • String replacment in batch file

    - by Faisal
    We can replace strings in a batch file using the following command set str="jump over the chair" set str=%str:chair=table% These lines work fine and change the string "jump over the chair" to "jump over the table". Now I want to replace the word "chair" in the string with some variable and I don't know how to do it. set word=table set str="jump over the chair" ?? Any ideas?

    Read the article

  • PHP Upload file enhance security

    - by mandril
    Hey.. my question is how to prevent someone upload a virus or some malicious code with the extension you pretend for example i have a pdf file uploader, anyone can upload a binary with pdf camouflage there are lots of programs to do that.

    Read the article

  • is it possible to store structure in Text file using c#

    - by ratty
    i like store the structure in to the Text file and also retrive the same. i created a structure name student details consists the values studentid,student name,student avg.i like to store this structure details in Textfile for many students.after that i like to reteive that details from Textfile using student id.i am working in wondows form application.is it possible in c#.

    Read the article

  • Free java or flash file browser for photogallery

    - by Christian
    Hi. I'm about to develop a small web gallery, where it's supposed to be possible to upload several pictures at a time and then add some info abut the pictures.So I need a free java or flash local file browser that can pass me some info of the pictures that gets uploaded so that I can create some SQL entries for each picture. The platform for the project will be PHP and MySQL. Any good recommendations?

    Read the article

  • get file path from svn diff file with PHP and C

    - by coderex
    hi i have a file having svn diff i wish to extract the filenames form the diff. How to write the parser for that.. Index: libs/constant.php =================================================================== --- libs/constant.php (revision 1243) +++ libs/constant.php (revision 1244) @@ -26,5 +26,5 @@ // changesss - +// test 2 ?> \ No newline at end of file Index: libs/Tools.php =================================================================== --- libs/Tools.php (revision 1243) +++ libs/Tools.php (revision 1244) @@ -34,5 +34,5 @@ // another file an change - +// test ?> \ No newline at end of file Sample output. libs/constant.php libs/Tools.php How to write parser in PHP and C.

    Read the article

  • Python f.write() at beginning of file?

    - by kristus
    I'm doing it like this now, but i want it to write at the beginning of the file instead. f = open('out.txt', 'a') # or 'w'? f.write("string 1") f.write("string 2") f.write("string 3") f.close() so that the contenst of out.txt will be: string 3 string 2 string 1 and not (like this code does): string 1 string 2 string 3

    Read the article

  • How do I access a file share programattically

    - by Mykroft
    I have a windows forms app running on a machine that is not on a domain, that needs to be able to move a file from the local filesystem to a UNC path. I have a username and password for that path. I was wondering is there any way to do this directly with out execing the net.exe command? Ideally I wouldn't have to map a drive.

    Read the article

  • How do I can linux flock command to prevent another root process deleting a file?

    - by Danmaxis
    Hello there, I would like to prevent one of my root process from deleting a certaing file. So I came across the flock command, it seems to fit my need, but I didnt get its sintax. If I only indicate a shared lock, it doesnt work: flock -s "./file.xml" If I add a timeout parameter, it still doesnt work flock -s -w5 "./file.xml" It seems that way, it fits in flock [-sxun][-w #] fd# way. (What is this fd# parameter?) So, I tried the flock [-sxon][-w #] file [-c] command Using flock -s -w5 "./file.xml" -c "tail -3 ./file.xml" and it worked, tail command at ./file.xml was executed. But I would like to know, does the lock end after the command or does it last 5 seconds after the end of the command execution? My main question is, how can I prevent another root process deleting a file in linux?

    Read the article

  • Transfer file over ssh

    - by datasunny
    Hi all, In ssh protocol, is there a mechanism for file transfer? Im working on a existing code base which already has ssh facilities code. Now i need to transfer files over ssh connection. If ssh protocol already support it, i don't have to integrate scp stuff into it. Thanks.

    Read the article

  • Converting HTML file to PDF file in Iphone.

    - by japs
    Hello All, This is my first thread iam developing an application in which i have to convert the HTML contents to pdf file. I had generate the PDF File but don't know how to create a pdf file from HTML format. Anyone can suggest the solution? Thank You.

    Read the article

  • How to sleep computer via batch file?

    - by Saebin
    So I want to make a batch file that will sleep my computer after a period of time. The closest thing I have found is placing it in standby, but seems to work differently then the sleep button on my keyboard (longer bootup, doesn't wake on mouse click). Any ideas? Would it be easier in python or c#?

    Read the article

  • Writing text file on local server MVC 2.0

    - by Liado
    Hi, i'm trying to write a text file on remote server, i'm using the following code: [AcceptVerbs(HttpVerbs.Post)] public ActionResult Index(UserModels model) { if (!ModelState.IsValid) { return View("Index"); } try { using (StreamWriter w = new StreamWriter(Server.MapPath(TEXT_FILE_NAME), true)) { w.WriteLine(model.Email.ToString()); // Write the text } } catch { } the folder is still empty, can someone help? what should be the problem? Thanks

    Read the article

  • Yii file upload issue

    - by user1289853
    Couple of months ago,I developed a simple app using YII,one of the feature was to upload file. The feature was working well in my dev machine,couple of days ago client found the file upload feature is not working in his server since deployment. And after that I test my dev machine that was not working too. My controller looks: public function actionEntry() { if (!Yii::app()->user->isGuest) { $model = new TrackForm; if (isset($_POST['TrackForm'])) { $entry = new Track; try { $entry->product_image = $_POST['TrackForm']['product_image']; $entry->product_image = CUploadedFile::getInstance($model, 'product_image'); if ($entry->save()) { if ($entry->product_image) { $entry->product_image->saveAs($entry->product_image->name, '/trackshirt/uploads'); } } $this->render('success', array('model' => $model)); // redirect to success page } } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } } else { $this->render('entry', array('model' => $model)); } } } Model is like below: <?php class Track extends CActiveRecord { public static function model($className=__CLASS__) { return parent::model($className); } public function tableName() { return 'product_details'; } } My view looks: <?php $form = $this->beginWidget('CActiveForm', array( 'id' => 'hide-form', 'enableClientValidation' => true, 'clientOptions' => array( 'validateOnSubmit' => true, ), 'htmlOptions' => array('enctype' => 'multipart/form-data'), )); ?> <p class="auto-style2"><strong>Administration - Add New Product</strong></p> <table align="center" style="width: 650px"><td class="auto-style3" style="width: 250px">Product Image</td> <td> <?php echo $form->activeFileField($model, 'product_image'); ?> </td> </tr> </table> <p class="auto-style1"> <div style="margin-leftL:-100px;"> <?php echo CHtml::submitButton('Submit New Product Form'); ?> </div> <?php $this->endWidget(); ?> Any idea where is the problem?I tried to debug it but every time it returns Null. Thanks.

    Read the article

  • write file in network shared folder with UnauthorizedAccessException?

    - by sam
    hi the win mobile 6 code tries to write files on network shared folder, but always gets UnauthorizedAccessException. I have checked permission and security setting on the folder and the code can read the file but just cant write to it. The code runs under administrator account which has full control over the folder and files. It is in vs 2008 professional with device emulator.Any help please? thanks very much.

    Read the article

< Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >