`
诗意的栖居
  • 浏览: 268632 次
  • 性别: Icon_minigender_2
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
解决方法: 1) file "__init__", replace: from sets import ImmutableSet  class DBAPISet(ImmutableSet):  with  class DBAPISet(frozenset) 2) file "converters.py", remove: from sets import BaseSet, Set 3) file "converters.py", change "Set" by "set&quo ...
1、由于自己使用的是MySQL 5.5社区服务器版本,由于Windows的有些头被移动到了Connector中,于是乎下载Connector,特意跑去岛国的镜像服务器上下载:mysql-connector-c-noinstall-6.0.2-win32.zip; 2、下载后解压到本地某处,修改MySQL-python解压目录下的setup_windows.py文件,直捣黄龙,将mysql_root改为你解压好的Connector目录,如下为自己的路径配置:    [python] view plaincopyprint?     mysql_root, dummy = 'E:\\Home ...
Q: 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? A: ''' method 1     最小公倍数一定是最大的数的倍数 ''' p = 20 flag = True while flag:     for i in range ...
Q: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers. A: ''' method 1     The palindrome can be written as: abccba Which then simpifies to: 100 ...
Q: The prime factors of 13195 are 5, 7, 13 and 29.    What is the largest prime factor of the number 600851475143 ? ################################ # shell                        # # echo 600851475143 | factor   # #600851475143: 71 839 1471 6857# ################################ import math ''' m ...
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-va ...
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. A: #! /usr/bin/env python #method 1 find = reduce(lambda x,y:x+y,[x for x in xrange(3,1000) if not x%3 or not x% ...
awk '/[^!-~]/' file asscii码从!到~中包含所有的大小写字母,和英文符号 cat file | grep "[^\u4e00-\u9fa5]"
一.  简介 Apache CXF 是一个Service框架,他简化了Service的创建, CXF实现了JAX-WS2.0规范,并通过了JAX-WS2.0 TCK; CXF和Spring无缝集成;CXF支持多种传输协议(HTTP, JMS, Corba等), 支持多种Binding数据格式(SOAP,XML,JSON等), 支持多种DataBinding数据类型(JAXB, Aegis) 。CXF基于Interceptor的架构,使得整个框架非常易于扩展。 二.  如何发布并调用简单的web service实例 2.1.下载:apache-cxf-2.1.1  http://cxf.apach ...
在两台服务器之间建立信任关系解决scp,ssh等不用输入密码等问题 在两台服务器之间建立信任关系解决scp,ssh等不用输入密码等问题 最近在编写定时python脚本时遇到一个问题。在该脚本中,需要使用scp命令将本地的文件复制到另一台机器中备份。但通常执行scp命令后都需要输入用户密码,这样在定时自动执行的python脚步中就不适用了。 后来在Internet中查找相关资料,有资料[1]介绍在两台机器的两个用户之间建立安全的信任关系后,可实现执行scp命令时不需要输入用户密码。(该方法对ssh也适用) 以下为了讨论方便,我们将执行scp命令的机器称为Client,scp命令操作的远端机器称为S ...
1、sqlite支持建立自增主键,sql语句如下: CREATE TABLE w_user( id integer primary key autoincrement, userename varchar(32), usercname varchar(32), userpassword varchar(32), userpermission varchar(32), userrole varchar(32), userdesc varchar(32) ); 2、联合主键 在建表时 CREATE TABLE tb_test ( bh varchar(5), id i ...
详细链接http://blog.csdn.net/linchunhua/article/details/7184439 $sqlite3 myDB #运行并且使用myDB这个数据库 SQLite version 3.7.2 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> .h #sqlite里面内置操作命令都以点(.)开头 .backup ?DB? FILE      Backup DB (default "main&quo ...
关于shell中的for循环用法很多,一直想总结一下,今天网上看到上一篇关于for循环用法的总结,感觉很全面,所以就转过来研究研究,嘿嘿... 1、 for((i=1;i<=10;i++));do echo $(expr $i \* 4);done 2、在shell中常用的是 for i in $(seq 10) 3、for i in `ls` 4、for i in ${arr[@]} 5、for i in $* ; do 6、for File in /proc/sys/net/ipv4/conf/*/accept_redirects; do 7、for i in f1 f2 f3 ; ...
转来的,原址http://www.cnblogs.com/raceblog/archive/2011/03/24/shell-delete-comm.html 因为在面试中遇到一个这样的问题,当时模模糊糊的,没有很确定的回答出来,后来上网查了一下结果,这里总结一下。 首先描述一下这个问题:比如两个文件file1和file2,删除两个文件中共同的部分,留下两个文件中独自有的部分。在网上找到一篇解决的答案,地址在这里http://hi.baidu.com/robertoyuan/blog/item/559483c4946ed5a78226acac.html。这里提到三种方法,但是没有给具体的解释 ...
VPN 报错 “The Network Connect session terminated. Do you want to re-connect?” “nc.windows.app.23711” 从网上查了好多办法,最后根据情况发现一个好的办法,就是重装(在有证书的情况下) 1. 卸载VPN的网络适配器     计算机-->属性-->设备管理器-->查看-->显示隐藏设备-->网络适配器-->Juniper Network Connect Virtual Adapter-->右键-->卸载 2. 卸载VPN的host checker 和 ...
Global site tag (gtag.js) - Google Analytics