背景 代码 先上布局文件:
这里没有TextView,我最后是将路径以System.out.println方式输出的。初始化:button =
(Button)findViewById(R.id.button); pic = (ImageView) findViewByI...
分类:
移动开发 时间:
2014-05-17 01:44:20
阅读次数:
749
public class BubbleSort{ public static void
main(String[] args){ int[] sortArray = new int[]{5,7,4,2,9,8,3,6};
System.out.println("before sorting ,t.....
分类:
编程语言 时间:
2014-05-13 19:45:04
阅读次数:
366
l and dished out an assist in the Blackhawks' 5-3 win over the Nashville Predators.Shaw said just playing with the Blackhawks was enough motivation for him."Positive,
I'm playing in the NHL," Shaw s...
分类:
其他好文 时间:
2014-05-13 13:46:10
阅读次数:
453
Android开发中我们会经常遇到图片过多或操作不当造成Out
of Memory异常,有时虽然是解决了这个问题但却会影响程序的运行效率,例如:当用户在快速滑动滚动条的过程中,我们程序在仍在艰难的加载服务器端的图片,这样给用户造成了极不好的体验。其实网络上关于图片的异步加载和缓存的讲解很多,但是其实,写一个这方面的程序还是比较麻烦的,要考虑多线程,缓存,内存溢出等很多方面,针对这一广大开发者都...
分类:
移动开发 时间:
2014-05-13 13:36:52
阅读次数:
359
//读取本地图片写到jsp页面Filefile=newFile("D:/parking/A区12号.jpg");ServletOutputStreamout=null;InputStreamin=null;try{in=newFileInputStream(file);response().setContentType("multipart/form-data");inttempbyte;out=response().getOutputStream();while((tempbyte=..
分类:
Web程序 时间:
2014-05-13 13:15:20
阅读次数:
305
众所周知,C++中对堆内存的申请与释放完全由用户来控制,这就造成用户在使用的时候经常造成内存泄漏、野指针、重复释放等常见的挂掉问题,所以我们有必要提供一套机制,使得用户只需申请相应的内存,不用管释放的问题,其实这属于著名的RAII(Resource
Acquisition Is Initialization)
技术 。在C++中这种技术称作“智能指针”,C++中的智能指针技术越来越受到广泛应...
分类:
编程语言 时间:
2014-05-13 11:37:49
阅读次数:
358
一、基本概念:
Resource:Ambari把可以被管理的资源的抽象为一个Resource实例,资源可以包括服务、组件、主机节点等,一个resource实例中包含了一系列该资源的属性;
Property:服务组件的指标名称;
ResourceProvider和PropertyProvider分别对应Resource和Property的提供方,获取指标需要先获取Resource,然后获取Property对应的metric;
Query:Query是Resource的内部对象,代表了对该资源的操作;
Requ...
分类:
其他好文 时间:
2014-05-13 09:01:34
阅读次数:
293
lk@lk-virtual-machine:~/hadoop-1.0.1/bin$ ./hadoop dfs -rmr output
Deleted hdfs://localhost:9000/user/lk/output
lk@lk-virtual-machine:~/hadoop-1.0.1/bin$ ./hadoop jar ~/mytopk.jar top.Top input out...
分类:
其他好文 时间:
2014-05-13 06:53:12
阅读次数:
448
一、@Resource注解原理
@Resource可以标注在字段或属性的setter方法上
1. 如果指定了name属性, 那么就按name属性的名称装配;
2. 如果没有指定name属性, 那就按照默认的名称查找依赖对象;
3. 如果按默认名称查找不到依赖对象, 那么@Resource注解就会回退到按类型装配;...
分类:
编程语言 时间:
2014-05-13 06:44:02
阅读次数:
565
显示数据库中的存储过程__转
It's no easy trick to see stored procedures in a database programmatically with a scripting language like ASP. If you're using MS Access, you're out of luck. Access provides no way to ...
分类:
数据库 时间:
2014-05-12 22:43:25
阅读次数:
541