read-write

Reading/Writing MS Word files in Python

Is it possible to read and write Word (2003 and 2007) files in Python without using a COM object? I know that I can: f = open('c:\file.doc', "w") f.write(text) f.close() but Word will read it as an HTML file not a native .doc file. ...

Reading/Writing a MS Word file in PHP

Is it possible to read and write Word (2003 and 2007) files in PHP without using a COM object? I know that I can: $file = fopen('c:\file.doc', 'w+'); fwrite($file, $text); fclose(); but Word will read it as an HTML file not a native .doc file. ...

Read/write synchronization

I have a data structure whose operations can be categorized as read operations (e.g. lookup) and write operations (e.g. insertion, removal). These operations should be synchronized so that: Read operations can't execute while a write operation is executing (unless on the same thread), however read operations can be executed concurrentl...

C# CSLA business object dilemma: read-only vs read/write

I'm part of a team tasked to revamping our old VB6 UI/COBOL database application to modern times. Before I was hired, the decision was made (largely on sales, I'm sure) to redo the UI before the database. So, now we're using WPF and MVVM to great effect, it's been amazing so far, especially using CSLA as our Model layer. However, beca...

read and write to same socket (TCP) using select

We're writing a client and a server to do (what I thought was) pretty simple network communications. Mulitple clients connect to the server which then is supposed to send the data back to all other clients. The server just sits in a blocking select loop waiting for traffic, and when it comes, sends the data to the other clients. This ...

One service appends to and another one truncates a file.

I have a service that controls an RS-232 device and logs actions to a file. I am to write another service which will read the log file line by line and run some queries on a database then delete all the logs. My concern is about read and write conflicts on the file. For example, the logger service open the file to append a new line at t...

Do Windows 7 Logo Client requirements allow an application to read/write in registry (HKLM)?

I read the windows 7 Client Requirements and they don't seem to prohibit from writing in registry (Local Machine key). I have a C# .exe application which reads/writes values in HKLM/Software/Company/Etc (It includes a manifest file and runs as standard-user). When I deploy my application I have to tell the installer to create the key H...

Persist changes in C

I am developing a database-like application that stores a a structure containing: struct Dictionary { char *key; char *value; struct Dictionary *next; }; As you can see, I am using a linked list to store information. But the problem begins when the user exits out of the program. I want the information to be stored somewhe...

Reading/writing data to server, ftp, or website

Hi, I'm writing an app that will periodically send information out to a remote server, and then get relevant information about other users from that server back to the local database. What's the best way to handle sending out this info (i.e.: XML or binary) and writing it to the remote server. Also, how can I assure that, when 500+ u...

Improve performance of MS Excel writing

Hi, I am facing performance issues while reading/writing data from/to MS-Excel cells. I am using MS Excel 11.0 object library for automation with VB.NET. Currently it takes too much time to read and write from/to Excel files. (10 mins to read 1000 rows :( ). It seems the cell-by-cell reading and writing approach is not that effiecient....

Bash read/write file descriptors -- seek to start of file

I tried to use the read/write file descriptor in bash so that I could delete the file that the file descriptor referred to afterward, as such: F=$(mktemp) exec 3<> "$F" rm -f "$F" echo "Hello world" >&3 cat <&3 but the cat command gives no output. I can achieve what I want if I use separate file descriptors for reading and writing: ...