Microsoft sheds its 'Dr. Evil' costume

The problem with characterizing any kind of business, including information technology, as "war" is that it immediately polarizes the opinions not only of the war's practitioners but also of its observers. Once an enemy is formally declared, the concept of "If you're not with us, you're against us" becomes self-fulfilling.

Inevitably, since everyone's hands emerge equally bloodied, the original, unifying sense of polarity that marked the outset of the war, becomes lost. Any ethic or principal or qualitative substance that characterized one side from the other(s), is usually compromised. Before long, people forget what it was they were fighting for, or fighting against. And often, the war gets cancelled for lack of funds.
Courtesy:Beta News

7 reasons why Microsoft must buy Palm

1. Palm would be cheap and a much more sensible purchase than Research in Motion.
2. WebOS is a modern, mobile operating system.
3. Palm got sync right.
4. WebOS ships with a decent browser.
5. Google plans an event next week where the Nexus One may be launched.
6. Palm technology would generate excitement about Microsoft's mobile strategy.
7. Microsoft can immediately sell a branded phone without directly competing with hardware partners.

Usually, which is more important for DB2 system performance - CPU processing or I/O access?

Question:
Usually, which is more important for DB2 system performance - CPU processing or I/O access?I/O operations are usually most critical for DB2 performance (or any other database for that matter).

Answer:
I'm sorry but the answer is a firm It depends. Depending on various factors most MVS boxes run short on either CPU or I/O. These factors include workload time of day day of the week etc. A capacity planner could give you a better list but these are the things I've seen in the past.For example daytime is usually devoted to getting info into and out of the system using CICS. This usually involves many many short inquiries or updates. Generally in this case the CPU is most important as the many levels of caching can handle these requests.However once users go home the main use switches doing updates to handling those updates. A single update I/O during the day can drive many thousands of I/O's to process that update. As batch processes work with whole filesets cache hit rates go down and I/O becomes more important.If you could provide more specifics perhaps we could come up with a better answer.

Exec sql and End exec

Question:
why do we declare include in between exec sql and end exec and why cant we declare copybook in place of include. Is their any reason why we declare include only

Answer:
INCLUDE is a pre-compiler statement so it should be coded within the scope of EXEC SQL and END-EXEC.

INCLUDE is expanded during pre-compilation tome but COPY is expanded during compilation time and so declaration of host variable in copybook will produce errors during pre-comilation.

Answer2:
It all has to do with the sequence of compiling a program with imbedded SQL. It is important to understand that a COBOL program with SQL statements will actually go through 2 steps in the compile process - The Pre-Compile(SQL) followed by the COBOL compile.The EXEC SQL END-EXEC and everything in between are not COBOL statements and the COBOL compiler will not recognize them. The Pre-compiler step takes the EXEC SQL statements and converts them to the equivalent source code that COBOL will understand. The converted output from the pre-compile is then passed to the COBOL compiler in the 2nd step. It is for this reason that any data areas needed by the Pre-Compile step need to be included via a EXEC SQL INCLUDE statement.If you are also writing CICS COBOL with SQL then you will have 2 pre-compile steps for CICS and SQL followed by a COBOL compile step.

Top 3 things that microsoft couldn't explain

Hi All....
Found this one really Amazing!!..Thought u also wud enjoy!!!



There are three techy things that Microsoft couldn't Explain till now...what are those are they bugs?..
lollll
here goes the three


Bug 1:
An Indian found that nobody can create a FOLDER anywhere on the Computer which can be named as "CON". This is something funny and inexplicable? At Microsoft the whole Team, couldn't answer why this happened!TRY IT NOW, IT WILL NOT CREATE A "CON" FOLDER


Bug2
For those of you using Windows, do the following:
1.) Open an empty notepad file
2.) Type "Bush hid the facts" (without the quotes)
3.) Save it as whatever you want.
4.) Close it, and re-open it.
Noticed the weird bug? No one can explain!


Bug 3:
Again this is something funny and can't be explained? At Microsoft the whole Team, including Bill Gates, couldn't answer why this happened!It was discovered by a Brazilian. Try it out yourself?
Open Microsoft Word and type=rand (200, 99)And then press ENTERAnd see the magic?..!

