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.

0
votes
1answer
27 views

Reading comma separated numbers (coordinates) from a text file in C

I'm trying to read some numbers in C from a text file which contains 1000 lines of numbers such as: -340,495,-153,-910,835,-947 -175,41,-421,-714,574,-645 -547,712,-352,579,951,-786 419,-864,-...
0
votes
1answer
28 views

File not being changed

I am writing a program that changes any special characters to a space in a file and then re-reads the file and gets a frequency of word length. When run, it seems to run correctly, but when I open up ...
-1
votes
1answer
57 views

C# not downloading

I have problem with downloading files through C#. I have a class which handles downloading like this: namespace Ultra_Script { class FileDownloader { private readonly string _url; ...
-3
votes
0answers
23 views

GUI Application for writing notes

I am developing a GUI application that lets you add pieces of text to a note.txt. The problem that I have is when I try to add a text it only adds a "0" and if you try to run the project it crashes. ...
0
votes
0answers
22 views

Loading images from file in Flutter

I've tried using Image.file() by providing a File object made from an absolute URL string which I obtain from UIImagePickerController on iOS. Here's my code //this line gets the absolute string from ...
0
votes
0answers
14 views

Python: Read two files simultaneously but start reading 2nd file from 2nd line

I have a code that will let me read two files line by line with open("F1.txt", 'r') as File1, open("F2.txt", "r") as File2: for line_F1, line_F2 in zip(File1, File2): I'd like to start reading ...
1
vote
2answers
21 views

Numpy savetxt saves 1D array as column

