Thursday, September 20, 2012

Garageplatsen.se

Vill tipsa om den eminenta sajten Garageplatsen.se där du både kan hyra och hyra ut parkeringsplatser, dessutom är det gratis för privatpersoner!

Thursday, March 01, 2012

Watch out for using the same drawable reference on an maps overlay and on a dialog

I've been having problems where I display multiple items on an overlay.
When displaying an alert dialog on top, some of the items got corrupted, and remained so even when closing the alert dialog.

When you create an overlay item, you define the drawable draw bounds by issuing boundCenter(drawable) or boundCenterBottom(drawable).

The problem was that I used the same drawable as an icon on the alert dialog displayed on top. The dialog somehow altered the draw bounds under rendering which caused the overlay item to be corrupt.

The fix is to use separate drawable instances for the overlay and alert dialog

Labels:

Sunday, February 26, 2012

Android, Creating a progress bar of custom size

By default, android gives you a small and a large sized spinner progress bar.
What if you want a spinner of a different size?
Easy, create a custom style in styles.xml in res/values




Trim the width / height values to your liking.

Define the progress bar in your view.xml and point to the style that you previously defined.

style="@style/Widget.ProgressBar.Medium"
android:id="@+id/progressBar1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>

Hope this helped!

Sunday, June 12, 2011

Make launching spotify links from the browser work again in Natty 11.04

New distribution means new bugs, right?

Natty 11.04 broke the URI passing, disabling the possibility to launch spotify links from the browser.

Replace your spotify.desktop file in:
/usr/share/applications
with:

[Desktop Entry]
Name=Spotify
GenericName=Spotify
Comment=Listen to music using Spotify
Icon=spotify-linux-512x512
TryExec=spotify
Exec=spotify -uri %u ""
MimeType=x-scheme-handler/spotify;
Terminal=false
Type=Application
Categories=Qt;AudioVideo

to make it work again.

Oh, you do need to update the database by issuing:

sudo update-desktop-database

afterwards.

Wednesday, February 24, 2010

Speeding up builds using ccache

You probably know this but here is an article on how to speed up compiles using ccache:

Labels:

Monday, January 18, 2010

Disassembling a Synology USB Station SUS-201



So I got bored while doing a backup of a usb disk and disassembled an older Synology SUS-201 disk station. This product contains a 10/100 MAC and two usb connectors for connecting harddrives to.

The unit consists of a RDC SoC processor, 32 MB FLASH, 16 MB SDRAM and a 10/100 Ethernet PHY.

There are some debug pins available and when inspecting the PCB carefully you can see where the test probes have been sitting. If I had an oscilloscope I'd try to see if I could find the serial port and work from there, but that's an adventure for another day.






Saturday, January 09, 2010

Karmic, Cups and the root password

Just a short note.

I've been having problems with creating a new printer profile using cups.
Cups kept prompting for the root password but wouldn't accept it.

Turns out you need to be able to login as root directly.
This is done by executing: sudo passwd root
in a terminal. Afterwards, cups performed as intended, go figure!

Labels: , , , , ,