跳至主要内容

博文

目前显示的是 十二月, 2018的博文

Fira code fonts mess-up in Intellij IDEA

The beautiful, open source, with ligatures, font Fira Code Some month ago I see someone talking about the best fonts and themes for their Intellij IDEA setup. One of the setups is really good, it was my first time to know that symbols such as `<=’ or `->’ can be display as beautiful arrows at runtime by supported software and a supported font. The font that mentioned was Fira Code Install FiraCode and fonts mess up in various programs I do like the beautiful ligatures. And, `choco search fira’ shows that the font can be easily installed by Chocolatey, Great!!! Anyway, things are not as good as I expected. Fira code fonts seems not work well in my Windows 7 ClearType environment. It shows up hideous in my Emacs buffer, even worse, it will mess up totally in J2SE Swing program if subpixel hint is turned on. Recovery method I tried several recovery methods, they are either no help or fail back to old situation after one or two cycles of Windows reboot. Remove/reinsta

Erlang runtime tools not found

 Appmon:start(). failed in erlang 21.0 I am learning Erlang OTP in these days, while trying to launch Appmon in Erlang shell I got a failure: 1> appmon:start(). * 1: syntax error before: descript 1> How could it be? This is supposed to be one of the Erlang system bundled runtime tools! Okay, the tools got a revolution in Erlang 17, as described in release note : --- appmon -------------------------------------------------------------- OTP-10915 Removed gs based applications and gs based backends. The observer application replaces the removed applications. ... ... --- pman ---------------------------------------------------------------- OTP-10915 Removed gs based applications and gs based backends. The observer application replaces the removed applications. --- toolbar ------------------------------------------------------------- OTP-10915 Removed gs based applications and gs based backends. The observer application replaces t

Functional scala Try Success Failure and for composition

 Lesson learn Scala programming I got some Scala to write in a recent spark related project. Specially, the Scala UDF (aka. user defined function) to be used in spark application. I got a feel that Try, Success, Failure is not very useful until being applied to the For Comprehensions for automatically unpacking. Refer to the following code example (inspired by StackOverFlow Post ) import java.sql.Timestamp import org.apache.spark.sql.functions.udf import scala.util.{Try, Success, Failure} // combine time_date and time_time for a timestamp in UTC. val time_to_ts: ((String, String) => Option[Timestamp]) = (time_date, time_time) => { val time_time_a = time_time.split(':') val ts = for ( y <- Try(time_date.take(4).toInt); // toInt exception m <- Try(time_date.take(6).takeRight(2).toInt); // toInt exception d <- Try(time_date.take(8).takeRight(2).toInt); // toInt exception tsymd <- Try(Timestamp.valueOf(s"$y-$m-$d 0:0:

Junction as symbolic link on windows 7+

Why? It’s all about the vim on windows' thing. Gvim and vim-in-git The official vim for windows (namely Gvim), compiled for win32 system, looks for user vim packages from windows style directory `$HOME/vimfiles`. While the vim bundled with git for windows, which was compiled by mingw64, looks into a Unix style directory `$HOME/.vim` for the same thing. The diverse of user packages will not cause any trouble, if you don’t have any vim related customization for yourself like me does. Things get changed until recently VIM upgraded to 8.0. The new vim packages system The new vim comes with its own package management system namely vim packages. This package system makes it simple to install third-party vim plugins by just clone github plugin repo into the vimfiles directories. SOMENAME/pack/PACKAGENAME/start (for ftplugins) SOMENAME/pack/PACKAGENAME/opt (for colorscheme plugins) How to merge the two vimfiles Solution 1: Make use of multiple repo management software suc