Questions tagged as 'arquivo'

1
answer

How to separate global functions / variables from the program into files?

I have some files: vetores.c // função main uniao.c // função para unir vetores ordena.c // função para ordenar vetores globais.c // arquivo com variáveis globais I want to know how I reference one file in the other. Example: I need to...
asked by 04.12.2015 / 19:57
2
answers

Parameter passing using "String [] args" declared in main [closed]

I've been looking at the Oracle documentation, examples of file copies, with their attributes in various ways ... Within this search I came across a strange thing that was the parameter passing that was being made, which was the variable " args...
asked by 22.09.2015 / 20:10
1
answer

Save ArrayList to the external memory of an Android phone

How can I save an ArrayList by FileOutputStream in the memory of an android cell phone? Or do you have a better method? For example: FileOutputStream fos = openFileOutput("Foto_Imovel", Context.MODE_PRIVATE); fos.write(My_Array...
asked by 17.10.2015 / 01:46
1
answer

Error exporting to Excel (Corrupted file)

I am making an application to export the result of a sql query to Excel. After the file created the time I'm going to open it it gives a corrupted file error. SaveFileDialog sfd = new SaveFileDialog(); sfd.Filter = "Execl files (*.xls)|*.xls...
asked by 26.01.2015 / 15:23
1
answer

Use finin or pathinfo to get the mime type?

finfo_* and pathinfo are used to detect the mimetype of the file and not the extension. The issue is that in the world there are several file formats and from time to time new formats appear, I can not do a test to know wh...
asked by 27.05.2015 / 02:10
1
answer

Mark (colorize) a string to write to the file

My application searches for a few words in a file. When the program recognizes these words (strings), it should mark it. For example: changing the font color or changing the background color of the word. Then I will write the same text, but w...
asked by 18.08.2014 / 14:42
2
answers

Save the IP of the visitor in a text file, but how can I not save it again if it is already there and how to read it?

I used the answer to this question to save the IP in a text file: How to save the IP of who visited my site in a text file? This is what I want to create a "like" button for students to enjoy those they think are the best teachers. But...
asked by 11.09.2014 / 15:24
1
answer

How to save the IP of who visited my site in a text file?

I'm using the code below, but it only writes ":: 1" to the file. <?php $arquivo = "ips.txt"; $file = fopen($arquivo,"a"); $string = $_SERVER['REMOTE_ADDR'] . "\n"; $fp = fwrite($file,$string); fclose($file); ?> Is it because I'm on...
asked by 09.09.2014 / 18:19
2
answers

Giving "Segmentation fault" when trying to open files in C

The following code gives me "Segmentation fault (core dumped)" when trying to open the file after declaration and filling a string with sprintf. //Sem as duas seguintes linhas, o código roda normalmente char Xseqpath[90]; sprintf(Xseqpath, "%s...
asked by 12.04.2018 / 14:18
1
answer

Failed to read formatted file via input redirection

I'm trying to read the following file via inbound redirection, however the program is entering an infinite loop and with totally wrong readings. When I manually enter the data the program executes as expected, stopping when I press ctrl +...
asked by 04.11.2017 / 21:59