# HG changeset patch # User Oleksandr Gavenko # Date 1251217636 -10800 # Node ID 5e9ea846a8c3b6232d6ac62071c20ddc575872ca # Parent f6dc9574b69df6e26db14dc8123bf24b9e04c758# Parent 4202927c15ace9d275570ba1bd1219b816bc8122 Merged conflict. diff -r 4202927c15ac -r 5e9ea846a8c3 cpp.rst --- a/cpp.rst Sun Aug 02 14:24:07 2009 +0300 +++ b/cpp.rst Tue Aug 25 19:27:16 2009 +0300 @@ -1,12 +1,34 @@ --*- outline -*- - -* How to see macros expansion? - -** GCC. - - $ cpp .c - -** MSVC. - - $ cl /E .c - +-*- outline -*- + +* How to see macros expansion? + +** GCC. + + $ cpp .c + +** MSVC. + + $ cl /E .c + +* Who to see predefined macros? + +See + + http://predef.sourceforge.net/ + http://en.wikipedia.org/wiki/C_preprocessor#Compiler-specific_predefined_macros + +** GNU C Compiler. + + $ gcc -dM -E - < /dev/null + +** HP-UX ansi C compiler. + + $ cc -v EMPTY.c + +** SCO OpenServer C compiler. + + $ cc -## EMPTY.c + +** Sun Studio C/C++ compiler. + + $ cc -## EMPTY.c diff -r 4202927c15ac -r 5e9ea846a8c3 driver-win.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/driver-win.rst Tue Aug 25 19:27:16 2009 +0300 @@ -0,0 +1,91 @@ +-*- outline -*- + +* Which version exist? + + - VxD + Windows 3.x and Windows 9x + - Windows Driver Model (WDM) + Windows 98, Windows 98 Second Edition, Windows Me, Windows + 2000, Windows XP, Windows Server 2003 and Windows Vista (for + backwards compatibility) + - Windows Driver Foundation (WDF) + Windows 2000 and later + +* VxD. + +See + + http://en.wikipedia.org/wiki/VxD + +* WDM. + +See + + http://en.wikipedia.org/wiki/Windows_Driver_Model + +* WDF. + +See + + http://en.wikipedia.org/wiki/Windows_Driver_Foundation + +* Filename extension. + + * VxD + .386 under Windows 3.x + .vxd under Windows 95 + +* Tools. + +** Microsoft DDK. + +*** DevCon. + +Supported device classes: + + cmd> devcon.exe classes + +Which files used by specific driver (with "*" prints list of files for all drivers): + + cmd> devcon.exe driverfiles * + +Device ID (names included): + + cmd> devcon.exe hwids * + +Device status (running/stoped): + + cmd> devcon.exe status * + +** USB Command Verifier. + +All USB peripherals are required to pass the Device Framework tests in order +to gain certification. + + http://www.usb.org/developers/tools/ + +* Files. + +** Windows 98 SE/ME. + +** Windows NT (2000/XP/2003). + + * .inf + Stored in %Windir%\Inf. + * .pnf + Precompiled INF File. Stored in %Windir%\Inf. + +* Driver type. + +** CDC. + + http://support.microsoft.com/kb/837637 + How to use or to reference the Usbser.sys driver from + universal serial bus (USB) modem .inf files. + +* Driver class. + +See + + http://msdn.microsoft.com/en-us/library/ms791134.aspx + System-Supplied Device Setup Classes diff -r 4202927c15ac -r 5e9ea846a8c3 emacs.rst --- a/emacs.rst Sun Aug 02 14:24:07 2009 +0300 +++ b/emacs.rst Tue Aug 25 19:27:16 2009 +0300 @@ -1,50 +1,54 @@ --*- mode: outline -*- +-*- mode: outline; coding: utf-8 -*- + +* Debugging. + +** Using edebug. + +Execute 'M-x edebug-defun' (also on 'C-u C-M-x') on defun in source code to +enable debugging for desired function. When next time this function invoked +you entered to its debugging (jamped to its source code). + +To start debug execute code which used debugged function. -* How debug ini file? +You can disable edebug on a function by evaluating the function again using +'C-M-x'. + +** How debug func? + +Use M-x debug-on-entry and M-x cancel-debug-on-entry to control +which functions will enter the debugger when called. + +When next time that function called automatically loaded debug-mode. + +** How debug ini file? When your InitFile has a bug, or when you load external files that cause errors, the bug is often hard to find, because the Emacs Lisp reader does not -know about line numbers and files – it just knows an error happened, and -that’s it. +know about line numbers and files - it just knows an error happened, and +that's it. -** Binary Search. +*** Binary Search. Select half of the file in a region, and M-x eval-region. Depending on whether that causes the error or not, split this half or the other half again, and repeat. -** Elisp. +*** Elisp. - Use a keyboard macro that moves forward one expression (sexp) and evaluates it. - Try C-x check-parens. - Set (setq debug-on-error t). -** CLI. +*** CLI. $ emacs --no-init-file --no-site-file --debug-init -** Simplified Binary Search. - -Add (error “No error until here”) in the middle of your file. If you get the -error “No error until here” when reloading the file, move the expression -towards the back of the file, otherwise towards the front of the file. - -* Using edebug. +*** Simplified Binary Search. -The main entry point is ‘M-x edebug-defun’ (also on ‘C-u C-M-x’). Use it -instead of `C-x C-e’ or ‘C-M-x’ to evaluate a ‘defun’ and instrument it for -debugging. - -You can disable edebug on a function by evaluating the function again using -‘C-M-x’. - -* How debug func? - -Use M-x debug-on-entry and M-x cancel-debug-on-entry to control -which functions will enter the debugger when called. - -When next time that function called automatically loaded debug-mode. +Add (error 'No error until here') in the middle of your file. If you get the +error 'No error until here' when reloading the file, move the expression +towards the back of the file, otherwise towards the front of the file. * WWW. @@ -53,4 +57,3 @@ http://en.wikipedia.org/wiki/W3m http://emacs-w3m.namazu.org/ http://www.gnu.org/software/w3/ - diff -r 4202927c15ac -r 5e9ea846a8c3 java.rst --- a/java.rst Sun Aug 02 14:24:07 2009 +0300 +++ b/java.rst Tue Aug 25 19:27:16 2009 +0300 @@ -1,16 +1,16 @@ --*- outline -*- - -* Class version. - -See value of 6 and 8 bytes in .class file: - - {0xCA, 0xFE, 0xBA, 0xBE, 0x00, minor, 0x00, major} - -major minor Java platform version -45 3 1.0 -45 3 1.1 -46 0 1.2 -47 0 1.3 -48 0 1.4 -49 0 1.5 -50 0 1.6 +-*- outline -*- + +* Class version. + +See value of 6 and 8 bytes in .class file: + + {0xCA, 0xFE, 0xBA, 0xBE, 0x00, minor, 0x00, major} + +major minor Java platform version +45 3 1.0 +45 3 1.1 +46 0 1.2 +47 0 1.3 +48 0 1.4 +49 0 1.5 +50 0 1.6 diff -r 4202927c15ac -r 5e9ea846a8c3 windows.rst --- a/windows.rst Sun Aug 02 14:24:07 2009 +0300 +++ b/windows.rst Tue Aug 25 19:27:16 2009 +0300 @@ -1,14 +1,30 @@ -*- outline -*- -* Vista and Samba. +* XP. + +** Recovery. + + cmd> sfc /Scannow + +To complite repair you may need original installation CD. Works for +Windows 2000, Windows XP, Windows 2003. + +See + + http://support.microsoft.com/kb/222471/ + http://support.microsoft.com/kb/310747/ru + +* Vista + +** Samba. By default, you cannot authenticate and share files to and from Mac OS X or Linux Samba due to a well known authentication method turned off by default. To enable this, -** Only for Windows Vista Ultimate/Business/Enterprise Editions. +*** Only for Windows Vista Ultimate/Business/Enterprise Editions. -Goto Start—>Run and open gpedit.msc or secpol.msc +Goto Start->Run and open gpedit.msc or secpol.msc Select Continue on the User Account Control prompt. This will launch the Group Policy Object Editor for the Local Computer Policy. @@ -21,22 +37,22 @@ -> Local Policies -> Security Options -Open the ‘Network security: LAN Manager authentication level’ policy and +Open the "Network security: LAN Manager authentication level" policy and change the Security Setting to: Send LM & NTLM - use NTLMv2 session security if negotiated -** Windows Vista Home Edition. +*** Windows Vista Home Edition. Since Windows Vista Home Edition does not feature the Group Policy Editor, you may do the following to enable this feature: -Goto Start—>Run—> and type regedit. +Goto Start->Run-> and type regedit. Select Continue on the User Account Control prompt. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa -Create the following DWORD value (if it doesn’t exist): LmCompatibilityLevel +Create the following DWORD value (if it doesn't exist): LmCompatibilityLevel And set its value to: 1