write

Simple way to reading/writing NSAttributedString in iOS?

In Mac OS X, there is AppKit addition which supports reading and writing of NSAttributedString as RTF format. Equivalent in iOS? Should I make my own? ...

Java NIO Framework stops working under heavy load with no write

The problem is fairly odd to me although I'm a newbie. Whats going on is that if you force the server under heavy load of connections and keep sending a invalid packet that doesn't represent POLICY_XML packet. Pretty much what I'm trying to say is that if you connect it goes into socket READ OPERATION. Then you never go into send() wh...

windows batch file programming

I want to write a line of text at a specific line in an already existing text file using dos batch file programming in Windows XP.Also I want to input the line number from the user. Any help will be appreciated. ...

can't write to file in mod_wsgi app: permission denied

I have a very simple mod_wsgi python application that tries to write to a file: tempfile = open('temp.txt', 'w') This fails with IOError: [Errno 13] Permission denied: 'temp.txt' The folder with myapp.wsgi has world-writable permissions (777). I can write to a file from a simple PHP test script. This is running on Mac OSX 10.6 ...

fopen file locking in PHP (reader/writer type of situation)

I have a scenario where one PHP process is writing a file about 3 times a second, and then several PHP processes are reading this file. This file is esentially a cache. Our website has a very insistent polling, for data that changes constantly, and we don't want every visitor to hit the DB every time they poll, so we have a cron proces...

Saving Source of Self (PHP)

Okay, so I have this strange problem. And ah, no solution. Can somebody please help me or send me off in the right direction? I have a simple HTML page, and I need to be able to have a 'Save' button on the page that the user will click. And upon clicking that save button, PHP will then save a copy of the current page the user is on to t...

Save current page as HTML to server

What approach could someone suggest to save the current page as an HTML file to the server? In this case, also note that security is not an issue. I have spent endless hours searching around for this, and have not found a single thing. Your help is much appreciated, thank you! Edit Thank you all for your help, it was very much apprec...

Write MP3 in Python

Hi, I have a bunch of frames (generated by a function) that I want to write to a MP3 file using Python. I tried using pymedia but I always get a Segmentation fault. Doe anyone know an extension to write MP3 files using Python? Thanks! ...

php apache root write permission

Can i write /etc/apache2/ directory. I want to create a file with php and apache. But i must root. Is there a way to sudoers? Can do this? ...

What happens in NFS if 2 or more servers try to write the same file simultaneously?

I'm working on a PHP webapp that does automatic resizing of images and I'm thinking of storing the cached copies on the NFS mounted NAS so it's easy for me to flush the cache when images are updated. The only thing I'm worried about is what happens in general with NFS if 2 or more of the servers in the cluster are trying to create the s...

Simple File Upload, Facing Problem With Writing File (Also Weird $_FILES problem)

The file I'm uploading is either not getting written into the temporary folder or is it not getting processed by PHP properly.... Enctype - Check Name, Method - Check Form (syntax) - Check (Take it from me that the data is being passed by the form to the PHP) The PHP code - 0) { echo "Return Code: " . $_FILES["file"]["error"] ....

Posting the value of a textarea with jquery

Hi. I am looking for a (correct) way to read and write to a linux text file with javascript, jQuery and php. Specifically, I want to take the value of a (#taFile) with jQuery ($("#taFile").val();) and $.post it to a php script, which in turn writes the posted value to a text file. While my code mostly works, I have run into a snag: w...

Getting the IO count

Hi, I am using xen hypervisor. I am trying to get the IO count of the VMs running on top of the xen hypervisor. Can someone suggest me some way or tool to get the IO count ? I tried using xenmon and virt-top. Virt-top doesnt give any value and xenmon always shows 0. Any suggestions to get the number of read or write calls made by a VM ...

How can I make the system call write() print to the screen?

For my OS class I'm supposed to implement Linux's cat using only system calls (no printf) Reading this reference I found it being used to print to a file. I guess I should manipulate ofstream. In the example appears: ofstream outfile ("new.txt",ofstream::binary); How can I make it write to the screen? EDIT: I realized this write() is...

PHP file permissions

How can I set permissions of a file to let a PHP program read and write but not be read by the public. When I set read permissions it denies PHP to the files. ...

Write files without write permission via ASP.Net

Hello, I have created an ASP.Net application using .Net framework 4.0. I need to save an xml file on any location on same server (if file not already exists) and want to access then after always. But I dont want to set write permission to any folder. Is it possible to write a file to any location for Network service account without spe...

PHP replace variables in Word document

Hello everyone I have a word document that contains certain variables (for example the string $$title$$). Now I want to open this word document in PHP and replace the string $$title$$ with a string I read out of the database. Final step would be to save this word document and give it to the user for download. Replacing the string and s...

Permission to write on SD card android

EDIT: Problem solved, FileOutputStream defined uncorrectly, change to: fos = new FileOutputStream( root + "/" + saveFileName ); Hello, I have a problem writing to the SD card, here is the code: (Sorry about the layout of the code, just copy pased it ) public class SaveAndReadManager { private String result; private String saveFileN...

Java: File i/o tuning

I attempted to create a sort-of file generator which spits out hardcoded messages to a file with slight alterations to some of the strings based on user input. Since I'm utilizaing polymorphism, I have multiple files and interfaces. I'm finding myself passing a file parameters more times than one and is starting to rethink the way I've...

iPhone / iPad Write Lage File over Socket SigPipe error .....

Im using Erica Sadun's CookBook code to open a socket on the iPad and use a browser on my desktop to connect to the socket, provide a list of file (in this case audio files) and allow the user to downloand them to their desktop. Erica's code works fine for small audio files, anything over a few MB's gives me a SigPipe Error and crashes ...