Jan - 31 - 2011

Vestibulum quis diam velit, vitae euismod ipsum

Jan - 31 - 2011

Aliquam vel dolor vitae dui tempor sollicitudin

Jan - 31 - 2011

Nam ullamcorper iaculis erat eget suscipit.

Maecenas at ipsum quis massa rutrum gravida! Ut in varius orci. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
Phasellus sed lectus nec risus posuere rhoncus sed et ligula. Sed gravida ornare turpis vel euismod. Phasellus quis tortor non lacus sodales rutrum sit amet non est
Donec elit nulla, pulvinar nec porta sed, hendrerit eget metus. Suspendisse porttitor ligula non felis volutpat pretium? Praesent laoreet nisl a eros ultricies in lacinia

First I wanna apologize for not being able to do my wallpaper article, but I've had way too much on my head. Anyway, what's important is that the last week is now past, so today is time to rock your socks with another wallpaper article :
So 10 ... 9 ... 8 ... 7 ... 6 ... 5 ... 4 ... 3 ... 2 ... 1 ... 0 ... Launch!
Houston we have a problem!
This article is milestone one, because I've finished my "Easy to make wallpapers", so I decided not rush with proceeding to "Medium" wallpapers, but to take it easy and tell a bit about every wallpaper, I've shown how to create to this point. So if my memory serves me correctly (I dearly hope that's the case) the first wallpaper I've shown you how to create was this one:
The key word here is simplicity. It is doesn't have flashiness or loads of bling-bling in it, but it has that relaxing feeling due to the colours used it it. When I was creating it I was trying to get used to Gnome-Shell (failed miserably) and I wanted a wallpaper, that will fit the default Dark-ish theme, but I wasn't exactly keen on using the default "Stripes" wallpaper, so I said "Oh, screw it, I'm creating a wallpaper to use with that thing" and I ended up with that one. It is nothing so special, but it is nice way to escape the over-flashy and blingy wallpaper out there.

And so off we go to the next one, which was this lovely "Bubbles" wallpaper:
See, everybody loves bubbles! No really, I have a theory that people who don't like bubbles and pancakes are just evil! Bubbles are cute, round and ... did I mention CUTE? Combing stylish dark background and colourful bubbles this wallpaper is one of my personal favorites. It has enough gloss, it is has colours, it is also by no means cluttered. Gee, it is just so freaking perfect. If I have to describe it with one word, it would be adorable. Just do yourself a major rajor favour and use it for some time, I promise, you'll love it!

If you thought this article couldn't get any better due to the overwhelming of the "Bubbles" wallpaper, see this Novacut wallpaper masterpiece:
Designed specially to for the Novacut guys to congratulate them for achieving their kickstarter goal, I am extremely proud of that wallpaper. The wallpaper uses the Novacut Brand Identity by IZO. Lato font, the novacut purple and pink are all present. Due to the fact that Novacut will be cloud friendly, the wallpaper is also cloud-centric. It is just epic masterpiece. Do try it, you won't regret it :) If you wanna know more about Novacut check out our Novacut article :P

Ok, I might be a huge fan of Novacut (wallpaper), but it's time to move on to the next wallpaper which is also branded one. Remember that the blog name is "Linux Candy"? Good, then it's time to present to you the Linux Candy branded wallpaper:
Like a said it is branded wallpaper, so it uses the Linux Candy branded colours and logo. I spend a lot of time creating that wallpaper, cuz I wanted it to have both - the light and airy feeling, but also to look colour rich. The result is (like you can all see) - WOW! Tell you what - that wallpaper is nothing, but piece of mind. Gradients, colours, splatters, gloss, etc... - it has it all. Just give it a shot and you'll understand my words.

OK, though both my branded wallpaper are some piece of work, it's time to go back the the good old non-branded wallpapers - YAY. And oh my, check this Green Stripes wallpaper out:

I seriously have a crush on that one. Some time ago, I've been dying to stripes wallpaper and I decided to fire away and create one. It is nothing special creation wise, but it looks polished and just so ridiculously simple, that one can't help himself, but just love it. Splatters, transparency, nice colours and sweet lighting effects. The wallpaper has that all. Some piece of work, huh? I beg you to try it, it so ... man I don't know, just TRY IT :D

I admit, this next wallpaper, isn't exactly my brightest hour in wallpaper design, but some of you might actually like it. So I give you the Geometry wallpaper:
If you though the Tree wallpaper was simple, check this out. It is almost as simple as wallpaper can be. The fun story here was that i found it in a folder of a software I was supposed to package, so I can't remember when I've created it. I can't tell you much about him, so I will just say it is S-I-M-P-L-E and leave it to you to judge it :P

Oh man, you can't imagine how good I feel now, after I'm beyond the "Geometry" thing-y, phew. So this next wallpaper is definitely to warm things up. Ready or not here comes my Ubuntu-ish wallpaper:
It sticks to the new Ubuntu Light look and feel - aubergine and orange colours and dotty background. Also as you might have noticed it has the good old bubbles, which make everything look better. The light and darkening effects on the background add extra gloss and some weird 3D feeling to it. So my word for this one would be warm. For those of you who love Ubuntu (like me), this would be a great choice. ... And one more thing - this wallpaper looks stuning with Unity :)

