Vortexmind: free your mind Tu ne cede malis sed contra audentior ito

5Dec/062

Quick Tips – Installing JINI on Gentoo with NPTL

Just a quick tips for all folks out there that are getting mad on this smiley

Problem: if you are trying to install JINI in Gentoo Linux, after you downloaded the installer starter kit you may start it and find errors like this:

grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

This seems to happen if you have compiled your glibc libraries with nptl and nptlonly USE flags. You will be unable to install JINI (and I have read that this problem could happen to other java installers. But there is an easy solution for this!

Print this post Print this post
13Nov/062

Best 10 WordPress Plugins for Google Adsense

Direttamente da quick online tips, vi rigiro la lista dei migliori plugin per wodpress in grado di integrare google adsense nel vostro blog. Proprio quello che mi serviva, dato che ad oggi usavo ancora modificare manualmente i template.

Print this post Print this post
10Oct/061

Java Threads – Runnable – Issues – Newbie Tips

Since I'm getting back on programming, I'm currently re-skilling myself on this duty. Having not programmed Java in a while, I've found myself on trouble on this simple topic: Java concurrency and threads. I will insert on the blog some "quick tutorials" about various subjects. I've found that programmers sometimes need a fast solution on a given problem. They could surely get it by looking at the API's and so on, but it costs valuable time. So I will go straight to the problem.

  • Problem: I need to do a fixed job on some data in a parallel fashion.
  • Solution: using a multi-threaded model, I have two classes Controller and Worker. Worker is essentially a thread that does the fixed job and reports the data to the Controller
  • Main issues: is it better to "extends Thread" or to" implements Runnable"? How to accessing shared variables concurrently and avoid race conditions? How to pass data from Worker to Controller?
Print this post Print this post
   
Creative Commons Licence
This work by Paolo Tagliaferri is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.