#!/bin/bash
process=8
PWD=`pwd`
DAT=`date`
ftpip="192.168.1.1"
user="ftp_username"
password="ftp_password"
local_dir="/home/"
getlist()
{
ftp-n$ftpip<<EOF|awk‘{print$9}‘|sed‘/^$/d‘>$PWD/list
user$user$password
cdfile/
dir
bye
EOF
}
copy()
{
if[-f$P..
分类:
系统相关 时间:
2014-05-27 03:55:34
阅读次数:
378
#!/usr/bin/python
#-*-coding:utf-8-*-
importparamiko,os,datetime
server_ip=‘192.168.1.123‘
server_user=‘root‘
server_passwd=‘10241010‘
server_port=22
#local_dir=‘C:\Python27‘
#remote_dir=‘/soft2/nba/‘
defssh_connect():
ssh=paramiko.SSHClient()
ssh.set_missi..
分类:
编程语言 时间:
2014-05-27 03:51:40
阅读次数:
283
编写一个shell脚本,实现加法和乘法运算。#!/bin/bash#Function:num1+num2num3*num4sum(){read-p"pleasekeyinfirstnumber:"num1read-p"pleasekeyinsecondnumber:"num2letnum3=${num1}+${num2}echo-e"\033[32m$num1+$num2=$num3\033[0m"}#############cf(){read-p"pleasekeyinfi..
分类:
其他好文 时间:
2014-05-27 03:28:19
阅读次数:
219
1、
??
Balanced Binary Tree
Given a binary tree, determine if it is height-balanced.
For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subt...
分类:
其他好文 时间:
2014-05-23 08:19:19
阅读次数:
282
EventMachine
本文主要是
EventMachine如何建一个简单的Echo服务器post_init, unbind, receive_date 方法
EchoServer
如下代码,是建立一个简单的EchoServer
#!/usr/bin/env rubyrequire 'rubygems'require 'eventmachine' class Ech...
分类:
其他好文 时间:
2014-05-22 11:14:26
阅读次数:
181
#! /usr/bin/python
#! -*- coding:utf-8 -*-
import os
def SplitFile(cnt):
path='e:\data'
filename=path+'\\qunti_deal.txt'
os.chdir(path)
i=0
n=0
size=os.path.getsize(filename)/1024/cnt
pr...
分类:
其他好文 时间:
2014-05-22 09:07:43
阅读次数:
184
Derby数据库是一个纯用Java实现的内存数据库,属于Apache的一个开源项目。由于是用Java实现的,所以可以在任何平台上运行;另外一个特点是体积小,免安装,只需要几个小jar包就可以运行了。下面说下其安装及配置
安装
1).从apache下载Derby数据库(如db-derby-10.10.1.1-bin.zip)并解压到任意目录(如:D:\Derby\db-derby-10.10.1...
分类:
数据库 时间:
2014-05-22 09:05:09
阅读次数:
289
因为用的hadoop2.20所以下载sqoop-1.99.3-bin-hadoop200使用随便找一个hadoopnode节点做sqoopserver:1.下载安装[hadoop@slave1~]$wgethttp://mirror.bit.edu.cn/apache/sqoop/1.99.3/sqoop-1.99.3-bin-hadoop200.tar.gz[hadoop@slave1~]$tarxvfsqoop-1.99.3-bin-hadoop200.tar...
分类:
其他好文 时间:
2014-05-21 00:01:45
阅读次数:
439
1.下载bison,地址见上篇文件,我用的是2.4.1-setup.exe
2.下载flex,地址见上篇文件,我用的是flex-2.5.4a-1.exe
3.下载python,我用的是2.7版本
4.将前面三个软件安装后,将其安装后目录下的bin都添加到系统给的path路径中,将python的根目录增加到系统的path目录
5.使用vs2012打开doxgen的源代码,目录下有个winbu...
分类:
其他好文 时间:
2014-05-20 14:18:58
阅读次数:
319
题目:从上往下打印出二叉树的每个节点,同一层的节点按照从左到右的顺序打印。分析:其实就是按层的遍历方式#include #include using
namespace std;struct BinaryTree{ int data; BinaryTree* lchild; Bin...
分类:
其他好文 时间:
2014-05-20 10:13:47
阅读次数:
242