3月7日 text-base

合集下载

关键词或词组为基础的数据库检索(I)

关键词或词组为基础的数据库检索(I)

注意:关键词和字段名(field)均不区分大小写
如何定义查询范围?
FEATURES source Location/Qualifiers 1..646 /organism="Dicathais orbita" /organelle="mitochondrion" gene_in_mitochondrion[Properties] /mol_type="mRNA" /db_xref="taxon:69583" /clone="20006E09" /note="mitochondrial and ribosomal sequences produced by suppressive subtractive hybridization" <1..>646 COXI[Gene Name] /gene="COXI" /codon_start=1 /transl_table=5 /product="cytochrome oxidase subunit I" /protein_id="ACT34372.1" /db_xref="GI:253740054" /translation="GTLYILFGMWSGLVGTALSLLIRAELGQPGALLGDDQLYNVIVT AHAFVMIFFLVMPMMIGGFGNWLVPLMLGAPDMAFPRLNNMSFWLLPPALLLLLSSAA
Aim: Find Drosophila population studies published in the Journal of Molecular Evolution

Android开发基础(习题卷4)

Android开发基础(习题卷4)

Android开发基础(习题卷4)说明:答案和解析在试卷最后第1部分:单项选择题,共71题,每题只有一个正确答案,多选或少选均不得分。

1.[单选题]甲说:我赞成小王和小李都去参加演出。

乙说:我不同意你的看法。

以上如果为真,请问下面哪项一定不符合乙的意见?( )A)小王和小李都不参加B)小王参加,但是小李不参加C)小王不参加。

但是小李参加D)小王和小李都参加2.[单选题]下列选项中,属于原子能的和平开发利用的是( )。

A)中国第一颗原子弹爆炸成功B)中国第一颗氢弹爆炸成功C)导弹核武器试验成功D)秦山核电站和大亚湾核电站相继建成投产3.[单选题]下列选项中与“锦上添花一雪上加霜”的言语关系一致的是( )。

A)美不胜收-目不暇接B)耀武扬威-弃甲曳兵C)水滴石穿-磨棒成针D)雨后春笋-每况愈下4.[单选题]关于SQLite3数据库的操作,下面说法不正确的是( )A)Context 对象调用openOrCreateDatabase 方法打开或者创建数据库B)SQLiteDatabase 类的静态方法openOrCreateDatabase 方法打开或者创建数据库C)Context 对象closeDatabase 方法关闭数据库。

D)SQLiteDatabase类的静态方法deleteDatabase 方法删除数据库5.[单选题]Android 项目工程下面的assets 目录的作用是什么A)放置应用到的图片资源。

B)主要放置多媒体等数据文件C)放置字符串,颜色,数组等常量数据D)放置一些与UI 相应的布局文件,都是xml 文件6.[单选题]若将多个按钮组合在一起,使用哪个控件可以实现分组?A)RadioGroupB)RadioC)RadioButtonD)Group7.[单选题]当使用EdifText控件时,能够将文本框设置为多行显示的属性是( )。

A)android:linesB)android:layout_heightC)android:textcolorD)android:textsize8.[单选题]可可在滑滑梯时不小心把腿给蹭了,当时只是蹭破一点皮,因此放学时老师也就没有告诉家长,可第二天可可的爷爷说孩子的腿都淤青了,问老师是怎么回事。

农历时间日期代码

农历时间日期代码

农历时间日期<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>单行带农历的日期时间代码</title></head><body><SCRIPT language=JavaScript><!--function CalConv(){FIRSTYEAR = 1998;LASTYEAR = 2031;today = new Date();SolarYear = today.getFullYear();SolarMonth = today.getMonth() + 1;SolarDate = today.getDate();Weekday = today.getDay();LunarCal = [new tagLunarCal( 27, 5, 3, 43, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1 ),new tagLunarCal( 46, 0, 4, 48, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1 ), /* 88 */ new tagLunarCal( 35, 0, 5, 53, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1 ), /* 89 */ new tagLunarCal( 23, 4, 0, 59, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),new tagLunarCal( 42, 0, 1, 4, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),new tagLunarCal( 31, 0, 2, 9, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0 ),new tagLunarCal( 21, 2, 3, 14, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1 ), /* 93 */ new tagLunarCal( 39, 0, 5, 20, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1 ),new tagLunarCal( 28, 7, 6, 25, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1 ),new tagLunarCal( 48, 0, 0, 30, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1 ),new tagLunarCal( 37, 0, 1, 35, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1 ), /* 97 */ new tagLunarCal( 25, 5, 3, 41, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1 ),new tagLunarCal( 44, 0, 4, 46, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1 ),new tagLunarCal( 33, 0, 5, 51, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),new tagLunarCal( 22, 4, 6, 56, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ), /* 101 */ new tagLunarCal( 40, 0, 1, 2, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ),new tagLunarCal( 30, 9, 2, 7, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1 ),new tagLunarCal( 49, 0, 3, 12, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1 ),new tagLunarCal( 38, 0, 4, 17, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0 ), /* 105 */ new tagLunarCal( 27, 6, 6, 23, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1 ),new tagLunarCal( 46, 0, 0, 28, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0 ),new tagLunarCal( 35, 0, 1, 33, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0 ),new tagLunarCal( 24, 4, 2, 38, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ), /* 109 */new tagLunarCal( 42, 0, 4, 44, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 ),new tagLunarCal( 31, 0, 5, 49, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0 ),new tagLunarCal( 21, 2, 6, 54, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1 ),new tagLunarCal( 40, 0, 0, 59, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1 ), /* 113 */new tagLunarCal( 28, 6, 2, 5, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0 ),new tagLunarCal( 47, 0, 3, 10, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1 ),new tagLunarCal( 36, 0, 4, 15, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1 ),new tagLunarCal( 25, 5, 5, 20, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0 ), /* 117 */new tagLunarCal( 43, 0, 0, 26, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1 ),new tagLunarCal( 32, 0, 1, 31, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0 ),new tagLunarCal( 22, 3, 2, 36, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0 ) ];/* 民國年每月之日數all by */SolarCal = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];/* 民國年每月之累積日數, 平年與閏年*/SolarDays = [ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365, 396, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366, 397 ];if ( SolarYear <= FIRSTYEAR || SolarYear > LASTYEAR ) return 1;sm = SolarMonth - 1;if ( sm < 0 || sm > 11 ) return 2;leap = GetLeap( SolarYear );if ( sm == 1 )d = leap + 28;elsed = SolarCal[sm];if ( SolarDate < 1 || SolarDate > d ) return 3;y = SolarYear - FIRSTYEAR;acc = SolarDays[ leap*14 + sm ] + SolarDate;kc = acc + LunarCal[y].BaseKanChih;Kan = kc % 10;Chih = kc % 12;Age = kc % 60;if ( Age < 22 )Age = 22 - Age;elseAge = 82 - Age;if ( acc <= LunarCal[y].BaseDays ) {y--;LunarYear = SolarYear - 1;leap = GetLeap( LunarYear );sm += 12;acc = SolarDays[leap*14 + sm] + SolarDate;}elseLunarYear = SolarYear;l1 = LunarCal[y].BaseDays;for ( i=0; i<13; i++ ) {l2 = l1 + LunarCal[y].MonthDays[i] + 29;if ( acc <= l2 ) break;l1 = l2;}LunarMonth = i + 1;LunarDate = acc - l1;im = LunarCal[y].Intercalation;if ( im != 0 && LunarMonth > im ) {LunarMonth--;if ( LunarMonth == im ) LunarMonth = -im;}if ( LunarMonth > 12 ) LunarMonth -= 12;today=new Date();function initArray(){this.length=initArray.arguments.lengthfor(var i=0;i<this.length;i++)this[i+1]=initArray.arguments[i] }var d=new initArray("星期日","星期一","星期二","星期三","星期四","星期五","星期六"); document.write("", today.getYear(),"年",today.getMonth()+1,"月",today.getDate(),"日&nbsp;",d[today.getDay()+1],"");months = ["一","二","三","四","五","六","七","八","九","十","十一","十二"];days = ["初一","初二","初三","初四","初五","初六","初七","初八","初九","初十","十一","十二","十三","十四","十五","十六","十七","十八","十九","二十","廿一","廿二","廿三","廿四","廿五","廿六","廿七","廿八","廿九","三十"];document.write( "&nbsp;农历"+months[LunarMonth-1]+"月" + days[LunarDate-1] + "");return 0;}/* 求此民國年是否為閏年, 返回0 為平年, 1 為閏年*/function GetLeap( year ){if ( year % 400 == 0 )return 1;else if ( year % 100 == 0 )return 0;else if ( year % 4 == 0 )return 1;elsereturn 0;}function tagLunarCal( d, i, w, k, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13) { this.BaseDays = d; /* 到民國1 月1 日到農曆正月初一的累積日數*/this.Intercalation = i; /* 閏月月份. 0==此年沒有閏月*/this.BaseWeekday = w; /* 此年民國1 月1 日為星期幾再減1 */this.BaseKanChih = k; /* 此年民國1 月1 日之干支序號減1 */this.MonthDays = [ m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13 ]; /* 此農曆年每月之大小, 0==小月(29日), 1==大月(30日) */}//--></SCRIPT><a target=_blank href=><FONT color=#2b68a7><SCRIPT>CalConv();</SCRIPT></FONT></a></body></html>本代码由<a href=>网页特效网</a>提供QQ菜单似的下拉门<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="/1999/xhtml"><head><title>下拉滚动门</title><style type="text/css">body{margin:10px;padding:10px;}body,td,div,span,li{font-size:12px;}.title01,.title02{color:#fff;font-weight:bold;}#DoorP{border:12px solid #eee; width:150px;height:300px;padding:4px; background:#fff;}.title01{width:100%;height:25px; background:#00ccff; cursor:pointer;}.title02{width:100%;height:25px; background:#99cc00; cursor:pointer;}.content{background:#eee;border-bottom:2px solid #fff; overflow:hidden;color:#666;padding-left:4px;padding-right:4px;line-height:18px;}</style><!--棕:#eee;蓝:#00ccff;绿:#99cc00;--></head><body><div id="DoorP"><table><tr><td>第一层信息</td></tr></table><div class="content">十三妖<br/>十三妖<br/>十三妖<br/></div><table><tr><td>第二层信息</td></tr></table><div class="content"> ThirdteenDevil</div><table><tr><td>第三层信息</td></tr></table><div class="content">devil13th</div></div><script type="text/javascript">var open = 2;// 设置初始打开的层序号var openState = new Array();var closeState = new Array();var dH = 220;function $(id){if(document.getElementById(id)) {return document.getElementById(id); }else{alert("没有找到!");}}function $tag(id,tagName){return $(id).getElementsByTagName(tagName)}function closeMe(Cid,Oid){var h = parseInt(Ds[Cid].style.height);//alert(h);if(h > 0){h = h - Math.ceil(h/3);Ds[Cid].style.height = h+"px";}else{openMe(Oid);clearTimeout(closeState[Cid]);return false;}closeState[Cid] = setTimeout("closeMe("+Cid+","+Oid+")"); }function openMe(Oid){var h = parseInt(Ds[Oid].style.height);//alert(h);if(h < dH){h = h + Math.ceil((dH-h)/3);Ds[Oid].style.height = h+"px";}else{clearTimeout(openState[Oid]);return false;}openState[Oid] = setTimeout("openMe("+Oid+")");}var Ds = $tag("DoorP","div");var Ts = $tag("DoorP","table");if(Ds.length != Ts.length){alert("标题和内容数目不相同!");}for(var i = 0 ; i < Ds.length ; i++){if(i==open){Ds[i].style.height = dH+"px";Ts[i].className="title01";}else{Ds[i].style.height = "0px";Ts[i].className="title02";}Ts[i].value = i;Ts[i].onclick = function(){if(open==this.value){return false;}Ts[open].className="title02";Ts[this.value].className="title01";for(var i = 0 ; i < openState.length ; i++){clearTimeout(openState[i]);clearTimeout(closeState[i]);}closeMe(open,this.value);//openMe(this.value);open = this.value;}}//直接打开层函数function showDiv(id){Ds[id].style.height=dH+"px";Ds[open].style.height="0px";open = id;}//渐渐打开层函数</script></body></html>本代码由<a href=>网页特效网</a>提供文字的折叠与展开<div align="center"><table border="0" width="300" cellpadding="0" style="border-collapse: collapse" id="table1" bgcolor="#F3F3F3" cellspacing="10"><tr><td valign="top" style="line-height: 150%"><div class="block" id="smallContent" style="display:block"><span style="font-size: 9pt"> <b>专辑介绍:</b>青春光影是由中国80后影像精英共同组建的新媒体影视摄制机构。

农历时间日期代码

农历时间日期代码

