博文
(2024-01-25 03:23:31)
1.publicstaticStringremoveBlankAndDot(Stringtarget){if(target!=null){intlen=target.length();//movethisoutofloop,moreefficientStringBufferbuf=newStringBuffer(len);//usingknownsizetocreateStringBuffer,moreefficient,defaultsizeis16char.//Ifthelen>16,incorrectdesignwillforceStringBuffertoresize.//Usingpre-sizeCollectionsismoreefficient,forexample://faster,assumingexpecting1000-2000elements://Mapm=n...[閱讀全文]
閱讀 ()評論 (0)
(2024-01-25 03:11:53)
1.publicstaticStringremoveBlankAndDot(Stringtarget){if(target!=null){StringBufferbuf=newStringBuffer();for(intii=0;ii<target.length();ii++){charc=target.charAt(ii);if(c!=''&&c!='.')buf.append(c);}returnbuf.toString();}returnnull;}2.publicclassDataLogger{privatestaticPrintStreamerr=System.err;privatestaticStringfilePath="log";privatestaticStringfileName="my...[閱讀全文]
閱讀 ()評論 (0)
(2024-01-25 03:05:44)
1..class{
padding-left:3px;
margin-right:6px;
padding-top:10px;
padding-right:9px;
margin-left:6px;
background-image:url('images/happy.jpg');
background-position:bottom;
background-repeat:repeat-x;
background-color:#E2CCCC;
}
-------------------------------
CSSShorthandisusedtoturnmanyCSSpropertiesintoonetomakethefilesizesmaller
andaclean...[閱讀全文]
閱讀 ()評論 (0)
(2024-01-18 05:59:56)
1.
varPerson={
"firstname":"Mike",
"middlename":"D.",
...,
}
for(variteminPerson){
document.writeln(Person[item]);
}
------------------------------------
for-inloopisusedtoiterateovernonarrayobject.
Itmakesnoguaranteeabouttheorderofenumerateditem.
Forsequentialintegers,weshoulduseanarray;otherwise,useanobject.<...[閱讀全文]
閱讀 ()評論 (0)
(2024-01-18 05:49:02)
CANDC++TESTING(INTERMEDIATE)1.Explainthefollowing:(1)structstr*(*block())[8];(2)double(*(*func)())[2][6];2.What'sobjectID?What'spersistentobject?Howtocreatepersistentobject?3.What’sthetype(span)ofapointer?Inthefollowingcode:classA:publicB{…};Aa;B*pb=&a;A*pa=&a;What’sdifferencebetweenpbandpa?4.Whyintheiostreamlibrarythedesignerdefined“operatorvoid*()”f...[閱讀全文]
閱讀 ()評論 (0)
(2024-01-18 05:41:52)
CANDC++TESTING(BASIC)1.What'sprecedence?What'sassociativity?2.What'slvalue?What'srvalue?Why(x=y)=zisillegalinC?3.What'ssignatureoffunction?What'sdifferenceofsignaturesinCandC++?4.What'soverloadingoffunction?What'smangling?5.WhatarestaticvariableandstaticfunctioninC?Whataretheirscopes?6.What'sdifferencebetweenreferenceandpointer?WhyreferenceisneededinC++?7.Howtoa...[閱讀全文]
閱讀 ()評論 (0)
Whatdomathteacherseat?Squaremeals. Whydidthecalfhatehisschoolpicture?Hiscow-lickwasstickingup. WhattimeofdayAdamwascreated?AlittlebeforeEve. WhatdoyoucallaK9whogetslostonHalloween?A“wherewolf(werewolf). Whydidthegranddaughterthinkshelivedinheaven?Becausehergrandmatoldhershewasanangel. Whyisthepianosohardtoopen?Becausethekeysarealreadyinside. Whydokittensknowsomuchaboutchurch?Th...[閱讀全文]
閱讀 ()評論 (0)
(2023-12-17 13:29:56)
有人認為代數幾何是很難理解的數學。本文想通俗地介紹它的一些基本概念。在平麵上有一單位圓,x^2+y^2=1.設圓上的點的座標為(1/√2,1/√2),(1/√2,-1/√2)。對應在座標軸上可表示如下:這就構成座標環(Ring)。 —---------(-1/√2)-----------------(1/√2)-----------(3/√2)----- 在單位圓上取值的函數f1(x,y)=y---[(1/√2,1/√2),(1/√2,-1/√2)]&m...[閱讀全文]
閱讀 ()評論 (0)
(2023-10-11 06:05:15)
魯 華【華夏文摘增刊】第一三八五期(zk2310a)曆史雄辯地證明,充分自由的市場經濟,是資本主義生產方式全麵解放人類生產力的全部奧秘所在。在商品交換時代,任何有違市場經濟自然法則的經濟社會製度和經濟活動方式,都將碰得頭破血流,一敗塗地。而市場經濟的自然法則是由如下這條完整的鏈條構成的:一,資本的生命或生死存亡,取決於它能否不斷增值;二,資[閱讀全文]
閱讀 ()評論 (0)
(2023-05-02 07:05:25)
Howdoyoudo? USE:Howareyou? BBQ USE:barbeque. Shall USE:will,should. nextnextweek USE:intwoweeks fortnight USE:twoweeks supermarket USE:grocerystore Let’sgoAAAA:“AlcoholicsAnonymous” USE:goDutchorLet’ssplitthebill APP USE:App PPT USE:slides,Powerpoint Motorcycle USE:bike Rainingcats&dogs USE:heavyrain,pouring Auntie,uncle USE:Aunt,uncle,Mr,Mrs “Thanky...[閱讀全文]
閱讀 ()評論 (0)
[1]
[2]
[3]
[4]
[5]
[>>]
[尾頁]