| Author |
Message |
   
Nanigadu
Junior Artist Username: Nanigadu
Post Number: 491 Registered: 02-2008 Posted From: 204.92.92.4
Rating: N/A Votes: 0 (Vote!) | | Posted on Friday, June 27, 2008 - 01:21 pm: |
    |
Jkm:license key client side javascript lo kakunda server side generate cheyyadam better.
This is not for web annay, it is for internal FE usage, company wants to keep track of people who are accessing a particular product |
   
Jkm
Junior Artist Username: Jkm
Post Number: 578 Registered: 02-2008 Posted From: 216.235.145.222
Rating: N/A Votes: 0 (Vote!) | | Posted on Friday, June 27, 2008 - 12:31 pm: |
    |
Nanigadu:Thanks a bunch everyone, yes it is for generating license key to access another product, and it expires after 1 month. Intha medhavulu vokka sarey naa thread lo chusinanduku, i am very happy, thanks again, assalu matter enti antey, i have to replicate this code and get the same result using javascript. Danikosamey adiganu assalu ee code enti ani...will get back to you if i have ne more questions
license key client side javascript lo kakunda server side generate cheyyadam better. Anger is a condition in which the tongue works faster than the mind. |
   
Nanigadu
Junior Artist Username: Nanigadu
Post Number: 490 Registered: 02-2008 Posted From: 204.92.92.4
Rating: N/A Votes: 0 (Vote!) | | Posted on Friday, June 27, 2008 - 10:37 am: |
    |
Jkm:
Thanks a bunch everyone, yes it is for generating license key to access another product, and it expires after 1 month. Intha medhavulu vokka sarey naa thread lo chusinanduku, i am very happy, thanks again, assalu matter enti antey, i have to replicate this code and get the same result using javascript. Danikosamey adiganu assalu ee code enti ani...will get back to you if i have ne more questions, |
   
Jkm
Junior Artist Username: Jkm
Post Number: 571 Registered: 02-2008 Posted From: 98.192.47.28
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 08:38 pm: |
    |
Sopathi:babai, hexdecimal ayina, binary ayina, decimal format ayyina everything is integer. at the ground level the value is always stored in binary format.
data is stored in binary. i guess there is no display format in appln. here it is just an unique number. something like pre paid phone card access number . Anger is a condition in which the tongue works faster than the mind. |
   
Sopathi
Junior Artist Username: Sopathi
Post Number: 466 Registered: 02-2008 Posted From: 63.119.227.6
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 07:53 pm: |
    |
Bicchapathi:ada Time_t lo ki assign chestunnadu kabatti everything is in interger form. vadu just integer form lo display chesi dobbutunnadu. anthe..
babai, hexdecimal ayina, binary ayina, decimal format ayyina everything is integer. at the ground level the value is always stored in binary format. |
   
Sopathi
Junior Artist Username: Sopathi
Post Number: 465 Registered: 02-2008 Posted From: 63.119.227.6
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 07:51 pm: |
    |
Nemo:Sopathi aa code software lic generate ceyyadaniki anukunta. license plates kosam kaadhu.
oh i see. even in case of license numbers how can "M" be represented in hexadecimal format? BTW what are these license numbers? in what format they are? |
   
Nemo
Junior Artist Username: Nemo
Post Number: 613 Registered: 03-2008 Posted From: 148.168.40.4
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 07:29 pm: |
    |
>>evarina message digest algorithm vadara for generating unique values? they are ideal candidates for surrogate keys yeah we use MD5 to generate GUID's. |
   
Maverick
Side Hero Username: Maverick
Post Number: 2648 Registered: 01-2008 Posted From: 74.140.255.220
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 07:28 pm: |
    |
Bicchapathi:Message Digest lo niku Hashcode generate chestaru kada babai
yes |
   
Bicchapathi
Comedian Username: Bicchapathi
Post Number: 1120 Registered: 02-2008 Posted From: 24.34.24.3
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 07:25 pm: |
    |
