Skip to content

The possibility to implement search engine suggestion has appeared in DataparkSearch Engine back in 2009. To do that a new command MakePrefixes has been implemented. This command makes automatically all prefixes for every word indexed. To enable this feature, add the following command into your configuration file:


MakePrefixes yes

...continue reading "Search engine suggestions with DataparkSearch"

A new utility, dpurl2text, has been added in the latest snapshot of DataparkSesarch Engine.

This utility allows you to see all document sections as they were parsed or acquired by DataparkSeacrh for the URL provided for the default or specified configuration.

It's a debugging tool for the DataparkSearch Engine helping to check if all works as expected in document parsing.

I've finally set-up my RaspberryPi laptop and played with it.

The main aim is to test DataparkSearch Engine on a new architecture. And the first step was to test libdp, an auxiliary library implementing some libc functions in a more efficient way (see Speed it up, a bit).

To compare performance with and without libdp, I've executed two browser tests (Speed Battle and Peacekeeper) with Midori browser which is a default browser in Raspbian. Here are the results:

Speed Battle
Calculate Store Render Overall
0.59 0.67 0.9 1.44 0.98 1.03 2.47 3.14
0.31 0.52 1.03 1.03 1.02 1.07 2.36 2.62
0.62 0.56 0.59 0.96 1.02 1.08 2.23 2.6
0.3 0.74 1.05 1.12 1.06 1.08 2.41 2.94
0.59 0.74 1.07 0.98 1.06 1.06 2.72 2.78
Average
0.482 0.646 0.928 1.106 1.028 1.064 2.438 2.816

The results of this test are float, so I made 5 runs for each case. The average overall result is greater by approx. 15% with libdp preloaded (green background).

Peacekeeper
Without libdp With libdp
46 48

The results of this tests are stable for every run. It's about 4% increase with lidbdp.

