Deze post is geïmporteerd van de oude blog en is nog niet geconverteerd naar de nieuwe syntax.
Lately I hear about a lot of people using VPC that their keyboard suddenly stops working inside VPC.

There are a different number of keyboard issues I've heard of so far:


  • Keyboard stops working all together.


  • Keyboard freaks out. (CTRL key stuck)


  • Keyboard and mouse lock up.



The first issue is the one I hear the most, and which someone managed to perform on one of my VPC's lately.

It's quite hard to reproduce, if able to at all, but apparently it feels to trigger the most from fullscreen/windowed switching.

But, no more chatting, the (very simple) solution:

Lock and unlock the host computer. Problem fixed, keyboard working again.

The first time someone had a locked keyboard again, I tried this, and it worked! :)


A solution for the other issues are apparently:


  • Freaking: A bug in VPC apparently prevents to let go out the CTRL key when you use the AltGr key to simulate CTRL+ALT (when switching to fullscreen?). Which means in practice Windows sees the CTRL key as being kept down. Rumored solutions are to press CTRL inside the VPC, or/and to use your Right CTRL to do special VPC operations instead of AltGr.


  • Keyboard and mouse lock up: Apparently there's a hotfix somewhere out there, or at least one exists but has to be requested. I remember it being mentioned somewhere, the only comfort I can offer is that there is hope there is a fix for you, but you'll have to search a bit.

 
Deze post is geïmporteerd van de oude blog en is nog niet geconverteerd naar de nieuwe syntax.
Well, what have I done during the last year? First of all, I graduated from school with highest distinction and got a job as a webdeveloper, creating ASP.NET sites. Actually, I helped to come up with and create a rather generic cms-like framework that is being used for all future sites, cutting back on development time when administration sections have to be made, and when a lot of re-occurring things have to be implemented in a site. That's about the only vague description I can give, since it's "top secret" ;)


After a year, I changed jobs, to my current job. I'm now officially a Technical Consultant at Financial Architects. Finarch is, as the name gives away, a company active on the financial market, with a datawarehousing solution. Where-as I'll be implementing this solution, with a team of consultants, at clients. The main reasons I went for this function are firstly the fact I've been specifically hired to go abroad, which is a very nice opportunity for me, seeing I'm still young and have to take advantage of that fact. Secondly, it's a whole new world I can learn from, and as a consultant, you're expected to know your stuff, which means I'll be learning a lot of new things, which is always a fun thing :)


That's about it. It doesn't seem much, adjusting from school life to working life took some time for me, but blog posts should be coming again now. I also dumped World of Warcraft, so I finally have spare time again!

The first techy mention again on this blog since long:
This post is written with Windows Live Writer (Beta) and I really like it! It integrates smoothly in Community Server (which this blog is running on). It downloaded my blog style, allowing my to type this post in the style my blog is in, with the correct colors, and allowing me to get a live preview before publishing. And it has a built in spell checker.

I'll try out the image-inserting abilities a bit later, in my coming posts. The bad part is that it doesn't have tagging support for Community Server, or at least, I can't find it right away. Ok, it has support, it's just listed under Categories in the upper right corner, which I looked over.
 
Deze post is geïmporteerd van de oude blog en is nog niet geconverteerd naar de nieuwe syntax.
Some nifty SQL statements I made last week:

Firstly, listing all databases on a server.

[sql]
-- Get Databases
SELECT name FROM master.dbo.sysdatabases ORDER BY name
[/sql]

Secondly, a way to get all the user-created stored procedures from a database.

[sql]
-- Get Stored Procedures
-- Type = 'P' --> Stored Procedure.
-- Category = 0 --> User Created.
SELECT * FROM sysobjects WHERE type = 'P' AND category = 0 ORDER BY name
[/sql]

Then we can retrieve the content of the stored procedure with the following query:

[sql]
- Get Stored Procedure Content
-- Name = Stored Procedure Name.
-- Colid = Multiple lines, their sequence.
SELECT text
FROM syscomments
WHERE id = (SELECT id FROM sysobjects WHERE name = '{0}')
ORDER BY colid
[/sql]

In C# you could concatenate the returned records to get the full stored procedure content.

However, do mind the encrypted column in syscomments. The above queries work fine when this is 0. So you might want to add some checking, and in case it's encrypted you could first decrypt it and then display it. But you'll have to figure out how to do that yourself :)
 
Deze post is geïmporteerd van de oude blog en is nog niet geconverteerd naar de nieuwe syntax.
I strongly advise everbody NOT to buy World Of Warcraft!

My brother bought the game today, I installed it, and then I wanted to create an account for him. And that's when the trouble began...

It seems Blizzard does not care about money, since all it's account creation pages are unavailable, throwing errors everywhere.

Or wait, they get the money from you at the shop, and then make it unable for you to use what you bought an hour ago!

