Questions tagged as 'arquivo'

1
answer

How to get the encoding type of a file?

Follow the code below: string text = File.ReadAllText($@"{pathname}", Encoding.UTF8); I have several txt files with different conditioning. Because here does not show special characters, because of different encoding. Before running the...
asked by 02.11.2017 / 21:33
2
answers

Automate opening of sequential files?

I want to open multiple binary files in Java at once, but I do not want to instantiate all of them manually in this way as follows. Is there an automatic way, or a method for me to streamline it? Example: File arquivo = new File("temp0.bin...
asked by 31.08.2017 / 01:37
1
answer

Corrupted LaTeX file

I use TexStudio (LaTeX) and today I worked all day in a chapter of my thesis. I stopped the night now, and when I came back, I put it to save again before exporting to the cloud and my external hard drive, but suddenly the computer erased....
asked by 24.08.2017 / 02:43
1
answer

Write a file containing the contents of an array

I have an array of char grid and I want to write a file with its contents. Here is the code I did: public static String getGrid() { String text = String.valueOf(grid); return text; } public static void Escreve() { Strin...
asked by 17.06.2017 / 23:45
2
answers

Array returns wrong value in java

I have a question about a college job. I can read with numbers, remove the ";" and pass the values to the array while reading the file. However, when I try to access an array position outside of the file read, it does not return the value I have...
asked by 08.06.2017 / 01:17
1
answer

Saving files in txt with Android Studio

I'm having trouble saving the user-entered name in a txt file. When I press save, it says it was created, but I can not read it. Context fileContext; public BancoDeDados(Context fileContext) { this.fileContext = fileContext; } publi...
asked by 07.07.2017 / 19:08
1
answer

Java - read XML from a URL

I have a function that reads XML and it works 100%, the problem is that when I try to read an XML that is online on my server I can not. Follow the code below: public int lerXml() throws JDOMException, IOException, URISyntaxException {...
asked by 23.05.2017 / 08:52
1
answer

How to write and update HTML file with Jquery?

So, I'm getting HTML content from an external site and rendering in my hybrid application. So far so good. I have the following code so far: $.ajax({ url: '{{SuaUrlAqui}}', headers: {'X-Requested-With': 'XMLHttpRequest'}, type: 'GET',...
asked by 17.04.2017 / 16:30
1
answer

Comparison __FILE__ and $ 0

Recently I saw this decision making in a ruby code: if __FILE__ == $0 .... Then I had to print __FILE__ and $0 separately on irb and I saw that the two pass the same information, my doubts are: Why (when) do this comp...
asked by 28.01.2017 / 03:02
1
answer

Error loading file for threaded list

This code loads elements of a .txt file, but apparently it can load the information from the file, but it gives some error in inserting the list, but I can not identify it. Here is the code and file information: #include<stdio.h> #includ...
asked by 18.03.2017 / 06:11