首页
  • go 学习 hello world

    文件index.go

    // 定义包名 每个go程序都必须包含一个main的包名,表示一个可以独立执行的程序
    package main
    
    // 导入包名 告诉 go程序 需要的使用的包名称
    import "fmt"
    
    // 必须包含的 main 主函数
    func main() {
        fmt.Println("Hello, World!")
    }
    阅读全文
  • react 添加代理 proxy

    react package.json中proxy的配置如下

    "proxy": {
        "/api/rjwl": {
          "target": "http://47.94.142.215:8081",
          "changeOrigin": true
        }
    }

    报错:

    阅读全文
  • python 将视频转换成音频

    安装库

    sudo pip install moviepy

    代码 index.py

    from moviepy.editor import *
    
    video = VideoFileClip('test.mp4')
    audio = video.audio
    audio.write_audiofile('test.mp3')

    运行

    阅读全文
  • react 添加 react-redux 基本用法

    安装

    yarn add react-redux

    创建文件、文件夹

    |- redux
      |- actions.js
      |- reducer.js
      |- store.js

    actions.js

    
    export const change_user_info = "changeUserInfo"
    
    阅读全文
  • react使用typeScript,props、state 类型定义

    1. props state 类型定义
    2. 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编辑配置

    {
    阅读全文
  • typescript 基本类型

    安装

    npm install -g typescript

    编译文件 index.ts 后缀名.ts 编译成 .js

    > tsc index.ts

    index.ts ===> index.js

    类型

    string 字符串
    number 数字
    boolean 布尔值
    date 日期
    
    阅读全文
  • centos7 安装 mysql

    常用命令

    // 启动
    > service mysqld start
    // 关闭
    > service mysqld stop
    // 重启
    > service mysqld restart

    安装之前先安装基本环境:

    阅读全文
  • iphone ios下 input触发 软键盘留白

    在ios软键盘收起时,页面键盘位置的内容留白

    解决方法:

    // input 添加 blur 事件
    // ios键盘弹起 失焦后页面复原
    window.scrollTo(0,0)
    
    // vue
    <input @blur="Inputblur" />
    
    Inputblur(){
      window.scrollTo(0,0)
    }
    
    
    
    阅读全文
  • docker 入门 命令

    docker 命令

    docker images 镜像列表
    docker ps 服务列表

    docker 隐藏打包文件
    .dockerignore

    .git
    node_modules
    npm-debug.log

    Dockerfile

    FROM node:10.16.0-alpine
    WORKDIR /app
    阅读全文
  • 上一页 1 2 3 4 5 6 7 8 9 10 下一页
Taoqun
陶群
1994-09-07
taoquns@foxmail.com
前端开发
南京

文章分类

Mac
算法
前端
python
golang
mysql
node
linux
随笔
生活
游记

我的作品

记录体重Pro(小程序)
闲蝉科技

其他推荐

对生活感到满足的状态
typescript 基本类型
react 添加代理 proxy
npm 切换淘宝源和npm源
taro 小程序 css 多行隐藏
Taro hooks mobx
flutter 插件
Docker 安装verdaccio
开发者:Taoqun

备案/许可证编号为:皖ICP备17027395号

闲蝉科技
Ron · 一个无人问津的小站
小印章