View collect_unique_items.rb
ws = x[:y].map do |y|
y[:z].map do |z|
z[:w]
end
end
ws.flatten.uniq {|w| w[:key]}
View collect_unique_items.rb
ws = {}
x[:y].each do |_, y|
y[:z].each do |_, z|
z[:w].each do |_, w|
ws[w[:key]] = w
end
end
end
ws.values
View collect_unique_items.rb
ws = x[:y].map do |y|
y[:z].map do |z|
z[:w]
end
end
ws = ws.flatten
.group_by {|w| w[:key]}
.map {|k, v| v.first}
View shaker.cpp
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <ctime>
template<typename BidirectionalIterator>
void bubble_sort( BidirectionalIterator first, BidirectionalIterator last )
{
if( first == last ) return;
View beppyo.py
#!/usr/bin/env python3
import re
# http://law.e-gov.go.jp/htmldata/S40/S40SE185.html
別表第一 = '''三六月 一八、三七〇円 一八、二五〇円 一四、八八八円
三七月 一八、八九〇円 一八、七六〇円 一五、三二〇円
三八月 一九、四二〇円 一九、二八〇円 一五、七五二円
三九月 一九、九四〇円 一九、八〇〇円 一六、一八四円
四〇月 二〇、四七〇円 二〇、三二〇円 一六、六二四円
View five_parameters_elephant.as
package {
import flash.display.Sprite;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.events.Event;
import flash.geom.Rectangle;
import flash.utils.getTimer;
public class Elephant extends Sprite {
View smoking_clover.as
package {
import flash.display.Sprite;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.events.Event;
public class SmokingClover extends Sprite {
private const N_COLORS:int = 256;
private const RADIUS:int = 5432;
private const MINVEL:Number = .003;
View munching_square.as
package {
import flash.display.Sprite;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.events.Event;
public class MunchingSquare extends Sprite {
private var canvas:BitmapData;
private var canvasBitmap:Bitmap;
private var n:int = 1;
View tunnel.as
package {
import flash.display.Sprite;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Loader;
import flash.events.Event;
import flash.net.URLRequest;
import flash.utils.getTimer;
import flash.system.LoaderContext;
View .eslintrc
{
"extends": "airbnb",
"rules": {
"semi": ["error", "never"],
"no-restricted-syntax": [
"error",
"LabeledStatement",
"WithStatement",
],
"class-methods-use-this": "off",