Rahul :: Blog


September 08, 2008

 
There's big news in Google's recent release of Chrome and it's a perspective you might not have considered.

Google may be pitching Chrome as a super-duper browser, but it's really showing off its shiny, new operating system. Remember, each of Chrome's tabs is a separate window--and while you might see each window displaying a Web page, Google's thinking about applications.

This is a direct attack on Microsoft -- and I think Microsoft is worried. That's because a small kernel on your local system could boot you into directly into Chrome, or a server-based operating system, and you could start working sans Windows.

This isn't what happens right now, but I'll bet it's Google's ultimate plan. That's a good thing, because I'm not wild about Chrome as a browser. Read Chrome? I Really Want To Love Ya for my perspective.

Head in the Clouds
The idea is cloud computing, where applications and data reside on servers, and it's taking hold. (See Zoho Adds Google Docs-like File Management and Working with Google Docs, part 1 and part 2.)

I know what you're thinking: Everything online? That's crazy. That's what I used to think, too.

Give Me a Fast Pipe
I remember Microsoft showing off a prerelease version of Windows 95 at a users group I used to manage. The presenter had an intriguing idea: Instead of doing research using Microsoft's CD-based encyclopedia program, Encarta, just reach out to Encarta on the Internet for fresh, dynamic data. Ditto for Word's connection to the Net.

The audience laughed -- so did I -- because few people had broadband; most were still suffering with dialup.

So cloud computing may be pie-in-the-sky right now, but five years down the road, try to visualize everyone having a steady, reliable, and super-fast broadband connection. You might not be laughing.

Worried that you can't work if you're kicked offline? "One important aspect to cloud computing," my buddy Paul Corning, a smart guy, said, "is that Chrome's Gears means you don't have to have continuous broadband access, and you can still work with browser-based applications when the Net's down." That's not new, either. Read Google Gears - Offline Functionality for Web Apps that explains how it works.

Google's OS Announcement
Google all but announced Chrome as an operating system in its recent blog entry, "A fresh take on the browser." In the third paragraph, the writers said:

"We realized that the web had evolved from mainly simple text pages to rich, interactive applications and that we needed to completely rethink the browser. What we really needed was not just a browser, but also a modern platform for web pages and applications, and that's what we set out to build." [Emphasis mine.]

  also read Google's Chrome aims to kill Windows, make Web the OS of choice. [Hat tip to WinPatrol's Bill.]

I encourage you to read Google's 38-page, Doonesbury-like comic that describes Chrome. Fair warning: I ran out of steam every so often -- some of the ideas forced me to do a little thinking. But stay with it -- the ideas and concepts pick up speed. And if you read between the lines you'll see where Google's going.

Keywords: chrome, google, google chrome

Posted by Anshul Malik | 0 comment(s)


August 19, 2008

Hi,

please anyone how can i upload the files to my files and then show it only to my friends in my community.

Thanks

Posted by Edutogether Help - Rahul | 0 comment(s)


July 11, 2008

There is a new breakthrough and we can now expect our internet getting 100 times faster. Scientists at University of Sydney have taken four gruesome years to develop it but now, due to a small scratch on a piece of glass they say our internet is going to be faster than current Telstra networks.

The scratch means we will have almost an instantaneous access to the Internet which will be error-free anywhere in the world. 

"This is a critical building block and a fundamental advance on what is already out there. We are talking about networks that are potentially up to 100 times faster without costing the consumer any more," says Federation Fellow Professor Ben Eggleton, Director of CUDOS, based within the School of Physics at the University of Sydney.

Eggleton, whose team beat their deadline by a year, says that up until now information has been moving at a slow rate but optical fibres have a huge capacity to deliver more. "The scratched glass we've developed is actually a Photonic Integrated Circuit," he says.

"This circuit uses the 'scratch' as a guide or a switching path for information - kind of like when trains are switched from one track to another - except this switch takes only one picosecond to change tracks. This means that in one second the switch is turning on and off about one million million times. We are talking about photonic technology that has terabit per second capacity."

This initial demonstration proves it is possible to achieve speeds 60 times faster than current Australian Networks. With further development, the process is likely to produce even faster results.

"Currently we use electronics for our switching and that has been OK but as we move toward a more tech-savvy future there is a demand for instant web gratification. Photonic technology delivers what's needed and, more importantly, what's wanted."

Keywords: cudos, fast internet, scratch glass, university of sydney

Posted by Anshul Malik | 0 comment(s)


July 10, 2008

Pointers and references

C++ can have three kinds of variable, leading to three kinds of assignment, passing of arguments to functions, and returning values from functions. From C it inherits value and pointer variables.

