Skip to content
Sep 8 09

For the adventure game lovers: Ben there, Dan that && Time, Gentleman, Please

by peterdk

I just finished playing these wonderful indie adventure games: the free Ben There, Dan That, and the follow up: Time, Gentleman, Please.

btdt_01_sm

These two games are amazing! There’s a lot of great humor in it! And Ben There, Dan That is totally free!

So check it out at: http://www.zombie-cow.com.

Aug 5 09

PodSleuth on OpenSUSE 11.1 64bit: Could not locate the standard HAL callout script

by peterdk

While compiling podsleuth on OpenSUSE 11.1 64bit I encountered this error:
” Could not locate the standard HAL callout script”

Solution is to run ./configure or ./autogen.sh with –with-hal-callouts-dir=/usr/lib64/hal

Aug 5 09

Solution for: libsgutils not found on OpenSuse 11.1

by peterdk

Podsleuth complained about libsgutils, but I couldn’t find it in the repo. Turns out opensuse just names it different.

The package you need to install is sg3_utils-devel

Jul 20 09

Eduroam Open Universiteit instellingen voor Windows 7

by peterdk

Naast OSX gebruik ik ook Windows 7 en daar was ook aardig wat gestoei nodig om Eduroam werkend te krijgen. De handleiding van de Open Universiteit klopte daar niet wat betreft instellingen. Ik heb dit werkend getest in de Universiteitsbieb van de Universiteit Leiden.

  1. Open het Netwerk Centrum.
  2. klik op “Draadloze Netwerken Beheren”.
  3. Klik op “Toevoegen”
  4. Selecteer “Handmatig een netwerkprofiel toevoegen”.
  5. Netwerknaam: “eduroam”.
  6. Beveiliging: “802.1x”.
  7. Klik op “Volgende”
  8. Klik op VerbindingsInstellingen wijzigen”
  9. Tab “Beveiliging”
  10. NetwerkVerificatie: PEAP
  11. Klik op “Instellingen” van PEAP.
  12. Vink “ServerCertificaat Verfieren” aan.
  13. Vink “Verbinding maken met deze servers aan” en vul daar “ACS-HRL-01.pwo.ou.nl” in.
  14. Vink het “GTE CyberTrust Global Root” certificaat aan.
  15. Klik op “Configureren” van EAP-MSCHAPv2
  16. Zet het vinkje daar uit.
  17. Klik op OK, OK.
  18. Je bent nu weer in de “eigenschappen van draadloos netwerk eduroam”, tabblad beveiliging.
  19. Klik nu op “Geavanceerde Instellingen”
  20. “Verificatiemodus opgeven” aanvinken en “Verificatie van gebruiker” selecteren.
  21. “Referenties opslaan”.
  22. Username = studentnummer@web.pwo.ou.nl
  23. Password = Studienet password.
  24. Alle wijzigingen opslaan en alle vensters sluiten.

Je zou nu met eduroam verbinding moeten kunnen maken. Mogelijk dien je gebruikersnaam en wachtwoord nogmaals in te voeren. Succes!

Jul 16 09

Eduroam Open Universiteit instellingen voor OSX

by peterdk

Als student aan de Open Universiteit maak ik regelmatig gebruik van de Universiteitsbibliotheek van de Universiteit Leiden. Nu was ik bekend met Eduroam door mijn tijd in Delft bij de TU aldaar. Hoewel ik niet verwacht had dat het zou werken, blijkt de Open Universiteit Eduroam correct geimplementeerd te hebben en kan je zowaar in andere universiteiten gewoon op internet!

Voor OSX 10.5 is het volgende nodig:

  1. Open Netwerk Voorkeuren.
  2. Klik op geavanceerd wanneer je Airport geselecteerd hebt.
  3. Klik op eduroam en dan op het potloodje.
  4. zet beveiliging op : 802.1x
  5. Gebruikersnaam is: studentnummer@web.pwo.ou.nl
  6. Wachtwoord is je studienet wachtwoord.
  7. Klik op voeg toe.
  8. Ga vervolgens naar de tab 802.1x
  9. Klik op het pijltje voor Gebruikersprofielen zodat deze openvouwt.
  10. Selecteer WPA:Eduroam.
  11. Gebruikersnaam en wachtwoord hetzelfde als je reeds ingevoerd hebt.
  12. Draadloos netwerk: eduroam
  13. Identiteitscontrole: Selecteer alleen PEAP.
  14. Selecteer PEAP en klik op configureer.
  15. Externe Identiteit: Leeg laten.
  16. Klik op OK
  17. Klik weer op OK.
  18. Sluit het venster en maak verbinding met Eduroam.

Je kan eventueel nog in de geavanceerde instellingen het eduroam netwerk omhoog slepen zodat het automatisch verbinding maakt ipv met een ander algemeen netwerk in je locatie.

Als het goed is zou hij nu moeten werken! Hier in de Universiteitsbieb van de Universiteit Leiden werkt het prima, beetje sloom misschien af en toe. 🙂

Jun 26 09

Using TinyMCE with Ajax in ASP.NET MVC

by peterdk

I was having some problems with getting TinyMCE to work nicely in ASP.NET MVC when using Ajax.BeginForm().

Luckily, it was quite easy to come up with a solution!

