当前位置:首页 » 编程博文
开发技术指南» 文章正文
    引言: 网上流传很多计算公农历的源代码,很多,但是居然没有VB的,晕,所以。
 

 

 ·c学习笔记一    »显示摘要«
    摘要:1.函数体中的变量定义语句,必须在所有可执行语句之前。 main() { int x,y; /*变量定义语句:定义2个整型变量x、y*/ x=3; /*可执行的赋值语句:将3赋值给变量x*/ y=6; /*可执行的赋值语句:将6赋值给变量y*/ int max; /*变量定义语句:出现在可执行的 赋值语句“x=3;”和“ y=6;”之后,非法!*/ max=x>y?x:y; printf(“......
    摘要:<!-- 蛙蛙推荐:怎么使用js脚本理的timer控件settimeout是脚本种常用的一个函数,它用来让特定的函数执行之前等待一定的毫秒数,利用它我们可以在首页上的做到定时的无刷新更新数据等众多效果,我做了个小程序来演示这个函数的使用。--><html><head><script language=javascript>var timerid;fu......


公农历转换VB类

网上流传很多计算公农历的源代码,很多,但是居然没有vb的,晕, 所以.....          用法:     以l开始的方法均为阴历,以s开始的方法均为公历     基本的两个初使函数:     linitdate:用农历年月日初使化日期对象     sinitdate: 用公历年月日初使化日期对象          其它的方法看下面的一小段代码吧 示例代码     private sub command1_click()    dim t as clsdate    dim y as long    dim m as long    dim d as long    dim st as single    dim et as single    dim da as date    dim j as long    dim ret as long    set t = new clsdate    ´t.sinitdate 1900, 1, 1    t.linitdate 2047, 5, 12, false   ´农历2047年5月12日,非闰月    debug.print t.lyear    if t.isleap = false then       debug.print t.lmonth    else       debug.print " 闰 " & t.lmonth    end if    debug.print t.cdaystr(t.lday)  ´农历日期中文大写    debug.print t.ganzhi(t.lyear)  ´求干支    debug.print t.yearattribute(t.lyear) ´农历年的属相    debug.print t.syear ´ 公历年    debug.print t.smonth ´ 公历月    debug.print t.sday ´ 公历日    debug.print t.sweekday ´公历星期    debug.print t.era(t.syear)´ 公历纪元    debug.print t.constellation(t.smonth, t.sday) ´ 星座    debug.print "week:" & t.wholiday ´ 按第几个星期几计算的假日    debug.print "solar" & t.sholiday ´ 按公历计算的假日    debug.print "lunar" & t.lholiday ´ 按阴历计算的假日    debug.print t.lsolarterm ´ 计算节气       ´以下为速度测试,很快吧.    st = timer    with t         for y = 1900 to 2049            for m = 1 to 12              for d = 1 to 28                 .linitdate y, m, d, false                 next            next         next    end with    ´t.printf    et = timer    debug.print et - st    set t = nothing end sub            以下为代码:


...   下一页
    摘要:expertise: intermediatelanguage: java two methods to remove duplicates in an arraylist here are two methods that allow you to remove duplicates in an arraylist. removeduplicate does not maintain the o......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE