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
function ch2nato(ch) { | |
switch (ch.toLowerCase()) { | |
case "a": return "ALPHA"; | |
case "b": return "BRAVO"; | |
case "c": return "CHARLIE"; | |
case "d": return "DELTA"; | |
case "e": return "ECHO"; | |
case "f": return "FOXTROT"; | |
case "g": return "GOLF"; | |
case "h": return "HOTEL"; |
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
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
(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
(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
// | |
// Include keys file | |
// | |
include "/etc/rndc.key"; | |
// Declares control channels to be used by the rndc utility. | |
// | |
// It is recommended that 127.0.0.1 be the only address used. | |
// This also allows non-privileged users on the local host to manage | |
// your name server. |
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
Office 2010 Professional Plus 正體中文 | |
32位元:https://mega.co.nz/#!UF5EVCCa!Pk9DPCndWJk3Ho3bqXsHtEk1Ijd5yr7fHP6Pn54fgFk | |
64位元:https://mega.co.nz/#!dIgzCYKQ!T57WuG6NyoeLzsIB_eA3bAdU0EgDhQYyqAm2TK6qNe4 | |
KMS破解:https://mega.co.nz/#!xF5xAbKa!AUQu8gO9NVzyzuZapqsPdVz3FSgkSIln-gxDiK9XXcE | |
破解教學: | |
1.執行 mini-KMS Activator | |
(Do you run the program as Administrator? [Yes]) | |
2.安裝 KMService |
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
#include <iostream> | |
#include <string> | |
#define N 7 | |
using namespace std; | |
// 建立羅馬數字與十進位相對應的陣列資料 | |
char roman[N] = {'M', 'D', 'C', 'L', 'X', 'V', 'I'}; | |
int arabic[N] = {1000, 500, 100, 50, 10, 5, 1}; |
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
#include <stdio.h> | |
int gcd(int a, int b) | |
{ | |
int m; | |
while(b) | |
{ | |
m = b; | |
b = a % b; | |
a = m; |