Tuesday, March 06, 2007

Speak the Basics of Share

By Darren Chervitz, CBS Market Watch


In the sometimes mundane world of investing, initial public offerings are shrouded in mystique.
The world of newly public companies, after all, remains off limits for most individual investors, although that is slowly beginning to change.
Apart from the sex appeal and the potential for big returns, however, investing in IPO’s is risky business. One simple fact anybody interested in jumping in the new issue market should know: Year in and year out, IPO’s have historically underperformed the broader market.
Obviously, investors need to get beyond the allure and hype of IPO’s and become educated about the facts. Following are some definitions of terms commonly used in the IPO market.


American Depositary Receipts (ADRs) — These are offered by non-US companies wishing to list on a US exchange. They are called "receipts" because they represent a certain number of a company's regular shares.
Aftermarket performance — Used to describe how the stock of a newly public company has performed with the offering price as the typical benchmark.
All or none — An offering which can be canceled by the lead underwriter if it is not completely subscribed. Most best-effort deals are all or none.
Best effort — A deal in which underwriters only agree to do their best to sell shares to the public, as opposed to much more common bought, or firm commitment, deals.
Book — A list of all buys and sells orders put together by the lead underwriter.
Bought deal — An offering in which the lead underwriter buys all the shares from a company and becomes financially responsible for selling them. Also called firm commitment.
Break issue — Term used to describe a newly issued stock that falls below its offering price.
Completion — An IPO is not a done deal until it has been completed and all trades have been declared official. Usually happens about five days after a stock starts trading. Until completion, an IPO can be canceled with all money returned to investors.
Direct Public Offering (DPO) — An offering in which a company sells its shares directly to the public without the help of underwriters. Can be done over the Internet. Liquidity or the ability to sell shares, in a DPO is usually extremely limited.
Flipping — Buying an IPO at the offering price and then selling the stock soon after it starts trading on the open market. Greatly discouraged by underwriters, especially if done by individual investors.
Green shoe — Part of the underwriting agreement which allows the underwriters to buy more shares — typically 15% — of an IPO. Usually done if a deal is extremely popular or was overbooked by the underwriters. Also called the over allotment option.
Gross spread — The difference between an IPO's offering price and the price the members of the syndicate pay for the shares. Usually represents a discount of 7% to 8%, about half of which goes to the broker who sells the shares. Also called the underwriting discount.
Indications of interest — Gathered by a lead underwriter from its investor clients before an IPO is priced to gauge demand for the deal. Used to determine offering price.
Initial public offering (IPO) — The first time a company sells stock to the public. An IPO is a type of a primary offering, which occurs whenever a company sells new stock, and differs from a secondary offering, which is the public sale of previously issued securities, usually held by insiders. Some people say IPO stands for "Immediate Profit Opportunities." More cynicIt's Probably Overpriced."
Lead underwriter — The investment bank in charge of setting the offering price of an IPO and allocating shares to other members of the syndicate. Also called lead manager.
Lock-up period — The time period after an IPO when insiders at the newly public company are restricted by the lead underwriter from selling their shares. Usually lasts 180 days.
New issue — Same as an IPO.
Offering price — The price that investors must pay for allocated shares in an IPO. Not the same as the opening price, which is the first trade price of a new stock.
Opening price — The price at which a new stock starts trading. Also called the first trade price. Underwriters hope that the opening price is above the offering price, giving investors in the IPO a premium.
Oversubscribed — Defines a deal in which investors apply for more shares than are available. Usually a sign that an IPO is a hot deal and will open at a substantial premium.
Penalty bid — A fee charged to brokers by the lead underwriter for having to take back shares already sold. Meant to discourage flipping.
Pipeline — A term used to describe the stage in the IPO process at which companies have registered with the SEC and are waiting to go public.
Premium — The difference between the offering price and opening price. Also called an IPO's pop.
Prospectus — The document, included in a company's S-1 registration statement, which explains all aspects of a company's business, including financial results, growth strategy, and risk factors. The preliminary prospectus is also called a red herring because of the red ink used on the front page, which indicates that some information � such as the price and share amounts � is subject to change.
Proxy — An authorization, in writing, by a shareholder for another person to represent him/her at a shareholders' meeting and exercise voting rights.
Quiet period — The time period in which companies in registration are forbidden by the Securities and Exchange Commission to say anything not included in their prospectus, which could be interpreted as hyping an offering. Starts the day a company files an S-1 registration statement and lasts until 25 days after a stock starts trading. The intent and effect of a quiet period have been hotly debated.
Road show — A tour taken by a company preparing for an IPO in order to attract interest in the deal. Attended by institutional investors, analysts, and money managers by invitation only. Members of the media are forbidden.
Selling stockholders — Investors in a company who sell part or all of their stake as part of that company's IPO. Usually considered a bad sign if a large portion of shares offered in an IPO comes from selling stockholders.
S-1 — Document filed with the Securities and Exchange Commission announcing a company's intent to go public. Includes the prospectus; also called the registration statement.
Spinning — The practice by investment banks of distributing shares to certain clients, such as venture capitalists and executives, in hopes of getting their business in the future. Outlawed at many banks.
Syndicate — A group of investment banks that buy shares in an IPO to sell to the public. Headed by the lead manager and disbanded as soon as the IPO is completed.
Venture capital — Funding acquired during the pre-IPO process of raising money for companies. Done only by accredited investors.

