1- I'm wondering, what would be the problem if I try to read a file greater than 2GB in size without compiling my program with the option -D_FILE_OFFSET_BITS=64 using off_t and using the second function on this page? would it segfault?
2- I'm planning to use this implementation with off64_t and
#define _LARGEFILE64_SOURCE 1
#define _F...
Hi --
I'm loading large text file of high school students into MySQL, but the school itself is only identified in the first line of each text file. Like so:
897781234Metropolitan High
340098 1001X 678 AS Reading 101KAS DOE KEITH A1 340089 A 7782...
Using SQL code, how can I generate a col...
whenever user uploads the file i need to know the file content type using servlets
...
I need to copy a number of image files from a given location to a given directory, i need the original filename preserved.
can it be something like
url->copy(img14, ImgPath);
where img14 is the path to the file including the filename and the imgpath is the destination directory.
img14 can be : /home/obscurant1st/Downloads/aaa.jpeg
or...
I have to run a system command in Qt.
but I have to give an argument for that command.
for example opening gedit with a text file.
like "gedit /home/oDx/Documents/a.txt"
but the path "/home/oDx/Documents/a.txt" will be in a variable like "docPath".
so how can i do it!?
...
Anyway, can anyone give me the error code definitions for when files are uploaded in cakePHP.
So my $this-data contains something like this,
Array
(
[file] => Array
(
[name] => cake.jpg
[type] => image/jpeg
[tmp_name] => /tmp/hp1083.tmp
[error] => 1
[size] => 24530
)
)
What does [err...
I'm still kind of a beginner...
I have to write a C# program that works only needs to work on Windows. It has to allow the user to select a file to upload. That file will be uploaded to a folder on a remote Linux server. I know the username, password, and url for this Linux machine. Does anyone know how I go about connecting to the serv...
If I have a remote SFTP server with a folder full of files on it that I want to operate on with Ruby's Dir and File classes, is there a way to do that through the net/ssh and net/sftp libraries?
I know that net/sftp has a few Dir and File utilities strapped to it, but unfortunately they're not the ones I need. I need
File.ctime(my_file...
I have read a few links on the topic of file formats and encoding, but how is it done?
If all data is binary, what splits data into different file formats? What exactly does encoding the data involve? How is it done?
...
Hi all,
I am trying to open a specific page in a file from an anchor tag(<a href=""></a>). The anchor tag is in a xls file.When i tried doing this i am able specify find the specified page but when i pass a parameter i am nt able to find the location of the page. Can anyone help me in this pls.
Thanks
...
Hi, im using the following code;
if( ! file_exists( $path ) ) { die( "'" . $path . "' not vaild path"); }
copy( $path, ltrim($create_folder . ltrim($path, "./"), ".") );
echo "'" . $path. "' => '" . $create_folder . ltrim($path, "./") . "'<br />";
The first if statement returns true yet the copy function returns;
Warning: copy('./fil...
How do I read a file backwards line by line using fseek?
code can be helpful. must be cross platform and pure php.
many thanks in advance
regards
Jera
...
My customer is sending TDM/TDX files captured in National Instruments Diadem, which I haven't got. I'm looking for a way to convert the files into .CSV, XLS or .MAT files for analysis in Matlab (without using Diadem or Diadem DLLs!)
The format consists of a well structured XML file (.TDM) and a binary (.TDX), with the .TDM defining how ...
how do I do this.
the file can get very big, so good performance is necessary
code is helpful.
this is what i have so far
function prepend($string, $filename) {
$context = stream_context_create ();
$fp = fopen($filename,'r',1,$context);
$tmpname = md5($string);
file_put_contents($tmpname,$string);
file_put_co...
if have file ex (news.txt)
and i need php to read my words in this file just one lind by day
every day php read one line only>>
i write this code but it not work >>>any help
$wordfile = "words.txt";
$open = fopen($wordfile, "r");
$read = fread($open, filesize($wordfile));
fclose($wordfile);
$array = explode("\n",$read);
$date ...
I'm attempting to run the following piece of code from an Out-of-Process COM Server in its main thread, however no file is ever created.
I wondered if anyone can tell me why this is?
FILE *f = fopen("Log.txt", "w");
fputs("Tony", f);
fputs("\n", f);
fclose(f);
...
Hi,
I have written a small ruby application to upload file using multipart-form.
This works fine on webrick server and glassfish gem. But deploying this application
on glassfish v2.1.1 works only for small files upto 50kb and will show error page
for larger files.
Anybody could please help me to sort out this issue.
thanks
Vicky
...
Hi,
I have written a code in asp.net 2.0 to allow the user to download an Excel file. Before downloading the excel i have made some changes to the file. When i try to download the excel using the below code
Response.TransmitFile(Server.MapPath("~/Excel Files/Data.xls"));
But each time when the user downloads the file the file is do...
How can I go back to the very beginning of a csv file and add rows?
(I'm printing to a CSV file from C using fprintf(). At the end of printing thousands of rows (5 columns) of data, I would like to go back to the top of the file and insert some dynamic header data (based on how things went printing everything). )
Thank You.
...
I am using fulltext searching in mysql to search a database of videos I have, however when I search my videos some results will never get returned because the title I am searching for is less than the ft_min_word_len set in MySQL's settings.
mysql_query("SELECT MATCH(videoDescription) AGAINST('".$searchString."' IN NATURAL LANGUAGE MODE...