作者归档:Neo

修复 Ubuntu 下拼音输入法崩溃问题

最近在使用 Ubuntu 18.04 的过程中,遇到了一个拼音输入法总是在选字的时候崩溃的问题。

崩溃表现

crashed with SIGABRT in __assert_fail_base()

具体表现为:在打字时,无法使用数字键选择字词,鼠标点选也无效,只能按空格打出第一个字词。当按数字键选择字词时,输入法会崩溃,并输出字母和数字,例如我想打出“谷歌”,“谷歌”在候选列表第二个位置,按下 2,输入法崩溃,输出 guge2

我搜索了一下,并没有找到解决办法,只好退而求其次,使用 fcitx 代替了 ibus,就这么过了半个月。然而我今天再次搜索的时候竟然找到了解决办法:Selecting a number does not always return a Chinese character with ibus pinyin

解决办法

直接删除输入法的缓存就好:

rm ~/.cache/ibus/libpinyin/*

又一次更换了评论系统

去年暑期的时候 HyperComments 开始收费,并且不给钱就不给看历史数据,一声不吭就直接进入收费模式,这也太狗了。去他妈的 HyperComments 吧,不用就不用了。于是在那个时候换了 Disqus 这个经典的评论系统。 继续阅读

COM6506

Week 02

public class Person {
    String name;
    double weight;
    double height;

    public Person(String name, double weight, double height) {
        this.name = name;
        this.weight = weight;
        this.height = height;
    }

    public String getName() {
        return name;
    }

    public double getWeight() {
        return weight;
    }

    public double getHeight() {
        return height;
    }

    public static void main(String[] args) {
        Person jeff = new Person("Jeff", 72.4, 2.2);
        Person jim = new Person("Jim", 65, 1.7);
        System.out.println("Jeff is " + jeff.getHeight() + "m tall.");
        System.out.println("Jim is " + jim.getHeight() + "m tall.");
    }
}

继续阅读

COM6516

Week01-02

/*
 * HelloWorld.java
 * A traditional Hello World program!
 */

// In Java, all programs reside in a class. This class is called HelloWorld, 
// and should be saved in a file called HelloWorld.java. This class has a single
// method called main, which is the entry point to the program.
//
// Compiling the class with javac HelloWorld.java will produce a bytecode file
// called HelloWorld.class if compilation is successful. This bytecode can then
// be run on any machine with a java bytecode interpreter. You can run the
// bytecode in a console by typing java HelloWorld.

public class HelloWorld {
    public static void main(String[] arg) {

        String helloString = "Hello";
        String worldString = "World!";

        // In Java the System.out.println command displays the argument to the 
        // console. However the command below doesn't work, because helloWorldAString
        // has not been declared. Try compiling this file to see what happens, 
        // and take a careful look at the error message that is produced.

        System.out.println(helloString + " " + worldString);

        // In Java, we can use the '+' operator to concatenate strings, 
        // so to fix this problem, either change the argument passed to the
        // System.out.println method from (helloWorldString) to 
        // (helloString + " " + worldString)
        // or declare the variable helloWorldString before it is used by 
        // System.out.println by inserting 
        // String helloWorldString = helloString + " " + worldString;

        // In Java a variable can be declared anywhere in the code, so it is
        // possible to declare a variable just before it is used, which makes for
        // code that is easier to read and understand.

        // It is conventional to use mixed case for variable names and method 
        // names in Java, with with the first letter lower case, and then the 
        // first letter of each internal word in upper case -- e.g. helloString.
        // Class names start with a capital letter -- e.g. HelloWorld.java

        // details at: http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-135099.html

    }
}

继续阅读

更换评论系统

最近一直在忙着毕业的事情,没有打理博客。等到基本事情都做完回来看博客的时候发现,原来使用的 HyperComments 评论系统已经开始收费了,并且只有在订阅之后才可以进入管理页面。

这样一来,原本的评论想要找回来就只能强制被收费了,那只好对 HyperComments 说再见了,重新投入 Disqus 的怀抱。

然而 Disqus 在国内被屏蔽,这也是没办法的事情,所以……以后网站的评论就只能是随缘评论了……

氧 OS 也能使用公交卡

两个月前,我换了一加 5T,算是 48 年入国军了吧,不过等于 7 看样子会有刘海,无爱,放弃;而 5T 的 835 性能又很足够,造型也很讨我喜欢。

买来后果断刷了氧 OS 使用,确实没让我失望,内置 Google 框架,使用很流畅。前两天,因为想尝试着体验一下全球上网和公交卡功能,刷成了氢 OS 8.1 稳定版,但是是 dirty flash。开机后检查各项软件,果然,电话闪退无法使用。在设置中找边所有地方也没找到全球上网,不过还好,卡券里的公交卡功能可用,没算是白刷。但是这修改过的氢的界面用起来还是各种别扭,还预装了许多中国特色软件。于是打算把公交卡功能搬到氧 OS 中使用。
继续阅读

MI3TD 调整系统分区/合并分区 支持 64G 支持官方 OTA【存档】

这是什么

这是一篇可以指导你将你的小米 3 TD 调整系统分区/合并分区的教程,支持 16G 和 64G 的 TD。

  • 有时候你想安装软件,提示你空间不足,去查看一下明明剩余空间还多。
  • 有时候你想刷 Gapps 包,却因为系统分区空间不够而刷不进去。

遇到以上这些情况,就需要本文的教程来解决问题了。

可能你看过许多相关帖子,不过方法都不太完美,官方合并分区方法有 BUG,合并之后存储空间会缺失一个多 G,只有 12.25G 大小,而本教程则完美解决了官方合并分区的 BUG,合并之后存储空间全部利用,不再丢失一个 G。
继续阅读