While editing the blog, there's two tab named "modify html" and "write"(I use the Chinese interface, so I'm not sure the exact name of this two tab)
Whenever there are lines leading with spaces (spaces at the beginning of the line), switching between the two tab would remove one leading space of these lines, until no space at the beginning of the line.
For unknown reason, kernel set the obsolete bit in both device control register and device register, and never used.
Device Control Register
Device/Head Register
include/linux/ata.h
ATA_DEVICE_OBS = (1 << 7) | (1 << 5), /* obs bits in dev reg */ ATA_DEVCTL_OBS = (1 << 3), /* obsolete bit in devctl reg */ ATA_BUSY = (1 << 7), /* BSY status bit */
drivers/ata/libata-core.c
/** * ata_port_alloc - allocate and initialize basic ATA port resources * @host: ATA host this allocated port belongs to * * Allocate and initialize basic ATA port resources. * * RETURNS: * Allocate ATA port on success, NULL on failure. * * LOCKING: * Inherited from calling layer (may sleep). */ struct ata_port *ata_port_alloc(struct ata_host *host) { struct ata_port *ap;
DPRINTK("ENTER\n");
ap = kzalloc(sizeof(*ap), GFP_KERNEL); if (!ap) return NULL;
/** * ata_tf_to_fis - Convert ATA taskfile to SATA FIS structure * @tf: Taskfile to convert * @pmp: Port multiplier port * @is_cmd: This FIS is for command * @fis: Buffer into which data will output * * Converts a standard ATA taskfile to a Serial ATA * FIS structure (Register - Host to Device). * * LOCKING: * Inherited from caller. */ void ata_tf_to_fis(const struct ata_taskfile *tf, u8 pmp, int is_cmd, u8 *fis) { fis[0] = 0x27; /* Register - Host to Device FIS */ fis[1] = pmp & 0xf; /* Port multiplier number*/ if (is_cmd) fis[1] |= (1 << 7); /* bit 7 indicates Command FIS */
用 IECacheView 檢視所有快取檔案 (Mozilla, Opera 和 Chrome 也有對應版本) http://blog.joaoko.net/archives/945 IE的沒什麼大問題,因為它的Cache就是在某個目錄下,我的W2k是在C:\Documents and Settings\user\Local Settings\Temporary Internet Files,直接就是原來的檔案改個名字,直接去那個目錄直接看也行
MozillaCacheView v1.16 - View the cache files of Mozilla/Firefox browsers http://www.nirsoft.net/utils/mozilla_cache_viewer.html 可能是因為firefox的Cache還多了一層index的關係,所以在index還沒寫入map檔的時候,cache viewer會讀到不正確的index 實際使用時常有有缺少檔案,或Cache都產生也看到了,開cache viewer也看不到或是只看的到部份,使用時最好把firefox關掉,以強迫index寫入檔案,再開cache viewer,會比較沒問題
git checkout <SHA1_code> :切換到某次的commit,you are on "no branch" after checkout
git checkout <tag_name> :切換到某個tag,you are on "no branch" after checkout
git checkout <branch_name> :切換到某個branch
git checkout -b <branch_name> :新增某個branch並切換到它上面
git diff
git merge
git reset
git reset --mixed
(--mixed is the default action)
git reset HEAD :把某個檔案移出index(staging)
現在似乎除了看reflog外沒有其他辦法,新版的git會有warning on dangling commit...
<mkl> Is there anyway to check if there is dangling commit in current database?
<mkl> git log --all or gitk --all won't show dangling commit
<Ilari> mkl: You could extract recent such commits from reflogs, but I don't know easy and fast way to cross-reference them with current branches...
<mkl> yes, reflog seems the only way to find the dangling commit, but only if you aware that there is one, and you have to dig into a long log full with hex code.....
<Ilari> mkl: Also, commit followed by checkout moving from something non-symbolic is pretty good indication that something left dangling.
<mkl> yes, but only if you do aware of the situation....
<mkl> and also commit followed by checkout from tag
<charon> mkl: newer git says which branch you committed on, and indicates a dangling commit with [detached HEAD]
<charon> mkl: 72c69ebc035 which is in 1.6.1
<mkl> Thanks charon, Ilari, drizzd, milli, I finally got the problem clearified and fixed....
git log --all
list 出所有的commit(但是似乎dangling commit不會被list出來)
git reflog
Reflog is a mechanism to record when the tip of branches are updated. This command is to manage the information recorded in it. 它會log所有的 commit和checkout
---1 current stable image Our current stable image is called 'Om2008.9', available at http://downloads.openmoko.org/releases/Om2008.9/ We are sometimes cherry-picking fixes into it, but admittedly not as many as we would like. If someone wants to step up to become stable maintainer for this image and cherry-pick more fixes into it, please let me know. Alternatively, a number of other images are available, Debian, Qt Extended, Android, FDOM, SHR, etc. See http://wiki.openmoko.org/wiki/Distributions for a more comprehensive list.
---2 Mickey's framework milestones As many people know, the next big thing for Openmoko will be Mickey's FSO framework around d-bus and Python, and the Paroli telephony UI. See http://wiki.openmoko.org/wiki/OpenmokoFramework A few weeks ago, Mickey released milestone 4, available at http://downloads.freesmartphone.org/fso-stable/milestone4.1/ In late January, he plans to come out with milestone 5, in late March with milestone 6. See here for a more detailed roadmap: http://trac.freesmartphone.org/roadmap
---3 next major release, Om2009 After the next 2 FSO milestones, Openmoko will fork off a stable branch, and spend 2-3 months on testing and bug fixing. This will lead to our next major release, Om2009. The telephony UI will be Paroli, see http://code.google.com/p/paroli/ The way things are going right now, we will probably have this release mid-next year.
1. fso-console-image: minimal system with frameworkd, no user interface manager. 2. fso-illume-image: everything in console-image plus X-Window, plus Enlightenment plus Illume window manager. 3. fso-image: everything in illume-image plus Zhone. Can be used for phone calls. Like previous milestones. But Zhone is going to be faded out.
Intel Core2Quad Q9550 @ 2.83GHz Asus P5Q 8G DDR2 800 EN9500GT OC/DE/512M SATA ExcelStor Technology J8160S 160GB SATA Optiarc DVD RW AD-7200S
Ubuntu 7.04 have problem while starting X
Ubuntu 8.04 lte, Ubuntu 8.10 no matter AHCI or not,installing to a SATA disk, or USB to IDE (WD1600JB WD Caviar SE, IDE 160GB) Stop while installing system around 50% with following reported:
The installer encountered an error copying files to the hard disk:
[Errno 5] Input/output error
This is often due to a faulty CD/DVD disk or drive, or a faulty hard disk. It may help to clean the CD/DVD, to burn the CD/DVD at a lower speed, to clean the CD/DVD drive lens (cleaning kits are often available from electronics suppliers), to check whether the hard disk is old and in need of replacement, or to move the system to a cooler environment.
nVidia+8GB RAM issue, all ok after remove RAM to size
Debian 4.0r3
No common CD-ROM driver was detected ........
This seems that AHCI CD-ROM not supported yet
Fedora 9 Finished installation, rebooting, then there comes the Welcome menu, system hang after finish [Hardware Profile]. nVidia+8GB RAM issue, all ok after remove RAM to size
The server kernel has been compiled with PAE (which solves the problem) and with Xen related things. The latter prevents the installation and use of the NVidia proprietary drivers. Depending on your configuration, this may create another problem, which can be solved by compiling your own kernel, with PAE but without Xen support.
Ubuntu desktop have PAE and Xen disabled Ubuntu server have both PAE and Xen enabled
but why Ubuntu desktop installation would failed? (unknown)
Solutions
Remove RAM to size < 3GB, install ubuntu desktop, rebuild kernel to enable PAE, re-insert RAM (Ubuntu could reboot with 8GB RAM installed and w/o PAE enabled, but there is only 3292MB RAM available, shown on htop, while w/ PAE,8106MB.
Besides, enabling nVidia accelerated graphics driver w/o PAE enabled w/ 8GB RAM installed, error like the following might be seen while restarting:
Ubuntu is running in low-graphics mode The following error was encountered. You may need to update your configuration to solve this. (EE) NVIDIA(0): Failed to load the NVIDIA kernel module! (EE) NVIDIA(0): *** Aborting *** (EE) Screen(s) found, but none have a usable configuration.
I'm trying to install the 169.12 driver (from nvidia's .run file). The kernel I am using is from Ubuntu 8.04, the "2.6.24-16-server" kernel. The installer refuses to install into this kernel: it reports Code:
The kernel you are installing for is a xen kernel.
#class class sample: def __double_underscore_would_be_renamed_should_not_access(self): print ("should not be access directly") def access(self): print("access first") self.__double_underscore_would_be_renamed_should_not_access() def _single_underscore_method_would_not_be_imported(self): print("I will not be imported")
Convert to list >>> list("hello") ['h', 'e', 'l', 'l', 'o']
string is not changable, like tuple. >>> x="hello" >>> x[3]="a" Traceback (most recent call last): File "<pyshell#34>", line 1, in <module> x[3]="a" TypeError: 'str' object does not support item assignment >>> xx=list(x) >>> xx[3]="a" >>> xx ['h', 'e', 'l', 'a', 'o']
Membership check -- in >>> xxx=[1,2,3,4,5,6,7,8,9,0] >>> 3 in xxx True >>> 10 in xxx False
List methods - object.method(argument) append(value) count(value) - count the occurances of the given value extend(list_object) index(value) - find the index of the given value insert(pos,value) pop(pos) - remove the element of the given position, the last one if pos not given remove(value) reverse() sort() sort(cmp) sort(key=len) sort(reverse=True|False)
Tuple
>>> 1 1 >>> 1, (1,) >>> (1,) (1,) >>> (1) 1
Convert list to tuple >>> tuple([1,2,3]) (1, 2, 3) >>>
Strings
single quote ' double quote " escape \
String Concatenation + String representations
str(x) repr(x) or backticks `x`
Long string """ or ''' Raw string r"xxx" Unicode string u"xxx"
I write for myself to remember things, and it's just a note, or memo. Not always complete, or meaningful, and also not necessary created by me. Reference at will.