Sunday, 13 March 2016

List of Windows Keyboard Shortcuts

General Shortcuts 
These are applicable to nearly all Windows programs.

[F1]
Display Help. When in Windows Explorer or viewing the desktop, this shows you Windows Help. Otherwise, shows you the active program’s documentation.

[Ctrl] + [C]
Copy the selected item or text

[Ctrl] + [X]
Cut the selected item or text

[Ctrl] + [V]
Paste the selected item or text

[Ctrl] + [Z]
Undo the last action

[Ctrl] + [Y]
Redo the last action

[Delete]
Delete the selected item and move it to the Recycle Bin

[[Shift]] + [Delete]
Delete the selected item without moving it to the Recycle Bin first

[F2]
Rename the selected item

[Ctrl] + [Right Arrow]
Move the cursor to the beginning of the next word

[Ctrl] + [Left Arrow]
Move the cursor to the beginning of the previous word

[Ctrl] + [Down Arrow]
Move the cursor to the beginning of the next paragraph

[Ctrl] + [Up Arrow]
Move the cursor to the beginning of the previous paragraph

[Ctrl] + [[Shift]] + an arrow key
Select a block of text

[[Shift]] with any arrow key
Selectmore than one itemin a window or on the desktop, or select
text within a document

[Ctrl] with any arrow key + [Space]
Select multiple individual items in a window or on the desktop

[Ctrl] + [A]
Select all items in a document or window

[F3]
Search for a file or folder

[Alt] + [Enter]
Display properties for the selected item

[Alt] + [F4]
Exit the active program

[Alt] + [Space]
Open the shortcut menu for the active window

[Ctrl] + [F4]
Close the active document (in programs that allow you to have multiple documents open simultaneously)

[Alt] + [Tab]
Switch between open programs or items

[Ctrl]+ [Alt] + [Tab]
Use the arrow keys to switch between open items (Vista only). Hit [Enter] to select the program you want to switch to

[Ctrl] + Mouse scroll wheel
Change the size of icons on the desktop – (Vista only)

[Windows] + [Tab]
Cycle through programs on the taskbar by using Windows Flip 3D (Vista only). In XP, cycle through programs using the taskbar buttons and hit [Enter] to select a program

[Ctrl] + [Windows] + [Tab]
Use the arrow keys to cycle through programs on the taskbar by using Windows Flip 3D (Vista only). Hit [Enter] to select the program you want to switch to

[Alt] + [Esc]
Cycle through items in the order in which they were opened

[F6]
Cycle through screen elements in a window or on the desktop

[F4]
Display the Address bar list in Windows Explorer

[[Shift]] + [F10]
Display the right-click menu for the selected item

[Ctrl] + [Esc] or [Windows]
Open the Start menu

[Alt] + underlined letter (in program menu)
Display the corresponding menu – for Example, [Alt] + [F] in a program opens the File menu

[F10]
Activate the menu bar in the active program

[Right Arrow] (in menu bar)
Open the next menu to the right, or open a submenu

[Left Arrow] (in menu bar)
Open the next menu to the left, or close a submenu

[F5]
Refresh the active window

[Alt] + [Up Arrow]
View the folder one level up in Windows Explorer

[Esc]
Cancel the current task

[Ctrl] + [[Shift]] + [Esc]
Open Task Manager. Also [Ctrl] + [Alt] + [Delete] in Windows XP Hold down [[Shift]] when you insert a CD / DVD Prevent the CD / DVD from automatically playing

Dialog Box Shortcuts
Use these in dialog boxes – Control Panel items, Save and Open
dialogs and so on.

[Ctrl] + [Tab]
Move forward through tabs

[Ctrl] + [Shift] + [Tab]
Move back through tabs

[Tab]
Move forward through options

[Shift] + [Tab]
Move back through options

[Alt] + underlined letter
Perform the command (or select the option) that goes with that letter

[Enter]
Replaces clicking the mouse for many selected commands. Also equivalent to hitting the OK button

