Saturday, March 31, 2012

Finally a way to add a PDF comment within Latex - Thank you PDFCOMMENTS

For awhile now I have been looking for ways to add PDF comments within latex.

Some suggested to use: \marginpar{}

I did't like it...

This morning I stumled upon this discussion page: How to annotate PDF files generated by pdflatex?

Note, I also discovered that PDFLatex has \pdfannot command. However I couldn't figure out or find an example to make it work. If you have please let me know :)

Altough \pdfcomments package offeres some cool features I encounter a few problems with it, while using TexMaker on Ubuntu.

  1. Embedded TexMaker view doesn't allow to view annotations. It displays an icon but nothing happens when you click on it.
    1. I use external viewer for it, however not without problems: Ubuntu default viewer - Evince   - is known to have problem displaying with PDFannotiations. I switched to Okular to view the comments.
  2. \pdfmarkupcomment doesn't work - not even with Okular :(

Have fun. Comment on your experience with it.


Tuesday, October 18, 2011

Omnet++ vs Ubuntu 11.10 and the winner is....

Hey everyone,

Did you encounter any problems running Omnet++ simulation after an update to Ubuntu 11.10 (Oneiric) ?

Well if you are getting this error message:
 Error during startup: No user interface (Cmdenv, Tkenv, etc.) 
Then you will be happy to know there is a solution! Yes, all the credit goes to Omnet++ team, specially Horning Rudolf for posting the solution here.

It is very simple:

In Makefile.inc.in find the following lines (towards the end): 
CMDENV_LIBS = -u _cmdenv_lib -loppcmdenv$D -loppenvir$D 
TKENV_LIBS = -u _tkenv_lib -lopptkenv$D -loppenvir$D -lopplayout$D 
and replace them with:
CMDENV_LIBS = -u _cmdenv_lib -Wl,--no-as-needed -loppcmdenv$D -loppenvir$D 

TKENV_LIBS = -u _tkenv_lib -Wl,--no-as-needed -lopptkenv$D -loppenvir$D
-lopplayout$D 

then
./configure
make clean
make 

This should work with all omnet 4.x version. Spread the info for other users
suffering from the issue. 



That's it. Enjoy and spread the word.




Tuesday, April 19, 2011

you R - so beautiful to me :)

Need to do statistical analysis of your data, plot a graph, etc:

http://www.r-project.org/

[Update 3/12/2012]: I am using RStudio  and it's a great tool!

Monday, January 17, 2011

Binary to Decimal conversation

I've been fiddling with bits and needed to convert a set of large  binary string to decimal. In my first attempt, I applied Excel formula BIN2DEC  - worked great, but for some reason it didn't with more than 12 bits. I am not sure whether there is some sort of limitation or perhaps I missed something, but I've started to look for other ways to do the same thing.

I've found answer on this  post, in particular in one the comments that suggested to use dc - an arbitrary precision calculator:

Here is how you would convert binary to decimal it in linux:

echo "2 i BINARY BITS p" | dc

example:
echo "2 i 11000000111001 p" | dc

and decimal to binary
echo "2 o DECIMAL NUMBER p" | dc
example
echo "2 o 12345 p" | dc

That's it! Thanks to Vocho Amerillo






Wednesday, December 1, 2010

Commonly used patterns for designing Scalable System

Designing a scalable system can be a tricky thing, before you jump into action check out a great post by Ricky Ho where he describes the eight common design patterns:
  1. Load Balancer
  2. Scatter and Gather
  3. Result Cache
  4. Share Space
  5. Pipe and Filter
  6. Map Reduce
  7. Bulk Synchronous parallel 
  8. Execution Orchestrator
I think Rick done a wonderful job. Thanks ! Can you think of anything else?

Wednesday, August 11, 2010

Adventures with ØMQ and Java : Installation

ZeroMQ - "fastest. Messaging. Ever." - well we'll see about that :)

Anyway, first thing first...we need to install ZeroMQ and ZeroMQ Java bindings in my case.

I am using Ubuntu 10.4:


First. install  ZeroMQ ( follow the instruction from the webiste http://www.zeromq.org/area:download#toc1)

Next, install Java Bindings (read this http://www.zeromq.org/bindings:java) - 
Important, make sure your JAVA_HOME is set to JDK location before you run autogen.sh script run ldconfig -v  at the end if you get:
"...cannot open shared object file: No such file or directory" 
when you trying to run your application  (thanks to this post)
Don't forget to include :
java -Djava.library.path=/usr/local/lib


That's it - Happy messaging!