leetcode validate binary nodes
动态规划-背包问题-完全背包问题:leetcode 377. 组合总和 Ⅳ
1. 题目 读题 给你一个由 不同 整数组成的数组 nums ,和一个目标整数 target 。请你从 nums 中找出并返回总和为 target 的元素组合的个数。 题目数据保证答案符合 32 位整数范围。 示例 1: 输入:nums = [1,2,3], target = 4输出:7解释:所有可 ......
7-010-(LeetCode- 518) 零钱兑换II
1. 题目 读题 518. 零钱兑换 II给你一个整数数组 coins 表示不同面额的硬币,另给一个整数 amount 表示总金额。 请你计算并返回可以凑成总金额的硬币组合数。如果任何硬币组合都无法凑出总金额,返回 0 。 假设每一种面额的硬币有无限个。 题目数据保证结果符合 32 位带符号整数。 ......
图书商城Vue+Element+Node项目练习(...)
本系列文章是为学习Vue的项目练习笔记,尽量详细记录一下一个完整项目的开发过程。面向初学者,本人也是初学者,搬砖技术还不成熟。项目在技术上前端为主,包含一些后端代码,从基础的数据库(Sqlite)、到后端服务Node.js(Express),再到Web端的Vue,包含服务端、管理后台、商城网站、小程... ......
node程序无配置调试模式JavaScript Debug Terminal
JavaScript Debug Terminal,中文版为 JavaScript 调试终端 可以无脑开启对js脚本的调试,无需配置 launch.json 开启一个 JavaScript 调试终端,直接在终端运行任意 js程序,包括 单个js文件,使用 node test.js npm run s ......
node.js的删除安装及vue-admin-template的下载
删除18 node版本过高(18了),这里需要16,因此将原来的node删除. 删除的方法是在设置中搜索node并找到,然后傻瓜式删除. 安装16 直接一路next确认就行 检查版本 vue-admin-template下载 这是一个版本为4.4.0的基础框架(官网:https://panjiach ......
node服务端项目jsdom+canvas问题整理:
用node写个后端服务,node版本是16.13.1,用了jsdom插件和canvas。需要注意的是,使用jsdom之后同时使用canvas需要额外下载canvas插件(如果有需要的话),官网有介绍【https://github.com/jsdom/jsdom#canvas-support】。 问题 ......
Mysql用户建立触发器报错You do not have the SUPER privilege and binary logging is enabled
分析原因:是log_bin_trust_function_creators值为off导致,因为Table中有Trigger,如果不创建Trigger,不会出现这样的错误信息,但Trigger必须创建临时解决办法:用root用户登录: mysql -u root -pmysql>set global ......
LeetCode C++:HashTable篇
1、Two Sum Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume tha ......
leetcode 21. 合并两个有序链表
## 直接合并即可 这道题是简单题,直接合并即可 /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode() {} * ListNode(int ......
windows系统使用gnvm命令更新node版本
参考:https://blog.csdn.net/qq_51241202/article/details/129595355?spm=1001.2101.3001.6650.4&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault% ......
3普罗米修斯搭建_node_exporter
搭建node_exporter监控一.被监控宿主机,下node_exporter容器执行命令:docker run -d -p 9100:9100 -v /proc:/host/proc:ro -v /sys:/host/sys:ro -v /:/rootfs:ro prom/node-export ......
[LeetCode] 1071. Greatest Common Divisor of Strings
For two strings s and t, we say "t divides s" if and only if s = t + ... + t (i.e., t is concatenated with itself one or more times). Given two string ......
Win7系统安装高版本node.js
Win7系统可直接安装的最高nodejs版本为13.14 1、下载 node-v13.14.0-x64.msi 安装 (1)官网下载msi安装版,不用配置环境变量,地址:https://registry.npmmirror.com/binary.html?path=node/v13.14.0/ (2 ......
Binary Tree Inorder Traversal
Given the root of a binary tree, return the inorder traversal of its nodes' values. Example 1: ``` Input: root = [1,null,2,3] Output: [1,3,2] ``` Exam ......
[LeetCode] 1186. Maximum Subarray Sum with One Deletion
Given an array of integers, return the maximum sum for a non-empty subarray (contiguous elements) with at most one element deletion. In other words, y ......
[LeetCode] 2462. Total Cost to Hire K Workers
You are given a 0-indexed integer array costs where costs[i] is the cost of hiring the ith worker. You are also given two integers k and candidates. W ......
webSocket基础配置node和页面使用
# webSocket 简单配置: https://blog.csdn.net/qq_43206280/article/details/103770949 ```javascript //app.js var ws = require("nodejs-websocket"); console.log ......
系统断电后,MySQL重启失败:[ERROR] Binlog has bad magic number; It‘s not a binary log file that can be used by this version of MySQL
系统断电后,MySQL重启失败: [ERROR] Binlog has bad magic number; It‘s not a binary log file that can be used by this version of MySQL [ERROR] Can't init tc log [ ......
Node.js和TypeScript教程:使用Typescript、NodeJS和基于文件的存储系统构建REST API
介绍 欢迎到我的博客!在本教程中,我将指导您完成使用 Node.js、Express 和 TypeScript 构建强大的微型电子商务 API 的过程。我们将共同探索各种功能和技术,使您能够为电子商务应用程序创建强大的 API。 我们在这个项目中的关键决策之一是实现基于文件的存储系统,而不是依赖 M ......
LeetCode —— 滑动窗口
904. 水果成篮 用一个 Map 记录当前窗口的情况: key - 水果种类数 value - 这个水果种类在当前滑动窗口里出现的次数 维持一个 left 指针到 right 指针的滑动窗口 每次 right 右移一位,将新加入窗口的 fruits[right] 这个种类放到 map 里,并将该种 ......
[LeetCode] 2485. Find the Pivot Integer
Given a positive integer n, find the pivot integer x such that: The sum of all elements between 1 and x inclusively equals the sum of all elements bet ......
【Node】node 报错:tagOffsetsMap[tag] ??= [];...SyntaxError: Unexpected token ,‘??=‘
安装的 node 版本不支持空值赋值运算符(??=)  更换合适的 node 版本就行 更多支持请在 [node.gree ......
node基础
1、node本地化日志 //本地化日志及按日期切割 const winston = require('winston'); require('winston-daily-rotate-file'); var transport = new winston.transports.DailyRotate ......
node js md 版
#数据类型 ##buffer 1.let buf = Buffer.alloc(10) // 1.安全 但速度慢 2.let buf = Buffer.allocUnsafe(10) // 1.不安全 可能会引用到别的程序的数据 但是速度块 3.let buf = Buffer.from("abc" ......
LeetCode 128. 最长连续序列
* 为什么这题我都不会,脑袋有点累,状态真差 ``` class Solution { public: int longestConsecutive(vector& nums) { unordered_set s(nums.begin(),nums.end());//记录数字是否出现过 int re ......
MAC安装多个版本node命令
背景:在实际项目开发中,不同的项目我们往往需要用到不同版本的node做支持,并且需要根据项目需要切换,以下就是常用的命令行。 Mac下使用n去安装多个指定版本的Node.js,并使用命令随时切换。 1.全局安装n npm install -g n2.指定版本的Node安装 sudo -E n 16. ......
leetcode-前缀和数组&差分数组
前缀和数组: 前缀和技巧适用于快速、频繁地计算一个索引区间内的元素之和。(仅仅适用于原数组不变的情况,如果原数组经常修改,则需要考虑差分数组。) 看两道例题就清楚了: 1. 303. 区域和检索 - 数组不可变 - 力扣(LeetCode) 由于要频繁计算某个区间内的元素之和,暴力解法复杂度太大,显 ......
node服务 图片合并echarts图表,绘制方框
效果图:  ### 环境及依赖配置 node版本参考:v14.18.3 npm版本参考:6.14.15 # ......
LeetCode 周赛 351(2023/06/25)T2 有点意思
> **本文已收录到 [AndroidFamily](https://github.com/pengxurui/AndroidFamily),技术和职场问题,请关注公众号 [彭旭锐] 和 [BaguTree Pro] 知识星球提问。** - 往期回顾:[LeetCode 单周赛第 348 场 · 数 ......