Monthly Archives: March 2012

Installing Xen-tools check_python FAILED error

If you got the error like this:

  *** check_python FAILED

Use next:

# eselect python list
Available Python interpreters:
  [1]   python2.7
  [2]   python3.2 *

And then choose 2.* one:

  # eselect python set 1

Would be helped.

Convenient way to iterate collection in Java

Simple snipet to iterate through a collection:

for(Iterator iter = itemTypeList.iterator(); iter.hasNext();)
    Items.ItemType item = (Items.ItemType);
    System.out.println( "\t" + item.getQuantity() +" copies of \"" 
        + item.getProductName() +"\"" );

Set domain name in Gentoo

You can set domain name in /etc/hosts: hostname localhost

Set in /etc/conf.d/net:

    (Set the dns_domain variable to your domain name)

    (Set the nis_domain variable to your NIS domain name)

Set in /etc/conf.d/domainname:


First method is good for me.


Response.Redirect and Thread was being aborted in C#.NET

To prevent error “Thread was being aborted” while Response.Redirect() method execute, use second parameter equals to FALSE:

    Response.Redirect("", false);

Also proof,

Delete string from array in Java

Useful snipet here:

    String s = "Some super string here...";

    // Get word list
    Pattern patTag = Pattern.compile("<.*?[^<]+>",Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE | Pattern.DOTALL);
    List aWords = new ArrayList(Arrays.asList(patTag.split(s)));
    // Deleting...
    String[] aIgnored = new String[] { "", " ", ",", ", ", ".", ". ", " ", "  " };
    aWords.removeAll(new ArrayList(Arrays.asList(aIgnored)));

As a result, we’ve clear word list.

Run NetBSD in Virtualbox

Running NetBSD in vbox may occurs some problem. To solve use VBoxSDL:

"C:\Program Files\Oracle\VirtualBox\VBoxSDL.exe" --norawr0 --startvm netbsd

where netbsd is your vm name.

How to disable kernel autoupdates in Linux

For panic admins. You could manually disable kernel automatic updates by editing file /etc/sysconfig/kernel:


Don’t forget, grub won’t be updated! Make it handly or set to “yes”!