jQuery Twitter Plugins – Add Tweets To Your Website

The plugin is so easy to use, customizable & unobstrusive.
Integrating social profiles with websites is a very popular trend as they represent a content.
For Twitter, if you have an account and want to add tweets to your website, these  jQuery Tweeter plugins will help you for sure:

Step 1:After inserting the jquery-twitter.js file to your website, simply create a divnamed "twitter" at where the feeds will be displayed.
Step 2:This jQuery code does the rest:
$(document).ready(function() {
    $("#twitter").getTwitter({
        userName: "jquery",
        numTweets: 5,
        loaderText: "Loading tweets...",
        slideIn: true,
        showHeading: true,
        headingText: "Latest Tweets",
        showProfileLink: true
    });
});

Email address validation using Javascript - PHP Scripts, CSS


In forms when using email ID fields it is a good idea to use client side validation along with your programming language validation. The following example shows how you can validate an email address for a form. The script is cross browser compatibe (works for all browsers).

<script language = "Javascript">

function emailcheck(str) {

var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)
if (str.indexOf(at)==-1){
alert("Invalid E-mail ID")
return false
}

if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
alert("Invalid E-mail ID")
return false
}

if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
alert("Invalid E-mail ID")
return false
}

if (str.indexOf(at,(lat+1))!=-1){
alert("Invalid E-mail ID")
return false
}

if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
alert("Invalid E-mail ID")
return false
}

if (str.indexOf(dot,(lat+2))==-1){
alert("Invalid E-mail ID")
return false
}

if (str.indexOf(" ")!=-1){
alert("Invalid E-mail ID")
return false
}

return true
}

function ValidateForm(){
var emailID=document.frmSample.txtEmail

if ((emailID.value==null)||(emailID.value=="")){
alert("Please Enter your Email ID")
emailID.focus()
return false
}
if (emailcheck(emailID.value)==false){
emailID.value=""
emailID.focus()
return false
}
return true
}
</script>

<form name="frmSample" method="post" action="#" onSubmit="return ValidateForm()">
<p>Enter an Email Address :<input type="text" name="txtEmail"></p>
<p><input type="submit" name="Submit" value="Submit"></p>
</form>



Tags:

How can you pass values from COBOL program to non-COBOL programs

If u want to pass values from jcl to cobol use "parm" parameter in the exec statement and in the cobol program declare the linkage section for the values to be passed.If u want to pass values from cobol to other non-cobol programs this can be done by call by reference or call by value.ex: call pgma using ws-name, ws-sex.

What is difference between oracle and sqlserver ?

Oracle:
1. Oracle runs on many platforms
2. Oracle includes IFS (Internet File System), Java integration
3. Oracle requires client install and setup (Not difficult, but very UNIX-like for Windows users)
4. Oracle is well rich with Index Options.
5. Oracle provides Materialized Views for performance improvements of Stored Data with multiple Tables.
6. Failover support in SQL is much, much easier
7.Oracle provides password complexity enforcement rule..
8.Connect with one Schema and can work with other schema.

SQl Server:
1.All DDL operations that are currently running on tables belong to database "Snapshot Isolation". "Snapshot Isolation" queries are prohibited.
2.SQL requires a complex setup of ROLLBACK Segments and Transaction Level use on it.
3.SQL has just BTREE Index while compare to Oracle.
4.SQL has limitations using Materialized Views.
5.SQL Analysis Services is included (A very powerful OLAP server)
6.SQL is ANSI-SQL '92 compliant, making it easier to convert to another ANSI compliant database, theoretically anyway (truth is every database has proprietary extensions). Oracle is generally more proprietary and their main goal is to keep their customers locked-in.

What are different types of process in jcl?

The Different Types of Process in JCL are
1. premap process
2. response process

What are the Applet's Life Cycle methods? Explain them?

* init() method - called when an applet is first loaded. This method is called only once in the entire cycle of an applet. This method usually intialize the variables to be used in the applet.
* start( ) method - called each time an applet is started.
* paint() method - called when the applet is minimized or refreshed. This method is used for drawing different strings, figures, and images on the applet window.
* stop( ) method - called when the browser moves off the applet's page.
* destroy( ) method - called when the browser is finished with the applet.

