title:
- pandoc PDF 生成示例 author:
- 郑家祥 date:
- \today{} fontsize:
- 10pt documentclass:
/** | |
* RingQueue implements a cycle | |
*/ | |
class RingQueue { | |
constructor(capacity) { | |
this.list = new Array(capacity + 1); | |
this.lower = 0; | |
this.upper = 0; | |
} | |
add(v) { |
# port from https://github.com/hsmyy/zhihuzhuanlan | |
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 |
title:
// 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(() => { | |
res.end(this._cache[key]); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="CSS实现的垂直居中方法"> | |
<script src="https://code.jquery.com/jquery.min.js"></script> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> | |
<meta charset="utf-8"> | |
<title>文本居中示例[CSS]</title> | |
<style id="jsbin-css"> |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"os" | |
"log" | |
) | |
// 主要是靠Marshal和Unmarshal函数进行解析与读取 |
package main | |
import ( | |
"fmt" | |
"net/http" | |
"io/ioutil" | |
"os" | |
) | |
func main() { |
//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; |
\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$$if(papersize)$$papersize$,$endif$]{$documentclass$} | |
\usepackage{geometry} % 設定邊界 | |
\geometry{ | |
top=1in, | |
inner=1in, | |
outer=1in, | |
bottom=1in, | |
headheight=3ex, | |
headsep=2ex | |
} |