- javascript:alert(origin)
- @maple3142
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
//require single module | |
require('vue').then(function(Vue){ | |
//do something | |
}) | |
//require multiple module | |
require(['jquery','lodash','lowdb']).then(function([$,_,low]){ | |
//do something | |
}) |
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
#include<iostream> | |
using namespace std; | |
int sum(int a,int b){ | |
return (a+b)*(b-a+1)/2; | |
} | |
int main(void){ | |
ios::sync_with_stdio(false); | |
int n; | |
while(cin>>n){ |
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
{ "banner": {}, "native_major": { "Android__": [] }, "native_minor": { "Android__": [], "iOS__": [] } } |
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
from functools import wraps | |
def cached(fn): | |
name=fn.__name__ | |
mycache={} | |
if not name in mycache: | |
mycache[name]={} | |
@wraps(fn) | |
def cachefn(*args,**kwargs): | |
key=(args,frozenset(kwargs)) | |
if key in mycache[name]: |
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
{"banner":{},"native_major":{"Android__":[],"iOS__":[]},"native_minor":{"Android__":[],"iOS__":[]}} |
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
[ | |
{ | |
"id": "1", | |
"type": "大吉", | |
"poem": "七寶浮圖塔,高峰頂上安,眾人皆仰望,莫作等閒看", | |
"explain": "就像出現了用美麗寶石做成的佛塔般地,似乎會有非常好的事情。因為能改用放眼萬事的立場,可以得到周圍的人們的信賴吧。合乎正道的你的行為,能被很多人的認同及鼓勵。不用隨便的態度看事情,用正確的心思會招來更多的好的結果。", | |
"result": { | |
"願望": "會充分地實現吧。", | |
"疾病": "會治癒吧。", | |
"盼望的人": "會出現吧。", |
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
[ | |
{ | |
"id": "1", | |
"type": "大吉", | |
"poem": "七寶浮圖塔,高峰頂上安,眾人皆仰望,莫作等閒看", | |
"explain": "就像出現了用美麗寶石做成的佛塔般地,似乎會有非常好的事情。因為能改用放眼萬事的立場,可以得到周圍的人們的信賴吧。合乎正道的你的行為,能被很多人的認同及鼓勵。不用隨便的態度看事情,用正確的心思會招來更多的好的結果。", | |
"result": { | |
"願望": "會充分地實現吧。", | |
"疾病": "會治癒吧。", | |
"盼望的人": "會出現吧。", |
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
const m=` | |
// @name 動畫瘋工具箱 | |
// @namespace https://blog.maple3142.net/ | |
// @version 0.4 | |
// @description 取得動畫的 m3u8 網址,下載彈幕為 json,去除擋廣告的警告訊息 | |
// @author maple3142 | |
// @match https://ani.gamer.com.tw/animeVideo.php?sn=* | |
// @require https://cdn.jsdelivr.net/npm/m3u8-parser@4.2.0/dist/m3u8-parser.min.js | |
// @grant none | |
` |
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
const n=3 | |
function c2da(n,m){ | |
const ar=[] | |
for(let i=0;i<n;i++)ar[i]=[] | |
return ar | |
} | |
const ar=c2da(n+1,n+1) | |
const vis=c2da(n+1,n+1) | |
const X=[1,0,-1,0] | |
const Y=[0,-1,0,1] |
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
(await Promise.all($('a').toArray().filter(x=>/^http.*\d{10}$/.test(x.textContent)).slice(1).map(r=>r.textContent.trim().replace('http:','https:')).map(x=>{ | |
return Promise.all([fetch(x).then(x=>x.text()),fetch(x+'?pn=2').then(x=>x.text())]) | |
}))).map(x=>{ | |
if($(x[0]).find('.l_pager').text())return x.join('') | |
else return x[0] | |
}).map(x=>$(x).find('.d_post_content').toArray().reduce((d,x)=>{ | |
const div=document.createElement('div') | |
div.innerHTML=x.innerHTML.replace(/<br>/g,'\n').replace(/</g,'<').replace(/>/g,'>') | |
if(div.textContent.replace(/(\n| )/g,'').length>=50&&!div.textContent.includes('广告')&&!div.textContent.includes('免费'))return d+'\n'+div.textContent |
OlderNewer