- 博客(34)
- 资源 (9)
- 收藏
- 关注
原创 [Google EarlGrey] 0x02 API 简介
Google EarlGrey学习笔记: [Google EarlGrey] 0x00 安装及运行 [Google EarlGrey] 0x01 第一个测试用例 [Google EarlGrey] 0x02 API简介APIEarlGrey主要包括三部分APIs交互相关的编程接口(Interaction APIs)同步相关的编程接口(Synchronization APIs)
2016-03-01 23:58:01
2091
原创 [Google EarlGrey] 0x01 第一个测试用例
安装成功EarlGrey后,下面来配置并编写第一个测试用例。安装步骤见[Google EarlGrey] 0x00 安装及运行测试配置对被测应用安装完成EarlGrey支持后,确保Test Target设置正确能够启动相应的被测应用。1 General标签 * Host Application应该被设置成被测应用 2 Build Settings标签 * Test Host指向被测应用
2016-02-23 17:37:48
1141
原创 [Google EarlGrey] 0x00 安装及运行
EarlGrey简介EarlGrey 是一个面向iOS apps源码的用户界面测试框架,让使用者可以编写清楚且简洁的测试。Google 已经在在其少数iOS应用上使用此框架进行功能测试,例如YouTube,日历,Photos,翻译,Play Music等在内的Google应用。EarlGrey提供的主要特性如下:强大的内建同步机制:使用EarlGrey构建测试用例后,在UI交互前,程序会自动等待动
2016-02-23 14:54:08
2258
原创 [Raspberry Pi] 1 无线网卡安装
[Raspberry Pi] 1 无线网卡安装1 硬件EDUP EP-N8508GS 2 配置参考http://blog.youkuaiyun.com/cugbabybear/article/details/23551007基本一致,按照以上文章配置,会遇到pi@raspberrypi ~ $ sudo ifup wlan0ifup: interface wlan0 alr
2015-01-09 01:42:25
684
原创 [Raspberry Pi] 0 安装和启动
[Raspberry Pi] 0 安装和启动1 软件和硬件Raspberry Pi Model B+充电器 DC5.0V 2000mB(USB)microusb usb 线一根网线一根路由器电脑(Win7)2 SD制作过程基本按照《爱上 Raspberry Pi》的附录AWindows 烧录SD卡首先下载并安装Win32DiskImager,安装
2015-01-09 01:19:25
818
原创 [LeetCode OJ] Reverse Words in a String
题目:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".
2014-06-04 17:04:55
513
原创 shell 使用管道符时变量的问题
文件如下:test12345使用命令wc -l test输出结果为5 test使用管道符计算文件行数脚本如下:#!/bin/shlinenum=0cat test | while read linedo echo "line content: $line" ((linenum+=1))donee
2014-03-27 14:42:55
4838
1
原创 jq Linux下命令行json解析工具
jq官网 : http://stedolan.github.io/jq/下载binary之后可以直接调用,详细安装见:http://stedolan.github.io/jq/download/简单使用方式:1,json文件友好显示cat jsonfile | path_to_jq/jq .2,获取json某key的valuecat jsonfile | p
2014-03-25 17:08:57
13708
原创 cci-Q3.2 设计栈可以返回最小值
原文:How would you design a stack which, in addition to push and pop, also has a function min which returns the minimum element? Push, pop and min should all operate in O(1) time.译文:实现一个栈,除了
2013-07-30 16:53:34
1141
原创 cci-Q3.1 一个数组实现三个栈
原文:Describe how you could use a single array to implement three stacks.译文:你如何只用一个数组实现三个栈?根据栈的大小,申请一个3*stacksize的数组。public class stack3 { int[] buffer = null; int size = 0;
2013-07-24 14:05:13
601
原创 cci-Q2.5 寻找环形链表的起点
原文:Given a circular linked list, implement an algorithm which returns node at the beginning of the loop.DEFINITIONCircular linked list: A (corrupt) linked list in which a node’s next point
2013-07-22 18:09:33
765
原创 cci-Q2.4 链表的值相加
原文:You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in reverse order, such that the 1’s digit is at the head of the list. Write a f
2013-07-19 16:04:38
631
原创 cci-Q2.3 只给出中间节点,删除链表中间节点
原文:Implement an algorithm to delete a node in the middle of a single linked list, given only access to that node.EXAMPLEInput: the node ‘c’ from the linked list a->b->c->d->e Result: nothi
2013-07-12 15:32:36
748
原创 cci-Q2.2 链表倒数第n节点值
原文:Implement an algorithm to find the nth to last element of a singly linked list.译文:实现一个算法从一个单链表中返回倒数第n个元素。使用两个指针,first和second,当second.next==null时,first为倒数第(second-first)个节点 pub
2013-07-12 11:14:56
978
原创 cci-Q2.1 未排序链表去重
原文:Write code to remove duplicates from an unsorted linked list.FOLLOW UPHow would you solve this problem if a temporary buffer is not allowed?译文:从一个未排序的链表中移除重复的项进一步地,如果不允许
2013-07-10 17:59:21
1993
原创 cci-Q1.8 调用一次子字符串判断确认s2是否为s1的旋转字符
原文:Assume you have a method isSubstring which checks if one word is a substring of another. Given two strings, s1 and s2, write code to check if s2 is a rotation of s1 using only one call to isSub
2013-07-10 12:18:54
848
原创 cci-Q1.7 二维数组置0
原文:Write an algorithm such that if an element in an MxN matrix is 0, its entire row and column is set to 0.译文:写一个函数处理一个MxN的矩阵,如果矩阵中某个元素为0,那么把它所在的行和列都置为0.不能直接进行遍历置0,因为在遍历的过程中可能遇到之前被置0的元
2013-07-10 11:16:02
1608
原创 cci-Q1.6 矩形90度旋转
原文:Given an image represented by an NxN matrix, where each pixel in the image is 4 bytes, write a method to rotate the image by 90 degrees. Can you do this in place?译文:一张图像表示成NxN的矩阵,图像中每个像
2013-07-09 17:07:44
676
原创 cci-Q1.5 空格替换为%20
原文:Write a method to replace all spaces in a string with ‘%20’.译文:写一个函数,把字符串中所有的空格替换为%20 。将字符串转为字符数组;变量数组找到空格的个数;申请一个新的字符数组,长度为len+2×count public static String replaceSpace(String
2013-07-09 15:30:39
660
原创 cci-Q1.4 判断两个字符串是否为变位词
原文:Write a method to decide if two strings are anagrams or not.译文:写一个函数判断两个字符串是否是变位词。An anagram is a type of word play, the result of rearranging the letters of a word or phrase to pro
2013-07-09 15:01:57
979
原创 cci-Q1.2 C风格字符串反转
原文:Write code to reverse a C-Style String. (C-String means that “abcd” is represented as five characters, including the null character.)译文:写代码翻转一个C风格的字符串。(C风格的意思是"abcd"需要用5个字符来表示,包含末尾的 结束字
2013-07-08 18:28:13
719
原创 cci-Q1.1 判断字符串中字符是否唯一
原文:Implement an algorithm to determine if a string has all unique characters. What if you can not use additional data structures?译文:实现一个算法来判断一个字符串中的字符是否唯一(即没有重复).不能使用额外的数据结构。 (即只使用基本的数据结构)
2013-07-08 17:07:10
1188
原创 Jmeter学习_入门
Jmeter下载地址: http://jmeter.apache.org/download_jmeter.cgiJmeter插件下载地址: https://code.google.com/p/jmeter-plugins/Jmeter安装:Ubuntu: $ sudo apt-get install jmeterMac: $ brew install jmeterWin
2013-05-08 11:33:25
1262
原创 maven官方入门demo,maven in 5 minutes
maven官方入门demo,maven in 5 minutes参考链接:http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html1,确认正确安装jdk,正确安装maven$ java --version$ mvn --version若没有安装,参考 jdk安装 m
2013-01-14 16:33:35
576
原创 ubuntu12.04安装maven3.0.4
ubuntu12.04安装maven3.0.4参考链接:http://maven.apache.org/download.cgi1,确认已经安装jdk,$ java --version2,下载apache-maven-3.0.4-bin.tar.gz下载地址:http://maven.apache.org/download.cgi3,解压压缩
2013-01-14 15:18:12
2176
原创 Ubuntu12.04下安装tomcat7
Ubuntu12.04下安装tomcat71,根据系统的信息下载tomcat7。下载地址:http://tomcat.apache.org/download-70.cgi2,加压并将文件夹移动到想要存放到路径hill@vbubuntu:/usr/share$ tar -xvzf apache-tomcat-7.0.34.tar.gz hill@vbubuntu:/
2013-01-11 21:03:27
643
原创 ubuntu12.04下安装jdk7
ubuntu12.04下安装jdk7ubuntu版本:12.04jdk版本:7u101,下载对应的jdk,下载地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html2,解压文件,然后将解压得到的文件移到至想放置的路径r
2013-01-11 17:16:31
779
原创 Linux下安装C Unit
1,下载地址:http://sourceforge.net/projects/cunit/2,安装步骤(1)bzip2 -d CUnit-2.1-20src.tar.bz2(2)tar -xvf CUnit-2.1-2-src.tar(3)./configure--enable-debug=yes --enable-curses=yes --enable-e
2012-12-01 00:22:51
1072
原创 PHP中全等(===)和相等(==)的区别
PHP是弱类型的语言,例如比较一个整型和一个字符串时,PHP会把字符串强制转化为整型。如图,比较整型0与字符串'0HillChan':如图所示,比较结果为True,说明在字符串被强制转化成整型,然后进行比较。如果使用全等于进行判断,PHP会先判定数据类型,如果不同,直接返回False。结论:1,相等首先将被比较的变量强制转化为比较变量的同一类型,再比数值
2012-07-26 14:00:10
2148
转载 浮点数加减法的运算步骤
1. 浮点加减法的运算步骤 前面已讲到,浮点数经常被写成如下的形式: X = Mx * 2Ex 其中Mx为该浮点数的尾数,一般为绝对值小于1的规格化的二进制小数,机器中多用原码(或补码)形式表示。Ex为该浮点数的阶码,一般为二进制整数,机器中多用移码(或补码)表示,给出的是一个指数的幂,而该指数的底常用2、8或16,我们这里先以2为底作例子进行讨论。 浮
2012-05-14 17:30:39
54169
2
转载 curl 命令详解
curl 命令详解curl是一个利用URL规则在命令行下工作的文件传输工具。它支持文件的上传和下载,所以是综合传输工具,但按传统,习惯称url为下载工具。 一,curl命令参数,有好多我没有用过,也不知道翻译的对不对,如果有误的地方,还请指正。 -a/--append 上传文件时,附加到目标文件 -A/--user-agent 设置用户代理发送给服务器 - anya
2012-05-04 11:35:42
739
原创 浅谈PHP中的变量 zval变量容器 PHP引用计数器
PHP语言有一个特点就是资源共享,这一点在PHP的变量存储方式上也有体现。PHP的变量是一种弱类型,PHP是如何去实现变量的存储呢?引用计数器变量的C语言实现有两个重要的元素,一个是zvalue_value联合体,另一个是zval结构体zvalue_value联合体的定义typedef union _zvalue_value { long lval;
2012-05-03 11:51:41
1092
原创 [转]Visual Studio 2008试用版升级为正式版
简体中文版终于发布了,Microsoft官方提供了90天试用版下载,试用版变正式版方法:先安装试用版,然后在“添加或删除程序”里找到VS2008,点“更改/删除”就会看到一个输入序列号的地方,把下面这个序列号输进去即可: 引用 PYHYP-WXB3B-B2CCM-V9DX9-VDY8T(专业版的序列号)或者也可以在安装前直接修改安装配置文件,这样安装完就直接是正式版,方便刻盘,方法如下:用Ultr
2008-07-07 17:43:00
431
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人