2021-01-01から1年間の記事一覧
modeling-how-to-learn.connpass.com ちょうどエヴァンス本を読んでる時にこちらのイベントを目にしたので申し込んでみました。 自分用ノートです。 イントロダクション 現場から学ぶモデル駆動設計 グループ https://modeling-how-to-learn.connpass.com/ …
クリティカルなデータベースにPhpStormから接続する時は、[Data Sources and Drivers] → [Options] にてRead-onlyにチェックを入れることで、読み取り専用状態でデータベースにアクセスすることができる。 その他のJetBrains製IDEでも同様かと思われる。
起きたこと Dockerコンテナ上のComposerでパッケージを追加しようとした時にCannot allocate memoryエラーが出た。 [root@8b736af411ab www]# composer require --dev squizlabs/php_codesniffer mmap() failed: [12] Cannot allocate memory mmap() failed:…
レンダラープロセスでMediaStreamでカメラ映像を表示しつつ、メインプロセスでnode-webcam - npmを使って定期的にカメラ映像を撮影しようとしたところ、表題の問題にぶつかった。 macOS向けアプリケーションでは発生しない。 答え video - Is it possible fo…
blog.vuejs.org Vue3.2がリリースされたらしい。内容がいい感じだった。 script setup Compositon APIで書くとどうしても気になる構文の縦長さ。 <template> <button @click="addNum">Num:{{ num }} </div> <template> <script> import { ref } from 'vue' export default { setup () { const num = ref(10) const addNu</template>…
use Illuminate\Support\Facades\Hash; ... $user = User::where(['id' => 1])->firstOrFail(); // passwordはHash::make()で作成 $beforeHash = $request['beforeHash']; if (Hash::check($beforeHash, $user->password)) { echo("一致しました!"); } else…
withで指定した要素に無名関数を渡す order by Order::with(['order_detail' => function ($query) { $query->orderByDesc('created_at'); }])->get(); select * from `order_details` where `order_details`.`id` in (1) order by `created_at` desc where …
スクロールバーのデザインの為 <template> <style>.scroll-bar-input::-webkit-slider-thumb {width: $ratio + %;}</style> </template> こういうことがしたかったが、 VueCompilerに怒られる VueCompilerError: Tags with side effect (<script> and <style>) are ignored in client component templates. 対策 …
Laravelでhaving句を使って集計を行うとき、こんな書き方をする。 Model::withCount('xxxx')->having('xxxx_count', '>', 1); ただ、paginateを付けたい場合 Model::withCount('xxxx')->having('xxxx_count', '>', 1)->paginate(20); とやると、エラーが出る…
PHPerからしたらありふれすぎた話だけど、2021/07/31の1ヶ月前をCarbonで取得しようとして死んだ。 なにがおきたか こうすると $date = new Carbon('20210731')->subMonth(1); echo($date); こうなる 2021-07-01 00:00:00 2021-06-30 00:00:00じゃないの? …
% node -v v14.16.0 % npx create-next-app suburi-next npx: installed 1 in 1.195s Creating a new Next.js app in /Users/tagami/suburi-next. Installing react, react-dom, and next using yarn... yarn add v1.22.10 info No lockfile found. [1/4] R…