HammerDB is a database stress testing tool, download link: https://www.hammerdb.com/download.html HammerDB is a leading benchmark and load testing software for some of the most popular databases in the world, supporting Oracle Database, SQL Server, IBM Db2, My…

2022年1月17日 1条评论 6682点热度 1人点赞 痴者工良 阅读全文

Hammerdb 是一个数据库压力测试工具,下载地址: https://www.hammerdb.com/download.html HammerDB 是领先的基准测试和负载测试软件,适用于世界上最流行的数据库,支持 Oracle 数据库、SQL Server、IBM Db2、MySQL、MariaDB 和 PostgreSQL。 TPROC-C 基准测试; TPROC-H 全套测试; 首先创建需要的数据库测试,然后 点击 Schema Build - Options ,配置数据库连接。这里笔者创建的是 TPROC…

2022年1月17日 1条评论 8532点热度 1人点赞 痴者工良 阅读全文

Installed Mysql/MariaDB, but I cannot log in as root; I can only use the mysql account to get in. [root@192-168-0-241 ~]# mysql -u mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 9 Server version: 10.3.32-MariaDB-…

2022年1月13日 1条评论 6058点热度 2人点赞 痴者工良 阅读全文

安装了 Mysql/MariaDB ,但是 root 死活进不去,只能用 mysql 这个账号进去。 [root@192-168-0-241 ~]# mysql -u mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 9 Server version: 10.3.32-MariaDB-log MariaDB Server Copyright (c) 2000, 2018, Or…

2022年1月13日 1条评论 7052点热度 2人点赞 痴者工良 阅读全文

scanme.nmap.org is the domain or IP address to be scanned. package main import ( "fmt" "net" "sort" ) func main() { ports := make(chan int, 100) results := make(chan int) var openports []int // Start 100 worker threads for i := 0;…

2021年11月17日 0条评论 1068点热度 0人点赞 痴者工良 阅读全文

scanme.nmap.org 是要扫描的域名或 IP 地址。 package main import ( "fmt" "net" "sort" ) func main() { ports := make(chan int, 100) results := make(chan int) var openports []int // 开启 100 个工作者线程 for i := 0; i < cap(ports); i++ { go worker(ports, results) } // 向[......]继续…

2021年11月17日 0条评论 3399点热度 0人点赞 痴者工良 阅读全文

reflect.Type.Elem() can return the type of the element, for example, for pointer types, it returns the type without the pointer. reflect.Value.Elem() is used to obtain a reference to the value that the pointer points to. type name struct { } func (n name) Prin…

2021年11月16日 0条评论 1166点热度 0人点赞 痴者工良 阅读全文

reflect.Type.Elem() 可以返回元素的类型,例如指针类型,返回不带指针的类型。 reflect.Value.Elem() 是获取指向值的引用。 type name struct { } func (n name) Print(str string) { } func main() { var n interface{} = &name{} t := reflect.TypeOf(n) var na interface{} // 实例化 if t.Kind() == reflect.Ptr {…

2021年11月16日 0条评论 3711点热度 0人点赞 痴者工良 阅读全文

/// <summary> /// Convert between value types and strings /// </summary> public class JsonStringToNumberConverter : JsonConverterFactory { /// <summary> /// Gets the default instance /// </summary> public static JsonStringTo[......]继续阅读

2021年11月3日 1条评论 1248点热度 0人点赞 痴者工良 阅读全文

||其代码如下: /// <summary> /// 值类型和字符串互转 /// </summary> public class JsonStringToNumberConverter : JsonConverterFactory { /// <summary> /// 获取默认实例 /// </summary> public static JsonStringToNumberConverter Default { get; } = new J[......]继续阅读

2021年11月3日 1条评论 4579点热度 0人点赞 痴者工良 阅读全文

In the context of Linux, here's how to invoke a command-line program in Go, with the example code as follows: package main import ( "log" "os" "os/exec" ) func main() { cmd := exec.Command("top") cmd.Stdin = os.Stdin cmd…

2021年10月5日 0条评论 4091点热度 2人点赞 痴者工良 阅读全文

以 Linux 为例,在 Go 中调用一个命令行程序,其代码示例如下: package main import ( "log" "os" "os/exec" ) func main() { cmd := exec.Command("top") cmd.Stdin = os.Stdin cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr if err := cmd.Run(); err != nil { log.Fatal(err) } } 首先使用 cmd[......] 继…

2021年10月5日 0条评论 4185点热度 2人点赞 痴者工良 阅读全文

Manjaro prompts when updating or installing software: 正在下载所需的密钥...... :: 是否导入 PGP 公钥 A85E811EB4CA2E08 ,"Caleb Maclennan <alerque@archlinux.org>"? [Y/n] y :: 是否导入 PGP 公钥 E0959FEA8B550539 ,"George Rawlinson <grawlinson@archlinux.org>&q…

2021年10月5日 0条评论 14581点热度 7人点赞 痴者工良 阅读全文

Manjaro 更新软件、安装软件时,提示: 正在下载所需的密钥...... :: 是否导入 PGP 公钥 A85E811EB4CA2E08 ,"Caleb Maclennan <alerque@archlinux.org>"? [Y/n] y :: 是否导入 PGP 公钥 E0959FEA8B550539 ,"George Rawlinson <grawlinson@archlinux.org>"? [Y/n] y y( 71/771) 正在检查软件包完整性[......]继续阅读

2021年10月5日 0条评论 10005点热度 7人点赞 痴者工良 阅读全文

The poisoned code is as follows: void Main() { Value a = 0; if (a == 1 && a == 2 && a == 3) { Console.WriteLine("毒代码"); return; } Console.WriteLine("代码无毒"); } public class Value { private int _value; public Value() { } publi…

2021年9月25日 0条评论 3892点热度 0人点赞 痴者工良 阅读全文

下毒代码如下: void Main() { Value a = 0; if (a == 1 && a == 2 && a == 3) { Console.WriteLine("给代码下点毒"); return; } Console.WriteLine("代码无毒"); } public class Value { private int _value; public Value() { } public Value(int value) {[......]继续阅读

2021年9月25日 0条评论 4390点热度 0人点赞 痴者工良 阅读全文

The code provided exports a DataTable to a .csv format. public static async Task SaveCSV(DataTable dt,string[] header, string fileName) { StringBuilder sb = new StringBuilder(); sb.Append($"{string.Join(",", header)}\r\n"); for[......]继续阅读

2021年8月23日 0条评论 3750点热度 0人点赞 痴者工良 阅读全文

代码所示,将 Table 导出为 .csv 格式的数据。 public static async Task SaveCSV(DataTable dt,string[] header, string fileName) { StringBuilder sb = new StringBuilder(); sb.Append($"{string.Join(",", header)}\r\n"); for (int i = 0; i < dt.Rows.Count; i++)[......]继续阅读

2021年8月23日 0条评论 3540点热度 0人点赞 痴者工良 阅读全文

Inheriting from IActionResult: public class ResponseResult<TData> : IActionResult { /// <summary> /// Status code /// </summary> public int Code { get; set; } /// <summary> /// Response message /// </summary&[......]继续阅读

2021年8月21日 0条评论 5694点热度 0人点赞 痴者工良 阅读全文

继承 IActionResult: public class ResponseResult<TData> : IActionResult { /// <summary> /// 状态码 /// </summary> public int Code { get; set; } /// <summary> /// 响应信息 /// </summary> public string Msg { g[......]继续阅读

2021年8月21日 0条评论 5676点热度 0人点赞 痴者工良 阅读全文
1202122232454