随笔 - 785  文章 - 16 评论 - 39 阅读 - 166万
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

这里有几种实现方式:

第一种是:A,B的实现

Enum[Enum["A"] = 0] = "A";

x = Enum["A"] = 0;//x的值为0

也就是说:Enum有两个键值:一个是0,他的值是“A”;一个是“A”,他的值是0;

Enum

Object { 0: "A", 1: "B", A: 0, B: 9, D: "D" }

因此可以产生 Enum.A 或  Enum["A"]// 0

Enum[0] = "A" 但是 Enum.0是语法不通的

 

posted @ 2023-01-23 22:25 qqhfeng16 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 1 //test.mjs 2 export default function () { 3 console.log('foo'); 4 } 5 6 export var a1 = "aaaaaaaaaa" 7 8 export var b1 = "bbbbbbbbbb" 1 //main.mjs 2 阅读全文
posted @ 2022-12-09 20:13 qqhfeng16 阅读(19) 评论(0) 推荐(0) 编辑
摘要: https://github.com/dotnet/aspnetcore/blob/39f0e0b8f40b4754418f81aef0de58a9204a1fe5/src/Mvc/Mvc.Core/src/JsonResult.cs#L13 // Licensed to the .NET Foun 阅读全文
posted @ 2022-11-20 10:46 qqhfeng16 阅读(160) 评论(0) 推荐(0) 编辑
摘要: // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using Microso 阅读全文
posted @ 2022-11-20 10:38 qqhfeng16 阅读(69) 评论(0) 推荐(0) 编辑
摘要: https://github.com/dotnet/aspnetcore/blob/39f0e0b8f40b4754418f81aef0de58a9204a1fe5/src/Mvc/Mvc.Core/src/StatusCodeResult.cs#L1 // Licensed to the .NET 阅读全文
posted @ 2022-11-20 10:33 qqhfeng16 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 要解决的问题:目前网上大多数是多文件的版本控制(比如:Test1Controller.cs Test2Controller.cs)。这种方法,有诸多缺点,尤其是对于小的改动。 我们的方法:在一个文件中,写多个不同的函数,实现多版本控制。 基本原理: 第一步: 设计版本的枚举变量(V1、V2、V3等等 阅读全文
posted @ 2022-11-05 15:42 qqhfeng16 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 比如在nginx的html文件夹中,存在两个目录 web1 和web2 http://xxxxx/web1 http://xxxxx/web2 如果使用 localStorage 来存储token,就会出现 两个网站共享 localStorage 的情况。 根据资料sessionStorage不会出 阅读全文
posted @ 2022-10-31 21:53 qqhfeng16 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 出现的问题: 1. 机房总是停电,导致每次都要手动启动docker容器。 2.原来的容器,都是在ubuntu容器内部安装dotnet,ubuntu容器达到了2.2G,如果用微软的基础镜像,只有200多兆。 主要步骤: 1. 新建一个webpai的程序,在debug/net5.0目录放入以下两个文件 阅读全文
posted @ 2022-04-21 10:59 qqhfeng16 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-02-24 15:18 qqhfeng16 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-02-25 12:00 qqhfeng16 阅读(142) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示