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
0 answers
872 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
  • 3,996
1 vote
1 answer
929 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: ...
Alexandru Dinu's user avatar
5 votes
2 answers
329 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 ...
JimmyHu's user avatar
  • 3,996
-3 votes
1 answer
42 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 ...
Ibrahim Deveci's user avatar
4 votes
4 answers
958 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 ...
JimmyHu's user avatar
  • 3,996
2 votes
1 answer
78 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 ...
Grewal_Creator's user avatar
2 votes
3 answers
281 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: ...
CATboardBETA's user avatar
1 vote
1 answer
665 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 ...
JimmyHu's user avatar
  • 3,996
2 votes
3 answers
115 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. ...
CATboardBETA's user avatar
5 votes
2 answers
772 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 ...
Samuele B.'s user avatar
2 votes
1 answer
141 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 ...
Andy Sukowski-Bang's user avatar
3 votes
3 answers
151 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 ...
Eugenos_Programos's user avatar
1 vote
1 answer
496 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. ...
Mark's user avatar
  • 449
1 vote
1 answer
118 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: ...
Mark's user avatar
  • 449
1 vote
1 answer
33 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? ...
Block of Diamond's user avatar
4 votes
2 answers
2k 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 ...
Ahlam AIS's user avatar
2 votes
1 answer
2k 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: <...
geekt's user avatar
  • 123
1 vote
1 answer
202 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: <...
JimmyHu's user avatar
  • 3,996
3 votes
1 answer
62 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 ...
user8758206's user avatar
5 votes
1 answer
2k 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 ...
ChipsAhoy's user avatar
8 votes
3 answers
480 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 ...
Edward's user avatar
  • 65.3k
1 vote
1 answer
775 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 ...
Jackson Liew's user avatar
5 votes
1 answer
238 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 ...
Hungry Blue Dev's user avatar
3 votes
1 answer
76 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,...
fartgeek's user avatar
  • 257
3 votes
2 answers
223 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 ...
cccc's user avatar
  • 33
3 votes
1 answer
132 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. ...
Zoran Jankov's user avatar
2 votes
2 answers
282 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 ...
keewee279's user avatar
  • 223
3 votes
3 answers
275 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? ...
cynnad's user avatar
  • 79
4 votes
2 answers
458 views

FileParsing in C

So I have a text file filled with old onion links and its incredibly messy: ...
dumbass.exe's user avatar
1 vote
1 answer
5k 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 ...
bliboy's user avatar
  • 369
2 votes
2 answers
3k 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 ...
Luke Kelly's user avatar
6 votes
2 answers
1k views

A utility to swap two files

While I have never had to swap two files I have always wondered if there was command for swapping two files and recently I decided to see if there was one. Eventually I found out that there wasn't one ...
nullptr's user avatar
  • 659
5 votes
1 answer
77 views

A Program that gets text from a client and puts it into a file on a server

I recently created a program that could get information from a client, a name and some text, and then put that into a text file. From there the user can get open the text file straight from the ...
Emmanuel Okafor's user avatar
6 votes
2 answers
3k views

A simple error messaging and logging system via macro(s) in C++

I'm just trying to build a quick and crude error messaging system. It currently looks like this: ...
Francis Cugler's user avatar
12 votes
2 answers
2k views

C# - name separation & last name in upper to Camel

I had an xls file with lots of full names in the following form at work: ...
newbie's user avatar
  • 879
2 votes
0 answers
142 views

Trie to index files and search for them

Basic idea (foo and foa are filenames): ...
user227408's user avatar
1 vote
1 answer
62 views

Renaming and deleting video file

I am using below code to rename and delete video. Need review for the following: Code optimization Performance Overall code review ...
Android Developer's user avatar
0 votes
3 answers
1k views

Fastest way to create random pixel image

I want to create a very big gigantic PNG image. The image pixel are generated randomly, being How can I improve the below code to create a fast random pixel image in java? ...
Hither Joe's user avatar
3 votes
1 answer
739 views

Python - A Regex Text File Searcher by Content Project

I would like some advice on efficiency and ways to further remove redundant code. Regex Text File Search: enter a valid directory path, and a string to search for makes a list containing all the ...
Anonymous's user avatar
  • 1,204
3 votes
2 answers
61 views

What is the fastest way to record the names of each file in a directory?

I want to fill an array of strings with the name of each directory item. The issue is allocating memory. I either need to count the items before, allocate memory, then go over them again, or I will ...
user avatar
1 vote
1 answer
112 views

recursive file search, C , linux

hi guys this script recursively searches for files with a certain extension and possibly in a directory passed by the terminal ....(In case no directory has been passed, search from the current one) I ...
checcasio 's user avatar
4 votes
2 answers
155 views

Efficiently generate large file to create SQL table and insert sample user data

Here's a function I use to generate a 2.5 gig SQL dump file for testing. It works but it takes a long time. How can I make it more efficient? ...
I wrestled a bear once.'s user avatar
20 votes
6 answers
4k views

Can I slim this UTF8-encoding program?

Below is my entire program. You can read what it does thanks to the comments and specifications in particular. My question is: can it be improved? Would it be possible, for example, to avoid writing ...
Alberto Ursino's user avatar
-1 votes
2 answers
793 views

Finding the k most frequent words in file in c++

I have written C++ code using trie and min-heap to find the k most frequent words. I want to review my code. ...
Shalini Negi's user avatar
4 votes
1 answer
73 views

Column File Format

Following up on my previous Column work: Column File Format Stream It is now available in github: https://github.com/Loki-Astari/ThorsStorage I have incorporated the comment by @L.F. but have done a ...
Martin York's user avatar
  • 94.3k
4 votes
2 answers
99 views

Encrypting file from source AEAD

I am trying to encrypt/decrypt file using source code directly. The issue is how to properly do it after reading the file. ...
dylan solaman's user avatar
5 votes
3 answers
601 views

Check header files for namespace usage

To ensure there are no naming conflicts within our project (C++) I was tasked with writing a python script to check all of our header files for any occurrences of a ...
Linny's user avatar
  • 9,989
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
3 votes
0 answers
67 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
2 votes
1 answer
63 views

RemoteFile in Java - follow-up

(See the first and initial iteration at RemoteFile in Java.) I have added some new facilities for convenience. Now I have this in mind: com.github.coderodde.utils.io.RemoteFileDownloadListener.java: ...
coderodde's user avatar
  • 27k

1
2
3 4 5
17