public static class Extensions{public static
async Task ForEachAsync(this IEnumerable collection, Func> body, IObserver
observer = null){foreach (var ...
分类:
其他好文 时间:
2014-05-23 10:55:36
阅读次数:
213
我们可以在很多应用中都能看到按两次返回键退出 , 其实这个功能实现很容易, 下面就是实现的代码
, 把它放到你的程序中你的程序就能按两次返回键退出啦, 这个功能是为了避免误点而把程序退出了 ,给你的程序也加上这个简单实用的功能把 :package
com.xuchao.test;import and...
分类:
移动开发 时间:
2014-05-23 10:48:18
阅读次数:
263
#include
#include
struct test
{
char name[20];
void (*func)(char *);
};
void tttfunc(char *name)
{
printf("current is %d\n",__LINE__);
printf("%s\n",name);
}
int main()
{
struct test ttt=
{
.n...
分类:
系统相关 时间:
2014-05-22 11:25:09
阅读次数:
380
Primes
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 3204
Accepted: 1245
Description
A pretty straight forward task, calculate the number of primes b...
分类:
其他好文 时间:
2014-05-22 09:02:28
阅读次数:
517
1.在工程下新建 jni/libs 文件夹 , jni 是和原来的libs 同级 ,将所有的.so文件放入 新建的libs文件下
2.在build.gradle 文件中新增以下内容到android{ } 下
task copyNativeLibs(type: Copy) {
from(new File(project(':HealthCare'...
分类:
移动开发 时间:
2014-05-22 08:50:52
阅读次数:
381
上联:no zuo no die why you try
下联:no try no high give me five
横批: let it go。
坑爹bug:
错误写法:
0 } ">true (最后一个大括号后多出一个空格,代码啥都不会输出)
正确写法: 0 }">true 正确写法 输出结果: true...
分类:
Web程序 时间:
2014-05-22 07:42:52
阅读次数:
355
起初照着官方文档配,一直出错,貌似官方的文档时错的,查了很多资料,综合整理了一个可行的方案,如下:
0.1包结构
test.demo
test.domain //实体类
test.util
//工具类
0.2导如的jar包
hibernate-4.3.5的required包中的所有
optional包中的c3p0中的所有
下载slf4j,导入slf4j-api.jar...
分类:
系统相关 时间:
2014-05-22 07:35:47
阅读次数:
400
mysql 自定义存储过程和触发器
--存储过程示范
DROP PROCEDURE IF EXISTS PRO_TEST;
CREATE PROCEDURE PRO_TEST(IN NUM_IN INT,OUT NUM_OUT INT,INOUT NUM_INOUT)
BEGIN
//DO ANYTHING YOU WANT
END;
参数解释:
in : 就是输入参数,输...
分类:
数据库 时间:
2014-05-22 06:42:40
阅读次数:
345
使用AsyncTask类遵守的准则:1Task的实例必须在UIthread中创建;2Execute方法必须在UIthread中调用;3不要手动的调用onPfreexecute(),onPostExecute(result)Doinbackground(params…),onProgressupdate(progress…)这几个方法;4该task只能被执行一次,否则多次调用时将会出现..
分类:
其他好文 时间:
2014-05-20 20:50:16
阅读次数:
469
Problem Description
As we know, Big Number is always troublesome. But it's really important in our ACM. And today, your task is to write a program to calculate A mod B.
To make the problem easie...
分类:
其他好文 时间:
2014-05-20 14:42:07
阅读次数:
324