08.27.06

How to Connect GTalk to MSN/ICQ/AIM/Yahoo

Posted in Miscellaneous at 8:02 pm by

GTalk, Google’s instant messaging client, uses the Jabber network protocol (also known as XMPP). Now although GTalk doesn’t expose it in its user interface, Jabber has a concept of transports that let you communicate with users on non-Jabber instant messaging networks. Using the small trick detailed below, it is possible to get these transports working in GTalk.

Adding Transports to your GTalk Account

First you need to set up GTalk to acknowledge other, non-Jabber/XMPP instant messaging networks. As this is not possible using the official GTalk client, you will need to install a more featureful Jabber client program. Pick any client that will work on your platform. For a list of Jabber clients and instructions on how to log into GTalk, see this page. (A comprehensive list of Jabber clients can be found here, but doesn’t come with instructions specific to GTalk.) Once installed you will need to start the program and log in to your GTalk account. After having logged in, only two more steps for registering a transport remain:

  1. Find a public Jabber/XMPP transport for the network you want to connect to. Try googling for it or use the popular jabber.anywise.com;
  2. Add this transport to your GTalk account.

Once you have decided on a transport to use, you’ll need to bring up your Jabber client’s Service Discovery dialog. If you don’t know where it is, look around in the menus a bit. In the Service Discovery dialog enter the name of the Jabber server that has the transport you need.

Jabber/XMPP Service Discovery in Gajim

Next register the transport you need. You should be prompted for your username and password. You will need to enter a username and password for the instant messaging network you want to connect to. I.e., if you wish to install an MSN transport, you will need to enter the username and password you normally use to connect to MSN. If you don’t have an account yet, create one now using the standard procedure for the instant messaging network you want to connect to (if you need an account for MSN, check passport.net).

Register Transport in Gajim

Once you have registered your transport, subscription requests may pop up for the people on your MSN/ICQ/AIM/Yahoo contact list. Approve these.

Subscription Request in Gajim

Adding MSN/ICQ/AIM/Yahoo Buddies to your GTalk Contact List

Once you have registered a relevant transport, you can add users from other instant messaging networks to your contact list. One way to go about that is to add them via the Jabber client that you installed. This client should allow you to select the transport or protocol through which the user can be reached.

Add Contact in Gaim

Alternatively you can add a friend to your contact list from GTalk (even using the web based GTalk in GMail). To do this add “username@transport” to your contact list, where username is the name of the user on whatever network he is using, and where transport is the name of the transport to contact him through. For instance, if you’re using the jabber.anywise.com MSN transport, you’ll want to enter “msn.jabber.anywise.com” for transport. To find out the name of a transport, look at other users on your contact list that use the same instant messaging network. The part of after the “@” in their GTalk username, is the name of the transport. If you don’t have any such people on your contact list, you might also look for the transport name in your contact list, although it might be burried beneath a Show All link (this is the case in the web based GTalk as of August 2006). Sometimes it will also be necessary to mangle usernames a bit when adding them. Thus it may happen that to add MSN user “jdv@foobar.be”, you have to tell GTalk to add “jdv%foobar.be@msn.jabber.anywise.com”. Take a peak at the other users’ GTalk usernames for finding your way around such obstacles.

08.26.06

Totem Slow in Ubuntu Dapper Drake

Posted in Ubuntu at 4:17 pm by

If Totem, the GNOME movie player, has been unusually slow for you lately, you might want to try configuring GStreamer (the GNOME multimedia framework) to use ALSA for audio output instead of esd. The following steps should fix your problem:

  1. Press Alt+F2. This will pop up the run dialog;
  2. Type “gstreamer-properties” and press enter;
  3. In the first dropdown list on your screen (Audio → Default Output Plugin → Output) choose ALSA;
  4. Close and restart Totem.

There’s one caveat though: depending on your sound card you may no longer be able to run multiple audio using applications side by side. E.g., it may no longer be possible to play a song in Muine while you have a movie playing in Totem – even if said movie is paused.

Hopefully GNOME and Ubuntu will switch to the esd-compatible audio server PulseAudio (formerly known as polypaudio) in the near future, and we’ll have no more of this nonsense.

08.23.06

Rename SQL Server database

Posted in Microsoft Sql server at 9:34 am by

If you ever find yourself in a situation where you need to rename a SQL Server database you could use the following 3 statements to do the job:

-- Make sure that you are the only user accessing the db
EXEC sp_dboption 'old name', 'Single User', 'TRUE'
-- Rename the db
EXEC sp_renamedb 'old name', 'new name'
-- Allow other users to login again
EXEC sp_dboption 'new name', 'Single User', 'FALSE'

08.11.06

Rows affected by a querry in VB6?

Posted in TSQL, Visual Basic 6 at 9:11 pm by

For some reason you would like to know how many records where affected by your sql statement called from visual basic 6. But you have no clue how to do it.

This is how you do it.

When you do a query in sql server then you can see how many rows where affected by it, because sql server fills up the @@rowcount variable.

Code:

delete from customer where name like 'A%'
print @@rowcount

If you want to return this result to a result set you can do the following:

Code:

delete from customer where name like 'A%'
select @@rowcount as affected

Then in visual basic 6:

dim newrs as ADODB.Recordset
Set newrs = rs.NextRecordset
msgbox newrs.Fields("affected")

08.07.06

Switching to fullscreen in OpenGL (MS windows)

Posted in OpenGL at 9:51 pm by

Switching between windowed mode and fullscreen is usually done by creating a new window just to change the window style. There is however an easier way to change the style without creating a new window.

//Remove the window decoration.
LONG dwStyle = GetWindowLong(hWnd, GWL_STYLE) ^ WS_OVERLAPPEDWINDOW;

//Add back the window decoration.
LONG dwStyle = GetWindowLong(hWnd, GWL_STYLE) | WS_OVERLAPPEDWINDOW;

//Set the selected style.
SetWindowLong(hWnd, GWL_STYLE, dwStyle);

//Redraw your window.
SetWindowPos(hWnd, HWND_TOP, x, y, width, height, SWP_FRAMECHANGED);

Testimonials My ex-girlfriend left me just because of my small penis size. I couldn’ t do anything and had gone under depression till I met my present girlfriend natural penis enlargement NeoSize XL natural penis enlargement pills are the only herbal supplement that is designed to increase penis size in both length and girth. NeoSize XL pills are

lab write up
remedies for motility of sperm
penis enlargement product