file

FTP files from Google App Engine

I was wondering if it was possible to FTP/SFTP a file from a Google App Engine application's servlet to a remote FTP/SFTP server. Or maybe by creating a Task on the TaskQueue... Has anyone got this? The GAE's documentation says that "bytecode that attempts to open a socket or write to a file will throw a runtime exception" Thank you fo...

Unrecognized extra characters in file parsed with php

I've got a csv file I'm parsing with PHP. (Actually, it's tab-separated.) In a text editor, the file looks like this: Object Id Page/Master Id Page/Master Name ... Using this code: $f = file_get_contents($filepath); echo $f; I get this in the browser: ��O�b�j�e�c�t� �I�d� �P�a�g�e�/�M�a�s�t�e�r� �I�d� �P�a�g�e�/�M�a�s�t�e�r� �N�...

Decoding File Format (Norton .FBF)

Hey there, I currently have a norton ghost backup of the 'My Documents' folder, however norton ghost does not allow me to restore 'all' my files at once, and only has the functionality to search for specific files and restore them. This is a problem as I have nearly 100GB of important documents and such, that are locked away in these .f...

Read numbers from a text file in C#

This is something that should be very simple. I just want to read numbers and words from a text file that consists of tokens separated by white space. How do you do this in C#? For example, in C++, the following code would work to read an integer, float, and word. I don't want to have to use a regex or write any special parsing code. if...

How can I extract multiple email addresses from a single line using a Perl regex?

Hello, I have a text file which was originally a mysql dump of a database table. How do I write a Perl script to extract all the email addresses from this text file? The problem I am having is that I read in the lines of the document one by one then do a regular expression, however in cases where there are more than one email address o...

File based Spring Security

Hi, I'm working on a Web Service project to provide data to a partner. Our app is really light weight and has only a handful of APIs. Because of time constraint and in-house pre-existing knowledge we went the Spring MVC / Spring Security path to serve those restful APIs. At any rate this is a B2B project where we are expecting only t...

How to package IeEmbed.exe and MozEmbed.exe into an executable Jar file

I use JDIC in my executable Jar file, when it runs, it needs to have IeEmbed.exe and MozEmbed.exe in the same dir as the Jar file, I wonder if there is a way to package all 3 files into a single executable Jar file, so when I distribute the app, there is only one executable Jar file to worry about, besides, there are problems sending and...

Multifile plugin - help

Hi, I am using Multifile plugin to select the multiple file. I am trying to get the final file count for each browser selection . Any help is appreciated. Here is the sample code i am using <html> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.MultiFile.js"></script> <script>...

enabling users to modify documents stored by an application

Hi, we have the following scenario: * a .NET application allows users to upload documents. * the documents are stored in a filesystem, currently inaccessible to users. the path is basically \year\month\day\filename.ext * the path and filename are stored in a database (MS SQL200) that is used to link the documents to various records in th...

How to revert files with specific extension in svn?

I would like to do something like this: svn revert --recursive mydata/*/*.txt and I want it to revert all files which have extension *.txt in the directory mydata. Is there a way to do that? ...

Is it possible to bypass a file lock in C# when another thread/process is unecessarily using an exclusive lock?

Is there a way to bypass or remove the file lock held by another thread without killing the thread? I am using a third-party library in my app that is performing read-only operations on a file. I need a second thread read the file at the same time to extract out some extra data the third-party library is not exposing. Unfortunately, the...

File upload with the ability to resume (preferably in Ruby on Rails)

Hi all - this is quite a difficult topic by all accounts. I am building a website that requires users to upload large (multi-GB). What is the best way allow users to upload a file on a website and allow the file upload to be resumed should it fail? What is the way to write this in rails? Any ideas greatly appreciated. Max. ...

Java file not written to stream with new line characters

We're streaming a CSV file from a web service. It appears that we're losing the new line characters when streaming - the client gets the file all on a single line. Any idea what we're doing wrong? Code: public static void writeFile(OutputStream out, File file) throws IOException { BufferedReader input = new BufferedReader(new Fi...

How can I load a Image from a file, then an image to a bitmap?

I have a file location on my file system. I need to first load the file into a System.Drawing.Image, then I need to load the Image into a bitmap. ...

jquery - Read a text file?

I have an html file that I'd like to open and read from, but I'm not entirely sure how to do that... Basically, it's a fairly large file (big.html), and, in a separate file (titles.html), I have some jquery code that I'd like to use to find certain elements (namely, h2 tags) and get the inner text from those tags and write just that text...

How does one reclaim zeroed blocks of a sparse file?

Consider a sparse file with 1s written to a portion of the file. I want to reclaim the actual space on disk for these 1s as I no longer need that portion of the sparse file. The portion of the file containing these 1s should become a "hole" as it was before the 1s were themselves written. To do this, I cleared the region to 0s. This d...

upload small file in asp.net end up in Page can not be displayed

Hi, I am using asp.net file upload control to upload excel file data to database. Till morning it was working fine..But now I am not able to upload even 10 kb files.. The httpruntime ->maxrequestlength values is 10mb in my web.config :(. Please help me :( :( :( Advanced happy new year !!! ...

Illustrator opening as PDF

I am coding a file sharing application for my office. One strange problem I am going through is the Illustrator files being opened in PDF when you hit the download button. This problem is triggered because the mime type of illustrator files is application/pdf. So the browser when it reads the file, triggers Acrobat to open the file. Is ...

New file in folder

Hello I want to detect when a new file is added to a existing folder and access it. How can I do this (C#)? Thanks ...

Opening Resources in Text File Format in Notepad

Hi everyone, I'm having some trouble using resource files. In my project I'm using a bunch of bitmap files and two txt files. Bitmaps are used as backgrounds for controls, but .txt files I want to open in Notepad or WordPad. Till now I was accesing them from a file path on my machine: ControlName.backgroundimage = New Bitmap(direcory...