Expression Tree Practice: C# Loops [TOC] C# provides several types of loops. Loop Type Description while Loop Repeats a statement or group of statements while a given condition is true. It tests the condition before executing the loop body. for/foreach Loop Ex…

2019年12月15日 1条评论 12725点热度 0人点赞 痴者工良 阅读全文

表达式树练习实践:C# 循环 [TOC] C# 提供了以下几种循环类型。 循环类型 描述 while 循环 当给定条件为真时,重复语句或语句组。它会在执行循环主体之前测试条件。 for/foreach 循环 多次执行一个语句序列,简化管理循环变量的代码。 do...while 循环 除了它是在循环主体结尾测试条件外,其他与 while 语句类似。 嵌套循环 您可以在 while、for 或 do..while 循环内使用一个或多个循环。 当然,还有以下用于控制循环的语句 控制语句 描述 break 语句 终止 lo…

2019年12月15日 1条评论 12659点热度 0人点赞 痴者工良 阅读全文

Expression Tree Practice: C# Conditional Statements [TOC] Conditional Statements C# provides the following types of conditional statements: Statement Description if An if statement consists of a boolean expression followed by one or more statements. if...else …

2019年12月15日 4条评论 4898点热度 0人点赞 痴者工良 阅读全文

表达式树练习实践:C#判断语句 [TOC] 判断语句 C# 提供了以下类型的判断语句: 语句 描述 if 一个 if 语句 由一个布尔表达式后跟一个或多个语句组成。 if...else 一个 if 语句 后可跟一个可选的 else 语句,else 语句在布尔表达式为假时执行。 嵌套 if 语句 您可以在一个 if 或 else if 语句内使用另一个 if 或 else if 语句。 switch 语句 一个 switch 语句允许测试一个变量等于多个值时的情况。 嵌套 switch 语 您可以在一个 switch…

2019年12月15日 4条评论 4852点热度 0人点赞 痴者工良 阅读全文

Expression Tree Practice: C# Operators [TOC] In C#, the arithmetic operators can be categorized into the following types: Arithmetic Operators Relational Operators Logical Operators Bitwise Operators Assignment Operators Other Operators These operators can be …

2019年12月15日 1条评论 1535点热度 0人点赞 痴者工良 阅读全文

表达式树练习实践:C# 运算符 [TOC] 在 C# 中,算术运算符,有以下类型 算术运算符 关系运算符 逻辑运算符 位运算符 赋值运算符 其他运算符 这些运算符根据参数的多少,可以分作一元运算符、二元运算符、三元运算符。本文将围绕这些运算符,演示如何使用表达式树进行操作。 对于一元运算符和二元运算符的 Expression 的子类型如下: UnaryExpression; //一元运算表达式 BinaryExpression; //二元运算表达式 一,算术运算符 运算符 描述 + 把两个操作数相加 - 从第一个操…

2019年12月15日 1条评论 4641点热度 0人点赞 痴者工良 阅读全文

Expression Tree Practice: Variables, Constants, and Assignments Defining Variables ParameterExpression is used to create variables and variable parameter expressions. In C#, variables are divided into the following types: Value types Reference types Pointer ty…

2019年12月15日 0条评论 10865点热度 0人点赞 痴者工良 阅读全文

表达式树练习实践:变量、常量与赋值 定义变量 ParameterExpression 用来创建变量、变量参数表达式。 在 C# 中,变量分为以下几种类型: 值类型(Value types) 引用类型(Reference types) 指针类型(Pointer types) 一般上,只用到值类型和引用类型,这里不会说到指针类型。 C#的基本值类型有:bool、byte、char、double、float、int、long等(C#中,数组属于引用类型)。 表达式树创建一个有两种方式变量: ParameterExpres…

2019年12月15日 0条评论 11638点热度 0人点赞 痴者工良 阅读全文

[TOC] First of all, I want to state that I have failed~ I am sharing my progress and experience in the hope of helping others complete the compilation work~ Background: Recently, I took over an embedded device of a certain model from Huawei, which requires set…

2019年12月15日 3条评论 4978点热度 1人点赞 痴者工良 阅读全文

[TOC] 首先我要说明,我失败了~ 我把我的进度和经验放出来,希望能够帮助别人完成编译工作~ 背景:最近接手一个华为某型号的嵌入式设备,需要在上面搭建 .NET Core 环境。 设备是 Armel 架构的,Linux 内核 3.10;.NET Core ARM 只有 Armhf。 因此编译出来的二进制文件无法在此设备下运行。 然后想尝试在 Git 上下载源码,手动编译出 Armel 版本的 .NET Core SDK/Runtime。 感谢张队提供了大量的参考资料。 一,工作开始前 .NET Core SDK/…

