Nov 7, 2011

DirectX Problems with Skype -- Solved (use 32bit colors)

The short version: 
      Skype video needs 32bit color quality to do DirectX hardware accelerated video.


The long version:

A few weeks ago I wiped clean an old laptop we use for Skype and reinstalled WindowsXP.  But after the reinstall, Skype video calls were low quality and the framerate was much lower than I remember before I reinstalled the OS.

So I followed Skype's instructions to get hardware-accelerated video:

1.  Updated graphics driver.
2.  Installed DirectX 9.0c
3.  Ran the DirectX diagnostics and tests, but still no change on the Skype video quality.

I could tell Skype was still not using DirectX hardware acceleration because the CPU load simply viewing my own webcam in the Video Options menu was over 40%.

Exploring my video card settings, I saw that for some reason the color quality was set at 16bit, when normally it should be at 32bit.  Changing that solved the problem.  Go figure.

Oct 11, 2011

Strange behavior from an old Acer Aspire 3000 laptop

We have an old Acer Aspire 3003 laptop that has been relegated to Skype duty. But recently the integrated mouse and keyboard would hardly respond at the login screen, as if something was consuming all the CPU. Starting Windows XP in safe mode fixed the problem so I proceded to wipe the hard drive and give it a fresh reinstall.

But the same problem arose during installation and again once Windows was installed.  After some more Googling, I came across several threads which suggested removing the battery (which hardly holds a charge anymore) and running the laptop only on AC power.  Lo and behold, that fixed the problem instantly.

Some theories I've heard is that battery circuitry overheats the south bridge chip on the motherboard for some reason, but I've not investigated further.

Weird.

Note: After further research, people suggest that simply disabling the "Microsoft ACPI compliant battery" in the Device Manager will be enough. If I get time, I might try it.

Oct 5, 2011

Baby paperwork in Spain

This post has nothing to do with Sharepoint or .NET, but read on if you're a foreigner having a newborn in Spain. As you already know, any government dealings in Spain involve a lot of paperwork and office visits. None more than the birth of a child (especially to foreigners).

The details below were valid for our daughter born in Barcelona in October of 2010. The documents listed are by no means complete and the requirements change all the time. Check the official websites and call the offices before you visit. Even then you'll still probably be missing some documents.

I'm American and did all of her paperwork based on her American nationality. We didn't choose to use her Belgian passport as Belgian law only allows the father's surname for a child and that could create problems in the future as Spanish law requires both parents' surnames.

Day 1: Your baby is born and your life changes forever.
Goal: A birth record from the doctor stating how the birth went and some other medical details. And your beautiful new child.

Day 2: The Registro Civil
Goal: A libro de familia if you don't already have one, a Spanish birth certificate for your child and optionally an international version of the Spanish birth certificate if you request it.
Bring: Both parents and child. Passports, the birth record, empadronamiento and photocopies of all documents including every single page of the passport.

Day 3: Your embassy or consulate

Goal: a passport for the baby and optionally a birth certificate from your country
Bring: The parent with the nationality in question and the child. Your passport, the child's birth certificate, photos of the baby, money and photocopies of everything.

Note:
I've heard that several countries (Italy among others) simply imprint the child's name in a parent's passport, which seems the fastest way to get the child an official nationality.

Day 4: The Oficina de Atencion al Ciudadano or Ayuntamiento
Goal: A certificate of empadronamiento for your child, stating their official address.
Bring: A parent and the child. Passports and DNI, libro de familia, empadronamiento and photocopies of all.

Day 5: The Oficina de Extranjeros or Policia Nacional (if you don't have an Oficina de Extranjeros in your town)
Goal: A NIE for your child, necessary for almost all transactions in Spain. For many transactions, the initial paperwork with the number on it is enough so you don't have to wait for the ID card.
Bring: The child's passport, libro de famila, photos, the EX forms from the Ministry of Interior website, lots of other paperwork, all photocopied.

Day 6: The Oficina de Seguridad Social (make an appointment if you can)
Goal: Paperwork to bring back to your employer and possibly a Social Security number for the child if she already has a NIE
Bring: The libro de familia, the birth record, the paperwork from the employers of both parents for the parental leave of absence

Day 7: Your local health clinic (CAP in Catalunya)

Goal: Your baby's health card and her first appointment with the pediatrician
Bring: Libro de familia, passports, baby's NIE, birth record, empadronamiento, child's Social Security certificate and your health cards

Note:
If getting your child's Social Security certificate is taking a long time, the local clinic might make an appointment with the pediatrician anyway if you show you've filled out the preliminary documents and explain your story

Day 8: Rest and enjoy your baby


Optional but interesting paperwork



Spanish nationality for your child

Contact: The Registro Civil.

Note:
Your child can apply for citizenship after residing for one year in Spain, but you can make the appointment beforehand. The administrative backlog varies greatly by city and in Barcelona, the current wait to simply present the paperwork is two years. So make your appointment as soon as possible.


National or regional child assistance money (though government cuts make this improbable)
Contact: In Barcelona, the department of social services

Mar 8, 2011

Update panel not working in Sharepoint

After several hours of investigating why my simple HelloWorld UpdatePanel didn't work in Sharepoint, despite having installed the Sharepoint Guidance package and enabling the SafeScriptManager and changing the web.config for AJAX controls, I came across the following blog post:

http://msmvps.com/blogs/shareblog/archive/2009/04/29/update-panel-not-working-like-you-expect.aspx

Turns out that there is an error in the BlueBand master page (the one I was using) that broke the postback mechanism for UpdatePanels. Changing master pages fixed the problem.

Specifically:


<body class="body" onload="BLOCKED SCRIPT_spBodyOnLoadWrapper();">
<webpartpages:spwebpartmanager runat="server">
<form runat="server" onsubmit="return _spFormOnSubmitWrapper();">

Should be:

<body class="body" onload="BLOCKED SCRIPT_spBodyOnLoadWrapper();">
<form runat="server" onsubmit="return _spFormOnSubmitWrapper();">
<webpartpages:spwebpartmanager runat="server">

Jan 24, 2011

SQL Server doesn't free all space with deletes on image columns

All this began with a Sharepoint_Config database that grew to 16GB when the norm is 200MB. Turns out a developer was publishing Infopath forms with managed code that included 10MB DLL with each version. And each version was stored in the Sharepoint_Config database, specifically the Binaries table.

After cleaning out the tables involved (Objects and Binaries) using the dropObject stored procedure, the table still used 16GB. I tried all the cleanup commands I knew (DBCC CLEANTABLE, DBCC SHRINKFILE, DBCC UPDATEUSAGE), but none worked.

Finally I came across this post that solved my problem: http://www.sqlservercentral.com/Forums/Topic1011086-146-1.aspx

In short,
  1. Add a new data file to your database.
  2. Empty the first data file using DBCC SHRINKFILE (database_file1,EMPTYFILE) .This step took several hours on my 16GB database and eventually ended with an error that I ignored.
  3. Shrink the first data file down to a normal size.
  4. Empty the second data file.
  5. Delete the second data file.