June 2005 - Posts

Wow, Violet just told me she won the TechEd 2005 contest and got a FREE ticket to it. Guess she must be damn lucky to win that, haha, since only 10 free tics are available. Envious, haha, $679 just is too expensive for me
with no comments
Filed under:
I was trying out ASP.NET 2.0 Client Callback functionality when I simply cannot get it to work as I cannot find the GetCallbackEventReference method under the Page class. After some searching, I realise that the method is now under ClientScript class. So now instead of having this.GetCallbackEventReference, you will use this.ClientScript.GetCallbackEventReference.

=)

with no comments
Filed under: , ,
I just get to know of this service today, quite cool as it can alert you via msn messenger whenever the newsfeeds you subscribe to get updated

URL : http://alerts.msn.com/Alerts/Default.aspx
with no comments
Filed under:
Recently got a few friends who are blogging on Xanga and Blogspot. As someone who likes to read blog yet lazy to visit them one by one, I usually just subscribe to their RSS and wait for news to arrive at my doorstep (or better know as Outlook). However, I cannot find any [XML] or [RSS] icon in both the blog sites. I quick search in goggle reveals 2 ways which I can feed the blogs

Xanga:

there is a free service @
http://www.ephemeraleuphoria.com/xanga/rss.php?username=<username>

Simply change the <username> field to the username of the blog you wish to feed from Xanga


Blogspot
:

Blogspot default feed through atom, which the RSS aggregator I using (you subscribe) do not support.
Therefore I used this free service from 2rss to convert the feeds to atom before subscibing to them

http://www.2rss.com/software.php?page=atom2rss


Lastly, there are some who simply dun support RSS feeds. I therefore use watchthatpage instead, which is recommended by icelava


with no comments
Filed under: ,
I decided to install SP2 again after 3 failed attempt of doing so. Each time I install it, I will get BSOD with the error Bad_Pool_Header once I log into windows. This is the 4th time, and there is no exception. However, I am determined to install it and get it right this time. The reason is simple, I need to use VS2005 and its performance is slow on VPC. Secondly,  for some reason, my laptop will freeze suddenly when running on VPC. Thirdly I need to use Tablet PC SDK and if you are running on a Tablet PC, you need SP2 to run it.

Asking Mr Goggle "sp2 bad_pool_header" brings me a few solution. First of all is to disable indexing service (you will need to disable it, setting it to manual dun seem to help). So I log into safe mode to disable it. Restart, blue screen.

Secondly is to turn off Data Execution Protection. I turn it off by modifying the boot.ini, changing "/NoExecute" to "/Execute"

Restart, and hey, it survive...for 10 seconds

A scan through the threads and postings on similar posting gives me the answer of incomptible driver. I therefore tried to turn off a few services and startups, run sigverif.exe to check things out, and do a restart again. blue screen. However, this time I managed to notice something. The wireless connection icon appears, and immediately after that, BSOD.

I therefore do a quick experiment, I turned off my wireless adapter and do a restart. No problem!
I tried around a few programs and then I switch my wireless adapter on. True enuff, BSOD appear.

I quickly reviewed my intel proset driver version number, which is 7.2.0, and then refered to Intel for the lastest version, which is , to my amazement, 7.1.4. If the lastest version is 7.1.4, how do I get 7.2.0 in the first place??! After a few clicks, I realised that 7.2.0 is meant for Intel Wireless 2100A wiresless connection, but mine is Intel Wireless 2100 wireless connection. So it seems that 7.2 will work fine for but 2100 and 2100A under SP1, but not under SP2. I therefore decided to download 7.1.4 to give it a try. Download speed is slow, estimate still got 40 mins left. I will be updating over here to see if I managed to get everything to work. If you faced similar problem and managed to solve it, do drop me a comment!

============Updates================

Its working now, after installing the new drivers. What I did:
1) Upgrade 2100 driver from 1.2 to 1.2.4
2) Downgrade proset from 7.2 to 7.1.2

Everything works like a charm now, =)
For some reason, my internet is blazing fast now too
Time for some VS2005
with no comments
Filed under: ,
Hmm, just have a crazy idea today, spawn from the chat session I had with Patrick last week.

