Time of Update: 2018-12-03
current_thread_info的定義在include/asm/thread_info.h中:/* Given a task stack pointer, you can find it's task structure * just by masking it to the 8K boundary. */staticinline struct thread_info *current_thread_info(void){ struct thread_info *ti;
Time of Update: 2018-12-03
mknod - make block or character special filesmknod [OPTION]... NAME TYPE [MAJOR MINOR] option 有用的就是 -m 了 name 自訂 type 有 b 和 c 還有 p 主裝置號 次裝置號主裝置號是由/usr/src/linux/include/linux/major.h定義的,如下定義了一個DOC裝置:#define IGEL_FLASH_MAJOR
Time of Update: 2018-12-03
無論是愛還是恨,你都需要單例。實際上每個iOS或Mac OS應用都至少會有UIApplication或NSApplication.什麼是單例呢?Wikipedia是如此定義的:在軟體工程中,單例是一種用於實現單例的數學概念,即將類的執行個體化限制成僅一個對象的設計模式。或者我的理解是:單例是一種類,該類只能執行個體化一個對象。
Time of Update: 2018-12-03
UIScrollView的相關概念首先介紹下UIScrollView的相關概念contentSize是scrollview可以滾動的地區,比如frame = (0 ,0 ,320 ,480) contentSize = (320 ,960),代表你的scrollview可以上下滾動,捲動區域為frame大小的兩倍。contentOffset是scrollview當前顯示地區頂點相對於frame頂點的位移量,比如上個例子你拉到最下面,contentoffset就是(0
Time of Update: 2018-12-03
主要步驟:1、安裝ndoutils,把nagios資料寫到mysql。2、在cacti安裝npc外掛程式,查看nagios的資料。一、安裝1、安裝ndoutils的依賴包(1)安裝DBIwget http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.616.tar.gztar -zxvf DBI-1.616.tar.gzcd DBI-1.616perl Makefile.PLmake && make
Time of Update: 2018-12-03
@echo offrem 注意:rem 1. 參數不能包含中文;echo Start to copy files to /data/appecho.:PUSHFILEif '%1'=='' goto STATUSecho processing %1 ...adb push %1 /data/appshiftgoto PUSHFILE:STATUSIF ERRORLEVEL 1 goto FAILIF ERRORLEVEL 0 goto SUCCESS:FAILecho.echo !!!!!!!
Time of Update: 2018-12-03
iPhone下每個app可用的記憶體是被限制的,如果一個app使用的記憶體超過20M,則系統會向該app發送Memory Warning訊息。收到此訊息後,app必須正確處理,否則可能出錯或者出現記憶體泄露。
Time of Update: 2018-12-03
伺服器裝完了,準備更新系統,yum check-update 提示錯誤如下:[root@localhost ~]# yum check-update Setting up repositories core [1/3]
Time of Update: 2018-12-03
dos命令dos下各種常見命令索引▲ dir▲ attrib▲ cd▲ copy▲ xcopy▲ del▲ undelete▲ deltree▲ dos=high▲ doskey▲ emm386.exe▲ fc▲ format▲ unformat▲ interlnk▲ intersvr▲ memmaker▲ memitem等▲ mscdex▲ msd▲ prompt▲ ramdrive▲ subst▲ mem▲ "> < >> <<"工具▲ move▲
Time of Update: 2018-12-03
8.2進程標識符#include <unistd.h>pid_t getpid(void);pid_t getppid(void);uid_t getuid(void);uid_t geteuid(void);gid_t getgid(void);gid_t getegid(void);8.3 fork函數#include <unistd.h>pid_t
Time of Update: 2018-12-03
11.3 線程標識#include <pthread.h>int pthread_equal(pthead_t tid1,pthread_t tid2);#include <pthread.h>int pthread_self(void);11.4 線程建立#include <pthread.h>int pthread_create(pthread_t *restrict tidp, const
Time of Update: 2018-12-03
1.exit函數#include <stdlib.h>void exit(int status)void _Exit(int status)#include <unistd.h>void _exit(int status)exit(0)與return(0)等價2.atexit(void (*func)(void));向進程註冊函數7.4命令列參數argv[argc]是一個null 指標。7.5環境表extern char
Time of Update: 2018-12-03
nagios的實現方式:nagios採用分布-集中的管理員模式。在nagios伺服器上安裝nagios主程式,在被監控主機上安裝nagios代理程式。通過nagios主程式和nagios代理程式之間的通訊,監視主機狀態。主程式和代理程式之間有兩種工作方式,一種是主程式-->Active-->代理程式;另一種是主程式-->passive-->代理程式;顧名思義,是以一方向另一方主動提出通訊需求來劃分的。一.NRPE的功能和意義:之前已經理解了Nagios的服務-命令-外掛程
Time of Update: 2018-12-03
#cd qt-everywhere-opensource-src-4.8.4./configure -embedded arm -release -shared -fast -pch -no-qt3support -qt-sql-sqlite -no-libtiff -no-libmng -qt-libjpeg-qt-zlib -qt-libpng -qt-freetype -no-openssl -nomake examples -nomake demos -nomake tools
Time of Update: 2018-12-03
好久沒來寫筆記了,原因很簡單,最近一直坐java網站,沒顧上學IOS(偷懶沒學..)廢話少說 開始筆記UIGestureRecognizer是一個定義基本手勢的抽象類別,具體什麼手勢,在以下子類中包含: 1、拍擊UITapGestureRecognizer (任意次數的拍擊) 2、向裡或向外捏UIPinchGestureRecognizer (用於縮放) 3、搖動或者拖拽UIPanGestureRecognizer (拖動)
Time of Update: 2018-12-03
修改網路設定檔網路設定資訊儲存在/etc/network/interfaces 檔案中sudo vi /etc/network/interfaces 我用vi開啟,我的檔案顯示如下內容: # This file describes the network interfaces available on your system# and how to activate them. For more information, see interfaces(5). # The loopback
Time of Update: 2018-12-03
UIImageView
Time of Update: 2018-12-03
Deepin 12.12安裝nvidia顯卡驅動如題,nvidia顯卡驅動一直都是linux的一個心結。文本提供其中的一個安裝方法。一、下載官方驅動點擊開啟連結根據自己的顯卡選擇驅動,本人選擇的是NVIDIA-Linux-x86_64-319.32.run二、系統設定1.卸載已有驅動sudo apt-get remove --purge nvidia*2.關閉核心內建的開源顯卡驅動nouveausudo echo blacklist nouveau >
Time of Update: 2018-12-03
#!/bin/bashmv *.jpeg ../web/yesterdaymv ../web/*.jpeg .SUFFIX=".jpeg"PREFIX="./"DIRS="./*$SUFFIX"for file in $DIRS;doNAME=${file%$SUFFIX}NAME=${NAME#$PREFIX}LEN=${#NAME}RIGHT_POS=`expr 930 - $LEN \* 20`RIGHT_POS_BG=`expr 930 - $LEN \* 20 + 2`TOP_POS_
Time of Update: 2018-12-03
@echo offtitle - Kernel Update -echo Start updating kernel...adb shell mkdir /mnt/nand && ^adb shell mount -t vfat /dev/block/nanda /mnt/nand && ^adb push bImage /mnt/nand/linux && ^adb shell sync && ^adb shell