Search Discussion-Lab

Wednesday, September 28, 2011

Easy concept: Bitwise right and left shift << / >>

">>" is called the Bitwise right shift operator and "<<" is called the Bitwise left shift. Why bitwise? Cause this operator is used as a easy tool for programmers working with bytes. If you just think about the results of two numbers compared with this operator you will be fixed. Cause, this operator changes bit orders in a number. If you don't have the knowledge of bytes or bits simply read this lesson. Now for the clear concept let's see the actual calculation by this operator in decimal.


A << B = A * (2^B)


Here "^" is the "to the power", not any other operator. Now see some example:


2 << 3 = 16 1 << 2 = 4 20 >> 2 = 5
120 >> 3 = 15


Now you are fixed, as I told you. Let's see the same examples in binary expression:


10 << 3 = 10000 1 << 2 = 100 10100 >> 2 = 101
1111000 >> 3 = 1111
A << B = C


What happened on above examples? The left shift (<<) adds B number of zeros to the end of A. And the right shift cut's off B number of zeros from the end of A. This is all about Left/Right shift.

Wednesday, June 1, 2011

Nokia bookmark file format - BMK specification

What is a BMK File?

BMK stands for "BooMarK". It is used in most Nokia phones to keep a address of a file. The address can be any of HTTP, RTSP, MAILTO, FILE etc. There is a title of the file can be saved in this file.

It's a tiny file format.




The tree is looked like such as:

[Startar bytes data]
[Title text data]
[Separator detector bytes]
[Address text data]
[End of bmk format bytes]





That's all in a bmk. It's very simply understandable format.



Starter bytes data

It's a 12 bytes long data. There is no logical complex in them. They are mandatory to initiate.

These values are:

03, 01, 6A, 00, 45, C6, 7F, 01, 87, 15, 11 and 03.


It's the valid bmk indicator bytes.




Title text data


It's just some texts as bytes. Plainly write them.



Separator detector bytes


It's 7 bytes long mandatory data. These bytes are used to detect the Title and the Address separately.


Here they are:

20, 00, 01, 87, 17, 11 and 03.




Address text data


It's simple text bytes like the title bytes.




End of bmk format bytes


It's 14 bytes long data. They indicates the final portion of bmk file.


Here's they are:

00, 01, 87, 10, 03, 49, 43, 4F, 4E, 00, 11, 01, 01 and 01.


Now it's all you know about BMK format. Simply apply them in mobile applications with the link of the vendor's web site to get more hit!

Thursday, May 26, 2011

Byte - Basic concept & simple implementation

According to computer science Byte is combination of two words "By eight". Why eight comes? Read throughly, you will be known of this later. You have seen files saved in hard disc or any memory card. What are these files what are they contain of? Files are a series of numbers like 1, 2, 100, 7, ... ... etc. These numbers take place one after another and makes a file. File size depends on how many numbers of numbers they cosist of. Now, what are these numbers. Simply, these are Bytes. If a file has 5 bytes like 10, 19, 105, 10 and 2 it will be 5 bytes long. If a file has 1024 bytes it will be 1 killow bytes long. As like as
QuantityUnit
1024 B1 KB
1024 KB1 MB
1024 MB1 GB
1024 GB1 TB
725 B0.71 KB

A byte can have a value from 0 to 255 total 256 values. As most computer processor works on 2 base calculation, bytes are calculated by base 2, Binary. As you know binary numbers charecter can be only 0 and 1 these are called bit. Computer processor calculates 1 as true or yes or circuit connected 0 as, false or no or circuit disconnected. So,
DecimalBinary
100000001
200000010
1000001010
10501101001
25511111111

Did you noticed I have used 8 digits to express a binary number. Here is the reson of "By eight". A number between 0 to 255 is maximum 8 bit long in binary. So they are called "Byte". Now you have to know more advanced. If you go to working practically you will face a problem. You will find negetive byte value like -1 or -50. As I have told bytes can have values 0 to 255 that isn't incorrect in hexadecimal or binary but incorrect in decimal. Actualy byte values sequence is like this

0, 1, 2, 3, ... ... 126, 127, -128, -127, -126, ... ... -3, -2, -1

Here are 256 values.

ValuesTotal
01
1 to 127127
-128 to -1128
All total:256

