Programming in html attributes....😭

Refuse to put hyperscript on this list...

Follow this article to implement htmx validation:

The original code is as follows:

// Source: htmx.defineExtension('bs-validation', {   onEvent: function (name, evt, data) {        …

When running the command "RUN sed -i 's/' /etc/apt/sources.list" in the Dockerfile, if you encounter the error "/etc/apt/sources.list: No such file or directory," change "/etc/apt/sources.list" to "/etc/apt/sources.list.d/debian.sources."

For programmers in …

After using the command "service crond status" to check, the following information appears: "Cron: pam_unix (cron:session): session opened/closed for user root by (uid=0)".

This is because cron can run at …

In Chrome extension code, whenever you include the  


tags in HTML and click any button within the form, even if the button type is set to "button" instead of …

A django gettext with python brace format, this is correct :

gettext('Welcome to {0} store!').format(store_name),

and this is wrong:

gettext('Welcome to {0} store!'.format(store_name))

While upgrading Django Channels from 3.x to 4.0, if you encounter issues with the WebSocket handshake process, one solution is to add "daphne" to the top of the INSTALLED_APPS list …

First time using Copilot to code, I need to keep my mind focused and not be distracted by it...

pip install segno import segno wifi_settings = { ssid='(Wifi Name)', password='(Wifi Password)', security='WPA', } wifi = segno.helpers.make_wifi(**wifi_settings), dark=yellow, light=#323524, scale=8)


I tried to retrieve data using the BigIntegerField ID in Django, but the returned queryset was empty.

After trying several times, I found that all of the IDs became 6977919360329322000, …

家里一个连接信息板的小显示器是某宝上买的电子垃圾, 经常重启树莓派后显示“无信号”, 像碰运气一样拔插电源成功.

今天实在受不了, 网上查了下, 

vim /boot/config.txt 里把 config_hdmi_boost = 前面的注释去掉, 重启, 搞定.

上一行的注释里写着门板大一样的一行说明: “uncomment to increase signal to HDMI, if you have interference, blanking, or no display”.

apt autoremove --purge


用如下语句Group By并算出每个类别的总和, 总是得不出要用的结果, 也就是分组总不成功 queryset = MyModel.objects.all().values('category').annotate(total_amount=Sum('amount'))

打印Sql语句之, print(queryset.query)

发现Group by 条件不只是把category列进去了, 还把另外一个字段A也列了进去, 原来是是模型里用了字段A默认排序, 给自动加到这来了.

清空默认排序, 改成如下语句即可:

queryset = MyModel.objects.all().values('category').order_by().annotate(total_amount=Sum('amount'))
在truffle-config.js里增加配置节 compilers: { solc: { version: "0.8.15" // 或者你想要的Solidity版本 } }

看来要开始教Python了(主要是我对Scratch没兴趣), 另外弄一张卡把他的Raspberry Pi 400装个RetroPie弄成游戏机激发一下?


docker buildx version docker buildx create --name mybuilder(or whatever name) docker buildx use mybuilder(or whatever name)


docker buildx ls docker buildx build --platform linux/amd64,linux/arm64 -t . …

打算开发一个小小的物联网JS SDK, 想想现在都是所谓的“现代JS框架当道", 琢磨着做成npm包

我艹添加一个依赖, node_modules里多出几十个文件夹...

docker exec -i registry_name sh -c "registry garbage-collect /etc/docker/registry/config.yml -m"

注意: 会把所有镜像都删掉...如果不是实在硬盘没空间了, 别这么手残.


  • 第 1 页 / 共 11 页
  • 下页