Skip to content

Instantly share code, notes, and snippets.

View poying's full-sized avatar
🏠
I may be slow to respond.

Po-Ying Chen poying

🏠
I may be slow to respond.
View GitHub Profile
@poying
poying / 3-27.c
Created September 26, 2012 14:08
3.27
#include <stdio.h>
#define SIZE 10
#define ANS 2
int in(int i, const int *h){
int c = SIZE;
while(c--){
//printf("> %d\n", *h);
if(*h == i){
@poying
poying / 4-11.c
Created October 8, 2012 13:22
ch4
#include <stdio.h>
void main(void){
int c, i, s, f = 1;
scanf("%d", &c);
while(c--){
printf("%d: \n> ", c);
scanf("%d", &i);
if(f){
@poying
poying / en-US.json
Created November 9, 2012 13:05
Foxmosa 翻譯!
{
"foxmosa-title": "Foxmosa 小莎",
"moztw-name": "台灣社群",
"foxmosa-name": "狐耳摩莎",
"menu-download": "下載",
"menu-forum": "討論區",
"menu-events": "活動",
"menu-wiki": "共筆系統",
"menu-planet": "摩茲工寮",
"menu-contribute": "參與我們",
@poying
poying / 8q.c
Created November 20, 2012 14:58
ch6
#include <stdio.h>
#include <stdlib.h>
int counter = 0;
int abs(int val){
return val < 0? val * -1: val;
}
void draw(int * array, int size){
@poying
poying / avltree.js
Created December 4, 2012 15:25
AVL Tree in JavaScript
/*jslint browser: true, regexp: true, nomen: true */
(function (win) {
'use strict';
var AvlTreeNode,
AvlTree,
events = {};
function max(a, b) {
a = a || 0;
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 7. in line 1.
"Dstat 0.7.2 CSV output"
"Author:","Dag Wieers <dag@wieers.com>",,,,"URL:","http://dag.wieers.com/home-made/dstat/"
"Host:","poying-Lenovo-G470",,,,"User:","poying"
"Cmdline:","dstat --noheader --output systemstats.csv",,,,"Date:","07 Apr 2013 20:59:50 CST"
"total cpu usage",,,,,,"dsk/total",,"net/total",,"paging",,"system",
"usr","sys","idl","wai","hiq","siq","read","writ","recv","send","in","out","int","csw"
5.587,1.298,92.440,0.594,0.000,0.082,86255.898,37344.575,0.0,0.0,0.0,0.0,622.540,1860.083
7.035,2.261,89.196,1.508,0.0,0.0,0.0,106496.0,60.0,0.0,0.0,0.0,558.0,1994.0
8.376,1.015,90.609,0.0,0.0,0.0,0.0,0.0,60.0,0.0,0.0,0.0,607.0,2044.0
@poying
poying / db.md
Last active December 15, 2015 23:49

資料庫規劃

users

  • id
  • login
  • name
  • email

contacts

JavaScript - 與 Node.js 的前戲 | node-ttucsc

  • Node.js 基本介紹
  • JavaScript 基本語法
  • function
  • event loop
  • scope & closure
  • OO
@poying
poying / express.js
Created May 13, 2013 14:50
express 多個 view folder
'use strict';
var path = require('path');
var express = require('express');
function _merge(a, b) {
if (a && b) {
var i;
for (i in b) {
if (b.hasOwnProperty(i)) {
@poying
poying / sandston.md
Created June 21, 2013 15:47
sandston 佈景開發說明

安裝

切換到 htdocs/sandstone

npm install

Stylus 編譯 & LiveReload

./livereload