摘要:sql 中获取RUL中指定的参数的值 http://www.hztech.com/aaa.aspx?ab=1&bc=2&ac=3 获取 1,2,3 使用方法: [dbo].[GetURLPara]('ab=1&bc=2&ac=3','bc') CREATE FUNCTION [dbo].[GetUR
阅读全文
摘要:用友U9C UBF 开发 平台生成的项目,默认使用的是 .net 4.5 但是 VISUAL studio 2022 已经不支持这个版本了, 解决方法: 手动拷贝 4.5的文件 到 两个文件夹 C:\Windows\Microsoft.NET\Framework C:\Program Files (
阅读全文
摘要:背景: 1、C/S系统架构 2、前端 Extjs 3、后台C# 4、数据库SQL 前端通过ajAx请求与后台通信。 前端应用页面统一继承入口类 BasePage 应用页面 public partial class xxxxxxx :BasePage { //y业务代码...... } BasePag
阅读全文
摘要:需要完成功能 借助redis Stream 数据结构实现消息队列,异步完成订单创建,其中涉及到了缓存(击穿,穿透,雪崩),锁(Redisson),并发处理,异步处理,Lua脚本 IDE:IDEA 2022 1、读取库存数据 【Lua】 2、判断库存 【Lua】 3、扣减库存 【Lua】 4、创建队列
阅读全文
摘要:Redis Streams tutorial | Redis xread命令有几个问题: 1、消息丢失的问题 2、消息多人重复读取 3、消息是否读取的状态标记 针对上面的问题,引出另一个概念,“消费者组"(consumber group),可以这么理解,stream 是水果生产基地,组就是中间批发商
阅读全文
摘要:Listening for new items with XREAD When we do not want to access items by a range in a stream, usually what we want instead is to subscribe to new ite
阅读全文
摘要:概况 A Redis stream is a data structure that acts like an append-only log. You can use streams to record and simultaneously syndicate events in real tim
阅读全文
摘要:要 在大数据,云计算,人工智能盛行的环境下,程序员该何去何从?企业自有的研发团队又该如何规划?这两个问题在五年前,我就认真的思考和深入的分析过。程序开发模式基本经历了以下阶段。 传统的程序开发阶段 在对需求进行调研和分析后,最终得到系统的设计架构和技术选型;接下来就是程序员从第一行代码纯手工的编写,
阅读全文
摘要:背景: 两张表,分别是 :sys_tbl,和 sys_field,其中:sys_tbl 是系统所有表的信息,包含两个字段 :code(表名),name(表描述信息);sys_fld 是记录第张表中的字段 的名称(field)和描述信息(table) , 截图如下: sys_tbl 其中,字段 名称包
阅读全文
摘要://异步阻塞队列变量 private BlockingQueue<VoucherOrder> orderTasks=new ArrayBlockingQueue<>(1024*1024); //create the thread pool signal thread private static f
阅读全文
摘要:public static final DefaultRedisScript<Long> SECKILL_SCRIPT; static { SECKILL_SCRIPT= new DefaultRedisScript<>(); SECKILL_SCRIPT.setLocation(new Class
阅读全文
摘要:同步:实时同步全过程,连续做几件事,从头到尾不管用多少时间,最后得到一个结果 (单人做战) 异步:异步状态跟踪,对于耗时较久的工作可以让别人去做(或者自己有时间再做),自己不关注过程,有结果通知自己就好 (多人做战) 阻塞:堵门,自己要的鸡蛋灌饼还没有做好,我就堵门等,后面人买烧饼(虽然有现货)对不
阅读全文
摘要:Lua 内存垃圾回收,是自动完成的,不需要人工处理。 垃圾回收有两种模式: 1、增量式(Incremental) 有三个参数 1)、garbage-collector pause, 什么时间执行,比上次回收后内增加的比例 默认200% 最大1000% 2)、garbage-collector ste
阅读全文
摘要:2.4 – Metatables and Metamethods Every value in Lua can have a metatable. This metatable is an ordinary Lua table that defines the behavior of the ori
阅读全文
摘要:2.5.8 – Function Calls A function call in Lua has the following syntax: functioncall ::= prefixexp args In a function call, first prefixexp and args a
阅读全文
摘要:2.5.7 – Table Constructors Table constructors are expressions that create tables. Every time a constructor is evaluated, a new table is created. A con
阅读全文
摘要:2.5.1 – Arithmetic Operators Lua supports the usual arithmetic operators: the binary + (addition), - (subtraction), * (multiplication), / (division),
阅读全文
摘要:2.5 – Expressions The basic expressions in Lua are the following: exp ::= prefixexp exp ::= nil | false | true exp ::= Number exp ::= String exp ::= f
阅读全文
摘要:结构控制 2.4.4 – Control Structures The control structures if, while, and repeat have the usual meaning and familiar syntax: stat ::= while exp do block e
阅读全文
摘要:变量 Variables are places that store values. There are three kinds of variables in Lua: global variables, local variables, and table fields. A single na
阅读全文
摘要:值和类型 Lua is a dynamically typed language. This means that variables do not have types; only values do. There are no type definitions in the language.
阅读全文
摘要:1、标识符 Names (also called identifiers) in Lua can be any string of letters, digits, and underscores, not beginning with a digit. Identifiers are used t
阅读全文
摘要:在开始之前 ,先把结论留下: 要想真正用于生产环境,推荐使用 Redisson 实现分布式锁! <dependency> <groupId>org.redisson</groupId> <artifactId>redisson</artifactId> <version>3.19.3</versio
阅读全文
摘要:事务简介 事务在逻辑上是一组操作,要么执行,要不都不执行。主要是针对数据库而言的,比如说 MySQL。为了保证事务是正确可靠的,在数据库进行写入或者更新操作时,就必须得表现出 ACID 的 4 个重要特性: 原子性(Atomicity):一个事务中的所有操作,要么全部完成,要么全部不完成,不会结束在
阅读全文
摘要:1、Ctrl+Alt+m 完成选择代码块的封装 2、CTRL+ALT+t 选择代码放在try catch 等快捷操作 如下:
阅读全文
摘要:postman 可以完成模拟请求 post ,get ,delete ,put 等 1 增加headers :Authorization (设置了登录token ) 2选择 POST 3填写请求地址 http://localhost:8081/voucher/seckill 4、输入请求内容 { "
阅读全文
摘要:package com.hmdp.utils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.StringRedisTemplate;
阅读全文
摘要:此内容要在 前一篇 主从模式基础之上阅读 在主从模式的基础上增加 sentinel 主从模式的运行配置 conf配置文件 sentinel monitor mymaster 192.168.1.138 6385 2 192.168.1.138 6385 master2 重新选举时达到数量 s1/se
阅读全文
摘要:规划 Centos7 1、创建目录: mkdir 638{5,6,7} [root@machine138 redis-stack]# mkdir masterSlave [root@machine138 redis-stack]# cd masterSlave/ [root@machine138 m
阅读全文
摘要:两种方式: rdf :默认 save <seconds> <changes> 多长时间内 有几个操作就执行 后台save rdbcompression yes是否执行压缩 建议不开启,因为压缩会消耗CPU dbfilename dump.rdb数据文件名字 #####################
阅读全文