Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

Can someone explain to me the pack() function in PHP? -


i know more pack() function in php: http://fi.php.net/manual/en/function.pack.php

i know packs data binary, i'm not sure v v n n c c mean , wondering if kind , give me practical demonstration when use formats?

the online documentation, change, lacks of information, in opinion.

those represent how want data packing represented in binary format:

so

$bin = pack("v", 1); => 0000000000000001 (16bit)

where

$bin = pack("v", 1) => 00000000000000000000000000000001 (32 bit)

it tells pack how want data represented in binary data. code below demonstrate this. note can unpack different format packed data as.

<?php  $bin = pack("s", 65535); $ray = unpack("s", $bin); echo "unsigned short val = ", $ray[1], "\n";  $bin = pack("s", 65536); $ray = unpack("s", $bin); echo "overflow ushort val = ", $ray[1], "\n";  $bin = pack("v", 65536); $ray = unpack("v", $bin); echo "same above ulong val = ", $ray[1], "\n"; ?> 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -