当法律遇上陋习

小石城事件(Little Rock Nine 或“小石城九人事件”)是1957年发生在美国阿肯色州小石城的非裔美国人学生进入当地小石城中央中学就读的事件。小石城中央中学开始招收黑人学生是事件的导火索,起初支持种族隔离的阿肯色州州长Orval Faubus阻止学生们进入学校,后来在美国总统艾森豪威尔(Dwight David Eisenhower)的介入下,学生们才得以进入学校。 (Getty)

继续阅读当法律遇上陋习

Reith Lectures Blocked in China

眼看到年底了,手机2021年的Reith Lectures海没有更新。去BBC网站一看,内容已经发布到iTunes Podcast好几天了,只是我的手机没有收到更新。

连上VPN,再刷新手机上的程序,仍然没有新内容。尝试搜索reith lectures,只有几条无关的结果。

直接上苹果的podcast目录页,找到这个节目:

https://podcasts.apple.com/gb/podcast/the-reith-lectures/id318705261

可以很清楚看到已经有两集更新,这时候点“Listen on Apple Podcasts”,会转入iTunes,然后弹出如下对话框:

以后要想接着听,就需要VPN,还需要使用国外的iTunes帐号了。文化入侵遭遇铜墙铁壁!

切换至Edge后如何找回Internet Explorer

先说答案,用注册表编辑器找到:

HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\

删除其中的

{1FD49718-1D00-4B19-AF5F-070AF6D5D54C}

再启动IE,就不会自动换成Edge了。

我也是最近在网上看到好几篇对于Edge的好评,所以打开学校网站的时候——学校网站用Chrome核Firefox总有各种问题,在微软的提示下,切换到Edge,果然体验还可以。

然而,今天打开网上银行的时候就悲剧了。这个网银只支持IE,而我现在打开IE,就自动切换成Edge。不得已下功夫研究了一下,把解决办法记在这里备忘。

Slow SSH Login

SSH login is supposed to be fast – All it needs are a key exchange to establish a secure channel and then an authentication process, which are both trivial tasks to modern computers. However, as it often happens, a simple login might take no less than 15 seconds.

I ran into this problem recently and had a investigation. As it turned out, there are multitude of factors that might affect the speed of the SSH login process. From the most obvious the to most inconspicuous, here are them:

  • The sshd_config file.

This is the main configuration file that controls the behavior of the ssh daemon. In this file, you want to make sure the following features are disabled:

继续阅读Slow SSH Login

写在前面的话

上周翻书柜,又翻出这本《From mathematics to generic programming》,再到亚马逊上一搜,果然还没有中文版。我是Alexander Stepanov的粉丝,书一出来我就上美亚买了,就是打算翻译的。

买回来之后尝试翻译了几章,然后找了XX出版社,出版社看了告诉我说他们已经签了版权了,估计6个月中文版就出来了,于是只好撂下了。哪知道如今快两年过去了,中文版也还没影。

这几天我会跟作者联系,看看版权到底是个什么状态,同时会在这里放出以前翻译的草稿,欢迎批评指正。

 

 

Writing Pix4D compatible tags into pictures

If you’re looking for a method to write camera pose information into JPG files so that it can be read by Pix4D, as shown in the below screenshot:

pose_info

Here is how to do it with exiftool:

  • First, you need a configuration file for exiftool. In the configuration file, you need the following content:
%Image::ExifTool::UserDefined = (
    'Image::ExifTool::XMP::Main' => {
        Camera=> {
            SubDirectory => {
                TagTable => 'Image::ExifTool::UserDefined::Camera',
            },
        },
    },
);
%Image::ExifTool::UserDefined::Camera = (
    GROUPS => { 0 => 'XMP', 1 => 'XMP-Camera', 2 => 'Other' },
    NAMESPACE => { 'Camera' => 'http://ns.flyingfishtechs.com/Camera/1.0/' },
    WRITABLE => 'string',
    GPSXYAccuracy=> {},
    GPSZAccuracy => {},
    Pitch => {},
    Roll=>{},
    Yaw => {},
 );
  • Then you can using exiftool to add the information to any JPG file.
exiftool.exe -config config.min.cfg -Pitch="1.02" -Roll="2.03" -Pitch="3.04" original.jpg

If the command outputs: 1 image files updated. Then you’re done. Now the JPG file has the camera pose information encoded in. If you have more than 3 such pictures (only because Pix4D needs at least 3 pictures to work), you can see that Pix4D can get the data from the pictures.

The final twist, Pix4D displays Omega, Phi and Kappa instead of Pitch, Roll and Yaw. Basically, Pitch, Roll and Yaw are angles relative to the horizontal plane – orthogonal to the gravity while Omega, Phi and Kappa are related to earth. That means, with a fixed set of Pitch, Roll and Yaw, if you change your GPS location, you’ll get a different set Omega, Phi and Kappa. Personally I don’t see why should Pix4D use earth as the frame of reference instead of horizontal plane. Maybe just to hide the raw information in the pictures. Anyway, know you know how.

AC-3 support gets back again in VLC for iOS

A year ago, VLC on iOS was forced to remove its support for AC3 codec. I found almost all my videos on iPad were muted.

Since then, I haven’t bothered to check other options. I don’t mind paying a few dollars but I’ve been using VLC since years on all of my computers and mobile phones. There’s simply no other comparable alternatives that works equally well on Windows, Linux, OS X as well as iOS.

Today, I opened VLC on my iPhone again and noticed that I can play my videos with sound again! I checked the official website for sure and got this:

https://forum.videolan.org/viewtopic.php?f=36&t=124115&sid=c0ad097c62e429e8e5fe5f68aa14fc54&start=20#p441786

The link on iTunes also confirmed this. However, nowhere did I find details how did the developers solved the patent issue. Let’s hope it’s fixed for good.