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.
78,228
questions
-7
votes
0
answers
21
views
How to make a c program code that checks the return date of a borrowed book? [closed]
The system should display the list of students, their respective IDs, and borrowed books. The algorithm should also check for the computer's time-and-date clock and then analyzes due.txt file checking ...
0
votes
3
answers
28
views
How to convert image buffer to file object in NodeJS?
Purpose
How do I make a file in the same path in NodeJS in the same form as client request form?
// test.js
const readFile = fs.readFileSync(filepath, (err, data) => {
if (err) {
console.log(...
-1
votes
3
answers
33
views
What is the most efficient way to write one item to a .csv file in Python?
I'm writing a script that is supposed to check two directories, one source, and one destination, then automatically copy all the new folders from the source directory into the destination directory, ...
0
votes
0
answers
14
views
HTML input type="file" show multiple file extension option
I have a file upload on my page like below:
<input type="file" id="myFile" name="myFile" accept=".xls, .xlsx"/>
When open file dialog is opened, the ...
-3
votes
0
answers
28
views
How to make a program in c ++ to read only the right word from the file? [closed]
I have a problem, how can I arrange for the program to read only the word I need from the file
For example, there is a file that contains
Student's last name: Smith
Year of birth: 2004
Date of ...
-2
votes
0
answers
26
views
This good for a simple dictionary? [closed]
#I think this is working pretty well but I want some thoughts
#If I made some mistakes let me know!
#simple dictionary for file reading
list = []
file = open(file="file_name", mode="tr&...
1
vote
2
answers
23
views
js assign one image input value to another
I have two image input fields
<input type="file" accept="image/*" id="one" />
<input type="file" accept="image/*" id="two" />
I ...
0
votes
2
answers
21
views
keeping a set content between program runs in python
In my program I am keeping of set of items, which I want to keep between different runs
So I thought of storing the set in a file and loading the set from the file upon starting the program(sounds ok?)...
0
votes
0
answers
21
views
How to delete a line from a txt file without having to write again?
I have a very big txt file with uneven data lines. I want to delete a specific line from the txt file, but all methods shown in google shows to
Read the file to get all lines
Delete the specific line
...
-2
votes
0
answers
23
views
Upload files from url in hosts and directories
This is the code I use:
<?php copy("$_POST[from]", "$_POST[to]");?>
But this code is not downloaded from head hosts Sample link received:
http://s4.habq78.cf/film/99/11/air....
0
votes
1
answer
14
views
Deleted folder keeps coming back [closed]
I installed wps-office on my Linux machine a few weeks ago, shortly after I uninstalled it and it left one folder 模板, I deleted the folder but it keeps being created every after a reboot.
I tried ...
0
votes
0
answers
6
views
How to load content in a Monogame library?
I am making my own library for UI and I would like to add simple tools for drawing shapes. I would like to load one white pixel and then use that as texture. But I can't figure out how to load any ...
0
votes
0
answers
20
views
How to remove necessary nodes from a binary tree?
Good evening forum members.
The following is on the agenda:
Read a sequence of coordinates (x, y, z) of spatial points from the file, ordered by distance from the point of origin (develop a separate ...
0
votes
1
answer
10
views
Can't find the system library folder, Maven dependencies folder and other system folder in Project explrorer panel
I've created a maven project and can start the project using tomcat server. But I can't see the necessary system folders to change or edit in the project explorer panel. I can see only the source ...
0
votes
1
answer
33
views
Processing file extensions in C
I'm developing some code in C that reads a file extension and stores it as a code in a byte together whether a text file or binary file is being processed. Later I wish to recover the file extension ...
0
votes
0
answers
30
views
Symfony - prepare raw file data for upload via http client
In my Symfony project I am accessing certain directory to get all files and upload it via specific API documentation.
Request body of the API call in matter has a file filed that is like:
fileData *
...
1
vote
1
answer
26
views
Built-in Database for Java Program
I was planning to work on a Password Manager project. So I wanted to know how can I store the passwords after encrypting them. I am new to databases so I can use some help.
I wanted to store the ...
-2
votes
0
answers
25
views
what is the best way to store and read json data in files in java [closed]
I am supposed to build a document-based database that uses JSON objects to store and view data.
What would be the most efficient way to save the data into a file system? With reads being more ...
0
votes
1
answer
31
views
Find key in file
There is a file that stores the keys in the form of numbers. For example:
81
35
1
56
129
After that, the cycle starts from 0 and up to the given limits.
1, 2, 3, 4, 5, 6....
Help, how to check each ...
0
votes
2
answers
51
views
String.replaceAll() doesn't work on some files and strings [duplicate]
This is the code:
public static void update(String stringOld, String stringNew, String strPath) {
Path path = Paths.get(strPath);
Charset charset = StandardCharsets.UTF_8;
try {
...
0
votes
1
answer
33
views
program that checks if the files match
My program check if two files (with a different path / name) match or not. The hard and symbolic links between the files are followed to determine it.
How can I modify the program to see what happens ...
0
votes
0
answers
24
views
Python - data science
I am trying to create two new columns based on the data below. The first column is based on the correlation between the wins 'W' and minutes 'M'. On my excel I changed the title to W and M for wins ...
-1
votes
0
answers
11
views
I have problem with copy files from Ubuntu [closed]
can someone help me with the following issue?
I have extracted files from my Ubuntu desktop to an external hard drive. Very important files. After copying, I turned off Ubuntu and it turned out that ...
0
votes
0
answers
21
views
what is the algorithm to detect modified chunks in a drop down like system
below is the most common high level design for dropbox/google drive
How does the chunker, on client side, know what chunk is modified?
if a 10 mb file had been divided into 5 chunks of 2mb size and ...
1
vote
1
answer
21
views
What is a good file structure to have with Vite? [closed]
I am using Vite to easily run tailwind and other npm packages in my vanilla HTML and JavaScript.
This is what I have now: Current file structure
And this is my vite.config.js
const { resolve } = ...
0
votes
0
answers
3
views
File format magic number
Suppose that I'm creating a file format that a program must use, the how do I create a magic number? Does it need to make sense or I just have to chose a random number that has some requirements like ...
0
votes
1
answer
36
views
How can I save a local file into assets folder in Flutter
My flutter desktop application takes a local file (audio/video/image) as user input. Now I need to save it to somewhere for later usage. So that even if the device changes the application can still ...
1
vote
1
answer
216
views
program that takes a path to a file name as an argument (.txt file), reads the file and generates a new file that has every alternate line swapped
In the new file, line 2 is line 1 of original file, line 3 of new file is line 4 of original file, line 4 of new file is line 3 of original file so on.
example textfile1
line1
line2
line3
line4
'''
...
-1
votes
0
answers
16
views
Automatically copy files from local to web app [closed]
I have an application developed with Laravel and VueJs for file sharing. I want to create a Windows script that will automatically copy files from my computer to VueJS File Manager.
For example: I ...
0
votes
0
answers
23
views
Android: Save CSV File to internal Storage
I have put somehow together a code that records my sensor data from the phone and i want to save them as csv file in some directory (maybe DCIM) in the internal Storage on the phone, but i cannot find ...
0
votes
1
answer
43
views
How to write into a file with StreamWriter in c#?
I can't write into a file correctly. The program reads the file and displays it on console with no problem, but I have some issues trying to write into this file.
I have this method:
public static ...
0
votes
0
answers
22
views
File upload with Angular 13 [closed]
I have a method a in angular where it can upload an image using input element of type file. It's for a social network. With the file Input it work really well and i find a lot of tips
But now, I want ...
1
vote
2
answers
44
views
Why does this task config not allow me to compile multiple C++ files in VS Code on Windows?
So I have looked at some other Stack Overflow questions, and tried a few things to my task file in VS Code to compile multiple C++ files. However, it isn't seeming to work and am a bit confused why it ...
-2
votes
0
answers
21
views
During deleting the record from my binary file, after closing the program than I again Run ,and display the records it does'nt show show it
There is an Project to me in C++ without using OOP concepts and I have to made the Blood Donor Management System and I complete all the steps but ,when I delete the record of a specific person and ...
0
votes
1
answer
41
views
What's wrong with Xaml files in wpf-App project?
I have a question. So every day I create my project. Today I turn on my computer, run the project and I see the following error. I have no idea what happened, I didn't mess with the visual studio ...
0
votes
0
answers
16
views
Comparing scanned variables with .txt file content
I am trying to write a code where the user writes his username and password, and have it compared to the contents within the .txt file that is being managed.
void signIn()
{
FILE *ur = fopen("...
0
votes
1
answer
8
views
Read stream detect file changes (continue after file end)
I have trouble with a very simple task.
When i write to a file i want a read stream to be able to detect the newly written data to that file.
const fs = require("fs");
const read = fs....
0
votes
0
answers
28
views
How can Sort the file's data to another file In Java?
Given a list of patient demographics for several patients, we want to be able to group the data by patients with the same name. The demographics
provided are (in order): Patient ID, Patient Name, ...
0
votes
0
answers
17
views
How to convert PDF file to base64 in typescript?
I have a pdf file in this string format:
%PDF-1.7
%µµµµ
1 0 obj
<</Type/Catalog/Pages 2 0 R/Lang(en-GB) /StructTreeRoot 10 0 R/MarkInfo<</Marked true>>/Metadata 20 0 R/...
-1
votes
1
answer
34
views
Why is this python function not reading my json File string properly?
So I have a unique player ID string that is stored in a JSON file after it detects on start-up that the player is new to the game.
def checkIfPlayerIsNew():
if os.path.exists("myJson.json&...
0
votes
1
answer
23
views
text-file to linked-list C
So im trying to save a text file in a linked-list (each node containing a word) and that's my code so far. It just wont even run no matter what i do. please help if you can.
#include <string.h>
#...
0
votes
0
answers
10
views
How to download multiple files with zip angular
I have an array of string URLs:
const urls = [stringUrl1, stringUrl2, stringUrl3]
I want to put them all into zip file and then download them as zip. I can't seem to find a solution on how to create ...
1
vote
0
answers
38
views
how to traverse file system in c++?
If i use std::filesystem.path() >I can get file lists by following code
#include <string>
#include <iostream>
#include <filesystem>
using namespace std;
namespace fs = std::...
0
votes
0
answers
19
views
Python 3.8.10 Reading file ignores changes
Hi and thank you in advance!
I'm pulling my hair out with a weird issue I have concerning editing a txt file in python. I'm opening reading and edit a file and at some point when I try to write to it ...
0
votes
0
answers
12
views
Microsoft Powershell giving file not found error, even though it exists [duplicate]
I have a powershell script that should make a shortcut to a image on the desktop, however, when I run the script, I get the error:
Unable to save shortcut "C:\users\muffin\desktop\a.png C:\users\...
-1
votes
1
answer
38
views
Multiple file upload in asp.net core is not working
I am working on .net core 3.1. My problem is when I try to upload multiple files it is picking only the file which I have uploaded latest. For egg, when I upload 3 files only the third file is coming ...
-1
votes
1
answer
31
views
How do I sort records in a text file and how to print other txt file using Java?
Some amendments to the data in the text file. I have tried the suggested code but I'm not successfully writing it again in the txt file with this format. I've tried the collection. sort but it writes ...
1
vote
1
answer
35
views
Python, Pandas: Faster File Search than os.path?
I have a pandas df with file names that need to be searched/matched in a directory tree.
I've been using the following but it crashes with larger directory structures. I record whether or not they are ...
-1
votes
0
answers
14
views
regex compare two notepad.txt files create another one [closed]
how can i compare two files with the same numbers using regex ex:
i need to find the same numbers inside of files ,simple notepad that contain the same numbers and than find and extract the igual ...
0
votes
1
answer
20
views
How to put API_KEY inside the ".env" file in a Flutter app?
I want to put my API key inside the .env file within my Flutter application and I did it like following:
API_KEY=ewwfwfwe
API_KEY = ewwfwfwe
API_KEY=`ewwfwfwe`
API_KEY = `ewwfwfwe`
But none of them ...