28 06, 2009

unpack

By | 2009-07-02T14:45:30+00:00 June 28th, 2009|Categories: PHP, Ruby|Tags: , , , , |Comments Off on unpack

The unpack function decodes a binary string into an array according to the format given as a parameter.

PHP

$binary_string = pack("nvc*", 0x1234, 0x5678, 65, 66);
$array = unpack("nvc*", $binary_string);

Ruby

a = [0x1234, 0x5678, 65, 66];

binary_string = a.pack("nvc*");

my_array = binary_string.unpack('nvc*');
25 06, 2009

pack

By | 2009-07-02T14:39:12+00:00 June 25th, 2009|Categories: PHP, Ruby|Tags: , , , , , |Comments Off on pack

The pack function packs the given arguments into a binary string according to format provided as a parameter.

PHP

$binary_string = pack("nvc*", 0x1234, 0x5678, 65, 66);

Ruby

a = [0x1234, 0x5678, 65, 66];

binary_string = a.pack("nvc*");

This Is A Custom Widget

This Sliding Bar can be switched on or off in theme options, and can take any widget you throw at it or even fill it with your custom HTML Code. Its perfect for grabbing the attention of your viewers. Choose between 1, 2, 3 or 4 columns, set the background color, widget divider color, activate transparency, a top border or fully disable it on desktop and mobile.

This Is A Custom Widget

This Sliding Bar can be switched on or off in theme options, and can take any widget you throw at it or even fill it with your custom HTML Code. Its perfect for grabbing the attention of your viewers. Choose between 1, 2, 3 or 4 columns, set the background color, widget divider color, activate transparency, a top border or fully disable it on desktop and mobile.