摘要: 一、代码示例 #include <lithium_http_server.hh> #include <lithium_pgsql.hh> #include "symbols.hh" using namespace li; int main() { // 创建 PostgreSQL 数据库连接 pgs 阅读全文
posted @ 2024-09-11 20:48 pearlcity 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 一、找不到头文件 设置文件位置 环境变量: //定义用于RTC_GPIO唤醒的IO,0b为二进制,“0010”为2^(gpio 1)的二进制数 //gpio0~3 为0b1111,即2^0+2^1+2^2+2^3=15的二进制数 const uint64_t WAKEUP_PIN_BITMASK = 阅读全文
posted @ 2024-08-31 21:03 pearlcity 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 一、唤醒 在Arduino IDE框架中进行Arduino Uno开发时,可以使用SLEEP_MODE_PWR_DOWN模式来实现最深层次的休眠,以降低功耗。在这种模式下,Arduino Uno会关闭大部分微控制器功能,包括定时器中断,因此通常需要一个外部中断来唤醒设备。 为了使用一个按钮来唤醒Ar 阅读全文
posted @ 2024-08-11 14:16 pearlcity 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 1、列表是否包含变量 JavaScript const isContained = array.includes(variable); Python isContained = variable in my_list Dart bool isContained = list.contains(var 阅读全文
posted @ 2024-07-25 07:14 pearlcity 阅读(2) 评论(0) 推荐(0) 编辑
摘要: android { ... signingConfigs { release { storeFile file('c:/users/your_name/key.jks') storePassword 'your_store_password' keyPassword 'your_key_passwo 阅读全文
posted @ 2024-07-24 23:44 pearlcity 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 一、HyperExpress链接https://gitee.com/gridsoft/hyper-express#/gridsoft/hyper-express/blob/master/docs/Router.md 二、错误处理中间件的示例: const express = require('exp 阅读全文
posted @ 2024-04-10 10:59 pearlcity 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 一、深刻教训1、svelte或vue中axios访问后端使用的URL地址:最后的斜杠(/)要加,否则nginx配置中rewrite会不起作用 // const baseURL = 'http://47.97.19.34:9001/'; 重点:最后的斜杠(/)要加 // const baseURL = 阅读全文
posted @ 2024-03-28 16:29 pearlcity 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 如果要判断是否为 null或undefined,通过非空判断即可.const a = { name: 'a' } const b = {} console.log(Object.keys(a).length 0) // false console.log(Object.keys(b).length 阅读全文
posted @ 2024-03-16 10:03 pearlcity 阅读(6) 评论(0) 推荐(0) 编辑
摘要: setData中值的变量和绑定方法中值的变量表达: 1、关于true 在 JavaScript 中,所有非空字符串、非零数字、非 null、非 undefined 以及大多数对象(包括数组、函数等)都被认为是 "truthy" 的。 一、执行流程: 运行小程序 >>> app.ts >>> app. 阅读全文
posted @ 2024-02-15 00:04 pearlcity 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 最近中国股市表现令人气馁。但是大家应该也看到,A股的股民越来越多了。一个有缺陷的市场吸引了越来越多的股民,这到底是好事还是坏事呢?如果小部分人赚钱,大部分人亏钱,分布比例是不是流传很久的“二八定律”?股民都能列举一大堆亏钱的原因,但大数据下呈现的最主要,最真实的原因是什么? 有学者拿到了2012年到 阅读全文
posted @ 2024-02-06 11:18 pearlcity 阅读(65) 评论(0) 推荐(0) 编辑