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
package com.mycompany.myapp.kill; | |
import android.app.*; | |
import android.os.*; | |
import android.content.*; | |
import java.util.*; | |
public class MainActivity extends Activity | |
{ | |
@Override |
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 ARRAY_LENGTH = 16; | |
var MIN_HEX_LENGTH = 2; | |
class UUID { | |
static createUUID() { | |
const array = new Uint8Array(ARRAY_LENGTH); | |
window.crypto.getRandomValues(array); | |
let uuid = ''; |
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
/** | |
* getIllustUrl - DevTools console script to get pixiv illust original image... in it's page | |
* Written by GitHub@Dobby233Liu | |
* Public Domain, take the below function is free too. | |
* note: this script will output to console. output may be: | |
* url and data (success), boolean and error message, including "GET xxx 4xx/5xx" (api error), or "uncaught error" (something gone wrong) | |
* offical version always at: https://gist.github.com/Dobby233Liu/1e61dccc9f67156157bcf15387319566 | |
**/ | |
getIllustUrl = (illustID, cb, httpErrorCB) => { | |
fetch("https://www.pixiv.net/ajax/illust/" + illustID) |
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
/** | |
* 42.js - quickjs bytebeat isolated loader stub, named after the famous 42 melody | |
* code: @Dobby233Liu | |
* WTFPL | |
* fill up the code(t) section, build using qjsc https://bellard.org/quickjs/ then pipe to anything eg. aplay | |
* i recommend use node.js more than quickjs, its better, and quickjs is in beta. | |
* example program using node.js: bytebeat.jsV2.0 https://pastebin.com/xwtRgcfV | |
* gist: https://gist.github.com/Dobby233Liu/157e2438dcfb7a31209616404b301759 | |
**/ | |
import * as std from 'std' |
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 python | |
# -*- coding:utf-8 -*- | |
"""Edge Microsoft TTS for Python.""" | |
import sys | |
from ws4py.client.threadedclient import WebSocketClient | |
import binascii | |
import argparse | |
import json | |
import requests | |
import re |
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
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
var BASE_URL = "https://lab.isaaclin.cn/nCoV"; | |
var HOST_URL = "https://github.com/Dobby233Liu"; | |
var HOST_NNM = "Dobby233Liu"; | |
var CREDITS_HTML | |
= ` | |
由<a href="${HOST_URL}">${HOST_NNM}</a>镜像。此镜像根目录直通原api目录,无需添加/nCoV在目录名前(虽然会自动处理)。原api:<a href="${BASE_URL}">${BASE_URL}</a>。<hr />` | |
var CREDITS_INSERT_AFTER_FIRST_ENTRY_OF = `body > div > p`; |
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
index = [ | |
{ | |
obj: window.getListByCountryTypeService1, | |
data: { | |
creationDate: "createTime", | |
modifiedDate: "modifyTime", | |
op: "operator" | |
} | |
}, | |
{ |
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
fosshub.com##.ad-alt | |
msfn.org##.ipsMessage.ipsMessage_error.ipsfocus-globalMessage.displayGlobalMessage | |
imooc.com##.modal-backdrop.in | |
imooc.com###signin | |
imooc.com##.rl-modal.in | |
thememypc.net##.k*-container.k*-2.k*-hide | |
zhihu.com##.AdblockBanner | |
jsp.d2l.workers.dev##.jquery-modal.blocker.current | |
jsp.d2l.workers.dev###oyahpzunevwwuoc-overlay | |
2heng.xin##.ad-container |
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
// random strangires based on Math.random [1, inefficine, unstable and wastes time] | |
Math_random1_part1=()=>Math.sinh(Math.cos(Math.atan(Math.tan(Math.random()*0.124231332135)))*0.252346/Math.LOG2E)%(+(new Date)/Math.LN2%Math.SQRT1_2*Math.E)/(Math.random()*0.043446566)*(Math.random()*0.0011124514%Math.random()+0.0011222) | |
Math_random1=()=>{ | |
var m = Number(Math_random1_part1()).toString().split(""); | |
var m2 = m.slice(2); | |
for (let i = m2.length - 1; i > 0; i--) { | |
const j = Math.floor(Math_random1_part1() * (i + 1)); | |
[m2[i], m2[j]] = [m2[j], m2[i]]; | |
} | |
var r=parseFloat(m[0]+m[1]+m2.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
function isPrime(num) // https://blog.csdn.net/huang_miao_xin/article/details/51331710 | |
{ | |
if(num == 2 || num == 3) return true; | |
if(num % 6 != 1 && num % 6 != 5) return false; // 不在6的倍数两侧的一定不是质数 | |
var tmp = Math.sqrt(num); | |
for(var i = 5; i <= tmp; i += 6) if(num % i == 0 || num % (i + 2) == 0) return false; // 在6的倍数两侧的也可能不是质数 | |
return true; // 排除所有,剩余的是质数 | |
} | |
function sortNumbers(data = [27, 37, 41, 58, 61, 73, 83, 95, 11, 14, 33, 47, 57, 62, 87, 99]){ | |
var output = {primes: [], composites: [], odds: [], evens: []}; |
OlderNewer