URLをいじくるプログラムをいじっていて、仕様がよくわからなくて悩んだのでまとめます。 2/23: 追試部分を追記 2018/7/14: JavaScriptのURLSearchParamsと、GoのPathEscapeについて追記 ことの経緯 HTTPとはなんぞやとか、GETとPOSTがどうの、それぞれでパラメータがどういう経緯でウェブアプリケーション(とかCGI)に渡って来るのかぐらいは知っていました。で、ウェブでXHRでGETリクエストを送る場合にはJavaScriptのencodeURIComponent()で各パラメータをエンコードして、&でくっつけて、URLの末尾に?で付与すればいいんだよね?と思っていました。こんな感じに。 var finalUrl = [url, "?", encodeURIComponent("key"), "=", encodeURIComponent(
ネストしたモジュールとかクラスの定義方法には、まあ二つくらい書き方がある。 バカ正直にネストしたモジュールを並べる方法。 module A module B module C ... end end end ::演算子を使う方法。 module A::B::C ... end この二つは同じだと思っていたのだけど、同じではなかったことに気付いたという話。 私は、これまでは後者の方を好んで書いていた。なぜかというと、定数のネストの途中に出てくるAやA::Bがモジュールなのかクラスなのかを考えなくて良いからだ。純然たる名前空間として使うときはモジュールが使われるが、クラスのこともある。考えたくない。 この二つの違いは、定数を参照するときである。具体的に言うと、次のような定数A::B::Xを参照するときに違いが生まれる。 module A module B X = "A::B::X" end e
Introduction to Facebook's Flux architectureFebruary 21, 2015 The versions of Flux and React in this article are quite old - some of this may not work If you’re like me and you wanted to go further with React, you more than likely would’ve checked out Flux, had a glance, closed the tab and then reassessed your life as a Javascript developer. If you’re not familiar with React, please checkout my ge
This post is about something I see as a continuing trend in the design world: the rise of the meta-designer and algorithmic design systems. "Meta-design is much more difficult than design; it’s easier to draw something than to explain how to draw it" - Donald Knuth, The Metafont Book Until recently, the term Graphic Designer was used to describe artists firmly rooted in the fine arts. Aspiring des
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く