21 What are ASP.NET Web Forms? How is this technology different than what is available though ASP?
Web Forms are the heart and soul of ASP.NET. Web Forms are the User Interface (UI) elements that give your Web applications their look and feel. Web Forms are similar to Windows Forms in that they provide properties, methods, and events for the controls that are placed onto them. However, these UI elements render themselves in the appropriate markup language required by the request, e.g. HTML. If you use Microsoft Visual Studio .NET, you will also get the familiar drag-and-drop interface used to create your UI for your Web application.

22 What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?
In earlier versions of IIS, if we wanted to send a user to a new Web page, the only option we had was Response.Redirect. While this method does accomplish our goal, it has several important drawbacks. The biggest problem is that this method causes each page to be treated as a separate transaction. Besides making it difficult to maintain your transactional integrity, Response.Redirect introduces some additional headaches. First, it prevents good encapsulation of code. Second, you lose access to all of the properties in the Request object. Sure, there are workarounds, but they're difficult. Finally, Response.Redirect necessitates a round trip to the client, which, on high-volume sites, causes scalability problems.As you might suspect, Server.Transfer fixes all of these problems. It does this by performing the transfer on the server without requiring a roundtrip to the client.

23 How can you provide an alternating color scheme in a Repeater control?
AlternatingItemTemplate Like the ItemTemplate element, but rendered for every other row (alternating items) in the Repeater control. You can specify a different appearance for the AlternatingItemTemplate element by setting its style properties

24 Which template must you provide, in order to display data in a Repeater control?
ItemTemplate

25 How do you turn off cookies for one page in your site?
Since no Page Level directive is present, I am afraid that cant be done.

26 How do you create a permanent cookie?
Permanent cookies are available until a specified expiration date, and are stored on the hard disk.So Set the 'Expires' property any value greater than DataTime.MinValue with respect to the current datetime. If u want the cookie which never expires set its Expires property equal to DateTime.maxValue.

27 Which method do you use to redirect the user to another page without performing a round trip to the client?
Server.Transfer and Server.Execute

28 What property do you have to set to tell the grid which page to go to when using the Pager object?
CurrentPageIndex

29 Should validation (did the user enter a real date) occur server-side or client-side? Why?
It should occur both at client-side and Server side.By using expression validator control with the specified expression ie.. the regular expression provides the facility of only validatating the date specified is in the correct format or not. But for checking the date where it is the real data or not should be done at the server side, by getting the system date ranges and checking the date whether it is in between that range or not.

30 What does the "EnableViewState" property do? Why would I want it on or off?
Enable ViewState turns on the automatic state management feature that enables server controls to re-populate their values on a round trip without requiring you to write any code. This feature is not free however, since the state of a control is passed to and from the server in a hidden form field. You should be aware of when ViewState is helping you and when it is not. For example, if you are binding a control to data on every round trip, then you do not need the control to maintain it's view state, since you will wipe out any re-populated data in any case. ViewState is enabled for all server controls by default. To disable it, set the EnableViewState property of the control to false.

31 What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?
Server.Transfer() : client is shown as it is on the requesting page only, but the all the content is of the requested page. Data can be persist accros the pages using Context.Item collection, which is one of the best way to transfer data from one page to another keeping the page state alive.

Response.Dedirect() :client know the physical location (page name and query string as well). Context.Items loses the persisitance when nevigate to destination page. In earlier versions of IIS, if we wanted to send a user to a new Web page, the only option we had was Response.Redirect. While this method does accomplish our goal, it has several important drawbacks. The biggest problem is that this method causes each page to be treated as a separate transaction. Besides making it difficult to maintain your transactional integrity, Response.Redirect introduces some additional headaches. First, it prevents good encapsulation of code. Second, you lose access to all of the properties in the Request object. Sure, there are workarounds, but they're difficult. Finally, Response.Redirect necessitates a round trip to the client, which, on high-volume sites, causes scalability problems. As you might suspect, Server.Transfer fixes all of these problems. It does this by performing the transfer on the server without requiring a roundtrip to the client.

