Reactの難しさを分解しよう を読んで。
n番煎じの話題。今更な話題、それはわかってる。自分の周りの環境が変わったので、書き下すことで、再度整理したい。
サーバーが生成するHTMLが一つの粘土の像だとしたら、jQueryがナイフで、Reactは設計図を持った3Dプリンタ。
鼻が大きすぎるから削るとか、ちょっとしたことをやるのが jQuery の主な用途。しかしあるいは、職人的に、大きな塑像から、一つの像を切り出すこともできる。
#!/bin/bash | |
cd /sys/kernel/config/usb_gadget/ | |
mkdir -p procon | |
cd procon | |
echo 0x057e > idVendor | |
echo 0x2009 > idProduct | |
echo 0x0200 > bcdDevice | |
echo 0x0200 > bcdUSB | |
echo 0x00 > bDeviceClass |
// Authoer: The SwiftUI Lab | |
// Full article: https://swiftui-lab.com/scrollview-pull-to-refresh/ | |
import SwiftUI | |
struct RefreshableScrollView<Content: View>: View { | |
@State private var previousScrollOffset: CGFloat = 0 | |
@State private var scrollOffset: CGFloat = 0 | |
@State private var frozen: Bool = false | |
@State private var rotation: Angle = .degrees(0) |
#!/usr/bin/env python | |
# vim: set fileencoding=utf-8 | |
# | |
# USAGE: | |
# Back up your tmux old config, run the script and redirect stdout to your conf | |
# file. Example: | |
# | |
# $ cp ~/.tmux.conf ~/.tmux.conf.orig | |
# $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf | |
# |
library(tidyverse) | |
# Data is downloaded from here: | |
# https://www.kaggle.com/c/digit-recognizer | |
kaggle_data <- read_csv("~/Downloads/train.csv") | |
pixels_gathered <- kaggle_data %>% | |
mutate(instance = row_number()) %>% | |
gather(pixel, value, -label, -instance) %>% | |
extract(pixel, "pixel", "(\\d+)", convert = TRUE) |
Reactの難しさを分解しよう を読んで。
n番煎じの話題。今更な話題、それはわかってる。自分の周りの環境が変わったので、書き下すことで、再度整理したい。
サーバーが生成するHTMLが一つの粘土の像だとしたら、jQueryがナイフで、Reactは設計図を持った3Dプリンタ。
鼻が大きすぎるから削るとか、ちょっとしたことをやるのが jQuery の主な用途。しかしあるいは、職人的に、大きな塑像から、一つの像を切り出すこともできる。
func undefined<T>(_ funcName: String=#function) -> T { | |
fatalError("\(funcName) is undefined.") | |
} | |
class A { | |
lazy var parameter: Int = undefined() | |
} | |
let a = A() | |
a.parameter = 100 |
2024-05-20
@voluntas
2024.1
2022-03-18
@voluntas
2022.1
#!/usr/bin/env python | |
#coding:utf-8 | |
# Exchange usd to any currency, or any currency to usd | |
# help: python convert_usd.py -h | |
import os.path | |
from datetime import date, datetime | |
import argparse | |
import urllib |
Introducing Incremental DOM — Google Developers — Medium
Reactやvirtual-dom、Glimmer(Ember)などVirtual DOMの実装は色々あるが、これらのVirtual DOM実装には2つの問題がある
これらを解決するためにIncremental DOMと言うものを作っている(WIP)