Weka Error Message: ‘training and test set are not compatible’

Allgemein Kommentare deaktiviert

If you encounter this error message: “training and test set are not compatible” , and are totaly sure, that the files are correct, try copying the header from one file to the other. This solved the problem for me! This seems to work for ARFF files only!

FriendlyARM / Mini2440 – Embedded Debian – Java | A Guide

IT, Linux Kommentare deaktiviert

Within this article, we describe how we have set up an embedded debian (SID) on a mini2440 / friendlyarm development board, and how we have installed all the fun stuff, as Java and the JNI (native interface), X11, the GCC/G++ toolchain and much more.

We will use a SD-Card to store the root file system (just because of the bigger storage size)
Therefore we have to create the partitions on the card:

Bootloader

We will use the standard bootloader provided (vivi).

First of all, we have to set up the boot parameters properly. This is done using the serial console and supervivi. Switch the boot-switch to NOR and power on the mini2440. On the serial console, you will now get the output of the supervivi console:


##### FriendlyARM BIOS 2.0 for 2440 #####
[x] format NAND FLASH for Linux
[v] Download vivi
[k] Download linux kernel
[y] Download root_yaffs image
[a] Absolute User Application
[n] Download Nboot for WinCE
[l] Download WinCE boot-logo
[w] Download WinCE NK.bin
[d] Download & Run
[z] Download zImage into RAM
[g] Boot linux from RAM
[f] Format the nand flash
[b] Boot the system
[s] Set the boot parameters
[u] Backup NAND Flash to HOST through USB(upload)
[r] Restore NAND Flash from HOST through USB
[q] Goto shell of vivi

We use s to set the boot parameters:
The press s, then “linux_cmd_line” to set the boot parameters appended to the boot arguments of the linux kernel.

The boot arguments are:

console=ttySAC0,115200 noinitrd root=/dev/mmcblk0p2 rootwait=4 rw ip=dhcp

This tells the kernel to mount the second partition of the SD-Card as root file system (read-and-writeable)

Own Kernel

Building your own kernel, requires you to have a working cross compilation environment. Please take a look at: http://www.friendlyarm.net for the toolchain.
You can optain the used config file here: download Kernel config

Simply copy the config file into your kernel source directory and name it “.config”. Then compile your kernel. The kernel will be located in /arch/arm/boot after compilation. Then simply upload the kernel with the provided tool of friendlyarm:

in the supervivi console press “k” and start the upload through “USB” on your pc.

Your new kernel is now flashed into the NAND storage of your mini2440/friendlyarm.

Debootstrapping Debian

Note, this article is based upon: http://code.google.com/p/mini2440/wiki/Emdebian
Download Kernel config

NHibernate/Active Record – StaleStateException?

Absurdes, IT Kommentare deaktiviert

Today I had to use an Ative Record implementation for C#: Castle Active Record. It worked verfy fine until i needed to save a one to many relationship. Then the underlying NHibernate yielded the following Exception:
StaleStateException: unexpected row count -1 expected 1 .

Googling for that Exception gave me two options: At first, turning the sql servers NOCOUNT property OFF by either sending “SET NOCOUNT OFF” or setting the appropriate property of the SQL-Server in the config dialog. Both did not work for me, as i am neither the Admin of the server nor i can send the command by hand through the many layers introduced by ActiveRecord/NHibernate.

Another possible solution was overriding the connection driver to let i send the query everytime the connection gets requested. This was proposed by the blog author of: http://www.socialanimal.com/archives/2008/03/07/nhibernate-and-nocount/. This either didn’t work for me.

But taking a look in the database suprised me! My Data was actually written! So a simply try {} catch(…) { //ignore } did the job!

SHAME ON ME FOR THAT :-)

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS