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.

24 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
152 views

Comparing same-size files and reporting on the differences byte-by-byte

I created a small Python utility to analyze multiple same-size files and report on the difference byte-by-byte (i.e. Hamming distance, not Levenshtein distance.) I am planning to extend the ...
Graham's user avatar
  • 1,379
4 votes
0 answers
239 views

Script to auto-generate Markdown tables of contents

I would greatly appreciate feedback on the enclosed script, which auto-generates a Markdown table of contents for Github-flavoured Markdown, with respect to: Consistency with Ruby idiom & style ...
Alex Harvey's user avatar
4 votes
0 answers
208 views

File operations using Groovy

The idea is to read a file - "data" - and write the information to a new file - "output" - only if it meets the criteria (if the resource usage is more than a configured threshold). Content of the ...
Here_2_learn's user avatar
3 votes
0 answers
961 views

Android APP FTP downloading file implementation in Java

This is a follow-up question for Android APP connect to FTP server in Java and Android APP FTP uploading file implementation in Java. I am attempting to perform the download operation to specified FTP ...
JimmyHu's user avatar
  • 4,708
3 votes
0 answers
68 views

Simple beginner Rust CLI file reader that prints to stdout

Q: Am I approaching writing idiomatic Rust code correctly? Hi CodeReview, I'm a beginner Rustacean coming from Python going through Rust books (The Rust Book, Rust in Action). A lot of the beginner ...
9Q9a5QS's user avatar
  • 31
3 votes
0 answers
246 views

Simple one-time pad in Rust

I am new to rust and to start learning the language I decided to implement a simple one-time pad encryption program. The part I am least sure about is the reading and writing from the files. Ideally ...
carloabelli's user avatar
3 votes
0 answers
316 views

Parsing version from Cargo.toml

I want to get version from Cargo.toml and use the value inside my app. Here is a function I wrote: ...
philipjkim's user avatar
3 votes
0 answers
119 views

TI-Basic file manager

Tested on my TI-84 Plus CE. Variables: F: Stores the file listing's ID N: Stores the current file's ID ...
Solomon Ucko's user avatar
  • 1,566
3 votes
0 answers
67 views

CLI app to download a .gitignore file

I have written a simple app that adds gitignore files to the current working directory - it does this by reading files hosted on GitHub and then saving them (...
Vinyl Warmth's user avatar
3 votes
0 answers
117 views

Counting words in files - follow-up 2

Previous question: Counting words in files - follow-up I have fixed punctuation problems in my previous code by using template, because it is easy to understand and my focus on template mechanism. ...
MORTAL's user avatar
  • 3,278
2 votes
0 answers
82 views

Simple diff utility in Java using OOP take 2

(See the previous iteration here.) After further revising my code, I have: com.github.coderodde.diff.Diff.java: ...
coderodde's user avatar
  • 28.2k
2 votes
0 answers
147 views

Trie to index files and search for them

Basic idea (foo and foa are filenames): ...
user227408's user avatar
2 votes
0 answers
90 views

Sanitize input for a "robot on a grid" kata

I have the following piece of code which is FSI tested and works. However, I want to trim it as much as possible (not only the comments, which are there for my own future reference) and make it as ...
user avatar
2 votes
0 answers
95 views

Game involving finding words containing letters from a memorized list

I wrote this Java game where the user memorizes a list, gets given letters and needs to find a word that contains those letters. The player has only a few seconds to enter the word. Example: Program ...
Paul Lemarchand's user avatar
2 votes
0 answers
60 views

Sharing File (Content) without saving it before

I have a listview of PrivateFile objects which contain the fileId (int), fileName (String) ...
Lebron11's user avatar
  • 143
2 votes
0 answers
820 views

File shredding (secure deletion) algorithm

Does anyone see anything wrong with this? I was considering using something like srm or wipe and use ...
scripter's user avatar
  • 211
2 votes
0 answers
54 views

Handling multiple uploaded images in JavaScript

...
12Me21's user avatar
  • 121
2 votes
0 answers
2k views

Download a PDF and submit it as a print job

I have following Java code, which is to print PDF, but in a busy location this code is taking about 20 to 30 second delay before submitting to the hardware. get the PDF file via the network download ...
YumYumYum's user avatar
  • 141
2 votes
0 answers
751 views

Bitmap to base64 and writefile

I have the following code which does 2 things: Return a scanned fingerprint as base64 Store this print as bitmap While the code works most of the time, sometimes an invalid bitmap is saved (I can't ...
Michael's user avatar
  • 121
2 votes
0 answers
148 views

Organising loops for parsing a text file

The following code is from a utility I've written for myself. It takes a file in this format: ...
JCx's user avatar
  • 238
2 votes
0 answers
2k views

Upload multiple files in different formats and sizes from one HTML form

I have a html form with some text input fields and three file upload fields. two of them should be images and one should be a file (pdf). My code is working well but I feel this is not the proper OO ...
Yasitha's user avatar
  • 121
1 vote
0 answers
78 views

Creating a reusable DictWriter context manager

I want to simplify the repetitive work of creating a DictWriter in a with context manager. So I created a ...
supermitch's user avatar
1 vote
0 answers
44 views

sudoedit_enhanced written POSIX-ly (readlink possible problem?)

sudoedit_enhanced written POSIX-ly challenge While creating sudoedit_enhanced POSIX (apart from ...
Vlastimil Burián's user avatar
1 vote
0 answers
107 views

is there way to make faster to write to a file?

...
slowmonk's user avatar
  • 119