Monday, 14 October 2013

My Android device as Remote Control!

Last night  I was watching Iron Man 3 on my computer, ehmmm no, my computer was connected on  tv and I was watching Iron Man on my tv. While I was watching my film, a whatsapp notification came out from my telphone!

DAMN! I MUST STOP THE FILM! I MUST TO GET  UP FROM MY CHAIR!

So I thought to myself "mmmmm probably there is some program to use my telephone as a remote control for VLC player on my computer" and then I found it! In the next few line I will explain as transforms you android device in a remote control.

First : your device and your computer must be connected at the same wi-fi connection. You must have vlc player on you computer, download it from http://www.videolan.org/vlc/ and you must download on your android device this program https://play.google.com/store/apps/details?id=org.peterbaldwin.client.android.vlcremote&hl=it . 


Now, after you have installed VLC on you computer, open it and go under Tools->Preferences. 
In the bottom right corner select "all" in show settings box. In " Interface" voice, click on "Main Interface" and select only "web" on "Extra Interface Modules". Click on triangle icon on "Main Interface" and click on Lua. Insert password on Lua http box. Save and restart VLC. 

Open a Windows Shell ( insert cmd on search program on windows) and insert ipconfig. Get your ip address,we will use after.If you have some problem to find your ip check the image.



From android device, open VLC remote and click on Add VLC Server. Now insert into dialog box ,the ip adress that you have find before and hit ok and insert the password into password dialog box that will open.
Well, now you can control your vlc from your CHAIR!

Monday, 7 October 2013

Export variable Java Linux! I see the light!

Why you don't find java or javac command in my terminal? I suppose  you have installed it, then because you don't find it? Maybe some malignant entities into your computer has removed java or maybe not.....where is the light in all of this?

It is simple! YOU MUST EXPORT JAVA_HOME! Java has an home? cool! 

Let's do it!

(This process set permantely your java variable into your computer)

  1. Open terminal in linux.
  2. If you don't know where is java is located, write in terminal: whereis java. A possible set of results can be:
    Save path that ending with ..../bin/java
  3. Now, write in your console: sudo nano /etc/profile and write at finsh of file these line:
    and instead of /home/lorenzo/Documenti/jdk1.7.0_25/bin insert the path, without the final words /java, that you have saved it before.
  4. Hit ctrl+o and press enter and hit ctrl+x.
  5. Write in console source /etc/profile 
  6. And work is complete!
FINISH HIM! (ehmm take out MortalKombat...)

Saturday, 5 October 2013

Damn! How to set image in a landscape mode into Lyx.

Ok. Finally i've discovered the magic formula to set a image in landscape mode into lyx, with custom margin.

The ingredients are these: 
  1. Modify Document preamble: go to Document->Settings->LaTextPreamble and add: 
    \usepackage{pdflscape}
    \usepackage{changepage}
    \usepackage{anysize}
  2. Before you insert the image, add a LaText box code (or hit CTRL+L) and insert: \marginsize{3cm}{2cm}{0cm}{1cm} % left rigth top bottom
    \begin{landscape}
  3.  Add Image (Insert->Image or Insert ->Floating Object and after, Insert->Image).
  4. Set image size: mouse right click on image and select Settings.
  5. After Image add another  LaText box code and insert: \end{landscape}
  6. Optionally: if you want change margin, add another time  \marginsize{3cm}{2cm}{0cm}{1cm} % left rigth top bottom with your preffered values.
This is the result: