Questions tagged as 'arquivo'

1
answer

Error reading% f and% e of a file in C

In the following snippet of my code I have to read a function from a txt file and extract its coefficients. When I put the coefficients as integers and reading them with %d works correctly, but when putting the coefficients with floating...
asked by 10.07.2014 / 04:11
1
answer

How to extract hexadecimal code from an executable compiled with nasm?

I have an executable, created in Assembly language and compiled with NASM. Is there a way to get the value, in hexadecimal, of the bytes produced by the compiler, so that I can use them in a disassembler (ie discover the generated OP codes)?...
asked by 08.05.2014 / 08:24
1
answer

Import data from a TXT and play the required positions in the StringGrid

Follow the code that I developed along with my co-worker. procedure TfrmGrid.Button1Click(Sender: TObject); var arq: TStringGrid; txt: TextFile; c, l, treg : integer; lTemp: String; begin treg := 0;...
asked by 06.05.2014 / 20:17
1
answer

Malloc in a string, based on the size of a FILE

int main(void) { FILE *p = fopen("matriz.txt","r+"); char *arquivo; arquivo=(char*)malloc(sizeof(p+1)*sizeof(char)); while (fgets(arquivo,sizeof(arquivo),p)) { printf(" %s",arquivo ); } }//END the matrix cont...
asked by 13.12.2018 / 14:53
0
answers

Renaming files with Python, adding numbering dynamically

I have a directory with many pdf lists, and I want to rename the files dynamically. Ex: ~/teste/ |__ProjMed-Química-Físico.Química-quimica_propriedades_coligativas_exercicios.pdf |__ProjMed-Química-Físico.Química-quimica_termoquimica_enta...
asked by 15.12.2018 / 19:55
3
answers

Error reading all the records of a .txt file in C

Can anyone tell me why this my code just returns the first record multiple times, instead of returning all the records? Function in the Code void listarDados(int quantidadeContatos) { char caracteres; FILE *arquivo = fopen("contat...
asked by 16.12.2018 / 18:09
1
answer

Read a text file and separate content into variables

I'm having a question on how to split information from a text file into variables in C. Example, I have a txt file with the following data: 3 2 A D E AD DE I would like to read this file, and separate each information into a variable, for e...
asked by 11.12.2018 / 13:47
1
answer

How to check the latest file in a folder with Python?

Assuming you have a folder with several TXT files with different names and need to know the latest file, how do I do this using Python?     
asked by 20.04.2018 / 14:13
1
answer

Save the contents of a file in another file - python

I'm trying to read information from a file and save it in a new file after passing all the information to lowercase and removing punctuation characters. For this I created a ReadFile () function that reads the file in question and saves it to a...
asked by 10.12.2018 / 15:54
3
answers

C # - Knowing the location of the database file dynamically

I'm doing a program using C # in WPF, and I need to access the database dynamically, in this case I'm using a .mdf file. In code I have the connectionString like this: string stringConexao = @"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilenam...
asked by 24.11.2018 / 00:12