Value variables

Value variables are declared with a plain syntax, preceding the name of the variable with the type (or class) name. For example:
int i1;
float sum_of_money;
Graphic g1, g2;
Telescope t1;
where int and float are examples of base types, and Graphic and Telescope are names of classes already declared.

Pointer variables

Similarly:
int* p1;
float* pointer_to_sum_of_money;
Graphic* pG1, pG2;
Telescope* pt1;
declare pointer variables of the same types.

In order to be useful, a pointer variable must be made to point to an existing object. This can be done by initialization:

int* p1 = &i1;
Graphic* pG1 = &g1;
or by assignment:
pG2 = &g2;
pt1 = &t1;
The ampersand (&) is the "address-of" operator that comes from C.

Pointers may also be initialized or assigned through the new operator. They can be used in parameter lists as well as as return types.

 

Reference variables

C++ has a third kind of variable which operates like a pointer but with a value-like syntax. To declare a reference variable, we use &, not *:
int& ri1;
Graphic& rG1;
Telescope& rt1;
The best way to think of reference variables is as aliases, i.e. a reference variable adds a name to an existing object. For this reason, "free" reference variables, such as the ones above are not allowed unless initialized:
int& ri1 = i1;
Graphic& rG1 = g1;
Telescope& rt1 = t1;
Now ri1 is another name for the object i1, rG1 for object g1 and rt1 for object t1. References are however allowed as class members (as long as they are initialized by some constructor), as parameters, and as return types.

One advantage of references over pointers is a simpler syntax. Compare the two "swap" functions below:

void pswap(int* pi1, int* pi2) {
int* ptemp = pi1;
*ptemp = *pi1;
*pi1 = *pi2;
*pi2 = *ptemp;
}
called with:
int i1 = 12, i2 = 20;
pswap(&i1, &i2);

void rswap(int& ri1, int& ri2) {
int temp;
temp = ri1;
ri1 = ri2;
ri2 = temp;
}
called with:
int i1 = 12, i2 = 20;
rswap(i1, i2);
Both pswap and rswap produce the same result - the swapping of values in i1 and i2.

In theory the reference variable can replace most uses of pointers, but in practice, pointers are still used, especially with dynamic allocation.

Keywords: Pointers, references

Posted by C/C++ Projects - Rahul | 0 comment(s)


June 02, 2008

Does anyne know how to add the favorites from IE to the bookmark section of this site??

thanx

 

 

 

 

Posted by Edutogether Help - minku | 1 comment(s)


Friend Function : As we know, private class members can not be accessed from outside the class. By using private class members, we can reduce the possibility of a program misusing a member's value, since the program must access the class members using an interface function. Sometime, we would like two classes to share a particular function. In such situation, C++ allows the common function to be made friendly with both classes, thereby allowing the function to have access to the private data of these classes. Such a function need not be a member of any of these classes.

To make an outside function 'friendly' to a class, we have to simply declare this function as a friend of the class. The function declaration should be preceded by the keyword friend. While the function definition does not use either the keyword friend or scope resolution operator (::). The function that are declared with the keyword friend are known as friend functions. A function can be declared friend in any number of classes.

A friend function possesses certain characteristics :

  • It can be declared either in the public or private part of a class without affecting its meaning.
  • Usually, it has objects as arguments.
  • Its scope is not limited to the class in which it has been declared as friend. It can not be called using the object of that class. It can be invoked like a normal function without the help of any object.
  • Unlike the normal member functions, it can not access the member names directly. It has to use an object name and dot membership operator with each member name.

Example,

#include <iostream.h>

class sample

{

   int a;

   int b;

   public :

      void setvalue( int al, int bl)

     {

        a = a1;

        b = b1;

     }

      friend float mean (sample s);  //friend declared

};

float mean(sample s)     //function definition

