Time of Update: 2015-07-13
標籤:leetcode java trapping rain water 題意:Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after
Time of Update: 2015-07-13
標籤: 部分代碼如下: public void ShowAlertScreen(Context context,String titles,String content,String phone) { // 擷取Service wm =
Time of Update: 2015-07-13
標籤:通過判斷瀏覽器的userAgent,用正則來判斷是否是ios和Android用戶端。代碼如下:<script type="text/javascript">var u = navigator.userAgent, app = navigator.appVersion;var isAndroid = u.indexOf(‘Android‘) > -1 || u.indexOf(‘Linux‘) > -1; //android終端或者uc瀏覽器var isiOS = !
Time of Update: 2015-07-13
標籤:Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the
Time of Update: 2015-07-13
標籤:下面介紹一下我常用的iOS開發或者最佳化的小工具由於很多工具大多數部落格都已經介紹過了,我就列舉一些我認為還不錯但是大家不常列舉的:Crafterhttps://github.com/krzysztofzablocki/crafter你是否經常見一個Project之後你經常會建立一個Podfile,然後把自己一些幾乎每個項目都要用的第三方庫加進去或者,添加ignore檔案等等重複的事情,Crafter
Time of Update: 2015-07-13
標籤:在基類table增加upgrade操作:public abstract class DbBaseTable {private static final String TAG = "DbBaseTable";/** * @return the DB table name */abstract String getName();/** * Creates the DB table according to the DB scheme * * @param db
Time of Update: 2015-07-13
標籤:ios 時間戳記 字串 nsdate 1 在項目中我們經常要做時間格式的轉換,以下是我封裝的NSDate+TimeCategory,希望協助到大家。#import <Foundation/Foundation.h>@interface NSDate (TimeCategory)/** * 字串轉NSDate * * @
Time of Update: 2015-07-13
標籤:近期公布的eMarketer2015年的資料給移動互連網描繪了一副令人振奮的未來。報告預期2015年網民數量將達到30億,智能手機使用者數量將超過20億,其中四分之一來自中國。在20國集團中,移動使用者的比例會更加突出。已經不會有人再懷疑這個即將道來的實事:未來的網路營銷是屬於移動端。從全球範圍看,移動DSP的發展推動力充足,今年移動程式化購買展示廣告的份額將首次超過PC端,達到56.2%,明年的預期是70%。隨著大資料時代的到來,情境應用能夠通過對實際情境的延伸,將企業營銷活動同具體真實
Time of Update: 2015-07-13
標籤:1、在images.xcassets裡面加入LaunchImage2、刪掉LaunchScreen.xib3、在Supporting Files裡的info.plist的檔案下,移除Launch screen interface file base...在設定檔Target--->項目名稱---->General----->4、把以上第二行改成以上名字5、- (BOOL)application:(UIApplic
Time of Update: 2015-07-13
標籤: 在眾多移動應?用中,能看到各式各樣的表格式資料 ,• 在iOS中,要實現表格式資料展?示,最常?用的做法就是使?用UITableView• UITableView繼承?自UIScrollView,因此?支援垂直滾動,?而且效能極佳 UITableView的兩種樣式,一種是只有一組別,還有一種是有多個數別如:如何展?示資料
Time of Update: 2015-07-13
標籤:UICollectionView 和 UICollectionViewController 類是iOS6 新引進的API,用於展示集合視圖,布局更加靈活,可實現多欄版面配置,用法類似於UITableView 和 UITableViewController 類。使用UICollectionView
Time of Update: 2015-07-13
標籤:手勢 收合 鍵盤 空白 點擊 iOS點擊空白處或點擊背景收合鍵盤在viewDidLoad中添加手勢- (void)viewDidLoad{ [super viewDidLoad]; //添加手勢UITapGestureRecognizer *tap1 =
Time of Update: 2015-07-13
標籤:#import <CommonCrypto/CommonDigest.h> // Need to import for CC_MD5 access//將字串進行MD5加密,返回加密後的字串。- (NSString *)md5:(NSString *)str{ const char *cStr =
Time of Update: 2015-07-13
標籤:這個功能的重點就是在如何判斷應用是第一次啟動的. 其實很簡單我們只需要在一個類裡面寫好使用者引導頁面 基本上都是使用UIScrollView 來實現,建立一個繼承於UIViewController的類 命名為 UserGuideViewController ,在UserGuideViewController.m 寫 1 - (void)viewDidLoad 2 { 3 [super viewDidLoad]; 4 //
Time of Update: 2015-07-13
標籤:<!doctype html><html><head> <meta charset="UTF-8"> <title>擷取裝置資訊</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/
Time of Update: 2015-07-13
標籤:這次添加的是自己新瞭解到的隨筆,要讓css active偽類生效,只需要給這個元素的touchstart/touchend綁定一個空的匿名方法即可成功。。。下面簡單舉個栗子複製代碼<!DOCTYPE html><html><head><style>p { color: yellow;}p:active { color:
Time of Update: 2015-07-13
標籤:package com.web伺服器區端判斷請求是否行動裝置;import java.util.regex.Matcher;import java.util.regex.Pattern;public class WebRequestUtil { // \b 是單詞邊界(連著的兩個(字母字元 與 非字母字元) 之間的邏輯上的間隔), // 字串在編譯時間會被轉碼一次,所以是 "\\b" // \B 是單詞內部邏輯間隔(連著的兩個字母字元之間的邏輯上的間隔)
Time of Update: 2015-07-13
標籤:1.建立一個android項目File——New——Other——android application project填寫application name(就是應用的名字,比如:天天酷跑)填寫project name(就是程式項目名,比如:TTKP,打包後名字也是TTKP.APP)填寫package
Time of Update: 2015-07-13
標籤:android開發 控制項 EventBus是一個方便與Android中各組件通訊的開源架構,開源地址;https://github.com/greenrobot/EventBus。EventBus功能很強大
Time of Update: 2015-07-13
標籤:android android-studio eclipse 遷移 前言:Google正在逐漸停止對 Eclipse 的開發,現在Android Studio 正逐漸成為Android 開發的首選,雖然會有一些痛苦,但當大家都熟悉使用 Android Studio 的時候,就會覺得 Google 變換 Android 開發 IDE