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
window.parseURL=function(URL){ | |
let [,schema="",host="",path="",search="",hash=""]= | |
URL.match(/^(?:(?:([^:]+:)?\/\/)?([^\/#?]+))?(?:(\/[^#?]*)?(\?[^#]*)?(#.*)?)?$/); | |
return {schema,host,path,search,hash} | |
} |
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
document.querySelectorAll(".dayEvents .span1").forEach((e,i)=>{ | |
setTimeout(()=>{ | |
e.click(); | |
setTimeout(()=>{ | |
document.querySelector(".like").click(); | |
},1000) | |
setTimeout(()=>{ | |
document.querySelector(".bouncePopupRoot").click(); | |
},2000) | |
},i*4000) |
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
all_highlight = document.querySelectorAll("div.table-right.data-list li.data-highlight div.title>span"); | |
outputstring=""; | |
for(i of all_highlight){ | |
outputstring+="[ ] OP\t" + i.innerText+"\n"; | |
outputstring+="[ ] ED\t" + i.innerText+"\n"; | |
} | |
console.log(outputstring); |
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
{ | |
"log": { | |
"version": "1.2", | |
"creator": { | |
"name": "WebInspector", | |
"version": "537.36" | |
}, | |
"pages": [], | |
"entries": [ | |
{ |
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
fetch("http://118.31.185.146:5000/api/v1/optimization", { | |
method: "POST", | |
headers:{ | |
"Content-Type":"application/json" | |
}, | |
body:JSON.stringify(["9527","9528","9529"]) | |
}) | |
.then(x=>x.json()) | |
.then(JSON.stringify) | |
.then(console.log) |
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
console.clear(); | |
s=""; | |
document.querySelectorAll("input[type=text]:not(.ng-hide)") | |
.forEach(x=>{ | |
if(x.value=="true" || x.value=="false") | |
s+=(x.parentElement.previousElementSibling.innerText+"\n") | |
}); | |
console.log(s); |
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
.PHONY: list | |
list: | |
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null |\ | |
awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' |\ | |
sort |\ | |
egrep -v -e '^[^[:alnum:]]' -e '^$@$$' |\ | |
xargs |
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
# Copyright [2018] [Siyuan "no1xsyzy" Xu] | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
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
// uses in console | |
// URL should be like <http://wanke001.com/User/Student/ClassIndex.aspx?ClassID=*&action=courseList> | |
var timelength = function(txt){ | |
var [m, s] = txt.split(":"); | |
return +m + (+s)/60; | |
} | |
var data = $$('section.PhaseDetaillist[contenttype="1"]') | |
.filter(x=>x.lastElementChild.firstElementChild.firstElementChild.firstElementChild) | |
.map(x=>([ |
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
#!/usr/bin/env python3 | |
import random | |
import math | |
def average(s): | |
s = list(s) | |
return sum(s)/len(s) | |
class randomtest: | |
_funs = [] |
OlderNewer