About PHP 5.3 x oscommerce (deprecated functions)

June 16th, 2010

If you’re planning to upgrade your PHP5.2 to 5.3, I’d suggest you to review your web apps beforehand. Today I was testing this new version, and some of the deprecated functions -  which were to be removed only in PHP6 – are already launching error messages: At first, it is necessary to substitute all ocurrences of “<?” for it’s official equivalent “<?php“. And of course, the shorthand “<?=” must be turned into “<?php echo” The other problem is ereg* and eregi*, the deprecated regex functions, which should be replaced with their preg* equivalents. I will try to list here some of the equivalences and when possible, the regex conversion shortcuts, if any. (There’s a good article on converting these functions at http://brownfox.org/ebooks/webP/pcook/ch13_02.htm)

Conversion table for ereg* to preg* functions:

ereg* perl regex (preg*.)
ereg / eregi preg_match
Bookmark and Share

Como imprimir um livro em frente e verso

June 6th, 2010

De vez em quando eu preciso imprimir um livro em frente e verso em minha impressora e tenho um problema com a ordem de impressão. Para não perder mais (muitas) folhas, aqui estão as dicas:

  • ANTES DE IMPRIMIR, checar se a impressora está configurada para pular as páginas em branco. No driver da Canon laser, fica em Finishing > Finishing details > Skip Blank Pages Mode
  • imprimir as páginas ímpares, na ordem normal (1, 3, 5, etc);
  • imprimir as páginas pares na ordem inversa (2,4,6, etc – marcando o botão reverse order)

Só isso.  Porém tome cuidado ao imprimir o reverso, pois às vezes a impressora alimenta duas folhas ao mesmo tempo e a ordem das páginas fica trocada.

Se alguém tiver alguma outra idéia, por favor comente ;-)

Bookmark and Share

Por uma sociedade mais humana

May 20th, 2010

Quer ajudar a lutar por uma sociedade mais humana e justa? Acesse http://movimentozeitgeist.com.br/.

O movimento Zeitgeist é um projeto (muito ambicioso, concordo) de conscientização das pessoas para o cerne dos problemas que afetam nossa sociedade e nosso planeta, e ainda dá idéias de como trabalhar para mudar essa situação. Colabore!

Bookmark and Share

Achme the dead terrorist – Christmas Jingle Bombs

May 8th, 2010

Versão legendada:

Bookmark and Share

Windows explorer error not running at startup

May 8th, 2010

Run regedit from the start/search line, go to this key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

Locate the shell entry in the right pane and double click it. Replace the
contents with just:

explorer.exe

Click ok, then close the registry editor and restart the system.

Bookmark and Share

Novo serial para o Avast Free

April 23rd, 2010

Baixe o programa aqui: http://www.avast.com/pt-br/free-antivirus-download

e registre com o serial: W83324142H1400A0911-Y1W9JA2U

novo: C16378962H1200A0312-WLF9JCU6 abr/2010

ou peça um novo serial diretamente: http://www.avast.com/pt-br/registration-free-antivirus.php

Bookmark and Share

Aluno tira nota 10 em Química

March 27th, 2010

Eu acho que ele mereceria o Nobel de química…

*Prova do Curso de Química, foi perguntado: **

- Qual a diferença entre SOLUÇÃO e DISSOLUÇÃO?
Resposta de um aluno:

- Colocar UM dos POLÍTICOS BRASILEIROS num TANQUE DE ÁCIDO para que DISSOLVA é uma DISSOLUÇÃO. Colocar TODOS é uma SOLUÇÃO!*

*E completou: *

“Se Liofilizar, teremos o mais puro Extrato de Pó de M* do mundo”

Bookmark and Share

Windows 7: Finalmente vou trocar meu sistema!

January 29th, 2010

Todos que me conhecem sabem disso: eu sou totalmente averso a instalar o Windows Vista em meu computador de trabalho, devido a vários problemas, sendo o maior deles a falta de responsividade do sistema.
Entretanto, após algumas semanas usando o Windows 7 em uma máquina de testes, acredito que é hora de efetuar o upgrade aqui ;-)

(para quem quer saber por que não usar Linux: Topstyle passou a ser atualizado após vários anos.)

Alguém me acompanha?

Edit: Mudei de idéia. Não deu para aguentar todas as animações e frescuras do Windows 7 – apesar de ser possível remover, meu novo projeto é colocar os aplicativos que uso no Linux Mint ou no Ubuntu

Bookmark and Share

Financial help for burglars: indignation

January 28th, 2010

I received an email from a friend two days ago, and for my surprise it wasn’t one of those funny or simple urban legends we usually throw away without a second thought.

It was a link for the “INSS”, Brazilian’s institute of Social Health and retirement funds, where they state about a financial help for families of imprisoned people.

http://www.previdenciasocial.gov.br/conteudoDinamico.php?id=22

Yes, that’s correct: payment for families of burglars, killers or any other social threats while they are in prison!!
The more I think about it, the more I feel indignated about this. Even living in another country, I have to declare my taxes in Brazil, since I have some customers there, and thus pay taxes there. This money is partially used to HELP these people!!!

This is giving me headaches since I first heard about it. And it keeps me wondering if this kind of abuse happens in another country as well? I think not.

What kind of people is that, that can hear about an abuse like this and do NOTHING to change?

Bookmark and Share

Indignação

January 28th, 2010

Esta semana recebi um email sobre uma coisa que eu achei que nunca existiria, e que não deveria nem passar pela cabeça de um cidadão honesto. Antes de começar, o link oficial está abaixo:

http://www.previdenciasocial.gov.br/conteudoDinamico.php?id=22

Se você acessou, é isso mesmo: O INSS oferece um “auxílio-reclusão”, para ajudar aos “pobres” delinquentes e marginais que eventualmente tenham sido presos por algum motivo.

OU SEJA: a sociedade AJUDA aos presos para que suas famílias não fiquem sem suporte.

Eu pergunto: e as pessoas que foram prejudicadas pelo preso? As famílias daqueles que eventualmente não podem mais prover o sustento devido a alguma violência cometida pelo “pobre detento”?

Fazem dois dias que eu recebi esse email, e estou com essa lei absurda martelando em minha cabeça. Como é que alguém pode ter alento para trabalhar honestamente e lembrar que um ladrão / delinquente / assassino / o que for, vai preso e sua família pode receber um “auxílio-detento”?

Eu não moro no Brasil há alguns anos, mas já ouvi falar em várias bolsas para ajudar aqueles que não querem saber de nada, e que servem APENAS para atender aos apelos populistas do PT.
Mas essa idéia de que um marginal tem direito a uma ajuda maior que o salário-mínimo que muitas pessoas honestas ganham para manter suas famílias é MUITO MAIS DO QUE MINHA PACIÊNCIA AGUENTA!
Alguém aí poderia me informar quem foi o maldito legislador que inventou essa lei????

Aguardo seus comentários, por favor.

Bookmark and Share

WordPress Loves AJAX