Time of Update: 2018-12-05
#include <iostream>#include <cstdlib>#include <ctime>using namespace std;/*This is a free Program, You can modify or redistribute it under the terms of GNU*Description:一種改進的求整數x的y次冪*Language: C++*Development Environment:
Time of Update: 2018-12-05
建立一個新的git項目1. # cd yafei2. # git init3. # git add .4. # git commit如果修改了項目代碼,做如下氣操作1. git add 修改的檔案或新增的檔案2. git diff3. git status4. git commit5. git lotgit commit -a 可直接提交所有修改,對新增檔案或檔案夾無效分支管理1. git branch experimental /建立分支2. git granch /列出所有分支3.
Time of Update: 2018-12-05
一 LSM 我第一次接觸到LSM是從一篇論文中學習到的,這篇論文很早了,它是Linux Security Modules:General Security Support for the Linux
Time of Update: 2018-12-05
代碼在:frameworks/base/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java有如下一段代碼: // these are protected by synchronized (this) /** * External apps (like the phone app) can tell us to disable the keygaurd. */ private
Time of Update: 2018-12-05
#include <iostream>#include <cstdlib>#include <string>#include <queue>using namespace std;/* *設計一個演算法,把一個含有N個元素的數組迴圈右移K位,要求時間複雜度為O(N)*//* * 方案一:將數組以佇列儲存體,迴圈右移k位,相當於迴圈左移N-K位 * 對於隊列而言,迴圈左移一位,相當於取出隊頭元素然後插入隊尾*/class Solution
Time of Update: 2018-12-05
已經有人在這方面做了研究了請先看這篇部落格:點擊開啟連結這個是對android4.0.3增加ethernet我是直接拿過來對android4.0.4增加,過程中有些是不同的,錯誤比較容易解決這裡我就不作具體說明了。只是其中有一點需要修改的在這個地方:2. system\core\libnetutils\dhcp_utils.c的
Time of Update: 2018-12-05
1。產生字型檔的問題?條件:HFONT hFontlFont.lfHeight = 16; lFont.lfWidth = width; lFont.lfEscapement = 0; lFont.lfOrientation = 0; lFont.lfWeight = FW_NORMAL; lFont.lfItalic = FALSE; lFont.lfUnderline = False; lFont.lfStrikeOut = 0; lFont.
Time of Update: 2018-12-05
* 在vs中使用gtest:PROPERTIES::Date: <2011-06-20 周一 19:16>:By: yafeilee:END:** 準備gtest架構 1.下載gtest-1.6.0.zip2.解壓後,進入gtest-1.6.0/msvc目錄3.開啟gtest工程編譯4.將編譯產生的gtest.lib和gtestd.lib放入gtest-1.6.0/lib中** 建立測試工程1.建立一個Win32 Console Application2.設定gtest標頭檔路徑 (
Time of Update: 2018-12-05
#include<iostream>#include<vector>#include<cstdlib>using namespace std;const int Max=10000;class DynamicClass{private: int n; //n表示{1,2,3,...n} long s; //表示1+2+...+n vector<int>v; //v[i]表示累加和是i的組合數,如v[3]=2表示{1,2},{3}兩種組合
Time of Update: 2018-12-05
安裝texlive 2010,中文支援需要ctex和xeCJk,直接把包全部裝上就行了。1.將org檔案匯出為tex檔案(C-c C-e l)2.在匯出的tex檔案中添加/usepackage{xeCJK}/setCJKmainfont{宋體}/usepackage[unicode=true,colorlinks=no,pdfborder=no]{hyperref} %讓產生的目錄沒有紅色邊框/begin{center}/renewcommand{/contentsname}{目錄}
Time of Update: 2018-12-05
Privacy Policy of the The apkIn order to receive information about your Personal Data, the purposes and the parties the Data is shared with, contact the Owner.Data Processing Ownershiplyperry,lyperry@foxmail.comTypes of Data collectedThe owner does
Time of Update: 2018-12-05
硬體平台: Devkit8000256M DDR+256M NANDS-video輸出 軟體包:AM35x-OMAP35x-PSP-SDK-03.00.01.06.tgzdvsdk_3_01_00_10_Setup.bincs1omap3530_setupLinux_1_01_00-prebuilt-dvsdk3.01.00.10.binti_cgt_c6000_6.1.12_setup_linux_x86.bin 1、將所有包都安裝到一個目錄之下,最好是放到到/Arago/arago-
Time of Update: 2018-12-05
#include <iostream>#include <cstdlib>#include <vector>using namespace std;/* * 從n個整型數組中提取前k個最小整數 * 方法一:利用快速排序進行遞迴劃分*/const int Max = 100; // 數組最大容量class Solution {private:vector<int>array; // 輸入的數組 vector<int>kmin;
Time of Update: 2018-12-05
要開始進行name帳號的測試了,在用例中看到了不同編碼格式的用例。之前對字元編碼的認識也僅僅停留在ASCII與GB2312-80的層次,對unicode還是比較陌生的。所以就花時間研究了一下字元編碼的知識。1. 常用字元集分類1.1 簡介· ASCII及其擴充字元集作用:表語英語及西歐語言。位元:ASCII是用7位表示的,能表示128個字元;其擴充使用8位表示,表示256個字元。範圍:ASCII從00到7F,擴充從00到FF。· ISO-8859-1字元集作用:
Time of Update: 2018-12-05
erlang 字串串連要用string:concat/2或string:join/2,不能用++以GUI方式啟動common testct_run -vts -browser firefox -config cfg/test.cfg -logdir logs/ -dir ./ -erl_args -pa /home/louieli/work/test/itf -s inets
Time of Update: 2018-12-05
一 自主存取控制DAC
Time of Update: 2018-12-05
在android SDK 內建的sample snake,只能通過上下左右方向鍵控制貪吃蛇的方向,模擬器上玩沒有問題,裝到手機後基本玩不了,本著自己豐衣足食的精神,做了點小小的改動,通過手機屏滑動來控制方向,主要涉及的類public GestureDetector (GestureDetector.OnGestureListener listener),是一個觸摸手勢識別類,在綁定的監聽器listener需要實現GestureDetector.OnGestureListener介面中的一些方法,
Time of Update: 2018-12-05
ConnectivityManager功能:監視網路連接狀態通過context.getSystemService(Context.CONNECTIVITY_SERVICE);方法擷取,需要添加許可權 :android.permission.ACCESS_NETWORK_STATE常用方法:1.getAllNetworkInfo() //擷取所有網路連接資訊2.getActiveNetworkInfo()// 擷取正串連的網路的資訊3.getNetworkInfo(int networkType)
Time of Update: 2018-12-05
pthread_setspecific(key,(void *)tsd);相當於key=tsd。讓別的函數也可以用到tsd的值。如果我們線上程中用到全域變數,但是只是這個全域變數key,但是每個線程都有他的獨立空間,雖然key名字一樣,但是儲存的空間是不一樣,做到每個線程對這個全域變數互不影響。這個全域空間的大小是(void *)類型,也就是4個位元組空間。#include <stdio.h>#include <string.h>#include <pthread.
Time of Update: 2018-12-05
最近因為在調試印表機,soft-----到單片機-------通過串口到印表機。 需要把utf-8的編碼轉換成gbk的網上找了很多例子, 大部分都是 用String str = new String(s.getBytes("utf-8"),"gb2312"); 還有的就是說要用ISO的過度一下, 我不知道寫這些例子的人 到底有沒有試過,反正我用的是完全不對的,也許是用於其他地方。一直沒搞明白希望懂的人能告訴我一聲,先謝了. 最後是用這句 urlEncode =