Substitute of LIMIT clause (as used in MySQL) in O…
Substitute of LIMIT clause (as used in MySQL) in Oracle:
SELECT COL_NAME (SELECT COL_NAME, ROWNUM r from TABLE_NAME) WHERE r BETWEEN 10 AND 15
It will select 6 rows (10th to 15th inclusive)
Substitute of LIMIT clause (as used in MySQL) in Oracle:
SELECT COL_NAME (SELECT COL_NAME, ROWNUM r from TABLE_NAME) WHERE r BETWEEN 10 AND 15
It will select 6 rows (10th to 15th inclusive)
You may change network setting (IP, DNS etc) using batch file in Windows XP.
Lets say, you want a config shown below:
To do so, create a file names as changeIP.bat and write following lines into that:
netsh int ip set address name=”Local Area Connection” source=static addr=10.129.163.208 mask=255.255.255.0
netsh int ip set address name=”Local Area Connection” source=static gateway=10.129.163.1 gwmetric=0
netsh int ip set dns name=”Local Area Connection” source=static addr=202.144.13.50 register=PRIMARY
netsh int ip add dns name=”Local Area Connection” addr=202.144.50.4 index=2
netsh int ip set wins name=”Local Area Connection” source=static addr=none
Now whenever you execute this bat file, your network setting will be changed as required
If you want to pass huge data to the client from your servlet, user may need to wait till the ServletOutputStream or JSPWriter flushes the data. This happens generally whenever you have a number of items page and you want to pass it to the client. The better approach is to flush the data partly using flush() method rather than flushing whole data at a time. You can initially flush header, then navigation bar, then body content and finally footer so that the user need not wait for whole data and he sees the header data immediately and so on with navigation bar, body content and footer.
out.write(header); out.flush(); // flush the header out.write(navbar); out.flush(); // flush the navigation bar // write dynamic data here out.flush(); // flush the dynamic data out.write(footer); out.flush(); // finally flush the footer
While running the application pass following as JVM argument
-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8765
This will start listening on port 8765, now you may attach remote debugger from any machine giving the IP/hostname and port.
Set Permissions for Shared Files and Folders
Sharing of files and folders can be managed in two ways. If you chose simplified file sharing, your folders can be shared with everyone on your network or workgroup, or you can make your folders private. (This is how folders are shared in Windows 2000.) However, in Windows XP Professional, you can also set folder permissions for specific users or groups. To do this, you must first change the default setting, which is simple file sharing. To change this setting, follow these steps:
•Open Control Panel, click Tools, and then click Folder Options.
•Click the View tab, and scroll to the bottom of the Advanced Settings list.
•Clear the Use simple file sharing (Recommended) check box.
•To manage folder permissions, browse to the folder in Windows Explorer, right–click the folder, and then click Properties. Click the Security tab, and assign permissions, such as Full Control, Modify, Read, and/or Write, to specific users.
You can set file and folder permissions only on drives formatted to use NTFS, and you must be the owner or have been granted permission to do so by the owner.
For a Safer, faster XP Close Unwanted Services
To disable unneeded startup services for a safer, faster XP, use the “Services” Admin Tool (Control Panel > Administrative Tools > Services). If you are a single user of a non-networked machine, you can disable the following items, with no ill effect.
Alerter
Clipbook
Computer Browser
Fast User Switching
Human Interface Access Devices
Indexing Service (Slows the hard drive down)
Messenger
Net Logon (unnecessary unless networked on a Domain)
Netmeeting Remote Desktop Sharing (disabled for extra security)
Remote Desktop Help Session Manager (disabled for extra security)
Remote Procedure Call Locator
Remote Registry (disabled for extra security)
Routing & Remote Access (disabled for extra security, used for remote support)
Server
SSDP Discovery Service (this is for the utterly pointless “Universal P’n’P”, & leaves TCP Port 5000 wide open)
TCP/IP NetBIOS Helper
Telnet (disabled for extra security)
Universal Plug and Play Device Host
Upload Manager
Windows Time
Wireless Zero Configuration (for wireless networks)
Workstation
Are you tired of seeing MSN Messenger pop up on your Windows XP system? As usual, in an effort to continue its course towards domination of everything, Microsoft has made it difficult to remove. But it is possible! The following method works in Windows XP Professional, but has not been tested on a system with SP1 installed. FYI, I’ve seen scripts that are similar to this, but fail miserably, automatically deleting other much-needed components! Better to do this slow and manually! As always, I am not responsible for the use or the misuse of this information; use at your own risk.
OR the same thing can be done as following
Open notepad and paste following content and save the file as _remove.vbs. After creation, double click the file and say yes on option alert box.
Option Explicit
On Error Resume Next
‘Dimension variables
Dim WSHShell, MyBox, p1, q1, rcmd
Dim jobfunc
‘Set the Windows Script Host Shell and assign values to variables
Set WSHShell = WScript.CreateObject(“WScript.Shell”)
p1 = “HKEY_LOCAL_MACHINESoftwareMicrosoftOutlook ExpressHide Messenger”
q1 = 2
rcmd = “RunDll32 advpack.dll,LaunchINFSection %windir%infmsmsgs.inf,BLC.Remove”
‘Create or change the Hide Messenger value
WSHShell.RegWrite p1, q1
‘Run the uninstall command
WshShell.Run(rcmd)
Open notepad and paste following content and save the file as XPSearch.reg. After creation, double click the file and say yes on option alert box.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerCabinetState]
“Settings”=hex:0c,00,02,00,1b,01,e7,77,60,00,00,00
“FullPath”=dword:00000001
“FullPathAddress”=dword:00000001
“Use Search Asst”=”no”
Open notepad and paste following content and save the file as resetIEViewSource.reg. After creation, double click the file and say yes on option alert box.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerView Source EditorEditor Name]
@=”C:\Windows\notepad”
Open notepad and paste following content and save the file as cmdComplete.reg. After creation, double click the file and say yes on option alert box.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USERSoftwareMicrosoftCommand Processor]
“CompletionChar”=dword:00000009