- (void)drawRect:(CGRect)rect
{
[super drawRect:rect];
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextSetRGBFillColor(ctx, .3, .3, .3, .1);
CGContextFillRect(ctx, self.boun...
分类:
其他好文 时间:
2014-04-29 13:33:22
阅读次数:
284
1D people lived in a 1D country. Everything in the country was one-dimensional, and everything was simple and clear: just one axis and two directions — forward and backward. Even a 1D world has proble...
分类:
其他好文 时间:
2014-04-29 13:44:22
阅读次数:
284
分布式消息系统Jafka入门指南作者:chszs,转载需注明。博客主页:http://blog.csdn.net/chszs一、JafkaMQ简介JafkaMQ是一个分布式的发布/订阅消息系统,它是Apache Kafka的Java移植版。2013年11月28日,JafkaMQ发布了1.2.3版。JafkaMQ的特征如下:1)消息持久化到磁盘的算法时间复杂度为O(1),即使是TB级的消息存储,也能...
分类:
其他好文 时间:
2014-04-29 13:32:22
阅读次数:
278
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1588
#include
#include
#include
#include
#include
using namespace std;
#define N 10050
#define M 200005
int n,m;//n个点 m条边
struct Edge{...
分类:
其他好文 时间:
2014-04-29 13:25:21
阅读次数:
383
今天Mayuyu要与大家来学习正则表达式,正则表达式是一个非常有用的工具,它的强大之处就在于处理文本匹配。
说白了正则表达式就是以一种模式去匹配给定文本中所有符合这一模式的字符串,比如[A-Za-z]\w+的含义是第一
个字符必须是字母,它的后面至少跟有一个或者更多由字母或者数字组成的字符。
那么Mayuyu将来一一介绍在正则表达式中常见的特殊字符。
1. |表示一个或...
分类:
其他好文 时间:
2014-04-29 13:47:21
阅读次数:
314
在登陆的时候一般要用错误验证功能。效果如图:
在action层的写法:
this.addActionError("用户名或密码错误");在jsp页面上取值:
记得在jsp页面添加就可以了...
分类:
其他好文 时间:
2014-04-29 13:18:21
阅读次数:
342
hdu 1047 高精度加法模板(用 string写的)...
分类:
其他好文 时间:
2014-04-29 13:28:21
阅读次数:
236
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
...
分类:
其他好文 时间:
2014-04-29 13:28:21
阅读次数:
398
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
...
分类:
其他好文 时间:
2014-04-29 13:13:21
阅读次数:
309
Given two binary strings, return their sum (also a binary string).
For example,
a = "11"
b = "1"
Return "100".
思路同十进制的大数相加。代码如下:
class Solution {
public:
string addBinary(string a, str...
分类:
其他好文 时间:
2014-04-29 13:12:20
阅读次数:
328
新一轮的音标学习已经过了一半,之前都是被别人带着,这次也独挑了一把大梁,感觉收获还是蛮大的。
说说我的收获:
首先,我再一次确定了音标学习,是可以在一个短期的时间有一个比较大的进步的,因为很多人英语说不好很大原因是不知道该从哪里发音,或者是用中式发音的方式去说英语,要知道,中文的发音部位和英文是不一样的,所以,如果从来都不去刻意改正自己的发音部位,即使在认真的读英语,也很难读的很好,而想要知道...
分类:
其他好文 时间:
2014-04-29 13:34:20
阅读次数:
240
中国人都知道1919年5月4日,虽然那时候我们还没有出生。
1919年5月4日哪天,大学生们上街游行以抗议当时的中国政府
签订不平等条约。它标志着中国一个非常重要的时期-新文化运动。
胡适、陈独秀、鲁迅、钱玄同等一些受过西方教育(当时称为新式教育)的人发起的一次“反传统、反儒教、反文言”的文学革命运动。
那时候,文言文还是主流,
转到现代白话是从那时候由胡适、陈独秀、鲁迅
...
分类:
其他好文 时间:
2014-04-29 13:22:20
阅读次数:
297