摘要: 1..NET Framework 示例 2.ASP.NET 演练精选 阅读全文
posted @ 2008-05-22 14:14 代码示例 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 1.ASP.NET 2.0 QuickStart Tutorial 2.Visual Studio 2008开发新特性系列课程 3.C# 3.0 锐利体验系列课程 4.C#2.0 锐利体验系列课程 5.Modern C#系列课程 6.Web Service开发入门 7..NET 2.0开发入门 8.Visual Web Developer 2005开发入门 9.SQL Server 2005 Ex... 阅读全文
posted @ 2008-05-11 23:34 代码示例 阅读(883) 评论(0) 推荐(0) 编辑
摘要: 最美丽的鼠标 阅读全文
posted @ 2013-07-16 07:51 代码示例 阅读(1101) 评论(1) 推荐(2) 编辑
摘要: using System;using System.Collections.Generic;using System.Text;using System.Collections;using System.Net;using System.IO;using System.Threading;using System.Diagnostics;namespace eLive.Common{ public class RequestState { //存储请求状态 const int BUFFER_SIZE = 1024; public StringBuilder requestData; publi 阅读全文
posted @ 2012-11-05 23:05 代码示例 阅读(1412) 评论(0) 推荐(0) 编辑
摘要: 一个html编码的自动识别:也许大家曾经尝试过很多方法, 我也是,包括去取http包头的charset、分别stram的byte的特征等等,但你会发现,作为一个通用的平台,这些方案都行不通的。通过多日的尝试,百度/google等等,得到的答案是,其实目的没有一个方法能够保证不出错,但有一个解决方案可以基本解决问题。那就是mozilla采用的编码识别模块,我找到了他的.net版本:NUniversalCharDetusing Mozilla.NUniversalCharDet;public static string DetectEncoding_Bytes(byte[] DetectBuff) 阅读全文
posted @ 2012-11-05 22:29 代码示例 阅读(2914) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>void swap(int *px, int *py){ int temp; temp = *px; *px = *py; *py =temp;}int main(int argc,char **argv) { int x = 1, y = 2; printf("x,y is %d,%d\n",x,y); swap(&x,&y); /* int *px = &x; int *py = &y; swap(px,py); */ printf("x,y is %d,%d\n",x,y 阅读全文
posted @ 2012-11-01 23:58 代码示例 阅读(720) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>#include<stddef.h>int main(int argc,char **argv) { char c; char *p = &c; printf("len of char is %d\n",sizeof *p); int x = 1, y = 2, z[10]={8,22,33}; int *ip = &x; printf("x,y is %d,%d\n",x,y); y= *ip; printf("x,y is %d,%d\n",x,y); *i 阅读全文
posted @ 2012-11-01 23:46 代码示例 阅读(830) 评论(0) 推荐(0) 编辑
摘要: 第一部分阅读Zen of Python,在Python解析器中输入import this. 一个犀利的Python新手可能会注意到"解析"一词, 认为Python不过是另一门脚本语言. "它肯定很慢!"毫无疑问:Python程序没有编译型语言高效快速. 甚至Python拥护者们会告诉你Python不适合这些领域. 然而,YouTube已用Python服务于每小时4千万视频的请求. 你所要做的就是编写高效的代码和需要时使用外部实现(C/C++)代码. 这里有一些建议,可以帮助你成为一个更好的Python开发者:1.使用内建函数: 你可以用Python写出高 阅读全文
posted @ 2012-10-27 17:46 代码示例 阅读(9004) 评论(2) 推荐(7) 编辑
摘要: Unix时间戳转换(python)# -*- coding: utf-8 -*-import timedef timestamp_datetime(value): format = '%Y-%m-%d %H:%M:%S' # value为传入的值为时间戳(整形),如:1332888820 value = time.localtime(value) ## 经过localtime转换后变成 ## time.struct_time(tm_year=2012, tm_mon=3, tm_mday=28, tm_hour=6, tm_min=53, tm_sec=40, t... 阅读全文
posted @ 2012-10-24 13:55 代码示例 阅读(41086) 评论(0) 推荐(5) 编辑
摘要: 把你想加入图片的任何文件都放在同一个文件夹下并打包成rar,再准备一个图片,假设有1.rar和1.jpg,好了,开始。把它们放在同一目录下,假设全放在E盘根目录,然后开始菜单-运行(Ctrl+R也行)-cmd- 输入 E: 回车 再输入 copy /b 1.jpg+1.rar test.jpg 回车,然后E盘就会生成test.jpg图片文件,该文件就为伪装后的图片文件。把test.jpg 后缀改成rar, 就又变成刚才的test.rar文件了,解压就能拿出隐藏的所有文件了。把.rar改为.jpg可以正常浏览。 阅读全文
posted @ 2012-10-23 12:43 代码示例 阅读(2420) 评论(0) 推荐(1) 编辑
摘要: ##Python语言: Hotmail 发信#coding:utf-8from email.mime.text import MIMETextimport smtplibclass Hotmail (object ): def __init__ (self ,account,password): self.account="%s@Hotmail.com" %account self.password=password def send (self ,to,title,content): print self.account,self.pas... 阅读全文
posted @ 2012-10-11 17:51 代码示例 阅读(3376) 评论(0) 推荐(0) 编辑
摘要: #######################################把文件每行的tab键分隔符改成逗号分隔符 #######################################from smtplib import SMTP as smtpfrom time import sleepimport linecachestartLine = 1endLine = 517i=startLine#read file contenttry:## fobj=open("renren_45w.txt.txt",'r') fok=open('1 阅读全文
posted @ 2012-10-10 09:38 代码示例 阅读(9101) 评论(2) 推荐(0) 编辑
摘要: 月光博客6月12日发表了《写给新手程序员的一封信》,翻译自《An open letter to those who want to start programming》,我的朋友(他在本站的id是Mailper)告诉我,他希望在酷壳上看到一篇更具操作性的文章。因为他也是喜欢编程和技术的家伙,于是,我让他把他的一些学习Python和Web编程的一些点滴总结一下。于是他给我发来了一些他的心得和经历,我在把他的心得做了不多的增改,并根据我的经历增加了“进阶”一节。这是一篇由新手和我这个老家伙根据我们的经历完成的文章。我的这个朋友把这篇文章取名叫Build Your ProgrammingTechni 阅读全文
posted @ 2012-09-27 17:14 代码示例 阅读(907) 评论(5) 推荐(6) 编辑
摘要: //新浪微博登录密码加密函数//password密码明文//servertime提交的参数之一//nonce提交的参数之一//encode_password输出的加密后的16进制字符串,40个字符//返回encode_password的长度,失败则返回0PASSENCODE_APIintSinaSha1Encode(char*password,char*servertime,char*nonce,char*encode_password){if(encode_password){encode_password[0]=NULL;//定义要sha1的字符串charpTemp[400]={0};// 阅读全文
posted @ 2012-09-07 16:00 代码示例 阅读(1010) 评论(0) 推荐(0) 编辑
摘要: 奥地利符号计算研究所(Research Institute for Symbolic Computation,简称RISC)的Christoph Koutschan博士在自己的页面上发布了一篇文章,提到他做了一个调查,参与者大多数是计算机科学家,他请这些科学家投票选出最重要的算法,以下是这次调查的结果,按照英文名称字母顺序排序。A* 搜索算法——图形搜索算法,从给定起点到给定终点计算出路径。其中使用了一种启发式的估算,为每个节点估算通过该节点的最佳路径,并以之为各个地点排定次序。算法以得到的次序访问这些节点。因此,A*搜索算法是最佳优先搜索的范例。集束搜索(又名定向搜索,Beam Search 阅读全文
posted @ 2012-09-02 08:16 代码示例 阅读(477) 评论(0) 推荐(0) 编辑
摘要: 本程序主要实现加法和减法2种运算,要实现别的运算请扩展该运算方法和修改操作工厂类!操作类: class Operation { public double NumberA { get; set; } public double NumberB { get; set; } public virtual double getResult() { return 0.0; } } class OperationAdd : Operation { public ... 阅读全文
posted @ 2012-07-03 09:14 代码示例 阅读(1873) 评论(0) 推荐(4) 编辑
摘要: 使用LumiSoft.Net,下载地址见http://www.lumisoft.ee/lswww/download/downloads/Net/// Creating a new simple message Mime m = new Mime(); MimeEntity mainEntity = m.MainEntity; // Force to create From: header field mainEntity.From = new AddressList(); mainEntity.From.Add(new Ma... 阅读全文
posted @ 2012-06-19 15:04 代码示例 阅读(2707) 评论(4) 推荐(2) 编辑