上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 127 下一页

阿里云服务器ssh经常一段时间就断掉解决办法

摘要: #vim /etc/ssh/sshd_config找到下面两行#ClientAliveInterval 0#ClientAliveCountMax 3去掉注释,改成ClientAliveInterval 30ClientAliveCountMax 86400这两行的意思分别是1、客户端每隔多少秒向服务发送一个心跳数据2、客户端多少秒没有相应,服务器自动断掉连接重启sshd服务#service ss... 阅读全文
posted @ 2020-06-02 15:10 katago 阅读(329) 评论(0) 推荐(0) 编辑

阿里云上安装python3.7 虚拟环境

摘要: ubuntu 14.04 发现只有python3.5添加源:add-apt-repository ppa:deadsnakes/ppaapt-get updateapt-get install python3.7 python3.7-venv. venv/bin/activatepip install Flask 阅读全文
posted @ 2020-06-02 14:37 katago 阅读(543) 评论(0) 推荐(0) 编辑

使用Cookie实现账号共享

摘要: 本文简要介绍如何通过共享cookie完成账号共享(共享cookie的起因是部分基于微信小程序的平台并不支持直接的账号密码登陆,需要扫码,无法直接通过共享账号密码完成账号共享;除此之外,cookie共享账号还可以用在诸如短期共享账号而不泄露密码、不被服务器查封等场景下)工具:Chrome(即谷歌浏览器)、Chrome插件:EditThisCookie操作:1.前期准备:安装EditThisCooki... 阅读全文
posted @ 2020-05-29 16:47 katago 阅读(3042) 评论(0) 推荐(0) 编辑

浅谈Js 操作Cookie,以及HttpOnly 的限制

摘要: . Js 操作 Cookie.一般来说,只有服务器操作Cookie 才能保证一些必要的安全。但有时候,可能需要前端来增删改查 Cookie, 这个时候咱们的主角出现了——HttpOnly(๑•̀ㅂ•́) ✧.HttpOnly: HttpOnly is an additional flag included in a Set-Cookie HTTP response header. Using th... 阅读全文
posted @ 2020-05-29 15:29 katago 阅读(9892) 评论(0) 推荐(0) 编辑

poj 1816 trie树+dfs(强烈推荐,含有通配符的匹配)

摘要: // https://www.cnblogs.com/buptLizer/archive/2011/09/18/2180723.html #include #include #include #include using namespace std; const int N=100002; const int sonNum=28; struct nodeIdx{ ... 阅读全文
posted @ 2020-05-28 16:46 katago 阅读(243) 评论(0) 推荐(0) 编辑

ACM输入输出之python

摘要: Python的输入数野生字符串,需要自己转型,常用的转型函数有: strip :将两端的空白字符去掉,返回str slipt :将字符串用空白字符分开,返回[str] map:把list里面的值映射到指定类型,返回[type] isspace:是否用空行组成 EOF用来抓异常 输出加','不换行 Python3不能用raw_input(),而是用input()就行了,输出必须加“... 阅读全文
posted @ 2020-05-28 16:11 katago 阅读(490) 评论(0) 推荐(0) 编辑

python生成随机数、随机字符串

摘要: import random import string # 随机整数:包含头尾 print random.randint(1,50) # 随机选取0到100间的偶数: print random.randrange(0, 101, 2) # 随机浮点数: print random.random() [0,1) print random.uniform(1,... 阅读全文
posted @ 2020-05-28 16:09 katago 阅读(764) 评论(0) 推荐(0) 编辑

lower-bound 自己实现

摘要: // https://vjudge.net/problem/HackerRank-cpp-lower-bound 大致题意和这个差不多 #include #include #include using namespace std; const int maxn=100000+10; int a[maxn]; int n; int q; int my_low... 阅读全文
posted @ 2020-05-27 16:45 katago 阅读(252) 评论(0) 推荐(0) 编辑

c浮点数怎么四舍五入

摘要: #include /* printf */ #include /* round, floor, ceil, trunc */ inline int myIntRound(double dInput) { if(dInput >= 0.0f) { return ((int)(dInput + 0.5f)); } re... 阅读全文
posted @ 2020-05-27 15:51 katago 阅读(1106) 评论(0) 推荐(0) 编辑

Communication error with Jack server (60), try 'jack-diagnose' or see Jack server log

摘要: 报错原因 jack不支持多用户同时编译,所以经常出现jack server报错的现象 解决方法 编辑 $home/.jack,$home/.jack-settings 和 $home/.jack-server/config.properties,修改SERVER_PORT_SERVICE和SERVER_PORT_ADMIN的端口号,然后保存。 如果权限不对可以执行下面的命令修改权限: ... 阅读全文
posted @ 2020-05-27 10:20 katago 阅读(931) 评论(0) 推荐(0) 编辑
上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 127 下一页