Skip to content

Instantly share code, notes, and snippets.

View andy0130tw's full-sized avatar
why no 🍆

Andy Pan andy0130tw

why no 🍆
View GitHub Profile
ShockwaveFlash1.SAlign = "TL"
ShockwaveFlash1.AllowFullScreen = True
ShockwaveFlash1.AllowNetworking = "all"
ShockwaveFlash1.AllowScriptAccess = "always"
'ShockwaveFlash1.BackgroundColor = RGB(255, 255, 255)
ShockwaveFlash1.BGColor = "ffffff"
'Pixel & Twip 的換算
Public Function pixelToTwip(ByVal pixel As Long) As Long
pixelToTwip = Screen.TwipsPerPixelX * pixel
End Function
Public Function loadMovie(moviePath As String)
ShockwaveFlash1.Movie = moviePath
End Function
public var throttle:Function = function (fn:Function, delay:Number):Function {
var timer:* = null;
return function ():void {
var context:Object = this, args:Object = arguments;
timer = setTimeout(function ():void {
fn.apply(context, args);
}, delay);
andy0130tw / CookieObject.js
Last active August 29, 2015 13:56
//CookieObject v1 by Andy Pan
// You can use the small piece of code to r/w
// > Cookies, not losing its structure of an object.
// > All complex contents will be automatically
// > en(de)code, but simple contents won't
// > so that you can access them without pain.
// Assume JSON.parse() and JSON.stringify().
// Use it with jquery.cookie by carhartl:
andy0130tw /
Created May 30, 2014 00:13
Learn Mode Account Generator
#-*- coding: utf-8 -*-
import pycurl
import json
import time
import datetime
import sys
import signal
import urllib
andy0130tw / ui.html
Created June 1, 2014 16:20
HTML Drag'n'Drop Quick Example
<!DOCTYPE html>
<script src=""></script>
function noop(e){
#define MAX 1000000
#define MULTI 1000
using namespace std;
typedef long long ll;
typedef pair<ll,ll> point;
int n,f;
ll sum[MAX+1];
andy0130tw /
Last active July 8, 2019 20:07
The Ice Tower Solver
andy0130tw / crsc2014.gbapi.php
Last active August 29, 2015 14:03
CRSC2014 Guestbook Backend
//Comment for easier reading
// Override default SQLite constructor to
// open the file at first.
class MyDB extends SQLite3{
function __construct(){
andy0130tw / gbtest.html
Last active August 29, 2015 14:03
The frontend of CRSC2014 guestbook for Yu-Ren Pan! (For debugging only)
<!DOCTYPE html>
<title>Guestbook Test</title>
<script src="res/js/jquery-1.10.2.min.js"></script>