农历时间日期<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>单行带农历的日期时间代码</title></head><body><SCRIPT language=JavaScript><!--function CalConv(){FIRSTYEAR = 1998;LASTYEAR = 2031;today = new Date();SolarYear = today.getFullYear();SolarMonth = today.getMonth() + 1;SolarDate = today.getDate();Weekday = today.getDay();LunarCal = [new tagLunarCal( 27, 5, 3, 43, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1 ),new tagLunarCal( 46, 0, 4, 48, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1 ), /* 88 */ new tagLunarCal( 35, 0, 5, 53, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1 ), /* 89 */ new tagLunarCal( 23, 4, 0, 59, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),new tagLunarCal( 42, 0, 1, 4, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),new tagLunarCal( 31, 0, 2, 9, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0 ),new tagLunarCal( 21, 2, 3, 14, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1 ), /* 93 */ new tagLunarCal( 39, 0, 5, 20, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1 ),new tagLunarCal( 28, 7, 6, 25, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1 ),new tagLunarCal( 48, 0, 0, 30, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1 ),new tagLunarCal( 37, 0, 1, 35, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1 ), /* 97 */ new tagLunarCal( 25, 5, 3, 41, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1 ),new tagLunarCal( 44, 0, 4, 46, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1 ),new tagLunarCal( 33, 0, 5, 51, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),new tagLunarCal( 22, 4, 6, 56, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ), /* 101 */ new tagLunarCal( 40, 0, 1, 2, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ),new tagLunarCal( 30, 9, 2, 7, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1 ),new tagLunarCal( 49, 0, 3, 12, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1 ),new tagLunarCal( 38, 0, 4, 17, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0 ), /* 105 */ new tagLunarCal( 27, 6, 6, 23, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1 ),new tagLunarCal( 46, 0, 0, 28, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0 ),new tagLunarCal( 35, 0, 1, 33, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0 ),new tagLunarCal( 24, 4, 2, 38, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ), /* 109 */new tagLunarCal( 42, 0, 4, 44, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 ),new tagLunarCal( 31, 0, 5, 49, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0 ),new tagLunarCal( 21, 2, 6, 54, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1 ),new tagLunarCal( 40, 0, 0, 59, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1 ), /* 113 */new tagLunarCal( 28, 6, 2, 5, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0 ),new tagLunarCal( 47, 0, 3, 10, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1 ),new tagLunarCal( 36, 0, 4, 15, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1 ),new tagLunarCal( 25, 5, 5, 20, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0 ), /* 117 */new tagLunarCal( 43, 0, 0, 26, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1 ),new tagLunarCal( 32, 0, 1, 31, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0 ),new tagLunarCal( 22, 3, 2, 36, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0 ) ];/* 民國年每月之日數all by */SolarCal = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];/* 民國年每月之累積日數, 平年與閏年*/SolarDays = [ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365, 396, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366, 397 ];if ( SolarYear <= FIRSTYEAR || SolarYear > LASTYEAR ) return 1;sm = SolarMonth - 1;if ( sm < 0 || sm > 11 ) return 2;leap = GetLeap( SolarYear );if ( sm == 1 )d = leap + 28;elsed = SolarCal[sm];if ( SolarDate < 1 || SolarDate > d ) return 3;y = SolarYear - FIRSTYEAR;acc = SolarDays[ leap*14 + sm ] + SolarDate;kc = acc + LunarCal[y].BaseKanChih;Kan = kc % 10;Chih = kc % 12;Age = kc % 60;if ( Age < 22 )Age = 22 - Age;elseAge = 82 - Age;if ( acc <= LunarCal[y].BaseDays ) {y--;LunarYear = SolarYear - 1;leap = GetLeap( LunarYear );sm += 12;acc = SolarDays[leap*14 + sm] + SolarDate;}elseLunarYear = SolarYear;l1 = LunarCal[y].BaseDays;for ( i=0; i<13; i++ ) {l2 = l1 + LunarCal[y].MonthDays[i] + 29;if ( acc <= l2 ) break;l1 = l2;}LunarMonth = i + 1;LunarDate = acc - l1;im = LunarCal[y].Intercalation;if ( im != 0 && LunarMonth > im ) {LunarMonth--;if ( LunarMonth == im ) LunarMonth = -im;}if ( LunarMonth > 12 ) LunarMonth -= 12;today=new Date();function initArray(){this.length=initArray.arguments.lengthfor(var i=0;i<this.length;i++)this[i+1]=initArray.arguments[i] }var d=new initArray("星期日","星期一","星期二","星期三","星期四","星期五","星期六"); document.write("", today.getYear(),"年",today.getMonth()+1,"月",today.getDate(),"日&nbsp;",d[today.getDay()+1],"");months = ["一","二","三","四","五","六","七","八","九","十","十一","十二"];days = ["初一","初二","初三","初四","初五","初六","初七","初八","初九","初十","十一","十二","十三","十四","十五","十六","十七","十八","十九","二十","廿一","廿二","廿三","廿四","廿五","廿六","廿七","廿八","廿九","三十"];document.write( "&nbsp;农历"+months[LunarMonth-1]+"月" + days[LunarDate-1] + "");return 0;}/* 求此民國年是否為閏年, 返回0 為平年, 1 為閏年*/function GetLeap( year ){if ( year % 400 == 0 )return 1;else if ( year % 100 == 0 )return 0;else if ( year % 4 == 0 )return 1;elsereturn 0;}function tagLunarCal( d, i, w, k, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13) { this.BaseDays = d; /* 到民國1 月1 日到農曆正月初一的累積日數*/this.Intercalation = i; /* 閏月月份. 0==此年沒有閏月*/this.BaseWeekday = w; /* 此年民國1 月1 日為星期幾再減1 */this.BaseKanChih = k; /* 此年民國1 月1 日之干支序號減1 */this.MonthDays = [ m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13 ]; /* 此農曆年每月之大小, 0==小月(29日), 1==大月(30日) */}//--></SCRIPT><a target=_blank href=><FONT color=#2b68a7><SCRIPT>CalConv();</SCRIPT></FONT></a></body></html>本代码由<a href=>网页特效网</a>提供QQ菜单似的下拉门<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="/1999/xhtml"><head><title>下拉滚动门</title><style type="text/css">body{margin:10px;padding:10px;}body,td,div,span,li{font-size:12px;}.title01,.title02{color:#fff;font-weight:bold;}#DoorP{border:12px solid #eee; width:150px;height:300px;padding:4px; background:#fff;}.title01{width:100%;height:25px; background:#00ccff; cursor:pointer;}.title02{width:100%;height:25px; background:#99cc00; cursor:pointer;}.content{background:#eee;border-bottom:2px solid #fff; overflow:hidden;color:#666;padding-left:4px;padding-right:4px;line-height:18px;}</style><!--棕:#eee;蓝:#00ccff;绿:#99cc00;--></head><body><div id="DoorP"><table><tr><td>第一层信息</td></tr></table><div class="content">十三妖<br/>十三妖<br/>十三妖<br/></div><table><tr><td>第二层信息</td></tr></table><div class="content"> ThirdteenDevil</div><table><tr><td>第三层信息</td></tr></table><div class="content">devil13th</div></div><script type="text/javascript">var open = 2;// 设置初始打开的层序号var openState = new Array();var closeState = new Array();var dH = 220;function $(id){if(document.getElementById(id)) {return document.getElementById(id); }else{alert("没有找到!");}}function $tag(id,tagName){return $(id).getElementsByTagName(tagName)}function closeMe(Cid,Oid){var h = parseInt(Ds[Cid].style.height);//alert(h);if(h > 0){h = h - Math.ceil(h/3);Ds[Cid].style.height = h+"px";}else{openMe(Oid);clearTimeout(closeState[Cid]);return false;}closeState[Cid] = setTimeout("closeMe("+Cid+","+Oid+")"); }function openMe(Oid){var h = parseInt(Ds[Oid].style.height);//alert(h);if(h < dH){h = h + Math.ceil((dH-h)/3);Ds[Oid].style.height = h+"px";}else{clearTimeout(openState[Oid]);return false;}openState[Oid] = setTimeout("openMe("+Oid+")");}var Ds = $tag("DoorP","div");var Ts = $tag("DoorP","table");if(Ds.length != Ts.length){alert("标题和内容数目不相同!");}for(var i = 0 ; i < Ds.length ; i++){if(i==open){Ds[i].style.height = dH+"px";Ts[i].className="title01";}else{Ds[i].style.height = "0px";Ts[i].className="title02";}Ts[i].value = i;Ts[i].onclick = function(){if(open==this.value){return false;}Ts[open].className="title02";Ts[this.value].className="title01";for(var i = 0 ; i < openState.length ; i++){clearTimeout(openState[i]);clearTimeout(closeState[i]);}closeMe(open,this.value);//openMe(this.value);open = this.value;}}//直接打开层函数function showDiv(id){Ds[id].style.height=dH+"px";Ds[open].style.height="0px";open = id;}//渐渐打开层函数</script></body></html>本代码由<a href=>网页特效网</a>提供文字的折叠与展开<div align="center"><table border="0" width="300" cellpadding="0" style="border-collapse: collapse" id="table1" bgcolor="#F3F3F3" cellspacing="10"><tr><td valign="top" style="line-height: 150%"><div class="block" id="smallContent" style="display:block"><span style="font-size: 9pt"> <b>专辑介绍:</b>青春光影是由中国80后影像精英共同组建的新媒体影视摄制机构。

日期时间选择表

