Posts

Visual C++ NOOB - Working with MFC DLL linking option in the project setting

Alright, must confess that I am indeed a NOOB when it comes to Visual C++ despite the fact that I learned C++ first and started to work with this language initially in my current work place (of 10 years++). Had a chance again to work with C++ after so many years away from it, which I'm looking forward to because C++ is really the language that I'd really want to master.  So the current project is giving me quite a lot of headache considering it is an upgrade from the old Visual Studio 6.0 to the not-so-latest Visual Studio 2010, I would expect a lot of hurdles to overcome.  Thankfully my genius colleague who has previously worked on the upgrading provided me with his sample to look at, plus referring back to the old project in VS6, I finally able to get it up and running (without crashing, phew). So here's what I've learned from this task. 1. Use of MFC setting So the use of MFC setting has to be consistent throughout all projects within the solution.  If the mai

JQuery - Things to learn - ID selector with a nested HTML markup string inside Javascript

At first I thought since JQuery is so good that it could pin point to a tag using the ID selector very easily, then it shouldn't be a problem to do the same thing within a client side script as follow. ... var htmlString = " <div id=\"outerpanel\"> <div id=\"innerpanel1\"> Something here</div> <div id="\innerpanel2\"> another thing here</div> </div> "; var contentOne = $(htmlString).filter('#innerPanel1').html(); alert(contentOne); ... So I did try this out, and found out that it didn't work at all.  It turns out that in order to search for the panel, it has to traverse through the child within the DIV with the ID outerPanel.  I have no idea on why is that so, so I just going to remember next time that in the case of manipulating an object using JQuery within a script, I'll have to traverse through the children elements in order to look for it.

Yahoo! Messenger voice call & video call disabled, why?

Was trying to help my colleague to troubleshoot her laptop, where the Yahoo! Messenger voice chat & video chat are disabled even though the setup of the sound & video are all correctly configured.  Yet, it will still throw the error message "Your computer is not connected to the network", which is quite amazingly considered that the wireless network is working plus the Skype is able to make the call. After several finding on the Internet and on some help site, non of the solutions are able to solve the problem.  Then I recalled the other colleague is also using the same laptop and her Yahoo! Messenger is able to use video call & voice call.  I was guessing the whole time of what could be the possible cause that hers is working but not this one.  Then a thought came to my mind, could it be the firewall? The firewall is correctly configured, so what else inside there that is blocking the connection?  The other security software that's installed is the Trend

Reserve word in JQuery

I was wondering myself about this the other day when I was trying to resolve an issue where the JQuery AJAX async callback doesn't trigger the session state timeout routine of the .NET properly. I was getting a lot of issues with it particularly because I set a parameter name in the JQuery AJAX call to be "jquery". This actually will cause the JQuery AJAX failed to work. So after I tried to change the parameter to another name, then it works. I was thinking to myself, it could be that the word jquery is a reserved word, so I tried to see if I could find any reference to the reserved keyword in JQuery, but can't find any. So, ought to write it down here to have a reference to remember that I have faced this issue before.

Web Development: Disable, Validate, & Enable Buttons

I bounced into this problem during a Web UI development, of which I'd say it's quite a common issue. Whenever a button is clicked, ideally it would be good to disable it to avoid continuous clicking. Of course, it may not be the case in certain circumstances, i.e. loading of images, of which sometimes clicking the button again would surely making it load faster. However, in the latest development that I involved in, I need to make sure that the button as to be disabled to avoid continuous clicking that would cause some Javascript error that would cause the whole website to stop working. I've no idea why this is happening, and my only explanation should be because the execution time is short & it's AJAX, therefore the continuous clicking would cause some process not able to be executed timely and causing this issue. So after some research on the Internet, I found that in order to disable the button during a button click event that has a postback, the onclick event

Querying Elements Inside iframe & TabPanel

As it's quite fairly new to me because I've never did Javascript extensively, thus it is difficult for me at first to code it. My recent task required me to extract information from a web page displayed within an iframe, and then create an XML to represent it. The approach is pretty straightforward after searching the Internet for solutions. All I need is to get the ID of the iframe, and then create an object inside Javascript to point to that iframe using getElementById, and finally invoke the Javascript function of the web page displayed within the iframe. But then the other task is how to get the list of iframe IDs? There are several iframe elements that will be created dynamically and each of them is going to be an element within an AJAX TabPanel, which in turn will be created dynamically also inside an AJAX TabContainer. If it's just normal HTML element, then it's very straightforward; but with the TabPanel object, I need to find a way to extract only the activ

Web Services - It's Not As Easy After All

As I need to deal with servers' services for my company, I have to think of solution that's not only able to cope with the expansion of the service, but also able to handle most unwanted scenario gracefully that would not cost the services to break down just because of one failure. On top of that, I do have to find out solution as well on how to improve the throughput of the service. 1. Database Related Issue Lately I've been trying to look into the reason behind the reason why one of our services have become so slow in producing and output. So in order to do so, I tried to capture some information and display them in the log file. This is not really efficient at all because if possible, I'd prefer the log file to be able to be exported into e.g. an Excel worksheet so that I could use the data to create some statistic. The captured information shows that one of the reason for such a delay (over 10 seconds to process 1 request, which is not very acceptable at all) was