• <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>
            xiaoguozi's Blog
            Pay it forword - 我并不覺的自豪,我所嘗試的事情都失敗了······習慣原本生活的人不容易改變,就算現狀很糟,他們也很難改變,在過程中,他們還是放棄了······他們一放棄,大家就都是輸家······讓愛傳出去,很困難,也無法預料,人們需要更細心的觀察別人,要隨時注意才能保護別人,因為他們未必知道自己要什么·····
                 摘要: 關于 本書致力于教會你如何用Node.js來開發應用,過程中會傳授你所有所需的“高級”JavaScript知識。本書絕不是一本“Hello World”的教程。 狀態 你正在閱讀的已經是本書的最終版。因此,只...  閱讀全文
            posted @ 2012-07-17 00:17 小果子 閱讀(1460) | 評論 (0)編輯 收藏
            android的布局分兩個階段,先measure()后requestLayout(),
            一個MeasureSpec封裝了父布局傳給子布局的布局要求。每個MeasureSpec代表了一個寬度或高度的要求。一個MeasureSpec包含一個尺寸和模式。
            MeasureSpec的三種模式:
            UNSPECIFIED:父布局沒有給子布局任何限制,子布局可以任意大小。
            EXACTLY:父布局決定子布局的確切大小。不論子布局多大,它都必須限制在這個界限里。
            AT_MOST:子布局可以根據自己的大小選擇任意大小。
            @Override
            protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
            int measuredHeight = measureHeight(heightMeasureSpec);
            int measuredWidth = measureWidth(widthMeasureSpec);
            setMeasuredDimension(measuredHeight, measuredWidth);
            //final DisplayMetrics metrics = getResources().getDisplayMetrics();
            //setMeasuredDimension(mBitmap.getScaledWidth(metrics),mBitmap.getScaledHeight(metrics));
            }
            private int measureHeight(int measureSpec) {
            int specMode = MeasureSpec.getMode(measureSpec);
            int specSize = MeasureSpec.getSize(measureSpec);
            int result = 500;
            if (specMode == MeasureSpec.AT_MOST)
            {
            result = specSize;
            }
            else if (specMode == MeasureSpec.EXACTLY)
            {
            result = specSize;
            }
            return result;
            }
            private int measureWidth(int measureSpec) {
            int specMode = MeasureSpec.getMode(measureSpec);
            int specSize = MeasureSpec.getSize(measureSpec);
            int result = 500;
            if (specMode == MeasureSpec.AT_MOST)
            {
            result = specSize;
            }
            else if (specMode == MeasureSpec.EXACTLY)
            {
            result = specSize;
            }
            return result;
            }
            Creation
            Constructors
            onFinishInflate() 當View和它的所有子對象從XML中導入之后,調用此方法
            Layout
            onMeasure(int, int) View會調用此方法,來確認自己及所有子對象的大小
            onLayout(boolean, int, int, int, int, int, int) 當View要為所有子對象分配大小和位置時,調用此方法
            onSizeChanged(int, int, int, int) 當View大小改變時,調用此方法
            Drawing
            onDraw(Canvas) 當View要繪制它的內容時,調用此方法
            Event processing
            onKeyDown(int, KeyEvent) 當一個新的按鍵事件發生時,調用此方法
            onKeyUp(int, KeyEvent) 當一個按鍵釋放事件發生時,調用此方法
            onMotionEvent(MotionEvent) 當一個動作事件(如觸摸)發生時,調用此方法
            Focus
            onFocusChanged(boolean, int) 當View獲得或失去焦點時,調用此方法
            Attaching
            onAttachedToWindow() 當View附加到一個窗體上時,調用此方法
            onDetachedFromWindow() 當View離開它的窗體時,調用此方法
            當你為一個 activty 添加一個可見的 view, 并且運行這個activty時,android通常情況下會自動按照下列順序來觸發view的相關事件
            onAttachedToWindow
            onMeasure
            onSizeChanged
            onLayout
            onDraw
            posted @ 2012-07-03 19:12 小果子 閱讀(241) | 評論 (0)編輯 收藏

            基本的操作方法:
            本文假設你的apahce安裝目錄為/usr/local/apache2,這些方法適合任何情況

            apahce啟動命令:
            推薦/usr/local/apache2/bin/apachectl start apaceh啟動

            apache停止命令
            /usr/local/apache2/bin/apachectl stop   停止

            apache重新啟動命令:
            /usr/local/apache2/bin/apachectl restart 重啟

            要在重啟 Apache 服務器時不中斷當前的連接,則應運行:

            /usr/local/sbin/apachectl graceful

            如果apache安裝成為linux的服務的話,可以用以下命令操作:

            service httpd start 啟動

            service httpd restart 重新啟動

            service httpd stop 停止服務

            posted @ 2012-06-28 11:15 小果子 閱讀(316) | 評論 (0)編輯 收藏
            停止操作
            停止操作是通過向nginx進程發送信號(什么是信號請參閱linux文 章)來進行的
            步驟1:查詢nginx主進程號
            ps -ef | grep nginx
            在進程列表里 面找master進程,它的編號就是主進程號了。
            步驟2:發送信號
            從容停止Nginx:
            kill -QUIT 主進程號
            快速停止Nginx:
            kill -TERM 主進程號
            強制停止Nginx:
            pkill -9 nginx

            另外, 若在nginx.conf配置了pid文件存放路徑則該文件存放的就是Nginx主進程號,如果沒指定則放在nginx的logs目錄下。有了pid文 件,我們就不用先查詢Nginx的主進程號,而直接向Nginx發送信號了,命令如下:
            kill -信號類型 '/usr/nginx/logs/nginx.pid'

            平滑重啟
            如果更改了配置就要重啟Nginx,要先關閉Nginx再打開?不是的,可以向Nginx 發送信號,平滑重啟。
            平滑重啟命令:
            kill -HUP 住進稱號或進程號文件路徑

            或者使用

            /usr/nginx/sbin/nginx -s reload

            注意,修改了配置文件后最好先檢查一下修改過的配置文件是否正 確,以免重啟后Nginx出現錯誤影響服務器穩定運行。判斷Nginx配置是否正確命令如下:
            nginx -t -c /usr/nginx/conf/nginx.conf

            或者

            /usr/nginx/sbin/nginx -t


            平滑升級
            如果服務器正在運行的Nginx要進行升級、添加或刪除模塊時,我們需 要停掉服務器并做相應修改,這樣服務器就要在一段時間內停止服務,Nginx可以在不停機的情況下進行各種升級動作而不影響服務器運行。
            步驟1:
            如 果升級Nginx程序,先用新程序替換舊程序文件,編譯安裝的話新程序直接編譯到Nginx安裝目錄中。
            步 驟2:執行命令
            kill -USR2 舊版程序的主進程號或進程文件名
            此時舊的Nginx主進程將會把自己的進程文件改名為.oldbin,然后執行新版 Nginx。新舊Nginx會同市運行,共同處理請求。
            這時要逐步停止舊版 Nginx,輸入命令:
            kill -WINCH 舊版主進程號
            慢慢舊的工作進程就都會隨著任務執行完畢而退出,新版的Nginx的工作進程會逐漸取代舊版 工作進程。

            此 時,我們可以決定使用新版還是恢復到舊版。
            不重載配置啟動新/舊工作進程
            kill -HUP 舊/新版主進程號
            從容關閉舊/新進程
            kill -QUIT 舊/新主進程號
            如果此時報錯,提示還有進程沒有結束就用下面命令先關閉舊/新工作進程,再關閉主進程號:
            kill -TERM 舊/新工作進程號

            這樣下來,如果要恢復到舊版本,只需要上面的幾個步 驟都是操作新版主進程號,如果要用新版本就上面的幾個步驟都操作舊版主進程號就行了。

            上面就是Nginx的一些基本的操作,希望以后Nginx能有更好的方法來處理這些操作, 最好是Nginx的命令而不是向Nginx進程發送系統信號。
            posted @ 2012-06-28 11:15 小果子 閱讀(911) | 評論 (0)編輯 收藏
            Share

            C++ is a multi paradigm, free form complied, general purpose and thus a very powerful language used basically forthe purpose of programming. This language is regarded as an intermediatelevel language .The main reason for this is that it consists of both high level as well aslow level features.

            It is one of the most popularprogramming languages due to many reasons. It has application domains which include system software, device drivers, application software and many other including client applications and entertainment software of which the best example is a video game.

            In this list we introduces some highly useful C++ graphics and game libraries. These libraries has provides a great interface to add these functionality to their project or application easily. C++ users would love to use these libraries for their next project.

            Today we are going to share C++ graphic and games Libraries for developers, i hope these libraries would help developers a lot in their next project to make impressive and attractive layout for theirnest applications. Visit this list and share your thought in our comment section below.

            1) Antigrain

            Anti-Grain Geometry (AGG) is an Open Source, free of charge graphic library, written in industrially standard C++. The terms and conditions of use AGG are described on The License page. AGG doesn’t depend on any graphic API or technology. Basically, you can think of AGG as of a rendering engine that produces pixel images in memory from some vectorial data.

            2) Amanith

            AmanithVG SRE is a pure software solution that grants a superlative vector graphics quality without to sacrifice performance on any kind of architecture / platform. Thanks to its original polygon rasterization algorithm and dedicated optimized scanline fillers, this engine constitues the fastest OpenVG software rendering solution available on the market.

            3) Codehead

            4) Oscilloscope Lib

            5) Lib SDL

            Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. It is used by MPEG playback software, emulators, and many popular games, including the award winning Linux port of “Civilization: Call To Power.”

            6) Ogre 3d

            OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented, flexible 3D engine written in C++ designed to make it easier and more intuitive for developers to produce applications utilising hardware-accelerated 3D graphics. The class library abstracts all the details of using the underlying system libraries like Direct3D and OpenGL and provides an interface based on world objects and other intuitive classes.

            轉自:

            http://zoomzum.com/6-free-c-graphics-and-game-libraries/

            posted @ 2012-06-15 14:29 小果子 閱讀(841) | 評論 (0)編輯 收藏
            僅列出標題
            共58頁: First 11 12 13 14 15 16 17 18 19 Last 
            色综合久久综合中文综合网| 久久人人爽人人澡人人高潮AV | 88久久精品无码一区二区毛片| 久久精品三级视频| 亚洲精品无码专区久久同性男| 综合久久国产九一剧情麻豆 | 久久精品国产亚洲Aⅴ香蕉| 一级女性全黄久久生活片免费 | 久久97精品久久久久久久不卡| 久久精品亚洲福利| 精品久久8x国产免费观看| 午夜视频久久久久一区| 99久久国产热无码精品免费| 亚洲七七久久精品中文国产| 久久久久久久综合日本亚洲| 99精品国产99久久久久久97| 久久99国产一区二区三区| 久久精品国产亚洲AV嫖农村妇女| 亚洲国产成人久久一区久久| 狠狠色伊人久久精品综合网| 成人久久精品一区二区三区| 伊人久久精品无码二区麻豆| 亚洲国产成人久久综合一区77| 国产精品99久久久久久董美香| 久久国产精品无码HDAV| 99久久无色码中文字幕人妻| 久久精品国产亚洲AV蜜臀色欲 | 亚洲一本综合久久| 国产99久久精品一区二区| 久久国产精品77777| 久久亚洲私人国产精品vA| 日韩精品久久久肉伦网站| 亚洲人成精品久久久久| 国产成人精品三上悠亚久久| 精品多毛少妇人妻AV免费久久| 久久午夜免费视频| 久久亚洲中文字幕精品一区| 色综合久久无码中文字幕| 久久久久亚洲av无码专区导航| 久久99精品久久久久子伦| 久久精品国产半推半就|