The problem is that when using TinyMCE the desired textarea value doesn’t get set by TinyMCE, cause it doesn’t respond to the ajax form submit. The solution is to trigger the Save option of TinyMCE, so that the ajax script just sees a populated textarea.

I first tried to use the OnBegin Callback in the AjaxOptions, to execute tinyMCE.triggerSave(), but somehow that always fired after the ajaxscript had collected the form values. So, it would be very nice to have that one, but I guess the design is not right for that. Too bad.

What did work was to autosave everytime the content of the tinymce editor changed. This is maybe a bit overkill, but it is the most reliable solution I found.

 tinyMCE.init({	
	mode : "specific_textareas",
	editor_selector : "mceEditor",
	add_form_submit_trigger: false,
	setup: function(ed) {
	    ed.onChange.add(
	        function (ed, evt) {
	            tinyMCE.triggerSave();   
	        }
	    )
	}

});

You’ll also maybe want a function that cleans the TinyMCE editor after a formsubmit.

//View, Ajax.BeginForm
 new AjaxOptions() {  OnComplete = "tinymceTriggerEmpty" 

//Script
function tinymceTriggerEmpty() {
    tinyMCE.execCommand('mceSetContent', false, '');
};
May 15 09

Complete Guitar ChordFinder: http://www.chordpro.net

by peterdk

I have created a new website that provides a complete Banjo, Ukelele and Guitar ChordFinder.

For every instrument you can select a tuning or create a custom tuning yourself. It generates for every chord you give all the possible options for playing that particular chord on your instrument of choice.

Hope you enjoy it as much as I did enjoy the creation of it!

Spread the word!

Apr 13 09

Using AutoIncrement with MSSQL

by peterdk

If you’re used to use auto_increment in MySQL. This is called Identity in MSSQL.
In the Designer you can find it in the rightpanel, when you’ve selected a table. You can select the field that needs to be autoincremented (most of the time that’s your key I guess.)

Apr 13 09

How to get many-to-many relationships in ADO.Net entity from a MSSQL database

by peterdk

I was fricking long searching for a simple guide to get ado.net entity model with many-to-many relationships.

Here is the solution.

We have  “User” and “Account” table. A user can have many accounts and accounts can be owned by multiple users. To implement this many-to-many relationship you’ll need to create a seperate table with 2 fields.

Let’s say we create a UserAccount table, with 2 fields: user_id, account_id.  First step is to create the two relationships. A relationship between “user_id” and the “User” primary key. And the same for “Account” and “account_id”. That’s logical stuff I would say.

We now have a join table, but if we try to generate the ADO.Net entity stuff in visual studio, we get the table itself, not the direct relationship. Or it moans about not having a primary key (which is true).

So, to get the relationship we need to create a primary key, not just a primary key but a composite key.
You can create one easily in the database designer. Just Select the two fields and rightclick and select “Set Primary Key”. You should now get two yellow key symbols, one in front of both fields.

If you now generate the Ado.Net Entity thingy, you get the relationship properly, without having to use User.AccountUser.Account. It’s now User.Account.

Maybe I am blind, but I couldn’t find this anywhere…. 😐

Back to work. 🙂

Update: Don’t forget to use User.Account.Load() before accessing User.Account.ToList() or similar. The framework doesn’t autoload children, but you need to explicitly load them. (Quite logical if you think about it).

Feb 17 09

HowTo: Install Monodevelop 2 from SVN on Ubuntu 8.10 x64

by peterdk

Update: Using mono from the PPA gives a mess, some dll’s don’t work, so I recommend compiling it all from source.

I really like C# and also love Ubuntu. Fortunately for me there is a nice IDE available for Mono called MonoDevelop. In this tutorial I’ll show how to install the svn version of it on Ubuntu 8.10 64bit. Well.. basically it’s more a reference for myself, so it’s not that clean and understandable. 🙂

Installing Mono 2.x

First of all we need a updated version of mono, since the one shipping with Ubuntu is out of date. We don’t need to compile anything since there is a nice and easy PPA available.

  • Create a new file “mono.list” in /etc/sources.list.d/ with the following contents:

deb http://ppa.launchpad.net/mono-ubuntu/ppa/ubuntu intrepid main
deb-src http://ppa.launchpad.net/mono-ubuntu/ppa/ubuntu intrepid main

  • Update the apt-cache and install the new mono.

“sudo apt-get update && sudo apt-get dist-upgrade”

sudo ln -s /usr/bin/mcs1 /bin/mcs
sudo ln -s /usr/bin/gmcs2 /bin/gmcs

That should do it for Mono.

Installing MonoDevelop from SVN

sudo apt-get build-dep monodevelop

sudo apt-get install subversion build-essential automake1.9 libgecko2.0-cil libmysql5.0-cil mono-debugger nunit-console2 libncurses5-dev

sudo ln -s /usr/bin/nunit-console /usr/bin/nunit-console2

compile & install mono-debugger from http://ftp.novell.com/pub/mono/sources/mono-debugger/mono-debugger-2.2.tar.bz2

==

svn co -r 127196 svn://anonsvn.mono-project.com/source/trunk/monodevelop
or
svn co svn://anonsvn.mono-project.com/source/trunk/monodevelop

cd monodevelop

./configure

select gecko, asp.net , database, profiling, codeanalysis, debugger, java, NOT boo, since it crashes with this revision.

make

sudo make install