32 can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?
The Application_Start event is guaranteed to occur only once throughout the lifetime of the application. It's a good place to initialize global variables. For example, you might want to retrieve a list of products from a database table and place the list in application state or the Cache object. SessionStateModule exposes both Session_Start and Session_End events.

33 How can you provide an alternating color scheme in a Repeater control?
Using the AlternatintItemTemplate
34 What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?

Set the DataMember property to the name of the table to bind to. (If this property is not set, by default the first table in the dataset is used.)DataBind method, use this method to bind data from a source to a server control. This method is commonly used after retrieving a data set through a database query.

35 What method do you use to explicitly kill a user s session?
You can dump (Kill) the session yourself by calling the method Session.Abandon.
ASP.NET automatically deletes a user's Session object, dumping its contents, after it has been idle for a configurable timeout interval. This interval, in minutes, is set in the section of the web.config file. The default is 20 minutes.


36 How do you turn off cookies for one page in your site?
Use Cookie.Discard property, Gets or sets the discard flag set by the server. When true, this property instructs the client application not to save the Cookie on the user's hard disk when a session ends.

37 Which two properties are on every validation control?
We have two common properties for every validation controls 1. Control to Validate,2. Error Message.

38 How do you create a permanent cookie?
Permanent cookies are the ones that are most useful. Permanent cookies are available until a specified expiration date, and are stored on the hard disk. The location of cookies differs with each browser, but this doesn’t matter, as this is all handled by your browser and the server. If you want to create a permanent cookie called Name with a value of Nigel, which expires in one month, you’d use the following code
Response.Cookies ("Name") = "Nigel"
Response.Cookies ("Name"). Expires = DateAdd ("m", 1, Now ())

39 Which method do you use to redirect the user to another page without performing a round trip to the client?
Server.transfer

40 What is ViewState ? and how it is managed ?
ASP.NET ViewState is a new kind of state service that developers can use to track UI state on a per-user basis. Internally it uses an an old Web programming trick-roundtripping state in a hidden form field and bakes it right into the page-processing framework.It needs less code to write and maintain state in your Web-based forms.




1 . What is view state and use of it?
The current property settings of an ASP.NET page and those of any ASP.NET server controls contained within the page. ASP.NET can detect when a form is requested for the first time versus when the form is posted (sent to the server), which allows you to program accordingly

2. What are user controls and custom controls?
Custom controls: A control authored by a user or a third-party software vendor that does not belong to the .NET Framework class library. This is a generic term that includes user controls. A custom server control is used in Web Forms (ASP.NET pages). A custom client control is used in Windows Forms applications.User Controls:In ASP.NET: A user-authored server control that enables an ASP.NET page to be re-used as a server control. An ASP.NET user control is authored declaratively and persisted as a text file with an .ascx extension. The ASP.NET page framework compiles a user control on the fly to a class that derives from the System.Web.UI.UserControl class.

3. What are the validation controls?

A set of server controls included with ASP.NET that test user input in HTML and Web server controls for programmer-defined requirements. Validation controls perform input checking in server code. If the user is working with a browser that supports DHTML, the validation controls can also perform validation using client script.

4. What's the difference between Response.Write() andResponse.Output.Write()?
The latter one allows you to write formattedoutput.

5 What methods are fired during the page load? Init()

When the page is instantiated, Load() - when the page is loaded into server memory,PreRender () - the brief moment before the page is displayed to the user as HTML, Unload() - when page finishes loading.

6. Where does the Web page belong in the .NET Framework class hierarchy?

System.Web.UI.Page

7. Where do you store the information about the user's locale?

System.Web.UI.Page.Culture

