SELECT * FROM "MyTable" t WHERE ( 't'.'time' > '2019-03-13 00:00:00 ' ) AND ( 't'.'time' < '2019-03-13 23:59:59 ' ) Time must be written as a string in the format 2019-03-13 00:00:00 in order to be invalid. No functions and no conversions are n…
SELECT * FROM "MyTable" t WHERE ( 't'.'time' > '2019-03-13 00:00:00 ' ) AND ( 't'.'time' < '2019-03-13 23:59:59 ' ) Time must be written as a string in the format 2019-03-13 00:00:00 in order to be invalid. No functions and no conversions are n…
SELECT * FROM "MyTable" t WHERE ( 't'.'time' > '2019-03-13 00:00:00 ' ) AND ( 't'.'time' <'2019-03-13 23:59:59 ' ) 时间要以 2019-03-13 00:00:00 格式写成字符串才能失效。 不需要什么函数,也不需要什么转换。 [......] 继续阅读
Basic Types and Conversion Operations Data Types The basic types in C language are as follows. | Type | Storage Size | Value Range | | :----------------- | :----------- | :-------------------------------------------------- | | char[......] 继续阅读
基本类型和转换操作 数据类型 C语言中的基本类型如下。 类型 存储大小 值范围 char 1 字节 -128 到 127 或 0 到 255 unsigned char 1 字节 0 到 255 signed char 1 字节 -128 到 127 int 2 或 4 字节 -32,768 到 32,767 或 -2,147,483,648 到 2,147,483,647 unsigned int 2 或 4 字节 0 到 65,535 或 0 到 4,294,967,295 short 2 字节 -32,768…
Default Code Template In compiled high-level programming languages, almost every language has a static main method as the entry point for program execution, and each language has its own coding conventions. To learn C/C++, C#, and JAVA, we should start by expl…
代码默认模板 编译性高级编程语言中,几乎每种语言,都有个静态的 main 方法作为程序启动入口,每种语言都有其编写规范。为了学习 C/C++、C#、JAVA四种语言,我们要先从默认代码模板中,慢慢摸索学习。 约定: 我们常常可以看到 函数、方法这两个词,很多人对此进行了混用。 方法,就是 void Test(){} 这样的形式; 函数,指具有确定命名的、并且可以通过名称调用的代码,属性、字段、方法、委托、事件等; 只要能够通过确定的名称调用(使用)的代码块,就是函数;而方法就是 返回值、名称、参数等组成的代码块; …
Supports Windows and Linux var macAddr = ( from nic in NetworkInterface.GetAllNetworkInterfaces() where nic.OperationalStatus == OperationalStatus.Up select nic.GetPhysicalAddress().ToString() ).FirstOrDefaul[......]继续阅读
支持 Windows 和 Linux var macAddr = ( from nic in NetworkInterface.GetAllNetworkInterfaces() where nic.OperationalStatus == OperationalStatus.Up select nic.GetPhysicalAddress().ToString() ).FirstOrDefault();[......]继续阅读
There are two toolkits for writing GUI in Java, namely AWT and Swing. Swing is an extension of AWT, featuring richer components and methods compared to AWT. Both AWT and Swing can be used across platforms; however, AWT UI styles may vary with different system …
java 中编写 GUI 有两中工具包,分别为 AWT、Swing。 Swing 是 AWT 的拓展,Swing 具有比 AWT 丰富的组件和方法。 AWT 和 Swing 都能跨平台使用;AWT 会随着不同的系统平台,UI 样式会有所变化,Swing 则不会,设计完毕后在所有平台下样式一致。 import java.awt.*; import javax.swing.*; 一个 awt 示例 下面是一个窗口示例 import java.awt.*; public class MyFrame extends Fra…
1. Quick Implementation of Authorization Verification What is JWT? Why use JWT? What are the components of JWT? These can be easily found on Baidu, so I won't elaborate here. In fact, it's sufficient to know that the JWT authentication mode uses a Token as the…
[TOC] 1,快速实现授权验证 什么是 JWT ?为什么要用 JWT ?JWT 的组成? 这些百度可以直接找到,这里不再赘述。 实际上,只需要知道 JWT 认证模式是使用一段 Token 作为认证依据的手段。 我们看一下 Postman 设置 Token 的位置。 那么,如何使用 C# 的 HttpClient 访问一个 JWT 认证的 WebAPI 呢? 下面来创建一个 ASP.NET Core 项目,尝试添加 JWT 验证功能。 1.1 添加 JWT 服务配置 在 Startup.cs 的 Configure…
var authorizeData = endpoint?.Metadata.GetOrderedMetadata<IAuthorizeData>() ?? Array.Empty<IAuthorizeData>(); [......] 继续阅读
var authorizeData = endpoint?.Metadata.GetOrderedMetadata<IAuthorizeData>() ?? Array.Empty<IAuthorizeData>(); [......] 继续阅读
C# has common types with the following suffixes, and the author has summarized their general uses. Extensions Helper or Helpers Scheme Builder Context Factory Provider Options Defaults Extensions This type is used to implement extension methods, with the class…
C# 中有常见的以以下名称为后缀的类型,笔者总结了一下大概用途。 Extensions Helper 或 Helpers Scheme Builder Context Factory Provider Options Defaults Extensions 此类型用于实现拓展函数,类名后加上 Extensions。 如下面的示例实现了拓展函数,就是我们平时使用的 app.UseAuthentication();。 public static class AuthAppBuilderExtensions { publ…
Introduction Purpose of Writing Requirements Analysis Overview Design 1. Create a new feature to identify permission control; 2. Permission control is based on Controller and Action; 3. Based on the built-in permission authentication of ASP.NET Core; 4. Requir…
前导 编写目的 需求分析 概要设计 1,创建一个新特性,用来标识权限控制; 2,权限控制以 Controller、Action 作为单位; 3,基于 ASP.NET Core 自带的权限认证; 4,要求极速响应; 5,支持响应事件,对于验证流程,不同阶段触发事件; 6,设置接口,定义方法,如何判断用户是否有权限; 7,可以通过特性或使用默认的 ASP.NET Core 授权特性,只要登陆就有权访问的API 8,支持自定义401,403等授权验证码 详细设计 项目分析 项目介绍与功能分析 项目运行环境 项目应用场景 …
Introduction CZGL.SystemInfo is a resource information retrieval library that supports Windows and Linux, used to obtain system environment, machine resource information, and system resource usage. Search for CZGL.SystemInfo in NuGet to install it. I have adde…
简介 CZGL.SystemInfo 是一个支持 Windows 和 Linux 的资源信息获取库,用于获取系统环境、机器资源信息、系统资源使用情况。 Nuget 搜索 CZGL.SystemInfo 即可安装。 类库中每一个属性和方法,我都加上了注释,调用时可以看得到。 平台通用 CZGL.SystemInfo 命名空间下,有个 EnvironmentInfo 静态类,用于获取各种信息。 CZGL.SystemInfo.Info 命名空间中,有三个类型,用于获取和记录不同类型的信息。 MachineRunInfo…