Posts

My saturday :)

There's something satisfying abt saturdays.I really love the peacefulness and quietness. The world needs more peace like this. Until an idiot[my roommate] switched on the television for which he kept the volume too high (in such an way that ppl in the next flat can hear the programme) ! Idiot [ does not knew abt taste of early morning sleep ] . I woke up today [ saturday ] and wondered what should I do. *Sigh* My Saturdays are very routine. Wake up, eat, play some games, watch TV and then do the usual house chores. Yes, I'm domestically trained! :) I decided to watch a movie instead and ended up watching a program in Jaya TV ;). After that, it was back to washing clothes & cleaning. Then blogged something in PUZZLE Hahah...hmmmm..that's about it for my "eventful" Sunday

What is a view?

A view is a tailored presentation of the data contained in one or more tables (or other views). Unlike a table, a view is not allocated any storage space, nor does a view actually contain data; rather, a view is defined by a query that extracts or derives data from the tables the view references. These tables are called base tables. Views present a different representation of the data that resides within the base tables. Views are very powerful because they allow you to tailor the presentation of data to different types of users. Views are often used to: => provide an additional level of table security by restricting access to a predetermined set of rows and/or columns of a table => present the data in a different perspective from that of the base table => simplify commands for the user => isolate applications from changes in definitions of base tables => hide data complexity => express a query that cannot be expressed without using a view

I am the planner for my future ! do you ?

Little Changes , Big Changes Well, it may sound good , if ppl qouting " i am having the plan to do for my career ". But at real life are we meeting them as we dreamt ? May be our planning which don’t necessarily take the fact into account that LIFE can, and will, get in the way. i think i am back to the same problem , stick your head in the sand and ignore it all, the world changes so rapidly, like that u will be nowhere if u are not a " Proactive & Adaptable " person. Do we look out @ the microcosmic level, may b in positive for exempli gratia ; you get married, get promoted, or u cud even win a lottery. Here comes the word "Flexibility" ,the plan must be so flexible such that they can still be used when situation changes. i got a word to say here from my old schooling ;) . "oppurtunites are viewed as more important with the vision of hindsight" .The plan u made should not stop u from picking up the oppurtunity u have got now.It is impo...

Bits for u

Question: Does Java pass objects by reference or by value? Answer: Since it makes no sense to begin any argument without agreed upon defintions let's formally define our terms. I will use abstract pseudocode to keep the issue from being clouded by the idiom of a particular language. The source of my information is the book "Advanced Programming Language Design" by Raphael A. Finkel. For those unfamiliar with the term below an L-value is an expression that can appear on the left side of an assignment statement. It is basically a way to address where a variable is stored. Variables and other ways to refer to locations in memory are L-values. Most expressions are not L-values, e.g. ( x * 2 ) We assume the presence of a procedure named f that takes a formal parameter s. We call that function giving it an actual parameter g. The calling code: f( g ) The function: procedure f( s ) begin -- body of the procedure end; There are several parameter passin...

Conclusion

Parameter passing in Java - by reference or by value? Myth: "Objects are passed by reference, primitives are passed by value" Some proponents of this then say, "Ah, except for immutable objects which are passed by value [etc]" which introduces loads of rules without really tackling how Java works. Fortunately the truth is much simpler: Truth #1: Everything in Java is passed by value. Objects, however, are never passed at all . That needs some explanation - after all, if we can't pass objects, how can we do any work? The answer is that we pass references to objects. That sounds like it's getting dangerously close to the myth, until you look at truth #2: Truth #2: The values of variables are always primitives or references, never objects. This is probably the single most important point in learning Java properly. It's amazing how far you can actually get without knowing it, in fact - but vast numbers of things suddenly make sense when you gr...

Pass by value and pass by reference

With the exception of arrays and functions , C always passes arguments `by value': a copy of the value of each argument is passed to the function; the function cannot modify the actual argument passed to it: void foo(int j) { j = 0; /* modifies the copy of the argument received by the function */ } int main(void) { int k=10; foo(k); /* k still equals 10 */ } If you do want a function to modify its argument you can obtain the desired effect using pointer arguments instead: void foo(int *j) { *j = 0; } int main(void) { int k=10; foo(&k); /* k now equals 0 */ } This is sometimes known as `pass by reference' in other languages.

Now the details...

The problem we're facing here is statements like In Java, Objects are passed by reference, and primitives are passed by value. This is half incorrect. Everyone can easily agree that primitives are passed by value; there's no such thing in Java as a pointer/reference to a primitive. However, Objects are not passed by reference . A correct statement would be Object references are passed by value . This may seem like splitting hairs, bit it is far from it. There is a world of difference in meaning. The following examples should help make the distinction. In Java, take the case of public void foo(Dog d) { d = new Dog( "Fifi" ); } Dog aDog = new Dog( "Max" ); foo(aDog); the variable passed in (aDog) is not modified! After calling foo, aDog still points to the "Max" Dog! Many people mistakenly think/state that something like public void foo(Dog d) { d.setName( "Fifi" ); } shows that Java does in fact pass obj...