风言枫语  
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 235 下一页

2013年11月1日

摘要: 题目就是求多变形内部一点。 使得到任意边距离中的最小值最大。那么我们想一下,可以发现其实求是看一个圆是否能放进这个多边形中。那么我们就二分这个半径r,然后将多边形的每条边都往内退r距离。求半平面交看是否存在解即可#include #include #include #include #include #include #include #include #include #include #include #define MAXN 111111#define MAXM 211111#define PI acos(-1.0)#define eps 1e-8#define INF 1000000. 阅读全文
posted @ 2013-11-01 18:37 风言枫语 阅读(161) 评论(0) 推荐(0) 编辑
 
摘要: 典型的应用时鼠标滚轮滚动控制图片或者文字的大小,例如此类的转动鼠标滚轮实现缩放等等交互效果中,会用到 Mousewheel 事件。在大多数浏览器(IE6, IE7, IE8, Opera 10+, Safari 5+)中,都提供了“mousewheel”事件。滚轮事件的兼容性差异有些不拘一格,不是以往的IE8-派和其他派,而是FireFox派和其他派,杯具的是 Firefox 3.5+ 却不支持此事件,不过庆幸 Firefox 3.5+ 中提供了另外一个等同的事件:”DOMMouseScroll” ,兼容代码如下: // isFirefox 是伪代码,大家可以自行实现 mousew... 阅读全文
posted @ 2013-11-01 18:36 风言枫语 阅读(467) 评论(0) 推荐(0) 编辑
 
摘要: 根据日期切换图片KFX 阅读全文
posted @ 2013-11-01 18:34 风言枫语 阅读(236) 评论(0) 推荐(0) 编辑
 
摘要: Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will use the integers 0, 1, and 2 to represent the color red, white, and blue respectively.Note: You are not suppose to use th 阅读全文
posted @ 2013-11-01 18:32 风言枫语 阅读(166) 评论(0) 推荐(0) 编辑
 
摘要: 填数字游戏 时间限制(普通/Java):1000MS/10000MS 运行内存限制:65536KByte 描述有个小游戏,让你填写以下方框,要求:a1+a2+a3+M=b1+b2+b3+M=c1+c2+c3+M其中a1,a2, a3 ,b1, b2, b3, c1, c2, c3, M是1-10中的一个数,并且要求a1、a2、a3递增有序,b1、b2、b3递增有序、c1、c2、c3递增有序,a1、b1、c1递增有序。 输入无 输出输出的格式如下:M a1 a2 a3 b1 b2 b3 c1 c2 c3 注意,请按行优先的规则输出所有符合条件的数列,即:M值小的先输出,如果M值相等,那... 阅读全文
posted @ 2013-11-01 18:30 风言枫语 阅读(307) 评论(0) 推荐(0) 编辑
 
摘要: getWidth(): View在设定好布局后整个View的宽度。 getMeasuredWidth(): 对View上的内容进行测量后得到的View内容占据的宽度,前提是你必须在父布局的onLayout()方法或者此View的onDraw()方法里调用measure(0,0);(measure 参数的值你可以自己定义),否则你得到的结果和getWidth()得到的结果一样 阅读全文
posted @ 2013-11-01 18:27 风言枫语 阅读(449) 评论(0) 推荐(0) 编辑
 
摘要: 解决 win7 注册com组件失败问题运行:regsvr32 xxx.ocx 提示:模块 "xxx.ocx" 已加载,但对调用 dllregisterserver 的调用失败,错误代码 0x80004005。问题分析:由于 win7 权限导致解决方案: 1.开始->在搜索框中输入‘cmd’->搜出的 cmd.exe 文件上点击右键 ,选择‘已管理员身份运行’: 2.再次执行:regsvr32 xxx.ocx 命令,如指定完整路径需要用 上引号 "" 括起,"d:/组件/xxx.ocx" 3.提示:注册成功! 阅读全文
posted @ 2013-11-01 18:26 风言枫语 阅读(472) 评论(0) 推荐(0) 编辑
 
摘要: Chinese translated version of Documentation/PCI/pci-iov-howto.txt If you have any comment or update to the content, please contact the original document maintainer directly. However, if you have a problem communicating in English you can also ask the Chinese maintainer for help. Contact the C... 阅读全文
posted @ 2013-11-01 18:22 风言枫语 阅读(643) 评论(0) 推荐(0) 编辑
 
摘要: 近期在更改程序架构的时候,用引用Library的方式实现程序的共享化过程中发现R.id.xx的文件不能够在 switch cases 中使用看代码提示,如下信息: As of ADT 14, resource fields cannot be used as switch cases. In other words, the constants are not final in a library project. The reason for this is simple: When multiple library projects are combined, the actual va. 阅读全文
posted @ 2013-11-01 18:20 风言枫语 阅读(387) 评论(0) 推荐(0) 编辑
 
摘要: ScopedModelDrivenInterceptor 该拦截器处于defaultStack第八的位置,其主要功能是从指定的作用域内检索相应的model设置到Action中,该类中有三个相关的属性: scope:从哪里获取model,有两个值,一是request,二是session,默认值为request name:在scope中检索model的key className:model类的名称,也就是该model是什么类型 虽然这三个参数都可以进行设置,但是在defaultStack中struts2并没有为其赋值,所以初始值这三个属性都为null。 下面我们去看一个Scop... 阅读全文
posted @ 2013-11-01 18:19 风言枫语 阅读(210) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 235 下一页