Friday, 20 May 2011

List Of Delphi Keyboard Shortcut - Very Useful

Code Insight

Code Parameters : Ctrl-Shift-Space
Code Completion : Ctrl-Space
Code Templates : Ctrl-J

Class Completion
Class Completion : Ctrl-Shift-C
Class Nav Up Ctrl-Shift-Up
Class Nav Down Ctrl-Shift-Down

Code Browsing (D6 and above)
Symbol Browsing : Alt-Up
Browse Forward : Alt-Right
Browse Backward : Alt-Left

Message Window
Previous Message : Alt-F7
Next Message : Alt-F8

IDE Windows
Code Explorer : Ctrl-Shift-E
Project Manager : Ctrl-Alt-F11
Window List : Alt-0 (zero)
Object Inspector : F11

Debugger Windows
Event Log : Ctrl-Alt-V
Breakpoints : Ctrl-Alt-B
Watches : Ctrl-Alt-V
Threads : Ctrl-Alt-T

TODO List Window
Add TODO Item : Ctrl-Shift-T

Editing
Blocking Mode : Ctrl+O-L (line) Ctrl+O-C (column)

Debugging
Trace Into : F7
Step Over : F8
Trace to next source line : Shift-F7
Run to Cursor : F4
Run until return : Shift-F8
Program Reset : Ctrl-F2
Evaluate/Modify : Ctrl-F7
Add Watch : Ctrl-F5
Toggle Breakpoint : F5

Compiling
Compile Project : F5
Build : Ctrl-F5
Syntax Check : F5
Project Options : Ctrl-Shift-F11

Monday, 9 May 2011

A workaround to force keeping the leading 0 is to use a formula instead of a static string.

CODE
DEPTNO
10
20
30
40
SQL> select to_char(deptno,'FM000000000000000') deptno from dept;
DEPTNO
----------------
000000000000010
000000000000020
000000000000030
000000000000040

Wednesday, 4 May 2011

Creating an Index Explicitly

You can create indexes explicitly (outside of integrity constraints) using the SQL statement CREATE INDEX. The following statement creates an index named emp_ename for the ename column of the emp table:
CREATE INDEX emp_ename ON emp(ename)
      TABLESPACE users
      STORAGE (INITIAL 20K
      NEXT 20k
      PCTINCREASE 75);

Truncate Time in Date Time field in Oracle

Trunc(sysdate)

Examples of Case statement in Oracle

select a,
  case
    when b = '*' then 'star'
    when b = '+' then 'plus'
    when b = '-' then 'minus'
    else '????'
  end
from test_case_when;

Examples of Case statement in Oracle

select a,
  case
    when b = '*' then 'star'
    when b = '+' then 'plus'
    when b = '-' then 'minus'
    else '????'
  end
from test_case_when;

Tuesday, 3 May 2011

getting the application root path in windows .net

System.IO.Directory.GetParent(System.Windows.Forms.Application.ExecutablePath).ToString()