Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol...
分类:
其他好文 时间:
2014-06-25 11:14:15
阅读次数:
218
如果是root帐号,你能看到所有用户的当前连接。如果是其它普通帐号,只能看到自己占用的连接怎么进入mysql命令行呢? mysql的安装目录下面有个bin目录,先用命令行进入该目录,然后用 mysql -uroot -p123456 来登录(注意:用户名和密码不用包含“”)命令: show proc...
分类:
数据库 时间:
2014-06-25 11:07:03
阅读次数:
225
1. 确保zmq的各种library有安装正确,检查方法:查看/usr/local/lib, 看里面有没有libjzmq.a, libjzmq.dylib, libzmq.a, libjzmq.dylib等
正确的安装方法是:(1)安装libzmq-master (2)安装zeromq-3.2.4,注意版本最好选这个,试过最新版本会报错 (3)安装jzmq-master java bin...
分类:
编程语言 时间:
2014-06-25 09:58:16
阅读次数:
310
a little riak book 的无聊总结
#!/bin/bash
# Riak HTTP interface stays true to their intent: 1xx Informational, 2xx Success,
# 3xx Further Action, 4xx Client Error, 5xx Server Error
### put
PORT=10...
分类:
其他好文 时间:
2014-06-25 08:22:11
阅读次数:
178
example: ./netspeed eth0
1 #!/bin/bash
2
3 INTERVAL="1" # update interval in seconds
4
5 if [ -z "$1" ]; then
6 echo
7 echo usage: $0 [network-interface]
8 echo
9 echo ...
分类:
系统相关 时间:
2014-06-25 07:24:00
阅读次数:
213
一、设置服务端:
1、加入Listener到conf/server.xml
2、加入JAVA_OPTS到bin/catalina.sh
JAVA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote....
分类:
其他好文 时间:
2014-06-25 07:23:23
阅读次数:
244
#!/usr/bin/envpython
#-*-encoding:UTF-8-*-
##########################
#1.正向计时\逆计时\时钟
#2.使用sizer管理布局
##########################
importwx
importtime
importwx.gizmosasgizmos
ICON_START=‘|>‘
ICON_SUSPEND=‘||‘
ICON_RESTART=‘<|‘
TIMETOCOUNT=4..
分类:
编程语言 时间:
2014-06-25 06:28:23
阅读次数:
408
向python进军。。。。。。运行所需环境:python,MySQLdb贴下自己写的关于sql备份的python脚本:#!/usr/bin/envpythonimportMySQLdbimportosimporttimedataList=[]remoteAddr=‘xxxx‘user=‘root‘password=‘xxxx‘dbConnect=MySQLdb.connect(%s,%s,%s)%(remoteAddr,user,password)cu..
分类:
数据库 时间:
2014-06-25 06:24:30
阅读次数:
265
例子:实现目标,用Python编写用户登录验证脚本。知识点:1、while和if控制流2、运算表达式验证过程:脚本:#!/usr/bin/envpython#filename:Userloginauthentication#importsysname=‘Tiger‘passwd=‘123456‘counter=0times=3whileTrue:#-----------无限循环username=raw_input(‘..
分类:
编程语言 时间:
2014-06-25 06:19:51
阅读次数:
272
#!/bin/bash
echo"这个是系统初始化脚本,请慎重运行!"
input_fun()
{
OUTPUT_VAR=$1
INPUT_VAR=""
while[-z$INPUT_VAR];do
read-p"$OUTPUT_VAR"INPUT_VAR
done
echo$INPUT_VAR
}
input_again()
{
MYHOSTNAME=$(input_fun"pleaseinputthehostname:")
DOMAINNAME=$(input_fun"p..
分类:
其他好文 时间:
2014-06-25 06:16:37
阅读次数:
345