Most voted "filing-cabinet" questions
A (Brazilian Portuguese) or (European Portuguese) computer file is a resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is durable in the sense that it remains available to programs for use after the running program has been completed.
Learn more…693 questions
Sort by count of
-
1
votes1
answer480
viewsHow to read and save an object to a java file
Personal What can I do to read an object from a file correctly? What is the problem with my code? import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import…
-
1
votes1
answer912
viewsHow to send data from a form with attached file to an email with PHP and AJAX?
I’m trying to send a file using the function mail() of php, problem that I am doing the tests and the email is sent but will not the file and the email is sent totally uncompromised, which may be?…
-
1
votes1
answer76
viewsCreate a configuration ". TXT" file
My problem is this, I need to make a configurable file to integrate to my project, follow its format currently: PRINTER = 127.0.0.12 PRINTER_PORT = 9100 I’d like to format it for this style:…
-
1
votes1
answer1383
viewsRead only one line in the file
I want fgets,take only one line and not the entire file,how do I do it in C? If I print the word variable in the function it prints everything and also would like to return that line in main.…
-
1
votes1
answer146
viewsProblems reading a C file
I am trying to open and read a C file and then print the result but when printing it does not come out complete in case it has a 32 x 32 text image. Besides I would also like to know how I will read…
-
1
votes2
answers63
viewsAverage is not being stored-C
Good night! When running the program and reporting the data Name, Nota1 and Nota2, the program is expected to create a file called "class.txt" with the student’s name, grades and average. However my…
-
1
votes1
answer332
viewsCount number of lines in the file
Good morning,this function counts the number of lines of a file,but it has a little problem,it only counts the line when it finds the n,for example to test it,I would create a text file,and write a…
-
1
votes1
answer212
viewsHow to write a string variable without breaking the line?
I need to write only in the first line of a file, but whenever I add a string type variable this line is broken, follow the example: #include <stdio.h> #include <string.h> char…
-
1
votes2
answers619
viewsModifying a Python file without losing the current content
That doubt is a continuation of this here. I have a very large TXT file (about 6GB), each line being 1,300 characters, and I am manipulating these lines, as an example, I will use these three lines…
-
1
votes1
answer24
viewsHow can I save these two python functions in separate files?
I created two functions, one to analyze the primes and the other to analyze the perfect numbers and I would like to know how to save the results obtained for the primes in a file and the other…
-
1
votes1
answer49
viewsI am having trouble synchronizing the execution of this program -- JS, Promise, async and await
Guys, I’m having a question, I’d like to read an Excel spreadsheet, store your content in a variable and then display it on the screen. However the method that reads the file -- parseExcel -- occurs…
-
1
votes1
answer41
viewsLoop in a file being read in C
Well, I’m trying to read from a file, and create a loop so I can go through all the characters until I find '<' character. After finding this character, the program must read and save the handle…
-
1
votes1
answer37
viewsWrite to a. txt file with for loop in Python
I need a file . txt to save the last generated serial, for the next time that file is executed to be read and continue sequencing. That is, if the last serial(serial2) generated is the number 6 I…
-
1
votes1
answer33
viewsError reading a file and saving it in dynamically allocated space in c
I want to create a program that: Opens the file teste I figured out the size of this file Allocate enough memory space for file + 1 (\0) Read the file contents using the function fread and saved in…
-
1
votes0
answers45
viewsLaravel Excel maatwebsite validate spreadsheet before importing to database
I am trying to validate a spreadsheet before importing it to the database, I need to check if there is any date above today’s date in the file, but I can only check the first line and there may be…
-
0
votes5
answers6427
viewsHow do I list the files in a directory and subdirectories that contain specific text on Linux?
How to list all files in a directory and subdirectories that contain a specific text and together the corresponding line in which the text appears, under Linux?
-
0
votes1
answer1523
viewsImport data from a TXT and play required positions in Stringgrid
Follow the code 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;…
-
0
votes1
answer653
viewsHow to extract hexadecimal code from a nasm-compiled executable?
I have an executable, created in Assembly language and compiled with NASM. There is a way to obtain the value, in hexadecimal, of the bytes produced by the compiler, so that I can use them in a…
-
0
votes2
answers634
viewsHow to group text file according to first line parameters in C#?
I was able to join several text files of the same directory in a final text file, grouping the equal codes and adding their respective amounts, using the following code (credits to friend Vitor…
-
0
votes1
answer63
viewsReading values from a C file
I have a file containing the following values: 10 20 30 40 50 60 For each line, the values must be stored in a vector. How do I get such values from the file, knowing that there is no exact amount…
-
0
votes1
answer664
viewsHow to know if a file has been viewed
I’m making a system in php where the counter sends a file to the client (using database). My question is the following, how to do when the client accesses this file, is sent to the database the time…
-
0
votes1
answer224
viewsError reading %f and %e from a file in C
In the following excerpt of my code I have to read a function of a txt file and extract its coefficients. When I set the coefficients as integers and read them with %d works correctly, but when…
-
0
votes3
answers1168
viewsPHP as per path and filename in variables
Hello. I have a table that should show the name of the files and the date they were updated, but nothing appears. In HTML I have only <table><?php tabela("/arquivos/formularios/*.*");…
-
0
votes1
answer83
viewsError copy file in C language
Hi! I’m trying to create a copy of a C file, but I’m not able to copy the content, it’s just creating a new blank file, can anyone see where I’m going wrong? #include <stdio.h> int main() {…
-
0
votes1
answer56
viewsStream corrupting to be saved
I have the algorithm that simulates a type of registration, but when I save the file the fields, street, city and state are lost, simply disappear, and as I am saving it corrupts the file already at…
-
0
votes2
answers4028
viewsClass.getResource() can only recover files in internal folders to which the class is located?
In this class, I need to read files *.properties that are in another project folder/package. The folder structure is this: util properties (here are the . properties) util server queries (here is…
-
0
votes2
answers2442
viewsHow to read and open files from a byte column in SQL Server?
My question is the continuation of this question: Link to the other question I managed to transform my file into bytes and insert it into a table in SQL Server, but now I want it from inside an…
-
0
votes2
answers1226
viewsPut pointer on second line to write?
Writing a text in the file $fn = fopen('teste.txt', 'a'); fwrite($fn, '-meu texto aqui'); fclose($fn); Reading the second line of the file $fn = "teste.txt"; $nr_linha = 1; $f_contents = file ($fn);…
-
0
votes0
answers30
viewsReading long file by parts
I have the following code where I read and print parts of an almost long file 5 million lines. My problem is that I can’t print more than 64443 lines of this file, which is almost nothing compared…
filing-cabinetasked 9 years, 11 months ago Samuel Lima 1 -
0
votes1
answer2435
viewsHow to list directory in a listview?
I need to list a specific sdcard directory in a custom listview. Look at how I work, the list contains a boot and a title: Adapter public class AdapterListView extends BaseAdapter { private…
-
0
votes1
answer27
viewsGet Bin File Stored in Mysql
Long live! I have a problem getting my PDF file that was stored in a Mysql BD. Whenever I download it, I cannot open it because it returns the message that may be damaged. So I store: $docs = new…
-
0
votes2
answers1771
viewsPython - take data from file . txt with regex
hello, I am trying to make a program but I am not able to remove the data from the file . txt, would be more or less these in bold. PokerStars Hand #135235596385: Tournament #1228747530, $0.23+$0.02…
-
0
votes1
answer309
viewsJava: Filereader reading number not in the file
I have this TXT: 1,2,4,8,7 45,18,27,35,44 17,45,2,8,6 And I want to read this matrix to a Java array. Here’s the code: public static void main(String[] args){ double[][] pesos = null; String…
-
0
votes2
answers192
viewsFile manipulation
Hello. I have a big problem to manipulate and create a C file. First I did the whole code using a struct and functions, everything worked right. I put the commands to create the file and it is also…
-
0
votes0
answers251
viewsForm does not send POST
I am developing a data import system for XLS to Mysql. The system is practically ready. I did a test with a file xls 24kb and successfully exported without any error. The problem is that I have been…
-
0
votes1
answer196
viewsDownload file to server
I have the URL from where the file is downloaded. By clicking on it, the file is downloaded directly, without at least accessing and clicking on some link. That said I need a way to automate this…
-
0
votes1
answer1507
viewsExecutable created by Codeblocks opens and closes alone
I have a problem with my Codeblocks program. When I compile and run the program, Codeblocks creates a executable in the Debug folder that is inside the bin folder, located in the same folder where…
-
0
votes1
answer421
viewsFailure to copy an entire directory and its files
I need to copy an entire directory that contains files inside using Java NIO2 with FileChannels. But I can only copy the files inside the directory. Follow the code I’m using to copy the files:…
-
0
votes1
answer1934
viewsHow do I get an image from an input file?
Someone tells me, what do I need to get an image of the input file and show it or save it? do I need to use javascript? or just html and php? I’ve already googled, but I’m finding something…
-
0
votes2
answers964
viewsHow to take a string arraylist value, for a File array
I have a job to do, to do it, I need to pass information from an array composed of strings (which are the paths) to an array of files for reading these paths, I tried to get the value directly from…
-
0
votes3
answers785
viewsfile_exists php function - relative and absolute path
In PHP applications, when I use absolute path, everything works perfectly, but when I use relative path, it doesn’t work. An example: in my application I have to use this:…
-
0
votes1
answer259
viewsUpdate. csv file when edited in Java
I have a . csv file that contains information, but when I delete information (in this case contacts) from the console output the file . csv is not being updated. How to resolve? private void…
-
0
votes1
answer256
viewsIs reading files in Python updated in real time?
I am developing an application where I will create a multithreading that will read a file .json and based on a key from this file (status: 'pending' or status: 'completed') I will perform an action…
-
0
votes1
answer70
viewsIndexoutofboundsexception in reading an Inputstream
follows the excerpt of the code I am studying: FileInputStream stream = new FileInputStream("/home/rafael/2015.json"); // esse aquivo tem 24 bytes byte[] result = new byte[(int)…
-
0
votes2
answers1180
viewsLimit file size
I created a file import method. I would like to know how limit the size from the uploaded file to the server.
-
0
votes0
answers60
viewsfile_exists, just not: test error with false TRUE
This is not exactly a direct question, but it might be interesting since there is another discussion here about file_exists vs is_file. I, like many programmers, define variables to find myself in…
-
0
votes1
answer119
viewsError in file code. c
I need to make a simple search engine. Just open one arquivo.txt, search for a desired word by the user, check how many times a word appears in the file and if it exists in the file. But this giving…
-
0
votes1
answer155
viewsError writing binary file using fwrite
Why this code snippet DataRootDir data = rootdir[i]; fwrite (data, sizeof(DataRootDir), 1, arq); always returns the error error: cannot convert 'DataRootDir' to 'const void*' for argument '1' to…
-
0
votes2
answers57
viewsCreate dynamic structures based on a text file
Is it possible to create a dynamic structure based on information stored in a text file(file)? Or this is only possible if the file is binary? For example: if I have a number (5) in a text file, can…
-
0
votes1
answer63
viewsHow to upload file via ajax with Rails 4?
I want to transfer a pdf file to process on my controller and then return it while it is being processed on backend, I would like a slider or click circle to appear. However, I am having trouble…