You will be automatically redirected to the new location of this page.
You will be automatically redirected to the new location of this page.
ライブリッツの筒井です。 GoのORマッパー連載、おまけ記事です。 特に示し合わせた訳では無いのですが、RDBは全員がPostgreSQLを使っていましたね。 さて、今回の連載記事のいくつかでも言及されていた、jackc/pgx について簡単に紹介します。 GoとPoatgreSQLでCOPY GORM v1 と v2 のソースコードリーディングしてみた GoでのPostgreSQLドライバは lib/pq が定番でしたが、現在その開発は消極的で今後機能が追加されることはめったに無いそうです。 https://github.com/lib/pq#status 一方 pgx は現在も活発に開発がなされており、GORM v2にも採用されています。 使い方の比較lib/pq (およびdatabase/sql)と pgx の使い方を比較していきます。 pgxはドライバだけでなく database/
Resilient Import Maps - Better Theme Development and BeyondImport maps are great for both performance and developer experience, but their original limitations made them hard to use, especially at Shopify’s scale. We stepped up and pushed changes across the HTML spec, Chromium and WebKit to fix these issues at the web platform level. Now, developers can interleave JavaScript modules and multiple im
We recently shipped import maps in Firefox 108 and this article is the first in a series that describes what they are and the problems they can solve. In this first article, we will go through the background and basics of import maps and follow up with a second article explaining more details of import maps. Background: JavaScript Modules If you don’t know JavaScript modules, you can read the MDN
In this article, we’ll show how we cut CKEditor 5’s bundle size by 40% through tree-shaking and bundle size optimization techniques and share tricks you can use to slim down your own JavaScript libraries. We’ll also walk through the tools and processes we used to achieve this, measure improvements, and catch regressions. As any software library author will tell you, building and maintaining is har
始めに UXの向上のため名前を入力した際にふりがなを自動で入力したいことがあると思います。調べた感じ以下の2つのライブラリが有名っぽい気がしたのでそれぞれについて検証してみました。 https://www.npmjs.com/package/vanilla-autokana https://www.npmjs.com/package/historykana サンプルはcodesandboxで書きましたので、動作を確認したい方は触ってみてください。 各ライブラリの使い方 vanilla-autokana こちらはjqueryのプラグインにあるautokanaをインスパイアして作られたもののようです。DOM要素を指定するだけで後は自動で変換されるので楽ですね。 import * as AutoKana from 'vanilla-autokana'; AutoKana.bind('#name'
当記事ではPowerShellでモジュールを取り扱う方法を解説します。 1. モジュールとは 当記事で言うモジュールとは、自作した変数・関数・クラスを様々なスクリプトで再利用できるようにする仕組み、および当該の仕組みで参照されるファイル、とでも緩やかに定義しておきます。まぁ、何となく言わんとすることは分かってもらえるかと思います。 PowerShellでモジュールを利用する方法は、いくつかありますので順を追って紹介していきます。 2. スクリプトファイルで区切る 最も単純明快な方法と言えるのは、使いまわしたい処理をスクリプトファイルに格納し、当該スクリプトファイルを呼び出すという方法です。 2-1. 取扱い方 エントリポイントなるファイルをIndex.ps1とし、モジュールとして呼び出したいファイルをModule.ps1とします。それらを以下のように配置します。一応言っておきますが、これは
The exports field in the package.json of a package allows to declare which module should be used when using module requests like import "package" or import "package/sub/path". It replaces the default implementation that returns main field resp. index.js files for "package" and the file system lookup for "package/sub/path". When the exports field is specified, only these module requests are availab
Module FederationMicro-Frontend Architecture Make it easier to share code between javascript applications and make team collaboration more efficient
Update 2025-01-09: Switching from import assertions (keyword assert) to import attributes (with). In this blog post, we examine the ECMAScript proposal “JSON modules” (by Sven Sauleau, Daniel Ehrenberg, Myles Borins, and Dan Clark). It lets us import JSON data as if it were an ECMAScript module. JSON modules are at stage 4 and will probably be part of ECMAScript 2025. Why would we want to import J
とほほのperl入門 トップ > とほほのperl入門 概要編 Perlとは インストール 実行方法 引数指定 ファイル指定 自己完結型 標準入力読み込み型 基礎知識 簡単な実行例 これだけは覚えて strictモードと警告モード 関数の括弧 定数 数値 文字列 エスケープシーケンス(\) 数値と文字列 真(true)と偽(false) バイナリデータ 変数 変数宣言(my) スカラ($XXX) 配列(@XXX) ハッシュ(%XXX) 変数名に使える文字 定義済変数みと未定義変数 省略時の変数($_) 環境変数($ENV{'XXX'}) コマンド引数($ARGV) シグナル($SIG{'XXX'}) その他の特殊変数($X) 演算子 代入演算子 算術演算子 ビット演算子 数値比較演算子 文字列比較演算子 条件演算子 正規表現マッチング 文字列連結 文字列置換 繰り返し演算子 範囲演算子 フ
When we introduce module blocks, our configuration becomes hierarchical rather than flat: each module contains its own set of resources, and possibly its own child modules, which can potentially create a deep, complex tree of resource configurations. However, in most cases we strongly recommend keeping the module tree flat, with only one level of child modules, and use a technique similar to the a
検証環境CentOS 8 で検証する。 ]# cat /etc/redhat-release CentOS Linux release 8.1.1911 (Core) ]# uname -a Linux localhost.localdomain 4.18.0-80.el8.x86_64 #1 SMP Tue Jun 4 09:19:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux カーネルコンフィグ異なるバイナリを作成するための設定。Linux は様々なハードウェアをサポートしており、また、機能もわんさかある。これらの機能をすべて実行バイナリに含めると、使ってない機能のせいでセキュリティリスクが無駄に高くなったりバイナリサイズがでかくなったり分岐処理が挟まって性能が落ちたりして都合が悪い。そこで、ソースコードレベルで機能の有効/無効を切り替えて専用のカ
ESM-CJS interop test Test Cases Results Node.js Babel Webpack Rollup.js Parcel esbuild Results by test case Results by syntax import x and similar import { named } and similar import { __esModule } and similar import * and similar import() and similar require().default and similar require().named and similar require().__esModule and similar require() and similar Direct differences Webpack <-> Node
A module’s developer uses each part of a module’s version number to signal the version’s stability and backward compatibility. For each new release, a module’s release version number specifically reflects the nature of the module’s changes since the preceding release. When you’re developing code that uses external modules, you can use the version numbers to understand an external module’s stabilit
Markdown editing can be even more delightful.MDXEditor is an open-source React component that allows users to author markdown documents naturally. Just like in Google docs or Notion.
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く