随笔分类 -  CodeSyntax

Introduction to the concept of Reflective Programming
摘要:# What is Reflective Programming Reflective programming are also called reflection on computer. 高级语言里面除了有函数,还有类、接口等概念,而反射技术就是一种控制和管理类的技术。高级语言编译出来的程序在运 阅读全文
posted @ 2022-12-16 15:34 Mysticbinary 阅读(35) 评论(0) 推荐(0) 编辑
Operational certificates with Java
摘要:# .crt证书转成.pem格式 先解释一下.crt 和 .pem是什么,看下图 ![](https://img2023.cnblogs.com/blog/1552062/202211/1552062-20221128155414455-1239770108.png) 图是网上找到, 链接: htt 阅读全文
posted @ 2022-11-28 16:04 Mysticbinary 阅读(151) 评论(0) 推荐(0) 编辑
性能测试的思路——利用JMeter和Zabbix进行压力测试
摘要:目录ZabbixJMeter目标reference Zabbix Zabbix区分探针端、服务端、数据库、WEB前端等多个组件,如果你是在企业内使用,尽量使用运维同学搭建好的环境即可,不然自己搭建比较费时费脑(可能大部分时间都在排错了)。 如果用别人搭建好的环境,你只需要在服务器安装Zabbix探针 阅读全文
posted @ 2022-06-16 10:44 Mysticbinary 阅读(359) 评论(0) 推荐(0) 编辑
强弱类型编程语言 用==与===的区别与比较
摘要:一些弱类型的编程语言普遍都有 == 、 之类的比较运算符, 当你想要比较可能包含等于但可能具有不同类型的值的变量时,==它很有用。 例如: var x = 10; var y = '10'; console.log(x == y) // true console.log(x y) // false 阅读全文
posted @ 2021-02-25 16:18 Mysticbinary 阅读(175) 评论(2) 推荐(0) 编辑
学习正则匹配的一些经验
摘要:正则在爬虫领域、自动化办公脚本等使用很广泛,可以用来把网页中有价值的文本提取出来,可以写脚本操作特定的字符,这类技术就是用正则匹配。 我感觉正则匹配就是类型匹配,当你能认识清楚的认识字符串里面所有包含的类型和结构,那么你写出正则也就不难了。 如何认识清楚文本中会有什么类型,看如下链接: https: 阅读全文
posted @ 2020-07-31 17:55 Mysticbinary 阅读(273) 评论(0) 推荐(1) 编辑
golang 在crontab里面运行报错记录
摘要:更新 如下文章都是错误的,❌ golang程序 go run ./main.go 只适合调试阶段使用, 想要部署golang程序,请打包成二进制文件在使用。 问题背景 之前高高兴兴的写好了一个go脚本,发到服务器上,打算定期运行这个脚本,打开crontab -e, 然后输入: */1 * * * * 阅读全文
posted @ 2020-07-24 11:54 Mysticbinary 阅读(803) 评论(0) 推荐(1) 编辑
go 动态数组 二维动态数组
摘要:go使用动态数组还有点麻烦,比python麻烦一点,需要先定义。 动态数组申明 var dynaArr []string 动态数组添加成员 dynaArr = append(dynaArr, "one") ```go # 结构体数组 ```go package main import ( "fmt" 阅读全文
posted @ 2020-07-21 15:37 Mysticbinary 阅读(2051) 评论(0) 推荐(1) 编辑
go map嵌套 map的value可以是任意类型
摘要:在日常编程中,除了使用内置的数据类型,还会使用一些复杂的自定义数据类型,比如map K为string,V为数组。 先了解一下go对map的基本设定: map的key可以是任意内置的数据类型(如int),或者其它可以通过"=="进行等值比较的数据类型,如interface和指针都可以。 slice、数 阅读全文
posted @ 2020-07-21 10:48 Mysticbinary 阅读(5869) 评论(2) 推荐(1) 编辑
go mod管理 init 和 包导入的关系
摘要:你创建了一个文件的名字为:lisi001 如果你初始化项目名字为lisi, go mod init lisi 那么你导包的时候就得也用lisi import ( "lisi/path" "lisi/tools" ) 总结:一切以mod的为主,不要用创建文件的名字lisi001,要用lisi. 阅读全文
posted @ 2020-07-16 17:14 Mysticbinary 阅读(2446) 评论(0) 推荐(0) 编辑
go 报 need type assertion
摘要:responese_total := m["responses"].([]interface{})[0].(map[string]interface{})["hits"].(map[string]interface{})["total"] value, ok := responese_total.( 阅读全文
posted @ 2020-06-12 14:07 Mysticbinary 阅读(364) 评论(0) 推荐(0) 编辑
go mod包管理 加代理下载
摘要:原始go.mod文件 module xxx go 1.14 报错 i/o timeout go mod init workorder go mod init: go.mod already exists go mod tidy go: finding module for package githu 阅读全文
posted @ 2020-06-11 18:04 Mysticbinary 阅读(911) 评论(0) 推荐(0) 编辑
go 报错 import cycle not allowed
摘要:运行时报错,import cycle not allowed ; 查了goole大概知道了原因,还是导包类的问题,我检察了一下我的代码库,发现我昨天划分几个工具文件,里面的两个文件相互引用,就导致报import cycle not allowed 错了,这个错误在别的语言上都不会报,基于以前的使用习 阅读全文
posted @ 2020-06-11 12:06 Mysticbinary 阅读(1529) 评论(0) 推荐(0) 编辑
Python with语句和过程抽取思想
摘要:目录with语句的应用场景使用with语句前后对比with语句的执行原理自定义open函数总结参考 with语句的应用场景 编程中有很多操作都是配套使用的,这种配套的流程可以称为计算过程,Python语言为这种计算过程专门设计了一种结构:with语句。比如文件处理就是这类计算过程的典型代表。 使用w 阅读全文
posted @ 2019-12-22 23:22 Mysticbinary 阅读(625) 评论(1) 推荐(3) 编辑
What is Callback?
摘要:I am sorry. This article has many errors and the cited cases are not appropriate. It is not recommended to refer to or watch it. I suggest you look: h 阅读全文
posted @ 2019-11-15 19:39 Mysticbinary 阅读(11550) 评论(0) 推荐(10) 编辑