A classic 2D DP problem. A disguise of LCS - actually not very hard to decode: it is about 2 sequences' matching, though with a weight value of each m...
分类:
其他好文 时间:
2014-07-07 19:49:34
阅读次数:
217
今天在编译PDF时发现使用了一下STL中的z数值极限竟然编译不过,return GetRangeConstraint(value ::max(), true);出现如下错误:warning C4003: “max”宏的实参不足error C2589: “(” : “::”右边...
分类:
其他好文 时间:
2014-07-07 18:03:56
阅读次数:
190
R:查看、改变CPU寄存器的内容。r 查看寄存器内容。r [寄存器名字]: value 改变寄存器内容。D:查看内存中的内容。d 段地址:偏移地址,接着使用d命令可列出后续的内容。d 段地址:起始偏移地址 结尾偏移地址E 改写内存中的内容。e 起始地址 数据 数据 数据 。。。e 起始地址 使用提问...
分类:
其他好文 时间:
2014-06-30 12:24:35
阅读次数:
174
先看一段代码
#include
#include
#include
#include
#include
static int count = 0;
void set_timer()
{
struct itimerval itv;
itv.it_value.tv_sec = 3; //timer start after 3 seconds later
itv.it...
分类:
系统相关 时间:
2014-06-30 10:31:41
阅读次数:
365
在页面上单选按钮的代码:
checked value="${key}" name="record.is_com"/>${value}
获取单选按钮选中的值,并给指定的单选按钮赋值:
if($('input[name="record.is_com"]:che...
分类:
Web程序 时间:
2014-06-30 06:00:54
阅读次数:
205
Candy
Total Accepted: 12392 Total
Submissions: 68386My Submissions
There are N children standing in a line. Each child is assigned a rating value.
You are giving candies to these childre...
分类:
其他好文 时间:
2014-06-29 23:15:17
阅读次数:
228
include/asm/io.h
#define outb(value,port) __asm__ ("outb %%al,%%dx"::"a" (value),"d" (port))
//宏定义outb用汇编实现了在端口地址port处写入值value
//使用的寄存器是al,一个byte长度,而端口port使用的是2byte长度地址来标记的寄存器,注意这里寄存器的使用
...
分类:
系统相关 时间:
2014-06-29 23:13:13
阅读次数:
369
【题目】
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.
get(key) - Get the value (will always be positive) of the key if the key exists in the cache, otherwise return -1.
se...
分类:
其他好文 时间:
2014-06-29 22:45:26
阅读次数:
358
改变样式
返回值:Stringcss(name|pro|[,val|fn])
访问匹配元素的样式属性。
参数
nameStringV1.0
要访问的属性名称
propertiesMapV1.0
要设置为样式属性的名/值对
name,valueString, NumberV1.4
属性名,属性值
name,function(index, value)String,Fu...
分类:
Web程序 时间:
2014-06-29 22:31:07
阅读次数:
287
初始化一个SliderUISlider *slider = [[UISlider alloc]initWithFrame:CGRectMake(0, 400,320 , 20)];访问UISlider的值 slider.value = 3;//设置slider的值float value = slid...
分类:
其他好文 时间:
2014-06-29 18:47:27
阅读次数:
252