Oct 7, 2007

Planet Source Code Superior Coding Contest Winner






I got them from PSC.
this is link to article

Sep 21, 2007

Microsoft Silver light VDO



Microsoft Silverlight



Silverlight for Windows Mobile



Silverlight offical document


Sep 10, 2007

My Project 6 K15 Puzzle




















Simple puzzle game. it have many feature,it is not just game develop by vb6.0 tools
but i think i can play this game hour after hour.
If you want to download you just click

My Project 5 Tower of Hanoi animation













This is a tower of Hanoi.net ,It can solve by bot.

if you want to download code you just click

Aug 24, 2007

Display Hello World without semicolon

C# version

namespace WriteHelloWorld
{
class Program
{
static void Main(string[] args)
{

while (!"0".Equals(System.Console.Title = "Hello world").Equals(System.Console.ReadLine()))
{
}

}
}
}


C++ version
#include "stdio.h"

int main()
{
while( !printf( "Hello World\n" ) )
{
}
}

Aug 22, 2007

Google Trends about .Net developer

This is a trend of software developer by Google.











Compare .Net,Java,PHP










Compare C#,VB












Compare MCSD,MCPD,MCSE,MCITS











Compare Ajax.Net,ASP.Net Ajax












Compare Planet source code,Code Project,DevX










Compare MySQL,SQL Server,Oracle

By the way this is not benchmark popular trends.Because Google trends can't separate java platform from java Island or java coffee and in other case too.

C# Free E-Books

Programmer's Heaven C# School Book

Threading in C#

Aug 21, 2007

My Project 4 WinformThemeDesigner

This program help you to create theme for your desktop application. It can choose any colour and can choose set font in each section .

Now my blogger have little problem,I can't upload image.


You can download here

.Net Interview

Link about .net interview for to be better developer or just prepare your self for job interview.


ASP.Net datagrid question

MS SQL Server interview question


ASP.Net interview question

SCOTT HANSELMAN ASP.Net interview question

.Net interview question

C# interview question

Advanced C# interview question


Aug 19, 2007

My Project 3 Guest Number












This program is guest do you think in your mind

You can download source code here

E-Books Design Patterns

CSharp Design Pattern

Design Pattern Explain

Teach Your self UML in 24 Hours

Head first Design Patterns

My Project 2 Winform Style Sheet

This program is use style sheet for appearance of each control.













You can download source code here

My Project 1 Use XML instead Database

Simple application for CRUD data through XML file instead RDBMS





















You can Add , Edit ,Del data and when you finished operation you just click Write to File for real Update.



















This is just sample how to use treeview control this form don't use xml.

You can download source code here

Aug 18, 2007

Podcast from .Net Rock

This is donwload links mp3 from dotnet rock

Donald Farmer on Data Mining
part A
part B

Udi Dahan talks SOA Sense
part A
part B

Mark Pollack on Spring.NET


Frans Bouma on LLBLGen

Podcast from Netmagazine and other

This below link is use ful .Net podcast,for whom to like to listen than read.

Online
.Net Cast



Offline

Podcast from Netmagazine 07-08-09

Podcast from Netmagazine 07-07-27

Podcast from Netmagazine 07-07-12

Podcast from Netmagazine 07-06-28

Podcast from Netmagazine 07-06-01

Podcast from Netmagazine 07-05-17

Podcast from Netmagazine 07-05-03

PodcastStudio.net Show #16 - Code Camp Panel!


If you want to download to your computer for offline,but you can't because when you clicked link a third party e.g. windows media player,quickteim autorun. You should use download software e.g. flashget or you just right click onlink then click save target as.

Aug 13, 2007

E-Books MCSD Training kit and Exam

MCSD XML Webservice E-books
MCSD WebApp
MCSD Solution Archicture E-Books


Exam WinForm 070-306 E-Books
Exam Database 70-229

Classic Game 14 Starwars

Journey of Luke sky walker.

















Title

















Start Game

















Mini movie


















Platform

Design Exception Handler Pattern

When we write application we should handle exception for block Application Exception when it occurs, our application may crash.

.Net developer regular design exception as this.

Try

‘statement for operation

‘statement for operation

‘e.g’

Dim CN as new Oledb.OledbConnection(strConnectionString)

CN.Open()

‘other statement for operation

Catch ex as Exception

‘statement for handler exception

‘e.g.

ModuleLogError.WriteLog(ex)

Finally

‘This statement will execute even code have exception or not

