Posts

Showing posts from October, 2008

Linq Expression Tree

Image
Linq Expression : Switching between data Structure and code              /////////////////////////////////////////////             /// Linq Expression Tree for (x,y ) => x * y;             /// Directly build the lambda expression ///              /////////////////////////////////////////////             Expression  lambdaExpression1 = (x, y) => x * y;             Func lamba1Delegate = lambdaExpression1.Compile();             int resultLamda1 = lamba1Delegate(100, 100);             Console.WriteLine(resultLamda1.ToString());             /////////////////////////////////////////////      Or you can do the following       Expression Func int int int   AddOperation = (x, y) => x + y;         int result = AddOperation.Compile()(10, 10);             /////////////////////////////////////////////             ///// Rebuilding and Executing Linq Expression              ////  Manually              /////////////////////////////////////////////                            

SaaS Map

Image
Something i found long long time ago....... Kinda like it. 

Biztalk : Pipeline Stamping Receive Message

This code allows you to stamp your incoming message with a XML element called SequenceNo . This sequence number gives you the ability to sequence without making changes to your existing application.  It is unique in the sense that it does not create a new part for you and there shouldn't be too much modification to your existing codes in order to implement it.  Creating a pipeline in Biztalk Server is relatively easy. It requires you to 1) Implement specific Interface 2) Create a Biztalk Project that uses a pipeline Item type with extension Btp. Drag the assembly that you have created above into [validate] section. 3) Deploy and move it to the right application. You need to configure properly after this. So first you have to come up with an assembly that overrides the Execute method as shown below. It returns a new IBaseMessage:   public IBaseMessage Execute(IPipelineContext pContext, IBaseMessage pInMsg)         {             int seq = 0;             /// new message structure ///

Accelerating Scrollable Flex Control

The general concept of creating this control is using a Timer to control, scroll through your control before slowing down after it is being triggered by Mouse_Wheel. So you need to listen to two events. package com.controls.controls { import flash.events.Event; import flash.events.MouseEvent; import flash.events.TimerEvent; import flash.utils.Timer; import mx.controls.List; public class CtlList extends List { public var sliderSpeed:Number=5; public var sliderSlowSpeed:Number=1; private var sliderAlreadyScrolling:Boolean=false; private var QtyBeforeSlowDown:Number=5; private var slideTimeCounter:Number=20; private var currentSlideCounter:Number=slideTimeCounter; private var DownDirection:Boolean=true; public function CtlList() { this.addEventListener(MouseEvent.MOUSE_WHEEL, MouseWheel_Scrolling); super(); } private function MouseWheel_Scrolling(evt:MouseEvent):void { if (!sliderAlreadyScrolling) { /// do scrolling ///