I use loadtxt to initialize array. source = np.loadtxt('source.txt').astype(int) After that I use this array in function, which body is: file = open('johnson.txt', 'ab') first = increase(np.argsort(...
-3
votes
0answers
26 views

How to access of LAN file in iOS with Xcode?

I'm developing an application which can show all IP address of a LAN and navigating in their files to use them. Actually, I used this project in Swift https://github.com/mavris/MMLanScan to only show ...
0
votes
0answers
3 views

Unable to create valid multi part format for server side file uploading

I am using this code for uploading a file to Dwolla. Hence, for uploading a document/ file, I need to send this in multi part form data. Here is my code, const multipartFormData = async ...
0
votes
0answers
19 views

Multi select files with Bootstrap and jQuery - code inside

I'm using an example of how to attach files, but I'd like to know how I can attach multiple files in that code I tried to use the multiple ="multiple" attribute, but it did not work. How would I ...
0
votes
1answer
24 views

How do I find all files that have a certain extension in Go, regardless of depth?

I have a directory structure that looks like this: /root /folder_1 file_name_1.md /folder_2 file_name_2.md /folder_3 file_name_3.md /folder_4 /sub_folder_1 file_name_4_1....
0
votes
0answers
13 views

saving results in csv file doesn't show all the results in file

I'm trying to run a sentiment analysis over a list of headlines from reddit. The headlines are saved in a txt file that looks like this (there are 1000 headlines in total): Parking permit shambles ...
-1
votes
2answers
28 views

CSV file - handle row and columns with python

Could you help me, please? I have CSV dataset file about hotels and contain many columns. I need to handle hotel-name and reviews. How to convert hotel-name rows to columns ? to combine reviews ...
0
votes
0answers
21 views

Code adds line again instead of deletes it from file - Python

Regardless of what I do to this code, it will always duplicate the line in the file instead of deleting it from the file. I had planned to single out the part of the code I want to remove. Then ...
0
votes
1answer
27 views

How to find first empty line and delete with in the file using sed command regular expression [duplicate]

I need to find the first empty line in the text file using the sed command regular expression. below is the content that I have this is defile to be cleaned skip rest consl In the above content, I ...
0
votes
0answers
17 views

not able to create content from OutputStream

What I originaly have is: Created file with some content on Internal Storage: DocumentFile newFile = pickedDir.createFile("text/plain", filename); OutputStream out = context.getContentResolver()....
-1
votes
2answers
24 views

How to send jar file output to a json file using python

I have jar file when executed will print out the output on the terminal, Im not sure how can i pass the jar file output as a json file. The code below just print the jar file output on the terminal ...
0
votes
0answers
13 views

read and delete instantaneous data from a file using tcp socket using python

I am using python to send instantaneous data from a client(C1) to server(S) using TCP socket. This data is saved in the server(S) in a text file. Now this file gets appended with the new data ...
1
vote
1answer
27 views

Python write object properties to file

I am solving a n-body simulation problem using Python OOP. Each of my particles is an object with properties such as mass, position, velocity, etc, and I would like to every few simulation time write ...
0
votes
0answers
12 views

inserting and retrivel of file using monogo with django?

I want to save a user selected file to MongoDB and also download that file.I'm trying with Gridfs but it not working,below is my code in view.py file. file = open(file_name.name, 'rb') db = ...
1
vote
0answers
27 views

Input File problems: input_file.fail() is true and idk why

My code is supposed to open a file and work with the data that it reads in. My code looks like this: #include <iostream> #include <iomanip> #include <fstream> using namespace std; ...
0
votes
0answers
32 views

Adding then deleting a line in text file with C

I am trying to write a program that can append a line to a text file(with input taken from the actual program) and that can delete a line with a certain word in it. When I either try to append the ...
0
votes
0answers
10 views

Create dedicated file output of each netmiko send commands (commands in text file)

Before this i adapt method below to save dedicated file for each command but this is troublesome when more and more commands to use and every time have to modified this code. if device['device_type'...
-2
votes
0answers
18 views

How to write letters from file in to dynamical array in C

I want to write a letters from file into a dynamic one-dimensional array, checking that it may include only A,C,G,T letters or a, c, g, t. If the field has not yet been created, it is necessary ...
-3
votes
0answers
15 views

prevent/stop file not found exception and why does it show? [on hold]

enter image description here[codethe file exception file not found exception occurred during runtime though the file is in folder and I don't know how to fix this problem. code//i.stack.imgur.com/...
0
votes
0answers
7 views

Viewing Google Chrome User Files

I am tasked to develop some sort of program in C#. And I need to view/decode the files of Google Chrome. I tried opening it with notepad and notepad++ but it does not work. I already searched up how ...
-1
votes
1answer
62 views

PHP counter to edit text file [on hold]

I am trying to create a pretty simple visitors counter that just increases the number in my txt file by one on every page load. As default number in my file I have tried 0 as well as 1. Basically it ...
0
votes
0answers
10 views

C++ using another library [duplicate]

I am working on a C++ project. I am new to C++ programming and I am trying to understand include directives and makefile structure. I did some research and it became clear there are two ways to ...
0
votes
1answer
22 views

How do I write to a file outside of the data directory in android?

I have a file that I'm writing to in my program currently and it works perfectly fine. What annoys me about how it works right now though, is that it's in the app's directory (e.g.com.appwriter....
1
vote
2answers
43 views

C- Find the current line of my opened text file

I need a solution to find the current used line in text file. I opened it with: FILE *fp; fp=fopen(“data.txt”, “ r+“);
1
vote
2answers
32 views

Java storing file values into an array

Currently I am trying to read all the files from .prg file into an array. Currently the code I have only reads the first line of the file. I would like to read each word within the file and store it ...
0
votes
0answers
17 views

Why does the same file appear a different size when cloning versus downloading from browser?

I recently cloned a repository from GitHub and checked a specific Java class in my file explorer to find it was 2,917 bytes. On my web browser, in the same branch, I viewed the same class as "Raw" ...
0
votes
0answers
10 views

Read multiple xml and save binaries in database ASP.NET

I tell you what I want to do. In asp.net VB, I'm trying to read multiple XML files and those same files saved in SQL Server with a single fileupload control (property in allowmultiple). The values ​​...
0
votes
1answer
27 views

How can I pass a file/file path from one Button_Click event to another in C#?

I have a fileupload control (FileUpload1) in my webform which I use to load an excel file. I use a button called btn_open to display it in a gridview on click. I also save the file using FileUpload1....
0
votes
0answers
14 views

How can I serve web resource over smb call in c#?

I have a requirement where I wanna access web file over smb call. Let say on virtual path access over \FilePath\Folder\Capture.png should serve http://somesite.com/Capture.png in windows explorer.
0
votes
1answer
17 views

How can I check if a file is zip or not in R?

I have tons of files like these: temp1 <- tempfile() temp2 <- tempfile() download.file("https://my.pgp-hms.org/user_file/download/3658", temp1) download.file('https://my.pgp-hms.org/...
0
votes
0answers
10 views

HBase shell: put binary file contents

I want to know how can I insert a row in an HBase table and column family whose content is the bytes from a binary file. I want to make it from the HBase shell. After some research I couldn't found ...
0
votes
0answers
20 views

Is there a way to specify the directory to which a serialised list (in the form of an XML File) is saved

I am using a sub to serialize and save a number of lists within my program. By default, the XML files are found in the "Debug" folder. For organisational reasons, I would like to specify a directory ...
0
votes
1answer
32 views

Mosquitto.h not such file or directory

I am working on a c++ project using mosquitto library on github. I am trying to compile the C++ on a windows computer on the command line; however I keep getting error Fatal error: mosquitto.h: no ...
0
votes
0answers
8 views

Wordpress - 'Page Title Splitter' plugin conflicts with alt-tag

The class that is used by the Wordpress 'Page Title splitter'-plugin is also placed inside the alt-tag of the image of the post, which causes a conflict. I want to remove the alt tag from the html ...
-1
votes
0answers
21 views

How to remotely access and edit files on AWS EC2?

How to remotely access and edit files on EC2 using Mac? Looking for integrated solution that works with rsa keys (as a way to connect) so that can be executed in a mac terminal with e.g. ls /my-ec2-...
-2
votes
0answers
33 views

c# console app seems to start twice by starting from Windows Scheduler [on hold]

I've got an simple c# console app which parses an file, copy and moves transformed files to different locations. If I start the app manually (in VS or by clicking "Start" in Scheduler) it works fine, ...
0
votes
0answers
26 views

Android, choose my app from app chooser when click on json file

What I want to do: I have json file in file manager, i want click on him, then must shown app chooser with my app on list to use. I want open json file in MyApp and get data. Json dont have default ...
0
votes
0answers
13 views

Restrict mime types using WordPress media uploader

I'm writing a plugin and I want to use built-in WordPress media upload to give possibility in a custom option page in backend to upload .doc and .pdf file. With jQuery I specified allowed mime in ...
0
votes
0answers
24 views

Is there an efficient way to read a .gz file in R?

I have a huge .gz file with millions of data. I would like to read this .gz file in R as I want to do some manipulations to each of its line. I tried: gzf <- gzfile("myfile.gz", open ="r") f &...
0
votes
2answers
50 views

Converting Multiple json files to xml files

I'm a relatively new programmer and therefore have limited knowledge; however, I've been asked to create a program to convert loads of json files to xml files. There are a lot of them, and they're all ...
0
votes
0answers
15 views

Play and pause In Available file upload

I have this file that I have already upload, I want to use play and pause button to make it playable in the page without downloading the file first. I have this code to upload the file in the ...
-1
votes
1answer
43 views

Let the user specify a file name in C

This is my code: char filename[30]; FILE *fp; printf(" Enter the filename: "); gets(filename); strcat(filename,".txt"); fp=fopen("e:\\filename","a+"); So my problem is that I want the user to ...
0
votes
1answer
17 views

How to import the data in a local file into an array for use in javascript?

I have been reading through these forums for hours upon hours, and I have still not been able to find a forum that asks this question and the answers actually work for me. I am trying to create an ...
0
votes
1answer
33 views

After freopen(..,“r”,stdin) + fclose(stdin), further std::cin doesn't work

int main(){ int a,b; std::cin >> a >> b; // first freopen("test.txt","r",stdin); std::cin >> a >> b; // second fclose(stdin); ...

http://mssss.yulina-kosm.ru