Time of Update: 2016-02-14
標籤:現在的移動端應用幾乎都會通過網路請求來和伺服器互動,通過抓包來診斷和網路相關的bug是程式員的重要技能之一。抓包的手段有很多:針對http和https可以使用Charles設定代理來做,對於更廣泛的協議可以使用tcpdump或者wireshark。wireshark提供GUI,方便做深入全面的資料分析。tcpdump則輸出原始的包內容,好處是快速高效,之前寫過一篇簡單的紅包圖片的破解教程,就是用tcpdump來操作的。這篇文章主要介紹tcpdump的基本使用方法,閱讀目標是能基本掌握並運用
Time of Update: 2016-02-14
標籤:1、 iOS裡fixed中有input或者textarea,使用者在裡面輸入文字,觸發鍵盤,fixed容器會置中顯示,而不是繼續懸浮 解決辦法: http://dwz.cn/CrwNz2、移動端click時間300ms延遲 解決辦法:zepto.js 或者百度touch.js 或者是fastclick.js3、zepto的touch問題:swipe事件在小米1等低端手機不支援
Time of Update: 2016-02-14
標籤: MindMapper思維導圖中有一個看起來不顯眼的功能,那就是定時器功能,一個類似鬧鐘的功能,我們可以用來提醒某一定時任務,比如當我們
Time of Update: 2016-02-13
標籤:可能遇到的問題android系統自身內建有儲存,另外也可以通過sd卡來擴充儲存空間。前者好比pc中的硬碟,後者好移動硬碟。 前者空間較小,後者空間大,但後者不一定可用。 開發應用,處理本機資料存取時,可能會遇到這些問題:需要判斷sd卡是否可用:
Time of Update: 2016-02-13
標籤:儲存在內部還是外部所有的Android裝置均有兩個檔案儲存體地區:"internal" 與 "external" 。 這兩個名稱來自於早先的Android系統,當時大多裝置都內建了不可變的(internal storage)及一個類似於SD card這樣的可卸載的儲存組件(external storage)。之後有一些裝置將"internal" 與 "external"
Time of Update: 2016-02-13
標籤:一句話即可。ImageButton.setBackgroundResource(R.drawable.abc_list_selector_background_transition_holo_light);其中網路上的答案如設定背景圖片透明度等不適合動態添加的控制項,仍會有不可見的邊框存在,使得控制項位置位移。【android】動態添加ImageButton的去邊框辦法
Time of Update: 2016-02-12
標籤:1.xml 1 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 xmlns:tools="http://schemas.android.com/tools" 3 android:layout_width="match_parent" 4 android:layout_height="match_parent" 5
Time of Update: 2016-02-12
標籤:1.安裝 ubuntu 14.03 儘管android推薦 ubuntu 15, 安全起見,還是裝LTS的14.04,步驟跳過2. JDK:Marshmallow 需要 JDK8 ,添個源,順手配下javasudo add-apt-repository ppa:openjdk-r/ppasudo apt-get update sudo update-alternatives --config javasudo
Time of Update: 2016-02-11
標籤:Android:通過adb命令去進行錄屏,然後將錄製的視頻轉換成gif圖片:前提:確保電腦上安裝了adb,且Android的level高於19。1.adb shell screenrecord /sdcard/test.mp4儲存一個叫做test.mp4的檔案到手機的/sdcard/目錄下。預設的錄製時間為18s(可以用ctrl+c提前退出錄製狀態),也可以用adb shell screenrecord --time-limit 10
Time of Update: 2016-02-11
標籤: UCZProgressView 是一個帶有通用的圓形圖片進度下載控制項。動畫效果不錯 特性Customizable indicator (line width, radius, and color)Display a label with the current progress.Customizable progress text label (color, size and font)Customizable background view (blur style)Fully
Time of Update: 2016-02-11
標籤:更新Cocoapod之後出現故障:diff: /../Podfile.lock: No such file or directorydiff: Manifest.lock: No such file or directory error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods
Time of Update: 2016-02-08
標籤:一、ImageView介紹設定scalTypeMust be one of the following constant values.ConstantValueDescriptionmatrix0Scale using the image matrix when drawing. See setImageMatrix(Matrix).fitXY1Scale the image using FILL.fitStart2Scale the image
Time of Update: 2016-02-11
標籤:一.建立xml檔案,位置:drawable/xxx.xml,同目錄下記得要放相關圖片<?xml version="1.0" encoding="utf-8" ?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <!-- 預設時的背景圖片--> <item android:drawable="@drawable/pic1" />
Time of Update: 2016-02-10
標籤:iOS開發網路篇—發送GET和POST請求(使用NSURLSession)說明: 1)該文主要介紹如何使用NSURLSession來發送GET請求和POST請求 2)本文將不再講解NSURLConnection的使用,如有需要瞭解NSURLConnection如何發送請求。 詳細資料,請參考:http://www.cnblogs.com/wendingding/p/3813706.html 3)本文範例程式碼發送的請求均為http請求,已經對info.plist檔案
Time of Update: 2016-02-07
標籤: 我們把資料視覺效果出來,為的就是進行一些針對資料的操作。這裡介紹一下DataView的排序功能和搜尋功能。掌握這兩個技能,可以讓寫出的資料介面內的資料能夠根據要求進行排序,可以進行資料的搜尋顯示燈功能。 一、排序 當我們想根據資料的某一個欄位排序時,可以調用sort方法:
Time of Update: 2016-02-06
標籤:1、Android裝置螢幕尺寸分布首先看一下各種螢幕的尺寸和螢幕密度劃分。是各種螢幕尺寸相應的範圍:從能夠看出,相應normal尺寸的螢幕範圍集中在常見的3到5寸屏之間,large尺寸相應的就主要是5到7寸的nottpad之類的裝置,比如三星的Note和Nexus7平板等,再網上走就是平板電腦了。接下來是螢幕密度(dpi),須要說明的時。平時所說的螢幕解析度事實上不能作為螢幕適配的根據,應該根據螢幕密度和螢幕尺寸來換算,螢幕密度是指每寸螢幕內容納的像素數,螢幕密度從ldpi到xhdpi分別
Time of Update: 2016-02-05
標籤:打包成apk按右鍵項目名稱,選擇"Android Tools"。再選擇"Export Signed Application Package…",例如以所看到的。watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvc3VuNDczMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast"
Time of Update: 2016-02-05
標籤: 點擊事件 有四種實現方式。1.內部類實現方式 1.0package cn.rfvip.clickevent;import android.app.Activity;import android.os.Bundle;import android.view.View;import android.view.View.OnClickListener;import android.widget.Button;public class MainActivity
Time of Update: 2016-02-05
標籤:1:伺服器端/** * Created by LiuFei on 2016/1/22. */public class HttpService extends Service{ @Override public IBinder onBind(Intent intent) { return null; } @Override public int onStartCommand(Intent intent, int flags, int
Time of Update: 2016-02-05
標籤:要將一個對象存進資料庫的blob欄位,最好先轉為NSData。一個對象要遵守NSCoding協議,實現協議中對應的方法,才幹轉成NSData。NSData *statusData = [NSKeyedArchiver archivedDataWithRootObject:obj];[_db executeUpdateWithFormat:@"INSERT INTO t_a(a, idstr) VALUES (%@, %@);", ajson,