What if a few geek open up a cafe in Singapore? Imagine you walk along the street of Orchard road, and saw this cafe named "Code-Free House" with the "coffee cup icon" which resembles Java's one. You slowly walk up to it, and there is a sign which says "Coffee of the day : Java Coffee, freshly brewed with Java Beans. if(inOffer) price=$1.20 else price=$2.50".

Intrigued you walk into the cafe and greeted by a young waiter who wore a shirt with the words "Certifed Code-Free waiter". On the main board in the cafe are the following:

The menu listed the following:

<menu>
    <item name="Java Coffee" price="$2.50" />
    <item name="Solaris" price="$10.00" />
    <item name="Sandwitch QL" price="$2.00" />
    <item name="Coffee XP" price="$15.00" />
    <item name="Ice Latte Beta" price="3.00" />
    <![CDATA[ Self Service please !]]>
</menu>

You walk up to the counter and order
"hello. Can I have a sandwitch?"
The waiter replied
"Exception : line 2. Can I have a sandwitch. Please specify type of sandwitch you want"
Irritated," Erhm, a Sandwitch QL please"
Waiter, "Sure sir, wat sauce do you want it to be served with?"
"What sauces do you have?"
Waiter, "We have open-sauce, closed-sauce"
"Erhm..I go with open-sauce then"
Waiter, "Do you want me to input another order?"
"Can I try the Ice Latte Beta?"
Waiter, "Sure sir, please wait a moment while I complete the preparation, you can continue with your work as I prepare"
"Huh???!"
Waiter, "5 minutes remaining"

You waited for 5 minutes, as you are waiting, you heard the waiter replying say the following:
"Our ice latte is served with the best java beans and is prepared under vigorious unit testing in order
to bring out the best fragrance of the java beans."
"The Sandwitch QL is can be served with either open-sauce or closed -sauce"


5 minutes later, you approach the waiter.

"Excuse me, is my Ice Latte Beta and my Sandwitch QL ready?"

Waiter, "8 minutes remaining"

"Huh? I tot you say 5 mins just now?"
Waiter, "that is a mere estimation, you can continue to with your work as I prepare"

Irritated, you continue to wait.

2 minutes later...

Waiter, "Sir, preparation completed. You can start enjoying the food of Code-Free cafe now"

"Hmm, ok"

Famished, you eagerly gulp down the cup of ice latte, only to realise its as plain as water. Angered, you approached the waiter.

"Hey, this is unfit for human consumption"

Waiter, "Sorry, the Ice Latte is currently in Beta. You are free to post any comments or feedback to service@codefreecafe.com, but we do not currently provide any support for it."

*Faint

Ok, I am a bit geek myself to write such things, just for fun, lol
with 4 comment(s)
Filed under: ,
I was at Popular yesterday as my friend Chiwai want to look for some assessment books for his student, I then saw this book from the dummy series named "Training for dummies". I am quite interested in it but was in a rush so did not take a good look at this. I managed to find a sample chapter on it. Not bad, if anyone has read that or who know any good book on improving presentation skills, do drop a comment here =)
with no comments
Filed under: ,
As of 14th June 2005, OpenSolaris is now opened.

Check it out @ http://www.opensolaris.org/os/

I received an email on it and there is a 'free tshirt' beside its header. The t-shirt is actually very nice, something like this:


But there is no instruction on how to get it. Anyone who knows do tell me how!