[Space]
Change the state of a check box or radio button. Also to click on selected button – the button is clicked after you release the spacebar.

Arrow keys
Select a button if the active option is a group of option buttons

[F4]
Display the items in the active drop-down menu

[Backspace]
Open a folder one level up if a folder is selected in the Save As or Open dialog box


Windows Explorer Shortcuts

[Ctrl] + [N]
Open a new window (Vista only)

[End]
Display the bottom of the active window

[Home]
Display the top of the active window

[F11]
Maximise or minimise the active window (Vista). Go full-screen

(XP)
[*] on keypad (Num Lock on)
Display all subfolders under the selected folder

[+] on keypad (Num Lock on)
Display the contents of the selected folder

[-] on keypad (Num Lock on)
Collapse the selected folder

[Left Arrow]
Collapse the current selection (if it is expanded), or select the parent folder

[Alt] + [Left Arrow]
View the previous folder

[Right Arrow]
Display the current selection (if it is collapsed). If not, select the first subfolder (Vista only)

[Alt] + [Right Arrow]
View the next folder

[Ctrl] + Mouse scroll wheel
Change the size and appearance of file and folder icons (Vista only)

[Alt] + [D]
Select the Address bar


Windows Key Shortcuts

[Windows]
Open or close the Start menu

[Windows] + PAUSE
Display the System Properties dialog box

[Windows] +D
Display the desktop

[Windows] +M
Minimize all windows

[Windows] +SHIFT+M
Restore minimized windows to the desktop

[Windows] +E
Open Computer

[Windows] +F
Search for a file or folder

CTRL+[Windows] +F
Search for computers (if you are on a network)

[Windows] +L
Lock your computer or switch users

[Windows] +R
Open the Run dialog box

[Windows] +T
Cycle through programs on the taskbar

[Windows] +TAB
Cycle through programs on the taskbar by using Windows Flip 3-D

CTRL+[Windows] +TAB
Use the arrow keys to cycle through programs on the taskbar by using Windows Flip 3-D

[Windows] +SPACEBAR
Bring all gadgets to the front and select Windows Sidebar

[Windows] +G
Cycle through Sidebar gadgets

[Windows] +U
Open Ease of Access Center

[Windows] +X
Open Windows Mobility Center

[Windows] with any number key
Open the Quick Launch shortcut that is in the position that corresponds to the number. For example, [Windows] +1 to launch the first shortcut in the Quick Launch menu.

Ease Of Access Shortcuts
You can turn these off too.

Right [Shift] for eight seconds
Turn Filter Keys on and off

Left [Alt] + left [Shift] + [Print Screen] (or [PrtScrn])
Turn High Contrast on or off

Left [Alt] + left [Shift] + [Num Lock]
Turn Mouse Keys on or off

[Shift] five times
Turn Sticky Keys on or off

[Num Lock] for five seconds
Turn Toggle Keys on or off

Windows logo key + [U]
Open the Ease of Access Center

Shortcuts For Shortcuts

You can also assign your own keyboard shortcuts to programs you use often. We assume that there’s already a shortcut to this program in the Start Menu or on your desktop. Right-click on that shortcut and choose Properties. In the dialog box, click in the Shortcut Key text box and press your shortcut combination.

You can use [Ctrl], [Alt] and [Shift] in your shortcut, but unfortunately not the Windows key. If you’re going to use [Ctrl] + [Alt], you don’t even need to press them. Windows adds the combination before your shortcut key, so if you hit, say, [3], your shortcut automatically becomes [Ctrl] + [Alt] + [3].
Read More »

You can't create a folder name as "CON"

Nobody can create a FOLDER anywhere on the Computer which can be named as "CON".

a.Go desktop
b.create new folder

c.rename "CON"

How is it?..


Read More »

Saturday, 12 March 2016

Useful Printer System Options

If your printout in the SAS session begins with page 256, it reveals the number of times you ran the program before printing. Reset the beginning page number before your final run.

To reset the page number, the code is:


options pageno=1;  

To set orientation and paper size:


