摘要: 2012/3/7 百田:1. 求100~99999的水仙花数2. 将一个排序好的数组乱序 http://www.cnblogs.com/wouldguan/archive/2013/03/07/2947780.html3. 计算最少能剩多少个单牌, 可以出两张、三张、四张,五张顺子。2012/3/6 溢信1. 最长对称字串, 如“google”是“goog” http://www.cnblogs.com/wouldguan/archive/2013/03/06/2946066.html2. 求二叉树的任意2个节点的公共根节点3. 求给定数组的最长等差数列4. 3个盆(4, 4, 1.5)把8k 阅读全文
posted @ 2013-03-07 12:11 wouldguan 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 2011-2012:用delphi开发了Dota的改建工具,挤房器,锐捷自动连接辅助工具2013:熟练使用主流技术, Java、Linux、C等, 尝试建立自己的开源项目 阅读全文
posted @ 2013-01-20 13:06 wouldguan 阅读(127) 评论(0) 推荐(0) 编辑
摘要: handsontable的一种js继承方式注意: 部分核心代码如下:管理类editors.js(function (Handsontable) { 'use strict'; function RegisteredEditor(editorClass) { var clazz, insta... 阅读全文
posted @ 2014-04-25 09:29 wouldguan 阅读(1310) 评论(0) 推荐(0) 编辑
摘要: ```javapackage com.concurrency.cookbook.ch1;public class Calculator implements Runnable { private int number; public Calculator(int number) { this.number = number; } @Override public void run() { for (int i = 1; i < 10; i++) { System.out.printf("%s: %d * %d = ... 阅读全文
posted @ 2014-04-09 01:50 wouldguan 阅读(146) 评论(0) 推荐(0) 编辑
摘要: ```javapackage com.concurrency.cookbook.ch1;public class Calculator implements Runnable { private int number; public Calculator(int number) { this.number = number; } @Override public void run() { for (int i = 1; i 阅读全文
posted @ 2014-04-09 00:52 wouldguan 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 记录学习javascript代码风格 引用文章: https://github.com/adamlu/javascript-style-guide https://github.com/airbnb/javascript 1. 使用字面值创建对象 var ite = {};2. 不要使用保留字作为键3. 使用字面值创建数组 var items=[];4. 不知道数组的长度,... 阅读全文
posted @ 2014-02-25 21:38 wouldguan 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 创建web应用程序 命令模板: mvn archetype:generate -DgroupId={project-packaging} -DartifactId={project-name} -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false如:mvn archetype:generate -DgroupI... 阅读全文
posted @ 2014-02-25 00:06 wouldguan 阅读(191) 评论(0) 推荐(0) 编辑
摘要: e:\vim\java\Shuffle.java.htmlimport java.util.*;public class Shuffle{ public static int[] getShuffle(int[] orderArray) { int length = orderArray.length; int[] newArray = new int[length]; int randCount = 0; int position; int k=0; Random rand = new Rando... 阅读全文
posted @ 2013-04-15 15:48 wouldguan 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 引用: http://blog.csdn.net/zzqkillyou/article/details/7388690//Javaimport java.util.*;public class Main{ public static int[] shuffle(int[] arr) { int count = arr.length; int[] arr2 = new int[count]; int randCount = 0; //统计已抽取的个数 int position = 0; //随机到的索引 int k = 0; //目标... 阅读全文
posted @ 2013-03-07 12:02 wouldguan 阅读(1298) 评论(0) 推荐(0) 编辑
摘要: 引用:http://blog.csdn.net/hackbuteer1/article/details/6686263题目:输入一个字符串,输出该字符串中对称的子字符串的最大长度。比如输入字符串“google”,由于该字符串里最长的对称子字符串是“goog”,因此输出4。算法一:O(n^3)判断字串是否对称是从外到里, O(n)#include <stdio.h>#include <string.h>/* *判断起始指针,到结束指针的字符串是否对称 */int IsSymmetrical(char* pBegin, char* pEnd){ if(pBegin == N 阅读全文
posted @ 2013-03-06 14:32 wouldguan 阅读(364) 评论(0) 推荐(0) 编辑
摘要: 引用:http://www.cppblog.com/guyuecanhui/articles/76443.html问题描述:已知n个人(以编号1,2,3...n分别表示)围坐在一张圆桌周围。从编号为k的人开始报数,数到m的那个人出列;他的下一个人又从1开始报数,数到m的那个人又出列;依此规律重复下去,直到圆桌周围的人全部出列,求最后一个出列人的编号。代码:#include <stdio.h>int josephus(int n, int m, int start){ int k = 1; for(int i=2; i<=n; i++) k = (k+m-1)%i + 1; . 阅读全文
posted @ 2013-03-06 12:37 wouldguan 阅读(167) 评论(0) 推荐(0) 编辑