This kind of windows command is good to trace network connectivity. We can retrieve result specifically on certain search conditions. The best part is, we can keep the tracing alive:

netstat -an 5 | findstr 1433

A few tricks are in place here:

1. Netstat with interval. This will keep the trace alive.

2. piped command, which in this case the second command “findstr” is used to search result of the previous command.

 

Of course you can also do something like this, to have 2 search “AND” criteria:

netstat -an 5 | findstr 135 | findstr /L /I listen

or even use a different windows command for the first part. It’s easy and flexible especially if you can’t bring in any applications into production servers.

But, I didn’t know it also didn’t come hand-in-hand with learning (Note: the blocked website is the national library website). No wonder the security here is at its best!

policy

http://www.mysterygoogle.com/

 

It looks plain silly (and fun) in the first glance – you get the result of previous search. Perhaps it’s in the spirit of the coming Halloween. But, I suppose there are 2 ways to exploit this unique feature:

1. Free Marketing! Google your name, your product name, your corporate name a million times, and a million other people will get to see it. That’s provided your names are on top of the search result! Get the idea?

A million search, you said? How to achieve that?” Well, I suppose if you know how to programmatically host a web browser component, or make a HTTP POST request, it might work. Need to research the details, though. And fyi, it is evil.

2. Cataloguing the keywords used for searches. Some search keywords proved to be online real-estate, where advertisers pay a handsome amount for it so that their products appear first in search engine results. And which keywords that users sought most? Of course there are many options for this, but isn’t it better if you have 1 more source of reliable data?

 

Why it can work?

A quick Googling on “Mystery Google” (exact match) showed that it has “about 410,000” results. So, at least 410,000 people has known this site. Times with the number of readers to the site, times with the number of search on the site. Easily get to millions, i guess.

 

A proper research need to be done here.

Yes, I get that questions quite often. So, it’s great when I found out about BizTalk Server 2009 posters. “A picture is worth a thousand words”, so they say…

http://msdn.microsoft.com/en-us/library/dd450982(BTS.10).aspx

 

And my personal favourite is the Runtime Architecture Poster.

Continuing from previous post…

So, my installation of Windows Server 2008 on 2nd partition, on top of existing Windows XP was fine. No hiccup whatsoever. I proceeded with running the Windows update, and then the adding server role. So far so good. Then it requires restart. No problem, until the Windows Server 2008 was loaded successfully. Hey, where’s my dual-boot screen?

Following the KB, if I install the older Windows first, then the newer Windows, the dual boot screen should be available. This is confirmed by this KB article. So, quick check on the boot sector shows that indeed, my Windows XP entry was gone. My “displayorder” was referencing to only the Windows Server 2008 path.

image

So, following the KB, I tried to re-create the entry:

bcdedit /create {ntldr} /d “Windows XP OEM”

image

“The specified entry already exists”??? Hmm… Let’s dig it out:

bcdedit /enum {ntldr}

image

Hey, It’s there! But, wait, it’s pointing to “C:\”. Ohh, when I installed the Windows Server 2008, the new partition was assigned letter C, and the other partition (that contains the Windows XP files) was assigned letter D.

image

Easy then. So I’ll just need to change the path, and set it back to “displayorder”.

bcdedit /set {ntldr} device partition=d:

bcdedit /displayorder {ntldr} /addlast

image

Restart, and voila!

image

(What? You’ve never seen a CRT monitor before?)

Due to low hardware specs that I have (mostly with 1-2GB RAM specs, with a 3GHz processor) I was usually quite reluctant to run many virtual machines. (I was looking for a way to setup something like a grid of PC/laptops though, like Google’s grid of “cheap”-PCs which hosted their Google File System. Not sure if it’s even economically feasible for consumer like me. :D) But now, I need to setup a BizTalk Server 2009 development environment, so, die die also must do now.

