8.12.14

Setting up hot corner + expose effect in XFCE on Linux Mint

Setting up hot corner + expose effect in XFCE was already discussed somewhere else here http://forum.xfce.org/viewtopic.php?id=8105, so I could not claim I'm first in that respect.

However I could not find step-by-step solution for Linux Mint, thus I'm sharing the steps here.

1. Install brightside (via Synatic Package Manager or apt-get).

2. Install skippy-xd (https://code.google.com/p/skippy-xd/). You'll need to compile from source for this one.

- Download the source (https://github.com/richardgv/skippy-xd)
- Install required development packages (https://code.google.com/p/skippy-xd/wiki/Installation)

sudo apt-get install libimlib2-dev libfontconfig1-dev libfreetype6-dev libx11-dev libxext-dev libxft-dev libxrender-dev zlib1g-dev libxinerama-dev libxcomposite-dev libxdamage-dev libxfixes-dev libxmu-dev

- Extract the source (unzip).
- cd into the source folder, then

make

followed by

sudo make install

which would install skippy-xd into /usr/bin

3. Run brightside-properties, and set Custom action... > On entering region to skippy-xd.

4. To wrap things up, add brightside to your list of Application Autostart.

7.12.14

How many cows are required per farm so as the probability of getting at least one diseased cow is 70%?

Today I stumbled upon a problem during a student presentation.

How many cows are required per farm so as the probability of getting at least one diseased cow is 70% (acceptable level to us, using area under ROC cutoff point), given that the disease prevalence is 25%?

My solution for this problem is by using binomial distribution. The following is the formula for the distribution,
In our context,

x, number of success
n, sample size
p, prevalence

and to solve our problem

p(1 or more) = 1 - p(0)

Using spreadsheet, we can find the value of n iteratively (I prefer LibreOffice Calc). Just key in the following function (or just put up the formula above)

=1 - BINOMDIST(n, x, p, 1)

thus in our context

=1 - BINOMDIST(n, 0, 0.25, 1)

after playing around with n, I found

for n = 4, p(1 or more) = 1 - 0.316 = 0.684

for n = 5, p(1 or more) = 1 - 0.237 = 0.763

I'd go for 5 cows...

4.12.14

Installing STATA 11 on Linux Mint

I could not manage to run the provided install script to install STATA 11/SE on my Linux Mint LMDE 201403 system, so I went through the script itself and did everything manually.

The steps were as follows:

1. Copy unix/linux.64 contents to local disk, let say to ~/Downloads/stata11. The files are

ls

ado.taz  base.taz  bins.taz  install  setrwxp  utilities.taz

2. Create installation folder /usr/local/stata11

sudo /usr/local/stata11

3. Create symlink to the folder

sudo ln -s /usr/local/stata11 /usr/local/stata

4. Copy all files to /usr/local/stata11

sudo cp ~/Downloads/stata11/* /usr/local/stata11

5. Uncompress all .taz files

cd /usr/local/stata11
sudo uncompress *.taz

would result in:

ls

ado.tar  base.tar  bins.tar  install  setrwxp  utilities.tar

6. Untar all .tar files

tar -xof ado.tar
tar -xof base.tar
tar -xof bins.tar
tar -xof utilities.tar

would result in:

ls

ado     stata  stata.lic  stata_pdf utilities  xstata-se
auto.dta     stata11.png  stata-mp   stata-se xstata
isstata.110  stata_br  stata.msg  stinit xstata-mp

in addition to all our installation files listed above.

7. Remove all .tar files

rm *.tar

8. Set permission using setrwxp script

sudo ./setrwxp

9. Once done, just remove install and setrwxp from the folder

sudo rm install setrwxp

10. Start license authorization

sudo ./stinit

11. Once done with license authorization, try running STATA 11/SE GUI version.

./xstata-se

You will get a number of errors. The following are the errors with solution:

./xstata-se: error while loading shared libraries: libtiff.so.3: cannot open shared object file: No such file or directory

Check whether you have libtiff4. If not install using Synaptic Package Manager or apt-get. Then make symlink to libtiff.so.4

sudo ln -s x86_64-linux-gnu/libtiff.so.4 libtiff.so.3

Followed by

./xstata-se: error while loading shared libraries: libgtksourceview-1.0.so.0: cannot open shared object file: No such file or directory

Install libgtksourceview2.0-0 using Synaptic Package Manager or apt-get

sudo ln -s libgtksourceview-2.0.so.0 libgtksourceview-1.0.so.0

12. Run STATA again

./xstata-se

13. To be able to run directly from Terminal without going to /usr/local/stata11 folder, set your path in ~/.profile

gedit ~/.profile

and edit this line

PATH="$HOME/bin:$PATH"

to

PATH="$HOME/bin:$PATH:/usr/local/stata"

Log out and log in again to apply the change.