有时候我们需要获取当前系统的时间,如果小时小于10的话,获取小时会出现空格的情况:c:\>time
当前时间: 8:52:38.05
c:\>echo %time:~0,2%
8 ------这个8前面是有空格的c:\>如何去掉空格让时间正确的显示呢?其实只需要将空格替换成0就可以了。c:\>set h=%time:~0,2%c:\>echo %h: =0% -----这里的‘=’就是‘...
分类:
其他 时间:
2015-03-24 13:11:37
收藏:
0 评论:
0 赞:
0 阅读:
337
当LIstView加载多张图片时使用Handler+Runnable有点不现实,可以用谷歌的AsyncTask,另外,如果所需加载的图片不需要很精细的控制的话也可以采用AsyncTask,还有就是Listview加载的图片将其存入缓存中,暂且没写将其存在sd卡中,如果每次刷新Listview都要加载图片那么用户体验和程序的性能,下面附上代码:
SingleImageTaskUtil.java单个...
分类:
其他 时间:
2015-03-24 13:11:27
收藏:
0 评论:
0 赞:
0 阅读:
251
1、form头部信息的自动输出函数(view)
'email', 'id' => 'myform');
echo form_open('email/send', $attributes);
//上面一行代码输出:
//
/*
* form_open_multipart()
* 函数...
分类:
其他 时间:
2015-03-24 13:11:10
收藏:
0 评论:
0 赞:
0 阅读:
260
当我们最开始学习java的时候,老师会告诉我们字符串的比较需要用equals();
真的是这样的吗?
我们看看下面的例子
public class TestString
{
public static void main(String[] args)
{
String a="ab1";
String b="ab1";
Strin...
分类:
其他 时间:
2015-03-24 13:10:37
收藏:
0 评论:
0 赞:
0 阅读:
242
网络请求部分分析
关于volley的网络请求部分可以看博客:http://www.cnblogs.com/bvin/p/3291611.html
网络请求中有几个转换解析请求获取响应结果的地方:
1.HttpStack接口的performRequest()方法
public HttpResponse performRequest(Request requ...
分类:
其他 时间:
2015-03-24 13:10:17
收藏:
0 评论:
0 赞:
0 阅读:
330
编译keepalived时报错
Java代码
configure: error: !!! OpenSSL is not properly installed on your system. !!! !!! Can not include OpenSSL headers files. !!!
configure: error:
!!! OpenSSL is...
分类:
其他 时间:
2015-03-24 13:10:07
收藏:
0 评论:
0 赞:
0 阅读:
820
#include
using namespace std;
bool verify(int A[],int length)
{
if(A==NULL||length<=0)
return false;
int root=A[length-1];
int i=0;
for(;iA[root])
break;
}
int j=i...
分类:
其他 时间:
2015-03-24 13:08:37
收藏:
0 评论:
0 赞:
0 阅读:
148
引言
UNIX 体系结构
内核、系统调用、{公用函数库、shell、应用程序}
内核:从严格意义上说,可将操作系统定义为一种软件,它控制计算机硬件资源,提供程序运行环境。(相对较小,位于环境的核心)
系统调用:内核的接口。
公用函数库构建在系统调用之上,应用程序既可使用公用函数库,也可使用系统调用。
shell 是一个特殊的应用程序,为运行其他应用程序提供了一个接口。
广义上说,...
分类:
其他 时间:
2015-03-24 13:08:36
收藏:
0 评论:
0 赞:
0 阅读:
222
git提交代码文件时怎么过滤掉某个文件夹
[git 创建 .gitignore 文件过滤规则及注意事项]
[Git 过滤文件,控制上传
]
Note:
1. 工程目录下找到.git/info/exclude,把要排除的文件写进去
e.g.
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that...
分类:
其他 时间:
2015-03-24 13:08:35
收藏:
0 评论:
0 赞:
0 阅读:
253
报表数据源计算中经常会使用到集合运算,SQL对集合运算的支持使得大部分简单的集合运算都能轻松完成。但是,当集合运算比较复杂,需要使用存储过程完成时,由于存储过程对集合运算的支持不够,也无法使用中间结果导致这类运算实现起来非常困难。
像http://bbs.csdn.net/topics/390902711中提到的问题,就是一个比较典型的复杂集合运算问题,这类计算往往都是为前台报表...
分类:
其他 时间:
2015-03-24 13:08:08
收藏:
0 评论:
0 赞:
0 阅读:
134
1、
'ndk-build' Overview
I. Usage:
The Android NDK r4 introduced a new tiny shell script, named 'ndk-build', to simplify building machine code.
The script is located at the top-level directory o...
分类:
其他 时间:
2015-03-24 13:07:57
收藏:
0 评论:
0 赞:
0 阅读:
199
FastDFS-Nginx扩展模块源码分析
1. 背景
在大多数业务场景中,往往需要为FastDFS存储的文件提供http下载服务,而尽管FastDFS在其storage及tracker都内置了http服务, 但性能表现却不尽如人意;
作者余庆在后来的版本中增加了基于当前主流web服务器的扩展模块(包括nginx/apache),其用意在于利用web服务器直接对本机storage数据...
分类:
其他 时间:
2015-03-24 13:07:27
收藏:
0 评论:
0 赞:
0 阅读:
261
http://acm.hdu.edu.cn/showproblem.php?pid=4280
Problem Description
In the vast waters far far away, there are many islands. People are living on the islands, and all the transport among the ...
分类:
其他 时间:
2015-03-24 13:07:17
收藏:
0 评论:
0 赞:
0 阅读:
244
void Traverse( IplImage* src )
{
if ( src == NULL )
{
return ;
}
const int width = src->width;
const int height = src->height;
const int widthSte...
分类:
其他 时间:
2015-03-24 13:06:47
收藏:
0 评论:
0 赞:
0 阅读:
133
今天看了一篇文章,感觉不错,就决定翻译一下。原文:http://www.artima.com/articles/io_design_patterns2.html
译文:
比较两个高性能的 I/O 设计模式
反应器和前摄器: 两个 I/O 多路复用的方法
总体上来讲, I/O 多路复用机制依赖于一个事件多路解调器,多路解调器是一个把一定数量的源的IO事件分发到合适的读写事件处理器(handl...
分类:
其他 时间:
2015-03-24 13:06:27
收藏:
0 评论:
0 赞:
0 阅读:
244
为了方便地使用GCD,苹果提供了一些方法方便我们将block放在主线程或后台线程执行,或者延后执行。使用的例子如下所示:
// 后台执行:
dispatch_async(dispatch_get_global_queue(0, 0), ^{
// something
});
// 主线程执行:
di...
分类:
其他 时间:
2015-03-24 13:06:07
收藏:
0 评论:
0 赞:
0 阅读:
201
Problem Description
In the mysterious forest, there is a group of Magi. Most of them like to eat human beings, so they are called “The Ogre Magi”, but there is an special one whose favorite food is...
分类:
其他 时间:
2015-03-24 13:05:47
收藏:
0 评论:
0 赞:
0 阅读:
138
编写一个函数,作用是把一个 char 组成的字符串循环
右移 n 个。
比如原来是“abcdefghi”
如果 n=2,移位后应该是“hiabcdefgh”
左移n个
比如原来是“abcdefghi”
如果 n=2,移位后应该是“cdefghiab”
函数头是这样的:
//pStr 是指向以'\0'结尾的字符串的指针
//steps 是要求移动的 n ...
分类:
其他 时间:
2015-03-24 13:05:29
收藏:
0 评论:
0 赞:
0 阅读:
320
古人云,三十而立,说的是男人到了30岁时,往往是个定型的时候,你要这样下去吗,还是干点什么事出来呢,我相信每个30岁或者过了30岁的男人都有想要创业,想要干点事的冲动,当然有这种冲动是好事,但要考虑清楚,考虑周全,你是否真的想好了要干点什么,干的事情是否真的有持续发展的空间!之前看了不少关于程序员创...
分类:
其他 时间:
2015-03-24 13:03:48
收藏:
0 评论:
0 赞:
0 阅读:
169
题目链接:http://poj.org/problem?id=2449"Good man never makes girls wait or breaks an appointment!" said the mandarin duck father. Softly touching his litt...
分类:
其他 时间:
2015-03-24 13:03:17
收藏:
0 评论:
0 赞:
0 阅读:
298