options orientation="landscape"; 
options orientation="portrait"; 
options papersize="legal";  

To remove page breaks and put dashes (-) across the page:

options formdlim="-"; 

To reinstall page breaks (there is no space between the quotes):


options formdlim=""; 

To left justify output:



options nocenter; 
Read More »

Friday, 11 March 2016

Debugging Complex Macros

It’s possible to write code generated by macros to an external file. The file can’t be access until the SAS session has ended. In SAS 6.12 you use the options RESERVEDB1 & MPRINT to achieve this. In version 8 you need to use the options MFILE & MPRINT. 

You then also need to define a fileref for MPRINT, to which the generated SAS code is written. 

filename mprint 'c:\macro.sas' ; 

This technique is very useful for complex macros with many loops and multiple ampersands since you can see the code that is generated. You can then run the code generated through data step debugger to resolve any problems or understand what is happening.

Read More »

Wednesday, 2 March 2016

Few interesting new features in SAS 9.3 – Macro Language

Automatic Macro Variable SYSNOBS: Contains the number of observations read from the last data set that was closed by the previous procedure or DATA step.
Macro Function %SYSMACEXIST: Indicates whether there is a macro definition exist in the WORK.SASMACR catalog.
Macro Statement %SYSMACDELETE: Deletes a macro definition from the WORK.SASMACR catalog.
Till SAS 9.2, the alternate code what we used to write is:
proc catalog catalog=work.sasmacr;
delete helloworld.macro;
quit;
More macro debugging with MAUTOCOMPLOC System option: Displays in the SAS log the source location of the autocall macros when the autocall macro is compiled.
Read More »

Wednesday, 13 January 2016

What is the difference between '+' operator and SUM function?


 SUM function returns the sum of non-missing arguments whereas “+” operator returns a missing value if any of the arguments are missing.

Suppose we have a data set containing three variables - X, Y and Z. They all have missing values. We wish to compute sum of all the variables.

The data is shown in the image below :




data mydata2;
set mydata;
a=sum(x,y,z);
p=x+y+z;
run;

The output is shown in the image below :


In the output, value of p is missing for 4th, 5th and 6th observations.
Read More »

Difference between WHERE and IF conditions


WHERE condition wins against IF condition in the following cases :

1. The WHERE statement can be used in procedures to subset data while IF statement cannot be used in procedures.

Look at the log of WHERE and IF statements shown below :





2. WHERE can be used as a data set option while IF cannot be used as a data set option.

Look at the log of WHERE and IF conditions shown below :




3. The WHERE statement is more efficient than IF statement. It tells SAS not to read all observations from the data set.

Look at the LOG (shown below) after using WHERE statement, you only see a count of the number of observations that meet the criteria in the WHERE statement.

Only 6 observations were read from the dataset READIN. In actual, the dataset READIN contains 14 observations.



All 14 observations are read and the 6 that meet the IF criteria are placed in the new data set.


NOTE : Both statements produced the same result.

4. The WHERE statement can be used to search for all similar character values that sound alike while IF statement cannot be used.

For example, you want to filter out all the names that sound alike 'Sam'.



IF condition wins against WHERE condition in the following cases :

1. When reading data using INPUT statement.

IF Statement





WHERE Statement

WHERE statement can not be used when specifying an input statement.




2. When it is required to execute multiple conditional statements

Suppose, you have data for college students’ mathematics scores. You want to rate them on the basis of their scores.

Conditions :
1. If a score is less than 40, create a new variable named “Rating” and give “Poor” rating to these students.
2. If a score is greater than or equal to 40 but less than 75, give “Average” rating to these students.
3. If a score is greater than or equal to 75 but less than or equal to 100, give “Excellent” rating to these students.

This can be easily done using IF-THEN-ELSE IF statements. However, WHERE statement requires variables to exist in the data set.


3. When it is required to use newly created variables.

IF statement doesn't require variables to exist in the READIN data set while WHERE statement requires variable to exist in the data set.







SOURCE
Read More »