http://pplware.sapo.pt/networking/criptografia-simetrica-e-assimetrica-sabe-a-diferenca/
Wednesday, December 08, 2010
Monday, November 22, 2010
the difference between include and require in php
The documentation below also applies to require(). The two constructs are identical in every way except how they handle failure. include() produces a Warning while require() results in a Fatal Error.
Friday, November 05, 2010
Remote MySQL Access
FLUSH PRIVILEGES;
We just have to tell Mysql to allow remote logins.
sudo vi /etc/mysql/my.cnf
Out-of-the-box, MySQL only allows connections from the localhost identified by the IP Address of 127.0.0.1.
We need to remove that restriction, so find the line that says
bind-address = 127.0.0.1
netstat -tupan | grep mysql
Recursively delete .svn directories
$ rm -rf 'find . -type d -name .svn'or
find . -iname ".svn" -print0 | xargs -0 rm -r
Install subversion in ubuntu 10.10
First start off by installing Apache:
sudo apt-get install apache2
Enter the root password and follow the instructions. Check that is it installed correctly by going to http://localhost
and checking that you see the standard Apache "It works!" message. Then install subversion and the subversion Apache module:
sudo apt-get install subversion libapache2-svn
Then create a directory to store repositories in:
sudo mkdir /var/svn/
sudo mkdir /var/svn/repositories
and create a test repository:
sudo svnadmin create /var/svn/repositories/test
So that Apache can read and write the repository its user (www-data
) needs to be given ownership of it:
sudo chown -R www-data:www-data /var/svn/repositories/test
To be able to authenticate users who access the repository a password file is needed:
sudo htpasswd -c /etc/subversion/passwd paul
Enter a password for the user paul
. For additional users repeat the command without the -c
option to make sure the existing file is appended to rather than replaced.
Then edit the Apache config file:
sudo gedit /etc/apache2/apache2.conf
Add the following to the end of the file:
#svn users
<Location /svn>
DAV svn
SVNParentPath /var/svn/repositories/
SVNListParentPath On
AuthType Basic
AuthName "Test"
AuthUserFile /etc/subversion/passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
Save the config file and restart Apache:
sudo /etc/init.d/apache2 restart
The Test repository can now be accessed via
http://localhost/svn/test
Wednesday, November 03, 2010
Friday, October 29, 2010
Wednesday, October 27, 2010
Monday, October 25, 2010
Sunday, October 03, 2010
Monitor Test
Os brancos têm uma diferença de 1% e os pretos e 3%.
Colocar a imagem como wallpaper e configurar o monitor de forma a ver os 5 tons
monitor.psd
Tuesday, September 21, 2010
PHP The following is an example of a class with a fluent interface implemented in PHP:
class Car { private $speed; private $color; private $doors; public function setSpeed($speed){ $this->speed = $speed; return $this; } public function setColor($color) { $this->color = $color; return $this; } public function setDoors($doors) { $this->doors = $doors; return $this; } } // Fluent interface $myCar = new Car(); $myCar->setSpeed(100)->setColor('blue')->setDoors(5); // Example without fluent interface $myCar2 = new Car(); $myCar2->setSpeed(100); $myCar2->setColor('blue'); $myCar2->setDoors(5);
Sunday, September 19, 2010
Quick Tip: Working with MySQL and SUM
In today’s quick tip screencast, we’re going to learn a MySQL query trick. You might be already familiar with the SUM() and IF() functions. We will be combining them to come up with some useful queries. This can reduce the number of queries you need to run for fetching certain types of summary data, and also provide a performance improvement.
"
Wednesday, September 15, 2010
How to find all the tables in MySQL with specific column names in them?
select table_schema, table_name, column_name
from INFORMATION_SCHEMA.COLUMNS
where column_name like 'FraUrgente';
Tuesday, August 31, 2010
Friday, August 27, 2010
Google – Chamadas gratuitas para telefones via Gmail
Thursday, August 26, 2010
Tuesday, August 24, 2010
Friday, August 20, 2010
Learn CSS Positioning in Ten Steps
Em 10 passos com exemplos:
http://www.barelyfitz.com/screencast/html-training/css/positioning/
Saturday, August 07, 2010
Adriana Lima’s comeback video
Monday, August 02, 2010
Tuesday, July 13, 2010
Friday, July 09, 2010
Monday, June 28, 2010
Monday, June 07, 2010
What is hiberfil.sys and how to delete in Windows 7 free up hard drive space
* Go to Start menu, type “cmd” open up command prompt
* Type “powercfg.exe -h off” [make sure you are an Administrator]
* ENTER
* Type “exit”
* ENTER
Thursday, May 27, 2010
Thursday, April 29, 2010
Tuesday, April 27, 2010
Don’t steal software, on the street
Apparently students from the University of Technology Sydney and Sydney TAFE are more tempted by street-side packaged software than one could possibly imagine. Microsoft Australia catches them in the act. Of course one can’t assume all of them were trying to “steal” software, at the same time that doesn’t make their reactions any less enjoyable.
Monday, April 19, 2010
Howto Install PHP and Mysql in Ubuntu 10.04
$ sudo apt-get install php5
$ sudo apt-get install mysql-server
$ sudo apt-get install php5-mysql
$ sudo /etc/init.d/apache2 restart
Saturday, April 17, 2010
TeamViewer - Acesso remoto gratuito e compartilhamento remoto da área de trabalho via Internet
TeamViewer - Acesso remoto gratuito e compartilhamento remoto da Área de trabalho via Internet
Wednesday, April 07, 2010
Tuesday, April 06, 2010
Wednesday, March 31, 2010
Windows 7 shortcuts for XP or Vista
Várias aplicações, de outros sistemas operativos imitam isto.
Apresento uma que gostei por ser muito simples.
Usar a tecla do window e depois o cursor(direita ou esquerda)
Fica o link em baixo para testar
http://lifehacker.com/5133039/windows-7-shortcuts-enables-the-best-win7-shortcuts-in-xp-or-vista
Thursday, March 18, 2010
Dica: Como somar horas no Excel
Como é habitual, gosto de partilhar estas pequenas [...]"
Wednesday, March 10, 2010
Photo Friday's Monitor Calibration Tool Makes Easy-on-the-Eyes Monitor Tweaks [Monitors]
If you're looking for a quick and easy way to adjust your monitors without a lot of fussing with multi-step processes, the calibration tool at Photo Friday can help you tweak your monitor.
Nothing is a true substitute for hardware calibration, but if you're not working in the print industry or as a professional photographer, you don't need to calibrate your monitor to match the physical world—you need to calibrate it so that the contrast is correct and you can use the monitor without straining your eyes.
Over at photography site Photo Friday, they've created a simple calibration image you can use to adjust the brightness and contrast on your monitor to an optimum level. Visit the link below and follow the simple instructions to tweak your screen.
If you like your calibration tools to have a few more sliders, bells, and whistles, check out previously reviewed Online Monitor Test. Have a favorite software or hardware tool for monitor calibration? Let's hear about it in the comments.
"
Tuesday, March 09, 2010
How to Kill a Human Being
Former Conservative MP Michael Portillo pushes his body to the brink of death in an investigation into the science of execution. As the American Supreme Court examines whether the lethal injection is causing prisoners to die in unnecessary pain, Michael sets out to find a solution which is fundamentally humane. Armed with startling new evidence, Michael considers
"Sunday, March 07, 2010
Saturday, February 06, 2010
Markets in everything
Anti-theft lunch bags. Here is the description:
...a few spots of mold may work wonders to protect your precious sandwich when your custom labels, pleading requests and desperate detective work fail to find your regular at-work lunch thief. Reusable, resealable, one-size-fits-all and ready to go right out of the box (or brown paper bag), these clever little containers from Think of The might seem more like a prank object or gag toy than a functional product but it will almost certainly deter even the hungriest of would-be food hackers.
For the pointer I thank Lawrence Rothfield, author of this excellent book.
"Git get all remote branches
git branch -r \ | grep -v '\->' \ | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" \ | while read remote; do \ git branc...
-
sh -c 'xfce4-screenshooter --fullscreen --save "$HOME/Pictures/Screenshots/Screenshot_$(date +%Y-%m-%d_%H:%M:%S).png"' s...
-
Known Issues Firefox 3.5 will only support color profiles as specified by ICC v2, later versions will add su...