• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            GLORY | 學(xué)習(xí)·記錄

            coding for life

            瀏覽器是Firefox 4.0 。

            問(wèn)題出現(xiàn)在寫好文章,點(diǎn)擊發(fā)布,文章正文被清空,并且彈出來(lái)“內(nèi)容不能為空!”

            辛辛苦苦碼的字就沒(méi)了。。。

            posted @ 2011-03-07 23:29 meglory 閱讀(1391) | 評(píng)論 (8)編輯 收藏

            考察

            1a3x3
            1a3a

            就ok。

            posted @ 2011-03-07 23:23 meglory 閱讀(372) | 評(píng)論 (0)編輯 收藏
             1 #include<stdio.h>
             2 
             3 int main()
             4 {
             5     int i=43;
             6     printf("%d",printf("%d",printf("%d",i)));
             7     
             8     return 0;
             9 }
            10 
            11 這是一個(gè)社區(qū)的驗(yàn)證碼,讓輸出結(jié)果,很有意思。
            12 結(jié)果是4321.
            13 printf()的返回值:On success, the total number of characters written is returned.
            14 On failure, a negative number is returned.

            posted @ 2010-12-23 11:39 meglory 閱讀(345) | 評(píng)論 (0)編輯 收藏
            文章轉(zhuǎn)自http://www.ugrad.cs.ubc.ca/~cs219/CourseNotes/Unix/commands-links.html
            Hard links and Soft links

            Links

            As was mentioned in the section on file system structure, every file has a data structure (record) known as an i-node that stores information about the file, and the filename is simply used as a reference to that data structure. A link is simply a way to refer to the contents of a file. There are two types of links:

            • Hard links: a hard link is a pointer to the file's i-node. For example, suppose that we have a file a-file.txt that contains the string "The file a-file.txt":
              % cat a-file.txt
              The file a-file.txt
              %

              Now we use the ln command to create a link to a-file.txt called b-file.txt:

              % ls
              ./ ../ a-file.txt
              % ln a-file.txt b-file.txt
              % ls
              ./ ../ a-file.txt b-file.txt

              Hard Links

              The two names a-file.txt and b-file.txt now refer to the same data:

              % cat b-file.txt
              The file a-file.txt
              %

              If we modify the contents of file b-file.txt, then we also modify the contents of file a-file.txt:

              % vi b-file.txt
              ...
              % cat b-file.txt
              The file a-file.txt has been modified.
              % cat a-file.txt
              The file a-file.txt has been modified.
              %

              and vice versa:

              % vi a-file.txt
              ...
              % cat a-file.txt
              The file a-file.txt has been modified again!
              % cat b-file.txt
              The file a-file.txt has been modified again!
              %
            • Soft links (symbolic links): a soft link, also called symbolic link, is a file that contains the name of another file. We can then access the contents of the other file through that name. That is, a symbolic link is like a pointer to the pointer to the file's contents. For instance, supposed that in the previous example, we had used the -s option of the ln to create a soft link:
              % ln -s a-file.txt b-file.txt
              On disk, the file system would look like the following picture:

              Soft Links

            But what are the differences between the two types of links, in practice? Let us look at an example that highlights these differences. The directory currently looks like this (let us assume that a-file.txt b-file.txt are both hard links to the same file):

            % ls
            ./ ../ a-file.txt b-file.txt

            Let us first add another symbolic link using the -s option:

            % ln -s a-file.txt Symbolicb-file.txt
            % ls -F
            ./ ../ a-file.txt b-file.txt Symbolicb-file.txt@

            A symbolic link, that ls -F displays with a @ symbol, has been added to the directory. Let us examine the contents of the file:

            % cat Symbolicb-file.txt 
            The file a-file.txt has been modified again!

            If we change the file Symbolicb-file.txt, then the file a-file.txt is also modified.

            % vi Symbolicb-file.txt
            ...
            % cat Symbolicb-file.txt
            The file a-file.txt has been modified a third time!
            % cat a-file.txt
            The file a-file.txt has been modified a third time!
            % cat b-file.txt
            The file a-file.txt has been modified a third time!
            %

            If we remove the file a-file.txt, we can no longer access the data through the symbolic link Symbolicb-file.txt:

            % ls -F
            ./ ../ a-file.txt b-file.txt Symbolicb-file.txt@
            % rm a-file.txt
            rm: remove `a-file.txt'? y
            % ls -F
            ./ ../ b-file.txt Symbolicb-file.txt@
            % cat Symbolicb-file.txt
            cat: Symbolicb-file.txt: No such file or directory

            The link Symbolicb-file.txt contains the name a-file.txt, and there no longer is a file with that name. On the other hand, b-file.txt has its own pointer to the contents of the file we called a-file.txt, and hence we can still use it to access the data.

            % cat b-file.txt
            The file a-file.txt has been modified a third time!

            Although it may seem like symbolic links are not particularly useful, hard links have their drawbacks. The most significant drawback is that hard links cannot be created to link a file from one file system to another file on another file system. A Unix file structure hierarchy can consist of several different file systems (possibly on several physical disks). Each file system maintains its own information regarding the internal structure of the system and the individual files on the system. Hard links only know this system-specific information, which make hard links unable to span file systems. Soft links, on the other hand, know the name of the file, which is more general, and are able to span file systems.

            For a concrete analogy, suppose that our friend Joel User is a student at both UBC and SFU. Both universities assign him a student number. If he tries to use his UBC student number at SFU, he will not meet with any success. He will also fail if he tries to use his SFU student number at UBC. But if he uses his legal name, Joel User, he will probably be successful. The student numbers are system-specific (like hard links), while his legal name spans both of the systems (like soft links).

            Here is an example that demonstrates a situation where a hard link cannot be used and a symbolic link is needed. Suppose that we try to create a hard link from the current working directory to the C header stdio.h.

            % ln /usr/include/stdio.h stdio.h
            ln: creating hard link `stdio.h' to `/usr/include/stdio.h': Invalid cross-device link
            %

            The ln command fails because stdio.h is stored on a different file system. If we want to create a link to it, we will have to use a symbolic link:

            % ln -s /usr/include/stdio.h stdio.h
            % ls -l
            lrwxrwxrwx 1 a1a1 guest 20 Apr 20 11:58 stdio.h -> /usr/include/stdio.h
            % ls
            ./ ../ stdio.h@
            %

            Now we can view the file stdio.h just as if it was located in the working directory. For example:

            % cat stdio.h 
            /* Copyright (c) 1988 AT&T */
            /* All Rights Reserved */

            /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
            /* The copyright notice above does not evidence any */
            /* actual or intended publication of such source code. */

            /*
            * User-visible pieces of the ANSI C standard I/O package.
            */

            #ifndef _STDIO_H
            #define _STDIO_H
            ...
            %

            The entire output of the cat command was not included to save space.

            Note that the long listing (ls -l) of a soft link does not accurately reflect its associated permissions. To view the permissions of the file or directory that the symbolic link references, the -L options of the ls command can be used. For example:

            % ln -s /usr/include/stdio.h stdio.h

            % ls -l stdio.h
            lrwxrwxrwx 1 a1a1 undergrad 20 May 10 15:13 stdio.h -> /usr/include/stdio.h

            % ls -l /usr/include/stdio.h
            -rw-r--r-- 1 root bin 11066 Jan 5 2000 /usr/include/stdio.h

            % ls -lL stdio.h
            -rw-r--r-- 1 root bin 11066 Jan 5 2000 stdio.h

            posted @ 2010-12-22 16:12 meglory 閱讀(365) | 評(píng)論 (0)編輯 收藏

            posted @ 2010-12-22 09:49 meglory 閱讀(240) | 評(píng)論 (0)編輯 收藏
            Vimperator是一個(gè)Firefox的插件。Firefox的好處自然就不用多說(shuō)了,自從我習(xí)慣了Firefox的世界以后,IE對(duì)于我來(lái)說(shuō)已經(jīng)變得不可接受了。作為一個(gè)比較喜歡簡(jiǎn)潔的人,我把Firefox沒(méi)有用的按鈕和菜單都去掉了,從而可以最大程度的利用瀏覽空間。而Vimperator的出現(xiàn),讓我感覺(jué)到作為一個(gè)Firefox用戶的真正好日子來(lái)了。

            Vimperator能夠把雜七雜八的地址欄收藏欄菜單欄通通隱藏掉(可以通過(guò)配置文件調(diào)出來(lái)),只是在瀏覽器下方多出現(xiàn)了一個(gè)狀態(tài)欄。Vimperator的設(shè)計(jì)靈感來(lái)源于Vim,是一幫熱愛(ài)Vim的人希望能夠把Vim的強(qiáng)大功能移植到Firefox上面。Vim用戶可以迅速上手,因?yàn)樵S多命令都是跟vim類似。

            當(dāng)然最吸引我的是,Vimperator可以讓你真正做到雙手不離開(kāi)鍵盤瀏覽網(wǎng)頁(yè)。

            想要打開(kāi)網(wǎng)頁(yè)鏈接而不用鼠標(biāo)去點(diǎn)擊?只要一個(gè)F鍵就搞定了。

            想要打開(kāi)一個(gè)新的網(wǎng)頁(yè)而不用先定位到地址輸入框?一個(gè)T鍵就搞定了。

            裝了插件以后想要重啟?輸入:res就ok了。想要關(guān)閉FF?:q就搞定了。

            最最致命的是,想我這種長(zhǎng)期瀏覽論壇的人來(lái)說(shuō),翻頁(yè)瀏覽是最煩躁的事情了,在Vimperator下面如何做到翻頁(yè)?翻到下頁(yè),點(diǎn)擊]]就搞定了,返回上頁(yè)呢?當(dāng)然[[了啊。

            這樣一來(lái),我感到我瀏覽網(wǎng)頁(yè)的速度明顯提升了,因?yàn)槲业碾p手都在鍵盤上面操作,打過(guò)魔獸的童鞋都知道,為什么大家都要快捷鍵呢?因?yàn)榍脫翩I盤的比點(diǎn)擊鼠標(biāo)的要快出許多許多,Moon大神可以在暗夜精靈的主基地內(nèi)實(shí)現(xiàn)完全的鍵盤操作不用鼠標(biāo)點(diǎn)擊。而我等小羅羅如何向大神們看齊呢?簡(jiǎn)單,裝上Vimperator開(kāi)始你的APM之旅唄。


            注:如果想要了解細(xì)節(jié),可以參照這篇文章:http://pchu.blogbus.com/logs/32923406.html
            posted @ 2010-12-20 23:13 meglory 閱讀(1900) | 評(píng)論 (5)編輯 收藏
            推薦一篇很好的文章。
            http://forum.ubuntu.org.cn/viewtopic.php?f=65&t=125393&sid=9c593e4e65f4b7e560648c827f97a5ff

            以前用Vmware在Windows里面虛擬linux的時(shí)候訪問(wèn)分區(qū)非常方便。現(xiàn)在是在linux里面虛擬了win出來(lái),并且工具變成了virtualbox,麻煩一下子很多,這篇文章完全解決了自己的問(wèn)題。

            posted @ 2010-08-08 00:50 meglory 閱讀(353) | 評(píng)論 (0)編輯 收藏
            出來(lái)混,總是要還。
            Linux的命令沒(méi)有學(xué)好,今天被問(wèn)倒了。

            查看目錄的大小。

            NAME

            du - estimate file space usage

            SYNOPSIS

            du [OPTION]... [FILE]...

            EXAMPLES

            DESCRIPTION

            Summarize disk usage of each FILE, recursively for directories.

            Mandatory arguments to long options are mandatory for short options too.

            -a, --all
            write counts for all files, not just directories
            -B, --block-size=SIZE use SIZE-byte blocks
            -b, --bytes
            print size in bytes
            -c, --total
            produce a grand total
            -D, --dereference-args
            dereference FILEs that are symbolic links
            -h, --human-readable
            print sizes in human readable format (e.g., 1K 234M 2G)
            -H, --si
            likewise, but use powers of 1000 not 1024
            -k
            like --block-size=1K
            -l, --count-links
            count sizes many times if hard linked
            -L, --dereference
            dereference all symbolic links
            -S, --separate-dirs
            do not include size of subdirectories
            -s, --summarize
            display only a total for each argument
            -x, --one-file-system
            skip directories on different filesystems
            -X FILE, --exclude-from=FILE
            Exclude files that match any pattern in FILE.
            --exclude=PATTERN Exclude files that match PATTERN.
            --max-depth=N
            print the total for a directory (or file, with --all) only if it is N or fewer levels below the command line argument; --max-depth=0 is the same as --summarize
            --help
            display this help and exit
            --version
            output version information and exit


            posted @ 2010-08-06 23:33 meglory 閱讀(171) | 評(píng)論 (0)編輯 收藏

             1.打開(kāi)Chrome瀏覽器。選項(xiàng)->高級(jí)設(shè)置->(往下面拖一下)網(wǎng)頁(yè)內(nèi)容->更改字體和語(yǔ)言設(shè)置

             2.將Serif字體修改成 Sans 16,Sans-Serif字體修改成 Sans 16,寬度固定字體:修改成Monospace 13 ;


            posted @ 2010-08-03 22:17 meglory 閱讀(352) | 評(píng)論 (0)編輯 收藏
            有一句話觸動(dòng)很大。永遠(yuǎn)年輕,永遠(yuǎn)熱淚盈眶


            posted @ 2010-07-19 22:45 meglory 閱讀(155) | 評(píng)論 (0)編輯 收藏
            僅列出標(biāo)題
            共5頁(yè): 1 2 3 4 5 

            導(dǎo)航

            隨筆分類

            隨筆檔案

            最新評(píng)論

            中文字幕无码免费久久| 欧美久久久久久精选9999| 亚洲午夜久久久久久噜噜噜| 亚洲色欲久久久综合网东京热| 久久精品中文无码资源站| 色综合色天天久久婷婷基地 | 久久亚洲国产精品五月天婷| 国内精品伊人久久久久妇| 99久久这里只有精品| 四虎影视久久久免费观看| 国产69精品久久久久777| 人妻无码精品久久亚瑟影视 | 久久久久99精品成人片直播| 国内精品久久久久久中文字幕| 久久人妻无码中文字幕| 久久综合综合久久97色| 亚洲国产精品成人久久| 久久久久这里只有精品| 99久久精品无码一区二区毛片| 亚洲国产精品无码成人片久久| 国产精品永久久久久久久久久 | 国产精品99久久不卡| 久久久久久久亚洲Av无码| 亚洲伊人久久成综合人影院 | 久久香综合精品久久伊人| 国产99久久九九精品无码| 国产精品久久久久影视不卡| 国产69精品久久久久久人妻精品| 久久精品中文字幕第23页| 九九99精品久久久久久| 99久久精品午夜一区二区| 久久久无码一区二区三区| 精品综合久久久久久97| 亚洲狠狠婷婷综合久久久久| 日本WV一本一道久久香蕉| 精品国产青草久久久久福利| 亚洲国产小视频精品久久久三级| 欧美无乱码久久久免费午夜一区二区三区中文字幕 | 99久久夜色精品国产网站| 曰曰摸天天摸人人看久久久| 亚洲国产精品一区二区久久|