现在位置: 首页 > despise发表的所有文章
  • 08月
  • 28日
综合 ⁄ 共 284字 评论关闭
警告1: ... org.apache.struts2.components.ServletUrlRenderer warn WARNING: No configuration found for the specified action: '/xxx.jsp' in namespace: ''. Form action defaulting to 'action' attribute's literal value. 原因之一:xxx.jsp 里的表单没有设置 action 属性,struts.xml 某 package 下 action 配置缺漏 警告2: 收不到表单提交过来的信息 原因之一:收不到的这些项是 disabled 的
阅读全文
  • 02月
  • 16日
综合 ⁄ 共 3333字 评论关闭
Lightning Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1565    Accepted Submission(s): 515 Problem Description There are N robots standing on the ground (Don't know why. Don't know how). Suddenly the sky turns into gray, and lightning storm comes! Unfortunately, one of the robots is stuck by the lightning! So it becomes overladen. Once a robot becomes overladen, it will spread lightning to the near one. The spreading happens w......
阅读全文
  • 10月
  • 24日
综合 ⁄ 共 1048字 评论关闭
方差分析研究多因素对观测变量影响,通过构造F统计量来判定各个因素的均数间有无统计学上的差异。进行方差分析,需要满足可比性、正态性、以及方差齐性的条件,最关键的地方是F统计量的构造。Ø方差分析的基本原理是设有n个总体,各总体分别服从正态分布,假定各总体方差相等。现从各总体随机抽取样本。透过各总体的样本数据推断n个总体的均值是否相等。 http://blog.renren.com/blog/220869953/706981510?frommyblog http://blog.renren.com/blog/220869953/707270965?frommyblog, 曾粗略地讨论SAS进行方差分析的代码,这里对比......
阅读全文
  • 09月
  • 06日
综合 ⁄ 共 656字 评论关闭
今天写代码遇到了一个问题:有如下几个Activity A - B - C 当 B - A - B 跳转的时候,使用Intent的FLAG_ACTIVITY_CLEAR_TOP会让第一个B和第二个A,destory掉 但是当B - A - C跳转的时候不会调用B和A的destory 其实这个问题以前遇到过,今天遇到的时候又忘记了。查看API文档才发现原因,所以这里记录一下避免下次又忘记了: public static final int FLAG_ACTIVITY_CLEAR_TOP Added in API level 1 If set, and the activity being launched is already running in the current task, then instead of launching a new instanc......
阅读全文
  • 05月
  • 26日
综合 ⁄ 共 1056字 评论关闭
结论:     用OBShapedButton:https://github.com/ole/OBShapedButton 就好了。方法是通过检验点击位置对应图片的alpha通道值决定是否响应(通过PointInseid返回值(返回no则系统认为不在bounds 就不处理了))。缘由:项目中我们会遇到 使用了一张图片作为button的Image或者BackgroudImage 这些图片存在alpha = 0的区域,点击透明区域一样可以触发按钮效果。这不是我们想要的,我们想要的是点击透明区域并不触发此UIcontrol!资料:OBShapedButton:https://github.com/ole/OBShapedButtonMLIgnoreTransparentButton:https://github.......
阅读全文
  • 05月
  • 12日
综合 ⁄ 共 17040字 评论关闭
转载自 http://patmusing.blog.163.com/blog/static/1358349602009113061024796/    C++类中的4个特殊函数 C++类中的4个特殊函数 - 缺省构造函数、拷贝构造函数、拷贝赋值操作符和析构函数 a. C++标准中提到“The default constructor, copy constructor and copy assignment operator, and destructor are special member functions.[Note: The implementation will implicitly declare these member functions for some class types when the program does not explicitly declare them. The implementation will implicit......
阅读全文
  • 05月
  • 11日
