using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Data.OleDb; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Configuration;
namespace makehtmlfile { /// <summary> /// makeallfiles 的摘要说明?br> /// </summary> public class makeallfiles : System.Web.UI.Page { public string strcon; public OleDbConnection conn; public string strSQL;
using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Configuration; using System.Data.OleDb; using System.Drawing; using System.Web; using System.IO; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls;
namespace makehtmlfile { /// <summary> /// makefile2 的摘要说明?br> /// </summary> public class makefile2 : System.Web.UI.Page { public string strcon; public OleDbConnection conn;
public string class1id; public string class2id; //*********************************** public string previd; public string prevtitle; public string nextid; public string nexttitle; //*********************************** public string newstitle; public string newscontent; public string newsdate; public string newsip; public string newsid; //************************************
Person person = new Person { FirstName = "Scott", LastName = "Guthrie" Age = 32, Address = new Address { Street = "One Microsoft Way", City = "Redmond", State = "WA", Zip = 98052 } };
Bart De Smet对用Orcas三月份CTP版中的对象初始化器时内部发生的情形也作了_ֽ的描qͼ你可?a target=_blank>在这里阅M的精彩相兛_?/font>?
people.Add( new Person { FirstName = "Scott", LastName = "Guthrie", Age = 32 } ); people.Add( new Person { FirstName = "Bill", LastName = "Gates", Age = 50 } ); people.Add( new Person { FirstName = "Susanne", LastName = "Guthrie", Age = 32 } );
List<Person> people = new List<Person> { new Person { FirstName = "Scott", LastName = "Guthrie", Age = 32 }, new Person { FirstName = "Bill", LastName = "Gates", Age = 50 }, new Person { FirstName = "Susanne", LastName = "Guthrie", Age = 32 } };
Free Vista / .NET 3.0 E-Learning: All courses listed here
See the New Capabilities: Microsoft .NET Framework 3.0 and Visual Studio 2005: Learn about Windows Presentation Foundation and more new capabilities provided by the .NET Framework 3.0. Free collection from Microsoft Learning. Click here or here.
Get Started With Windows Workflow Foundation: Free clinic from Microsoft Learning: See the functionality and architecture of Windows Workflow Foundation, and learn how to use it with Visual Studio 2005 to build workflow-enabled applications. Click here.
Introduction to Developing with Windows Communication Foundation and Visual Studio 2005: Free clinic from Microsoft Learning: Learn how to create Windows Communication Foundation (WCF) services and clients, and enhance WCF services. Click here.
Cine.View: A WPF viewing application that exposes the NetFlix catalog and ordering capabilities created by the thirteen23 company. They also have a great viewer for Flickr.
New York Times Reader: A WPF content application that provides a rich browsing and reading experience for the paper's news content online in a Windows application
Karen Corby's Woodgrove Finance application: This is a WPF XAML Browser application that provides rich visualization of stock market data in a multi-paned WPF app that runs in the browser.
{?/span>Q?/span>.NET Framework 3.0 会(x)支援 Windows Vista™, Windows Server 2003 (SP1), and Windows XP (SP2) 作业pȝ?/span>
?/font> 19Q何时会(x)发布释出 .NET Framework 3.0Q?/font>
{?/span>Q?/span>.NET Framework 3.0 ?x)是包含?/font> Windows Vista 作业pȝ的一部分Q?/font>Windows Vista 的客户将?x)得?/font> .NET Framework 3.0。给商业客户的第一?/font> Windows Vista 版本Q目前计划是?/font> 2006 q?/font> 11 月,然而最后日期会(x)视客户回馈反应而决定?/font>
在此同时Q我们会(x)q泛地提供给 Windows XP and Windows Server 2003 客户获得 .NET Framework 3.0 下蝲?/font>
?/font> 20Q?/font>.NET Framework 3.0 ?/font> Windows Vista 作业pȝ之间的相xؓ(f)何?
{?/span>Q?/span>.NET Framework 3.0 ?/font> Windows Vista 作业pȝ的核心元Ӟq且预设是会(x)安装?/font> Windows Vista 作业pȝQ而它也会(x)?/font> Windows XP and Windows Server 2003 客户取得?/span>
?/font> 21Q是?/font> .NET Framework 3.0 有Q何的功能只能?/font> Windows Vista 作业pȝ上才能执行?
{?/span>Q虽然有?/span> .NET Framework 3.0 的最?jng)_会(x)?/font> Windows Vista 新功而n有利益,但我们努力提供一致性的l验?/font> Windows Vista, Windows Server 2003, and Windows XP q三U作业系l之上?/span>
public class HorseX { public int m_No; public int m_HorseAge; public int m_HorseEx,m_HorseEndur,m_HorseHealth; public char[] m_HorseName=new char[4];//="my horse"; // public static StringBuffer m_HorseName;//new char[4];//="my horse"; public static final String LetterTable="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; public int m_Speed; public int m_HorseState; public int m_golds; public int m_silvers;
public HorseX(int endur,int exp,int health,int no) {
init(endur,exp,health,no);
} public void init(int endur,int exp,int health,int no) { int randnum=0;
public class HorseCanvas extends Canvas implements Runnable, CommandListener { private HorseMidlet midlet; private volatile Thread animationThread=null;
private static int canvasHeight, canvasWidth; private HorseRacing myHorseRacing;
private Image buffer; private Graphics graphics;
//for lot UI private static int lot_no; private static int lot_money; private static int lot_select=0;//0 for lot_no private static int sumTemp; //images
private boolean running; // private final int SLEEP=10; private final int SLEEP=10; private int ReadyToSleep=0; private int Intro_pos=0; private Command exit; // private Command memory; private Command newGame;
public void paint (Graphics g) { System.out.println("Free memory: "+Runtime.getRuntime().freeMemory()+" Tot al Memory"+Runtime.getRuntime().totalMemory());
switch (HorseMidlet.gamestate) { case HorseMidlet.GAME_STATE_START: //draw menu
g.setColor(210,210,250); g.fillRect(0,0,getCanvasWidth(),getCanvasHeight()); // if (sumTemp == 0) // {
//draw the horse info g.setColor(255,180,0); // g.fillRect(60,7,getCanvasWidth()/2+20,getCanvasHeight()/2+4); //右上?br>g.fillRect(50,7,76,getCanvasHeight()/2+4);
case RIGHT: if (HorseMidlet.gamestate==HorseMidlet.GAME_STATE_LOT) { if (HorseMidlet.substate == 0) { //the first lot if (lot_select == 0) { HorseMidlet.firstlot_no++; if (HorseMidlet.firstlot_no > 7) HorseMidlet.firstlot_no = 0; } else { if (HorseMidlet.mytotalmoney >= HorseMidlet.BIT_LOT_MONEY) {
} if (HorseMidlet.substate == 1) { //the second lot if (lot_select == 0) { HorseMidlet.secondlot_no++; if (HorseMidlet.secondlot_no == HorseMidlet.firstlot_no) HorseMidlet.secondlot_no++; if (HorseMidlet.secondlot_no > 7) { HorseMidlet.secondlot_no = 0; if (HorseMidlet.secondlot_no == HorseMidlet.firstlot_no) HorseMidlet.secondlot_no++;
} } else { if (HorseMidlet.mytotalmoney >= HorseMidlet.BIT_LOT_MONEY) {
} } else if (HorseMidlet.gamestate==HorseMidlet.GAME_STATE_TRAINING) { HorseMidlet.substate=(HorseMidlet.substate+1)%4;
}
break;
case DOWN: if (HorseMidlet.gamestate==HorseMidlet.GAME_STATE_START) { HorseMidlet.substate++; if(HorseMidlet.substate>=3) HorseMidlet.substate=0; // repaint();
if (HorseMidlet.gamestate==HorseMidlet.GAME_STATE_LOT) { if (HorseMidlet.substate == 0) { //the first lot if (lot_select == 0) { HorseMidlet.firstlot_no--; if (HorseMidlet.firstlot_no <0 ) HorseMidlet.firstlot_no = 7; } else { if (HorseMidlet.firstlot_money > HorseMidlet.BIT_LOT_MONEY) {
} if (HorseMidlet.substate == 1) { //the second lot if (lot_select == 0) { HorseMidlet.secondlot_no--; if (HorseMidlet.secondlot_no == HorseMidlet.firstlot_no) HorseMidlet.secondlot_no--; if (HorseMidlet.secondlot_no <0) { HorseMidlet.secondlot_no = 7; if (HorseMidlet.secondlot_no == HorseMidlet.firstlot_no) HorseMidlet.secondlot_no--;
} } else if (HorseMidlet.gamestate==HorseMidlet.GAME_STATE_TRAINING) { HorseMidlet.substate=(HorseMidlet.substate+3)%4;
}
break;
case UP: if (HorseMidlet.gamestate==HorseMidlet.GAME_STATE_START) { HorseMidlet.substate--; if(HorseMidlet.substate<0) HorseMidlet.substate=2; } else if (HorseMidlet.gamestate==HorseMidlet.GAME_STATE_LOT) { if(HorseMidlet.substate>=2) { HorseMidlet.substate--; if(HorseMidlet.substate<2) HorseMidlet.substate=4; } else { if(lot_select==0) lot_select=1; else lot_select=0; }
} repaint();
break;
default: break; } repaint(); }
}
package HorseClub;
import javax.microedition.lcdui.*;
public class RaceGround{
private static int imageWidth, imageHeight; private static int tileWidth, tileHeight; private static int imageSkyWidth, imageSkyHeight; private static int tileSkyWidth, tileSkyHeight; private static int canvasWidth, canvasHeight; private Image[] images; private final String BACKGROUND_NAME="raceground"; private final int BACKGROUND_FRAMES=1; private final String SKY_NAME="racesky"; private final int SKY_FRAMES=1;
private static Image imgBackground; private static Image imgSky; private static int xBackground, yBackground,xSky; int yStart=30; int ySkyStart=0;
public RaceGround() {
// load the images from the .jar imgTile=getImages(BACKGROUND_NAME,BACKGROUND_FRAMES); imgSkyTile=getImages(SKY_NAME,SKY_FRAMES);
// set the canvas measurements to local class variables. canvasWidth=(HorseCanvas.getCanvasWidth()); canvasHeight=(HorseCanvas.getCanvasHeight());
//prepare the background paras // all character frame images are assumed // to be the same height and width tileWidth=imgTile[0].getWidth(); tileHeight=imgTile[0].getHeight();
// set the background image dimensions imageWidth=((canvasWidth/tileWidth)*tileWidth)+(tileWidth*2); imageHeight=tileHeight;//((canvasWidth/tileHeight)*tileHeight)+tileHeight;
//prepare the sky paras tileSkyWidth=imgSkyTile[0].getWidth(); tileSkyHeight=imgSkyTile[0].getHeight();
// set the background image dimensions imageSkyWidth=((canvasWidth/tileSkyWidth)*tileSkyWidth)+(tileSkyWidth*2);
} public Image getImage(){return imgBackground;} public Image getSkyImage(){return imgSky;}
public void draw(Graphics g) { g.drawImage(getImage(),xBackground,yStart,g.LEFT|g.TOP); g.drawImage(getSkyImage(),xSky,ySkyStart,g.LEFT|g.TOP); }
public void setPosition(int offset) { //move the background to provide animation of moving landscape. boolean reset=false;
// if the image exceeds the x-axis then reset it // and set the starting point for the next row in the image array // set the redraw flag for redrawing the image xBackground=xBackground-offset; if(xBackground<=-tileWidth) { xBackground=0; reset=true; } xSky=xSky-1; if(xSky<=-tileSkyWidth) { xSky=0; reset=true; }
// if the images exceeds the y-axis then reset it // and set the stating point for the next column in the image array // set the redraw flag for redrawing the image //if(++yBackground==0) //{ // yBackground=-tileHeight; // if(--xStart<0) // { // xStart=9; // } // reset=true; //}
// redraw the background image if reset=true if(reset) { // setImage(); } }
private static void createImage() { // allocate memory to store the onscreen background image. // assuming all tiles are the same size, make the buffer // the screen size plus one row and column. imgBackground=Image.createImage(imageWidth, imageHeight); }
private static void createSkyImage() { // allocate memory to store the onscreen background image. // assuming all tiles are the same size, make the buffer // the screen size plus one row and column. imgSky=Image.createImage(imageSkyWidth, imageSkyHeight); }
public void setImage() { Graphics g = imgBackground.getGraphics(); Graphics gSky = imgSky.getGraphics();
int currentWidth=0; int currentHeight=(imageHeight-tileHeight);
// draw the tiles within the bounds of the allocated image buffer // draw from the starting from the current position within the image array . while (currentHeight>=0) { while (currentWidth { g.drawImage(imgTile[0],currentWidth,currentHeight,g.LEFT | g.TOP); currentWidth+=tileWidth; }
]]>看看你的密码http://www.aygfsteel.com/yeiwei/archive/2007/03/30/107453.html圣域飞侠圣域飞侠Fri, 30 Mar 2007 04:00:00 GMThttp://www.aygfsteel.com/yeiwei/archive/2007/03/30/107453.htmlhttp://www.aygfsteel.com/yeiwei/comments/107453.htmlhttp://www.aygfsteel.com/yeiwei/archive/2007/03/30/107453.html#Feedback0http://www.aygfsteel.com/yeiwei/comments/commentRss/107453.htmlhttp://www.aygfsteel.com/yeiwei/services/trackbacks/107453.htmlA ?x)选用生日或自家电(sh)话号码来当密码的人,其实是很好搞定的׃hQ不难追Q挑战性也不强Q因ZQ她Q心里在打什么主意,相处一D|_(d)可以掌握到八九(ji)分,剩下那一两分Q也是虽不中Q亦不远矣。所以这cMh要是有爱情走U或是搞|很快׃(x)被爱人发现到一些蛛丝马qV?br> B q类׃h戒心很重Q所以徏立在二h情感关系上的信QQ将是最重要的关键。喜Ƣ观察对方,甚至Z试来考验Ҏ(gu)Q不时考虑双方的适合E度Q如果没有得C任,两h的关pd无法有进一步的H破Q你也不?x)是他(她)惌共度一生的伴G?br> C q类人变化没有规则可aQ连他(她)自己都无法控制。要讨好q种׃hQ是高难度的挑战Q因他(她)都不知要的到底是什么,自己都头痛,׃h当然更头痛,今天适用的招敎ͼ明天可能失效了。所以要对付q种׃hQ最好的对策是以不变应万变Q管他(她)如何变,反正L一天又?x)变回来Q而你的不变,y妙地创造了安全感?br> D q类人内心较为复杂,惛_很多Q爱变也喜欢变,老是?x)想如何让h猜不透。想要追上他Q她Q,最佳的Ҏ(gu)Q是有时要能一针见血Q掌握对方的xQ有时即使知道,也是要装M下,让他们有Ҏ(gu)感Q又不会(x)觉得你太蠢,MƲ擒故纵对了。如果你q有本事Q能在下半生常常出点花招Q他(她)猜不透你的想法,那你成功大半了?/font>
Web 用户控g易于创徏Q但它们在高U方案中使用h可能不太方便。开?Web 用户控g的方式与开?Web H体늚方式几乎完全相同。与 Web H体怼Q用h件可以在可视化设计器中创建,可以使用?HTML 隔离的代码来~写Qƈ且可以处理执行事件。但是,׃ Web 用户控g在运行时动态地q行~译Q所以不能将它们d到工L(fng)中,而且它们在添加到面上时q单的占位W标志符h表示。如果?zhn)习(fn)惯于完全?Visual Studio .NET 设计时支持(包括“属?#8221;H口?#8220;设计”视图预览Q,q将?x)?Web 用户控g使用h更不方便?此外Q在应用E序之间׃n用户控g的唯一方式是将一个单独的副本攑օ每个应用E序Q因此如果对该控件作Z更改Q将需要进行比较多的维护?/p>
Web 自定义控件是~译的代码,q?Web 自定义控件更易于使用但更难于创徏QWeb 自定义控件必M用代码来创徏。一旦创控gQ那么,(zhn)就可以其d到工L(fng)中,q在h完全“属?#8221;H口支持?ASP.NET 服务器控件的其他所有设计时功能的可视化设计器中昄该控件。此外,q可以在全局E序集缓存中安装 Web 自定义控件的单个副本Qƈ在应用程序之间共享该副本Q这ɾl护变得更容易。有x多信息,请参阅全局E序集缓存?br>如果(zhn)的控g包含大量静态布局Q用h件则可能是较佳的选择。如果?zhn)的控件主要是动态生成的Q例如数据绑定表的行、树(wi)视图的节Ҏ(gu)选项?(TabControl) 控g的选项卡)Q自定义控g则可能是较佳的选择?/p>
下表概述了这两种cd之间的主要区别:(x) Web 用户控g 1.难于创徏 2.Z用可视化设计工具的用者提供有限的支持 3. 每个应用E序中需要控件的一个单独副?br>4. 不能d?Visual Studio 中的工具?br>5. 适用于静态布局 Web 自定义控?br>1.易于创徏 2. Z用者提供完全的可视化设计工h?br>3. 仅在全局E序集缓存中需要控件的单个副本 4. 可以d?Visual Studio 中的工具?br>5. 适用于动态布局
5.值类型和引用cd的区别?写出C#的样例代码?br>值类型是在内存中保存,引用cd是在内存中保存一副本.你在内存中可以有多个某种引用对象..但是值类型始l只有一? 最常见的值类型就是static,struct; 例如: static int aa = 1;//值类?br>如果多个用户改变aa的值则,aa的g(x)以最后一个修改的记录为准.其他人的修改则会(x)被冲? 引用cd,最能说明问题的是实例?.你new出来的对象单独分配一个独立的内存..所以g?x)互相冲H?
对于winApp来说,静态成员对于程序员本n省了很多?而且因ؓ(f)静态成员驻留内?在方法与Ҏ(gu)之间传递共享数据的时?所以静态成员成了我的首?.但是不要因ؓ(f)方便,大量使用,其是在内存紧张或?br> 用静态方法操作一些共享值的时?或者要写多用户pȝ的时?要慎之又?比如: static int id = 0; sql = "select * from table where id=" + id;l
4. ?: select top 10 * from A where id not in (select top 30 id from A) ?: select top 10 * from A where id > (select max(id) from (select top 30 id from A )as A) 评分标准Q?写对?0分?{案不唯一Qdatagrid 分页可能需要用?
public interface Observer { void Response(); //观察者的响应Q如是老鼠见到猫的反映 } public interface Subject { void AimAt(Observer obs); //针对哪些观察者,q里指猫的要扑捉的对?--老鼠 } public class Mouse : Observer { private string name; public Mouse(string name, Subject subj) { this.name = name; subj.AimAt(this); }
public void Response() { Console.WriteLine(name + " attempt to escape!"); } } public class Master : Observer { public Master(Subject subj) { subj.AimAt(this); }
public void Response() { Console.WriteLine("Host waken!"); } }
public class Cat : Subject { private ArrayList observers; public Cat() { this.observers = new ArrayList(); } public void AimAt(Observer obs) { this.observers.Add(obs); } public void Cry() { Console.WriteLine("Cat cryed!"); foreach (Observer obs in this.observers) { obs.Response(); } } } class MainClass { static void Main(string[] args) { Cat cat = new Cat(); Mouse mouse1 = new Mouse("mouse1", cat); Mouse mouse2 = new Mouse("mouse2", cat); Master master = new Master(cat); cat.Cry(); } }
namespace MY.UC { using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls;
public delegate void BOkClickHandler(object sender, System.EventArgs e); //定义查询按钮委托
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using MY.UC;
public partial class Control_SearchBarTest : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) {