1、函数的定义方式(4种) // (1)、命名函数 function add1(x: number, y: number): number { return x + y; } // (2)、匿名函数 let add2:(x: number, y: number) => number = functi ...
分类:
其他好文 时间:
2020-01-14 16:28:36
阅读次数:
87
大家都知道,前后分离之后,后端响应最好以统一的格式的响应. 譬如: 名称描述 status 状态码,标识请求成功与否,如 [1:成功;-1:失败] errorCode 错误码,给出明确错误码,更好的应对业务异常;请求成功该值可为空 errorMsg 错误消息,与错误码相对应,更具体的描述异常信息 r ...
分类:
编程语言 时间:
2020-01-13 23:29:08
阅读次数:
106
批处理的段注释有一种比较常用的方法: goto start = 可以是多行文本, = 可以包含重定向符号和其他特殊字符 = 只要不包含 :start 这一行 :start 另外,还有其他各种注释形式,比如: 1、:: 注释内容(第一个冒号后也可以跟任何一个非字母数字的字符) 2、rem 注释内容(不 ...
分类:
其他好文 时间:
2020-01-12 20:23:06
阅读次数:
99
第一种,用helm安装 helm repo update Hang tight while we grab the latest from your chart repositories... ...Skip local chart repository ...Successfully got an ...
分类:
其他好文 时间:
2020-01-07 01:04:49
阅读次数:
120
Django13 /缓存、信号、django的读写分离 [TOC] 1. 缓存 缓存简述: Django中缓存的方式 各种方式的配置 1、将缓存内容保存在内存的变量中(django的默认配置) 2、将缓存内容保存在文件中 3、将缓存内容保存在数据库中 4、将缓存内容保存在redis中 缓存的使用 1 ...
分类:
其他好文 时间:
2020-01-05 00:14:23
阅读次数:
110
一、flask源码分析 1.查看app.run()中run方法 首先进入app.run()方法,进入之后你会发现最核心的一句话, 导入了werkzeug工具包,启动了一个socket,其中self是app有Flask类创建的对象,host是ip地址,port是端口号 2.查看\_\_call\_\_ ...
分类:
其他好文 时间:
2020-01-04 18:52:57
阅读次数:
90
今天打开一个Python文件时,报错提示: TypeError: __init__() got an unexpected keyword argument 'io_loop' 明明是从旧电脑上拷贝到新电脑上的文件,之前运行是OK的,新电脑上运行怎么就报错了呢? 错误原因: 配置python环境时, ...
分类:
编程语言 时间:
2020-01-04 12:17:51
阅读次数:
135
报错内容: Internal error. Please report to http://jb.gg/ide/critical-startup-errors java.lang.NoClassDefFoundError: org/eclipse/xtext/xbase/lib/Exceptions ...
分类:
编程语言 时间:
2020-01-04 10:28:28
阅读次数:
85
Application application_1577985692308_0001 failed 2 times due to Error launching appattempt_1577985692308_0001_000002. Got exception: org.apache.hadoo ...
分类:
其他好文 时间:
2020-01-03 23:12:38
阅读次数:
89
对应指令码 助记符 说明 0x00 nop 什么都不做 0x01 aconst_null 将null推送至栈顶 0x02 iconst_m1 将int型 1推送至栈顶 0x03 iconst_0 将int型0推送至栈顶 0x04 iconst_1 将int型1推送至栈顶 0x05 iconst_2 ...
分类:
其他好文 时间:
2020-01-01 16:40:27
阅读次数:
61