วันจันทร์ที่ 30 สิงหาคม พ.ศ. 2553

machine.config location

can find in C:\Windows\Microsoft.NET\Framework\(Version number)\Config

This useful when you need some config from default setting to deploy with your website.

วันจันทร์ที่ 9 สิงหาคม พ.ศ. 2553

Vista can't ping Windows XP

Yes I still need Windows XP because DB2 7.2 is can't install success in Vista
So what i need to do now.

I install newly Windows XP and I can't not ping to see it.
But XP can ping my Vista

Is simple if you don't have any firewall or something more than windows xp firewall
many mistake is come from Exceptions setting.

Windows XP Firewall in Tab "Exceptions"
Check box on "File and Printer Sharing"

This will enable any component to use for share file and printer. Yes it make them to see each other too.

วันพุธที่ 4 สิงหาคม พ.ศ. 2553

All about array Items on C#

/ Add an item to the end of an existing array
string[] ar1 = new string[] {"I", "Like", "To"}

// create a temporary array with an extra slot
// at the end
string[] ar2 = new string[ar1.Length + 1];

// add the contents of the ar1 to ar2
// at position 0
ar1.CopyTo(ar2, 0);

// add the desired value
ar2.SetValue("Code.", ar1.Length);

// overwrite ar1 with ar2 and voila!
// the contents of ar1 should now be {"I", "Like", "To", "Code."}
ar1 = ar2;

Or use List

List ls = new List();
ls.Add("Hello");

Or

Array.Resize(ref array, newsize);
array[newsize - 1] = "newvalue"

วันอังคารที่ 3 สิงหาคม พ.ศ. 2553

xsl on Tomcat 4 not download but display junk text.

This happen when server tomcat don't setting for some file extension to handles.
try to add mime-mapping in conf/web.xml

<mime-mapping>
<extension>xls</extension>
<mime-type>application/vnd.ms-excel</mime-type>
</mime-mapping>

and another mime-mapping is

.docm,application/vnd.ms-word.document.macroEnabled.12
.docx,application/vnd.openxmlformats-officedocument.wordprocessingml.document
.dotm,application/vnd.ms-word.template.macroEnabled.12
.dotx,application/vnd.openxmlformats-officedocument.wordprocessingml.template
.potm,application/vnd.ms-powerpoint.template.macroEnabled.12
.potx,application/vnd.openxmlformats-officedocument.presentationml.template
.ppam,application/vnd.ms-powerpoint.addin.macroEnabled.12
.ppsm,application/vnd.ms-powerpoint.slideshow.macroEnabled.12
.ppsx,application/vnd.openxmlformats-officedocument.presentationml.slideshow
.pptm,application/vnd.ms-powerpoint.presentation.macroEnabled.12
.pptx,application/vnd.openxmlformats-officedocument.presentationml.presentation
.xlam,application/vnd.ms-excel.addin.macroEnabled.12
.xlsb,application/vnd.ms-excel.sheet.binary.macroEnabled.12
.xlsm,application/vnd.ms-excel.sheet.macroEnabled.12
.xlsx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xltm,application/vnd.ms-excel.template.macroEnabled.12
.xltx,application/vnd.openxmlformats-officedocument.spreadsheetml.template

Common mime-mapping is
http://www.w3schools.com/media/media_mimeref.asp

Other setting can be found here
http://wiki.metawerx.net/wiki/Web.xml.MimeMapping

วันจันทร์ที่ 2 สิงหาคม พ.ศ. 2553

Oracle Error : illegal variable name/number

This happen when i use some variable that can be not use in oracle

try to don't use any word like "@demo_table" but can use "@demotable"

Yes remove that line will help. but if variable name is can' use even if it only one word try to change that word.

วันอาทิตย์ที่ 1 สิงหาคม พ.ศ. 2553

feature not enabled: Bit-mapped indexes

About error from run sql statement when need to create database.

sql statement is export from Hora software DLL

to work around changed

CREATE BITMAP INDEX

to

CREATE INDEX

It will work fine.

(I used XE version in my Notebook but in server export script is Enterprise version)