Maverick:
Message Digest lo niku Hashcode generate chestaru kada babai |
   
Maverick
Side Hero Username: Maverick
Post Number: 2647 Registered: 01-2008 Posted From: 74.140.255.220
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 07:23 pm: |
    |
evarina message digest algorithm vadara for generating unique values? they are ideal candidates for surrogate keys |
   
Jkm
Junior Artist Username: Jkm
Post Number: 568 Registered: 02-2008 Posted From: 98.192.47.28
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 07:21 pm: |
    |
Sopathi:what do you by hexnumber for licence? How can letter say "M" represented in hexadecimal format? on the side lines why is he doing inversion of bits? I dont think its required for license plates.
real application use naaku theliyadu. software license ani guess chessa. only nani can tell the real use. Anger is a condition in which the tongue works faster than the mind. |
   
Bicchapathi
Comedian Username: Bicchapathi
Post Number: 1119 Registered: 02-2008 Posted From: 24.34.24.3
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 07:21 pm: |
    |
Sopathi:
sodi appandi eshe.. cout chesina danimida kuda kummukuntunnara... operator overload seshadu.. edo chesharu.. edo ayipoyindi ani scchipotharu enti.. ada Time_t lo ki assign chestunnadu kabatti everything is in interger form. vadu just integer form lo display chesi dobbutunnadu. anthe.. |
   
Maverick
Side Hero Username: Maverick
Post Number: 2646 Registered: 01-2008 Posted From: 74.140.255.220
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 07:20 pm: |
    |
Sopathi:I dont think its required for license plates.
License ante license plate ani kaademo..Software licenses etc.. |
   
Nemo
Junior Artist Username: Nemo
Post Number: 612 Registered: 03-2008 Posted From: 148.168.40.4
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 07:19 pm: |
    |
Sopathi aa code software lic generate ceyyadaniki anukunta. license plates kosam kaadhu. |
   
Sopathi
Junior Artist Username: Sopathi
Post Number: 464 Registered: 02-2008 Posted From: 63.119.227.6
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 07:16 pm: |
    |
Jkm:i think that cout is just for debugging. looks like jamana old code. real usage is in hex number for license(who knows ?). you can display it in any integral value.
what do you by hexnumber for licence? How can letter say "M" represented in hexadecimal format? on the side lines why is he doing inversion of bits? I dont think its required for license plates.
 |
   
Jkm
Junior Artist Username: Jkm
Post Number: 567 Registered: 02-2008 Posted From: 98.192.47.28
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 07:12 pm: |
    |
Nemo:i think the following line will print the value in decimal format. std::cout << license << std::endl;
yes. by default it is decimal. you need to override it to get hex number. i think that cout is just for debugging. looks like jamana old code. real usage is in hex number for license(who knows ?). you can display it in any integral value. Anger is a condition in which the tongue works faster than the mind. |
   
Nemo
Junior Artist Username: Nemo
Post Number: 611 Registered: 03-2008 Posted From: 148.168.40.4
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 07:02 pm: |
    |
>>all that this piece of code does is generating an unique hex number. i think the following line will print the value in decimal format. std::cout << license << std::endl; |
   
Jkm
Junior Artist Username: Jkm
Post Number: 566 Registered: 02-2008 Posted From: 98.192.47.28
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 06:59 pm: |
    |
Bicchapathi:poraduni ala kodutunnavu..
age perigithe chadastam peruguthundi. emi cheyyanu. Anger is a condition in which the tongue works faster than the mind. |
   
Bicchapathi
Comedian Username: Bicchapathi
Post Number: 1117 Registered: 02-2008 Posted From: 24.34.24.3
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 06:58 pm: |
    |
Jkm:
poraduni ala kodutunnavu.. |
   
Jkm
Junior Artist Username: Jkm
Post Number: 565 Registered: 02-2008 Posted From: 98.192.47.28
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 06:55 pm: |
    |
