1 2 3 4 5 ··· 476 下一页
摘要: Creational patterns provide object creation mechanisms that increase flexibility and reuse of existing code. Factory method: Provides an interface for 阅读全文
posted @ 2024-01-23 15:11 Zhentiw 阅读(6) 评论(0) 推荐(0) 编辑
摘要: Just for fun... Given a number (always positive) as a type. Your type should return the number decreased by one. For example: type Zero = MinusOne<1> 阅读全文
posted @ 2022-10-07 22:57 Zhentiw 阅读(42) 评论(0) 推荐(0) 编辑
摘要: Blog: https://www.geeksforgeeks.org/es6-trampoline-function/ Stackoverflow problem for recursion: const sumBelow = (number, sum = 0) => ( number 0 ? s 阅读全文
posted @ 2022-08-18 14:32 Zhentiw 阅读(34) 评论(0) 推荐(0) 编辑
摘要: Serverless framework with AWS Link to each sections Table of Content: Part 0: Serverless Project structure Part 1: DynamoDB & ApiGateway Part 2: Event 阅读全文
posted @ 2021-05-17 15:15 Zhentiw 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Storage Services: S3 Glacier CloudFront Elastic Block Store (EBS) Storage Gateway Snow family Database Overview Block storage: Used on local networks 阅读全文
posted @ 2021-03-15 03:06 Zhentiw 阅读(146) 评论(0) 推荐(0) 编辑
摘要: S3 Features Prefiees and delimiters For example: the file name in S3 can be: `marking/plans/kpi_2021_1.pdf`. The point is make it looks like a folder 阅读全文
posted @ 2021-03-12 17:34 Zhentiw 阅读(136) 评论(0) 推荐(0) 编辑
摘要: In our previous code, we have seen this partten for operators: // #region operators const concat = curry((broadcaster, listener) => { let string = ''; 阅读全文
posted @ 2020-10-25 21:54 Zhentiw 阅读(151) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2020-05-07 18:22 Zhentiw 阅读(0) 评论(0) 推荐(0) 编辑
摘要: Generators can yield promises which can work with the "for await of" loop syntax. This lesson shows how all the pieces fit together and explains why t 阅读全文
posted @ 2020-03-22 02:59 Zhentiw 阅读(161) 评论(0) 推荐(0) 编辑
摘要: In this post, we are going to see how to use Ramda Lens. For example, we have data: R.lens: R.lens takes a getter and a setter: R.lensProp: There is a 阅读全文
posted @ 2019-02-24 20:12 Zhentiw 阅读(704) 评论(0) 推荐(0) 编辑
摘要: Just like the State ADT an Array is also an Applicative Functor. That means we can do the same tricks with liftA2 with Array that we have been doing w 阅读全文
posted @ 2019-01-16 16:30 Zhentiw 阅读(708) 评论(0) 推荐(0) 编辑
摘要: Use custom Cypress command for reusable assertions We’re duplicating quite a few commands between the registration and login of our user for assertion 阅读全文
posted @ 2018-12-06 21:13 Zhentiw 阅读(432) 评论(0) 推荐(0) 编辑
摘要: Use Cypress to test user registration Let’s write a test to fill out our registration form. Because we’ll be running this against a live backend, we n 阅读全文
posted @ 2018-12-05 15:54 Zhentiw 阅读(353) 评论(0) 推荐(0) 编辑
摘要: Despite the fact that Cypress is an application that runs natively on your machine, you can install it and add it as a dependency just like all other 阅读全文
posted @ 2018-12-05 02:38 Zhentiw 阅读(568) 评论(0) 推荐(0) 编辑
摘要: Ensure Functions are Called Correctly with JavaScript Mocks Often when writing JavaScript tests and mocking dependencies, you’ll want to verify that t 阅读全文
posted @ 2018-11-06 04:25 Zhentiw 阅读(429) 评论(0) 推荐(0) 编辑
摘要: 1. Color Picker (Chrome) You might know how to use color picker in Chrome, recently there is a feature inside color picker which is "Contrast Ratio", 阅读全文
posted @ 2018-07-15 18:41 Zhentiw 阅读(234) 评论(0) 推荐(0) 编辑
摘要: We'll examine how to unnest function calls, capture assignment, and create a linear data flow with a type we call Box. This is our introduction to wor 阅读全文
posted @ 2016-12-11 21:47 Zhentiw 阅读(327) 评论(0) 推荐(0) 编辑
摘要: Well, this stuff will be a little bit strange if you deal with it first time. Container Object: Just a wrapper / contianer for values No Method No Nou 阅读全文
posted @ 2016-09-06 04:23 Zhentiw 阅读(336) 评论(0) 推荐(0) 编辑
摘要: First, what is 'High Order function', basic just a function, inside the function return another fuction. For example: Decorators is a subset of high o 阅读全文
posted @ 2016-06-14 03:10 Zhentiw 阅读(375) 评论(0) 推荐(0) 编辑
摘要: Somehow it looks like reflect in Java. For example: We define an mothod on the Object, it called defineMethod(). It accepts two arguements, one is met 阅读全文
posted @ 2016-05-02 03:06 Zhentiw 阅读(377) 评论(0) 推荐(0) 编辑
摘要: Offical plugins: https://cn.vitejs.dev/plugins/ Commuity plugins: https://github.com/vitejs/awesome-vite#plugins Rollup plguins: https://vite-rollup-p 阅读全文
posted @ 2025-02-18 03:09 Zhentiw 阅读(0) 评论(0) 推荐(0) 编辑
摘要: @use 'sass:math'; @use 'sass:string'; html { background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%); height: 100%; width: 100%; over 阅读全文
posted @ 2025-02-15 23:33 Zhentiw 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 一、k8s概念介绍 1、k8s介绍 kubernetes,简称K8s,是用8代替8个字符“ubernete”而成的缩写。是一个开源的,用于管理云平台中多个主机上的容器化的应用,Kubernetes的目标是让部署容器化的应用简单并且高效(powerful),Kubernetes提供了应用部署,规划,更 阅读全文
posted @ 2025-02-14 22:12 Zhentiw 阅读(2) 评论(0) 推荐(0) 编辑
摘要: In vite.config.ts resolve: { alias: { "@": path.resolve(__dirname, "src"), "@assets": path.resolve(__dirname, "src/assets"), }, }, tsconfig.json "comp 阅读全文
posted @ 2025-02-14 03:03 Zhentiw 阅读(1) 评论(0) 推荐(0) 编辑
摘要: PreProcessor Using Scss Install: pnpm add sass -D Code: // filename: src/views/404.vue <template> <div title="404">404</div> <p>Page Not Found</p> </t 阅读全文
posted @ 2025-02-13 04:03 Zhentiw 阅读(5) 评论(0) 推荐(0) 编辑
摘要: The key differences between CommonJS (CJS) and ECMAScript Modules (ESM) come down to their execution model. CommonJS (CJS) Synchronous: Each require() 阅读全文
posted @ 2025-02-12 14:56 Zhentiw 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 同源策略及跨域问题 同源策略是一套浏览器安全机制,当一个源的文档和脚本,与另一个源的资源进行通信时,同源策略就会对这个通信做出不同程度的限制。 简单来说,同源策略对 同源资源 放行,对 异源资源 限制 因此限制造成的开发问题,称之为跨域(异源)问题 同源和异源 源(origin) = 协议 + 域名 阅读全文
posted @ 2025-02-11 03:50 Zhentiw 阅读(8) 评论(0) 推荐(0) 编辑
摘要: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"/> <title>Animation for auto height</title> <style> .btn { position: relative; border: no 阅读全文
posted @ 2025-02-10 00:39 Zhentiw 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 前面讲的都是在git提交之前的一些流程检查,而当我们git提交的时候,提交信息,也应该是需要规范的 commitlint 在使用Git提交代码时,通常都需要填写提交说明,也就是Commit Message git commit -m '提交测试' 说白了,Commit Message就是我们提交的时 阅读全文
posted @ 2025-02-10 00:02 Zhentiw 阅读(13) 评论(0) 推荐(0) 编辑
摘要: Git 流程规范配置 在前端项目开发中,规范git提交信息,也是经常使用的手段,如何确保团队成员都遵循ESint规则,且不会将不符合规范的代码推送到Git仓库? 答案是:使用带有git hooks功能的husky。git hooks是git内置的功能,它会在执行Git命令之前(或之后)进行一些其它操 阅读全文
posted @ 2025-02-09 23:47 Zhentiw 阅读(7) 评论(0) 推荐(0) 编辑
1 2 3 4 5 ··· 476 下一页