vincentWdp's recent timeline updates
vincentWdp

vincentWdp

V2EX member #405272, joined on 2019-04-23 20:20:10 +08:00
Today's activity rank 15057
Per vincentWdp's settings, the topics list is hidden
Deals info, including closed deals, is not hidden
vincentWdp's recent replies
1 day ago
Replied to a topic by SoulFlame 分享发现 ds 和我玩死循环
何、意、味
1 day ago
Replied to a topic by mqx 分享创造 算术小游戏,紧张刺激,欢迎来玩
以下代码是#8 楼的解释. 贴到 console 就好. (再次抱歉☹️):
```
(() => {
window.mathRushBot?.stop?.();

let count = 0;

function calculate(text) {
const normalized = text
.trim()
.replace(/−/g, "-")
.replace(/\s+/g, "");

const match = normalized.match(
/^(-?\d+)([+\-×÷*/])(-?\d+)$/
);

if (!match) return null;

const a = Number(match[1]);
const op = match[2];
const b = Number(match[3]);

switch (op) {
case "+": return a + b;
case "-": return a - b;
case "×":
case "*": return a * b;
case "÷":
case "/": return a / b;
default: return null;
}
}

function answerQuestion() {
const question = document.querySelector("#question");
const input = document.querySelector("#answer");
const feedback = document.querySelector("#feedback");

if (!question || !input || !feedback) return;

if (
input.value !== "" ||
feedback.textContent.trim() !== "按 Enter 提交"
) return;

const answer = calculate(question.textContent);
if (answer === null || !Number.isInteger(answer)) return;

input.value = String(answer);
input.dispatchEvent(
new Event("input", { bubbles: true })
);

input.dispatchEvent(
new KeyboardEvent("keydown", {
key: "Enter",
code: "Enter",
bubbles: true,
cancelable: true
})
);

count++;
}

const timer = setInterval(answerQuestion, 10);

window.mathRushBot = {
get count() {
return count;
},
stop() {
clearInterval(timer);
delete window.mathRushBot;
console.log(`自动答题已停止,共提交 ${count} 题`);
}
};

console.log(
"✅ 自动答题已启动;输入 mathRushBot.stop() 可停止"
);
})();
```
1 day ago
Replied to a topic by mqx 分享创造 算术小游戏,紧张刺激,欢迎来玩
时间流速达到 3.5 倍,我仍答对了 429 道题。你敢来挑战吗?
https://77796e3a.pinme.dev/?mode=classic&seed=MRMRWWRWKC24L7&target=749794&correct=429&v=1
抱歉😂
大佬, 你的创意真的很不错, 因此我也搞了个 apple watch app 用来展示这些信息!
2 days ago
Replied to a topic by YanSeven 程序员 日常摸鱼发呆的三种虚无时刻
事已至此, 先吃饭吧
@cpstar 哎, 你一说我就懂了😂
7 days ago
Replied to a topic by flyico 问与答 现在中国哪里还能看到肉眼看到银河?
大西北的沙漠戈壁?
7 days ago
Replied to a topic by gnhaha 问与答 什么是 [玩] ?明天周末准备玩什么?
是啊, 玩什么
7 days ago
Replied to a topic by liangc230323 问与答 请问各位大佬都是用什么 IDE 写 rust
vscode+codex
7 days ago
Replied to a topic by povvoq 投资 七月十七晴
啊?
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   991 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 19:11 · PVG 03:11 · LAX 12:11 · JFK 15:11
♥ Do have faith in what you're doing.