01 2020 档案

摘要:<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> </body> <script type="text/javascript"> var arr = [1,2,4,5,3] var 阅读全文
posted @ 2020-01-31 10:11 A毛毛 阅读(289) 评论(0) 推荐(0)
摘要:效果: 代码如下: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <script type="text/javascript" src="js/vue.js" ></script> </head> <body 阅读全文
posted @ 2020-01-30 18:11 A毛毛 阅读(2017) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <script src="js/vue.js" type="text/javascript" charset="utf-8"></script> </head> 阅读全文
posted @ 2020-01-30 11:42 A毛毛 阅读(1190) 评论(0) 推荐(0)
摘要:package main import ( "bytes" "encoding/hex" "fmt" "math/big" ) var base58Alphabets = []byte("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwx 阅读全文
posted @ 2020-01-29 23:49 A毛毛 阅读(1384) 评论(0) 推荐(0)
摘要:package main import ( "encoding/base64" "fmt" ) func main() { str := "Man" fmt.Println("原字符串是:", str) enStr := Base64EncodeString(str) fmt.Println("编码 阅读全文
posted @ 2020-01-29 22:27 A毛毛 阅读(2079) 评论(0) 推荐(0)
摘要:package main import ( "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "crypto/sha256" "encoding/hex" "fmt" "log" "math/big" ) func main() { // 1、对需要签名的 阅读全文
posted @ 2020-01-29 11:47 A毛毛 阅读(736) 评论(0) 推荐(0)
摘要:package main import ( "crypto" "crypto/rand" "crypto/rsa" "crypto/x509" "encoding/base64" "encoding/pem" "errors" "fmt" "io/ioutil" ) func main() { st 阅读全文
posted @ 2020-01-28 22:37 A毛毛 阅读(2513) 评论(0) 推荐(0)
摘要:package main import ( "bytes" "crypto/aes" "crypto/cipher" "crypto/des" "encoding/base64" "fmt" ) // main 入口函数 func main() { // DES密钥 key := "12345678 阅读全文
posted @ 2020-01-28 10:07 A毛毛 阅读(984) 评论(0) 推荐(0)
摘要:验证结果网址 http://www.fileformat.info/tool/hash.htm "golang.org/x/crypto/md4"不存在时,解决方法: cd $GOPATH/src mkdir -p golang.org/x/ cd golang.org/x/ git clone h 阅读全文
posted @ 2020-01-27 08:16 A毛毛 阅读(1654) 评论(0) 推荐(0)
摘要:原因是:原来的icon地址不存在了。 找到生成的代码中的icon地址:http://app.baidu.com/map/images/us_mk_icon.png 替换成这个地址即可:http://api.map.baidu.com/lbsapi/creatmap/images/us_mk_icon 阅读全文
posted @ 2020-01-13 11:59 A毛毛 阅读(1743) 评论(0) 推荐(0)
摘要:<?php header("Content-type:text/html;charset=utf-8"); abstract class msg{ protected $send = null; public function __construct($send){ $this->send = $s 阅读全文
posted @ 2020-01-12 17:31 A毛毛 阅读(177) 评论(0) 推荐(0)
摘要:<?php header("Content-type:text/html;charset=utf-8"); // 适配器模式 /** * 查看天气接口 */ class Tianqi { public static function show(){ $arr = array('tem'=>28,'w 阅读全文
posted @ 2020-01-12 16:26 A毛毛 阅读(197) 评论(0) 推荐(0)
摘要:<?php header("Content-type:text/html;charset=utf-8"); /** * 文章编辑类 */ class Article { protected $content; protected $art = null; public function __cons 阅读全文
posted @ 2020-01-12 16:01 A毛毛 阅读(153) 评论(0) 推荐(0)
摘要:html <html> <head> <meta charset="UTF-8"> <title>简单计算器</title> </head> <body> <h1>简单计算器</h1> <form action="10.php" method="post"> <input type="text" n 阅读全文
posted @ 2020-01-12 12:46 A毛毛 阅读(224) 评论(0) 推荐(0)
摘要:html <html> <head> <meta charset="UTF-8"> <title>责任链模式</title> </head> <body> <h1>责任链模式举报</h1> <form action="09-2.php" method="post"> <select name="le 阅读全文
posted @ 2020-01-12 12:17 A毛毛 阅读(251) 评论(0) 推荐(0)
摘要:html <html> <head> <meta charset="UTF-8"> <title>责任链模式</title> </head> <body> <h1>责任链模式举报</h1> <form action="09.php" method="post"> <select name="lev" 阅读全文
posted @ 2020-01-12 11:56 A毛毛 阅读(471) 评论(0) 推荐(0)
摘要:php提供的两个接口,一个被观察者接口SplSubject,一个或多个观察者接口SPLObserver,和一个可以储存对象的类SplObjectStorage。被观察者有三个方法,需要实现这三个方法,一个attach可以理解为添加一个观察者,detach可以理解为删除掉一个观察者,一个notify里 阅读全文
posted @ 2020-01-12 11:30 A毛毛 阅读(475) 评论(0) 推荐(0)
摘要:前端界面 html代码 <body> <select name="" id="select"> <option value="">请选择风格</option> <option value="male">男式风格</option> <option value="female">女士风格</option 阅读全文
posted @ 2020-01-12 10:07 A毛毛 阅读(463) 评论(0) 推荐(0)
摘要:<?php header("Content-type:text/html;charset=utf-8"); /** * 第一步,分别实例化 */ /*class Single { function __construct() { # code... } } $s1 = new Single(); $ 阅读全文
posted @ 2020-01-11 22:20 A毛毛 阅读(194) 评论(0) 推荐(0)
摘要:实现不修改原代码,扩展新功能 <?php header("Content-type:text/html;charset=utf-8"); /** * db接口 * 实现连接数据库函数conn */ interface db { function conn(); } /** * 工厂接口 * 实现创建 阅读全文
posted @ 2020-01-11 21:07 A毛毛 阅读(156) 评论(0) 推荐(0)
摘要:<?php header("Content-type:text/html;charset=utf-8"); /** * 共同接口 */ interface db { function conn(); } /** * mysql类 */ class DbMysql implements db { pu 阅读全文
posted @ 2020-01-11 20:37 A毛毛 阅读(280) 评论(0) 推荐(0)
摘要:<?php header("Content-type:text/html;charset=utf-8"); /** * 共同接口 */ interface db { function conn(); } /** * mysql类 */ class DbMysql implements db { pu 阅读全文
posted @ 2020-01-11 20:22 A毛毛 阅读(379) 评论(0) 推荐(0)
摘要:<?php header("Content-type:text/html;charset=utf-8"); /** * 虎 */ abstract class Tiger { public abstract function climb(); } /** * x虎 */ class Xtiger e 阅读全文
posted @ 2020-01-11 19:59 A毛毛 阅读(184) 评论(0) 推荐(0)
摘要:1 安装go-redis 2 // 安装命令 3 go get github.com/gomodule/redigo/redis 4 // 导入使用 5 import( 6 "github.com/gomodule/redigo/redis" 7 ) 8 // go操作redis文档 9 https 阅读全文
posted @ 2020-01-11 17:15 A毛毛 阅读(1292) 评论(0) 推荐(0)
摘要:本文只针对Nginx在不加载第三方模块的情况能处理哪些事情,由于第三方模块太多所以也介绍不完,当然本文本身也可能介绍的不完整,毕竟只是我个人使用过和了解到过得。 Nginx能做什么 反向代理 负载均衡 HTTP服务器(包含动静分离) 正向代理 以上就是我了解到的Nginx在不依赖第三方模块能处理的事 阅读全文
posted @ 2020-01-11 10:33 A毛毛 阅读(534) 评论(0) 推荐(0)
摘要:原文:https://www.imooc.com/article/20411 公众号引用:https://mp.weixin.qq.com/s/4kDotmsmrd8YP26pZ2s8lw 阅读全文
posted @ 2020-01-11 10:21 A毛毛 阅读(246) 评论(0) 推荐(0)
摘要:在使用Docker创建了容器之后,如何进入该容器呢? 进入Docker容器比较常见的几种做法如下: 使用docker attach 使用SSH 使用nsenter 使用exec 一、使用docker attach进入Docker容器 Docker提供了attach命令来进入Docker容器。 接下来 阅读全文
posted @ 2020-01-11 09:25 A毛毛 阅读(8578) 评论(0) 推荐(0)
摘要:// User 用户表 type User struct { ID int UserName string Password string Articles []*Article `orm:"rel(m2m)"` } // Article 文章表 type Article struct { ID i 阅读全文
posted @ 2020-01-11 00:00 A毛毛 阅读(2785) 评论(0) 推荐(0)
摘要:模板 this.Layout = "admin/layout.html" this.TplName = "admin/list.html" 在layout.html中必须有一下代码,才能显示list.html {{.Layout.Content}} LayoutSection this.Layout 阅读全文
posted @ 2020-01-10 16:46 A毛毛 阅读(313) 评论(0) 推荐(0)
摘要:// ShowLogin 登陆显示 func (c *UserController) ShowLogin() { username := c.Ctx.GetCookie("username") if username != "" { c.Data["username"] = username c.D 阅读全文
posted @ 2020-01-10 15:15 A毛毛 阅读(975) 评论(0) 推荐(0)
摘要:一、Apache的伪静态配置 1、网站根目录下需要有 .htaccess 文件,没有则自己创建一个,内容如下: <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{RE 阅读全文
posted @ 2020-01-08 10:16 A毛毛 阅读(561) 评论(0) 推荐(0)
摘要:项目移植到另一台电脑后出现以下问题,及其解决方法: package models import ( "github.com/astaxie/beego/orm" _ "github.com/go-sql-driver/mysql" ) // User 用户表 type User struct { I 阅读全文
posted @ 2020-01-07 16:20 A毛毛 阅读(3962) 评论(0) 推荐(0)