码迷,mamicode.com
首页 > 其他好文
Leetcode:Palindrome Partitioning
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = "aab", Return [ ["aa","...
分类:其他好文   时间:2015-04-08 15:06:58    阅读次数:79
C Language Study - an express a < 1 && --a > 1
a 1 = ? C compiler is intellectual. int result; int a = 3; result = a 1;/* result is 0, and a is 3. */ result = a 1;/* result is 1, and a is 2. */...
分类:其他好文   时间:2015-04-08 15:06:08    阅读次数:105
LeetCode—Binary Tree Zigzag Level Order Traversal 二叉树的Z扫描
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between). For example: Given binary ...
分类:其他好文   时间:2015-04-08 15:07:05    阅读次数:161
Cocos2d-x 3.4 之 文本输入 <1>
Cocos2d-x 3.4 文本输入 CCTextFieldTTF...
分类:其他好文   时间:2015-04-08 15:04:22    阅读次数:173
深度缓存(Z缓存)的研究
最近在shadow map过程中卡住了。因为我想在OpenGLES 2.0兼容的平台上运行shadow map,而要顺利运行shadow map,通常的情况是拥有GL_OES_depth_texture扩展,而有些兼容的机器是没有这个扩展,这给我们开发人员带来了一些难度。不过办法还是有的,前提是要对计算机图形学的Z-Buffer要有一个深入的了解才行。...
分类:其他好文   时间:2015-04-08 15:06:29    阅读次数:218
Kinect小小玩偶游戏----小小潜水员
本文章由cartzhang编写,转载请注明出处。 所有权利保留。  文章链接:  作者:cartzhang Kinect小小玩偶游戏----小小潜水员 一、游戏说明 通过Kinect控制小玩偶来玩Unreal游戏,左右手抬起可左右移动;右手举过头顶,可跳起;还可以发射蜗牛子弹来攻击小鱼。使用UE4的2D效果来实现。 先睹为快,萌萌哒的小小主角: 二...
分类:其他好文   时间:2015-04-08 15:06:08    阅读次数:278
项目开发-iBatis源码阅读
近日工作内容是技术调研,研究iBatis使用方法及源码,源码阅读中总是能看到很多设计模式的影子,整理下来,获益匪浅。      ibatis client包结构             设计原则学习        1)  接口定义:上图中顶层接口定义的功能职责单一,聚在一个接口中,共同支撑一个功能。        2)  好莱坞原则:SqlMapClient的实现类,是顶层调用者,Sql...
分类:其他好文   时间:2015-04-08 15:05:18    阅读次数:187
Sqrt(x) -- leetcode
Implement int sqrt(int x). Compute and return the square root of x. 此代码在leetcode上实际执行时间为16ms。 基本思路为二分法。 由于二段式二分法,退出循环时,有两种情况,一是精确匹配,二是精确值不存在情况下,指向稍大一点的。故函数返回时需要判断一下。 另外一点需要注意的是,作判断时,不能用 mid *...
分类:其他好文   时间:2015-04-08 15:03:08    阅读次数:106
RotateCard(自定义的旋转view)
item被点击时有放大的动画效果,快速滑动后手指放开会有余旋。...
分类:其他好文   时间:2015-04-08 15:03:25    阅读次数:124
大整数运算---模拟笔算
/* *m=a[k]×10k-1+a[k-1]×10k-2+….+a[2]×10+a[1] *其中a[0]保存该长整数的位数。 * *模拟笔算 */ #include #include using namespace std; #define SIZE 255 void getl(char* n);//获取长整数 void prt(char* n);//打印长整数 int cmp(char* n...
分类:其他好文   时间:2015-04-08 15:04:43    阅读次数:139
【LeetCode OJ】Search Insert Position
题目:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You may assume no duplicates in the arr...
分类:其他好文   时间:2015-04-08 15:05:04    阅读次数:103
Data Structure Alignment 2
Data Structure Alignment 2 在前面的一篇文章中,似乎明白了结构体对齐的基本规则,但是有些地方还是含糊不清。比如看下面的这个程序。 根据前面的规则很容易算出,sizeof(A)=16, sizeof(B)=24.但是在GCC下运行的结果却不是这样,所以一时有点不知问题所起,内存对齐都是编译器做的工作 所以各个平台下面的实现没有得到统一规范,虽然可以#pragma...
分类:其他好文   时间:2015-04-08 15:03:17    阅读次数:128
Anagrams--LeetCode
题目: Given an array of strings, return all groups of strings that are anagrams. Note: All inputs will be in lower-case. 思路: 判断两个字符串是否为anagram的方法可以有: 1)将每个字符串的所有字符按字典序排列,比较是否相同。 2)用Has...
分类:其他好文   时间:2015-04-08 15:02:39    阅读次数:143
zabbix不发送邮件
zabbix不发送邮件...
分类:其他好文   时间:2015-04-08 15:00:39    阅读次数:146
Cocos2d-x 资源加密解密总结
本文乃Siliphen原创,转载请注明出处:http://blog.csdn.net/stevenkylelee  本文针对的是cocos2d-x 3.2 和 3.4 版本进行研究。 做加密解密的思路 加密解密算法的简单介绍 首先,加密解密应该是一个单独的话题,一般不会涉及具体使用的引擎、框架和技术。 加密算法有Base64,DES等。 Ba...
分类:其他好文   时间:2015-04-08 15:00:39    阅读次数:312
POJ 2192 Zipper (dp)
链接: http://poj.org/problem?id=2192  题意:就是给定三个字符串A,B,C;判断C能否由AB中的字符组成,同时这个组合后的字符顺序必须是A,B中原来的顺序,不能逆序;例如:A:mnl,B:xyz;如果C为mnxylz,就符合题意;如果C为mxnzly,就不符合题意,原因是z与y顺序不是B中顺序。 DP求解:定义dp[i][j]表示A中前i个字符与B中前j个字...
分类:其他好文   时间:2015-04-08 14:59:53    阅读次数:145
lnmp
nginx命令停止nginx服务:# /etc/init.d/nginx stop启动nginx服务:# /etc/init.d/nginx start编辑nginx配置文件:# vim /etc/nginx/nginx.conf/etc/init.d/php-fpmrestartservice p...
分类:其他好文   时间:2015-04-08 14:59:00    阅读次数:152
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!