[LeetCode] Product of Array Except Self
Product of Array Except SelfGiven an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all th...
vs2013创建、安装、调试Windows Service程序
Windows服务以服务的形式运行,有些情况下非常有用。用VS2013创建windows服务的过程如下:创建服务。1、文件-》新建-》项目-》windows桌面-》windows服务,修改你要的项目名称。我这不改名,仍叫WindowsService1,确定。2、产生的项目文件结构如图所示。右侧的Program.cs文件是入口,Service1.cs是服务文件,所有的逻辑都在这。Service1.c...
[LeetCode] Implement Queue using Stacks
Implement Queue using StacksImplement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes the element from in front of queue.peek() -- Get ...
[LeetCode] Summary Ranges
Summary RangesGiven a sorted integer array without duplicates, return the summary of its ranges.For example, given [0,1,2,4,5,7], return ["0->2","4->5","7"...
[LeetCode] Power of Two
Power of TwoGiven an integer, write a function to determine if it is a power of two.Credits:Special thanks to @jianchao.li.fighter for adding this problem and creating all test cases.解题思路:这道...
Azure搭建shadowsocks用作科学上网
我在CSDN中写的一篇博客,题名为“Azure搭建openvpn(番羽土啬必备)”,没有想到第二天就被删了~于是这里用“科学上网”这个词,多么和谐啊! 此前写的那篇openvpn,是在公司搭建的,公司的网络是外网,因此能够work。在宿舍的时候,发现openvpn的客户端不能连接上。原来强大的GWF已经将...
molebox launcher fatal (could not open boxfile)
运行一个exe程序,弹出以下框:可能是系统的环境设置问题。你的文件中的路径包括中文,但是你的系统可能是英文的。按教程http://www.kangry.net/blog/?type=article&article_id=40操作重启电脑即可。
Azure搭建Openvpn
update in 2015-07-05长城太牛逼,将openvpn都给封了,导致此教程不用。挂了~我搭openvpn是在公司的国外网,因此能够work。待我回去宿舍,发现不能客户端不能链接。于是我重新找另外的解决方案~Azure搭建shadowsocks用作科学上网http://www.kangry.net/blog/?type=article&article_id=275 以...
通过文件对比工具Merge数据库
项目分成线下开发版、线上测试版、线上生产版,因此对应有三个数据库。对于一些静态数据,常常需要同步。修改了线下的开发版本,同时也需要更新线上的测试版和线上生产版数据库,有时候线上的一些数据库修改,也要体现在线下来。这是双向的关系,因此不能简单的将一个数据库覆盖另外一个数据库。现在介绍一种数据合并方法。环境:SQL Server Management Studio,Window 8.1软件:winme...
《算法竞赛入门经典》第一章
1.PI除了宏定义外,更好的办法可以通过下面获得:#include const double pi=acos(-1.0);2.通过程序计时:#include int main(){ ... ...
我要长高!!坚持就是胜利!(1)
成年人的骨骺已经闭合,不可能再长高。这是个让人很烦恼的问题,但瑜伽增高可以助你一臂之力!瑜伽增高,瑜伽中有很多的增高动作,同时也能使自身的韧带得到史无前例的充分放松。瑜伽增高的原理是:基本上每个人的脊柱都会或多或少有些不正,不正的程度决定您是否含胸驼背。通过瑜伽体式的练习,以正确的方向地不断舒展,伸展、扩宽骨间隙,增加身高的长度,让脊柱直起来。平时弯腰驼背,坐姿不正,谈话含胸,长时间久坐的伽人,通...
我要长高!!坚持就是胜利!(2)
增高是很多个子不高的朋友的梦想,如何能够快速增高呢?小编今天教你一个能够轻松有效增高的秘诀。那就是增高瑜伽——增延脊柱式。它的前屈位不仅锻炼了我们的腹部肌肉,更重要的是拉伸了我们的脊柱。通过坚持做这个动作,经常锻炼我们的脊柱,能够有效地把它拉伸,把身高“拉长”哦!1)双脚并拢,抬举双手并高举过头,呼气,双手打开与肩同宽,带动身体,身体往前,往下。2)指尖触地,保持抬头状态,双脚绷直。3)然后双手抓...
[LeetCode] Wildcard Matching
Wildcard MatchingImplement wildcard pattern matching with support for '?' and '*'.'?' Matches any single character. '*' Matches...
[LeetCode] Jump Game II
Jump Game IIGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Your go...
[LeetCode] Regular Expression Matching
Regular Expression MatchingImplement regular expression matching with support for '.' and '*'.'.' Matches any single character. '*'&...
[LeetCode] Search a 2D Matrix
Search a 2D MatrixWrite an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted from left to r...
[LeetCode] Basic Calculator II
Basic Calculator IIImplement a basic calculator to evaluate a simple expression string.The expression string contains only non-negative integers, +, -, *, and / operators. The integer divisi...
[LeetCode] Single Number II
Single Number IIGiven an array of integers, every element appears three times except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you impl...
[LeetCode] Path Sum II
Path Sum IIGiven a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree and sum = 22, &...
[LeetCode] Rotate List
Rotate ListGiven 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,r...