0%

Recently, I found there were huge amount of files named .com.google.Chrome.* be created in my /tmp folder. Obviously the culprit is Chrome. However, after some research no solution is found to prevent Chrome creating these garbage.

/tmp$ du -csh .com.google.Chrome.*

8.0K    .com.google.Chrome.00OKwD
104K    .com.google.Chrome.013jYf
172K    .com.google.Chrome.015x5t
...
48K     .com.google.Chrome.Zytrhf
16K     .com.google.Chrome.zz233G
36K     .com.google.Chrome.ZzrsZY
163M    total
/tmp$  find /tmp -name ".com.google.Chrome*" -ls| wc -l
3468

Update 2020/12/12 I found there are lots of .com.google.Chrome.* files in /tmp/snap.chromium/tmp :-( . Look at the ncduresults:

--- /tmp/snap.chromium/tmp -------------------------------------------------------------------------
                         /..
    4.1 MiB [##########] /.com.google.Chrome.xTBobr
    4.1 MiB [######### ] /.com.google.Chrome.0hcsFR
    4.0 MiB [######### ] /.com.google.Chrome.YdhzL5
    4.0 MiB [######### ] /.com.google.Chrome.nJ5W3A
    4.0 MiB [######### ] /.com.google.Chrome.unS6es
...
 Total disk usage:   6.8 GiB  Apparent size:  12.1 GiB  Items: 482530
Now the cleanup script has been updated.

Read more »

正确使用异常处理可以让代码逻辑变得清晰,使程序的鲁棒性更好,并可以准确捕捉到一些细节的错误。那么问题来了,异常的使用场景是什么,实践中又有哪些常见问题,本文简单讨论一二。

Read more »

Yesterday, when I login to my VM I found that the disk is full. Even a tab command completion cannot be done. I immediately delete some unused files and the system works. However, when I reboot the system, it stucked at A start job is running for Create Volatile Files and Directories...:

Read more »

半年前写过篇如何换启辉器和环形灯管,得,家里的老式日光灯又坏了,灯开着嗡嗡响,看起来像是镇流器出了问题,但环形灯管的头部也发黑了,灯的频闪也比较重,所以想买镇流器和灯管给换上。

老式荧光灯的构造比较复杂,启辉器+镇流器+灯管,T5/T8 22W 环形灯管20块左右,对应镇流器30块左右。用过日光灯的都知道,启辉器有多容易坏……花50块钱换一堆淘汰不禁用的东西,不大划算。 Old Lamp Original

Read more »

After I changed the HOME folder to another place, I copied the ssh config folder from old HOME to the new place. Supposedly it should directly work, right? However, when I login the server with my private key, the server said: "Server Refused Our Key"...

Read more »

Unity supports three ways of registering types:

  • Instance registration
  • Type registration
  • Factory registration

Typically, Instance registration and Type registration resolve dependencies through ResolvedParameter<T>, while Factory registration resolve dependencies by a factory delegate. In practice, when you want to resolve a List<T> or Dictionary<T1, T2>, Factory registration is what you want. Let's go through how to resolve a collection of customized classes.

Read more »

SVM的函数间隔定义中会用到点到超平面距离的推导,《统计学习方法》中对此没有详细的解释,当然这个问题有许多解法,找到了一种比较直观的解法如下。

Read more »

QuickSort 快速排序是常见的考察代码基本功面试题。简洁易读的实现可以一定程度展现面试者的代码功底。

算法导论对于快排讲解的很透彻,也有伪代码,即便如此,网上许多实现还是错的,不能通过一些边界用例,如数组已排序或数组中有重复元素的情况。还有一些用python的实现不满足原位排序(in-place)的要求,直接新建两个新List,这种方法其实也是取巧,简化了partition函数的实现难度。

Read more »

Google Ads是许多独立博客赢利维持自身运转的方案之一。不过近些年前已经不大流行了,因为转化率低,没有很大的基础流量支持,其实很难赚到钱。独立博客的流量如果不做PR的话,主要还是靠搜索引擎。而提升流量的根本需要有对应的用户群,相较而言,微信公众号、头条号上的平台流量足够大,用户粘度更高,赢利方式也更为多样,对作者来说更易变现。现在这年头还玩独立博客的人,我想都是有一份自己的坚持,一块独立的领地,完全自由掌控的感觉,想靠这个赚钱还是算了。

言归正传,说说Google AdSense如何添加到博客里。

Read more »