by Alexis Neely - extracted from NPR.ORG
Alexis Neely is a personal family attorney based in Redondo Beach, Calif. Below is a checklist of things to consider when planning for the future for your children and your estate:
A family’s most precious assets are always their children. And yet, many parents have not been educated on these 12 Steps that all parents can take to protect the future of their children.
Step #1: Designate first responders -- What would happen if you died or became incapacitated while your children were in the care of someone else? Somebody would eventually call the police, right? Unfortunately, if your children were in the care of a person without documented and legal authority to have custody of them, the police would have no choice but to call in Child Protective Services. Your children could be taken into foster care until one of two things happened: someone with clear legal authority arrives to take custody of your children; or the courts determined who would have clear legal authority through the guardianship process.
Step #2: Provide clear guidance to your first responders -- You absolutely want to inform the people that are your first responders of their role and how important that role is to you. Your first responders must be prepared to go to your children during a time of crisis with the appropriate documentation giving them the authority to stay with your children.
Step #3: Ensure that caregivers and babysitters have clear instructions -- If you are like me, the last thing you want to happen is for the police to show up at your house and find your children with a caregiver who does not have legal authority to stay with them, and does not have any idea how to contact someone who does have such authority. In the event that happens, the police have no choice but to call in Child Protective Services.
Step #4: Define guardians for long-term care -- Parents regularly tell me that they have discussed and agreed upon a guardian for their children, and have even made their wishes known to their families. However, verbal communication itself is not enough, and can lead to significant internal family conflict. It can also result in your wishes not being followed when it is too late. If you fail to communicate your wishes in a legally binding, written document, you are placing your children in a situation in which every family member has equal priority of guardianship. The state will ultimately decide who raises your children. Legal documentation is particularly important if you intend for a friend to care for your children, as courts will almost always choose a family member over a friend.
Step #5: Plan even if you are uncertain who should be guardian -- I’ve heard many parents say, "we have not made a plan because we can’t decide who should be guardian." Regardless of whether you make a plan, the State has a plan for you and your children. In many cases, the State’s plan is not the plan you would choose. As I discussed in Step #1, your children would likely be placed in Child Protective Services if you do not have local family to serve as First Responders. Someone would then have to petition the court to be appointed the official guardian of your children. Almost everyone has a family member they know they would NOT want to raise their children. Imagine if that was the person the Court appointed to raise your children! And, even if you would be okay with any member of your family raising your children, imagine the strife that could occur when more than one family member comes forward insisting they are the right person. Don't let your reluctance to make a decision turn into a decision that you don't want. Download a free article that will give you a proven method on How to Choose the Right Guardian at http://www.choosetherightguardian.com.
Step #6: Let those designated as guardians know how you want your children raised -- As a mom, I know that there are certain things that are critical to me when it comes to the way my children are raised, such as the spiritual foundation I want them to have, the sense of financial responsibility I want imparted to them, and the educational path I want them to take. Just by way of the fact that you are reading this, I know that these (and other) issues are critical to you as well. The only way to ensure that your children will be raised with your values is to make them clear to the people you’ve named as Guardians if they are ever called on to serve.
Step #7: Document your plan, regardless of your assets -- Many people jeopardize their children’s future by thinking they do not have assets and therefore do not need to plan. Regardless of whether you have significant financial assets, if you have minor children, you need to consider who would raise them if you could not. If you have any assets at all, you need a plan to ensure that the right thing happens to your assets in the event of your death. Consider the following two situations that recently came across my desk -- both families who hadn’t done any planning because they probably thought they didn’t have enough wealth to plan. First there was an aunt willing to take her four nieces and nephews into her care after tragedy struck and the children were left without parents. The aunt lacked financial resources -- she didn’t even have money to hire a lawyer to help carry out the guardianship proceedings. The parents left only $50,000 behind in assets, money the aunt desperately needs to help raise the children. Sadly, the aunt spent well over a year trying to convince the bank to release the funds and ultimately had to find a lawyer and go to court to get access to the funds. There's also the case of a janitor hit by a car and severely injured, left unable to communicate or sign documents. He had only $10,000 in a bank account in his own name, which no one can access it without a court order. This was $10,000 that his family desperately needed, but the court process usually proves to be expensive and confusing. Planning would have avoided both of these unfortunate situations.
Step #8: Provide enough financial resources -- Too many families consider insurance a waste of money, but do not have enough in savings to care for their children in the event of an emergency. Do you want your children to attend college? What kind of lifestyle do you want your children to have if you can’t be there to financially support them? Remember, you are responsible for ensuring sufficient financial resources to support your children upon your death.
Step #9: Help your family avoid probate -- If you have assets that need to go through the court process called probate upon your death, you might want to put your assets in a living trust. Probate is expensive, complex, time consuming and inconvenient -- probate will cost your estate approximately 5 percent of your gross assets, and will take a minimum of 12-16 months in the state of California (other states may vary.) Also, the information in a will is open to the public. While the general public likely does not care about the value of your estate, predators care if your children are to receive substantial assets when they turn 18.
Step #10: Protect your children’s inheritance until they are old enough -- Many young adults who receive an inheritance often use the money less that wisely, buying fancy cars or taking friends on vacations. If your estate goes through probate, you control neither the age at which your children receive their inheritance nor how they spend it. At the end of probate, your funds should be held in a guardianship estate account for the benefit of your children until they turn 18, at which time all the remaining funds would be distributed to them outright.
Step #11: Protect your children’s inheritance from lawsuits and future spouses -- Many families leave their children’s inheritance unprotected from creditors, predators, spouses and estate taxes, assuming that only wealthy families create lifetime trusts for their children. In fact, lifetime trusts are more beneficial for the average family, who would be penniless if they had to fight a lawsuit, a money judgment or a divorce. You can create a lifetime asset protection trust for your children that will allow them to control the assets at the time that you deem appropriate.
Step #12: Consider the impact of estate taxes -- It's a little-known fact: For the vast majority of families, estate taxes are voluntary. But ignorance of the impact of estate taxes on your family can cost up to $960,000. Add up your own taxable estate: the equity in your home, the value of your personal property, bank and brokerage accounts, your retirement accounts and life insurance. Estates exceeding $2 million could be subject to estate tax at a rate of 46 percent. For example, if you have a $3-million taxable estate, your family could pay 46 percent tax on the $1 million exceeding the threshold. In other words, your family would pay $460,000 in estate taxes.
Search my blog articles
Monday, August 14, 2006
Friday, August 04, 2006
Web App Follies: Keep Sites Running Smoothly By Avoiding These 10 Common ASP.NET Pitfalls -- MSDN Magazine, July 2006
Web App Follies: Keep Sites Running Smoothly By Avoiding These 10 Common ASP.NET Pitfalls -- MSDN Magazine, July 2006
This is one of the good articles I found on ASP.NET tuning and optimization.
Here is the cheat sheat from the articles
This is one of the good articles I found on ASP.NET tuning and optimization.
Here is the cheat sheat from the articles
![]() | Does your app use LoadControl to load user controls dynamically? If so, make sure this is done in such a way that LoadControl will work both with and without output caching. |
![]() | Are you using kernel-mode output caching and session state in the same page? If so, remove the OutputCache directive to avoid caching that page or turn kernel-mode output caching off for the entire app. |
![]() | Are you calling FormsAuthentication.RedirectFromLoginPage in your ASP.NET 1.x-based app? If so, either change the second parameter to false or modify the Expires property of outgoing persistent forms authentication cookies to a more appropriate timeout. |
![]() | Do any of your pages generate inordinate amounts of view state? If so, turn off view state for individual controls or keep it on the server. |
![]() | Does your app use SQL Server session state? If so, make sure you disable sessions in pages that don’t use sessions. |
![]() | Does your app use the ASP.NET 2.0 role manager? If so, enable role caching to increase performance. |
![]() | Does your app use custom data types as profile properties? If so, you'll avoid problems by creating custom data types that are compatible with XML serialization or by attributing the types as serializable and using the binary serializer to serialize and deserialize types. |
![]() | Does your app do database queries that take a long time to return? If so, consider whether the pages are candidates for becoming asynchronous. |
![]() | Does your ASP.NET app use client impersonation? If so, simple authentication in ASP.NET might enforce ACL-based permissions with less hassle. |
![]() | Have you profiled your app’s database activity? Examining communication between the app and database is a good first performance-tuning step. |
Friday, July 28, 2006
Open Source Web Design - Download and upload free web designs.
I found this great place to download design fro FREE, it is a great website, lots of designs.
Open Source Web Design - Download and upload free web designs.
Open Source Web Design - Download and upload free web designs.
Tuesday, July 11, 2006
My PHP creation
I did my first PHP page today, it was like learn and develop an application in PHP in 8 hours. It was pretty cool, it took me to the pre .NET days and back to the good old days of ASP coding. It was like dejavu!
PHP has a lot of similarities to ASP, or may be its the other way around. But now I feel comfortable doing it.
Let meknow if you want to more info
PHP has a lot of similarities to ASP, or may be its the other way around. But now I feel comfortable doing it.
Let meknow if you want to more info
Tuesday, May 23, 2006
Common DOS Commands.
Command @
Description Do not echo this line.
Syntax @ command line
Typical Use To hide a single line if echo is switched on, or to hide the switching off of the echo command.
Examlpe echo This line will be echoed twice to the screen,
@echo Whereas this line will occur only once.
Command ECHO
Description The ECHO command has several different uses. MS DOS batch files use two echo 'modes'. The default echo mode is ECHO ON. When ECHO is set to ON, every command in the batch file is displayed to the screen before it is run. Sometimes this information is not required, and can even be downright annoying for larger batch files. The command ECHO OFF sets the batch echo mode to OFF. In this mode, the commands are not printed to the screen prior to their execution.
As well as the echo modes, the ECHO command is used to print a message to the user. Messages are displayed to the user by preceding a line of text with ECHO.
Syntax ECHO MODE ON : ECHO ON
ECHO MODE OFF : ECHO OFF
DISPLAY A MESSAGE : ECHO message
Typical Use The command @ECHO OFF is almost always placed at the top of a batch file to switch off subsequent command echo.
ECHO is also the only way a batch file can communicate information to a user.
Example @ECHO OFF
ECHO Please insert a disk in drive A: and press any key when ready.
Command REM (short for remark)
Description REM is the MS DOS batch file method of providing comments. Comments are lines of code which are not executed by the batch file, but rather are used to convey information about the workings of the batch file itself. Good batch file programming practice demands a comment at the head of every batch file explaining its use and syntax. Comments can also be put in other parts of the file to clarify ambiguous commands and to 'comment-out' a line of commands so that they are temporarily ignored by the batch file.
Syntax REM line containing comment.
Typical Use REM should be used at the top of every batch file to provide a description and example use. However, too many REM lines are not an example of good programming style! Don't provide a comment for obvious commands - only the tricky ones!
Example REM SFORMAT.BAT : Safe Format
REM
REM This batch file implements a safe version of the format command.
REM The C: drive can not be formatted with this command.
Command PAUSE
Description The PAUSE command prints the message "Press any key to continue..." to the screen and waits for the user to respond.
Syntax PAUSE (it's as simple as that!)
Typical Use The PAUSE command was the only method of getting a user's response in batch files until the choice command arrived in MS DOS 6.x. By issuing instructions with the ECHO command, the PAUSE command waited for the user to read them and respond appropriately.
Example ECHO Please insert the disk in drive A: and
PAUSE
Command GOTO
Description The GOTO command allows a batch file to branch to a different location to continue executing commands from. To tell the batch file where to go to, a label is placed after the GOTO command. This label must conform to several guidelines for it to be a valid batch file label.
Syntax GOTO label
Typical Use Until MS DOS 6.x introduced the FOR command, the GOTO command was a batch files only mechanism of performing a command repeatedly. GOTOs are still the only method in a batch file to perform a sub-set of commands. (MS DOS Batch files do not have sub-procedures)
Example IF %1 == "" GOTO ERROR
Command IF
Description The IF command is used in batch files to test whether a condition is met or not. This allows the batch file to perform a particular action only if a particular condition is met. There are several different variations of the IF command: IF EXIST, IF ERRORLEVEL, and IF x == y (yes! it does use two equal signs!)
Syntax IF EXIST filename or dirname : used to test for the existance of a file or directory in MS DOS. This test will return true if the file does exist.
IF ERRORLEVEL : After a program has finished executing in MS DOS it returns a value to the operating system indicating its success or failure. This value is stored in the variable ERRORLEVEL. By testing this variable, a batch file can deduce the result of the program that just finished running.
IF x == y : This version of the IF statement tests two string values. If string x is equal to string y this test is evaluated to be true, otherwise false.
All of the above IF statements can also be negated with the NOT command. For example -:
IF NOT EXIST filename : Tests to see if the file doesn't exist. This test will return true if the file doesn't exist.
Typical Use The IF statement is one of the most useful batch file commands, and as such is probably the most common. The IF EXIST command is used to check if a file exists before it is copied/moved/opened/etc. The IF ERRORLEVEL allows a batch file to check the return value of another program. The IF STRING1 == STRING2 is commonly used to validate command-line parameters.
Example IF NOT EXIST %1 MKDIR %1
IF ERRORLEVEL 2 GOTO END
IF %1 == "" GOTO ERROR
Command SHIFT
Description The SHIFT command is possibly, at first, the most confusing batch file command. It needn't be. Simply, the SHIFT command increases the number of command-line parameters accessable by a batch file. Each time SHIFT is called, the value in the 1st parameter is discarded and replaced by the value of the 2nd parameter. The value in the 2nd parameter is replaced by the value in the 3rd parameter, etcetera, etcetera, until the 9th parameter is replaced by the previously unavailable 10th parameter.
Syntax SHIFT
Typical Use The SHIFT command provides considerable power to batch files. It allows a batch file to operate on an unknown number of parameters. The SHIFT command is often used in situations where an operation needs to be performed on several files or directories.
Example The following example displays the contents of the files typed after the batch file name one page at a time.
:LOOP
TYPE %1 MORE
SHIFT
IF "%1" == "" GOTO END
GOTO LOOP
:END
Command CALL
Description The CALL command is used to run another batch file from within a batch file. Execution of the current batch file is paused and the called batch file is run. After the called batch file has finished running, the original batch file is resumed at the line after the CALL statement.
Note: If another batch file is run from within a batch file by simply using its name, after the called batch file finishes executing, control is returned to the Command Line, NOT the original batch file.
Syntax CALL batchfilename [parameters] [switches]
Typical Use The CALL command is used to provide modularity to batch files. Batch files can be re-used effortlessly if they are written with modularity in mind.
Example IF %1 == A: CALL FLOPPY.BAT
Command FOR
Description The FOR command was an invaluable addition to the DOS Batch File Command suite. FOR repeats a command for a number of files, directories, or text-strings.
Syntax FOR variable IN list DO command [parameters] [switches]
Where -:
variable is substituted for each element in the list and passed to command. Variable has a special format in batch files.
list is a list of filenames (wildcards allowed), directory names, or text-strings that are to be processed by command one at a time.
command is a DOS internal or external command to be performed for each element of the list.
Typical Use The FOR command performs the same command for each element of a list. Prior to its introduction, the same effect had to be achieved with GOTOs and IFs, which were messy and sometimes difficult to follow. Use a FOR to do any necessary looping in your batch files.
Example The following is an implementation of the same example presented in the SHIFT example of displaying many files to the screen with MORE.
FOR %%f IN (*.*) DO TYPE %%f MORE
A lot neater, huh?!
Command CHOICE
Description The CHOICE command is perhaps the best addition to MS DOS Batch File commands. CHOICE makes it possible to accept various user-responses. Before now, users were presented with crude either/or choices in batch files. The CHOICE command allows a batch file to detect a users choice from a lits of options.
Syntax CHOICE [/C:choices] [/N] [/S] [/T:choice,timeout] [TEXT]
Where -:
/C:choices : specifies the choices that the user can choose from. The choices can only be single characters.
/N : Do not display choices and the '?' at the end of the TEXT prompt.
/S : Treat the choices as case sensitive, meaning that 'a' is a different choice from 'A'. By default, case is not sensitive - 'a' is equivalent to 'A'.
/T:choice,timeout : Default to choice after timeout seconds.
TEXT : The text to display as the prompt of the choice.
Typical Use The CHOICE command has its obvious use in batch files. It is now possible to easily get a users response, thus allowing batch files to be much more interactive, and therefore more useful.
Example The following batch file snippet displays a simple menu (without a question-mark at the end of the prompt) and prompts for the users choice, defaulting to option 2 after 5 seconds :
ECHO 1. MS-DOS Editor.
ECHO 2. MS-Windows. (default)
ECHO 3. Defrag the hard-drive.
ECHO 4. Quit.
CHOICE /C:1234 /N /T:2,5 Please choose a menu option.
IF ERRORLEVEL == 4 GOTO QUIT_MENU
IF ERRORLEVEL == 3 GOTO DEFRAG_HD
IF ERRORLEVEL == 2 GOTO RUN_WIN
IF ERRORLEVEL == 1 GOTO RUN_EDIT
:RUN_EDIT
CALL EDIT
:RUN_WIN
CALL WIN
:DEFRAG_HD
DEFRAG c:
:QUIT_MENU
ECHO Safe to switch off machine now...
Description Do not echo this line.
Syntax @ command line
Typical Use To hide a single line if echo is switched on, or to hide the switching off of the echo command.
Examlpe echo This line will be echoed twice to the screen,
@echo Whereas this line will occur only once.
Command ECHO
Description The ECHO command has several different uses. MS DOS batch files use two echo 'modes'. The default echo mode is ECHO ON. When ECHO is set to ON, every command in the batch file is displayed to the screen before it is run. Sometimes this information is not required, and can even be downright annoying for larger batch files. The command ECHO OFF sets the batch echo mode to OFF. In this mode, the commands are not printed to the screen prior to their execution.
As well as the echo modes, the ECHO command is used to print a message to the user. Messages are displayed to the user by preceding a line of text with ECHO.
Syntax ECHO MODE ON : ECHO ON
ECHO MODE OFF : ECHO OFF
DISPLAY A MESSAGE : ECHO message
Typical Use The command @ECHO OFF is almost always placed at the top of a batch file to switch off subsequent command echo.
ECHO is also the only way a batch file can communicate information to a user.
Example @ECHO OFF
ECHO Please insert a disk in drive A: and press any key when ready.
Command REM (short for remark)
Description REM is the MS DOS batch file method of providing comments. Comments are lines of code which are not executed by the batch file, but rather are used to convey information about the workings of the batch file itself. Good batch file programming practice demands a comment at the head of every batch file explaining its use and syntax. Comments can also be put in other parts of the file to clarify ambiguous commands and to 'comment-out' a line of commands so that they are temporarily ignored by the batch file.
Syntax REM line containing comment.
Typical Use REM should be used at the top of every batch file to provide a description and example use. However, too many REM lines are not an example of good programming style! Don't provide a comment for obvious commands - only the tricky ones!
Example REM SFORMAT.BAT : Safe Format
REM
REM This batch file implements a safe version of the format command.
REM The C: drive can not be formatted with this command.
Command PAUSE
Description The PAUSE command prints the message "Press any key to continue..." to the screen and waits for the user to respond.
Syntax PAUSE (it's as simple as that!)
Typical Use The PAUSE command was the only method of getting a user's response in batch files until the choice command arrived in MS DOS 6.x. By issuing instructions with the ECHO command, the PAUSE command waited for the user to read them and respond appropriately.
Example ECHO Please insert the disk in drive A: and
PAUSE
Command GOTO
Description The GOTO command allows a batch file to branch to a different location to continue executing commands from. To tell the batch file where to go to, a label is placed after the GOTO command. This label must conform to several guidelines for it to be a valid batch file label.
Syntax GOTO label
Typical Use Until MS DOS 6.x introduced the FOR command, the GOTO command was a batch files only mechanism of performing a command repeatedly. GOTOs are still the only method in a batch file to perform a sub-set of commands. (MS DOS Batch files do not have sub-procedures)
Example IF %1 == "" GOTO ERROR
Command IF
Description The IF command is used in batch files to test whether a condition is met or not. This allows the batch file to perform a particular action only if a particular condition is met. There are several different variations of the IF command: IF EXIST, IF ERRORLEVEL, and IF x == y (yes! it does use two equal signs!)
Syntax IF EXIST filename or dirname : used to test for the existance of a file or directory in MS DOS. This test will return true if the file does exist.
IF ERRORLEVEL : After a program has finished executing in MS DOS it returns a value to the operating system indicating its success or failure. This value is stored in the variable ERRORLEVEL. By testing this variable, a batch file can deduce the result of the program that just finished running.
IF x == y : This version of the IF statement tests two string values. If string x is equal to string y this test is evaluated to be true, otherwise false.
All of the above IF statements can also be negated with the NOT command. For example -:
IF NOT EXIST filename : Tests to see if the file doesn't exist. This test will return true if the file doesn't exist.
Typical Use The IF statement is one of the most useful batch file commands, and as such is probably the most common. The IF EXIST command is used to check if a file exists before it is copied/moved/opened/etc. The IF ERRORLEVEL allows a batch file to check the return value of another program. The IF STRING1 == STRING2 is commonly used to validate command-line parameters.
Example IF NOT EXIST %1 MKDIR %1
IF ERRORLEVEL 2 GOTO END
IF %1 == "" GOTO ERROR
Command SHIFT
Description The SHIFT command is possibly, at first, the most confusing batch file command. It needn't be. Simply, the SHIFT command increases the number of command-line parameters accessable by a batch file. Each time SHIFT is called, the value in the 1st parameter is discarded and replaced by the value of the 2nd parameter. The value in the 2nd parameter is replaced by the value in the 3rd parameter, etcetera, etcetera, until the 9th parameter is replaced by the previously unavailable 10th parameter.
Syntax SHIFT
Typical Use The SHIFT command provides considerable power to batch files. It allows a batch file to operate on an unknown number of parameters. The SHIFT command is often used in situations where an operation needs to be performed on several files or directories.
Example The following example displays the contents of the files typed after the batch file name one page at a time.
:LOOP
TYPE %1 MORE
SHIFT
IF "%1" == "" GOTO END
GOTO LOOP
:END
Command CALL
Description The CALL command is used to run another batch file from within a batch file. Execution of the current batch file is paused and the called batch file is run. After the called batch file has finished running, the original batch file is resumed at the line after the CALL statement.
Note: If another batch file is run from within a batch file by simply using its name, after the called batch file finishes executing, control is returned to the Command Line, NOT the original batch file.
Syntax CALL batchfilename [parameters] [switches]
Typical Use The CALL command is used to provide modularity to batch files. Batch files can be re-used effortlessly if they are written with modularity in mind.
Example IF %1 == A: CALL FLOPPY.BAT
Command FOR
Description The FOR command was an invaluable addition to the DOS Batch File Command suite. FOR repeats a command for a number of files, directories, or text-strings.
Syntax FOR variable IN list DO command [parameters] [switches]
Where -:
variable is substituted for each element in the list and passed to command. Variable has a special format in batch files.
list is a list of filenames (wildcards allowed), directory names, or text-strings that are to be processed by command one at a time.
command is a DOS internal or external command to be performed for each element of the list.
Typical Use The FOR command performs the same command for each element of a list. Prior to its introduction, the same effect had to be achieved with GOTOs and IFs, which were messy and sometimes difficult to follow. Use a FOR to do any necessary looping in your batch files.
Example The following is an implementation of the same example presented in the SHIFT example of displaying many files to the screen with MORE.
FOR %%f IN (*.*) DO TYPE %%f MORE
A lot neater, huh?!
Command CHOICE
Description The CHOICE command is perhaps the best addition to MS DOS Batch File commands. CHOICE makes it possible to accept various user-responses. Before now, users were presented with crude either/or choices in batch files. The CHOICE command allows a batch file to detect a users choice from a lits of options.
Syntax CHOICE [/C:choices] [/N] [/S] [/T:choice,timeout] [TEXT]
Where -:
/C:choices : specifies the choices that the user can choose from. The choices can only be single characters.
/N : Do not display choices and the '?' at the end of the TEXT prompt.
/S : Treat the choices as case sensitive, meaning that 'a' is a different choice from 'A'. By default, case is not sensitive - 'a' is equivalent to 'A'.
/T:choice,timeout : Default to choice after timeout seconds.
TEXT : The text to display as the prompt of the choice.
Typical Use The CHOICE command has its obvious use in batch files. It is now possible to easily get a users response, thus allowing batch files to be much more interactive, and therefore more useful.
Example The following batch file snippet displays a simple menu (without a question-mark at the end of the prompt) and prompts for the users choice, defaulting to option 2 after 5 seconds :
ECHO 1. MS-DOS Editor.
ECHO 2. MS-Windows. (default)
ECHO 3. Defrag the hard-drive.
ECHO 4. Quit.
CHOICE /C:1234 /N /T:2,5 Please choose a menu option.
IF ERRORLEVEL == 4 GOTO QUIT_MENU
IF ERRORLEVEL == 3 GOTO DEFRAG_HD
IF ERRORLEVEL == 2 GOTO RUN_WIN
IF ERRORLEVEL == 1 GOTO RUN_EDIT
:RUN_EDIT
CALL EDIT
:RUN_WIN
CALL WIN
:DEFRAG_HD
DEFRAG c:
:QUIT_MENU
ECHO Safe to switch off machine now...
Wednesday, May 17, 2006
90/10 Principle
The 90/10 Principle
Author : Stephen Covey ( Management Guru)
Have you read this before? Discover the 90/10 Principle. It will change your
life
(at least the way you react to situations). What is this principle?
10% of life is made up of what happens to you. 90% of life is decided by how you react .
What does this mean?
We really have no control over 10% of what happens to us. We cannot stop the
car from breaking down. The plane will be late arriving, which throws our
whole schedule off. A driver may cut us off in traffic. We have no control
over this 10%. The other 90% is different. You determine the other 90%.
How? By your reaction. You cannot control a red light., but you can control
your reaction. Don't let people fool you; YOU can control how you react.
Let's use an example. You are eating breakfast with your family. Your
daughter knocks over a cup of coffee onto your business shirt. You have no
control over what just what happened. What happens when the next will be
determined by how you react.You curse. You harshly scold your daughter for
knocking the cup over.
She breaks down in tears. After scolding her, you turn to your spouse and
criticize her for placing the cup too close to the edge of the table. A
short verbal battle follows. You storm upstairs and change your shirt. Back
downstairs, you find your daughter has been too busy crying to finish
breakfast and get ready for school. She misses the bus. Your spouse must
leave immediately for work.
You rush to the car and drive your daughter to school. Because you are late,
you drive 40 miles an hour in a 30 mph speed limit. After a 15-minute delay
and throwing $60 traffic fine away, you arrive at school. Your daughter runs
into the building without saying goodbye. After arriving at the office 20
minutes late, you find you forgot your briefcase. Your day has started
terrible. As it continues, it seems to get worse and worse. You look forward
to coming home, When you arrive home, you find small wedge in your
relationship with your spouse and daughter.
Why? Because of how you reacted in the morning. Why did you have a bad day?
A) Did the coffee cause it?
B) Did your daughter cause it?
C) Did the policeman cause it?
D) Did you cause it?
The answer is " D".
You had no control over what happened with the coffee. How you reacted in
those 5 seconds is what caused your bad day. Here is what could have and
should have happened.
Coffee splashes over you. Your daughter is about to cry. You gently say,
"It's ok honey, you just need, to be more careful next time". Grabbing a
towel you rush upstairs. After grabbing a new shirt and your briefcase, you come back down in time to look through the window and see your child getting on the bus.
She turns and waves. You arrive 5 minutes early and cheerfully greet the
staff. Your boss comments on how good the day you are having.
Notice the difference? Two different scenarios. Both started the same. Both
ended different.
Why? Because of how you REACTED. You really do not have any control over 10%
of what happens. The other 90% was determined by your reaction.
Here are some ways to apply the 90/10 principle. If someone says something
negative about you, don't be a sponge. Let the attack roll off like water on
glass. You don't have to let the negative comment affect you! React properly
and it will not ruin your day. A wrong reaction could result in losing a
friend, being fired, getting stressed out etc.
How do you react if someone cuts you off in traffic? Do you lose your
temper? Pound on the steering wheel? A friend of mine had the steering wheel
fall off) Do you curse? Does your blood pressure skyrocket? Do you try and bump them? WHO CARES if you arrive ten seconds later at work? Why let the cars ruin your drive? Remember the 90/10 principle, and do not worry about it.
You are told you lost your job. Why lose sleep and get irritated? It will
work out. Use your worrying energy and time into finding another job. The
plane is late; it is going to mangle your schedule for the day. Why take out
your frustration on the flight attendant? She has no control over what is
going on. Use your time to study, get to know the other passenger. Why get
stressed out? It will just make things worse. Now you know the 90-10
principle. Apply it and you will be amazed at the results. You will lose
nothing if you try it.
The 90-10 principle is incredible. Very few know and apply this principle.
The result? Millions of people are suffering from undeserved stress, trials,
problems and heartache. We all must understand and apply the 90/10
principle.
It CAN change your life!!!
Author : Stephen Covey ( Management Guru)
Have you read this before? Discover the 90/10 Principle. It will change your
life
(at least the way you react to situations). What is this principle?
10% of life is made up of what happens to you. 90% of life is decided by how you react .
What does this mean?
We really have no control over 10% of what happens to us. We cannot stop the
car from breaking down. The plane will be late arriving, which throws our
whole schedule off. A driver may cut us off in traffic. We have no control
over this 10%. The other 90% is different. You determine the other 90%.
How? By your reaction. You cannot control a red light., but you can control
your reaction. Don't let people fool you; YOU can control how you react.
Let's use an example. You are eating breakfast with your family. Your
daughter knocks over a cup of coffee onto your business shirt. You have no
control over what just what happened. What happens when the next will be
determined by how you react.You curse. You harshly scold your daughter for
knocking the cup over.
She breaks down in tears. After scolding her, you turn to your spouse and
criticize her for placing the cup too close to the edge of the table. A
short verbal battle follows. You storm upstairs and change your shirt. Back
downstairs, you find your daughter has been too busy crying to finish
breakfast and get ready for school. She misses the bus. Your spouse must
leave immediately for work.
You rush to the car and drive your daughter to school. Because you are late,
you drive 40 miles an hour in a 30 mph speed limit. After a 15-minute delay
and throwing $60 traffic fine away, you arrive at school. Your daughter runs
into the building without saying goodbye. After arriving at the office 20
minutes late, you find you forgot your briefcase. Your day has started
terrible. As it continues, it seems to get worse and worse. You look forward
to coming home, When you arrive home, you find small wedge in your
relationship with your spouse and daughter.
Why? Because of how you reacted in the morning. Why did you have a bad day?
A) Did the coffee cause it?
B) Did your daughter cause it?
C) Did the policeman cause it?
D) Did you cause it?
The answer is " D".
You had no control over what happened with the coffee. How you reacted in
those 5 seconds is what caused your bad day. Here is what could have and
should have happened.
Coffee splashes over you. Your daughter is about to cry. You gently say,
"It's ok honey, you just need, to be more careful next time". Grabbing a
towel you rush upstairs. After grabbing a new shirt and your briefcase, you come back down in time to look through the window and see your child getting on the bus.
She turns and waves. You arrive 5 minutes early and cheerfully greet the
staff. Your boss comments on how good the day you are having.
Notice the difference? Two different scenarios. Both started the same. Both
ended different.
Why? Because of how you REACTED. You really do not have any control over 10%
of what happens. The other 90% was determined by your reaction.
Here are some ways to apply the 90/10 principle. If someone says something
negative about you, don't be a sponge. Let the attack roll off like water on
glass. You don't have to let the negative comment affect you! React properly
and it will not ruin your day. A wrong reaction could result in losing a
friend, being fired, getting stressed out etc.
How do you react if someone cuts you off in traffic? Do you lose your
temper? Pound on the steering wheel? A friend of mine had the steering wheel
fall off) Do you curse? Does your blood pressure skyrocket? Do you try and bump them? WHO CARES if you arrive ten seconds later at work? Why let the cars ruin your drive? Remember the 90/10 principle, and do not worry about it.
You are told you lost your job. Why lose sleep and get irritated? It will
work out. Use your worrying energy and time into finding another job. The
plane is late; it is going to mangle your schedule for the day. Why take out
your frustration on the flight attendant? She has no control over what is
going on. Use your time to study, get to know the other passenger. Why get
stressed out? It will just make things worse. Now you know the 90-10
principle. Apply it and you will be amazed at the results. You will lose
nothing if you try it.
The 90-10 principle is incredible. Very few know and apply this principle.
The result? Millions of people are suffering from undeserved stress, trials,
problems and heartache. We all must understand and apply the 90/10
principle.
It CAN change your life!!!
Thursday, May 11, 2006
Wednesday, May 03, 2006
Ab Workout for guys
Article from MSN, just want to share the good article found at.
http://health.msn.com/fitness/articlepage.aspx?cp-documentid=100123672
The workout
This routine attacks your midsection from every angle, so your abs are constantly challenged. Choose one exercise from each section, for a total of five. Perform one move immediately after the other for the specified number of repetitions, then repeat the circuit. After four weeks, choose the exercise in each group that you didn't perform in your previous workouts. This ensures that your muscles are always adapting to new stress.
Burn Off Your Belly
This interval routine is designed to strip away the excess flab that's hiding your six-pack. Do it three days a week, after your weight session or on the days in between. Use your mode of choice-a treadmill, stationary bike or rowing machine.
Step 1: Warm up for three to five minutes at an easy pace, about 30 to 40 percent of your best effort.
Step 2: Run, cycle or row at 95 percent of your highest effort for 30 seconds.
Step 3: Perform active rest, slowing back down to your warmup speed for 90 seconds.
Step 4: Repeat five to seven times.
Step 5: Once you can complete eight intervals, reduce the length of your active rest periods by five to 10 seconds each workout, until they're only 30 seconds long.
Section 1
Standing Cable Crunch
Attach a rope to a high-pulley cable. Stand with your back to the weight stack and hold one end of the rope on the left side of your head and the other end on the right. Crunch your torso down. Pause, then return to the starting position. Do 10 to 15 repetitions.
Weighted Crunch
Lie on your back with your knees bent, and hold a weight plate or dumbbell on your chest. (If that's too hard, just do a traditional crunch.) Slowly crunch up, bringing your shoulder blades off the floor. Pause, then lower yourself to the starting position. Do 10 to 15 repetitions.
Section 2
Pulse-up
Lie with your hands under your tailbone and your legs extended straight up toward the ceiling, perpendicular to your torso. Lift your hips off the floor in a straight line. Pause, then lower your hips. Do 10 to 15 repetitions.
Figure-8 Crunch
Lie on your back with your knees bent at a 90-degree angle, squeezing a light medicine ball tightly between them, and place your feet flat on the floor. Place your fingers behind your ears, then slowly raise your head, shoulders and feet off the floor. Keeping your torso up, move your knees in a figure-8 motion. Each figure-8 is one repetition. Do 10 to 15 repetitions.
Section 3
Medicine-Ball Torso Rotation
Hold a medicine ball or basketball in front of you as you kneel and sit back on your heels. Quickly twist to your left and set the ball down behind your back. Twist to the right and pick up the ball, then bring it around to your left and set it down again. That's one repetition. Do 10 to 15 repetitions.
Side Jackknife
Lie on your left side, with your legs nearly straight and slightly raised off the floor. Also, lift your torso off the floor, with your left forearm on the floor for balance. Hold your other hand behind your right ear, with your elbow pointed toward your feet. Lift your legs toward your torso while keeping your torso stationary. Pause to feel the contraction on the right side of your waist. Then slowly lower your legs and repeat. Finish the set, then switch sides. Do 10 to 15 repetitions.
Section 4
Two-Point Bridge
Assume the standard pushup position. Lift your right arm and left leg off the floor at the same time. Hold for three to five seconds, then lower them. That's one repetition. Return to the starting position, then repeat, lifting your left arm and right leg this time. Do 10 to 15 repetitions.
Negative Crunch
Sit with your knees bent and your feet flat on the floor, shoulder-width apart. (Tuck your feet under weights to maintain balance.) Extend your arms in front of you with your fingers interlaced. Begin with your upper body at slightly less than a 90-degree angle to the floor. Lower your upper body toward the floor, curling your torso forward, rounding your lower back, and keeping your abs contracted. When your upper body reaches a 45-degree angle to the floor, return to the starting position. Do 10 to 15 repetitions.
Section 5
Back Extension
Position yourself in a back-extension station, and hook your feet under the leg anchor. Hold your arms straight out beyond your head. Lower your torso, allowing your lower back to round slightly, until it's just short of perpendicular to the floor. Pause, then raise your upper body until it's slightly above parallel to the floor. At this point, you should have a slight arch in your back, and your shoulder blades should be pulled together. Do 10 to 15 repetitions.
Twisting Back Extension
Position yourself in a back-extension station, and hook your feet under the leg anchor. Lace your hands behind your head. Lower your torso, allowing your lower back to round slightly, until it's just short of perpendicular to the floor. Raise and twist your upper body until it's in line with your hips and facing right. That's one repetition. Repeat the move, this time twisting to your left. Do 10 to 15 repetitions.
http://health.msn.com/fitness/articlepage.aspx?cp-documentid=100123672
The workout
This routine attacks your midsection from every angle, so your abs are constantly challenged. Choose one exercise from each section, for a total of five. Perform one move immediately after the other for the specified number of repetitions, then repeat the circuit. After four weeks, choose the exercise in each group that you didn't perform in your previous workouts. This ensures that your muscles are always adapting to new stress.
Burn Off Your Belly
This interval routine is designed to strip away the excess flab that's hiding your six-pack. Do it three days a week, after your weight session or on the days in between. Use your mode of choice-a treadmill, stationary bike or rowing machine.
Step 1: Warm up for three to five minutes at an easy pace, about 30 to 40 percent of your best effort.
Step 2: Run, cycle or row at 95 percent of your highest effort for 30 seconds.
Step 3: Perform active rest, slowing back down to your warmup speed for 90 seconds.
Step 4: Repeat five to seven times.
Step 5: Once you can complete eight intervals, reduce the length of your active rest periods by five to 10 seconds each workout, until they're only 30 seconds long.
Section 1
Standing Cable Crunch
Attach a rope to a high-pulley cable. Stand with your back to the weight stack and hold one end of the rope on the left side of your head and the other end on the right. Crunch your torso down. Pause, then return to the starting position. Do 10 to 15 repetitions.
Weighted Crunch
Lie on your back with your knees bent, and hold a weight plate or dumbbell on your chest. (If that's too hard, just do a traditional crunch.) Slowly crunch up, bringing your shoulder blades off the floor. Pause, then lower yourself to the starting position. Do 10 to 15 repetitions.
Section 2
Pulse-up
Lie with your hands under your tailbone and your legs extended straight up toward the ceiling, perpendicular to your torso. Lift your hips off the floor in a straight line. Pause, then lower your hips. Do 10 to 15 repetitions.
Figure-8 Crunch
Lie on your back with your knees bent at a 90-degree angle, squeezing a light medicine ball tightly between them, and place your feet flat on the floor. Place your fingers behind your ears, then slowly raise your head, shoulders and feet off the floor. Keeping your torso up, move your knees in a figure-8 motion. Each figure-8 is one repetition. Do 10 to 15 repetitions.
Section 3
Medicine-Ball Torso Rotation
Hold a medicine ball or basketball in front of you as you kneel and sit back on your heels. Quickly twist to your left and set the ball down behind your back. Twist to the right and pick up the ball, then bring it around to your left and set it down again. That's one repetition. Do 10 to 15 repetitions.
Side Jackknife
Lie on your left side, with your legs nearly straight and slightly raised off the floor. Also, lift your torso off the floor, with your left forearm on the floor for balance. Hold your other hand behind your right ear, with your elbow pointed toward your feet. Lift your legs toward your torso while keeping your torso stationary. Pause to feel the contraction on the right side of your waist. Then slowly lower your legs and repeat. Finish the set, then switch sides. Do 10 to 15 repetitions.
Section 4
Two-Point Bridge
Assume the standard pushup position. Lift your right arm and left leg off the floor at the same time. Hold for three to five seconds, then lower them. That's one repetition. Return to the starting position, then repeat, lifting your left arm and right leg this time. Do 10 to 15 repetitions.
Negative Crunch
Sit with your knees bent and your feet flat on the floor, shoulder-width apart. (Tuck your feet under weights to maintain balance.) Extend your arms in front of you with your fingers interlaced. Begin with your upper body at slightly less than a 90-degree angle to the floor. Lower your upper body toward the floor, curling your torso forward, rounding your lower back, and keeping your abs contracted. When your upper body reaches a 45-degree angle to the floor, return to the starting position. Do 10 to 15 repetitions.
Section 5
Back Extension
Position yourself in a back-extension station, and hook your feet under the leg anchor. Hold your arms straight out beyond your head. Lower your torso, allowing your lower back to round slightly, until it's just short of perpendicular to the floor. Pause, then raise your upper body until it's slightly above parallel to the floor. At this point, you should have a slight arch in your back, and your shoulder blades should be pulled together. Do 10 to 15 repetitions.
Twisting Back Extension
Position yourself in a back-extension station, and hook your feet under the leg anchor. Lace your hands behind your head. Lower your torso, allowing your lower back to round slightly, until it's just short of perpendicular to the floor. Raise and twist your upper body until it's in line with your hips and facing right. That's one repetition. Repeat the move, this time twisting to your left. Do 10 to 15 repetitions.
Tuesday, April 18, 2006
Fight Global Warming - Environmental Defense
I think every one should go thru this website to understand the impact of our current lifestyle upon earth and nature and to our future generations. I think environment and global warming will alone cost our future generation more than other factors affecting them.
Fight Global Warming - Environmental Defense
Fight Global Warming - Environmental Defense
Thursday, April 13, 2006
Soo True.
"The future lies before you, like paths of pure white snow. Be careful, how you tread it, for every step will show ."
Recently I came across this "saying". I then realized how true it is not only in our day to day life, but how we design and develop.
Every line of code we write(or paste!), every single variable we define, every class or interface we design defines what and how we are in this software world.
Sometimes we write code that we try so much to conceal from the rest of team/world. The code that is riddled with shoddy variable names and kludge class definitions and irresponsible code usage and little or no error handling. The kinda of code we shy away from adding into any source safe. The kinda code that you pray your peers would skip right ahead during code reviews, if and when it happens.
Sometime in our better days, when we had just the right morning, just the perfect coffee(developer's fuel!) and when our boss was out on vacation, we just happen to write the most superb code that we could write for a long time. The kinda of code, you spend another couple of hours adding comments to. The kinda code that lets you sit back and think of new business possibilities and products that you can develop with this kinda code. The kinda code that you would send out meeting invites to your colleagues to review and demo your application to. Those are the day after which you go home feeling that you have found the purpose of your day to day life.
Just like life, out software days have their ups and downs, Highs and lows, errors and flawless complies, network issues and blazing connectivity times. Days when we have to struggle with just one single issue hours on ends and days when we completed our tasks, coded, tested and checked in, we start to browse the net more freely with a self assumed right to browse the net during work hours.
Just like life, everything we do defines what we are and everything we do sticks with us. Cuz as a software (developer/analyst/lead/programmer/architect) we are what we develop. So the next time you start off to develop any piece of software, take a couple of minutes, or one with a tight deadline, and sit back and think what you are going to develop. Its not just another piece of software, it a piece of you, your history and what you are.
Recently I came across this "saying". I then realized how true it is not only in our day to day life, but how we design and develop.
Every line of code we write(or paste!), every single variable we define, every class or interface we design defines what and how we are in this software world.
Sometimes we write code that we try so much to conceal from the rest of team/world. The code that is riddled with shoddy variable names and kludge class definitions and irresponsible code usage and little or no error handling. The kinda of code we shy away from adding into any source safe. The kinda code that you pray your peers would skip right ahead during code reviews, if and when it happens.
Sometime in our better days, when we had just the right morning, just the perfect coffee(developer's fuel!) and when our boss was out on vacation, we just happen to write the most superb code that we could write for a long time. The kinda of code, you spend another couple of hours adding comments to. The kinda code that lets you sit back and think of new business possibilities and products that you can develop with this kinda code. The kinda code that you would send out meeting invites to your colleagues to review and demo your application to. Those are the day after which you go home feeling that you have found the purpose of your day to day life.
Just like life, out software days have their ups and downs, Highs and lows, errors and flawless complies, network issues and blazing connectivity times. Days when we have to struggle with just one single issue hours on ends and days when we completed our tasks, coded, tested and checked in, we start to browse the net more freely with a self assumed right to browse the net during work hours.
Just like life, everything we do defines what we are and everything we do sticks with us. Cuz as a software (developer/analyst/lead/programmer/architect) we are what we develop. So the next time you start off to develop any piece of software, take a couple of minutes, or one with a tight deadline, and sit back and think what you are going to develop. Its not just another piece of software, it a piece of you, your history and what you are.
Tuesday, April 11, 2006
Microsoft Interview Questions
After I moved to columbus OH, I got a call for an interview with MS. I am glad I did not take it to go back to seattle for this. Here are some interview questions ....
Microsoft Interview Questions
Microsoft Interview Questions
Friday, March 31, 2006
Released Version - openSUSE
I need to install this at home. Let me c how this works
Released Version - openSUSE
Released Version - openSUSE
Thursday, March 30, 2006
ASP.NET 2.0 Membership, Roles, Forms Authentication, and Security Resources
Great article I found for Lots of MSDN asp.net 2.0 links for how tos. Ofcourse in Scott's logs
ASP.NET 2.0 Membership, Roles, Forms Authentication, and Security Resources
ASP.NET 2.0 Membership, Roles, Forms Authentication, and Security Resources
C#.NET Interview Questions - Part 4- and More
If it were a relatively short interview, I would ask:
- Briefly explain how code behind works and contrast that using the inline
style.
- What are HTML controls, Web controls, and server controls.
- Briefly explain how the server control validation controls work.
- Briefly explain what user controls are and what server controls are and
the differences between the two.
- Briefly explain how server form post-back works (perhaps ask about view state as well).
- Can the action attribute of a server-side "Form" tag be set to a value and if not how can you possibly pass data from a form page to a subsequent page. (Extra credit: Have you heard of comdna. :-)
- Briefly describe the role of global.asax.
- How would ASP and ASP.NET apps run at the same time on the same server?
- What are good ADO.NET object(s) to replace the ADO Recordset object.
- Briefly explain how code behind works and contrast that using the inline
style.
- What are HTML controls, Web controls, and server controls.
- Briefly explain how the server control validation controls work.
- Briefly explain what user controls are and what server controls are and
the differences between the two.
- Briefly explain how server form post-back works (perhaps ask about view state as well).
- Can the action attribute of a server-side "Form" tag be set to a value and if not how can you possibly pass data from a form page to a subsequent page. (Extra credit: Have you heard of comdna. :-)
- Briefly describe the role of global.asax.
- How would ASP and ASP.NET apps run at the same time on the same server?
- What are good ADO.NET object(s) to replace the ADO Recordset object.
ASP.NET Interview Questions - Part 3
Below is a list of 49 ASP.NET interview questions that I've
pulled from various sources - including this list group (pardon any
plagerism)...
Anybody with real asp.net experience who feels like they could make it
through most technical interviews on the subject care to give some
short/sweet top-of-my-head type answers to these.
If any of these beg more information, just say so. If any are unlikely
or unfair interview questions, just say so.
1. Explain the differences between Server-side and Client-side code?
2. What type of code (server or client) is found in a Code-Behind
class?
3. Should validation (did the user enter a real date) occur
server-side or client-side? Why?
4. What does the "EnableViewState" property do? Why would I want it on or off?
5. What is the difference between Server.Transfer and
Response.Redirect? Why
would I choose one over the other?
6. Can you give an example of when it would be appropriate to use a
web service as opposed to a non-serviced .NET component
7. Let's say I have an existing application written using Visual
Studio 6 (VB 6, InterDev 6) and this application utilizes Windows 2000
COM+ transaction services. How would you approach migrating this
application to .NET
8. Can you explain the difference between an ADO.NET Dataset and an
ADO Recordset?
9. Can you give an example of what might be best suited to place in
the Application_Start and Session_Start subroutines?
10. If I'm developing an application that must accomodate multiple
security levels though secure login and my ASP.NET web appplication is
spanned across three web-servers (using round-robbin load balancing)
what would be the best approach to maintain login-in state for the
users?
11. What are ASP.NET Web Forms? How is this technology different than
what is available though ASP (1.0-3.0)?
12. How does VB.NET/C# achieve polymorphism?
11. Can you explain what inheritance is and an example of when you
might use it?
13. How would you implement inheritance using VB.NET/C#?
14. Whats an assembly
15. Describe the difference between inline and code behind - which is
best in a
16. loosely coupled solution
17. Explain what a diffgram is, and a good use for one
18. Where would you use an iHTTPModule, and what are the limitations
of any
19. approach you might take in implementing one
20. What are the disadvantages of viewstate/what are the benefits
21 Describe session handling in a webfarm, how does it work and what
are the > limits
22. How would you get ASP.NET running in Apache web servers - why
would you even do this?
23. Whats MSIL, and why should my developers need an appreciation of
it if at all?
24. In what order do the events of an ASPX page execute. As a
developer is it important to undertsand these events?
25. Which method do you invoke on the DataAdapter control to load your
generated dataset with data?
26. Can you edit data in the Repeater control?
27. Which template must you provide, in order to display data in a
Repeater control?
28. How can you provide an alternating color scheme in a Repeater
control?
29. 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?
30. What base class do all Web Forms inherit from?
31. What method do you use to explicitly kill a user s session?
32 How do you turn off cookies for one page in your site?
33. Which two properties are on every validation control?
34. What tags do you need to add within the asp:datagrid tags to bind
columns manually?
35. How do you create a permanent cookie?
36. What tag do you use to add a hyperlink column to the DataGrid?
37. What is the standard you use to wrap up a call to a Web service
38. Which method do you use to redirect the user to another page
without performing a round trip to the client?
39. What is the transport protocol you use to call a Web service SOAP
40. True or False: A Web service can only be written in .NET
41. What does WSDL stand for?
42. What property do you have to set to tell the grid which page to go
to when using the Pager object?
43. Where on the Internet would you look for Web services?
44. What tags do you need to add within the asp:datagrid tags to bind
columns manually.
45. Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?
46. How is a property designated as read-only?
47. Which control would you use if you needed to make sure the values
in two different controls matched?
48. True or False: To test a Web service you must create a windows
application or Web application to consume this service?
49. How many classes can a single .NET DLL contain?
pulled from various sources - including this list group (pardon any
plagerism)...
Anybody with real asp.net experience who feels like they could make it
through most technical interviews on the subject care to give some
short/sweet top-of-my-head type answers to these.
If any of these beg more information, just say so. If any are unlikely
or unfair interview questions, just say so.
1. Explain the differences between Server-side and Client-side code?
2. What type of code (server or client) is found in a Code-Behind
class?
3. Should validation (did the user enter a real date) occur
server-side or client-side? Why?
4. What does the "EnableViewState" property do? Why would I want it on or off?
5. What is the difference between Server.Transfer and
Response.Redirect? Why
would I choose one over the other?
6. Can you give an example of when it would be appropriate to use a
web service as opposed to a non-serviced .NET component
7. Let's say I have an existing application written using Visual
Studio 6 (VB 6, InterDev 6) and this application utilizes Windows 2000
COM+ transaction services. How would you approach migrating this
application to .NET
8. Can you explain the difference between an ADO.NET Dataset and an
ADO Recordset?
9. Can you give an example of what might be best suited to place in
the Application_Start and Session_Start subroutines?
10. If I'm developing an application that must accomodate multiple
security levels though secure login and my ASP.NET web appplication is
spanned across three web-servers (using round-robbin load balancing)
what would be the best approach to maintain login-in state for the
users?
11. What are ASP.NET Web Forms? How is this technology different than
what is available though ASP (1.0-3.0)?
12. How does VB.NET/C# achieve polymorphism?
11. Can you explain what inheritance is and an example of when you
might use it?
13. How would you implement inheritance using VB.NET/C#?
14. Whats an assembly
15. Describe the difference between inline and code behind - which is
best in a
16. loosely coupled solution
17. Explain what a diffgram is, and a good use for one
18. Where would you use an iHTTPModule, and what are the limitations
of any
19. approach you might take in implementing one
20. What are the disadvantages of viewstate/what are the benefits
21 Describe session handling in a webfarm, how does it work and what
are the > limits
22. How would you get ASP.NET running in Apache web servers - why
would you even do this?
23. Whats MSIL, and why should my developers need an appreciation of
it if at all?
24. In what order do the events of an ASPX page execute. As a
developer is it important to undertsand these events?
25. Which method do you invoke on the DataAdapter control to load your
generated dataset with data?
26. Can you edit data in the Repeater control?
27. Which template must you provide, in order to display data in a
Repeater control?
28. How can you provide an alternating color scheme in a Repeater
control?
29. 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?
30. What base class do all Web Forms inherit from?
31. What method do you use to explicitly kill a user s session?
32 How do you turn off cookies for one page in your site?
33. Which two properties are on every validation control?
34. What tags do you need to add within the asp:datagrid tags to bind
columns manually?
35. How do you create a permanent cookie?
36. What tag do you use to add a hyperlink column to the DataGrid?
37. What is the standard you use to wrap up a call to a Web service
38. Which method do you use to redirect the user to another page
without performing a round trip to the client?
39. What is the transport protocol you use to call a Web service SOAP
40. True or False: A Web service can only be written in .NET
41. What does WSDL stand for?
42. What property do you have to set to tell the grid which page to go
to when using the Pager object?
43. Where on the Internet would you look for Web services?
44. What tags do you need to add within the asp:datagrid tags to bind
columns manually.
45. Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?
46. How is a property designated as read-only?
47. Which control would you use if you needed to make sure the values
in two different controls matched?
48. True or False: To test a Web service you must create a windows
application or Web application to consume this service?
49. How many classes can a single .NET DLL contain?
C#.NET Interview Questions - Part 2
1. What’s the implicit name of the parameter that gets passed into the class’ set method? Value, and it’s datatype depends on whatever variable we’re changing.
1. How do you inherit from a class in C#? Place a colon and then the name of the base class. Notice that it’s double colon in C++.
2. Does C# support multiple inheritance? No, use interfaces instead.
3. When you inherit a protected class-level variable, who is it available to? Classes in the same namespace.
4. Are private class-level variables inherited? Yes, but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are.
5. Describe the accessibility modifier protected internal. It’s available to derived classes and classes within the same Assembly (and naturally from the base class it’s declared in).
6. C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write? Two. Once you write at least one constructor, C# cancels the freebie constructor, and now you have to write one yourself, even if there’s no implementation in it.
7. What’s the top .NET class that everything is derived from? System.Object.
8. How’s method overriding different from overloading? When overriding, you change the method behavior for a derived class. Overloading simply involves having a method with the same name within the class.
9. What does the keyword virtual mean in the method definition? The method can be over-ridden.
10. Can you declare the override method static while the original method is non-static? No, you can’t, the signature of the virtual method must remain the same, only the keyword virtual is changed to keyword override.
11. Can you override private virtual methods? No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access.
12. Can you prevent your class from being inherited and becoming a base class for some other classes? Yes, that’s what keyword sealed in the class definition is for. The developer trying to derive from your class will get a message: cannot inherit from Sealed class WhateverBaseClassName. It’s the same concept as final class in Java.
13. Can you allow class to be inherited, but prevent the method from being over-ridden? Yes, just leave the class public and make the method sealed.
14. What’s an abstract class? A class that cannot be instantiated. A concept in C++ known as pure virtual method. A class that must be inherited and have the methods over-ridden. Essentially, it’s a blueprint for a class without any implementation.
15. When do you absolutely have to declare a class as abstract (as opposed to free-willed educated choice or decision based on UML diagram)? When at least one of the methods in the class is abstract. When the class itself is inherited from an abstract class, but not all base abstract methods have been over-ridden.
16. What’s an interface class? It’s an abstract class with public abstract methods all of which must be implemented in the inherited classes.
17. Why can’t you specify the accessibility modifier for methods inside the interface? They all must be public. Therefore, to prevent you from getting the false impression that you have any freedom of choice, you are not allowed to specify any accessibility, it’s public by default.
18. Can you inherit multiple interfaces? Yes, why not.
19. And if they have conflicting method names? It’s up to you to implement the method inside your own class, so implementation is left entirely up to you. This might cause a problem on a higher-level scale if similarly named methods from different interfaces expect different data, but as far as compiler cares you’re okay.
20. What’s the difference between an interface and abstract class? In the interface all methods must be abstract, in the abstract class some methods can be concrete. In the interface no accessibility modifiers are allowed, which is ok in abstract classes.
21. How can you overload a method? Different parameter data types, different number of parameters, different order of parameters.
22. If a base class has a bunch of overloaded constructors, and an inherited class has another bunch of overloaded constructors, can you enforce a call from an inherited constructor to an arbitrary base constructor? Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.
23. What’s the difference between System.String and System.StringBuilder classes? System.String is immutable, System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.
1. How do you inherit from a class in C#? Place a colon and then the name of the base class. Notice that it’s double colon in C++.
2. Does C# support multiple inheritance? No, use interfaces instead.
3. When you inherit a protected class-level variable, who is it available to? Classes in the same namespace.
4. Are private class-level variables inherited? Yes, but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are.
5. Describe the accessibility modifier protected internal. It’s available to derived classes and classes within the same Assembly (and naturally from the base class it’s declared in).
6. C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write? Two. Once you write at least one constructor, C# cancels the freebie constructor, and now you have to write one yourself, even if there’s no implementation in it.
7. What’s the top .NET class that everything is derived from? System.Object.
8. How’s method overriding different from overloading? When overriding, you change the method behavior for a derived class. Overloading simply involves having a method with the same name within the class.
9. What does the keyword virtual mean in the method definition? The method can be over-ridden.
10. Can you declare the override method static while the original method is non-static? No, you can’t, the signature of the virtual method must remain the same, only the keyword virtual is changed to keyword override.
11. Can you override private virtual methods? No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access.
12. Can you prevent your class from being inherited and becoming a base class for some other classes? Yes, that’s what keyword sealed in the class definition is for. The developer trying to derive from your class will get a message: cannot inherit from Sealed class WhateverBaseClassName. It’s the same concept as final class in Java.
13. Can you allow class to be inherited, but prevent the method from being over-ridden? Yes, just leave the class public and make the method sealed.
14. What’s an abstract class? A class that cannot be instantiated. A concept in C++ known as pure virtual method. A class that must be inherited and have the methods over-ridden. Essentially, it’s a blueprint for a class without any implementation.
15. When do you absolutely have to declare a class as abstract (as opposed to free-willed educated choice or decision based on UML diagram)? When at least one of the methods in the class is abstract. When the class itself is inherited from an abstract class, but not all base abstract methods have been over-ridden.
16. What’s an interface class? It’s an abstract class with public abstract methods all of which must be implemented in the inherited classes.
17. Why can’t you specify the accessibility modifier for methods inside the interface? They all must be public. Therefore, to prevent you from getting the false impression that you have any freedom of choice, you are not allowed to specify any accessibility, it’s public by default.
18. Can you inherit multiple interfaces? Yes, why not.
19. And if they have conflicting method names? It’s up to you to implement the method inside your own class, so implementation is left entirely up to you. This might cause a problem on a higher-level scale if similarly named methods from different interfaces expect different data, but as far as compiler cares you’re okay.
20. What’s the difference between an interface and abstract class? In the interface all methods must be abstract, in the abstract class some methods can be concrete. In the interface no accessibility modifiers are allowed, which is ok in abstract classes.
21. How can you overload a method? Different parameter data types, different number of parameters, different order of parameters.
22. If a base class has a bunch of overloaded constructors, and an inherited class has another bunch of overloaded constructors, can you enforce a call from an inherited constructor to an arbitrary base constructor? Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.
23. What’s the difference between System.String and System.StringBuilder classes? System.String is immutable, System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.
C#.NET Interview Questions
1. How big is the datatype int in .NET? 32 bits.
2. How big is the char? 16 bits (Unicode).
3. How do you initiate a string without escaping each backslash? Put an @ sign in front of the double-quoted string.
4. What are valid signatures for the Main function?
· public static void Main()
· public static int Main()
· public static void Main( string[] args )
· public static int Main(string[] args )
5. How do you initialize a two-dimensional array that you don’t know the dimensions of?
· int [, ] myArray; //declaration
· myArray= new int [5, 8]; //actualinitialization
6. What’s the access level of the visibility type internal? Current assembly.
7. What’s the difference between struct and class in C#?
· Structscannot be inherited.
· Structsare passed by value, not by reference.
· Structis stored on the stack, not the heap.
8. Explain encapsulation. The implementation is hidden, the interface is exposed.
9. What data type should you use if you want an 8-bit value that’s signed? sbyte.
10. Speaking of Boolean data types, what’s different between C# and C/C++? There’s no conversion between 0 and false, as well as any other number and true, like in C/C++.
11. Where are the value-type variables allocated in the computer RAM? Stack.
12. Where do the reference-type variables go in the RAM? The references go on the stack, while the objects themselves go on the heap.
13. What is the difference between the value-type variables and reference-type variables in terms of garbage collection? The value-type variables are not garbage-collected, they just fall off the stack when they fall out of scope, the reference-type objects are picked up by GC when their references go null.
14. How do you convert a string into an integer in .NET? Int32.Parse(string)
15. How do you box a primitive data type variable? Assign it to the object, pass an object.
16. Why do you need to box a primitive variable? To pass it by reference.
17. What’s the difference between Java and .NET garbage collectors? Sun left the implementation of a specific garbage collector up to the JRE developer, so their performance varies widely, depending on whose JRE you’re using. Microsoft standardized on their garbage collection.
18. How do you enforce garbage collection in .NET? System.GC.Collect();
19. Can you declare a C++ type destructor in C# like ~MyClass()? Yes, but what’s the point, since it will call Finalize(), and Finalize() has no guarantees when the memory will be cleaned up, plus, it introduces additional load on the garbage collector.
20. What’s different about namespace declaration when comparing that to package declaration in Java? No semicolon.
21. What’s the difference between const and readonly? You can initialize readonly variables to some runtime values. Let’s say your program uses current date and time as one of the values that won’t change. This way you declare public readonly string DateT = new DateTime().ToString().
22. What does \a character do? On most systems, produces a rather annoying beep.
23. Can you create enumerated data types in C#? Yes.
24. What’s different about switch statements in C#? No fall-throughs allowed.
25. What happens when you encounter a continue statement inside the for loop? The code for the rest of the loop is ignored, the control is transferred back to the beginning of the loop.
26. Is goto statement supported in C#? How about Java? Gotos are supported in C#to the fullest. In Java goto is a reserved keyword that provides absolutely no functionality.
2. How big is the char? 16 bits (Unicode).
3. How do you initiate a string without escaping each backslash? Put an @ sign in front of the double-quoted string.
4. What are valid signatures for the Main function?
· public static void Main()
· public static int Main()
· public static void Main( string[] args )
· public static int Main(string[] args )
5. How do you initialize a two-dimensional array that you don’t know the dimensions of?
· int [, ] myArray; //declaration
· myArray= new int [5, 8]; //actualinitialization
6. What’s the access level of the visibility type internal? Current assembly.
7. What’s the difference between struct and class in C#?
· Structscannot be inherited.
· Structsare passed by value, not by reference.
· Structis stored on the stack, not the heap.
8. Explain encapsulation. The implementation is hidden, the interface is exposed.
9. What data type should you use if you want an 8-bit value that’s signed? sbyte.
10. Speaking of Boolean data types, what’s different between C# and C/C++? There’s no conversion between 0 and false, as well as any other number and true, like in C/C++.
11. Where are the value-type variables allocated in the computer RAM? Stack.
12. Where do the reference-type variables go in the RAM? The references go on the stack, while the objects themselves go on the heap.
13. What is the difference between the value-type variables and reference-type variables in terms of garbage collection? The value-type variables are not garbage-collected, they just fall off the stack when they fall out of scope, the reference-type objects are picked up by GC when their references go null.
14. How do you convert a string into an integer in .NET? Int32.Parse(string)
15. How do you box a primitive data type variable? Assign it to the object, pass an object.
16. Why do you need to box a primitive variable? To pass it by reference.
17. What’s the difference between Java and .NET garbage collectors? Sun left the implementation of a specific garbage collector up to the JRE developer, so their performance varies widely, depending on whose JRE you’re using. Microsoft standardized on their garbage collection.
18. How do you enforce garbage collection in .NET? System.GC.Collect();
19. Can you declare a C++ type destructor in C# like ~MyClass()? Yes, but what’s the point, since it will call Finalize(), and Finalize() has no guarantees when the memory will be cleaned up, plus, it introduces additional load on the garbage collector.
20. What’s different about namespace declaration when comparing that to package declaration in Java? No semicolon.
21. What’s the difference between const and readonly? You can initialize readonly variables to some runtime values. Let’s say your program uses current date and time as one of the values that won’t change. This way you declare public readonly string DateT = new DateTime().ToString().
22. What does \a character do? On most systems, produces a rather annoying beep.
23. Can you create enumerated data types in C#? Yes.
24. What’s different about switch statements in C#? No fall-throughs allowed.
25. What happens when you encounter a continue statement inside the for loop? The code for the rest of the loop is ignored, the control is transferred back to the beginning of the loop.
26. Is goto statement supported in C#? How about Java? Gotos are supported in C#to the fullest. In Java goto is a reserved keyword that provides absolutely no functionality.
Monday, March 27, 2006
dmitryr's blog : RSS Toolkit Update
This Article should be interesting.
dmitryr's blog : RSS Toolkit Update
dmitryr's blog : RSS Toolkit Update
Monday, March 20, 2006
A CAPTCHA Control for ASP.NET 2
Hmm, I have used similar code like a year back and this kid just put it as an article ?!? - Infact this code is as is in msdn.com.
File Row Splitting Based on Defined Enumerators
using System;
using System.IO;
using System.Collections;
using System.Configuration;
namespace HAX_ELIG_IB
{
///
/// Summary description for IBFile.
///
public class IBFile
{
public enum IBRecordType
{
I1 = 1,
I2 ,
I3 ,
S ,
C ,
D1,
D2,
D3
}
private string fileName = string.Empty;
private string filenamepath = string.Empty;
private FileStream aFileStream = null;
private IBRecordType aRectype = 0;
public IBRecordType RecType
{
get
{
return this.aRectype;
}
}
StreamWriter fileStreamWriter = null;
public IBFile(IBRecordType TypeofRecord)
{
string filenamepath = ((string)ConfigurationSettings.AppSettings.GetValues("RecordFileNamePath").GetValue(0));
fileName = filenamepath + Enum.GetName(typeof(IBFile.IBRecordType),TypeofRecord) + ".txt";
fileStreamWriter = File.CreateText(fileName);
this.aRectype = TypeofRecord;
}
public void WriteLine(string Line)
{
fileStreamWriter.WriteLine(Line);
}
public void CloseFile()
{
this.fileStreamWriter.Close();
}
}
}
#region Using Directives
using System;
using System.Collections;
using System.Text;
#endregion
namespace HAX_ELIG_IB
{
public class IBFileCollection : CollectionBase
{
#region Properties
public IBFile this [int index]
{
get
{
return (IBFile) List[index];
}
}
#endregion
#region Business Logic
public bool Find(IBFile.IBRecordType aRtype, out IBFile aFile)
{
foreach (IBFile current in this)
{
if (current.RecType == aRtype)
{
aFile = current;
return true;
}
}
aFile = null;
return false;
}
public void Add(IBFile.IBRecordType aRectype)
{
List.Add(new IBFile(aRectype));
}
public bool Contains(IBFile aItem)
{
foreach (IBFile child in List)
{
if (child.Equals(aItem))
{
return true;
}
}
return false;
}
public void WriteLine(string line, IBFile.IBRecordType aRecType)
{
foreach (IBFile current in this)
{
if (current.RecType == aRecType)
{
current.WriteLine(line);
return;
}
}
}
#endregion
#region Constructor
public IBFileCollection()
{
foreach(string filetype in Enum.GetNames(typeof(IBFile.IBRecordType)))
{
this.Add((IBFile.IBRecordType)Enum.Parse(typeof(IBFile.IBRecordType),filetype));
}
}
public void CloseAll()
{
foreach(IBFile ibfile in this)
{
ibfile.CloseFile();
}
}
#endregion
}
}
web.config
using System.IO;
using System.Collections;
using System.Configuration;
namespace HAX_ELIG_IB
{
///
/// Summary description for IBFile.
///
public class IBFile
{
public enum IBRecordType
{
I1 = 1,
I2 ,
I3 ,
S ,
C ,
D1,
D2,
D3
}
private string fileName = string.Empty;
private string filenamepath = string.Empty;
private FileStream aFileStream = null;
private IBRecordType aRectype = 0;
public IBRecordType RecType
{
get
{
return this.aRectype;
}
}
StreamWriter fileStreamWriter = null;
public IBFile(IBRecordType TypeofRecord)
{
string filenamepath = ((string)ConfigurationSettings.AppSettings.GetValues("RecordFileNamePath").GetValue(0));
fileName = filenamepath + Enum.GetName(typeof(IBFile.IBRecordType),TypeofRecord) + ".txt";
fileStreamWriter = File.CreateText(fileName);
this.aRectype = TypeofRecord;
}
public void WriteLine(string Line)
{
fileStreamWriter.WriteLine(Line);
}
public void CloseFile()
{
this.fileStreamWriter.Close();
}
}
}
#region Using Directives
using System;
using System.Collections;
using System.Text;
#endregion
namespace HAX_ELIG_IB
{
public class IBFileCollection : CollectionBase
{
#region Properties
public IBFile this [int index]
{
get
{
return (IBFile) List[index];
}
}
#endregion
#region Business Logic
public bool Find(IBFile.IBRecordType aRtype, out IBFile aFile)
{
foreach (IBFile current in this)
{
if (current.RecType == aRtype)
{
aFile = current;
return true;
}
}
aFile = null;
return false;
}
public void Add(IBFile.IBRecordType aRectype)
{
List.Add(new IBFile(aRectype));
}
public bool Contains(IBFile aItem)
{
foreach (IBFile child in List)
{
if (child.Equals(aItem))
{
return true;
}
}
return false;
}
public void WriteLine(string line, IBFile.IBRecordType aRecType)
{
foreach (IBFile current in this)
{
if (current.RecType == aRecType)
{
current.WriteLine(line);
return;
}
}
}
#endregion
#region Constructor
public IBFileCollection()
{
foreach(string filetype in Enum.GetNames(typeof(IBFile.IBRecordType)))
{
this.Add((IBFile.IBRecordType)Enum.Parse(typeof(IBFile.IBRecordType),filetype));
}
}
public void CloseAll()
{
foreach(IBFile ibfile in this)
{
ibfile.CloseFile();
}
}
#endregion
}
}
web.config
Friday, March 17, 2006
Monday, March 13, 2006
Friday, March 03, 2006
SmartIndie 3800 X2 Development PC
Athenatech A301BS.400 Black / Silver Steel MicroATX Mini Tower Computer Case 400W Power Supply - Retail
ASUS A8N-VM CSM Socket 939 NVIDIA GeForce 6150 Micro ATX AMD Motherboard - Retail
Kingston ValueRAM 2GB (2 x 1GB) 184-Pin DDR SDRAM DDR 400 (PC 3200) Unbuffered Dual Channel Kit System Memory Model KVR400AK2/2GR - Retail
ZALMAN CNPS7700-CU 120mm 2 Ball Cooling Fan with Copper Heatsink - Retail
ASUS A8N-VM CSM Socket 939 NVIDIA GeForce 6150 Micro ATX AMD Motherboard - Retail
Kingston ValueRAM 2GB (2 x 1GB) 184-Pin DDR SDRAM DDR 400 (PC 3200) Unbuffered Dual Channel Kit System Memory Model KVR400AK2/2GR - Retail
ZALMAN CNPS7700-CU 120mm 2 Ball Cooling Fan with Copper Heatsink - Retail
Friday, January 13, 2006
Subscribe to:
Posts (Atom)
