05 2023 档案

摘要:using System.Diagnostics; Stopwatch timer = new Stopwatch(); timer.Start(); for(....) timer.Stop(); MessageBox.Show(timer.Elapsed.Ticks.ToString(Cultu 阅读全文
posted @ 2023-05-28 10:06 .net&new 阅读(28) 评论(0) 推荐(0) 编辑
摘要:委托是什么 大部分的解释是 委托是一个对方法的引用,可以不用自己执行,而是转交给其他对象。就好比每天都有一个黄毛旅行者,给npc做委托任务一样,npc并不是自己去做任务。 于是我们可以有以下代码,delegate就是声明一个委托,它的作用是调用sum方法 // See https://aka.ms/ 阅读全文
posted @ 2023-05-26 12:21 .net&new 阅读(70) 评论(0) 推荐(0) 编辑
摘要:1 什么是反射 首先要复习一下C#的编译过程,可以解释为下图 其中dll/exe中,包括元数据(metadata)和IL(中间语言Intermediate Language) 另外还出现的其他名词:CLR(公共语言运行时,Common Language Runtime)和JIT(实时编译器 Just 阅读全文
posted @ 2023-05-26 12:07 .net&new 阅读(227) 评论(0) 推荐(0) 编辑
摘要:线程管理类:SocketServer public class SocketServer { /// <summary> /// 接入池 /// </summary> private List<Client> clients= new List<Client>(); /// <summary> // 阅读全文
posted @ 2023-05-26 10:52 .net&new 阅读(6) 评论(0) 推荐(0) 编辑
摘要:winfor的页面类 : using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using 阅读全文
posted @ 2023-05-26 10:41 .net&new 阅读(4) 评论(0) 推荐(0) 编辑
摘要:using System.Net.Sockets;public class Client { /// <summary> /// 序列号 /// </summary> public int Number { get; set; } /// <summary> /// 用户超密 /// </summa 阅读全文
posted @ 2023-05-26 10:35 .net&new 阅读(9) 评论(0) 推荐(0) 编辑
摘要:输入命令 docker pull rabbitmq:3.7.7-management 简单启动(默认密码账号guest/guest) docker run -d -p 5672:5672 -p 15672:15672 --name rabbitmq rabbitmq:management 复杂启动( 阅读全文
posted @ 2023-05-25 12:52 .net&new 阅读(17) 评论(0) 推荐(0) 编辑
摘要:root@ecs-kc1-small-1-linux:~# docker run -p 3306:3306 mysql:8-oracle2022-03-05 13:40:49+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 阅读全文
posted @ 2023-05-25 12:40 .net&new 阅读(1033) 评论(0) 推荐(0) 编辑
摘要:查看镜像:docker images 导出镜像:docker save 05db07cd74c0 >E:\mysql.tar 导入镜像: 在新电脑上执行命令: docker load -i C:\Docker\redis.tar C:\Docker\redis.tar 为压缩文件路径, 此时需要一定 阅读全文
posted @ 2023-05-25 12:24 .net&new 阅读(24) 评论(0) 推荐(0) 编辑
摘要:var container = new MyContainer(); container.RegisterType<ILanguage, Chinese>(); //使用别名注册 container.RegisterType<ILanguage, Englisth>("english"); var 阅读全文
posted @ 2023-05-24 22:23 .net&new 阅读(11) 评论(0) 推荐(0) 编辑
摘要:using System.ComponentModel.DataAnnotations; //特性是个类,继承自Attribute//系统自带特性//自定义特性 class AccountViewModel{ [Required] [Display(Name ="邮箱")] [Define("这是第 阅读全文
posted @ 2023-05-18 22:29 .net&new 阅读(13) 评论(0) 推荐(0) 编辑
摘要:php中::是什么意思? PHP中的‘::’是一种内置的语法解析符号,中文名叫做“范围解析操作符”。:: 符号是用来帮助PHP中的语法结构“类”来实现对其成员的访问,通常我们只允许访问静态成员,具体代码如下:① 类正常访问静态成员class Heima{//静态属性public static $he 阅读全文
posted @ 2023-05-14 11:54 .net&new 阅读(216) 评论(0) 推荐(0) 编辑
摘要:可以使用Request对象的header方法获取当前请求的HTTP 请求头信息 $info = Request::instance()->header();echo $info['accept'];echo $info['accept-encoding'];echo $info['user-agen 阅读全文
posted @ 2023-05-14 11:18 .net&new 阅读(193) 评论(0) 推荐(0) 编辑
摘要:class SingleCase { public static SingleCase instance=null; public string name =""; public static SingleCase getInstance(string n) { if(instance==null) 阅读全文
posted @ 2023-05-08 08:44 .net&new 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2023-05-07 08:47 .net&new 阅读(11) 评论(0) 推荐(0) 编辑
摘要:package com.sz.model;import org.springframework.context.ApplicationContext;import org.springframework.context.support.ClassPathXmlApplicationContext;p 阅读全文
posted @ 2023-05-07 08:45 .net&new 阅读(14) 评论(0) 推荐(0) 编辑
摘要:<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 阅读全文
posted @ 2023-05-07 08:44 .net&new 阅读(2) 评论(0) 推荐(0) 编辑
摘要:package com.sz.model;public class User { private String name; private int Age; public void setAge(int age) { this.Age=age; } public int getAge() { ret 阅读全文
posted @ 2023-05-07 08:43 .net&new 阅读(14) 评论(0) 推荐(0) 编辑
摘要:https://www.bilibili.com/video/BV1Rf4y1r7sc?p=8&vd_source=d87a0cdb006a04b60ce265a9ce85d6af 阅读全文
posted @ 2023-05-06 07:50 .net&new 阅读(41) 评论(0) 推荐(0) 编辑
摘要:四. 寄存器和功能码 modbus的功能码很多,且不同功能码对应的报文也不一致,后续博客我会借用开源库实现一个modbus master 测试功能码 解析报文 下边我用表格总结一下寄存器,功能码,报文格式 注: (1)报文中的所有字节均为16进制 (2)由上图我们总结出不同的功能码的报文(无论询问报 阅读全文
posted @ 2023-05-05 09:19 .net&new 阅读(168) 评论(0) 推荐(0) 编辑
摘要:var service={ getStringValue:function(){ return "a string value"; } getNumberValue:function(){ return 20; }}; function middleware(value){ console.log( 阅读全文
posted @ 2023-05-04 22:57 .net&new 阅读(25) 评论(0) 推荐(0) 编辑
摘要:1:环境安装 tsc 作用:负责将ts 代码 转为 浏览器 和 nodejs 识别的 js代码。 /全局安装 npm install -g typescript // 检查是否安装成功 tsc -v 2:自动编译 运行 tsc --init,创建 tsconfig.json 文件;修改 tsconf 阅读全文
posted @ 2023-05-04 22:11 .net&new 阅读(776) 评论(0) 推荐(1) 编辑
摘要:默认枚举默认的情况下,默认的情况下第一项索引是 '1',逐渐递增,可正反映射 enum baseType { string, number, boolean, null, undefined, } console.log(baseType); /** 结果: { '0': 'string', '1' 阅读全文
posted @ 2023-05-04 22:07 .net&new 阅读(95) 评论(0) 推荐(0) 编辑
摘要:报错原因 在新版本的npm中,默认情况下,npm install遇到冲突的peerDependencies时将失败。 解决办法 使用--force或--legacy-peer-deps可解决这种情况。 --force 会无视冲突,并强制获取远端npm库资源,当有资源冲突时覆盖掉原先的版本。 --le 阅读全文
posted @ 2023-05-04 20:40 .net&new 阅读(1260) 评论(0) 推荐(0) 编辑

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