Posts by Category

C++

C++: noexcept

1 minute read

整理自 C++ Primer, 5th Edition

C++: override

less than 1 minute read

基本就是 java @Override 的作用:

C++: final

less than 1 minute read

整理自 C++ Primer, 5th Edition

C++: Null Pointer

less than 1 minute read

整理自 C++ Primer, 5th Edition

C++: typeid

1 minute read

整理自:Thinking in C++, Volume 2

C++: Template Trait

less than 1 minute read

具体见 Traits: a new and useful template technique。这里只说下感想:

C++: operator void*

less than 1 minute read

用法有点奇葩的一个 operator。总结自 What does operator void* () mean?。

C++ String

3 minute read

整理自:Thinking in C++, Volume 2

C++: local scope

less than 1 minute read

按 Difference between local scope and function scope 的说法:

C++: Const Pointer

3 minute read

在 2010-09-26 原作基础上修改。日期改到 2015-03-26 使本文进入 C++ 文章群落,方便查阅。

C++: friend

1 minute read

整理自 Thinking in C++。

C++: typedef sees int* and int& as new types

less than 1 minute read

长久以来我就有这么一种理解:int * 其实可以做一种新类型。因为在函数的参数列表里,你把 int * 看做是一种新类型明显更容易理解些。但是我又不得不注意以下这个事实:

C++: enum

1 minute read

整理自 Thinking in C++。没啥特别好说的。

Back to Top ↑

Math

Modulo / Congruence

2 minute read

本来挺简单的概念,但是因为英语的用词非常地迷惑,所以搞得有点难懂。

Cross Entropy vs Cross Entropy Loss

less than 1 minute read

这俩是有区别的,我一直没有注意直到我发现公式上的区别。我没有注意的原因应该是 regression 没有显式使用 cross entropy loss,而 classification 的 cross entropy loss 是对原生 cross entropy 的扩展。

Ring / Ring of sets

2 minute read

我研究一下 ring 主要是因为我看到有些 measure 的定义用到了 $\delta$-ring,但是后来我决定暂时不用这个定义……

PCA: my interpretation

2 minute read

