Skip to content

Instantly share code, notes, and snippets.

View RadianSmile's full-sized avatar

Radian RadianSmile

  • Innova Solutions Taiwan, LTD
  • Taipei, Taiwan
  • 15:38 (UTC +08:00)
View GitHub Profile
@RadianSmile
RadianSmile / Hanoi.java
Last active November 2, 2015 17:19
Hanoi for Alice
import java.util.*;
/* Class TowerOfHanoiUsingStacks */
public class HanoiStacks {
public static int N;
public static Stack<Integer>[] tower = new Stack[4];
// 為什麼是 4 ? 因為為了要用到 1 , 2 , 3 這個數字,不用 0
public static void main(String[] args) {
alert("a.js");
@RadianSmile
RadianSmile / ctags definitions for Javascript
Created September 28, 2015 05:26 — forked from tim-smart/ctags definitions for Javascript
CTags Definitions for Javascript
--langdef=js
--langmap=js:.js
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*\{/\5/,object/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*function[ \t]*\(/\5/,function/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*\[/\5/,array/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*[^"]'[^']*/\5/,string/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*(true|false)/\5/,boolean/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*[0-9]+/\5/,number/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*.+([,;=]|$)/\5/,variable/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*[ \t]*([,;]|$)/\5/,variable/
// npm i request cheerio json2csv
var fs = require('fs'),
request = require('request'),
cheerio = require('cheerio'),
json2csv = require('json2csv');
var HOST = 'https://www.ptt.cc';
var getMenu = function (url, callback, links) {
var links = links || []; // Set default value for links (initial call)
@RadianSmile
RadianSmile / 周老師的搜尋頁面
Created April 18, 2015 13:41
Element V2: Custom Search Engine Results-only Layout Demo// source http://jsbin.com/noyura
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<title>Element V2: Custom Search Engine Results-only Layout Demo</title>
<style type="text/css">
h4.warning {color: red;}
h4.recommendation {color: green;}
</style>
<!DOCTYPE html>
<html>
<head>
<link rel="prefetch" href="http://140.119.134.100/co-construction/infoA.php?bid=1" />
<link rel="prerender" href="http://140.119.134.100/co-construction/infoA.php?bid=1" />
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<head>
<script type="text/javascript">
window.fbAsyncInit = function() {
Parse.initialize("xxx", "xxx");
Parse.FacebookUtils.init({
appId : 'xxx',
cookie : true,
xfbml : true,
version : 'v1.0' // !! I change this because some said to do this. I forget the reference
//music
import ddf.minim.spi.*;
import ddf.minim.signals.*;
import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.ugens.*;
import ddf.minim.effects.*;
Minim minim;
AudioPlayer popo;
AudioPlayer bling;