postgres复制表结构
2014年6月17日 11:18
- 复制表结构
create table his_process_data_201405 as ( select * from his_process_data_201406 limit 0)
- 完整复制一张表
create table his_process_data_201405 as ( select * from his_process_data_201406)
create table his_process_data_201405 as ( select * from his_process_data_201406 limit 0)
create table his_process_data_201405 as ( select * from his_process_data_201406)
c:\Python27>python -m SimpleHTTPServer 80 Serving HTTP on 0.0.0.0 port 80 ...
[wyq@localhost ~]$ ssh wyq@192.168.1.107 Received disconnect from 192.168.1.107: 2: Too many authentication failures for wyq
[wyq@localhost ~]$ ssh -v wyq@192.168.1.107 OpenSSH_6.4, OpenSSL 1.0.1e-fips 11 Feb 2013 debug1: Reading configuration data /home/wyq/.ssh/config debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 51: Applying options for * debug1: Connecting to 192.168.1.107 [192.168.1.107] port 22. debug1: Connection established. debug1: identity file /home/wyq/.ssh/id_rsa type 1 debug1: identity file /home/wyq/.ssh/id_rsa-cert type -1 debug1: identity file /home/wyq/.ssh/id_dsa type -1 debug1: identity file /home/wyq/.ssh/id_dsa-cert type -1 debug1: identity file /home/wyq/.ssh/id_ecdsa type -1 debug1: identity file /home/wyq/.ssh/id_ecdsa-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.4 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.4 debug1: match: OpenSSH_6.4 pat OpenSSH* debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none debug1: sending SSH2_MSG_KEX_ECDH_INIT debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ECDSA 66:29:e1:f3:32:92:64:da:98:bc:ab:f8:9c:a4:63:02 debug1: Host '192.168.1.107' is known and matches the ECDSA host key. debug1: Found key in /home/wyq/.ssh/known_hosts:21 debug1: ssh_ecdsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Next authentication method: gssapi-keyex debug1: No valid Key exchange context debug1: Next authentication method: gssapi-with-mic debug1: Unspecified GSS failure. Minor code may provide more information Cannot determine realm for numeric host address debug1: Unspecified GSS failure. Minor code may provide more information Cannot determine realm for numeric host address debug1: Unspecified GSS failure. Minor code may provide more information debug1: Unspecified GSS failure. Minor code may provide more information Cannot determine realm for numeric host address debug1: Next authentication method: publickey debug1: Offering RSA public key: /home/wyq/.ssh/id_rsa debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Trying private key: /home/wyq/.ssh/id_dsa debug1: Trying private key: /home/wyq/.ssh/id_ecdsa debug1: Next authentication method: password wyq@192.168.1.107's password:
debug1: Next authentication method: gssapi-keyex debug1: Next authentication method: gssapi-with-mic debug1: Next authentication method: publickey debug1: Next authentication method: password
[wyq@localhost ~]$ sudo pip install pymssql Downloading/unpacking pymssql Downloading pymssql-2.1.0.tar.bz2 (1.9MB): 0% 8.2kB Downloading pymssql-2.1.0.tar.bz2 (1.9MB): 1.9MB downloaded Running setup.py egg_info for package pymssql setup.py: platform.system() => 'Linux' setup.py: platform.architecture() => ('64bit', 'ELF') setup.py: platform.linux_distribution() => ('Fedora', '20', 'Heisenbug') setup.py: platform.libc_ver() => ('glibc', '2.2.5') setup.py: Not using bundled FreeTDS setup.py: include_dirs = ['/usr/local/include'] setup.py: library_dirs = ['/usr/local/lib'] warning: no files found matching 'pymssql_version.py' warning: no files found matching 'win32/freetds.zip' warning: no previously-included files matching '*' found under directory 'docs/_build' Installing collected packages: pymssql Running setup.py install for pymssql setup.py: platform.system() => 'Linux' setup.py: platform.architecture() => ('64bit', 'ELF') setup.py: platform.linux_distribution() => ('Fedora', '20', 'Heisenbug') setup.py: platform.libc_ver() => ('glibc', '2.2.5') setup.py: Not using bundled FreeTDS setup.py: include_dirs = ['/usr/local/include'] setup.py: library_dirs = ['/usr/local/lib'] building '_mssql' extension gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/local/include -I/usr/include/python2.7 -c _mssql.c -o build/temp.linux-x86_64-2.7/_mssql.o -DMSDBLIB _mssql.c:346:22: 致命错误:sqlfront.h:没有那个文件或目录 #include "sqlfront.h" ^ 编译中断。 error: command 'gcc' failed with exit status 1 Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip_build_root/pymssql/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-K_4vEY-record/install-record.txt --single-version-externally-managed: setup.py: platform.system() => 'Linux' setup.py: platform.architecture() => ('64bit', 'ELF') setup.py: platform.linux_distribution() => ('Fedora', '20', 'Heisenbug') setup.py: platform.libc_ver() => ('glibc', '2.2.5') setup.py: Not using bundled FreeTDS setup.py: include_dirs = ['/usr/local/include'] setup.py: library_dirs = ['/usr/local/lib'] running install running build running build_ext building '_mssql' extension creating build creating build/temp.linux-x86_64-2.7 gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/local/include -I/usr/include/python2.7 -c _mssql.c -o build/temp.linux-x86_64-2.7/_mssql.o -DMSDBLIB _mssql.c:346:22: 致命错误:sqlfront.h:没有那个文件或目录 #include "sqlfront.h" ^ 编译中断。 error: command 'gcc' failed with exit status 1 ---------------------------------------- Cleaning up... Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip_build_root/pymssql/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-K_4vEY-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip_build_root/pymssql Traceback (most recent call last): File "/bin/pip", line 9, in <module> load_entry_point('pip==1.4.1', 'console_scripts', 'pip')() File "/usr/lib/python2.7/site-packages/pip/__init__.py", line 147, in main return command.main(args[1:], options) File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 169, in main text = '\n'.join(complete_log) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 21: ordinal not in range(128)
sudo yum install freetds-devel
我们听经有没有好处?有好处,这个好处就是薰习,一遍一遍的薰习,你才能真觉悟。我们像一根木头掉在水里,在水里泡了几千年,湿透了,今天拿出来用一支火柴去把它点燃,能不能点燃?点不燃。不要紧,再点一支,点上一万支,点上十万支,点上一百万支,点燃了。这叫什么?长时薰修,肯定它会燃的,木头怎么会不燃?水里面泡久了,就是习气太深、习气太重,经虽然是听明白,回不了头来,一转眼老毛病又发了,就这么个道理,怎么点都点不燃。这就说明长时薰修的必要。
像惠能大师那种人,那一点就燃,佛法里称他做上上根人。怎么那么容易就开悟?祖师大德告诉我们,他不是偶然的,他是无量劫就在修大乘。就好像这一根泡在水里的木头,它已经被燃烧过一百万次,还没有点著,这一支就把它点著。我们呢?我们前面没有这个数字,没有长时间薰修。有没有薰修?肯定有,如果要是没有的话,这个经你听不下去,你在这里两小时坐不住。你不相信到外面找个人来,你叫他在这里坐两个钟点,他能坐五分钟就不错,坐不住!那就是什么?他没善根。你能坐得住,证明你过去决定不止一世、二世、三四五世,你大概至少也有十几二十世的薰修,你听到佛法才能欢喜,才欢欢喜喜能坐两个钟点,天天都会来,不是容易事情。还是转不过来,就是习气太重,烦恼太深,天天薰习对你就有很大的帮助。如果每天不间断,连续薰个十年、二十年、三十年,你成功了,你就会大彻大悟。
净土宗的人大彻大悟就是彻底放下,身心世界、世出世法统统放下,一部经、一句佛号。这是什么?这是真正觉悟的人,不是真正觉悟的人做不到。诸位细细想想,取西方极乐世界,亲近阿弥陀佛,不是难事。善导大师所说「万修万人去」,一个都不漏,这个话是真的,不是假的。李老师告诉我们,一万个念佛人,真正能往生的也只有三、五个人。他的话也是真的,不是假的。为什么?大多数念佛人不想去,口里想,心里不想,口里说要去,心里对这个世间还留恋得很,不肯放下,不是去不了,不想去那就没法子。所以能不能往生,权操在你自己手上,谁都管不了。往生的权不是在阿弥陀佛手上,这个要知道,在自己的手上,自己想不想去。
通常的包管理工具是npm,npm使用的镜像源在国外,经常被gfw屏蔽掉.
发现另一个包管理工具cnpm,可以正常使用.
npm install -g cnpm --registry=http://r.cnpmjs.org
cnpm install package
用法与npm一样
通过npm安装node包时,发现卡住了,没有反应
查找原因
npm http GET https://registry.npmjs.org/express npm info retry will retry, error on last attempt: Error: connect ETIMEDOUT
解决方法
npm config set registry http://registry.cnpmjs.org npm info underscore
npm --registry http:/registry.cnpmjs.org install express
registry = http://registry.cnpmjs.org
cnpm
[wyq@localhost ~]$ python -m SimpleHTTPServer 80 Traceback (most recent call last): File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/lib64/python2.7/SimpleHTTPServer.py", line 220, in <module> test() File "/usr/lib64/python2.7/SimpleHTTPServer.py", line 216, in test BaseHTTPServer.test(HandlerClass, ServerClass) File "/usr/lib64/python2.7/BaseHTTPServer.py", line 595, in test httpd = ServerClass(server_address, HandlerClass) File "/usr/lib64/python2.7/SocketServer.py", line 419, in __init__ self.server_bind() File "/usr/lib64/python2.7/BaseHTTPServer.py", line 108, in server_bind SocketServer.TCPServer.server_bind(self) File "/usr/lib64/python2.7/SocketServer.py", line 430, in server_bind self.socket.bind(self.server_address) File "/usr/lib64/python2.7/socket.py", line 224, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 13] Permission denied