上一页 1 ··· 8 9 10 11 12 13 下一页
摘要: Implement strStr().Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack.I wrote that function be... 阅读全文
posted @ 2014-04-19 08:50 Agentgamer 阅读(281) 评论(0) 推荐(0)
摘要: You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?Do not think to... 阅读全文
posted @ 2014-04-18 20:07 Agentgamer 阅读(134) 评论(0) 推荐(0)
摘要: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1->2-... 阅读全文
posted @ 2014-04-16 21:03 Agentgamer 阅读(137) 评论(0) 推荐(0)
摘要: Recording my thought on the go might be fun when I check back later, so this kinda blog has no intention to be read by others(its just for recording, ... 阅读全文
posted @ 2014-04-12 20:05 Agentgamer 阅读(229) 评论(0) 推荐(0)
摘要: 经过一段时间的搜索,决定把搜过的资料都汇集在此,以免重复劳动,几乎来自stackoverflowOpenCV C++/Obj-C: Detecting a sheet of paper / Square DetectionFind corner of papersHow to remove convexity defects in a Sudoku square?以上是纸张检测的问题。http://en.wikipedia.org/wiki/3D_projectionwikiPedia关于3D投影,透视变换的条目,可以有一个基本了解。Executing cv::warpPerspective 阅读全文
posted @ 2013-11-08 09:01 Agentgamer 阅读(411) 评论(0) 推荐(0)
摘要: follow this instruction:http://blog.csdn.net/liushuaikobe/article/details/8729652and if you encounter some complie error like below when you try to install PIL/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/tk.h:78:11: fatal error: ... 阅读全文
posted @ 2013-11-05 11:31 Agentgamer 阅读(361) 评论(0) 推荐(0)
摘要: n(n+1)/2是一个数列的元素两两运算后的不重复结果数。如图:假如数列a = 1,2,3....n。那么该数列内的元素两两相乘,则会构建出上图中的表格,这个表格应该有n x n 个元素。用程序写出来大概就是这样:for (int i=0; i 2r = n(n-1) => r = n(n-1)/2得到了重复数r,那么剩下多少不重复的呢? n*n - r = n(n+1)/2 wala~ QED----Note---这其实是一个可重复的N choose M 组合问题,而这里的M是2,有时间的话想好好证明一下这个问题 阅读全文
posted @ 2013-09-13 01:52 Agentgamer 阅读(3209) 评论(0) 推荐(0)
摘要: pongo上的一道题,刚好闲下来可以练练手。题目: 给定一个包含1-n的数列,我们通过交换任意两个元素给数列重新排序。求最少需要多少次交换,能把数组排成按1-n递增的顺序,其中,数组长度不超过100。 例如: 原数组是3,2,1, 我们只需要交换1和3就行了,交换次数为1,所以输出1。 原数组是2,3,1,我们需要交换2和1,变成1,3,2,再交换3和2,变为1,2,3,总共需要的交换次数为2,所以输出2。 1 int getMinPos(int *a,int start, int end){ 2 int min = start; 3 for (int i=start; i a... 阅读全文
posted @ 2013-09-11 18:52 Agentgamer 阅读(280) 评论(0) 推荐(0)
摘要: 跟随startup engineering 已经到了week2了,目前为止课程都没有详细介绍node,恐怕以后也不会讲得太细,只是罗列出了一堆阅读材料供你自学。花了点时间阅读些许,在此做个墨迹。How javascript objects workhttp://helephant.com/2008/08/17/how-javascript-objects-work/如题,包含了一系列文章,伴随着示例阐述了一些js的object相关的特点,通俗易懂值得推荐。Functional javascripthttp://www.hunlock.com/blogs/Functional_Javascrip 阅读全文
posted @ 2013-07-02 01:37 Agentgamer 阅读(159) 评论(0) 推荐(0)
摘要: http://www.ibm.com/developerworks/cn/linux/l-pyunit/index.htmlpython单元测试http://www.crazyant.net/2012/06/08/python%E6%93%8D%E4%BD%9Cmysql%E5%AE%9E%E4%BE%8B%E4%BB%A3%E7%A0%81%E6%95%99%E7%A8%8B%EF%BC%88%E6%9F%A5%E8%AF%A2%E6%89%8B%E5%86%8C%EF%BC%89/python操作mysql实例代码教程(查询手册)ALTER TABLE tablename AUTO_INC 阅读全文
posted @ 2013-03-05 18:18 Agentgamer 阅读(100) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 下一页