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
$(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; |
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
$(".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("驗證手續失敗請再試一次或刷新頁面!!!"); |
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
<?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{ |
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
啟用上傳 | |
$(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, |
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
1. 把檔案列表貼到 list.txt檔案裡面 | |
2.打開終端機 到該目錄底下 | |
3.鍵入 wget --referer=http://map.google.com -i list.txt | |
4. 執行 ruby change.rb |
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
# location lib/plugins/assign_author/hook.rb | |
#如果使用者想要透過webservice指定作者的話,http 參數給予author_login即可。 | |
# 此欄位為user table的 login欄位 | |
module AssignAuthor | |
class Hooks < Redmine::Hook::ViewListener | |
def controller_issues_new_before_save(context={}) | |
if context[:params]["author_login"] | |
u=User.find_by_login(context[:params]["author_login"]) |
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
#!/bin/bash | |
start(){ | |
echo "start listening fssm" | |
/etc/xxx/listen.rb & | |
} | |
stop(){ | |
echo "stop listening fssm" | |
killall listen.rb |
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
(function(){ | |
YAHOO.util.Get.script("http://code.jquery.com/jquery-1.7.1.min.js"); | |
img_src=YAHOO.util.Dom.getStyle("mainImage","background-image");img_src=img_src.substring(5,img_src.length-2); | |
//console.log(img_src); | |
setTimeout(function(){ | |
//console.log(jQuery("#mainImageLink")); | |
list=jQuery("#photoSizes li a"); | |
var box=jQuery("#ajaxPhotoBox"); |
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
javascript:(function(){YAHOO.util.Get.script("https://raw.github.com/gist/1881074/2a9ffc1cc59c064d0b762c1156f9c30f6c4e02ee/gistfile1.js")})(); |
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
<?xml version="1.0" encoding="utf-8"?> | |
<DataSet xmlns="http://tempuri.org/"> | |
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | |
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"> | |
<xs:complexType> | |
<xs:choice minOccurs="0" maxOccurs="unbounded"> | |
<xs:element name="Table"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element name="Water_Station_ST_NO" type="xs:string" minOccurs="0" /> |
OlderNewer