- 博客(50)
- 收藏
- 关注
转载 从Excel表格中读取并写入到mysql
/** * Author:飘~ * 407787759@qq.com * Date:2019/7/15 * Description: */ package main import ( "bufio" "fmt" "github.com/astaxie/bee...
2018-12-04 15:10:00
369
转载 Go读取excel表格文件到数据库
准备好1.xlsx表格文件,工作薄为cbd: 列名为: {"客户名称", "品名", "颜色", "规格", "订单号", "消费者", "联系方式", "交货日期", "审核日期"} 创建好数据库excel 用法:go run main.go 1.xlsx cbd /** * ...
2018-11-27 11:44:00
1701
转载 华为三层交换机配置
进入系统视图 <Huawei>system-view Enter system view, return user view with Ctrl+Z. [Huawei] 启用DHCP功能 [Huawei]dhcp enable 查看vlan [Huawei]display v...
2018-11-27 09:43:00
3609
转载 按比例自适应 js实现
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE...
2018-11-26 15:41:00
264
转载 golang 远程唤醒开机实例
package mainimport ( "fmt" "github.com/sabhiram/go-wol" "io" "log" "net" "net/http" "time")func main() { ...
2018-11-26 14:07:00
2184
转载 Golang编写判断IP是否能够Ping通
package mainimport ( "bytes" "encoding/binary" "fmt" "log" "net" "time")var icmp ICMPtype ICMP struct { T...
2018-11-25 18:11:00
2545
转载 golang实现的TCP服务器的例子
package mainimport ( "log" "net")var conns = make(map[string]net.Conn)func main() { //广播信息 go todirective() // ha...
2018-11-25 16:23:00
219
转载 时间戳转各种YmdHis组合 其它时间转时间戳
package main import ( "log" "time" ) func main() { t := int64( 1553154134) //外部传入的时间戳(秒为单位),必须为int64类型 t1 := "2019-03-21 1...
2018-11-24 09:18:00
2976
转载 golang 并发传文件 --客户端
package mainimport ( "bytes" "flag" "fmt" "io" "io/ioutil" "log" "net" "os" "strconv" "strings")v...
2018-11-14 17:53:00
256
转载 golang 并发传文件 --服务端
package mainimport ( "archive/zip" "fmt" "io" "math" "net" "os" "path" "strconv")const chunkSize = 1 * 30...
2018-11-14 08:48:00
321
转载 前端--点击其它区域关闭窗口
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> &l...
2018-11-10 11:18:00
606
转载 golang 压缩文件
func compress(file *os.File, prefix string, zw *zip.Writer) error { info, err := file.Stat() if err != nil { return err } if...
2018-11-10 10:10:00
201
转载 golang 大文件分割与合并
package mainimport ( "fmt" "io/ioutil" "math" "os" "strconv")const chunkSize = 1 << (10 * 2)func main() {...
2018-11-07 16:53:00
3721
转载 Go jsonRPC 封装
package rpcsupportimport ( "log" "net" "net/rpc" "net/rpc/jsonrpc")func ServeRpc(host string, service interface{}) error ...
2018-10-22 16:37:00
151
转载 win7如何设置共享目录,并且访问不需要输入用户名和密码。
1、打开guest帐号,guest帐号默认情况下是不启用的 进入控制面板->用户帐户->管理其他帐户->激活Gust用户 2,右击共享目录,属性->共享->共享->添加Guest用户 3. 进入控制面板->网络和共享中心->更改高...
2018-10-19 11:18:00
233
转载 golang http 库实例
package fetcherimport ( "github.com/pkg/errors" "io/ioutil" "log" "net/http")func Fetch(url string) ([]byte, error) { ...
2018-10-18 10:15:00
129
转载 go 其它编码转UTF8编码
需要安装两个包: gopm get -g -v golang.org/x/text gopm get -g -v golang.org/x/net/html package fetcherimport ( "bufio" "golang.org/x/net/htm...
2018-10-16 16:38:00
2340
转载 golang 使用QQ邮箱发送邮件
func setMail(){ // 邮箱地址 UserEmail := "111111@qq.com" // 端口号,:25也行 Mail_Smtp_Port := ":587" //邮箱的授权码,去邮箱自己获取 Mail_Password :...
2018-10-15 17:03:00
1727
转载 inotify+rsync 实时同步
服务器A 192.168.28.1 服务器B 192.168.28.2 把A服务器的/www/的数据备份到B服务器的/www/上 A,B服务器都要安装rsync 一般系统会默认安装了 [root@web1~]# rpm -q rsync rsync-2.6.8-3.1 在rsync-da...
2018-09-29 09:46:00
100
转载 完全跨域,nginx代理跨域设置
域名cbd88.cn网页有ajax访问cbdgoods.com的资源就涉及到跨域问题 服务器a:www.cbd88.cn 服务器b:www.cbdgoods.com , file.cbdgoods.com -------------------------------------------...
2018-06-14 10:40:00
251
转载 PHP多维数组指定多字段排序
function sortArrByManyField(){ $args = func_get_args(); if(empty($args)){ return null; } $arr = array_s...
2018-06-06 15:17:00
287
转载 CentOS7.4 mysql-5.7.21 多实例一键安装
groupadd mysql useradd -g mysql -M -s /sbin/nologin mysql mkdir -p /web mkdir -p /web/server cd wget https://dev.mysql.com/get/Downloads/MySQL-5....
2018-03-22 16:23:00
90
转载 占位
groupadd mysql useradd -g mysql -M -s /sbin/nologin mysql mkdir -p /web mkdir -p /web/server cd wget https://dev.mysql.com/get/Downloads/MySQL-5....
2018-03-22 16:16:00
79
转载 禁用root远程登录后 WinSCP通过普通用户切换root
CentOS 7.4 禁止root用户远程登录 普通用户免密码切换到root用户 https://my.oschina.net/wgc2010/blog/1634595 查看sftp应用程序的路径为 [root@wxjServer ~]# cat /etc/ssh/sshd_conf...
2018-03-14 15:38:00
575
转载 CentOS 7.4 禁止root用户远程登录 普通用户免密码切换到root用户
禁止Root远程登录 先新增普通用户 useradd www123 passwd www123 备份 sshd配置文件 /etc/ssh/sshd_config cp /etc/ssh/sshd_config /etc/ssh/sshd_config_original vim /etc/ss...
2018-03-14 15:15:00
980
转载 超强LNMP一键安装
事先要知道的: 无需更新版本类软件如git,依赖库一般用yum安装即可。像nginx,mysql等需指定一个用户运行的软件 我们都可以用root身份来安装,即下面用wxj用户凭sudo来操作,因为他们最终是在指定的普通用户下运 行的,只是用root来启动而已,很安全!像NodeJS这样的即用哪...
2018-03-14 11:00:00
275
转载 firewall CentOS7.4
#开启服务 firewall-cmd --zone=public --add-service=https //临时 firewall-cmd --zone=public --permanent --add-service=https //永久 #开启某个端口 firewall-cmd --pe...
2018-03-10 13:37:00
71
转载 mysql-5.7.21
https://my.oschina.net/wgc2010/blog/1630381 转载于:https://my.oschina.net/wgc2010/blog/1632638...
2018-03-10 11:14:00
50
转载 让CentOS跟MAC一样的授权操作
苹果系统授权方式: #添加普通用户 wxj useradd wxj #设置密码 passwd wxj #把用户加到whell组 gpasswd -a wxj wheel #修改sudo配置文件 visudo #在这行下面添加一行 root ALL=(ALL:ALL) ALL wxj ALL=...
2018-03-10 09:47:00
111
转载 CentOS 7.4安装node-v8.10.0
二进制包安装node-v8.10.0 #下载地址:https://nodejs.org/en/download/ #官方提供:二进制包,和源码包两种 #安装根目录 mkdir -p /web/server cd ~ wget https://nodejs.org/dist/v8.10.0...
2018-03-08 13:46:00
417
转载 CentOS 7.4 PHP7.2.3 Memcache3.1
============================================================ memcache安装 #依赖安装 yum install libmemcached libmemcached-devel #下载 https://github.com/p...
2018-03-06 20:47:00
235
转载 CentOS 7.4 PHP7.2.3 nginx-1.12.2 mysql5.7.21配置三(nginx-1.12.2)
root用户下运行的安装 nginx-1.12.2 环境依赖请看!https://my.oschina.net/wgc2010/blog/1632609 #下载 http://nginx.org/en/download.html wget http://nginx.org/downl...
2018-03-06 16:41:00
163
转载 CentOS 7.4 PHP7.2.3 nginx-1.12.2 mysql5.7.21配置二(mysql-5.7.21)
安装mysql-5.7.21 -----二进制安装 #下载 https://dev.mysql.com/downloads/file/?id=474759 wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.21-lin...
2018-03-06 14:36:00
309
转载 CentOS 7.4 PHP7.2.3 nginx-1.12.2 mysql5.7.21配置一(php7.2.3)
LNMP生产环境 #基础工作 yum install tree nmap sysstat lrzsz dos2unix make automake zip unzip wget openssl -y yum upgrade bash -y #禁用selinux vi /etc/selinu...
2018-03-05 16:24:00
258
转载 根据ip获取地址
/** * 获取 IP 地理位置 * 淘宝IP接口 * @Return: array */ function getCity($ip = '') { if($ip == ''){ $url = "http://int.dpool.sina.com.cn/ipl...
2018-03-01 17:30:00
103
转载 mysql主从同步
这篇文档非常全面http://www.cnblogs.com/kevingrace/p/6256603.html 主服务器配置:====================== 一。vi my.cnf 参数放在[mysqld]模块下面: server-id = 100 ---&...
2018-02-03 08:39:00
93
转载 PHP加解密方法
/** * 加密算法 * @param type $str * @return type int 0加密 1解密 */ function encryption($value, $type = 0) { $key = 'cbd123'; $key = md5($key);...
2018-02-02 10:16:00
98
转载 php获取中文字符拼音首字母
/** * php获取中文字符拼音首字母 * @str */ function getFirstCharter($str){ if(empty($str)) return ''; $fchar=ord($str{0}); if($fchar>=ord('A'...
2018-02-02 10:14:00
85
转载 PHP把HTML的table导出为Excel文件
/** * 导出excel * @param $strTable 表格内容为html * @param $filename 文件名 */ function downloadExcel($strTable,$filename) { header("Content-type:...
2018-02-02 10:11:00
980
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人