6,733 questions
1
vote
1
answer
32
views
How to prefix a specific series of lines (multiple)?
I have a text file, which has an inconsistent timestamp format, that I would like to standardize. This is in a transcript from an interview; ultimately for textual analysis.
What command could I run ...
0
votes
0
answers
13
views
Error loading in Text file due to incorrect dimensions
I am trying to load in a tsv file to use in a package.
In the package it loads the file as a path.
When I do this datafile <- "omics-data.txt", it works, but in the subsequent package ...
4
votes
1
answer
45
views
C Contact Manager: Email fields shift into next contact's data when loading from file
Problem Details:
I'm developing a C contact management system where each contact is stored as:
struct Contact {
char name[31];
char number[11];
char email[30];
};
Current Behavior:
When ...
1
vote
1
answer
33
views
Does file_obj.close() nicely close file objects in other modules that have been set equal to file_obj?
I have a file main_file.py that creates a global variable file_obj by opening a text file and imports a module imported_module.py which has functions that write to this file and therefore also has a ...
-1
votes
1
answer
105
views
Java text files: How do I assign values per line to the corresponding variable?
I'm trying to make config files for a Java game I'm making, and I wanna make sure that upon loading a new level, I can get data from a text file that serves as the config file.
For example, the Level1....
1
vote
3
answers
145
views
Huge time difference when reading a file inside class
Any suggestions where this huge time difference results from when reading the same large text file by the same loop from inside a class in Python.
import timeit
fn = "some-large-file.txt"
...
0
votes
0
answers
36
views
How to update page widgets from a script before dispatching a change event to in input? [duplicate]
This question is about updating page widgets before dispatching a change event, not about reading a file. The rest shows the context.
There is an input file widget on a web page. When a button is ...
0
votes
1
answer
131
views
DataStage Job writes zeros instead of file values
I have a problem with a DataStage parallel Job, that fails in writing the correct values of a column of a txt file. Instead of the values contained in the file, it writes 0 in every record.
The ...
0
votes
3
answers
117
views
Having trouble using a loop to find a user-input character from a text file in Java
I'm having trouble writing a program for my Java class. The assignment's instructions are as follows:
"File Letter Counter:
Write a program that asks the user to enter the name of a file, and ...
1
vote
3
answers
195
views
How to read first and last string from file using Java Stream API?
For example, I have a table written to a .txt file like:
Column_A Column_B
Cell_1 Cell_2
Cell_3 Cell_4
Can I obtain the first and last lines in a single stream pipeline?
Additionally, how ...
0
votes
0
answers
98
views
Open a file with the default system text editor
I am trying to open a file with the system's default text editor, cross-platform. However, the file type will have a default application other than the text-editor.
For example, say the file is file....
1
vote
4
answers
134
views
Duplicating entries in textfile for empty entries until a non-empty entry is found, then continue with the new entry
I have a very large textfile in which some entries are missing. The logic is persistent, as the first line of each "section" has the correct entries, every line after this initial line is ...
2
votes
1
answer
65
views
Trouble Reading in .txt File
I have a text file I'd like to read in in MATLAB. Here is aforementioned text file (text_a2p.txt):
object index_image.nii
plane transverse
range 100 150
factor 3.1415926535897
coeff .0001 .0004 -.0006
...
0
votes
1
answer
35
views
How to delete a line in a text file with Python if it contains a certain word? [duplicate]
I have a text file structured as follows:
word 123 etc.
792 test abc
lorem ipsum word
92 testing
random 84
word 184 lmnop
Using Python, how can I delete every line that contains the word word?
1
vote
3
answers
62
views
Python look for text block, put in dictonary array
I am trying to look for a text block, and put some of the lines in a dictionary array. So a dictionary for every text block I find. for example the following text:
some
other
text
address-object ...
0
votes
0
answers
132
views
ACCDE error 3625 The text file specification 'X' does not exist
Using MS Access 2019 to deploy an .accde form that I developed.
It checks the value of the current form's version from a .tab text file that is hosted in a shared folder and imported as a linked table ...
-1
votes
1
answer
147
views
Is it possible to put the captions generated by AI models back into the pdf file?
I have a pdf that contains multiple pages where each page consists of texts and/or images. I have found ways to extract images from a pdf file and I have found ways to use AI models to generate ...
-1
votes
1
answer
55
views
Unable to extract necessary information from my .txt file
0 .17 .29 d ih
1 .29 .73 k l ay n d
1 .73 .84 g ih
This is a sample of the .txt file that I am working on.
I have tried using the np.loadtxt() to extract the last column,
...
1
vote
1
answer
315
views
Reading arrays from txt file in python to plot a graph
I'm new to python and want to plot a graph using data stored in arrays on a txt file...
content in the txt file ar just the arrays... nothing else.. exemple:
arrays.txt
[0, 1, 10, 5, 40, 1, 70] [12, ...
0
votes
1
answer
365
views
How to delete text in text file using Python based on conditions?
I have a text file from which I want to delete all data up to the point where I see the value 'NODATACODE' .
The text in the text file is:
MMMMM ; MMMMM : MMMMMMMMMMN, AAAAAAAAAAA,52, AAAA,CCCCCC, ...
-1
votes
1
answer
47
views
How to make a dictionary from a text file with many elements? [duplicate]
I'm trying to make a dictionary for the text file Subscrition_Info.txt. the text file looks like this:
I need to make it into a dictionary named subscriptions, but I don't know how to because the ...
0
votes
1
answer
500
views
Unable to serve a text file with no extension from Azure Web App
I'm trying to serve a text file that has no extension from within a Web App.
The file is located in the .well-known folder. Other files (with json extension) from the .well-known folder are accessible,...
0
votes
1
answer
92
views
How to read and extract values from single quotes ('') in a text file and find that value in another file, if not exits thrown an error
new to batch file scripting. Need your all help to extract all the values which are in (single quotes) '' from below text file (file.txt) and find that value in another text file, if not exists throw ...
0
votes
0
answers
235
views
How to move the cursor to the beginning of the next line on a .txt file?
I am writing a function with which, I'm trying to load saved data from a file to an array of records. The file is going to contain a name of the type of data I want to read. After that initial line ...
0
votes
0
answers
72
views
When I Programmatically download a text file, its content changes
I have a text file in the site that when I download it through Windows, and open the file on the system, its content is displayed correctly (it is what it was, pic1).
But when I download with the ...