[algogeeks] Re: Output

2012-11-24 Thread Dave
@Rajesh: In binary, mask = 111...10 (with 4-byte ints, this is 27 
1-bits followed by 5 0-bits). The logical product of num with mask zeros 
out the low order 5 bits while retaining the high order 27 bits. Thus, res 
is num truncated to the largest multiple of 32 that does not exceed num. 56 
= (1*32 + 24) goes to 1*32 = 32, 64 (=2*32 + 0) stays at 2*32 = 64, and 127 
(=3*32 + 31) goes to 3*32 = 96.
 
Dave

On Saturday, November 24, 2012 2:45:24 AM UTC-6, rajesh pandey wrote:

> void dosomething(int num)
> {
> int mask=~(1<<5-1);
> int res=num&mask;
> printf("%d",res);
> }
> int main()
> {
> dosomething(56);
> dosomething(64);
> dosomething(127);
> return 0;
> }
>
> please explain  the logic behind the output.
>
> Thanks,
> Rajesh  
>

-- 




Re: [algogeeks] Resources for understanding Dynamic programming

2012-11-24 Thread Romil Goyal
Hi, Rahul. Can you email me the complete book by kleinberg and tardos?


On Thu, Nov 15, 2012 at 5:31 PM, Rahul Kumar Patle <
patlerahulku...@gmail.com> wrote:

>
>
> On Thu, Nov 15, 2012 at 4:01 PM, Sarath  wrote:
>
>> Are there any good resources to understand Dynamic programming and also
>> looking for some good problem and step by step solution for better
>> understanding.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/algogeeks/-/RtXi9Nlvqa0J.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Thanks and Regards:
> Rahul Kumar Patle
> M.Tech, School of Information Technology
> Indian Institute of Technology, Kharagpur-721302, 
> India
> Mobile No: +91-8798049298, +91-9424738542
> Alternate Email: rahulkumarpa...@hotmail.com
> [image: 
> Linkedin]
> [image: Twitter] 
> 
>
>  --
>
>
>



-- 
Romil
Software Engineer,
Winshuttle Softwares India Pvt. Ltd.
Chandigarh

-- 




Re: [algogeeks] Output

2012-11-24 Thread Rushiraj Patel
As arithmetic operator has higher precedence than shifting operator , mask
will have 5th bit zero from left.

So it will deduct 16 from the input if 5th bit is set in the binary
representation of number.
so it will deduct 16 from 56 and 127..but not from 64

But its  just the procedural thing meaning i don't know..


On Sat, Nov 24, 2012 at 2:15 PM, rajesh pandey  wrote:

> void dosomething(int num)
> {
> int mask=~(1<<5-1);
>  int res=num&mask;
> printf("%d",res);
> }
> int main()
> {
> dosomething(56);
> dosomething(64);
> dosomething(127);
>  return 0;
> }
>
> please explain  the logic behind the output.
>
> Thanks,
> Rajesh
>
> --
>
>
>

-- 




Re: [algogeeks] VIDEO STREAMING

2012-11-24 Thread Kartik Sachan
@surabh sab jagah hath mar liya beywhy don't u help me out...vase bhi
aab toh tum free bhi ho gye ho ge..:P:P

-- 




Re: [algogeeks] VIDEO STREAMING

2012-11-24 Thread saurabh singh
You are trying the wrong place.try stackoverflow.the best place to go
when ur ass is on fire. :p

On 11/24/12, Prateek Gupta  wrote:
> @kartik +1:P :P
>
> PS : pardon the pun.
>
>
> On Sat, Nov 24, 2012 at 11:42 AM, Kartik Sachan
> wrote:
>
>>
>> hey anybody has any idea about video streaming using vlcj lib ??
>>
>>
>> --
>>
>> *WITH REGARDS,
>>
>> *KARTIK SACHAN
>>  B.Tech. Final Year
>> Computer Science And Engineering
>> Motilal Nehru National Institute of Technology,Allahabad
>> Phone No: +91-9451012943
>> E-mail: kartik.sac...@gmail.com
>>
>>
>>  --
>>
>>
>>
>
> --
>
>
>


-- 
Saurabh Singh
B.Tech (Computer Science)
MNNIT
blog:geekinessthecoolway.blogspot.com

-- 




[algogeeks] Output

2012-11-24 Thread rajesh pandey
void dosomething(int num)
{
int mask=~(1<<5-1);
int res=num&mask;
printf("%d",res);
}
int main()
{
dosomething(56);
dosomething(64);
dosomething(127);
return 0;
}

please explain  the logic behind the output.

Thanks,
Rajesh  

--