综合 ⁄ 共 12132字 评论关闭
Oracle 10g之前,可以使用dbms_job来管理定时任务。 10g之后,Oracle引入dbms_scheduler来替代先前的dbms_job, 在功能方面,它比dbms_job提供了更强大的功能和更灵活的机制/管理。 使用dbms_scheduler创建一个定时任务有两种形式 1)创建1个SCHEDULER来定义计划,1个PROGRAM来定义任务内容, 再创建1个JOB,为这个JOB指定上面的SCHEDULER和PROGRAM。 2)直接创建JOB,在参数里面直接指定计划和任务内容。 要执行DBMS_SCHEDULER需要有CREATE JOB权限。 如果要创建外部操作系统命令的job, 还必须有CREATE EXTERNAL JOB权限。 如果要对......
阅读全文
  • 04月
  • 22日
综合 ⁄ 共 307字 评论关闭
以前调试过SPI,不过好久没用了,最近工作中有遇到了,使用是发现好多都忘了,所以总结下。 SPI(Serial Peripheral Interface 串行外围设备接口),是由Motorola公司开发的一款全双工的串行总线。 SPI主要有四个接口,MOSI(主出从入)、MISO(主入从出)、SCK(时钟信号)、CS(片选信号),在有些芯片上,片选有可能有多个,叫做SS0、SS1等。 这里要特别提到SPI的时钟极性(CPOL)和相位(CPHA),在这里借用一下网上查询到的资料。 以上图片为借用的别人做好的图片,感觉挺不多的。在使用SPI调试控制芯片时,一定要注意SPI的极性需要......
阅读全文
  • 04月
  • 17日
综合 ⁄ 共 3897字 评论关闭
前一篇日志从Checkpoint的角度分析了BLCR的软件架构,没有写最核心的做dump操作的那部分代码,这部分代码完全是在内核态运行的,涉及到进程的各种状态,包括进程的PID/PGID,虚拟内存映射,打开的文件,寄存器的状态,credentials,timers,信号状态等等。 要提一下的是昨天淘宝内核组的炳天大神给我看了一篇LWN上的文章,http://lwn.net/Articles/525675/,这个东西叫CRIU(CheckPoint/Restart in user space),是在用户态实现进程的Checkpoint/Restart,虽然是用户态的CR,但这种事情没有kernel的配合肯定是做不来的,我没有仔细......
阅读全文
  • 04月
  • 08日
综合 ⁄ 共 649字 评论关闭
修改hbase-binding下的pom.xml <dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase-it</artifactId> <version>0.96.1.1-hadoop2</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-common</artifactId> <version>2.2.0</version> </dependency> 遇到个错误: 2014-02-24......
阅读全文
  • 01月
  • 16日
综合 ⁄ 共 583字 评论关闭
import java.io.File; import java.io.IOException; import jxl.SheetSettings; import jxl.Workbook; import jxl.write.WritableSheet; import jxl.write.WritableWorkbook; import jxl.write.WriteException; public class TestPassword ...{   public static void main(String[] args) throws IOException, WriteException ...{     WritableWorkbook wwb = Workbook.createWorkbook(new File("d:/test.xls"));     WritableSheet ws = wwb.createSheet("Test Sheet 1", 0);     SheetSettings ss = ws.getSettings();     ss.s......
阅读全文
  • 12月
  • 17日
综合 ⁄ 共 4567字 评论关闭
  IAT表详解 http://blog.163.com/ljm1113@126/blog/static/57984452201201485318443/   IAT表详解 IAT的全称是Import Address Table。 对于每一个引入的可执行文件(例如dll),有一个镜像引入描述符(IMAGE_IMPORT_DESCRIPTOR)。 typedef struct _IMAGE_IMPORT_DESCRIPTOR {      union {           DWORD Characteristics;         // 0 for terminating null import descriptor           DWORD OriginalFirstThunk;   // RVA to original unbound IAT (PIMAGE_THUNK_DATA)      };      DWORD TimeDateStamp;      ......
阅读全文