Unique PathsA robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right a...
分类:
其他好文 时间:
2014-12-10 14:01:54
阅读次数:
131
我一向赞同一个理念: 用代码实现简单逻辑是不需要注释的, 因此我也就不写注释了, 直接上代码:#include #include #include inline int Parent (const int i){ return std::move( i % 2 ? (i - 1)...
分类:
编程语言 时间:
2014-12-10 07:04:13
阅读次数:
221
题目描述
Problem D: Knight's Trip
In chess, each move of a knight consists of moving by two squares horizontally and one square vertically, or by one square horizontally and two squares vertically....
分类:
其他好文 时间:
2014-12-09 14:03:08
阅读次数:
617
1.定义在不改变代码行为情况下改善代码设计;2.好处1.改善设计;2.让软件更加容易理解;3.可以协助寻找bugs;4.可以提升开发速度;3.使用 3.1结构重构(改名字) 右键类文件,Refactor->Rename 3.2移动(移动到另外一个包) Refactor->Move 3.3修改方法的名...
分类:
编程语言 时间:
2014-12-08 20:54:39
阅读次数:
234
【题目】
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).
The robot can only move either down or right at any point in time. The robot is trying to ...
分类:
其他好文 时间:
2014-12-08 17:45:44
阅读次数:
213
关于触摸滑动的网上有比较多的插件,我找了一个比较好用的插件,给大家分享下。http://stephband.info/jquery.event.swipe/通过引入两个文件就可以在手机web页面上实现触摸滑动操作了(文件在github里面,jquery.event.move.js和jQuery.ev...
分类:
移动开发 时间:
2014-12-08 17:23:08
阅读次数:
189
汉诺塔问题是一个纯递归问题,应该是比较简单的搞定n个盘子时只要搞定n-1个盘子就ok了,先将n-1个盘子经过左边那个盘子放到中间那个盘子,在把第n个盘子放过去,最后把n-1个盘子放在最左边的那个就ok了。#includevoid move(char A,char C){ printf("%c-...
分类:
其他好文 时间:
2014-12-08 00:31:23
阅读次数:
210
背景: 从DICOM网络传输一文开始,相继介绍了C-ECHO、C-FIND、C-STORE、C-MOVE等DIMSE-C服务的简单实现,博文中的代码给出的实例都是基于fo-dicom库来实现的,原因只有一个:基于C#的fo-dicom库具有高封装性。对于初学者来说实现大多数的DIMSE-C、DIMSE-N服务几乎都是“傻瓜式”操作——构造C-XXX-RQ、N-XXX-RQ然后绑定相应的OnResponseReceived处理函数即可。本博文希望在前几篇预热的基础上,对比DCMTK、fo-dicom、mDCM...
分类:
其他好文 时间:
2014-12-06 22:52:32
阅读次数:
558
创建作业事件
CREATE DEFINER=`root`@`%` EVENT `e_move_loginLog` ON SCHEDULE EVERY 1 MONTH STARTS '2015-01-01 05:30:01' ON COMPLETION NOT PRESERVE ENABLE D...
分类:
数据库 时间:
2014-12-06 16:40:57
阅读次数:
369
Triangle Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, give...
分类:
其他好文 时间:
2014-12-06 06:33:39
阅读次数:
186