Sunday, April 21, 2013

PROGRAMMING LANGUAGES RATING APRIL 2013

PROGRAMMING LANGUAGE RANKING APRIL 2013




Monday, March 4, 2013

about for loops and arrays...

About arrays and For loops in any language:


Syntax:

if(condition)                                                  for(initilization;condition;inc/dec)
{                                                                  {
                                                                                  //statements
//statements                                                  }

}
else
{

//statements

}

example for storing                                                 example for storing
a[0]=0                                                                   a[0]=5

a[1]=1                                                                   a[1]=4
a[2]=2                                                                   a[2]=3
a[3]=3                                                                   a[3]=2
a[4]=4                                                                   a[4]=1
a[5]=5                                                                   a[5]=0

-------------------------------------              -----------------------------------------------  
int a[6];                                                               int a[6];
                   
for(int i=0;i<6;i++)                                               for(int i=0,j=5;i<6 && j>=0;i++,j--)
{                                                                          {
   a[i]=i;                                                                         a[i]=j;
}                                                                          }
-------------------------------------           --------------------------------------------------




Saturday, March 2, 2013

How to extract bit ranges without using loop ?

How to extract bit range from an integer without using loop ?



lets see, how it will work for n = 27, i = 2, j = 6;



<< :  Left Shift Operator
>> : Right Shift Operator
&  : AND operator





Sunday, February 24, 2013

CAP Theroem

                       CAP THEOREM

what is CAP?

CAP means Consistency Availability and Partition tolerance

CAP theorem, also known as Brewer's theorem

This theorem is about database

This Theorem states that it is impossible for a distributed computer system to simultaneously provide all three i.e, the database cannot have consistency availability and partition tolerance at one


  • Consistency : all nodes see the same data at the same time
  • Availability :a guarantee that every request receives a response about whether it was successful or failed
  • Partition tolerance :the system continues to operate despite arbitrary message loss or failure of part of the system




At present world we see relational database i.e oracleDB,SQL SERVER,mySQL,DB2 etc,these database support only relation data in the form of tables but what about non-relational data i.e behavioral data 

what is behavioral data?

Data about an entity example consider that your searching in Google when you are logged in with Google account rater than keeping your account in data based(i.e relational one) they collect the data about what your are searching? so that when you are searching and when you are logged in,if you search the first preference will be given to the behavioral data of yours and so that no need to type the whole sentence again.

This type of data is useful for analysis business and people.

In NoSQL we can use 4 type of data:

Document store

The central concept of a document store is the notion of a "document". While each document-oriented database implementation differs on the details of this definition, in general, they all assume that documents encapsulate and encode data (or information) in some standard formats or encodings. Encodings in use include XML, YAML, and JSON as well as binary forms like BSON, PDF and Microsoft Office documents (MS Word, Excel, and so on). 

Different implementations offer different ways of organizing and/or grouping documents:
  • Collections
  • Tags
  • Non-visible Metadata
  • Directory hierarchies

Graph

This kind of database is designed for data whose relations are well represented as a graph (elements interconnected with an undetermined number of relations between them). The kind of data could be social relations, public transport links, road maps or network typologies, 

Key–value store

Key–value stores allow the application to store its data in a schema-less way. The data could be stored in a datatype of a programming language or an object. Because of this, there is no need for a fixed data model.

Column Family Stores
These were created to store and process very large amounts of data distributed over many machines. There are still keys but they point to multiple columns. The columns are arranged by column family.
For maintaining these database different vendors have different softwares

This NoSql is famous by this name BigData. 
After few days if you don't know about it,you may not be eligible for employment in database field.

Difference between the XML and Database ?


Is XML and DATABASE are same ?

Can I use XML instead of DATABASE ?

Extensible Markup Language (XML) and databases are two different methods for storing large amounts of data in an organized fashion. There are both similarities and differences between them. Determining which to use depends on your needs and may actually be a combination of both

Difference between the XML and HTML

XML was designed to transport and store data.
HTML was designed to display data.

Understanding XML

  • XML is a standardized method of describing information, or data, established by the W3C. It is a tag based language, similar to HTML, but using stricter standards. Unlike HTML, tags are not predefined - they can be established based on the users needs at design time.

Understanding Databases

  • Databases are composed of collections of data organized into tables, with data stored in rows and columns. The columns define the type of data to be stored, such as a purchase date and customer IDs, and each row contains an instance of that data. Databases are often relational, which means that different data in multiple tables may be related by a key value. For example, a customer ID may be in the purchase table and a customer table, holding the customer information in the latter, and the specific information on the purchase in the former.

Similarities

  • XML and databases are similar in that they are both structured methods of organizing data. Each can contain a key value associated with one or more instances of data items. In XML, this would be multiple tags with the same name, such as <product>item1</product><product>item 2</product>. In a database, this is represented by a unique value of some type, for instance the customer order number, and one row of data for each product.

Differences

  • XML stores all of it's data in an XML file, which can be created and designed in a simple text editor. No special tools are required. A database application generally stores data in a specific data file, possibly reducing portability. In addition, databases are a specific application which requires some type of installation and a knowledge of structured query language (SQL) to access.
    Overall, while both are good storage solutions, the determination of which is best depends on the type of data to be stored. According to IBM's analysis of XML and databases, XML is most suited for "document-like storage" of data with a "semi-structured" format. Data which is heavily based on standard database design techniques, such as entity-relationship diagrams, is better suited for databases.

Saturday, February 23, 2013

Difference between the C++ and JAVA ?

Difference between the C++ and JAVA ?
Difference between C++ and JAVA

This article mainly concentrate on the exploration of the power of the JAVA.

We can implement all the features which are present in the JAVA, in C++ also except the two features.

1. Security 
2. Platform Independence.

The main difference between the C++ and JAVA is SECURITY and PLATFORM INDEPENDENCE.

1. SECURITY :
                            SECURITY for any language means accessing its data, but which kind of data ?
 here the language security is accessing its PRIVATE data i.e., which is declared as PRIVATE.

In C++:
         Both C++ and JAVA are Object Oriented Programming languages, and both of them supports the feature i.e, Data hiding ( data is hided behind the object if you want to access those data you have to its object). This feature of the OOP is also called as security. 
But is C++ we can break this feature that means we can access those data without its object.

How ?

example:
class data
{
   private:

   int a;

   public:
   void showA()
   {
          cout<<"a value is:"<<a;
    }
};

void main()
{
     data d;

     int *ptr;
     //accessing address of the d
    ptr(int)=(int)&d;
     //print the value of before the assignment through the pointer.
     d.showA();  //probably you may get garbage value
    //assign value to 'a' through the pointer  
     *ptr=2;
     //now print the value
     d.showA(); //you will get output a value is :2
     
getch();
}

In JAVA:

Here actually there is no concept of 'pointers' so that you can't make access of the another variable illegally. So that JAVA is more secure.


2. PLATFORM INDEPENDENCE:
        PLATFORM independence means the program you have written should be run on all machines.

IN C++:
                What a compile does is it will convert the source language into the assembly level language. In the process of the conversion of these high level instructions into assembly level language it will convert according to the configuration of the machine (CPU registers and other other elements) So that if you run your final output in another system with different configuration means other CPU then it won't work because the CPU is different. So Platform dependent.

IN JAVA:

            The main Problem with C++ is if the processor is not the same as you developed in then it will not work. So we should have to develop code for common MACHINE (CPU). So in JAVA there is a machine which is software machine which is common wherever you get installed. I mean here we are providing a Virtual Machine to replace the problem of requirement of same MACHINE. This software Machine is called JAVA VIRTUAL MACHINE.

Only by these 2 reasons JAVA is powerful.
                       
This article is to the differentiate C++ and JAVA.
                                                                  
    
                                                                                                                  by
                                                                                                                  K.Partha Saradhi Reddy.
                                                                                                                  G.V.N.Yaswanth.
                                                                                                                  R.S.M.S. Vamsi Krishna.

For any queries mail us:  programmersband@gmail.com




            




             

Friday, February 22, 2013

which language is suitable for web development JSP or PHP or ASP or RIALS ON RUBY ?



Which language is best suited  for web development ?

Got confused with the programming language selection for the web development ?
         Among all of those the selection of programming language is difficult. Because you're familiar with all of those. The selection of the language for the web development is based on your requirement.

  •  If your requirement is to complete the project very fast then you have to choose ASP.NET.
                       That means if you want to complete your project within a small amount of time then you have to choose the ASP.net. But the hosting for ASP is very cost than the PHP. If you can pay, then you must choose the ASP.NET. At this time you don't have to bother about the money. Because, if you choose this you can get the ready-made script for everything. And another important factor is that very good developer flexibility. 
Benefits:
1. Programmer Flexibility.
2. Fast completion of Project.
3. Very good Script support.

but 
hosting cost is little high.

  • If your requirement is to complete the project at cheap and secure 

                                  That means if you want to complete your project at cheap and that too with high security then you should choose PHP. Because PHP offers high security and very cheap than other languages. And the database server MYSQL is also free. So you can choose it blindly to develop your project.

Benefits:
1. Fast development.
2. Easy to learn.
3. Platform independent.
4.Developer flexibility is high.
5. Finally it is free.

  • if your requirement is to build a more secure product then you have to choose the JSP.
                That means if you want to do a project using JSP means you're looking for a product that should be more secure. And another important thing is JSP hosting also little costly like ASP. You might think that it is open source so that it may be cheap. But the thing is, it is little costly for hosting.

Benifits:
1. Offers high security.

bBut
1. Complex to develop huge projects.
2. Hosting cost is high.
3. Handling is difficult.

               All these information is from analyzing the practical things that we have faced in the real time. So make your choice.

                                                           by
                                                           K.Partha Saradhi Reddy.
                                                           G.V.N.Yaswanth.
                                                           R.S.M.S. Vamsi Krishna.
     If you have any good experience then mail us.
                                     email_id: programmersband@gmail.com