Skip to content

Instantly share code, notes, and snippets.

View Nkzn's full-sized avatar

Yukiya Nakagawa Nkzn

View GitHub Profile
public class HelloWorld {
public static void main (String[] args) {
User tom = new User("tom");
SubUser bob = new SubUser("bob");
tom.sayHi();
bob.sayHi(); // オーバーライドしたのでUserと挙動が違うはず
}
}
class User {
@Nkzn
Nkzn / FizzBuzz.ts
Last active August 29, 2015 14:01
わかめ本読みながらなんとなく書いてみたFizzBuzz
/**
* "003: Fizz"
* "004: 4"
* "005: Fizz"
* のように、"count: word"の形式で、渡された数字と処理済みの文字を整形して表示する
*/
var logCount = (count: number, word = String(count)) => console.log(("00" + count).slice(-3) + ": " + word);
for (var i = 1; i <= 100; i++) {
if (i % 15 === 0) {
@Nkzn
Nkzn / nds37.md
Last active August 29, 2015 14:05
glide用

スレッドへの造詣が浅すぎる人が意識してるスレッド

なかざん

@Nkzn
Nkzn / agreement.md
Last active August 29, 2015 14:07
Google Play デベロッパー販売 / 配布契約書が9/25付で更新されてたので、diff取ってみたよー(読みやすさのため、見出しだけ勝手にMarkdown付けました)

Google Play デベロッパー販売 / 配布契約書

定義

「認定携帯通信会社」とは、自社のネットワーク上で対象端末のユーザーに販売された対象製品について販売手数料を受け取ることを認められた携帯電話会社を意味します。

「ブランド表示」とは、各当事者がその時点で所有して(またはライセンス許諾を受けて)いる各当事者の商標名、商標、サービスマーク、ロゴ、ドメイン名、およびその他のブランド識別表示を意味します。

@Nkzn
Nkzn / currying.swift
Created January 8, 2015 04:23
カリー化の練習
// カリー化されていない関数
func uncurriedAdd(let a:Int, let b:Int) -> Int {
return a + b
}
uncurriedAdd(1, 2) // 3
uncurriedAdd(2, 23) // 25
uncurriedAdd(4, 2) // 6
// カリー化された関数
@Nkzn
Nkzn / ListActivity.java
Created May 8, 2015 07:47
できるかなと思ったらできちゃったやつ
public class ListActivity extends AppCompatActivity {
@InjectView(R.id.list_view)
ListView listView;
public void onCreate(Bundle savedInstanceState) {
super(savedInstanceState);
ButterKnife.inject(this);
Observable.just(
R.string.listitem1,
@Nkzn
Nkzn / fate.md
Last active August 29, 2015 14:23
これから始めるFate世界

オススメ順は最後に。

本編

  • Fate/stay night
  • TVアニメ(セイバールート) 2006年
@Nkzn
Nkzn / git-mr-diff.rb
Last active March 16, 2022 23:32
Make a markdown list with a range of commits. http://qiita.com/Nkzn/items/60b30f1c9d0e33dfc424
#! /usr/bin/ruby
# The MIT License (MIT)
# Copyright (c) 2016-2019 Yukiya Nakagawa <yn.airscope@gmail.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OT
@Nkzn
Nkzn / niigata_community.md
Created December 9, 2015 11:08 — forked from NPoi/niigata_community.md
新潟県内のコミュニティについて

Cordovaのリリースエンジニアリングのお話

  • Niigata.js #1
  • 2016.4.23(Sat.) @Nkzn

Cordovaって聞いたことありますか

https://cordova.apache.org/