Time of Update: 2015-05-03
標籤:??今天寫了一個簡單的記憶便箋小程式,但是卻發現在判斷添加資料不可為空的時候,自己的代碼總是不起作用。 String titleStr = addtitle.getText().toString(); String contentStr = addcontent.getText().toString(); if (titleStr == null && contentStr == null) { Toast.makeText(this,
Time of Update: 2015-05-03
標籤:一般情況下,我們採用C風格的enum關鍵字可以定義枚舉類型。
Time of Update: 2015-05-03
標籤:WeakMemoryCache 源碼:BaseMemoryCache參見:http://blog.csdn.net/woliuyunyicai/article/details/45330867/** * Memory cache with {@linkplain WeakReference weak references} to {@linkplain android.graphics.Bitmap bitmaps}<br /> * <br /> *
Time of Update: 2015-05-03
標籤:IOS中UIActionSheet使用方法詳解 一、初始化方法 - (instancetype)initWithTitle:(NSString *)title delegate:(id<UIActionSheetDelegate>)delegate cancelButtonTitle:(NSString *)cancelButtonTitle destructiveButtonTitle:(NSString *)destructiveButtonTitle
Time of Update: 2015-05-03
標籤:android http協議 最近在學校android網路編程之json解析時遇到不少問題,其中之一是在使用http協議串連網路時總是出錯,搗鼓了將近兩天,終於略有所悟,現記錄如下。一
Time of Update: 2015-05-03
標籤:leetcode numbers python algorithm Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any
Time of Update: 2015-05-03
標籤:java.lang.illegalthr thread already start thread不能停止處理辦法 原因:thread的沒有停止,就又去啟動這個線程了,解決辦法:我只列出了關鍵代碼: btnStart.setOnClickListener(new View.OnClickListener() { &
Time of Update: 2015-05-03
標籤:樹狀數組Apple TreeTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 20671 Accepted: 6257DescriptionThere is an apple tree outside of kaka‘s house. Every autumn, a lot of apples will grow in the tree. Kaka likes
Time of Update: 2015-05-03
標籤:LRULimitedMemoryCache源碼:/** * (cache size limited)Size of all stored bitmaps will not to exceed size limit. * (刪除策略LRU)When cache reaches limit size then the least recently used bitmap is deleted from cache. * NOTE: This cache uses strong and
Time of Update: 2015-05-03
標籤:AndroidSDK及Eclipse安裝都很順利,但是在Eclipse下安裝ADT外掛程式時,先採用點擊Help->installnew software->Add...,無論輸入https://dl-ssl.google.com/android/eclipse/或者http://dl-ssl.google.com/android/eclipse/,總是卡在Calculatingrequirements and dependencies.採用第二種方法即本地安裝先下載了ADT-
Time of Update: 2015-05-03
標籤:預設情況下是不會調用的。 @Override public void onBackPressed() { String titleStr = edittitle.getText().toString(); String contentStr = editcontent.getText().toString(); if (title.equals(titleStr) &&
Time of Update: 2015-05-03
標籤:真正路徑:/data/data/com.mediatek.todos/databases/todos.db使用過連結的路徑:/data/user/0/com.mediatek.todos/databases/todos.db 其實兩個URL是定位到同一個檔案,第二個URL中的 0 是連結到 /data/data/的連結這個檔案是一個sqlite3資料庫,在windows中可以使用 sqlite browser
Time of Update: 2015-05-02
標籤:問題來源:常見面試問題之:NSObject和NSObject protocol有什麼區別,為什麼要有NSObject protocol, 有沒有不繼承自NSObject的類?雖然在iOS開發過程中所用到的幾乎所有的類都派生自NSObject, 但Cocoa並不是只有一個NSObject這一個root class. 另一個典型的root class就是NSProxy. 這也就是為什麼同時需要定義NSObject類和NSObject協議.
Time of Update: 2015-05-01
標籤: <!DOCTYPE html><html lang="zh-cn" class="no-js"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Content-Type"><meta content="text/html; charset=utf-8"><meta
Time of Update: 2015-05-02
標籤:cocos2d-x tinyxml2 移植android閃退 剛剛朋友讓我幫忙看一下他的遊戲為啥打包Android之後閃退, 在PC上正常, 跟了一下之後, 發現問題出在了tinyxml2上面, 他是這樣寫的tinyxml2::XMLDocument* doc = new tinyxml2::XMLDocument();XMLError errorID =
Time of Update: 2015-04-26
標籤:interface 路由器 enable 一、Cisco發現協議(CDP) Cisco發現協議(CDP,Cisco Discovery Protocol),可以收集相鄰裝置的硬體和協議資訊,用於故障診斷和網路判斷。 1、擷取CDP定時器和保持時間資訊 R0#show cdp
Time of Update: 2015-04-22
標籤:一、問題分析 在許多App中,我們都會見到迴圈滾動的視圖,比如廣告,其實想實現這個功能並不難,用ScrollView就可以輕鬆完成,但是在製作的過程中還存在幾個小問題,如果能夠正確的處理好這些小問題,無論從效果還是效能上都會得到最佳化。問題一 第一個問題是如何用ScrollView來展示N個視圖。想要實現這個效果,可以把N個視圖依次按順序添加到ScrollView上,然後把
Time of Update: 2015-04-22
標籤:在用UICollectionView展示資料時,有時我們希望將cell的間距調成一個我們想要的值,然後查API可以看到有這麼一個屬性: - (CGFloat)minimumInteritemSpacing { return
Time of Update: 2015-04-19
標籤:產生管理網站讓你的員工或客戶添加、更改和刪除內容是非常繁瑣的工作。出於這個原因,Django完全自動化管理介面模型的建立。Django明確的將“內容發行者”和“公用”網站進行分離。網站管理員使用該系統添加新聞,事件,體育成績,等等...顯示內容在公用網站。Django為網站管理員建立一個統一的介面來編輯內容。所以admin並不是給網頁瀏覽者使用的,而是給管理者使用的。下面,我們將admin應用添加進我們的項目。修改setting.py如下:I
Time of Update: 2015-04-16
標籤:android 安卓 一、Activity和Task(棧)的關係 Task就像一個容器,而Activity就相當與填充這個容器的東西,第一個東西(Activity)則會處於最下面,最後添加的東西(Activity)則會在最低端。從Task中取出東西(Activity)則是從最頂端取出,也就是說最先取出的是最後添加的東西(Activity),一次類推,最後取出的是第一次添加的Activity,而Activity在Task中