上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 85 下一页
  2013年9月8日
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Drawing;using System.Data;using System.Text;using System.Windows.Forms;using System.Diagnostics;using System.Runtime.InteropServices;using System.IO;using System.Drawing.Design;namespace HCDL{ public class Show... 阅读全文
posted @ 2013-09-08 20:32 武胜-阿伟 阅读(4309) 评论(1) 推荐(0) 编辑
摘要: 电子邮件协议? 当前常用的电子邮件协议有SMTP、POP3、IMAP4,它们都隶属于TCP/IP协议簇。SMTP Simple Mail Transfer Protocol(即简单邮件传输协议),它是一组用于从源地址到目的地址传送邮件的规则,简单的说就是:From-->To的传送规则。由SMTP来控制信件中转的方式。SMTP属于TCP/IP家族中的一员,它帮助每一台计算机在发送或中转信件时找到下一个目的地。通过SMTP协议所指定的服务器,就可以把E-Mail寄到收信人的服务器上。SMTP服务器则是遵循SMTP协议的邮件发送服务器,用来中转你发出的电子邮件。 SMTP目前已是事实上的E-M 阅读全文
posted @ 2013-09-08 11:20 武胜-阿伟 阅读(1236) 评论(0) 推荐(0) 编辑
摘要: try{string url = "http://www.devbg.org/img/";string file = "Logo-BASD.jpg";string myStringWebResource = null;myStringWebResource = url + file;webClient.DownloadFile(myStringWebResource, file);//to view the image// System.Diagnostics.Process.Start("Logo-BASD.jpg");}catch 阅读全文
posted @ 2013-09-08 10:59 武胜-阿伟 阅读(404) 评论(0) 推荐(0) 编辑
摘要: 在SQLite官方下载了System.Data.SQLite,编写如下测试代码:复制内容到剪贴板 程序代码using (SQLiteConnection conn = new SQLiteConnection(@"Data Source=F:\my.db;Pooling=true;FailIfMissing=false")){using (SQLiteDataAdapter adapter = new SQLiteDataAdapter("select id,total from table1", conn)){DataTable table1 = ne 阅读全文
posted @ 2013-09-08 10:55 武胜-阿伟 阅读(9936) 评论(0) 推荐(0) 编辑
摘要: 2012-12-29 02:26 by 老赵, 1745 visits众所周知,.NET中Dictionary的键不能为null,否则会抛出NullReferenceException,这在某些时候会显的很麻烦。与此相对的是Java中的HashMap支持以null为键,则方便许多。尽管null的确不是个好东西,但它既然已经存在,既然给我们造成了麻烦,我们就要想办法去解决它。实现一个自己的字典类自然可行,但要精心实现一个高效的字典并不是件容易的事情,例如BCL中的Dictionary.cs就有超过2000行代码。此外另一个容易想到的方法便是实现IDictionary接口,将大部分实现委托给现成. 阅读全文
posted @ 2013-09-08 10:11 武胜-阿伟 阅读(1628) 评论(0) 推荐(0) 编辑
  2013年9月7日
摘要: 打开数据库并写入数据?using (StorageEngine engine = new StorageEngine("stsdb4.sys", "stsdb4.dat")){XIndex table = engine.OpenXIndex("table");for (int i = 0; i table = engine.OpenXIndex("table");foreach (var row in table) //table.Forward(), table.Backward(){Console.WriteL 阅读全文
posted @ 2013-09-07 20:10 武胜-阿伟 阅读(1944) 评论(1) 推荐(0) 编辑
摘要: 在统计类型或类型实例对象时,出了个异常:“不能作为非托管结构进行封送处理;无法计算有意义的大小或偏移量。”后来查了一下,原来,我们创建的struct或是class都是属于复杂类型的。(纠正一下,如果成员又有复杂类型的,而所占字节,在运行时,会有所变量,在这使用Marhsal.SizeOf也是无效的,只能对非托管资源的一个统计)如果不对其内部的一些成员布局设置,直接sizeof()或是Marshal.SizeOf(object), Marshal.SizeOf(Type)是会报这个异常的。所以我们要按需去对成员布局设置一下就可以让上面的sizeof()或是Marshal.SizeOf(objec 阅读全文
posted @ 2013-09-07 09:26 武胜-阿伟 阅读(5802) 评论(1) 推荐(0) 编辑
摘要: CORRELShow AllReturns the correlation coefficient of the array1 and array2 cell ranges. Use the correlation coefficient to determine the relationship between two properties. For example, you can examine the relationship between a location's average temperature and the use of air conditioners.Syn 阅读全文
posted @ 2013-09-07 07:04 武胜-阿伟 阅读(808) 评论(0) 推荐(0) 编辑
  2013年9月6日
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication13{ public class Content { public int Val2; } public class Cloner:ICloneable { public int Val; public Content Mycontent = new Content(); public Clo... 阅读全文
posted @ 2013-09-06 22:55 武胜-阿伟 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 程序代码//存储过程//Create PROCEDURE MYSQL// @a int,// @b int//AS// return @a + @b//GOSqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["LocalSqlServer"].ToString());conn.Open();SqlCommand MyCommand = new SqlCommand("MYSQL", conn);MyCommand.CommandType = Comma 阅读全文
posted @ 2013-09-06 22:54 武胜-阿伟 阅读(558) 评论(0) 推荐(0) 编辑
上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 85 下一页