CN.Close

End try

This rule will help for design better structure of handle exception.

1. Check exception may occur before Exception

e.g. DivideByZeroException,ArithmeticException …

This below is a sample code

Try

‘’’

Catch(Ex as DivideByZeroException)

‘’’

Catch(Ex as ArithmeticException)

‘’’

Catch(Ex as Exception)

‘’’

End Try

2. Keep module detail to have occur exception

In a moudule we handler exception we shuld send information about module have occure exception e.g. Modulename,section of section

Dim strModuleName as string= “DAC.Customer” ‘This variable outside method because we shared it multiple method

Private Sub SaveData()

Dim strMethodName as string=”SaveData”

Dim strSection as string = “Begin Module”

Try

strSection = “Operation 1”

‘statement for operation1

strSection = “Operation 2”

‘statement for operation2

‘other statement for operation

Catch ex as Exception

ModuleLogError.WriteLog(ex,strModuleName,strMethodName,strSection,)

Finally

‘This statement will execute even code have exception or not

CN.Close

End try

End Sub

3. When we loop operation loop should in exception

e.g.

if your code is look like this:

dim I as integer

for I = 1 to 100

Try

‘statement

Catch ex as Exception

‘statement for handler

Finally

‘statement for release unsafe resource and other benefits

End try

next

It should refractor your code as below:

Try

Dim I as integer

For I = 1 to 100

‘statement

Next

Catch ex as Exception

‘statement for handler

Finally

‘statement for release unsafe resource and other benefits

End try

It is have high performance than before.

4. Avoid use exception in case we can handle it by operation checking

e.g.

if(Num1 = 0) then

MessageBox.show(“Value cannot be 0”)

Exit sub

end if

dim dblResult = Num2 / Num1

instead

try

Dim dblResult = Num2 / Num1

