Finisky Garden

NLP, Software Engineering, Product Design

0%

Hexo 4.0.0 has been released on 2019-10-14. How to upgrade it?

Upgrade Hexo

  1. Go to the hexo folder
  2. Modify package.json file, inside “dependencies” braces:
1
2
-    "hexo": "^3.9.0",
+    "hexo": "^4.0.0",

UNNECESSARY to change

1
2
3
"hexo": {
    "version": "3.9.0"
},

and it will be automatically updated after “npm update”.

  1. Run
1
$ npm update

Done. Then check the hexo version as below.

When you use RegisterType or RegisterInstance combined with InjectionFactory in old version of Unity, the following complier warning will be displayed:

‘InjectionFactory’ is obsolete: ‘InjectionFactory has been deprecated and will be removed in next release. Please use IUnityContainer.RegisterFactory(…) method instead.

The code that triggered the warning:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
var container = new UnityContainer();
container.RegisterType<IAnimal, Cat>("Cat", new InjectionConstructor());
container.RegisterType<IAnimal, Dog>("Dog", new InjectionConstructor());

container.RegisterType<List<IAnimal>>(
    "AnimalList",
    new InjectionFactory(
        m => new List<IAnimal>
        {
            m.Resolve<IAnimal>("Cat"),
            m.Resolve<IAnimal>("Dog"),
        }
        )
);

The solution is straightforward, follow the instruction and use RegisterFactory instead:

Deploy Azure cloudservice failed, and Microsoft Azure Activity Log shows the following message:

1
2
3
4
15:45:39 - Checking for Remote Desktop certificate...  
15:45:40 - Applying Diagnostics extension.  
15:46:03 - Applying remote desktop protocol (RDP) extension.  
15:46:03 - Keyset does not exist.

It seems that the problem is caused by the certificate which is used to encrypt the user credentials of RDP.

First, I found the corresponding certificate in ServiceConfiguration.Cloud.cscfg (hiding the thumbprint):

Intro to NDCG

Normalized Discounted Cumulative Gain (NDCG) is a measure of ranking quality. Typically, it is used to measure the performance of a ranker and widely adopted in information retrieval. Our goal is to rank relevant documents higher than irrelavant documents. Here comes the problem, given a list of documents with corresponding grades, how to model the ranking quality?

Concretely, assume we want to rank a list of 5 documents with grades: $$G = [3, 1, 2, 0, 2]$$

Description

After deploying the Hexo websites to server, all the NexT icons were shown as blank squares.

Analysis

The NexT theme uses Font Awesome to display icons. If the website is started locally, everything is fine. Another interesting point is that the issue exists in Chrome but not IE.

  1. Stylish plugin in Chrome. I forced all pages use customized fonts by Stylish. Maybe the font does not contain such icons. However, even I disable the plugin, the issue still exists.