maanantai 24. elokuuta 2020

Vivaldi M3 Email Client

 See this link for the latest forum posts about the Vivaldi M3 email client.

torstai 1. maaliskuuta 2018

Safari audio draining iPhone battery

I see iPhone owners reporting high battery usage caused by "Safari Audio" (Settings > Battery > Battery Usage).

Make sure that Safari Favourites have no bookmarks to pages with embedded autoplay audio or video streams. After removing the bookmark restart the phone.

sunnuntai 4. huhtikuuta 2010

Realtek RTL8185L based WLAN NIC in Ubuntu Linux

Deltaco Wireless PCI LAN Adapter is an affordable WLAN NIC (12,50 € in Finland). It is based on Realtek RTL8185L chip and is recognized by Ubuntu Lucid with the kernel module "rtl8180". However, the link quality is poor, around 15/100.

This driver specific problem can solved by using the kernel module "r8185b" provided by Realtek. In my case the link quality increased 500%... being now around 75/100.

  1. Download the driver package.
  2. Unpack .tar.gz: tar xzvf rtl8185*.tar.gz
  3. Change current directory to rtl8185: cd rtl8185*/rtl8185
  4. Use your favourite text editor to comment out or remove the line 2065 in a file r8180_core.c:
    // rdtsc_rtl(prism_hdr[5], prism_hdr[4]);
    for avoiding the compile time error "implicit declaration of function ‘rdtsc_rtl’".
  5. Compile the module: make
  6. Install the module: sudo make install
  7. Add the module "rtl8180" to blacklist: echo "blacklist rtl8180" | sudo tee /etc/modprobe.d/blacklist-rtl8180.conf
  8. Reboot the machine.

lauantai 13. helmikuuta 2010

Apache Ant: Retrieving file only if it does not exist

Apache Ant 1.8 has a nice new feature (thanks to David M. Lloyd) for retrieving files with the get task only if they do not exist locally. The task attribute is called "skipexisting":
<target name="-pre-compile">
  <get src="http://hsql.sourceforge.net/m2-repo/com/h2database/h2/1.2.128/h2-1.2.128.jar"
       dest="lib/h2-stable.jar"
       usetimestamp="true"
       skipexisting="true" />
</target>

Ant 1.7 (or earlier) equivalent would be something like this:

<target name="-pre-compile">
  <available property="exists.h2" file="lib/h2-stable.jar" />
  <antcall target="get-h2" />
</target>

<target name="get-h2" unless="exists.h2">
  <get src="http://hsql.sourceforge.net/m2-repo/com/h2database/h2/1.2.128/h2-1.2.128.jar"
       dest="lib/h2-stable.jar" usetimestamp="true" />
</target>

tiistai 9. helmikuuta 2010

Choosing font for displaying source code

What comes to programming — I've been happy with the default font settings of IDEs like Eclipse or NetBeans. However, one day I had to get a summation operator (capital sigma, Σ) to work in a Java source code. It is not a Latin1 character and I changed the source code encoding to UTF-8.

Now comes the font part of the issue: NetBeans default font, Bitstream Vera Sans Mono, doesn't support capital sigma and after changing the source code encoding to UTF-8, the sigma character was still displayed as an empty rectangle.

So, I changed the default source code font to Courier New and voilà — everything was fine... except one thing: Courier New does not look good.

So, I tried all the monospaced fonts installed in my Kubuntu Karmic desktop and ended up to choose DejaVu Sans Mono as my programming font. It supports capital sigma and looks good. The best competitor for it was Liberation Mono but in my eyes DejaVu looks more readable.