Time of Update: 2016-08-15
標籤:manager pid exit 退出 android app退出方法記錄:1.exitSystem.exit(0); 如果參數為0,表示正常退出;不為0,則表示異常結束程式。 如果首個activity中使用,關閉app程式;否則是
Time of Update: 2016-08-15
標籤:fpga ; nios21. NIOS2 DMA控制器結構框圖650) this.width=650;" alt="NIOS2隨筆——DMA(1) - shugenyin - shugenyin的部落格" src="http://img2.ph.126.net/UvG2chFB2mYwE7kHy_B9nQ==/6631693387816559267.jpg" style="border:0px;height:auto;margin:0px 10px 0px 0px;width:500px;
Time of Update: 2016-08-15
標籤:現在基本所有應用都與圖片相關聯,這就必然涉及到上傳下載圖片,而使用者的流量又遲遲沒有被解放,因此圖片就不能太大,我們知道iPhone一張照片動輒幾M,如果都傳原圖那流量就會爆炸,粗暴地縮小又會影響圖片的解析度。那有沒有辦法在保持一定解析度的情況下壓縮圖片呢?有的,而且非常簡單,一行代碼搞定,是蘋果內建的壓縮函數:UIImageJPEGRepresentationUIImagePNGRepresentation這兩個函數都是iOS內建的圖片壓縮公用程式。一個是壓成JPEG格式,一個是壓成PN
Time of Update: 2016-08-15
標籤:看到這個錯的時候 一般就是iOS系統不相容的原因 我現在基本沒有考慮iOS7的相容,但有時候又偏偏有iOS7的機子,很無奈又要做適配我最初寫的代碼是這樣的: if ([self.UserNameTF.text containsString:@"*"]) { GFBLog(@"還有*號 不轉換"); } else { if ([self.UserNameTF.text
Time of Update: 2016-08-15
標籤:- (void)showLaunchView { self.window.rootViewController.view.alpha = 0; UIImageView *launchImageView = [[UIImageView alloc] initWithFrame:self.window.frame]; [launchImageView
Time of Update: 2016-08-15
標籤: 前段時間剛接觸過Android手機開發,對它的事件傳播機制不是很瞭解,雖然網上也查了相關的資料,但是總覺得理解模模糊糊,似是而非,於是自己就寫個小demo測試了一下。總算搞明白了它的具體機制。寫下自己的結論,分享之,希望對初學android的人有所協助布局效果: &n
Time of Update: 2016-08-15
標籤:造成記憶體流失的log如下:E StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.E StrictMode: java.lang.Throwable: Explicit termination method ‘end‘ not
Time of Update: 2016-08-15
標籤:1 #ifndef GlobalDefine_h2 #define GlobalDefine_h3 4 #define SCREENWIDTH [[UIScreen mainScreen] bounds].size.width5 #define SCREENHEIGHT [[UIScreen mainScreen] bounds].size.height6 7 #endif /* GlobalDefine_h */1 #import <UIKit/UIKit.h>2 3
Time of Update: 2016-08-15
標籤:
Time of Update: 2016-08-15
標籤:1.上傳,使用servlet以及ajax(1)需要引入的包: (2)配置web.xml (3)引入servlet的程式 servlet代碼: package upload;import java.sql.*;import java.io.File;import java.io.IOException;import java.io.PrintWriter;import java.util.Date;import
Time of Update: 2016-08-15
標籤:demo.py 主要作用為將同目錄下 *.mp4 檔案批次重新命名例如: aaa001.mp4 ---重新命名為--> 001.mp4 aaa002.mp4 ---重新命名為--> 002.mp4#!/usr/local/bin/python# -*- coding: UTF-8 -*-from Tkinter import *import sys,glob,osreload(sys) sys.setdefaultencoding("utf-8")class
Time of Update: 2016-08-15
標籤:Undefined symbols for architecture arm64: "_OBJC_CLASS_$_YYCache", referenced from: objc-class-ref in LFNetworking.o "_OBJC_CLASS_$_AFHTTPRequestSerializer", referenced from:
Time of Update: 2016-08-15
標籤:一:MobileProject簡介MobileProject項目是一個以MVC模式搭建的開源功能集合,基於Objective-C上面進行編寫,意在解決新項目對於常見功能模組的重複開發,MobileProject對於項目的搭建也進行很明確的劃分,各個模組職責也比較明確,MobileProject也引入的一些常用第三方外掛程式、宏定義、工具協助類等;整個項目也是在不斷更新跟維護中,功能點也會不斷更新;代碼支援iOS7以後版本; 二:項目架構內容 三:功能點介紹 1
Time of Update: 2016-08-15
標籤:【onMeasure】直接繼承view的自訂控制項需要重寫onMeasure方法並設定wrap_content時的自身大小,否則在布局中使用wrap_content就相當於match_parent。 @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int widthMode = MeasureSpec.getMode(widthMeasureSpec);
Time of Update: 2016-08-15
標籤:applicationContext.xml 檔案<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Time of Update: 2016-08-15
標籤:常用的設計模式(一)代理模式應用情境:當一個類的某些功能需要由別的類來實現,但是又不確定具體會是哪個類實現。優勢:解耦合敏捷原則:開放-封閉原則執行個體:tableview的
Time of Update: 2016-08-15
標籤:(參考 iOS 52個技巧學習心得筆記 第二章 對象 , 訊息, 運行期)的對象部分關於Copy 有個經典問題”大部分的時候NSString的屬性都是copy,那copy與strong的情況下到底有什麼區別呢” 或者說”為什麼 NSString 類型成員變數的修飾屬性用 copy 而不是 strong (或 retain ) ?”明顯 第一句比第二句 嚴謹多了.@property (strong,nonatomic)
Time of Update: 2016-08-15
標籤:(Swift)import UIKitclass ViewController: UIViewController { var datePicker: UIDatePicker! func datePickerDateChanged(datePicker: UIDatePicker) { println("Selected date = \(datePicker.date)") } override func viewDidLoad()
Time of Update: 2016-08-15
標籤: 1 #import "ViewController.h" 2 #import "SecondVC.h" 3 4 5 #define WIDTH [UIScreen mainScreen].bounds.size.width 6 #define HEIGHT [UIScreen mainScreen].bounds.size.height 7 8 @interface ViewController () 9 {10 UIImageView *_canvasView;//畫布1
Time of Update: 2016-08-15
標籤:1、presentViewController 方式,動畫效果是從底部彈出,主要用在除導航類頁面的彈出let anotherVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewControllerWithIdentifier("aaa") as! AnotherViewControllerpresentViewController(anotherVC, animated: true, completion: