Articles
Windows FAQ
Making your network more secure - Use a firewall - Windows Vista...
Making your network more secure - Run antivirus software on each...
User accounts FAQ - An unidentified program wants access to your...
Making your network more secure - General network security recom...
What is User Account Control? - Windows Vista Security - User ac...
Who's Online
13 user(s) are online (7 user(s) are browsing Forum)

Members: 0
Guests: 13

more...
   All Posts (Boch)


(1) 2 3 4 ... 10 »


What's Prototypes for JavaScript?
Just can't stay away
Joined:
2007/11/11 12:07
Group:
Registered Users
Posts: 100
Level : 9; EXP : 0
HP : 0 / 200
MP : 33 / 1192
Offline
What's Prototypes for JavaScript?

Objects have "prototypes" from which they may inherit fields and functions.


<script type="text/javascript">
function 
movieToString() {
return(
"title: "+this.title+" director: "+this.director);
}
function 
movie(titledirector) {
this.title title;
this.director director || "unknown"//if null assign to "unknown"
this.toString movieToString//assign function to this method pointer
}
movie.prototype.isComedy false//add a field to the movie's prototype
var officeSpace = new movie("OfficeSpace");
var 
narnia = new movie("Narni","Andrew Adamson");
document.write(narnia.toString());
document.write("
Narnia a comedy? "
+narnia.isComedy);
officeSpace.isComedy true//override the default just for this object
document.write("
Office Space a comedy? "
+officeSpace.isComedy);
</script>

Posted on: 11/20 14:16
Transfer the post to other applications Transfer


Question: Difference between a Java interface and a Java abstract class?
Just can't stay away
Joined:
2007/11/11 12:07
Group:
Registered Users
Posts: 100
Level : 9; EXP : 0
HP : 0 / 200
MP : 33 / 1192
Offline
Question: Difference between a Java interface and a Java abstract class?

Answer:

1. Methods of a Java interface are implicitly abstract and cannot have implementations. A Java abstract class can have instance methods that implements a default behavior.
2. Variables declared in a Java interface is by default final. A Java abstract class may contain non-final variables.
3. Memebers of a Java interface are public by default. A Java abstract class can have the usual flavors of class members like private, protected, etc..
4. Java interface should be implemented using keyword “implements”; A Java abstract class should be extended using keyword “extends”.
5. An interface can extend another Java interface only, an abstract class can extend another Java class and implement multiple Java interfaces.
6. A Java class can implement multiple interfaces but it can extend only one abstract class.
7. Interface is absolutely abstract and cannot be instantiated; A Java abstract class also cannot be instantiated, but can be invoked if a main() exists.
8. In comparison with java abstract classes, java interfaces are slow as it requires extra indirection.

Posted on: 11/13 13:35
Transfer the post to other applications Transfer


unescape(), escape()
Just can't stay away
Joined:
2007/11/11 12:07
Group:
Registered Users
Posts: 100
Level : 9; EXP : 0
HP : 0 / 200
MP : 33 / 1192
Offline
unescape(), escape()

These are similar to the decodeURI() and encodeURI(), but escape() is used for only portions of a URI.


<script type="text/javascript">
var 
myvalue "Sir Walter Scott";
document.write("Original myvalue: "+myvalue);
document.write("<br />escaped: "+escape(myvalue));
document.write("<br />uri part: "&author="+escape(myvalue)+""");
</script>

