Category: Aprendendo

Dec 08 2010

Interative Graphic System – Graphical Computing.

Hello,

This publication brings a Interative Graphic System, it has possibility to create points, lines, polygons and curves, rotation and other operations, color in objects, and other functionalities.

IGS Final

Hope you enjoy,
Matheus

Dec 01 2010

JavaSpaces – An introductory example.

Hello,

This example, is a microblog service, “similar” to twitter. It uses JavaSpaces

JavaSpaces – example

Best Regards,
Matheus

Oct 07 2010

WebServices – An introductory example.

Hello,

This example shows on Client to a Web Service. One Web Service that is a Client too (Collector) and just a Web Service (Store)

The program used to create it was Netbeans with Glassfish. The version of Netbeans was netbeans-6.9.1-ml-java.

Client, Collector, Stores – Example of WebServices

Espero que o exemplo seja útil a você.
Matheus

Jul 26 2010

Creating a system library in Minix.

First of all go to /usr/src/include and create a header file with this structure:

NAME.h

_PROTOTYPE(int FUNCTION_NAME, (int PARAM));

Read more »

Nov 03 2009

RMVB in Movie Player with Ubuntu 9.10

Good Night,

If you are having problems to find the codecs to play RMVB. Use:

$ sudo apt-get update

For me, just this, update the sourcelist and now I can find the codecs.

Best Regards,
Matheus

Nov 03 2009

Mp3 in Rhythmbox with Ubuntu 9.10

Hello,

How to fix Rhythmbox to play Mp3?

First of all remove it with:

$ sudo apt-get remove rhythmbox –purge

Update your sourcelist:

$ sudo apt-get update

Install o Rhythmbox again:

$ sudo apt-get install rhythmbox

UPDATE: Maybe you don’t need to remove your Rhythmbox, just update the sourcelist and try to play. Then it will try to find the codecs. I think this because it solved my RMVB problem.

Best Regards,
Matheus

Reference:
Ubuntu Geek

Oct 19 2009

URL Shortener using Auto-Increment field.

Good Night,

This is a new version of URL-Shortener that don’t create random IDs to websites, it uses the auto-increment field and replace it to other base.

Read more »

Oct 19 2009

Change numeric base using Python

Hello,

How to change the numeric base of a number? This is a implementation in Python.

def convert(decimal,newBase,str,letters):
        if decimal >= newBase:
                x = decimal % newBase
                y = decimal / newBase  
                str = letters[x] + str
                if y < newBase:
                        str = letters[y] + str
                return convert(y,newBase,str,letters)  
        else:
                if len(str) == 0:
                        str = letters[decimal] + str
                return str
let = "0123456789ABCDEF"
print convert(17,16,"",let)

The variable let means what values used in the base. For an example if you want binary you should replace with 01.

Matheus

Sep 17 2009

Send files using XML-RPC in Java

Hello

Tooday Jorge send me an e-mail asking how to send files using XML-RPC. So I did some modifications in Client and Server, Java XML-RPC to do this.

I implemented this and it wasn’t so hard. I read the documentation of Apache XML-RPC to see how to send bytes. They are send using an array of bytes (byte[]) in a Base64 codification.

To create the Base64 codification I used Java Base64 in public domain.

How to get an array of bytes from a file

How to create a file from a array of bytes

XML-RPC-Transfer-file

Matheus

PS: This is just an example, any file that client ask, the server will send. It WILL BE A SYSTEM VULNERABILITY!

Aug 16 2009

Install NVIDIA Graphic Card in Ubuntu

Good Night,

If you want to install NVIDIA proprietary driver. First of all see if you don’t have any other version installed. Using Ubuntu go to: System – Administration – Hardware Drivers. Disable it if you want.

To verify the newest version http://www.nvnews.net/vbulletin/showthread.php?t=122606

1. Download the version that you want to install.

2. Access console pressing ctrl+alt+f1 (Don’t do it know!)

3. $ cd /download/place/

4. Close the GDM (Gnome Desktop Manager) using: sudo /etc/init.d/gdm stop

5. Run the installer: $ sudo sh ./Nxxx.run (maybe you will need to use chmod +x Nxxx.run)

6. During the installation choose “Update xorg.conf automaticlly..

7. Reboot your system: sudo reboot

In the portuguese version this is almost a translation of http://ubuntuforums.org/showthread.php?t=990978

Matheus