Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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?
[atcroft]: .oO(Then there is the effect if a site changes their timezone, such as when the International Date Line was moved by the purchase of Alaska by the US from Russia in 1867, or several places (I cannot recall off-hand) that moved from one side of the Date
[atcroft]: Line to the other recently....)
[atcroft]: .oO(Then again, you also have to be careful if you had it to the database, and be aware of any assumptions it makes (such as SQLite assuming Gregorian calendar and a day of exactly 86400 seconds)...)

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2017-04-29 04:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (531 votes). Check out past polls.