alex_bn_lee

导航

随笔分类 -  Programming Related

上一页 1 ··· 12 13 14 15 16

Different programming languages.
Excel VBA 循环“我中毒了~”
摘要:来源:http://mcdelfino.blog.51cto.com/2058744/691131 Dim Runtime As Date Sub RunTimer() Runtime = Now() + TimeValue("00:00:01") Application.OnTime Runtime, "my_Procedure" End Sub Sub my_Procedure() Static count As Integer count = count + 1 ... 阅读全文

posted @ 2011-10-18 16:29 McDelfino 阅读(357) 评论(0) 推荐(0)

Excel VBA 实现电子钟
摘要:来源:http://mcdelfino.blog.51cto.com/2058744/691026Dim Runtime As Date '定义时间变量 Sub RunTimer() Runtime = Now() + TimeValue("00:00:02") '时间显示为增加1秒 Application.OnTime Runtime, "my_Procedure" '在这个指定的时间执行下面的过程End Sub Sub my_Procedure() Range("A1") = Format(Time, &q 阅读全文

posted @ 2011-10-18 15:23 McDelfino 阅读(1279) 评论(0) 推荐(0)

win7下 SQL Server 2008安装
摘要:来源:http://mcdelfino.blog.51cto.com/2058744/661903Win7 SQL Server 2008安装教程1.在win7上装SQL Server 2008的时候,最先遇到的问题就是下面:(1)解决之一是:删除注册表键HKEY_LOCAL_MACHINE\SYSTEM\CurrentSet\Contrl\Session Manager\PendingFileRenameOperations。但是我就发现我的注册表中,根本就没有这一项,解决的办法是如下:可能权限不 够,建议用 administrator 帐号登陆安装(注:默认情况下,WIN7下是把admin 阅读全文

posted @ 2011-09-10 13:59 McDelfino 阅读(643) 评论(0) 推荐(0)

int.TryParse(判断字符串是否为数字组成)
摘要:来源:http://mcdelfino.blog.51cto.com/2058744/661301int.TtyParse(string s, out int i)用来判断s字符串是否是由数字组成的,若是有数子组成,则将这个数字的值赋给i,同时这个式子返回bool类型的True。若不是数字组成,则将i赋值为0,并且返回值为False。usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespace个人练习{classProgram{staticvoidMain(string[]args 阅读全文

posted @ 2011-09-09 15:49 McDelfino 阅读(303) 评论(0) 推荐(0)

param数组参数
摘要:来源:http://mcdelfino.blog.51cto.com/2058744/661211param数组允许我们只写一个方法, 就能接受数量可变的参数. 这种技术就是参数数组,它本质上是用params关键字来声明的一个参数.而且不仅可以声明params int[] list这样的数组,还可以声明object类型的参数组,参数可以是任意类型的~Util类#regionUsingdirectivesusingSystem;#endregionnamespaceParamsArray{classUtil{publicstaticintSum(paramsint[]paramList){if( 阅读全文

posted @ 2011-09-09 14:51 McDelfino 阅读(570) 评论(0) 推荐(0)

结构与类的区别
摘要:来源:http://mcdelfino.blog.51cto.com/2058744/661072不能为结构声明默认构造函数(一个无参数的构造函数).因为编译器始终会帮我们生成一个.在类中只有在没有自己写一个构造函数的前提下,编译器才 会帮我们生成一个默认构造函数.在编译器为结构生成的默认构造函数中,总是将字段设为0,false或者null,这和类是一样的.然而,在自己写的一个 构造函数中(再次提醒,这必须是一个非默认的构造函数),必须自己负责初始化所有字段,编译器不会再帮我们初始化它.这意味着必须在结构的所有非默认构造 函数中显式地初始化所有字段,否则会造成编译时错误.例如,假定把Time换 阅读全文

posted @ 2011-09-09 11:44 McDelfino 阅读(273) 评论(0) 推荐(0)

值传递与引用传递
摘要:来源:http://mcdelfino.blog.51cto.com/2058744/661036值传递, 只是传递副本, 而引用传递, 是传递一个地址~usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceConsoleApplication10{classProgram{staticvoidMain(string[]args){intv=42;intr=42;DoWorkVal(v);DoWorkRef(refr);Console.WriteLine("值传递, 阅读全文

posted @ 2011-09-09 10:43 McDelfino 阅读(173) 评论(0) 推荐(0)

string直接分成char数组
摘要:来源:http://mcdelfino.blog.51cto.com/2058744/660711string直接分成char数组, 然后逐个输出来~usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceConsoleApplication1{classProgram{staticvoidMain(string[]args){strings=Console.ReadLine();Console.WriteLine("字符----------十进制");fo 阅读全文

posted @ 2011-09-08 19:15 McDelfino 阅读(549) 评论(0) 推荐(0)

333
摘要:#region Using directivesusing System;using System.Collections.Generic;using System.Text;#endregionnamespace DailyRate{ class Program { static void Main(string[] args) { (new Program()).run(); } public void run() { double dailyRate = read... 阅读全文

posted @ 2011-09-08 17:00 McDelfino 阅读(370) 评论(0) 推荐(0)

上一页 1 ··· 12 13 14 15 16