If you use escape() for the whole URI... well bad things happen.
<script type="text/javascript">
var uri = "http://www.google.com/search?q=sonofusion Taleyarkhan"
document.write("Original uri: "+uri);
document.write("
escaped: "+escape(uri));
v/script>

Posted on: 11/6 15:44
Transfer the post to other applications Transfer


Question: Does Java garbage collection guarantee that a program will not run out of memory?
Just can't stay away
Joined:
2007/11/11 12:07
Group:
Registered Users
Posts: 100
Level : 9; EXP : 0
HP : 0 / 200
MP : 33 / 1192
Offline
Question: Does Java garbage collection guarantee that a program will not run out of memory?


Answer:

No. Java Programs may use up memory resources faster than they are garbage collected. A Java program can create objects that are not subject to garbage collection.

Posted on: 10/30 17:52
Transfer the post to other applications Transfer


Java garbage collection
Just can't stay away
Joined:
2007/11/11 12:07
Group:
Registered Users
Posts: 100
Level : 9; EXP : 0
HP : 0 / 200
MP : 33 / 1192
Offline
Java garbage collection


Answer:

Garbage collection in Java is to discard objects that are no longer needed and to reclaim their resources. A Java object is subject to garbage collection when it is out of scope of the control flow of the program.

Posted on: 10/23 15:29
Transfer the post to other applications Transfer


C++ interviewe question,if you can work well, you will be hire at level 3 or above
Just can't stay away
Joined:
2007/11/11 12:07
Group:
Registered Users
Posts: 100
Level : 9; EXP : 0
HP : 0 / 200
MP : 33 / 1192
Offline
C++ interviewe question,if you can work well, you will be hire at level 3 or above.

I have interviewed several candidates specifically focusing on their C++ knowledge, and if there was one question that worked well to put peoples' knowledge of C++ on a gradient, it was this one:

Fix this memory leak as robustly as you can:

void doSomething()
{
Foo* pFoo = new Foo();
[do some stuff]
}

* +1 for putting delete pFoo at the end
* +2 for putting pFoo in a std::auto_ptr
* +3 for knowing what RAII is - the concept, if not the acronym
* +4 for mentioning exception-safety guarantees of the auto_ptr
* +5 for putting pFoo in a boost:shared_ptr
* +6 for knowing when a shared_ptr might not be freed.
* +7 for talking about garbage collection techniques to fix circular references

This always worked to show how long someone had been working with C++. This is one datapoint you can use to tell where you are in the scale of C++ knowledge.

Edit: I would recommend someone for hire at level 3 or above.

Posted on: 10/16 15:37
Transfer the post to other applications Transfer


Question: Java finalization
Just can't stay away
Joined:
2007/11/11 12:07
Group:
Registered Users
Posts: 100
Level : 9; EXP : 0
HP : 0 / 200
MP : 33 / 1192
Offline
Question: Java finalization


Answer:

Finalization is to give an unreachable Java object the opportunity to perform any cleanup processing before the Java object is garbage collected. It happens when the Java object’s finalize() method is invoked.

Posted on: 10/9 13:53
Transfer the post to other applications Transfer


decodeURI(), encodeURI()
Just can't stay away
Joined:
2007/11/11 12:07
Group:
Registered Users
Posts: 100
Level : 9; EXP : 0
HP : 0 / 200
MP : 33 / 1192
Offline
decodeURI(), encodeURI()

Many characters cannot be sent in a URL, but must be converted to their hex encoding. These functions are used to convert an entire URI (a superset of URL) to and from a format that can be sent via a URI.


<script type="text/javascript">
var 
uri "http://www.google.com/search?q=sonofusion Taleyarkhan"
document.write("Original uri: "+uri);
document.write("<br />encoded: "+encodeURI(uri));
</script>

Posted on: 10/2 14:35
Transfer the post to other applications Transfer


Can an unreachable Java object become reachable again?
Just can't stay away
Joined:
2007/11/11 12:07
Group:
Registered Users
Posts: 100
Level : 9; EXP : 0
HP : 0 / 200
MP : 33 / 1192
Offline
Question: Can an unreachable Java object become reachable again?


Answer:

Yes. It can happen when the Java object’s finalize() method is invoked and the Java object performs an operation which causes it to become accessible to reachable objects.

Posted on: 9/17 13:45
Transfer the post to other applications Transfer


What is new about Web services?
Just can't stay away
Joined:
2007/11/11 12:07
Group:
Registered Users
Posts: 100
Level : 9; EXP : 0
HP : 0 / 200
MP : 33 / 1192
Offline
What is new about Web services?

People have been using Remote Procedure Calls (RPC) for some time now, and they long ago discovered how to send such calls over HTTP.
So, what is really new about Web services? The answer is XML.
XML lies at the core of Web services, and provides a common language for describing Remote Procedure Calls, Web services, and Web service directories.
Prior to XML, one could share data among different applications, but XML makes this so much easier to do. In the same vein, one can share services and code without Web services, but XML makes it easier to do these as well.
By standardizing on XML, different applications can more easily talk to one another, and this makes software a whole lot more interesting.

Posted on: 9/10 14:13
Transfer the post to other applications Transfer



 Top
(1) 2 3 4 ... 10 »




Copyright © 2009 FYIcenter.com
Search
Main Menu
Login
Username:

Password:


Lost Password?

Register now!