write

How to parse a text file and write the result to an xls file?

Hi all i am a junior level SQL developer. I have a situation where I have a text file with 1100 lines of a search result with each line containing a file path and a stored procedure associated with that file. Each line has a structure like the one below: abc\def\ghi\***.cs(40): jkl=******.*****.******, "proc_pqrst", parms); Where abc\...

How to write JavaScript to a separate window?

I have opened a new window with JavaScript: var newwin = window.open('','preview','width=600,height=500'); Now I want to write some JavaScript to the window: newwin.document.write("<script type='text/javascript'>alert('Hi!');<" + "/script>"); newwin.document.close(); However, the script never gets executed. Am I doing something wro...

How to append text to a text file in WinAPI?

Hi guys, Ive got an annoying problem, I cant append any text to the text file. Every time I open it for writing, I overwrite the data. I tried to move the file pointer to the end of the file, but no result (no writing to the file at all). Here is the code: INVOKE CreateFile, offset filePath, GENERIC_WRITE, FILE_SHARE_WRITE, 0, OPEN_AL...

Using write to print floating point numbers.

Hi, The write function does not print a floating point number in the following code: #include <unistd.h> int main(){ float f = 4.5; write(1,&f,sizeof float); return 0; } This results in: �@ Whereas: int main(){ char *c = "Hello world"; write (1,c,strlen(c)+1); return 0; } Prints Hello world as exp...

VB6: Slow Binary Write?

Wondering why a particular binary write operation in VB is so slow. The function reads a Byte array from memory and dumps it into a file like this: Open Destination For Binary Access Write As #1 Dim startP, endP As Long startP = BinaryStart endP = UBound(ReadBuf) - 1 Dim i as Integer For i = startP To endP DoEvents Put #1, (i...

an Array of bytes throw write(String) like writeBytes(String)

I am writing string and int values in an array ob bytes with c#. writeUTF(String ) in Java is giving me other results as the write(String) method on C#. I need to modify C# so that both gives the same result. Is there other write() method on C# Working like this Method in Java? WriteUTF(String) Writes a string to the underlying outp...

problem in write file or mkdir on android device

Hi. I have a android application which is write some html files on the sdcard. The application run on emulator very well. But when I tried to run the same application on OMAP android device It can't write files or mkdir on the device sdcard. I don't know how it happened. My OMAP device use sdcard for file system at the boot time tha...

to understand the code- how the heap is written in process migration in solaris

hi guys i need help understanding what this piece of code actually does as it is a part of my project i am stuck here. the code is from libckpt on solaris. /************************************************************** * function: write_heap * args: map_fd -- file descriptor for map file * data_fd -- file descriptor for data ...

Differnce between linux write and sendfile syscall

Im programming webserver (C), which should send big files. My question is: What are the main differences in two syscalls: write and sendfile. Does sendfile depends on size of socket system buffer? I noticed that write often writes less then I requested. For example, if got many requests for one file: should i open it, copy into memory a...

using bash: write bit representation of integer to file

Hullo First, I want to use bash for this and the script should run on as many systems as possible (I don't know if the target system will have python or whatever installed). Here's the problem: I have a file with binary data and I need to replace a few bytes in a certain position. I've come up with the following to direct bash to the o...

What structure of data use to communicate via tcp/ip in java?

Let's assume I want to send many messages between 2 programs made in java that use TCP sockets. I think the most convienient way is to send objects like: PrintStream ps = new PrintStream(s.getOutputStream()); ObjectOutputStream oos = new ObjectOutputStream(ps); some_kind_of_object_here; oos.writeObject(some_kind_of_object_here);...

How can I write to the same file without overwriting what is in it (VB6)?

Hey, I'd like to write to a text file to record a set of scores. However, everytime I write to it it overwrites what was originally in the file. Please can someone tell me how to not let it overwrite what is there or how to make it start writing in an empty space. Thank you in advance. ...

Where is the FTP support for Google Chrome and Internet Explorer 8 ?

I tried to upload files via FTP but ran into problems. Are modern day browsers no longer supporting FTP "write" capability? I managed to use Dreamweaver to FTP the files successfully. ...

Most Efficient Way to Write to Fixed Width File (Ruby)

I'm currently working with extremely large fixed width files, sometimes well over a million lines. I have written a method that can write over the files based on a set of parameters, but I think there has to be a more efficient way to accomplish this. The current code I'm using is: def self.writefiles(file_name, positions, update_valu...

async_write/async_read problems while trying to implement question-answer logic

Good day. I'm trying to implement a question - answer logic using boost::asio. On the Client I have: void Send_Message() { .... boost::asio::async_write(server_socket, boost::asio::buffer(&Message, sizeof(Message)), boost::bind(&Client::Handle_Write_Message, this, boost::asio::placeholders::error)); ...

C - struct problems - writing

Hello, I'm making a program in C, and I'mm having some troubles with memory, I think. So my problem is: I have 2 functions that return a struct. When I run only one function at a time I have no problem whatsoever. But when I run one after the other I always get an error when writting to the second struct. Function struct item* ReadFile...

Cocoa: Using UNIX based commands to write a file

I'm looking for help with a program im making. I create a *.sh file as follows: SVN_StatGenAppDelegate.h: NSWindow *window; NSTask *touch; NSArray *touchArguments; NSString *svnURLStr; NSString *SVNStatStr; NSString *destDirStr; SVN_StatGenApplDelegate.m: NSString *locationStr = [NSString stringWithFormat:@"%...

write file in network shared folder with UnauthorizedAccessException?

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...

PList Chicken/Egg Scenario

Hi, I want to read/write to cache.plist If I want to read an existing premade plist file stored in the resources folder I can go: path = [[NSBundle mainBundle] bundlePath]; NSString *finalPath = [path stringByAppendingPathWithComponent@"cache.plist"]; NSMutableDictionary *root = ... But then I wish to read it from the iPhone. Can't,...

Linux, monitor read rates of files

I have a custom application which has a bunch of files open. I can see the file handles open by a process using "lsof" and I can see the files being accessed using "watch -d 'ls -alh'" and watching the mtime/ctime. However, I would like to see the rate of data that is being read/written to these files. IE: I need to determine if one file...