dracoblue.net

Koala Search Engine updated with "Search more"

Today I added some new features to the search engine interface at http://erstmal.com (the current home of the koala search engine).

  • "Search More"-button
  • Autofocus on search-input field
  • Info if no result was found
  • "Did you mean?"-Spellchecking feature

Bug-Reports and Comments appriciated as usual ;).

In koala by DracoBlue @ 10 Oct 2009 | 56 Words

Cache-Control revalidate

If you want to revalidate the contents of some kind of image, without delivering the entire image, on each call: no-cache-Header won't be the right choice.

You may workaround this issue, by setting:

Cache-Control: max-age=3600, must-revalidate

In by DracoBlue @ 30 Sep 2009 | 41 Words

Simple php task to run commandline in phing

In phing there is a task called

exec. Even though it provides a "passthru"-property it's not really possible to directly get the response from the output.

Since I wanted to have direct output of all data, I created an adhock-task called "run". You can add it to your phing build file, by adding this tag right before the usage.

<adhoc-task name="run">
class RunTest extends Task {
        private $dir;
        private $command;

        function setCommand($command) {
                $this->command = $command;
        }

        function setDir($dir) {
                $this->dir = $dir;
        }

        function main() {
                $this->log("Changing to: " . $this->dir);
                chdir($this->dir);
                $this->log("Executing: " . $this->command);
                system($this->command);
        }
}
</adhoc-task>

Remember, that this task does not check wether the directory exists and always requires it to be set. If you want to extend the task for your needs and mind to share it, feel free to post a reply!

In phing, php by DracoBlue @ 22 Sep 2009 | 147 Words

unknown filesystem type 'mdraid'

Today I tried to mount a raid volume by using the following command:

# mount /dev/sda1 /mnt/disk
mount: unknown filesystem type 'mdraid'

I tried to figure out how to mount this then, but was not successful by searching for a filesystem type called mdraid to install. The reason is, that the software raid system (if detected) is an extra device (next to the physical harddisks) so using the following command:

#cat /proc/mdstat
Personalities : [raid1] 
md2 : active raid1 sda3[0] sdb3[1]
      726266432 blocks [2/2] [UU]

gave me the information I needed to know.

Mounting was now very easy:

mount /dev/md2 /mnt/disk

In by DracoBlue @ 08 Sep 2009 | 116 Words

HttpBindingInfoFactoryBean for CXF Apache

Today I was checking the

JSON-Support page for the Webservice Framework CXF.

While the webservice engine works great, I was not able to enable json-support, because the class HttpBindingInfoFactoryBean gave me a NoDefFoundError.

sf.setBindingFactory(new HttpBindingInfoFactoryBean());

It seems like the

documentation is just out of date.

The proper code (like taken from the mailinglist mail)

sf.setBindingId(HttpBindingFactory.HTTP_BINDING_ID);

No everything works fine. Also the ?wsdl is still available, useful for fetching information about all available functions/methods.

In cxf, java by DracoBlue @ 15 Aug 2009 | 89 Words

Page 22 - Page 23 - Page 24

Give something back

Were my blog posts useful to you? If you want to give back, support one of these charities, too!

Report hate in social media Campact e.V. With our technology and your help, we protect the oceans from plastic waste. Gesellschaft fur Freiheitsrechte e. V. The civil eye in the mediterranean

Recent Dev-Articles

Read recently

Recent Files

About