file

gwt file permission

I have a little GWT/AppEngine Project which uses RPC. Basically I need to get some data from a XML file that resides on the server. But when I use the RPC to read the file in my server-package I am getting a AccessControlException (access denied). Any ideas what the problem is? //JAXB powered XML Parser public PoiList readXML() { tr...

How do I iterate over all lines of files passed on the commandline in Groovy?

Hi I want to read whole file contents in groovy on command line. I am using this code #!/usr/bin/env groovy def xmlData ="" System.in.withReader { xmlData=xmlData+ it.readLine() } println xmlData and the following command cat 1.xml | /root/a.groovy But it only reads one line from the file. I want to read whole f...

save downloaded file automatically in directory using AIR

i'm newbie, so please help me... package com.func { public class Downloader { import flash.net.FileReference; import flash.net.URLRequest; private var req:URLRequest = new URLRequest(); private var fr:FileReference = new FileReference(); public function Downloader(){ } public...

How to save a NSImage as a new file

Hi! How can I save a NSImage as a new file (png, jpg, ...) in a certain directory? Thank you for answering my "noobish" question. ...

Android - Persist file when app closes.

I am creating a file in my Android application as follows: HEADINGSTRING = new String("Android Debugging " + "\n" "XML test Debugging"); } public void setUpLogging(Context context){ Log.d("LOGGING", "Setting up logging....."); try { // catches IOException below FileOutputStream fOut = context.o...

Arrange files by creation or modification with PHP

Is it possible to get the file names in a folder by the date of creation or modification? Thanks. ...

HOWTO use UIWebView to display a downloaded file later?

How do I format an NSURL (what path, or path generator function) so that I can display a downloaded local file (NOT part of the application NSBundle) for use offline? The idea is to snag an HTML file, clean it up and stash it in the iFoo application specific storage area, then later use UIWebView to display it. Next, I go off to RTFM a...

Python timed file upload

I have a python script that accepts a file from the user and saves it. Is it possible to not upload the file immediately but to que it up and when the server has less load to upload it then. Can this be done by transferring the file to the browsers storage area or taking the file from the Harddrive and transferring to the User's RAM? ...

Live Mesh has screwed up my file permissions

I got the bright idea of using Live Mesh to sync up my development directories between my laptop and desktop machines. It appears that the permission on any new files that are added through Live Mesh do not inherit permissions from the parent directory. Now I cannot overwrite the permissions on those files. I keep getting an "Access i...

How do i monitor a directory creation on linux using ruby and get notified via email

so lets say i have a pre existing directories /source/version/1 , /source/version/2, /source/version/3 I want to monitor if there is a NEW directory created /source/version/4, and send an email if such directory is indeed created. ...

Show a Copying-files dialog/form while manually copying files in C#?

I am manually copying some folders and files through C#, and I want to show the user that something is actually going on. Currently, the program looks as if its frozen, but it is actually copying files. I would think there is already a built-in dialog or form that shows the process, similar to copying/moving files in windows explorer. I...

chech how much file is uploaded in php

is there any way to check how much of the file is uploaded in php? so that i may display a progress based on that. plz tell me a way other than apc_fetch(). ...

jQuery find file extension (from string)

Hi all, I was wondering if it was possible for jQuery to find a file extension based on a returned string? A filename (string) will be passed to a function (openFile) and I wanted that function to do different things based on what file has been passed through, it could be image files or pdf files. function openFile(file) { //if .jp...

Core data and special characters (UTF-8)

I have an iPhone application using Core Data with an SQLite database in the bottom. I'm writing some text content from the database to a file, but special characters such as Å, Ä and Ö are corrupted in the file (they show up just fine in the application). When creating and inserting data, I am not using any special encoding. I'm just ta...

Using modified date of file for comparison. Is it safe?

I want to make a procedure that does one way syncrhonization of a folder between a server and a client. I was thinking to use ModifiedDate as a criterio, provided that only the date of the server files will be used. Procedure will not use Modified dates of files on the client at all. It will read dates from the server and compare them wi...

Serving file via PHP script and safe replacing this file on-the-fly

My PHP script serves files using readfile() and manually added HTTP headers. Files are about ~1 MB big, so no partial-reading is necessary. What is the best way to replace this file with a updated one, but ensure already started downloads won't be broken? I'd like pending downloads to be finished with fetched old file version. Platform...

how to create a text file using php where the records should be from mysql

Hi Could any one explain me how to create a text file using php where the records should be from mysql thanks in advance. ...

How do I get a mp3 file's total time in Java?

The answers provided in How do I get a sound file’s total time in Java? work well for wav files, but not for mp3 files. They are (given a file): AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(file); AudioFormat format = audioInputStream.getFormat(); long frames = audioInputStream.getFrameLength(); double durationIn...

JTree TreePath casting problem

I got this casting problem java.lang.String cannot be cast to java.io.File, when I trying to do this TreePath p = new TreePath(new Object[] {"src","file","My Diary" }); This is my jtree file model class FileTreeModel implements TreeModel { private FileNode root; public FileTreeModel(String directory) { root = new FileNode(dir...

Is there any C# library for working with pipes with YUV data?

Is there any C# library for working with pipes with YUV data? or at least with yuv files... So we have programm like FFmpeg or VLC or x264.exe it can give us live yuv pipe or file... so is there any good library for playing with yuv files\pipes - like a yuv file\pipe to rgb file pipe... ...