Elliot'Blog


  • Home

  • Categories

  • Archives

  • Tags

  • About

  • Search

go

Posted on 2018-08-10 |

windows下 golang 跨平台编译

#linux 64

1
2
3
4
SET CGO_ENABLED=0
SET GOOS=linux
SET GOARCH=amd64
go build

#windows

1
2
3
4
SET CGO_ENABLED=1
SET GOOS=windows
SET GOARCH=
go build

杨辉三角形

Posted on 2018-07-05 |

杨辉三角形

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main
import "fmt"
//行数
const LINES int = 10
// 杨辉三角
func ShowYangHuiTriangle() {
nums := []int{}
for i := 0; i < LINES; i++ {
//补空白
for j := 0; j < (LINES - i); j++ {
fmt.Print(" ")
}
for j := 0; j < (i + 1); j++ {
var length = len(nums)
var value int
if j == 0 || j == i {
value = 1
} else {
value = nums[length-i] + nums[length-i-1]
}
nums = append(nums, value)
fmt.Print(value, " ")
}
fmt.Println("")
}
}
func main() {
ShowYangHuiTriangle()
}

Python VS Wechat 可以这么玩

Posted on 2017-10-19 | In Coder |

itchat

最近研究了一些微信的玩法,我们可以通过网页版的微信微信网页版,扫码登录后去抓包爬取信息,还可以post去发送信息。

然后发现了itchat这个开源项目,作者是@LittleCoder,已经把微信的接口完成了,大大的方便了我们对微信的挖掘,以下的功能也通过itchat来实现。

安装itchat这个库

pip install itchat

Read more »

阿里云Centos搭建lnmp(php7.1+nginx+mysql5.7)

Posted on 2017-09-14 | In Coder |

工具/原料

阿里云Centos7.x服务器
msyql官网文档说明:https://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.html
php71的源及安装说明:https://webtatic.com/packages/php71/

Read more »

Hello World

Posted on 2017-09-12 |

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

Docker坑系列

Posted on 2017-09-11 | In Coder |

1. container无法删除

表现为一个运行中的容器,stop和kill没效果,查看/var/log/messages日志如下:

1
2
Mar 14 18:24:23 localhost dockerd: time="2017-03-14T18:24:23.005216354+08:00" level=warning msg="container kill failed because of 'container not found' or 'no such process': Cannot kill container 2d3fd2ca48a42a2e4c56cf08abfe120cdc9a07c50a02b025c5e651ad0f8adb3e: rpc error: code = 2 desc = containerd: container not found"
Mar 14 18:24:33 localhost dockerd: time="2017-03-14T18:24:33.005531933+08:00" level=info msg="Container 2d3fd2ca48a4 failed to exit within 10 seconds of kill - trying direct SIGKILL"

systemctl restart docker重启解决。

Read more »

Redis使用 :实现简单的消息队列

Posted on 2017-08-17 | In Coder |

Redis使用 :实现简单的消息队列

Redis提供了两种方式来作消息队列。一个是使用生产者消费模式模式,另外一个方法就是发布订阅者模式。前者会让一个或者多个客户端监听消息队列,一旦消息到达,消费者马上消费,谁先抢到算谁的,如果队列里没有消息,则消费者继续监听。后者也是一个或多个客户端订阅消息频道,只要发布者发布消息,所有订阅者都能收到消息,订阅者都是ping的。

Read more »

markdown

Posted on 2017-08-15 | In Tools |

欢迎使用 Cmd Markdown 编辑阅读器


我们理解您需要更便捷更高效的工具记录思想,整理笔记、知识,并将其中承载的价值传播给他人,Cmd Markdown 是我们给出的答案 —— 我们为记录思想和分享知识提供更专业的工具。 您可以使用 Cmd Markdown:

  • 整理知识,学习笔记
  • 发布日记,杂文,所见所想
  • 撰写发布技术文稿(代码支持)
  • 撰写发布学术论文(LaTeX 公式支持)
    Read more »

lanxiao-doc

Posted on 2017-08-14 | In Doc |

约定微信对接API文档 version 1.0

  • url地址 :http://dev.**.cn/index.php/api/restful/###
  • method :POST
  • 返回格式: json
    Read more »
Elliot

Elliot

9 posts
3 categories
9 tags
RSS
Links
  • 在线常用API文档索引
  • 在线工具
  • HTTP Status
  • Yu Li
© 2018 Elliot
Powered by Hexo
|
Theme — NexT.Muse