在本系列中,我们以CodeProject上比较火的OOP系列博客为主,进行OOP深入浅出展现。 无论作为软件设计的高手、或者菜鸟,对于架构设计而言,均需要多次重构、取舍,以有利于整个软件项目的健康构建,有些经验是前辈...
分类:
其他好文 时间:
2015-04-02 10:33:25
阅读次数:
166
1 关于版本控制 版本控制是一种记录一个或若干文件内容变化,以便将来查阅特定版本修订情况的系统。有以下三种版本控制系统: 1. 本地版本控制系统 许多人习惯用复制整个项目目录的方式来保存不同的版本,或许还会...
分类:
其他好文 时间:
2015-04-02 10:34:05
阅读次数:
133
@Entity @Table(name="person") public class?Person { ?@Id @GeneratedValue? //不写是采用默认策略,即:(Strategy=Generation.AUTO) ?private Integer id;? //主键且数据库是mysql就自动增长(identified...
分类:
其他好文 时间:
2015-04-02 10:35:00
阅读次数:
186
语法: Type ::= InfixType ?=>? Type | ?(?[?=>? Type] ?)? ?=>? Type | InfixType [ExistentialClause] ExistentialClause ::= ?forSome? ?{? ExistentialDc { semi ExistentialDcl} ?}? Exis...
分类:
其他好文 时间:
2015-04-02 10:34:32
阅读次数:
146
游泳池水的消毒问题本没有争论,因为国内外泳池的消毒几乎都用的是液氯,可近几年,我国对泳池水的消毒剂争论不休,卫生检疫部门、体育部门、环保部门、公安部门或上级管理部门纷纷推荐各种各样的消毒剂,甚至有的带有强制性,致使游泳池水的消毒问题越来越被人们所关注。...
分类:
其他好文 时间:
2015-04-02 10:30:53
阅读次数:
164
题目:给你一些加减法计算式,判断有几个是正确的。
分析:简单题。直接模拟即可。
说明:╮(╯▽╰)╭。
#include
#include
#include
#include
#include
#include
using namespace std;
int main()
{
int a,b,count = 0;
char c,d,e[10];
while (~sca...
分类:
其他好文 时间:
2015-04-02 10:32:53
阅读次数:
125
题目:Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only constant space...
分类:
其他好文 时间:
2015-04-02 10:31:49
阅读次数:
114
本例子是一个自定义菜单View,包含菜单按钮和子菜单列表。环形的子菜单可以动态增减元素并且可以监听 轻触触摸屏,尚未松开或拖动、轻触触摸屏后松开、按下触摸屏,并拖动、长按触摸屏、上下左右滑动等多种手势,并且可以长按拖动到任意位置在接近边框的时候会自动调整子菜单的位置来让菜单不被边框遮蔽。本项目编译版本4.4.2项目编码UTF-8...
分类:
其他好文 时间:
2015-04-02 10:30:21
阅读次数:
194
题目链接:https://leetcode.com/problems/validate-binary-search-tree/
就是判断一个给定的二叉树是否为二叉查找树。
我的思路是:先将该树中序遍历一遍,按中序遍历的顺序保存到一个vector中,然后判断vector中的顺序即可。
代码:
class Solution {
public:
void inOrder(TreeNode...
分类:
其他好文 时间:
2015-04-02 10:29:28
阅读次数:
107
problem:
Given a list, rotate the list to the right by k places, where k is non-negative.
For example:
Given 1->2->3->4->5->NULL and k = 2,
return 4->5->1->2->3->NULL.
Hide Tags
L...
分类:
其他好文 时间:
2015-04-02 10:31:03
阅读次数:
117
先分析一个例子。
#include
class CBase
{
public:
CBase()
{
printf("CBase\n");
}
~CBase()
{
printf("~CBase\n");
}
void SetNumber(int nInt)
{
this->m_nNumber = nInt;
}
int GetNumber()
{
retu...
分类:
其他好文 时间:
2015-04-02 10:29:49
阅读次数:
102
题目:给你一个字符串,判断他是这些字符组成的全排列中按字典序排序的第几位。
分析:组合数学。康托展开,枚举长度求和即可。
首先,考虑非重集,从前向后扫描,每一位找到前面相同本位小于对应值得串个数;
例如:f(cba)= 2*2!+ 1*1!= 5,对应第6个串;
(c**对应a、b开头的比他小,cb*对应ca开头的比他...
分类:
其他好文 时间:
2015-04-02 10:29:31
阅读次数:
180
Redis 3.0.0 正式版终于到来了,与 RC6 版本比较,该版本改进包括:
* 修复了无磁盘的复制问题 (Oran Agra)
* 在角色变化后对 BLPOP 复制进行测试 (Salvatore Sanfilippo)
* prepareClientToWrite() 错误处理方法的改进 (Salvatore Sanfilippo)
* 移除 dict.c 中不再使用的函数(Salv...
分类:
其他好文 时间:
2015-04-02 10:27:36
阅读次数:
115
先分析一个例子
#include
class CFurniture
{
public:
CFurniture()
{
m_nPrice = 0;
}
virtual ~CFurniture()
{
printf("virtual ~CFurniture()\n");
}
virtual int GetPrice()
{
return m_nPrice;
}
publ...
分类:
其他好文 时间:
2015-04-02 10:26:06
阅读次数:
229
ListView或者RecycleView滚动时隐藏Toolbar( Part 2 )>
* 原文链接 : How to hide/show Toolbar when list is scrolling (part 2)
* 译者 : chaossss
* 校对者: 这里校对者的github用户名
* 状态 : 校对中Hello,各位小伙伴,俺胡汉三又来了!!!今天我打算接着上一篇博文继...
分类:
其他好文 时间:
2015-04-02 10:26:23
阅读次数:
258