RawPosts is a simple, elegant, and clean Jekyll theme. It is born from the creation of my blog website. It is designed with a fully responsive feature and can be deployed on Github Pages. I open-sourced this theme on Github with an MIT license, so it is free for use.
posts
RawPosts - A theme for Jekyll
What it's like to use ChatGPT
ChatGPT is very hot recently, I also registered an account and experienced it myself. 😉
About gerrit.createChangeId
git config --bool --get gerrit.createChangeId
is a command used in the Git version control system to retrieve the value of the configuration option gerrit.createChangeId
.
Keep old change-id when do git commit
When I use git commit --amend
command, it will generate a new change-id. But I want to use the previous change-id and don’t want to generate a new one. How should I keep the old change-id and keep only one change-id?
Git hook 配置与使用
Hook 就是在执行某个事件之前或之后进行一些其他额外的操作。在 Git 中也有许多的事件(commit、push 等等),每个事件也是对应了有不同的钩子的(如 commit 前,commit 后),那么我们就可以在这些钩子这里配置一些自己需要执行的操作来实现各种各样的需求。
Windows 消息处理机制
Windows32 程序是由消息事件驱动的。一个消息,是系统定义的一个 32 位的值,它唯一的定义了一个事件,向 Windows 发出一个通知,告诉应用程序某个事情发生了。
浅谈 Java 线程同步技术
Java 里实现线程间的同步有多种方法,比如使用 synchronized
关键字,wait
和 notify
,volatile
变量,重入锁,局部变量,阻塞队列或者原子类型变量等。
Git commands and usage tips
Git is a powerful version control tool. I would even say it’s one of the best. However, being powerful sometimes means being complex in terms of functionality. Git has a lot of commands. The good thing is that you can do everything you want with them, the bad thing is that you need to remember them. Here, I’ll write down the commands that I’ll use often to keep better track of them and make them easier to search.😉
生产力工具
“工欲善其事,必先利其器”,使用一款好的工具,能帮助我们工作中事半功倍,提升效率。这篇文章记录了我日常使用的一些我认为相当不错的工具和软件。
从 MarkdownPad2 到 Typora - 使用 Typora 的直观感受
一直以来我都是用 MarkdownPad2 撰写自己的博客文章,也没有觉得哪里不好。关注到 typora 这个软件是因为最近网上讨论的比较热烈的这个软件要收费的消息,于是上网 Google 了一下这个软件才发现很多人对这个软件的评价很高,这就引起了我的兴趣,于是我决定下载这个软件亲自试用一下。😉
C# 的 IntPtr 类型
C# 中,IntPtr 是一个代表内存位置指针的类型。它被用来存储一个变量或一个对象在内存中的地址。IntPtr 是一个整数类型,但它的大小与平台有关。在 32 位系统中,IntPtr 的大小为 32 比特(4字节),在 64 位系统中,它的大小为 64 比特(8字节)。
浅析 C# 中的线程同步
线程间同步是指在多线程环境下,保证共享资源的安全和一致性的机制。 C# 中提供了多种方式实现线程间同步。例如:
- lock 语句:使用一个对象作为锁,保证一次只有一个线程可以进入临界区;
- Interlocked 类:提供了原子操作,如递增、递减、交换和读取值;
- Monitor 类:提供了锁定对象、等待信号和通知信号的方法;
- Mutex 类:提供了跨进程的互斥锁,可以用来同步不同进程中的线程;
- Semaphore 类:提供了一个计数器,限制同时访问共享资源的线程数;
- AutoResetEvent 和 ManualResetEvent 类:提供了信号量,可以用来通知或等待其他线程的状态变化;
Use Pypy to make Python run faster
“If you want your code to run faster, you should use Pypy.” - Guido van Rossum, the father of Python.
To understand why Pypy is faster, we should know what makes Python slower.