Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Bits & pieces

by bobf (Monsignor)
on Jul 18, 2005 at 07:58 UTC ( #475665=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $s = eval
    {
    ...
                        vec( $textstr, $index-1, 8 );
            };
    };
    
  2. or download this
    1: pack( 'b*', vec( '&|^', $index-1, 1 ) ? '~' : '' )
    2: $commabyte
    3: pack( 'c', vec( '&|^', ($index-1)%3, 8 ) )
    4: pack( 'b*', vec( '&|^', $index-1, 1 ) ? '' : '~' )
    5: vec( $textstr, $index-1, 8 ) )
    
  3. or download this
    [~](char) (operator) [~](char)
    
  4. or download this
    bit: 01234567  low nybbles
    j =  01010110   0101
    u =  10101110      1010
    s =  11001110         1100
    t =  00101110            0010
    
  5. or download this
    $c = $offset - ( ($offset - ($offset % 4))/4 + ($offset % 4 ? 1 : 0) )
    +; # first frame
    
    ...
            (vec( $bitstr, $c + 1, 4 )<<4)) # high nybble
            >> 4 - ($offset % 4) - 4 * ( ($offset % 4) ? 0 : 1 ) # shift o
    +ff extra bits
          );
    
  6. or download this
    $i += $i%2 ? -1 : 1
        if(
    ...
              !(($offset + 1) % 3)     ) ||
            $offset + 1 == 22 
        );
    
  7. or download this
    $T = vec( pack( 'C', $i ), 0, 4 ) +
         vec( pack( 'b*', $_{65} ), $offset, 1 ) * (1<<4) +
         (1<<5);
    
  8. or download this
    print pack( 'c',
                ($T += $T == (1<<5) ? 0 : (1<<6))
                    -= $offset % 13 == 0 ? (1<<5) : 0 );
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://475665]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2015-07-06 10:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (72 votes), past polls