Monday, November 8, 2010

Some piece of XSLT information that you might need to be successful

- Put special character in the XSLT or XML

< ==> (<)

& ==> (&)
> ==> (>)
" ==> (")
' ==> (')

Wednesday, October 27, 2010

RosettaNet PIP 3A1 release

After spending days to understand and try to make PIP 3A1 as workable class, i manage to release the first version to codeplex.

Hopefully this release will be helpful to those who are seeking for the same PIP as me.

http://rosettanetpip.codeplex.com/

Tuesday, October 19, 2010

VB.NET: How to put description to your function/class/enum during Intellisense

I struggle for hours on how to get description to my enum and class so they can be more meaningful when I'm assigning the value to them. After spending for hours searching, I manage to found it!!!!

Below would be the sample on what is the effect i'm looking for


Below would be my code on how I do it...

--- Code from my enum ---

''' Code identifying the type of pricing available for a product.
Public Enum PricingTypeCode
''' Authorized Cost and Resale.
ACR
''' Authorized Cost - The negotiated cost agreed upon between the supplier and distributor at the time the “debit?is authorized.
ACS
''' Authorized cost.
ACT
''' Any available.
ANY
''' Authorized resale.
ARS
''' Average Selling Price - Manufacturer
ASP
''' Budgetary Price Amount.
BPA
''' Broken Purchase Price.
BPP
''' Book-Ship.
BSH
''' Catalog price - Book (the supplier’s published cost at the time of transaction) or Published Price.


I hope this tutorial will help others

Monday, September 6, 2010

How to load web application code from TFS?

I have been teaching quite a number of developer on how to get their source code download properly into the development environment. I hope this step will help others along the ways.

How to open web project in TFS?

1. Go to team explorer and double click on Source Control
2. Go to the folder that contain your .sln file
3. Double click on the SLN
4. If you never download your code before from TFS, it will ask you for the path to save in. Please save the code in your "My Document>Visual Studio 2008 projects>..."
5. Once the code is download, you will be prompt that you might need to create a web application in your IIS. The message sound like "The local IIS URL: http://localhost/xxx specified for Web Project XXX...". Don't click Yes first, go to IIS
6. Under the IIS, find if there is same virtual directory existed. If it is, delete it. If not, just skip and move on to the next step.
7. Click "Yes" on the earlier message on creating web application.
8. Go to IIS again, and refresh it
9. Right click on the new folder which belong to your application and select properties
10. Go to Directory Security Tab
11. Click Edit under Authentication and access control
12. Ensure the Integrated Windows authentication is checked and copy down the user name use by the web application
13. Go to your physical folder which your source code located and right click on it.
14. Click on Security Tab and click Add
15. Paste the username that you copied earlier and click Ok
16. Give full permission to the user.

Wednesday, August 11, 2010

How to certain keyword in all your store proc?

I always need this code to find my store proc for thing like

- Table related back to a particular store proc
- I need to find certain SCR (software chage request) in all the store proc

So how do I do it? The fast and dirty way would be

---
Use MyDatabase;

SELECT Name
FROM sys.procedures
WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%Kenny%'
GO
----

Base on the example above, I'm trying to search the word "Kenny" in all my store proc and return the store proc name. Please do take note that you will not be able to find exactly as what you want in a glance. You will find problem like comment or table or variable which have the same name.

Monday, May 10, 2010

How to add hyperlink to flash button? - Flash CS4

1) Click on the button that you wish to put the hyperlink


Figure 1: Flash screen

2) Look under properties (Windows > Properties) and look at the instance name (highlighted in figure 1).

3) If the instance name is not entered (it will show like figure 1), please give it a name like “btnService “. If you are doing correctly, you will be able to see the result like figure 2.


Figure 2: The instance has a name now


4) Click anywhere on the flash screen. If you need guidelines on where to click, just click on the empty space (green box in figure 2)

5) Go to action (Windows > Actions). If there are no code in the action script, that is good. Just put “import flash.net.navigateToURL;” in the first line. If you are doing correctly, you will be looking at the figure 3. If there are already codes in the action, just find if you have the same command in it. If already exist, please don’t add the same line again.

Figure 3: MY first code
6) Let start putting the code below
--- start copy the code below ---


[btnname].addEventListener(MouseEvent.MOUSE_DOWN, [btnname]mouseDownHandler);

function [btnname]mouseDownHandler(event:MouseEvent):void {
navigateToURL( new URLRequest("aboutus.html"), "content" );
}


--- end copy ----
7) After you have copy the code into the actions, just replace all value “[btnname]” to your button name (which you have specific on step 3)
8) Change the value “aboutus.html” in the code to some url or file that you which to link to and that’s it. If you are doing correctly, you will be looking at figure 4


Figure 4: My final code