10-18-2008
Actually I was thinking even PHP was not necessary but that being my core expertise, I thought I'd cover where it would be useful. Perl is more regex centric and so it seems to suffice for most large dataset processing but if anyone is kind enough to explain the power of Python, that would be great too!
7 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a zipped file that is ~ 10GB. I tried tarring it off to a tape, but I receive:
tar: <filename> too large to archive. Use E function modifier.
The file is stored on a UFS mount, so I was unable to use ufsdump.
What other options do I have? (I don't have a local file system large... (3 Replies)
Discussion started by: FredSmith
3 Replies
2. Solaris
I 've few data sets in my zfs pool which has been exported to the non global zones and i want to copy data on those datasets/file systems to my datasets in new pool mounted on global zone, how can i do that ? (2 Replies)
Discussion started by: fugitive
2 Replies
3. Programming
Hi All,
I am just curious, not programming anything of my own. I know there are libraries like gmp which does all such things. But I really need to know HOW they do all such things i.e. working with extremely large unimaginable numbers which are beyond the integer limit. They can do add,... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
4. Shell Programming and Scripting
Hi All,
I have a very large single record file.
abc;date||bcd;efg|......... pqr;stu||record_count;date
when i do wc -l on this file it gives me "0" records, coz of missing line feed.
my problem is there is an extra pipe that is coming at the end of this record
like... (6 Replies)
Discussion started by: Gurkamal83
6 Replies
5. Solaris
Hi,
We have file which is about 756 MB of size and vi/vim do not work when we try to edit this file. I'm looking for any editor ( ok if its NOT free ) which has the ability to open/edit a file of 1+GB seamlessly. The OS is SUN Solaris 10 ( Sparc )
Thanks in Advance
Maverick (13 Replies)
Discussion started by: maverick_here
13 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I need a command/script, who opened my dataset, consider a situation like, if a user has opened the dataset few days back then, that command/script should list his/her id.
I don't want audit on my dataset, i need only list of users who are using my dataset.
Thank you. (10 Replies)
Discussion started by: subbarao12
10 Replies
7. Programming
Hello, I wrote code that generates an image that writes its contents to a Targa file. Due to modifications that I wish to do, I decided to copy the value of each pixel as they are calculated to a dynamically allocated array before write it to a file. The problem is now that I all I see is a big... (2 Replies)
Discussion started by: colt
2 Replies
LEARN ABOUT PHP
stream_set_timeout
STREAM_SET_TIMEOUT(3) 1 STREAM_SET_TIMEOUT(3)
stream_set_timeout - Set timeout period on a stream
SYNOPSIS
bool stream_set_timeout (resource $stream, int $seconds, [int $microseconds])
DESCRIPTION
Sets the timeout value on $stream, expressed in the sum of $seconds and $microseconds.
When the stream times out, the 'timed_out' key of the array returned by stream_get_meta_data(3) is set to TRUE, although no error/warning
is generated.
PARAMETERS
o $stream
- The target stream.
o $seconds
- The seconds part of the timeout to be set.
o $microseconds
- The microseconds part of the timeout to be set.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 4.3.0 | |
| | |
| | As of PHP 4.3, this function can (potentially) |
| | work on any kind of stream. In PHP 4.3, socket |
| | based streams are still the only kind supported |
| | in the PHP core, although streams from other |
| | extensions may support this function. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
stream_set_timeout(3) example
<?php
$fp = fsockopen("www.example.com", 80);
if (!$fp) {
echo "Unable to open
";
} else {
fwrite($fp, "GET / HTTP/1.0
");
stream_set_timeout($fp, 2);
$res = fread($fp, 2000);
$info = stream_get_meta_data($fp);
fclose($fp);
if ($info['timed_out']) {
echo 'Connection timed out!';
} else {
echo $res;
}
}
?>
NOTES
Note
This function doesn't work with advanced operations like stream_socket_recvfrom(3), use stream_select(3) with timeout parameter
instead.
This function was previously called as set_socket_timeout(3) and later socket_set_timeout(3) but this usage is deprecated.
SEE ALSO
fsockopen(3), fopen(3).
PHP Documentation Group STREAM_SET_TIMEOUT(3)