Vincent's profileInfinity aka VincentPhotosBlogLists Tools Help

Blog


    December 29

    new blog !

    I have finally manage to get my new blog running here http://www.vincentpang.ws
    December 05

    The music revolution

    1996
    source of music: Radio & CDs
    Internet connection speed: 28.8Kbps
    Download time: ~30 mins / song
    Tools required: Media Player, Winamp
    Quality: CD/Radio, unreliable
     
    2001
    source of music: Pirated CDs, websites, Kazaa, mIRC, some P2P
    Internet connection speed: 56.6Kbps
    Download time: ~15 mins / song
    Tools required: Media Player, Winamp
    Quality: CD/Radio, more reliable
     
    2005
    source of music: Pirated CDs, Bittorrent
    Internet connection speed: 512Kbps (ADSL Broadband)
    Download time: < 5 mins / song
    Tools required: Media Player, Winamp, foobar
    Quality: High Quality CD, Loseless
     
    2007
    source of music: imeem.com
    Internet connection speed: 1Mbps (ADSL Broadband)
    Download time: 0 sec. online music streaming
    Tools required: Flash + Browser (which is common on all desktop)
    Quality: CD
     
    Summary:
    As you can see from the milestone, as broadband has reached out to more users and become more affordable, megabytes can be transferred in second. It's as easy as tuning in to the radio just like the good old days, but with the choice of music you like to listen to. Almost CD like quality and you become the 'station manager' and decide wat you want to listen.
    October 23

    What's wrong with my CSS

    Converted one of the asp.net 1.1 project to asp.net 2.0. Everything work fine. That's good, until i add a new page. The CSS doesn't seems to be working. (see picture before_replace.jpg). Found the problem was the header text
     
    Original
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    Changed to
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
     
    You can see in the picture (after_replace.jpg) that it is working fine after i replace it.
     
    Anything not working, i'll be looking for the difference in the header now. First it was AJAX, not it's CSS.
    October 09

    Shrink MS SQL 2000 DB Log

    I was trying to reduce the size of the log in the db for MS SQL 2000 recently. Tried shrinking via sql manager but to no avail. Google around and finally found it.
     
    use <db_name> backup log <db_name> with truncate_only
    dbcc shrinkfile (<db_name>_log, truncateonly)
     
    transaction Log is down to 1MB after executing the above in SQL Query Analyzer
    September 27

    Problem Upgrading Existing Pages to AJAX Enabled Using Atlas

    Upgraded one of my asp.net 1.1 to asp.net 2.0 recently. Following the instruction here on how to install Atlas to existing web pages found here http://atlas.asp.net/docs/overview/install.aspx
     
    Add a new page. It works perfectly. However, i'm having problem with the existing web pages. It gives me a popup with the msg 'Unknown error'. Spend 3 hours debugging and finally i found the difference. There seems to be a problem with the <meta> in the <head> tag
     
    Original (the one giving me problem)
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head runat="server">
        <title>WebForm3</title>
        <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
        <meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
        <meta name="vs_defaultClientScript" content="JavaScript">
        <meta name="vs_targetSchema" content="
    http://schemas.microsoft.com/intellisense/ie5">
    </head>
     
    Changed to:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head runat="server">
        <title>WebForm3</title>
    </head>
     
    Problem solved !
    September 22

    ASP.Net 2.0 + Atlas = AJAX

    Just install Atlas, to enable asp.net 2.0 to have AJAX.
     
    Was playing around with ModalPopupExtender, a component in AJAX that come with the Atlas control kit. Looks cool, and suddenly, stuck on how do i invoke the 'Ok' button. The sample was rather simple, a label, a popup and a button to return text into the label as below
     
            <asp:LinkButton ID="LinkButton1" runat="server">LinkButton</asp:LinkButton>
            <atlas:UpdatePanel ID="updatePanel2" runat="server" Mode="Always">
                <ContentTemplate>
                    <asp:Label ID="lTest" runat="server" Text="NoneSet"></asp:Label>
                </ContentTemplate>
            </atlas:UpdatePanel>
       
        <atlas:ModalPopupExtender ID="MPE" runat="server">
        <atlas:ModalPopupProperties
            TargetControlID="LinkButton1"
            PopupControlID="Panel1"
            BackgroundCssClass="modalBackground"
            DropShadow="true"
            OkControlID="OkButton"
            OnOkScript="javascript:__doPostBack('OkButton','')"
            CancelControlID="CancelButton" />
        </atlas:ModalPopupExtender>
        <div style="display:none">
            <asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Height="100px">
                    <p>Are you sure you want to proceed?
                    <asp:Button ID="OkButton" runat="server" Text="Yes"></asp:Button>
                    <asp:Button ID="CancelButton" runat="server" Text="No"></asp:Button>
                    </p>
            </asp:Panel>
            </div>

        Protected Sub OkButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles OkButton.Click
            lTest.Text = "ok, your wish is my command, i'll proceed now"
        End Sub
     
    The trick seems to be to use a javascript to call the OkButton as below
    javascript:__doPostBack('OkButton','')"
     
    Atlas can be downloaded here, http://atlas.asp.net
    Atlas ToolKit can be downloaded here, http://atlas.asp.net/atlastoolkit
     
    September 08

    VWD + SQL Express 2005

    was having a problem trying to attach/add a db file of SQL Express 2005 to the Visual Web Developer 2005 Express App_Data. The error is as below:
     
    Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly.  Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId=49251
     
    It seems like VWD 2005 failed to find a valid SQL Express 2005 installed. This doesn't happen to my PC at home. The difference is my PC at home has SQLExpress installed as default instance where my office PC has it as MSSQLServer.
     
    Solution:
     
    in VWD
    Tools -> Options -> Database Tools -> Data Connections (make sure show all settings at the bottom left is checked)
     
    SQL Server Instance Name (blank or default): <change it to the instance of your SQL Express> or blank in my case because i do not seems to have an instance name
     
    Picture attached as example
     
    and it fixed my problem
    August 17

    Hard Disk Drive

    I was trying to fix an Acer Aspire P4 1.7Ghz. First time i boot up, the HDD partition was gone. Suspect virus, MBR corrupted. So try formatting the HDD, and the formatting took 3 hours to reach 40%. Second suspect hdd dead. Took out the HDD, try to boot up to make sure everything is still in place. DING ! damn it doesn't power up ! hit the power button a couple of times, jump the power switch, change the power supply to no avail!  took me about 30 minutes. So i put back the HDD, hit the power button. DING ! fans running it's powering up ! 
     
    Swap in the 160GB just to make sure the mobo can detect a 160GB drives. 160GB and a 80GB is difference by less than US20.
     
    WTF ! in my 15 years of assemblying and fixing computer, i have never come across a computer that doesn't boot when there's no HDD ! this is because normally for a new piece of computer, i'll snap in the proc to the mobo, and power supply and power up. Then only come the RAM and VGA. Then only for into the chassis, hdd, CDROM and tiding cable. I can still remember back the old days when my PC runs on those 5.25" floppy with no HDD.
     
     
    August 03

    Space Upgraded to spaces.live.com

    Yeh this is the new Live! space. Doesn't quite like it. It's buggy (it's beta duh). Try to change a couple of layout, doesn't work as expected. Althought all my older posts arestill here, there stil A LOT of room for improvement.
    July 06

    MYOB Hacked !

    It's 2am in the morning. I just came back from my friend's company. Wondering what caught me up so late? Eventually the Income tax people are coming to my friend's office tomorrow to check on their accounts.
     
    However, they are having problem retrieving some of their old information from the 3.5" disk. At first, i thought those disks were not been used for too long and could have develop some fungus that block data reading. Contrary,it is not. It was the password problem.
     
    They called up the MYOB guy. The guy came earlier but they have no idea how to access it. Asked the accounts people, they said they use only 1 password, the same one as the current one. The way they are telling you is like you can't do it. Forget it, there's something wrong with the system. Cause since the expert from MYOB failed to do it.
     
    Tried a couple, no avail, so it's google time. Manage to download a couple of sharewares which can retrieve part of the password, and in order to get the full password, you'll need to buy it. One of it was good enough that it only have 4 digits and 2 front digits were exposed. I easily figure that out.
     
    The other one is a bit messy. It said no password, but yet it's asking for password. Something is missing. Try a couple, no avail. With a couple of try and error, BINGO ! Oh, at that point, i just feel so cool :)
     
    Then the rest of the time was helping them to print the doc out. They starting printing at 9am in the morning. Up to 10pm, the pathetic dot matrix printer printed 400+ pages. I saw an old Lexmark Laser Printer, checked and it's working. In addition, it's hook out to the network (luckily they have networking). Send those files i just opened to printers and it printed 600+ pages / hour. That's almost 10 ppm. Printed all account statements from 2000 to 2003 in less than 3 hours :)
    June 29

    MEDC 2006 @ KL, Malaysia

    Reached Sunway Convention Center at 9.00 am. As usual, registration take some time (it cost RM80/US 22) to attend this event). Thanks to iTran, the registration was waived. No exceptional this time around, you'll get a bag and some papers inside. Breakfast, lunch and tea are provided.
     
    Welcome keynote by Tony Mestres (Senior Director, MED WW Segment and Field Marketing), explaining how some of the ppl in the industry is utilizing the versatile mobile device running on Windows CE 5.0. Some of the speakers on that day were Dr Mazlan Abbas (Celcom vice-president), Tan Loke Uei (Technical Product Manager, Mobile and Embedded Devices Group), Mike Hall and Matt Kellner.
     
    Perhaps, the finale of the event was the Sumobot competition at 7pm. Before the competition starts, there were lucky draw giving out 4 new IPaq rw6828 (retailed: RM2499/US 700). In the sumobot competition, there are only 8 team ( 2 person per team) unfortunately. They have been in the hands-on labs for the whole day coding their tiny robot. 
     
    The game is simple, there a round board with white line around it. The white lines are around 1.5" thick. The sumobot has 2 sensors at pointing down to sense for this line, however there are still bots that the sensor failed went out of the ring. This seems to be a common problem in sumobot where sensor just failed. 2 robots are placed 'strategicly' by their owner, referee gave the signal to start the bot and the robots that is out of the ring lose. There are 2 common strategic, search and destroy or seek and flee.
     
    There lots of funny thing and plenty of luck/bad luck you can see there. There were bots that run out of the ring themselves when they were clearly winning, robot pushed to and feel to their sides that win because the opponent went out to the ring and some real fight where robots pushing hard among themselves. The winning team of the sumobot competition get home with 2xIPaq rw6828 (one for each of the team members)
     
    Along the event there were also SMS contest. Besides that, you can also vote for your bots and if you win, one IPaq rw6828. Roughly, they gave out around 7 IPaqs. Damn, didn't manage to even get one.
     
    For more details on MEDC 2006 @ KL, Malaysia please visit http://www.microsoft.com/malaysia/events/medc/
     
    Edit: some photos of the event can be found here http://www.flickr.com/photos/medc2006team/
    June 08

    Encarta in your MSN

    I forgot where I got this, i'll give credit to him if i recall. She appears in ur MSN, just like any other contacts. But she's not a human, she's a bot (robot)
     
    You can ask her questions and she'll reply u. She'll reply in a chat with a small info if she is really sure about the result and then send u an invitation to start Encarta (just like starting a chart or a game request).Starting the encarta session, you'll get a windows on your right which pull information from a website.
     
    Besides that, i found that she has some sort of intelligent spell check too. I type in 'Steven Spielberg' and 'Steven Speilberg', and it brings me to the same page. She recognise that spielberg and speilberg.
     
    well, well, before i sign off, her msn is encarta@conversagent.com
     
    edit: they have changed to encarta@botmetro.net
    June 05

    Microsoft Excel Cannot Open Same Filename (different folders) ?

    Ok here is the situation. 2 xls files with the same filename in different folders
     
    C:\live\book1.xls
    C:\prod\book1.xls
     
    I was shocked when i was doing a demo of copy paste and POP ! a msg appeared
     
    A document with the name 'book1.xls' is already open. You cannot open two documents with the same name, even if the documents are in different folders.
    To open the second document, either close the document that's currently open, or rename one of the documents.
     
    I have posted this question up to a couple of forums. Some of them guess that it creates a temp file and thus cannot use the same filename as it will crash and some replied that it could be some cell linking feature that doesn't allow this. But i think this is kinda stupid. This doesn't happen in Microsoft Word. WHY ?
     
    How if i cannot rename any of the files ? I will need to create a temporary xls to do all the copy paste ? This is plain stupid.
    March 17

    Free 2GB in my Hotmail !

    I got free 2GB in my hotmail today ! Photo attached. If u want to know how, drop me a comment and i'll tell u how
    February 10

    CSS, the good and the bad

    CSS has been used widely and alot of ways. Now we'll explore the good part of it to the extend of how far CSS can be fully utilised, and later, the bad sides of it.
     
    The good
    I was first impressed by http://www.csszengarden.com/ .By clicking on the 'themes' on the right hand sides, it loads another CSS files and the whole website 'themes' changes. Looking at the source code impressed me even more because the raw content are made up of <div>.  The first thing that pop into my mind was that content editor and designer can work parallel now since the CSS is in another file (.css) while the content on the .htm file.
     
    The bad
    Because the design was separated from the actual content, other ppl can actually 'steal' those content and easily format it to the template to be used on their website. Some people do not see this as a problem, but not to the company i'm working at, in which content is our asset.
    January 16

    select top 100 percent * from table

    For some reason my nested sort failed to run (select * from (select * from Employees order by employeeid asc) as test). And upon some google i found the solution (select * from (select top 100 percent * from Employees order by employeeid asc) as test)
     
    select top 100 percent * will eventually return u all records. if u select top 50 percent *, it will return u half. Problem solved.
    December 14

    auto add task to Task List in vs.net 2003

    just in case you do not have the Task List shown, you can bring it up by 2 ways
    1) Ctrl+ Alt+ k
    2) View->Other Windows->Task List
     
    It's a handy tools where you can keep track of the project. It keeps the priority, description, file and also line. There are couple of ways u can
     
    1) in the Code behind type in 'TODO <desciption> and it will automatically adds into ur task list. Double click on the task and it will automatically bring u to where you have key in the 'TODO earlier. 'TODO is a key word and you can even add more to it at Tools -> Options -> Environment -> Task List. Type in a name and click 'Add'. Ok here's the problem, for some reason, 'TODO will not work for first time. You need to do step (2) below then only this auto add to task list will work. A bug maybe ?
     
    2) Click on 'Click here to add a new task' and add the desciption. However, if you do that, you will not be able to keep track of the file and line.
    November 16

    VS.net 05, SQL 05, BizTalk 06 Launch in Malaysia

    The launch was held at KL Convention Centre. For some reason, they serve breakfast and lunch this time around which they normally don't (as far as i'm concerned on all those free admission events Microsoft has held over the years). Food was decent (better than nothing), good event organiser, and the venue is nice (maybe because it's still new).
     
    The guest of honour was none other than the CEO of Microsoft, Steve Ballmer. He came at around 9.40 am and delivered a 30 minutes speech. Then a demo around 40 - 50 minutes by another guy while Steve was at his side.
     
    Steve ended earlier than expected around 10.40am, and so I got like 3 hour break before the next session. While wondering around, found this booth, MSDNConnection booth. Yeh, i was a member thought they r going give some freebies and ding ! they did give freebies... but only to newly registered ! i was like WTF.
     
    I found the launch to be successful because after looking at the new features it's offering... it make me wanting to install it . And after the presentation... the words 'Whidbey Rocks' keep on apprearing on my mind. Well, cause they used this on every single presentation!!!  how boring but then i got brain washed.
    October 26

    SQL Server Practitioners Alliance Network (SPAN)

    Went to SPAN first event after work (25 Oct 05) at Microsoft, KLCC. Despite the long rain, a crowd of around 25 turned up. Light dinner was served. At the door, I met Ramesh, whom handed me a copy of SQL Server 2005 Developer Edition September preview and an invitation to the morning session of VS2005, SQL 2005 and BizTalk 2006 Launch day on 15 November. Was told that the invitation was an exclusive to meet someone special from Microsoft. Let wait and see who he is
     
    The session started by Ramesh and then he invited 2 SQL MVP namely Alex and CK. They gave a brief walkthrough of the SPAN community and it's objective. Then Ramesh, gave a walkthrough of the website. After that everyone attended the session introduce themselves. I saw someone talking pictures yesterday, let see if they updated the website so i can link it here.
     
    SPAN has manage to be an Offical Chapter in PASS (http://www.sqlpass.org/). It's a community to answer all your question, clearing your doubt and help you to troubleshoot anything related to SQL Server . I do strongly think that we need a community for SQL Server not only for DB Admin but also for developer. Having a DB in a system is a norm nowadays in which i would say 99% of the system will have at least a DB.
     
    Visit span today http://www.span.com.my
    October 14

    dim strString(1) as String ?

    dim strString(1) as String
     
    this statement will basically declare an array of string size 2 which can be accessed by strString(0) and strString(1). But wat i would like to comment is why not dim strString(2) as String instead ? whether the array starts with 0 or 1 is not relevant to the declaration. It should be strString(2) which means it has 2 strings instead. That would be alot easier to understand.
     
    well potential problem i might spot if u use dim strString(2) as String is ppl tend to use for i=0 to n instead of for i=0 to n-1. But then again, the way we program shouldn't affect the way declaration SHOULD be done. Anyone got any comment ?