现在位置: 首页 > conjoint发表的所有文章
  • 09月
  • 12日
综合 ⁄ 共 2599字 评论关闭
转载自http://blog.csdn.net/zengyangtech/article/details/7019350      由于做Android在底层有库的时候需要交叉编译环境,c代码需要用ndk-build来进行编译,而java代码则需要用Android sdk编译。之前由于对eclipse ide不太熟悉,所以往往编译的时候都是在记事本里写好c代码,然后用cygwin搭建ndk-build环境,用ndk-build来编译出相关的so之后再用eclipse里去编译java程序,从而使用该so。       其实并不用这么复杂,利用eclipse完全可以达到编译so的目的         点击project->builders->new->Program 然后......
阅读全文
  • 09月
  • 03日
综合 ⁄ 共 4561字 评论关闭
这几天一直在修改twigee的源代码,其中一个要加入的功能是常驻Notification栏,以前写的时候只能出现 在“通知”这一组中,想把它放在“正在运行”组中却不知道怎么放,查了下官方文档,找到了方法,在notification的flags字段中加一下 “FLAG_ONGOING_EVENT”就可以了。同时我也把Notification的使用方法给总结了一下。详见下文: (1)、使用系统定义的Notification 以下是使用示例代码: //创建一个NotificationManager的引用 String ns = Context.NOTIFICATION_SERVICE; NotificationManager mNotificationManager = (NotificationMana......
阅读全文
  • 05月
  • 25日
综合 ⁄ 共 635字 评论关闭
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {     if (!dragEnable) {         return;     }     UITouch *touch = [touches anyObject];          beginPoint = [touch locationInView:self];      } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {     if (!dragEnable) {         return;     }     UITouch *touch = [touches anyObject];          CGPoint nowPoint = [touch locationInView:self];          float offsetX = nowPoint.x - beginPoint.x;     float offset......
阅读全文
  • 05月
  • 02日
综合 ⁄ 共 787字 评论关闭
不妨将某条桥的左断点设成x  ,右端点设成y 。 先将这些桥按照x 排序, x相同时按照y 排序。 这样的话和数星星那题就很像了。  对于某一条桥,我们只需要考虑它之前的y 坐标比它大的的桥的个数, 这样用逆序数就行 ,即可以用i - sum(qiao[i].y) 。 即可。 AC Memory:3300 KB  Time : 391 ms 代码: #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; int n,m,k; int c[1005]; struct way { int x,y; } w[1005*1005]; bool cmp(way a,way b)......
阅读全文
  • 04月
  • 18日
综合 ⁄ 共 2554字 评论关闭
jqGrid 是一个用来显示网格数据的jQuery插件,通过使用jqGrid可以轻松实现前端页面与后台数据的ajax异步通信。文档比较全面,其官方网址为:http://www.trirand.com。 一、jqGrid特性: 基于jquery UI主题,开发者可以根据客户要求更换不同的主题。 兼容目前所有流行的web浏览器。 Ajax分页,可以控制每页显示的记录数。 支持XML,JSON,数组形式的数据源。 提供丰富的选项配置及方法事件接口。 支持表格排序,支持拖动列、隐藏列。 支持滚动加载数据。 支持实时编辑保存数据内容。 支持子表格及树形表格。 支持多语言。 ......
阅读全文
  • 04月
  • 09日
综合 ⁄ 共 3313字 评论关闭
  可以通过条件HTML注释对不同的浏览器显示不同的内容,但是只兼容于IE浏览器5.0以上。 普通注释 <!--[if IE 6]> <p>Welcome to Internet Explorer 6.</p> <![endif]--> 含有脚本的注释 <!--[if IE 5]> <SCRIPT LANGUAGE="Javascript"> alert("Congratulations. You are running IE5 or later!"); </SCRIPT> <P>Thank you for closing the message box.</P> <![endif]--> 1. <!--[if !IE]><!--> 除IE外都可识别 <!--<![endif]--> 2. &l......
阅读全文
  • 02月
  • 09日
综合 ⁄ 共 3089字 评论关闭
VC6下安装与配置OpenCV1.0 本手册适应 OpenCV 1.0 安装。 目录 [隐藏] 1安装Visual C++ 6.0 2安装OpenCV 3配置Windows环境变量 4配置Visual C++ 6.0 4.1全局设置 4.2项目设置 [编辑] 安装Visual C++ 6.0 注:截止2010年4月4日,还没有在VC6.0下成功使用opencv2.0的案例。采用VC6.0的用户请采用opencv1.0版本 [编辑] 安装OpenCV 从http://www.opencv.org.cn 下载OpenCV安装程序。假如要将OpenCV安装到C:\Program Files\OpenCV。(下面附图为OpenCV 1.0rc1的安装界面,OpenCV 1.0安装界面与此基本一致。)在安装时选......
阅读全文
  • 02月
  • 08日
综合 ⁄ 共 6412字 评论关闭
/stdfx.h文件 //Ring0环的程序 //测试环境VS2005 #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. #endif #ifdef __cplusplus extern "C" { #endif #include <ntddk.h> #include <ntddstor.h> #include <mountdev.h> #include <ntddvol.h> #ifdef __cplusplus } #endif </pre><pre name="code" class="cpp">......
阅读全文
  • 01月
  • 22日
综合 ⁄ 共 3608字 评论关闭
不出意外的话,打完这场就变成Expert啦.....b( ̄▽ ̄)d 掉了90sad ---------------------------------------------------------------------------------------------------------------------- A. Expression A B C 之间添加‘+’或‘-’,还可以添加括号, 求最大值 暴力。。。 #include <cstdio> #include <cstring> #include <algorithm> using namespace std; int A[100]; int main() { int a, b, c; scanf("%d%d%d", &a, &b, &c); A[0] = a + b + c; A[1] = a * b + c; ......
阅读全文
  • 01月
  • 12日
综合 ⁄ 共 2414字 评论关闭
 Uniform Generator  Computer simulations often require random numbers. One way to generate pseudo-random numbers is via a function of the form where ``  " is the modulus operator. Such a function will generate pseudo-random numbers (seed) between 0 and MOD-1. One problem with functions of this form is that they will always generate the same pattern over and over. In order to minimize this effect, selecting the STEP and MOD values carefully can result in a uniform distribution of all......
阅读全文
  • 12月
  • 20日
综合 ⁄ 共 2030字 评论关闭
中断句柄只是中断处理的第一部分,因为下面一些限制,必须要有另外一部分来完整的处理中断:     1.中断句柄是异步运行的,只要发生中断就会进入中断句柄,而中断的发生是异步的,也就是说随时可以发生。因此中断句柄可能会中断一些正在执行的重要代码,包括另外一个中断句柄。     2.中断句柄运行时需要关中断,最好情况是禁止了当前的中断级(未设置SA_INTERRUPT),最坏的情况是所有的中断被中断(设置SA_INTERRUPT)。当然,关中断只是运行中断句柄时必要的步骤,适当的时候还是需要打开的。同样这也决定了中断句柄要尽快结束。 ......
阅读全文
  • 11月
  • 12日
综合 ⁄ 共 1011字 评论关闭
最近遇到一个很让人头疼的问题,使用viewpager动态添加页面或者删除页面时出现了问题(java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first),在stackoverflow上找到了解决办法。(http://stackoverflow.com/questions/22936886/java-lang-illegalstateexception-while-using-viewpager-in-android) 原文是: the problem is that in your adapters method instantiateItem you call container.addView(v); but every View can have only on......
阅读全文