মঙ্গলবার, ৩ ডিসেম্বর, ২০১৩

Cassandra 2.0: Big data distributed database

The Apache Cassandra database 2.0.3 has been released. As a vastly scalable open source NoSQL database, Cassandra is perfect for maintaining huge lists of structured, semi-structured, and unstructured data with maximum flexibility and fast response times . It works across multiple data centers and the cloud and delivers linear scalability and performance. Once Cassandra completes storing data it will survive permanently, even if the server is killed or crashes or loses power. So , it does not allow even a single point of failure.


Being NoSQL database , Cassandra has its own mechanism  for querying named Cassandra Query Language (CQL) which is a SQL (Structured Query Language)-like language for querying Cassandra. It's data model offers an index on column values for efficient querying just as like as SQL and you define tables, with columns and associated data types. However, an important difference is that since Cassandra is designed for distributed system, it emphasizes Denormalization more than Normalization and Joins, and provides tools like collections to support this.

Its logs structured storage engine avoids random i/o and  it has powerful built-in caching.You can read more about there in here
As Netflix users says "I can create a Cassandra cluster in any region of the world in 10 minutes. When marketing guys decide we wan to move into a certain part of the world , we'er ready ". Lot's of big companies like  Netflix, eBay, Twitter , Reddit etc are using Cassandra 

So why not you ? 

 

বুধবার, ২০ নভেম্বর, ২০১৩

Firefox has launched its new Australis Interface with some awesome look

Firefox has landed  the next iteration of the Firefox UI Firefox Nightly. Though its not finished yet and need some polishing  , its free for download and testing for end user.The latest Nightly build of Firefox version 28 is the first complete implementation of the new interface's tabs and top menu behavior.

As Firefox community said ,  Australis is the most beautiful visual design yet by Firefox which removes the rectangular tabs of the current Firefox and introduce curved tabs that fade into the background when not selected. It has also given a clear and streamlined look of the toolbar for the ease of touch screen user across different devices. Thus giving your browser use experience to a more customizable and easier way according to user's likings by keeping the consistency and unification.



Australis has brought a significant change by disappearing the dedicated menu bar by adding a menu at the right-hand side and a move toward icons over text menus.The "streamlining" of the Downloads toolbar button doubles as a download progress bar when a download is active.


A "Customize and Control" button is added on the far right side of the browser's toolbar which is quite familiar to  Google Chrome users and it  provides quick access to basic features like cut, copy and paste, printing, and history in a form that looks like it's optimized for touch.
Mozilla says Australis addd a more extensible interface model which will solve the dilemma to add new features while continuing to support browser add-ons and themes.
 

As per Firefix Community What’s landed in Nightly is enough for intrepid users to have a solid day-to-day experience .

মঙ্গলবার, ১৯ নভেম্বর, ২০১৩

How to make Windows your default boot-able OS when dual booting

After installing Ubuntu along with Windows Ubuntu becomes the default boot-able Operating System. However You can make Windows the default boot-able OS .
To do this you have to follow the following Commands :
Step 1 .Boot with your Ubuntu OS
Step 2. Open up a terminal and write : $ cd /boot/grub
Step 3. You have to edit the grub.cfg File of this folder.So, give the grub.cfg File write permission by : $ sudo chmod 777 grub.cfg
It will ask for your password . Give the password of your User .
( For the previous Ubuntu versions the grub file’s name is “menu.lst”  , so in that case write : $ sudo chmod 777 menu.lst )
Step 4. Now open the grub.cfg file with an editor . Write on the terminal : $ gedit grub.cfg
( For previous versions write $ gedit menu.lst)
Step 5. In the opened file you will find the list or menus which are shown during  boot time .
Your task is to cut and paste  your Windows boot option lines before the Ubuntu boot option lines . Be very much careful while doing this .
You will get some lines like followings  :