If you would like to try libdp on RaspberryPi here is an instruction how to install it:

  1. Install autotools:
    sudo apt-get install automake autoconf libtool
  2. Download libdp:
    wget -c https://dataparksearch.googlecode.com/files/libdp-4.54-2013-10-02.tar.gz
  3. Extract it:
    tar -xzf libdp-4.54-2013-10-02.tar.gz
  4. Enter into the directory libdp-4.54-2013-10-02:
    cd libdp-4.54-2013-10-02
  5. Generate configure and making files:
    ./bootstrap
  6. Make it:
    make
  7. Install it:
    sudo make install
  8. Add the full path to the libdp into your /etc/ld.so.preload file with your favourite text editor (suppose it's vi):
    sudo vi /etc/ld.so.preload

    and add the following line:

    /usr/local/dpsearch/lib/libdp-4.so
  9. If you don't need autotools anymore deinstall them:
    sudo apt-get purge automake autoconf libtool
    sudo apt-get autoremove
    sudo apt-get clean
    

    The last two command remove automatically installed dependency packages and clean up local cache of downloaded packages. You may skip these if you don't need it.

  10. Reboot your RaspberyPi

Please note, the performance advantage is not guaranteed, you may got it decreased for some applications.

A new document section, "IP", has been introduced in the latest snapshot of DataparkSearch: dpsearch-4.54-2013-07-07.tar.bz2.

The "IP" section contains the IP-address where the document has been dounloaded from. If you need to store this data into the database add this line into your sections.conf file:

Section IP 0 45

Then the value of ip-address will be written into urlinfo table with sname='ip'.

The Lawnmower is the problem B of the Google Code Jam 2013 Qualification round.

The suggested solution in the Contest analysis is to try to cut grace on every row and column to the maximum height found on this row or column then compare the pattern got with the pattern given.

My approach is different. For any given cell on the lawn we can detect is there a cell with bigger height on a way to the border (we check for all four directions), if so we can't not cut on this direction to achieve desired pattern. The advantage of this solution is that we can detect negative answer much quicker.

Here is my solution for this problem in C language:


#include <stdio.h>

main() {
  int i, T, M, N, n, m, x;
  int res;

  scanf("%d\n", &T);
  for (i = 0; i < T; i++) {
    printf("Case #%d: ", i + 1);
    scanf("%d %d\n", &N, &M);
    {
      int L[N][M];
      res = 1;
      for (n = 0; n < N; n++) {
	for (m = 0; m < M; m++) {
	  scanf("%d", &L[n][m]);
	}
      }
      for (n = 0; n < N && res; n++) {
	for (m = 0; m < M && res; m++) {
	  int res1 = 1, res2 = 1, res3 = 1, res4 = 1;
	  for (x = m - 1; x >= 0 && res1; x--) if (L[n][m] < L[n][x]) res1 = 0;
	  for (x = m + 1; x < M && res2; x++) if (L[n][m] < L[n][x]) res2 = 0;
	  if ((res1 + res2) != 2) {
	    for (x = n - 1; x >= 0 && res3; x--) if (L[n][m] < L[x][m]) res3 = 0;
	    for (x = n + 1; x < N && res4; x++) if (L[n][m] < L[x][m]) res4 = 0;
	  }
	  if ((res1 == 1 && res2 == 1) || (res3 == 1 && res4 == 1)) {
	    res = 1;
	  } else res = 0;
	}
      }
      if (res) printf("YES\n");
      else printf("NO\n");
    }
  }
}

1

Vivid Sydney is a festival of light coming to the town at the eve of winter. This year they made an aquatic show in Darling harbour which is awesome:

This video's been shot on the second day of the show. Since then they've added a giant fountain in the centre of Cockle Bay making it more spectacular.

Unfortunately, today is the last day you can see it - Vivid Sydney is saying goodbay till the next year.

If you have GTK modal windows broken on Ubuntu 12.04 (assuming they were working properly before), try to deinstall the following packages:


overlay-scrollbar, liboverlay-scrollbar-0.2-0, liboverlay-scrollbar3-0.2-0

After I removed them from my system, I lost that fancy Mac-style scrolling bars, but the modality is working properly again.

8

A short instruction how to make AUSkey working under Ubuntu 12.04 with Firefox browser and OpenJDK:

  • deinstall all icedtea-6-plugin and icedtea-7-plugin:
    sudo apt-get remove icedtea-6-plugin icedtea-7-plugin
  • install OpenJDK 1.7, pkg-config and firefox-dev packages:
    sudo apt-get install openjdk-7-jdk pkg-config firefox-dev
  • get sources for icedtea-web-1.2:
    apt-get source icedtea-7-plugin
  • put the patch into directory icedtea-web-1.2/netx/net/sourceforge/jnlp/runtime then apply it:
    patch < JNLPClassLoader.java.patch

    Please note: the patch JNLPClassLoader.java.patch is in zip archive, you need to unzip it beforehand.

  • return to the directory icedte-web-1.2 and run
    ./configure --with-jdk-home=/usr/lib/jvm/java-7-openjdk-amd64
    please mind to adjust directory above according to the architecture of your PC (it could be i386 or other).

  • then execute

      make
      sudo make install
    

  • put AUSkey resource jars into jre/lib/ext subdirectory of JDK (e.g. /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext in my case).
    Please note: if you have these files already installed, you need to remove them if configure fails.
  • and make alternatives for firefox plugin and Web Start utils:

    update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /usr/local/lib/IcedTeaPlugin.so 2012
    update-alternatives --install /usr/bin/javaws javaws /usr/local/bin/javaws 2012
    update-alternatives --install /usr/bin/itweb-settings itweb-settings /usr/local/bin/itweb-settings 2012
    

Now start the Firefox and it has to be working with AUSkey.

Final note: I've worked with signed jars received from AUSkey Help desk, if they haven't updated their Linux distribution yet, please ask these jars from AUSkey Help desk.

I'm not familiar with Java or its security, if this patch makes a breach in web-browser security, let me know.

The idea where to look for the problem and how to fix this issue came from this Thomas Meyer's post. Thank you, Thomas.


Blue Mist smile's Fundraising Page