Skip to content

Category: Aprendendo

Install Apache2, PHP5, PHPmyAdmin, MySQL

Hello, I will just show how to quickly install Apache 2, PHP5, MYSQL and PHPmyAdmin in Ubuntu. Install apache2 with: $ sudo apt-get install apache2…

Continue reading Install Apache2, PHP5, PHPmyAdmin, MySQL

Update End Point, TunnelBroker

Hello, If you want to UPDATE your tunnelbroker end point, you can use this: http://ipv4.tunnelbroker.net/ipv4_end.php There are the format that you have to use. In…

Continue reading Update End Point, TunnelBroker

Open ping in server from one IP

Good Night, If you want to enable PING in your SERVER just from ONE IP use this IPtables rule: $ sudo iptables -A INPUT -p…

Continue reading Open ping in server from one IP

Install and Configure DHCP server in Ubuntu

Good night, If you want to install DHCP server in Ubuntu, use $ sudo apt-get install dhcp3-server And then edit /etc/dhcp3/dhcpd.conf I commented all lines…

Continue reading Install and Configure DHCP server in Ubuntu

Share internet in a SERVER connected to WAN port.

Hello, The last days I keep trying to configure my server. I know how to configure the network to this: MODEM -> (eth0) Servidor (eth1)…

Continue reading Share internet in a SERVER connected to WAN port.

Install Ubuntu from Pendrive

Hello, Today I will just recomment to you the post of Juliano Martins about how o install Ubuntu from pendrive. UPDATE: In the last days…

Continue reading Install Ubuntu from Pendrive

Client and Server, Java XML-RPC

Good night,

A few days ago I created a XML-RPC server to test some functions. What is XML-RPC? XML-RPC is a remote procedure call (RPC) protocol which uses XML to encode its calls and HTTP as a transport mechanism.(wikipedia) To start using XML-RPC in Java I used apache xml-rpc.

Example client and server XML-RPC.

Best Regards,
Matheus
Continue reading Client and Server, Java XML-RPC

Creating your own Url shortener.

Good Night,

Here I will show you how to create your own url shortener.

First of all you need to create a table like this:

CREATE TABLE IF NOT EXISTS `urls` (
`uid` int(11) NOT NULL auto_increment,
`url` text default NULL,
`unique_chars` varchar(25) BINARY NOT NULL,
PRIMARY KEY (`uid`),
UNIQUE KEY `unique_chars` (`unique_chars`)
);

This code was taken from Abhise in this post "Create your own tinyurl with php and mySQL" that was my bigest reference, from it I took some functions and update other ones to be more efficient. For an example I changed the field to BINARY so it be CASE SENSITIVE (aaaa different from AAAA)

The Abhise says to create many files, I particularly, created one file with all functions where I add all the functions and just called the functions in the files.

Continue reading Creating your own Url shortener.

Linked List, Data Structure

Hello,

What is a Linked List? Linked-list is a list that each element has a pointer to the next one.

The professor once again send us an enunciation to solve and it is too big. And I will not translate it. Inside the problem it have a Linked list.

Problem using linked-list..

Regards,
Matheus

PS: You can see the enunciation in portuguese and then use google translate to translate it

Continue reading Linked List, Data Structure

List, with pointers, Data Structure

Hello,

Today I will introduce you to a list using pointers. This list doesn't have limit of elements (if you have infinite memory). Again the enunciation is too big, so take the file, read it and learn.

Stack with pointers implementation

Regards,
Matheus

PS: You can see the enunciation in portuguese and then use google translate to translate it
Continue reading List, with pointers, Data Structure