Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
1 vote
1 answer
23 views

Unit tests for PNGme steganography exercise in Rust

I want to become proficient in Rust and I've followed the PNGme exercise. I've completed it up until Chapter 4 included, where I've written a lot of tests myself for verifying that the command line ...
user avatar
  • 111
1 vote
1 answer
56 views

Passwords with C++ Console

I am really, really new to coding in general and especially c++. To get more familiar with c++ I am trying to do a series of projects with c++ console apps. One of my projects is with a database that ...
user avatar
3 votes
3 answers
94 views

tee: copy standard input to both stdout and a file

I implemented the tee command from linux. The program also handles the -a option for adding text to the end of a file if it ...
user avatar
  • 179
1 vote
0 answers
28 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 ...
user avatar
3 votes
1 answer
96 views

Processing a binary file with buffer length tags

I am trying to process a very large binary file using MappedByteBuffer from java.nio package. This is how the data looks like in the file: ...
user avatar
  • 33
0 votes
0 answers
50 views

Image file uploader webpage in HTML5 and PHP

I am trying to make a webpage for uploading image file and storing the uploaded file on server. There are several features in this implementation: There is a drag & drop zone on the webpage. You ...
user avatar
  • 3,302
0 votes
0 answers
24 views

PowerShell to query SQL database with a string from a filename

I am trying to write a PowerShell script that will check a folder for any files and then for every file it will grab part of the filename and check it against the SQL database. If it found a match, it ...
user avatar
  • 1
0 votes
0 answers
11 views

Snip alias the Gnome Screenshot utility

On windows, the screenshot utility is called Snip, but on ubuntu 21.10 it's called Screenshot. Because of muscle memory, I regularly type Snip in the gnome applications search and it fails to find the ...
user avatar
6 votes
2 answers
875 views

Read and write triangulated surfaces

Recently, I wrote a class which can load an .obj file into vector array, and save the vector array as an .obj file. The .obj file looks something like this: ...
user avatar
7 votes
5 answers
1k views

Robust program to write an array of certain data type to a binary file and read back from it (C++17)

Problem description As the title indicates, I want to be able to write to and read from a binary file safely, in the sense that I want to have full control of everything that might go wrong. Since I ...
user avatar
1 vote
1 answer
190 views

Hashing with python optimization, hashlib and multiprocessing

I am looking to get any type of improvement, I want to be able to hash a list of 'blocks' aka strings and check if hashes match per block, if you can help me with that, currently reading and writing ...
user avatar
  • 65
1 vote
1 answer
24 views

Batch generating histograms of images in Matlab

I am attempting to plot histograms for batch of images in Matlab. The file structure of input images and the experimental implementation are listed as below. File structure of input images The matlab ...
user avatar
  • 3,302
0 votes
0 answers
469 views

NIQE score and PIQE score calculation for batch of images in Matlab

There are some image quality assessment methods for "no-reference" image quality analysis (NR-IQA). Here, I am attempting to calculate the NIQE score and PIQE score for batch of images in ...
user avatar
  • 3,302
2 votes
2 answers
62 views

Send an array of files and return the first one that exists

I have a little project, chuy, which is basically a copy of Make. By request of users I have added support for toml configuration, since originally it only accepted ...
user avatar
2 votes
3 answers
96 views

Batch extracting differences between two images with enhancement using opencv

I am attempting to extract the absolute differences image between two input images and then enhance the intensity (brightness) channel in HSV color space with the given times. The workflow is like ...
user avatar
  • 3,302
0 votes
0 answers
29 views

Batch Insert Multiple Figures into Powerpoint Slides with VBA

This is a follow-up question for Batch Insert Figures Into Powerpoint Slides with VBA. I appreciate PeterT's answer. Besides the single image replacement, I am attempting to make ...
user avatar
  • 3,302
-1 votes
1 answer
60 views

Image upload filter for PHP

I am trying to improve my file upload handler filter. Environment Since any client-side validation is easily circumvented, there is none in this code, for ease of testing. Not even an ...
user avatar
  • 129
2 votes
1 answer
90 views

encrypt files using a variant of Vernam Cipher in C language

I'm coding this program that allows you to encrypt files using vernam cipher in C language. I would be glad if you could inspect my code and tell me if I can make some improvements to it or if there ...
user avatar
  • 21
3 votes
0 answers
240 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 ...
user avatar
  • 3,302
1 vote
1 answer
260 views

Python class for handling custom file type

Background I am devising a simple file format to store some (possibly large) binary data together with some metadata that specifies how the data was generated: ...
user avatar
  • 175
4 votes
2 answers
111 views

Two dimensional gaussian image generator in C

This is a follow-up question for Image Processing Median Filter in C. I am attempting to create a two dimensional gaussian image like below in C. The formula is as follows. The experimental ...
user avatar
  • 3,302
-3 votes
1 answer
39 views

Creating two txt file for changed and unchanged records [closed]

Hello developers i have a got a code which is compares two txt files find their differences and notes them but i am wanting to add a feature which creates two txt files first one is for changed ...
user avatar
4 votes
4 answers
271 views

Image Processing Median Filter in C

I am attempting to perform Median Filter with size 3 x 3 in C language. The function MedianFilter33 has been implemented as follows. The experimental implementation ...
user avatar
  • 3,302
2 votes
1 answer
62 views

Sports DataSheet

This program asks the user for a players name, # of goals, saves, games played, etc. This information is ten organized on a .txt file along with the time the information was logged. users can also ...
user avatar
2 votes
3 answers
273 views

Java logger (of doom!), updated

In a previous question, Java logger (of doom!), I had posted my own logger, written in Java. I have since taken the answers from that question and a few of my own things to update it. New code: ...
user avatar
1 vote
1 answer
141 views