Now it's time to remember the keyword that is always associated with the term"Open Source" - Freedom. It's time to DUEL (too much Yu-Gi-Oh) ... anyway, like I always saying it's time to present you the Freedom wallpaper:
The one thing this wallpaper is not is simple, it is in fact quite the other way around, it is cluttered, but in a good way. The grey background and the chaotic red splatters give it very urban feeling. The 3D looking "Freedom" text and it's almost covered reflection add more the the urban look and feel. It is probably the most unique of all my wallpaper I've posted here to date. I would recommend to try it, some of you might not like it, but others are bound to love it.

Almost at the end. But there are still two more to go, so here is the first one - the amazing Ubuntu stripes wallpaper:
This wallpaper might be just a simple modification on the default Gnome 3 Stripes wallpapers, but it is still one heck of a good wallpaper. I was inspired to created by this OMG! Ubuntu! article because the modification there wasn't as good as it could be, so I fired up and came up with this wallpaper, which is just lovely. I've been using it as my wallpaper for quite some time and trust me this means a thing or two :P

Ahhh, we are at the very end of the article, but I saved the most pink wallpaper for last. First I have to say that I hated myself while creating and writing the tutorial for that wallpaper, but I must say a few words for it too. So here goes - the Girlie wallpaper:
Ok, for start it is just biased pink, but that comes as no surprise, because you know - it's name is "Girlie" :D Man, I don't and I won't talk about this pink thing, it is just PINK (as you MIGHT have noticed). So please, if you are a guy - do not, I repeat DO NOT use it! If you are a girl - well than have fun using it.

So I guess all I have ton say now is "Bye, bye" or something similar, but because I'M COOL you want get "Bye, Bye" from me :D ... See ya :D
[...]

Last week we saw how data is stored in the memory. If you've missed it, read it here. The data we dealt with was mostly of integral type: mainly integers, char, short and long. Today we'll see how floating point data is handled at the low level memory. This is done by considering the float datatype.

We know an integer 5 in a 32 bit integer is stored in the memory as :

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1

Consider a floating point number, say, 5.5. We'd have to develop a mechanism to store the fractional part as well as the integral part. As we know in binary representation,

5.5 = (101.1)2

Thus we need to set our memory block in two parts(as far we understand right now) - one block for the integral part and one for the fractional. Hence, the following could be done :

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0
< --------------- Integral Part ------------------------------------ >|<- Fractional Part- >

Thus all we have to do is convert the number into its decimal representation and fill the integral and fractional parts in their respective blocks.
More examples :

7.5

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0
< ------------------------------- Integral Part --------------------- >|< -Fractional Part - >

3.5

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0
< --------------- Integral Part ----------------------------------- >|< -- Fractional Part-- >

However, it is necessary to note that just one byte cannot represent the fractional part accurately enough. Hence the IEEE came up with the following format.

1 or 0






























|< ----------- exp --------- >|< ------------------- 1.xxxxxx------------------------ >;

In this format we have to take the binary equivalent then write in the standard scientific form using base 2. An example would make this clear.

Ex: 15.510 = (1111.1)2

1111.1 should written as 1.1111 x 23

Once this is done, we ought to remember that

exp = (power of 2) + 127.

In this case, exp = 130

And the 1.1111 we got is equivalent to 1.xxxxx...

Thus xxxxxx... = 111100....(filing the rest with zeros)

0 1 0 0 0 0 0 1 0 1 1
1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|< ----------- exp --------- >|< ---------------------- 1.xxxxxx--------------------------- >

Here is a C code to demonstrate this :

#include <stdio.h>

void DecimalToBinary(char *b,long int d,int nbits)
{
int testbit = 1,i=0,ctr = 0;
testbit = testbit << nbits-1;

while(i<(nbits+nbits/8))
{
if(d & testbit)
{
b[i++] = '1';
}

else
{
b[i++] = '0';
}

ctr++;
if(ctr == 8)
{
ctr = 0;
b[i++] = ' ';
}
d = d << 1;
}

b[i] = '\0';
}


int main()
{
char bin[100];
long int *lptr;
float num = 15.5;
float *fptr = & num;
lptr = (long*) fptr;
DecimalToBinary(bin,*lptr,32);
printf("Float point number : %f\n",num);
printf("IEEE format : %s",bin);
return 0;
}


















The function DecimalToBinary() simply converts an integer to binary form and stores in a string.
Additionally it displays in blocks of 1 byte.

The lines that are relevant to our discussion are in the main().

long int *lptr;
float num = 15.5;
float *fptr = & num;
lptr = (long*) fptr;

What we do here is typecast the address of float variable 'num' to long*. Here, only the pointer is cased and not the data itself. Thus the format of float is preserved. By typecasting we instruct the compiler to treat the same memory location like a long int (long because 4 bytes). We send this number to our DecimalToBin().


Lastly, we need to make things clear about what happens when an int variable is assigned to a float.

int i= 5;
float f=i;
printf(“%f”,f);

Here we better not confuse ourselves with all the formatting we learnt. Ouput would still be 5. What happens at line 2. is '5' is formatted accordingly and stored in the memory.

Consider another piece of code.

Int I = 37;
float f =*(float *)&i;

In these lines, again, we don't alter the data – we just typecast the address and assign to f. Now whenever 'f' is used, compiler treats it like a float. This also implies that whatever data be there, it will be treated according to the float format.

Int format.

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1


Float format.


0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1
| < ---------- exp --------- >|< -------------------- 1.xxxxxx------------------------------ >

Thus when evaluated in this form, value of 'f' is very small, often shown as 0.


[...]