tutorial

Avoiding the 401 authorization required error with Google calendar API

Using the previously-described procedure to interact with Google Calendar's API from Visual Basic 6 led to a seemingly strange phenomena at first.

Whilst trying to add an event for the first time, during the second POST operation (which includes sending the Auth code to http://www.google.com/calendar/feeds/default/private/full) rather than the event being added, Google replied with a 401 Authorization Required error like this:

HTTP/1.1 401 Authorization required
WWW-Authenticate: GoogleLogin realm="https://www.google.com/accounts"

Using Google Calendar API via Visual Basic 6

Google Calendar is a lovely looking and acting "free online shareable calendar service", allowing you to maintain your personal schedule, share it with others, and view public calendars.

Google has also provided an API such that your programs and websites can make use of it remotely; for instance to view, add or delete events. There are special client libraries to let you use it from the Java or C# .NET programming languages. It also supports communication via standard XML, to allow any other suitable language to get involved.

Running your first conduit

Once your environment is all set up, now we can try out a test conduit to make sure all is well. If so, you will be ready to start developing your own conduits.

A good test conduit called "SimpleDB" is provided as a sample with the CDK. This is an example of a conduit that interacts with memos. Rather than syncing your memos between Palm and Desktop, this one will display a form and allow you to search for the count of memos that include a certain word. Possibly not the most useful thing to do, but if it works you will know your conduit development is ready for you to use to make something that is the most useful thing to do.

Setting up the Palm conduit programming environment

To start developing your own conduits, first you will probably want to get the Conduit Development Kit, which gives you the libraries to interact relatively easily with your Palm. It is freely available from here PalmSource's Palm OS Developer Program, although you will need to register on that site (for free) first. There are currently two versions of the program for Windows (and one for Macs), 4.03 and 6.01. I went for 6.01.

Download and install. Also get any updates / bug fixes from that page, and install as appropriate.

Programming Palm conduits

In a particulary geeky manoeuvre, the Poorhouse has decided to learn the arcane technique of building a conduit to interface between Windows and a PDA running the Palm OS. Conduits are the type of software that ensure that your lovely shiny palmtop and desktop PC synchronise such that they have the same contacts, memos, events, news and so on.

It didn't turn out to be the simplest of tasks; the documentation for getting started didn't seem to make the early steps trivial at all. As such, this section will detail a few notes about how I got started in case either I need to do it again, or anyone else is in a similar situation.

Redirecting a webpage

Don't get too excited now Poor-viewers, but Steven Hargrove has written a particularly straightforward and easy to follow guide about how to permanently redirect webpages, for instance if you move them to a new domain address. Nope, not just the HTML meta tag redirect. Proper hardcore 301s.

Good CSS tutorial

For any webmasters or webmistresses who want to learn the basics of CSS (selectors, positioning, formatting and so on) there is an excellent tutorial at MaxDesign. In particular, their Floatutorial is a particularly clear and useful document about how to use floats, clear and so on. Plenty of practical examples of common effects are to be seen. Assuming that your target visitors use CSS compliantish browsers that is.

Transferring domains away from 1and1.co.uk

Welcome to the new Poorhouse. Yes, it looks nigh on identical, but trust us, it did move around the country a little bit.

Part of this involved redirecting the domain name "thepoorhouse.org.uk" to point to a new location. Sounds simple right? Especially as it was registered through a company independent to the hosting space, namely 1and1.co.uk. The main reason this choice was originally made was that it cost a bargain £1.99 a year to do so. And up to this point, it has worked wonderfully.

Linked queries in Access

Back to the (Microsoft) Office...Today's cunning tip is that of linking queries between two Access databases.

It is easy to link tables in Access; that is to say that your Access application can use, edit, add and delete data that physically exists in a different Access application's tables. This allows you to have multiple independent front-ends for the same background data for instance, gain the ability to develop new forms and reports whilst other people are using existing ones, or have an application that uses data from two different databases. Do this via the "Link table" option you get, when you create a new table (Click the Insert menu, then Table). However at first sight it isn't possible to do this for queries.

Adding a no wordwrap option to img_assist

Note: this article is outdated now as the official Image Assist module now contains a no-word-wrap feature within it.

The Poorhouse's current favourite way of easily inserting images into Drupal nodes is to use the module img_assist. To use it, you also need to install the image module.

Syndicate content