文件index.go
// 定义包名 每个go程序都必须包含一个main的包名,表示一个可以独立执行的程序
package main
// 导入包名 告诉 go程序 需要的使用的包名称
import "fmt"
// 必须包含的 main 主函数
func main() {
fmt.Println("Hello, World!")
}
react package.json中proxy的配置如下
"proxy": {
"/api/rjwl": {
"target": "http://47.94.142.215:8081",
"changeOrigin": true
}
}
报错:
sudo pip install moviepy
index.py
from moviepy.editor import *
video = VideoFileClip('test.mp4')
audio = video.audio
audio.write_audiofile('test.mp3')
yarn add react-redux
|- redux
|- actions.js
|- reducer.js
|- store.js
actions.js
export const change_user_info = "changeUserInfo"
props
state
类型定义input
事件 event
类型定义// 定义 Props 类型
export interface Props {
name: string;
value: string;
}
// 定义 State 类型
export interface State{
value: string;
}
.editorconfig
编辑器配置缩进等
root = true
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4
.babelrc
babel编辑配置
{
npm install -g typescript
index.ts
后缀名.ts
编译成 .js
> tsc index.ts
index.ts
===> index.js
string 字符串
number 数字
boolean 布尔值
date 日期
// 启动
> service mysqld start
// 关闭
> service mysqld stop
// 重启
> service mysqld restart
在ios软键盘收起时,页面键盘位置的内容留白
解决方法:
// input 添加 blur 事件
// ios键盘弹起 失焦后页面复原
window.scrollTo(0,0)
// vue
<input @blur="Inputblur" />
Inputblur(){
window.scrollTo(0,0)
}
docker images
镜像列表docker ps
服务列表
docker 隐藏打包文件.dockerignore
.git
node_modules
npm-debug.log
Dockerfile
FROM node:10.16.0-alpine
WORKDIR /app