自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(105)
  • 资源 (5)
  • 收藏
  • 关注

原创 UI自动化

Sahi ,selenium,casperjs,phatmjs,notejs,Protractor(angularjs框架 )

2016-09-06 11:27:32 340

原创 PL/sql sqlplus 运行一个sql 文件

sql> @D:\software\utplsql-2-3-0\code\ut_i_do install; 其他目录 没有和sqlplus在一个目录下面 sql> @my.sql; –当前目录

2016-07-19 14:54:43 702

原创 LeetCode 3Sum

class Solution(object): def threeSum(self, nums): """ :type nums: List[int] :rtype: List[List[int]] """ if nums is None: return [] len_nu

2016-07-10 14:23:53 303

转载 python 9种部署方法

http://www.jb51.net/article/51645.htm

2016-07-05 09:51:44 781

原创 django fastcgi window 部署 can't import flup.server.fcgi

python manage.py runfcgi host=127.0.0.1 port=8000 method=threaded 在后面加上 method=threaded 就可以了

2016-07-04 11:10:34 689

原创 LeetCode Longest Common Prefix

class Solution(object): def longestCommonPrefix(self, s): """ :type s: str :rtype: str """ if len(s) == 0: return '' if len(s) == 1:

2016-07-03 14:58:22 187

原创 oracle

alter system set local_listener = ‘(ADDRESS=(PROTOCOL=TCP)(HOST=ip)(PORT=8866))’ scope = both; alter system register; lsnrctl status lsnrctl start lsnrctl stop

2016-06-23 15:16:52 184

原创 python cross module global variable

跨模块的global variable 只能读取,不能更改 无效

2016-06-23 15:02:41 284

原创 python thread group argument must be none for now

http://stackoverflow.com/questions/15349997/assertionerror-when-threading-in-python 出错的代码: t = threading.Thread(crawl_temp, args=(thread_count, target_url, max_depth, crawl_timeout, crawl_interval))

2016-06-23 14:53:00 12624

原创 Leet Code Invert Binary Tree

# Definition for a binary tree node.# class TreeNode(object):# def __init__(self, x):# self.val = x# self.left = None# self.right = Noneclass Solution(object): def

2016-06-21 13:36:32 156

原创 Leet Code Maximum Depth of Binary Tree

class Solution(object): def maxDepth(self, root): """ :type root: TreeNode :rtype: int """ if root is None: return 0 if root.left is None

2016-06-21 12:55:40 194

原创 LeetCode Add Digits

class Solution(object): def addDigits(self, num): """ :type num: int :rtype: int """ if num == 0: return 0 return num - (num-1) / 9 * 9Ru

2016-06-21 11:14:26 195

原创 LeetCode Nim Game

class Solution {public: bool canWinNim(int n) { if (n % 4 == 0) return false; else return true; }};Runtime: 0 mspublic class Solution { public bool

2016-06-21 10:22:50 196

原创 leetcode Reverse String

class Solution(object): def reverseString(self, s): """ :type s: str :rtype: str """ if s is None: return None if len(s) == 1:

2016-06-16 11:15:49 287

原创 python django form error:module' object has no attribute '_meta'

test.pyfrom django.db import modelsfrom django.forms import ModelFormclass Book(**models.Model**): name = models.CharField(max_length=100) authors = models.ManyToManyField(Author)class BookFo

2016-06-13 14:48:28 3287 1

原创 python cx_Oracle api

official website: http://cx-oracle.readthedocs.io/en/latest/module.htmloracle: callproc callfunc http://www.oracle.com/technetwork/articles/prez-stored-proc-084100.html

2016-06-13 12:59:24 545

原创 Oracle 修改了 listener.ora 文件 在windows中的服务中启动,但是 lsnrctl status没有监听到数据库 xe或者是 orcl

需要 用数据库管理员 set local_listener 并且注册下;sqlplus /nolog conn system … password … connected. alter system set local_listener = ‘(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))’ scope = both; … syste

2016-06-04 16:16:26 2125

原创 安装oracle数据库 第一次登录使用

oracle 11g有两个版本 1 express(都是下一步安装) (安装后是xe) Oracle Database Express Edition 11g Release 2 (适合个人使用,如果自己练习就够用了)标准版 (都是下一步安装)(安装后市orcl) Oracle Database 11g Release 2 (11.2.0.1.0) Standard Edition,

2016-06-04 15:41:02 6458

原创 Oracle PL/SQL入门学习

