Friday, December 19, 2014

How to connect Ubuntu 12.04 LTS to Android Device using MTP

Observations:
  • Modern android versions doesn't support "USB Mass Storage" connection, only MTP
  • Old Ubuntu versions (mine was 12.04 LTS) doesn't have the proper dependencies installed by default. Heard 13.04 does.

Tutorial that worked for me:

http://www.humans-enabled.com/2011/12/how-to-fix-samsung-galaxy-nexus-mtp.html

Monday, November 17, 2014

How to use fancyBox

Tips:
  • use this tutorial: http://fancybox.net/howto
  • if it's an image
    • if the URL of the fancyBoxed doesn't end with it's extention, e.g. .png, .jpg
      • you need to specify the image type on your js: 
        • $(document).ready(function() {
                  $(".fancybox").fancybox({type : "image"});
                  });

Monday, November 10, 2014

How to install and run QtiPlot on Linux

Download Demo/Evaluation version on this website:
http://www.qtiplot.com/download.html

For running, just execute the qtiplot executable file under the root directory
./qtiplot-0.9.8.7/qtiplot

I had the following problem. Due to x86 x64 compatibility, the library libGLU.so.1 x86 version was not installed.
./qtiplot-0.9.8.7/qtiplot: error while loading shared libraries: libGLU.so.1: cannot open shared object file: No such file or directory

To solve:
sudo apt-get install libglu1-mesa:i386 - or try to get libglu-1XXX (other version)

Thursday, October 30, 2014

Gimp Tips

select rectangle selection as new image
edit > cut, then file > create > from clipboard

Mint 15

General
    Add on "Vimium"
    Add on "BlockSite"
    Unity (sudo apt-get install unity  gnome-session)
    Preload (Software Manager)

Video
    Bumblebee Project


Configs
    Desabilitar Plugin:
        No terminal, digite: gksu gedit. Edit > Preferences > Plugins > and uncheck the File Browser Panel

Sunday, October 26, 2014

Thursday, October 23, 2014

