05 2017 档案
摘要:CSS 伪元素 所有CSS伪类/元素 例子: My name is Donald I live in Ducksburg 注意: :before 作用于 IE8,DOCTYPE 必须已经声明. 例子: runoob.com wikipedia.org 注意: :active选择器样式触发时链接到链接
阅读全文
摘要:查找好友 查找群组 创建群组 退出帐号 查找好友 查找群组 创建群组 退出帐号 查找好友 查找群组 创建群组 退出帐号 一个下拉菜单源 <div class="dropdown-menu" id="dropdown-menu"> <a class="button-green">查找好友</a> <a
阅读全文
摘要:因为刚开始学,用了bootstrap的框架,有些东西可以用现成的,不用自己布局,后来发现如果要调比较精细的布局还是得自己写css,然后就开始一点点去掉bootstrap的布局,不然在原来bootstrap的css上改,没有完全理解bootstrap这个效果是怎么弄出来的话想去掉某个效果也很难,某些样
阅读全文
摘要:1 Method POST 2 URL https://vjudge.net/user/login 3 Proto HTTP/1.1 4 ProtoMajor 1 5 ProtoMinor 1 6 Header map[Referer:[http://127.0.0.1:8002/] Accept-
阅读全文
摘要:隐藏元素 - display:none或visibility:hidden 隐藏一个元素可以通过把display属性设置为"none",或把visibility属性设置为"hidden"。但是请注意,这两种方法会产生不同的结果。 visibility:hidden可以隐藏某个元素,但隐藏的元素仍需占
阅读全文
摘要:1 .objectsTab.active{} /*Tab和.之间没有空格*/ 2 <element class="objectsTab active"> 3 4 .objectsTab .active{} /*Tab和.之间有空格,后代class*/ 5 <element class="object
阅读全文
摘要:1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long LL; 4 const int N=1e5+10; 5 const int INF=0x3f3f3f3f; 6 int cas=1,T; 7 struct no
阅读全文
摘要:1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>菜鸟教程(runoob.com)</title> 6 </head> 7 <body> 8 <button onclick="document.getEleme
阅读全文
摘要:第一场rank387 题解 A. 阿里的新游戏 1A 1 #include <bits/stdc++.h> 2 using namespace std; 3 int x[100],y[100]; 4 int n,m; 5 bool find(int a,int b) 6 { 7 for(int i=
阅读全文
摘要:1.明确需求 2.讨论制作产品原型(https://modao.cc,https://www.axure.com) 3.美工根据产品原型制作UI 4.前后端根据产品原型确定网络接口并制定网络数据传输协议(较多都是json,需要确定的是字段),写接口文档 5.前后端根据业务需要指定对应的数据对象,设计
阅读全文
摘要:密码:gzhuacm512 喝茶补番码专题之五十二:数论补充 喝茶补番码专题之四十九:容斥原理和莫比乌斯 喝茶补番码专题之二十九:插头DP 喝茶补番码专题之二十七:数位DP 喝茶补番码专题之二十五:polya 喝茶补番码专题之十二:组合数学基础 数学训练六 概率/期望 数学训练三 数学训练二 cou
阅读全文
摘要:1 apt install ***-libev 2 ssPath=/etc/***-libev/config.json 3 4 #config.json 5 echo " 6 { 7 \"server\":\"0.0.0.0\", 8 \"server_port\":
阅读全文
摘要:这样rows里存的是第一条命令的结果 但prepare时不允许多条命令,会报错 pq: 无法插入多条命令到一个准备好的语句中
阅读全文
摘要:转自 PostgreSQL 添加各种约束语法 1. 添加主键 alter table goods add primary key(sid); 2. 添加外键 alter table orders add foreign key(goods_id) references goods(sid) on u
阅读全文
摘要:弄网站时出现一个奇怪的现象,第一次访问很快就访问到了,后面一刷新就卡在那,有时侯能返回,有时候返回504 gateway timeout 网上搜了一下为什么gateway timeout ,说是nginx的问题,但重启nginx还是这样 最后sudo reboot重启服务器之后就不会出现这个问题了
阅读全文
摘要:postgres: /etc/postgresql/9.5/main/ environment pg_ctl.conf pg_hba.conf pg_ident.conf postgresql.conf start.conf postgresql.conf 修改: pg_hba.conf修改: mo
阅读全文
摘要:Cannot assign requested address解决办法 apache ab压力测试报错(apr_socket_recv: Connection reset by peer (104)) 报错connect:Cannot assign requested address 按字面意思是不
阅读全文
摘要:Keyboard shortcuts Keyboard shortcuts Keyboard shortcuts are combinations of keys that allow you to perform actions, such as opening the settings dial
阅读全文
摘要:Google Chrome快捷键大全 Chrome窗口和标签页快捷键:Ctrl+N 打开新窗口 Ctrl+T 打开新标签页 Ctrl+Shift+N 在隐身模式下打开新窗口 Ctrl+O,然后选择文件 在谷歌浏览器中打开计算机上的文件 按住 Ctrl 键,然后点击链接 从后台在新标签页中打开链接,但
阅读全文
摘要:golang的select典型用法 golang 的 select 的功能和 select, poll, epoll 相似, 就是监听 IO 操作,当 IO 操作发生时,触发相应的动作。 示例: 注意到 select 的代码形式和 switch 非常相似, 不过 select 的 case 里的操作
阅读全文
摘要:chrome浏览器更换favicon.ico后不更新缓存 1、按ctrl+F5强制刷新或网页上右键重新载入。2、再不行就删除缓存。3、但这样太讨厌了,还有个小窍门屡试不爽,那就是直接在浏览器地址栏访问favicon文件。4、如果访问还是原先的ico文件,在浏览图片时刷新一下,再回到网站看一下,已经解
阅读全文
摘要:ssh -p port user@ip "rm -r filePath" 直接远程执行删除命令 ssh -p port user@ip rm -r filePath 同上 scp -r -P 23456 localFilePath user@ip:remoteFilePath 将本地的文件复制到远程
阅读全文
摘要:go cmd 的命令里不能ssh user@ip "rm /home/public" 最后的参数”/home/public"不要写引号("),不然会执行命令失败,但命令行里不加引号可以执行,所以尽量不要加引号 要注意的是一个fsnotify.Watcher能watch多个文件和文件夹,不要一个Wat
阅读全文
摘要:c++封装编写线程池 可以模拟go 的postgresql连接池,但要自己模拟实现c++的channal
阅读全文
摘要:自动挂载配置文件: /etc/fstab 先手动将所有磁盘打开,再用ps -ef | grep mount.ntfs查出所有磁盘的mount状态,粘贴到/etc/fstab改一下,重启就看到效果了 参考自 ubuntu14.04开机自动挂载windows磁盘的配置方法
阅读全文
摘要:查看日志:journalctl -xe 重新加载更新了的service:systemctl daemon-reload 设置ssh.service自启:systemctl enable ssh.service 关闭ssh.service自启:systemctl disable ssh.service
阅读全文
摘要:客户端访问的ip写错或者服务端的listen ip写错 listen(":8080") == listen("0.0.0.0:8080”) 可以用127.0.0.1:8080访问,也可以用网卡ip:8080访问 listen("127.0.0.1:8080")只能通过127.0.0.1:8080访问
阅读全文
摘要:ulimit -a 查看限制显示: ulimit -n 65535将 open files的限制改大 这里只是改变当前shell的限制 全局改变把ulimit -n 65535加到/etc/profile 或者将这个语句加到启动指定程序的shell脚本 参考自Too many open files
阅读全文
摘要:ACM模板 用于简化模运算的定理 欧拉定理 a与m互质,a^phi(m)%m==1-->m为质数 a^(m-1)%m==1 威尔逊定理 p为素数 (p-1)!%p==p-1 1 费马定理 p为素数,a和p互质,a^(p-1)%p==1 费马小定理 p为素数,a^p%p==a-->(a^p/a)%p=
阅读全文
摘要:Given 5 integers: a, b, c, d, k, you're to find x in a...b, y in c...d that GCD(x, y) = k. GCD(x, y) means the greatest common divisor of x and y. Sin
阅读全文
摘要:1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long LL; 4 const int N=1e6+10; 5 const int INF=0x3f3f3f3f; 6 int cas=1,T; 7 int c[N];
阅读全文
摘要:1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long LL; 4 void gcd(LL a, LL b, LL &d, LL &x, LL &y) 5 { 6 if (!b) 7 { 8 d = a; 9 x =
阅读全文
摘要:1 #include <bits/stdc++.h> 2 using namespace std; 3 int p,x,y,a[26]; 4 bool init(int s) 5 { 6 int i=s/50%475; 7 for (int j=0;j<25;j++) 8 { 9 i=(i*96+4
阅读全文
摘要:1 package Network 2 3 import ( 4 "SQL/myDB" 5 "database/sql" 6 "logs" 7 "net/http" 8 ) 9 10 func dbPage(w http.ResponseWriter, req *http.Request) { 11
阅读全文
摘要:1 func newfileUploadRequest(uri string, form map[string]string, formFileName, path string) error { 2 file, err := os.Open(path) 3 if err != nil { 4 re
阅读全文
摘要:1 package Network 2 3 import ( 4 "encoding/base64" 5 "encoding/json" 6 "net/http" 7 "os" 8 "strings" 9 "time" 10 "token" 11 ) 12 13 func getFile(w htt
阅读全文
摘要:修改ubuntu DNS的步骤
阅读全文
摘要:测并发时由于使用db时没有lock,当连接数超过postgres设定的最大值时报错too many clients,于是问了下老师,老师说用连接池,一开始打开固定个数的db,每次都用这些db,而且每个db用的时候要加锁 于是就开始想如何用lock来实现每次让进来的数据库请求排队,每次分配一个空闲的d
阅读全文
摘要:1 package token 2 3 import ( 4 "crypto/md5" 5 "fmt" 6 "io" 7 "math/rand" 8 "sync" 9 "time" 10 ) 11 12 type User struct { 13 ID string 14 Timer *time.T
阅读全文
摘要:Bookmarks Bookmarks 书签栏 菜鸟教程 菜鸟教程 - 学的不仅是技术,更是梦想!菜鸟工具 - 不止于工具JSON 在线解析 | 菜鸟工具CST实验报告管理系统 postgresql PostgreSQL新手入门 - 阮一峰的网络日志5.4 使用PostgreSQL数据库 - [ G
阅读全文
摘要:1 #include <stdio.h> 2 #include <pthread.h> 3 #include <semaphore.h> 4 #include <unistd.h> 5 #define MAXSTACK 100 6 int stack[MAXSTACK][2]; 7 int size
阅读全文

浙公网安备 33010602011771号