跳到主要內容

發表文章

目前顯示的是 3月, 2010的文章

[Java]eclipse 無法啟動

Eclipse 無法啟動 出現 JVM terminated. Exit code=-1 的錯誤訊息 打開eclipse根目錄下 eclipse.ini檔 -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256M -vmargs -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx512m 將 -Xms40m 改成 -Xms128m -Xmx512m 改成 -Xms256m 即可 參考資料

[8051]Introduction

1.Inner structure

[J2ME] Hello World

Create a form with "Hello World" and add a Exit Command to exit the process. import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class HelloWorld extends MIDlet implements CommandListener { private Display display; private Command exitCommand; private Form form; public HelloWorld() { display=Display.getDisplay(this); exitCommand = new Command("Exit", Command.EXIT,1); form=new Form("My J2ME Hello World!"); form.append("Welcome to J2ME!"); form.addCommand(exitCommand); form.setCommandListener(this); } protected void destroyApp(boolean arg0) throws MIDletStateChangeException { } protected void pauseApp() { } public void commandAction(Command cmd, Displayable disp) { if (cmd == exitCommand) { try{ destroyApp(false); } catch(MIDletStateChangeException ex ){ System.out.println(ex.getMessage()); ...

[8051]MCB 8051MicroControl Class Note

Use Keil C to Complie 8051 Program, and Write to ROM 1. Create New Project Project -> New Project 2.Select Device for Target A. Choice "Data Base Contact" belong your MicroControl Chip (we use Atmel. AT89C52) B. Set "Optionals for Target" ->[Target]->[Xtal] , [Output]->[Create HEX File] 3.Write the C Code 4.bulid Project 5. Open Chip-Writer Program 6. Set the Chip Type 7. Load .Hex Code 8. Test Board switch to Write-Mode and Trun On 9. Write to ROM 10. Reset Borad in Use-Model to Test Program

[.net] Load and play Flash file (swf) in .net app

1. Add “COM Components”“Shockwave Flash Object” to Toolbox 2. Add axshockwaveFlash Ojbect to your form and name "MyFlash" 3. use OpenFileDialog to load .swf open = New OpenFileDialog open.Filter = "Image Files(*.swf)|*.swf" If (open.ShowDialog() = DialogResult.OK) Then MyFlash.Movie = open.FileName End If 4. use Play /Stop contorl swf MyFlash.play() MyFlash.stop()

[.Net] Html.RenderAction/RenderPartial send parameter

Html.RenderAction/RenderPartial can send parameter by routeValues in Global.asax.vb routes.MapRoute( _ "Default", _ "{controller}/{action}/{id}/{parameter}", _ New With {.controller = "Home", .action = "Index", .id = "" , .parameter="" } _ ) in View(.aspx) < %Html.RenderAction("Login", "Member", New With {.id = "1234", .parameter="ABC"})%> <%Html.RenderPartial("Login", "Member", New With {.id = "1234", .parameter="ABC"})%> in Control(.vb) Dim id As String = RouteData.Values("id") Dim parameter As String = RouteData.Values("parameter")