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-05-02
標籤:最近遇到一個功能就是根據使用者當前的網路狀,使用者未連網需要提示一下,如果是Wifi可以推薦一些圖片新聞,如果是3G模式設定為無圖的模式,擷取網路狀態比較簡單,畢竟中國現在的流量還是一個比較貴的狀態,哪天使用者發現App消耗流量過多說不定就幹掉了App。不過蘋果的Reachability都解決了以上問題,使用起來也比較方便,具體的稍微簡單分析一下。Reachability.h標頭檔代碼: #import
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-24
標籤:<!-- 前台還是後台 --><uses-permission android:name="android.permission.GET_TASKS" /> 1 private boolean isForeground(Context context) { 2 ActivityManager am = (ActivityManager) context 3
Time of Update: 2015-04-23
標籤:.java 1 package com.jerry.crop; 2 3 import java.io.File; 4 5 import android.app.Activity; 6 import android.content.Intent; 7 import android.graphics.Bitmap; 8 import android.net.Uri; 9 import android.os.Bundle; 10 import
Time of Update: 2015-04-22
標籤:一、問題分析 在許多App中,我們都會見到迴圈滾動的視圖,比如廣告,其實想實現這個功能並不難,用ScrollView就可以輕鬆完成,但是在製作的過程中還存在幾個小問題,如果能夠正確的處理好這些小問題,無論從效果還是效能上都會得到最佳化。問題一 第一個問題是如何用ScrollView來展示N個視圖。想要實現這個效果,可以把N個視圖依次按順序添加到ScrollView上,然後把
Time of Update: 2015-04-22
標籤:顯示昆蟲列表在 OS X中,Table View使用 NSTableView類,它等同於iOS的UITableView 類,但有一個最大的不同是:NSTableView 的每一行有多個列或多個儲存格。· 在OS X 10.7Lion之前,table view cell繼承於NSCell類。而後者並非NSView類,因此開發人員需要自己處理繪圖和滑鼠事件。·
Time of Update: 2015-04-22
標籤:在用UICollectionView展示資料時,有時我們希望將cell的間距調成一個我們想要的值,然後查API可以看到有這麼一個屬性: - (CGFloat)minimumInteritemSpacing { return