Android APP FTP uploading file implementation in Java

This is a follow-up question for Android APP FTP host profile class implementation and Android APP connect to FTP server in Java. I am attempting to perform the upload operation to specified FTP ...
user avatar
  • 3,302
2 votes
3 answers
110 views

Java logger (of doom!)

I wrote my own logger, but I dislike how many times I overloaded the log() function. If anyone knows of another way of doing that, feel free to share. ...
user avatar
5 votes
2 answers
243 views

C key: value file parser

I implemented a key:value format file parser in C, or something that comes close to it as there is no such thing as dynamically creating structs in C. Assumptions: we are creating a C program that ...
user avatar
2 votes
1 answer
58 views

PNG steganography tool in C

This is a steganography tool enabling you to conceal any file within a PNG file. In order to compile the program you need libpng to be installed on the system. It is one of my personal projects and I ...
user avatar
3 votes
3 answers
91 views

Shortest path algorithm

I have a code that does applies Dijkstra's algorithm for an adjacency list. The data are taken from a file. In the file, the first line contains the number of vertices and edges, and the remaining ...
user avatar
1 vote
1 answer
142 views

Check type of executable file

I write this program that checks if a file is executable, and if so, to check if it is an ELF binary or a shell script. ...
user avatar
  • 1
1 vote
1 answer
82 views

A better implementation of the `execvp` call: the code implements `execvp`

I'm trying to implement execvp () using execv (). I don't know if the code is the best implementation. my code: ...
user avatar
  • 1
1 vote
1 answer
29 views

Replacing removed secure empty trash feature

Is this code reliable? Is there any extra precaution I should or should not be taking here? How is my code to securely delete a file by repeatedly overwriting the contents? ...
user avatar
4 votes
2 answers
1k views

Breaking a 3GB gz file into chunks

I have a 3GB gz file that I am trying to break into chunks of smaller files which are not required to be gz (I tried to make files of 10000000 lines, this is not a requirement, the chunks could be of ...
user avatar
2 votes
1 answer
657 views

Searching faster for a file on the drive using Python

I am trying to write a code that should look on the laptop for a file, open it, if found, and read the context of that file (it should be .txt or .doc). So far, I wrote this code which is working: <...
user avatar
  • 123
1 vote
1 answer
111 views

A Tiny Text File Read/Write class Implementation in C#

I am trying to implement a tiny text file read / write class FileIO in order to make the operations of reading / writing pure text files easily. The usage is like: <...
user avatar
  • 3,302
3 votes
1 answer
45 views

Simple file-renaming program in python

I’m learning python and have built a very simple program that just renames files. It makes all letters lowercase and replaces spaces and %20-instances with ...
user avatar
6 votes
1 answer
619 views

C++ File Converter Program

Looking for input on how to clean up my code. I am writing a file converter that can read different but related file types (relatable like a wav and mp3 encode audio or how a jpg and tiff encode image ...
user avatar
8 votes
3 answers
382 views

Sinclair Spectrum TAP file dumper

The other day, I had occasion to want to look into an ancient piece of Z80 software written for a Sinclair Spectrum computer. Software for this machine was typically saved to audio tape, and today ...
user avatar
  • 64.1k
1 vote
1 answer
418 views

Cleaning up the code of a C++-based Personal Web Page Generator

I have tried to implement the following challenge: Personal Web Page Generator Write a program that asks the user for his or her name, then asks the user to enter a sentence that describes himself or ...
user avatar
1 vote
0 answers
40 views

File Removal PowerShell Script

File Removal PowerShell Script Introduction I have created a File Removal PowerShell Script that can be configured to remove files on various ways. I would like your opinions an suggestion on my scrip ...
user avatar
5 votes
1 answer
141 views

Command-line utility to bump semantic version numbers in an input file

Update: link to corresponding release The code presented here is tagged as release version v0.1.0 on Github for easy reference. Introduction bump is a command-line ...
user avatar
3 votes
1 answer
72 views

program that fully documents every file on drive

I have a program which goes through your drive and does two things: For every file extension it creates a file "file of extension_name" and whenever it encounters a file with that extension,...
user avatar
  • 257
3 votes
2 answers
134 views

NinjaTrader - Writting to MemoryStream then to Disk

I would like to make the below code more efficient by writing all text(CSV) to memory before writing to disk. The CSV file could have upwards of 10,000 or rows. With the current code, it opens and ...
user avatar
  • 33
3 votes
1 answer
96 views

Setting manager class for reading and managing Settings.ini file of my program

Setting manager class for reading and managing Settings.ini file I have started a project creating Software Installer application for auto download and auto install software, similar how Ninite works. ...
user avatar
2 votes
2 answers
160 views

Secure file upload for PDF only

I am trying to create a secure file upload using PHP 7+ where I only allow PDF files. I found a lot of posts on this topic on different websites but couldn't find a complete solution that ensures that ...
user avatar
  • 223
3 votes
3 answers
139 views

C Logging Function

I wrote this log function and it works but is there a better way to write into the file stream and console at the same time? ...
user avatar
  • 79
4 votes
2 answers
416 views

FileParsing in C

So I have a text file filled with old onion links and its incredibly messy: ...
user avatar
1 vote
1 answer
3k views

Simple Python Login

i have made simple python login nothing impressive but i have the feeling that i could have done it differently. I saw some people saying that i should use text files but i tried and i didn't quite ...
user avatar
  • 359
2 votes
2 answers
1k views

Execute external file from inside C++

I am trying to create an application that on the front end presents the user with a text editor to input code into and then I will run that code and return the result. I thought it would be a fun ...
user avatar

1
2 3 4 5
16