$$ \newcommand{\icol}[1]{ \bigl[ \begin{smallmatrix} #1 \end{smallmatrix} \bigr] }

Alias Sampling

less than 1 minute read

Two brilliant posts on this sampling technique:

Isometry

less than 1 minute read

Definition

Eigenbasis / Eigenspace

less than 1 minute read

Given a eigenvalue $\lambda$ of matrix $A$, the null space (kernel) of $A - \lambda I$ is called the eigenspace of $A$ associated with $\lambda$.

Eigen-decomposition

10 minute read

给定方阵 $A$,如果 $\exists \lambda, \mathbf{v} \neq \mathbf{0}$ 满足 $A \mathbf{v} = \lambda \mathbf{v}$,我们称 $\lambda$ 是 $A$ 的一个 eigenvalue,$\mathbf{v}$ 是 $A$ 对应 $\l...

Tensor

6 minute read

参考:

Infinite Cartesian Products

1 minute read

其实只是 Terence Tao 大神的定义写得稍微有一点绕,整体还是好理解的。

Gradient Field

2 minute read

[\newcommand{\icol}[1]{ \bigl[ \begin{smallmatrix} #1 \end{smallmatrix} \bigr] }]

Harmonic Function / Laplace’s equation

1 minute read

harmonic 这个词的意思太多了,比如在 periodic signals 里翻译成 “谐波”。而 Harmonic Function 的翻译是 “调和函数”

Closed-Form Solution

2 minute read

P.S. 讲了这么多,其实 closed-form expression 就是 “解析解”,analytic expression。这两者其实有微妙的差别,但大体上你理解成是同一事物是 OK 的。而且你还能见到 “analytic closed-form solution” 这种表达方式,真的不需要 care 太...

RBF (Radial Basis Function) Kernel

less than 1 minute read

知道了 Radial basis function 和 kernel function 之后,Radial basis function kernel 就好理解了:它是一个 kernel function,然后属于 radial basis function 大类。

Gradient and Directional Derivative

2 minute read

Original post is The Gradient and Directional Derivative from Mathematics School, Oregon State University. Here I thank the author(s) sincerely.

Parametric vs. non-parametric models

less than 1 minute read

在查 non-parametric tests 时,Wikipedia 上提到了 Non-parametric models,于是干脆就记录一下。参考 Wikipedia: Parametric model。

McNemar Test

7 minute read

看 wikipedia 什么的都不好使,还是得看书 Handbook of Parametric and Nonparametric Statistical Procedures,写得非常清楚。

Simplex

less than 1 minute read

概念挺简单,主要是生单词太多了,mark 一下。

Conditional Probability

4 minute read

总结自 Coursera lecture Statistical Inference section 03 Conditional probability。

Probability

4 minute read

总结自 Coursera lecture Statistical Inference section 02 Probability。

Derivative and Partial Derivative

1 minute read

感谢 良田围 网友在 偏导数有什么用 问题上的精彩回复,以下全文摘抄,仅加音标并稍微排版。

Back to Top ↑

Java

Middleman Patterns: Adapter / Proxy / Decorator

1 minute read

我觉得用 Java 学 design pattern 有个问题就是:总是要有 interface / abstract class 介入,搞得整个 class hierarchy 非常复杂。其实我用 duck typing 的思路来看,Adapter、Proxy、Decorator 这三个模式的基本结构是一样的,...

Visitor Pattern Revisited

2 minute read

我们在 PPP 里其实有讲 visitor pattern,但最近在读的 Crafting Interpreters 提供了一个绝妙的解读,虽然只能适用于 vanilla 的 visitor pattern,但还是值得记录下。

Service Locator Pattern

less than 1 minute read

Martin Fowler 的 Inversion of Control Containers and the Dependency Injection pattern 中提到的。

Digest of Test Driven Development

less than 1 minute read

这本书 的副标题是 “By Example”,所以整书适合一口气读完,也不用每个例子都敲一遍,顺着作者思路走完一遍就可以了。

Java: shallow copy v.s. deep clone

less than 1 minute read

class Field implements Cloneable { public String name; @Override protected Object clone() { Field f; try { f = (Field) super.clone(...

Java 多线程:synchronized

1 minute read

首先明确一点,同步方法本质上也是一个同步控制块(仅针对于锁定 this 的情况,如果同步控制块锁定的不是 this,那么它是不能直接改写为同步方法的),区别在于同步方法的粒度是整个方法,而同步控制块的粒度可以是方法的一部分。

Java 多线程:终止线程的方法

1 minute read

虽说 Thread 类提供了 stop() 和 suspend() 方法,但这两种方法过于粗暴,如果线程占用了一些资源(如打开了一个文件,建立了一个数据库连接什么的),直接 stop() 或是 suspend() 是会产生问题的。

Java: a simple delegation example

less than 1 minute read

public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { doGet(req, resp); }

Java: the proxy parameter of the invoke() method

1 minute read

关于动态代理,一般的代码结构为:一个业务接口、一个业务接口的实现、一个自定义的 InvocationHandler 实现和 main 类,如下:

Java: throw 的屏蔽作用

less than 1 minute read

在其所在的块内 (如方法 body、if () {...} 等),throw 语句可以屏蔽其后的语句,即在块内,该 throw 语句后面不能再写其他语句;但在块之外,还是可以写其他的语句的。如:

Java: 涉及继承的异常声明及捕捉

2 minute read

当有继承发生时,会伴随着重载、覆写 (包括接口方法的实现)、构造器的重写等行为。此时,如果基类或是接口的方法存在异常声明,那么导出类或是接口的实现类的对应方法该如何声明异常?同时对这些方法的调用该如何捕捉异常?下面就这 2 个问题进行探讨,你会看到,针对覆写和构造器的重写是 2 种完全不同的处理方式 (针对重载则...

Java: first catch

less than 1 minute read

try 块里有异常抛出时,程序会进入 第一个 异常类型匹配的 catch 块执行,其他的 catch 块不执行。

Java: foreach 与 iterable

1 minute read

Iterable 是一个接口,它只有一个方法 iterator(),要求返回一个 Iterator。

Java: Arrays.asList()

less than 1 minute read

Arrays.asList() 这个方法有点特殊,这里记录一下。

Java: 对内部类的继承

1 minute read

首先我们明确下 “enclose” 这个单词的逻辑关系:OuterClass encloses InnerClass,所以外部类就是 enclosing class,内部类是 enclosed class。

Java: 局部内部类 (local inner class)

less than 1 minute read

如果把 {...} 这么一段称为 “域”,那么方法 body 明显是一个域,方法 body 中的 if {} 或是 for {} 之类的也是域。在方法 body 或是方法 body 中其他域里定义的类就是局部内部类。

Java: 匿名内部类 (anonymous inner class):简化形式及自动向上转型

less than 1 minute read

内部类的一个重要作用是隐藏继承或是对接口的实现,典型的形式是:内部类来继承或是实现接口,由外部类提供代理 constructor 方法。这些代理 constructor 方法一般都利用的向上转型,即不返回内部类对象,而是返回内部类继承的父类对象或是实现的接口对象。如:

Java: entends & interface

less than 1 minute read

一个 imp class 可以同时实现多个 interface,格式如下:

Java: interface

less than 1 minute read

我们大可将 interface 视为 abstract class 的延伸。

Java: 关于覆写方法的访问权限

less than 1 minute read

覆写方法的访问权限不得低于被覆写方法的访问权限(或者说覆写方法不能拥有比被覆写方法更严格的访问权限)。

Java: abstract

less than 1 minute read

abstract 的真正含义是“阻止产生对象” (针对类) 或是 “禁止被对象所拥有” (针对方法,类似 static)。

Java: 关于覆写方法的 return type

less than 1 minute read

在 overload and override: 重载与覆写 里面提到过,如果在 base class 中有一个可继承的方法,在 ext class 中添加一个同签名的方法则是覆写行为。其实,覆写对 return type 还是有要求的。

Java: 多态

less than 1 minute read

2021-01-03 更新:大一统至 Single Dispatch in Java and Python

Java: final

less than 1 minute read

final data (基本数据类型)

Java Class Loading: an example

1 minute read

class loading 是一个比较复杂的过程。一般说来,类是在其 static member 被访问时被加载的。在加载时会做的一件事是:初始化 static member 和 static 代码段 (static block, i.e. static {......}),当然,static 是只会被执行 on...

Java: initializer

1 minute read

A block-formed initializer can be appended after the fields declared.

Java: static

less than 1 minute read

static member / field / method

Back to Top ↑

Python

Python: play with backslashes

3 minute read

最近研究 regular expression 顺便补了下 escape 的课 (参 Escape Character / Control Character / Python Raw Strings / Python Bytes Literals),然后我今天就发现了 python 光一个 escape cha...

Python: super()

4 minute read

super() 实在是有点复杂,所以它的 doc 的信息量看起来就很有限。

《Python黑魔法手册》摘抄

1 minute read

感谢作者王炳明写了这么多内容。这本《Python黑魔法手册》语言平实,举例得当。虽然前面有些简单的 “黑魔法” 我看来也就是 “茴香豆的四种写法”,但后面高级的、有趣的内容也不少,这里摘一摘。

Python: and/or Operators on Objects

less than 1 minute read

今天才发现如果是两个 objects 做 and 或者 or 的时候,返回的不是 boolean 而是 object。

Python: pass-by-reference

less than 1 minute read

再次提出这个问题是因为遇到了一个 “想在 function 中修改 list 内容” 的场景,而正确的写法应该是用 slice-then-assign:

Python: all

2 minute read

Effective Python Item 50: Use Packages to Organize Modules and Provide Stable APIs

Python: Referencing and assignment in inner functions

1 minute read

这一篇的内容在 Digest of Fluent Python: 7.4 Variable Scope Rules 和 Python: Variable scope in if-statement 都有讲到,但是 Effective Python 的 Item 15: Know How Closures Inte...

Python 3: Keyword-Only Arguments

less than 1 minute read

参 Effective Python Item 21: Enforce Clarity with Keyword-Only Arguments 和 PEP 3102 – Keyword-Only Arguments。

Python: except

less than 1 minute read

简单说一下。except 可以接一个 tuple 表示捕捉多种类型的异常,也可以不带任何参数表示捕捉 everything(当然这是一个 anti-pattern)。

Python: try-except-else-finally

less than 1 minute read

Python 的 try-except-finally 和 Java 的 try-catch-finally 其实是一样的,烦就烦在中间那个 else 上:

Python: Zip

1 minute read

zip 这个函数,用起来总是没有什么信心……我们上一下 The Python Standard Library 上的示例代码看看(注意:这并非源码,因为现在已经是返回一个 zip 对象了):

Python: Signature

less than 1 minute read

Just a reminder that we have such objects to inspect the function signatures, as PEP 362 – Function Signature Object indicates.

Python: *expression

3 minute read

Argument Unpacking: *expression and **expression inside function calls

Python: Mixin

less than 1 minute read

首先 a Mixin is class to be mixed-in,它在 python 里起到的作用类似于 interface 或者 abstract class,但是又有点微小的差别,我们来看个例子:

Back to Top ↑

Machine-Learning

Generative Models

3 minute read

参考自 Introduction to Semi-Supervised Learning。

SemiBoost

5 minute read

The inconsistency among the unlabeled examples:

ML Terminology

3 minute read

Confusion matrix $\subset$ Contingency table

The MEME algorithm

2 minute read

接上一篇 EM method for identifying motifs in unaligned biopolymer sequences,我们接着介绍 Unsupervised Learning of Multiple Motifs in Biopolymers Using Expectation Maxi...

Expectation-Maximization Algorithm

6 minute read

原文 A Gentle Tutorial of the EM Algorithm and its Application to Parameter Estimation for Gaussian Mixture and Hidden Markov Models。

Naive Bayes classifier

1 minute read

首先感谢 张洋 先生的这篇 算法杂货铺——分类算法之朴素贝叶斯分类(Naive Bayesian classification),写的非常清楚明白。本文以此为基础做些总结。

WD kernel with shifts

4 minute read

原文 RASE: recognition of alternatively spliced exons in C.elegans.

Lagrange duality

6 minute read

总结自 section note 5: Convex Optimization Overview, Part II

ISL: Resampling Methods

9 minute read

总结自 Chapter 5, An Introduction to Statistical Learning.

ISL: Classification

16 minute read

总结自 Chapter 4, An Introduction to Statistical Learning.

ISL: Linear Regression - Part 2

17 minute read

总结自 Chapter 3, An Introduction to Statistical Learning. 3. Other Considerations in the Regression Model

Types of Data Science Questions

2 minute read

摘自 Six Types Of Analyses Every Data Scientist Should Know 和 Types of Questions;两者内容基本相同。

Back to Top ↑

R

R: dive into types

5 minute read

1. 预备知识:class() / typeof() / mode() / storage.mode() 2. 预备知识:R Basic Types 总览 3. 深入 Language Objects 4. 深入 Function Types

Digest of Advanced R (亟待更新)

150 minute read

P.S. It was 2015 when the 1st edition of this book came out and I wrote this post. Now Hadley Wickham is working on the 2nd edition where a lot contents chan...

R Dates

7 minute read

参考文献:

R console theme

less than 1 minute read

R console 并没有提供 theme 选项,只有自己配 color。在 “X:[R-folder]\etc\Rconsole” 文件中可以指定 color(在 ## Colours for console and pager(s) 小节)(color 的名称在 “X:[R-folder]\etc\rgb.t...

R profiling

less than 1 minute read

system.time()

R «- operator

1 minute read

第一次看到这个 «- 赋值是在 coursera 的 assignment,这里是实现了一个 cache 了 mean 结果的 vector:

R apply family

8 minute read

参考资料:A brief introduction to “apply” in R

R Scoping Rules

4 minute read

总结自 Introduction to the R Language - Scoping Rules (pdf)

Back to Top ↑

Biology

What does effect size mean in GWAS?

1 minute read

这 statistics 和 biology 搁一块儿简直就是灾难:各种不讲人话的、侧面描述的、不给数学公式的定义,各种 overloaded terminology。好嘛,这又来一个 effect size。

Eukaryotic Cell Structure

1 minute read

Cell Cell wall (细胞壁) Membrane (细胞膜): [ˈmembreɪn] Cytoplasm (细胞质): [ˈsaɪtəʊplæzəm], the contents of a cell except for the nucleus, ...

Taxonomic Ranks

1 minute read

taxonomy: [tækˈsɒnəmi], 分类学 taxonomic: [ˌtæksə’nɒmɪk] taxon: [ˈtæksɔn], a taxonomic group or category taxa: [‘tæksə], plural of taxon

Back to Top ↑

JavaScript

Is JSON a string?

less than 1 minute read

我写这篇的起因来自于这个灵魂拷问 Is JSON a string? 我觉得这又是个老外瞎用词导致的误解。

JSON conversion

less than 1 minute read

1. Java Object <-> JSONObject

never fake a <input type=file>

less than 1 minute read

不管这篇 自定义input type=”file”的样式以及引出的相关技术问题 描绘得有多么好,永远不要妄想用 <span> 来代替 <input type="file"> (即自定义样式的 file 控件),浏览器兼容性问题 is watching you! 我们可是连 IE6 都要测的...

阻止 form submit 的方法

less than 1 minute read

有两个地方可以可以阻止 form submit,一是 <form onsubmit=""> ,二是 <form> 下的 <input type="submit" onclick=""> ,只要这两个函数有一个是 return false;,那么点击这个 button 并不会 s...

Back to Top ↑

Thought

What is REST?

7 minute read

1. What does REST mean literally?

Locate Bugs by Replaying

less than 1 minute read

线上机的 exception log 可能被吞(日志量很大的时候,exception log 根本就打不出来),此时可以用测试机 debug。如果测试机没问题,说明是线上环境问题(网络不好、依赖的外部接口挂了之类的)。如果测试机一样挂,那么直接在测试机上找问题就好了

有关设计的一些事后诸葛亮

less than 1 minute read

交互稿没画边界情况的话后患无穷,态度一定要强硬,直接拒收! 至少在部署前要询问是否有统计需求,产品不会提醒你加统计日志的,都是事后才说。 中途换技术方案是很坑爹的。涉及第三方或自己不可控的控件,提前考虑是否有压力隐患,压力测试越早做越好(越早做越先发现问题,修改的成本越小,如:Magick,lp 项...

关于表字段数量与对象字段数量的思考

less than 1 minute read

mc_lottery 是一个大表(28个字段),对应 Lottery 也是个大对象。如果一个页面只用展示 Lottery 对象的3个字段,那么,SQL 层的传输就很浪费。 如果把 mc_lottery 拆成多个小表,Lottery 对象也要拆成多个小对象的话,你就需要处理事务问题,也很烦。 由于小表...

2 most important questions when an old project is assigned to you

less than 1 minute read

最简单也最容易忽视的一点:最终的操作是什么?要输出什么?要写什么值?是写 DB 还是写 UD 还是写 MD?输入往往很清楚,但输出有时候很恍惚(比如:aupg 项目) 搞清楚:接口给谁用?(比如:aupg 项目,两个接口给用户,一个接口给 SA)

Back to Top ↑

Network

Python: Socket Programming 101

5 minute read

参考 Socket Programming in Python (Guide) 的前半部分,代码有改动。另外我觉得这个例子用两个 ipython 来玩更方便理解。

常见 HTTP Status Code 及场景

less than 1 minute read

302:我们常说的 “302 跳转” 其实就是 sendRedirect 404:说明 URL 不对,可能是后台 URL 没发出来,可能浏览器 URL 写错,或者后台 URL 写错 500:后台异常,一定会有 exception log,不要因为 log 刷屏而认为没有 exception 50...

Subnet Mask

less than 1 minute read

IP 层提供了 IP 地址,IPv4 是 4 byte,32 bit == 网络号 (#network) + 主机号 (#host),所谓 #network 就是区分 A 类、B 类、C 类网的那个。

Network Protocols

less than 1 minute read

网络协议:为计算机网络中进行数据交换而建立的规则、标准或约定的集合。

Back to Top ↑

Spring

Spring 小技巧

1 minute read

SpringMVC Controller 如何返回 404?

@Autowired not working 的问题

less than 1 minute read

Looks like the UserService class is missing a ‘stereotype’ annotation like @Component or @Service. You also have to configure the Spring classpath scanning u...

Spring: static 属性的注入必须使用非 static 的 setter

less than 1 minute read

有一些 util 类或是 config 类会用到 static 属性,这些 util 类或是 config 类也可以通过 Spring 来初始化,和初始化一个 POJO 没什么区别,虽然实际应用中不太可能去创建一个 util 对象或是 config 对象,一般都是使用 static getter 而已。

Spring: “Could not resolve placeholder” 解决方案

less than 1 minute read

除去 properites 文件路径错误、拼写错误外,出现 “Could not resolve placeholder” 很有可能是使用了多个 PropertyPlaceholderConfigurer 或者多个 <context:property-placeholder> 的原因。

Back to Top ↑

OS

CPU bound vs IO bound

less than 1 minute read

From stackoverflow: What do the terms “CPU bound” and “I/O bound” mean?:

callback 释义

less than 1 minute read

最近接触到了 HibernateTemplate,用到了 HibernateCallback,决定把 callback 的逻辑关系彻底搞清楚,以前总是不明白这个 call 到底是谁 call 的谁,这个 back 到底是从哪里 back 到哪里。

Pointer Swizzling

1 minute read

  swizzle 本来的用法应该是 to swizzle a beverage with a spoon,基本就是 “搅动” 的意思。pointer swizzling 有的翻译叫 “指针混写”,第一眼看上去简直不知所云。

page(页面)

less than 1 minute read

  以下来自百度百科和Wikipedia。

Back to Top ↑

Algorithm

Laplacian Matrix

7 minute read

[\newcommand{\icol}[1]{ \bigl[ \begin{smallmatrix} #1 \end{smallmatrix} \bigr] }]

Back to Top ↑

MySQL

How to rename MySQL databases or tables?

1 minute read

场景:我有一套老的数据,比如 2015 年发布的 db,现在 2016 年发布了新的数据,它的 dump file 里还是用的老的 database name db,我想把这两套数据都存在数据库里。

MySQL REGEXP

less than 1 minute read

  参考 Regular Expressions - User Guide

Back to Top ↑

jBPM-4.3

Back to Top ↑

C

C: struct

less than 1 minute read

整理自 Thinking in C++。没啥特别好说的。

Back to Top ↑

Ant

Ant 中的 fork=”true”

less than 1 minute read

Set fork attribute to true, to run javac in a separate process with its own heap size settings. If fork is set to false, or not set (default is false), javac...

Ant 路径之 **

less than 1 minute read

<fileset dir="${lib.dir}" includes="*.jar"/>

Ant 中 javac 假死的解决办法

less than 1 minute read

当前项目用的是 eclipse 3.5,然后文件编码都是 utf-8。在执行 Ant 脚本时,javac 死活不动,解决方案是:右键 build.xml –> run as –> External Tools Configurations –> Common 选项卡 –> Console ...

Back to Top ↑

AOP

Spring AOP 学习(四):简单 XML 配置

less than 1 minute read

紧接着 Spring AOP 学习(三):例子与基本概念 中的例子。其实 Spring AOP 注解的概念理解了后,看 XML 配置就是件很简单的事情了。

Spring AOP 学习(二):动态代理

1 minute read

如果系统中有 500 个类,每个类都要添加日志功能,此时无论是直接修改源代码、继承还是组合,都是十分巨大的工作量。此时 AOP 可以帮我们解决这个问题。

Back to Top ↑

JSP

a weird problem caused by encoding

less than 1 minute read

copy 一段代码到 jsp,tomcat 的 catalina.err 总说:org.apache.jasper.JasperException: /WEB-INF/jsp/admin/lottery/add.jsp(425,32) equal symbol expected。

Back to Top ↑

Compiler

What does context-free mean in CFLs?

less than 1 minute read

这真的是困扰了我很多年的问题,而且我发现这还不是中文教材的锅,老外的很多教材也是上来就 CFL,也不告诉你这个 context 到底是啥 context,这个 free 是怎么个 free 法。我就纳闷了,多讲这么几句怎么就这么难呢……

Back to Top ↑

Pandas

Back to Top ↑

LeetCode

Back to Top ↑

SpringMVC

Spring MVC example anatomy

1 minute read

例子来自 Developing a Spring Framework MVC application step-by-step ,版本是 spring-framework-2.5.6.SEC01。

Back to Top ↑

SQL

Join

1 minute read

Back to Top ↑

Jekyll

MathJax 血泪史

1 minute read

Github Pages 升级到了 Jekyll 3.0,而且将使用 kramdown 解析引擎。我紧跟大部队,local build 环境也升级了,但是发现了 MathJax 有超级多的问题,特来写下血泪史……

Back to Top ↑

Lab

Building GWAVA environment on Ubuntu 16.04

3 minute read

GWAVA, Genome Wide Annotation of VAriants, is a tool aiming to predict the functional impact of non-coding genetic variants. It consists of two parts:

Back to Top ↑

sklearn

scikit-learn: Pipeline

1 minute read

Pipeline 的作用,见名知意,就是把多个 processor units chain up 起来。Pipeline 要求前 $N-1$ 个 processor units 是 Transformer,最后一个 processor unit 是 Estimator。我们举个例子看看就很好理解了:

Back to Top ↑

Windows

Back to Top ↑

Information-Retrieval

IR 经典模型之向量模型

less than 1 minute read

1. 向量模型同样将 dj 和 qcc 同级计算,采用的同级方式是扩展 qcc 到 t 维

Back to Top ↑

Blog

Post: Link Permalink

less than 1 minute read

This theme supports link posts, made famous by John Gruber. To use, just add link: http://url-you-want-linked to the post’s YAML front matter and you’re done.

Post: Notice

1 minute read

A notice displays information that explains nearby content. Often used to call attention to a particular detail.

Back to Top ↑

TDD

Back to Top ↑

iBatis

Sqlmap Namespace

less than 1 minute read

  若设置了 useStatementNamespaces="true",如:

ibatis 小问题集合

1 minute read

Error setting a property: IllegalArgumentException 的一种可能的原因

Back to Top ↑

Numpy

Back to Top ↑

Docker

Back to Top ↑

vs-code

VS Code Docker: cannot build from local images

1 minute read

当你的 Dockerfile 是 FROM 一个 local image,然后你在 VS Code 里右键你的 Dockerfile 再 Build Image...,你可能会看到这样一个 error:

Back to Top ↑

MongoDB

Back to Top ↑

ARM7

Back to Top ↑

Tomcat

Tomcat 6.0 环境变量和 Tomcat Manager Account

less than 1 minute read

有的文章上说只用 CATALINA_HOME 这么一个,也有的说是 CATALINA_HOME、CATALINA_BASE、TOMCAT_HOME 这3个。我看 Tomcat Document,CATALINA_HOME 好像是必须的,还有地方提到了 CATALINA_BASE,既然这样的话,那就三个都设置好了。

Back to Top ↑

Hardware

Back to Top ↑

Database

Back to Top ↑

Continuous-Integration

Back to Top ↑

UML

Back to Top ↑

CXF

Back to Top ↑

Hibernate

hibernate 延迟加载的错误

less than 1 minute read

异常信息:failed to lazily initialize a collection of role: <容器类对象>, no session or session was closed

Back to Top ↑

Struts

struts2: interceptor config

less than 1 minute read

为了解决昨天晚上碰到的 aLock 那个吞 Exception 的问题,下午配了一下 struts 2 的拦截器。

Back to Top ↑

Memcached

Back to Top ↑

log4j

Back to Top ↑

Octave

Back to Top ↑

Latex

Back to Top ↑

SSH

DSA setting at SSH client end

1 minute read

I met a problem setting up SSH and git today, and I am happy to share my workaround just in case you met the same problem.

Back to Top ↑

Linux

Back to Top ↑

scipy

scipy: pdist indexing

1 minute read

scipy.spatial.distance.pdist(X) gives the pair-wise distances of X, $\operatorname{dist}(X[i], X[i])$ not included. The distances are stored in a dense matri...

Back to Top ↑

PyTorch

PyTorch: Computational Graphs

less than 1 minute read

首先感谢有 PyTorchViz 这个项目 (依赖 Graphviz) 使得我们可以画出 PyTorch 的 computational graph。PyTorch 自己好像并没有 built-in 的机制来做这件事情。

Back to Top ↑

Tensorflow

Back to Top ↑

SICP

SICP: Recursion vs Iteration

7 minute read

SICP 的 Section 1.2.1 Linear Recursion and Iteration 着重强调了 “无论是 recursive process 还是 iterative process,写出来都是 recursive procedure”,但其实只需要稍微归纳一下,”procedure vs p...

Back to Top ↑

asyncio

Back to Top ↑

Shell

Syntax Highlighting less

1 minute read

Stéphane Chazelas on Syntax highlighting in the terminal 总结得挺好,以下方法都可以 highlight less 命令的 output:

Back to Top ↑

Git

Git: How to sync a fork

less than 1 minute read

Configure an upstream remote for your fork, following Configuring a remote for a fork. Sync your fork to the upstream remote, following Syncing a fork.

Back to Top ↑

Ruby

Back to Top ↑