Thứ Tư, 3 tháng 12, 2008

C# .Net Bonus: Regix Library - Cheats Sheet

From : RegixLib.com
Namespace: System.Text.RegularExpressions





Metacharacters Defined

MCharDefinitionPatternSample Matches
^Start of a string.^abcabc, abcdefg, abc123, ...
$End of a string.abc$abc, endsinabc, 123abc, ..
.Any character (except \n newline)a.cabc, aac, acc, adc, aec, ...
|Alternation.bill|tedted, bill
{...}Explicit quantifier notation.ab{2}cabbc
[...]Explicit set of characters to match.a[bB]cabc, aBc
(...)Logical grouping of part of an expression.(abc){2}abcabc
*0 or more of previous expression.ab*cac, abc, abbc, abbbc, ...
+1 or more of previous expression.ab+cabc, abbc, abbbc, ...
?0 or 1 of previous expression; also forces minimal matching when an expression might match several strings within a search string.ab?cac, abc
\Preceding one of the above, it makes it a literal instead of a special character. Preceding a special matching character, see below.a\sca c









Character Escapes http://msdn.microsoft.com/library/en-us/cpgenref/html/cpconcharacterescapes.asp

ordinary charactersCharacters other than . $ ^ { [ ( | ) ] } * + ? \ match themselves.
\a
Matches a bell (alarm) \u0007.
\b
Matches a backspace \u0008 if in a []; otherwise matches a word boundary (between \w and \W characters).
\t
Matches a tab \u0009.
\r
Matches a carriage return \u000D.
\v
Matches a vertical tab \u000B.
\f
Matches a form feed \u000C.
\n
Matches a new line \u000A.
\e
Matches an escape \u001B.
\040
Matches an ASCII character as octal (up to three digits); numbers with no leading zero are backreferences if they have only one digit or if they correspond to a capturing group number. (For more information, see Backreferences.) For example, the character \040 represents a space.
\x20
Matches an ASCII character using hexadecimal representation (exactly two digits).
\cC
Matches an ASCII control character; for example \cC is control-C.
\u0020Matches a Unicode character using a hexadecimal representation (exactly four digits).
\*
When followed by a character that is not recognized as an escaped character, matches that character. For example, \* is the same as \x2A.



Character Classes http://msdn.microsoft.com/library/en-us/cpgenref/html/cpconcharacterclasses.asp

.
Matches any character except \n. If modified by the Singleline option, a period character matches any character. For more information, see Regular Expression Options.
[aeiou]Matches any single character included in the specified set of characters.
[^aeiou]Matches any single character not in the specified set of characters.
[0-9a-fA-F]Use of a hyphen (–) allows specification of contiguous character ranges.
\p{name}
Matches any character in the named character class specified by {name}. Supported names are Unicode groups and block ranges. For example, Ll, Nd, Z, IsGreek, IsBoxDrawing.
\P{name}
Matches text not included in groups and block ranges specified in {name}.
\w
Matches any word character. Equivalent to the Unicode character categories [\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}]. If ECMAScript-compliant behavior is specified with the ECMAScript option, \w is equivalent to [a-zA-Z_0-9].
\W
Matches any nonword character. Equivalent to the Unicode categories [^\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}]. If ECMAScript-compliant behavior is specified with the ECMAScript option, \W is equivalent to [^a-zA-Z_0-9].
\s
Matches any white-space character. Equivalent to the Unicode character categories [\f\n\r\t\v\x85\p{Z}]. If ECMAScript-compliant behavior is specified with the ECMAScript option, \s is equivalent to [ \f\n\r\t\v].
\S
Matches any non-white-space character. Equivalent to the Unicode character categories [^\f\n\r\t\v\x85\p{Z}]. If ECMAScript-compliant behavior is specified with the ECMAScript option, \S is equivalent to [^ \f\n\r\t\v].
\d
Matches any decimal digit. Equivalent to \p{Nd} for Unicode and [0-9] for non-Unicode, ECMAScript behavior.
\D
Matches any nondigit. Equivalent to \P{Nd} for Unicode and [^0-9] for non-Unicode, ECMAScript behavior.

Thứ Hai, 1 tháng 12, 2008

Architect #1: Comprehensive List of How to Access BIOS for Various OEM and Computer Systems

