Welcome, anonimous
Categories: Android

Recently I got the following exception in an android application, when I tried to update a view from a separate thread started in an activity.

03-15 21:39:35.799: E/AndroidRuntime(15580): 
android.view.ViewRootImpl$CalledFromWrongThreadException: 
Only the original thread that created a view hierarchy can touch its views.

The reason for this exception is that the view can not be updated from a thread other than the main thread that will be implicitly started and controlled by the system when the application is launched. This main thread is responsible for updating the UI. Actually this is a main element in the android framework (but also very common in other frameworks), as it enforces that updates to the UI will be done in a sequential manner within a single thread controlled by the system.

More

Categories: Raspberry Pi

raspberrypi_small

To connect my raspberry pi to a wifi network I am using a wifi USB device with a RTL8188CUS chipset. This is how I managed to connect that device to my raspberry pi which is equipped with a preloaded raspbmc image.

Normally the configuration of the wifi USB device should be very easy using the XBMC settings menu, but actually I didn’t want to make usage of the XBMC application at all. I just wanted to connect via ssh to the raspberry device without making usage of the graphical environment.

More

Categories: OpenSudokuLib

To provide a ready-to-run example for OpenSudokuLib how to implement the OpenSudokuLib Classes, I created a Java Applet which runs in a webbrowser.

The application runs encapsulated in a component which can be applied to any AWT Frame, as well. To do this you only need to make an instance of the class SudokuFrame and add it to a suitable container.

More

Categories: OpenSudokuLib

What is OpenSudokuLib?

Sudoku is a logic puzzle in a 9×9 square, where all columns, all rows and all 3×3 inner squares of the sudoku have to be filled with the numbers from 1 to 9. In each of these columns, rows and inner squares the numbers from 1 to 9 have to appear exactly once. OpenSudokuLib is a small and simple sudoku generator written in Java to create 9×9 sudoku squares using a backtracking method to find valid cases.

You can use this sudoku generator for free and modify it under the terms of the GNU General Public License.

Note! This project has been renamed recently from JMLSudoku to OpenSudokuLib.

More

Categories: Microcontroller

This post is about programming microcontroller using a bootloader firmware.

During the programming process of a microcontroller the application firmware has to be transferred, sooner or later, to the memory of the chip. This is normally done with a programmer device that burns the machine code to the program memory.

An optional way to program the application firmware onto the device is using a bootloader. The bootloader is a short program used to burn the firmware to the microcontroller without any programmer device, as it writes any data onto the flash memory of the device, provided to the serial interface. The process of burning the provided data to the program memory is controlled by the bootloader itself.

More

Categories: Android

Today I would like to describe how to migrate the android menu button, on devices with release older than 3.0, to the action bar using the Android Support Libraries. The menu button is well known on devices which were shipped with Android release 2.3.x and older and has been deprecated in newer releases. Actually devices which were shipped with newer releases than 2.3.x usually don’t have a hardware button which is related to the options menu. Although it is possible to emulate the hardware button using backward compatibility, it is recommended to migrate to the action bar instead.

More

Categories: Android

Recently I noticed some bug reports about a failing permission for my Android applications regarding read activities on external USB storage. Every try of the application to read items from the USB storage failed with the following error message.

java.lang.RuntimeException: 
Unable to resume activity {de.jml_port.ospfree/de.jml_port.ospfree.OSPActivity}: 
java.lang.SecurityException: External path: /mnt/sdcard/background.png: 
Neither user 14091 nor current process has android.permission.READ_EXTERNAL_STORAGE

More

Categories: Android

With the intention to get rid of hardware buttons on Android devices, the android menu button has been replaced in honeycomb release 3.0 (API level 11) and later, in favor of virtual touch fields on the screen. However the menu button won’t even be available as a virtual touch field in newer releases as of honeycomb. All those actions of your application, which were implemented in the menu, should be migrated instead to the action bar which is an Android UI item available since API level 11, though as a workaround you can rely on the backward compatibility to emulate the menu button for newer Android releases.

More

Categories: Open slide puzzle

What is open slide puzzle?

osp_icon_72x72 Open slide puzzle is a patience game where you have to rearrange the 15 tiles of a picture into the right order by sliding the single tiles to the right position. Therefore you will be able to move only one tile at once into the gap to get the puzzle solved. Although the idea of a slide puzzle is very simple, it can be challenging trying to put the right tiles together.

More

Categories: OpenSudokuLib

The core of the OpenSudokuLib engine to generate sudoku configurations is the method backTrackingRows, a backtracking method which enables the class to find a valid sudoku case.

Backtracking is a recursive algorithm which tries to find a solution by trying a certain partial path and extending it step by step until a final solution is being found. If the partial path does not fulfill the criteria of a valid solution, we have to step back and try a different path from the point where it still was satisfying the criteria.

More