随笔分类 -  JavaScript

摘要:默认你有点nestjs基础 第一步安装 npm add @nestjs/typeorm typeorm mysql2 第二步 imports: [TypeOrmModule.forRoot({ type:'mysql', host:'', port:3306, username:'', passwo 阅读全文
posted @ 2024-05-01 20:37 漫漫长路</> 阅读(155) 评论(0) 推荐(0) 编辑
摘要:原文 https://www.makeuseof.com/token-authentication-nextjs-using-jwt/ 原文 阅读全文
posted @ 2024-01-26 12:41 漫漫长路</> 阅读(94) 评论(0) 推荐(0) 编辑
摘要:import React, { Component } from 'react'; import { Map, Marker, NavigationControl, InfoWindow, MapApiLoaderHOC, ZoomControl } from 'react-bmapgl'; cla 阅读全文
posted @ 2024-01-24 09:28 漫漫长路</> 阅读(283) 评论(0) 推荐(0) 编辑
摘要:参考:https://www.cnblogs.com/hechunfeng/p/17958183 第一步 npm install @prisma/client 第二步 npx prisma init 生成了文件 第三步,修改文件内容 第四步 第五步 测试一下,执行 npx prisma db pul 阅读全文
posted @ 2024-01-16 16:56 漫漫长路</> 阅读(474) 评论(0) 推荐(0) 编辑
摘要:第一步 npm install mysql2 第二步新建一个db.js db.js import mysql from "mysql2/promise"; export async function query({ query, values = [] }) { const dbconnection 阅读全文
posted @ 2024-01-11 11:26 漫漫长路</> 阅读(966) 评论(0) 推荐(0) 编辑
摘要:https://www.bilibili.com/video/BV15S4y1N7Mu?p=13&vd_source=f47173c6ece362dfbe9a439ae6addcce es5的转到es6的改变 es5 es6 ******* 阅读全文
posted @ 2023-10-29 13:13 漫漫长路</> 阅读(6) 评论(0) 推荐(0) 编辑
摘要:比如什么时候一个新的数组 什么时候还是原来数组 什么时候获取数组下标等等 https://www.bilibili.com/video/BV1vA4y197C7?p=155&spm_id_from=pageDriver&vd_source=f47173c6ece362dfbe9a439ae6addc 阅读全文
posted @ 2023-10-26 01:51 漫漫长路</> 阅读(10) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://18alan.space/posts/how-hard-is-it-to-build-a-frontend-framework.html homeabout Building a Frontend Framework; Reactivity and Composabilit 阅读全文
posted @ 2023-09-21 10:55 漫漫长路</> 阅读(31) 评论(0) 推荐(0) 编辑
摘要:转载来自:https://www.freecodecamp.org/news/implementing-a-linked-list-in-javascript/ If you are learning data structures, a linked list is one data struct 阅读全文
posted @ 2023-09-19 12:43 漫漫长路</> 阅读(130) 评论(0) 推荐(0) 编辑
摘要:https://www.bigocheatsheet.com/ https://www.hello-algo.com/chapter_preface/about_the_book/ gpt的回答 好的,下面给出这些算法的JavaScript例子,并给出它们的时间复杂度分析: O(1) - 常数时间复 阅读全文
posted @ 2023-06-30 17:58 漫漫长路</> 阅读(46) 评论(0) 推荐(0) 编辑
摘要://节点对象 class Node{ constructor(data){ this.data=data;//存储节点数据 this.next=null;//存储下一个节点的引用,默认为null } } //链表对象 class LinkedList{ constructor(){ this.hea 阅读全文
posted @ 2023-06-29 10:36 漫漫长路</> 阅读(50) 评论(0) 推荐(0) 编辑
摘要:https://www.programiz.com/javascript/online-compiler/?ref=f8e51c16 使用递归 例子:数的阶乘 // program to find the factorial of a number function factorial(x) { / 阅读全文
posted @ 2023-06-01 16:10 漫漫长路</> 阅读(7) 评论(0) 推荐(0) 编辑
摘要:Javascript闭包 Javascript原型 JavaScript递归 Javascript中的装饰器 如何Curry函数 浅拷贝和深拷贝 什么是纯函数? 解析Javascript IIFE函数表达式 变量,函数和Javascript箭头函数提升 为什么选择组合而不是继承 管道函数和组合函数| 阅读全文
posted @ 2023-05-13 01:54 漫漫长路</> 阅读(12) 评论(0) 推荐(0) 编辑
摘要:https://github.com/iamshaunjp/typescript-tutorial typescript是一种编程语言,可以用作JavaScript的替代品,现在它实际上被称为超集JavaScript语言 一 安装 TypeScript npm install -g typescri 阅读全文
posted @ 2023-03-26 17:10 漫漫长路</> 阅读(26) 评论(0) 推荐(0) 编辑
摘要:// linking prototype objects to build a prototype chain_proto_ vs Object.getPrototypeof(obj) Object.setPrototype0f(obj) //1. obj --> otherProto.protot 阅读全文
posted @ 2023-03-22 10:59 漫漫长路</> 阅读(9) 评论(0) 推荐(0) 编辑
摘要:1. 下面我们看一个例子,这里是5+1=6,但是结果是51 console.log效率会比较低 2. debug可以暂停代码,和查看变量,按F12,看Sources 3. 展开鼠标类型,事件监听 em.....,说得有点笼统了 阅读全文
posted @ 2023-03-22 10:00 漫漫长路</> 阅读(58) 评论(0) 推荐(0) 编辑
摘要:26. ES6 Promise 简介 26. ES6 Promise 简介 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=ed 阅读全文
posted @ 2023-03-02 21:39 漫漫长路</> 阅读(12) 评论(0) 推荐(0) 编辑
摘要:https://www.youtube.com/watch?v=qjHNdaf3cpE&list=PLCRqr1mERvdJ0IZMD1U4oSB7k0gyAjyIx&index=2 ES6是第6版,正式名称为ECMAScript 2015,于2015年6月完成。ES6为编写复杂的应用程序(包括类和 阅读全文
posted @ 2023-02-25 02:23 漫漫长路</> 阅读(12) 评论(0) 推荐(0) 编辑
摘要:完整代码 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" conten 阅读全文
posted @ 2022-10-06 02:32 漫漫长路</> 阅读(38) 评论(0) 推荐(0) 编辑
摘要:有一个需求 我在 JS 中有一个这样的数组: [6.7, 8, 7, 8.6] 我希望这个数组看起来像一个具有命名属性的对象数组: [{y: 6.7} , {y: 8}, {y: 7}, {y: 8.6}] .我如何在 JS 中执行此操作 可以这样返回 [6.7, 8, 7, 8.6].map(fu 阅读全文
posted @ 2022-09-28 14:56 漫漫长路</> 阅读(68) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示