Most OEM PC or custom-built clone PC using third-party motherboard (MOBO) allows user to configure various settings in BIOS (CMOS setup) to enter BIOS Setup or Configuration Utility in order to enable or disable devices or ports available, and more commonly, boot device priority or sequence. Some advanced settings also allow user to tweak computer performance, such as CPU clock speed multiplier and CPU front side bus (FSB) rate for overclocking, chipset features, DRAM parity, speed and timing, etc.

To access BIOS configuration screen, user need to press and invoke a specific hotkey or keys combination during the initial BIOS load screen (usually right after the computer is powered on). Here’s a list of the ways and access keys to press to access BIOS Setup Utility on variety of popular OEM computer systems, motherboard makers and major BIOS brands. Note that some BIOS or computer systems may have more than one method of accessing BIOS depending on when the BIOS is released.

Acer (Aspire, Power, Veriton, Extensa, Ferrari, TravelMate, Altos): Press [F2] or [Del] Immediately After Power Up
Acer (Altos 600 Server): Press [Ctrl]+[Alt]+[Esc] or [F1] During Boot (for Advanced Options)
Acer (Older PC): Press [F1] or [Ctrl]+[Alt]+[Esc] to Access BIOS
AMI (American Megatrends AMIBIOS, AMI BIOS): Press [Delete] During Boot
AMI
AMI (American Megatrends AMIBIOS, AMI BIOS) - Old Version: Press [F1] or [F2] During Boot
Award BIOS (AwardBIOS): Press [Del] After Powering Up Computer
Award BIOS (AwardBIOS) - Old Version : Press [Ctrl]+[Alt]+[Esc] During Boot
ALR: Press [Ctrl]+[Alt]+[Esc] or [Ctrl]+[Alt]+[Del] During Boot
ARI: Press [Ctrl]+[Alt]+[Esc] or [Ctrl]+[Alt]+[Del] During Boot
AST Advantage: Press [Ctrl]+[Alt]+[Esc] During Boot
Compaq (Presario, Prolinea, Deskpro, Systempro, Portable): Press [F10] When Blinking Cursor Jumps To Top Right Corner of Screen
Compaq (Presario, Prolinea, Deskpro, Systempro, Portable): Press [F10] When Logo Screen Is Displayed
Compaq (Older Computers): Press [F1], [F2], [F10], or [Del] Key
Cybermax: Press [Esc] Key
Dell (XPS, Dimension, Inspiron, Latitude. OptiPlex, Precision, Vostro): Press F2 When Dell Logo Is Displayed Until “Entering Setup” Appears
Dell (Older 486 Models): Press [Ctrl]+[Alt]+[Enter] During Boot
Dell (Some Models): Press Reset Button Twice (i.e. Power Reset Button)
Dell Dimension L566cx System: Press [Del]
Dell (Older Laptop Models) : Press [Fn]+[Esc] or [Fn]+[F1]
DTK (Datatech Enterprises): Press [Esc] Key Right After Powering On the PC.
EISA Computer: Press the Reset button on the Front of the Computer, then Press [Ctrl]+[Alt]+[Esc] immediately when the memory count begins or Press [Crtl]+[Alt]+[S].
eMachines (eMonster, eTower, eOne, S-Series, T-Series): Press [Tab] or [Del] During Boot
eMachine (Some Older Computers): Press [F2]
Fujitsu (LifeBook, Esprimo, Amilo, Tablet, DeskPower): Press [F2] When Fujitsu Logo Is Appearing.
Gateway Using Phoenix BIOS (DX, FX, One, GM, GT, GX, Profile, Astro): Press [F1]
Gateway (Some Older PCs): Press [F2]
Hewlett-Parkard (HP Pavilion, TouchSmart, Vectra, OmniBook, Tablet): Press [F1] Upon Startup or Bootup
Hewlett-Parkard (HP Alternative): Press [F2] or [Esc]
Hewlett-Parkard (HP) Tablet PC: Press [F10] or [F12]
IBM ThinkPad using IBM BIOS (Early Models): Press [Ctrl]+[Alt]+[Ins] When Cursor Is At Upper-Right Corner of Screen
IBM ThinkPad using IBM BIOS (Later Models): Press and Hold [F1] When Powering Up Laptop
IBM ThinkPad using Phoenix BIOS: Press [Ctrl]+[Alt]+[F11] from DOS Prompt
IBM PS/1 (Late Models), PS/ValuePoint and 330s: Press [Ctrl]+[Alt]+[?]
IBM PS/2 with Reference Partition: Press [Insert] During Boot
IBM PS/2: Press [Ctrl]+[Ins] When Pointer Is At Top Right of Screen
IBM PS/2: Need Reference Disk and ADF Disk for Setup
IBM PS/2 75 and 90: Press [Ctrl]+[Alt]+[?]
IBM (PC, XT, AT): Press [F1] Immediately On Powering On the Computer
IBM (Older Computers or Notebooks): Press [F2]
Lenovo (ThinkPad, IdeaPad, 3000 Series, ThinkCentre, ThinkStation): Press [F1] or [F2] on Boot Up
Lenovo (Older Products): Press [Ctrl]+[Alt]+[F3], [Ctrl]+[Alt]+[Ins] or [Fn]+[F1].
Microid Research MR BIOS: Press [F1]
Micron (MPC Computers ClientPro, TransPort): Press [F1], [F2] or [Del] On Startup
NEC (PowerMate, Versa, W-Series): Press [F2] During Boot
NEC Versa Notebook: Press and Hold Down [F1] Upon Startup or Bootup
Olivetti PC Pro: Press [Ctrl]+[Alt]+[Shift]+[Del](in Num Pad) During Boot
Packard Bell (8900 Series, 9000 Series, Pulsar, Platinum, EasyNote, imedia, iextreme): Press [F1], [F2], or [Del].
Packard Bell (Early 386 and 486 Dodels): Press [Ctrl]+[Alt]+[S] Sequence
Phoenix BIOS (Phoenix-Award BIOS): Press [Del] During Power On Self-Test
Phoenix BIOS (Phoenix-Award BIOS) - Old Version: Press [Ctrl]+[Alt]+[S], [Ctrl]+[Alt]+[Esc], [Ctrl]+[Alt]+[Ins] or [Ctrl]+[S] During Power On Boot Self-Test Right After Startup
Sharp (Notebook Laptops, Actius UltraLite): Press [F2] On Computer Starts
Sharp (Old PCs): Require Setup Diagnostics Disk to Access BIOS
Shuttle (Glamor G-Series, D’vo, Prima P2-Series, Workstation, X Mini XPC, Surveillance): Press [F2] or [Del] on System Startup
Sony (VAIO, PCG-Series, VGN-Series): Press [F1], [F2] or [F3] After Turning On the Computer
Sony Vaio 320 Series: Press [F2] During Boot
Tandon 386: press [Ctrl]+[Shift]+[Esc]
Tandon: press [Ctrl]+[Shift]+[Esc]
Toshiba (Portégé, Satellite, Tecra): Press [Esc] During Boot
Toshiba (Portégé, Satellite, Tecra with Phoenix BIOS): Press [F1] during Boot
Zenith, Phoenix: Press [Ctrl]+[Alt]+[Ins] During Boot

