file

Real-time aggregation of files from multiple machines to one

I need a tool which gets a list of machine names and file wildcards. Then it connects to all these machines (SSH) and begins to monitor changes (appendings to the end) in each file matched by wildcards. New lines in each such file are saved to the local machine to the file with the same name. (This is a task of real-time log files colle...

C# Saving an arraylist to a file?

I have a simple program where I would like to save an arraylist to a file, so that when the program is restarted, it loads from the file to the arraylist in memory. Is this possible in C#? Or do I need to itterate over the arraylist countaining my custom classes and in someway print them out? Any tips on a correct way to do this? ...

new >> how would i read a file that has 3 columns and each column contains 100 numbers into an array?

int exam1[100];// array that can hold 100 numbers for 1st column int exam2[100];// array that can hold 100 numbers for 2nd column int exam3[100];// array that can hold 100 numbers for 3rd column int main() { ifstream infile; int num; infile.open("example.txt");// file containing numbers in 3 columns if(infile.fail...

How to html report to any printable file

How to html report to any printable file.Is there any solution. ...

??? Error using ==> dlmread at 55 Filename must be a string.

[file_input, pathname] = uigetfile( ... {'*.txt', 'Text (*.txt)'; ... '*.xls', 'Excel (*.xls)'; ... '*.*', 'All Files (*.*)'}, ... 'Select files'); D = uiimport(file_input); M = dlmread(D); X = freed(M); Getting errors with dlmread......"??? Error using ==> dlmread at 55 Filename must be a string."..need to get the data from dlmread t...

Read text file in google GWT?

Hello all, I am writing a webpage using GWT. Now I need to read a text file and display the content in the webpage but have no idea how to do that with GWT. It is very nice if there is any way in GWT that I can read .properties file. (Please note that this is not the properties file of localization that GWT has already supported ) Doe...

23warning: assignment makes pointer from integer without a cast

Im new in programming c with arrays and files. Im just trying to run the following code but i get warnings like that: 23 44 warning: assignment makes pointer from integer without a cast 53 error: expected expression before ‘char’ Any help? It might be silly... but I cant find what's wrong. #include <stdio.h> FILE ...

Drawbacks with reading and writing a big file to or from disk at once instead of small chunks?

I work mainly on Windows and Windows CE based systems, where CreateFile, ReadFile and WriteFile are the work horses, no matter if I'm in native Win32 land or in managed .Net land. I have so far never had any obvious problem writing or reading big files in one chunk, as opposed to looping until several smaller chunks are processed. I us...

Android ACTION_SEND Attached File

When you attach a file to an e-mail using the ACTION_SEND intent (with the extra EXTRA_STREAM) does the e-mail app copy that attached file to its own location? My app creates a file and attaches it to an email, but this can happen many times and I would like to be able to delete this file when it is no longer needed (so it doesn't flood ...

Reading a triangle of numbers into a 2d array of ints in Python

I want to read a triangle of integer values from a file into a 2D array of ints using Python. The numbers would look like this: 75 95 64 17 47 82 18 35 87 10 20 04 82 47 65 ... The code I have so far is as follows: f = open('input.txt', 'r') arr = [] for i in range(0, 15): arr.append([]) str = f.readline() a = str.spl...

App-Engine (Java) File Upload

I managged to upload files on app-engine by using the following example http://stackoverflow.com/questions/1513603/how-to-upload-and-store-an-image-with-google-app-engine-java and http://www.mail-archive.com/[email protected]/msg08090.html The problem is, I am sumitting other fields along with file field as list...

Force Normal View when generating Word doc via HTML

I am creating an HTML document which we are then pushing out to MS Word using a "application/msword" content type. This works so far except that the files open in Word with Web View. Once Normal View is selected all works fine. Is there any way to force Word to open with Normal View instead of Web View? ...

How to pass a file (read from Java) most effectively to a native method?

Hi, I have approx. 30000 files (1MB each) which I want to put into a native method, which requires just an byte array and the size of it as arguments. I looked through some examples and benchmarks (like http://nadeausoftware.com/articles/2008/02/java_tip_how_read_files_quickly) but all of them do some other fancy things. Basically I d...

Copying files over network (requiring authentication)

Is there some way to authenticate as a local (not network) user in order to copy files over the network in .Net? net use is not an option, and I can't seem to get LogonUser to work. Any ideas? [Edit] Here is some code: public class UserImpersonator : IDisposable { private WindowsImpersonationContext _impersonationContext; p...

Having an issue with overwriting an element of a file correctly (numeric)

This is an ATM style program, but currently it doesn't do exactly what I need it to do... I need to get the current balance, and when money is transferred from either checking or savings, it should add it to checking and subtract it from savings. which is does, but not correctly... Input example -=[ Funds Transfer ]=- -=[ Savings to C...

How do I load resource using Class Loader as File?

I want to open files using the class loader. However I always get a FileNotFoundException. How do I create a new File using the URL? I don't want to open it as a stream just as a file. URL url = VersionUpdater.class.getResource("xslt/screen/foo"); File f = ... ...

External html, for headers/navs?

Hey all, looking to see if theres a way to easily include external html file inside the body to repeat on every page, for instance: a navigator or something. Basically if i have to add a menu item or something, i have to go and paste all the code into each page. Or even a way to section parts off in Dreamweaver to update based on a file...

Adding an existing implementation file to an Xcode project won't work

As I write most of my code using MacVIM, I need to add the new files to the Xcode project in order to compile them into the executable. Today however I encoutered an implementation file (.m) wich Xcode won't allow to be added. It appears light gray in the appropriate finder window as if it were already included in the project, but when I...

How to check for a dynamically created file in Java?

I have an application where I need to check for a file which may be created dynamically during my execution, I will give up after some MAX time where the file has yet to show up. I wanted to know if there was a more efficient method in Java of checking for the file other than polling for it and then sleeping every X seconds? If not what ...

iPhone Simulator - Writing to File/Reading problems

I have been reading alot on iPhone read/writing and I believe that everything I have is correct but for some reason it isn't working the way it should. code is as follows NSString *docsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; NSString *filePath = [docsDirectory str...