### BEGIN /etc/grub.d/10_linux ###
menuentry “Ubuntu, Linux 2.6.31-14-generic” {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    set quiet=1
    insmod ext2
    set root=(hd0,9)
    search –no-floppy –fs-uuid –set 90da62be-64e5-47f2-bc2c-0d9a62acdd82
    linux    /boot/vmlinuz-2.6.31-14-generic root=UUID=90da62be-64e5-47f2-bc2c-0d9a62acdd82 ro   quiet splash
    initrd    /boot/initrd.img-2.6.31-14-generic
}
menuentry “Ubuntu, Linux 2.6.31-14-generic (recovery mode)” {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    insmod ext2
    set root=(hd0,9)
    search –no-floppy –fs-uuid –set 90da62be-64e5-47f2-bc2c-0d9a62acdd82
    linux    /boot/vmlinuz-2.6.31-14-generic root=UUID=90da62be-64e5-47f2-bc2c-0d9a62acdd82 ro single
    initrd    /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry “Memory test (memtest86+)” {
    linux16    /boot/memtest86+.bin
}
menuentry “Memory test (memtest86+, serial console 115200)” {
    linux16    /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry “Windows 7 (loader) (on /dev/sda1)” {
    insmod ntfs
    set root=(hd0,1)
    search –no-floppy –fs-uuid –set 88569ab2569aa08c
    chainloader +1
}
### END /etc/grub.d/30_os-prober ###
The Menu to boot Windows (See the Italic Fonts) is written at the last of the list , that is why you were getting Ubuntu as default boot option. So just cut the whole paragraph for windows boot option(paragraph surrounded by ( ### BEGIN /etc/grub.d/30_os-prober ###  to  ### END /etc/grub.d/30_os-prober ###)and paste it before ubuntu’s boot option .
You will get something like following :
### BEGIN /etc/grub.d/30_os-prober ###
menuentry “Windows 7 (loader) (on /dev/sda1)” {
    insmod ntfs
    set root=(hd0,1)
    search –no-floppy –fs-uuid –set 88569ab2569aa08c
    chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/10_linux ###
menuentry “Ubuntu, Linux 2.6.31-14-generic” {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    set quiet=1
    insmod ext2
    set root=(hd0,9)
    search –no-floppy –fs-uuid –set 90da62be-64e5-47f2-bc2c-0d9a62acdd82
    linux    /boot/vmlinuz-2.6.31-14-generic root=UUID=90da62be-64e5-47f2-bc2c-0d9a62acdd82 ro   quiet splash
    initrd    /boot/initrd.img-2.6.31-14-generic
}
menuentry “Ubuntu, Linux 2.6.31-14-generic (recovery mode)” {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    insmod ext2
    set root=(hd0,9)
    search –no-floppy –fs-uuid –set 90da62be-64e5-47f2-bc2c-0d9a62acdd82
    linux    /boot/vmlinuz-2.6.31-14-generic root=UUID=90da62be-64e5-47f2-bc2c-0d9a62acdd82 ro single
    initrd    /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry “Memory test (memtest86+)” {
    linux16    /boot/memtest86+.bin
}
menuentry “Memory test (memtest86+, serial console 115200)” {
    linux16    /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
(In case of previous versions do the same at menu.lst file)
Step 6. Save the file and restart your PC

How to configure your grub after making a partition in your PC

Sometimes you can not boot in your PC after making a partiton . And you get stuck in a black window at the boot time .This happens because after making the partition in your Hard disk the location of grub from which the OS loads may change .

To solve this problem and to boot into your OS follow the next steps :
Step 1 : Press “e” (edit) at the start up screen when OS loads .
Step 2 : In the edit window watch the grub . Let , the grub says  : root(hd0,9)
Edit this number and Try with some other combination like : root(hd0,10)    and try to load from this modification .
Trial and error to get the real grub location from where you can boot .
Remember this real number .
Step 3 : Boot from an Ubuntu live cd
Step 4 : Open up a terminal and write : $ cd /boot/grub
Step 5 : You have to edit the grub.cfg File of this folder.So, give the grub.cfg File write permission by : $ sudo chmod 777 grub.cfg
It will ask for your password . Give the password of your User if any.
( For the previous Ubuntu versions the grub file’s name is “menu.lst”  , so in that case write : $ sudo chmod 777 menu.lst )
Step 6 : Now open the grub.cfg file with an editor . Write on the terminal : $ gedit grub.cfg
( For previous versions write $ gedit menu.lst)
Step 7 : Find the lines matched with your previous grub location (Let it was at root(hd0,9) or something like this ) and edit these lines with your real grub location . Say you found your real grub at root(hd0,10) . So replace root(hd0,9) with root(hd0,10)
Step 8 : Save the file and restart your PC .

Wish this time you can boot to your OS properly :)

JSF 2.0 and JBoss 4.2.0 Configuration Common Problems and Solutions for Begginers

I almost spent 3 days in creating a new project in Java Server Faces (JFS 2.0 ) in the  JBoss AS 4.2.0 .I made some very small mistakes but atlast after 3 days of hard work i understood the problems and now able to succesfully run a JSF 2.0 project in JBoss AS 4.2 .

Problem 1
ERROR [[/MyFirstJSF]] Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
java.lang.ClassCastException: com.sun.faces.config.WebConfiguration cannot be cast to com.sun.faces.config.WebConfiguration
at com.sun.faces.config.WebConfiguration.getInstance(WebConfiguration.java:170)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:161)
………………………………………………………………………………………………..
ERROR [StandardContext] Error listenerStart
ERROR [StandardContext] Context [/MyFirstJSF] startup failed due to previous errors ….
……………………..
This might give you 404 error in the browser .

Solution :
If are having this trouble you might have jsf-impl.jar library in your projects war file . You do not need to externally add jsf libraries in your project as jboss already has them included . Remove all the jsf libraries jsf-impl.jar  , jsf-api.jar , jboss-jsf.jar from your project’s war file .

Problem 2 :
I tried to include a Facelet in my project . But from the client page using ui:define no css or image was displayed . It seems like Facelet is not working .

Solution :
I was using JBoss 4.2.0 AS , I have to replace all the jsf libraries with some new ones . The new jsf-libs carries some extra features for JSF 2.0 version .

শুক্রবার, ২৫ অক্টোবর, ২০১৩

HTC One X personal Experience



IPhone 4S or HTC One X , has become the daily quarrel topic of me and my husband . He is a great fan of IPhone , whereas I am kind of sentimental about Androids . So , today I have decided to share with you my personal experience with my HTC One X.

I fall in love with this phone at my first sight just for its rounded piano-gloss sidewalls and the curved back . It has 1,280x720 pixel  Super LCD 2 display.Its  clear crystal screen display is the best display I have ever seen . It runs the Android 4.2.2 a quad-core processor, making it one of the faster smart phones.

I am not a big fan of  hybrid mobile phone(touch screen as well as too many Buttons to destroy my touch feelings) and HTC One X get rids of me from these . Well , it has only 2 buttons one for power and one for the volume management . It also has one Headphone jack and a Micro USB port for charging .The screen is scratch resistant too . 

HTC One X has Beats Audio™ feature which is a great news for Music crazy’s like me . This makes my life much more dynamic and I not only hear but also feel the music whenever I play games or I drive or I watch movie in my phone.  


Just  a few days ago my 3 years old niece cried to my sister to bought her a new  Phone with Camera . What she need is nothing but a mobile with a camera , what a demand !! Haha , After I bought my HTC One X I cannot resist myself from becoming a photographer ( ;) ) It has a 8-megapixel camera with Flash capability and the front camera is 1.3 MegaPixel , which is not that bad actually . The camera starts up less then a second and I don’t need to choose from video / image shot, I can not take both at the same time . What a pleasure !! 

The phone is small enough to seat inside your Jean’s pocket or Vanity Bags wallet with only 4.7inches, Its lighter too 130g . It’s Sleek, thin, lightweight and very comfortable in your hand .

You will get the perfect quality of your storage video and image pictures. It supports almost all major audio and video formats. My video and audio recording experience is nice too.

The Phone does not support any external storage and it has an internal storage of 32GB. 

There are some complains about the battery life of this device . I also feel the same , with a full charge of my phone I cannot carry more than 36 hours with heavy browsing. This area should be improved otherwise it’s a great device to use.


বৃহস্পতিবার, ২১ জুন, ২০১২

Project Euler : Problem 1 Solution

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.


<pre class="prettyprint">

public class Problem1 {
   
    public static void main(String args[]){
   
        System.out.println("\nTotal "+countNoOfMultipleOfThreeNFive(1000));
    }
    private static int countNoOfMultipleOfThreeNFive(int boundary){
    int count =0;
        for(int i =1;i<boundary;i++){
            if(checkIfDividible(i))
                count+=i;
         }
        return count;
    }
    private static boolean checkIfDividible(int n){
    if((n%3 ==0)||(n%5==0)){
        System.out.print(" "+n);
        return true;
    }
    return false;
       
    }
}
</pre>