Miscellaneous and Other Common BIOS Key Sequences

[Ctrl]+[Esc]
[Ctrl]+[Ins]
[Ctrl]+[Alt]
[Ctrl]+[Alt]+[+]
[Ctrl]+[Alt]+[F3]
[Ctrl]+[Alt]+[Del]
[Ctrl]+[Alt]+[S]
[Ctrl]+[Alt]+[Enter]
[Ctrl]+[Alt]+[Ins]
[Ctrl]+[Alt]+[Esc]
[Ctrl]+[Shift]+[Esc]
[Tab]
[F1]
[F3]
[F4]
[F10]
[F12]
[Fn]+[Function Key]

Note that for some older system with Phoenix BIOS, the following steps are required to get to BIOS setup screen:

  1. Exit or boot up to DOS.
  2. Press [Ctrl]+[Alt]+[Esc] to enter setup screen.
  3. If hot key sequence above doesn’t work due to changes or problems been made on the system, then try to use the key to lock the keyboard while leaving computer switched on.
  4. Press the Reset button on the front of the computer. A message will appear asking user to unlock the keyboard.
  5. Unlock the keyboard and press [F2] to run the CMOS setup.
  6. Press [Del] to bring up the CMOS setup program.

From http://www.mydigitallife.info/2008/07/06/comprehensive-list-of-how-key-to-press-to-access-bios-for-various-oem-and-computer-systems/