.net

.net

 

2015年5月7日

Python 操作FTP

摘要: 1 import sys, os, ftplib, socket 2 3 4 CONST_HOST = "FTP服务器地址" 5 CONST_USERNAME = "FTP用户名" 6 CONST_PWD = "FTP密码" 7 8 9 CONST_BUFFER_SIZE = 819210... 阅读全文

posted @ 2015-05-07 11:42 严杰 阅读(286) 评论(0) 推荐(0) 编辑

2015年3月27日

SQLserver 查看数据库包含指定数据的表(字段)

摘要: 找出所有字段 1 select a.name as columnname,object_name(a.id)as tablename into t from syscolumns a, 2 sysobjects b, 3 systypes c 4 where a.id=b.id 5 and a... 阅读全文

posted @ 2015-03-27 14:29 严杰 阅读(364) 评论(0) 推荐(0) 编辑

2015年2月28日

Python 单例

摘要: 方法1: 1 class Singleton(object): 2 def __new__(cls, *args, **kwargs): 3 if '_inst' not in vars(cls): 4 cls._inst = super(Single... 阅读全文

posted @ 2015-02-28 09:21 严杰 阅读(147) 评论(0) 推荐(0) 编辑

2014年10月28日

supervisor 配置

摘要: 1. 生成配置文件$ echo_supervisord_conf > /etc/supervisord.conf2.修改配置文件vi /etc/supervisord.conf找到[include]files = /etc/supervisor/conf.d/*.conf然后再/etc/superv... 阅读全文

posted @ 2014-10-28 13:55 严杰 阅读(9751) 评论(0) 推荐(0) 编辑

2014年10月18日

单链表

摘要: 1 package com.comm; 2 3 4 5 public class LinkList { 6 public class Node{ 7 public int data; 8 public Node next; 9 publ... 阅读全文

posted @ 2014-10-18 11:50 严杰 阅读(103) 评论(0) 推荐(0) 编辑

2014年10月17日

二叉排序树

摘要: 1 package com.asus.comm; 2 3 public class Tree { 4 public class node{ 5 public node left; 6 public node right; 7 ... 阅读全文

posted @ 2014-10-17 16:01 严杰 阅读(105) 评论(0) 推荐(0) 编辑

2014年7月4日

python 排序

摘要: python 写的排序,实现起来还是比较简单 1 #快速排序 2 def qsort(L): 3 if len(L)>1: 4 return qsort([i for i in L[1:] if i=L[0]]) 5 else: 6 return L... 阅读全文

posted @ 2014-07-04 11:37 严杰 阅读(146) 评论(0) 推荐(0) 编辑

2014年4月10日

64 位 Ubuntu 下 android adb 不可用解决方法

摘要: 解决方案: 安装ia32-libs 在终端执行 sudo apt-get install ia32-libs 其间会提示所依赖的某些包不存在,直接 sudo apt-get 安装即可。 阅读全文

posted @ 2014-04-10 21:24 严杰 阅读(146) 评论(0) 推荐(0) 编辑

2014年3月17日

python 获取文件夹大小

摘要: __author__ = 'bruce'import osfrom os.path import join,getsizedef getdirsize(dir): size=0l for (root,dirs,files) in os.walk(dir): ... 阅读全文

posted @ 2014-03-17 17:53 严杰 阅读(4889) 评论(0) 推荐(0) 编辑

2014年3月14日

Ubuntu mongodb 安装和配置

摘要: 安装 MongoDB sudo apt-get install mongodb sudo apt-get install mongodb 关闭/启动 sudo service mongodb stop sudo service mongodb start 设置数据库连接密码: 在跟... 阅读全文

posted @ 2014-03-14 09:26 严杰 阅读(24724) 评论(0) 推荐(1) 编辑

导航