Bicchapathi:
enti ala antavu ? Anger is a condition in which the tongue works faster than the mind. |
   
Bicchapathi
Comedian Username: Bicchapathi
Post Number: 1116 Registered: 02-2008 Posted From: 24.34.24.3
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 06:52 pm: |
    |
Jkm:
vammooo
 |
   
Jkm
Junior Artist Username: Jkm
Post Number: 564 Registered: 02-2008 Posted From: 98.192.47.28
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 06:45 pm: |
    |
all that this piece of code does is generating an unique hex number. i am sure you must be having a reason to generate unique number in your appln. may be license number. there are other ways to generate unique hex number which is used in license numbers you don't have to worry about this code. if you still need here u go. all posts here does answer your question . adding to it time_t currT; type time_t from time.h is same as data type "int" (4 byte or 8 byte) in behaviour. you assign int, long values to a time_t variable,and vice versa. time(&currT); time(NULL) function returns the number of seconds that have passed since midnight, 1st January 1970 GMT . If the parameter is not NULL, the same value is stored in the location pointed to. ^ bitwise XOR Anger is a condition in which the tongue works faster than the mind. |
   
Sopathi
Junior Artist Username: Sopathi
Post Number: 463 Registered: 02-2008 Posted From: 63.119.227.6
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 05:35 pm: |
    |
Sopathi:kani bitwise on a binary inka dorakaledu, if u have any idea, please explain
all data types are internally binary formats. bit wise operator antene it does binary level operations on each bit. |
   
Sopathi
Junior Artist Username: Sopathi
Post Number: 462 Registered: 02-2008 Posted From: 63.119.227.6
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 05:34 pm: |
    |
Nanigadu:kani bitwise on a binary inka dorakaledu, if u have any idea, please explain
mama bitwise antene binary operation so. 0xff ^ 0x1e or 123 ^ 568 or 0b1111001 ^ 0b10001001 all work. no problem. each data type is in bit binary format. it only differs in what format you want to print it out. |
   
Nanigadu
Junior Artist Username: Nanigadu
Post Number: 489 Registered: 02-2008 Posted From: 204.92.92.4
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 05:18 pm: |
    |
Maverick:Javascript ki online help bocchedu sites unnai..may be u have them readily available..
avunu Mav, kani i have to use bitwise operator on a binary number, i got some scripts on decimal to binary, kani bitwise on a binary inka dorakaledu, if u have any idea, please explain |
   
Bicchapathi
Comedian Username: Bicchapathi
Post Number: 1111 Registered: 02-2008 Posted From: 141.158.20.2
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 05:13 pm: |
    |
Sopathi:Mavrick
Edo okati babai.. Kurrodu basic concept adigadu .. seppam.. enda of the story. |
   
Sopathi
Junior Artist Username: Sopathi
Post Number: 461 Registered: 02-2008 Posted From: 63.119.227.6
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 05:10 pm: |
    |
time_t Data type returned by time(). Generally defined as long int. it seems by the usage its not a structure data type but a typedef to basic data type. yemo operator overloading for "^" jesina jesi undochchu. check your time.h file. |
   
Maverick
Side Hero Username: Maverick
Post Number: 2639 Registered: 01-2008 Posted From: 192.146.101.24
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 04:57 pm: |
    |
Bicchapathi:currT varaible
time_t is a structure defined in time.h..not just a regular variable.. |
   
Maverick
Side Hero Username: Maverick
Post Number: 2638 Registered: 01-2008 Posted From: 192.146.101.24
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 04:55 pm: |
    |
Nanigadu:but i need to do all this operations using javascript, to calculate the output of a particular time of the day.
Javascript ki online help bocchedu sites unnai..may be u have them readily available.. |
   
Nanigadu
Junior Artist Username: Nanigadu
Post Number: 488 Registered: 02-2008 Posted From: 204.92.92.4
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 04:41 pm: |
    |
