This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<program> ::= <clause list> <query> | <query> | |
<clause list> ::= <clause> | <clause list> <clause> | |
<clause> ::= <predicate> . | <predicate> :- <predicate list>. | |
<predicate list> ::= <predicate> | <predicate list> , <predicate> | |
<predicate> ::= <atom> | <atom> ( <term list> ) | |
<term list> ::= <term> | <term list> , <term> | |
<term> ::= <numeral> | <atom> | <variable> | <structure> | |
<structure> ::= <atom> ( <term list> ) | |
<query> ::= ?- <predicate list>. | |
<atom> ::= <small atom> | ' <string> ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstdio> | |
#include <cstdlib> | |
#include <vector> | |
#include <queue> | |
#include <cstring> | |
using namespace std; | |
#define MAXN 610 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%============================================================================= | |
% FileName: sudoku_solver.pl | |
% Desc: sudoku solver | |
% Environment: Mac OS X 10.8.2, SWI-Prolog 6.2.6 | |
% Usage: swipl -q -s sudoku_solver.pl | |
% Input: Enter all number in one line and seperate by one space. 0 denote the empty element. | |
% Output: Show all number in one line and seperate by one space. | |
% Author: KuoE0 | |
% Email: [email protected] | |
% HomePage: http://kuoe0.ch/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env sbcl --script | |
;;; Filename: expr.lsp | |
;;; Author: KuoE0 <[email protected]> | |
;;; Description: Convert infix expression to postfix expression | |
;;; | |
;;; Distruted under terms of the BSD license. | |
; split string by one space | |
(defun split-by-space (str) | |
(let ((len (length str)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#============================================================================= | |
# FileName: brew_version | |
# Desc: install specific version formula with homebrew | |
# Usage: brew_version <formula> <version> [param1 param2 ...] | |
# Author: KuoE0 | |
# Email: [email protected] | |
# HomePage: http://kuoe0.ch/ | |
#============================================================================= | |
# /usr/bin/env bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/local/bin/python | |
# -*- coding: utf-8 -*- | |
import math | |
palin = [] | |
max_digit = 0 | |
def isPalindrome( number ): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*============================================================================= | |
# FileName: qround - b - Lawnmower.cpp | |
# Desc: Google Code Jam 2013 - Qualification Round - B - Lawnmower | |
# Author: KuoE0 | |
# Email: [email protected] | |
# HomePage: http://kuoe0.ch/ | |
# Version: 0.0.1 | |
# LastChange: 2013-04-14 16:17:59 | |
# History: | |
=============================================================================*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*============================================================================= | |
# FileName: qround - a - Tic-Tac-Toe-Tomek.cpp | |
# Desc: Google Code Jam - Qualification Round - A - Tic-Tac-Toe-Tomek | |
# Author: KuoE0 | |
# Email: [email protected] | |
# HomePage: http://kuoe0.ch/ | |
# Version: 0.0.1 | |
# LastChange: 2013-04-14 16:19:38 | |
# History: | |
=============================================================================*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*============================================================================= | |
# FileName: quickSort.cpp | |
# Desc: Quick Sort | |
# Author: KuoE0 | |
# Email: [email protected] | |
# HomePage: http://kuoe0.ch/ | |
# Version: 0.0.1 | |
# LastChange: 2013-03-05 03:17:47 | |
# History: | |
=============================================================================*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*============================================================================= | |
# FileName: mergeSort.cpp | |
# Desc: Natural Merge Sort | |
# Author: KuoE0 | |
# Email: [email protected] | |
# HomePage: http://kuoe0.ch/ | |
# Version: 0.0.1 | |
# LastChange: 2013-03-05 02:55:56 | |
# History: | |
=============================================================================*/ |