摘要: db.table.remove({"query": {"$regex": "user=.*|sys=None|item=None|game=None|type=None|race=None", "$nin": ["None"]}}) 阅读全文
posted @ 2017-02-17 15:30 sooflow 阅读(711) 评论(0) 推荐(0) 编辑
摘要: 使用slot能降低内存使用,同时也不能对实例新增属性。 For classes that primarily serve as simple data structures, you can often greatly reduce the memory footprint of instances 阅读全文
posted @ 2016-12-20 14:47 sooflow 阅读(1355) 评论(0) 推荐(0) 编辑
摘要: 常用参数curl命令参数很多,这里只列出我曾经用过、特别是在shell脚本中用到过的那些。-v/--verbose 小写的v参数,用于打印更多信息,包括发送的请求信息,这在调试脚本是特别有用。-m/--max-time 指定处理的最大时长-H/--header 指定请求头参数-s/--slien... 阅读全文
posted @ 2015-06-07 13:33 sooflow 阅读(143) 评论(0) 推荐(0) 编辑
摘要: server_name www.blog.com if ($host != 'www.blog.com' ) { rewrite ^/(.*)$ http://www.blog.com/$1 permanent; } 如果访问的网址是 www.1.com... 阅读全文
posted @ 2015-06-07 13:14 sooflow 阅读(100) 评论(0) 推荐(0) 编辑
摘要: wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz安装: 66 tar -zxvf libmcrypt-2.5.7.tar.gz 67 cd libmcrypt-2.5.7 68 m... 阅读全文
posted @ 2015-05-11 20:08 sooflow 阅读(405) 评论(0) 推荐(0) 编辑
摘要: ./bin/mysqld: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or dire可以看出缺少库文件 libstdc++.so.5。到官方下载... 阅读全文
posted @ 2015-05-11 19:32 sooflow 阅读(570) 评论(0) 推荐(0) 编辑
摘要: (1)打开putty客户端1.填写linux服务器的ip,选择连接类型为ssh。2.填写该连接名称,然后save。(2)设置putty秘钥1.打开putty秘钥产生器,点击generate,同时鼠标在进度条不断移动(加快产生速度),然后填写秘钥密码,再点击save private key保存秘钥文件... 阅读全文
posted @ 2015-03-14 16:27 sooflow 阅读(307) 评论(0) 推荐(0) 编辑
摘要: C#中用ADO连接数据库一般是自己先新建一个类,声明一个SqlConnection变量(用于连接数据库),把对数据库的操作写成方法放在类中。下面是我自己写的一个数据库类。写这个类的时候要加入using System.Data.SqlClient;(因为引用了sql操作的一些类) 1 public c... 阅读全文
posted @ 2014-08-15 16:28 sooflow 阅读(861) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 using namespace std; 4 struct node{ 5 node *left; 6 node *right; 7 int height; 8 int data; 9 node(int x):data(x),left(NULL),right(NULL),height(0){} 10 }; 11 struct avl 12 { 13 node* root; 14 int Height(node *NODE) { 15 if(NODE==NULL) return -1; ... 阅读全文
posted @ 2013-12-17 19:26 sooflow 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 第一种方法 标记一下开始和结束时间 然后扫一遍 就能得出答案了#include#includeconst int maxn=1000000+5;int vis[maxn];int main(){ int n,x,y; scanf("%d",&n); memset(vis,0,sizeof(vis)); int up=0; for(int i=0;iup) up=y; vis[x]++; vis[y]--; } int ans1=0,ans2=0; int cur=0,cnt1=0,cnt2=0; bool st... 阅读全文
posted @ 2013-12-17 19:23 sooflow 阅读(450) 评论(0) 推荐(0) 编辑