介绍
之前使用 Ubuntu 和 CentOS 的时候,它们都各自拥有便捷的包管理器 APT
和 YUM
,使用它们安装卸载软件,自动解决依赖问题,非常方便。最近在换用 macOS 系统之后,却没有了类似的管理器,安装软件又回到了和 Windows 一样的体验。虽说 App Store 拥有一些很优秀的软件,但是作为一个未来的码农,需要的很多软件并没有 App Store 版,如果手动下载安装,以后软件更新了还需要再下载安装一次,这些无意义的重复劳动需要解决掉。
继续阅读
之前使用 Ubuntu 和 CentOS 的时候,它们都各自拥有便捷的包管理器 APT
和 YUM
,使用它们安装卸载软件,自动解决依赖问题,非常方便。最近在换用 macOS 系统之后,却没有了类似的管理器,安装软件又回到了和 Windows 一样的体验。虽说 App Store 拥有一些很优秀的软件,但是作为一个未来的码农,需要的很多软件并没有 App Store 版,如果手动下载安装,以后软件更新了还需要再下载安装一次,这些无意义的重复劳动需要解决掉。
继续阅读
在安装了 Android Studio 之后,相关的 adb
fastboot
等工具应该都应经下载在电脑里了。但是 AS 并没有把相关的目录加入 PATH,导致在终端里不可以方便的直接使用,需要加上很长的一串路径才可可以。这个文章记录下解决的办法。 继续阅读
最近发了篇文章,带了些截图,发现对于 macOS 处理过的截图,Next 主题在图片周围加一圈灰色边框并不美观。
于是便想办法去掉它。 继续阅读
有时因为开发的需求,需要为本地的网页服务器设置 https 访问。在这里记录一下在 macOS 系统下快速创建自签名证书并设置可信的方法。 继续阅读
最近在使用 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 这个经典的评论系统。 继续阅读
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.");
}
}
/*
* 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 在国内被屏蔽,这也是没办法的事情,所以……以后网站的评论就只能是随缘评论了……
两个月前,我换了一加 5T,算是 48 年入国军了吧,不过等于 7 看样子会有刘海,无爱,放弃;而 5T 的 835 性能又很足够,造型也很讨我喜欢。
买来后果断刷了氧 OS 使用,确实没让我失望,内置 Google 框架,使用很流畅。前两天,因为想尝试着体验一下全球上网和公交卡功能,刷成了氢 OS 8.1 稳定版,但是是 dirty flash。开机后检查各项软件,果然,电话闪退无法使用。在设置中找边所有地方也没找到全球上网,不过还好,卡券里的公交卡功能可用,没算是白刷。但是这修改过的氢的界面用起来还是各种别扭,还预装了许多中国特色软件。于是打算把公交卡功能搬到氧 OS 中使用。
继续阅读