Catch ex as DivideByZeroException{

MessageBox.Show(“Value cannot be 0”)

End Try

Because exception is expensive, we should avoid in a case we can handle it

5.When you application design for contact with another layer (some dll ,e.g. BC layer, DAC layer) you may not throw exception, but should keep exception for client to handle it.

e.g

This is a DAC.

Namespace DAC

Public Class Customer

Dim currentException as ApplicationException

Public Sub AddData()

Try

‘’’ Statement

Catch Ex as Exception

Me.CurrentException = Ex

End Try

End Sub

End Class

End NameSpace

And this is a client code.

Dim cCustomer as New DAC.Customer

cCustomer.AddData

if(Not isnothing(cCustomer.currentException ))

‘code for handler exception of dac

‘e.g.

‘MessageBox.Show(ex.Tostring) ‘ for winform

‘Me.lblShowError.InnerText = ex.ToString ‘for web form

‘code for write log error

End if

6. In development phase you should display detail about exception instead hardcode wording for user

e.g.

Try

‘Code for Add data

Catch Ex as Exception

MessageBox.show(ex.toString)

Instead

MessageBox.show(“Error:Please enter againg”)

End Try

This will help you easy to find the problem, and then you pass development phase you may change wording to friendly word for user. Or you may send both error message and friendly word to user , but you should care about security issue.

7. Desing your own exception

If you wish to design you exception. It is easy to do, you just create a new class and inherit from ApplicationException

Aug 9, 2007

Classic Game 13 DragonQuest















Title
















In castle

Aug 7, 2007

Classic Game 12 RockMan3

This is third adventure of rockman on nes platform.
In america this game call "megaman 3"
This adventure we must fight with DR.Willy as previous, and we got rush a dog robot for assistant you for beat with your enemy.

















Title

















Boss

















Battle field

Aug 6, 2007

Classic Game 11 Donkey Kong III

You are Dixie Kong and Kiddie Kong journey for a new adventure.
As a previous journey you must beat a King K. Rool again.
and in this adventure you will meet numbers of friend.












































King K. Rool
This image is original from wikipedia.

Aug 5, 2007

Ajax Tabcontrol inside Update panel can't find CSS

I use Ajax Tabcontrol inside Updatepanel
and each tabcontrol contain Usercontrol
each Usercontrol reference CSS file

when first run It fine.
but when I update data.
Page display is crash.

I found solutino fo solve this problem
you just copy code for reference to css file in usercontrol
to page

How i hide left navigate and right navigate YUI Calendar ?

In my project i must use YUI Calendar control for build static calendar show to user.
but I can't find the solution to hide left navigate and right navigate.
after i search yahoo api , I don't found any thing.

but now,after i try to hack calendar.js
I know the solution for hide left navigator and right navigator

First solution
1.Open calendar.js this file is in yui2.3.0\yui\build\calendar\
2.you just go to line 2321 and you will see javascript code for about render left and right navigator
then you just comment this code
you must separate comment to two group because you should not comment code for display month name

/*
if (renderLeft) {
var leftArrow = this.cfg.getProperty(defCfg.NAV_ARROW_LEFT.key);
// Check for deprecated customization - If someone set IMG_ROOT, but didn't set NAV_ARROW_LEFT, then set NAV_ARROW_LEFT to the old deprecated value
if (leftArrow === null && YAHOO.widget.Calendar.IMG_ROOT !== null) {
leftArrow = YAHOO.widget.Calendar.IMG_ROOT + DEPR_NAV_LEFT;
}
var leftStyle = (leftArrow === null) ? "" : ' style="background-image:url(' + leftArrow + ')"';
html[html.length] = ' ';
}

*/
html[html.length] = this.buildMonthLabel(); /* This line is for display Month don't comment it */
/*
if (renderRight) {
var rightArrow = this.cfg.getProperty(defCfg.NAV_ARROW_RIGHT.key);
if (rightArrow === null && YAHOO.widget.Calendar.IMG_ROOT !== null) {
rightArrow = YAHOO.widget.Calendar.IMG_ROOT + DEPR_NAV_RIGHT;
}
var rightStyle = (rightArrow === null) ? "" : ' style="background-image:url(' + rightArrow + ')"';
html[html.length] = ' ';
}
*/
3.and then you just save calendar.js when you create Calendar you don't see left navigate button and right navigate button.

But this solution will make all of calendar of your app don't display left and right navigate button except you will separate calendar.js.
well I think we shoul have a better solution

Lets'go to second solution

Second solution.
1.like first solution.You just open calendar.js
2.you just set id of both left and right navgate button in this case I name ALeft and ARight.
if (renderLeft) {
var leftArrow = this.cfg.getProperty(defCfg.NAV_ARROW_LEFT.key);
// Check for deprecated customization - If someone set IMG_ROOT, but didn't set NAV_ARROW_LEFT, then set NAV_ARROW_LEFT to the old deprecated value
if (leftArrow === null && YAHOO.widget.Calendar.IMG_ROOT !== null) {
leftArrow = YAHOO.widget.Calendar.IMG_ROOT + DEPR_NAV_LEFT;
}
var leftStyle = (leftArrow === null) ? "" : ' style="background-image:url(' + leftArrow + ')"';
html[html.length] = ' ';
}


html[html.length] = this.buildMonthLabel();

if (renderRight) {
var rightArrow = this.cfg.getProperty(defCfg.NAV_ARROW_RIGHT.key);
if (rightArrow === null && YAHOO.widget.Calendar.IMG_ROOT !== null) {
rightArrow = YAHOO.widget.Calendar.IMG_ROOT + DEPR_NAV_RIGHT;
}
var rightStyle = (rightArrow === null) ? "" : ' style="background-image:url(' + rightArrow + ')"';
html[html.length] = ' ';
}
3.In a page you wish build calendar and wish to hide left and right navigator.
you just write this code



I use setTimeout because I want to object calendar loaded.
when first excute function HideNav if element ALeft or ARight dosen't loaded.
it will setTimeout again and again until ALeft and ARigh loaded and hide it.

Now.I think this solution work for me.
But you may have a problem.
e.g. When your page have more than one calendar and you want to hide navigate button of some calendar.and now each navigator button have same id (ALeft and ARight)

Classic Game 10 Front Mission

This is simulation robot game on SNES platform.
In America this game is type "turnbased" but in my country
call "simulation"

This is Robot war.You are Llyou a soldier work for OCU(Oceana Community Union ) and you must beat with (USN) United States of the New Continent.

Each mission you must deploy unit and control them to destroy the enemy.
your weapon are punch,gun and missile.

In town you can shop the weapon and armor for upgrade your robot.




Published by SQUARESOFT



















Title



















In town



















Your robot



















Another your robot



















You can change color of yours.




















Battle field

Classic Game 9 MegamanX2

This is second adventure of MegamaxX on SNES Platform.




















Title



















First stage




















have a damage


















Shoot on head





















Charge Mega buster



















Boss























We can control robot.

Aug 2, 2007

Classic Game 8 Super Mario RPG:Legent of the Seven Stars

Developed and published by Square and Nintendo
This game is first experience you can correct exp and gain level of Mario and friends.
Map system is 3D isometric view and battle system too.




















Beat with final Boss.



















Battle field. you see in this picture you choose command by use y,x,a,b button.I think this game is want to fun for gamer whom don't know RPG game.

Classic Game 7 Battle City















Begin game.















I got star.

Dataset Interview

Q:What is dataset ?
A:Dataset is a database on ram.
dataset contain number of datatable.
datatable contain number datacolumns and datarow collection.
Each datatable may have a primary key and foreign key and have a data relation to other datatable.
Each datacolumn have datatype.
Each datarow contain record of datatable.
dataset itself not know about source of data.
data to fill in dataset may from many kind of RDBMS,textfile,XML file, of just create data in memory from code.


Q:How i add new row to datatable ?
A: You just simple create new row a reference to a NewRow() method of datable.
new row is a depend from datatable while you not add it.
When you add It.It will add to last row of datatable.
'sample code
dim DR as DataRow = DS.tables("Customer").NewRow()

'set each field
DR("CustomerName") = "John doo"
DR("CusPhone")= "555-555-555"
...


DS.tables("Customer").Rows.Add(DR)



Q:How DS.Tables("Mytable").Clear different from DS.Tables.Remove("MyTable")
A: Clear() method of datatable make datable delete all row.but structure of datatable is not delete too.
in this case DS will contain datatable Mytable and Mytable will contain each datacolumns.It is similar Delete MyTable in T-SQL.

But Method Remove() of Dataset.Tables is remove datatable exctracly.It is similar DROP statement in T-SQL

Q:I have a datarow ,and i want to add to two datable.How i do that ?
A: you must use method ImportRow() of datatable instead .Rows.Add().


Q:How i retrive data from database to dataset ?
A:ADO.Net have many method to retrive data from database
but this is one of easiest method.


'you just create new DataAdapter and set SQL statement for retrive data do you want
'and set Connection object
'behind the scence DataAdapter will retrive data from SQL statement throught Connection object
'and then you just use Fill method ,first parameter is dataset object, second is table name do you want
dim DA as New Oledb.OledbDataAdapter("Select * from Customer",conObj)
DA.Fill(DS,"Customer")



Q:How i update data from dataset to database ?
A:This solution similar when you want to retrive data from database
dim DA as New Oledb.OledbDataAdapter("Select * from Customer",conObj)
dim CB as New Oledb.OledbCommandBuilder(A)' you just add this line for create Command builder and reference to DataAdapter
DA.Update (DS,"Customer") ' and then update dataset table Customer throught Update method

Behind the scence CB object will create Insert,Update,Delete SQL statement from schema
if you serious performance issue you should create SQL statement by manual
This example just show you how to update by simplest way.


Q:Are datatable must retrive data from database ?
A:NO. Datatable can create datafrom void.
you can create new datatable and create new datacolumn.and then you use it with out database.
'e.g.
dim DT as new Datable

DT.DataColumns.Add(new DataColumn("ID",type.GetType(System.String)))
DT.DataColumns.Add(new DataColumn("Name",type.GetType(System.String)))

'and then you may add a datarow from Initialvalue of datatable


Q:How i use Dataset read XML file ?
A:Yes. You just use ReadXML() Method from Dataset and you can Save XML data from dataset to XML file,just use WriteXML() Method.



Q:Why i can retrive data from database to dataset and i can insert new data too.But I can't Update or delete data ?
A:May your table in database don't set Primary key.When you use dataadapter for update.It must you Primary Key for generate SQL statement.
In case of select or insert ,it not have problem but in case of update or delete it will crash.

Aug 1, 2007

Classic Game 6 Super Street Fighter II

It my country people called this game "Street 16 Toa" because this game have 16 character

















Ryu with Ken.

Classic Game 5 Mario Allstar

It is remake of Supermario I,III and Mario aradin from 8 bits nes to 16 bits snes

















fighting with hammer thrower



















map view



















you can see water effect on snes platform.

Classic Game 4 J-league


It about Football game I played before perfect eleven

Classic Game 3 Kunio Samurai English


This is one of kunio series.

Classic Game 2 FFVI

Dramatic rpg from SQUARE soft



















Openning



















Openning 2



















Battle mode




Dungeon mode (in this case it is castle)




ฺำBeat with Goddess




co-boss