Judging from their own forums (which I cannot post on because I don't have an account, and cannot create either) this problem is going on for some days.

First a normal 'Service Temporarily Unavailable' error, indicating their servers can't handle it. Which is really very bad for their image, a company like Blizzard, which can't keep their main billing pages up and running? Normally it's the other way around, the 'we want your money'-pages always work

And then everything is just falling appart, have some errors:
  • [ServletException in:/WEB-INF/jsp/authkeyView.jsp] /WEB-INF/jsp/authkeyView.jsp(86,18) Unable to load tag handler class "org.apache.taglibs.standard.tag.el.fmt.MessageTag" for tag "fmt:message"'


  • [ServletException in:/WEB-INF/jsp/agreementView.jsp] File "/WEB-INF/jsp/base/language.jsp" not found' [ServletException in:/WEB-INF/jsp/base/footer.jsp] Error running /usr/local/java/bin/javac compiler'


  • org.apache.jasper.JasperException: Unable to compile class for JSP


  • Error running /usr/local/java/bin/javac compiler



And if you happen to not get an error, it will simply tell you that your session timed out, after 2 seconds...

Slow poke! You took too long to complete the Account Creation process and your session has timed out. You will have to start again from the beginning. Sorry!

If you are persistent and can get through, to step 4, you notice you can select a game-card as a paying option. (After that, it dropped out again) But if you want to use the guest-account that comes with the box, that option is gone... It's a guest account to play 10 days, but they want your credit card info for that...

Don't expect any response from Blizzard either...

I'm really disappointed, 45 EUR for the game and then you can't play it!

Best thing, even their contact form is throwing errors. And nothing is mentioned on the main site, everybody has to figure it out themselves.

I'm going to start calling them starting from Monday until I can create the account, otherwise they can give my money back and take their game back until they get their crap together.

Good game, terrible service...

If anyone from Blizzard reads this: Try to turn this negative publicity into something positive...
 
Deze post is geïmporteerd van de oude blog en is nog niet geconverteerd naar de nieuwe syntax.
Instead of making a webservice call each time certain data was needed, the data was stored in the SqlCe database on the Pocket PC, to retrieve when needed. This allowed quickly displaying data after having retrieved it once, while still giving the possibility to retrieve the latest data, and update the local cache with it as well.

To implement this, a Db class was used with the Singleton pattern to provide database access to the local SqlCe engine. A database on the Pocket PC is simply a file on the file system, MediaService.sdf in this case.

In the CheckDb method, the database was created in case it did not exist. This was done with normal SQL queries defining Create Table commands.

The following code made up the base functionality of the Db class:

[csharp]
using System;
using System.IO;
using System.Text;
using System.Data;
using System.Data.Common;
using System.Data.SqlServerCe;
using System.Collections;

namespace MediaService.Pocket {
public class Db {
private const String DB_NAME = "MediaService.sdf";
private static Db instance = null;

public Db() { }

public static Db NewInstance() {
lock(typeof(Db)) {
if (instance == null) {
instance = new Db();
}
return instance;
}
} /* NewInstance */

private void CheckDB() {
if (!File.Exists(DB_NAME)) {
SqlCeConnection conn = null;
SqlCeTransaction trans = null;
SqlCeEngine engine = new SqlCeEngine("Data Source = " + DB_NAME);
engine.CreateDatabase();
try {
conn = new SqlCeConnection("Data Source = " + DB_NAME);
conn.Open();
SqlCeTransaction trans = conn.BeginTransaction();

SqlCeCommand availableTable = conn.CreateCommand();
availableTable.Transaction = trans;
availableTable.CommandText = "CREATE TABLE Available(songId int,
songTitle nvarchar(200), songArtist nvarchar(200))";
availableTable.ExecuteNonQuery();

trans.Commit();
} catch {
trans.Rollback();
} finally {
if (conn != null && conn.State == ConnectionState.Open) {
conn.Close();
}
}
}
} /* CheckDb */
[/csharp]

Storing songs in the database was done every time results were returned from the webservice with the following code:

[csharp]
private void OnGetSongs(IAsyncResult songsResult) {
this.availableSongsCache = this.GetService().EndGetSongs(songsResult);
Db.NewInstance().StoreSongs(this.availableSongsCache);
[/csharp]

To store the songs, the table was first emptied, after which the new results were inserted all at once by using the following method:

[csharp]
public void StoreSongs(Song[] songs) {
this.CheckDB();

SqlCeConnection conn = null;
SqlCeTransaction trans = null;

try {
conn = new SqlCeConnection("Data Source = " + DB_NAME);
conn.Open();
trans = conn.BeginTransaction();
SqlCeCommand deleteSong = conn.CreateCommand();
deleteSong.Transaction = trans;
String deleteSql = "DELETE FROM Available";
deleteSong.CommandText = deleteSql;
deleteSong.ExecuteNonQuery();

SqlCeCommand insertSong = conn.CreateCommand();
String insertSql = "INSERT INTO Available(songId, songTitle, songArtist)
VALUES (?, ?, ?)";
insertSong.Transaction = trans;
insertSong.CommandText = insertSql;

foreach (Song song in songs) {
insertSong.Parameters.Clear();
insertSong.Parameters.Add("@songId", song.ID);
insertSong.Parameters.Add("@songTitle", song.Title);
insertSong.Parameters.Add("@songArtist", song.Artist);
insertSong.ExecuteNonQuery();
}
trans.Commit();
} catch (SqlCeException ex) {
trans.Rollback();
System.Windows.Forms.MessageBox.Show(FormatErrorMessage(ex));
} finally {
if (conn != null && conn.State == ConnectionState.Open) {
conn.Close();
}
}
} /* StoreSongs */
[/csharp]

Retrieving the songs can be done exactly as with the regular SqlClient classes.