2019年12月15日 3条评论 4834点热度 1人点赞 痴者工良 阅读全文

CZGL.Auth Found a bug that only allows one user to log in at a time, without the ability for multiple users to log in simultaneously. Hahahahahahahahahahahahahahahahahahahahaha. I plan to optimize it properly, fix the bug over the weekend, and do some testing …

2019年12月15日 0条评论 3990点热度 0人点赞 痴者工良 阅读全文

CZGL.Auth 发现有Bug,会导致只能有一个用户登录,无法多个用户同时登录。 哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈。 打算好好优化一下,周六周日修改Bug,做好测试再放出来,哈哈哈哈哈哈哈哈哈哈哈哈哈。 新版本开源地址:https://github.com/whuanle/CZGL.Auth 我的代码太渣了,大佬们指点一下。 CZGL.Auth 是一个基于 Jwt 实现的快速角色授权库,ASP.Net Core 的 Identity 默认的授权是 Cookie。而 Jwt 授权只提供了基础实现和接口,需要自…

2019年12月15日 0条评论 3938点热度 0人点赞 痴者工良 阅读全文

[TOC] ① Store API Accessible by Roles/Users For example, Use List<ApiPermission> to store the authorized API list for the role. Optional. Authorized APIs can also be stored in the Token, which can solely contain role information and user identity informa…

2019年12月15日 0条评论 3490点热度 0人点赞 痴者工良 阅读全文

[TOC] ① 存储角色/用户所能访问的 API 例如 使用 List<ApiPermission> 存储角色的授权 API 列表。 可有可无。 可以把授权访问的 API 存放到 Token 中,Token 也可以只存放角色信息和用户身份信息。 /// <summary> /// API /// </summary> public class ApiPermission { /// <summary> /// API名称 /// </summary&g…

2019年12月15日 0条评论 3429点热度 0人点赞 痴者工良 阅读全文

ASP.NET Core Implements Distributed Caching Using Redis: Docker, IDistributedCache, StackExchangeRedis Prerequisite: A Linux server with Docker installed. I. Running Redis in Docker Pull Redis image docker pull redis Query image list docker images Several meth…

2019年12月15日 0条评论 4508点热度 1人点赞 痴者工良 阅读全文

ASP.NET Core 使用 Redis 实现分布式缓存:Docker、IDistributedCache、StackExchangeRedis 前提:一台 Linux 服务器、已安装 Docker。 一,Docker 中运行 Redis 拉取 Redis 镜像 docker pull redis 查询镜像列表 docker imgaes 运行 Redis的几种方法 ①运行并且设置 Redis 端口 docker run -p 6379:6379 -d redis:latest redis-server ② do…

2019年12月15日 0条评论 4634点热度 1人点赞 痴者工良 阅读全文

[TOC] SELECT The SELECT statement is used to select data from a table and is one of the basic operations of SQL. The result of a SELECT query is stored in a result table (referred to as a result set). SQL SELECT Syntax To query data from a specific column: SEL…

2019年12月15日 3条评论 4057点热度 0人点赞 痴者工良 阅读全文

[TOC] SELECT SELECT 语句用于从表中选取数据,是 SQL 最基本的操作之一。 通过 SELECT 查询的结果被存储在一个结果表中(称为结果集)。 SQL SELECT 语法 只查询某个列的数据: SELECT [列名称] FROM [表名称] 查询所有列的数据 SELECT * FROM [表名称] SQL 查询所有数据 SELECT * FROM categories 查询一列或多列 SELECT category_id,category_name FROM categories 查询表达式 v…

2019年12月15日 3条评论 3647点热度 0人点赞 痴者工良 阅读全文

Little Fan's Experience of Tencent Cloud Developer Training [TOC] I. Overview The "Tencent Cloud Developer Training" was prominently launched this month (August 2019) and has already rolled out the Tencent Cloud Developer Certification. Little Fan wa…

2019年12月15日 1条评论 1768点热度 0人点赞 痴者工良 阅读全文

小范的腾讯云云开发者培训体验心得 [TOC] 一,概览 《腾讯云开发工程师培训》**于本月(2019年8月)重磅发布,并已上线腾讯云开发工程师认证。 小范受邀参加了 8~11日为期 4 天的线下培训。 当今是云计算时代,云计算凝聚了各种优秀的开源项目和云计算厂商久经考验的大规模实践技术。 作为一个有思想、爱学习的优秀大学生,肯定得去参加呀~于是屁颠屁颠地去了。 培训概述 腾讯云开发工程师培训将通过理论精讲与上机实验相结合的方式,系统性地介绍传统应用迁移上云的优势及其实现,以及基于腾讯云产品进行云原生应用和分布式微服…

2019年12月15日 1条评论 3971点热度 0人点赞 痴者工良 阅读全文
1404142434454