Usually every time `make install' is run, files are not put in a specific directory like /usr/prog1. Instead, the files are put in directories where files from other programs are already in like /usr/lib and /usr/bin. I believe this has been a common practice since long time ago. This practice surely increases the probability of file nam...
We're using a simple File.Copy in C# for moving our database backups to extra locations.
However on some servers, this causes the SQL server to pretty much stop working. These servers have very limited memory, so they're paging data out to the harddrive every so often.
Whilst we should buy more memory, this is not going to happen for a...
hello folks,
I have a php script that writes a text file to the same directory where the script is.
Now the problem is, the script gets a URL from some other script. Now the new text file is supposed to be written to this provided location from the last step.
The provided location is in URL format:
"www.example.com/main/foo/"
Is there a...
How can I get the path for the last created file in a directory using Ruby?
...
I have a FILE *, returned by a call to fopen(). I need to get a file descriptor from it, to make calls like fsync(fd) on it. What's the function to get a file descriptor from a file pointer?
...
I was wondering how often python flushes to a file. Also wondering how often python flushes to stdout. I believe python flushes to stdout after every new line but that being said, if you overload stdout to be to a file does it flush as often as stdout or how often it flushes to a file?
Anyways thanks! And sorry for the pretty simple que...
Hi,
I'm very new to Ada and one thing that I find hard to grasp is working with Files in Ada when it comes to append some values in a file. It seems easier for me to do so in C. Anyway, I haven't found good information and I hope someone could help me here.
I declare the following first:
PACKAGE Seq_Float_IO IS NEW Ada.Sequential_I...
I have a directory of about 30,000 text files and I'd like to search inside each to find if they contain a specified text. How can I do this effectively in PHP?
...
I am reading a file containing around 50k lines using the file() function in Php. However, its giving a out of memory error since the contents of the file are stored in the memory as an array. Is there any other way?
Also, the lengths of the lines stored are variable.
@gordon : Here's the code. Also the file is 700kB not mB.
private...
Hi,
I'm learning Ada and I need some clarifications on file operations. I have just one type: float and I have to create 2 files that will store float values (with append operation). So I'm instantiating a package for the type float and I then declare 2 file variables X_File and Y_File. Then I put exceptions in case the files don't al...
My understanding is that a user application requesting a file system path (eg. /aFile) will invoke the File System and get back the virtual address of the requested file.
Then the application will attempt a read/write operation with that address as argument, that as a CPU instruction?
On execution of the read command the Memory Managemen...
hey guys
im looking for a way to read a file into an array and get what i want .
this is the code i used to read a file into an array
$Path = 'dewp/pix/info.txt';
$productsArray = file($dirPath, FILE_IGNORE_NEW_LINES);
foreach ($productsArray as $key => &$product) {
$arr = explode("\t", $product);
$product =array('album=' => ...
Hi!
I am trying to get Clojure to read a file, put the first line in a variable, and the rest in another variable.
I cannot seem to find out how to do this and would love if anyone could give me a heads up,
...
How does PHP's function xmlrpc_encode_request() work?
Does it need the value of allow_url_fopen set to true?
Well, you access external URLs with this function, so does it need this configuration? I can't test it myself at the moment, unfortunately.
Thanks in advance!
...
I am trying to get the last modified time from a file in Clojure, by executing a Java command.
By using java.io.File.lastModified I am supposed to be able to get the UNIX-time, this does not work by execution of the script or in the REPL.
My code is:
(java.io.File.lastModified "/home/lol/lolness.txt")
and my error is:
java....
I am making a count of how many times a module fails into a file. so whenever it fails, i open the file, increment the number in the file and close it. How i can i do it with opening the file just once instead of opening it twice once for reading and another of writing.
Thanks
...
Let's say I have a file /etc/conf1
it's contents are along the lines of
option = banana
name = monkey
operation = eat
and let's say I want to replace "monkey" with "ostrich". How can I do that without reading the file to memory, altering it and then just writing it all back? Basically, how can I modify the file "in place"?
...
I want to provide a URL such as "...mysite.com/my_installer.exe", but I want to be able to make it point to the latest version of my installer.
So if I create version 2 of the installer, the url will download "...my_installer_v2.exe".
I've looked at general URL redirection - 301 redirects, .htaccess etc - but they seem to be geared to...
how to submit html elements text, hidden etc., along with file element?
While using multipart for file element, the other elements are not read, like request.getParameter("") gives me null for other text/hidden elements...
please help me in this with the solution...
Thanks.
Narban.
...
I'm sooo close... but I don't quite see the connection from the upload view to the model. When I use the callback in the model's FileField the upload works, but I'm not sure where the actual file copy is taking place. The goal is to make sure that chunking is happening, but the file copy action seems to be hidden somewhere?
Here's what ...