Time of Update: 2015-01-05
標籤:設定滾動監聽判斷ListView的滾動方向同時擷取螢幕高度、ListView實際高度,判斷是否需要展示返回頂部按鈕(具體邏輯請看代碼--附有詳細注釋)。:http://www.dwz.cn/zG99W 源碼運行動態圖
Time of Update: 2015-01-05
標籤: NSString *strContent=[info objectForKey:@"newContent"];{ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); &
Time of Update: 2015-01-05
標籤:1、webview載入網頁<html>源碼亂碼問題
Time of Update: 2015-01-04
標籤:原理:原理有兩個,第一:通過遊覽器(browser)判斷是否是手機;第二:通過訪問終端判斷是否是手機(userAgent);但是通常考慮到相容性,需要這兩種原理同時使用;具體的實現如下:JS實現: 1 2 function checkBrowser(){ 3 var browser={ 4 versions:function(){ 5 var u = navigator.userAgent, app =
Time of Update: 2015-01-06
標籤:android平台 手機 基於Android平台開發的手電筒Light1.
Time of Update: 2015-01-06
標籤:首先標頭檔應繼承CLLocationManagerDelegate.並:#import <CoreLocation/CoreLocation.h>響應事件中寫如下代碼:CLLocationManager *_locManager = [[CLLocationManager alloc] init]; [_locManager setDelegate:self]; [_locManager
Time of Update: 2015-01-05
標籤:判斷手機瀏覽器終端裝置 var browser = { versions: function () { var u = navigator.userAgent, app = navigator.appVersion; return { trident: u.indexOf(‘Trident‘) > -1, //IE核心 presto: u.indexOf(‘Presto‘) >
Time of Update: 2015-01-06
標籤:http://blog.csdn.net/silencetq/article/details/8447400我是採用的AVAudioRecorder這個架構來進行錄音這個錄音跟官方網站上的speakHere有些區別,最大的區別是,這個必須要錄製完成才能處理檔案,而speakhere樣本是可以實現邊錄製邊上傳的效果。 #import <AVFoundation/AVFoundation.h>#import <CoreAudio/CoreAudi
Time of Update: 2015-01-05
標籤: 在WebView中不僅可以運行HTML代碼,更重要的是,WebView可以與Javascript互相調用。也就是說,在Javascript中可以擷取WebView的內容,與此同時,在WebView中也可以調用Javascript裡面的方法。 下面通過如下案例來分析WebView與javascript的互動
Time of Update: 2015-01-05
標籤:AndroidAnnotation是一個通過Annotation對代碼進行預先處理,簡化Android開發,加快開發速度,提高代碼可閱讀性的一個架構。它的主要思路是:用編譯時間Annotation對代碼進行標記,通過Java的Annotation
Time of Update: 2015-01-04
標籤:android android教程 java baseadapter 適配器 擴充BaseAdapter可以對各清單項目進行最大限度的定製,具體描述請看以下代碼:baseadapter_list布局檔案:<span style="font-size:18px;"><?xml
Time of Update: 2015-01-06
標籤:在真機測試的時候往往會突然出現這樣一個錯誤,code signing is required for product type ‘Application‘ in SDK ‘iOS 7.0‘ ,就是說程式碼簽署認證不對勁。 解決方案,1.選擇工程->Build Settings -> Code Signing -> Code Signing Identity -> Debug -> Any ios SDK 將選項改為:iPhone
Time of Update: 2015-01-05
標籤:android4.0 字型 roboto使用 自訂字型 一、自訂字型1.android Typeface使用TTF字型檔設定字型我們可以在程式中放入ttf字型檔,在程式中使用Typeface設定字型。第一步,在assets目錄下建立fonts目錄,把ttf字型檔放到這。第二步,程式中調用:AssetManager
Time of Update: 2015-01-04
標籤:android udp 只是貼代碼,以前寫的突然忘記了. private WifiManager.MulticastLock multicastLock; public void init(Context context){ WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE)
Time of Update: 2015-01-05
標籤:http://www.blogjava.net/crespochen/archive/2009/06/02/279538.html Web壓力測試是目前比較流行的話題,利用Web壓力測試可以有效地測試一些Web伺服器的運行狀態和回應時間等等,對於Web伺服器的承受力測試是個非常好的手法。Web 壓力測試通常是利用一些工具,例如微軟的Web Application Stress、Linux下的siege、功能全面的Web-CT等等,這些都是非常優秀的W
Time of Update: 2015-01-04
標籤:handler用法 android開發 遊響雲停工作室
Time of Update: 2015-01-04
標籤:Github源碼:https://github.com/LinJZong/AndroidProject.git模仿360相機,圖片資源來源於360相機,僅供學習使用。如下: 目前完成了拍照、儲存、圖片壓縮、觸摸聚焦、拍照成功附帶動畫效果、閃光燈切換、手勢縮放等功能,功能持續更新中。最新動向的較頻繁,就不放csdn了,等功能全做完了再傳csdn。介紹下目前主要幾個功能類湊夠200字。public class CameraView extends SurfaceView
Time of Update: 2015-01-04
標籤:ListView填充資料用SetAdapter方法,必須繼承抽象類別ListAdapter,這個類要實現的方法較多,Google工程師為簡化操作,只需實現BaseAdapter即可。主要實現兩個方法:getCount()方法和getView(int position, View arg1, ViewGroup arg2)方法;getCount返回條數,即ListView顯示幾條在這裡設定,getView()返回內容。樣本:布局檔案<?xml version="1.0"
Time of Update: 2015-01-06
標籤:@interface IndEditorDetailViewController ()<UIWebViewDelegate, NJKWebViewProgressDelegate>{ UIWebView *_webView; UIProgressView *_progressView; NJKWebViewProgress *_progressProxy;}@end@implementation IndEditorDetailViewController-
Time of Update: 2015-01-06
標籤:meminfo cpuinfo readline split 1. 簡介:上篇,介紹了meminfo和cpuinfo檔案,本篇給出程式常式,用代碼的方式來擷取它們的值。以memino為例。2. 代碼:public static List<Long> getMeminfo() {