Information Technology Knowledge Base

August 27, 2006

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

Filed under: Miscellaneous — Jonas De Vuyst @ 8:02 pm

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.

August 26, 2006

Totem Slow in Ubuntu Dapper Drake

Filed under: Ubuntu — Jonas De Vuyst @ 4:17 pm

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.

August 23, 2006

Rename SQL Server database

Filed under: Microsoft Sql server — Tijs Vandormael @ 9:34 am

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'

August 11, 2006

Rows affected by a querry in VB6?

Filed under: TSQL, Visual Basic 6 — Hedwig Lodrigo @ 9:11 pm

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")

August 7, 2006

Switching to fullscreen in OpenGL (MS windows)

Filed under: OpenGL — Wim V @ 9:51 pm

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);

July 29, 2006

Restoring a database in sql server 2005

Filed under: DBA, Microsoft Sql server — Hedwig Lodrigo @ 2:12 am

Sometimes you have to restore a backup file for a database with replication. This is how you do it.
Preparing the restore

  1. Copy the backed up database file to your database server. Then disconnect everyone from the database.
  2. In the windows start menu go to run and fill in: Services.msc and Press ok
  3. Find the Distributed Transaction Coordinator (msdtc.exe) and stop this service. (you do this by right clicking on it and selecting stop)
  4. Stop the sql server agent service

Restoring the database

  1. In Microsoft sql server management studio you connect to the server which holds the database you want to restore. Then you open the node databases and right click Restore/Database…In the Restore database window, you see a section Source for restore. There you select from device and you browse for the back up file you have on your server. After selecting it you will see a new line in the grid below. You select the checkbox restore.
  2. On the left side of the window you select the Options page.
  3. Select the option Overwrite the existing database & Preserve the replication settings.
  4. As recover state you leave the database ready to use by rolling back uncommitted transactions. Additional transaction logs cannot be restored(Restore with recovery)

During the restore
Just wait will the back up is being restored.

After the restore
When the restore is finished you can turn back on the services you stopped.

July 27, 2006

Transactions

Filed under: Microsoft Sql server, TSQL — Hedwig Lodrigo @ 10:57 pm

One of the common shortcomings of the novice sql guru is the lack of knowledge about transactions.

What is a transaction?
A transaction consits off several statements which are executed as a single unit. Either all the statements are done or they all fail. You’ll need this functionality in situations which require atomicity. For instance you are coding for a bank and your code has to transfer money from one account to another.


Sample without transactions:

UPDATE accounts SET money = money - 200 WHERE id = 1
–> the server crashes here
UPDATE accounts SET money = money + 200 WHERE id = 2

Now the first guy has lost his money and the second guy never received the money.


Sample with transactions:

BEGIN TRANSACTION
UPDATE accounts SET money = money - 200 WHERE id = 1
–> the server crashes here
UPDATE accounts SET money = money + 200 WHERE id = 2
COMMIT

Now when the server is recovered the first sql statement has never happend so the first guy still has all his money.

Need Discounted Diflucan? Save $$$ ordering Diflucan online! Buy Diflucan online (fluconazole) through international online pharmacies at lower prices. diflucan generic Diflucan is an antifungal drug used to treat fungal infections such as thrush. This drug can also be used as prophylactic (preventive) drug for patients who have a
Second question, cheap zovirax without prescription, Order discount zovirax, can I use olive oil as a “lotion”. My grandma says it is good for your skin but I just zovirax generic Cheapest Order Zovirax - Buy Online No Prescription Needed. Cheap price. Overnight Delivery. Discounts up to 80%. Free shipping available.
Natural penis enlargement capsule India helps you to regain the ardor in your sexual life.Herbal penis enlargement capsule treatment India is approved formula. best penis enlargement Penis enlargement surgery is just one of the many methods in which men men who will attest that penis enlargement surgery actually works.
« Older Posts

Powered by WordPress