with 1 comment(s)
Filed under: ,
Oh no, today I fail my 70-290 exam. Think I did not study detailed enough and the mspress exam guide I using should be outdated, because I am still using the red-covered one and a peek at mspress website reveal that there is a newer edition. I also did not realise that we got simulation in the exam. Think the simulation is no secret since microsoft announced it before and I participated in the survey last time regarding the simulation, its just that I did not know that it is already being implement, so I was sort of unprepared when I saw the questions. So for those who is intending to take the exam, just take note that it is already in place, so dun be as lost like me..=(

Good thing there is 2nd Chance

Anyway I went for dinner with TJ and friends yesterday night and after that, we enjoyed some Paulaner Munchen beer opposite suntec. Heres a few pics



Thats me =p



with no comments
Filed under:
Today, my speakers suddenly stop working. No sound at all despite the powers are on and the wired are plugged to my computer. Whats wrong?? I detailed check reveals that my dog has 'did it AGAIN'
On top of my fan cables, my usb cables, my handphone, my specs, my headphone and many shoes, this is the next victim :
Warning, the pictures below may contain explicit scenes of violence



The cables are broken in some other part, which result in the loss of sound. And, I dun think warranty will cover "work of animals" =(

One thing I must mention here is how impress I am with Oakley specs. Among all the stuff he destroy, one item survive. Yes, thats my Oakley specs. One morning I woke up I find my specs in his mouth (literally). The lens are all cracked and into pieces, but the frame suffer no scratch at all! Heres the proof:

Consider my dog can do so much damage, you can imagine how strong oakley specs frame are. But then again, don't try this at home. =X

I have been using Flash remoting with .NET for quite some time already, nearly a year if I am not wrong, from the time whereby we have to include NetConnection.as inside our scripts to now whereby we simply import from the mx package within the AS2.0 classes. Experience with it is rather smooth sailing, as the installation is sort of "fool-proof" (with installer) and for the starter , all the codes snippets provided in the included examples simply works when being cut and pasted into another context. Due to work requirement, I have to interop Flash with PHP at times. In the past, the model is simple, need a simple string from PHP ? Use loadvars object. Need to get structured data from PHP? Use XML. But I think its good to pick up new things @ times so today, I decided to test out amfphp to try out Flash remoting with PHP

AMFPHP is an open sourced Flash remoting for PHP. The current Flash remoting component Macromedia provides allow us to work with .NET, coldfusion, and J2EE. Within these 3, I had worked with .NET extensively, and a bit on with coldfusion. Installing AMFPHP while following the steps on the site resulted in..erhm..error.. I think there is no problem with the instructions but its just that I am still not very familiar at how the framework works. So after googling for a while, I finally got the answer. So I thought it will be good if I list down the steps here. I think there is quite a few articles too on actionscript.org which touch on the same thing too, but I am going to be more IIS specific. In the steps below, I am going to assume you have installed PHP on IIS (which I do) Alright, here's how:

1) Download the zipped file from amfphp

2) Unzip the folder

3) Once you open the folder, you will see folder named 'source', inside containing 'docs', 'examples', and 'flash services'

4) If you have used Macromedia Flash remoting before, installing it will add an 'flashremoting' directory to your wwwroot folder. Ok, the 'flash services' will actually serves the same functionality in this case. So, you will need to copy it into the wwwroot folder. So in most case, simply copy it into c:\inetpub\wwwroot\

5) Ok, its installed! Let's test if it is working

6) Now similar to Macromedia Flash remoting, you will need a gateway. In Flash remoting for .NET, it is simply a page like default.aspx residing in the virtual directory.  A gateway will reside in the web root folder in this case too.

7) We will use the example given. Now, navigate to the 'examples' folder, and within it there is this 'basic' folder. Copy the basic folder and place it inside the wwwroot folder again. So right now, you will have 2 folder inside wwwroot. The 'basic' folder, and the 'flashservices' folder.

8) Inside the 'basic' folder which you have pasted inside the wwwroot folder, you will see a file named 'gateway.php'. This is the gateway file. Open it using any text editor, and you should be able to see these lines:

    include "flashservices/app/Gateway.php";
   
    $gateway = new Gateway();
    $gateway->setBaseClassPath("services/");
    $gateway->service();

9) We need to nagivate to our 'flashservice' folder, so right now the gateway.php is inside the 'basic' folder, and the 'flashservice' folder is one level above it. So we simply, change it to

    include "../flashservices/app/Gateway.php"; 
   
10) Next is the line $gateway->setBaseClassPath("services/")
One thing that confuse me at first is , is this path refering to the 'services' folder within 'flashservices' folder? Or is it refering to the 'services' folder within the 'basic' folder? Well, the path here is relative to the folder your 'gateway.php' is residing. So 'gateway.php' is inside 'basic' folder, and therefore this is the 'services' folder within the 'basic' folder itself.

