摘要: Dockerfile 入门:https://docs.docker.com/build/building/packaging/ 开始编写 新建目录,创建文件Dockerfile: FROM nginx RUN echo '<h1>Hello, Docker!</h1>' > /usr/share/n 阅读全文
posted @ 2024-01-29 16:31 develon 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 前言 用户既可以使用 docker load 来导入镜像存储文件到本地镜像库,也可以使用 docker import 来导入一个容器快照到本地镜像库。 这两者的区别在于容器快照文件将丢弃所有的历史记录和元数据信息(即仅保存容器当时的快照状态),而镜像存储文件将保存完整记录,体积也要大。 此外,从容器 阅读全文
posted @ 2024-01-16 16:58 develon 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 原理 通过宏实现,代码来自 macro-log: use proc_macro::TokenStream; use quote::quote; use syn::LitStr; pub fn read_dir(args: TokenStream) -> TokenStream { let path 阅读全文
posted @ 2023-10-13 17:40 develon 阅读(70) 评论(0) 推荐(0) 编辑
摘要: # 接上篇 https://www.cnblogs.com/develon/p/17525925.html 参考:https://juejin.cn/post/6844903982742126600 UI 组件:https://www.composables.com/components/mater 阅读全文
posted @ 2023-07-17 22:03 develon 阅读(19) 评论(0) 推荐(0) 编辑
摘要: # 接上篇 https://www.cnblogs.com/develon/p/17417599.html AndroidX Github: https://github.com/androidx/androidx 参考:https://juejin.cn/post/6965127022217543 阅读全文
posted @ 2023-07-04 15:38 develon 阅读(189) 评论(0) 推荐(0) 编辑
摘要: # async 观察代码: ``` async fn dd(a: i32) -> i32 { dbg!(a); 2 * a } ``` 异步方法内可以执行await,很显然上面的代码等价于下面两种形式: ``` async fn dd(a: i32) -> i32 { dbg!(a); async 阅读全文
posted @ 2023-07-01 18:25 develon 阅读(35) 评论(0) 推荐(0) 编辑
摘要: # 上一篇 [Nest.js + TypeOrm:安装、编写实体类](https://www.cnblogs.com/develon/p/17428854.html) # DataSource.query 进行参数化原始SQL查询 使用 DataSource.query(),注意,如果是 Postg 阅读全文
posted @ 2023-06-09 15:00 develon 阅读(693) 评论(0) 推荐(0) 编辑
摘要: C / C++ https://www.cnblogs.com/develon/p/7845880.html 日志追踪 安卓NDK 编译器内置 __FILE_NAME__, __LINE__,__func__,__FUNCTION__ 等宏,可追踪打印日志的代码。 #include <android 阅读全文
posted @ 2023-06-04 17:24 develon 阅读(55) 评论(0) 推荐(0) 编辑
摘要: # 接上篇 https://www.cnblogs.com/develon/p/16464371.html # 错过了什么? 事实上, 下面两种方式都是可行的: ``` add_library( rust SHARED IMPORTED GLOBAL) set_property( TARGET ru 阅读全文
posted @ 2023-06-01 20:35 develon 阅读(185) 评论(1) 推荐(0) 编辑
摘要: # npm proxy ``` $ npm config get proxy http://127.0.0.1:25378/ ``` 如果你的npm设置了如上代理,那么当请求本地服务时,应该会出现代理错误(通常是502响应): ``` import { HttpService } from '@ne 阅读全文
posted @ 2023-05-29 15:42 develon 阅读(133) 评论(0) 推荐(0) 编辑
摘要: # 异常过滤器 ## @UseFilters @UseFilters 用于设置异常过滤器,作用于控制器 MethodDecorator & ClassDecorator: ``` import { Controller, UseFilters } from '@nestjs/common'; @Co 阅读全文
posted @ 2023-05-26 10:24 develon 阅读(155) 评论(0) 推荐(0) 编辑
摘要: # TypeORM 集成 ``` $ npm install --save @nestjs/typeorm typeorm mysql2/pg ``` 安装过程完成后,我们可以将TypeOrmModule导入到根目录中AppModule。 ```ts import { Module } from ' 阅读全文
posted @ 2023-05-24 16:49 develon 阅读(568) 评论(1) 推荐(0) 编辑
摘要: # Context isolation and Node integration ![](https://img2023.cnblogs.com/blog/967043/202305/967043-20230523161053448-90495763.png) ``` Scenario contex 阅读全文
posted @ 2023-05-23 16:10 develon 阅读(229) 评论(0) 推荐(0) 编辑
摘要: # mutableStateOf androidx.compose.runtime.mutableStateOf > Return a new MutableState initialized with the passed in value > The MutableState class is 阅读全文
posted @ 2023-05-20 18:21 develon 阅读(25) 评论(0) 推荐(0) 编辑
摘要: # 资料 Rust 程序设计语言 Book:https://doc.rust-lang.org/book/ Rust Book本地:`rustup docs --book` Rust 程序设计语言 简体中文版:https://kaisery.github.io/trpl-zh-cn/ Rust Bo 阅读全文
posted @ 2023-05-19 17:06 develon 阅读(31) 评论(0) 推荐(0) 编辑
摘要: # #[tokio::test] 运行时 `#[tokio::test]` 运行时和 `#[tokio::main]` 的默认值是不一样的,前者默认单线程,后者默认多线程: > The default test runtime is single-threaded. 所以有的时候运行和测试的结果可能 阅读全文
posted @ 2023-05-19 16:14 develon 阅读(209) 评论(0) 推荐(0) 编辑
摘要: # (&mut Future).await 直接执行 `join_handle.await` 会消费 JoinHandle ,通过 `(&mut join_handle).await` 不消费 JoinHandle ,参考:https://github.com/tokio-rs/tokio/disc 阅读全文
posted @ 2023-05-15 17:12 develon 阅读(67) 评论(2) 推荐(0) 编辑
摘要: 安装 TigerVNC sudo apt install tigervnc-standalone-server 验证连接 # vncserver -xstartup nautilus -localhost no :1 #启动文件管理器并运行外部访问 # vncserver -xstartup gno 阅读全文
posted @ 2023-05-09 17:55 develon 阅读(713) 评论(0) 推荐(0) 编辑
摘要: 直接使用 setsid cmd ... $ ping ::1 root 399698 399637 0 14:51 pts/42 00:00:00 ping ::1 $ setsid ping ::1 root 399707 1 0 14:52 ? 00:00:00 ping ::1 注意看,现在它 阅读全文
posted @ 2023-05-09 15:18 develon 阅读(67) 评论(0) 推荐(0) 编辑
摘要: chrome-gnome-shell sudo apt install chrome-gnome-shell -y 参考:https://www.reddit.com/r/leagueoflinux/comments/nhzdg6/guide_how_to_put_the_wine_system_t 阅读全文
posted @ 2023-05-08 16:27 develon 阅读(221) 评论(0) 推荐(0) 编辑
摘要: setterm --blank man手册: --blank[=0-60|force|poke] Sets the interval of inactivity, in minutes, after which the screen will be automatically blanked (us 阅读全文
posted @ 2023-05-02 23:46 develon 阅读(1155) 评论(0) 推荐(0) 编辑
摘要: Win10 内存 嘎嘎失败了 大概就是这样的错误: 原因未知 修改BIOS、重新挂载驱动CD然后启动: 阅读全文
posted @ 2023-05-01 23:21 develon 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 重命名网卡 默认网卡叫 wlp15s0 啥的, 直接别名为 wifi ip link set wlp15s0 name wifi 重启后别名会掉, 加入rc-local吧. # cat /etc/rc.local #!/usr/bin/bash ip link set wlp15s0 name wi 阅读全文
posted @ 2023-05-01 18:28 develon 阅读(592) 评论(0) 推荐(0) 编辑
摘要: deb 离线安装 WiFi 所需软件 wpasupplicant:WiFi认证工具 iw:据说可以取代iwconfig wireless-tools :包含iwconfig等命令 net-tools:包含ifconfig等命令 安装方法略过, 记得每个 deb 都有一到两个依赖就行, 先安装依赖. 阅读全文
posted @ 2023-04-30 22:37 develon 阅读(1322) 评论(1) 推荐(0) 编辑
摘要: 添加target:wasm32-unknown-unknown rustup target add wasm32-unknown-unknown info: downloading component 'rust-std' for 'wasm32-unknown-unknown' info: ins 阅读全文
posted @ 2023-04-25 11:45 develon 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 尝试修改项目 Cargo.toml [dependencies] openssl = { version = "0.10", features = ["vendored"] } https://github.com/sfackler/rust-openssl/issues/1021 无效,因为是执行 阅读全文
posted @ 2023-04-25 11:29 develon 阅读(80) 评论(0) 推荐(0) 编辑
摘要: JSX 传递参数 阅读全文
posted @ 2023-04-20 11:43 develon 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 错误 ERROR in ./node_modules/@babel/runtime/helpers/esm/typeof.js 1:0 Module parse failed: 'import' and 'export' may appear only with 'sourceType: modul 阅读全文
posted @ 2023-04-19 16:33 develon 阅读(795) 评论(1) 推荐(0) 编辑
摘要: RUSTC_BOOTSTRAP=1 如果需要在稳定版编译器上执行一些夜间发布功能,可以设置该环境变量。 $ cargo rustc -- -Zunpretty=expanded Compiling xxx v0.1.0 (F:\xxx) error: the option `Z` is only a 阅读全文
posted @ 2023-04-18 10:45 develon 阅读(205) 评论(1) 推荐(0) 编辑
摘要: 多进程 HTTP Server import http from 'http'; import cluster from 'cluster'; import { pid, ppid } from 'process'; function server() { let port = 9999; let 阅读全文
posted @ 2023-03-09 15:39 develon 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 端口映射 # docker run --name warp -p 8080:8080 -it -d ubuntu 087d0c3227c569e07a36958dae2ce08c1616576b3b7531000e220f6ec0ad9eb7 # docker ps CONTAINER ID IMA 阅读全文
posted @ 2023-02-19 19:07 develon 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 参考 https://yeasy.gitbook.io/docker_practice 创建容器 我们尝试创建一个容器: # docker run --name warp ubuntu # docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS POR 阅读全文
posted @ 2023-02-19 18:42 develon 阅读(61) 评论(0) 推荐(0) 编辑
摘要: 安装 apt install consul -y #version (1.5.2+dfsg2-14) 以dev模式启动主节点 该模式不会持久化任何数据,方便开发测试。 $ consul agent -dev -bind 0.0.0.0 这时,Consul管理页面的8500端口还是只能在本地访问: # 阅读全文
posted @ 2023-02-10 15:36 develon 阅读(31) 评论(0) 推荐(0) 编辑
摘要: regedit 新建如下项,其中Background代表在空白位置单击: 计算机\HKEY_CLASSES_ROOT\Directory\Background\shell\自定义选项 修改默认字符串值、新建: 分别代表选项名称、图标、是否仅在按住Shift+鼠标右键时显示选项 然后新建 comman 阅读全文
posted @ 2023-01-29 11:21 develon 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 炎症性关节炎(IA)包括类风湿性关节炎(RA)。 https://www.pnas.org/doi/10.1073/pnas.2025257118 阅读全文
posted @ 2022-12-05 15:30 develon 阅读(104) 评论(2) 推荐(0) 编辑
摘要: 问题描述 构建时间较长,文件较大 Finished dev [unoptimized + debuginfo] target(s) in 24.36s real 0m24.724s user 0m10.158s sys 0m2.687s ubuntu@VM-12-10-ubuntu:~/test/t 阅读全文
posted @ 2022-11-11 16:34 develon 阅读(94) 评论(0) 推荐(0) 编辑
摘要: PIPE var child = require('child_process'); var events = require('events'); var express = require('express') var app = express(); var server = require( 阅读全文
posted @ 2022-10-18 17:14 develon 阅读(356) 评论(0) 推荐(0) 编辑
摘要: Cargo.toml [package] name = "static_link" version = "0.1.0" authors = ["develon <develon@qq.com>"] edition = "2018" build = "build.rs" # See more keys 阅读全文
posted @ 2022-08-29 17:06 develon 阅读(85) 评论(0) 推荐(0) 编辑
摘要: use libc::*; use std::{fs::File, io::Write}; fn main() { let args: Vec<String> = std::env::args().collect(); let mut file = File::options().append(tru 阅读全文
posted @ 2022-07-26 18:03 develon 阅读(146) 评论(0) 推荐(0) 编辑
摘要: git-fetch-with-cli [net] git-fetch-with-cli = true 查询命令行: wmic:root\cli>process where caption="git.exe" get ExecutablePath, caption, CommandLine Capti 阅读全文
posted @ 2022-07-25 16:59 develon 阅读(1923) 评论(1) 推荐(0) 编辑