首页
  • gorm 的一些配置

    // 打印查询sql log
    db.LogMode(true)
    
    // 运行模式 dev开发 or build二进制
    gin.Mode()
    gin.DebugMode
    
    
    // model struct 设置查询的key字段 否则大写会转化成 created_time 加了下划线
    阅读全文
  • taro 的坑

    bug: 页面渲染出来了false字符串

    原因:Taro 版本过低 公司的老项目使用的 taro 1.2.xx

    var show = false
    { show && <Component /> }

    解决

    
    1. 三元判断 
    2. 升级Taro版本到 1.3.0+
    阅读全文
  • ios时间格式化 js iphone

    今天解决代码又遇到一个ios下js格式化时间编程NaN的问题
    现在记录一下。
    以前以为是低版本才有,应该是不分版本。

    字符串时间改称为时间格式。

    # 将横杠改为斜杠就ok了
    const date = "2020-02-22 18:30:00"
    const newDate = date.replace(/\-/gi,'/')
    阅读全文
  • centos 常用命令

    查看内存使用情况:

    free -m

    查看硬盘情况:

    fdisk -l
    df -h

    查看端口号占用

    netstat -lnpt

    Linux 清除释放内存 cache buffer

    释放网页缓存(To free pagecache)
    `释放目录项和索引(To free dentries and inodes)

    阅读全文
  • Typescript 给setTimeout 的返回值定义为 number出错

    let scrollTimer: number = setTimeout(function () {})
    // 不能将类型“Timer”分配给类型“number”

    通过 cmd + 点击定位,发现setTimeout使用的是 Node.js 下的接口定义
    @types/node index.d.ts

    阅读全文
  • taro 小程序 css 多行隐藏

    taro 小程序 css 多行隐藏

    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    阅读全文
  • git 规范

    # 主要type
    feat:     增加新功能
    fix:      修复bug
    # 特殊type
    docs:     只改动了文档相关的内容
    style:    不影响代码含义的改动,例如去掉空格、改变缩进、增删分号
    build:    构造工具的或者外部依赖的改动,例如webpack,npm
    refactor: 代码重构时使用
    阅读全文
  • golang 语言 windows下编译linux下运行文件 go build

    命令提示符cmd下使用

    set GOARCH=amd64
    set GOOS=linux
    go build

    Powershell 下使用

    $Env:GOOS = "linux"; 
    $Env:GOARCH = "amd64"
    go build
    阅读全文
  • go 学习

    package main
    
    import (
        "fmt"
        "io/ioutil"
        "log"
        "net/http"
    
        "github.com/gin-gonic/gin"
    )
    
    // Phone asd
    type Phone interface {
        call()
    }
    
    // MiPhone asd
    type MiPhone struct {
    }
    
    阅读全文
  • go 设置代理

    go env -w GOPROXY=https://goproxy.cn,direct
    go mod init api
    go get -u github.com/gin-gonic/gin
    package main
    
    import (
        "fmt"
    
        "github.com/gin-gonic/gin"
    )
    
    func main() {
    阅读全文
  • 上一页 1 2 3 4 5 6 7 8 9 10 下一页
Taoqun
陶群
1994-09-07
taoquns@foxmail.com
前端开发
南京

文章分类

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

我的作品

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

其他推荐

sequelize 自定义时间戳 createdAt updatedAt
SSH 免密登陆配置
taro 的坑
leetCode 无重复字符的长子串
flutter 学习入门 创建项目并运行
Homebrew 国内源 安装 重装
linux tar命令 压缩、打包、解压 详解
h5移动端rem使用750设计稿
开发者:Taoqun

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

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