- 博客(21)
- 收藏
- 关注
转载 远程调用webservice
<br />如果使用VS2005以后开发的<br />Web Service默认情况下是不支持远程调试的,因此Web.config文件中的<br /><system.web>节点下加入如下信息: <br /> <webServices><br /> <protocols><br /> <add name="HttpGet"/><br /> <add name="HttpP
2010-08-26 14:51:00 3512
转载 C#调用webservice
<br />假设A是客户端,B是webservice服务端,用户通过http协议向服务器发送soap请求,webservice返回客户端XML格式的数据。 <br /> 现在我们看一看创建一个webservice的大致过程: <br /> 服务端的webservice是必须要建的。中间的soap,xml我们不用去关心,在客户端这边,比较重要的是如何从webservice取得对象?答案是用的是proxy对象。客户端由代理对象(proxy)负责与webservice的通信。所以在客户端使
2010-08-26 00:06:00 692
转载 C#接收邮件函数
<br />public void ConnectToServer(NetworkStream ns,StreamReader sr,string serverName,string serverPassword)<br /> {<br /> string temp = "";<br /><br /> data = "USER " + serverName + "/r/n";<br /> szdata = Sys
2010-08-24 19:44:00 528
转载 C#smtp发送邮件
<br />MailMessage mail = new MailMessage();<br /><br /> mail.Subject = toAddress.Text;<br /> mail.From = new MailAddress("a@sohu.com");<br /><br /> mail.To.Add(toAddress.Text);<br /> mail.Subject = subjec
2010-08-24 19:39:00 368
转载 pythonic examples
pythonic examples<br />文章分类:Python编程<br /> <br />1. 百分号的使用:<br />通常我们都是这样格式化字符串的:<br /> Python代码 print 'hello world programme by %s' % 'python' print 'hello world programme by %s' % 'python'<br /> <br /> 但是如果格式化的字符串中有很多%s,那么程序的可读性就会依靠于%后面 的变量名起得是否好了。<br /
2010-08-20 19:44:00 571
原创 c#实现资源浏览器
<br />using System;<br />using System.Collections.Generic;<br />using System.ComponentModel;<br />using System.Data;<br />using System.Drawing;<br />using System.Linq;<br />using System.Text;<br />using System.Windows.Forms;<br />using Syst
2010-08-17 19:51:00 1048 2
原创 C#TreeView显示本地资源
<br />using System;<br />using System.Collections.Generic;<br />using System.ComponentModel;<br />using System.Data;<br />using System.Drawing;<br />using System.Linq;<br />using System.Text;<br />using System.Windows.Forms;<br />using Syst
2010-08-17 17:24:00 492
原创 C#的checkedlistbox删除操作代码
<br />/*int count=checkedListBox1.CheckedItems.Count;<br /> for (int i=0;i<count;i++) <br />{<br /> heckedListBox1.Items.Remove(checkedListBox1.CheckedItems[0]);<br />}*/<br /><br />int count = checkedListBox1.CheckedIndices.Count;<br /> fo
2010-08-16 14:42:00 1255
转载 python中使用getopt
<br />在运行程序时,可能需要根据不同的条件,输入不同的命令行选项来实现不同的功能。目前有短选项和长选项两种格式。短选项格式为"-"加上单个字母选项;长选项为"—"加上一个单词。长格式是在Linux下引入的。许多Linux程序都支持这两种格式。在Python中提供了getopt模块很好的实现了对这两种用法的支持,而且使用简单。<br />取得命令行参数<br />在使用之前,首先要取得命令行参数。使用sys模块可以得到命令行参数。import sys<br /><br />print sys
2010-08-14 13:18:00 465
转载 利用urllib下载图片
<br />ubuntu查找文件:<br /> sudo find / -name sources.list<br /> 实现图片下载 import urllib url = r"http://www.javaeye.com/images/logo.gif" path = r"h:/downloads/1.jpg" data = urllib.urlopen(url).read() f = file(path,"wb") f.write(data) f.close() <br />
2010-08-13 19:41:00 1013
转载 Ubuntu挂载vbox共享空间
<br />设备-分配数据空间-添加数据空间<br />设置好数据空间位置和名字(注意:固定还是临时看你自己是要长期共享还算临时共享,共享文件夹名最好填写英文。)<br />已共享文件夹名为“vv15”为例演示如何挂载共享空间(Ubuntu中)<br />挂载共享文件夹<br />重新进入虚拟Ubuntu,在命令行终端下输入:<br />sudo mkdir /mnt/shared<br />sudo mount -t vboxsf vv15 /mnt/shared<br />其中”vv15″是之前
2010-08-12 20:28:00 2126
转载 MySql 基本操作
<br />MySQL数据库的基本操作命令<br />=========================<br /><br />一、mysql服务操作<br />1、service mysql start //启动mysql服务<br /><br />2、service mysql stop//停止mysql服务 <br /><br />3、mysql -h主机地址 -u用户名 -p用户密码 //进入mysql数据库<br /><br />4、quit
2010-08-12 19:39:00 387
原创 c#连接sqlite数据库
<br />using System;<br />using System.Collections.Generic;<br />using System.Linq;<br />using System.Text;<br />using System.Data.SQLite;<br /><br />namespace Test<br />{<br /> class Program<br /> {<br /> static void Main(str
2010-08-10 21:28:00 1431
原创 c#sqlcommand 使用方法
<br />使用sqlcommand对象来返回数据集合的方法<br />string strconn="data source=billgates;initial catalog=test;integrated security=SSPI;";<br />SqlConnection conn=new SqlConnection(strconn);<br />conn.Open();<br />SqlCommand sqlcmd=new SqlCommand();<br />sqlcmd.
2010-08-10 18:59:00 15189 2
原创 c#实现的音频入库
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;using System.IO;namespace inDb
2010-08-10 17:32:00 633
转载 python文件读写
<br />文件的读写<br /> <br />一、文件打开:<br />f = file(name[, mode[, buffering]])<br />入口参数: name 文件名<br /> mode 选项,字符串<br /> buffering 是否缓冲 (0=不缓冲,1=缓冲, >1的int数=缓冲区大小)<br />返回值 : 文件对象<br />mode 选项:<br />"r" 以读方式打开,只能
2010-08-10 11:47:00 1259
原创 python写的统计PYTHON文件的(代码行数,空行数,注释行数)小程序
#-*-coding:utf-8-*-import osif __name__=='__main__': codeline=0 expline=0 blankline=0 filename=raw_input('Please input the file name:') fi=open(filename) while fi.tell()!=os.path.getsize(filename): temp=fi.readli
2010-08-09 21:03:00 2818
转载 list排序(转)
Python: How to Sort a List<br />很多时候,我们需要对List进行排序,Python提供了两个方法<br />对给定的List L进行排序,<br />方法1.用List的成员函数sort进行排序<br />方法2.用built-in函数sorted进行排序(从2.4开始)<br />这两种方法使用起来差不多,以第一种为例进行讲解:<br />从Python2.4开始,sort方法有了三个可选的参数,Python Library Reference里是这样描
2010-08-08 21:00:00 465
原创 C#实现的简单ftp客户端
<br />using System;<br />using System.Collections.Generic;<br />using System.ComponentModel;<br />using System.Data;<br />using System.Drawing;<br />using System.Linq;<br />using System.Text;<br />using System.Windows.Forms;<br />using Syst
2010-08-07 17:48:00 5051
转载 python获取url地址中的参数
>>> url = 'http://localhost/test.py?a=hello&b=world' >>> values = url.split('?')[-1] >>> values 'a=hello&b=world' >>> for key_value in values.split('&'): ... print key_value.split('=') ... ['a', 'hello'] ['b', 'world'] <br />
2010-08-02 17:04:00 12421
转载 python 批量更改后缀名
#-*-coding:utf-8-*-import osif __name__=='__main__': old_ext=input('Please input the old ext:') new_ext=input('Please input the new ext:') for (path,dirs,filenames) in os.walk('/root/Programs'): print 'jump in to the first for/n
2010-08-01 13:58:00 880
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人