Bicchapathi:
Sopathi:
thanks a bunch babai, i think i got the gist of it, but i need to do all this operations using javascript, to calculate the output of a particular time of the day. |
   
Sopathi
Junior Artist Username: Sopathi
Post Number: 460 Registered: 02-2008 Posted From: 63.119.227.6
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 04:38 pm: |
    |
Sopathi:but what is 0xffffffff
0xf is hexadecimal representation of binary 1111 0xff is hexadecimal representation of binary 11111111 atla annattu. so 0xffffffff is a 32 bit value where all the bits are 1. |
   
Sopathi
Junior Artist Username: Sopathi
Post Number: 459 Registered: 02-2008 Posted From: 63.119.227.6
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 04:35 pm: |
    |
Nanigadu: currT ^ 0xffffffff;
result of this operation is a value where each bit is exactly inverted as the corresponding bit in currT. that means if currT = 10110, the result of currT ^ 0xffffffff will be 01001 |
   
Sopathi
Junior Artist Username: Sopathi
Post Number: 458 Registered: 02-2008 Posted From: 63.119.227.6
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 04:33 pm: |
    |
Nanigadu:thanks babai, ^ bitwise exclusive OR ani google lo telisindi, but what is 0xffffffff ? idi em chestundi
it does bit wise inversion(but dont think its same as finding compliment) |
   
Bicchapathi
Comedian Username: Bicchapathi
Post Number: 1107 Registered: 02-2008 Posted From: 141.158.20.2
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 04:32 pm: |
    |
Bicchapathi:
0xffffffff ni hexa operator antaru.. to the power of 8 16 tho chestaru.. dula tirio.. |
   
Bicchapathi
Comedian Username: Bicchapathi
Post Number: 1105 Registered: 02-2008 Posted From: 141.158.20.2
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 04:28 pm: |
    |
Nanigadu:^ bitwise exclusive
The ^ (bitwise exclusive OR) operator compares each bit of its first operand to the corresponding bit of the second operand. If both bits are 1's or both bits are 0's, the corresponding bit of the result is set to 0. Otherwise, this operator sets the corresponding result bit to 1. The following example shows the values of a, b, and the result of a ^ b represented as 32-bit binary numbers: bit pattern of a 00000000000000000000000001011100 bit pattern of b 00000000000000000000000000101110 bit pattern of a^b 00000000000000000000000001110010 currT ^ 0xffffffff above rendintin bits loki convert chesuko.. currT lo edaina value unte 2 modulation cheyyi.. 0xfffffffff kuda binary loki conver seyyi.. Exclusive or apply seste vacchinde result |
   
Nanigadu
Junior Artist Username: Nanigadu
Post Number: 487 Registered: 02-2008 Posted From: 204.92.92.4
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 04:24 pm: |
    |
Bicchapathi:
thanks babai, ^ bitwise exclusive OR ani google lo telisindi, but what is 0xffffffff ? idi em chestundi |
   
Chiru_fan
Junior Artist Username: Chiru_fan
Post Number: 421 Registered: 04-2008 Posted From: 170.22.76.10
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 04:20 pm: |
    |
Bicchapathi ==> REAL PAPI.... Mera puranaa naam...Idlebrain_fan |
   
Bicchapathi
Comedian Username: Bicchapathi
Post Number: 1104 Registered: 02-2008 Posted From: 141.158.20.2
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 04:18 pm: |
    |
time is function. He is passing address of the currT varaible to time function, so some value will be assigned to currT. Then he is using bitwise operater to currT then he is outing |
   
Nanigadu
Junior Artist Username: Nanigadu
Post Number: 486 Registered: 02-2008 Posted From: 204.92.92.4
Rating: N/A Votes: 0 (Vote!) | | Posted on Thursday, June 26, 2008 - 04:15 pm: |
    |
C++ vacchinavallaki ee question, naku assalu radu, please explain me what is happenning in this code time_t currT; time(&currT); time_t license = currT ^ 0xffffffff; std::cout << license << std::endl; |