Friday, October 25, 2013

How to install the SBVBLib?

[this process was accomplished on Ubuntu 12.04 LTS using Netbeans IDE 7.3.1 C/C++]

Download the VBLib:
[link]

Extract it wherever you want.

Then, on your Eclipse IDE:
right click on your project > properties > Build > C++ Compiler > Include Directories.

Add the path to the library. Mine was:
../sbvblibs-h/include

Ok, we're finished!

Now you can include the lib to your project, like this:
#include "VBLib/VBLib.h"

And namespacing:
using namespace br::com::sbVB::VBLib;

More information about header only libraries:
http://stackoverflow.com/questions/14287817/how-do-you-add-libraries-to-eclipse-cdt-no-such-file-or-directory

How to install QT Digia?

[tested on Ubuntu 12.04 LTS. But should work for many other platforms]

The easiest way, witch I used, was to go through the online instalation:

http://qt.digia.com/Try-Qt-Now/

Download the online installer on the above link, and run it.

It has a dependency that I had to install too:
sudo apt-get install libgl1-mesa-dev

If you difficulties on executing .run file, see:
http://lucastipss.blogspot.com.br/2013/10/ubuntu-how-to-runexecute-run-files.html

Thursday, October 24, 2013

Android Development: How to make a custom ListView item

Tutorial to make the view (without buttons and functions):

http://hmkcode.com/android-custom-listview-items-row/

Android Development: To change the titlebar background color

Notes:

    the color setted was light gray
    For <api 11, the attribute changed was windowTitleBackgroundStyle
    For >api 11, actionBarStyle


Add to the application tag, on AndroidManifest.xml:

android:theme="@style/ThemeSelector"

On values/styles.xml, it was added:

    <style name="ThemeSelector" parent="android:Theme.Light">
        <item name="android:windowTitleBackgroundStyle">@style/WindowTitleBackground</item>
    </style>

    <style name="WindowTitleBackground">   
        <item name="android:background">#E0E0E0</item>
    </style>


On values-v11/styles.xml, add:

    <style name="ThemeSelector" parent="android:Theme.Holo.Light">
        <item name="android:actionBarStyle">@style/ActionBar</item>
    </style>

    <style name="ActionBar" parent="android:style/Widget.Holo.ActionBar">   
        <item name="android:background">#E0E0E0</item>
    </style>

Tuesday, October 22, 2013

Git + GitHub Commands

touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin [url
git push -u origin master

git clean -fd   # removes all unstaged files, recursivel
git reset --hard [HEAD hash] # To reset the files to a commit point:
git clone [url]


git status                                  #see what files have been modified
git add files.txt                            #add the file.txt to the next commit
git log # use ctrl+z to finish

git add -u                                # to stage deleted files from the whole tree [more info: http://stackoverflow.com/questions/1402776/how-do-i-commit-all-deleted-files-in-git


Other resets:
http://stackoverflow.com/questions/4114095/revert-to-previous-git-commit


git push
git pull
git reflog

git rm --chached file.txt                        #basic, the opposite of git add
file ".gitignore"                            #list in there all the files to be ignored

Tuesday, October 15, 2013

Ubuntu: tips on taking ScreenShots

To take an entire desktop screenshot:
      simply press the "print screen" button

To take a print screen of a specific window || selected are:
      Search for a program called "ScreenShot" or "Take ScreenShot".

To take a screenshot (with the above features) and automatically open into GIMP:
      On the GIMP menu, go to File>Create>ScreenShot

Tuesday, October 8, 2013

Tips on VirtualBox

v.m. = "Virtual Machine"

To scale your v.m. to fullscrenn:
Go to the title bar menu on the v.m.  View>choose your prefered option. Or use the shortcuts Host (generly right ctrl [there is a popup, when you inicialize the v.m., that tells you that]) + c || Host + f

To install a Shared Folder:
Turn the v.m. off. On the main menu, go to Settings>Shared Folder and set up the folder. Then, turn your v.m. on. Go to the title menu bar, Devices>Install Guest Addition. Then go to the CD/DVD driver (on the v.m.), run the wizard and install it. Done!