Case用法 declareb1 VARCHAR2(50);BEGIN b1 := 'd'; CASE b1 WHEN 'b' THEN DBMS_OUTPUT.put_line('b'); WHEN 'c' THEN DBMS_OUTPUT.put_line('c'); else DBMS_OUTPUT.put_line('none'); --if non

2016-05-20 17:33:06 283

转载 python automated headers 自动生成格式化 注释文件 docstrings

http://stackoverflow.com/questions/6201302/how-to-have-automated-headers-for-python-filestemplate: /******************************************************************* * @file * * @date * @a

2016-05-10 15:57:29 389

原创 python 多线程 实现 生产者-消费者(四)

from time import ctimefrom time import sleepimport Queueimport randomimport my_threaddef writeQ(queue): print 'producing object for Q...' queue.put('xxx') print 'Queue size:', queue.qsi

2016-05-07 14:39:42 868

原创 python 多线程 threading (三)

thread 支持守护线程from time import ctimefrom time import sleepimport my_threaddef fib(x): sleep(0.005) if x < 2: return 1 return fib(x-2) + fib(x-1)def fac(x): sleep(0.1) if x

2016-05-07 13:04:01 462

原创 python 多线程 thread 加锁(二)

thread.start_new_thread(function,args[,kwargs])函数原型,其中function参数是你将要调用的线程函数名称没有括号; args是讲传递给你的线程函数的参数,他必须是个tuple类型;而kwargs是可选的参数,如果没有参数,也一定是()import threadfrom time import sleepfrom time import ctim

2016-05-07 11:20:12 705

原创 python 多线程 thread 不推荐使用(一)

不推荐使用thread线程什么时候结束完全没有控制,当主线程结束时,所有的线程都会被强制结束 如:import threadfrom time import sleepfrom time import ctimedef loop0(): print 'start loop0 at:', ctime() sleep(2) print 'end loop0 at:', ct

2016-05-07 10:25:10 1008

转载 使用 python urllib2 抓取网页时出现乱码的解决方案

http://www.zhxl.me/1409.html这里记录的是一个门外汉解决使用 urllib2 抓取网页时遇到乱码、崩溃、求助、解决和涨经验的过程。这类问题,事后看来只是个极小极小的坑,不过竟然花去很多时间,也值得记录一下。过程如下: 目标:抓取 http://sports.sina.com.cn/g/premierleague/index.shtml 代码:1 2 3 4 5

2016-05-05 19:24:12 453

原创 python 写文件 包含中文 'ascii' codec can't decode byte 0xe8

解决方法: 添加 import sys reload(sys) sys.setdefaultencoding(‘utf8’)即可

2016-04-28 11:11:33 509

