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
| #standardSQL | |
| WITH | |
| -- 日毎のユーザーアクセス | |
| DUU_HISTORY AS ( | |
| SELECT | |
| USER_ID, -- 数値型 | |
| DATE -- 日付型 | |
| FROM -- ユーザーIDとアクセス日が記録されたテーブルを書いてね | |
| ), |
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
| from networkx import * | |
| import matplotlib.pyplot as plt | |
| #元データ | |
| data = [["A","B"],["A","C"],["C","B"],["D","C"],["D","E"],["C","E"],["E","F"]] | |
| #ノードの構築 | |
| G = nx.Graph() | |
| for p in list(set([r[0] for r in data] + [r[1] for r in data])): |
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 networkx import * | |
| import matplotlib.pyplot as plt | |
| data = [["A","B"],["A","C"],["C","B"],["D","C"],["D","E"],["C","E"],["E","F"]] | |
| print len(data) |
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
| val query = new StringBuilder("select * from person where ") | |
| if (なまえをあいまいけんさく) { | |
| query.append(" name like '%さん'") | |
| } else { | |
| query.append(" name = 'はなこさん'") |
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
| //これで反転される | |
| //・println(List(1,2,3,4).sortWith((r1, r2) => {r1 > r2})) |
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
| Type nameGenericType= Person.getClass().getField("name").getGenericType(); | |
| ParameterizedType pt = (ParameterizedType) t; | |
| Type ct = pt.getActualTypeArguments()[0]; | |
| String cString = ct.toString(); | |
| String className = cString.substring(cString.indexOf(" ") + 1); | |
| Class s = Class.forName(className); | |