摘要: The Association for Computational Linguistics(ACL,URL:http://aclweb.org/)Computational Linguistics(URL:http://www.mitpressjournals.org/loi/coli)Transa... 阅读全文
posted @ 2015-01-21 12:39 Yuangui 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Shell 命令中: $$: shell pid $!: pid of the last process running in shell $?: shell command return code $-: the set flags $* args list $@ args list... 阅读全文
posted @ 2015-01-20 20:46 Yuangui 阅读(280) 评论(0) 推荐(0) 编辑
摘要: Install Cmake1. download cmake source code at http://www.cmake.org/files/v3.1/cmake-3.1.0.tar.gz2. ./configure & make & make install Build MySQL sourc... 阅读全文
posted @ 2015-01-02 23:00 Yuangui 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 前几天遇到一个有意思的问题,实现strlen 不考虑线程安全:下面是我的实现:1 size_t strlen(const char* s)2 {3 const char* p = s;4 while (*p++);5 return p-1-s;6 }Glibc 2.19 的实... 阅读全文
posted @ 2014-07-27 13:03 Yuangui 阅读(282) 评论(0) 推荐(0) 编辑
摘要: Centos给网卡设置DNS修改完配置文件会立即生效,这个时候可以测试一下连接,如果还不行可以在网卡配置文件中指定dns服务器service network restart linux下添加路由的方法: 一:使用 route 命令添加 使用route 命令添加的路由,机器重启或者网卡重启后路由就失效了,方法: //添加到主机的路由 # route add –host 192.168.168.110 dev eth0 # route add –host 192.168.168.119 gw 192.168.168.1 //添加到网络的路由 # route add –net IP n... 阅读全文
posted @ 2012-12-11 11:10 Yuangui 阅读(1181) 评论(0) 推荐(0) 编辑
摘要: 一、CentOS 系统的网络配置文件 要建立一个Linux服务器就首先要了解Linux环境下和网络服务相关的配置文件的含义及如何进行安全的配置。在Linux系统中,TCP/IP网络是 通过若干个文本文件进行配置的,也许你需要编辑这些文件来完成联网工作,下面介绍几个基本的TCP/IP网络配置文件。1./etc/sysconfig/network-scripts/ifcfg-<interface-name>文件在RedHat中,系统网络设备的配置文件保存在/etc/sysconfig/network-scripts目录下,ifcfg-eth0包含第一块 网卡的配置信息,ifcfg-et 阅读全文
posted @ 2012-12-11 11:07 Yuangui 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 1 #Copyright 2012 wuyuangui. 2 #contact : notmycupoftea@163.com 3 4 5 6 import os 7 8 path = 'F:\Python\open project\SGI\SGI_STL' 9 paths = path.replace('\\', '//')10 paths = paths + '//'11 print paths12 files = os.listdir(paths)13 for i in files:14 #print(i)15 pat = 阅读全文
posted @ 2012-07-30 12:48 Yuangui 阅读(869) 评论(1) 推荐(0) 编辑
摘要: """'17*x^2 - 16*|x|*y + 17*y^2 = 225'"""import numpy as npimport matplotlib.pyplot as pltX = np.arange(-5.0, 5.0, 0.1)Y = np.arange(-5.0, 5.0, 0.1)x, y = np.meshgrid(X, Y)f = 17 * x ** 2 - 16 * np.abs(x) * y + 17 * y ** 2 - 225fig = plt.figure()cs = plt.contour( 阅读全文
posted @ 2012-07-09 20:15 Yuangui 阅读(1446) 评论(4) 推荐(3) 编辑
摘要: from socket import *HOST = 'localhost'BUFSIZE = 1024PORT = 21567def client_socket(): ADDR = (HOST, PORT) tcpclisock = socket(AF_INET, SOCK_STREAM) tcpclisock.connect(ADDR) while True: data = raw_input('>') if not data: break tcpclisock.send(data) da... 阅读全文
posted @ 2012-05-31 17:31 Yuangui 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 下载mysqlLdb安装包: python_mysql.rar (这里是windows py2.6版本)解压安装.exe文件再将解压出来的libmysql.dll文件放到python安装路径下的Lib/site-packages/目录下问题解决附带一些python mysql基本操作:python连接数据库后获得cursor游标,cursor用来执行命令的方法有:callproc(self, procname, args):用来执行存储过程,接收的参数为存储过程名和参数列表,返回值为受影响的行数execute(self, query, args):执行单条sql语句,接收的参数为sql语句本身 阅读全文
posted @ 2012-05-19 20:44 Yuangui 阅读(1110) 评论(0) 推荐(0) 编辑