Skip to content

Instantly share code, notes, and snippets.

@sekky0905
sekky0905 / file0.html
Last active September 20, 2017 13:06
CSSの設計方法をまとめてみた~BEM編~ ref: http://qiita.com/Sekky0905/items/c1fc597adab5a77b0ce6
<section class="block-A">
<div class="block-B">
<div class="block-B__element-B1 block-B__element-B1--modifier-B1">B1</div>
<div class="block-B__element-B2 block-B__element-B2--modifier-B2">B2</div>
</div>
<div class="block-C">
<div class="block-C__element-C1 block-C__element-C1--modifier-C1">C1</div>
<div class="block-C__element-C2 block-C__element-C2--modifier-C2">C2</div>
</div>
</section>
@sekky0905
sekky0905 / file0.txt
Last active September 22, 2017 01:52
RxJSの基本をまとめてみた~基本的な概念編(Observable、Observer、Subscriptionなど)~ ref: http://qiita.com/Sekky0905/items/93bd4804a2003ed0aa8d
// observable.subscribeの戻り値として、subscriptionを返却
// observable.subscribeの内部的に、Observerのオブジェクトが生成されていている。
let subscription = observable.subscribe(val => console.log(val));
// 進行中の実行をキャンセル
subscription.unsubscribe();
@sekky0905
sekky0905 / app.component.ts
Last active December 9, 2018 08:10
Angular4(over2~)のロケールとPipe ref: https://qiita.com/Sekky0905/items/565060b4764eb4c68bec
import {Component} from '@angular/core';
@Component({
selector: 'app-root',
template: `<p class="today">
本日は、{{today | date}} だ
</p>
`,
styles: [`
.today{background-color:yellow}
@sekky0905
sekky0905 / Language.java
Last active August 15, 2017 14:36
Javaのシリアライズ(直列化)メモ ref: http://qiita.com/Sekky0905/items/b3c6776d10f183d8fc89
package com.company;
import java.io.Serializable;
/**
* プログラミング言語を表す
* Serializableインターフェースを実装する
*/
public class Language implements Serializable {
@sekky0905
sekky0905 / Main.java
Last active July 25, 2017 14:38
Python3とJavaでクラスを書いてみた ref: http://qiita.com/Sekky0905/items/5b4105a9dcb6e0ff354d
package com.company;
/**
* メイン
*/
public class Main {
public static void main (String[] args) {
System.out.println("===Normal Phone===");
// インスタンス化
Phone normalPhone = new Phone("xxx-xxx-xxx");
@sekky0905
sekky0905 / Main.java
Last active July 25, 2017 14:25
PythonとJavaでクラスを書いてみた ref: http://qiita.com/Sekky0905/items/00961c7db2a5f0c453f9
package com.company;
/**
* メイン
*/
public class Main {
public static void main (String[] args) {
System.out.println("===Normal Phone===");
// インスタンス化
Phone normalPhone = new Phone("xxx-xxx-xxx");
i = 1
while i < 101:
if i % 15 == 0:
print("Fizz Buzz!")
elif i % 3 == 0:
print("Fizz!")
elif i % 5 == 0:
print("Buzz!")
else:
print(i)
@sekky0905
sekky0905 / file0.java
Last active October 10, 2017 16:08
Apache Beam with Google Cloud Dataflow(over 2.0.x系)入門~Combine編~ ref: http://qiita.com/Sekky0905/items/4596660455a7a2af5906
PCollection<Integer> sum = pCollection.apply(Sum.integersGlobally());
@sekky0905
sekky0905 / file0.txt
Last active October 10, 2017 16:09
Apache Beam with Google Cloud Dataflow(over 2.0.x系)入門~基本的なGroupByKey編~ ref: http://qiita.com/Sekky0905/items/941ad819f00390a6929e
Java,1
Python,5
Go,1
Java,3
Java,2
Go,5
Python,2
Go,2
Go,9
Python,6
@sekky0905
sekky0905 / file0.txt
Last active July 16, 2017 06:29
Apache Beam with Cloud Dataflow(over 2.0.0系)入門~基本部分~ParDoまで~ ref: http://qiita.com/Sekky0905/items/381ed27fca9a16f8ef07
[Output PCollection] = [Input PCollection].apply([Transform])