摘要: 1、方法一 (不可逆加密)public string EncryptPassword(string PasswordString,string PasswordFormat ) { string encryptPassword = null; if (PasswordFormat="SHA1"){ encryptPassword=FormsAuthortication.HashPasswordForStoringInConfigFile(PasswordString,"SHA1"); } elseif (PasswordFormat="MD5& 阅读全文
posted @ 2010-10-25 17:01 CMuYu 阅读(201) 评论(0) 推荐(0)
摘要: 有两种方法:直接调用 DateTime.Subtract,得到一个TimeSpan或者直接DateTime.Tricks相减,差值生成一个TimeSpan,如果想直接得到相差的秒数,可以把差值除以1000000 private static void SubDateTime() { DateTime dt1 = Convert.ToDateTime("2010-01-11"); DateTime now = DateTime.Now; TimeSpan t = now.Subtract(dt1); ... 阅读全文
posted @ 2010-10-25 16:55 CMuYu 阅读(291) 评论(0) 推荐(0)
摘要: /// <summary> /// 保存开启启动设置的方法 /// </summary> private void DoAutoRunXML() { XmlNode root = clsXMl.GetRootNode(); foreach (XmlNode node in root.ChildNodes) { if (node.Name == "AutoRun") { ... 阅读全文
posted @ 2010-10-25 16:53 CMuYu 阅读(160) 评论(0) 推荐(0)
摘要: 作者:杨中科很多同学把过计算机四级、软考当成了大学的目标,并且力图用此找到一份好工作。但是,我不得不给大家一个残酷的答案来否定这种想法,并且告诉大家,除了有着商业因素支撑并且要花好几千、几万块钱才能考下来的思科的CCNA、CCNP、CCIE等认证之外在我国没有一种证书能够有立竿见影的效果,而且除了你应聘网络管理的工作并且有思科的认证你会有竞争力的话,这些认证统统“没有用”,用人单位要的是真实能力而不是那张纸。 很多同学在毕业求职的时候很骄傲的把计算机四级、软件工程师认证之类的认证摆到面试官面前的时候,面试官连正眼都不看,很多同学倍受打击。你要想做律师的话,必须要通过司法考试,取得律师资格证,否 阅读全文
posted @ 2010-10-12 16:06 CMuYu 阅读(201) 评论(0) 推荐(0)
摘要: /* ID:tianlin2 PROG:sprime LANG:C++*/ #include <iostream>#include <fstream>#include <cmath>using namespace std;int n;ofstream fout("sprime.out");int isprm(int a){ if(a<2) return 0; int j=2; while(j<=sqrt((double)a)&&a%j!=0) ++j; if(j>sqrt((double)a)) retu 阅读全文
posted @ 2010-08-06 11:48 CMuYu 阅读(145) 评论(0) 推荐(0)
摘要: /* ID:tianlin2 PROG:pprime LANG:C++*/ #include <fstream>#include <iostream>#include <cmath>using namespace std;int ispalin(int a[],int n){ for(int i=0,j=n-1;i<j;++i,--j) if(a[i]!=a[j]) return 0; return 1;}int isprm(int a){ if(a<2) return 0; int j=2; while(j<=sqrt((double)a 阅读全文
posted @ 2010-08-06 11:47 CMuYu 阅读(166) 评论(0) 推荐(0)
摘要: /* ID:tianlin2 PROG:numtri LANG:C++*/ #include <iostream>#include <fstream>using namespace std;int nmtr[1000][1000];int d[1000][1000];int max(int a,int b,int i1,int j1,int i2,int j2,int row){ if(i1<0||j1<0||j1>=row) a=0; if(i2<0||j2<0||j2>=row) b=0; if(a>b) return a; 阅读全文
posted @ 2010-08-06 11:46 CMuYu 阅读(194) 评论(0) 推荐(0)
摘要: /* ID:tianlin2 PROG:milk3 LANG:C++*/ #include <iostream>#include <queue>#include <fstream>using namespace std;class node{public: int curcommand[3]; int curstate[3];};int states[21][21][21]={0};int mycount=0;int isend[50];int cmmd[6]={12,21,102,201,120,210};int a,b,c;void bubble(int 阅读全文
posted @ 2010-08-06 11:45 CMuYu 阅读(145) 评论(0) 推荐(0)
摘要: /* ID:tianlin2 PROG:ariprog LANG:C++*/ #include <iostream>#include <fstream>#define MAX 125020using namespace std;int total=0;ifstream fin("ariprog.in");ofstream fout("ariprog.out");class assd{public: int a; int b; assd() { a=-1; b=-1; }};void assdbubble(assd a[],int 阅读全文
posted @ 2010-08-06 11:44 CMuYu 阅读(153) 评论(0) 推荐(0)
摘要: /* ID:tianlin2 PROG:clocks LANG:C++*/ #include <iostream>#include <queue>#include <fstream>#include <cmath>#define MAX 262150using namespace std;ifstream fin("clocks.in");ofstream fout("clocks.out");class node{public: int curs; int pres; int premove; node( 阅读全文
posted @ 2010-08-06 11:42 CMuYu 阅读(159) 评论(0) 推荐(0)