Anyway, I was reading about Windows 7 dual-boot from VHD from Keith Combs’ blog, and was getting all excited of the thought of being able to setup Windows Server 2008 on my existing XP machine. Then, I realised that it’s only possible on Windows 7 and Windows Server 2008 R2! I discovered it the hard way, when I tried (and failed with unrecognised command) to create a new virtual disk using diskpart. :( I suspect that it’s because Windows XP diskpart is still on version 5.1.3565, and Windows Server 2008 is on version 6.0.6002. And, Windows Server 2008 R2 is currently only available in 64-bit edition. Arghh!!!! My machine is only 32bit, and I need Windows Server 2008! (I still need to verify this though, as I read some articles mentioned about creating vdisk using diskpart available in Vista and Windows Server 2008. Pointers or comments are welcomed.)

So, next plan was to do the old school way. Partition my harddisk, and install Windows Server 2008 on the new partition, on dual-boot configuration with the current Windows XP. (Sorry lah, company asset, still on Windows XP.) So, first step, obviously is having installation disk. But instead of burning a DVD, I used my 2GB SanDisk USB drive, with reference to Dennis Chung’s blog. Well, enough with surprises, WinXP diskpart does not recognise USB drive, so I have to create my installation USB drive using my Windows Vista.

All set, time to install. To be continued…

27th April 2009: BizTalk Server 2009 is officially released for general availability.

For some resources to get started, refer to Richard Seroter's blog here, and Thiago's blog here.

The very first web service that we usually create in any programming language, turned out to be not-so-simple in BizTalk. Here's classic example:

public class Service1 : System.Web.Services.WebService
{

    [WebMethod]
    public string HelloWorld()
    {
        return "Hello World";
    }
}

 

And the problem is two-fold in BizTalk Server (which strictly adhering to message schemas):

1. If BizTalk Server is supposed to consume such web service, it is fairly known issue that we'll need to generate an "empty" web message as input parameter to be passed to the method being called. Many sites have cited the resolution, so I'm not going to describe this case anymore.

Error message when you try to build a project in BizTalk Server 2006

2. The more problematic case (for me) is when we're supposed to expose such service using BizTalk Server. Orchestration requires a trigger message to kick-off the orchestration. But, if i don't have input parameter, how do I tell the web service published orchestration to start? The orchestration does expecting a multipart message with no message part (it's a web message). Following standard procedure of publishing web service based on orchestration with request/response port, the signature of the web methods are created just fine.

BTS_WS_HelloWorld

And my code in client application look like this:

textBox3.Text = test.HelloWorld();

where "test" is the web reference to the web service above. Notice that there is no input parameter here. But alas, I got this error:

"Internal SOAP Processing Failure"

Great! No event log entry. No message tracked in BizTalk  Admin Console. IIS log shows error 500. Scratching my head...

After some readings, found out that it could be due to the similar issue of no#1 above. Which means... I'll need an input parameter!!! :o

http://geekswithblogs.net/cyoung/articles/4634.aspx

http://blogs.msdn.com/richardbpi/archive/2006/10/23/advanced-biztalk-2006-web-services-part-ii.aspx

http://www.jonfancey.com/default.aspx (somehow i can't find back the article that i've just read)

So, workaround is, instead of having a multipart message with no message part as incoming message, i created a normal multipart message with 1 bodypart. Any XML schema based body part. Sure enough, the webservice that was generated by the web service publishing wizard required an input parameter for the method. So, I have to open up the web service solution, removed the input parameter and add defaulting invokeParam code a bit. Rebuild, and it works. It's as simple as that. Here's the part that i've changed (on the asmx code behind. Code has been simplified.):

public string HelloWorld()
{

...

// Parameter information
USoup.WS101.XsdTypesBody.EmptyInputParam EmptyBody = new USoup.WS101.XsdTypesBody.EmptyInputParam();
EmptyBody.SomeValue = System.DateTime.Now.ToLongTimeString();

...

}

Note: "USoup.WS101.XsdTypesBody.EmptyInputParam" is the multipart message that has bodypart. "SomeValue" is just a node in the message.

http://www.zdnetasia.com/news/internet/0,39044908,62049600,00.htm?scid=nl_z_ntnd

Great! Next time we should pay George Lucas or Steven Spielberg royalty fees when we build the next inter-galactica space shuttle. Maybe I should have changed my job. Is multi-touch technology patented yet? Or how about the glass display panel?

Those who have seen the Microsoft Surface, or the Minority Report, will understand this technology: Microsoft Touchwall, dubbed as "Intelligent Whiteboard". What's that, you asked? Basically, having Surface multi-touch and movement recognition capability on any flat surface (or so it seems from the video). Bill Gates was showing the Touchwall during the CEO Summit 2008, using whiteboard. Yeah, plain 'ol whiteboard. Imagine touching, poking, dragging your fingers on the whiteboard, while the images on the whiteboard is being moved/scaled/resized/played accordingly.

However, there was one big question here: if the "Intelligent Whiteboard" is supposed to be shown to audiences such as those powerpoint slides on projector, will it work when the presenter (in this case, Bill Gates) keep on blocking audience view??? *scratch head*

Note to self:

If UI doesn't work, there's always command prompt.

http://support.microsoft.com/kb/222444

I was surprised and worried.

Surprised, because my younger sister had just asked me about checking on her database normalisation homework. Apparently her school has taught them database normalisation (which means, her school taught them about relational database concept too, which means her school also taught them about computing, and perhaps a little bit of software development). And she's still 1.5 years away from graduating from her high school!

Worried, because usually her school have about hundreds (and perhaps close to a thousand) students from her batch alone! (It is quite a big school, actually.) Who knows what else they could learn there. SOA? Corporate governance? Web 2.0? And these could be the batch that probably could do my current job by the time they graduate from university (or earlier)!!!! :o (At this time, you should imagine a scene from the Star Wars: Attack of the Clones, where the clones are ready for deployment! Or the robots from i, Robot!)

(Image referenced from: http://news.bbc.co.uk/media/images/39912000/jpg/_39912096_i_robot_pa.jpg)

Okay, I'm not going to debate on which 1 is better between VMWare and Virtual PC. But, if you used Virtual PC, one of the limitation is that the virtual machine can't recognise the USB port that we have on the host machine. Well, if you insist to be religiously devoted to Virtual PC, you can use USB Redirector, a small application that allows one machine to "connect" to a remote USB port. Yeah, remote. Through a TCP/IP port. And not only limited to virtualization environment. Think of it as if you're connecting to a network printer.

The catch? Well, it's not a freeware... Now where's my VMWare installer again.

Have been trying out the BizTalk 2006 R2 RFID for the past 2 days, I find that it "could" be a very powerful engine. Well, there's still a lot of room for me to explore, and i'm still trying to make the sense of its existence yet (perhaps because it is something quite new, just like when BizTalk server was introduced back in year 2000). But that shouldn't stop your interest, if you would like to know more about it. So here it goes: What's in the package?

To get started, perhaps we'll need a little bit of clarification. Similar to BizTalk Services that i mentioned before, BizTalk 2006 R2 RFID is a stand-alone application, although it's packaged within BTS 2006 R2. That means, you do not need a BizTalk Server to start with! (And all the while I was trying to get a copy of BTS 2006 R2 just to test on its RFID Embarrassed) But, BizTalk 2006 R2 RFID can leverage on some features of BizTalk Server 2006, namely the powerful yet cryptic Business Rule Engine and Business Activity Monitoring.

So, without holding you back, view the end to end demo scenario, go download the trials (that means the BTS 2006 R2), look for the samples, case studies, try it out! If possible, get the RFID readers and some tags. There are a few low cost providers (will try to find Singapore based). But, should you not be able to get a reader, that shouldn't stop you, as using the RFID Manager, you can simulate a RFID reader. Cool huh!

I'll post a few more of it later on. I'll need to re-composing my thoughts first. :)

Have you ever be given a task to use SQL Server T-SQL to find out the date value of next day, at 00 hour? Say, now is '2007-10-26 13:30:50', and you need to get a '2007-10-27 00:00:00'?

Naturally, I think most of us will do something like this:

declare @today datetime

declare @tomorrow datetime

set @today = convert(datetime, convert(nvarchar(4), datepart(yyyy, getdate())) + convert(nvarchar(2), datepart(mm, getdate())) + convert(nvarchar(2), datepart(dd, getdate())))

set @tomorrow = dateadd(dd, 1, @today)

A lot of datepart and convert involved just to get the day/month/year value. There is a much simpler way actually, considering that datetime internal value is in fact numeric.

declare @today datetime

declare @tomorrow datetime

set @today = convert(bigint, dateadd(hh, -12, getdate()))

set @tomorrow = dateadd(dd, 1, @today)

Note the part that convert datetime to bigint. That's where the rounding took place. Let's step back a little bit and see how that works.

select getdate() as datetimeType, convert(bigint, getdate()) as bigintType, convert(decimal(18,12), getdate()) as decimalType

 

datetimeType            bigintType decimalType

------------            ---------- -----------

2007-10-26 13:50:27.560 39380      39379.576707870372

 

(1 row(s) affected)

From the SQL query above, we can see that a datetime can be converted to decimal type. The numbers on the left hand side of the "." denotes the number of days since "1900-01-01 00:00:00". The ones on the right hand side denotes the fraction of milliseconds in a day. That means, "1.0" means 1 day, means 24 hour, means 1440 minutes, means 86400 seconds, means 86400000 milliseconds. That means, this query below:

select convert(datetime, (convert(decimal(18,12), @tomorrow) + (2.0000000000000/24))) as tom_2am

is equivalent to "2007-10-27 02:00:00.000". Cool huh? But of course, the query below:

select dateadd(hh, 2, @tomorrow) as tom_2am

is a lot easier to understand. :D

Oh? Why "dateadd(hh, -12, getdate())", you ask? That's because of the rounding during conversion to bigint. So, let's see a few time during the day:

select convert(decimal(18,12),@dt)

decimal(18,12) bigint
2007-10-26 00:00:00 39379.000000000000 39379
2007-10-26 03:00:00 39379.125000000000 39379
2007-10-26 12:00:00 39379.500000000000 39380
2007-10-26 15:00:00 39379.625000000000 39380
2007-10-27 00:00:00 39380.000000000000 39380

Any time before 12 noon on the day (< 0.5 in numeric) will be rounded down. Any other time will be rounded up. So, if we want to get today at mid night time value, we will need a source range from yesterday noon to today before noon, that can be rounded to today midnight. Hence, the "-12 hours" above.

 

PS: I have always wanted to write about this, but since I don't think it'll make any much difference to programming, I've always canceled writing this. Until I asked myself, "how worse can writing this be?", and I don't have the answer. :D If you have a better ways of doing this, please let us know.

More Posts Next page »