日期时间选择表
}
//设置时间分隔符。默认为":"
function setTimeSplit(strTimeSplit){
tiannetTimeSplit = strTimeSplit;
}
//设置分隔符
function setSplit(strDateSplit,strDateTimeSplit,strTimeSplit){
'onclick="spanYearCEvent();">&nbsp;年</span>');
document.write('<select id="selTianYear" style="'+s_tiannet_select+'" Author="tiannet" '+
' onChange="tiannetYear=this.value;tiannetSetDay(tiannetYear,tiannetMonth);document.all.tiannetYearHead.style.display=\'\';'+
//字体样式
var s_tiannet_font = "color:#FFCC00;font-size:9pt;cursor:hand;";
//链接的样式
var s_tiannet_link = "text-decoration:none;font-size:9pt;color:#2650A6;";
//横线
var s_tiannet_line = "border-bottom:1 solid #6699CC";

乱码破解流程

乱码破解流程

乱码破解经典流程日期:2004年7月1日作者:人气:621??? 随着Internet的普及,在网上通过e-mail传递信息逐渐成为现代人生活的一部分,甚至不久还会成为一种生活的必需内容。

但我们在接收电子邮件的时候,不时会发现接收的邮件是些怪模怪样的乱码,根本无法阅读。

当遇到这种情况时,我们可以针对邮件乱码的现象分析它的种类,并利用手工的方法来破解。

但是这种方法不仅繁而且难,恐怕有相当一部分朋友不知如何下手,即使有个一知半解的,也会面对众多的手工解决方法而不知如何选择。

在这里笔者给大家提供一套破解邮件乱码的通用流程,至于是不是经典,那当然得由大家说了算啊!?当你收到一封乱码邮件时,第一步必须要做的是根据乱码的特征判断它到底属于哪种编码(通常有UU、MIME和BINHEX三种编码,而MIME又可细分为好几种),如果能判断出是哪种编码,最简单的方法当然是将乱码邮件剪贴下来,利用现成的乱码邮件解码软件(如乱码察看器或邮件解码器,在“华军软件园”能下载到)来解码阅读或利用中文之星、Richwin、南极星这样的中文平台转换内码。

但如果根据邮件的内容你一时判别不出是哪种编码,或者你没有任何现成的解码工具软件,则你可以如此这般地一步一步地做下去(以Outlook Express 5为例)。

?更改OE5设置?启动Outlook Express,单击“工具”/“选项”命令,在出现的对话窗中单击“阅读”标签,再单击“字体”按钮,选择“简体中文(GB2312)”。

接下来将它设置为默认值,单击“国际设置”按钮,选中“为接收的所有的邮件使用默认的编码”(如图1),确定后退出。

如此设置后,当你再打开邮件阅读时,通常就不会再出现乱码了。

?编码选项查看?如果第一步没能奏效,你可以在Outlook Express中选定乱码邮件,然后单击“查看”/“编码”/“简体中文(GB2312)”(如图2)或“其他”/“简体中文(HZ)”,看看邮件内容是不是能破解。

Lunar-java

Lunar-java

Lunar.java类:[mw_shl_code=java,true]public class Lunar {private int year;private int month;private int day;private boolean leap;final static String chineseNumber[] = {"一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二"};static SimpleDateFormat chineseDateFormat = new SimpleDateFormat("yyyy年MM月dd日");final static long[] lunarInfo = new long[]{0x04bd8, 0x04ae0, 0x0a570, 0x054d5, 0x0d260, 0x0d950, 0x16554, 0x056a0, 0x09ad0, 0x055d2,0x04ae0, 0x0a5b6, 0x0a4d0, 0x0d250, 0x1d255, 0x0b540, 0x0d6a0, 0x0ada2, 0x095b0, 0x14977,0x04970, 0x0a4b0, 0x0b4b5, 0x06a50, 0x06d40, 0x1ab54, 0x02b60, 0x09570, 0x052f2, 0x04970,0x06566, 0x0d4a0, 0x0ea50, 0x06e95, 0x05ad0, 0x02b60, 0x186e3, 0x092e0, 0x1c8d7, 0x0c950,0x0d4a0, 0x1d8a6, 0x0b550, 0x056a0, 0x1a5b4, 0x025d0, 0x092d0, 0x0d2b2, 0x0a950, 0x0b557,0x06ca0, 0x0b550, 0x15355, 0x04da0, 0x0a5d0, 0x14573,0x052d0, 0x0a9a8, 0x0e950, 0x06aa0,0x0aea6, 0x0ab50, 0x04b60, 0x0aae4, 0x0a570, 0x05260, 0x0f263, 0x0d950, 0x05b57, 0x056a0,0x096d0, 0x04dd5, 0x04ad0, 0x0a4d0, 0x0d4d4, 0x0d250, 0x0d558, 0x0b540, 0x0b5a0, 0x195a6,0x095b0, 0x049b0, 0x0a974, 0x0a4b0, 0x0b27a, 0x06a50, 0x06d40, 0x0af46, 0x0ab60, 0x09570,0x04af5, 0x04970, 0x064b0, 0x074a3, 0x0ea50, 0x06b58, 0x055c0, 0x0ab60, 0x096d5, 0x092e0,0x0c960, 0x0d954, 0x0d4a0, 0x0da50, 0x07552, 0x056a0, 0x0abb7, 0x025d0, 0x092d0, 0x0cab5,0x0a950, 0x0b4a0, 0x0baa4, 0x0ad50, 0x055d9, 0x04ba0, 0x0a5b0, 0x15176, 0x052b0, 0x0a930,0x07954, 0x06aa0, 0x0ad50, 0x05b52, 0x04b60, 0x0a6e6, 0x0a4e0, 0x0d260, 0x0ea65, 0x0d530,0x05aa0, 0x076a3, 0x096d0, 0x04bd7, 0x04ad0, 0x0a4d0, 0x1d0b6, 0x0d250, 0x0d520, 0x0dd45,0x0b5a0, 0x056d0, 0x055b2, 0x049b0, 0x0a577, 0x0a4b0, 0x0aa50, 0x1b255, 0x06d20, 0x0ada0};//====== 传回农历y年的总天数final private static int yearDays(int y) {int i, sum = 348;for (i = 0x8000; i > 0x8; i >>= 1) {if ((lunarInfo[y - 1900] & i) != 0) sum += 1;}return (sum + leapDays(y));}//====== 传回农历y年闰月的天数final private static int leapDays(int y) {if (leapMonth(y) != 0) {if ((lunarInfo[y - 1900] & 0x10000) != 0)return 30;elsereturn 29;} elsereturn 0;}//====== 传回农历y年闰哪个月1-12 , 没闰传回0 final private static int leapMonth(int y) {return (int) (lunarInfo[y - 1900] & 0xf);}//====== 传回农历y年m月的总天数final private static int monthDays(int y, int m) {if ((lunarInfo[y - 1900] & (0x10000 >> m)) == 0)return 29;elsereturn 30;}//====== 传回农历y年的生肖final public String animalsYear() {final String[] Animals = new String[]{"鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊", "猴", "鸡", "狗", "猪"};return Animals[(year - 4) % 12];}//====== 传入月日的offset 传回干支, 0=甲子final private static String cyclicalm(int num) {final String[] Gan = new String[]{"甲", "乙", "丙", "丁", "戊", "己", "庚", "辛", "壬", "癸"};final String[] Zhi = new String[]{"子", "丑", "寅", "卯", "辰", "巳", "午", "未", "申", "酉", "戌", "亥"};return (Gan[num % 10] + Zhi[num % 12]);}//====== 传入offset 传回干支, 0=甲子final public String cyclical() {int num = year - 1900 + 36;return (cyclicalm(num));}public String getLunarMonthString() {// TODO Auto-generated method stubreturn null;}public Lunar(Calendar cal) {@SuppressWarnings("unused") int yearCyl, monCyl, dayCyl; int leapMonth = 0;Date baseDate = null;try {baseDate = chineseDateFormat.parse("1900年1月31日"); } catch (ParseException e) {e.printStackTrace(); //To change body of catch statement use Options | File Templates.//求出和1900年1月31日相差的天数int offset = (int) ((cal.getTime().getTime() - baseDate.getTime()) / 86400000L);dayCyl = offset + 40;monCyl = 14;//用offset减去每农历年的天数// 计算当天是农历第几天//i最终结果是农历的年份//offset是当年的第几天int iYear, daysOfYear = 0;for (iYear = 1900; iYear < 2050 && offset > 0; iYear++) { daysOfYear = yearDays(iYear);offset -= daysOfYear;monCyl += 12;}if (offset < 0) {offset += daysOfYear;iYear--;monCyl -= 12;//农历年份year = iYear;yearCyl = iYear - 1864;leapMonth = leapMonth(iYear); //闰哪个月,1-12leap = false;//用当年的天数offset,逐个减去每月(农历)的天数,求出当天是本月的第几天int iMonth, daysOfMonth = 0;for (iMonth = 1; iMonth < 13 && offset > 0; iMonth++) {//闰月if (leapMonth > 0 && iMonth == (leapMonth + 1) && !leap) { --iMonth;leap = true;daysOfMonth = leapDays(year);} elsedaysOfMonth = monthDays(year, iMonth);offset -= daysOfMonth;//解除闰月if (leap && iMonth == (leapMonth + 1)) leap = false;if (!leap) monCyl++;}//offset为0时,并且刚才计算的月份是闰月,要校正if (offset == 0 && leapMonth > 0 && iMonth == leapMonth + 1) {if (leap) {leap = false;} else {leap = true;--iMonth;--monCyl;}}//offset小于0时,也要校正if (offset < 0) {offset += daysOfMonth;--iMonth;--monCyl;}month = iMonth;day = offset + 1;}public static String getChinaDayString(int day) {String chineseTen[] = {"初", "十", "廿", "三"};int n = day % 10 == 0 ? 9 : day % 10 - 1;if (day > 30)return "";if (day == 10)return "初十";elsereturn chineseTen[day / 10] + chineseNumber[n];}public String toString() {return year + "年" + (leap ? "闰" : "") + chineseNumber[month - 1] + "月" + getChinaDayString(day);}}[/mw_shl_code](1)打印一个农历信息在TextView上在Grid类的updateMsg方法添加以下代码:[mw_shl_code=java,true]Lunar lunar = new Lunar(calendar);String lunarStr = "";lunarStr=lunar.animalsYear()+"年("; lunarStr +=lunar.cyclical()+"年)";lunarStr +=lunar.toString();tvMsg3.setText(lunarStr);[/mw_shl_code]这样就能实现了,很简单吧!(2)全部日期都显示农历信息,效果图如下:同样在Grid类里的draw(Cavas cavas)方法中在for (int i = 0; i < days.length; i++)循环前面添加以下代码:calendar.set(currentYear, currentMonth, currentDay);SimpleDateFormat abc = new SimpleDateFormat("yyyy年MM月dd日"); 在for (int i = 0; i < days.length; i++)循环里添加以下代码:[mw_shl_code=java,true]if(days.startsWith("*")){// 下月if (i > 20){String nowday = currentYear + "年" + (currentMonth+2) + "月" + myText + "日"; java.util.Calendar currentDay = java.util.Calendar.getInstance();try {//定义传入ChineseCalendar参数的格式currentDay.setTime(abc.parse(nowday));//System.out.println("currentDay:"+currentDa y);} catch (ParseException e) {e.printStackTrace();}Lunar lunar = new Lunar(currentDay); String currentDate = lunar.toString();int startIndex = currentDate.length()-2;//获取农历月份String showMonth = currentDate.substring(startIndex-2, startIndex);//获取农历的日String showDay = currentDate.substring(startIndex);//当农历的日为“初一时”,画出该天的月份//否则画出该天农历的日if (showDay.equals("初一")) {canvas.drawText(showMonth, textLeft1, textTop1, paint);} else {canvas.drawText(showDay, textLeft1, textTop1, paint);}}// 上月else{String nowday = currentYear + "年" + (currentMonth) + "月" + myText + "日";java.util.Calendar currentDay = java.util.Calendar.getInstance();try {//定义传入ChineseCalendar参数的格式currentDay.setTime(abc.parse(nowday));//System.out.println("currentDay:"+currentDa y);} catch (ParseException e) {e.printStackTrace();}Lunar lunar = new Lunar(currentDay); String currentDate = lunar.toString();int startIndex = currentDate.length()-2;//获取农历月份String showMonth = currentDate.substring(startIndex-2, startIndex);//获取农历的日String showDay = currentDate.substring(startIndex);//当农历的日为“初一时”,画出该天的月份//否则画出该天农历的日if (showDay.equals("初一")) {canvas.drawText(showMonth, textLeft1, textTop1, paint);} else {canvas.drawText(showDay, textLeft1, textTop1, paint);}}}else{String nowday = currentYear + "年" + (currentMonth+1) + "月" + myText + "日"; java.util.Calendar currentDay = java.util.Calendar.getInstance();try {//定义传入ChineseCalendar参数的格式currentDay.setTime(abc.parse(nowday));//System.out.println("currentDay:"+currentDa y);} catch (ParseException e) {e.printStackTrace();}Lunar lunar = new Lunar(currentDay); String currentDate = lunar.toString();int startIndex = currentDate.length()-2;//获取农历月份String showMonth = currentDate.substring(startIndex-2, startIndex);//获取农历的日String showDay = currentDate.substring(startIndex);//当农历的日为“初一时”,画出该天的月份//否则画出该天农历的日if (showDay.equals("初一")) {canvas.drawText(showMonth, textLeft1, textTop1, paint);} else {canvas.drawText(showDay, textLeft1, textTop1, paint);}}canvas.drawText(myText, textLeft, textTop,paint);[/mw_shl_code]。

FineReport使用函数大全

FineReport使用函数大全

文本函数CHARCHAR(number):根据指定数字返回对应的字符。

CHAR函数可将计算机其他类型的数字代码转换为字符。

Number:用于指定字符的数字,介于1Number:用于指定字符的数字,介于165535之间(包括1和65535)。

示例:CHAR(88)等于“X”。

CHAR(45)等于“-”。

CODECODE(text):计算文本串中第一个字符的数字代码。

返回的代码对应于计算机使用的字符集。

Text:需要计算第一个字符代码的文本或单元格引用。

示例:CODE("S")等于83。

CODE("Spreadsheet")等于83。

CONCATENATECONCATENATE(text1,text2,...):将数个字符串合并成一个字符串。

Text1,text2,...:需要合并成单个文本的文本项,可以是字符,数字或是单元格引用。

备注:也可以用“&”来代替CONCATENATE函数对文本项进行合并。

示例:CONCATENATE("Average ","Price")等于“Average Price”,这相当于“Average”&“ ”&“Price”。

CONCATENATE("1","2")等于12。

ENDWITHENDWITH(str1,str2):判断字符串str1是否以str2结束。

备注: str1和str2都是大小写敏感的。

示例:ENDWITH("FineReport","Report")等于trueENNUMBER。

ENDWITH("FineReport","Fine")等于false。

ENDWITH("FineReport","report"ENNUMBERENNUMBER(value):将给定的BigDecimal类型的数字转化成英文金额的字符串。

Excel函数计算公式大全

Excel函数计算公式大全

Excel函数计算公式大全1.常用函数- SUM(range):求一组数的和- AVERAGE(range):求一组数的平均值- MAX(range):求一组数的最大值- MIN(range):求一组数的最小值- COUNT(range):统计一组数的个数2.文本函数- CONCATENATE(text1, text2, ...):将多个文本串连接起来- LEFT(text, num_chars):截取文本串左边的指定字符数- RIGHT(text, num_chars):截取文本串右边的指定字符数- LEN(text):计算文本串的长度- SUBSTITUTE(text, old_text, new_text, instance_num):用新文本替换旧文本- UPPER(text):将文本串转换为大写- LOWER(text):将文本串转换为小写- PROPER(text):将文本串的每个单词首字母大写3.日期函数-TODAY(:返回当前日期-NOW(:返回当前日期和时间- YEAR(date):返回日期的年份- MONTH(date):返回日期的月份- DAY(date):返回日期的天数- DATE(year, month, day):根据年、月、日返回日期- TIME(hour, minute, second):根据小时、分钟、秒返回时间- DATEDIF(start_date, end_date, unit):计算两个日期之间的差值4.逻辑函数- IF(logical_test, value_if_true, value_if_false):根据逻辑条件返回不同的值- AND(logical1, logical2, ...):判断多个条件是否都为真- OR(logical1, logical2, ...):判断多个条件是否有一个为真- NOT(logical):对逻辑值进行取反操作-TRUE(:返回逻辑值TRUE-FALSE(:返回逻辑值FALSE5.数学函数- ROUND(number, num_digits):对数值进行四舍五入- INT(number):返回数值的整数部分- ABS(number):返回数值的绝对值- POWER(number, power):计算数值的指定次幂- SQRT(number):计算数值的平方根- LOG(number, base):计算数值的对数-RAND(:生成一个0到1之间的随机数6.统计函数- COUNTIF(range, criteria):统计满足条件的单元格个数- AVERAGEIF(range, criteria, average_range):统计满足条件的单元格的平均值- SUMIF(range, criteria, sum_range):统计满足条件的单元格的和- COUNTIFS(criteria_range1, criteria1, criteria_range2, criteria2, ...):统计多个条件同时满足的单元格个数- AVERAGEIFS(average_range, criteria_range1, criteria1, criteria_range2, criteria2, ...):统计多个条件同时满足的单元格的平均值- SUMIFS(sum_range, criteria_range1, criteria1,criteria_range2, criteria2, ...):统计多个条件同时满足的单元格的和7.查找函数- VLOOKUP(lookup_value, table_array, col_index_num,range_lookup):在表格中进行垂直查找- HLOOKUP(lookup_value, table_array, row_index_num,range_lookup):在表格中进行水平查找- INDEX(array,row_num, column_num):返回数组中指定位置的元素- MATCH(lookup_value, lookup_array, match_type):在数组中查找指定值的位置- LOOKUP(lookup_value, lookup_vector, result_vector):在向量中进行查找并返回对应结果8.数据库函数- DSUM(database, field, criteria):对数据库中指定字段进行求和- DCOUNT(database, field, criteria):对数据库中指定字段进行计数- DMAX(database, field, criteria):在数据库中找到满足条件的字段的最大值- DMIN(database, field, criteria):在数据库中找到满足条件的字段的最小值- DAVERAGE(database, field, criteria):对数据库中指定字段进行平均值计算- DGET(database, field, criteria):在数据库中根据条件获取指定字段的唯一值以上仅是Excel函数计算公式的一小部分,Excel还提供了许多其他函数和功能,如条件函数、数组函数、工程函数、金融函数等。

CNKI 硕博库

CNKI 硕博库

CNKI 硕博库/kns50/syhnsw/syhnswQUOTE:7月19日更新清华CNKI全能资源/lujun/xyth24CNKI(期刊+博硕学位论文+会议论文+重要报纸全文) /用户名/密码:sybjlhdx/sybjlhdxcnki全库sybjlhdx/sybjlhdx北京联合大学本部转霏凡的bluntheartQUOTE:9月22日更新CNKIsybjlhdx/sybjlhdxahtykj/ahtykjCNKIhttp://221.237.177.199/default.asp?look=1 UserName: cddd PassWord: cd8809中国学术会议论文全文万方数据库http://218.69.114.37/wf/hylw/pacccn.htm中国优秀博硕士学位论文全文数据库:8382/cdmd/login.aspspringerlinkcqnu.admin/library44Ezproxy of San Diego State Universityhttps:///cgi-bin/ezpiiib.cgi1、soudoc/BROWN/8087838922、KELLY JEAN /DUFFY/800273429/library/noproxy.htmMarit A. Berntson0249106Hollins University / Roanoke College Electronic Resources/hww/login.jhtmlusername: AWZ05password: SSNJ037636username: columbiahpassword: columbiahovidusername: hq9901paswword: mitty2美国Gale公司数据库/itweb/帐号:Leon85897密码:Leon85897OVID 帐号/alca456/alca456Ebsco login/Username: OYSTERH Password: 03824CNKI-医学库帐号帐号/密码: dx0210 /wzyy98(医学库)CNKI密码帐号:dx0043密码:jgy43医学类维普帐号/index.asp帐号/密码:jxlxl/abc123456中国学术会议论文全文万方数据库http://218.69.114.37/wf/hylw/pacccn.htmEzproxy of San Diego State Universityhttps:///cgi-bin/ezpiiib.cgi1、soudoc/BROWN/8087838922、KELLY JEAN /DUFFY/800273429/library/noproxy.htmMarit A. Berntson0249106Hollins University / Roanoke College Electronic Resources/hww/login.jhtmlusername: AWZ05password: SSNJ037636username: columbiahpassword: columbiah维普帐号/index.asp帐号/密码:jxlxl/abc123456台湾佛光大學.tw:3128hlchiang|hlchiang:2048/login906/smith453/Johnson456/Johnson231/Johnson:2048/loginpassword:13100944/login100505320001/SMITH中宏产业库帐号和密码/UserLogin.asp用户名:xzsfdx密码:xzsfbian中经网密码/index/index.asp用户名xnmd密码:xnmd维普全库http://210.32.205.31:8080/CNKI(期刊+博硕学位论文+会议论文+重要报纸全文)/用户名/密码:sybjlhdx/sybjlhdx复旦大学文献检索课程http://202.120.76.225/jiaoc/enter.htm用户guest;密码jiaoan2002《中文科技期刊数据库》(全文版)http://61.154.14.107:8080/index.asp帐号和密码:fytsg/3357199北京交通大学超星http://218.249.29.200/bookhtm/index.asp密码:jiazhuosheng用户:jiazhuoshengez/menu601951000011105California University of PA Louis L. Manderino LibraryEZ密码:2048/login13057085Database MenuEZ密码/login01361/WilliamsUniversidad de Puerto Rico-ezproxy帐号:2048/login username: Ortizpassword: 1171ieee帐号/帐号:ULEEDS77密码:LUNIV533ovid 密码/username: sww999password: waters维普VIP/application/database/帐号:centerkey密码:centerhttp://210.32.205.31:8080/index.asp维普医药密码qjyq ///qjyq南京中医药大学电子图书数据库http://202.195.214.16/bookhtm/index.asp万方期刊帐户和密码user:bcbuu1password:bcbuu1厦门市委党校cnki:8382/复旦大学数字图书馆http://202.120.227.5/bookhtm/book1.asp?lib=0000CNKI(至2005,期刊全库)http://210.28.216.233/cjfd/checkuser.asp?username=guest&password=guestcnki直接入口http://210.28.216.233/cjfd/checkuser.asp?username=guest&password=guestcnki直接入口(94-2006):8382/cjfd/login.aspezproxy/login/staffcouncilstaffcouncilaustin community college ez/loginsmith / 0002574Future Medicine journalsUsername: brantleyPassword: beckyNova Southeastern University高权帐号username: hpdlibrarypassword: libraryovid/username: sww999password: watersProquest/proquestFished combos :username: 07SNXJX2C9password: WELCOMEusername: BRV3G3S8V6password: WELCOMEusername: 0039KJK4DBpassword: WELCOMEpassword: 87TFK6VCPCPassword: WELCOMEQUOTE:9月18日更新维普VIP/application/database/帐号:centerkey密码:center(GOOD)cnki全库sybjlhdx/sybjlhdx北京联合大学本部四川大学网络教育学院http://221.10.252.222/index.asp帐号:密码10217Z13011:11110217Z13012:11110217Z13011:11110217Z13011:111万方资源http://61.139.67.149:90/地址:帐号:wfhyzgkx密码:xafy0531/wfdhlg/344000从黄淮学院图书馆链接地址为:在页面右边选择“万方学位论文”或者“万方数字期刊”链接即可进入登陆用户名:syhhxy 密码:hhxysy万方入口http://218.69.114.37/wf/cddb/cddbft.htm:85/indexs.htmlcnki 宁波市科技情报所/index.htmdx0210 / wzyy98医学库超星http://202.196.190.246/bookhtm/search.asp?text=老年&item=书名&item0=ALL&pag e=2:8381/index.asphttp://210.32.20.247/bookhtm/index.aspEzproxy of San Diego State Universityhttps:///cgi-bin/ezpiiib.cgi1、soudoc/BROWN/8087838922、KELLY JEAN /DUFFY/800273429/login104570081ovid密码/ID:cgk999Password:cgkaohebsco的密码/ID: swmslib password: bravesID = s6794633Password = passwordproquest密码/pqdwebUsername: 0C4JWBRCNXPassword: welcomeebsco密码37个/ID:lclspassword:libraryID:lcls1password:librarypassword:library.....ID:lcls36password:library这三十七个入口属于不同的图书馆,虽然都是文科方面的,但是权限不是太一样cnki全库sybjlhdx/sybjlhdx北京联合大学本部CNKI帐号/密码专集帐号/密码1 sh0118/cnqtsg期刊2 K10170/libjsb文学类3 xn0008b/lssfxy期刊4 K10129/gyzyjs期刊5 hfsgys/hfsgys博硕/期刊6 lzzyys/lzzyys博硕7 ahtykj/ahtykj体育类8 sylxkj/sylxkj期刊cnki资源:8382/(下载时要重新命名,有少量的硕博数据库)中国优秀博硕士学位论文全文数据库.tw:8080/cgi-bin/b2g/b2g.cgi/http:/192.192.169.81/cdmd/cdmd. asp?Xxurl=http%3A%2F%2F192.192.169.81%2Fcdmd%2Fcdmd.asp&username=nioerar& password=nioerar超星数字图书馆/bookhtm/search.asp?text=C%B3%CC%D0%F2%C9%E8%BC%C6&it em=%CA%E9%C3%FB&item0=ALL&Submit.x=12&Submit.y=14需要分栏目检索,别直接检索,否则不能用!/application/database/帐号:centerkey密码:center(GOOD)吉林广播电视大学图书馆/bookhtm/index.asp超星http://202.196.190.246/bookhtm/search.asp?text=老年&item=书名&item0=ALL&pag e=2http://210.26.17.199/bookhtm/第一个直接复制所有网址,只能在线阅读ebscohost密码/User ID: s8129440Password: password高权EZ-西蒙菲莎大学https://login.proxy.lib.sfu.ca/loginkennedy/peksokek高权限EZhttps://login.proxy.lib.sfu.ca/loginkennedy/peksokekEzproxy of San Diego State Universityhttps:///cgi-bin/ezpiiib.cgi1、soudoc/BROWN/8087838922、KELLY JEAN /DUFFY/800273429EBSCO 密码/User ID: s8129440Password: passwordblackwell-synergy 密码box7062 / kampalaMakerere University Library - INASP Ugandahttp://61.133.213.172/index.asp nxtvu/5018970:2048/login 906/smith453/Johnson456/Johnson231/Johnson/menu 6017090101635687QUOTE:9月15日更新万方资源http://61.139.67.149:90/ebscohost密码/User ID: s8129440 Password: password维普数据库http://218.199.76.10:8080/四川大学网络教育学院http://221.10.252.222/index.asp帐号:密码10217Z13011:11110217Z13012:11110217Z13011:11110217Z13011:111cnki医学类密码帐号:dx0043密码:jgy43cnki帐号密码/index.htm帐号:ahtykj密码:ahtykj包库用户CNKI(至2005,期刊全库)http://210.28.216.233/cjfd/checkuser.asp?username=guest&password=guest说明:这个帐号的人数限制,一般在上午能进去,2006年的期刊无,期刊库全库厦门市委党校cnki:8382/几个cnki的帐号/kns50/index.aspx宁波市科技情报所/index.htmdx0210 / wzyy98医学库sh0206b / shlx88dx0043/jgy43elibrary ----bookusername:70-8571password:bigchalkEZ/menu23070000001111专利查新所需要的数据库,申请课题查新用1.中国知识产权局专利检索系统/sipo/zljs/default.htm2.中国专利文献文摘数据库/wf/kjxx/zl.html点击“中国实用新型专利” ,检索“中国实用新型专利”数据库。

SAS-Base认证考试(70真题+答案详解)

SAS-Base认证考试(70真题+答案详解)

SAS Base认证考试—70题SAS分多个认证种类:base,advanced,clinic等,但大多需要先通过base认证。

但凡这类商业组织提供的考证,基本都是题库型,所以想考过难度并不大。

对于只想拿SAS认证的人,如果熟练掌握网上流传甚广的sas真题70题,通过base认证基本就没问题。

Q 11. The following SAS program is submitted:data ;set ;by Department Gender;if First.<_insert_code_> then Payroll=0;Payroll+Wagerate;~if Last.<_insert_code_>;run;The SAS data set is currently ordered by Gender within Department.Which inserted code will accumulate subtotals for each Gender within DepartmentA. GenderB. DepartmentC. Gender DepartmentD. Department Gender,答案:A本题知识点:自动变量在SAS读取数据时,在PDV过程中会产生很多自动变量,在输出的数据集中是不可见的。

· :同一个BY变量(组),若新的变量值第一次出现时,其值为1。

· :同一个BY变量(组),若新的变量值最后一次出现时,其值为1。

另外,在BY变量右面有多个变量时,先按第一个变量排序,若第一个变量的观测存在重复时,才按第二个变量排序。

—Q 2Given the following raw data records in :----|----10---|----20---|----30John,FEB,13,25,14,27,FinalJohn,MAR,26,17,29,11,23,CurrentTina,FEB,15,18,12,13,FinalTina,MAR,29,14,19,27,20,CurrentThe following output is desired:`Obs Name Month Status Week1 Week2 Week3 Week4 Week51 John FEB Final $13 $25 $14 $27 .2 John MAR Current $26 $17 $29 $11 $233 Tina FEB Final $15 $18 $12 $13 .4 Tina MAR Current $29 $14 $19 $27 $20 Which SAS program correctly produces the desired outputA. data ;length Name $ 4 Month $ 3 Status $ 7;|infile '' dsd;input Name $ Month $;if Month='FEB' then input Week1 Week2 Week3 Week4 Status $;else if Month='MAR' then input Week1 Week2 Week3 Week4 Week5 Status $; format Week1-Week5 dollar6.;run;proc print data=;run;!B. data ;length Name $ 4 Month $ 3 Status $ 7;infile '' dlm=',' missover;input Name $ Month $;if Month='FEB' then input Week1 Week2 Week3 Week4 Status $;else if Month='MAR' then input Week1 Week2 Week3 Week4 Week5 Status $; format Week1-Week5 dollar6.;run;;proc print data=;run;C. data ;length Name $ 4 Month $ 3 Status $ 7;infile '' dlm=',';input Name $ Month $ @;if Month='FEB' then input Week1 Week2 Week3 Week4 Status $;else if Month='MAR' then input Week1 Week2 Week3 Week4 Week5 Status $; |format Week1-Week5 dollar6.;run;proc print data=;run;D. data ;length Name $ 4 Month $ 3 Status $ 7;infile '' dsd @;input Name $ Month $;】if Month='FEB' then input Week1 Week2 Week3 Week4 Status $;else if Month='MAR' then input Week1 Week2 Week3 Week4 Week5 Status $;format Week1-Week5 dollar6.;run;proc print data=;run;答案:C本题知识点:INFILE语句与指示器@、@@、INFILE filespecification options;其中,filespecification用来定义文件, options给出选择项;· filespecification有以下三种形式:①、fileref(文件标志)②、’filename’(文件名)③、CARDS指明输入的数据,紧跟着CARDS语句· 下列选择项(options)可以出现在INFILE语句中:①、COLUMN=variable或COL=variable 定义一个变量, 其值是指针所在的当前列位置。

四川省绵阳2023-2024学年高二下学期开学英语试题含答案

四川省绵阳2023-2024学年高二下学期开学英语试题含答案

绵阳高2022级高二下期入学考试英语试题(答案在最后)注意事项:本试卷分第Ⅰ卷(选择题)和第Ⅱ卷(非选择题)两部分,满分150分,考试时间120分钟。

考试结束,答题卡交回即可。

第Ⅰ卷(选择题,满分95分)第一部分听力(共两节,满分30分)第一节(共5小题;每小题1.5分,满分75分)听下面5段对话。

每段对话后有一个小题,从题中所给的A、B、C三个选项中选出最佳选项,并标在试卷的相应位置。

听完每段对话后,你都有10秒钟的时间来回答有关小题和阅读下一小题。

每段对话仅读一遍。

1.What are the speakers mainly talking about?A.A travel plan.B.A business trip.C.A tourist spot.2.Where does this conversation probably take place?A.At home.B.In a hospital.C.At a kindergarten.3.What does the woman think of the new restaurant?A.She doesn’t like how it looks.B.She thinks the food there is bad.C.She finds the service disappointing.4.How does the man want to go to the palace?A.By bus.B.On foot.C.By taxi.5.How much is the postage for the man’s parcel in total?A.$50.B.$90.C.$105.第二节(共15小题;每小题1.5分,满分22.5分)听下面5段对话或独白。

每段对话或独白后有2至4个小题,从题中所给的A、B、C三个选项中选出最佳选项,并标在试卷的相应位置。

SASBase认证考试(70真题 答案解析详解)

SASBase认证考试(70真题 答案解析详解)

SAS Base认证考试—70题SAS分多个认证种类:base,advanced,clinic等,但大多需要先通过base认证。

但凡这类商业组织提供的考证,基本都是题库型,所以想考过难度并不大。

对于只想拿SAS认证的人,如果熟练掌握网上流传甚广的sas真题70题,通过base认证基本就没问题。

Q 11. The following SAS program is submitted:data WORK.TOTAL;set WORK.SALARY;by Department Gender;if First.<_insert_code_> then Payroll=0;Payroll+Wagerate;if Last.<_insert_code_>;run;The SAS data set WORK.SALARY is currently ordered by Gender within Department.Which inserted code will accumulate subtotals for each Gender within Department?A. GenderB. DepartmentC. Gender DepartmentD. Department Gender答案:A本题知识点:自动变量在SAS读取数据时,在PDV过程中会产生很多自动变量,在输出的数据集中是不可见的。

· FIRST.VARIABLE:同一个BY变量(组),若新的变量值第一次出现时,其first.variable值为1。

· LAST.VARIABLE:同一个BY变量(组),若新的变量值最后一次出现时,其last.variable值为1。

另外,在BY变量右面有多个变量时,先按第一个变量排序,若第一个变量的观测存在重复时,才按第二个变量排序。

Q 2Given the following raw data records in TEXTFILE.TXT:----|----10---|----20---|----30John,FEB,13,25,14,27,FinalJohn,MAR,26,17,29,11,23,CurrentTina,FEB,15,18,12,13,FinalTina,MAR,29,14,19,27,20,CurrentThe following output is desired:Obs Name Month Status Week1 Week2 Week3 Week4 Week51 John FEB Final $13 $25 $14 $27 .2 John MAR Current $26 $17 $29 $11 $233 Tina FEB Final $15 $18 $12 $13 .4 Tina MAR Current $29 $14 $19 $27 $20Which SAS program correctly produces the desired output?A. data WORK.NUMBERS;length Name $ 4 Month $ 3 Status $ 7;infile 'TEXTFILE.TXT' dsd;input Name $ Month $;if Month='FEB' then input Week1 Week2 Week3 Week4 Status $;else if Month='MAR' then input Week1 Week2 Week3 Week4 Week5 Status $; format Week1-Week5 dollar6.;run;proc print data=WORK.NUMBERS;run;B. data WORK.NUMBERS;length Name $ 4 Month $ 3 Status $ 7;infile 'TEXTFILE.TXT' dlm=',' missover;input Name $ Month $;if Month='FEB' then input Week1 Week2 Week3 Week4 Status $;else if Month='MAR' then input Week1 Week2 Week3 Week4 Week5 Status $; format Week1-Week5 dollar6.;run;proc print data=WORK.NUMBERS;run;C. data WORK.NUMBERS;length Name $ 4 Month $ 3 Status $ 7;infile 'TEXTFILE.TXT' dlm=',';input Name $ Month $ @;if Month='FEB' then input Week1 Week2 Week3 Week4 Status $;else if Month='MAR' then input Week1 Week2 Week3 Week4 Week5 Status $; format Week1-Week5 dollar6.;run;proc print data=WORK.NUMBERS;run;D. data WORK.NUMBERS;length Name $ 4 Month $ 3 Status $ 7;infile 'TEXTFILE.TXT' dsd @;input Name $ Month $;if Month='FEB' then input Week1 Week2 Week3 Week4 Status $;else if Month='MAR' then input Week1 Week2 Week3 Week4 Week5 Status $; format Week1-Week5 dollar6.;run;proc print data=WORK.NUMBERS;run;答案:C本题知识点:INFILE语句与指示器@、@@INFILE filespecification options;其中,filespecification用来定义文件, options给出选择项;· filespecification有以下三种形式:①、fileref(文件标志)②、’filename’(文件名)③、CARDS指明输入的数据,紧跟着CARDS语句· 下列选择项(options)可以出现在INFILE语句中:①、COLUMN=variable或COL=variable 定义一个变量, 其值是指针所在的当前列位置。

Text A Database (1)_计算机英语(第3版)_[共2页]

Text A  Database (1)_计算机英语(第3版)_[共2页]

Unit 7Text ADatabase (1)In computing, a database can be defined as a structured collection of records or data that is stored ina computer so that a program can consult it to answer queries.[1] The records retrieved in answer toqueries become information that can be used to make decisions. The computer program used to manage and query a database is known as a database management system (DBMS). The properties and design of database systems are included in the study of information science.The term "database" originated within the computing discipline. Although its meaning has been broadened by popular use, even to include non-electronic databases, this article is about computer databases. Database-like records have been in existence since well before the industrial revolution in the form of ledgers, sales receipts and other business related collections of data.The central concept of a database is that of a collection of records, or pieces of information.Typically, for a given database, there is a structural description of the type of facts held in that database: this description is known as a schema. The schema describes the objects that are represented in the database, and the relationships among them. There are a number of different ways of organizing a schema, that is, of modeling the database structure: these are known as database models (or data models).The model in most common use today is the relational model, which in layman’s terms represents all information in the form of multiple related tables each consisting of rows and columns (the true definition uses mathematical terminology). [2] This model represents relationships by the use of values common to more than one table. Other models such as the hierarchical model and the network model usea more explicit representation of relationships.The term database refers to the collection of related records, and the software should be referred to as the database management system or DBMS. When the context is unambiguous, however, many database administrators and programmers use the term database to cover both meanings.Many professionals consider a collection of data to constitute a database only if it has certain properties: for example, if the data is managed to ensure its integrity and quality, if it allows shared access by a community of users, if it has a schema, or if it supports a query language. However, there is no agreed definition of these properties.Database management systems are usually categorized according to the data model that they114。

android开发日期控件的使用

android开发日期控件的使用

大家好,以下是对android开发日期控件的使用,分为两节来讲的,希望对大家有所帮助Android开发:日期控件的使用(一)问题提出手机的基本功能,除了打电话、发短信,还有一个就是用来看时间。

那么在Android开发中,如何为我们的android开发程序添加显示时间的功能呢?问题分析关于时间,无外乎三种类型:日期、时刻、计时。

在Android SDK中提供了五种时间相关的控件:时间拾取器TimePicker、日期拾取器DatePicker、计时器Chronometer、模拟时钟AnologClock和数字时钟DigitalClock。

接下去的android开发两篇文章将通过一个小闹钟的例子来简要介绍这几个控件的使用。

问题解决本例包含一个AnologClock、一个DigitalClock、一个Chronometer、若干个TextView,而TimePicker 和DatePicker将以弹出窗口形式出现。

本例演示如下四个功能:1.在DigitalClock上方的TextView上显示当前系统日期。

2.当单击设置时间后的显示日期的TextView将弹出DatePicker,并将设置好的时间赋给显示日期的TextView,同时启动计时器。

3.当单击设置时间后的显示时间的TextView将弹出TimePicker,并将设置好的时间赋给显示时间的TextView,同时启动计时器。

4.显示时间与设定时间相同时闪烁“小闹钟”Tex tView的背景颜色。

本文先介绍布局与如何得到系统时间基本思路清楚了,那就让我们现在开始动手做下吧。

一、打开Eclipse,建立一个Android工程,属性如下:Project name:Exp03Build Target:Android 2.2PacketName:com.Exp03二、布置控件。

在main.xml中添加一个TextView、两个EditView 和两个Button控件,部分属性如下:main.xml文件如下:view sourceprint?1<?xml version="1.0" encoding="utf-8"?>0 2 <LinearLayoutxmlns:android="/a pk/res/android"03 android:layout_width="fill_parent"04 android:layout_height="fill_parent"05 android:orientation="vertical" >0607 <TextView08 android:id="@+id/txtTitle"09 android:layout_width="fill_parent"10 android:layout_height="wrap_content"11 android:text="小闹钟"12 android:textSize="20dp"13 android:background="@color/gray" /> 14 <LinearLayout15 android:layout_width="fill_parent" 16 android:layout_height="wrap_content"17 android:orientation="horizontal">" 1819 <AnalogClock20 android:id="@+id/analogClock1"21 android:layout_width="wrap_content" 22 android:layout_height="wrap_content"/> 2324 <LinearLayout25 android:id="@+id/linearLayout2"26 android:layout_width="match_parent"27 android:layout_height="match_parent"28 android:orientation="vertical" >2930 <TextView31 android:id="@+id/txtCurrentDate"32 android:layout_width="match_parent"3 3 android:layout_height="wrap_content "3 4 android:text="现在是:2011年10月23日"3 5 android:textAppearance="?android:attr /textAppearanceSmall" />3637 <DigitalClock38 android:id="@+id/digitalClock1"39 android:layout_width="match_parent"40 android:layout_height="fill_parent"41 android:layout_weight="1"42 android:gravity="center"43 android:text="DigitalClock"44 android:textSize="15dp"/>4546 </LinearLayout>47 </LinearLayout>48 <LinearLayout49 android:layout_width="fill_parent"50 android:layout_height="wrap_content"51 android:orientation="horizontal">5253 <TextView54 android:layout_width="100dp"55 android:layout_height="wrap_content"56 android:background="@color/gray"57 android:text="设置时间:"58 android:textSize="15dp" />5960 <TextView61 android:id="@+id/txtSetDate"62 android:layout_width="130dp"63 android:layout_height="wrap_content"64 android:background="@color/gray"65 android:text="2011年10月21日"66 android:textSize="15dp" />6768 <TextView69 android:id="@+id/txtSetTime"70 android:layout_width="fill_parent"71 android:layout_height="wrap_content"72 android:text="00:00:00"73 android:textSize="15dp"74 android:layout_weight="1"75 android:background="@color/gray" />76 </LinearLayout>77 <LinearLayout78 android:id="@+id/linearLayout1"79 android:layout_width="match_parent"80 android:layout_height="wrap_content"81 android:layout_marginTop="5dp"82 android:background="@color/gray"83 >84 <Chronometer85 android:id="@+id/chronometer1"86 android:layout_width="wrap_content"87 android:layout_height="wrap_content"88 android:layout_weight="10"89 android:gravity="center"90 android:format="H:MM:SS" />9192 </LinearLayout>93 </LinearLayout>效果如图:控件属性简介:1. AnologClock1.1 Hand hour时针,可以指定时针图片,设置时针形状,这里使用默认时针1.2 Hand minute分针,可以指定分针图片,设置分针形状,这里使用默认分针可能出于省电的考虑,模拟时钟并没有提供秒针,这有点美中不足。

Excel常用函数表

Excel常用函数表

12函数sum sumif作用 计算所在参数数值的和计算符合指定条件的单元格区域内的数值和格式sum(number1,number2……)sumif(range,criteria,sum_rang e)参数说明number1,number2……代表需要计算的值,可以是具体的数值、引用单元格(区域)、逻辑值等。

range:代表条件判断的单元格区域;criteria:指定条件表达式;sum_range:需要计算的数值所在的单元格区域。

应用举例sum(103,D2:D16)sumif(C2:C16,"男",D2:D16)特别提醒如果参数为数组或引用,只有其中的数字将被计算。

数组或引用中的空白单元格、逻辑值、文本或错误值将被忽略上式求包含在C2:C16中男生的化学成绩(D2:D16)之和举例结果提示sum(D2:D16)改为sum(large(D2:D16,{1,2,3,4,5})),则可求出前5名成绩的和。

56函数average count作用求所有参数的算术平均值计算数组或数据区域内数字的个数。

格式average(number1,number2……)COUNT(VALUE1,VALUE2,……)参数说明number1,number2……需要求平均数值或引用单元格(区域),参数不超过30个。

是包含或引用各种类型数据的参数(1~30个),但只有数字类型的数据才被计数。

应用举例average(B7:D7,F7:H7,7,8)COUNT(B1:D1)特别提醒如果引用区域包含0值单元格,则计算在内,如引用空白或字符单元格,则不计算在内。

函数COUNT在计数时,将把数字、空值、逻辑值、日期或以文字代表的数计算进去;但是错误值或其他无法转化成数字的文字则被忽略。

举例结果提示如果参数是一个数组或引用,那么只统计数组或引用中的数字;数组中或引用的空单元格、逻辑值、文字或错误值都将忽略。

如果要统计逻辑值、文字或错误值,请使用函数COUNTA(COUNTIF按EXCEL的说明也行,但常出毛病)。

2024年3月7日英文表述

2024年3月7日英文表述

2024年3月7日英文表述The Significance of March 7, 2024。

March 7, 2024, a date that may seem ordinary to some, holds profound significance for many reasons. It marks a unique intersection of time, where the past, present, and future converge, shaping the course of history and influencing the lives of individuals across the globe.On this day, the world will witness a significant milestone in technological advancements. The launch of a groundbreaking space mission will capture the world's attention, marking a new era of exploration and discovery. This mission, with its cutting-edge technology and bold objectives, promises to revolutionize our understanding of the universe and our place within it.Moreover, March 7, 2024, will be remembered for its impact on environmental conservation. A global summit on climate change will take place, bringing together leadersfrom various countries to discuss urgent measures needed to mitigate the effects of climate change. The outcomes ofthis summit will shape the future of our planet, as nations unite to protect the environment and ensure sustainable development.Additionally, the day will be marked by significant cultural and artistic events. Festivals, exhibitions, and performances will take place worldwide, celebrating the diversity and richness of human culture. These events will not only entertainment but also foster understanding and respect among people of different backgrounds.On a personal level, March 7, 2024, may hold special meanings for individuals. It could be a day of celebration, a milestone achieved, or a fresh start. For many, it will be a day to reflect on their lives, their goals, and their aspirations for the future.In conclusion, March 7, 2024, is not just another day on the calendar. It is a day that holds the potential to shape history, influence the future of our planet, andinspire individuals to pursue their dreams. As we approach this day, it is important to recognize its significance and embrace the opportunities it presents. Let us strive to make March 7, 2024, a day that will be remembered for its positive impact on the world.。

Qt5带农历的日历

Qt5带农历的日历

Qt5带农历的日历网上农历算法很多,大部分都是比较准的,但是在Qt里面很少有朋友整理和共享出来,在此,花一点时间整理下资料和想法,顺便或许也能帮助一些新手朋友!首先讲讲设计思路吧,没有采用系统自带的QCalendarWidget,而是通过42个QLabel拼凑出来的一个界面,之所以采用这种拼凑的方法是方便管理样式,话不多说了上图和代码吧:先来界面布局代码吧:#ifndef CALENDARWIDGET_H#define CALENDARWIDGET_H#include <QWidget>#include <QLabel>QT_BEGIN_NAMESPACEclass QPushButton;class QComboBox;class QGroupBox;class QLineEdit;class QDate;class QGridLayout;class QHBoxLayout;class QVBoxLayout;class Event;class DataBase;QT_END_NAMESPACEtypedef enum {Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Week} E_WEEK;typedef enum {PREV_MONTH_DAY, // 上月剩余天数NEXT_MONTH_DAY, // 下个月的天数CURR_MONTH_DAY, // 当月天数WEEKEND_DAY, // 周末CURRENT_DAY, // 当天} E_DAY;/////////////////////////////////////////////// /// \brief The DayLabel class/// 自定义的日子显示控件/////////////////////////////////////////////// class DayLabel : public QLabel {Q_OBJECTpublic:explicit DayLabel(QWidget *parent = 0);bool bSelect;bool getBSelect() const;void setSelected(bool value);void setColor(const int &type);void showDay(int nDay, QString strLunar);int m_nDay;void setPlan(QStringList plan);signals:void signalClicked(int ntype, int day);void signalPlan(const QString &content); private:QLabel *labelIcon;QStringList m_strListPlan;protected:void enterEvent(QEvent *e);void leaveEvent(QEvent *e);void mousePressEvent(QMouseEvent *e);void mouseDoubleClickEvent(QMouseEvent *e); };///////////////////////////////////////////////// /// \brief The CalendarWidget class/// 日历界面//////////////////////////////////////////////// class CalendarWidget : public QWidget{Q_OBJECTpublic:explicit CalendarWidget(QWidget *parent = 0); ~CalendarWidget();int year() const;void setYear(int year);int month() const;void setMonth(int month);int day() const;void setDay(int day);void jumpTodate(int year, int month, int day); signals:void signalDayClicked(int nday);void signalDayChanged();void signalPlan(const QString &content); private:QVBoxLayout *verLayoutCalendar;QWidget *widgetTitle;QLabel *labelTitle;QPushButton *btnPrevMonth;QPushButton *btnNextMonth;QHBoxLayout *horLayoutTitle;QWidget *widgetWeek;QLabel *labelWeek[Week];QHBoxLayout *horLayoutWeek;QWidget *widgetBody;DayLabel *labelDay[42];QGridLayout *gridLayoutBody;QWidget *widgetRight;QLabel *labelShowToday;QLabel *labelShowWeek;QLabel *labelShowDay;QLabel *labelShowNYear;QLabel *labelShowLunarDate;QLabel *labelSpacer;QLabel *labelScheduleTitle;QLabel *labelSchedule;QVBoxLayout *verlayoutWidgetRight;QHBoxLayout *horLayoutGlobal;private:int m_nYear;int m_nMonth;int m_nDay;private:void initWidget();<pre name="code" class="cpp">#include "calendarwidget.h" .cpp#include "date.h"#include "database.h"#include <QInputDialog>#include <QPainter>#include <QStyleOption>#include <QDateTime>#include <QPushButton>#include <QLineEdit>#include <QGroupBox>#include <QLabel>#include <QDate>#include <QGridLayout>#include <QHBoxLayout>#include <QVBoxLayout>#include <QSpacerItem>#include <QDebug>#include <QFont>static const QString s_strWeek[] = {QObject::tr("周日"), QObject::tr("周一"), QObject::tr("周二"),QObject::tr("周三"), QObject::tr("周四"), QObject::tr("周五"), QObject::tr("周六"),};CalendarWidget::CalendarWidget(QWidget *parent): QWidget(parent), m_nMonth(1){// 获取当前年月日m_nYear = QDate::currentDate().year();m_nMonth = QDate::currentDate().month();m_nDay = QDate::currentDate().day();initWidget();initDate();}CalendarWidget::~CalendarWidget(){}int CalendarWidget::year() const{return m_nYear;}void CalendarWidget::setYear(int nYear){m_nYear = nYear;}int CalendarWidget::month() const{return m_nMonth;}void CalendarWidget::setMonth(int nMonth){m_nMonth = nMonth;}int CalendarWidget::day() const{return m_nDay;}void CalendarWidget::setDay(int nDay){m_nDay = nDay;}void CalendarWidget::jumpTodate(int year, int month, int day) {setYear(year);setMonth(month);setDay(day);initDate();}/*** @brief CalendarWidget::initWidget 初始化界面*/void CalendarWidget::initWidget(){#ifdef Q_OS_ANDROIDthis->setMinimumSize(1400, 800);#elsethis->setMinimumSize(427, 350);this->setObjectName("widgetCalendar");#endifverLayoutCalendar = new QVBoxLayout(this);verLayoutCalendar->setContentsMargins(2, 2, 2, 2);verLayoutCalendar->setSpacing(0);//! [2]widgetTitle = new QWidget(this);widgetTitle->setObjectName("widgetTitle");#ifdef Q_OS_ANDROIDwidgetTitle->setFixedHeight(80);#elsewidgetTitle->setMinimumHeight(20);#endifbtnPrevMonth = new QPushButton(widgetTitle);btnPrevMonth->setText(tr("上月"));labelTitle = new QLabel(widgetTitle);labelTitle->setAlignment(Qt::AlignCenter);labelTitle->setObjectName("labelTitle");labelTitle->setText(tr("2016 年 04 月"));btnNextMonth = new QPushButton(widgetTitle);btnNextMonth->setText(tr("下月"));horLayoutTitle = new QHBoxLayout(widgetTitle);horLayoutTitle->addWidget(btnPrevMonth);horLayoutTitle->addWidget(labelTitle, 1);horLayoutTitle->addWidget(btnNextMonth);verLayoutCalendar->addWidget(widgetTitle);connect(btnPrevMonth, SIGNAL(clicked(bool)), this, SLOT(sltShowPrevMonth())); connect(btnNextMonth, SIGNAL(clicked(bool)), this, SLOT(sltShowNextMonth())); //! [2]//! [3]widgetWeek = new QWidget(this);widgetWeek->setObjectName("widgetWeek");horLayoutWeek = new QHBoxLayout(widgetWeek);horLayoutWeek->setContentsMargins(0, 0, 0, 0);horLayoutWeek->setSpacing(0);for (int i = 0; i < Week; i++) {labelWeek[i] = new QLabel(widgetWeek);labelWeek[i]->setText(s_strWeek[i]);labelWeek[i]->setObjectName("labelWeek");labelWeek[i]->setMinimumHeight(30);labelWeek[i]->setAlignment(Qt::AlignCenter);if ((0 == (i % 7)) || (6 == (i% 7))) {labelWeek[i]->setProperty("weekend", true); }horLayoutWeek->addWidget(labelWeek[i]);}verLayoutCalendar->addWidget(widgetWeek);//! [3]//! [4]widgetBody = new QWidget(this);verLayoutCalendar->addWidget(widgetBody, 1);gridLayoutBody = new QGridLayout(widgetBody);gridLayoutBody->setHorizontalSpacing(0);gridLayoutBody->setVerticalSpacing(0);gridLayoutBody->setContentsMargins(0, 0, 0, 0);for (int i = 0; i < 42; i++) {labelDay[i] = new DayLabel(widgetBody);labelDay[i]->setObjectName("labelDay");labelDay[i]->setAlignment(Qt::AlignCenter);labelDay[i]->setText(QString::number(i));if ((0 == (i % 7)) || (6 == (i% 7))) {labelDay[i]->setProperty("weekend", true); }gridLayoutBody->addWidget(labelDay[i], i / 7, i % 7);connect(labelDay[i], SIGNAL(signalClicked(int,int)), this,SLOT(sltDayClicked(int,int)));connect(labelDay[i], SIGNAL(signalPlan(QString)), this, SIGNAL(signalPlan(QString))); }labelDay[10]->setSelected(true);//! [4]}/*** @brief CalendarWidget::initDate 初始化日期*/void CalendarWidget::initDate(){// 首先判断当前月的第一天是星期几int nWeek = Date::getFirstDayOfWeek(m_nYear, m_nMonth);int nMonthDays = Date::getMonthDays(m_nYear, m_nMonth);// 上月天数int nPreMonDays = Date::getMonthDays(1 == m_nMonth ? m_nYear - 1 : m_nYear, 1 == m_nMonth ?12 : m_nMonth - 1);// 显示当前年月labelTitle->setText(tr("%1 年 %2 月").arg(m_nYear, 2, 10, QChar('0')).arg(m_nMonth, 2, 10, QChar('0')));// 显示上月剩余天数if (0 == nWeek) {// 显示上月天数for (int i = 0; i < 7; i++) {labelDay[i]->showDay((nPreMonDays - 7 + i + 1), "");labelDay[i]->setColor(PREV_MONTH_DAY);}// 显示下月天数for (int i = 0; i < (42 - nMonthDays - 7); i++) {labelDay[nMonthDays + 7 + i]->showDay((i + 1), "");labelDay[nMonthDays + 7 + i]->setColor(NEXT_MONTH_DAY);}}else {for (int i = 0; i < nWeek; i++) {labelDay[i]->showDay((nPreMonDays - nWeek + i + 1), "");labelDay[i]->setColor(PREV_MONTH_DAY);}// 显示下月天数for (int i = (nWeek + nMonthDays); i < 42; i++) {labelDay[i]->showDay((i - (nWeek + nMonthDays) + 1), "");labelDay[i]->setColor(NEXT_MONTH_DAY);}}// 显示当前月int nProperty = 1;QStringList strPlan;int index = 0;for (int i = nWeek; i < (nMonthDays + nWeek); i++) {index = 0 == nWeek ? (i + 7) : i;labelDay[index]->showDay(i - nWeek + 1, Date::getLunarDate(m_nYear, m_nMonth, i - nWeek + 1));nProperty = ((0 == (i % 7)) || (6 == (i% 7))) ? WEEKEND_DAY : CURR_MONTH_DAY;labelDay[index]->setColor(nProperty);// 显示计划strPlan = DataBase::selectDb(QString("%1-%2-%3").arg(m_nYear, 4, 10, QChar('0')).arg(m_nMonth, 2, 10, QChar('0')).arg(i - nWeek + 1, 2, 10, QChar('0')));// 显示计划labelDay[index]->setPlan(strPlan);}// 显示当前天数labelDay[m_nDay + nWeek - 1]->setColor(CURRENT_DAY); // 发送更新信号Q_EMIT signalDayChanged();}/*** @brief CalendarWidget::sltDayClicked 点击响应* @param type 类型 0 表示上月 1表示下月* @param day 当前点击的天数*/void CalendarWidget::sltDayClicked(int type, int day) {// 上月if (PREV_MONTH_DAY == type) {sltShowPrevMonth();}// 下月else if (NEXT_MONTH_DAY == type) {sltShowNextMonth();}// 当天/周末/当月天数都显示在右边,并转换成农历else if ((CURR_MONTH_DAY == type)|| (WEEKEND_DAY == type)|| (CURRENT_DAY == type)) {// 选中当天Q_EMIT signalDayClicked(day);}}/*** @brief CalendarWidget::sltShowPrevMonth 显示上月日期 */void CalendarWidget::sltShowPrevMonth(){m_nMonth--;if (m_nMonth < 1) {m_nMonth = 12;m_nYear--;}initDate();}/*** @brief CalendarWidget::sltShowNextMonth 显示下月日期 */void CalendarWidget::sltShowNextMonth(){m_nMonth++;if (m_nMonth > 12) {m_nMonth = 1;m_nYear++;}initDate();}///////////////////////////////////////// \brief DayLabel::DayLabel/// \param parent////////////////////////////////#include <QMouseEvent>#include <QEvent>#include <QPixmap>#include "event.h"DayLabel::DayLabel(QWidget *parent):QLabel(parent){bSelect = false;m_nDay = 0;m_strListPlan.clear();labelIcon = new QLabel(this);labelIcon->setFixedSize(QSize(12, 12));labelIcon->setPixmap(QPixmap(":/images/eventindicator.png"));labelIcon->move(0, 0);labelIcon->setVisible(false);}bool DayLabel::getBSelect() const{return bSelect;}void DayLabel::setSelected(bool value){bSelect = value;this->setStyleSheet(QString("background: #ffffff; border: 1px solid red; border-radius: 2px"));}void DayLabel::setColor(const int &type){// 设置控件属性类型this->setProperty("type", type);this->setSelected(CURRENT_DAY == type);// 其他月if ((PREV_MONTH_DAY == type) || (NEXT_MONTH_DAY == type)) {this->setStyleSheet("background: #ffffff; border-top: 1px solid #c3c3c3; border-left: 1px solid #c3c3c3; color: #999999;");labelIcon->setVisible(false);}// 当前月else if (CURR_MONTH_DAY == type) {this->setStyleSheet("background: #ffffff; border-top: 1px solid #c3c3c3; border-left: 1px solid #c3c3c3; color: #000000;");}// 周末else if (WEEKEND_DAY == type) {labelIcon->setVisible(false);this->setStyleSheet("background: #ffffff; border-top: 1px solid #c3c3c3; border-left: 1px solid #c3c3c3; color: #ff0000;");}}/*** @brief DayLabel::showDay* @param nDay* @param strLunar* @param type*/void DayLabel::showDay(int nDay, QString strLunar){QString strText = QString::number(nDay);this->m_nDay = nDay;if ("" != strLunar) {strText.append("\n");strText.append(strLunar);}this->setText(strText);}/*** @brief DayLabel::setPlan 设置计划和日程* @param plan*/void DayLabel::setPlan(QStringList plan){if (!plan.isEmpty()) {m_strListPlan = plan;this->setToolTip(m_strListPlan.at(1));}else {labelIcon->setVisible(false);m_strListPlan.clear();}}void DayLabel::enterEvent(QEvent *e){int nProperty = this->property("type").toInt();if (PREV_MONTH_DAY == nProperty || NEXT_MONTH_DAY == nProperty) return;this->setStyleSheet("background: #c8b9a6; border-top: 1px solid #c3c3c3; border-left: 1px solid #c3c3c3;");QLabel::enterEvent(e);}void DayLabel::leaveEvent(QEvent *e){int nProperty = this->property("type").toInt();if (PREV_MONTH_DAY == nProperty || NEXT_MONTH_DAY == nProperty) return;if (bSelect) {this->setStyleSheet("background: #ffffff; border: 1px solid red;");}else {this->setStyleSheet("background: #ffffff; border-top: 1px solid #c3c3c3; border-left: 1px solid #c3c3c3;");}QLabel::leaveEvent(e);}void DayLabel::mousePressEvent(QMouseEvent *e){// qDebug() << this->text() << this->property("type").toInt();Q_EMIT signalClicked(this->property("type").toInt(), m_nDay);if (!m_strListPlan.isEmpty()) {Q_EMIT signalPlan(m_strListPlan.at(1));}else {Q_EMIT signalPlan(tr("没有日程安排"));}QLabel::mousePressEvent(e);}void DayLabel::mouseDoubleClickEvent(QMouseEvent *e){// qDebug() << "double";int nProperty = this->property("type").toInt();if (PREV_MONTH_DAY == nProperty || NEXT_MONTH_DAY == nProperty) return;bool ok;QString strText = "";if (!m_strListPlan.isEmpty()) {strText = m_strListPlan.at(1);}strText = QInputDialog::getText(this, tr("修改日程"),tr("您的出行计划"), QLineEdit::Normal, strText, &ok);if (ok && !strText.isEmpty())qDebug() << strText;QLabel::mouseDoubleClickEvent(e);}///////////////////////////////////////////// \brief Window::Window/// \param parent/////////////////////////////////////////#include <QMessageBox>#include "database.h"Window::Window(QWidget *parent) :QWidget(parent){// 初始化数据库DataBase::connectdb();initWidget();initStyle();initDatabase();}Window::~Window(){}void Window::initWidget(){//! [1]calendar = new CalendarWidget(this);//! [1]//! [2]widgetRight = new QWidget(this);widgetRight->setObjectName("widgetRight");// widgetRight->setMinimumSize(160, 350);labelShowToday = new QLabel(widgetRight);labelShowWeek = new QLabel(widgetRight);labelShowDay = new QLabel(widgetRight);labelShowNYear = new QLabel(widgetRight);labelShowLunarDate = new QLabel(widgetRight);labelSpacer = new QLabel(widgetRight);labelPlanTitle = new QLabel(widgetRight);labelShowPlan = new QLabel(widgetRight);labelShowToday->setAlignment(Qt::AlignCenter);labelShowWeek->setAlignment(Qt::AlignCenter);labelShowDay->setAlignment(Qt::AlignCenter);labelShowNYear->setAlignment(Qt::AlignCenter);labelShowLunarDate->setAlignment(Qt::AlignCenter); labelSpacer->setFixedSize(widgetRight->width(), 2);labelShowToday->setObjectName("labelCommon");labelShowWeek->setObjectName("labelCommon");labelShowDay->setObjectName("labelShowDay");labelShowNYear->setObjectName("labelCommon");labelShowLunarDate->setObjectName("labelCommon");labelSpacer->setObjectName("labelSpacer");labelPlanTitle->setObjectName("labelCommon");labelShowPlan->setObjectName("labelSchedule");labelShowToday->setText(QDateTime::currentDateTime().toString("yyyy 年 MM 月 dd日")); labelShowWeek->setText(QDate::currentDate().toString("ddd"));labelShowDay->setText(QDate::currentDate().toString("dd"));labelShowNYear->setText(tr("丙申猴年壬辰月甲子日"));labelShowLunarDate->setText(tr("农历三月初六"));labelPlanTitle->setText(tr("今日行程安排"));labelShowPlan->setText(tr("今天需要完成数据采集工作!"));labelShowPlan->setWordWrap(true);verlayoutWidgetRight = new QVBoxLayout(widgetRight);verlayoutWidgetRight->setContentsMargins(0, 0, 0, 0);verlayoutWidgetRight->setSpacing(15);verlayoutWidgetRight->addWidget(labelShowToday);verlayoutWidgetRight->addWidget(labelShowWeek);verlayoutWidgetRight->addWidget(labelShowDay);verlayoutWidgetRight->addWidget(labelShowNYear);verlayoutWidgetRight->addWidget(labelShowLunarDate);verlayoutWidgetRight->addWidget(labelSpacer, 0, Qt::AlignCenter);verlayoutWidgetRight->addStretch(1);verlayoutWidgetRight->addWidget(labelPlanTitle);verlayoutWidgetRight->addWidget(labelShowPlan, 1);//! [2]horLayoutWidget = new QHBoxLayout();horLayoutWidget->addWidget(calendar, 3, Qt::AlignCenter);horLayoutWidget->addWidget(widgetRight, 1);//! [3]groupBoxBottom = new QGroupBox(this);labelYearJump = new QLabel(groupBoxBottom);labelMonthJump = new QLabel(groupBoxBottom); labelDayJump = new QLabel(groupBoxBottom);labelYearJump->setMinimumWidth(20);labelMonthJump->setMinimumWidth(20);labelDayJump->setMinimumWidth(20);labelYearJump->setObjectName("labelCommon"); labelMonthJump->setObjectName("labelCommon"); labelDayJump->setObjectName("labelCommon");labelYearJump->setText(tr("年:"));labelMonthJump->setText(tr("月:"));labelDayJump->setText(tr("日:"));///////////////////////////////////editYearJump = new QLineEdit(groupBoxBottom); editMonthJump = new QLineEdit(groupBoxBottom); editDayJump = new QLineEdit(groupBoxBottom);editYearJump->setMaximumWidth(60);editMonthJump->setMaximumWidth(60);editDayJump->setMaximumWidth(60);editYearJump->setText("2016");editMonthJump->setText("1");editDayJump->setText("1");//////////////////////////////////btnDateJump = new QPushButton(groupBoxBottom); btnDateJump->setText(tr("跳转至该日期"));btnToday = new QPushButton(groupBoxBottom);btnToday->setText(tr("返回今天"));horLayoutJump = new QHBoxLayout(groupBoxBottom);horLayoutJump->setSpacing(10);horLayoutJump->addWidget(labelYearJump);horLayoutJump->addWidget(editYearJump);horLayoutJump->addWidget(labelMonthJump);horLayoutJump->addWidget(editMonthJump);horLayoutJump->addWidget(labelDayJump);horLayoutJump->addWidget(editDayJump);horLayoutJump->addStretch(1);horLayoutJump->addWidget(btnDateJump);horLayoutJump->addWidget(btnToday);//! [3]//! [4]verLayoutAll = new QVBoxLayout(this);verLayoutAll->setContentsMargins(10, 10, 10, 10);verLayoutAll->setSpacing(10);verLayoutAll->addLayout(horLayoutWidget, 1);verLayoutAll->addWidget(groupBoxBottom, 0);//! [4]connect(calendar, SIGNAL(signalDayChanged()), this, SLOT(sltDayChanged()));connect(calendar, SIGNAL(signalDayClicked(int)), this, SLOT(sltDayClicked(int))); connect(calendar, SIGNAL(signalPlan(QString)), this, SLOT(sltShowPlans(QString))); connect(btnDateJump, SIGNAL(clicked(bool)), this, SLOT(sltDateJump()));connect(btnToday, SIGNAL(clicked(bool)), this, SLOT(sltBack2today()));}void Window::initDatabase(){}/*** @brief CalendarWidget::initStyle 初始化样式*/void Window::initStyle(){QString strStyle = "";#ifdef Q_OS_ANDROIDstrStyle += QString(".CalendarWidget {border: 1px solid #ff00ff;}");strStyle += QString(".Window {background: black;}");strStyle += QString(".DayLabel{font-size: 64px;}");strStyle += QString("QWidget#widgetRight{background-color: transparent;}");strStyle += QString("QWidget#widgetCalendar{ background-color: white;}");strStyle += QString("QWidget#widgetTitle{ background-color: #c8b9a6;}");strStyle += QString("QWidget#widgetWeek{ background-color: #efefef;}");strStyle += QString("QLabel#labelTitle {border: none; font: bold 18px;}");strStyle += QString("QLabel#labelWeek {border-top: 1px solid #c3c3c3; border-left: 1px solid #c3c3c3; font: bold 12px;}");strStyle += QString("QLabel#labelDay[weekend=true],QLabel#labelWeek[weekend=true]{color: red;}");strStyle += QString("QLabel#labelDay {border-top: 1px solid #c3c3c3; border-left: 1px solid #c3c3c3; font-size: 14px;}");strStyle += QString("QLabel#labelShowDay {color: yellow; font: bold 64px;}");strStyle += QString("QLabel#labelCommon {background-color: transparent;color: #ffffff;}"); strStyle += QString("QLabel#labelSchedule {background-color: transparent;color: #ffffff; border: 1px solid #ffffff;}");strStyle += QString("QLabel#labelSpacer {border: 1px solid #ffffff;}");strStyle += QString("QLineEdit {border: 1px solid #ffffff; border-radius: 5px; font-size: 20px;}");#elsestrStyle += QString(".CalendarWidget {border: 1px solid #ff00ff;}");strStyle += QString(".Window {background: black;}");strStyle += QString(".DayLabel{font: 24px; font-family: 隶书;}");strStyle += QString("QWidget#widgetCalendar{ background-color: white;}");strStyle += QString("QWidget#widgetTitle{ background-color: #c8b9a6;}");strStyle += QString("QWidget#widgetWeek{ background-color: #efefef;}");strStyle += QString("QLabel#labelTitle {border: none; font: bold 18px;}");strStyle += QString("QLabel#labelWeek {border-top: 1px solid #c3c3c3; border-left: 1px solid #c3c3c3; font: bold 12px;}");strStyle += QString("QLabel#labelDay[weekend=true],QLabel#labelWeek[weekend=true]{color: red;}");strStyle += QString("QLabel#labelDay {border-top: 1px solid #c3c3c3; border-left: 1px solid #c3c3c3; font-size: 14px;}");strStyle += QString("QLabel#labelShowDay {color: yellow; font: bold 64px;}");strStyle += QString("QLabel#labelCommon {color: #ffffff;}");strStyle += QString("QLabel#labelSchedule {color: #ffffff; border: 1px solid #ffffff;}"); strStyle += QString("QLabel#labelSpacer {border: 1px solid #ffffff;}");strStyle += QString("QLineEdit {border: 1px solid #ffffff; border-radius: 5px; font-size: 20px;}");#endifthis->setStyleSheet(strStyle);}void Window::sltDayClicked(int nday){labelShowDay->setText(QString("%1").arg(nday, 2, 10, QChar('0')));// 显示农历QString strLunar = Date::getLunarMonAndDay(calendar->year(), calendar->month(), nday); labelShowLunarDate->setText(tr("农历 %1").arg(strLunar));}void Window::sltDayChanged(){// 更新右边控件显示labelShowDay->setText(QString("%1").arg(calendar->day(), 2, 10, QChar('0')));// 显示农历QString strLunar = Date::getLunarMonAndDay(calendar->year(), calendar->month(),calendar->day());labelShowLunarDate->setText(tr("农历 %1").arg(strLunar));labelShowNYear->setText(Date::getLunarTime(calendar->year()));}// 跳转日期void Window::sltDateJump(){int year = editYearJump->text().toInt();int month = editMonthJump->text().toInt();int day = editDayJump->text().toInt();int nMaxSet = 0;if ((year > 2040) || (year < 1970)) {QMessageBox::information(this, tr("提示"), tr("跳转年输入错误,请重新输入!")); editYearJump->setFocus();return;}if ((month > 12) || (month < 1)) {editMonthJump->setFocus();QMessageBox::information(this, tr("提示"), tr("跳转月输入错误,请重新输入!")); return;}if (2 == month) {nMaxSet = Date::isLoopYaer(year) ? 29 : 28;}else {nMaxSet = 31;}if ((day > nMaxSet) || (day < 1)) {editDayJump->setFocus();QMessageBox::information(this, tr("提示"), tr("跳转日输入错误,请重新输入!")); return;}// 跳转calendar->jumpTodate(year, month, day);}/*** @brief Window::sltBack2today 跳转至今天*/void Window::sltBack2today()int year = QDate::currentDate().year();int month = QDate::currentDate().month();int day = QDate::currentDate().day();// 跳转calendar->jumpTodate(year, month, day);}/*** @brief Window::sltShowPlans 显示日程* @param content* @return*/void Window::sltShowPlans(const QString &content){labelShowPlan->setText(content);}void Window::paintEvent(QPaintEvent *){QStyleOption opt;opt.init(this);QPainter p(this);style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); }然后就是农历的算法;</pre></p><p></p><p><pre name="code" class="cpp">#ifndef DATE_H #define DATE_H#include <QObject>class Date : public QObject{Q_OBJECTpublic:explicit Date(QObject *parent = 0);signals:public slots:public:static quint16 getSpringFestivalDate(int year);static int getFirstDayOfWeek(int year, int month);static int getTotalMonthDays(int year, int month);static int getMonthDays(int year, int month);static bool isLoopYaer(int year);static QString getLunarDate(int year, int month, int day);static QString getLunarMonAndDay(int year, int month, int day); // 计算今年是什么年如:甲子年static QString getLunarTime(int year);private:static QString holiday(int month, int day);static QString solarTerms(int year, int month, int day);static QString lunarFestival(int month, int day);};#endif // DATE_H#include "date.h"#include <QDebug>#define T_D_YAER 1924 // 天干地支开始计算年月//每年春节对应的公历日期static const int springFestival[] = {130,217,206, // 1968,1969,1970127,215,203,123,211,131,218,207,128,216, // 1971--1980205,125,213,202,220,209,219,217,206,127, // 1981---1990215,204,123,210,131,219,207,128,216,205, // 1991--2000124,212,201,122,209,129,218,207,126,214, // 2001--2010203,123,210,131,219,208,128,216,205,125, // 2011--2020 //2011--2020212,201,122,210,129,217,206,126,213,203, // 2021--2030123,211,131,219,208,128,215,204,124,212 // 2031--2040};//16--18位表示闰几月,0--12位表示农历每月的数据,高位表示1月,低位表示12月(农历闰月就会多一个月)static const int nLunarData[] = {461653,1386,2413, // 1968,1969,1970330077,1197,2637,268877,3365,531109,2900,2922,398042,2395, // 1971--19801179,267415,2635,661067,1701,1748,398772,2742,2391,330031, // 1981---19901175,1611,200010,3749,527717,1452,2742,332397,2350,3222, // 1991--2000268949,3402,3493,133973,1386,464219,605,2349,334123,2709, // 2001--20102890,267946,2773,592565,1210,2651,395863,1323,2707,265877, // 2011--20201706,2773,133557,1206,398510,2638,3366,335142,3411,1450, // 2021 -- 2030200042,2413,723293,1197,2637,399947,3365,3410,334676,2906 // 2031 -- 2040};static const int chineseTwentyFourData[] = {0x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x69,0x78,0x87, // 19700x96,0xB4,0x96,0xA6,0x97,0x97,0x78,0x79,0x79,0x69,0x78,0x77, // 19710x96,0xA4,0xA5,0xA5,0xA6,0xA6,0x88,0x88,0x88,0x78,0x87,0x87, // 19720xA5,0xB5,0x96,0xA5,0xA6,0x96,0x88,0x78,0x78,0x78,0x87,0x87, // 19730x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x69,0x78,0x87, // 19740x96,0xB4,0x96,0xA6,0x97,0x97,0x78,0x79,0x78,0x69,0x78,0x77, // 19750x96,0xA4,0xA5,0xB5,0xA6,0xA6,0x88,0x89,0x88,0x78,0x87,0x87, // 19760xA5,0xB4,0x96,0xA5,0x96,0x96,0x88,0x88,0x78,0x78,0x87,0x87, // 19770x95,0xB4,0x96,0xA5,0x96,0x97,0x88,0x78,0x78,0x79,0x78,0x87, // 19780x96,0xB4,0x96,0xA6,0x96,0x97,0x78,0x79,0x78,0x69,0x78,0x77, // 19790x96,0xA4,0xA5,0xB5,0xA6,0xA6,0x88,0x88,0x88,0x78,0x87,0x87, // 1980。

postgresql数据类型转换

postgresql数据类型转换

postgresql 数据类型转换,日期操作函数各种数据类型(日期/时间、integer、floating point和numeric)转换成格式化的字符串以及反过来从格式化的字符串转换成指定的数据类型。

下面列出了这些函数,它们都遵循一个公共的调用习惯:第一个参数是待格式化的值,而第二个是定义输出或输出格式的模板。

postgresql 字符串转整数int、integer postgresql 字符串转整数int、integercode1 2 3 4 5 6 7 --把'1234'转成整数select cast('1234'as integer) ;--用substring截取字符串,从第8个字符开始截取2个字符:结果是12select cast(substring('1234abc12',8,2) as integer)---使用to_number函数来转换成整数---to_number(text, text) 返回的类型 numeric 把字串转换成numeric to_number('12,454.8-', '99G999D9S')select to_number('12121','999999999')用于数值格式化的模板模式:模式描述9 带有指定数值位数的值0 带前导零的值.(句点) 小数点,(逗号) 分组(千)分隔符PR 尖括号内负值S 带符号的数值L 货币符号D 小数点G 分组分隔符MI 在指明的位置的负号(如果数字< 0)PL 在指明的位置的正号(如果数字> 0)SG 在指明的位置的正/负号postgresql 获取当前时间,操作当前时间current_date 今天的日期例子:sql:select current_dateresult:"2012-12-17"current_time 现在的时间例子:sql:select current_timeresult:"18:16:09.984+08"current_timestamp 日期和时间例子:sql:select current_timestampresult:"2012-12-17 18:17:03.015+08"postgresql windows下修改帐号密码(图文)重新设置postgres用户的密码方法:1、关闭数据库服务2、进入数据库的工作空间目录(如果是建库是没有另外指定,应该就是postgresql 安装目录下的data 目录)3、编辑修改文件pg_hba.conf,把连接权限设置的md5 加密方式改成trust以我的为例,原本设置是# IPv4 local connections:host all all 127.0.0.1/32 md5修改为# IPv4 local connections:host all all 127.0.0.1/32 trust4、重新新启动postgresql数据库服务5、可以不用密码就能用postgres用户登陆,然后执行修改用户密码的操作alter user postgres with password 'foobar';6、修改pg_hba.conf 文件,改回到md5 方式,再重启数据库服务设置完成。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

关于uboot中的TEXT_BASE【转】2009年11月11日星期三 23:03都知道U-BOOT分为两个阶段,第一阶段是(~/cpu/arm920t/start.S中)在FLASH上运行(一般情况下),完成对硬件的初始化,包括看门狗,中断缓存等,并且负责把代码搬移到SDRAM中(在搬移的时候检查自身代码是否在SDRAM中),然后完成C程序运行所需要环境的建立,包括堆栈的初始化等,最后执行一句跳转指令:ldr pc, _start_armboot_start_armboot: .word start_armboot,进入到/lib_arm/board.c中的函数void start_armboot (void),从此就进入了第二阶段。

这是在很多资料上都有讲述的,所以勿需多言了。

现在对于第一阶段有几个问题,以前我一直是没有搞明白的,既然在FLASH中的代码是把自己拷贝到SDRAM中,那么在S3C2410的内存地址空间,就有两份的启动代码,第一份就是在FLASH中,第二份就是在SDRAM中。

根据链接脚本文件(~/board/smdk2410/u-boot.lds)OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/OUTPUT_ARCH(arm)ENTRY(_start)SECTIONS{. = 0x00000000; /* 后记:这个链接起始地址实际上被-Ttest $(TEST_BASE)更新了*/. = ALIGN(4);.text :{cpu/arm920t/start.o (.text)*(.text)}. = ALIGN(4);.rodata : { *(.rodata) }. = ALIGN(4);.data : { *(.data) }. = ALIGN(4);.got : { *(.got) }. = .;__u_boot_cmd_start = .;.u_boot_cmd : { *(.u_boot_cmd) }__u_boot_cmd_end = .;. = ALIGN(4);__bss_start = .;.bss : { *(.bss) }_end = .;}其中的链接命令 . = 0x00000000;表示地址计数器从0地址开始计数,而且_start 是程序代码段的入口,那么*.text中的所有地址标号(cpu/arm920t/start.S中定义的)就应该从0地址开始计数,那么标号start_armboot(就是void start_armboot (void)函数的入口地址)应该在FLASH中才对啊,所以按照上边的分析,ldr pc, _start_armboot_start_armboot: .word start_armboot此条语句后,并没有跳转到SDRAM中的void start_armboot (void),而是跳转到了FLASH 中的void start_armboot (void)中。

所以就出现了这样的矛盾,在FLASH中有一段代码把自己拷贝到SDRAM中,产生了两份UBOOT 可执行的指令流,但是最后却没有跳转到SDRAM中去运行以提高指令执行的速度。

产生以上的认识是基于以下几个认识(肯定是错误的):1.*.text中的所有地址标号(在链接时确定)是从0地址开始生成的。

实际上在arm-linux-ld 执行时,原来定义的0x0地址被更新为TEXT_BASE定义的地址。

2.relocate: /* relocate U-Boot to RAM */adr r0, _start /* r0 <- current position of code */ldr r1, _TEXT_BASE /* test if we run from flash or RAM */cmp r0, r1 /* don't reloc during debug */beq stack_setupldr r2, _armboot_startldr r3, _bss_startsub r2, r3, r2 /* r2 <- size of armboot */add r2, r0, r2 /* r2 <- source end address */如果不是出于调试阶段,这段搬移代码中的r0和r1肯定不相等的,r0=#0,r1=#TEXT_BASE: 0x33F80000(在./board/smdk2410/config.mk中),所以执行代码的自身拷贝与搬移。

注意:在GNU中:adr r0, _start 作用是获得 _start 的实际运行所在的地址值,而ldr r1, _TEXT_BASE 为获得地址_TEXT_BASE中所存放的数据,其中adr r0, _start翻译成 add r0,(PC+#offset),offset 就是 adr r0, _start 指令到_start 的偏移量,在链接时确定,这个偏移量是地址无关的。

而 ldr r1, _TEXT_BASE 指令表示以程序相对偏移的方式加载数据,是索引偏移加载的另外一种形式,等同于ldr r1,[PC+#offset],offset 是 ldr r1, _TEXT_BASE 到 _TEXT_BASE 的偏移量。

注意这种用法并不是伪指令,伪指令的特征是 ldr r1, =expr/lable_expr。

对于LDR伪指令,ADS的情况有些不一样(细微差别),在ADS中的情况可以参考杜春雷<ARM体系结构与编程>144页。

比较一下:add r0,(PC+#offset):(PC+#offset)是相对地址,表示把本指令上溯或下溯offset处的地址加载到 r0;ldr r1,[PC+#offset]:[PC+#offset]也是相对地址,表示把偏移offset处的地址上的数据加载到 r1;现在继续:刚才分析所得到的矛盾,肯定是在认识上存在的偏差,经过把U-BOOT进行make后,从所生成的两个.map文件来看(~/u-boot.map和Systen.map),所有的地址标号都是从0x33f80000开始的,就是从SDRAM的高地址开始,等于TEXT_BASE的值,也就是说,链接器是从0x33F80000开始来链接所编译生成的目标文件的,而不是从0地址开始,经过查看,start_armboot=0x33f80d9c,就是说void start_armboot (void)函数的入口地址在SDRAM 中(链接器决定),所以执行ldr pc, _start_armboot_start_armboot: .word start_armboot,PC指针肯定就指向了SDRAM中,换句话就是说进入到SDRAM中了,对于ldr pc, _start_armboot,其仍然是GNU中使用程序相对偏移的方式加载数据,翻译一下就是ldr pc, [pc+pc到_start_armboot的偏移值],结果就把_start_armboot地址中的数start_armboot 放入pc中完成了跳转,而 start_armboot 的值(函数地址)是在链接时就确定了,是相对于 TEXT_BASE 的。

因为在整个UBOOT的阶段1中所有的寻址都是相对位置的寻址(虽然链接器认为是阶段1的代码是从地址0x3ff80000中开始链接的),把阶段1的代码放在0地址开始的FLASH中也是可以正确的运行的,如果ARM的复位向量是在0x00000001(假设),那么把代码烧写到从0x00000004处开始的地方,上电时也可以正确的运行(假设ARM的复位向量是在0x00000004成立),当然ARM的复位向量不在这里,只是以此假设来说明以上的对于阶段1的分析。

现在最后一个矛盾就是链接脚本(~/board/smdk2410/u-boot.lds)所描述的链接地址与实际的链接地址不相同的问题,因为根据链接脚本,所有的地址标号应该从0地址开始计数的,然而不是。

经过查找Makefile文件,在顶层的Makefile文件中,在166行中链接是的链接命令:$(LD) $(LDFLAGS) $$UNDEF_SYM $(OBJS) \,其中的LDFLAGS在定义在顶层的config.mk中的145行:LDFLAGS += -Bstatic -T $(LDSCRIPT) -Ttext $(TEXT_BASE) $(PLATFORM_LDFLAGS),最关键的就是 -Ttext $(TEXT_BASE)命令了,他的含义就是说,起始地址在TEXT_BASE,而TEXT_BASE在~/board/smdk2410/config.mk中TEXT_BASE = 0x3FF80000;到此就弄清楚为什么链接从0x3ff80000开始的了,至于链接脚本,其主要作用是用来指明各个*.o文件的顺序,如入口地址标号(_start)等,以及使两个地址标号得到当前的地址__u_boot_cmd_start = .; *.u_boot_cmd段的起始地址.u_boot_cmd : { *(.u_boot_cmd) }__u_boot_cmd_end = .; *.u_boot_cmd段的结束地址以供C程序使用。

__u_boot_cmd_start和__u_boot_cmd_end可以作为全局的一个常数使用。

总结:因为-Ttext $(TEXT_BASE)命令的使用,链接器把UBOOT从地址0x3ff80000开始连接,在第一阶段中,所有使用的目标地址寻址都是使用当前PC值加减偏移量的方法,所以把UBOOT 烧写到0地址开始的FLASH中,不影响第一阶段的正确执行。

相关文档
最新文档