Saturday, November 14, 2009

Retrieving data on New York Times and Twitter

There is a wealth of information (tons of it) in New York Times and  the micro-blogging leader Twitter and it will be very useful and could be even remunerative to access data on them.

In this article, I look at two APIs, the Twitter API and the New York Times API and see how we can access data on them using the JavaScript libraries available on the Microsoft Edge Content Network also know as Microsoft Content Delivery Network (CDN). While jQuery is used to access API retrieved data on the intranet web server, the Microsoft AJAX client templates are used in displaying them.

Data in JSON objects are retrieved from New York Times and Twitter using jQuery and pushed into  Microsoft AJAX templates.


Read this article brought to you from Packt Publishing company at
Hacking New York Times and Twitter with Microsoft AJAX and jQuery

Thursday, November 12, 2009

Printing to Canon MP 210 printer using Windows 7 Ultimate

The printer driver to print a document from a Windows 7 Ultimate computer to Canon MP 210 must be upgraded with a new driver before you can print. After installing the new driver whose download details given here it is easy to print from a computer running Windows 7 Ultimate RC.

However to print to a Canon Printer MP 210 connected to a Windows 7 computer from a WiFi networked computer you may face some problems. This notes describes in detail how you may successfully print from the networked computer.

Computer network details
  • Acer Laptop computer running Windows 7 Ultimate RC. The MP210 Canon printer is connected to this computer.
  • The Toshiba Laptop (Satellite P105-S6134) is WIFI networked with the Acer as well as several other desktops.

Follow these steps:
  • Verify that you can print from the Acer computer to the connected Canon MP 210.
  • When you Add a printer on the Windows XP the program prompts that a suitabe driver will be downloaded to the machine. If you go ahead it will indeed discover the MP 210 on Acer after some time as in Figure 1. However you will not be able to print.
  • Use the Canon diagnostic tool and enter into Troubleshooting window and choose the option to download a new driver. It will take you to Canon site where you can download the driver. After downloading and installing the driver restart your computer so that the changes can take effect.
  • First of all the discovered printer in step 2 would have disappeared and you need to browse for a printer again. This time it will discover the printer (make sure that Acer computer is on and running). Now you will be able to print from the Windows XP.
Here are some screen shots of the various steps above.

Figure 1: Shared Printers
















Figure 2: OS Compatibility of printer


Figure 3: Downloading the driver


















Figure 4: Installing the driver









Wednesday, November 11, 2009

Opera browser upgrades from 9.1 to 10.01

It has a nice look and easy to install or upgrade. I did a fairly easy install. The file size is small around 6.8MB. It has quite a few new features that includes a bunch of gestures: Window, mouse, navigation, link, and wheel which allows various kinds of movements. I suppose if one is using this browsers daily one will get used to it. If you are like me who is whimsical then you may get confused. SpeedDial gets you the page you want with one click. It is turbo-charged and getting to there should be super fast. Here is a screen shot of the speed dial. It worked quite well with several web sites but when it came to showing my intranet it did slow down a bit for some of the pages. Perhaps there is some more configuration involved. What I did was an out-of-the box experiment.

p.s: While I upgraded from 9.1 there may be a later version aswell.

Here is a screen shot of a new window in Opera10.

Here there are 9 place holders. Five of them are taken up. Click on the sixth and you get a drop-down pick list of various web sites previously visited. Pick the one you want and you are done.

Sunday, November 08, 2009

Open Source Surge (Google Closure Tool)

Javascript has suddenly matured and perhaps these are its best of times. There is a large number of JavaScript libraries vying for your attention and capture your heart. Review the article describing the various libraries on Wikipedia.

It all really started with the introduction of Dynamic HTML[DHTML] when Javascript provided the scripting ability to interact with the web page which had remained mostly static till that time. With the support of CSS and Javascript the stage was set for the web pages to take the users to the next level. The next big push came in with the introduction of AJAX. The concurrent effort by developers to somehow address the display disparity with the existing browsers and make the user experience uniform across different existing browsers and versions resulted in packaging the various libraries. Of course Microsoft Visual Studio also worked hard on making this uniform user experience across browsers a priority and the applications developed using this IDE fulfilled this wish mostly.

Most recently Google made available its toolset, the Closure Compiler. It is supposed to make Javascript to download and run faster according to Google. It is more like a refactoring tool for Javascript. It also checks for script coding errors etc. Moreover it is integrated with Firefox's PageSpeed and you can see for yourselves the gain in performance using the Google Tool. The tool can be used from command line as well as a simple web application.

The above Google URL also has links to examples of the tool's usage. One such example shows optimizing code by removing white spaces. Review this example here.
In the above example, it took in the script shown here:
---------
function hello(name){
//Greets the user
alert('Hello, ' + name);
}
hello('New User');
------------------------
and the Closure Tool optimized it to the following after removing white spaces (as well as the comments) :
-----------
function hello(name){alert"Hello, "+name)}hello("New User");
------------------------------------------------

Parse errors with line number and character position are provided by the tool but you will have to go and count those on your input code. Also there is no color coding or error position highlighting.

How to access the Closure compiler?

Click on this URL and you are ready, set and go.

Edited in 2018:
Try this link for an ad free tool:
https://www.websiteplanet.com/webtools/jscssminifier/
.

Sunday, November 01, 2009

Regarding IE 8.0 and jQuery

Microsoft has chosen jQuery from among the different javascript libraries and has been giving increasing attention to it in its programming software regardless of this  IE 8.0 still does not render all of jQueries selectors.

I read on the internet about other IE 8 problems vis-a-vis jQuery. The following figures show how different IE 8.0 renders the same content (I threw in a lot of selectors) when compared to other browsers. It appears that IE 8 can render the ID tag selector well but none of the others. I tried it out in the latest issue of Microsoft Blend Super Preview but it appears that rendering (interpretation) has remained the same from IE 6.0 to IE 8.0.

This is in IE 8.0















This one in Firefox












This one in Opera














This one in the latest issue of Super Preview. The left one is IE 6.0 and the right one is IE 8. I am not sure if the Super View is supposed to render css styles.


DMCA.com Protection Status