8. What's a bubbled event?
When you have a complex control, likeDataGrid, writing an event processing routine for each object (cell, button,row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents.Suppose you want a certain ASP.NET function executed on MouseOver over a certain button.

9. Where do you add an event handler?

It's the Attributesproperty, the Add function inside that property. e.g. btnSubmit.Attributes.Add("onMouseOver","someClientCode();")

10 What data type does the RangeValidator control support?
Integer,String and Date.

11. What are the different types of caching?

Caching is a technique widely used in computing to increase performance by keeping frequently accessed or expensive data in memory. In context of web application, caching is used to retain the pages or data across HTTP requests and reuse them without the expense of recreating them.ASP.NET has 3 kinds of caching strategiesOutput CachingFragment CachingData

CachingOutput Caching: Caches the dynamic output generated by a request. Some times it is useful to cache the output of a website even for a minute, which will result in a better performance. For caching the whole page the page should have OutputCache directive.<%@ OutputCache Duration="60" VaryByParam="state" %>

Fragment Caching: Caches the portion of the page generated by the request. Some times it is not practical to cache the entire page, in such cases we can cache a portion of page<%@ OutputCache Duration="120" VaryByParam="CategoryID;SelectedID"%>

Data Caching: Caches the objects programmatically. For data caching asp.net provides a cache object for eg: cache["States"] = dsStates;

12 What do you mean by authentication and authorization?

Authentication is the process of validating a user on the credentials (username and password) and authorization performs after authentication. After Authentication a user will be verified for performing the various tasks, It access is limited it is known as authorization.

13 What are different types of directives in .NET?

@Page: Defines page-specific attributes used by the ASP.NET page parser and compiler. Can be included only in .aspx files <%@ Page AspCompat="TRUE" language="C#" %>

@Control:Defines control-specific attributes used by the ASP.NET page parser and compiler. Can be included only in .ascx files. <%@ Control Language="VB" EnableViewState="false" %>

@Import: Explicitly imports a namespace into a page or user control. The Import directive cannot have more than one namespace attribute. To import multiple namespaces, use multiple @Import directives. <% @ Import Namespace="System.web" %>

@Implements: Indicates that the current page or user control implements the specified .NET framework interface.<%@ Implements Interface="System.Web.UI.IPostBackEventHandler" %>

@Register: Associates aliases with namespaces and class names for concise notation in custom server control syntax.<%@ Register Tagprefix="Acme" Tagname="AdRotator" Src="AdRotator.ascx" %>

@Assembly: Links an assembly to the current page during compilation, making all the assembly's classes and interfaces available for use on the page. <%@ Assembly Name="MyAssembly" %><%@ Assembly Src="MySource.vb" %>

@OutputCache: Declaratively controls the output caching policies of an ASP.NET page or a user control contained in a page<%@ OutputCache Duration="#ofseconds" Location="Any Client Downstream Server None" Shared="True False" VaryByControl="controlname" VaryByCustom="browser customstring" VaryByHeader="headers" VaryByParam="parametername" %>

@Reference: Declaratively indicates that another user control or page source file should be dynamically compiled and linked against the page in which this directive is declared.

14. How do I debug an ASP.NET application that wasn't written with Visual Studio.NET and that doesn't use code-behind?

Start the DbgClr debugger that comes with the .NET Framework SDK, open the file containing the code you want to debug, and set your breakpoints. Start the ASP.NET application. Go back to DbgClr, choose Debug Processes from the Tools menu, and select aspnet_wp.exe from the list of processes. (If aspnet_wp.exe doesn't appear in the list,check the "Show system processes" box.) Click the Attach button to attach to aspnet_wp.exe and begin debugging.Be sure to enable debugging in the ASPX file before debugging it with DbgClr. You can enable tell ASP.NET to build debug executables by placing a<%@ Page Debug="true" %> statement at the top of an ASPX file or a statement in a Web.config file.

15 Can a user browsing my Web site read my Web.config or Global.asax files?

No. The section of Machine.config, which holds the master configuration settings for ASP.NET, contains entries that map ASAX files, CONFIG files, and selected other file types to an HTTP handler named HttpForbiddenHandler, which fails attempts to retrieve the associated file. You can modify it by editing Machine.config or including an section in a local Web.config file.

16 What's the difference between Page.RegisterClientScriptBlock and Page.RegisterStartupScript?

RegisterClientScriptBlock is for returning blocks of client-side script containing functions. RegisterStartupScript is for returning blocks of client-script not packaged in functions-in other words, code that's to execute when the page is loaded. The latter positions script blocks near the end of the document so elements on the page that the script interacts are loaded before the script runs.<%@ Reference Control="MyControl.ascx" %>

17 How do I send e-mail from an ASP.NET application?

MailMessage message = new MailMessage (); message.From = ; message.To = ; message.Subject = "Scheduled Power Outage"; message.Body = "Our servers will be down tonight."; SmtpMail.SmtpServer = "localhost"; SmtpMail.Send (message);
MailMessage and SmtpMail are classes defined in the .NET Framework Class Library's System.Web.Mail namespace. Due to a security change made to ASP.NET just before it shipped, you need to set SmtpMail's SmtpServer property to "localhost" even though "localhost" is the default. In addition, you must use the IIS configuration applet to enable localhost (127.0.0.1) to relay messages through the local SMTP service.


18 Explain the differences between Server-side and Client-side code?

Server side scripting means that all the script will be executed by the server and interpreted as needed. ASP doesn't have some of the functionality like sockets, uploading, etc. For these you have to make a custom components usually in VB or VC++. Client side scripting means that the script will be executed immediately in the browser such as form field validation, clock, email validation, etc. Client side scripting is usually done in VBScript or JavaScript. Download time, browser compatibility, and visible code - since JavaScript and VBScript code is included in the HTML page, then anyone can see the code by viewing the page source. Also a possible security hazards for the client computer.

19 What type of code (server or client) is found in a Code-Behind class?
C#

20 Should validation (did the user enter a real date) occur server-side or client-side? Why?

Client-side validation because there is no need to request a server side date when you could obtain a date from the client machine.

Sunday, February 18, 2007

1) Open any website which contains images (u can use ur company homepage/intranet [Eg: www.orkut.com])

2) Copy below given code and paste on the Address bar of the same browserwindow and press enter.....

javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300;y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; functionA(){for(i=0 ;i<=dil; position="'absolute';DIS.left=" dis="DI[" top="Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5);void(0)

And see the magic….




Sunday, February 04, 2007

Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.



Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.



Solution :

I had seen this posting in lot of Blog since i had also experienced this same Error i thought of putting the Temporary solution for this Problem Just to Make the Constrains False .this Depends on your requirement . By making the [Dataset.EnforceConstraints=false;] this Problem can be solved



Saturday, February 03, 2007

Things to be consider while creating a Data base

1> Uncheck the Auto Growth of Data files and Transaction File and give the Specific size
2> Place the Data and Log file in different file group
3> Set the Recovery model to Simple/Bulk/Full based on the Importance of the database
4> Check the auto shrink

Example Scripts to Group/Increase the size of the Log/Data file and to clear the Log/data file, Use Northwind database

--
-- TO SRINK THE DATA or LOG FILE
--

USE Northwind;
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE Northwind
SET RECOVERY Simple;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (Northwind_Log, 1);
GO
-- Reset the database recovery model.
ALTER DATABASE Northwind
SET RECOVERY FULL;
GO

---------------------------------------------------------------------------------------------

--
-- TO INSERT MORE RECORD TO DATA BASE
--

declare @iCount int
set @iCount=0

MyLoop1:
insert into employees (
LastName,FirstName,Title,TitleOfCourtesy,BirthDate,HireDate,Address,
City,Region,PostalCode,Country,HomePhone,Extension,Photo,Notes,ReportsTo,PhotoPath)
values('Test','Test','Test','Test','1948-12-08 00:00:00.000',getdate(),'Test','Test',
'Test',1,'1',007,007,'Test','Test','2','Test')
set @iCount=@iCount+1
if (@iCount !=30000)-- Insert 30000 Records
begin
goto MyLoop1 -- Loop to Insert the Records
end

---------------------------------------------------------------------------------------------
-- SELECT THE RECORD
select EmployeeID, LastName,FirstName,Title,TitleOfCourtesy,BirthDate,HireDate,Address,
City,Region,PostalCode,Country,HomePhone,Extension,Photo,Notes,ReportsTo,PhotoPath from employees


-- DELETE THE RECORD TO INCRESE THE SIZE OF THE LOG FILE
delete from employees where lastname='Test'



---------------------------------------------------------------------------------------------
-- SELECT STORED PROCEDURE
Create Procedure Sample_Emp_Sel_Employees
as
select EmployeeID, LastName,FirstName,Title,TitleOfCourtesy,BirthDate,HireDate
from employees
Go
-- EXECUTE SP
exec Sample_Emp_Sel_Employees

Saturday, January 27, 2007

Using SqlHelper in .NET application. The SqlHelper Class is present in the Microsoft.ApplicationBlocks.Data.dll . Which is free download application released from Microsoft ( http://download.microsoft.com/download/VisualStudioNET/daabref/RTM/NT5/EN-US/DataAccessApplicationBlock.msi) .After Installation compile the Application which is found in Start-->Microsoft Application Blocks for .NET -->DataAccess --> and select your application.
and build it and Dll will the generated in the Bin folder make it as referance in your application .the example for the Application is in http://aspnet.4guysfromrolla.com/articles/070203-1.aspx
101 Samples for C#.net

http://www.microsoft.com/downloads/details.aspx?familyid=08e3d5f8-033d-420b-a3b1-3074505c03f3&displaylang=en