2016年12月29日星期四

Github 提交后 calendar 不显示 contributions 的问题

用 Github 的一大 H 点就是看着个人首页 calendar 的绿点从无到有从浅变深从星星之火到可以聊原,问题来了,我的 calendar 两三个星期没有显示任何更新了,可是我明明这段时间提交了不少,回想了一下以前也遇到过这样的问题。

是问题就要解决它!
颠三倒四
一般是因为本地的邮件地址跟 Github 个人资料里不一样导致的。

在某本地仓库里git show一下,会看到author 是本机电脑名peikun,邮件是peikun@ZHOU.local,这完全不合适嘛。得修改,

git config user.name yourname
git config user.email zpkhhx#gmail.com

就可以修改当前仓库的作者信息。全局的可以直接加上--global 参数,


git config --global user.name yourname
git config --global user.email zpkhhx#gmail.com

对本地的更改再次提交到 github 上,首页上那一抹绿就回来了...有点怪


2016年12月28日星期三

mac os 配置 prolog

AI 作业开玩有趣的prolog,记录下配置 mac os 10.12.2 环境下配置 prolog 吧。


  • SWI-Prolog GUI

主流是安装 SWI-Prolog,链接在这里,注意这里是开发版的,亲测稳定版对本机(10.12.2)支持不好,内置 terminal 莫名其妙黑屏。安装开发版,你也可能需要安装XQuartz(X11).

安装就绪,打开SWI-Prolog,载入测试文件,

?- ['/..../family.pl'].
输出 true,即是成功。


  • Terminal Prolog

作为程序猿,APP的 GUI显然不能显示我们的逼格,大多情况下还是需要请出 Terminal。

依赖SWI-Prolog 修改环境变量是一个办法,brew 安装是一个更普世的办法,

Simply go to terminal window and type in:
brew tap homebrew/x11
after the above command executes, enter:
brew install swi-prolog --HEAD
and now swipl should work:
Maryams-MacBook-Pro:~ maryam$ swipl
returns
Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 7.3.3)
Copyright (c) 1990-2015 University of Amsterdam, VU Amsterdam
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.

For help, use ?- help(Topic). or ?- apropos(Word).
Yay! ready to go. Let's test this:
?- ['/..../family.pl'].

true.


  • Emacs prolog
以前用 OCaml 的时候,接触了 Emacs这一神器,对于 Prolog 我们依然可以信赖它,参考教程在这里


  1. Download the file prolog.el from https://bruda.ca/emacs/prolog_mode_for_emacs and save it in your load-path so that Emacs can find it.
  2. Optionally, you can byte-compile prolog.el for better performance. Load prolog.el into Emacs and do M-x byte-compile-file RET.
  3. Add the following lines to ~/.emacs (~/_emacs on Windows):
    (autoload 'prolog-mode "prolog" "Major mode for editing Prolog programs." t)
    (add-to-list 'auto-mode-alist '("\\.pl\\'" . prolog-mode))
    Where is ~/_emacs?
    ~ is a shortcut for the home directory, on Windows it is system and language specific. It may be for example C:\ orC:\Dokumente. The best way to find "~" is: select "Files->Open.." and enter "~". Then Emacs prints the directory name and contents.
  4. Customize the Prolog mode. The following page explains how to enable electric indentation, syntax checking and PceEmacs-style comments: https://www.metalevel.at/pceprolog/
  5. ediprolog allows you to interact with SWI-Prolog in all Emacs buffers. You can quickly consult buffers and regions, and run queries that are embedded in your source files. ediprolog is available from: https://github.com/triska/ediprolog







2016年7月7日星期四

Win10 manually installation

Copy 'boot', 'bootmgr' and 'sources' to root C:/ ,

Run cmd at WinPE, then run commands 'c:\boot\bootsect.exe /nt60 c:' and receie 'successful'

Restart PC and installation will be run.

2016年6月16日星期四

Outlook全局通讯录(Global Adress Book)无法同步引出的一系列问题

公司有自己的exchange邮件服务器,用户一般用Outlook收发邮件、日程表、安排会议。有若干同事一直在反映,无法在通讯录里看到公司的全局通讯录,平时手工添加甚是麻烦。

I tried download Address Book(at SEND/RECEIVE->Send/Receive Groups->Download Address Book), but it didn't work.

Then I tried this,

1. First backup data file, remove actually account in Outlook then re-add it, not manually add but automatically.

2. Install Outlook Certificate which locates on M:\IT_Public\Programs\Outlook Certificate.

3. Re-start Outlook and import backup data file, problem is solved!

Before, in file->info->account settings, there isn't Delegate Access, Download Address Book or Manage Mobile setting choice. Right now, it all has.

Though the problem is solved, I'm still not sure it caused by certificate or during add account procedure. I guess the former administrator didn't find Outlook certificate at time so he added account manually. In my way, I added certificate during adding account automatically procedure.

It's not a problem, give me root, I can solve everything. I won't tell you that I have no permission to log in exchange server.

-.-