技術的負債は開発者体験を悪化させる https://speakerdeck.com/mtx2s/technical-debt-and-developer-experience
This file contains 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
fun main() { | |
val string = "GAKKOU" | |
val chars: List<Char> = string.toList() | |
val word = chars.permutations().distinct().map { it.toCharArray().concatToString() }.sorted()[99] | |
println(word) | |
} | |
fun <T> List<T>.permutations(): List<List<T>> { | |
if (this.isEmpty()) return listOf(emptyList()) |
This file contains 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
import Algorithms | |
let word = ("GAKKOU".permutations().uniqued().map { String($0) }.sorted(by: <)[99]) | |
print(word) |
This file contains 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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
func main() { | |
rand.Seed(time.Now().UnixNano()) |
This file contains 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
import Foundation | |
// try! Swift NYC 2016 | |
// https://academy.realm.io/posts/tryswift-rob-napier-swift-legacy-functional-programming/ | |
// Sample1: 分解して再構築 | |
struct Person { | |
let name: String | |
let isValid: Bool = true | |
} |
This file contains 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
(1...100).map { | |
switch ($0 % 3, $0 % 5) { | |
case (0, 0): return "Fizz Buzz" | |
case (0, _): return "Fizz" | |
case (_, 0): return "Buzz" | |
case (_, _): return "\($0)" | |
} | |
}.forEach { print($0) } |
This file contains 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
(1..100).map { | |
when { | |
it % 15 == 0 -> "fizzbuzz" | |
it % 3 == 0 -> "fizz" | |
it % 5 == 0 -> "buzz" | |
else -> it.toString() | |
} | |
}.forEach { println(it) } |
This file contains 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
import UIKit | |
import PlaygroundSupport | |
let view = UIView(frame: CGRect(x: 0, y:0, width:320, height:44)) | |
view.backgroundColor = UIColor.black | |
PlaygroundPage.current.liveView = view | |
(0...2).forEach { | |
let sushi = UILabel(frame: CGRect(x: 320, y: 0, width: 44, height: 44)) |
This file contains 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
import UIKit | |
import PlaygroundSupport | |
let view = UIView(frame: CGRect(x: 0, y:0, width:320, height:44)) | |
view.backgroundColor = UIColor.black | |
PlaygroundPage.current.liveView = view | |
(0...2).forEach { | |
let sushi = UILabel(frame: CGRect(x:320, y:0, width:44, height:44)) |
This file contains 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
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import urllib.request | |
from bs4 import BeautifulSoup | |
html = urllib.request.urlopen('https://teratail.com/tags/Python') | |
soup = BeautifulSoup(html, 'lxml') | |
userRanking_month = soup.find(id='userRanking__month') |
NewerOlder