摘要:
一、HyperExpress链接https://gitee.com/gridsoft/hyper-express#/gridsoft/hyper-express/blob/master/docs/Router.md 二、错误处理中间件的示例: const express = require('exp 阅读全文
摘要:
一、深刻教训1、svelte或vue中axios访问后端使用的URL地址:最后的斜杠(/)要加,否则nginx配置中rewrite会不起作用 // const baseURL = 'http://47.97.19.34:9001/'; 重点:最后的斜杠(/)要加 // const baseURL = 阅读全文
摘要:
如果要判断是否为 null或undefined,通过非空判断即可.const a = { name: 'a' } const b = {} console.log(Object.keys(a).length 0) // false console.log(Object.keys(b).length 阅读全文
摘要:
setData中值的变量和绑定方法中值的变量表达: 1、关于true 在 JavaScript 中,所有非空字符串、非零数字、非 null、非 undefined 以及大多数对象(包括数组、函数等)都被认为是 "truthy" 的。 一、执行流程: 运行小程序 >>> app.ts >>> app. 阅读全文
摘要:
最近中国股市表现令人气馁。但是大家应该也看到,A股的股民越来越多了。一个有缺陷的市场吸引了越来越多的股民,这到底是好事还是坏事呢?如果小部分人赚钱,大部分人亏钱,分布比例是不是流传很久的“二八定律”?股民都能列举一大堆亏钱的原因,但大数据下呈现的最主要,最真实的原因是什么? 有学者拿到了2012年到 阅读全文
摘要:
import { scheduleJob } from 'node-schedule'; // 定时任务 function setupScheduledTasks() { // 每6秒执行一次 setInterval(() => { taskEverySixSeconds(); }, 6000); 阅读全文
摘要:
目录结构 project/ │ ├── src/ │ ├── app.ts │ ├── routes/ │ │ ├── userRoutes.ts │ │ └── index.ts │ ├── entities/ │ │ └── User.ts │ ├── utils/ │ │ └── parseQ 阅读全文
摘要:
pip install vibora tortoise-orm from tortoise import fields, models from tortoise.contrib.pydantic import pydantic_model_creator class User(models.Mod 阅读全文
摘要:
pip install japronto tortoise-orm from tortoise import Tortoise, fields from tortoise.models import Model # 定义 Tortoise 配置 TORTOISE_ORM = { 'connectio 阅读全文