06 2013 档案

摘要:snippet挺好用,但是不是我喜欢的那种风格,比如if是这样的if (){ XX}而我比较习惯这种:if () { XX}可以这么做:工具(Tools)——代码段管理器(Code Snippets Manager),选择语言,比如C++,可以看到那些snippet的目录,然后文件——打开——文件,找到那个目录,编辑对应的文件即可,要注意的是修改后要重启visual studio,才能生效 阅读全文
posted @ 2013-06-29 09:07 ttang 阅读(312) 评论(0) 推荐(0)
摘要:matlab中有newpnn这样一个函数,不过help里说的不够清楚,help里是这么说的% net = newpnn(P,T,spread) takes two or three arguments, P% R-by-Q matrix of Q input vectorsT % S-by-Q matrix of Q target class vectors spread % Spread of radial basis functions (default = 0.1)其实这里 Q 是样本数, S 类数(即训练数据有几个类号), R 特征数给一个可以跑得通的样例,用UCI的iris数据,把类 阅读全文
posted @ 2013-06-16 15:22 ttang 阅读(795) 评论(0) 推荐(0)
摘要:http://stackoverflow.com/questions/21593/what-is-the-difference-between-include-filename-and-include-filenameThe sequence of characters between < and > uniquely refer to a header, which isn't necessarily a file. Implementations are pretty much free to use the character sequence as they wis 阅读全文
posted @ 2013-06-08 17:19 ttang 阅读(1792) 评论(0) 推荐(0)
摘要:1、weka libsvm classes not in classpath按照这篇文章设置就可以:http://endual.iteye.com/blog/1278381,可以把几个classpath都添上 貌似最终还是没解决,又出了其它问题 阅读全文
posted @ 2013-06-04 14:16 ttang 阅读(268) 评论(0) 推荐(0)
摘要:搜索“ASP solver”可以得到若干个,clasp是其中一个http://www.cs.uni-potsdam.de/clasp/?page=main有本教程叫A User's Guide to gringo,clasp, clingo, and iclingo,Google一下就可以下到Answer Set Programming的优点在于,你只需要定义规则,求解的方法由ASP solver来解决,这是一种declarative language,和SQL同类看如下这个数独(http://www.sudoku.name/index-cn.php):首先描述facts(文件sudo 阅读全文
posted @ 2013-06-04 00:51 ttang 阅读(2177) 评论(1) 推荐(2)
摘要:Excel中有按某一列排序,同时扩展到其他列,Matlab中对应的有sortrows:The MATLAB functionsortrows(A,j)sorts the rows of the matrixabased on the entries of thej-th column. For example, enter the following in MATLAB: A = [1 2 3 3 0 9 6 5 4] B = sortrows(A,2) C = sortrows(A,3)You will receive the following output: B = 3 0 ... 阅读全文
posted @ 2013-06-02 10:43 ttang 阅读(18721) 评论(0) 推荐(0)
摘要:最近用Java写了个pagerank,发现最终算出来的PageRank值的和不是1,但是这个和应该是1的,所以就用python的networkx包中的PageRank算法做了一个测试:import osimport networkx as nxos.chdir('C:\\Users\\XXX\\Desktop\\')filename = 'Wiki-Vote.txt'G=nx.DiGraph()with open(filename) as file: for line in file: head, tail = [int(x) for x in line.spl 阅读全文
posted @ 2013-06-01 23:36 ttang 阅读(16240) 评论(0) 推荐(0)
摘要:http://stackoverflow.com/questions/2828255/how-do-i-increase-the-capacity-of-the-eclipse-output-consoleUnder Window > Preferences, go to the Run/Debug > Console section, then you should see an option "Limit console output." You can uncheck this or change the number in the "Conso 阅读全文
posted @ 2013-06-01 21:56 ttang 阅读(479) 评论(0) 推荐(0)