##可能涉及的东西
Java html css js 数据库
Python
##版本与开发环境
Java版本:1.7
开发环境:Eclipse IDE for Java EE Developers,版本代号Luna
##学习方式
不限,自学为主,有问题可以问。
##学习过程:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #IfWinActive ahk_class ConsoleWindowClass | |
| $*MButton:: | |
| SendInput {Raw}%clipboard% | |
| return | |
| #IfWinActive |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #coding=utf-8 | |
| from igraph import * | |
| from sets import Set | |
| import random | |
| import copy | |
| import math | |
| def diffusion(g, beta=0.2, origin=0, timeLength=4040): | |
| print "beta:%f, origin:%d" % (beta,origin) | |
| lastNewSet = Set() # set of newly infected nodes in last timestep | |
| currentNewSet = Set() # set of newly infected nodes in current timestep |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set nocompatible | |
| set encoding=utf-8 | |
| set termencoding=utf-8 | |
| set fileencoding=utf-8 | |
| set fileencodings=ucs-bom,utf-8,chinese,cp936 | |
| set nu | |
| set ts=4 | |
| set expandtab | |
| set autoindent | |
| set shiftwidth=4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #coding=utf-8 | |
| import diffusion_i as dfi | |
| import numpy as np | |
| import pylab as pl | |
| from igraph import * | |
| def countN(g,beta,times): | |
| count = [] | |
| for i in xrange(times): | |
| result = dfi.diffusion(g=g,beta=beta) | |
| print('.'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % pagerank | |
| A=[0.0166666666666667,0.466666666666667,0.0166666666666667,0.0166666666666667,0.166666666666667,0.0166666666666667;0.466666666666667,0.0166666666666667,0.916666666666667,0.0166666666666667,0.166666666666667,0.0166666666666667;0.466666666666667,0.466666666666667,0.0166666666666667,0.316666666666667,0.166666666666667,0.0166666666666667;0.0166666666666667,0.0166666666666667,0.0166666666666667,0.0166666666666667,0.166666666666667,0.466666666666667;0.0166666666666667,0.0166666666666667,0.0166666666666667,0.316666666666667,0.166666666666667,0.466666666666667;0.0166666666666667,0.0166666666666667,0.0166666666666667,0.316666666666667,0.166666666666667,0.0166666666666667;] | |
| P0=[0.166666666666667;0.166666666666667;0.166666666666667;0.166666666666667;0.166666666666667;0.166666666666667;] | |
| r(:,1)=P0 | |
| for i = 1:50 | |
| r(:,i+1) = A^i*P0 | |
| end | |
| x = [1:51] | |
| plot(x,r,'DisplayName','r vs.x','XDataSource','x','YDataSource','r');figure(gcf) | |
| % ---- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select c from (SELECT count(*) as c, weibo.uid FROM demo.weibo join user on weibo.uid = user.uid group by weibo.uid order by c desc) as temp where c > 5; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select * from pond.userrelation ur left join user u on ur.tuid = u.uid where u.uid is null; | |
| alter table userrelation add constraint fk_userrelation_tuid foreign key (tuid) references user(uid); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package hpcde; | |
| import java.io.File; | |
| import java.io.FileInputStream; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| import org.apache.lucene.analysis.Analyzer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package hpcde; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import org.apache.lucene.analysis.Analyzer; | |
| import org.apache.lucene.analysis.standard.StandardAnalyzer; | |
| import org.apache.lucene.document.Document; | |
| import org.apache.lucene.index.DirectoryReader; | |
| import org.apache.lucene.index.IndexReader; |