Aprendizados da aula SBVB 23/10

  • Não usar o netbeans com a pasta CATALINA_HOME na pasta oculta do netbeans (~/.netbeans/...).
  • adicionar mysql.driver
    • No tomcat, adicione o driver .jar na pasta tomcat/lib
    • No netbeans, ir em libs e adicionar o driver (isto no menu lateral esquerdo, na aba "Projects"
    • Depois, usar o código "Class.forName...". OBS: Se os dados da conexão estiverem errados, vai dar um erro de classNotFoundException
  • "automatic Lucas's method"
    • Usar o "automatic Lucas's method" para quando buildar, copiar automaticamente o arquivo para a pasta do tomcat
      • vá no seu projeto>nbproject>axis2-build
      • na tag xml '<target name="axis2-deploy-dir"...' copie toda a tag interna "<copy>" e cole dentro da tah '<target name="axis2-aar" depends="compile">'.
      • Agora, da tag '<copy>' copiada, altere a propriedade 'toDir' para o diretório aonde o arquivo .aar do seu service deve estar (o meu foi: /usr/share/tomcat-7.0.34/webapps/axis2/WEB-INF/services)

Sunday, October 19, 2014

How to install netbeans with axis2 and tomcat

https://www.youtube.com/watch?v=PQw4YJ20x4o

Attention:

Download netbeans >7.4 (older than 7.4)

Remember to alter the users from the netbeans folder, not from tomcat
YOURACCOUNTNAME/.netbeans\7.1.2\apache-tomcat-7.0.22.0_base\conf (explanation: http://stackoverflow.com/questions/14942691/403-access-denied-on-tomcat-7-to-access-host-manager)

Monday, October 13, 2014

How to install and run XIlink ISE Webpack


Notas da instalação do Xilink Ise

Install Webpack Edition

Licence:
https://www.del.ufrj.br/pastas-das-disciplinas/eel480-sistemas-digitais/licenca-do-ise-webpack/view


How to run:
source /opt/Xilinx/13.3/ISE_DS/settings64.sh
ise

Friday, October 3, 2014

How to install Maven on Ubuntu

  1. Extract the distribution archive, i.e. apache-maven-3.2.3-bin.tar.gz to the directory you wish to install Maven 3.2.3. These instructions assume you chose /usr/local/apache-maven-3.2.3.
  2.  Edit the profile file, to add environment variables
    1. sudo gedit /etc/profile
  3. Add to the end
    1. #MAVEN
      M2_HOME=/usr/local/apache-maven-3.2.3
      M2=$M2_HOME/bin
      PATH=$M2:$PATH

      export M2_HOME
      export M2

      export PATH
  4.  To update the environment:
    1. source /etc/profile 
    2. . /etc/profile  (with the space)
  5.  Run mvn --version to verify that it is correctly installed.

Wednesday, October 1, 2014

Jars necessários de se incluir no Jersey 2.12 para se ter suporte a JSON

Jars necessários de se incluir no Jersey 2.12 para se ter suporte a JSON

jersey-json.jar
jersey-media-moxy-2.12.jar
org.eclipse.persistence.antlr-2.6.0-M3.jar
org.eclipse.persistence.asm-2.6.0-M3.jar
org.eclipse.persistence.core-2.6.0-M3.jar
org.eclipse.persistence.moxy-2.6.0-M3.jar



Download pack:
https://www.dropbox.com/sh/kyo5wji1gqlr3v0/AAB7FWHOeiSSQJes7ubAtNCra?dl=0

Thursday, May 1, 2014

How to configure Tomcat7 Server with Mysql database on Amazon EC2 Amazon AMI distribution


Posso usar este tutorial:
http://wpcertification.blogspot.com.br/2014/02/install-apache-tomcat-on-amazon-ec2.html

Connect to Amazon Server:
ssh -i learnbyheart.pem ec2-user@54.173.106.139

Porem, é preciso atualizaro iptables de forma que o tomcat comece a escutar a porta 80. (A 8080 também não pegará sem os comandos abaixos):
# cria a roda da porta 80 para 8080.
sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
# salva a rota.
sudo service iptables save
# reinicia a tabela de rotas.
sudo service iptables restart
 

Mysql Installation:
# recebe permissao de root.
sudo su

# instala o pacote do mysql.
yum install mysql mysql-server mysql-libs

# inicia o servico.
service mysqld start

# configura a inicializacao.
chkconfig --levels 235 mysqld on

# inicia as configuracoes (IMPORTANTE - para configurar os privilegios iniciais).
mysql_secure_installation

mysql -u root -p
CREATE DATABASE db_learnbyheart;
CREATE USER 'learnbyheart'@'localhost' IDENTIFIED BY 'lbhpwd';
GRANT ALL ON db_learnbyheart.* TO 'learnbyheart'@'localhost';
FLUSH PRIVILEGES;

How to upload file
(don't forget to restart tomcat, or reload axis... to make the updates take effects)
  •  scp -i learnbyheart.pem /usr/share/tomcat-7.0.34/webapps/axis2/WEB-INF/services/Cloud.aar ec2-user@54.173.106.139:~
  • scp -i learnbyheart.pem /usr/share/tomcat-7.0.34/webapps/axis2/WEB-INF/services/Cloud.aar ec2-user@54.173.106.139:/usr/share/tomcat7/webapps/axis2/WEB-INF/services/


Os comandos acima foram retirados deste tutorial mais completo:
http://www.wbotelhos.com/amazon-ec2-com-java-mysql-e-tomcat 

Friday, February 28, 2014

How to configure MySQL DB Connector on Tomcat7

Frist, add the db connector driver .jar to the folder ...tomcat7/lib

Then, add the following code before DriverManager.getConnection(...);

Class.forName("com.mysql.jdbc.Driver");


IT's done!

Thursday, February 27, 2014

Change the computer resolution Ubuntu

[this process was accomplished using Ubuntu 12.04 LTS]

Commands:

xrandr // get the currently display modes

xrandr --output LVDS1 --scale XxX  // scale the image

xrandr --output LVDS1 --panning 1640x922 // change the resolution output


I used this sentence:
xrandr --output LVDS1 --scale 1.2x1.2 --panning 1640x922
xrandr --output LVDS1 --scale 1x1 --panning 1366x768

Wednesday, January 8, 2014

How to reload printer cartridge?

Open a hole at the top of the cartridge

Load 2ml of ink into a syringe.

Insert the syringe into the cartridge foam.

Slowly press the syringe to transfer the ink to the cartridge

Then, use a toilet paper to blow the hole of the cartridge ( the toilet paper is useful to no dirty your mouth) till the ink start to get out of the cartridge.

Cover the hole of the catridge.

It's ready!