write

Flash CS4/AS3 Writing local file from local game without save dialog prompt?

I'm writing a game to be run locally, on the user's computer. NOT over the internet. I want to have a file that will hold the usernames and avatar indices (they're in an array). I want to know if there's a way to write to files through Flash with AS3. I'm using CS4. I'd also like to know if you can delete files through Flash, though t...

Writing String into a File

I'm implementing a WebScript using Alfresco's JavaScript. l'm trying to insert string to a file, but I can't do it. When I write another file's content like: file.properties.content.write(content); It works, and the file's contents are copied into my file. But I can't insert string directly, like: file.properties.content.write("Stuf...

ERROR_SEM_TIMEOUT when using WinUSB WritePipe

I often get ERROR_SEM_TIMEOUT errors using the WinUSB WritePipe function. This would seem to indicate that there is a timeout, but if I wait a period of time and try again I'm never able to write. I'm writing in 64 byte chucks to the USB device and often don't have problems. Once I start getting the error, I may have to unplug the usb...

Delay PHP read long enough to ensure write

How do I delay a PHP script that writes to a text file and then reads from the same file long enough to make sure changes have been written before I attempt the read? ...

Php efficiency question --> Database call vs. File Write vs. Calling C++ executable

Hi, What I wish to achieve is - log all information about each and every visit to every page ofmy website (like ip address, browser, referring page, etc). Now this is easy to do. What I am interested is doing this in a way so as to cause minimum overhead (runtime) in the php scripts. What is the best approach for this efficiency-wise:...

reloading app.config after writing

Hi, When I use this to write to my app.config file: Configuration config =ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); config.AppSettings.Settings["Wachtwoord"].Value = "Test"; config.Save(); ConfigurationManager.RefreshSection("appSettings"); I can read it again. But when i close and restart the program, t...

How do I give PHP write access to a directory?

I'm trying to use PHP to create a file, but it isn't working. I am assuming this is because it doesn't have write access (it's always been the problem before). I tried to test if this was the problem by making the folder chmod 0777, but that just ended up making every script in that directory return a 500 error message until I changed it...

Problem with "write" function in linux

I am trying to write 2 server/client programs under Linux, in which they communicate through named pipes. The problem is that sometimes when I try to write from the server into a pipe that doesn't exist anymore (the client has stopped), I get a "Resource temporarily unavailable" error and the server stops completely. I understand that ...

Upon USB insert, record unique identifer sting, format drive to FAT32 and copy a file. Bash or Python.

Hello, This is what I want to do, insert USB flash drive. mount it. record uniquie identifer string to a file. format the drive to FAT32. copy a text file to the drive. unmount it. remove the drive. 30 times The situation is this, I have bought 30 usb drives. I need to format each one to ensure they are clean, I need the unique str...

Need to change ip address in app.config in runtime without runnning as admin

Hey guys, There's a lot of post saying how to change info in the app.config and there are posts that say you shouldn't edit info in the app.config but store info in user folders. I understand these topics. But what i want is a combination of both. I have a wcf setup for my client in an app.config, which contains the endpoint address to ...

Django dislaying upload file content

hello, i have an application that loads different documents to the server, and allows users to read documents' content. i am uploading the documents to the server, and then i try to read the courses by id, like: def view_course(request,id): u = Courses.objects.get(pk=id) etc But i don't find anywhere : how can i actually read the ...

Perl regex matching output from `w -hs` command

I'm trying to write a Perl script that will work better with KDE's kwrited, which, as far as I can tell, is connected to a pts and puts every line it receives through the KDE system tray notifications with the title "KDE write daemon". Unfortunately, it makes a separate notification for each and every line, so it spams up the system tra...

Write/read count to txt file

Hi, I need a batch file that writes the count number to a txt file. Next time the batch file is run, it should read the current count number from the txt file and add 1 to count and save this new value in the txt file. (nothing else is in the txt file) When count is >5 it should start from 1 again Example: Count.bat runs 1 time: coun...

How do I write unescaped XML outside of a CDATA

Hello I am trying to write XML data using Stax where the content itself is HTML If I try xtw.writeStartElement("contents"); xtw.writeCharacters("<b>here</b>"); xtw.writeEndElement(); I get this <contents>&lt;b&gt;here&lt;/b&gt;</contents> Then I notice the CDATA method and change my code to: xtw.writeStartElement("contents"); xt...

Python: slow read & write for millions of small files

Conclusion: It seems that HDF5 is the way to go for my purposes. Basically "HDF5 is a data model, library, and file format for storing and managing data." and is designed to handle incredible amounts of data. It has a Python module called python-tables. (The link is in the answer below) HDF5 does the job done 1000% better in sa...

UnauthorizedAccessException app.config c#

First I create a setup from a project, and I install it. When the program reads and writes from app.config, I get an UnauthorizedAccessException. This works perfect in visual studio, but with creating a setup and installing it, it always crashes at this point. Someone who knows how to solve this? Thanks ...

Short writes to a UNIX file descriptor

When can a short write to a file descriptor occur in FreeBSD 7.2 ? I mean the situation when "write" system call returns less bytes written than requested. I'm speaking about descriptors to ordinary files in ufs filesystem which we can get with a call to open(). ...

iphone, write csv file in sandbox

Hi, i must write (at start of app) and delete is content (at the end of app) a csv in my sandbox file with a stream of data. For your experience, what's the best way to do this? edit: i'm trying with this: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = ...

HTML with VBSscript write to table

Hello, I would like to click a button and have a VBScript called to write to a table's lower half eg: -------- |Top |------- |bottom (vbscript writes to here) -------- Is this possible? And how would I accomplish this? ...

Writing a PDF to filesystem iPhone

I am am opening a PDF document using Quartz2D in core graphics, resizing it, and attempting to re-save it to the file system of an iPhone. Problem is I cannot figure out how to write a PDF to the file system. Has anyone had luck with such a problem. ...