Time of Update: 2015-06-08
標籤: 8.0 public class Convisibility : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { } public object ConvertBack(object
Time of Update: 2015-06-09
標籤:一:匯入架構#import <CoreLocation/CoreLocation.h>二:設定代理及屬性<CLLocationManagerDelegate>@property (nonatomic, strong) CLLocationManager *locMgr;三:方法實現- (CLLocationManager *)locMgr{#warning 定位服務不可用 if(![CLLocationManager
Time of Update: 2015-06-09
標籤:實現原理:intent的使用,代碼如下: 1 //建立捷徑 2 private void createShortcut() { 3 Intent shortcut = new Intent("com.android.launcher.action.INSTALL_SHORTCUT"); 4 shortcut.putExtra(Intent.EXTRA_SHORTCUT_NAME, getString(R.string.app_name));
Time of Update: 2015-06-08
標籤:先看一下Google官方對於SharedPreferences的定義:The SharedPreferences class provides a general framework that allows you to save and retrieve persistent key-value pairs of primitive data types. You can use SharedPreferences to save any
Time of Update: 2015-06-08
標籤:第一部分安卓開發中,在寫布局代碼的時候,ide可以看到布局的預覽效果。但是有些效果則必須在運行之後才能看見,比如這種情況:TextView在xml中沒有設定任何字元,而是在activity中設定了text。因此為了在ide中預覽效果,你必須在xml中為TextView控制項設定android:text屬性,一般我們在這樣做的時候都告訴自己,沒關係,等寫完代碼我就把這些東西一併刪了。但是你可能會忘,以至於在你的最終產品中也會有這樣的代碼。以上的情況是可以避免的,我們使用tools命名空間以及
Time of Update: 2015-06-08
標籤:package com.learingselenium.android;import junit.framework.TestCaseimport org.openqa.selenium.Rotatable; import org.openqa.selenium.ScreenOrientation;import org.openqa.selenium.WebDriver;import
Time of Update: 2015-06-09
標籤:android listview arrayadapter baseadapter 這篇文章主要是練習了安卓listview的arrayadapter和baseadapter的簡單填充。1.arrayadapter填充布局:<RelativeLayout
Time of Update: 2015-06-08
標籤:本地載入ASIHTTPRequest *request=[ASIDataService GET_Path:path completed:^(id JSON, NSString *stringData) { //擷取到html資訊 //N
Time of Update: 2015-06-09
標籤:android圖片壓縮android裡面對於圖片的處理一直是個比較煩人的問題,煩人之處在於一個不小心,就有可能造成OOM。最近碰到一個關於圖片上傳的問題,圖片上傳我們肯定要保證2點,一點是圖片的大小儘可能的小,但是圖片的清晰度又要有一定的保證,基於此我們有兩個方向,一個是將圖片縮小,第二個是將圖片的品質降低。對於縮小圖片,我們的方法不少,可以裁剪,可以縮放;而另一種降低圖片的方法就是降低品質,使用這個方法後圖片就會變得模糊,如果我們降低品質太多,會發現我們的圖片都變成了很大的像素點,有過映
Time of Update: 2015-06-09
標籤:與javascript中的事件機制不同,ios裡的事件廣播機制是同步的,預設情況下,廣播一個通知,會阻塞後面的代碼:Objc代碼 -(void) clicked { NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; &n
Time of Update: 2015-06-07
標籤:android layout Android五大布局Layout1,LinearLayout 線性布局:制定線性布局的相片順序:水平排列 horizontal、垂直排列 verticaleg: android:orientation="horizontal" 控制當前 控制項的內容 的顯示地區:eg:
Time of Update: 2015-06-08
標籤:citrix xendesktop xenapp 虛擬化 vdi MicrosoftActive Directory 服務是Windows
Time of Update: 2015-06-07
標籤: UIImageView 1 override func viewDidLoad() { 2 super.viewDidLoad() 3 4 titleLabel.text = titleString 5 6 //通過座標和大小來建立映像視圖 7 var imageView:UIImageView = UIImageView(frame: CGRectMake(
Time of Update: 2015-06-08
標籤:fragment 橫豎屏顯示 分屏顯示 示範效果如下: 另外在豎屏的時候是這樣的效果: 布局檔案如下: 可以看出有兩個資源檔,一個是處理橫屏一個是豎屏第一個:<?xml version="1.0" encoding="utf-8"?><LinearLayout
Time of Update: 2015-06-09
標籤:實現原理:比較簡單,主要是intent的具體使用,代碼如下: 1 /** 2 * 3 * @ClassName: MainActivity 4 * @Description: 從一個應用跳轉到另一個應用 5 * @author guoyizhe 6 * @email [email protected] 7 * @date 2015-6-9 下午3:49:07 8 * 9 */10 public class MainActivity extends Activity {11
Time of Update: 2015-06-09
標籤:很有意思的貪心:Let‘s reformulate the condition in terms of a certain height the towers, which will be on the stairs. Then an appropriate amount of money of a person in the queue is equal to the height of the tower with the height of the step at which
Time of Update: 2015-06-08
標籤:ios 延時 - (void)initBlock{ //延時的方法 //1:GCD延時 此方式在可以在參數中選擇執行的線程。是一種非阻塞的執行方式,沒有找到取消執行的方法。 double delay1=2.0;//設定延時時間 dispatch_time_t
Time of Update: 2015-06-08
標籤:自己總結的在android中常會出現的不好解決的問題和方法(其中第三個方法經過了四天的折磨。。。。。哎)1.報錯:BUILD FAILEDD:\workspace\ganji\build.xml:144: The following error occurred while executing this line:D:\workspace\ganji\build.xml:271: Unable to delete file
Time of Update: 2015-06-08
標籤:Block 一般是用來表示、簡化一小段的程式碼,它特別適合用來建立一些同步執行的程式片段、封裝一些小型的工作或是用來做為某一個工作完成時的回傳呼叫(callback) 。Block實體形式如下:^(傳入參數列){行為主體};1:Block可以訪問局部變數,但是不能修改。int multiplier = 7; int (^myBlock)(int) = ^(int num)
Time of Update: 2015-06-07
標籤:註冊:[[NSNotificationCenter defaultCenter] postNotificationName:@"changeColor" object:self];接收處觀察 : [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeColor) name:@"changeColor" object:nil];addObserver處remove掉觀察者:-