【C#】Microsoft C# 视频学习总结
一、文档链接
C# 文档 - 入门、教程、参考。| Microsoft Learn
二、基础学习
1、输出语法
Console.WriteLine()
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){Console.WriteLine("Hello World!");}}
}
Hello World!
2、输出语句中可使用美元符号和花括号写法进行拼接
Console.WriteLine($"{}")
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){String friend = "Kcoff";Console.WriteLine("Hello " + friend);Console.WriteLine($"Hello {friend}");String secondFriend = "Kendra";Console.WriteLine($"My friend are {friend} and {secondFriend}");}}
}
Hello Kcoff
Hello Kcoff
My friend are Kcoff and Kendra
3、字符串长度查询
strName.Length
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){String friend = "Kcoff";Console.WriteLine($"The name {friend} has {friend.Length} letters.");}}
}
The name Kcoff has 5 letters.
4、去除字符串空白符
strName.TrimStart()、strName.TrimEnd()、strName.Trim()
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){String greeting = " Hello World! ";// 中括号的作用:可视化空白Console.WriteLine($"[{greeting}]");Console.WriteLine($"***{greeting}***");String trimmedGreeting = greeting.TrimStart();Console.WriteLine($"[{trimmedGreeting}]");trimmedGreeting = greeting.TrimEnd();Console.WriteLine($"[{trimmedGreeting}]");trimmedGreeting = greeting.Trim();Console.WriteLine($"[{trimmedGreeting}]");}}
}
[ Hello World! ]
*** Hello World! ***
[Hello World! ]
[ Hello World!]
[Hello World!]
5、字符串替换
strName.Replace(source, target)
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){String sayHello = "Hello World!";Console.WriteLine(sayHello);sayHello = sayHello.Replace("Hello", "Greetings");Console.WriteLine(sayHello);}}
}
Hello World!
Greetings World!
6、字符串大小写转换
strName.ToUpper()、strName.ToLower()
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){String sayHello = "Hello World!";Console.WriteLine(sayHello.ToUpper());Console.WriteLine(sayHello.ToLower());}}
}
HELLO WORLD!
hello world!
7、字符串是否包含什么、是否以什么为开头、是否以什么为结尾
strName.Contains(target)、strName.StartsWith(target)、strName.EndsWith(target)
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){String songLyrics = "You say goodbye, and I say hello";var result = songLyrics.Contains("goodbye");Console.WriteLine(result);Console.WriteLine(songLyrics.Contains("greetings"));var result2 = songLyrics.StartsWith("You");Console.WriteLine(result2);Console.WriteLine(songLyrics.StartsWith("goodbye"));var result3 = songLyrics.EndsWith("hello");Console.WriteLine(result3);Console.WriteLine(songLyrics.EndsWith("goodbye"));}}
}
True
False
True
False
True
False
8、计算
1、加减乘除
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){int a = 18;int b = 6;int c = a + b;Console.WriteLine(c);int d = a - b;Console.WriteLine(d);int e = a * b;Console.WriteLine(e);int f = a / b;Console.WriteLine(f);}}
}
24
12
108
3
2、计算顺序
优先计算括号里面的计算,之后先算乘除后算加减
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){int a = 5;int b = 4;int c = 2;int d = a + b * c;Console.WriteLine(d);int e = (a + b) * c;Console.WriteLine(e);int f = (a + b) - 6 * c + (12 * 4) / 3 + 12;Console.WriteLine(f);}}
}
13
18
25
3、除法只保留整数部分
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){int a = 7;int b = 4;int c = 3;int d = (a + b) / c;Console.WriteLine(d);}}
}
3
4、取余数
被除数 % 除数
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){int a = 7;int b = 4;int c = 3;int d = (a + b) / c;int e = (a + b) % c;// 商Console.WriteLine($"quotient: {d}");// 余数Console.WriteLine($"remainder: {e}");}}
}
quotient: 3
remainder: 2
9、类型(最大值、最小值及部分计算)
1、int
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){int max = int.MaxValue;int min = int.MinValue;Console.WriteLine($"The range of integers type is {min} to {max}");int what = max + 3;Console.WriteLine($"An example of overflow: {what}");}}
}
The range of integers type is -2147483648 to 2147483647
An example of overflow: -2147483646
2、double
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){double max = double.MaxValue;double min = double.MinValue;Console.WriteLine($"The range of double type is {min} to {max}");}}
}
The range of double type is -1.79769313486232E+308 to 1.79769313486232E+308
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){double a = 5;double b = 4;double c = 2;double d = (a + b) / c;Console.WriteLine(d);a = 19;b = 23;c = 8;double e = (a + b) / c;Console.WriteLine(e);double third = 1.0 / 3.0;Console.WriteLine(third);}}
}
4.5
5.25
0.333333333333333
3、decimal
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){decimal max = decimal.MaxValue;decimal min = decimal.MinValue;Console.WriteLine($"The range of decimal type is {min} to {max}");}}
}
The range of decimal type is -79228162514264337593543950335 to 79228162514264337593543950335
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){double a = 1.0;double b = 3.0;Console.WriteLine(a / b);decimal c = 1.0M;decimal d = 3.0M;Console.WriteLine(c / d);}}
}
0.333333333333333
0.3333333333333333333333333333
4、long
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){long max = long.MaxValue;long min = long.MinValue;Console.WriteLine($"The range of long type is {min} to {max}");}}
}
The range of long type is -9223372036854775808 to 9223372036854775807
5、short
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){short max = short.MaxValue;short min = short.MinValue;Console.WriteLine($"The range of short type is {min} to {max}");}}
}
The range of short type is -32768 to 32767
10、圆的面积
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){double radius = 2.50;double area = Math.PI * radius * radius;Console.WriteLine(area);}}
}
19.634954084936208
11、if-else 语句
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){int a = 5;int b = 6;bool something = a + b > 10;if (something)Console.WriteLine("The answer is greater then 10");}}
}
The answer is greater then 10
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){int a = 5;int b = 3;bool something = a + b > 10;if (something){Console.WriteLine("The answer is greater then 10");}else{Console.WriteLine("The answer is not greater then 10");}}}
}
The answer is not greater then 10
12、&& 和 ||
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){int a = 5;int b = 3;int c = 4;if ((a + b + c > 10) && (a == b)){Console.WriteLine("The answer is greater then 10");Console.WriteLine("And the first number is equal to the second");}else{Console.WriteLine("The answer is not greater then 10");Console.WriteLine("Or the first number is not equal to the second");}}}
}
The answer is not greater then 10
Or the first number is not equal to the second
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){int a = 5;int b = 3;int c = 4;if ((a + b + c > 10) || (a == b)){Console.WriteLine("The answer is greater then 10");Console.WriteLine("And the first number is equal to the second");}else{Console.WriteLine("The answer is not greater then 10");Console.WriteLine("Or the first number is not equal to the second");}}}
}
The answer is greater then 10
And the first number is equal to the second
13、while 语句
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){int counter = 0;while (counter < 10){Console.WriteLine($"Hello World! The counter is {counter}");counter++;}}}
}
Hello World! The counter is 0
Hello World! The counter is 1
Hello World! The counter is 2
Hello World! The counter is 3
Hello World! The counter is 4
Hello World! The counter is 5
Hello World! The counter is 6
Hello World! The counter is 7
Hello World! The counter is 8
Hello World! The counter is 9
14、do-while 语句
和 while 语句的区别是至少会执行一次操作
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){int counter = 10;// 至少执行一次操作do{Console.WriteLine($"Hello World! The counter is {counter}");counter++;} while (counter < 10);}}
}
Hello World! The counter is 10
15、for 语句
1、写法
执行顺序:int index = 0 -> index < 10 -> Console.WriteLine() -> index++
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){for (int index = 0; index < 10; index++){Console.WriteLine($"Hello World! The index is {index}");}}}
}
Hello World! The index is 0
Hello World! The index is 1
Hello World! The index is 2
Hello World! The index is 3
Hello World! The index is 4
Hello World! The index is 5
Hello World! The index is 6
Hello World! The index is 7
Hello World! The index is 8
Hello World! The index is 9
2、求 1~20 中能被 3 整除的数的总和
using System;
namespace HelloWorldApplication
{class HelloWorld{static void Main(string[] args){int sum = 0;for (int i = 1; i <= 20; i++) {if (i % 3 == 0){sum = sum + i;}}Console.WriteLine($"The sum is {sum}");}}
}
The sum is 63
16、Arrays、List、Collections
1、输出
foreach、for
using System;
using System.Collections.Generic;namespace ConsoleApp
{class Program{static void Main(string[] args){var names = new List<string> { "Scott", "Kendra" };foreach (var name in names){Console.WriteLine($"Hello {name.ToUpper()}!");}for (int i = 0; i < names.Count; i++){Console.WriteLine($"Hello {names[i].ToUpper()}!");}}}
}
Hello SCOTT!
Hello KENDRA!
Hello SCOTT!
Hello KENDRA!
2、新增或删除
list.Add(source)、list.Remove(source)
using System;
using System.Collections.Generic;namespace ConsoleApp
{class Program{static void Main(string[] args){var names = new List<string> { "Scott", "Kendra" };names.Add("Maria");names.Add("Bill");names.Remove("Scott");foreach (var name in names){Console.WriteLine(name);}Console.WriteLine(names[1]);}}
}
Kendra
Maria
Bill
Maria
3、索引
list.IndexOf(target)
using System;
using System.Collections.Generic;namespace ConsoleApp
{class Program{static void Main(string[] args){var names = new List<string> { "WEIRD", "Scott", "Kendra" };names.Add("Maria");names.Add("Bill");names.Remove("Scott");foreach (var name in names){Console.WriteLine(name);}var index = names.IndexOf("Kendra");if (index != -1){Console.WriteLine($"When an item is not found, IndexOf returns {index}");}else{Console.WriteLine($"The name {names[index]} is at index {index}");}}}
}
WEIRD
Kendra
Maria
Bill
When an item is not found, IndexOf returns 1
4、排序
list.Sort()
using System;
using System.Collections.Generic;namespace ConsoleApp
{class Program{static void Main(string[] args){var names = new List<string> { "New Friend", "Scott", "Kendra" };names.Add("Maria");names.Add("Bill");foreach (var name in names){Console.WriteLine(name);}Console.WriteLine();names.Sort();foreach (var name in names){Console.WriteLine(name);}}}
}
New Friend
Scott
Kendra
Maria
BillBill
Kendra
Maria
New Friend
Scott
5、斐波那契数列
using System;
using System.Collections.Generic;namespace ConsoleApp
{class Program{static void Main(string[] args){var fibonacciNumbers = new List<int> { 1, 1 };while (fibonacciNumbers.Count < 20){var previous = fibonacciNumbers[fibonacciNumbers.Count - 1];var previous2 = fibonacciNumbers[fibonacciNumbers.Count - 2];fibonacciNumbers.Add(previous + previous2);}foreach (var item in fibonacciNumbers){Console.WriteLine(item);}}}
}
1
1
2
3
5
8
13
21
34
55
89
144
233
377
610
987
1597
2584
4181
6765
17、面向对象
1、模拟银行创建用户并存钱
using System;namespace ConsoleApp
{public class BankAccount{public string Number { get; }public string Owner { get; set; }public decimal Balance { get; }public BankAccount(string name, decimal initialBalance){this.Owner = name;this.Balance = initialBalance;}public void MakeDeposit(decimal amount, DateTime date, string note){}public void MakeWithdrawal(decimal amount, DateTime date, string note){}}
}
using System;namespace ConsoleApp
{class Program{static void Main(string[] args){var account = new BankAccount("Kendra", 10000);Console.WriteLine($"Account {account.Number} was created for {account.Owner} with {account.Balance}");}}
}
Account was created for Kendra with 10000
2、模拟银行存款取款
using System;namespace ConsoleApp
{public class Transaction{public decimal Amount { get; }public DateTime Date { get; }public string Notes { get; }public Transaction(decimal amount, DateTime date, string note){this.Amount = amount;this.Date = date;this.Notes = note;}}
}
using System;
using System.Collections.Generic;namespace ConsoleApp
{public class BankAccount{public string Number { get; }public string Owner { get; set; }public decimal Balance{ get{decimal balance = 0;foreach (var item in allTransactions){balance += item.Amount;}return balance;}}private static int accountNumberSeed = 1234567890;private List<Transaction> allTransactions = new List<Transaction>();public BankAccount(string name, decimal initialBalance){this.Owner = name;MakeDeposit(initialBalance, DateTime.Now, "Initial Balance");this.Number = accountNumberSeed.ToString();accountNumberSeed++;}// 存款public void MakeDeposit(decimal amount, DateTime date, string note){if (amount <= 0){throw new ArgumentOutOfRangeException(nameof(amount), "Amount of deposit must be positive");}var deposit = new Transaction(amount, date, note);allTransactions.Add(deposit);}// 取款public void MakeWithdrawal(decimal amount, DateTime date, string note){if (amount <= 0){throw new ArgumentOutOfRangeException(nameof(amount), "Amount of deposit must be positive");}if (Balance - amount < 0){throw new InvalidOperationException("Not sufficient funds for this withdrawal");}var withdrawal = new Transaction(-amount, date, note);allTransactions.Add(withdrawal);}}
}
using System;namespace ConsoleApp
{class Program{static void Main(string[] args){var account = new BankAccount("Kendra", 10000);Console.WriteLine($"Account {account.Number} was created for {account.Owner} with {account.Balance}");account.MakeWithdrawal(120, DateTime.Now, "Hammock");Console.WriteLine(account.Balance);}}
}
Account 1234567890 was created for Kendra with 10000
9880
3、存取款异常处理
using System;namespace ConsoleApp
{class Program{static void Main(string[] args){var account = new BankAccount("Kendra", 10000);Console.WriteLine($"Account {account.Number} was created for {account.Owner} with {account.Balance}");account.MakeWithdrawal(120, DateTime.Now, "Hammock");Console.WriteLine(account.Balance);account.MakeWithdrawal(50, DateTime.Now, "Xbox Game");Console.WriteLine(account.Balance);// hey this is a comment// Test for a negative balancetry{account.MakeWithdrawal(75000, DateTime.Now, "Attempt to overdraw");}catch (InvalidOperationException e){Console.WriteLine("Exception caught trying to overdraw");Console.WriteLine(e.ToString());}// Test that the initial balances must be posttivetry{var invalidAccount = new BankAccount("invalid", -55);}catch (ArgumentOutOfRangeException e){Console.WriteLine("Exception caught creating account with negative balance");Console.WriteLine(e.ToString());}}}
}
Account 1234567890 was created for Kendra with 10000
9880
9830
Exception caught trying to overdraw
System.InvalidOperationException: Not sufficient funds for this withdrawalat ConsoleApp.BankAccount.MakeWithdrawal(Decimal amount, DateTime date, String note) in F:\CSharpRepository\ConsoleApp\ConsoleApp\BankAccount.cs:line 58at ConsoleApp.Program.Main(String[] args) in F:\CSharpRepository\ConsoleApp\ConsoleApp\Program.cs:line 24
Exception caught creating account with negative balance
System.ArgumentOutOfRangeException: Amount of deposit must be positive (Parameter 'amount')at ConsoleApp.BankAccount.MakeDeposit(Decimal amount, DateTime date, String note) in F:\CSharpRepository\ConsoleApp\ConsoleApp\BankAccount.cs:line 44at ConsoleApp.BankAccount..ctor(String name, Decimal initialBalance) in F:\CSharpRepository\ConsoleApp\ConsoleApp\BankAccount.cs:line 32at ConsoleApp.Program.Main(String[] args) in F:\CSharpRepository\ConsoleApp\ConsoleApp\Program.cs:line 35
4、账户交易历史记录
using System;
using System.Collections.Generic;
using System.Text;namespace ConsoleApp
{public class BankAccount{public string Number { get; }public string Owner { get; set; }public decimal Balance{ get{decimal balance = 0;foreach (var item in allTransactions){balance += item.Amount;}return balance;}}private static int accountNumberSeed = 1234567890;private List<Transaction> allTransactions = new List<Transaction>();public BankAccount(string name, decimal initialBalance){this.Owner = name;MakeDeposit(initialBalance, DateTime.Now, "Initial Balance");this.Number = accountNumberSeed.ToString();accountNumberSeed++;}public void MakeDeposit(decimal amount, DateTime date, string note){if (amount <= 0){throw new ArgumentOutOfRangeException(nameof(amount), "Amount of deposit must be positive");}var deposit = new Transaction(amount, date, note);allTransactions.Add(deposit);}public void MakeWithdrawal(decimal amount, DateTime date, string note){if (amount <= 0){throw new ArgumentOutOfRangeException(nameof(amount), "Amount of deposit must be positive");}if (Balance - amount < 0){throw new InvalidOperationException("Not sufficient funds for this withdrawal");}var withdrawal = new Transaction(-amount, date, note);allTransactions.Add(withdrawal);}public string GetAccountHistory(){var report = new StringBuilder();// HEADERreport.AppendLine("Date\t\tAmount\tNote");foreach (var item in allTransactions){// ROWSreport.AppendLine($"{item.Date.ToShortDateString()}\t{item.Amount}\t{item.Notes}");}return report.ToString();}}
}
using System;namespace ConsoleApp
{class Program{static void Main(string[] args){var account = new BankAccount("Kendra", 10000);Console.WriteLine($"Account {account.Number} was created for {account.Owner} with {account.Balance}");account.MakeWithdrawal(120, DateTime.Now, "Hammock");account.MakeWithdrawal(50, DateTime.Now, "Xbox Game");Console.WriteLine(account.GetAccountHistory());}}
}
Account 1234567890 was created for Kendra with 10000
Date Amount Note
2023/12/12 10000 Initial Balance
2023/12/12 -120 Hammock
2023/12/12 -50 Xbox Game
三、使用软件及快捷键
1、软件
Microsoft Visual Studio Enterprise 2022 (64 位)
2、快捷键
| 效果 | 快捷键 |
|---|---|
| 运行代码(非调试) | ctrl + f5 |
| 运行代码(调试代码) | f5 |
| 多行注释 | ctrl + k,ctrl + c |
| 取消多行注释 | ctrl + k,ctrl + u |
| 格式化代码(对齐代码) | ctrl + k,ctrl + d |
| 自动补齐代码 | Tab |
| 任意位置换行以及自动加花括号 | shift + enter |
| 复制选中行或光标所在行 | ctrl + d |
| 删除选中行或光标所在行 | ctrl + l(小写L) |
| 输入指定行进行跳转 | ctrl + g |
| 将选中行或光标所在行进行移动 | alt + 方向键上或下 |
| 自动选中光标右侧内容 | ctrl + w |
注:直接按住 ctrl 即可
相关文章:
【C#】Microsoft C# 视频学习总结
一、文档链接 C# 文档 - 入门、教程、参考。| Microsoft Learn 二、基础学习 1、输出语法 Console.WriteLine() using System; namespace HelloWorldApplication {class HelloWorld{static void Main(string[] args){Console.WriteLine("Hello World!");}} }Hel…...
【已解决-实操篇】SaTokenException: 非Web上下文无法获取Request问题解决-实操篇
在上一篇《【理论篇】SaTokenException: 非Web上下文无法获取Request问题解决 -理论篇》中,凯哥(公众号:凯哥Java)介绍了了产生这个问题的源码在哪里,以及怎么解决的方案。没有给出实际操作步骤。 本文,凯哥就通过threadLocal方案…...
论文润色机构哪个好 快码论文
大家好,今天来聊聊论文润色机构哪个好,希望能给大家提供一点参考。 以下是针对论文重复率高的情况,提供一些修改建议和技巧,可以借助此类工具: 标题:论文润色机构哪个好――专业、高效、可靠的学术支持 一…...
Idea执行bat使用maven打包springboot项目成docker镜像并push到Harbor
如果执行以下命令失败,先把mvn的-q参数去掉,让错误输出到控制台。 《idea配置优化、Maven配置镜像、并行构建加速打包、解决maven打包时偶尔几个文件没权限的问题》下面的使用company-repo私有仓库和阿里云镜像仓库同时使用的配置参考。 bat echo off …...
NCNN 源码学习【三】:数据处理
一、Topic:数据处理 这次我们来一段NCNN应用代码中,除了推理外最重要的一部分代码,数据处理: ncnn::Mat in ncnn::Mat::from_pixels_resize(bgr.data, ncnn::Mat::PIXEL_BGR, bgr.cols, bgr.rows, 227, 227);const float mean_v…...
RabbitMq基本使用
目录 SpringAMQP1.准备Demo工程2.快速入门1.1.消息发送1.2.消息接收1.3.测试 3.WorkQueues模型3.1.消息发送3.2.消息接收3.3.测试3.4.能者多劳3.5.总结 SpringAMQP 将来我们开发业务功能的时候,肯定不会在控制台收发消息,而是应该基于编程的方式。由于R…...
windows wsl2 ubuntu上部署 redroid云手机
Redroid WSL2部署文档 下载wsl内核源码 #文档注明 5.15和5.10 版本内核可以部署成功,这里我当前最新的发布版本 #下载wsl 源码 wget --progressbar:force --output-documentlinux-msft-wsl-5.15.133.1.tar.gz https://codeload.github.com/microsoft/WSL2-Linux-Ker…...
创维电视机 | 用当贝播放器解决创维电视机不能播放MKV视频的问题
小故事在下面,感兴趣可以看看,开头我就直接放解决方案 创维电视虽然是基于Android开发的,可以安装apk软件,但是基本不能用,一定要选择适配电视的视频播放器,或者使用本文中提供的创维版当贝播放器。 原软…...
【STM32】DMA直接存储器存取
1 DMA简介 DMA(Direct Memory Access)直接存储器存取 可以直接访问STM32的存储器的,包括运行SRAM、程序存储器Flash和寄存器等等 DMA可以提供外设寄存器和存储器或者存储器和存储器之间的高速数据传输,无须CPU干预,节…...
Vue3-09-条件渲染-v-show 的基本使用
v-show 的作用 v-show 可以根据条件表达式的值【展示】或【隐藏】html 元素。v-show 的特点 v-show 的实现方式是 控制 dom 元素的 css的 display的属性, 因此,无论该元素是否展示,该元素都会正常渲染在页面上, 当v-show 的 条件…...
ArrayList与LinkLIst
ArrayList 在Java中,ArrayList是java.util包中的一个类,它实现了List接口,是一个动态数组,可以根据需要自动增长或缩小。下面是ArrayList的一些基本特性以及其底层原理的简要讲解: ArrayList基本特性: 动…...
位运算(、|、^、~、>>、<<)
分类 编程技术 1.位运算概述 从现代计算机中所有的数据二进制的形式存储在设备中。即 0、1 两种状态,计算机对二进制数据进行的运算(、-、*、/)都是叫位运算,即将符号位共同参与运算的运算。 口说无凭,举一个简单的例子来看下 CPU 是如何进…...
Centos7部署SVN
文章目录 (1)SVN概述(2)SVN与Samba共享(3)安装SVN(4)SVN搭建实例(5)pc连接svn服务器(6)svn图标所代表含义 (1)…...
Vue中this.$nextTick的执行时机
一、Vue中this.$nextTick的执行时机,整体可分为两种情况: 第一种:下一次 Dom 更新之后执行(即等待DOM更新结束之后,执行nextTick的延迟回调函数); 第二种:页面挂载后 (m…...
Unity中的ShaderToy
文章目录 前言一、ShaderToy网站二、ShaderToy基本框架1、我们可以在ShaderToy网站中,这样看用到的GLSL文档2、void mainImage 是我们的程序入口,类似于片断着色器3、fragColor作为输出变量,为屏幕每一像素的颜色,alpha一般赋值为…...
2 使用postman进行接口测试
上一篇:1 接口测试介绍-CSDN博客 拿到开发提供的接口文档后,结合需求文档开始做接口测试用例设计,下面用最常见也最简单的注册功能介绍整个流程。 说明:以演示接口测试流程为主,不对演示功能做详细的测试,…...
【数据库设计和SQL基础语法】--查询数据--聚合函数
一、聚合函数概述 1.1 定义 聚合函数是一类在数据库中用于对多个行进行计算并返回单个结果的函数。它们能够对数据进行汇总、统计和计算,常用于提取有关数据集的摘要信息。聚合函数在 SQL 查询中广泛应用,包括统计总数、平均值、最大值、最小值等。 1…...
Module ‘app‘: platform ‘android-33‘ not found.
目录 一、报错信息 二、解决方法 一、报错信息 Module app: platform android-33 not found. 检查你的应用程序的build.gradle文件中的targetSdkVersion和compileSdkVersion是否正确设置为已安装的Android SDK版本。 确保你的Android Studio已正确安装并配置了所需的Android …...
MySQL按序批量操作大量数据
MySQL按序批量操作大量数据(Java、springboot、mybatisplus、ElasticSearch) 以同步全量MySQL数据到ElasticSearch为例。 核心代码 业务逻辑: public boolean syncToElasticsearch() {log.info("Starting data synchronization to El…...
strict-origin-when-cross-origin
严格限制同源策略 (1)允许服务器的同源IP地址访问 (2)允许Referer --- 后端服务器要配置...
7.4.分块查找
一.分块查找的算法思想: 1.实例: 以上述图片的顺序表为例, 该顺序表的数据元素从整体来看是乱序的,但如果把这些数据元素分成一块一块的小区间, 第一个区间[0,1]索引上的数据元素都是小于等于10的, 第二…...
51c自动驾驶~合集58
我自己的原文哦~ https://blog.51cto.com/whaosoft/13967107 #CCA-Attention 全局池化局部保留,CCA-Attention为LLM长文本建模带来突破性进展 琶洲实验室、华南理工大学联合推出关键上下文感知注意力机制(CCA-Attention),…...
【Java学习笔记】Arrays类
Arrays 类 1. 导入包:import java.util.Arrays 2. 常用方法一览表 方法描述Arrays.toString()返回数组的字符串形式Arrays.sort()排序(自然排序和定制排序)Arrays.binarySearch()通过二分搜索法进行查找(前提:数组是…...
如何在看板中体现优先级变化
在看板中有效体现优先级变化的关键措施包括:采用颜色或标签标识优先级、设置任务排序规则、使用独立的优先级列或泳道、结合自动化规则同步优先级变化、建立定期的优先级审查流程。其中,设置任务排序规则尤其重要,因为它让看板视觉上直观地体…...
2024年赣州旅游投资集团社会招聘笔试真
2024年赣州旅游投资集团社会招聘笔试真 题 ( 满 分 1 0 0 分 时 间 1 2 0 分 钟 ) 一、单选题(每题只有一个正确答案,答错、不答或多答均不得分) 1.纪要的特点不包括()。 A.概括重点 B.指导传达 C. 客观纪实 D.有言必录 【答案】: D 2.1864年,()预言了电磁波的存在,并指出…...
鸿蒙中用HarmonyOS SDK应用服务 HarmonyOS5开发一个医院挂号小程序
一、开发准备 环境搭建: 安装DevEco Studio 3.0或更高版本配置HarmonyOS SDK申请开发者账号 项目创建: File > New > Create Project > Application (选择"Empty Ability") 二、核心功能实现 1. 医院科室展示 /…...
MMaDA: Multimodal Large Diffusion Language Models
CODE : https://github.com/Gen-Verse/MMaDA Abstract 我们介绍了一种新型的多模态扩散基础模型MMaDA,它被设计用于在文本推理、多模态理解和文本到图像生成等不同领域实现卓越的性能。该方法的特点是三个关键创新:(i) MMaDA采用统一的扩散架构…...
Frozen-Flask :将 Flask 应用“冻结”为静态文件
Frozen-Flask 是一个用于将 Flask 应用“冻结”为静态文件的 Python 扩展。它的核心用途是:将一个 Flask Web 应用生成成纯静态 HTML 文件,从而可以部署到静态网站托管服务上,如 GitHub Pages、Netlify 或任何支持静态文件的网站服务器。 &am…...
【SQL学习笔记1】增删改查+多表连接全解析(内附SQL免费在线练习工具)
可以使用Sqliteviz这个网站免费编写sql语句,它能够让用户直接在浏览器内练习SQL的语法,不需要安装任何软件。 链接如下: sqliteviz 注意: 在转写SQL语法时,关键字之间有一个特定的顺序,这个顺序会影响到…...
Maven 概述、安装、配置、仓库、私服详解
目录 1、Maven 概述 1.1 Maven 的定义 1.2 Maven 解决的问题 1.3 Maven 的核心特性与优势 2、Maven 安装 2.1 下载 Maven 2.2 安装配置 Maven 2.3 测试安装 2.4 修改 Maven 本地仓库的默认路径 3、Maven 配置 3.1 配置本地仓库 3.2 配置 JDK 3.3 IDEA 配置本地 Ma…...