But in hexadecimal or binary these values are like
DecimalHexadecimalBinary
10x0100000001
-10xFF11111111
730x4901001001
-990x9D10011101

Now you can have a simple glimpse how bytes in file used. If you want to express a text charecter like "A" in a file there is a byte with value 65. Another charecter like "¤" contains two bytes 194 (-62) and 164 (-92). You can see more byte values of text charecter surfing the internet. Another usage in image files to express colors in RGB or ARGB. Now you know the basics of bytes. Everithing nowadays like video, text, image, sound can be express within bytes in a file concept.

Thursday, February 17, 2011

New Guiness Word Record created by rapper Lil Wayne.

Rapper Lil Wayne has broken the Guinness World Record for most Facebook likes on a single post in 24 hours — a record only too recently created and briefly held by Oreo. Yesterday, Oreo attempted to set the record with a post to the brand’s Facebook Wall. The post read, “‘Like’ this post to join Oreo fans around the world in setting a Guinness World Record for most “Likes” to a post in 24 hours. Oreo is the world’s favorite cookie, and with your help, it will be the most ‘Liked.’” Shortly after that post surfaced, Lil Wayne announced to the world that he was also going after the Guinness World Record for most Facebook likes in 24 hours. At the end of the 24-hour period, Oreo had 114,619 likes; five hours later, when the rapper’s 24-hour period had expired, his post had 588,243 likes, easily trumping Oreo’s bid for the Guinness World Record. (Though the company was honored for its brief record in a Guinness ceremony this morning.)Around 16.7 million Facebook users “like” Oreo’s page on the social network; Lil Wayne’s fanbase weighs in at 20 million Facebook users strong. However, the high level of engagement between Weezy and his fans tipped the balance in his favor.
Mazy Kazerooni is Lil Wayne’s
digital manager. He told us
yesterday that the stunt was
intended to show off Lil Wayne’s
social media chops. “I want
people to think ‘Bieber, Gaga and
Lil Wayne.’ The traffic we do is
ridiculous and no one really
knows,” Kazerooni said.
There’s a valuable lesson in this
exercise for social media
marketers; although the brand
failed to accomplish its goal of
holding onto a world record, it
did get a ton of brand
recognition and positive press
along the way. Still, a brand, no
matter how delicious, endearing,
or ingrained into the American
experience, is unlikely to have the
Pied Piper-like pull of an
internationally known star.

Sunday, January 2, 2011

Nokia phone certificate installing

By default Nokia phones come out with some certicate like Verisign, Thawte, Nokia, Geotrust, GlobalSign etc. You can add more certificate even not using any PC help. Just download a zip file from this link and extract it with java MIDlet like BlueFTP, MiniCommander or any other. Now you keep the install_certificate.html (inside archive) and the certificate (.cer file) with the name certificate.cer into a same folder. Now open the install_certificate.html file click "install" to save it to your certificate list.

How to trick with mobile maximum jar size

I think Nokia is best mobile device for managing file. Almost all nokia file manager (Gallery) shows file extention by default. On most phone there is no option to stop it. And its a nice clue for this job. Application programmers also very fond of Nokia, as they often release programs specialy for Nokia. Nokia provides JVM (Java Virtual Matchine) that launches J2ME MIDlets to expand handsets capblity by installing new programs. On s40 series Nokia security guard checks out the phone's cablity by performing some action. Just as hiding copyright protected files copy, delete or send option. It also bounds action on java programs. It limits the application size according to handsets capablity to load. Some phone does not start downloading jar or jad (size mentioned of the jar) file or if even downloads, after that it shows a capablity error message if the file exceeds maximum jar size that does not accepts your phone. I found that this restriction can be easily ignored. For that don't download the MIDlet using phones default browser. Download it with other file downloader MIDlet like UC WEB, DM Mobile or Thor's Mobiget j2me MIDlet. Just ensure that the file name has no "." sing even not ".jar". If there is any "." symbol remove it with other programs like FileExplorer, BlueFTP, MiniCommander or any file manager programs. You do it because the phone detects the last "." symbol as the file extentions "." symbol and you must ensure that the file has no extention. Now use your phones file browser (Gallery) and set the cursor on it and rename it with like "filename.jar". Now its done. Now wonderly see that the file has become a j2me MIDlet with an icon. Now you can run any java MIDlet of any size exceeding the default maximum jar size.