Search found 806 matches

by Saman
Sat Jan 26, 2013 3:19 am
Forum: C/C++ Programming
Topic: How to convert binary to BCD ?
Replies: 13
Views: 31124

Re: How to convert binary to BCD ?

Why 26 bit ? Cant represent more than 26 bit numbers ? Is Reason for limit ,for 32 bit output? :idea: The maximum number which can show in 26-bits is (2 26 - 1) = 67108863 There are 8 digits which needs 8 nibbles of 4 bytes. Now consider (2 27 - 1)... it is 134217728 and it has 9 digits. It needs 9...
by Saman
Thu Jan 24, 2013 8:30 pm
Forum: C/C++ Programming
Topic: How to convert binary to BCD ?
Replies: 13
Views: 31124

Re: How to convert binary to BCD ?

I think this is stupid problem.. BCD is about representing each digit of a decimal number in a nibble (4-bits). A 26-bit number can be represented with 4 bytes. 2 26 - 1 = 67108863 This has 8 digits. If I represent this in BCD, 3 - 0011 6 - 0110 8 - 1000 8 - 1000 0 - 0000 1 - 0001 7 - 0111 6 - 0110...
by Saman
Sun Jan 20, 2013 11:52 pm
Forum: C/C++ Programming
Topic: How to convert binary to BCD ?
Replies: 13
Views: 31124

Re: How to convert binary to BCD ?

BCD to Integer unsigned int bcd2i(unsigned int bcd) { unsigned int decimalMultiplier = 1; unsigned int digit; unsigned int i = 0; while (bcd > 0) { digit = bcd & 0xF; i += digit * decimalMultiplier; decimalMultiplier *= 10; bcd >>= 4; } return i; } Integer to BCD unsigned int i2bcd(unsigned int i) ...
by Saman
Tue Jan 15, 2013 9:27 pm
Forum: C/C++ Programming
Topic: How to do profiling easily on C++ (timing of functions)
Replies: 0
Views: 6657

How to do profiling easily on C++ (timing of functions)

C standard library provides clock() function, which can be used to measure the elapsed time. It is a system independent C function declared in time.h (compatible on most operating systems), but it does not give accurate results, not even millisecond accuracy. In order to see the accuracy of clock(),...
by Saman
Mon Jan 14, 2013 2:35 am
Forum: Android
Topic: Fix Xperia Mini ST15i Overheating/Capacitive Buttons Issue
Replies: 1
Views: 9247

Fix Xperia Mini ST15i Overheating/Capacitive Buttons Issue

So you bought a SE Xperia Mini and you have overheating issues with the phone. This is a known issue, but there is no fix in the latest update by Sony. I’ve read they have a calibration fix at the authorized service center, but on visiting they asked me to wait for a week. Sorry I love my phone and ...
by Saman
Tue Oct 09, 2012 3:49 pm
Forum: PHP & MySQL
Topic: Upload zip folder, extract it, rename files inside it, save
Replies: 3
Views: 9282

Re: Upload zip folder, extract it, rename files inside it, save

Opps. I have just seen that you needed further help on this.Thought you have fixed it by yourself after my first tip. I have tried to re-read your code and I have seen few problems. One of the problems I see in your code is, you have defined function "findexts" within "if(isset($_FILES['fupload'])) ...
by Saman
Sun Sep 16, 2012 4:42 am
Forum: PHP & MySQL
Topic: Upload zip folder, extract it, rename files inside it, save
Replies: 3
Views: 9282

Re: Upload zip folder, extract it, rename files inside it, save

I see a semantic issue (bad programming) there in your code. Can you change your function function openZip($file_to_open) to function openZip($file_to_open, $target) and remove the global definition from there. So when you call the function, you call it alone with the target. Can you do that change ...
by Saman
Tue Aug 28, 2012 1:33 pm
Forum: Web programming
Topic: How to setup HTTPS SSL on WAMP
Replies: 7
Views: 26987

Re: How to setup HTTPS SSL on WAMP

Ah other think, to get the website work with https://... it should be in the ssl Folder???? Correct. when run this command " openssl rsa -in pass.key -out robot.lk.key " error >> Warning : can't open config file :/ usr/local/ssl/openssl.cnf Y :( ??? Looks like you are working on a Linux distributio...
by Saman
Mon Aug 27, 2012 10:58 am
Forum: General Discussions
Topic: How to build GSM and 3G antenas
Replies: 11
Views: 10673

Re: How to build GSM and 3G antenas

Another nice guide to build a cantenna...
http://www.oreillynet.com/etel/blog/200 ... _chip.html

Go to advanced search