write

SQL: Sequentially doing UPDATE .WRITE on VarBinary column

Hi all, I'm trying to create a little test application which reads chunks of a FileStream and appends it to a VarBinary(max) column on an SQL Server 2005 Express. Everything works - the column gets filled as it's supposed to, but my machine still seems to buffer everything into memory and I just can't see why. I'm using the following ...

Read from one large file and write to many (tens, hundreds, or thousands) files in Java?

I have a large-ish file (4-5 GB compressed) of small messages that I wish to parse into approximately 6,000 files by message type. Messages are small; anywhere from 5 to 50 bytes depending on the type. Each message starts with a fixed-size type field (a 6-byte key). If I read a message of type '000001', I want to write append its payloa...

Write to a CSV file on two columns

Hello all, I am trying to create a CSV file. I have done this. I have put the below in a loop with the first and last lines outside of the loop. $FileHandle = fopen('tech.csv', 'a+') or die("can't open file"); $stringa = $item." , ".$item2."\r\n"; fwrite($FileHandle, $stringa); fclose($FileHandle); However, it comes out like this in ...

Why file writing does not happen when it is suppose to happen in the program flow?

This is not a new problem for me. From C to PERL to Python on Windows Mobile, Windows XP and other Windows versions this problem persists and f**ks my nerves. Now in my latest script it again happens. To be more concrete: I have coded in Python a trivial script. Now the script writes correctly to the file when run from the debugger, bu...

MFC :: Modify the values in a json file

Hi All, I'm able to parse json files in MFC but is having a hard time modifying the values. Is there an easier way writing new values, other than converting it to native file types, modifying the contents and converting it back to json again? I thought it would be as easy as changing values in an XML file where you just look for the ta...

File writes per second

I want to log visits to my website with a high visits rate to file. How much writes to log file can I perform per second? ...

Editable content area for user with restricted access

Hi, I'm building a blog for a client and they need to be able to edit a paragraph of text in the sidebar. I currently have it setup as a 'Better Text' widget which I can quickly edit for them. I don't want to give them access to the widgets, etc but they want to be able to edit it themselves. Is there an easy way to add a custom write ...

Not writing to file, but no errors PHP

I am trying to write data from form inputs to a text file using PHP. The file seems to load correctly, but does not write the data. I have echoed the input values directly before trying to write to ensure they are not empty. The text file is in the same directory as the php file. I orginally got the error "Warning: fwrite(): supplied...

Appending an XElement to an xml file without saving the whole file. C#

Hi, Is it possible in C# is append an XElement to an already existing xml file, without saving the whole xml, but just the new element? So i don't want something like this, since it will write the whole xml to disk. XDocument document = new XDocument(); document.Load("filename"); document.Root.add(new XElement("name", "content")); doc...

(IPHONE) Big confusion to read/write the same file from resource folder

hi all, i've read several thread for this question but unfortunatly not found the answer to my problem :( i have a xml file in resource folder, and i need just to re-write the same file; the app logic is: display data loaded from file add new data to the same file for read a file my code is: NSString *filePath = [[NSBundle mainBund...

Write local file with jQuery or Javascript

I am creating a prototype that will be run in a web browser. I would like to store (and retrieve) various info submitted by a user during the use of the prototype. I know I can retrieve a variety of file formats such as xml, json... and I know I can do local storage using the plugin jstore. So I suppose I can do a convoluted solution whe...

read and write thread using a single tcp socket

Hi, I'm using a C socket library I found online to implement a tcp socket data transfer program. Is it possible to make 2 threads share the same socket connection (1 read and 1 write), and have the read thread perform a blocking read and recv data while the write thread constantly writes data? All of the example socket programs I've se...

PHP Write to file on different server

I need to write to a file that is located on a different server using php. So, I get user data from a form on one server, and then need to write to a text file that is located on another server. Do I need to authenticate or something similar? The second server that I need to write to is a windows server. Is this an issue? Thanks! ...

MSBuild - Writing Escape Characters to Files

I've got a very similar scenario to the one described in this post. It describes how to load the contents of a file that contains properties & items, making sure they're resolved as part of the process. I'm doing the same thing except writing the contents away to another text file (generally .ini file). In short I'd start by importing a...

What are the biggest factors for disk write speed?

I am doing some performance tests for the amount of time it takes to write X amount of files to a specified location. I will be comparing write speeds: 1) with a custom file system driver installed and loaded, and 2) with the file system driver not installed nor loaded. I want to test this on various machines with various OS's. Also, I ...

IRP_MJ_WRITE latency up to 15 seconds

We have written an application that performs small (22kB) writes to multiple files at once (one thread performing asynchronous queued writes to multiple locations on behalf of other threads) on the same local volume (RAID1). 99.9% of the writes are low-latency but occasionally (maybe every minute or two) we get one or two huge latency wr...

What's the proper way to write HTML to a WebBrowser in C#?

If instead of navigating to a webpage in a WebBrowser, you want to set the HTML property directly, what's the proper way to do it? Is it like this? myWebBrowser.Navigate("about:blank"); myWebBrowser.Document.Write("<html><body>Test</body></html>"); ...

How does java send informations ?

Tell me. What heppens when I invoke Socket.getOutputStream.write(); then Socket.getOutputStream.flush(); ? Because when I want to send more than around 8162 bytes It sends only bytes which can be placed in this size. And next bytes aren't sent. Explain me please. ...

How can I add and remove bytes on from the start of a file?

I'm trying to open an existent file save a bytes in the start of it to later read them. How can I do that? Because the "&" operand isn't working fo this type of data. I'm using Encoding.UTF8.GetBytes("text") to convert info to bytes and then add them. Help Please. ...

IBM MQSeries Accessing Issue from .NET

I'm not extremely familiar with IBM MQSeries, but I am writing c# scripts which write and read files from my queue server. The problem is my read works but my write doesn't. Please notice that I am using the same queue so don't bother going in that direction. My code firstly accesses the MQserver with the following code: MQQueueManager...