Questions tagged [txt]

txt is the conventional filename extension of text files.

1467 questions
1
vote
2 answers

I'm trying to see how many lines start with a specific character I.E "0" but I'm not getting any results. Where did I go wrong the "startswith()"?

I'm learning how to manipulate strings in python. I'm currently having an issue using the "startswith()" function. I'm trying to see how many lines start with a specific character I.E "0" but I'm not getting any results. Where did I go wrong? The…
1
vote
1 answer

R: Saving the Output of "dput" in a txt File

I am working with the R programming language. Suppose I have the following dataset: id = 1:10 var_1 = rnorm(10,10,10) var_2 = rnorm(10,10,10) data_1 = data.frame(id, var_1, var_2) If I use the "dput" statement in R, I get the following output: …
stats_noob
  • 5,401
  • 4
  • 27
  • 83
1
vote
1 answer

storing and using special symbols in a C# winforms application

I am currently working on a application which will give flash card like questions which I have stored on the system. I was wondering what would be my best option to store lists of information. The formatting I am currently using is where the first…
collent
  • 13
  • 2
1
vote
1 answer

How to concatenate each line of two "file.txt" into one "filenew.txt"

List item I have two texts below. How can I concatenate each line of two files.txt into one filenew.txt? For example: file1 includes: fishenter tiger deer file2 includes: Roof today great I want the output to be like…
hai long
  • 11
  • 3
1
vote
1 answer

Save a .txt file in specific path

I am training Python, and I created a script that can save some data in a .txt file. I am following instructions from a video, and the "teacher" used PyCharm, I am on Visual Studio. So the script checks if the file exist, if not, create a file with…
ElSantAna
  • 11
  • 1
1
vote
1 answer

Mapping Multiple IDs to their Email Address in Active Directory and Outputting Results to a Single File

I am trying to find a method to map IDs of multiple users to their associated email addresses in Active Directory (AD), and subsequently append the outputs into a txt file, ultimately generating a single file with a list of email addresses. Via the…
1
vote
1 answer

How to get my datas aligned properly on my text file using c programming

#define _CRT_SECURE_NO_WARNINGS #include #include int main() { char name[5][30] = {"Contactless Thermometer","Hand Sanitizers", "Face Mask", "Surgical Mask", "Oxygen…
Its Me
  • 21
  • 1
1
vote
1 answer

Pandas : problems when converting .txt to .csv

I am trying to use tables in pandas. The original data look like that (.txt file): µm nm 1.34E+00 1.39E+00 1.34E+00 1.61E+00 ... When I manually convert the file from .txt to .csv, by opening it in excel and saving as a .csv file, I…
1
vote
1 answer

Load text from a .txt file and display in jsPsychHtmlButtonResponse

I want to use jsPsychHtmlButtonResponse to display a .txt-file from a local folder on my computer. The reproducible code below does not work, while a very similar adaptation works for the display of images with jsPsychImageButtonResponse. Does not…
CapsLock
  • 11
  • 3
1
vote
1 answer

turning a string from a text file back into an array

So I am making a dice game, and one thing I wanted to do was have a high scores list as a text file. Currently I have a function that can change the file if the score of the player is in the top 5. This currently works with an array, which gets sent…
nitroncat
  • 11
  • 2
1
vote
2 answers

How to add .txt file to a Vue single-page application?

What is the way to add a .txt file to a Vue single-page application, so it's visible online? For example, if I want sitemap.txt to appear on myvuewebsite.com at myvuewebsite.com/sitemap.txt ?
Mark Gavagan
  • 878
  • 12
  • 45
1
vote
1 answer

List txt files on SD card on Android with Unity

I want to list all txt files in a folder on an SD card on Android using the Unity game engine. permissions READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE are given the txt files exist, I can see them using my file browser on Android. I can also…
mihca
  • 997
  • 1
  • 10
  • 29
1
vote
1 answer

python_transform values into array of 0 and 1

I have an issue. I don't manage to find a fast algorithm to put a set of integer values in an array of 0 and 1. For example, this is a portion of the txt file of the exercise: magazzino n. 0 venditori 5, 9, 12, 19, 16, 18, 27 costo: 447 magazzino n.…
Alba
  • 5
  • 3
1
vote
1 answer

display ";" separated values in table format with python

I'm having the following function which picks results from a results.txt file and displays it to the user, the first row comes out nicely but the rest of the results are not well-aligned. I'm not sure what's causing this. here's the function def…
Jay
  • 11
  • 4
1
vote
1 answer

Grep on a file to find a string between two words

I have a file named varout.txt, which contains a text as given below: Message: unable to locate element I have used the below command to fetching the text between the word Message and element: result = subprocess.run(['grep -oP \'(?<(Message)).*(?=…