码迷,mamicode.com
首页 > 2015年03月19日 > 全部分享
LeetCode – Refresh – Convert Sorted List to Binary Search Tree
Similar to the sorted array. But we have to remember, the position of node not depends on the index. So we need do two more things:1. Ensure the point...
分类:其他好文   时间:2015-03-19 06:20:30    阅读次数:132
在SQL Server2008中声明和初始化变量的新写法
1 DECLARE @temp INT = 1;2 PRINT @temp;或者1 DECLARE @temp AS INT = 1;2 PRINT @temp;能够用同一语句声明和初始化变量是SQL Server2008的新功能。在早期版本中,应使用单独的DECLARE和SET语句。
分类:数据库   时间:2015-03-19 06:20:19    阅读次数:140
LeetCode – Refresh – Combinations
Same algorithm with combination. Input as the (1..n), constraint is that the length of each combine should be k. 1 class Solution { 2 public: 3 vo...
分类:其他好文   时间:2015-03-19 06:20:58    阅读次数:152
HackerRank - Knapsack
Very good problem to learn knapsack (complete knapsack in this case).My brutal-force solution in Python got AC too, which surprised me a bit. Here is ...
分类:其他好文   时间:2015-03-19 06:18:36    阅读次数:135
LeetCode – Refresh – Compare Version Numbers
Two notes:1. I dont know whether C++ has a good split function for STL as the JAVA. Need to figure it out.2. At the beginning, I tried to set tmp1 = t...
分类:其他好文   时间:2015-03-19 06:17:36    阅读次数:130
LeetCode – Refresh – Construct Binary Tree from Inorder and Preorder Traversal
Only different with preorder and postorder is that the root start from the beginning for preorder. 1 /** 2 * Definition for binary tree 3 * struct T.....
分类:其他好文   时间:2015-03-19 06:20:26    阅读次数:122
springMVC+spring+mybatis整合过程中遇到的问题
今天在配置SSM整合的过程中遇到了几个错误,折腾了好久,具体如下1、java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for在网上找了好久,最后发现是namespace没写对...
分类:编程语言   时间:2015-03-19 06:20:05    阅读次数:246
LeetCode – Refresh – Combination Sum
This is a classical combination question. 1 class Solution { 2 public: 3 void getComb(vector > &result, const vector &num, vector current, int sum...
分类:其他好文   时间:2015-03-19 06:17:15    阅读次数:97
getopt例子
(本例基于win7 + python3.4)import getopt, sys'''getopt 模块专门用来处理命令行参数函数getopt(args, shortopts, longopts = [])参数 args 一般是sys.argv[1:] shortopts ...
分类:其他好文   时间:2015-03-19 06:18:43    阅读次数:121
flask mysql
sudo apt-get install mysql-servermysql -u root -psudo apt-get install python-mysqldbsudo apt-get install libmysqlclient-devsudo updatedblocate mysql_c...
分类:数据库   时间:2015-03-19 06:19:12    阅读次数:175
tomcat7.0设置多域名指向同IP不同项目
核心配置: www.yitechan.com.cn www.yitechan.com 附上源文件 文件名:tomcat多域名同IP 链接: http://pan.baidu.com/s/1gdw5OI3 密码: texe
分类:其他好文   时间:2015-03-19 06:18:11    阅读次数:160
决策树-ID3
id3:无法直接处理数值型数据,可以通过量化方法将数值型数据处理成标称型数据,但涉及太多特征划分,不建议决策树:的最大优点在于可以给出数据的内在含义,数据形式非常容易理解;决策树介绍:决策树分类器是带有种植的流程图,终止块表示分类结果 优点:计算复杂度不高,输出结果易于理解,对中间值的缺失不明感,....
分类:其他好文   时间:2015-03-19 06:17:11    阅读次数:133
.net excel 导入 导出
哎,好好的代码今天说来个实验,结果用的是office15 气死人了,网上最高office14.dll 文章转自2012年 QQ群:13615607 MR.Young 1 private DataSet loadSouce(string path) 2 { 3 4 5...
分类:Web程序   时间:2015-03-19 06:18:05    阅读次数:176
因子分析-模型参数估计方法
因子荷载举证A和特性方差举证D的方法有主成分法,主是因子发和极大似然法 因子荷载矩阵:各元使变量因子表达式的艺术,表达提取的公因子对原始变量的影响程度 作用:通过因子荷载矩阵可以获取原始指标变量的线性组合; 示例:如X1=a11*F1+a12*F2+a13*F3,其中X1为指标变量1,...
分类:其他好文   时间:2015-03-19 06:16:50    阅读次数:204
BZOJ 1012: [JSOI2008]最大数maxnumber 单调队列/线段树/树状数组/乱搞
1012: [JSOI2008]最大数maxnumberTime Limit: 3 SecMemory Limit: 162 MBSubmit: 4750Solved: 2145[Submit][Status][Discuss]Description现在请求你维护一个数列,要求提供以下两种操作: 1...
分类:编程语言   时间:2015-03-19 06:17:40    阅读次数:155
谁说他们版本不兼容——hadoop1.2.1+hbase0.94.11+nutch2.2.1+el
一、背景 最近由于项目和论文的需要,需要搭建一个垂直搜索的环境,查阅了很多资料,决定使用Apache的一套解决方案hadoop+hbase+nutch+es。这几样神器的作用就不多作介绍了,自行参考各类百科就行了。我选择这样的方案主要是基于以下考虑: 1、可扩展,虽然一、背景最近由于项目和论文的需要...
分类:其他好文   时间:2015-03-19 06:17:22    阅读次数:110
KMP算法的一次理解(中)
在开始KMP算法之前,先来回顾一下字符串模式匹配的暴力法,具体的过程如下图所示: 注:图中两个串的匹配都是从1开始的,代码中的匹配都是从0开始的。 可以看到匹配主串的i的值是不断的回溯的,然而KMP三位大师发现这种回溯其实是不需要的,所以提出来这个算法来解决这个问题。 既然i值不能回溯了,也就是不能...
分类:编程语言   时间:2015-03-19 06:17:08    阅读次数:158
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!