Skip to content

Instantly share code, notes, and snippets.

View lctseng's full-sized avatar

Liang-Chi Tseng lctseng

View GitHub Profile
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
#============================================================================
# ■ Keyboard Script
#----------------------------------------------------------------------------
#  By: Cybersam
# Date: 25/05/05
# Version 4
@char_pool = []
10.times do |i|
if i != 5
@char_pool << "R#{i}"
@char_pool << "B#{i}"
else
@char_pool << "G5"
@char_pool << "G5"
end
javascript:(function(){
function deepCompare(){var n,e,t,r;function o(n,e){var a;if(isNaN(n)&&isNaN(e)&&"number"==typeof n&&"number"==typeof e)return!0;if(n===e)return!0;if("function"==typeof n&&"function"==typeof e||n instanceof Date&&e instanceof Date||n instanceof RegExp&&e instanceof RegExp||n instanceof String&&e instanceof String||n instanceof Number&&e instanceof Number)return n.toString()===e.toString();if(!(n instanceof Object&&e instanceof Object))return!1;if(n.isPrototypeOf(e)||e.isPrototypeOf(n))return!1;if(n.constructor!==e.constructor)return!1;if(n.prototype!==e.prototype)return!1;if(t.indexOf(n)>-1||r.indexOf(e)>-1)return!1;for(a in e){if(e.hasOwnProperty(a)!==n.hasOwnProperty(a))return!1;if(typeof e[a]!=typeof n[a])return!1}for(a in n){if(e.hasOwnProperty(a)!==n.hasOwnProperty(a))return!1;if(typeof e[a]!=typeof n[a])return!1;switch(typeof n[a]){case"object":case"function":if(t.push(n),r.push(e),!o(n[a],e[a]))return!1;t.pop(),r.pop();break;default:if(n[a]!==e[a])return!1}}return!0}if(argument
function deepCompare() {
var i, l, leftChain, rightChain;
function compare2Objects(x, y) {
var p;
// remember that NaN === NaN returns false
// and isNaN(undefined) returns true
if (isNaN(x) && isNaN(y) && typeof x === 'number' && typeof y === 'number') {
return true;
javascript:(function(){
function deepCompare(){var n,e,t,r;function o(n,e){var a;if(isNaN(n)&&isNaN(e)&&"number"==typeof n&&"number"==typeof e)return!0;if(n===e)return!0;if("function"==typeof n&&"function"==typeof e||n instanceof Date&&e instanceof Date||n instanceof RegExp&&e instanceof RegExp||n instanceof String&&e instanceof String||n instanceof Number&&e instanceof Number)return n.toString()===e.toString();if(!(n instanceof Object&&e instanceof Object))return!1;if(n.isPrototypeOf(e)||e.isPrototypeOf(n))return!1;if(n.constructor!==e.constructor)return!1;if(n.prototype!==e.prototype)return!1;if(t.indexOf(n)>-1||r.indexOf(e)>-1)return!1;for(a in e){if(e.hasOwnProperty(a)!==n.hasOwnProperty(a))return!1;if(typeof e[a]!=typeof n[a])return!1}for(a in n){if(e.hasOwnProperty(a)!==n.hasOwnProperty(a))return!1;if(typeof e[a]!=typeof n[a])return!1;switch(typeof n[a]){case"object":case"function":if(t.push(n),r.push(e),!o(n[a],e[a]))return!1;t.pop(),r.pop();break;default:if(n[a]!==e[a])return!1}}return!0}if(argument
class Solution {
public:
int minDominoRotations(vector<int>& A, vector<int>& B) {
int count[7] = {0};
for(int i =0;i < size(A);i++){
if(A[i] == B[i]){
count[A[i]]++;
}
else{
count[A[i]]++;
class Solution {
public:
TreeNode* bstFromPreorder(vector<int>& preorder, int& index, int parentIndex) {
if(index >= preorder.size() || (parentIndex >= 0 && preorder[index] >= preorder[parentIndex])){
return nullptr;
}
else{
TreeNode* root = new TreeNode(preorder[index]);
int thisIndex = index;
index++;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.*;
public class 方劑單味藥組合
{
private static Set<Set<String>> getPowerSet(List<String> 藥物集合)
{
sudo ./certbot-auto certonly --manual -d "*.example.com" -d "example.com" --agree-tos --manual-public-ip-logging-ok --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory

AI 課本第二章以前

  • AI發展:1980~1990
    • 難以開發出解決general問題的AI => 轉往解決"專業問題"
      • 專家系統:以專業知識為基礎
        • 規則庫+專業領域的本體(ontology)or劇本(script)
        • 劇本:例如點餐:先點、確認、付錢、統編
          • 類似某一種固定的流程
    • 工業應用(而非國防
      • scheduling(排程),例如何時去見哪個客戶
  • planing(規劃)