Questions tagged [file]

A block of arbitrary information, or resource for storing information, accessible by the string-based name or path. Files are available to computer programs and are usually based on some kind of persistent storage.

Filter by
Sorted by
Tagged with
3 votes
5 answers
10k views

Replace sequence of strings in binary file

I have searched for method to find and replace strings sequence in binary files without any luck. The main requirement was that method should not load all file in memory but rather use chunks. I am ...
Tomas's user avatar
  • 131
4 votes
1 answer
789 views

Parsing random phrases from a file

This essentially reads a specially-structured file from the scanner and then parses random phrases and prints them: ...
Mr_CryptoPrime's user avatar
5 votes
1 answer
1k views

Reading a binary file containing periodic samples

I have the following code for reading HTK feature files. The code below is working completely correct (verified it with unit tests and the output of the original HTK toolkit). ...
Peter Smit's user avatar
2 votes
6 answers
1k views

Change HashSet to a set of strings found in a file

This function changes a HashSet in the root of the class called 'commands' to a set of strings found in a file at "plugins/UC/Commands.txt" (it's what was requested by the people using the plugin). ...
user avatar
8 votes
4 answers
32k views

Getting the length of a file in characters

Here's my function for getting the length of a file, in characters: ...
Maxpm's user avatar
  • 395
14 votes
2 answers
311 views

Executing a program with a temporary directory and measuring the running time

I need a code review for best practices and code correctness of the following piece of code. run executes a program and validates in output. If the output is valid ...
Alexandru's user avatar
  • 409
14 votes
3 answers
678 views

Extracting a set of numbers from a file

I do most of my programming in C/C++ and Perl, but I currently learning Fortran. I began by coding up a simple program, something that took me < 5 minutes in Perl (see this thread from BioStar). ...
Daniel Standage's user avatar

1
13 14 15 16
17