{

   return float(s.a + s.b) / 2;   //accessing private members


void main ()

{

   sample x;  //create an object x

   x.setvalue(25,40);

   cout  << "Mean Value : " << mean(x) << endl;

}

 

All the member functions of one class can be declared as friend functions of another class. In such a case,the class is called a friend class. This can be specified as follows:

class X;

class Z

{

   ......

   friend class X;  //all member functions of X are friends to Z

};

 

Constructors : These are special member functions that are used to initialize the objects, as soon as they are created. Thst is, you can create an object and simultaneously pass the value to the parameters of the object. The constructors should have exactly the same name as that of class of which they are members. The constructor function does not have a return value. They should be declared in public section. To understand how constructors are used, let's try the example of displaying the area of square by using constructors :

Example, 

class Square

{

   public :

   int dim;

   Square(int d);   //Declaring a Constructor Function

   {

      dim = d;

   }

   void DisplayArea()

   {

      cout << "The area of the square : "<<dim*dim;

   }

   void main ()

   {

      Square S1(10), S2(15);    //the constructor function will be called automatically

      cout << "The dimension of the square is : " << s1.dim;

      S1.DisplayArea();

      cout << "The dimension of the square is :" << s1.dim;

      S2.DisplayArea();

   }

 

The output of the program will be :

The dimension of the square is 10

The area of the square : 100

The dimension of the square is 15

The area of the square : 225 

 

Copy Constructor : It is used to declare an object and the values of these objects are initialized from other object. Note that a copy constructor takes a reference to an object of the same class. We can not pass the argument by value to a copy constructor.

Example,

#include <iostream.h> 

class Square

{

   int dim;

   public :

   Square(); 

   {  }

   Square (int I)

   {

       dim = I;

    }

   Square (Square & j)    //passing the argument through reference not by value

   {  dim = x.dim; } 

   void Display()

   {

        cout << dim;
        cout << "\n The area is : "<<dim*dim;

   }

}; 

main ()

{

      Square   Square1(10);

      Square   Square1(Square2);  //declaring a copy constructor

      Square Square3 = Square1;  //declaring a copy constructor

      cout << "\n length of square1 " ;

      Square1.Display();

      cout << "\n length of square2 " ;

      Square2.Display();

      cout << "\n length of square3 " ;

      Square3.Display();

 

}

 

The output is :

Length of square1 : 10

The area is : 100

length of square2 : 10

The area is : 100

Length of Square3 : 10

The area is : 100

 

Dynamic Constructors : They are used to allocate memory to objects at the time of their creation. Normally we can allocate fixed amount of memoryby using array but in many situations, we are not sure how much memory we need until runtime.  For example, space required to store the length of string entered by user.

In such case, we use 'new' operator. This operator obtains memory space from operating system and returns a pointer to its starting point. We can use 'new' operators in constructors to dynamically assign storage space when objects are created. 

 

Keywords: class, constructor, copy constructor, dynamic, friend function

Posted by C/C++ Projects - Rahul | 1 comment(s)


May 25, 2008

Function Calls

The program executes the function statements by calling the function.We can pass the information to the called function in two ways :

  • Call by Value : The following program demonstrates how the information is passed to the called function by passing the value of parameters. This program uses the function display_values to display the value of variables before and after the function call.

          ex.

          #include <iostream.h>

          void display_values( int a, int b)

          {

             a = 100;

             b = 200;

             cout << "The values within the function are : "<< a << "and" << b << endl << endl;

          }

          void main()

          {

              int x = 1001;

              int y = 2001;

              cout << " Before Function Call " << endl;

              cout << "The value of x and y is " << x << "and" << y << endl << endl;

              display_values(x,y);

              cout << " After function call " << endl;

              cout << " The value of x and y is "<< x << "and" << y << endl;
 

           }

 


The output is :

Before Function call

The value of x and y is 1001 and 2001

The values within the function are: 100 and 200

After function call

The value of x and y is 1001 and 2001

 

As you can see, the parameter values have been changed to 100 and 200 within the display-values functions. However, when the function ends, the values of the variables x and y within main() have not changed. Because when program pass a parameter to a function, C++ makes a copy of the parameter's valus and places the copy into a temporary memory location called stack. The function then uses the copy of the value. When the function ends, C++ discards the stack contents and any changes the function has made to the copy.

 

  • Call by Reference : In Call-By-Value, the called function does not have access to the actual variables in the calling program and only works on the copies of the values. This mechanism is fine if the function does not need to alter the values of the original variables in the calling function. Sometimes, we need to change the value of variables in the calling function. For example, in the bubble sort program, we compare two adjacent elements in the list and interchange their values if the first element is greater than the second. If a function is used for bubble sort, then it should be able to alter the values of variables in the calling program, which is not possible if the call-by-value method is used.

          Ex :

          #include<iostream.h>

          void display_values( int *a, int *b )  //creating pointers to type int

         {

              *a = 100;

              *b = 200;

              cout << "The values within the function are : "<< *a << "and" <<*b << endl << endl;

          }

          main (void)

          {

              int x = 1001;

              int y = 2001;

              cout << "Before function call " << endl;

              cout << " The value of x and y is " << x << and << y << endl << endl;

              display_values ( &x, &y );

              cout << " After function call " << endl;

              cout << " The value of x and y is " << x << "and" << y << endl;

              }

 

The output is :
 

Before function call

The value of x and y is 1001 and 2001

The values within the function are: 100 and 200

After function call

The value of x and y is 100 and 200

 

This is all about calling the functions in different ways. In next post, we will discuss about the various types of functions and their usage.

Keywords: call by reference, call by value, Function

Posted by C/C++ Projects - Rahul | 0 comment(s)


May 23, 2008

Object oriented programming is defined as a method of implementation in which programs are organized as cooperative collection of objects, each of which is an instance of some class.  Object based programming languages support the following features :

  • Data Abstraction
  • Data Encapsulation
  • Inheritance
  • Polymorphism

Now we will explain each one of them with examples :

Data Abstraction : "Abstraction refers to the act of representing the essential features without including the background details or explanations." It is the enforcement of a clear separation between the abstract properties of a data type and the concrete details of its implementation. The abstract properties are those that are visible to client code that makes use of the data type--the interface to the data type--while the concrete implementation is kept entirely private, and indeed can change, for example to incorporate efficiency improvements over time. The idea is that such changes are not supposed to have any impact on client code, since they involve no difference in the abstract behaviour.

For example, one could define an abstract data type called lookup table, where keys are uniquely associated with values, and values may be retrieved by specifying their corresponding keys. Such a lookup table may be implemented in various ways: as a hash table, a binary search tree, or even a simple linear list. As far as client code is concerned, the abstract properties of the type are the same in each case.

Data Encapsulation : "Data encapsulation, sometimes referred to as data hiding, is the mechanism whereby the implementation details of a class are kept hidden from the user." The user can only perform a restricted set of operations on the hidden members of the class by executing special functions commonly called methods. The actions performed by the methods are determined by the designer of the class, who must be careful not to make the methods either overly flexible or too restrictive. This idea of hiding the details away from the user and providing a restricted, clearly defined interface is the underlying theme behind the concept of an abstract data type.

For example, to create a stack class which can contain integers, the designer may choose to implement it with an array, which is hidden from the user of the class. The designer then writes the push() and pop() methods which puts integers into the array and removes them from the array respectively. These methods are made accessible to the user. Should an attempt be made by the user to access the array directly, a compile time error will result. Now, should the designer decide to change the stack's implementation to a linked list, the array can simply be replaced with a linked list and the push() and pop() methods rewritten so that they manipulate the linked list instead of the array. The code which the user has written to manipulate the stack is still valid because it was not given direct access to the array to begin with.

The concept of data encapsulation is supported in C++ through the use of the public, protected and private keywords which are placed in the declaration of the class. Anything in the class placed after the public keyword is accessible to all the users of the class; elements placed after the protected keyword are accessible only to the methods of the class or classes derived from that class; elements placed after the private keyword are accessible only to the methods of the class.

Inheritance : "It refers to a way to form new classes (instances of which are called objects) using classes that have already been defined." The new classes, known as derived classes, take over (or inherit) attributes and behavior of the pre-existing classes, which are referred to as base classes (or ancestor classes). It is intended to help reuse existing code with little or no modification.

For example, manager is a part of class employee. Here class manager acquires the characteristics of class employee. There are many types of inheritance, some of which are listed below.

  • Single Inheritance : When a class is derived from only one base class, it is called single inheritance.
  • Multiple Inheritance : Inheritance in which a derived class has several base classes.
  • Multilevel Inheritance : The method of deriving a class from another derived class is called multilevel inheritance.
  • Hierarchical Inheritance : When the traits of one class are inherited by more than one class.
  • Hybrid Inheritance : A method of inheritence where a class is derived from several derived classes.


Polymorphism : "Polymorphism is the process of using an operator or function in different ways for different set of inputs given." More precisely, polymorphism (object-oriented programming theory) is the ability of objects belonging to different types to respond to method calls of the same name, each one according to an appropriate type-specific behavior. The programmer (and the program) does not have to know the exact type of the object in advance, so this behavior can be implemented at run time (this is called late binding or dynamic binding).

It means that if class B inherits from class A, it doesn’t have to inherit everything about class A; it can do some of the things that class A does differently.means that if class B inherits from class A, it doesn’t have to inherit everything about class A; it can do some of the things that class A does differently.

 

Keywords: class, data abstraction, data encapsulation, inheritance, object oriented, polymorphism, programming

Posted by C/C++ Projects - Rahul | 0 comment(s)


January 23, 2008

hey i wanna add videos in my profile page.. how do i go about doing it?

Posted by Edutogether Help - michael dcosta | 1 comment(s)


does anyone know about RSS and Feeds?

Keywords: feeds, RSS

Posted by Edutogether Help - michael dcosta | 1 comment(s)


Back