- 博客(568)
- 资源 (14)
- 收藏
- 关注
原创 Rust Pin
(Jin Qing’s Column, Sep., 2024)From: https://doc.rust-lang.org/std/pin/index.htmlRust can pin data location in memory, that means its address can not be changed.Pinned data guarantees the memory location is always valid.Safe code can not move pinned data
2024-09-14 12:10:25 531
转载 Debugging or Logging
From: Do you prefer debugging or adding logs? : r/node (reddit.com)Debugging is useful when you know there’s an ongoing issue that’s easy to reproduce and debug.Logging is useful when there’s a small amount of sporadic failure that you can use a trace log
2024-09-05 21:03:32 45
转载 Concurrency Control
From: database replication - Optimistic vs Multi Version Concurrency Control - Differences? - Stack OverflowThere are 2 main concurrency control approaches:One widely known algorithm of pessimistic concurrency control is the 2-phase locking.Two widely know
2024-08-20 10:12:52 50
转载 Developers Should Be Released from Basic Kubernetes O&M Work
From: Why Should I&O Team Be Prepared to Take over Kubernetes Deployment and O&M?Kubernetes, being a relatively new technology, has a steep learning curve. Most developers are responsible for performing basic Kubernetes operation and management (O&M) tasks
2024-08-05 12:11:04 44
转载 Mock, Stub, Spy and other Test Doubles
From: https://medium.com/@matiasglessi/mock-stub-spy-and-other-test-doubles-a1869265ac47
2024-07-26 13:22:08 47
转载 Thou shalt not log too much or too little
From: The 10 commandments of loggingThat might sound stupid, but there is a right balance for the amount of log.One way to overcome this issue is during development to log as much as possible (do not confuse this with logging added to debug the program). T
2024-06-26 14:59:26 44
转载 Logging in the critical path by sampling
From: Logging Wisdom: How to LogA common reason for not logging is request heavy processes where you couldn’t possibly do a bunch of logging for every request. Here, many just skip logging entirely and instead resort to reporting aggregates — such as peri
2024-06-26 13:48:36 43
转载 Naming Conventions for Traits
(Jin Qing’s Column, Jan., 2024)From: https://github.com/rust-lang/api-guidelines/discussions/28If the trait has a single self-explanatory method (or a set of nearly identical methods), name it after the method: Clone, Hash, Default, Into, Write, ToOwned, A
2024-01-17 08:59:48 119
原创 Rust generic type parameter and `impl Trait` parameter
(Jin Qing’s Column, Jun., 2023)See: https://doc.rust-lang.org/reference/types/impl-trait.htmlGeneric type parameter and parameter are almost equivalent: is just a syntactic sugar for generic type parameter.It is a little simpler by omitting the generic
2023-06-20 20:04:18 1107
原创 How are dtLinks created in NavMesh
(Jin Qing’s Column, Nov., 2022) defines a link between 2 polygons.It is an internal data structure.A is owned by its source polygon.The links are used in , to searchall the neighbor polygons, from the current best polygon. has 2 required fields:If the l
2022-11-18 09:59:42 242
转载 C++ parameter passing rules
From: https://www.modernescpp.com/index.php/c-core-guidelines-how-to-pass-function-parametersParameter passing expression rules:
2022-10-29 10:59:02 162
原创 Implementation of user data in cursive::Cursive
【代码】Implementation of user data in cursive::Cursive。
2022-10-02 16:23:19 154
原创 Rust sometimes needs manual type annotation
Rust sometimes needs manual type annotation(Jin Qing’s Column, Apr., 2022)This code compiles error:trait MyCallback: FnMut(&u32) -> () { }impl<F: FnMut(&u32) -> ()> MyCallback for F { }fn process_data(mut f: impl MyCallback) ->
2022-04-29 10:09:27 194
原创 Fix recastnavigation contour error
Fix recastnavigation contour error(Jin Qing’s Column, Apr., 2022)Using navmesh generated by recastnavigation,we found the agent will collide into the wallwhen it is walking along the navmesh path.After some inspection, we found the reason is that at t
2022-04-28 13:13:30 365
原创 TortoiseGit is OK but GitExtensions fails
TortoiseGit is OK but GitExtensions failsGitExtensions and Git fail:"git" pull --progress "origin"git@github.com: Permission denied (publickey).fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the r
2022-04-24 13:50:21 1049
原创 How to work around rustup-init failure
How to work around rustup-init failure(Jin Qing’s Column, Mar., 2022)rustup-init.exe may fail if some anti-virus software is running with realtime protection.The error message is like this after many retries:error: could not rename component file from
2022-03-23 20:05:08 798
原创 Closure as the function parameter
Closure as the function parameter(Jin Qing’s Column, Mar., 2022)It is best to let the function take a closure trait as the parameter instead of function pointer.fn foo(f: fn()) { f()}fn main() { foo(|| println!("hello")); let a = 123;
2022-03-18 15:57:15 618
原创 deadlock detection must not run as tokio task
deadlock detection must not run as tokio taskparking_lot has an experimental feature: deadlock_detection.See: https://amanieu.github.io/parking_lot/parking_lot/deadlock/index.htmluse std::thread;use std::time::Duration;use parking_lot::deadlock;// C
2022-02-12 11:43:33 665
原创 Tracing usage
Tracing usage(Jin Qing’s Column, Jan., 2022)Tracing is Rust log crate: https://github.com/tokio-rs/tracingThis example code output log to stdcout and file, using a log filter file,which can automatically reload on change.https://gitee.com/jinq0123/tra
2022-01-02 12:30:07 718
原创 Try tracing
Try tracing(Jin Qing’s Column, Dec., 2021)https://github.com/tokio-rs/tracingUsage on githubSwitch to tag tracing-0.1.29 first. The master’s examples can not build.Subscriber is renaming to collector on master.tracing::subscriber in 0.1.29 has been r
2022-01-01 20:13:58 523
转载 Box<dyn Trait> doesn‘t implement the trait
Box doesn’t implement the traitFrom: https://bennetthardwick.com/dont-use-boxed-trait-objects-for-struct-internals/By default a Box doesn’t implement the trait of the object it contains. This means that trying to construct PeopleZoo<Box> won’t work
2021-12-21 15:05:16 305
原创 minikube DNS fails after SRV query
minikube DNS fails after SRV query(Jin Qing’s Column, Dec., 2021)My program is using K8s DNS SRV query to discovery service,and when it’s deployed on minikube, I find DNS failure.I can use nslookup to reproduce the failure.Querying a FQDN is OK. But a
2021-12-10 10:42:19 242 2
原创 DeathVoteExpirationTimeout in Orleans
DeathVoteExpirationTimeout in Orleans(Jin Qing’s Column, Dec., 2021)Try to find out why Orleans need a DeathVoteExpirationTimeout config.https://dotnet.github.io/orleans/docs/implementation/cluster_management.html#extension-to-totally-order-membership-v
2021-12-08 09:41:07 158
原创 How to delete local branches of GitExtension
How to delete local branches of GitExtension(Jin Qing’s Column, Dec., 2021)GitExtension is a good tool. After a long time of usage, my branch list finally reaches over a full screen, and it is hard to select the branch I want.GitExtension always remembe
2021-12-07 17:01:30 362 1
原创 建议日志 slog 改换 tracing
建议日志 slog 改换 tracing(金庆的专栏 2021.11)slog 不是立即写盘,最后的几行日志会丢失tracing 不会丢日志slog 不支持运行中动态更改日志等级tracing with_filter_reloading()examples/tower-loadslog 不支持不同包设置不同日志等级tracing 可单独打开某个模块的日志发现一次 slog panic: panicked at 'slog::Fuse Drain: Fatal(Cu
2021-11-24 18:14:14 459
原创 Named parameters in Rust
Named parameters in Rust(Jin Qing’s Column, Nov. 18, 2021)There is no “named function parameters” in Rust,but there is an idiom for this case.If a function needs many parameters, we can define a typewith all these parameters as fields, and implement D
2021-11-18 13:12:42 253
原创 Rust traits act as generic constraints
Rust traits act as generic constraints(Jin Qing’s Column, Nov. 18, 2021)Rust traits are different from interfaces of C++/Java/Go.See: https://stevedonovan.github.io/rustifications/2018/09/08/common-rust-traits.htmlRust traits are mechanism for adding b
2021-11-18 12:47:21 511
grpc-lua 代码及示例Windows执行程序
2018-04-13
grpc-lua 示例 CentOS 7.4 执行程序打包
2018-04-13
go1.9.2.windows-amd64.msi
2017-10-26
LuaPbIntf VS2015工程带依赖库
2017-05-26
XMPP测试工具Peek
2016-10-25
gloox_1_0_17_API_Documentation
2016-09-13
gloox 1.0.17 released
2016-09-12
跨服与跨区的设计.ppt
2014-12-05
Wmvcopy的源程序
2011-11-24
Boost.Python中文文档
2008-06-16
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人