Time of Update: 2018-12-05
緩衝圖片 — 或者不緩衝iOS中從程式bundle中載入UIImage一般有兩種方法。第一種比較常見:imageNamed。第二種方法很少使用:imageWithContentsOfFile為什麼有兩種方法完成同樣的事情呢?imageNamed的優點在於可以緩衝已經載入的圖片。蘋果的文檔中有如下說法:This method looks in the system caches for an image object with the specified name and returns
Time of Update: 2018-12-05
經常使用Terminal的話一定別忘了開啟自動補全功能哦,特別是在輸入超長的命令句,檔案路徑,檔案名稱時你就會體會出他的好處,只需輸入頭幾個字母,按Tab鍵就會自動補全單詞,方便的很耨,開啟方法:開啟終端,輸入:nano .inputrc在裡面粘貼上以下語句:set completion-ignore-case onset show-all-if-ambiguous onTAB: menu-completeControl+O,儲存,重啟終端,OK!
Time of Update: 2018-12-05
[alias] logs = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit st = status ci = commit br = branch co = checkout df = diff lg = log -p如果想要把 rebase 當做
Time of Update: 2018-12-05
mainwindow.cpp #include "mainwindow.h"#include "ui_mainwindow.h"#include "QDebug"#include "QCheckBox" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow){ ui->setupUi(this);
Time of Update: 2018-12-05
public List<SuggestCommandView> getSuggests() { Connection connection = null; try { List<SuggestCommandView>list = new ArrayList<SuggestCommandView>(); final String sql = "select * from
Time of Update: 2018-12-05
方法一 git commit --amend 可以修改最後一次 commit方法二 互動式修改查看修改1git rebase -i master~1 //最git rebase -i master~5 //最後五次2. // 顯示結果如下,修改 pick 為 edit ,並 :wq 儲存退出pick 91b495b 2012-01-08: "提交資訊內容"# Rebase 9ef2b1f..91b495b onto 9ef2b1f## Commands:# pick = use commit#
Time of Update: 2018-12-05
確切說應該比較的是QT和MFC兩個介面庫QT使用的編譯器是MinGW,即Linux下的GCC移植到windows的版本MFC使用的編譯器是Visual C++ QT的應用主要在Linux下,但是它本身是跨平台的,也支援其他動作系統,是現在比較著名的介面庫,著名的KDE就是使用QT開發的 MFC是提供給VC的,但是它主要是程式碼程式庫,不像VCL和編譯器掛鈎很多,但是MFC主要是對windows
Time of Update: 2018-12-05
@implementation NSData(AES)- (NSData *) EncryptAES { char keyPtr[kCCKeySizeAES256+1]; bzero( keyPtr, sizeof(keyPtr) ); [_keygetCString: keyPtr maxLength: sizeof(keyPtr) encoding:NSUTF16StringEncoding]; size_t numBytesEncrypted = 0;
Time of Update: 2018-12-05
Permission denied 沒有執行許可權 可以用下面命令給予許可權。chmod +x httpd.shwww# chmod -R +r+w+x *指令名稱:chmod 使用許可權:所有使用者 使用方式:# chmod [-cfvR] [--help] [--version] [mode] filename... ...命令說明:Linux/Unix 的檔案調用許可權分為三級 : 檔案擁有者、群組、其他。利用 chmod
Time of Update: 2018-12-05
一個Regex也稱作一個模式。Java提供了專門用來進行模式比對的類java.util.regex.Pattern、 java.util.regex. Matcher。和一個模式比對的字串稱作模式比對字元串。字串“9ok”和“1ok”都是和模式“\\dok”匹配的字串之一。.方括弧模式:在Regex中可以使用一對方括弧括起若干個字元,代表方括弧中的任何一個字元。方括弧模式的一些意義如下:[abc]:代表a、b、c中的任何一個。 [^abc]:代表除了a、b、c以外的任何字元 [a-d]:代表
Time of Update: 2018-12-05
你和任何一個陌生人之間所間隔的人不會超過六個,也就是說,最多通過六個人你就能夠認識任何一個陌生人。
Time of Update: 2018-12-05
fromComboBox = QComboBox() 添加一個 combobox fromComboBox.addItem(rates) 添加一個下拉選項 fromComboBox.addItems(["%d years" % x for x in range(2, 26)]) 從序列中添加 fromComboBox.setMaxVisibleItems(10) #設定最大顯示下列項 超過要使用捲軸拖拉
Time of Update: 2018-12-05
例如:pattern=“A[1359]?”,則匹配模式pattern的全部字串:A,A1,A3,A5,A9。pattern=“@\\w{4}”,則匹配模式pattern的字串:@abcd,@girl, @moon,@flag等。Java中常用限定符如下: 帶限定符號的模式 意義 X? X出現0次或1次 X+ X出現1次或多次 X* X出現0次或多次 X{n} X恰好出現n次 X{n,} X至少出現n次 X{n,m} X出現n次至m次
Time of Update: 2018-12-05
原文地址:http://www.publish.com/article2/0,1895,1929650,00.aspBy Stephen Bryant February 22, 2006 Opinion: Enterprise-level Web 2.0 apps are coming. But first large companies need to understand the value proposition (not the feel-good proposition) of
Time of Update: 2018-12-05
Xcode的支援持續整合通過Xcode的服務流程。Xcode的服務,可在OS X伺服器,自動一體化建設過程中,分析,測試和歸檔您的產品。從開發的Mac,您可以建立運行在一個單獨的OS
Time of Update: 2018-12-05
Time of Update: 2018-12-05
工作好幾年了 談談自己的一些感想吧最近幾件事情觸動挺大的,1:跟侯的差距越來越遠了, 不到三年 侯做到了很多我沒做到的事情1-)自考了北大電腦系 2-)結識了年薪幾十萬的漂亮嫂子 3-)拿到了駕照 4-)在燕郊買了房子雖然彼此間還是隔三差五的聚聚,但是間隔越來越長了,大家都在忙,而我是真的在瞎忙 忙的沒有任何意義。2:家裡的壓力,家裡的壓力從催著找女朋友結婚 到現在的趕緊攢首付買房子,之前很天真的甚至有些自私的想
Time of Update: 2018-12-05
函數挪用 在一個m檔案中,可以界說多個函數,但是檔案名稱必定要與第一個函數(主函數)一概, 該檔案中其他函數則為本檔案的私人函數,外部不行訪問(可以經曆參數挪用的要領訪問,下面會形容)。 比如在一個步驟中,建立一個fig後,會天生這樣一個m檔案: function varargout =febirdfun(varargin) gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ...
Time of Update: 2018-12-05
麥克風音量檢測- (void)audio{ //錄音設定 NSMutableDictionary *recordSetting = [[[NSMutableDictionaryalloc]init] autorelease]; //設定錄音格式 AVFormatIDKey==kAudioFormatLinearPCM [recordSetting
Time of Update: 2018-12-05
#import <QuartzCore/QuartzCore.h>#import <objc/runtime.h>#define kAnimationDelay 0.08typedef CGFloat (^EasingFunction)(CGFloat,CGFloat, CGFloat, CGFloat);static EasingFunction easeOutElastic = ^CGFloat(CGFloat t,CGFloat b, CGFloat c,