#include using namespace std;typedef enum Color
{
RED,
BLACK,
}Color;
template
struct RbNode
{
Color color;
Type data;
RbNode *parent;
RbNode<Type...
分类:
编程语言 时间:
2015-05-22 13:32:05
阅读次数:
180
1 $('li').click(function(){ 2 $(this).css({ 3 'background-color': function(){ 4 return 'red'; 5 }, 6 'height...
分类:
Web程序 时间:
2015-05-22 13:19:13
阅读次数:
141
DescriptionBessie has two crisp red apples to deliver to two of her friends in the herd. Of course, she travels the C (1 6-> 7 -> 4* -> 3 -> 2 -> 1* ....
分类:
其他好文 时间:
2015-05-22 11:24:05
阅读次数:
173
这一题,简单的广搜或者深搜都可以搞定,时间复杂度都差不多。
我用的是广搜。题目的意思是:@是一个人的起始位置,#不可以走,. 可以走,求出可以走的位置的个数。
一开始没有用结构体来存储坐标,直接用的是z = x * 10 + y;将z入队,结果错了,原因是在取余整除的时候会出错。改用结构体就OK了。
下面是AC的代码:
#include
#include
#include
using...
分类:
其他好文 时间:
2015-05-22 09:47:49
阅读次数:
114
animate() 方法执行 CSS 属性集的自定义动画。该方法通过CSS样式将元素从一个状态改变为另一个状态。CSS属性值是逐渐改变的,这样就可以创建动画效果。只有数字值可创建动画(比如 "margin:30px")。字符串值无法创建动画(比如 "background-color:red")。注释...
分类:
其他好文 时间:
2015-05-22 00:02:50
阅读次数:
488
之前一篇随笔——Redis安装及主从配置已经详细的介绍过Redis的安装于配置。本文要讲的是如何在已经安装过Redis的机器上快速的创建出一个新的Redis缓存数据库。一、环境介绍1) Linux版本:Red Hat Enterprise Linux Server release 6.1 (Sant...
分类:
数据库 时间:
2015-05-21 08:59:24
阅读次数:
138
http://pages.cs.wisc.edu/~skrentny/cs367-common/readings/Red-Black-Trees/http://en.wikipedia.org/wiki/Red–black_tree1.Every node is either red or blac...
分类:
其他好文 时间:
2015-05-21 07:50:59
阅读次数:
100
Brad Fitzpatrick是一位典型的Web程序员。与普通的程序员不同,他在别人还在学认字读本的时候就开始写程序了。(推荐优秀的儿童英文教材Clifford the Big Red Dog)。他主要的成就是,创办了LiveJournal一 个著名的社交网站。这是Fitzpatrick在大一入学...
分类:
其他好文 时间:
2015-05-20 23:54:36
阅读次数:
211
1 题目Given an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red...
分类:
其他好文 时间:
2015-05-20 23:50:14
阅读次数:
112
1.修改字体颜色//修改字体颜色SolidColorBrush brushred = new SolidColorBrush();//创建对象brushred.Color = Colors.Red;//调用方法2.注册事件和消息传递Messenger.Default.Register(this, "...