Steps for connecting to the database using JDBC

Using DriverManager: 
1. Load the Driver class using class.forName(driverclass) and class.forName() loads the driver class and passes the control to DriverManager class 
2.DriverManager.getConnection() creates the Connection to the databse 
 
Using DataSource. 
DataSource is used instead of DriverManager in Distributed Environment with the help of JNDI. 
1. Use JNDI to lookup the DataSource from Naming service server. 
2. DataSource.getConnection method will return Connection object to the database

When would you use a JDBC-ODBC Bridge?

Answer:
When ever someone wants to access microsoft oriented databases such as MS Access MS SQL server you have to use the JDBC-ODBC bridge. In general it is recommended not to use this type of bridge

What is the difference between a Driver and a DataSource (in Java JDBC)?

Driver is a software that know how to talk with actual database.while datasource is a database where data is store

What is hybernate and spring?

Hibernate offers persistence and OR(Objet-Relational) mapping for Java/J2EE applications helping them improve performance and scalability.Spring is a light-weight Java framework which paves the way to write faster applications without App Server (or EJB etc.)There are a plenty of good books on these subjects. Following the most notable amongst them:Hibernate in Action by Christian Bauer, Gavin King (Hanning)Better, Faster, Lighter Java by Justin Gehtland, Bruce A. Tate ( O'Reilly)

What is Connection Pooling?

With servlets, opening a database connection is a major bottleneck because we are creating and tearing down a new connection for every page request and the time taken to create connection will be more.Creating a connection pool is an ideal approach for a complicated servlet. With a connection pool, we can duplicate only the resources we need to duplicate rather than the entire servlet. A connection pool can also intelligently manage the size of the pool and make sure each connection remains valid. Anumber of connection pool packages are currently available. Some like DbConnectionBroker are freely available from Java Exchange Works by creating an object that dispenses connections and connection Ids on request.The ConnectionPool class maintains a Hastable, using Connection objects as keys and Boolean values as stored values. The Boolean value indicates whether a connection is in use or not. A program calls getConnection( ) method of the ConnectionPool for getting Connection object it can use; it callsreturnConnection( ) to give the connection back to the pool

Differences Between Abstract Class and Interface

Abstract class:

Abstract class must have at least one abstract method. 
Abstract keyword must be used for all the methods.
Abstract class must have subclass.



Interface: 

Inheritance is possible in interface.
Variables value must be defined in interface.
Many interface can be implemented by a single class.
Methods can be defined in interface and used in class.



Abstract classes are used when they have some sharable implementations and some specific methods left to subclasses to implement. Interface is used when there are no sharable implementation and the implementation changes frequently.

Abstract class can have methods which are abstract or not abstract. All methods of interface should be implemented unless the implementation is an abstract class.

Abstract class can be subclassed interface class can be implemented

Abstract Class or Method


Question:
Can we make use of "this" keyword reference inside a abstract method or Abstract Method?
Answer:
Yes You Can do that
For Example:
public abstract class TestExample{

private String exampleid;

private String examplename;

public TestExample(String exampleid ,String examplename)

{

this.exampleid= exampleid;

this.examplename= examplename;

}

//public gettors and settors

public abstract void scheduleTest();

}


public class JavaTestExample extends TestExample

{

private String typeName;

public JavaTestExample(String exampleid, String examplename, String typeName)

{

super(exampleid, examplename);

this.typeName =typeName;

}

public void scheduleTest()

{

//do Stuff

}

}



A class has a constructor so that when an instance of the Class is created
the fields of the class can be setup to a initial valid state.

Abstract classes define partial implementation of a public contract. Which
means that it may implement some of the methods and contains partially
implemented methods that are marked abstract.

Since abstract classes can have partial implementation and such partial
implementation can include fields of the class a constructor becomes necessary
so that those fields are initialized to a valid default state when they are
created thru the constructor of their concrete subclasses.

All abstract class are not pure abstract partially they are. So if you
need a pure abstract class go for an Interface.

JMS Interview Questions

JMS Interview Questions coming soon.....

JDBC Interview Questions

JDBC Interview Questions coming soon...

JSP Interview Questions

JSP Interview Questions Coming soon.....

Websphere Interview Questions

Websphere Interview Questions Coming Soon...

Struts Interview Questions

Struts Interview Questions Coming Soon...

J2EE Interview Questions


1)What is J2EE?

