Quantcast
Channel: Search Results For: domain:blog.pengyifan.com
Browsing latest articles
Browse All 27 View Live

Image may be NSFW.
Clik here to view.

How to Install Gnuplot 4.6 with PDF on Ubuntu

It is always hard to install gnuplot manually on Ubuntu, especially if you want to plot diagram in PDF, JPEG, or PNG formats. This short 101 article describes one way to install gnuplot with PDF on...

View Article


Image may be NSFW.
Clik here to view.

Tikz example – SVM trained with samples from two classes

This figure was drawn for maximum-margin hyperplane and margins for an SVM trained with samples from two classes.

View Article


Image may be NSFW.
Clik here to view.

Split a string into pairs of words

Given a string such as “aa bb cc dd ee ff“, is there a regex that works with String.split() to extract two words at a time? The expected result is: [aa bb, cc dd, ee ff]

View Article

Image may be NSFW.
Clik here to view.

Recommend a paper: Empirical Analysis of Programming Language Adoption

Some programming languages become widely popular while others fail to grow beyond their niche or disappear altogether. This paper uses survey methodology to identify the factors that lead to language...

View Article

Image may be NSFW.
Clik here to view.

Load Penn Treebank with offsets

When I am doing relation extraction based on parsing trees, it is always very helpful to map the leaves of parsing trees back to the original text. So the question will be: How to load trees with...

View Article


Image may be NSFW.
Clik here to view.

How to use Opennlp to do part-of-speech tagging

The Apache OpenNLP library is a machine learning based toolkit for the processing of natural language text. Among others, part-os-speech tagging (POS tagging) is one of the most common NLP tasks....

View Article

Image may be NSFW.
Clik here to view.

Yet another Java tree structure

There are a couple of toy codes of java tree, but none of them are sufficient yet small enough for general purpose. This project attempts to provide another general-purpose tree data structure in Java....

View Article

Image may be NSFW.
Clik here to view.

A Java Implementation of Fibonacci Heap

This project provides a Java implementation of Fibonacci Heap. Fibonacci Heap is a heap data structure consisting a collection of min-heap-ordered trees. It is an advanced amortized data structure,...

View Article


Image may be NSFW.
Clik here to view.

When to post technology blogs?

When to post is another important aspect for a successful blog. Are certain times better than others? The answer is absolutely Yes, but it depends on the industry and the nature of your group...

View Article


Image may be NSFW.
Clik here to view.

How to extend enum in Java

In Java feature, it is not possible to have one enum extend another. But occasionally, you may still want to make an enum class extensible. The solution we came up with was to use an enum and a...

View Article

Image may be NSFW.
Clik here to view.

Recommend: A Course in Machine Learning

This book is for the use of anyone anywhere at no cost and with almost no restrictions whatsoever. It is a set of introductory materials that covers most major aspects of modern machine learning. A...

View Article

Image may be NSFW.
Clik here to view.

How To Run Android 4.0 In Virtualbox

You may need to test new apps on main Android devices available on the market. Of course you don’t want to install them on your working cellphone. Under such circumstances, installing a virtual machine...

View Article

Image may be NSFW.
Clik here to view.

Recommend: Rule-based Information Extraction is Dead! Long Live Rule-based...

This paper discusses the disconnect between industry and academia: while rule-based IE dominates the commercial world, it is widely regarded as dead-end technology by the academia.

View Article


Image may be NSFW.
Clik here to view.

Most efficient way to increment a Map value in Java -- Only search the key once

This question may be considered too basic, but is frequently asked in the forums. In this post, I will discuss one way that only searches the key in Map ONCE. Also I create a class called Counter and...

View Article

Image may be NSFW.
Clik here to view.

How to draw Kernel trick using Tikz

In Support Vector Machines, the learning algorithms can only solve linearly separable problems. However, this isn’t strictly true. This figure was drawn for “kernel trick” with samples from two...

View Article


Image may be NSFW.
Clik here to view.

How to set terminal title dynamically to the current working directory?

It is sometimes helpful to set a terminal window title from a script, so that you can put a couple of reminders of how to do things there. This post will tell you how to do so if you are using Zsh or Bash

View Article

Image may be NSFW.
Clik here to view.

C++11 reading list

C++11 (formerly known as C++0x) is the most recent version of the standard of the C++ programming language. After it was approved by ISO in 2011, many books have been published to embrace the updates....

View Article


Image may be NSFW.
Clik here to view.

My Google-themed resume

Inspired by the resume of Eric Gandhi, I created this Google-themed resume for summer intern hunting 2014. I also shared my resume on Google Drive, in order for others to apply the theme on their...

View Article

Image may be NSFW.
Clik here to view.

How to fix Gedit LaTex Plugin error while saving BibTex

Gedit (3.4.1) gives the error below while saving a BibTex file (Ubuntu 12.04). The saving works fine, apart from the error popping up. How to fix it?

View Article

Image may be NSFW.
Clik here to view.

Two algorithms to find the nth to last element of a singly linked list

This is one of frequently asked questions on the programming interview. There are two kinds of solution: iteration-based and recursion-based.

View Article

Image may be NSFW.
Clik here to view.

Given a binary tree, create a list of all the nodes at each depth --...

Another FAQ on the programming interview.Cracking the Coding Interview (4ed) (see page 126) provided a non-recursive algorithm. For me, a recursive version is neater and much easier to understand.

View Article


Image may be NSFW.
Clik here to view.

Sort a stack in ascending order in O(n log n)

Write a program to sort a stack in ascending order. You should not make any assumptions about how the stack is implemented. The following are the only functions that should be used to write this...

View Article


Image may be NSFW.
Clik here to view.

Java.io in nutshell: 22 case studies

This post attempts to cover a comprehensive set of operations in java.io. Compared with other books and blogs related to this topic, my motivation is to show “how-to” through case studies.

View Article

Image may be NSFW.
Clik here to view.

How to build PDFsam enhanced

PDFsam (PDF Split and Merge) is a free and open source desktop utility designed to perform pdf documents manipulation (pdf merge, pdf split, page rotation etc). PDFsam Enhanced is its Pro version.....

View Article

Image may be NSFW.
Clik here to view.

Using regex to hanging indent a paragraph in Java

This post shows how to hanging indent a long paragraph using regular expression. The method will consider word boundaries, which means it will not break words for the indentation.

View Article

Browsing latest articles
Browse All 27 View Live