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
# 把 一、三、六 轉成 list | |
def convert_datestr_to_list(date_str): | |
def convert(day): | |
return int(day.replace("一","1").replace("二","2").replace("三","3").replace("四","4").replace("五","5").replace("六","6").replace("日","7")) | |
result = [] | |
for a in date_str.split("、"): | |
b = a.split('~') |
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
$('.subject').each(function(){ | |
console.log("http://ithelp.ithome.com.tw" + $(this).children('a').attr('href')); | |
console.log($(this).text()); | |
console.log(); | |
}) |
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
javascript: (function() { | |
function loadScript(url, callback) { | |
var script = document.createElement("script"); | |
script.type = "text/javascript"; | |
if (script.readyState) script.onreadystatechange = function() { | |
if (script.readyState == "loaded" || script.readyState == "complete") { | |
script.onreadystatechange = null; | |
callback() | |
} | |
}; |
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
javascript: var element1 = document.createElement("script"); | |
element1.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"; | |
element1.type = "text/javascript"; | |
document.getElementsByTagName("head")[0].appendChild(element1); | |
var text = prompt("請輸入自傳"); | |
var len = text.length; | |
var result = new Array(); | |
if (len > 1350) { | |
alert("字數過多"); | |
} else { |
NewerOlder