原创 windows python 訪問ftp
在windows下python訪問ftp from ftplib import FTP import time if __name__=='__main__': ftp=FTP() ftp.connect('192.1
原创 python 批量更改後綴名
#-*-coding:utf-8-*- import os if __name__=='__main__': old_ext=input('Please input the old ext:') new_ext=input
原创 list排序(轉)
Python: How to Sort a List 很多時候,我們需要對List進行排序,Python提供了兩個方法 對給定的List L進行排序, 方法1.用List的成員函數sort進行排序 方法2.用built-in函數sort
原创 判斷遠端服務器端口是否通的腳本
import socket sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sk.settimeout(1) try: sk.connect(('192.168.0.1
原创 C#連接SQL SERVER數據庫
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; u
原创 python ftp上傳文件代碼
from ftplib import FTP if __name__=='__main__': ftp=FTP() ftp.connect('192.168.4.152','21') ftp.login('ftpu
原创 python獲取url地址中的參數
>>> url = 'http://localhost/test.py?a=hello&b=world' >>> values = url.split('?' )[- 1 ] >>> values 'a=hell
原创 python操作xml
利用DOM來創建和修改xml DOM的具體教程在http://www.w3school.com.cn/xmldom/index.asp doc = minidom.Document()在內存中創建一個Document對象 修改好xml以後
原创 C#實現的簡單ftp客戶端
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; u
原创 python 計算下一個星期三的日期
import datetime,calendar if __name__=='__main__': day_time=datetime.date.today() oneday=datetime.timedelta(days
原创 C#讀取數據庫表數據輸入listview
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; u
原创 C#中DataTable使用
DataTable dt=new DataTable(); sql = "select categoryid,categoryname from categories where categorytype='5'"; cmd = ne
原创 遠程調用webservice
如果使用VS2005以後開發的 Web Service默認情況下是不支持遠程調試的,因此Web.config文件中的 <system.web>節點下加入如下信息: <webServices>
原创 c#sqlcommand 使用方法
使用sqlcommand對象來返回數據集合的方法 string strconn="data source=billgates;initial catalog=test;integrated security=SSPI;"; SqlConn
原创 C#中更改groupbox的邊框的顏色
e.Graphics.Clear(groupBox1.BackColor); e.Graphics.DrawString(groupBox1.Text, groupBox1.Font, Brushes.Blue, 10, 1); e.Gr