file Questions
11
I'm making this program and I'm trying to find out how to write data to the beginning of a file rather than the end. "a"/append only writes to the end, how can I make it write to the beginning? Bec...
10
Solved
I have a wstring declared as such:
// random wstring
std::wstring str = L"abcàdëefŸg€hhhhhhhµa";
The literal would be UTF-8 encoded, because my source file is.
[EDIT: According to Mark Ransom t...
6
If I have two Paths, how can I find the longest common Path of the two?
import java.nio.file.Path;
import java.nio.file.Paths;
Path common(Path pathA, Path pathB) {
...
}
...
common(Paths.get("/...
3
Solved
So I have a small audio file in my assets folder and I wanted to open a InputStream to write to a buffer, then write to a temporary File, then I open up the MediaPlayer to play that temporary File....
Indiscrete asked 21/4, 2011 at 16:33
5
Solved
I need make xlsx file download from my site (but not from directly open file url like this: http://site.com/file.xlsx )
So, this is php code
$file = "somefile.xlsx";
header('Content-Descriptio...
5
Solved
I just got knocked down after our server has been updated from Debian 4 to 5.
We switched to UTF-8 environment and now we have problems getting the text printed correctly on the browser, because al...
Psf asked 22/2, 2010 at 15:8
5
Solved
Is there a function in XSLT that can takes in a directory path and gives back all the files in it??
I have a xml file now reads like this
<filelist>
<file>fileA.xml</file>
<...
Moderate asked 9/3, 2009 at 17:29
1
Solved
Context
With the goal in mind to explore the domain of data persistence, I am trying to write a (very) simple networked service:
A client sends some data to a server.
The server writes the data to...
5
Solved
Is there a generally-accepted fastest technique which is used to read a file into memory in c++?
I will only be reading the file.
I have seen boost have an implementation and I have seen a couple...
10
Solved
I'm having problems with using the BufferedReader
I want to print the 6 lines of a text file:
public class Reader {
public static void main(String[]args) throws IOException{
FileReader in = new...
3
Assumption: A local HTML/Javascript webpage that has access to file://
At the start of a drag on a draggable HTML element, in the event handler function dragStart(e), how do I add a File object so...
Su asked 30/6, 2014 at 18:55
2
Solved
Can someone explain to me precisely the difference between a file descriptor and a file handle (separate from Windows' definition for the term; I'm curious about their definition, but that would re...
2
I'm currently designing a simple WinForms UserControl in C# where a user can drag and drop an excel file onto a panel instead of browsing for the file. I have it technically working, but it's very ...
Duplication asked 9/6, 2017 at 20:26
2
Solved
I'm running an awk script on a 100G+ file. I have a suspicion that since it never finishes it got into some kind of infinite loop.
I want to see the line that script is currently at to see if there...
5
Solved
FTP is a pure TCP-connect protocol, and thus AFAIK "as fast as it gets" when considering TCP file transfer options.
However, there are some other products that do not run over TCP - examples are t...
10
Solved
I want to get File from project folder by using "File class", How can I do that?
File file=new File("x1.txt");
6
Solved
for an application that uses a File as some sort of global storage for device reservations in a firm I need a way to read and write to a file (or lock a file, read from it, write to it, and unlock ...
1
I am facing the following problem: I'm trying to implement a simulator for supply chains. These will produce a lot of EPCIS Events (events that occur at RFID readers). These events should then be w...
Westernism asked 10/1, 2012 at 15:47
10
How do you scan a directory for folders and files in C? It needs to be cross-platform.
Hyaloid asked 15/8, 2008 at 17:15
11
Solved
My database is about 25 MB, and I've verified that the username accessing it, as well as the file permissions haven't changed in months. I'm having a problem where queries are failing due to a "dat...
Dichromaticism asked 11/3, 2011 at 14:34
3
It's clear that a file object should be closed to delete it from memory:
file = open('data.txt', 'r')
#more code here
file.close()
Is it also necessary to close a file object served to the json....
4
Solved
I would like to run my go file on my input.txt where my go program will read the input.txt file when I type in go run command ie:
go run goFile.go input.txt
I don't want to put input.txt in my ...
4
Solved
I have a program that keeps writing to a file every second. File writing is happening in a thread parallel to the UI. Due to some hardware issue it stops writing sometimes of a day. I wanted to che...
8
Solved
I know how to encode / decode a simple string to / from base64.
But how would I do that if the data is already been written to a FileStream object. Let's say I have only access to the FileStream ...
Datcha asked 2/10, 2013 at 9:41
5
Solved
I need to load a file given it's name, but the name I get is case insensitive. "A.txt" could actually be "a.txt". How to do this the fast way (not generate all possible names and try each)?
Tristram asked 11/12, 2011 at 6:57
© 2022 - 2024 — McMap. All rights reserved.