Skip to content

Instantly share code, notes, and snippets.

你可能其實不懂繼承 - 什麼是 Covariance 跟 Contravariance

在近代高等程式語言快(ㄏㄨˋ)速(ㄒ一ㄤ)演(ㄔㄠ)化(ㄒㄧˊ)的狀況下,很多 strong type 的程式語言都開始有了 generic 的設計, 舉例來說:

(這只是大略分類)

  • Mobile: Swift, Kotlin
  • Frontend: Flowtype, TypeScript
  • 後端語言:Python (pyre), Scala, C#, Java (沒錯!現在連 Java 都有)
@bingluen
bingluen / drugstore-gps.csv
Created February 4, 2020 15:55
健保特約醫事機構-藥局資料含座標
We can't make this file beautiful and searchable because it's too large.
醫事機構代碼,醫事機構名稱,醫事機構種類 ,電話,地 址 ,Response_Address,Response_X,Response_Y,分區業務組,特約類別,服務項目 ,診療科別 ,終止合約或歇業日期 ,固定看診時段 ,備註
5901012203,博荃藥局,藥師自營,02 -27316736,台北市松山區敦化北路4巷51號,臺北市松山區中正里18鄰敦化北路4巷51號,121.544742,25.050063,臺北業務組,藥局,,,,星期一上午看診、星期二上午看診、星期三上午看診、星期四上午看診、星期五上午看診、星期六上午看診、星期日上午休診、星期一下午看診、星期二下午看診、星期三下午看診、星期四下午看診、星期五下午看診、星期六下午看診、星期日下午休診、星期一晚上看診、星期二晚上看診、星期三晚上看診、星期四晚上看診、星期五晚上看診、星期六晚上看診、星期日晚上休診,"如遇國定連續假期,藥局公休"
5901012383,德川中西藥局,藥劑生自營,02 -27683399,台北市松山區八德路4段96號,臺北市松山區復盛里17鄰八德路四段96號,121.560660,25.048360,臺北業務組,藥局,,,,星期一上午看診、星期二上午看診、星期三上午看診、星期四上午看診、星期五上午看診、星期六上午休診、星期日上午休診、星期一下午看診、星期二下午看診、星期三下午看診、星期四下午看診、星期五下午看診、星期六下午休診、星期日下午看診、星期一晚上看診、星期二晚上看診、星期三晚上看診、星期四晚上看診、星期五晚上看診、星期六晚上休診、星期日晚上休診,
5901012409,家音藥局,藥師自營,02 -37652080,台北市松山區民生東路5段73號,臺北市松山區東榮里7鄰民生東路五段73號,121.558489,25.058709,臺北業務組,藥局,,,,星期一上午看診、星期二上午看診、星期三上午看診、星期四上午看診、星期五上午看診、星期六上午看診、星期日上午看診、星期一下午看診、星期二下午看診、星期三下午看診、星期四下午看診、星期五下午看診、星期六下午看診、星期日下午看診、星期一晚上看診、星期二晚上看診、星期三晚上看診、星期四晚上看診、星期五晚上看診、星期六晚上看診、星期日晚上看診,早上9:00到晚上11:00
5901012454,敦北藥局,藥師自營,02 -27155691,台北市松山區民生東路4段80巷5號,臺北市松山區東
@meyu
meyu / Install Autosub on macOS.md
Last active March 1, 2024 06:40
Install Autosub on macOS

預先安裝(若需要)

安裝 Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

安裝 FFmpeg

brew install ffmpeg
@dabit3
dabit3 / SubscriptionHook.js
Last active January 26, 2021 16:04
Example of using custom React hooks for managing GraphQL subscriptions
import { useEffect, useState } from 'react'
import { API, graphqlOperation } from 'aws-amplify'
const ListTalks = `
query {
listTalks {
items {
name
description
presenter {
-- programming
data Nat : Set where
zero : Nat
suc : Nat → Nat
_+_ : Nat → Nat → Nat
zero + n = n
suc m + n = suc (m + n)
@justinwoo
justinwoo / purescript-reactive-programming-notes.md
Last active March 30, 2021 14:01
Purescript Reactive Programming options

Here are some of the examples of Reactive Programming libraries I've found in Purescript and what I've thought about them so far:

I've never used a library with truly continuous Behaviors, so this was really neat to try out for me. Really nice to use and comes with utilities for working with browser events already, and gives you good Event modules for picking your sampling options as necessary.

I will probably use this library for all of my future uses.

@TsunaMoo
TsunaMoo / GAME_MASTER_POKEMON_v0_2.tsv
Last active August 9, 2023 12:10 — forked from anonymous/GAME_MASTER_POKEMON_v0_2.tsv
Pokemon from GAME_MASTER protobuf file v0.2 in a .tsv
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 31 columns, instead of 20. in line 3.
PkMn Identifier EvolvesFrom EvolvesTo EvoChainID EvoStage EvolutionPips BaseStamina BaseAttack BaseDefense Type1 Type2 BaseCaptureRate BaseFleeRate CollisionRadiusM CollisionHeightM CollisionHeadRadiusM MovementType MovementTimerS JumpTimeS AttackTimerS QuickMoves CinematicMoves PokemonClass PokedexHeightM PokedexWeightKg HeightStdDev WeightStdDev CandyFamily CandyToEvolve AnimTime
1 Bulbasaur 0 Ivysaur 1 1 NORMAL 90 126 126 GRASS POISON 0,16 0,10 0,38 0,65 0,27 JUMP 10,00 1,15 29,00 Vine Whip, Tackle Sludge Bomb, Seed Bomb, Power Whip 1,00 0,70 6,90 0,09 0,86 001_BULBASAUR 25 6d56d53fdaac2a3f6d56d53f93a9ea3f0000000036ab0a403333b33fbfbbbb3f
2 Ivysaur Bulbasaur Venusaur 1 2 NORMAL 120 156 158 GRASS POISON 0,08 0,07 0,32 0,64 0,25 JUMP 23,00 1,50 8,00 Razor Leaf, Vine Whip Sludge Bomb, Solar Beam, Power Whip 1,00 1,00 13,00 0,13 1,63 001_BULBASAUR 100 36ab2a40daac2a3f6d56d53f36ab0a4000000000000000406d56d53fdbdddd3f
3 Venusaur Ivysaur 0 1 3 NORMAL 160 198 200 GRASS POISON 0,04 0,05 0,76 1,03 0,38 JUMP 11,00 1,25
@boopathi
boopathi / README.md
Last active August 28, 2023 14:35
Creating a Swift-ReactNative project

Settings

  1. Create a project in XCode with the default settings
    • iOS > Application > Single View Application
    • Language: Swift
  2. Under project General settings, add ReactKit to Linked Framework and Libraries
    • + > Add Other... and choose /path/to/react-native/ReactKit/ReactKit.xcodeproj
  3. Now ReactKit would have been imported. Link it by choosing it from the list.
    • + > lib.ReactKit.a
  4. Under project Build Settings,
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@arielsalminen
arielsalminen / 2col_masonry_layout.html
Last active October 15, 2016 21:22
Easily turn simple 1-column layout into a fluid 2-column masonry layout without JS plugins. Works even in IE6! Check the live example here: http://viljamis.com/columns/
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>2-column fluid masonry layout without JS plugins</title>
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<style>
body {
text-align: center;
padding: 3% 8%;