2)What is the J2EE module?

3)What are the components of J2EE application?

4)What are the four types of J2EE modules?

5)What does application client module contain?

6)What does Enterprise JavaBeans module contain?

7)What does resource adapt module contain?

8)How many development roles are involved in J2EE application?

9)What is difference between J2EE 1.3 and J2EE 1.4?

10)Is J2EE application only a web-based?

11)Are JavaBeans J2EE components?

12)Is HTML page a web component?

13)What is the container?

14)What is the web container?

15)What is the thin client?

16)What are types of J2EE clients?

17)What is deployment descriptor?

18)What is the EAR file?

19)What are JTA and JTS?

20)What is JAXP?

21)What is J2EE Connector?

22)What is JAAP?

23)What is Model 1?

24)What is Model 2?

25)What is Struts?

26)How is the MVC design pattern used in Struts framework?

27)Do you have to use design pattern in J2EE project?

28)Is J2EE a super set of J2SE?

29)What does web module contain?

30)What APIs are available for developing a J2EE application?



Core Java Interview Questions

Coming soon........

How to Convert HTML page into Image

U can convert Static URL to HTML code( HMTL content).
public String URLReader(String myurl) throws Exception {
//System.out.println("inside util");
String returnLine = "" ;
try{
String inputLine = "" ;
if(myurl != null && !myurl.equals(""))
{
URL url = new URL(myurl) ;
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream())) ;
while ((inputLine = br.readLine()) != null)
{
returnLine=returnLine+inputLine;
}
br.close();
}
}catch(Exception e)
{
//throw e;
}
return returnLine;
}

Java Architecture Diagram

Java Virtual machine-JVM Internal Architecture


To understand the Java virtual machine you must first be aware that you may be talking about any of three different things when you say "Java virtual machine." You may be speaking of:
  • the abstract specification,
  • a concrete implementation, or
  • a runtime instance.
The abstract specification is a concept, described in detail in the book: The Java Virtual Machine Specification, by Tim Lindholm and Frank Yellin. Concrete implementations, which exist on many platforms and come from many vendors, are either all software or a combination of hardware and software. A runtime instance hosts a single running Java application.Each Java application runs inside a runtime instance of some concrete implementation of the abstract specification of the Java virtual machine. In this book, the term "Java virtual machine" is used in all three of these senses. Where the intended sense is not clear from the context, one of the terms "specification," "implementation," or "instance" is added to the term "Java virtual machine".

The Architecture of JVM

J2EE Tutorial-An Introduction


The Java language is such that it allows cross-platform communication between multiple kinds of devices. For example, a programmer can develop Java code on a desktop computer and expect it to run on other computers, routers, and even mobile phones, as long as those devices are Java-enabled. This portability is described by the Sun acronym WORA, which stands for "Write once, run anywhere." A large number of mainframes, computers, mobile phones, and other electronic devices operate using the Java Platform.
The 2 in the acronym J2EE stands for Version 2. As with many software applications, J2EE is Java Platform Version 2. Actually, the number 2 is often dropped nowadays, so J2EE becomes Java EE. Traditionally, though, it's still J2EE.
Now, on to the EE. It stands for Enterprise Edition, which is a powerful form of the Java Platform. Sun has created three editions so far. The most precise is the Micro Edition, which is used for mobile phones and PDAs. Following form, this can be abbreviated as Java ME.
The middle edition is the Standard Edition, which can run on mobile devices, laptops and desktop computers. The abbreviated name of this edition is Java SE. Building our way up the pyramid, we come at last to the Enterprise Edition, which includes all the functionality of the Micro Edition and the Standard Edition and also features routines and subroutines designed specifically for servers and mainframes.