файлы

Reading the file line by line

You need to open the file and read it line by line, that is, take the first line, put it in a variable, do certain operations with it, then take the second, etc.

Record text from one.txt to another.txt Python 3

Hello everyone There are three .a txt file with a different number of lines of text in each. We compare the number of lines i ... ppens is when I copy the text from the file and paste it just into write() everything goes away of course. I'm just learning.

Nautilus does not open the file

I have xubuntu 18.04.2. It defaults to the thunar file manager. I don't like this manager, I prefer nautilus. I install nauti ... such a directory and file. I also found an option to edit /usr/bin/xdg-mime, but so far I haven't found the necessary lines.

Checking the submit button click

There is an example from the book (there is also a similar question arose after watching the video tutorial) on sending files ... t;/html> And to select an existing file to send to the server, it gives: Uploading Problem: possible file upload attack

Sending files from a website to Google Drive

I'm looking for a solution to the problem on the Internet, maybe someone can tell me here. The situation is this, a Google fo ... for me, the data is entered in the table, and the files do not fall into the folder, I changed 2 idishnik tables and folders

EOF behavior in C

I needed to write a function to measure the file size in bytes. Here's what came out: #include <stdio.h> #include < ... be equal to one of the bytes in the file? Who invented this? Maybe I missed something. I checked everything 10 times. Magic.

Reading Cyrillic from a C file#

You need to read the file in which there are Cyrillic characters, when output to the screen, all clerical characters are disp ... mFile}"); } } Is there a way to correctly return the Cyrillic alphabet after reading it in the console?

The editing of the C binary file is looped

You must replace every third number in the binary file with the same number with the opposite sign. The numbers are represent ... double), 1, input_file); } } fclose (input_file); free (filename); system ("pause"); return 0; }

The letter I when read in C

The problem is, I read a line from the file with this code setlocale(LC_CTYPE,""); char path[]="1.txt"; FILE* fp = fopen(path ... = '\0'; } else { printf("Входной файл отсутствует\n"); exit(1); } But it reads to the first letter " I " what's the matter?

How do I edit a BMP file in Python?

My task is to open a BMP file in binary mode and change it (make a negative of this image). By condition: The program is fed ... How is it still necessary to implement such file processing? Because I just ran out of ideas on how I can complete the task.

Download link файла.txt I. pdf

How do I make it download and not open in the browser?

Count the number of occurrences of each word in the file

You need to write a program to count the number of occurrences of each word in the file using the stream api.

Extra character with the code " -1 " before EOF

When writing the content from the input file to the output file, another character with the code "-1" is read before the end ... t_file); /*fwrite (str, sizeof(char), i, output_file);*/ free (str); if (feof(input_file)) printf ("END FOUND\n"); }

Can't open file for reading

The code is as follows: if ((pfp = fopen("etc/enet.cfg", "r")) == NULL) { printf("Unable to open enet.cfg\n"); return -1; } The file cannot be opened, i.e. an error message is printed in this case.

Random selection of the file to read

I am trying to pass a random value( file name from enum) to a parameter for the file read method. But it throws an OptinalVal ... (name: TaskName.LvlTwo.allCases.randomElement()!, type: "txt") let conentFile = content lebel.text = contentFile! }

BinaryReader () How to determine the end of a file

Gentlemen, please tell me how to determine that the file (stream) ended when reading from the file? I use BinaryReader (). He ... inaryReader(fs); string s = ""; while (br.PeekChar() != -1) { s = br.ReadString(); bw.Write(s); } }

Python. Get the minimum and maximum values from a file

You need to get the maximum and minimum values from the second column and output the corresponding record from the first colu ... (maxval)) How do I add the output of a value from 1 column that corresponds to the minimum and maximum value from 2 columns?

Sending, accepting, and saving large files via socket in python

I'm learning how to send data via sockets now. And I ran into the following error: I can't send a 5 megabyte file via a socke ... times while I was writing the code. I would also like to understand how, and whether it is possible to simplify it at all?

Working with HTML and JS files

I create a program and need to solve the problem: The program has a window for selecting a text file, the code: <h1>Вы ... what you can change the value to reach the contents of the file and was unsuccessful. Can you help me? Thank you in advance!

Get the ID of the image knowing only its path (Bitrix API)

Tell me how you can easily get the ID of the image knowing only the path to the file (/upload/iblock/212/21232121288522265c92 ... need the inverse function CFile:: GetById. It seems somehow possible via CFile:: getList, but I can't understand how. Thanks.