This file contains hidden or 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() { | |
$btnYes = $('.btn-yes')[0]; | |
$btnNo = $('.btn-no' )[0]; | |
$content = $('.show-content')[0]; | |
function cheat() { | |
if (l = $content.innerHTML.length) { | |
l % 2 ? $btnNo.click() : $btnYes.click(); | |
} | |
setTimeout(cheat); |
This file contains hidden or 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(d){ | |
var f = d.getElementById("phpesp_response"); | |
for (var i in f) { | |
if (f[i]) { | |
switch (f[i].type) { | |
case "radio": | |
if (f[i].value == 4) { | |
f[i].checked = true; | |
} | |
break; |
This file contains hidden or 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
setInterval(function () { | |
// 取得網頁上所有連結 | |
var a = document.getElementsByTagName('a'); | |
// 針對每個連結跑一次 | |
for (var i in a) { | |
// 檢查是不是真的是連結 | |
if (a.hasOwnProperty(i)) { | |
// 檢查是不是讚的連結 | |
if (a[i].className == "UFILikeLink") { | |
// 檢查是不是還沒按過讚 |
This file contains hidden or 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
Array.prototype.sayHi = function () { | |
var say = 'Hi, ' + this.join(', ') + '!'; | |
window.alert(say); | |
} | |
var a = ['Bob', 'Alice', 'Emma']; | |
a.sayHi(); // this will alert: Hi, Bob, Alice, Emma! | |
for (var i in a) { | |
console.log(i, a.hasOwnProperty(i), a[i]); |
This file contains hidden or 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 | |
$conn = new PDO("mysql:host=127.0.0.1;dbname=rfid;", "root", ""); | |
$cursor = $conn->prepare("select * from :table ;"); | |
//$cursor->execute(array(":table"=>"contrast")); | |
$cursor->bindValue(":table", "contrast"); | |
$cursor->execute(); | |
var_dump($cursor->fetch()); | |
// var_dump($cursor); |
This file contains hidden or 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
// save the interval id for stop the script | |
window._ibon_doc_interval = setInterval(function() { | |
// function for get element by id | |
b = function(id) { return (this.getElementById ? this : document).getElementById(id); }; | |
// close the status window if exists | |
if (a = b("majorContents")) | |
b.call(a.contentDocument, "inquiry_btn").getElementsByTagName("a")[0].click(); | |
// fill in the document code |
This file contains hidden or 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 | |
/** | |
* Define: FILE_ROOT_PATH | |
* Set Value: $lang | |
* Create an ini file: i18n/lang.ini | |
* Call function: _gettext("Homepage") or someelse string | |
**/ | |
function _gettext($text) { | |
global $lang; | |
$langs = parse_ini_file(FILE_ROOT_PATH . "i18n/lang.ini", true); |
This file contains hidden or 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 | |
# Demo: http://mt.aa.am/dataurl.php | |
# data:[<MIME-type>][;charset=<encoding>][;base64],<data> | |
if(isset($_GET['uri']) || isset($_POST['uri']) || isset($_GET['file'])) { | |
if(isset($_GET['uri'])) $uri = $_GET['uri']; | |
else if(isset($_POST['uri'])) $uri = $_POST['uri']; | |
else if(isset($_GET['file'])) { | |
$file = $_GET['file']; | |
if(!(strtolower(substr($file, 0, 7)) == "http://" || strtolower(substr($file, 0, 8)) == "https://")) |
This file contains hidden or 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 檢查姓名(byval 姓名 as string) as boolean | |
dim 檢查 as boolean | |
for i as integer = 1 to len(姓名) | |
檢查 = false | |
select case lcase(mid(姓名, i, 1)) | |
case "0" | |
case "1" | |
case "2" | |
case "3" | |
case "4" |
This file contains hidden or 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 | |
$cls = true; | |
$use_same_db = false; | |
$old = true; | |
define("MT_TIMEOUT", 10); | |
function video_id($url) { | |
$parse_url = parse_url($url); | |
$query = array(); |
OlderNewer