2010
09.07

The VMware BIOS loads fast, really fast. Sometimes, it’s just too fast that you can’t press ESC to reach the boot menu.

To slow it down, locate your Virtual Machine directory and look for the .vmx file (the Virtual Machine needs to be turned off first). Add the following line in the file:

bios.bootDelay = "3000"

This should give you enough time to access the BIOS menus.

Share and Enjoy:
  • Twitter
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • LinkedIn
  • email
  • Slashdot
  • Digg
  • Netvibes
  • del.icio.us
2010
09.06

After installing the ruby plugin on IntelliJ 9.0.3, my favorite IDEA refused to start (MacOS X 10.5.8). The icon didn’t even bother bouncing on the dock and running it from the command line didn’t trigger any stacktrace:

~ > open -a /Applications/IntelliJ\ IDEA\ 9.0.3.app
~ >

To debug such issues, it is often useful to use Console (under Applications -> Utilities) which displays most system logs (syslog, …).

In this case, it showed the stacktrace also reported here:

java.lang.AssertionError: Source file ~/Library/Caches/IntelliJIdea90/plugins/ruby-12197.zip does not exist for action unzip[~/Library/Caches/IntelliJIdea90/plugins/ruby-12197.zip, ~/Library/Caches/IntelliJIdea90/plugins]
at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:49)
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:48)
at com.intellij.ide.startup.StartupActionScriptManager$UnzipCommand.execute(StartupActionScriptManager.java:189)
at com.intellij.ide.startup.StartupActionScriptManager.executeActionScript(StartupActionScriptManager.java:49)
at com.intellij.ide.ClassloaderUtil.initClassloader(ClassloaderUtil.java:123)
at com.intellij.ide.Bootstrap.main(Bootstrap.java:39)
at com.intellij.ide.Bootstrap.main(Bootstrap.java:35)
at com.intellij.idea.Main.main(Main.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)

The fix is to delete the cache (~/Library/Caches/IntelliJIdea90).

Share and Enjoy:
  • Twitter
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • LinkedIn
  • email
  • Slashdot
  • Digg
  • Netvibes
  • del.icio.us
2010
08.27

When creating extracts in Tableau, make sure to verify the ROWSETLIMIT parameter for the user connecting to Netezza.

From the manual:

ROWSETLIMIT: Specifies the number of rows a query can return. You can specify
from 1 to 2,147,483,647 rows or zero for unlimited.

For some strange reason, this parameter doesn’t affect direct queries from Tableau Desktop or Server. However, when creating extracts, the number of rows returned will be limited (silently) by ROWSETLIMIT.

To change the value:

ALTER USER tableau WITH ROWSETLIMIT 10000;
Share and Enjoy:
  • Twitter
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • LinkedIn
  • email
  • Slashdot
  • Digg
  • Netvibes
  • del.icio.us
2010
08.12

And it’s successful!

The job finished in 24 hours

The job finished in 24 hours

Share and Enjoy:
  • Twitter
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • LinkedIn
  • email
  • Slashdot
  • Digg
  • Netvibes
  • del.icio.us
2010
08.10

I never remember the syntax of Null Providers in Google Guice, posting it here for future reference.

Given a Foo feature (i.e. a Foo interface, implemented by FooImpl), the Guice config may look like:

if (isFooEnabled) {
    binder.bind(Foo.class).to(FooImpl.class);
    log.info("Foo feature enabled");
} else {
    binder.bind(Foo.class).toProvider(Providers.<Foo>of(null));
}

Don’t forget to make Foo @Nullable:

@Inject
public Something(
    @Nullable Foo foo
)
{
   this.foo = foo;
}

See a real-life example in Goodwill on github.

2010
08.04

We are in the process of open-sourcing most of the Hadoop infrastructure at Ning. Look for my blog entries on the Ning code blog:

Share and Enjoy:
  • Twitter
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • LinkedIn
  • email
  • Slashdot
  • Digg
  • Netvibes
  • del.icio.us
2009
12.14

A new contributor joined the HDT family! Jetrii managed to find some time to get us a logo and a custom design for the trac.

We launched it on Sunday. It is not fully ready yet – but you can see it in action: hdt-project.org.

Let us know what you think.

Share and Enjoy:
  • Twitter
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • LinkedIn
  • email
  • Slashdot
  • Digg
  • Netvibes
  • del.icio.us
2009
12.13

COMPILE THIS

main(k){float i,j,r,x,y=-16;while(puts(""),y++<15)for(x
=0;x++<84;putchar(" .:-;!/>)|&IH%*#"[k&15]))for(i=k=r=0;
j=r*r-i*i-2+x/25,i=2*r*i+y/10,j*j+i*i<11&&k++<111;r=j);}

More neat experiments on Ken Perlin’s homepage: http://su.pr/28J8iV.

Share and Enjoy:
  • Twitter
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • LinkedIn
  • email
  • Slashdot
  • Digg
  • Netvibes
  • del.icio.us
2009
12.02

Solaris 10 Zones fact of the day: SMBIOS data is not exported to the zones, only the host can have access to the structure:

% /usr/sbin/smbios -B
smbios: System does not export an SMBIOS table
% prtdiag
prtdiag: failed to open SMBIOS: System does not export an SMBIOS table

Is that configurable somehow?

Share and Enjoy:
  • Twitter
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • LinkedIn
  • email
  • Slashdot
  • Digg
  • Netvibes
  • del.icio.us
2009
12.01

A friend of mine pointed me to some Daemon initialization code which looked like

...
return pid if pid = fork
File.umask 0000
...

Setting the umask to 0 is quite common when writing daemons to avoid making any assumption with respect to the current umask set for the shell/parent running the daemon (the primary goal of a umask is to restrict permissions).

If the child doesn’t leverage this freedom though and doesn’t specify the permission masks when calling open(), files created will likely have -rw-rw-rw- and directories drwxrwxrwx. This can be bad as the umask will be also inherited to all child processes spawned…

Share and Enjoy:
  • Twitter
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • LinkedIn
  • email
  • Slashdot
  • Digg
  • Netvibes
  • del.icio.us