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
.scroll-text { | |
border: 1px solid red; | |
width: 400px; | |
height: 4.5em; | |
overflow: hidden; | |
} | |
.scroll-text ul { | |
width: 800px; | |
height: 100px; | |
overflow: hidden; |
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
var fileInputStr = "<input type='file' class='ignore' id='" + fileUploadId + "' name='" + s.fileName + "' accept='" + s.acceptFiles + "'/>"; | |
if(s.multiple) { | |
if(s.fileName.indexOf("[]") != s.fileName.length - 2) // if it does not endwith | |
{ | |
s.fileName += "[]"; | |
} | |
fileInputStr = "<input type='file' class='ignore' id='" + fileUploadId + "' name='" + s.fileName + "' accept='" + s.acceptFiles + "' multiple/>"; | |
} |
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
// https://kktix.com/users/edit | |
$('#user_place_id').val($('#user_place_id option:contains(臺灣)').attr('value')); |
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
// http://www.meitetsu.co.jp/cht/timetable/centrair/timetable/access_e05_02.html | |
$('table[bordercolor=lightgrey] tr').each(function () { | |
var $this = $(this), | |
$departCell = $this.find('td:nth-child(2)'), | |
$arriveCell = $this.find('td:nth-child(5)'), | |
departTime = $departCell.text(), | |
arriveTime = $arriveCell.text(); | |
if (departTime.indexOf(':') == -1 || arriveTime.indexOf(':') == -1) { | |
return; | |
} |
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
// https://github.com/musalbas/mcc-mnc-table/blob/master/mcc-mnc-table.csv | |
var mccs={}; | |
document.querySelectorAll('table.js-csv-data > tbody > tr > td:nth-child(2)').forEach(function (ele) { | |
mccs[ele.innerText] = 1; | |
}); | |
Object.keys(mccs).join(','); |
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
// https://www.esunbank.com.tw/bank/Layouts/esunbank/Accessibility/rate_exchange.aspx | |
var trs = document.querySelectorAll('table.inteTable tr') | |
for (var i = 0; i < trs.length; ++i) { | |
var buyPrice = trs[i].querySelector('td:nth-child(2)'), | |
selPrice = trs[i].querySelector('td:nth-child(3)'); | |
if (buyPrice == null || isNaN(buyPrice.innerText) || selPrice == null || isNaN(selPrice.innerText)) { | |
continue; | |
} | |
console.log(1); | |
var buyPriceFloat = parseFloat(buyPrice.innerText), |
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
# https://github.com/ethereum/go-ethereum/wiki/Management-APIs | |
document.querySelectorAll('a').forEach(function (a) { | |
var href = a.getAttribute('href'); | |
if (href.indexOf('#') === 0 && href !== href.toLowerCase()) { | |
a.setAttribute('href', href.toLowerCase()); | |
} | |
}); |
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
$('#fem03001\\:prodName option').each(function (idx, ele) { if (ele.innerText.indexOf('空')==-1) {$(ele).remove()} }) |
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
pragma solidity ^0.4.21; | |
contract VerifySign { | |
function verify(bytes _msgHex, uint8 _v, bytes32 _r, bytes32 _s) public pure returns (address) { | |
bytes32 prefixedHash = keccak256("\x19Ethereum Signed Message:\n", uint2str(_msgHex.length), _msgHex); | |
address signer = ecrecover(prefixedHash, _v, _r, _s); | |
return signer; | |
} |
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
// https://www.binance.com/userCenter/balances.html | |
var sql = 'INSERT INTO token_mappings (src, name, coin_name, image_url) VALUES \n'; | |
document.querySelectorAll('ul.accountInfo-lists > li.td > div').forEach((row) => { | |
const imgURL = row.querySelector('div.coin > img').getAttribute('src'); | |
const coin = row.querySelector('div.coin').textContent.trim(); | |
const fullname = row.querySelector('div.fullName').textContent.trim(); | |
sql += `('binance', '${coin}', '${fullname}', '${imgURL}'),\n`; | |
}); | |
console.log(sql); |