码迷,mamicode.com
首页 > 其他好文
01 two sum
class Solution {public: vector twoSum(vector& nums, int target) { maphash; build(nums,hash); int index2=0; vectorresult...
分类:其他好文   时间:2015-05-27 08:36:55    阅读次数:115
简单的二分查找法
#include #include #include using namespace std;int binary_search(int len, int num[], int request) { int left = 0, right = len - 1, mid; while (l...
分类:其他好文   时间:2015-05-27 08:35:45    阅读次数:150
just one last blog
Expressage Search Problem StatementVersion 1.0Revision HistoryDate Issue Description Author 23/May/2015 V1.0 Initial creation Wang beini ...
分类:其他好文   时间:2015-05-27 08:35:51    阅读次数:162
Kth Largest Element in an Array
Find thekth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For exampl...
分类:其他好文   时间:2015-05-27 08:35:51    阅读次数:175
wireshark 的使用(filter的用法)
转自:http://blog.csdn.net/hanyuxinting/article/details/5558095过滤器语法-------------------------------------------------------------最简单的过滤允许你检查一个协议或者字段的存在: ...
分类:其他好文   时间:2015-05-27 08:34:30    阅读次数:129
cocos2d-X-3.X 场景与层
1场景与层的相关函数1.void runWithScene(Scene * scene).该函数可以运行场景。只能在启动第一个场景时调用该函数。如果已经有一个场景运行,则不能调用该函数。2.void replaceScene(Scene * scene).切换到下一个场景。用一个新的场景替换当前场景...
分类:其他好文   时间:2015-05-27 08:35:09    阅读次数:118
配置文件
Configuration-新一代的配置文件(接口定义与基础实现)系列文章讲的是asp.net 5(Asp.net VNext)中的配置文件部分,工程下载地址为:https://github.com/aspnet/Configuration本节讲的是Configuration解决方案中的Micros...
分类:其他好文   时间:2015-05-27 08:34:30    阅读次数:222
Set
HashSetdoesn’t maintain any kind of order of its elements.TreeSetsorts the elements in ascending order.LinkedHashSetmaintains the insertion order. Ele...
分类:其他好文   时间:2015-05-27 08:34:20    阅读次数:89
POJ 1988 Cube Stacking
Time Limit: 2000MSMemory Limit: 30000KTotal Submissions: 20776Accepted: 7278Case Time Limit: 1000MSDescriptionFarmer John and Betsy are playing a game...
分类:其他好文   时间:2015-05-27 08:34:05    阅读次数:106
少睡2小时,相貌大不同
来源 译言网/哪啊哪啊小鱼儿本次研究中一位参与者在少量缺觉前(左图)后(右图)的照片。(Courtesy供图 )大概你已经知道缺觉会对你的身体造成什么影响:体重增加、心情变差、如抑郁症、阿尔茨海默病(老年痴呆症)等疾病的得病率增加,甚至是致使大脑萎缩。但是丢了美人觉还有可能给你的皮肤带来灾难:根据伦...
分类:其他好文   时间:2015-05-27 08:34:16    阅读次数:117
LeetCode 70 Climbing Stairs
You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb...
分类:其他好文   时间:2015-05-27 08:33:16    阅读次数:100
Repository模式
Repository模式的两种写法与疑惑现如今DDD越来越流行,园子里漫天都是介绍关于它的文章。说到DDD就不能不提Repository模式了,有的地方也叫它仓储模式。很多时候我们对Repository都还停留在Copy然后使用的阶段, 我注意到Repository模式有两种流行的设计方式。今天我就...
分类:其他好文   时间:2015-05-27 08:31:43    阅读次数:97
使用ansible批量管理远程服务器
使用ansible批量管理远程服务器背景本地需要管理远程的一批服务器,主要执行以下任务:1) 将本地的文件复制到远端所有服务器; 2) 需要在远程服务器中执行一个个命令;远端服务器路径并非完全一致,一般访问通过环境变量中定义的变量路径访问; 比如在.bashrc中定义$app_path=/op...
分类:其他好文   时间:2015-05-27 08:33:22    阅读次数:159
最大子段和问题
1、很容易想到的算法,复杂度为o(n^2) 1 int MaxSegSum1(int n, int *ans) 2 { 3 int sum = 0; 4 5 for(int i = 1; i 0 ? ans[left] : 0; 8 } 9 else10 ...
分类:其他好文   时间:2015-05-27 08:33:23    阅读次数:86
Tomcat控制台
下图是启动Tomcat后(假设%Tomcat_Home%\conf\server.xml中的默认服务端口仍是8080),在浏览器中键入http://localhost:8080后出现的Tomcat启动成功画面的部分截图:(笔者此处使用的是Tomcat 6.0.18) 在上图的左上角Adminstra...
分类:其他好文   时间:2015-05-27 08:32:51    阅读次数:151
HDU 4607 Park Visit
Problem DescriptionClaire and her little friend, ykwd, are travelling in Shevchenko's Park! The park is beautiful - but large, indeed. N feature spots...
分类:其他好文   时间:2015-05-27 08:31:51    阅读次数:126
Routing路由
Routing路由新版Routing功能介绍在ASP.NET 5和MVC6中,Routing功能被全部重写了,虽然用法有些类似,但和之前的Routing原理完全不太一样了,该Routing框架不仅可以支持MVC和Web API,还支持一般的ASP.NET5程序。新版的改变有如下几个部分。首先,Rou...
分类:其他好文   时间:2015-05-27 08:30:50    阅读次数:176
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!