Simple File Sharing is a feature introduced in Microsoft Windows XP. Simple File Sharing removes some file sharing security options available in other versions of Windows. This helps Windows XP administrators quickly set up folder shares.
Simple File Sharing (SFS) is always enabled and cannot be disabled in Windows XP Home Edition. The below step-by-step instructions explain how to enable/disable SFS in Windows XP Professional.
1. Open My Computer from the Start Menu or Windows XP Desktop. A new My Computer window will appear.
2. Open the Tools menu and choose the "Folder Options..." option from this menu. A new Folder Options window will appear.
3. Click on the View tab and locate the "Use Simple File Sharing (Recommended)" checkbox in the list of Advanced Settings.
4. To enable Simple File Sharing, ensure this checkbox is checked. To disable Simple File Sharing, ensure this checkbox is not checked. Click inside the checkbox to alternately enable and disable the option.
5. Click OK to close the Folder Options window. The settings for Simple File Sharing are now updated; no computer reboot is required.
Tips:
1. The Simple File Sharing checkbox should be at or near the bottom of the Advanced Settings list in the My Computer Folder Options.
2. Enabling Simple File Sharing prevents the ability to assign user-level passwords to shares. When Simple File Sharing is enabled on a computer, remote users will not be prompted for a password when accessing that computer's shares.
3. If the Windows XP Professional computer is part of a Windows domain rather than a Windows workgroup, this process for enabling or disabling Simple File Sharing has no effect. Simple File Sharing always remains disabled for computers joined to domains.
What You Need:
• Computer running Windows XP Professional
How To Enable or Disable Simple File Sharing in Windows XP
How To Restore Hal.dll From the Windows XP CD
The hal.dll file is a hidden file that is used by Windows XP to communicate with your computer's hardware. Hal.dll can become damaged, corrupted or deleted for a number of reasons and is usually brought to your attention by the "missing or corrupt hal.dll" error message.
Follow these easy steps to restore the damaged/corrupted or missing hal.dll file from the Windows XP CD using the Recovery Console.
1. Enter Windows XP Recovery Console.
2. When you reach the command line prompt (detailed in Step 6 in the link above), type the following and then press Enter:
3.
4. expand d:\i386\hal.dl_ c:\windows\system32
Using the expand command as shown above, d represents the drive letter assigned to the optical drive that your Windows XP CD is currently in. While this is most often d, your system could assign a different letter. Also, c:\windows represents the drive and folder that Windows XP is currently installed on. Again, this is most often the case but your system could be different.
5. If you're prompted to overwrite the file, press Y.
6. Take out the Windows XP CD, type exit and then press Enter to restart your PC.
Assuming that a missing or corrupt hal.dll file was your only issue, Windows XP should now start normally.
Securing Windows XP Home Edition
Use Private Folders To Protect Data: As mentioned in Step 1 above, Windows XP Home uses something called Simple File Sharing for sharing files, folders and other resources. When you mark a file or folder as Shared, anyone who can get to your computer can access the share and the data it contains because of how Windows XP Home uses the Guest account and its blank password (unless you have followed the information in Step 1) to grant access. Windows XP Home does not allow for more customized file and folder sharing like you would find in Windows 2000 or in Windows XP Professional (with Simple File Sharing disabled).
Windows XP Home does offer the polar opposite of sharing though- marking a folder Private. If you mark a folder as Private the contents of that folder and any sub-folders will be accessible only by you.
To make the most of this feature it helps if you keep all of your personal or confidential data in one place so that you can just mark the one folder as Private rather than having to scour the computer looking for various folders you might want to keep Private. Your User Account folder under Documents and Settings which contains your My Documents folder, your Favorites and other personal configuration data for Windows is marked Private by default in Windows XP Home.
To mark a folder as private you need to right-click on it and select Sharing and Security. On the Sharing tab click the checkbox that says "Make This Folder Private". If the folder is owned by another user or by the operating system itself this option will be grayed out. You may also see a checkmark inthe box that is grayed out if the folder is a sub-folder of a different folder already marked as Private.
4. Use Limited Accounts For Everyday Use: Windows 2000 and Windows XP Professional offer a number of different user account types and also provide a means to create your own custom user account types. Windows XP Home essentially offers two choices- Administrator and Limited. The Administrator account has essentially full control over anything and everything on the computer. The Limited account can use the computer, but is extremely restricted in its ability to install software or alter system configurations in any way.
One of the primary reasons for using the Limited account is to protect the system from yourself. It's possible that a family member with Administrator access can accidentally change or delete critical information on the computer. It is also possible that someone with an Administrator account may have their account hacked or become infected with a virus or worm of some sort. Typically, the attacker or malware will be able to wreak havoc on the system using the access privileges of the account that has been compromised. So, it makes sense to save your Administrator account for when it is needed, but use Limited accounts for everyday use by most users.
To choose an account type in Windows XP Home click on User Accounts in the Control Panel. Once you select a user you can click on the "Change My Account Type" button. You will be able to choose between Administrator and Limited and can see a brief description of the abilities of each account type. You are required to have at least one Administrator account, so be sure to leave or create one- but save it for use when necessary and stick to using Limited accounts wherever possible.
5. Upgrade to Windows XP Professional: I realize that switching operating systems isn't exactly helpful for securing the one you have. However, it is truly my best recommendation for someone using Windows XP Home edition that wants to ensure a high degree of security on their system.
The Simple File Sharing "feature" which doesn't let you protect individual files or select which users can simply read the file vs. which ones can change or delete it turns out to be a feature you may not want if you're trying to be secure.
Windows XP Home lets you mark folders and their data as Private, but does not include support for EFS (Encrypted File System) which you can use in Windows 2000 and in Windows XP Professional to encrypt your data for even more protection from unauthorized access.
These are just a couple of reasons. The bottom line is that it seems that Microsoft did not have security in mind when selecting the features and options to include in Windows XP Home. Users who truly want to be secure (and don't want to switch to Linux or another operating system entirely) should move to Windows XP Professional
How To Restore NTLDR and Ntdetect.com From the Windows XP CD
The NTLDR and Ntdetect.com files are important system files that are used by your computer to start the Windows XP operating system. These files can become damaged, corrupted or deleted for a number of reasons and are usually brought to your attention by the "NTLDR is Missing" error message.
Follow these easy steps to restore the damaged/corrupted or missing NTLDR and Ntdetect.com files from the Windows XP CD using the Recovery Console.
1. Enter Windows XP Recovery Console.
2. When you reach the command prompt (detailed in Step 6 in the link above), type the following two commands, pressing Enter after each one:
copy d:\i386\ntldr c:\
copy d:\i386\ntdetect.com c:\
In the command listed above, d represents the drive letter assigned to the optical drive that your Windows XP CD is currently in. While this is most often d, your system could assign a different letter. Also, c:\ represents the root folder of the partition that Windows XP is currently installed on. Again, this is most often the case but your system could be different.
3. If you're prompted to overwrite either of the two files, press Y.
4. Take out the Windows XP CD, type exit and then press Enter to restart your PC.
Assuming that missing or corrupt versions of the NTLDR and/or Ntdetect.com files were your only issues, Windows XP should now start normally.
How To Repair or Replace Boot.ini in Windows XP
The boot.ini file is a hidden file that is used to identify in what folder on which partition and on which hard drive Windows XP is located. Boot.ini can become damaged, corrupted or deleted for a number of reasons and is usually brought to your attention by an error message.
Follow these easy steps to repair the damaged/corrupted boot.ini file or replace it if it has been deleted.
1. Enter Windows XP Recovery Console. The Recovery Console is an advanced diagnostic mode of Windows XP with special tools that will allow you to restore the boot.ini file.
2. When you reach the command line (detailed in Step 6 in the link above), type the following command and then press Enter.
bootcfg /rebuild
3. The bootcfg utility will scan your hard drives for any Windows XP installations and then display the results. Follow the remaining steps to add your Windows XP installation to the boot.ini file.
4. The first prompt asks Add installation to boot list? (Yes/No/All).
Type Y in response to this question and press Enter.
5. The next prompt asks you to Enter Load Identifier:.
This is the name of the operating system. For example, type Windows XP Professional or Windows XP Home Edition and press Enter.
6. The final prompt asks you to Enter OS Load options:.
Type /Fastdetect here and press Enter.
7. Take out the Windows XP CD, type exit and then press Enter to restart your PC.
Assuming that a missing or corrupt boot.ini file was your only issue, Windows XP should now start normally.
Top Websites and Resources for Developers
Open Source
• Sourceforge.net - THE Open Source repository with over 100,000 projects.
• Code.Google.com - Pushing the Open Source movement forward.
• Gnu.org - Pioneering the Free Software Movement for nearly 25 years.
• MySQL.com - The most popular Open Source database.
Code Search Engines
These websites let you search through code.
• Koders.com - The Open Source search Engine.
• Google Code Search - The web's biggest search engine.
• Krugle.com - Searching 2.5 Billions lines of code.
• csourcesearch.net A search engine for C and C++ code.
Top Websites for C++ Programming
• Boost.org - The place to go after you've learnt the STL.
• Bjarne Stroustrup's Website - He invented C++.
• Mindview.net - Home to Bruce Eckel, Famous for "Thinking in C++" and other books.
Top Websites for C# Programming
• CodeProject.com - Speaks for itself!
• MSDN List of C# Tools and Resources Even includes a link to Mono!
Top Websites for Linux Programming
• Freshmeat.net - The sourceforge of Linux.
Top Websites for Windows Programming
• Msdn.com - If you develop for Windows, this is the place to start.
Miscellaneous
• bug.gd - Search for errors and report how you fixed them to help others.
• Tiobe Community Programming Index Tracking the popularity of Programming Languages.
WINDOWS INTERNALS :
Sysinternals Live is a service that enables you to execute Sysinternals tools directly from the Web without hunting for and manually downloading them. Simply enter a tool's Sysinternals Live path into Windows Explorer or a command prompt as http://live.sysinternals.com/
You can view the entire Sysinternals Live tools directory in a browser at http://live.sysinternals.com.
• AdExplorer v1.30
This update to AdExplorer, an Active Directory editor, has major node expansion performance improvements and a number of minor bug fixes.
• VMMap v2.6
VMMap, a powerful process virtual and physical memory analysis tool, now shows both graphical and numeric breakdowns of private virtual memory, as well as heap configuration flags.
• ProcDump v1.7
This update to ProcDump, a command-line utility that will generate memory dumps of processes based on various selectable criteria, now supports periodic timed dumps as well as dumps based on virtual memory thresholds.
• AccessChk v4.24
AccessChk, a utility that shows effective security permissions for files, registry keys, services, and more, now supports process token.
• VMMap v2.5
This update to VMMap, a process memory analysis utility, now identifies thread environment blocks (TEBs), the process environment block (PEB), and reserved memory.
• Disk2vhd v1.4
Disk2vhd now includes an option for Windows XP and Windows Server 2003 that directs it to fix up the kernel and HAL to make the VHDs generated for these systems bootable in Virtual PC. It also skips sectors with CRC errors to enable the conversion of systems with failing disks.
Process Explorer v12
http://technet.microsoft.com/hi-in/sysinternals/bb896653%28en-us%29.aspx
Introduction
Ever wondered which program has a particular file or directory open? Now you can find out. Process Explorer shows you information about which handles and DLLs processes have opened or loaded.
The Process Explorer display consists of two sub-windows. The top window always shows a list of the currently active processes, including the names of their owning accounts, whereas the information displayed in the bottom window depends on the mode that Process Explorer is in: if it is in handle mode you'll see the handles that the process selected in the top window has opened; if Process Explorer is in DLL mode you'll see the DLLs and memory-mapped files that the process has loaded. Process Explorer also has a powerful search capability that will quickly show you which processes have particular handles opened or DLLs loaded.
The unique capabilities of Process Explorer make it useful for tracking down DLL-version problems or handle leaks, and provide insight into the way Windows and applications work.
Active Directory Explorer v1.3
By Bryce Cogswell and Mark Russinovich
http://technet.microsoft.com/hi-in/sysinternals/bb963907%28en-us%29.aspx
Active Directory Explorer (AD Explorer) is an advanced Active Directory (AD) viewer and editor. You can use AD Explorer to easily navigate an AD database, define favorite locations, view object properties and attributes without having to open dialog boxes, edit permissions, view an object's schema, and execute sophisticated searches that you can save and re-execute.
AD Explorer also includes the ability to save snapshots of an AD database for off-line viewing and comparisons. When you load a saved snapshot, you can navigate and explorer it as you would a live database. If you have two snapshots of an AD database you can use AD Explorer's comparison functionality to see what objects, attributes and security permissions changed between them.
VMMap v2.62
By Mark Russinovich and Bryce Cogswell
http://technet.microsoft.com/hi-in/sysinternals/dd535533.aspx
Introduction
VMMap is a process virtual and physical memory analysis utility. It shows a breakdown of a process's committed virtual memory types as well as the amount of physical memory (working set) assigned by the operating system to those types. Besides graphical representations of memory usage, VMMap also shows summary information and a detailed process memory map. Powerful filtering and refresh capabilities allow you to identify the sources of process memory usage and the memory cost of application features.
Besides flexible views for analyzing live processes, VMMap supports the export of data in multiple forms, including a native format that preserves all the information so that you can load back in. It also includes command-line options that enable scripting scenarios.
VMMap is the ideal tool for developers wanting to understand and optimize their application's memory resource usage.
ProcDump v1.72
By Mark Russinovich
http://technet.microsoft.com/hi-in/sysinternals/dd996900%28en-us%29.aspx
ProcDump is a command-line utility whose primary purpose is monitoring an application for CPU spikes and generating crash dumps during a spike that an administrator or developer can use to determine the cause of the spike. ProcDump also includes hung window monitoring (using the same definition of a window hang that Windows and Task Manager use) and unhandled exception monitoring. It also can serve as a general process dump utility that you can embed in other scripts.
Using ProcDump
usage: procdump [-64] [[-c CPU usage] [-u] [-s seconds]] [-n exceeds] [-e] [-h] [-m commit usage] [-ma] [-o] [-r] [-t] <
-64 By default Procdump will capture a 32-bit dump of a 32-bit process when running on 64-bit Windows. This option overrides to create a 64-bit dump.
-c CPU threshold at which to create a dump of the process.
-e Write a dump when the process encounters an unhandled exception.
-h Write dump if process has a hung window (does not respond to
window messages for at least 5 seconds).
-m Memory commit threshold in MB at which to create a dump of the process.
-ma Write a dump file with all process memory. The default dump format includes thread and handle information.
-n Number of dumps to write before exiting.
-o Overwrite an existing dump file.
-r Reflect (clone) the process for the dump to minimize the time the process is suspended (Windows 7 and higher only).
-s Consecutive seconds CPU threshold must be hit before dump is written (default is 10).
-t Write a dump when the process terminates.
-u Treat CPU usage relative to a single core.
-x Launch the specified image with optional arguments.
Use the -accepteula command line option to automatically accept the Sysinternals license agreement.
To just create a dump of a running process, omit the CPU threshold. If you omit the dump file name, it defaults to
Examples
Write up to 3 dumps of a process named "consume" when it exceeds 20% CPU usage for three seconds to the directory c:\dump\consume with the name consume.dmp:
C:\>procdump -c 20 -n 3 -o consume c:\dump\consume
Write a dump for a process named "hang.exe" when one of its windows is unresponsive for more than 5 seconds:
C:\>procdump -h hang.exe hungwindow.dmp
Write 3 dumps 5 seconds apart:
C:\>procdump -s 5 -n 3 notepad.exe notepad.dmp
Launch a process and then monitor it for excessive CPU usage:
C:\>procdump -c 30 -s 10 -x consume.exe consume.dmp
Write a dump of a process named "iexplore" to a dump file that has the default name iexplore.dmp:
C:\>procdump iexplore
AccessChk v4.24
By Mark Russinovich
Introduction
As a part of ensuring that they've created a secure environment Windows administrators often need to know what kind of accesses specific users or groups have to resources including files, directories, Registry keys, global objects and Windows services. AccessChk quickly answers these questions with an intuitive interface and output.
Installation
AccessChk is a console program. Copy AccessChk onto your executable path. Typing "accesschk" displays its usage syntax.
Using AccessChk
Usage: accesschk [-s][-e][-u][-r][-w][-n][-v][[-a]|[-k]| [-p [-f] [-t]][-o [-t object type]][-c]|[-d]] [username]
-a Name is a Windows account right. Specify "*" as the name to show all rights assigned to a user. Note that when you specify a specific right, only groups and accounts directly assigned to the right are displayed.
-c Name is a Windows Service, e.g. ssdpsrv. Specify "*" as the name to show all services and "scmanager" to check the security of the Service Control Manager.
-d Only process directories or top-level keys
-e Only show explicitly set-Integrity Levels (Windows Vista only)
-f Show full process token information including groups and privileges
-k Name is a Registry key, e.g. hklm\software
-n Show only objects that have no access
-o Name is an object in the Object Manager namespace (default is root). To view the contents of a directory, specify the name with a trailing backslash or add -s. Add -t and an object type (e.g. section) to see only objects of a specific type.
-p Name is a process name or PID, e.g. cmd.exe (specify "*" as the name to show all processes). Add -f to show full process token information, including groups and privileges. Add -t to show threads.
-q Omit Banner
-r Show only objects that have read access
-s Recurse
-t Object type filter, e.g. "section"
-u Suppress errors
-v Verbose (includes Windows Vista Integrity Level)
-w Show only objects that have write access
If you specify a user or group name and path, AccessChk will report the effective permissions for that account; otherwise it will show the effective access for accounts referenced in the security descriptor.
By default, the path name is interpreted as a file system path (use the "\pipe\" prefix to specify a named pipe path). For each object, AccessChk prints R if the account has read access, W for write access, and nothing if it has neither. The -v switch has AccessChk dump the specific accesses granted to an account.
Examples
The following command reports the accesses that the Power Users account has to files and directories in \Windows\System32:
accesschk "power users" c:\windows\system32
This command shows which Windows services members of the Users group have write access to:
accesschk users -cw *
To see what Registry keys under HKLM\CurrentUser a specific account has no access to:
accesschk -kns austin\mruss hklm\software
To see the security on the HKLM\Software key:
accesschk -k hklm\software
To see all files under \Users\Mark on Vista that have an explicit integrity level:
accesschk -e -s c:\users\mark
To see all global objects that Everyone can modify:
accesschk -wuo everyone \basednamedobjects
Disk2vhd v1.5
By Mark Russinovich and Bryce Cogswell
http://technet.microsoft.com/hi-in/sysinternals/ee656415%28en-us%29.aspx
Disk2vhd is a utility that creates VHD (Virtual Hard Disk - Microsoft's Virtual Machine disk format) versions of physical disks for use in Microsoft Virtual PC or Microsoft Hyper-V virtual machines (VMs). The difference between Disk2vhd and other physical-to-virtual tools is that you can run Disk2vhd on a system that’s online. Disk2vhd uses Windows' Volume Snapshot capability, introduced in Windows XP, to create consistent point-in-time snapshots of the volumes you want to include in a conversion. You can even have Disk2vhd create the VHDs on local volumes, even ones being converted (though performance is better when the VHD is on a disk different than ones being converted).
The Disk2vhd user interface lists the volumes present on the system:
It will create one VHD for each disk on which selected volumes reside. It preserves the partitioning information of the disk, but only copies the data contents for volumes on the disk that are selected. This enables you to capture just system volumes and exclude data volumes, for example.
Note: Virtual PC supports a maximum virtual disk size of 127GB. If you create a VHD from a larger disk it will not be accessible from a Virtual PC VM.
To use VHDs produced by Disk2vhd, create a VM with the desired characteristics and add the VHDs to the VM's configuration as IDE disks. On first boot, a VM booting a captured copy of Windows will detect the VM's hardware and automatically install drivers, if present in the image. If the required drivers are not present, install them via the Virtual PC or Hyper-V integration components. You can also attach to VHDs using the Windows 7 or Windows Server 2008 R2 Disk Management or Diskpart utilities.
Note: do not attach to VHDs on the same system on which you created them if you plan on booting from them. If you do so, Windows will assign the VHD a new disk signature to avoid a collision with the signature of the VHD’s source disk. Windows references disks in the boot configuration database (BCD) by disk signature, so when that happens Windows booted in a VM will fail to locate the boot disk.
Disk2vhd runs Windows XP SP2, Windows Server 2003 SP1, and higher, including x64 systems.
Here's a screenshot of a copy of a Windows Server 2008 R2 Hyper-V system running in a virtual machine on top of the system it was made from:
Command Line Usage
Disk2vhd includes command-line options that enable you to script the creation of VHDs. Specify the volumes you want included in a snapshot by drive letter (e.g. c:) or use "*" to include all volumes.
Usage: disk2vhd <[drive: [drive:]...]|[*]>
Example: disk2vhd * c:\vhd\snapshot.vhd
Sysinternals Security Utilities
AccessChk
This tool shows you the accesses the user or group you specify has to files, Registry keys or Windows services.
AccessEnum
This simple yet powerful security tool shows you who has what access to directories, files and Registry keys on your systems. Use it to find holes in your permissions.
Autologon
Bypass password screen during logon.
Autoruns
See what programs are configured to startup automatically when your system boots and you login. Autoruns also shows you the full list of Registry and file locations where applications can configure auto-start settings.
LogonSessions
List active logon sessions
Process Explorer
Find out what files, registry keys and other objects processes have open, which DLLs they have loaded, and more. This uniquely powerful utility will even show you who owns each process.
PsExec
Execute processes with limited-user rights.
PsLoggedOn
Show users logged on to a system.
PsLogList
Dump event log records.
PsTools
The PsTools suite includes command-line utilities for listing the processes running on local or remote computers, running processes remotely, rebooting computers, dumping event logs, and more.
RootkitRevealer
Scan your system for rootkit-based malware
SDelete
Securely overwrite your sensitive files and cleanse your free space of previously deleted files using this DoD-compliant secure delete program.
ShareEnum
Scan file shares on your network and view their security settings to close security holes.
ShellRunas
Launch programs as a different user via a convenient shell context-menu entry.
Sigcheck
Dump file version information and verify that images on your system are digitally signed.
http://technet.microsoft.com/hi-in/sysinternals/bb795534%28en-us%29.aspx
Process Monitor v2.8
By Mark Russinovich and Bryce Cogswell
http://technet.microsoft.com/hi-in/sysinternals/bb896645%28en-us%29.aspx
PsTools
By Mark Russinovich
Published: July 1, 2009
http://technet.microsoft.com/hi-in/sysinternals/bb896649%28en-us%29.aspx
PageDefrag v2.32
By Mark Russinovich
http://technet.microsoft.com/hi-in/sysinternals/bb897426%28en-us%29.aspx
RootkitRevealer v1.71
By Bryce Cogswell and Mark Russinovich
Published: November 1, 2006
http://technet.microsoft.com/hi-in/sysinternals/bb897445%28en-us%29.aspx
TCPView for Windows v2.54
By Mark Russinovich
Published: March 17, 2009
http://technet.microsoft.com/hi-in/sysinternals/bb897437%28en-us%29.aspx
BgInfo v4.16
By Bryce Cogswell
Published: October 1, 2009
http://technet.microsoft.com/hi-in/sysinternals/bb897557%28en-us%29.aspx
BlueScreen Screen Saver v3.2
By Mark Russinovich
Published: November 1, 2006
http://technet.microsoft.com/hi-in/sysinternals/bb897558%28en-us%29.aspx
Desktops v1.02
By Mark Russinovich and Bryce Cogswell
Published: January 19, 2010
http://technet.microsoft.com/hi-in/sysinternals/cc817881%28en-us%29.aspx
Sysinternals Networking Utilities
AD Explorer
Active Directory Explorer is an advanced Active Directory (AD) viewer and editor.
AD Insight
AD Insight is an LDAP (Light-weight Directory Access Protocol) real-time monitoring tool aimed at troubleshooting Active Directory client applications.
AdRestore
Undelete Server 2003 Active Directory objects.
PipeList
Displays the named pipes on your system, including the number of maximum instances and active instances for each pipe.
PsFile
See what files are opened remotely.
PsTools
The PsTools suite includes command-line utilities for listing the processes running on local or remote computers, running processes remotely, rebooting computers, dumping event logs, and more.
ShareEnum
Scan file shares on your network and view their security settings to close security holes.
TCPView
Active socket command-line viewer.
Whois
See who owns an Internet address.
http://technet.microsoft.com/hi-in/sysinternals/bb795532%28en-us%29.aspx
Sysinternals Process Utilities
Autoruns
See what programs are configured to startup automatically when your system boots and you login. Autoruns also shows you the full list of Registry and file locations where applications can configure auto-start settings.
Handle
This handy command-line utility will show you what files are open by which processes, and much more.
ListDLLs
List all the DLLs that are currently loaded, including where they are loaded and their version numbers. Version 2.0 prints the full path names of loaded modules.
PortMon
Monitor serial and parallel port activity with this advanced monitoring tool. It knows about all standard serial and parallel IOCTLs and even shows you a portion of the data being sent and received. Version 3.x has powerful new UI enhancements and advanced filtering capabilities.
ProcDump
This new command-line utility is aimed at capturing process dumps of otherwise difficult to isolate and reproduce CPU spikes. It also serves as a general process dump creation utility and can also monitor and generate process dumps when a process has a hung window or unhandled exception.
Process Explorer
Find out what files, registry keys and other objects processes have open, which DLLs they have loaded, and more. This uniquely powerful utility will even show you who owns each process.
Process Monitor
Monitor file system, Registry, process, thread and DLL activity in real-time.
PsExec
Execute processes remotely.
PsGetSid
Displays the SID of a computer or a user.
PsKill
Terminate local or remote processes.
PsList
Show information about processes and threads.
PsService
View and control services.
PsSuspend
Suspend and resume processes.
PsTools
The PsTools suite includes command-line utilities for listing the processes running on local or remote computers, running processes remotely, rebooting computers, dumping event logs, and more.
ShellRunas
Launch programs as a different user via a convenient shell context-menu entry.
VMMap
See a breakdown of a process's committed virtual memory types as well as the amount of physical memory (working set) assigned by the operating system to those types. Identify the sources of process memory usage and the memory cost of application features.
http://technet.microsoft.com/hi-in/sysinternals/bb795533%28en-us%29.aspx
Sysinternals Security Utilities
AccessChk
This tool shows you the accesses the user or group you specify has to files, Registry keys or Windows services.
AccessEnum
This simple yet powerful security tool shows you who has what access to directories, files and Registry keys on your systems. Use it to find holes in your permissions.
Autologon
Bypass password screen during logon.
Autoruns
See what programs are configured to startup automatically when your system boots and you login. Autoruns also shows you the full list of Registry and file locations where applications can configure auto-start settings.
LogonSessions
List active logon sessions
Process Explorer
Find out what files, registry keys and other objects processes have open, which DLLs they have loaded, and more. This uniquely powerful utility will even show you who owns each process.
PsExec
Execute processes with limited-user rights.
PsLoggedOn
Show users logged on to a system.
PsLogList
Dump event log records.
PsTools
The PsTools suite includes command-line utilities for listing the processes running on local or remote computers, running processes remotely, rebooting computers, dumping event logs, and more.
RootkitRevealer
Scan your system for rootkit-based malware
SDelete
Securely overwrite your sensitive files and cleanse your free space of previously deleted files using this DoD-compliant secure delete program.
ShareEnum
Scan file shares on your network and view their security settings to close security holes.
ShellRunas
Launch programs as a different user via a convenient shell context-menu entry.
Sigcheck
Dump file version information and verify that images on your system are digitally signed.
http://technet.microsoft.com/hi-in/sysinternals/bb795534%28en-us%29.aspx
Sysinternals System Information Utilities
Autoruns
See what programs are configured to startup automatically when your system boots and you login. Autoruns also shows you the full list of Registry and file locations where applications can configure auto-start settings.
ClockRes
View the resolution of the system clock, which is also the maximum timer resolution.
Coreinfo
Coreinfo is a command-line utility that shows you the mapping between logical processors and the physical processor, NUMA node, and socket on which they reside, as well as the cache’s assigned to each logical processor.
Handle
This handy command-line utility will show you what files are open by which processes, and much more.
LiveKd
Use Microsoft kernel debuggers to examine a live system.
LoadOrder
See the order in which devices are loaded on your WinNT/2K system.
LogonSessions
List the active logon sessions on a system.
PendMoves
Enumerate the list of file rename and delete commands that will be executed the next boot.
Process Explorer
Find out what files, registry keys and other objects processes have open, which DLLs they have loaded, and more. This uniquely powerful utility will even show you who owns each process.
Process Monitor
Monitor file system, Registry, process, thread and DLL activity in real-time.
ProcFeatures
This applet reports processor and Windows support for Physical Address Extensions and No Execute buffer overflow protection.
PsInfo
Obtain information about a system.
PsLoggedOn
Show users logged on to a system
PsTools
The PsTools suite includes command-line utilities for listing the processes running on local or remote computers, running processes remotely, rebooting computers, dumping event logs, and more.
WinObj
The ultimate Object Manager namespace viewer is here.
http://technet.microsoft.com/hi-in/sysinternals/bb795535%28en-us%29.aspx
Sysinternals Miscellaneous Utilities
AD Explorer
Active Directory Explorer is an advanced Active Directory (AD) viewer and editor.
AdRestore
Restore tombstoned Active Directory objects in Server 2003 domains.
Autologon
Bypass password screen during logon.
BgInfo
This fully-configurable program automatically generates desktop backgrounds that include important information about the system including IP addresses, computer name, network adapters, and more.
BlueScreen
This screen saver not only accurately simulates Blue Screens, but simulated reboots as well (complete with CHKDSK), and works on Windows NT 4, Windows 2000, Windows XP, Server 2003 and Windows 9x.
Ctrl2cap
This is a kernel-mode driver that demonstrates keyboard input filtering just above the keyboard class driver in order to turn caps-locks into control keys. Filtering at this level allows conversion and hiding of keys before NT even "sees" them. Ctrl2cap also shows how to use NtDisplayString() to print messages to the initialization blue-screen.
DebugView
Another first from Sysinternals: This program intercepts calls made to DbgPrint by device drivers and OutputDebugString made by Win32 programs. It allows for viewing and recording of debug session output on your local machine or across the Internet without an active debugger.
Desktops
This new utility enables you to create up to four virtual desktops and to use a tray interface or hotkeys to preview what’s on each desktop and easily switch between them.
Hex2dec
Convert hex numbers to decimal and vice versa.
PsLogList
Dump event log records.
PsTools
The PsTools suite includes command-line utilities for listing the processes running on local or remote computers, running processes remotely, rebooting computers, dumping event logs, and more.
RegDelNull
Scan for and delete Registry keys that contain embedded null-characters that are otherwise undeleteable by standard Registry-editing tools.
RegJump
Jump to the registry path you specify in Regedit.
Strings
Search for ANSI and UNICODE strings in binary images.
ZoomIt
Presentation utility for zooming and drawing on the screen.
http://technet.microsoft.com/hi-in/sysinternals/bb842059%28en-us%29.aspx
OTHER URLS :
http://channel9.msdn.com/shows/Going+Deep/Mark-Russinovich-From-Winternals-to-Microsoft-On-Windows-Security-Windows-CoreArch/
http://blogs.technet.com/Sysinternals/
http://technet.microsoft.com/hi-in/sysinternals/bb963890%28en-us%29.aspx
ALL Interview questions and answers
C# interview questions and answers
1. What’s the advantage of using System.Text.StringBuilder over System.String? StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it’s being operated on, a new instance is created.
2. Can you store multiple data types in System.Array? No.
3. What’s the difference between the System.Array.CopyTo() and System.Array.Clone()? The first one performs a deep copy of the array, the second one is shallow.
4. How can you sort the elements of the array in descending order? By calling Sort() and then Reverse() methods.
5. What’s the .NET datatype that allows the retrieval of data by a unique key? HashTable.
6. What’s class SortedList underneath? A sorted HashTable.
7. Will finally block get executed if the exception had not occurred? Yes.
8. What’s the C# equivalent of C++ catch (…), which was a catch-all statement for any possible exception? A catch block that catches the exception of type System.Exception. You can also omit the parameter data type in this case and just write catch {}.
9. Can multiple catch blocks be executed? No, once the proper catch code fires off, the control is transferred to the finally block (if there are any), and then whatever follows the finally block.
10. Why is it a bad idea to throw your own exceptions? Well, if at that point you know that an error has occurred, then why not write the proper code to handle that error instead of passing a new Exception object to the catch block? Throwing your own exceptions signifies some design flaws in the project.
11. What’s a delegate? A delegate object encapsulates a reference to a method. In C++ they were referred to as function pointers.
12. What’s a multicast delegate? It’s a delegate that points to and eventually fires off several methods.
13. How’s the DLL Hell problem solved in .NET? Assembly versioning allows the application to specify not only the library it needs to run (which was available under Win32), but also the version of the assembly.
14. What are the ways to deploy an assembly? An MSI installer, a CAB archive, and XCOPY command.
15. What’s a satellite assembly? When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the localized modules, the localized assemblies that modify the core application are called satellite assemblies.
16. What namespaces are necessary to create a localized application? System.Globalization, System.Resources.
17. What’s the difference between // comments, /* */ comments and /// comments? Single-line, multi-line and XML documentation comments.
18. How do you generate documentation from the C# file commented properly with a command-line compiler? Compile it with a /doc switch.
19. What’s the difference between XML documentation tag? Single line code example and multiple-line code example.
20. Is XML case-sensitive? Yes, so
21. What debugging tools come with the .NET SDK? CorDBG – command-line debugger, and DbgCLR – graphic debugger. Visual Studio .NET uses the DbgCLR. To use CorDbg, you must compile the original C# file using the /debug switch.
22. What does the This window show in the debugger? It points to the object that’s pointed to by this reference. Object’s instance data is shown.
23. What does assert() do? In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true.
24. What’s the difference between the Debug class and Trace class? Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and release builds.
25. Why are there five tracing levels in System.Diagnostics.TraceSwitcher? The tracing dumps can be quite verbose and for some applications that are constantly running you run the risk of overloading the machine and the hard drive there. Five levels range from None to Verbose, allowing to fine-tune the tracing activities.
26. Where is the output of TextWriterTraceListener redirected? To the Console or a text file depending on the parameter passed to the constructor.
27. How do you debug an ASP.NET Web application? Attach the aspnet_wp.exe process to the DbgClr debugger.
28. What are three test cases you should go through in unit testing? Positive test cases (correct data, correct output), negative test cases (broken or missing data, proper handling), exception test cases (exceptions are thrown and caught properly).
29. Can you change the value of a variable while debugging a C# application? Yes, if you are debugging via Visual Studio.NET, just go to Immediate window.
30. Explain the three services model (three-tier application). Presentation (UI), business (logic and underlying code) and data (from storage or other sources).
31. What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET? SQLServer.NET data provider is high-speed and robust, but requires SQL Server license purchased from Microsoft. OLE-DB.NET is universal for accessing other sources, like Oracle, DB2, Microsoft Access and Informix, but it’s a .NET layer on top of OLE layer, so not the fastest thing in the world. ODBC.NET is a deprecated layer provided for backward compatibility to ODBC engines.
32. What’s the role of the DataReader class in ADO.NET connections? It returns a read-only dataset from the data source when the command is executed.
33. What is the wildcard character in SQL? Let’s say you want to query database with LIKE for all employees whose name starts with La. The wildcard character is %, the proper query with LIKE would involve ‘La%’.
34. Explain ACID rule of thumb for transactions. Transaction must be Atomic (it is one unit of work and does not dependent on previous and following transactions), Consistent (data is either committed or roll back, no “in-between” case where something has been updated and something hasn’t), Isolated (no transaction sees the intermediate results of the current transaction), Durable (the values persist if the data had been committed even if the system crashes right after).
35. What connections does Microsoft SQL Server support? Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server username and passwords).
36. Which one is trusted and which one is untrusted? Windows Authentication is trusted because the username and password are checked with the Active Directory, the SQL Server authentication is untrusted, since SQL Server is the only verifier participating in the transaction.
37. Why would you use untrusted verificaion? Web Services might use it, as well as non-Windows applications.
38. What does the parameter Initial Catalog define inside Connection String? The database name to connect to.
39. What’s the data provider name to connect to Access database? Microsoft.Access.
40. What does Dispose method do with the connection object? Deletes it from the memory.
41. What is a pre-requisite for connection pooling? Multiple processes must agree that they will share the same connection, where every parameter is the same, including the security settings.
C++ Interview questions and answers
1. How do you decide which integer type to use?
2. What should the 64-bit integer type on new, 64-bit machines be?
3. What’s the best way to declare and define global variables?
4. What does extern mean in a function declaration?
5. What’s the auto keyword good for?
6. I can’t seem to define a linked list node which contains a pointer to itself.
7. How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
8. How can I declare a function that returns a pointer to a function of its own type?
9. My compiler is complaining about an invalid redeclaration of a function, but I only define it once and call it once. What’s happening?
10. What can I safely assume about the initial values of variables which are not explicitly initialized?
11. Why can’t I initialize a local array with a string?
12. What is the difference between char a[] = “string”; and char *p = “string”; ?
13. How do I initialize a pointer to a function?
PHP interview questions and answers
1. What does a special set of tags do in PHP? - The output is displayed directly to the browser.
2. What’s the difference between include and require? - It’s how they handle failures. If the file is not found by require(), it will cause a fatal error and halt the execution of the script. If the file is not found by include(), a warning will be issued, but execution will continue.
3. I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem? - PHP Interpreter treats numbers beginning with 0 as octal. Look at the similar PHP interview questions for more numeric problems.
4. Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example? - In this example it wouldn’t matter, since the variable is all by itself, but if you were to print something like "{$a},000,000 mln dollars", then you definitely need to use the braces.
5. How do you define a constant? - Via define() directive, like define ("MYCONSTANT", 100);
6. How do you pass a variable by value? - Just like in C++, put an ampersand in front of it, like $a = &$b
7. Will comparison of string "10" and integer 11 work in PHP? - Yes, internally PHP will cast everything to the integer type, so numbers 10 and 11 will be compared.
8. When are you supposed to use endif to end the conditional statement? - When the original if was followed by : and then the code block without braces.
9. Explain the ternary conditional operator in PHP? - Expression preceding the ? is evaluated, if it’s true, then the expression preceding the : is executed, otherwise, the expression following : is executed.
10. How do I find out the number of parameters passed into function? - func_num_args() function returns the number of parameters passed in.
11. If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b? - 100, it’s a reference to existing variable.
12. What’s the difference between accessing a class method via -> and via ::? - :: is allowed to access methods that can perform static operations, i.e. those, which do not require object initialization.
13. Are objects passed by value or by reference? - Everything is passed by value.
14. How do you call a constructor for a parent class? - parent::constructor($value)
15. What’s the special meaning of __sleep and __wakeup? - __sleep returns the array of all the variables than need to be saved, while __wakeup retrieves them.
16. Why doesn’t the following code print the newline properly?
Because inside the single quotes the n character is not interpreted as newline, just as a sequence of two characters - and n.
17. Would you initialize your strings with single quotes or double quotes? - Since the data inside the single-quoted string is not parsed for variable substitution, it’s always a better idea speed-wise to initialize a string with single quotes, unless you specifically need variable substitution.
18. How come the code works, but doesn’t for two-dimensional array of mine? - Any time you have an array with more than one dimension, complex parsing syntax is required. print "Contents: {$arr[1][2]}" would’ve worked.
19. What is the difference between characters �23 and x23? - The first one is octal 23, the second is hex 23.
20. With a heredoc syntax, do I get variable substitution inside the heredoc contents? - Yes.
21. I want to combine two variables together:
22. $var1 = 'Welcome to ';
23. $var2 = 'TechInterviews.com';
What will work faster? Code sample 1:
$var 3 = $var1.$var2;
Or code sample 2:
$var3 = "$var1$var2";
Both examples would provide the same result - $var3 equal to "Welcome to TechInterviews.com". However, Code Sample 1 will work significantly faster. Try it out with large sets of data (or via concatenating small sets a million times or so), and you will see that concatenation works significantly faster than variable substitution.
24. For printing out strings, there are echo, print and printf. Explain the differences. - echo is the most primitive of them, and just outputs the contents following the construct to the screen. print is also a construct (so parentheses are optional when calling it), but it returns TRUE on successful output and FALSE if it was unable to print out the string. However, you can pass multiple parameters to echo, like:
and it will output the string "Welcome to TechInterviews!" print does not take multiple parameters. It is also generally argued that echo is faster, but usually the speed advantage is negligible, and might not be there for future versions of PHP. printf is a function, not a construct, and allows such advantages as formatted output, but it’s the slowest way to print out data out of echo, print and printf.
25. I am writing an application in PHP that outputs a printable version of driving directions. It contains some long sentences, and I am a neat freak, and would like to make sure that no line exceeds 50 characters. How do I accomplish that with PHP? - On large strings that need to be formatted according to some length specifications, use wordwrap() or chunk_split().
26. What’s the output of the ucwords function in this example?
27. $formatted = ucwords("TECHINTERVIEWS IS COLLECTION OF INTERVIEW QUESTIONS");
print $formatted;
What will be printed is TECHINTERVIEWS IS COLLECTION OF INTERVIEW QUESTIONS.
ucwords() makes every first letter of every word capital, but it does not lower-case anything else. To avoid this, and get a properly formatted string, it’s worth using strtolower() first.
28. What’s the difference between htmlentities() and htmlspecialchars()? - htmlspecialchars only takes care of <, >, single quote ‘, double quote " and ampersand. htmlentities translates all occurrences of character sequences that have different meaning in HTML.
29. What’s the difference between md5(), crc32() and sha1() crypto on PHP? - The major difference is the length of the hash generated. CRC32 is, evidently, 32 bits, while sha1() returns a 128 bit value, and md5() returns a 160 bit value. This is important when avoiding collisions.
30. So if md5() generates the most secure hash, why would you ever use the less secure crc32() and sha1()? - Crypto usage in PHP is simple, but that doesn’t mean it’s free. First off, depending on the data that you’re encrypting, you might have reasons to store a 32-bit value in the database instead of the 160-bit value to save on space. Second, the more secure the crypto is, the longer is the computation time to deliver the hash value. A high volume site might be significantly slowed down, if frequent md5() generation is required.
31. How do you match the character ^ at the beginning of the string? - ^^
JavaScript interview questions and answers
1. What’s relationship between JavaScript and ECMAScript? - ECMAScript is yet another name for JavaScript (other names include LiveScript). The current JavaScript that you see supported in browsers is ECMAScript revision 3.
2. What are JavaScript types? - Number, String, Boolean, Function, Object, Null, Undefined.
3. How do you convert numbers between different bases in JavaScript? - Use the parseInt() function, that takes a string as the first parameter, and the base as a second parameter. So to convert hexadecimal 3F to decimal, use parseInt ("3F", 16);
4. What does isNaN function do? - Return true if the argument is not a number.
5. What is negative infinity? - It’s a number in JavaScript, derived by dividing negative number by zero.
6. What boolean operators does JavaScript support? - &&, || and !
7. What does "1"+2+4 evaluate to? - Since 1 is a string, everything is a string, so the result is 124.
8. How about 2+5+"8"? - Since 2 and 5 are integers, this is number arithmetic, since 8 is a string, it’s concatenation, so 78 is the result.
9. What looping structures are there in JavaScript? - for, while, do-while loops, but no foreach.
10. How do you create a new object in JavaScript? - var obj = new Object(); or var obj = {};
11. How do you assign object properties? - obj["age"] = 17 or obj.age = 17.
12. What’s a way to append a value to an array? - arr[arr.length] = value;
13. What is this keyword? - It refers to the current object.
ASP.NET interview questions and answers
1. Describe the difference between a Thread and a Process?
2. What is a Windows Service and how does its lifecycle differ from a “standard†EXE?
3. What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?
4. What is the difference between an EXE and a DLL?
5. What is strong-typing versus weak-typing? Which is preferred? Why?
6. What’s wrong with a line like this? DateTime.Parse(myString
7. What are PDBs? Where must they be located for debugging to work?
8. What is cyclomatic complexity and why is it important?
9. Write a standard lock() plus double check to create a critical section around a variable access.
10. What is FullTrust? Do GAC’ed assemblies have FullTrust?
11. What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?
12. What does this do? gacutil /l | find /i “about”
13. What does this do? sn -t foo.dll
14. What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
15. Contrast OOP and SOA. What are tenets of each
16. How does the XmlSerializer work? What ACL permissions does a process using it require?
17. Why is catch(Exception) almost always a bad idea?
18. What is the difference between Debug.Write and Trace.Write? When should each be used?
19. What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?
20. Does JITting occur per-assembly or per-method? How does this affect the working set?
21. Contrast the use of an abstract base class against an interface?
22. What is the difference between a.Equals(b) and a == b?
23. In the context of a comparison, what is object identity versus object equivalence?
24. How would one do a deep copy in .NET?
25. Explain current thinking around IClonable.
26. What is boxing?
27. Is string a value type or a reference type?
J2EE interview questions and answers
1. What makes J2EE suitable for distributed multitiered Applications?
- The J2EE platform uses a multitiered distributed application model. Application logic is divided into components according to function, and the various application components that make up a J2EE application are installed on different machines depending on the tier in the multitiered J2EE environment to which the application component belongs. The J2EE application parts are:
o Client-tier components run on the client machine.
o Web-tier components run on the J2EE server.
o Business-tier components run on the J2EE server.
o Enterprise information system (EIS)-tier software runs on the EIS server.
2. What is J2EE? - J2EE is an environment for developing and deploying enterprise applications. The J2EE platform consists of a set of services, application programming interfaces (APIs), and protocols that provide the functionality for developing multitiered, web-based applications.
3. What are the components of J2EE application?
- A J2EE component is a self-contained functional software unit that is assembled into a J2EE application with its related classes and files and communicates with other components. The J2EE specification defines the following J2EE components:
1. Application clients and applets are client components.
2. Java Servlet and JavaServer Pages technology components are web components.
3. Enterprise JavaBeans components (enterprise beans) are business components.
4. Resource adapter components provided by EIS and tool vendors.
What do Enterprise JavaBeans components contain? - Enterprise JavaBeans components contains Business code, which is logic
that solves or meets the needs of a particular business domain such as banking, retail, or finance, is handled by enterprise beans running in the business tier. All the business code is contained inside an Enterprise Bean which receives data from client programs, processes it (if necessary), and sends it to the enterprise information system tier for storage. An enterprise bean also retrieves data from storage, processes it (if necessary), and sends it back to the client program.
Is J2EE application only a web-based? - No, It depends on type of application that client wants. A J2EE application can be web-based or non-web-based. if an application client executes on the client machine, it is a non-web-based J2EE application. The J2EE application can provide a way for users to handle tasks such as J2EE system or application administration. It typically has a graphical user interface created from Swing or AWT APIs, or a command-line interface. When user request, it can open an HTTP connection to establish communication with a servlet running in the web tier.
Are JavaBeans J2EE components? - No. JavaBeans components are not considered J2EE components by the J2EE specification. They are written to manage the data flow between an application client or applet and components running on the J2EE server or between server components and a database. JavaBeans components written for the J2EE platform have instance variables and get and set methods for accessing the data in the instance variables. JavaBeans components used in this way are typically simple in design and implementation, but should conform to the naming and design conventions outlined in the JavaBeans component architecture.
Is HTML page a web component? - No. Static HTML pages and applets are bundled with web components during application assembly, but are not considered web components by the J2EE specification. Even the server-side utility classes are not considered web components, either.
What can be considered as a web component? - J2EE Web components can be either servlets or JSP pages. Servlets are Java programming language classes that dynamically process requests and construct responses. JSP pages are text-based documents that execute as servlets but allow a more natural approach to creating static content.
What is the container? - Containers are the interface between a component and the low-level platform specific functionality that supports the component. Before a Web, enterprise bean, or application client component can be executed, it must be assembled into a J2EE application and deployed into its container.
What are container services? - A container is a runtime support of a system-level entity. Containers provide components with services such as lifecycle management, security, deployment, and threading.
What is the web container? - Servlet and JSP containers are collectively referred to as Web containers. It manages the execution of JSP page and servlet components for J2EE applications. Web components and their container run on the J2EE server.
What is Enterprise JavaBeans (EJB) container? - It manages the execution of enterprise beans for J2EE applications.
Enterprise beans and their container run on the J2EE server.
What is Applet container? - IManages the execution of applets. Consists of a Web browser and Java Plugin running on the client together.
How do we package J2EE components? - J2EE components are packaged separately and bundled into a J2EE application for deployment. Each component, its related files such as GIF and HTML files or server-side utility classes, and a deployment descriptor are assembled into a module and added to the J2EE application. A J2EE application is composed of one or more enterprise bean,Web, or application client component modules. The final enterprise solution can use one J2EE application or be made up of two or more J2EE applications, depending on design requirements. A J2EE application and each of its modules has its own deployment descriptor. A deployment descriptor is an XML document with an .xml extension that describes a component’s deployment settings.
What is a thin client? - A thin client is a lightweight interface to the application that does not have such operations like query databases, execute complex business rules, or connect to legacy applications.
What are types of J2EE clients? - Following are the types of J2EE clients:
o Applets
o Application clients
o Java Web Start-enabled rich clients, powered by Java Web Start technology.
o Wireless clients, based on Mobile Information Device Profile (MIDP) technology.
What is deployment descriptor? - A deployment descriptor is an Extensible Markup Language (XML) text-based file with an .xml extension that describes a component’s deployment settings. A J2EE application and each of its modules has its own deployment descriptor. For example, an enterprise bean module deployment descriptor declares transaction attributes and security authorizations
for an enterprise bean. Because deployment descriptor information is declarative, it can be changed without modifying the bean source code. At run time, the J2EE server reads the deployment descriptor and acts upon the component accordingly.
What is the EAR file? - An EAR file is a standard JAR file with an .ear extension, named from Enterprise ARchive file. A J2EE application with all of its modules is delivered in EAR file.
What is JTA and JTS? - JTA is the abbreviation for the Java Transaction API. JTS is the abbreviation for the Jave Transaction Service. JTA provides a standard interface and allows you to demarcate transactions in a manner that is independent of the transaction manager implementation. The J2EE SDK implements the transaction manager with JTS. But your code doesn’t call the JTS methods directly. Instead, it invokes the JTA methods, which then call the lower-level JTS routines. Therefore, JTA is a high level transaction interface that your application uses to control transaction. and JTS is a low level transaction interface and ejb uses behind the scenes (client code doesn’t directly interact with JTS. It is based on object transaction service(OTS) which is part of CORBA.
What is JAXP? - JAXP stands for Java API for XML. XML is a language for representing and describing text-based data which can be read and handled by any program or tool that uses XML APIs. It provides standard services to determine the type of an arbitrary piece of data, encapsulate access to it, discover the operations available on it, and create the appropriate JavaBeans component to perform those operations.
What is J2EE Connector? - The J2EE Connector API is used by J2EE tools vendors and system integrators to create resource adapters that support access to enterprise information systems that can be plugged into any J2EE product. Each type of database or EIS has a different resource adapter. Note: A resource adapter is a software component that allows J2EE application components to access and interact with the underlying resource manager. Because a resource adapter is specific to its resource manager, there is typically a different resource adapter for each type of database or enterprise information system.
What is JAAP? - The Java Authentication and Authorization Service (JAAS) provides a way for a J2EE application to authenticate and authorize a specific user or group of users to run it. It is a standard Pluggable Authentication Module (PAM) framework that extends the Java 2 platform security architecture to support user-based authorization.
What is Java Naming and Directory Service? - The JNDI provides naming and directory functionality. It provides applications with methods for performing standard directory operations, such as associating attributes with objects and searching for objects using their attributes. Using JNDI, a J2EE application can store and retrieve any type of named Java object. Because JNDI is independent of any specific implementations, applications can use JNDI to access multiple naming and directory services, including existing naming and
directory services such as LDAP, NDS, DNS, and NIS.
What is Struts? - A Web page development framework. Struts combines Java Servlets, Java Server Pages, custom tags, and message resources into a unified framework. It is a cooperative, synergistic platform, suitable for development teams, independent developers, and everyone between.
How is the MVC design pattern used in Struts framework? - In the MVC design pattern, application flow is mediated by a central Controller. The Controller delegates requests to an appropriate handler. The handlers are tied to a Model, and each handler acts as an adapter between the request and the Model. The Model represents, or encapsulates, an application’s business logic or state. Control is usually then forwarded back through the Controller to the appropriate View. The forwarding can be determined by consulting a set of mappings, usually loaded from a database or configuration file. This provides a loose coupling between the View and Model, which can make an application significantly easier to create and maintain. Controller: Servlet controller which supplied by Struts itself; View: what you can see on the screen, a JSP page and presentation components; Model: System state and a business logic JavaBeans.
Java interview questions and answers
1. What is garbage collection? What is the process that is responsible for doing that in java? - Reclaiming the unused memory by the invalid objects. Garbage collector is responsible for this process
2. What kind of thread is the Garbage collector thread? - It is a daemon thread.
3. What is a daemon thread? - These are the threads which can run without user intervention. The JVM can exit when there are daemon thread by killing them abruptly.
4. How will you invoke any external process in Java? - Runtime.getRuntime().exec(….)
5. What is the finalize method do? - Before the invalid objects get garbage collected, the JVM give the user a chance to clean up some resources before it got garbage collected.
6. What is mutable object and immutable object? - If a object value is changeable then we can call it as Mutable object. (Ex., StringBuffer, …) If you are not allowed to change the value of an object, it is immutable object. (Ex., String, Integer, Float, …)
7. What is the basic difference between string and stringbuffer object? - String is an immutable object. StringBuffer is a mutable object.
8. What is the purpose of Void class? - The Void class is an uninstantiable placeholder class to hold a reference to the Class object representing the primitive Java type void.
9. What is reflection? - Reflection allows programmatic access to information about the fields, methods and constructors of loaded classes, and the use reflected fields, methods, and constructors to operate on their underlying counterparts on objects, within security restrictions.
10. What is the base class for Error and Exception? - Throwable
11. What is the byte range? -128 to 127
12. What is the implementation of destroy method in java.. is it native or java code? - This method is not implemented.
13. What is a package? - To group set of classes into a single unit is known as packaging. Packages provides wide namespace ability.
14. What are the approaches that you will follow for making a program very efficient? - By avoiding too much of static methods avoiding the excessive and unnecessary use of synchronized methods Selection of related classes based on the application (meaning synchronized classes for multiuser and non-synchronized classes for single user) Usage of appropriate design patterns Using cache methodologies for remote invocations Avoiding creation of variables within a loop and lot more.
15. What is a DatabaseMetaData? - Comprehensive information about the database as a whole.
16. What is Locale? - A Locale object represents a specific geographical, political, or cultural region
17. How will you load a specific locale? - Using ResourceBundle.getBundle(…);
18. What is JIT and its use? - Really, just a very fast compiler… In this incarnation, pretty much a one-pass compiler — no offline computations. So you can’t look at the whole method, rank the expressions according to which ones are re-used the most, and then generate code. In theory terms, it’s an on-line problem.
19. Is JVM a compiler or an interpreter? - Interpreter
20. When you think about optimization, what is the best way to findout the time/memory consuming process? - Using profiler
21. What is the purpose of assert keyword used in JDK1.4.x? - In order to validate certain expressions. It effectively replaces the if block and automatically throws the AssertionError on failure. This keyword should be used for the critical arguments. Meaning, without that the method does nothing.
22. How will you get the platform dependent values like line separator, path separator, etc., ? - Using Sytem.getProperty(…) (line.separator, path.separator, …)
23. What is skeleton and stub? what is the purpose of those? - Stub is a client side representation of the server, which takes care of communicating with the remote server. Skeleton is the server side representation. But that is no more in use… it is deprecated long before in JDK.
24. What is the final keyword denotes? - final keyword denotes that it is the final implementation for that method or variable or class. You can’t override that method/variable/class any more.
25. What is the significance of ListIterator? - You can iterate back and forth.
26. What is the major difference between LinkedList and ArrayList? - LinkedList are meant for sequential accessing. ArrayList are meant for random accessing.
27. What is nested class? - If all the methods of a inner class is static then it is a nested class.
28. What is inner class? - If the methods of the inner class can only be accessed via the instance of the inner class, then it is called inner class.
29. What is composition? - Holding the reference of the other class within some other class is known as composition.
30. What is aggregation? - It is a special type of composition. If you expose all the methods of a composite class and route the method call to the composite method through its reference, then it is called aggregation.
31. What are the methods in Object? - clone, equals, wait, finalize, getClass, hashCode, notify, notifyAll, toString
32. Can you instantiate the Math class? - You can’t instantiate the math class. All the methods in this class are static. And the constructor is not public.
33. What is singleton? - It is one of the design pattern. This falls in the creational pattern of the design pattern. There will be only one instance for that entire JVM. You can achieve this by having the private constructor in the class. For eg., public class Singleton { private static final Singleton s = new Singleton(); private Singleton() { } public static Singleton getInstance() { return s; } // all non static methods … }
34. What is DriverManager? - The basic service to manage set of JDBC drivers.
35. What is Class.forName() does and how it is useful? - It loads the class into the ClassLoader. It returns the Class. Using that you can get the instance ( “class-instance”.newInstance() ).
36. Inq adds a question: Expain the reason for each keyword of
public static void main(String args[])
Perl interview questions and answers
1. What arguments do you frequently use for the Perl interpreter and what do they mean?
2. What does the command ‘use strict’ do and why should you use it?
3. What do the symbols $ @ and % mean when prefixing a variable?
4. What elements of the Perl language could you use to structure your code to allow for maximum re-use and maximum readability?
5. What are the characteristics of a project that is well suited to Perl?
6. Why do you program in Perl?
7. Explain the difference between my and local.
8. Explain the difference between use and require.
9. What’s your favorite module and why?
10. What is a hash?
11. Write a simple (common) regular expression to match an IP address, e-mail address, city-state-zipcode combination .
12. What purpose does each of the following serve: -w, strict, -T ?
13. What is the difference between for & foreach, exec & system?
14. Where do you go for Perl help?
15. Name an instance where you used a CPAN module.
16. How do you open a file for writing?
17. How would you replace a char in string and how do you store the number of replacements?
18. When would you not use Perl for a project?
http://www.techinterviews.com/javascript-tutorials
http://www.techinterviews.com
List of Free C Compilers
If you're interested in learning to program in C you'll find this list of C Compilers handy. Most of these compilers do C++ and C. Just rename the files to have .C extensions.
• Microsoft Visual C++ 2008 Express. Not everyone likes Microsoft but there's no denying that they do provide very good code with an excellent IDE. It needs .NET though you can compile for win 32 (but no MFC). We've already produced Instructions on downloading and installing it. it requires free registration.
• Linkfrm. This is more of a computer science project developed at the IPD at the Universität Karlsruhe to improve the quality of software with visualization of of program structures. It includes cparser, a C compiler, which can parse C89 and C99 as well as many GCC and some MSVC extensions. The handled GCC extensions include __attribute__, inline assembler, computed goto and statement expressions. See this post for more about the project.
• Turbo Explorer for C++. Originally Borland then Codegear and now Embarcadero, this is a fast and poewerful C++ (which includes C like Microsoft's does). Also like Microsoft's compiler it requires free registration. It includes a great IDE, a great debugger features, Code Insight, templates, and easy database explorer and connectivity. There is support for databases as well. This needs Windows.
• Open Watcom. Getting a bit long in the tooth and the IDE isn't great but runs on Windows 2000 (probably 98) as well as newer Windows.
• GCC. The classic open source C compiler for Linux and many other operating systems (and Windows under Cygwin or Ming). A project that has been around forever. Excellent open source quality software. It doesn't come with an IDE (which are generally platform dependent) but there are loads out there eg MonoDevelop on Linux.
• Digital Mars C/C++ Compiler. Their IDE costs ($42.55) but the Basic C/C++ Win 32 compiler is free. You should also download the free STLPort as well as it contains the standard library including
• Xcode. This is for Apple Macs and is their version of GCC but purely for Apple's own Mac OS Operating System. It has excellent documentation and SDKs for Mac and iPhone. If you have a Mac this is what you use.
• Tiny C - Compiler. TinyCC (aka TCC) is a small fast C compiler that is meant to be self-relying: you do not need an external assembler or linker because TCC does that for you. With the aid of another library it can be used as a backend code generator. TCC compiles so fast that even for big projects Makefiles may not be necessary.
• Portable C Compiler. This was developed from one of the earliest C Compilers and at the start of the 80s most c compilers were based on it. Portability was designed into it from the start in contrast to Dennis Ritchie's C compiler which was very hardware dependent. It's now being developed to be C99 compatible.
• Failsafe C. A Japanese project from the Research Team for Software Security at the Research Center for Information Security (RCIS), National Institute of Advanced Industrial Science and Technology (AIST), JAPAN, this version of C for Linux supports over 500 functions (not C99 or Widechar). It provides complete protection against memory block over-boundary accesses making it as safe as Java and C#.
• Pelles C is a free development kit for Windows and Windows Mobile containing an optimizing C compiler, a macro assembler, a linker, a resource compiler, a message compiler, a make utility and install builders for both Windows and Windows Mobile. It also has an IDE with project management, debugger, source code editor and resource editors for dialogs, menus, string tables, accelerator tables, bitmaps, icons, cursors, animated cursors, animation videos (AVI's without sound), versions and XP manifests.
• CC65 is an open source cross development package for 65(C)02 systems, including a powerful macro assembler, a C compiler, linker, librarian and several other tools. It includes support for Commodore C64, the GEOS operating system for the Commodore C64, the Commodore C128, the Commodore C16, C116 and Plus/4, the Commodore P500, the Commodore 600/700 family of computers, the Apple ][, the Atari 8bit machines, the Oric Atmos, the Nintendo Entertainment System (NES), the Supervision Game Console and the Atari Lynx Console





