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

            基本的操作方法:
            本文假設(shè)你的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 服務(wù)器時不中斷當(dāng)前的連接,則應(yīng)運(yùn)行:

            /usr/local/sbin/apachectl graceful

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

            service httpd start 啟動

            service httpd restart 重新啟動

            service httpd stop 停止服務(wù)

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

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

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

            或者使用

            /usr/nginx/sbin/nginx -s reload

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

            或者

            /usr/nginx/sbin/nginx -t


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

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

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

            上面就是Nginx的一些基本的操作,希望以后Nginx能有更好的方法來處理這些操作, 最好是Nginx的命令而不是向Nginx進(jìn)程發(fā)送系統(tǒng)信號。
            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.

            轉(zhuǎn)自:

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

            posted @ 2012-06-15 14:29 小果子 閱讀(840) | 評論 (0)編輯 收藏
            僅列出標(biāo)題
            共58頁: First 11 12 13 14 15 16 17 18 19 Last 
            9191精品国产免费久久| 99久久久国产精品免费无卡顿| 久久99国产精品二区不卡| 国产亚洲欧美成人久久片| 激情综合色综合久久综合| 久久久久久噜噜精品免费直播| 一级A毛片免费观看久久精品| 99久久夜色精品国产网站| 精品久久久噜噜噜久久久| 精品久久久久久99人妻| 久久综合亚洲色HEZYO社区| 国产婷婷成人久久Av免费高清| 国产精品青草久久久久福利99 | 亚洲一本综合久久| 欧美久久久久久午夜精品| 嫩草伊人久久精品少妇AV| 蜜臀久久99精品久久久久久| 色婷婷综合久久久久中文| 久久久不卡国产精品一区二区| 人妻无码精品久久亚瑟影视| 亚洲乱亚洲乱淫久久| 亚洲精品乱码久久久久久蜜桃图片| 99久久国产综合精品五月天喷水| 一本色综合久久| 久久久久久久亚洲精品| 中文精品久久久久国产网址| 亚洲伊人久久精品影院| 欧洲国产伦久久久久久久| 久久99中文字幕久久| 看久久久久久a级毛片| 久久国产免费直播| 久久亚洲中文字幕精品一区| 久久国产视屏| 99久久国产主播综合精品| 99久久人妻无码精品系列| 99久久99久久| 精品无码久久久久国产| 国产成人无码久久久精品一| 久久国产精品无码一区二区三区| 久久午夜福利无码1000合集| 日韩人妻无码一区二区三区久久99|