码迷,mamicode.com
首页 >  
搜索关键字:sample    ( 5142个结果
一个简单的android自定义view(Switch Button for api < 14)
1.编写主类 package com.sample.button; import android.content.Context; import android.content.res.TypedArray; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import and...
分类:移动开发   时间:2014-11-27 16:32:55    阅读次数:215
Eclipse下用NDK编译生成so文件
我们在安装环境的时候安装了NDK,可以在eclipse下直接生成so文件。NDK的压缩包里面自带了一些sample工程,NDK的文件直接解压到某个目录下即可。 第一次生成so文件的时候,我们先使用NDK的sample下的hello-jni的例子。 1、启动eclipse,通过Create project  from existing source,选择hello-jni的目录,按默认选...
分类:系统相关   时间:2014-11-27 12:45:49    阅读次数:170
Can not find the tag library descriptor for "http://www.springframework.org/tags"
1.Download the Spring dependency jar2.Place it to the lib folder path is /WEB-INF/lib/spring.jar3.Then open the web.xml and the sample code is:/WEB-IN...
分类:编程语言   时间:2014-11-27 12:18:22    阅读次数:1170
Shell | grep with n following lines
grep -A 10 'foo' sample.txt? dex-method-counts git:(master) ./dex-method-counts ~/Downloads/n.apk | grep -A 10 'hui' hui: 304 ...
分类:Windows程序   时间:2014-11-26 18:01:41    阅读次数:177
random模块的简单使用
1)随机挑选和排序random.choice(seq)#从序列的元素中随机挑选一个元素,比如random.choice(range(10)),从0到9中随机挑选一个整数。>>>printrandom.choice(range(10)) 7random.sample(seq,k)#从序列中随机挑选k个元素>>>printrandom.sample(range(100),10) [..
分类:其他好文   时间:2014-11-25 18:48:56    阅读次数:298
http请求和http响应详细解析
HTTP请求格式当浏览器向Web服务器发出请求时,它向服务器传递了一个数据块,也就是请求信息,HTTP请求信息由3部分组成:l请求方法URI协议/版本l请求头(Request Header)l请求正文下面是一个HTTP请求的例子:GET/sample.jspHTTP/1.1Accept:image/...
分类:Web程序   时间:2014-11-25 12:26:22    阅读次数:247
[OC Foundation框架 - 2] NSString 的创建
A. 不可变字符串 1 void stringCreate() 2 { 3 //Don't need to release memory by this way 4 NSString *str1 = @"String Sample"; 5 6 NSString *st...
分类:其他好文   时间:2014-11-24 20:34:14    阅读次数:175
linux下安装zookeeper(非集群)
首先下载zookeeper的最新安装包,并解压、copy配置文件:$ sudo tar xzvf zookeeper-3.4.6.tar.gz$ cd zookeeper-3.4.6$ sudo cp conf/zoo_sample.cfg conf/zoo.cfg下一步,打开配置文件zoo.cf....
分类:系统相关   时间:2014-11-24 11:42:35    阅读次数:209
单词翻转
Description 输入一个句子(一行),将句子中的每一个单词翻转后输出 Input 输入有多行,每行不超过500个字符。单词之间以空格、逗号、双引号、分号、句号隔开。 Output 翻转每一个单词后的字符串 Sample Input hello world ab cd ef Sample Output olleh...
分类:其他好文   时间:2014-11-24 10:14:37    阅读次数:203
去掉双斜杠注释
Description 将C程序代码中的双斜杠注释去掉。 Input 输入数据中含有一些符合C++语法的代码行。需要说明的是,为了方便编程,规定双斜杠注释内容不含有双引号,源程序中没空行。 Output 输出不含有双斜杠注释的C++代码,除了注释代码之外,原语句行格式不变。 Sample Input //==...
分类:其他好文   时间:2014-11-24 10:14:01    阅读次数:173
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!