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
0
votes
0answers
12 views

Print data in file in ordered list [closed]

I'm practicing for my upcoming test and I trying to figure out how to print data inside the FILE. accounts.txt ...
4
votes
2answers
64 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 ...
-3
votes
1answer
38 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 ...
4
votes
4answers
97 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 ...
1
vote
1answer
50 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 ...
2
votes
3answers
259 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: ...
1
vote
1answer
43 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 ...
2
votes
3answers
106 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. ...
0
votes
0answers
50 views

Android app class serialization with static Load / Save method

This is a follow-up question for Android app class serialization. As forsvarir's updated answer mentioned "A static load that returns a new instance of a ...
5
votes
2answers
78 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 ...
2
votes
1answer
44 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 ...
3
votes
3answers
81 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 ...
1
vote
1answer
55 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. ...
0
votes
0answers
10 views

Extracting integers from arbitrary text and storing them in a dynamic array

Minimal vector-like dynamic arrays, min_array.h. This is not new at all, but since I use a lot of functions similar to this in larger projects, I was hoping for ...
1
vote
1answer
45 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: ...
1
vote
1answer
27 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? ...
4
votes
2answers
217 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 ...
2
votes
1answer
105 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: <...
1
vote
1answer
100 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: <...
3
votes
1answer
38 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 ...
7
votes
1answer
150 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 ...
8
votes
3answers
369 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 ...
1
vote
1answer
169 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 ...
1
vote
0answers
33 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 ...
5
votes
1answer
108 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 ...
3
votes
1answer
66 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,...
3
votes
2answers
113 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 ...
3
votes
1answer
76 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. ...
2
votes
2answers
132 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 ...
3
votes
3answers
124 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? ...
4
votes
2answers
370 views

FileParsing in C

So I have a text file filled with old onion links and its incredibly messy: ...
1
vote
1answer
538 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 ...
2
votes
2answers
382 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 ...
6
votes
2answers
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 ...
5
votes
1answer
47 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 ...
5
votes
2answers
1k 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: ...
12
votes
2answers
597 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: ...
2
votes
0answers
62 views

Trie to index files and search for them

Basic idea (foo and foa are filenames): ...
1
vote
1answer
48 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 ...
0
votes
3answers
301 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? ...
3
votes
1answer
174 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 ...
3
votes
2answers
55 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 ...
1
vote
1answer
60 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 ...
4
votes
2answers
102 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? ...
20
votes
6answers
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 ...
-1
votes
2answers
431 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. ...
4
votes
1answer
56 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 ...
4
votes
2answers
77 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. ...
5
votes
3answers
594 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 ...
1
vote
0answers
41 views

sudoedit_enhanced written POSIX-ly (readlink possible problem?)

sudoedit_enhanced written POSIX-ly challenge While creating sudoedit_enhanced POSIX (apart from ...

1
2 3 4 5
16