That is, you perform the greatest/smallest test for each of the 4 numbers.
Alternatively, you may want to implement any of the standard sorting algorithms. (Although I suspect it might be a bit too overwhelming at this stage.)
tyler_durden
This User Gave Thanks to durden_tyler For This Post:
HELLO GUYS,
How u all guys doing?Recently I brought a system and installed Red Hat Linux in it. I have also got a network card. My question is can i connect NIC to my system and use it as a client? I really don't want to buy another system.
I want to use this computer/system both as server and... (0 Replies)
Help! I am very stuck!!!
I have to produce a practical implementation of ONC RPC for an assignment and I do not know where to start. I hve done much searching on sun's site but everything is too complicated for someone with my limited knowledge. I only know the very basic unix commands and have... (1 Reply)
hi everyone i m a novice user . just want to know how to use this website and also learn unix from the basics. can any one help me please.... (2 Replies)
Hi,
I am observing a problem wiht my script. I tokk that part and executed from the command prompt. Below is the command the error. CAn any one suggest what should be done here.
if ($cnt -lt $maxcnt) then echo deepu fi
ksh: 0: not found
Thanks in advance (16 Replies)
I really want to get into unix scripting,work with RS6000 -AIX.
How do i get started,what books are good for beginners,i am very desperate
I have no programming background but ready to scrafice all my time in learning .please help.
PLEASE,PLEASE PLEASE ,HELP....
Any advice will realy... (2 Replies)
Heya all Im just reading up on the solaris o/s and have a few questions regarding it:
1) is the solaris of free to use/download? if yes where?
2) Can the solaris o/s be loaded from CD without affectin windows o/s just like linux can?
3) what are the hardware requirements for using... (2 Replies)
Heya all Im just reading up on the solaris o/s and unix and i just have the following qustions
1) is the solaris o/s the same as Unix if not how are they different - i.e. are they different operating systems?
2) Can the Unix be loaded from CD without affectin windows o/s just like linux... (2 Replies)
I am just learning unix and need some help. I am trying to display all of the files I have modified within the last 24 hours and sort them from the most recently modified. I can't figure it out.. I've been using a lot of ls and find commands. Here are some things I've tried:
find . -mtime -1 |... (4 Replies)
My pipe delimited file is coming over with spurious “\” characters
inserted into some alpha fields,
which is causing the records to be split into 2.
Eg Abc|def|10/11\
AAAA|xyz
Lmn|opq|10/11BBBB|xyz
etc etc
I am having to go into vi, then enter / \ to... (5 Replies)
I've literally been handed this assessment for my course and the lecturer is of no help at all he's taught us virtually nothing would anyone be able to show me how the following script should look on Linux -
For this assignment you have to write a Linux Shell Script which will allow a user to... (1 Reply)
Discussion started by: Andy_cyber
1 Replies
LEARN ABOUT PHP
crc32
CRC32(3) 1 CRC32(3)crc32 - Calculates the crc32 polynomial of a stringSYNOPSIS
int crc32 (string $str)
DESCRIPTION
Generates the cyclic redundancy checksum polynomial of 32-bit lengths of the $str. This is usually used to validate the integrity of data
being transmitted.
Warning
Because PHP's integer type is signed many crc32 checksums will result in negative integers on 32bit platforms. On 64bit installa-
tions all crc32(3) results will be positive integers though.
So you need to use the "%u" formatter of sprintf(3) or printf(3) to get the string representation of the unsigned crc32(3) checksum
in decimal format.
For a hexadecimal representation of the checksum you can either use the "%x" formatter of sprintf(3) or printf(3) or the dechex(3)
conversion functions, both of these also take care of converting the crc32(3) result to an unsigned integer.
Having 64bit installations also return negative integers for higher result values was considered but would break the hexadecimal
conversion as negatives would get an extra 0xFFFFFFFF######## offset then. As hexadecimal representation seems to be the most common
use case we decided to not break this even if it breaks direct decimal comparisons in about 50% of the cases when moving from 32 to
64bits.
In retrospect having the function return an integer maybe wasn't the best idea and returning a hex string representation right away
(as e.g. md5(3) does) might have been a better plan to begin with.
For a more portable solution you may also consider the generic hash(3). hash("crc32b", $str) will return the same string as
dechex(crc32($str)).
PARAMETERS
o $str
- The data.
RETURN VALUES
Returns the crc32 checksum of $str as an integer.
EXAMPLES
Example #1
Displaying a crc32 checksum
This example shows how to print a converted checksum with the printf(3) function:
<?php
$checksum = crc32("The quick brown fox jumped over the lazy dog.");
printf("%u
", $checksum);
?>
SEE ALSO hash(3), md5(3), sha1(3).
PHP Documentation Group CRC32(3)