Skip to content

Instantly share code, notes, and snippets.

View tag1216's full-sized avatar
😇

tag1216 tag1216

😇
View GitHub Profile
@tag1216
tag1216 / index.html
Last active August 29, 2015 14:06
Qiita新着投稿100件のタグをd3.jsのForceレイアウトで表示
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Qiita新着投稿100件のタグをd3.jsのForceレイアウトで表示</title>
<style>
svg {
border: solid 1px;
}
.node circle {
@tag1216
tag1216 / Comparatorのメソッドを使ってソート
Last active August 29, 2015 14:06
連休だしJavaコレクションの歴史を振り返ってみる ref: http://qiita.com/tag1216/items/3f222ae3cae88210f769
persons.sort(Comparator.comparing(
Person::getLastName, Comparator.reverseOrder()));
@tag1216
tag1216 / index.html
Last active August 29, 2015 14:06
Qiita新着投稿100件のタグをd3.jsのForceレイアウトで表示2
<!DOCTYPE html>
<meta charset="utf-8">
<title>Qiita新着投稿100件のタグをd3.jsのForceレイアウトで表示2</title>
<style>
svg {
border: solid 1px;
}
.item image {
opacity: .7;
}
@tag1216
tag1216 / 0_reuse_code.js
Last active August 29, 2015 14:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tag1216
tag1216 / javascript_resources.md
Last active August 29, 2015 14:06 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
import time
import codecs
import json
from logging import getLogger
import requests
from urllib.parse import urlparse, parse_qs
logger = getLogger(__name__)
@tag1216
tag1216 / all-items.tsv
Created October 6, 2014 09:12
NVD3でQiitaの投稿を月単位で集計したグラフを作ってみた
We can't make this file beautiful and searchable because it's too large.
2011-09-16 03:01:10 +0900 Ruby FizzBuzz
2011-09-16 13:38:20 +0900 Emacs
2011-09-16 13:39:42 +0900 Ruby
2011-09-16 13:43:07 +0900 Ruby
2011-09-16 13:44:24 +0900 Objective-C
2011-09-16 13:45:52 +0900 Perl
2011-09-16 13:46:02 +0900 Perl
2011-09-16 13:56:03 +0900 awk
2011-09-16 14:08:33 +0900 Ruby
2011-09-16 14:10:42 +0900 Objective-C
@tag1216
tag1216 / all-items.tsv
Created October 6, 2014 11:35
NVD3でQiitaのタグを月単位で集計したグラフを作ってみた
We can't make this file beautiful and searchable because it's too large.
2011-09-16 03:01:10 +0900 Ruby FizzBuzz
2011-09-16 13:38:20 +0900 Emacs
2011-09-16 13:39:42 +0900 Ruby
2011-09-16 13:43:07 +0900 Ruby
2011-09-16 13:44:24 +0900 Objective-C
2011-09-16 13:45:52 +0900 Perl
2011-09-16 13:46:02 +0900 Perl
2011-09-16 13:56:03 +0900 awk
2011-09-16 14:08:33 +0900 Ruby
2011-09-16 14:10:42 +0900 Objective-C
@tag1216
tag1216 / gist:4ce8c5c0d8d60e818d77
Last active August 29, 2015 14:10
指定文字列をn回繰り返す
public static String repeat(String value, int count) {
return IntStream.range(0, count)
.collect(StringBuilder::new, (sb, x) -> sb.append(value), StringBuilder::append)
.toString();
}
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import java.util.stream.Stream;