Skip to content

Instantly share code, notes, and snippets.

void draw() {
if (currentStage==null) {
currentStage = (Stage) q.poll();
println("use Stage="+currentStage.name);
}
if (currentStage==null) {
}
else {
if (currentStage.status == StateType.INITIAL) {
callMethod(currentStage.initMethod);
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?*$ index.php/$1 [L,QSA]
(function() {
var PackerMap=function(element,options){
};
PackerMap.prototype.center=function(lat,lng){
}
$.fn.packerMap = function(options,prop,prop2) {
var args = Array.prototype.slice.call(arguments);
(function() {
var defaults = {
error_container : '#check_result',
waiting : '#waiting',
target_text : '編碼',
api_url: ''
}
var checkDuplicate = function(elem, options){
var currentTimer = 0;
@crazylion
crazylion / e.java
Created May 14, 2015 00:33
run cmd with exception
import java.io.*;
boolean _isWin=false;
void runCmd(String cmd) {
Process p;
InputStream stderr=null;
InputStreamReader esr=null ;
BufferedReader ebr=null;
InputStream stdout=null;
@crazylion
crazylion / check.ahk
Created June 11, 2015 17:44
autohotkey - always on top
Loop,30
{
IfWinNotActive,empty
{
WinActivate,empty
}
sleep, 5000
}
return
$(document).ready(function(){
var limit=1;
$(":radio.voting").click(function(){
var count = $(":radio.voting:checked").size();
if(count>limit){
$(this).attr("checked",false);
return false;
}else{
return true;
$(".authBtn").live("click",function(){
var _this =this;
$.getJSON('auth_process.php?type=json',{Id:$(this).attr("id")},
function(ret) {
//成功
if(ret=="pass"){
$(_this).remove();
// console.log("啟用!!!");
}else if(ret=="fail"){
window.alert("驗證手續失敗請再試一次或刷新頁面!!!");
<?php echo (($field->widgetView($profile))?$field->widgetView($profile):CHtml::encode((($field->range)?Profile::range($field->range,$profile->getAttribute($field->varname)):$profile->getAttribute($field->varname)))); ?>
<?php echo (($field->widgetView($profile))?$field->widgetView($profile):CHtml::encode((($field->range)?Profile::range($field->range,$profile->getAttribute($field->varname)):$profile->getAttribute($field->varname)))); ?>
<?php
//應該是這樣
if($field->widgetView($profile)){
echo $field->widgetView($profile);
}else{
啟用上傳
$(function () {
$('.file_upload').each(function(){
var _this=this;
$(this).fileUploadUIX(
{
maxFileSize: 3000000, // Size in Bytes - 5 MB
maxNumberOfFiles: 1,
acceptFileTypes: /(png)|(jpe?g)|(gif)$/i,