Skip to content

Instantly share code, notes, and snippets.

Jiaxiang Zheng JiaxiangZheng

View GitHub Profile
JiaxiangZheng / ring-queue.js
Created Apr 18, 2017
a ring queue with max capacity implements with plain array
View ring-queue.js
* RingQueue implements a cycle
class RingQueue {
constructor(capacity) {
this.list = new Array(capacity + 1);
this.lower = 0;
this.upper = 0;
add(v) {
JiaxiangZheng /
Last active Jan 22, 2020
convolutional neural network implemented with python
# port from
import numpy as np
import sys
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
def conv2(X, k):
# as a demo code, here we ignore the shape check
x_row, x_col = X.shape
k_row, k_col = k.shape
JiaxiangZheng /
Created Mar 19, 2017
template used in pandoc pdf generation process


  • pandoc PDF 生成示例 author:
  • 郑家祥 date:
  • \today{} fontsize:
  • 10pt documentclass:
JiaxiangZheng / cache.js
Last active Nov 22, 2016
a simple cache middleware wrapper for nodejs web server
View cache.js
// cache.js
const debug = console.log;
const nextTick = process.nextTick;
const CACHE = {
check(key, req, res) {
if (this._cache[key]) {
debug('cache %s hit', key);
nextTick(() => {
JiaxiangZheng / index.html
Created May 23, 2015
文本居中示例[CSS] CSS实现的垂直居中方法 // source
View index.html
<!DOCTYPE html>
<meta name="description" content="CSS实现的垂直居中方法">
<script src=""></script>
<link href="" rel="stylesheet" type="text/css" />
<script src=""></script>
<meta charset="utf-8">
<style id="jsbin-css">
JiaxiangZheng / json_encoding_demo.go
Created Feb 24, 2014
This file demonstrates golang's json library to encode&decode, marshal&unmarshal json data.
View json_encoding_demo.go
package main
import (
// 主要是靠Marshal和Unmarshal函数进行解析与读取
JiaxiangZheng / http_get.go
Created Feb 24, 2014 — forked from ijt/http_get.go
demonstrate how to fectch web page given the URL
View http_get.go
package main
import (
func main() {
JiaxiangZheng / computeRigidTransformUsingSVD.cpp
Last active Mar 2, 2020
compute the rigid transformation using SVD with library [Eigen](, usally useful in ICP registration or related works.
View computeRigidTransformUsingSVD.cpp
//using Eigen's SVD to fastly compute the rigid transformation between two point clouds.
#include <iostream>
#include <ctime>
#include <Eigen/SVD>
#include <Eigen/Dense>
#include <Eigen/Sparse>
#include <Eigen/Geometry>
using namespace Eigen;
JiaxiangZheng / pandoc-template.tex
Created Dec 22, 2013
This is my pandoc template for daily notes [chinese fonts support]. Pandoc usage see
View pandoc-template.tex
\usepackage{geometry} % 設定邊界
You can’t perform that action at this time.