摘要:
dominate https://github.com/Knio/dominate domnate是一款强大的python领域的html生成库。 Dominate is a Python library for creating and manipulating HTML documents usi
阅读全文
posted @ 2022-04-29 23:58
lightsong
阅读(375)
推荐(0)
摘要:
type and range 越界问题非常频繁地困扰着开发人员 CPP常用的类型定义不能体现数据的bit位数,让开发人员非常抓狂,相信很多人都遇到过,当判定一个数值是否越界时候,一定是先去网上查表, 但是数据类型对应的范围,依赖具体的compiler的编译器实现的, 嵌入式系统往往范围比较小, 服务
阅读全文
posted @ 2022-04-24 11:00
lightsong
阅读(108)
推荐(0)
摘要:
Environment https://dev.to/flippedcoding/difference-between-development-stage-and-production-d0p 产品研发过程涉及三种环境: 开发环境 -- 研发人员使用 Stage -- 预发布环境,对标真实环境,做A
阅读全文
posted @ 2022-04-23 00:04
lightsong
阅读(126)
推荐(0)
摘要:
https://www.keboola.com/blog/eventual-consistency What is eventual consistency and why should you care about it? The anatomy of distributed storage 分布
阅读全文
posted @ 2022-03-17 20:51
lightsong
阅读(120)
推荐(0)
摘要:
MathJax https://www.mathjax.org/ web页面上的数学公式显示引擎。 使用纯web技术css等 支持多种输入格式: MathML Tex asciimath 可访问性好,可复用。 Beautiful and accessible math in all browsers
阅读全文
posted @ 2022-03-14 14:32
lightsong
阅读(94)
推荐(0)
摘要:
Python Metaclasses https://realpython.com/python-metaclasses/#type-and-class Type and Class type is a metaclass, of which classes are instances. Just
阅读全文
posted @ 2022-03-07 02:14
lightsong
阅读(60)
推荐(0)
摘要:
SSR https://css-tricks.com/server-side-react-rendering/ react代码在客户端渲染,这样导致SEO不友好。 由此引入,SSR 服务器端渲染技术:ReactDomServer库。 The Benefits of Server-Side Rende
阅读全文
posted @ 2022-03-02 13:40
lightsong
阅读(158)
推荐(0)
摘要:
Structured data https://databricks.com/blog/2017/02/23/working-complex-data-formats-structured-streaming-apache-spark-2-1.html 结构化数据 -- 在数据上定义了一层模式, 例
阅读全文
posted @ 2022-03-01 14:55
lightsong
阅读(50)
推荐(0)
摘要:
SOLID https://team-coder.com/solid-principles/ OOP五原则,帮助开发者设计 可维护 和 可扩展的类。 SOLID is an acronym for five principles that help software developers desig
阅读全文
posted @ 2022-02-20 23:58
lightsong
阅读(124)
推荐(0)
摘要:
Separation of Concerns -- Root Principle https://effectivesoftwaredesign.com/2012/02/05/separation-of-concerns/ 道生一,一生二 混沌世界初开时候,为一团气体, 盘古开天辟地之后, 轻气上扬
阅读全文
posted @ 2022-02-20 23:40
lightsong
阅读(89)
推荐(0)
摘要:
Overview https://refactoring.guru/refactoring 把 dirty code 转变成 clean code 过程叫重构。 What is refactoring? Clean code clean code有如下特征: 可读性好 无重复逻辑 低代码 -- 包含
阅读全文
posted @ 2022-02-20 12:26
lightsong
阅读(214)
推荐(0)
摘要:
What's a design pattern? https://refactoring.guru/design-patterns/what-is-pattern 设计模式应对软件设计过程中经常出现的问题。 Design patterns are typical solutions to commo
阅读全文
posted @ 2022-02-20 11:16
lightsong
阅读(182)
推荐(0)
摘要:
absolute import https://realpython.com/absolute-vs-relative-python-imports/#absolute-imports 从项目根目录开始, 使用绝对路径 查找 package 或者 module An absolute import
阅读全文
posted @ 2022-02-17 14:13
lightsong
阅读(109)
推荐(0)
摘要:
LooseCoupling Requirement main文件中,调用底层同功能模块, 一般写法是在 main中,显示引用底层模块。 这构成了 下层对象 直接出现在上层代码中, 上层代码改变,需要考虑是否影响底层代码。 按照依赖倒置原则,需要定义中间抽象层,上层只依赖抽象层, 对底层,上层统一管理
阅读全文
posted @ 2022-02-14 17:03
lightsong
阅读(76)
推荐(0)
摘要:
InversionOfControl https://martinfowler.com/bliki/InversionOfControl.html 中文翻译,控制反转。 当你的软件控制逻辑变得复杂的时候, 控制层适合独立出来单独进行管理。 一些框架或者IOC容器,提供了这种能力。 所以确认一个软件包
阅读全文
posted @ 2022-02-13 18:09
lightsong
阅读(79)
推荐(0)
摘要:
Class attributes https://www.geeksforgeeks.org/class-instance-attributes-python/ 类属性,属于类自己,但是被所有的实例共享。 Class attributes belong to the class itself the
阅读全文
posted @ 2022-02-11 23:52
lightsong
阅读(259)
推荐(0)
摘要:
Cache https://xie.infoq.cn/article/373f75d884a28aff8f32c3d9a 什么是缓存? 缓存是将请求的结果存储在与原始存储位置或临时存储位置不同的位置的过程,这样我们就可以避免重复执行相同的操作。基本上,缓存是文件和数据的临时存储,从这个新位置访问数据
阅读全文
posted @ 2022-02-07 14:20
lightsong
阅读(59)
推荐(0)
摘要:
Overview https://devopscube.com/jenkins-architecture-explained/ master跟各种类型的worker node建立连接,有两种过程。 SSH负责master向slave(物理主机或者虚拟机)建立连接,然后推送agent.jar文件到此机
阅读全文
posted @ 2022-01-29 16:22
lightsong
阅读(239)
推荐(0)
摘要:
How To Run Docker in Docker Container [3 Easy Methods] https://devopscube.com/run-docker-in-docker/ 应用场景 在容器中执行完build动作, 需要将代码打入镜像中, 需要运行docker build命
阅读全文
posted @ 2022-01-28 18:28
lightsong
阅读(96)
推荐(0)
摘要:
背景 https://www.cnblogs.com/lightsong/p/15782809.html 书接前章,前面研究了使用K8S部署Jenkins master服务器的方法, 当时希望slave能力也能够利用K8S集群的来动态调度。 如下图: 将slave资源,以POD方式封装,动态调度到K
阅读全文
posted @ 2022-01-28 18:14
lightsong
阅读(384)
推荐(0)
摘要:
Docker & Kubernetes : Pods and Service definitions https://www.bogotobogo.com/DevOps/Docker/Docker_Kubernetes_Pods_Services_Yaml.php Kubernetes 是pilot
阅读全文
posted @ 2022-01-25 11:07
lightsong
阅读(156)
推荐(0)
摘要:
Services https://segmentfault.com/a/1190000023125587 左边从上到下,是依赖关系。 LoadBalancer是NodePort, 添加负载均衡特性。 NodePort是ClusterIP,添加在节点上开放接口功能。 ExternalName 对命名空
阅读全文
posted @ 2022-01-25 01:06
lightsong
阅读(94)
推荐(0)
摘要:
Python TypeError: ‘NoneType’ object is not subscriptable 对None进行脚本标注, 来获取值得写法,产生报错。 subscript 来源 于数学中, 对集合对象 进行索引子元素的写法 a1 其中的1是对a的脚注。 https://itsmyco
阅读全文
posted @ 2022-01-21 23:24
lightsong
阅读(582)
推荐(0)
摘要:
Proof of concept -- 可行性验证 https://en.wikipedia.org/wiki/Proof_of_concept Proof of concept (POC), also known as proof of principle, is a realization of
阅读全文
posted @ 2022-01-21 12:15
lightsong
阅读(387)
推荐(0)
摘要:
kubernetes https://kubernetes.io/ K8S是自动化部署,伸缩,容器应用的管理工具。 Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling,
阅读全文
posted @ 2022-01-10 00:00
lightsong
阅读(126)
推荐(0)
摘要:
GITOps https://www.gitops.tech/ 实现云原生应用自动化部署的方法 在运维基础设施时候,聚焦在开发行者中心的体验上, 使用开发者熟悉的工具, 例如git和其它持续发布工具。 GitOps is a way of implementing Continuous Deploy
阅读全文
posted @ 2021-12-29 15:41
lightsong
阅读(83)
推荐(0)
摘要:
Infrastructure as Code https://geekflare.com/infrastructure-as-code-intro/ 使用软件开发的原理和实践来实现基础设施的自动化。 写代码来管理 服务器 数据库 网络 日志 应用部署和配置。 Infrastructure as co
阅读全文
posted @ 2021-12-28 23:44
lightsong
阅读(197)
推荐(0)
摘要:
Scalable System Design Patterns== 可扩展系统设计模式 https://dzone.com/articles/scalable-system-design 负载均衡 分发器负责将请求根据不同的策略,分发到对应的worker实例上。 要求所有的worker上不存储状态信
阅读全文
posted @ 2021-12-27 17:26
lightsong
阅读(84)
推荐(0)
摘要:
Inner Loop vs Outer Loop https://opensource.com/article/21/6/open-source-developer-tools inner loop是开发者的最常做的事情, 编码 运行 验证 调试 outer loop是我们经常提及的CI/CD, 从
阅读全文
posted @ 2021-12-27 12:17
lightsong
阅读(96)
推荐(0)
摘要:
dispatcher https://hub.packtpub.com/dispatchers-and-routers/ 分发器,接收消息,分发到对应的模块进行处理。 Dispatchers In the real world, dispatchers are the communication c
阅读全文
posted @ 2021-12-23 17:04
lightsong
阅读(135)
推荐(0)
摘要:
Overview https://docs.docker.com/network/ docker强大之处在于实现资源隔离的同时,也可是构建容器连接,容器和容器(同主机),容器和容器(不同主机),或者容器和外部, One of the reasons Docker containers and ser
阅读全文
posted @ 2021-12-15 12:30
lightsong
阅读(146)
推荐(0)
摘要:
Jenkins Jobs status dashboard by Build Monitor Plugin https://www.devopsart.com/2020/05/jenkins-jobs-status-dashboard-by-build.html https://plugins.je
阅读全文
posted @ 2021-12-15 10:24
lightsong
阅读(162)
推荐(0)
摘要:
背景 同一个Jenkins服务器上,存在的Job越多,越需要进行归类管理。 View -- 分类 https://subscription.packtpub.com/book/application_development/9781784390891/3/ch03lvl1sec22/creating
阅读全文
posted @ 2021-12-14 17:03
lightsong
阅读(434)
推荐(0)
摘要:
CI/CD System https://www.redhat.com/en/topics/devops/what-is-ci-cd#ci/cd-tools CI关注开发阶段 CD -- Delivery 对应版本的自动化发布, 发布到制品库, 但是部署可能后续为手动 CD -- Deploymen
阅读全文
posted @ 2021-12-13 17:07
lightsong
阅读(282)
推荐(0)
摘要:
Pipeline as Code https://www.jenkins.io/doc/book/pipeline-as-code/ Pipeline as Code describes a set of features that allow Jenkins users to define pip
阅读全文
posted @ 2021-12-13 00:28
lightsong
阅读(111)
推荐(0)
摘要:
mysql & mysqldump https://serverguy.com/servers/how-to-backup-mysql-database/ 将数据库数据导出为 SQL语句。 mysqldump mysql-database > ABC-database-backup.sql mysq
阅读全文
posted @ 2021-12-07 14:31
lightsong
阅读(118)
推荐(0)
摘要:
marshmallow-sqlalchemy https://marshmallow-sqlalchemy.readthedocs.io/en/latest/ https://github.com/marshmallow-code/marshmallow-sqlalchemy SQLAlchemy
阅读全文
posted @ 2021-12-02 14:29
lightsong
阅读(614)
推荐(0)
摘要:
why need alembic? After defining ORM CLASS, we need to create table by the ORM class. https://docs.sqlalchemy.org/en/14/orm/tutorial.html#declare-a-ma
阅读全文
posted @ 2021-11-30 17:09
lightsong
阅读(126)
推荐(0)
摘要:
SQL COUNT() with GROUP by https://www.w3resource.com/sql/aggregate-functions/count-with-group-by.php The use of COUNT() function in conjunction with G
阅读全文
posted @ 2021-11-28 00:03
lightsong
阅读(558)
推荐(0)
摘要:
sqlalchemy https://www.sqlalchemy.org/ The Python SQL Toolkit and Object Relational Mapper SQLAlchemy is the Python SQL toolkit and Object Relational
阅读全文
posted @ 2021-11-26 15:20
lightsong
阅读(241)
推荐(0)