# HG changeset patch # User Oleksandr Gavenko # Date 1249627245 -10800 # Node ID ab7bb7734d2aefafe0ded5e81bb53b0385459ac0 # Parent 8e806cddee362102799459d03af9f78152017617# Parent 71a6d14aa3092981c54be796ab631359445c4971 merged diff -r 71a6d14aa309 -r ab7bb7734d2a benchmark.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmark.rst Fri Aug 07 09:40:45 2009 +0300 @@ -0,0 +1,13 @@ +-*- outline -*- + +* CPU. + + http://www.cpubenchmark.net/ + +* Video. + + http://www.videocardbenchmark.net/ + +* Hard drive. + + http://www.harddrivebenchmark.net/ diff -r 71a6d14aa309 -r ab7bb7734d2a blog.rst --- a/blog.rst Sun Jul 26 21:51:40 2009 +0300 +++ b/blog.rst Fri Aug 07 09:40:45 2009 +0300 @@ -6,9 +6,35 @@ http://code.google.com/p/e-blog/ -* Livejornal. +* Feed. + +** Blogspot. + +See + + http://www.google.com/support/blogger/bin/answer.py?hl=en&answer=97933 + +*** Article feed. + + * Atom 1.0: http://BLOGNAME.blogspot.com/feeds/posts/default + * RSS 2.0: http://BLOGNAME.blogspot.com/feeds/posts/default?alt=rss + +*** Comments-only feed. -** Feed. + * Atom 1.0: http://BLOGNAME.blogspot.com/feeds/comments/default + * RSS 2.0: http://BLOGNAME.blogspot.com/feeds/comments/default?alt=rss + +*** Label-specific site feed. + + * Atom 1.0: http://BLOGNAME.blogspot.com/posts/comments/default/-/labelname + * RSS 2.0: http://BLOGNAME.blogspot.com/feeds/posts/default?alt=rss/-/labelname + +*** Individual post comment feed. + + * Atom 1.0: http://BLOGNAME.blogspot.com/feeds/postId/comments/default + * RSS 2.0: http://BLOGNAME.blogspot.com/feeds/postId/comments/default?alt=rss + +** Livejornal. See @@ -30,3 +56,34 @@ URL, replacing tagname with the actual tag name. If you want to view two or more tags at once, separate the tags with commas: ?tag=tag1,tag2. +** Wordpress. + +See + + http://support.wordpress.com/email-subscriptions/ + http://codex.wordpress.org/WordPress_Feeds + +*** Articles feed. + + http://BLOGNAME.wordpress.com/feed + http://BLOGNAME.wordpress.com/feed/ + http://BLOGNAME.wordpress.com/feed/rss/ + http://BLOGNAME.wordpress.com/feed/rss2/ + http://BLOGNAME.wordpress.com/feed/rdf/ + http://BLOGNAME.wordpress.com/feed/atom/ + http://BLOGNAME.wordpress.com/?feed=rss + http://BLOGNAME.wordpress.com/?feed=rss2 + http://BLOGNAME.wordpress.com/?feed=rdf + http://BLOGNAME.wordpress.com/?feed=atom + +*** Comments feed. + + http://BLOGNAME.wordpress.com/comments/feed/ + http://BLOGNAME.wordpress.com/?feed=comments-rss2 + +*** Tagged Entries. + + http://BLOGNAME.wordpress.com/category/TAG/feed/ + http://BLOGNAME.wordpress.com/tag/TAG/feed/ + http://BLOGNAME.wordpress.com/?cat=CATNUMBER&feed=rss2 + http://BLOGNAME.wordpress.com/?tag=TAG&feed=rss2 diff -r 71a6d14aa309 -r ab7bb7734d2a cpp.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cpp.rst Fri Aug 07 09:40:45 2009 +0300 @@ -0,0 +1,34 @@ +-*- 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 71a6d14aa309 -r ab7bb7734d2a devel-windows.rst --- a/devel-windows.rst Sun Jul 26 21:51:40 2009 +0300 +++ b/devel-windows.rst Fri Aug 07 09:40:45 2009 +0300 @@ -1,63 +1,63 @@ --*- mode: outline -*- - -* Dependency Walker. - -Dependency Walker is a free utility that scans any 32-bit or 64-bit Windows -module (exe, dll, ocx, sys, etc.) and builds a hierarchical tree diagram of -all dependent modules. For each module found, it lists all the functions that -are exported by that module, and which of those functions are actually being -called by other modules. Another view displays the minimum set of required -files, along with detailed information about each file including a full path -to the file, base address, version numbers, machine type, debug information, -and more. - -See - - http://www.dependencywalker.com/ - -* Kill process. - -** tskill.exe. - - cmd> tskill {|} - -** taskkill.exe. - - cmd> taskkill /IM notepad.exe - cmd> taskkill /PID 827 - -* lsof for Windows. - -** handle.exe from Sysinternals. - - cmd> handle d:\home -ispell.exe pid: 244 784: D:\home\drivers\token_api\src -Far.exe pid: 432 10C: D:\home\drivers\token_api - - cmd> handle -p 1265 - C: File (RW-) C:\Program Files\Common Files\GTK\2.0\bin -288: Section \BaseNamedObjects\mmGlobalPnpInfo - -** TaskList.exe. - - cmd> TaskList -Process Name PID Session Name #Session Memory -========================= ====== ================ ======== ============ -System Idle Process 0 Console 0 28 KB -System 4 Console 0 236 KB -smss.exe 592 Console 0 432 KB -csrss.exe 656 Console 0 4 404 KB -winlogon.exe 680 Console 0 2 792 KB -services.exe 724 Console 0 3 260 KB - -** netstat.exe. - - cmd> netstat -o -Type Local addr Remote addr State PID -TCP user:1154 localhost:1153 ESTABLISHED 1512 -TCP user:5152 localhost:1052 CLOSE_WAIT 1524 -TCP user:1036 services.int:5222 ESTABLISHED 1188 - -* Sysinternals. - - +-*- mode: outline -*- + +* Dependency Walker. + +Dependency Walker is a free utility that scans any 32-bit or 64-bit Windows +module (exe, dll, ocx, sys, etc.) and builds a hierarchical tree diagram of +all dependent modules. For each module found, it lists all the functions that +are exported by that module, and which of those functions are actually being +called by other modules. Another view displays the minimum set of required +files, along with detailed information about each file including a full path +to the file, base address, version numbers, machine type, debug information, +and more. + +See + + http://www.dependencywalker.com/ + +* Kill process. + +** tskill.exe. + + cmd> tskill {|} + +** taskkill.exe. + + cmd> taskkill /IM notepad.exe + cmd> taskkill /PID 827 + +* lsof for Windows. + +** handle.exe from Sysinternals. + + cmd> handle d:\home +ispell.exe pid: 244 784: D:\home\drivers\token_api\src +Far.exe pid: 432 10C: D:\home\drivers\token_api + + cmd> handle -p 1265 + C: File (RW-) C:\Program Files\Common Files\GTK\2.0\bin +288: Section \BaseNamedObjects\mmGlobalPnpInfo + +** TaskList.exe. + + cmd> TaskList +Process Name PID Session Name #Session Memory +========================= ====== ================ ======== ============ +System Idle Process 0 Console 0 28 KB +System 4 Console 0 236 KB +smss.exe 592 Console 0 432 KB +csrss.exe 656 Console 0 4 404 KB +winlogon.exe 680 Console 0 2 792 KB +services.exe 724 Console 0 3 260 KB + +** netstat.exe. + + cmd> netstat -o +Type Local addr Remote addr State PID +TCP user:1154 localhost:1153 ESTABLISHED 1512 +TCP user:5152 localhost:1052 CLOSE_WAIT 1524 +TCP user:1036 services.int:5222 ESTABLISHED 1188 + +* Sysinternals. + + diff -r 71a6d14aa309 -r ab7bb7734d2a driver-win.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/driver-win.rst Fri Aug 07 09:40:45 2009 +0300 @@ -0,0 +1,76 @@ +-*- 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. diff -r 71a6d14aa309 -r ab7bb7734d2a emacs.rst --- a/emacs.rst Sun Jul 26 21:51:40 2009 +0300 +++ b/emacs.rst Fri Aug 07 09:40:45 2009 +0300 @@ -1,47 +1,51 @@ -*- mode: outline -*- -* How debug ini file? +* 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. + +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. -** 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. +*** 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. - -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. diff -r 71a6d14aa309 -r ab7bb7734d2a java.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java.rst Fri Aug 07 09:40:45 2009 +0300 @@ -0,0 +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 diff -r 71a6d14aa309 -r ab7bb7734d2a swap.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/swap.rst Fri Aug 07 09:40:45 2009 +0300 @@ -0,0 +1,20 @@ +-*- outline -*- + +* Enable swap in file. + +Create large file and set up a Linux swap area, enable file for paging and swapping: + + $ dd if=/dev/zero of=/swapfile bs=1024 count=524288 + $ mkswap -v1 /swapfile + $ sudo swapon /swapfile + $ sync + +Insure that all fine: + + $ dmesg | tail + ... + $ cat /proc/swaps + ... + +Add line to /etc/fstab: +/swapfile swap swap defaults 0 0