package main
import (
"fmt"
"github.com/gin-gonic/gin"
"net/http"
)
type User struct {
Name string `json:"name"`
Age int `json:"age"`
}
func main() {
r := gin.Default()
npm install -g nrm
nrm use taobao
nrm use npm
// 新建文件夹 然后
npm init
新建index.js
function hello( name ){
console.log( "hello" + name )
}
exports.hello = hello
登陆npm账户 登陆和发布需要切换到npm官方源,见下↓
npm adduser
| - src
- index.go
- libs
- index.go
libs / index.go
package libs // 属于哪个包
// 方法名 首字母 大写才能导出
func Count( a int, b int ) int {
return a + b
}
index.go
文件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编辑配置
{