kasisppr Posted April 18, 2008 Report Share Posted April 18, 2008 Ko tad Tev īsti vajag galu galā? Link to comment Share on other sites More sharing options...
mounkuls Posted April 18, 2008 Report Share Posted April 18, 2008 man vispaar nevajag parveidot visu 1337 uz 01001000101 bet gan sitaa 1=0 3=1 3=1 7=0 Negribi paskaidrot? Link to comment Share on other sites More sharing options...
Sephy Posted April 21, 2008 Author Report Share Posted April 21, 2008 laikam nepariezi izskaidroju ko man vajag ;D. man isteniba vienkarshi vajadzeja parveidot skaitlus binari piemeram 7 uz 111 vai 10 uz 1010... Link to comment Share on other sites More sharing options...
andrisp Posted April 21, 2008 Report Share Posted April 21, 2008 (edited) nu bet to jau decbin() dara! Edited April 21, 2008 by andrisp Link to comment Share on other sites More sharing options...
Sephy Posted April 21, 2008 Author Report Share Posted April 21, 2008 paldies to jau es sapratu ;D. starp citu vai tas taa domats ka crc32 ja parveido failu ar vinu dod priekshaa minus zimi?! nevar kautkaa uzlikt lai ir tikai ar +?? Link to comment Share on other sites More sharing options...
bubu Posted April 21, 2008 Report Share Posted April 21, 2008 crc32 nav nekāda sakara ar mīnuszīmēm. Tas atgriež pilnu 32-bitīgu integeri, ar kuru tu tālāk vari darīt, kas vien tev ietīkas. Link to comment Share on other sites More sharing options...
Sephy Posted April 21, 2008 Author Report Share Posted April 21, 2008 crc32 nav nekāda sakara ar mīnuszīmēm. Tas atgriež pilnu 32-bitīgu integeri, ar kuru tu tālāk vari darīt, kas vien tev ietīkas. hmm paskaties kaut vai shadu piemeru: <?php $ciparz = "13337"; $parveidotais = crc32($ciparz); echo "parveidots ar crc32 $parveidotais"; ?> ja izvada to parveidoto vismaz man sanak -771315054. un man tas minus neparak patik ;P Link to comment Share on other sites More sharing options...
andrisp Posted April 21, 2008 Report Share Posted April 21, 2008 Manuāli vajag rūpīgāk lasīt: Because PHP's integer type is signed, and many crc32 checksums will result in negative integers, you need to use the "%u" formatter of sprintf() or printf() to get the string representation of the unsigned crc32 checksum. Link to comment Share on other sites More sharing options...
Sephy Posted April 21, 2008 Author Report Share Posted April 21, 2008 tad tur sanak pavisam cits skaitlis :P. nevis tas pats skaitlis bez minusa oO Link to comment Share on other sites More sharing options...
andrisp Posted April 21, 2008 Report Share Posted April 21, 2008 Nu protams. Link to comment Share on other sites More sharing options...
Sephy Posted April 21, 2008 Author Report Share Posted April 21, 2008 sk tatad tas ir labi ;D Link to comment Share on other sites More sharing options...
Recommended Posts