Interview Tips Interview Tips, Interview Questions and Answers

3Feb/110

CreateTextFile in VBScript

Method: CreateTextFile
Description: Creates a specified file name and returns a TextStream object that can be used to read from or
write to the file
Use: Set objFile = objFolde.CreateTextFile(filename[, overwrite[, Unicode]])
Arguments: objFolder
Required. The name of a Folder Object previously instantiated.
filename
Required. A string expression that identifies the file to create
overwrite
Optional. Boolean value that indicates whether you can overwrite an existing file. The value is
True if the file can be overwritten, False if it can't be overwritten. If omitted, existing files are
not overwritten (default False).
unicode
Optional. Boolean value that indicates whether the file is created as a Unicode or ASCII file. If
the value is True, the file is created as a Unicode file. If the value is False, the file is created
as an ASCII file. If omitted, an ASCII file is assumed.

16Sep/100

Define LeaseTime, SponsorshipTime, RenewOnCallTime, LeaseManagePollTime in .NET

Terms related to lifecycle of a remoting object.

The LeaseTime property protects the object so that the garbage collector does not destroy it as remoting objects are beyond the scope of the garbage collector. Every object created has a default leasetime for which it will be activated. Once the leasetime expires, the object is eligible again for garbage collector and is eventually destroyed. Default value is 5 minutes.

Even though the leasetime of an object has expired, there still may be clients who would still need the remoting object on the server. In such cases the leasemanager keeps a track of such clients and asks them if they need the object and are ready to extend or sponsor the object to extend its existence. This is done through SponsorshipTime property, which is then based on the sponsor.

The RenewOnCallTime property defines the duration for which a remoting object's lease is extended if a sponsor is found. The default value is 2 minutes.

The LeaseManager class has a property PollTime, which defines the frequency at which the LeaseManager polls the leases. Default is 10 seconds.

29Jun/100

JavaScript & AJAX interview questions

1.  JavaScript is interpreted by _________

A.  Client

B.   Server

C.  Object

D.  None of the above

2.  Using _______ statement is how you test for a specific condition.

A.  Select

B.  If

C.  Switch

D.  For

3.  Which of the following is the structure of an if statement?

A.  if (conditional expression is true) thenexecute this codeend if

B.   if (conditional expression is true)execute this codeend if

C.  if (conditional expression is true)   {then execute this code>->}

D.  if (conditional expression is true) then {execute this code}

4.  How to create a Date object in JavaScript?

A.  dateObjectName = new Date([parameters])

B.   dateObjectName.new Date([parameters])

C.  dateObjectName := new Date([parameters])

D.  dateObjectName Date([parameters])

5.  The _______ method of an Array object adds and/or removes elements from an array.

A.  Reverse

B.   Shift

C.  Slice

D.  Splice

6.  To set up the window to capture all Click events, we use which of the following statement?

A.  window.captureEvents(Event.CLICK);

B.   window.handleEvents (Event.CLICK);

C.  window.routeEvents(Event.CLICK );

D.  window.raiseEvents(Event.CLICK );

7.  Which tag(s) can handle mouse events in Netscape?

A.  <IMG>

B.  <A>

C.  <BR>

D.  None of the above

8.  ____________ is the tainted property of a window object.

A.  Pathname

B.   Protocol

C.  Defaultstatus

D.  Host

9.  To enable data tainting, the end user sets the _________ environment variable.

A.  ENABLE_TAINT

B.   MS_ENABLE_TAINT

C.  NS_ENABLE_TAINT

D.  ENABLE_TAINT_NS

10.  In JavaScript, _________ is an object of the target language data type that encloses an object of the source language.

A.  a wrapper

B.   a link

C.  a cursor

D.  a form

11May/100

Explain about Serialization in .NET. Explain binary serialization and XML serialization

Explain about Serialization in .NET. Explain binary serialization and XML serialization

System.Runtime.Serialization namespace provides Serialization in .NET.
The IFormatter interface in the namespace contains Serialize and De-serialize methods that save and load data of a stream.
So we need stream as a container for the serialized object(s) and a formatter that serializes these objects onto the stream to implement serialization in .net.

Binary serialization is a mechanism that creates exact binary copy of the object onto the storage media by writing the data to the output stream such that it can be used to re-construct the object automatically.

XML serialization results in strongly typed classes with public properties and fields that are converted to a serial format for storage or transport. This XML stream conforms to a specific XML Schema definition language (XSD) document.

Explain why Serialization.

An object is stored in a file, a database or even in the memory. However, data to be transferred over a network needs to be in a linear form for which serialization and deserialization are used.

Advantage of serialization is the ability of an object to be serialized into a persistent or a non-persistent storage media and then reconstructing the same object later by de-serializing the object.

Remoting and Web Services depend heavily on Serialization and De-serialization.

Explain the components that comprise the binary serialization architecture.

To binary serialize an object we need a FileStream object,
Constructor: FileStream(file_name, FileMode.Create);

And

BinaryFormatter
Constructor: binaryFormatter.Serialize(fileStreamObject, object1);