- 博客(28)
- 资源 (9)
- 收藏
- 关注
原创 单元测试 -- UIAutomator 2.0
UI 自动化测试听说可以模拟屏幕操作, 感觉挺有意思的, 有机会就学了一下; // 今天试了下, 模拟点击屏幕, 可惜一秒只可以点击5~6次, (ノ ̄(エ) ̄)ノ添加依赖 androidTestCompile 'com.android.support.test:runner:0.4' // Set this dependency to use JUnit 4 rules a
2016-10-17 09:21:19
1133
原创 C++向量
包含文件#include 例子://vector intVector; //创建一个保存int值的头文件//vector intVector(10);//初始化有10个元素vectorint> intVector(10,9);//初始化有10个元素,每个元素值为9for (inti = 0; i <12; ++i) {
2015-10-09 16:24:43
1370
转载 Android Lollipop 新特性 - Palette
Android Lollipop 新特性 - Palette原文地址:http://baoyz.com/android/2014/10/21/android-palette-use/Palette 可以从一张图片中提取颜色,我们可以把提取的颜色融入到App UI中,可以使UI风格更加美观融洽。比如,我们可以从图片中提取颜色设置给ActionBar做背景颜色,这样Action
2015-09-25 16:30:05
462
转载 Android M新控件之FloatingActionButton,TextInputLayout,Snackbar,TabLayout的使用
【转载请注明出处:http://blog.youkuaiyun.com/feiduclear_up/article/details/46500865 优快云 废墟的树】在前不久的谷歌2015 I/O大会上,发布了Android新版本M,貌似从这个版本开始Android不在以数字命名版本了。在这次的I/O大会上谷歌对Android并没有很大的改变,主要是修改完善之前Android L版
2015-09-22 19:01:34
615
原创 swift 错误处理
swift2.0中字典Cannot subscript a value of type 'NSDictionary?' with an index of type 'String'错误处理
2015-08-27 16:20:58
1356
原创 swift 异常处理
//异常处理 do{ //代码 defer{ //代码 //该块方法出现异常则在异常出现后调用,然后进入处理异常代码 //没有出现异常则在do语句其它部分调用完成后
2015-08-26 17:00:23
401
原创 swift 选取图库中的图片
选取图库中的一张图片,并显示在UIImageView中 @IBOutlet weakvar imageView: UIImageView! @IBAction func pickerImg(sender:AnyObject) { //新建UIImagePickerController对象 let i=UIImag
2015-08-26 13:08:51
932
原创 swift 属性监视器
var att:Int=10{//改变前调用willSet,参数为新值willSet(newValue){ print(newValue) print(att)}//改变后调用didSet,参数为旧值didSet(oldValue){ print(oldValue) print(att)}}
2015-08-25 08:46:21
351
原创 swift 动画
//由dogImg转化成caImage,用时一秒,使用TransitionFlipFromRight效果,完成后调用completion指定方法UIView.transitionFromView(dogImg, toView:caImage, duration: 1, options:UIViewAnimationOptions.TransitionFlipFromRight, com
2015-08-24 18:42:52
385
原创 swift 绘图
继承UIView,在overridefuncdrawRect(rect: CGRect)中重写绘制方法 let context=UIGraphicsGetCurrentContext()获取画布 画线CGContextMoveToPoint(context,100,100)//移动起始点CGContextAddLineToPoint(context,150,
2015-08-23 18:57:45
316
原创 swift 跳转页面
跳转代码let vc= ViewController() //改成自己的类名self.presentViewController(vc,animated:true,completion:nil) 返回代码self.dismissViewControllerAnimated(true,completion:nil)
2015-08-22 16:48:21
519
原创 android动画(Animation)
AlphaAnimation 透明度AlphaAnimationalphaAnimation = new AlphaAnimation(0, 1); alphaAnimation.setDuration(1000); alphaButton.startAnimation(alphaAnimation); xmlversion="1.0
2015-08-09 23:21:59
510
原创 PHP"类"笔记
class关键字定义类extends是继承类的关键字属性和方法可以用public protected 和private修饰, 默认public在类中访问类的属性和方法, 使用$this-> 名称; 访问;静态的用self::名称;都可以用对象调用初始化$对象名=new 类名(); 初始化时调用构造方法_construct() 析构方法_destruct() php代码结束
2015-07-14 13:47:33
472
原创 PHP函数内访问全局变量
$stringVarGlo="global variant";//全局变量 textGlobalVariant1(); //方法一使用$GLOBALS["全局变量名"]echo $stringVarGlo,""; textGlobalVariant2(); //方法二使用global 变量名声明引入;echo $stringVarGlo,""; function
2015-07-10 17:30:41
2236
原创 字符串过长(Heredoc结构形式方法)
使用定界符表示字符串(接着在“然后是字符串最后以提供的这个标识符加上分号(IDEN;)结束字符串。$string=换行字符串IDEN;
2015-07-09 16:48:10
892
原创 android 配置文件中配置service
在配置文件中配置Service使用标签,与Activity同级也可以在中进行相关配置。serviceandroid:name=".className"> intent-filter> actionandroid:name="user-defined-uri"/> intent-filter
2015-06-24 15:46:04
1779
原创 android 获取照相机返回的图片,无压缩
跳转调用系统相机 private static final String DIR_PATH =Environment.getExternalStorageDirectory()+ "/photo"; private static final String IMG_PATH =Environment.getExternalStorageDirectory()+ "/photo/img.png"
2015-06-13 17:10:34
529
原创 一个递归实例
对于长度为5位的一个01串,每一位都可能是0或1,一共有32种可能。它们的前几个是:0000000001000100001100100请按从小到大的顺序输出这32种01串。想了一下题目可以使用递归来做,自己对递归也不太熟悉,就用这个来练练手好了。import java.util.Arrays;public class OutputString {
2015-04-09 19:19:25
412
universal-image-loader-1.9.2
2015-08-31
GifView.jar
2015-08-31
SystemBarTint SystemBarTintManager
2015-06-19
实现透明状态栏的SystemBarTintManager类
2015-06-19
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人