11) Next, open the credential.fla file located inside the 'basic' folder. You realize that it has this line
NetServices.setDefaultGatewayUrl("http://localhost/gateway.php");

In this case, we did not move gateway.php inside wwwroot folder, so we change it to

NetServices.setDefaultGatewayUrl("http://localhost/basic/gateway.php");

12) Now is all set up, simply run the file and you will see "Welcome administrator".

13) If you see something like "_Session not set", then you will need to do this.
Open php.ini file (should be located at C:\WINDOWS\php.ini)
Look for 'Error handling and logging'

If your setting is 'error_reporting  = E_ALL; display all errors, warnings and notices',
then change it to

'error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR'

Thanks to Flash Remoting: the Definitive guide for this solution

14) run the fla again, you should see 'hello administrator'

Well, once that done, everything should be working fine. =)

If you need to use AS2.0 class for AMFPHP, check out this article at community mx
http://www.communitymx.com/abstract.cfm?cid=B74BC
with no comments
Filed under:
Take a look at this new website http://www.codezone.com, registered and once logged in, you will be presented with blogs, news and events , forum posts according to the preferences you set in your profile. I believe some asyncronous page loading is in place (perhaps AJAX, I am not sure) as part of the pages will change in interval. Nice place to get all the news you want on .NET development in one neat webpage
=)
with no comments
Filed under: ,
This month newsfeeds is full of the headline : 10 anniversary. I am actually quite surprised that its Java technology 10th anniversary, its PHP 10th anniversary, and its Coldfusion 10th anniversary. That means I was only 12 when their 1.0 are being released, hmm....I was still playing sega then if I am not wrong

Together with this anniversary and stuff, there is a few website which have revamp their interface, basically
http://www.sun.com/ , http://beta.asp.net , http://www.dotnetnuke.com/, http://macromedia.com/
IMO, there is a stunning factor in all this new UI, there are all very very pleasant to the eye, have a very clean look, and it particular, take a close look at their containers. No more ugly boxes, but all boxes with a nice, rounded edge. Is this the 'in' design currently?? Or are designers copying each other work??

When .NET gets its 10th anniversary, I will be..hmm..still quite young, lol

with no comments
Filed under: ,
Thanks to Chandler Williams who pointed out to me 2 mistakes I have written in my previous post on singleton design. The following solution will be a much better approach to create a singleton design in actionscript classes.

class Singleton
{
     private static var instance = null;

// ===========================================================
// - CONSTRUCTOR
// ===========================================================
     private function Singleton() {}

// ===========================================================
// - GET SINGLETON INSTANCE
// ===========================================================
     public static function getInstance() {
         if (instance == null) {
             Singleton.instance = new Singleton();
         }
         return Singleton.instance;
     }

}

Also, another important thing he pointed out is that there is not block scoping in flash, example

for(var i= 0; i < 9 ; i++)
{
   
}
//i still exist after that

the var keyword for local scoping will works for function block


with no comments
Filed under:
Flex, in my opinion, is basically "doing Flash the HTML way". If you have not seen or read about what is Flex, a few sample applications is here

Basically there is usual way we can work on Flex applications is to layout the tags and inline the codes with it using <mx:script> tag

However, I always believe inline code is not a very good practise and thus, I decide to layout the tags, and delegate all the events to a actionscript class, very much like 'code-behind' in aspx pages.

Doing that is pretty simple

1) Create an actionscript class, e.g FrontController.as and place it in the same folder (or any other folder, as long as its in the class path) as the mxml file

2) Put something for the default constructor

var FlexUI:Object
function FrontController(FlexUI:Object)
{
    this.FlexUI = FlexUI;
}

3) Then we need 1 line of inline code, in this case
  
   var Controller:FrontController
   function createClass()
   {
         
            Controller = new FrontController(this);
   }
  
4) Then in the mxml Application tag, delegate the creationComplete event to createClass()

5) From now on, any event , delegate to Controller.'the event name you want'

6) In the Controller class, create a function with the same name, now can keep the mxml clean of codes


More Posts Next page »