原创 sklearn raise ImportError('[joblib] Attempting to do parallel computing n_jobs > 1 windows

在windows下面运行 sklearn 中的代码,如果遇到 并行执行 n_jobs > 1 就会出现: raise ImportError(‘[joblib] Attempting to do parallel computing ’ ImportError: [joblib] Attempting to do parallel computing without protecting you

2016-04-28 11:01:17 1736 2

转载 Django js css 静态资源(二)超级棒

https://segmentfault.com/a/1190000000358284SegmentFault 问答文章笔记职位活动搜索 输入关键字搜索 消息注册 · 登录 home feed javascript php python java mysql ios android node.js html5 linux c++ css3 git golang

2016-04-24 11:35:20 745

转载 Django 静态文件 js css 访问(一)

http://www.cnblogs.com/starof/p/4682812.htmlstarof 博客园首页新随笔联系订阅 管理 随笔 - 155 文章 - 0 评论 - 249 django静态文件配置一、django静态文件配置原理 静态文件配置就是为了让用户请求时django服务器能找到静态文件返回。首先要理解几个概念:媒体文件:用户上传的文件 静态文件:css,js,ima

2016-04-24 11:33:49 736

转载 [django]在页面中正常显示包含html标记的内容,富文本信息显示

在我们使用django开发类似于博客这样的系统中,肯定会有一些富文本的内容,就是说在编辑的时候,可以进行加粗、字体、段落、表格等等操作。 我们会把编辑好的内容存储起来,然后在用的时候读取出来显示,但是如果直接显示,会把富文本的标记一起显示,而没有真正显示富文本的效果。 这是因为django的模板系统做了一些工作,例如,把<转换为&lt,把>转换为&gt等等,这些被转义了的符号,会直接显示在页面上

2016-04-21 09:49:27 2986

原创 断网后,看不到自己的牌,也不能操作,只能看到其他人出牌

原因分析: 启你的应用服务即可。主要可能时ip变动了。另一个就是应用的连接池没有实现断线重连机制 ———- 没别的错误,只是网络连接中断造成数据库连中断啦,

2016-04-15 15:51:58 258

原创 msvcr100.dll 丢失

go tohttps://social.technet.microsoft.com/Forums/windows/en-US/52f0bd37-9a08-41b6-bb43-fa01ef3ebc4a/msvcr100dll-is-missing?forum=w8itprogeneralhttps://www.microsoft.com/en-us/download/confirmation.aspx

2016-04-11 19:46:29 419

原创 django manage.py Unknown command: 'runfcgi'

当我们使用python django manage.py runfcgi 时,有时候会出现错误: Unknown command: ‘runfcgi’ 这是由于django版本,在1.9以上不支持runfcgi命令,如果要使用 runfcgi,将django的版本 更换到 1.8 就可以了

2016-04-07 13:11:17 4991

原创 Jenkins 上配置节点 windows机器

登录Jenkins, 1. 点击“管理节点” 2. 点击“新建节点” 3. 4. 点击“OK” 5. 6. 点击“状态” 7. 8. 点击“langch”,下载slave-agent.jnlp 9. 将“slave-agent.jnlp”文件copy到 windows机器上(要有java),双击即可 10. 显示connected就说明可以了: 11.

2016-04-01 13:20:20 501

转载 启动apache Fail

由于apache默认是监听80端口,如果你的电脑iis是启动状态,并且也使用了80端口,apache将无法正常启动,需要先停止iis,另外迅雷也可能会使用80端口,所以也要关闭迅雷。查看80端口是否被占用,命令行下输入: netstat -aon|findstr “80” 如果看到如图的结果,说明80端口已被使用,需要先关闭相关软件,或者修改apache默认的监听端口 打开apache目录下的

2016-03-22 20:03:12 706

转载 python Custom template tags and filters is not a valid tag library

http://stackoverflow.com/questions/8607544/django-could-not-load-template-tag/21588173#21588173suppose you have the following structure:– Application_Name——-templatetags————–init.py————–templates_extra

2016-03-16 19:00:57 417

原创 Mysql 安装过程 zip安装

在官网下载 zip 包:mysql-5.7.11-winx64.zip解压缩修改my-default.ini 文件 添加:default-character-set = gbk (只能是英文的) 修改: basedir = D:\software\mysql-5.7.11-winx64 datadir = D:\software\mysql-5.7.11-winx64\data到bi

2016-03-02 11:32:06 241

原创 cx_Oracle.InterfaceError: Unable to acquire Oracle environment handle

上述问题解决: copy instent client下所有的.dll文件到python安装包的lib/sit_pageages

2016-02-24 19:18:33 1411

原创 Python oracle ImportError: DLL load failed: 找不到指定的程序 or dll load failed 不是有效的 win32 应用程序。

安装cx_Oracle的步骤: 1. 查看自己的oracle的版本和位数,如我的是 11g,64bits我的python是2.7版本的,就需要下载这个 2. 双击进行安装可能会报错 ImportError: DLL load failed: 找不到指定的程序需要到oracle下载instant client (一定要下载对应位数的Instant Client (你的电脑的bits))

2016-02-19 11:34:35 883

原创 python 命令行参数

import sysprint 'argc:'print len(sys.argv)print "argv:"print sys.argv结果: D:>python testargv.py ahishis hshishi shdhihi argc: 4 argv: [‘testargv.py’, ‘ahishis’, ‘hshishi’, ‘shdhihi’]

2016-02-01 10:39:56 386

Sonar Code Quality Testing Essentials

This is a step-by-step tutorial enriched with practical examples and the necessary screenshots for easy and quick learning. This book is for you if you are a Java developer or a Team Manager familiar with Java and want to ensure the quality of your code using Sonar.

2018-11-05

三级模式二级映像

这一篇对数据库系统的结构进行介绍的文章。

2012-07-20

sql面试题目

一个SQL面试题,不是很难,但是很基础,还有一点.net开发

2012-06-07

最大公约数算法欧几里德和stein

用c#实现的最大公约数算法欧几里德和stein,递归和非递归的都有了,stein算法在大数方面比欧几里德要好些

2012-05-03

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除