Deploy HTML files - 2024-09-05
This commit is contained in:
commit
1d9ff7b4d0
69
404.html
Normal file
69
404.html
Normal file
@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html><head><title>Not Found</title><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta property="og:title" content="Not Found"/><meta property="og:description" content="Not Found"/><meta property="og:image" content="https://wiki.7wate.com/static/og-image.png"/><meta property="og:width" content="1200"/><meta property="og:height" content="675"/><link rel="icon" href="/static/icon.png"/><meta name="description" content="Not Found"/><meta name="generator" content="Quartz"/><link rel="preconnect" href="https://fonts.googleapis.com"/><link rel="preconnect" href="https://fonts.gstatic.com"/><script async src="https://umami.7wate.com/script.js" data-website-id="c061efdc-95dd-4d21-9d04-a1ffda0a85b9"></script><script>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "https://hm.baidu.com/hm.js?94d8ccb156eb7c65abf317e6e01cdba9";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script><script async src="https://www.googletagmanager.com/gtag/js?id=G-MHMEL0F832"></script><script>
|
||||
(function() {
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag() {
|
||||
window.dataLayer.push(arguments);
|
||||
}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'G-MHMEL0F832');
|
||||
})();
|
||||
</script><link href="/index.css" rel="stylesheet" type="text/css" spa-preserve/><link href="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.css" rel="stylesheet" type="text/css" spa-preserve/><link href="https://fonts.googleapis.com/css2?family=IBM Plex Mono&family=Schibsted Grotesk:wght@400;700&family=Source Sans Pro:ital,wght@0,400;0,600;1,400;1,600&display=swap" rel="stylesheet" type="text/css" spa-preserve/><script src="/prescript.js" type="application/javascript" spa-preserve></script><script type="application/javascript" spa-preserve>const fetchData = fetch(`/static/contentIndex.json`).then(data => data.json())</script></head><body data-slug="404"><div id="quartz-root" class="page"><div id="quartz-body"><div class="left sidebar"></div><div class="center"><div class="page-header"><div class="popover-hint"></div></div><article class="popover-hint"><h1>404</h1><p>Either this page is private or doesn't exist.</p></article></div><div class="right sidebar"></div></div><footer class><hr/><p>Created with <a href="https://quartz.jzhao.xyz/">Quartz v4.1.0</a>, © 2024</p><ul><li><a href="https://www.7wate.com">Home</a></li><li><a href="https://blog.7wate.com">Blog</a></li><li><a href="https://github.com/7wate">GitHub</a></li></ul></footer></div></body><script type="application/javascript">// quartz/components/scripts/quartz/components/scripts/callout.inline.ts
|
||||
function toggleCallout() {
|
||||
const outerBlock = this.parentElement;
|
||||
outerBlock.classList.toggle(`is-collapsed`);
|
||||
const collapsed = outerBlock.classList.contains(`is-collapsed`);
|
||||
const height = collapsed ? this.scrollHeight : outerBlock.scrollHeight;
|
||||
outerBlock.style.maxHeight = height + `px`;
|
||||
let current = outerBlock;
|
||||
let parent = outerBlock.parentElement;
|
||||
while (parent) {
|
||||
if (!parent.classList.contains(`callout`)) {
|
||||
return;
|
||||
}
|
||||
const collapsed2 = parent.classList.contains(`is-collapsed`);
|
||||
const height2 = collapsed2 ? parent.scrollHeight : parent.scrollHeight + current.scrollHeight;
|
||||
parent.style.maxHeight = height2 + `px`;
|
||||
current = parent;
|
||||
parent = parent.parentElement;
|
||||
}
|
||||
}
|
||||
function setupCallout() {
|
||||
const collapsible = document.getElementsByClassName(
|
||||
`callout is-collapsible`
|
||||
);
|
||||
for (const div of collapsible) {
|
||||
const title = div.firstElementChild;
|
||||
if (title) {
|
||||
title.removeEventListener(`click`, toggleCallout);
|
||||
title.addEventListener(`click`, toggleCallout);
|
||||
const collapsed = div.classList.contains(`is-collapsed`);
|
||||
const height = collapsed ? title.scrollHeight : div.scrollHeight;
|
||||
div.style.maxHeight = height + `px`;
|
||||
}
|
||||
}
|
||||
}
|
||||
document.addEventListener(`nav`, setupCallout);
|
||||
window.addEventListener(`resize`, setupCallout);
|
||||
</script><script type="module">
|
||||
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs';
|
||||
const darkMode = document.documentElement.getAttribute('saved-theme') === 'dark'
|
||||
mermaid.initialize({
|
||||
startOnLoad: false,
|
||||
securityLevel: 'loose',
|
||||
theme: darkMode ? 'dark' : 'default'
|
||||
});
|
||||
document.addEventListener('nav', async () => {
|
||||
await mermaid.run({
|
||||
querySelector: '.mermaid'
|
||||
})
|
||||
});
|
||||
</script><script src="https://cdn.jsdelivr.net/npm/katex@0.16.7/dist/contrib/copy-tex.min.js" type="application/javascript"></script><script src="/postscript.js" type="module"></script></html>
|
33
Obsidian/Canvas/师从-ChatGPT.canvas
Normal file
33
Obsidian/Canvas/师从-ChatGPT.canvas
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
"nodes":[
|
||||
{"id":"872b12eeefe0a341","type":"group","x":-680,"y":-40,"width":763,"height":640,"color":"5","label":"主题"},
|
||||
{"id":"a6a73db933efed8d","x":-207,"y":-40,"width":290,"height":598,"type":"group","label":"论点"},
|
||||
{"id":"08a0dadcc73dc3a8","type":"text","text":"我第一次学习了解到元认知是在《认知觉醒》中,当时只觉得这是一种方法论。但是回过头来再次复读,说实话现在我能理解作者的意思,但是文字对于我来说增加了理解成本。或者,当初的我只停留在感性认识,并且没有尝试去实践,可我感觉这又很难去实践。这种感觉就好像,只有恶龙诞生了,才会锻造出屠龙宝刀。而如果一开始没有恶龙,那么它就是一把普普通通的宝剑。\n\n首先要理解认知是什么?\n\n认知是人们获得知识或应用知识的过程,认知的对象是外在的,具体的。认知就是感性认识转换理性认识的过程,并尝试通过不断的实践总结,迭代优化尝试达到知行合一。\n\n例如你第一次尝试骑自行车,可能会在父母的帮助下保持平衡,并尝试踩踏板来前进。如果父母放开手,你在尝试中可能会跌倒几次,并开始思考为什么会失去平衡,是否是因为速度太慢或转向太急?可能你也会观察其他小朋友如何骑车,并尝试调整自己的速度和转向方式,学习如何更好地保持平衡。当你学会骑自行车后,并且不在摔倒,可能就会有朋友来向你请教。你会根据自己的经验,教导他们如何调整速度并保持平衡。在教导他人的过程中,你可能会发现自己之前没注意到的技巧或细节,从而进一步改善自己的骑行技术。\n\n一开始,看到别的小朋友骑车,你会对自行车的两个轮如何保持平衡,如何运动形成直观的感性印象。这一阶段的认识是具体的、零散的,只能把握事物的外部特征和表面现象。期间通过实践尝试,进一步将感性材料加以整理、抽象,形成概念、判断和推理,从而揭示事物的内部联系、本质特征和规律性。这一阶段的认识是抽象的、系统的,能够深入到事物的本质。\n\n认知是一个由实践到感性认识,再到理性认识,最后又返回到实践中去的动态循环过程。在这一过程中,新的实践活动不断产生,新的认识不断形成并应用于实践,通过实践的检验,认识不断被纠正和发展,从而使人们的认识逐步深化,逐渐接近于客观事物的真实状态。\n\n\n","x":560,"y":-1590,"width":900,"height":780},
|
||||
{"id":"cc568e5afce0bbb0","type":"text","text":"如何师从 ChatGPT","x":-660,"y":288,"width":250,"height":60},
|
||||
{"id":"54b3577dc8b863d7","type":"text","text":"引出问题","x":-187,"y":-20,"width":250,"height":60},
|
||||
{"id":"d385915d1b9d2799","type":"text","text":"认知的本质就是建模","x":-187,"y":478,"width":250,"height":60},
|
||||
{"id":"2edae90c700ef43d","type":"text","text":"方法论、思维模型","x":-187,"y":355,"width":250,"height":60},
|
||||
{"id":"2a88ca6e9d111ecb","type":"text","text":"认知","x":-187,"y":105,"width":250,"height":60},
|
||||
{"id":"9c17e58b16cc3f90","type":"text","text":"元认知","x":-187,"y":230,"width":250,"height":60},
|
||||
{"id":"41ca9e37ceaa4091","type":"text","text":"而元认知则是内在的,抽象的,是基于我们自身的认知活动。元认知是关于自己认知过程的认知,是我们如何认知这个世界,并进一步抽象所来的。元认知能力的发展,就像学习骑自行车的过程一样,是一个持续反思和调整的过程。在这个过程中,我们不仅要关注行动的直接结果,还要持续监控和调整自己的认知策略和方法。\n\n所以元认知涉及到自我监控和自我调节两大关键能力。\n\n自我监控是指在认知活动中对自己的理解、注意力、记忆等进行监督和评估。例如,当你阅读新的技术文章时,你可能会不时地停下来,回顾自己理解的内容,检查是否有遗漏或误解的地方。这就是一种元认知监控的体现。\n\n自我调节则是指在认知过程中根据自我监控的结果来调整自己的学习策略或行为。如果你在阅读过程中发现某些概念理解得不够深入,可能就会选择重新阅读相关段落,或者寻找更多资源来加深理解。这种能力不仅有助于提高学习效率,也使得学习过程更加适应个人的需求。\n\n在实践中发展元认知能力,首先需要培养对自己认知过程的意识。这可以通过日常的反思练习开始,比如每天结束时回顾一下自己的学习和工作,思考哪些方法有效,哪些需要改进。此外,可以尝试在做决策时有意识地思考自己的思考过程,评估自己的思维是否合逻辑、是否受到了情绪的影响。\n\n通过这些方法,你可以慢慢地培养出对自己认知过程的敏感度,逐渐提高元认知能力。这样的能力将使你在面对复杂和挑战性的情境时,能更加自如地调整策略,以达到最佳的认知和学习效果。\n\n如果能充分,理解,提高,运用元认知能力,那么个人的成长将不再是 1+1 的时间积累,而是指数级的倍增。这种能力就像是锻造那把屠龙宝刀,使你能够更有效地面对生活和工作中的各种挑战。","x":560,"y":-640,"width":900,"height":760},
|
||||
{"id":"2ce07bfba5622510","type":"text","text":"其实方法论和思维结构更好理解,正常来说当我们遇见问题总是会先寻求最优解,可是究竟是否存在最优解?最优解公式是什么?如果不存在最优解,那么是否存在解?并且解是否会随事物发展规律变化而变化?\n\n方法论则是作为认识过程的宏观指导,它提供了一套全面的框架和步骤,帮助我们如何进行科学的思考和研究方法,方法论是提高认识水平、解决实际问题能力的重要工具。方法论涉及到的不仅是科学研究方法,还包括思维方法、工作方法等。而思维模型则更多作为具体的参考,通过简化的模型帮助我们理解复杂现象或问题,并为决策提供理论支持。\n\n如果拿开车来说,方法论就像是地图导航,帮助我们规划出最优路线;而思维模型则相当于在这条路线上,指导我们如何选择两点间的最短或最快路径。就像在开车时,如果面对磨磨唧唧的车流,我们就会根据各种实际因素来决定如何快速地超车。\n\n但是如果你从未学习了解过某一个新事物,那意味着你就要一遍遍的试错,直至找到解。可是,我们总不能从最原始的加减乘除的基本原理去求证微积分吧?毕竟已经有了前人的试错结果。我们只需要薪火相传就可以,站在前人的肩膀上看世界。\n\n就拿张雪峰老师作为具体的例子来讲解,张雪峰老师拥有非常丰富的中国教育考试理论知识以及海量的具体实践经验。但如果你说,我要从 0 开始研究中国教育考试,最终到达张雪峰老师的水平也不是没有可能。可这个结果需要你大量的学习,实践,总结,再实践,迭代无数版本后才可能有机会达到。\n\n正是因为张雪峰老师在中国教育考试方面实力,大部分家长更没上过大学,更不知道如何规划孩子的高考报名,就会找到张雪峰老师。但是由于家长在中国教育考试的认知并不如张雪峰老师,张老师可能提出了相对合理的建议,但大部分家长可能依旧揣着「旧」想法,半信半疑,以至于还有可能依旧走了弯路,为什么呢?\n\n因为张雪峰老师的方法论和思维结构是黑盒理论,无法透过表象深入理解其本质。故此你可能会不相信,这是正确的。因为实践才是检验真理的唯一标准,但是高考只有一次。如果检测成功了,皆大欢喜;检测失败了,那就自己承担。\n\n不过题外话,我认为张雪峰老师整体还是属于拿钱办事的。例如高考状元,动不动就 700+ 分的人。他也是不会给出太具体的建议,但不过普通大众水平,倒是会给出非常中肯的建议。\n\n对于方法论,我的一点心得无论是自上而下,还是自下而上,都是需要耗费非常多的时间和精力来内化的。务必坚信能量守恒定律,方法论不可能是简简单单的套公式,就能熟心应手的东西。不过目前来说,我认为最好的方法还是在某一专业领域深究,摸索至顶峰后,并尝试在新的领域从头再来,那么大概率定会融会贯通。\n\n\n\n","x":560,"y":290,"width":900,"height":1080},
|
||||
{"id":"052d7ab1e5285830","type":"text","text":"最后回到《师从 ChatGPT》这个标题,至于为什么我会起这样一个标题?因为我近一年多长期和它聊天,见证了 AI 的学习能力和适应性,并且不断的进行模仿尝试 AI,深刻体会到 AI 几乎是完美的。\n\n为什么说 AI 的几乎是完美的?因为它永远不会产生思维固化,只要你愿意教它,他可以很快就学会。而且 AI 认知的进化,是不会受限于肉体凡躯的。而我们作为人类,随着年龄越来越大,我们几乎很难拥有青少年时期的学习精力。但是 AI 却不会,AI 目前通过人类不断的优化调整模型,以及拥有不可能退化的学习力。\n\n我对于元认知理解一部分也是源于 AI,因为很多具体的问题,如果你直接问它,他回答的并不出色。于是我开始各种尝试各种 Prompt,但是又发现 Prompt 虽各有不同,但是大部分都是那几句套话。所以我在提问的时候,就会思考:我如何提出一个很好的问题?我又想要一个什么样的答案?\n\n例如某一个具体问题,我不再会直接把问题丢给它。而是会先划定问题领域,先让 AI 系统的阐述一下这个领域。并在进一步提问这个领域的专家应该拥有哪些知识?最后我会让它整合聊天内容,让它帮我写 Prompt,最后新开一个窗口设定 AI 角色,代入问题场景,提出具体问题,告诉我的目的。\n\n不过,纵使目前 AI 再厉害,我对于 AI 是否可以拥有情感持怀疑态度。虽然我们的大脑与 AI 一样,本质就是建模。但我们却拥有了无法解释的意识,情感,创造力。\n\n","x":560,"y":1540,"width":900,"height":560},
|
||||
{"id":"b7659f293070a17d","type":"text","text":"最近遇见了很多具体问题,我感觉处理起来效率太低。总认为是因为没有熟练掌握方法论的具体应用——思维模型,才导致效率不高。所以就想系统全面的学习一下常见的思维模型。可是却又无从下手,毕竟思维模型实在是太多了。遂去问了问 ChatGPT,但感觉 ChatGPT 的答案总是没有灵魂,似是非是的回答让我头大。然后几乎每天都在带着这个问题思考,不过也是功夫不负有心人。最终经过尝试串联起来很多曾在书中读到的内容,并且进一步悟到了最核心关键的点在于——元认知。\n\n\n\n\n","x":560,"y":-2000,"width":900,"height":240}
|
||||
],
|
||||
"edges":[
|
||||
{"id":"92b15c3afca32831","fromNode":"cc568e5afce0bbb0","fromSide":"right","toNode":"54b3577dc8b863d7","toSide":"left"},
|
||||
{"id":"90271103ebd411cc","fromNode":"cc568e5afce0bbb0","fromSide":"right","toNode":"2edae90c700ef43d","toSide":"left"},
|
||||
{"id":"ed899586d417547f","fromNode":"cc568e5afce0bbb0","fromSide":"right","toNode":"d385915d1b9d2799","toSide":"left"},
|
||||
{"id":"738bf6a3a06b7e74","fromNode":"54b3577dc8b863d7","fromSide":"right","toNode":"b7659f293070a17d","toSide":"left"},
|
||||
{"id":"bbf6f75c8bd6c93c","fromNode":"2edae90c700ef43d","fromSide":"right","toNode":"2ce07bfba5622510","toSide":"left"},
|
||||
{"id":"c170d86b06f828af","fromNode":"d385915d1b9d2799","fromSide":"right","toNode":"052d7ab1e5285830","toSide":"left"},
|
||||
{"id":"172cc0b5e8994834","fromNode":"cc568e5afce0bbb0","fromSide":"right","toNode":"2a88ca6e9d111ecb","toSide":"left"},
|
||||
{"id":"17e5f2f50305fa23","fromNode":"2a88ca6e9d111ecb","fromSide":"right","toNode":"08a0dadcc73dc3a8","toSide":"left"},
|
||||
{"id":"3add479c624024e8","fromNode":"9c17e58b16cc3f90","fromSide":"right","toNode":"41ca9e37ceaa4091","toSide":"left"},
|
||||
{"id":"4266d7e0ae22b78a","fromNode":"cc568e5afce0bbb0","fromSide":"right","toNode":"9c17e58b16cc3f90","toSide":"left"},
|
||||
{"id":"c9c9152cc660ecfb","fromNode":"b7659f293070a17d","fromSide":"bottom","toNode":"08a0dadcc73dc3a8","toSide":"top","label":"递进"},
|
||||
{"id":"1a783b7feb6ed1d0","fromNode":"08a0dadcc73dc3a8","fromSide":"bottom","toNode":"41ca9e37ceaa4091","toSide":"top","label":"抽象"},
|
||||
{"id":"d2771fd994d8ac2b","fromNode":"41ca9e37ceaa4091","fromSide":"bottom","toNode":"2ce07bfba5622510","toSide":"top","label":"拆解"},
|
||||
{"id":"a04514f974133c30","fromNode":"2ce07bfba5622510","fromSide":"bottom","toNode":"052d7ab1e5285830","toSide":"top","label":"总结"}
|
||||
]
|
||||
}
|
48
Obsidian/Static/hitokoto.js
Normal file
48
Obsidian/Static/hitokoto.js
Normal file
@ -0,0 +1,48 @@
|
||||
const https = require('https');
|
||||
|
||||
/**
|
||||
* 获取一言
|
||||
* @param {Object} options - 请求的参数
|
||||
* @returns {Promise<string>} 返回一言的句子
|
||||
*/
|
||||
async function getHitokoto(options = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const {
|
||||
c, // 句子类型
|
||||
encode = 'json', // 默认使用json格式
|
||||
charset, // 字符集
|
||||
callback, // 调用的异步函数
|
||||
select, // 选择器
|
||||
min_length, // 返回句子的最小长度
|
||||
max_length // 返回句子的最大长度
|
||||
} = options;
|
||||
|
||||
let url = 'https://v1.hitokoto.cn?';
|
||||
|
||||
if (c) url += `&c=${c}`;
|
||||
if (encode) url += `&encode=${encode}`;
|
||||
if (charset) url += `&charset=${charset}`;
|
||||
if (callback) url += `&callback=${callback}`;
|
||||
if (select) url += `&select=${select}`;
|
||||
if (min_length) url += `&min_length=${min_length}`;
|
||||
if (max_length) url += `&max_length=${max_length}`;
|
||||
|
||||
https.get(url, (resp) => {
|
||||
let data = '';
|
||||
|
||||
resp.on('data', (chunk) => {
|
||||
data += chunk;
|
||||
});
|
||||
|
||||
resp.on('end', () => {
|
||||
const result = JSON.parse(data);
|
||||
resolve(result.hitokoto);
|
||||
});
|
||||
|
||||
}).on("error", (err) => {
|
||||
reject("Error: " + err.message);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = getHitokoto;
|
37
Obsidian/Static/jinrishici.js
Normal file
37
Obsidian/Static/jinrishici.js
Normal file
@ -0,0 +1,37 @@
|
||||
const https = require('https');
|
||||
|
||||
/**
|
||||
* 获取今日诗词并格式化输出
|
||||
* @returns {Promise<string>} 返回格式化后的诗词
|
||||
*/
|
||||
async function getTodayPoetry() {
|
||||
return new Promise((resolve, reject) => {
|
||||
const url = 'https://v2.jinrishici.com/one.json';
|
||||
|
||||
https.get(url, (resp) => {
|
||||
let data = '';
|
||||
|
||||
resp.on('data', (chunk) => {
|
||||
data += chunk;
|
||||
});
|
||||
|
||||
resp.on('end', () => {
|
||||
const result = JSON.parse(data);
|
||||
if (result.status === "success") {
|
||||
const poetryContent = result.data.content;
|
||||
const author = result.data.origin.author;
|
||||
const dynasty = result.data.origin.dynasty;
|
||||
const formattedPoetry = `${poetryContent}——${author}(${dynasty})`;
|
||||
resolve(formattedPoetry);
|
||||
} else {
|
||||
reject("Failed to fetch poetry");
|
||||
}
|
||||
});
|
||||
|
||||
}).on("error", (err) => {
|
||||
reject("Error: " + err.message);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = getTodayPoetry;
|
36
Obsidian/Static/lunar_data.js
Normal file
36
Obsidian/Static/lunar_data.js
Normal file
@ -0,0 +1,36 @@
|
||||
const https = require("https");
|
||||
|
||||
/**
|
||||
* 获取并格式化当前日期的农历信息。
|
||||
* @returns {Promise<string>} 返回格式化后的农历信息。
|
||||
*/
|
||||
async function getLunarDate() {
|
||||
return new Promise((resolve, reject) => {
|
||||
const url = "https://api.timelessq.com/time";
|
||||
|
||||
https
|
||||
.get(url, (resp) => {
|
||||
let data = "";
|
||||
|
||||
resp.on("data", (chunk) => {
|
||||
data += chunk;
|
||||
});
|
||||
|
||||
resp.on("end", () => {
|
||||
const result = JSON.parse(data);
|
||||
if (result.errno === 0) {
|
||||
const lunar = result.data.lunar;
|
||||
const formattedLunarDate = `${lunar.cyclicalYear}${lunar.zodiac}年 ${lunar.cyclicalMonth}月 ${lunar.cyclicalDay}日 农历${lunar.cnMonth}${lunar.cnDay}`;
|
||||
resolve(formattedLunarDate);
|
||||
} else {
|
||||
reject("Failed to fetch lunar date");
|
||||
}
|
||||
});
|
||||
})
|
||||
.on("error", (err) => {
|
||||
reject("Error: " + err.message);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = getLunarDate;
|
36
Obsidian/Static/wttr_weather.js
Normal file
36
Obsidian/Static/wttr_weather.js
Normal file
@ -0,0 +1,36 @@
|
||||
const https = require('https');
|
||||
|
||||
/**
|
||||
* 获取指定城市的天气信息
|
||||
* @param {string} city - 城市名
|
||||
* @param {string} params - wttr.in的查询参数
|
||||
* @returns {Promise<string>} 天气信息
|
||||
*/
|
||||
function getWeather(city = 'Shanghai', params = 'format=3') {
|
||||
return new Promise((resolve, reject) => {
|
||||
const timeout = setTimeout(() => {
|
||||
reject(new Error('Request timed out'));
|
||||
}, 15000); // 设置15秒的请求超时
|
||||
|
||||
https.get(`https://wttr.in/${encodeURIComponent(city)}?${params}`, (resp) => {
|
||||
let data = '';
|
||||
|
||||
// A chunk of data has been received.
|
||||
resp.on('data', (chunk) => {
|
||||
data += chunk;
|
||||
});
|
||||
|
||||
// The whole response has been received. Print out the result.
|
||||
resp.on('end', () => {
|
||||
clearTimeout(timeout); // 清除超时
|
||||
resolve(data);
|
||||
});
|
||||
|
||||
}).on("error", (err) => {
|
||||
clearTimeout(timeout); // 清除超时
|
||||
reject("Error: " + err.message);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = getWeather;
|
69
Obsidian/Templates/index.html
Normal file
69
Obsidian/Templates/index.html
Normal file
File diff suppressed because one or more lines are too long
79
Obsidian/Templates/博客模板.html
Normal file
79
Obsidian/Templates/博客模板.html
Normal file
File diff suppressed because one or more lines are too long
79
Obsidian/Templates/文档模板.html
Normal file
79
Obsidian/Templates/文档模板.html
Normal file
File diff suppressed because one or more lines are too long
274
Obsidian/Templates/日志---周记模板.html
Normal file
274
Obsidian/Templates/日志---周记模板.html
Normal file
File diff suppressed because one or more lines are too long
150
Obsidian/Templates/日志---季度模板.html
Normal file
150
Obsidian/Templates/日志---季度模板.html
Normal file
File diff suppressed because one or more lines are too long
127
Obsidian/Templates/日志---日记模板.html
Normal file
127
Obsidian/Templates/日志---日记模板.html
Normal file
File diff suppressed because one or more lines are too long
149
Obsidian/Templates/阅读模板.html
Normal file
149
Obsidian/Templates/阅读模板.html
Normal file
File diff suppressed because one or more lines are too long
86
Personal/Blog/2018/11月28日晚-星期三-霾.html
Normal file
86
Personal/Blog/2018/11月28日晚-星期三-霾.html
Normal file
File diff suppressed because one or more lines are too long
97
Personal/Blog/2018/BombSquad-炸弹人小分队.html
Normal file
97
Personal/Blog/2018/BombSquad-炸弹人小分队.html
Normal file
File diff suppressed because one or more lines are too long
69
Personal/Blog/2018/index.html
Normal file
69
Personal/Blog/2018/index.html
Normal file
File diff suppressed because one or more lines are too long
141
Personal/Blog/2018/如何免费创建一个属于自己的网站.html
Normal file
141
Personal/Blog/2018/如何免费创建一个属于自己的网站.html
Normal file
File diff suppressed because one or more lines are too long
82
Personal/Blog/2018/英雄联盟-S8-全球总决赛.html
Normal file
82
Personal/Blog/2018/英雄联盟-S8-全球总决赛.html
Normal file
File diff suppressed because one or more lines are too long
94
Personal/Blog/2018/螺蛳粉.html
Normal file
94
Personal/Blog/2018/螺蛳粉.html
Normal file
File diff suppressed because one or more lines are too long
123
Personal/Blog/2020/Don`t-Starve-饥荒.html
Normal file
123
Personal/Blog/2020/Don`t-Starve-饥荒.html
Normal file
File diff suppressed because one or more lines are too long
69
Personal/Blog/2020/index.html
Normal file
69
Personal/Blog/2020/index.html
Normal file
File diff suppressed because one or more lines are too long
101
Personal/Blog/2020/中国传统历法.html
Normal file
101
Personal/Blog/2020/中国传统历法.html
Normal file
File diff suppressed because one or more lines are too long
149
Personal/Blog/2020/初号机,起飞!.html
Normal file
149
Personal/Blog/2020/初号机,起飞!.html
Normal file
File diff suppressed because one or more lines are too long
103
Personal/Blog/2020/吉普赛满天星.html
Normal file
103
Personal/Blog/2020/吉普赛满天星.html
Normal file
File diff suppressed because one or more lines are too long
109
Personal/Blog/2020/夏日花记.html
Normal file
109
Personal/Blog/2020/夏日花记.html
Normal file
File diff suppressed because one or more lines are too long
86
Personal/Blog/2020/幸福的事情都是需要等待的.html
Normal file
86
Personal/Blog/2020/幸福的事情都是需要等待的.html
Normal file
File diff suppressed because one or more lines are too long
138
Personal/Blog/2020/开源软件之道.html
Normal file
138
Personal/Blog/2020/开源软件之道.html
Normal file
File diff suppressed because one or more lines are too long
88
Personal/Blog/2020/我的小羊肖恩.html
Normal file
88
Personal/Blog/2020/我的小羊肖恩.html
Normal file
File diff suppressed because one or more lines are too long
108
Personal/Blog/2020/数据恢复杂谈.html
Normal file
108
Personal/Blog/2020/数据恢复杂谈.html
Normal file
File diff suppressed because one or more lines are too long
117
Personal/Blog/2020/注定不平凡的一年.html
Normal file
117
Personal/Blog/2020/注定不平凡的一年.html
Normal file
File diff suppressed because one or more lines are too long
133
Personal/Blog/2020/浅谈个人服务器架构.html
Normal file
133
Personal/Blog/2020/浅谈个人服务器架构.html
Normal file
File diff suppressed because one or more lines are too long
116
Personal/Blog/2020/球鞋日记.html
Normal file
116
Personal/Blog/2020/球鞋日记.html
Normal file
File diff suppressed because one or more lines are too long
103
Personal/Blog/2020/記拾月.html
Normal file
103
Personal/Blog/2020/記拾月.html
Normal file
File diff suppressed because one or more lines are too long
163
Personal/Blog/2020/长安游记.html
Normal file
163
Personal/Blog/2020/长安游记.html
Normal file
File diff suppressed because one or more lines are too long
179
Personal/Blog/2020/骑行在路上.html
Normal file
179
Personal/Blog/2020/骑行在路上.html
Normal file
File diff suppressed because one or more lines are too long
294
Personal/Blog/2021/2021.html
Normal file
294
Personal/Blog/2021/2021.html
Normal file
File diff suppressed because one or more lines are too long
94
Personal/Blog/2021/VIVO-IQOO-Neo3-开箱测评.html
Normal file
94
Personal/Blog/2021/VIVO-IQOO-Neo3-开箱测评.html
Normal file
File diff suppressed because one or more lines are too long
69
Personal/Blog/2021/index.html
Normal file
69
Personal/Blog/2021/index.html
Normal file
File diff suppressed because one or more lines are too long
102
Personal/Blog/2021/上有天堂、下有苏杭.html
Normal file
102
Personal/Blog/2021/上有天堂、下有苏杭.html
Normal file
File diff suppressed because one or more lines are too long
213
Personal/Blog/2021/我开发的第一款软件.html
Normal file
213
Personal/Blog/2021/我开发的第一款软件.html
Normal file
File diff suppressed because one or more lines are too long
92
Personal/Blog/2021/我站立的地方是中国.html
Normal file
92
Personal/Blog/2021/我站立的地方是中国.html
Normal file
File diff suppressed because one or more lines are too long
84
Personal/Blog/2021/我还在…….html
Normal file
84
Personal/Blog/2021/我还在…….html
Normal file
File diff suppressed because one or more lines are too long
157
Personal/Blog/2021/星光不问赶路人.html
Normal file
157
Personal/Blog/2021/星光不问赶路人.html
Normal file
File diff suppressed because one or more lines are too long
120
Personal/Blog/2021/济南呀济南的泰山之旅.html
Normal file
120
Personal/Blog/2021/济南呀济南的泰山之旅.html
Normal file
File diff suppressed because one or more lines are too long
113
Personal/Blog/2021/涝疫结合.html
Normal file
113
Personal/Blog/2021/涝疫结合.html
Normal file
File diff suppressed because one or more lines are too long
107
Personal/Blog/2021/申请-Jetbrains-开源项目授权.html
Normal file
107
Personal/Blog/2021/申请-Jetbrains-开源项目授权.html
Normal file
File diff suppressed because one or more lines are too long
119
Personal/Blog/2021/真·长安游记.html
Normal file
119
Personal/Blog/2021/真·长安游记.html
Normal file
File diff suppressed because one or more lines are too long
86
Personal/Blog/2021/记拾月.html
Normal file
86
Personal/Blog/2021/记拾月.html
Normal file
File diff suppressed because one or more lines are too long
102
Personal/Blog/2021/贰号机、落幕.html
Normal file
102
Personal/Blog/2021/贰号机、落幕.html
Normal file
File diff suppressed because one or more lines are too long
187
Personal/Blog/2022/2022.html
Normal file
187
Personal/Blog/2022/2022.html
Normal file
File diff suppressed because one or more lines are too long
126
Personal/Blog/2022/Halo-主题-Redemption-首发版.html
Normal file
126
Personal/Blog/2022/Halo-主题-Redemption-首发版.html
Normal file
File diff suppressed because one or more lines are too long
92
Personal/Blog/2022/Hello-Halo.html
Normal file
92
Personal/Blog/2022/Hello-Halo.html
Normal file
File diff suppressed because one or more lines are too long
89
Personal/Blog/2022/Redemption-主题-0.2.1-版本.html
Normal file
89
Personal/Blog/2022/Redemption-主题-0.2.1-版本.html
Normal file
File diff suppressed because one or more lines are too long
138
Personal/Blog/2022/Redemption.html
Normal file
138
Personal/Blog/2022/Redemption.html
Normal file
File diff suppressed because one or more lines are too long
69
Personal/Blog/2022/index.html
Normal file
69
Personal/Blog/2022/index.html
Normal file
File diff suppressed because one or more lines are too long
102
Personal/Blog/2022/「引用」博客的本质是电线杆子.html
Normal file
102
Personal/Blog/2022/「引用」博客的本质是电线杆子.html
Normal file
File diff suppressed because one or more lines are too long
94
Personal/Blog/2022/一线城市拥有一亩三分地是什么体验.html
Normal file
94
Personal/Blog/2022/一线城市拥有一亩三分地是什么体验.html
Normal file
File diff suppressed because one or more lines are too long
114
Personal/Blog/2022/三步为你博客文章分析情感关键字.html
Normal file
114
Personal/Blog/2022/三步为你博客文章分析情感关键字.html
Normal file
File diff suppressed because one or more lines are too long
86
Personal/Blog/2022/不要在饿的时候吃螺蛳粉!.html
Normal file
86
Personal/Blog/2022/不要在饿的时候吃螺蛳粉!.html
Normal file
File diff suppressed because one or more lines are too long
107
Personal/Blog/2022/习惯养成第一步.html
Normal file
107
Personal/Blog/2022/习惯养成第一步.html
Normal file
File diff suppressed because one or more lines are too long
111
Personal/Blog/2022/人在囧途——青海湖.html
Normal file
111
Personal/Blog/2022/人在囧途——青海湖.html
Normal file
File diff suppressed because one or more lines are too long
100
Personal/Blog/2022/人格类型测试.html
Normal file
100
Personal/Blog/2022/人格类型测试.html
Normal file
File diff suppressed because one or more lines are too long
83
Personal/Blog/2022/你还记得曾经的梦想么?.html
Normal file
83
Personal/Blog/2022/你还记得曾经的梦想么?.html
Normal file
File diff suppressed because one or more lines are too long
274
Personal/Blog/2022/使用-Docusaurus-搭建优秀个人wiki.html
Normal file
274
Personal/Blog/2022/使用-Docusaurus-搭建优秀个人wiki.html
Normal file
File diff suppressed because one or more lines are too long
117
Personal/Blog/2022/关于感情的事情.html
Normal file
117
Personal/Blog/2022/关于感情的事情.html
Normal file
File diff suppressed because one or more lines are too long
97
Personal/Blog/2022/关于花.html
Normal file
97
Personal/Blog/2022/关于花.html
Normal file
File diff suppressed because one or more lines are too long
133
Personal/Blog/2022/关于郑州的互联网记忆.html
Normal file
133
Personal/Blog/2022/关于郑州的互联网记忆.html
Normal file
File diff suppressed because one or more lines are too long
146
Personal/Blog/2022/再游嵩山.html
Normal file
146
Personal/Blog/2022/再游嵩山.html
Normal file
File diff suppressed because one or more lines are too long
82
Personal/Blog/2022/写十万字的博客是一种什么感觉.html
Normal file
82
Personal/Blog/2022/写十万字的博客是一种什么感觉.html
Normal file
File diff suppressed because one or more lines are too long
106
Personal/Blog/2022/写博客的正确姿势---先行版.html
Normal file
106
Personal/Blog/2022/写博客的正确姿势---先行版.html
Normal file
File diff suppressed because one or more lines are too long
185
Personal/Blog/2022/写博客的正确姿势---测试版.html
Normal file
185
Personal/Blog/2022/写博客的正确姿势---测试版.html
Normal file
File diff suppressed because one or more lines are too long
117
Personal/Blog/2022/原点.html
Normal file
117
Personal/Blog/2022/原点.html
Normal file
File diff suppressed because one or more lines are too long
109
Personal/Blog/2022/如何免费获得-Jetbrains-正版授权.html
Normal file
109
Personal/Blog/2022/如何免费获得-Jetbrains-正版授权.html
Normal file
File diff suppressed because one or more lines are too long
89
Personal/Blog/2022/我是关系户.html
Normal file
89
Personal/Blog/2022/我是关系户.html
Normal file
File diff suppressed because one or more lines are too long
101
Personal/Blog/2022/我要拔智齿!!!.html
Normal file
101
Personal/Blog/2022/我要拔智齿!!!.html
Normal file
File diff suppressed because one or more lines are too long
113
Personal/Blog/2022/数字文化遗产.html
Normal file
113
Personal/Blog/2022/数字文化遗产.html
Normal file
File diff suppressed because one or more lines are too long
101
Personal/Blog/2022/新冠笔记.html
Normal file
101
Personal/Blog/2022/新冠笔记.html
Normal file
File diff suppressed because one or more lines are too long
108
Personal/Blog/2022/新手村村长.html
Normal file
108
Personal/Blog/2022/新手村村长.html
Normal file
File diff suppressed because one or more lines are too long
88
Personal/Blog/2022/是微风、是晚霞、是来日方长.html
Normal file
88
Personal/Blog/2022/是微风、是晚霞、是来日方长.html
Normal file
File diff suppressed because one or more lines are too long
102
Personal/Blog/2022/最近在折腾什么…….html
Normal file
102
Personal/Blog/2022/最近在折腾什么…….html
Normal file
File diff suppressed because one or more lines are too long
88
Personal/Blog/2022/最近的生活.html
Normal file
88
Personal/Blog/2022/最近的生活.html
Normal file
File diff suppressed because one or more lines are too long
91
Personal/Blog/2022/月季到了.html
Normal file
91
Personal/Blog/2022/月季到了.html
Normal file
File diff suppressed because one or more lines are too long
96
Personal/Blog/2022/浅谈一下自己折腾的网站.html
Normal file
96
Personal/Blog/2022/浅谈一下自己折腾的网站.html
Normal file
File diff suppressed because one or more lines are too long
119
Personal/Blog/2022/番茄开花啦-~.html
Normal file
119
Personal/Blog/2022/番茄开花啦-~.html
Normal file
File diff suppressed because one or more lines are too long
91
Personal/Blog/2022/种下了一些瓜果蔬菜.html
Normal file
91
Personal/Blog/2022/种下了一些瓜果蔬菜.html
Normal file
File diff suppressed because one or more lines are too long
89
Personal/Blog/2022/罪恶应该被遗传么.html
Normal file
89
Personal/Blog/2022/罪恶应该被遗传么.html
Normal file
File diff suppressed because one or more lines are too long
104
Personal/Blog/2022/自律的痛苦······.html
Normal file
104
Personal/Blog/2022/自律的痛苦······.html
Normal file
File diff suppressed because one or more lines are too long
105
Personal/Blog/2022/论成年人的睡眠.html
Normal file
105
Personal/Blog/2022/论成年人的睡眠.html
Normal file
File diff suppressed because one or more lines are too long
132
Personal/Blog/2022/谈谈我的「数字文具盒」---NextCloud.html
Normal file
132
Personal/Blog/2022/谈谈我的「数字文具盒」---NextCloud.html
Normal file
File diff suppressed because one or more lines are too long
150
Personal/Blog/2022/谈谈我的「数字文具盒」---Obsidian.html
Normal file
150
Personal/Blog/2022/谈谈我的「数字文具盒」---Obsidian.html
Normal file
File diff suppressed because one or more lines are too long
88
Personal/Blog/2022/谈谈我的「数字文具盒」---心得体会.html
Normal file
88
Personal/Blog/2022/谈谈我的「数字文具盒」---心得体会.html
Normal file
File diff suppressed because one or more lines are too long
236
Personal/Blog/2022/谈谈我的「数字文具盒」---数字基建.html
Normal file
236
Personal/Blog/2022/谈谈我的「数字文具盒」---数字基建.html
Normal file
File diff suppressed because one or more lines are too long
167
Personal/Blog/2022/谈谈我的「数字文具盒」---生产力工具(上).html
Normal file
167
Personal/Blog/2022/谈谈我的「数字文具盒」---生产力工具(上).html
Normal file
File diff suppressed because one or more lines are too long
177
Personal/Blog/2022/谈谈我的「数字文具盒」---生产力工具(下).html
Normal file
177
Personal/Blog/2022/谈谈我的「数字文具盒」---生产力工具(下).html
Normal file
File diff suppressed because one or more lines are too long
148
Personal/Blog/2022/谈谈我的「数字文具盒」---番外篇.html
Normal file
148
Personal/Blog/2022/谈谈我的「数字文具盒」---番外篇.html
Normal file
File diff suppressed because one or more lines are too long
153
Personal/Blog/2022/谈谈我的「数字文具盒」---运行平台.html
Normal file
153
Personal/Blog/2022/谈谈我的「数字文具盒」---运行平台.html
Normal file
File diff suppressed because one or more lines are too long
111
Personal/Blog/2022/谈谈我的「数字文具盒」.html
Normal file
111
Personal/Blog/2022/谈谈我的「数字文具盒」.html
Normal file
File diff suppressed because one or more lines are too long
105
Personal/Blog/2022/这个周末.html
Normal file
105
Personal/Blog/2022/这个周末.html
Normal file
File diff suppressed because one or more lines are too long
119
Personal/Blog/2022/通货膨胀的猪.html
Normal file
119
Personal/Blog/2022/通货膨胀的猪.html
Normal file
File diff suppressed because one or more lines are too long
112
Personal/Blog/2022/闭门锁网.html
Normal file
112
Personal/Blog/2022/闭门锁网.html
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user