Primal Cortex’s Weblog

Amnesia sets in…

Archive for the ‘All about all’ Category

All about all…

Free/open source software

Posted by primalcortex on September 30, 2009

Why we should only use free and open sourced software:

http://yro.slashdot.org/story/09/09/30/159232/Company-Uses-DMCA-To-Take-Down-Second-Hand-Software

You not own what you’ve bought….

Posted in All about all, Geral | Leave a Comment »

Comprar casa: parte 2

Posted by primalcortex on August 3, 2009

Dicas para comprar uma casa nova.

1) Nunca compre uma casa nova com janelas de correr. São más a todos os níveis: insonorização, isolamento térmico, e já disse que eram más?. Estas janelas têm sempre folga de forma a poderem entrar no caixilho, daí terem todos os problemas acima descritos. Em casa mudei destas janelas para janelas oscilo-batente, e reduzi em 90% o consumo energético no Inverno para aquecer a casa… pois é…

Se tem janelas de correr esqueça, ou ponha no orçamento a mudança para umas Janelas a sério (sim com J maiúsculo)

2) Quartos para um lado, cozinha para o outro… A nossa cozinha e a cozinha dos vizinhos também… Veja a planta. Se um dos nossos quartos faz fronteira com a cozinha do vizinho, esqueça… Não há nada mais saudável do que alguém a lavar pratos às 2h da manhã…

3) Ar condicionado- Até agora no meio de tanta treta que ví de apartamentos de “luxo”, construcção “superior”, classe energética “A”, só um, e só um (!!!!!) tinha o ar condicionado devidamente bem montado em cima de cinoblocos de forma a reduzir/eliminar o ruído sonoro e vibratório…. mas encostado a uma parede do quarto…. Se a casa tem ar condicionado que esteja montado de preferência do lado oposto dos quartos, e os dos vizinhos também…

4) Áreas mortas: Não se deixe enganar com suítes de 25m2, quarto de 16m2, etc… Na maior parte dos casos a área do roupeiro e das casas de banhos estão incluídas, pelo que uma suíte de 25m2 é de repende um quarto de 13m2 de área REALMENTE útil….

Se está mesmo interessado no andar, peça a planta, e desenhe à escala a mobília, e vê logo o que pode meter ou não no quarto….

5) Localização: Apartamento de “luxo”, mas ao pé de uma avenida de grande tráfego, ou estádio de futebol… No primeiro caso até tem janelas oscilo-batentes com vidros duplo à prova de ruído, e bombas nucleares, mas não se podem abrir… senão ninguém se ouve dentro de casa. Estamos em casa, mas não podemos abrir as janelas… logo ar condicionado, lindo!!! :-)

Ao pé do estádio de futebol, bem, só para fans… Pois temos estacionamento selvagem, pancadaria, barulho, etc…

Ao pé de vias rápidas, é para esquecer, barulho 24h por dia, com os fans do xuning que só dormem de dia… Uma das casas até tinha vidro triplo(!!!!!), mas não se pode abrir a janela…

Posted in All about all | Tagged: , | Leave a Comment »

Comprar casa: parte 1

Posted by primalcortex on August 3, 2009

Comprar casa em Portugal é uma aventura…

Antes de nos metermos em tal aventura é preciso saber em que nos vamos meter, e principalmente saber o que vamos comprar. Na maior parte dos caso, vamos comprar uma espelunca a preços de palácios… já que a maioria dos patos bravos, nem sabe o que anda a fazer… Mas adiante.

Antes de comprar é preciso determinar aquilo que estamos disposto a gastar e o esforço que pretendemos suportar contando com as subidas de taxas de juros, spreads e custos associados.

1ª regra) Definir dois tectos: um tecto de valor ideal e um tecto o qual nunca iremos ultrapassar em termos de valor. Não queremos passar o resto da nossa vida endividados…

2ª regra) Ao valor do primeiro tecto, temos de adicionar todos os custos que vamos suportar pela compra, ou seja o IMT,  o valor das escrituras, os impostos de selo, etc. Se a soma destes valores ultrapassar o segundo tecto, é melhor baixar o valor do primeiro…

Por exemplo se quiser comprar um andar de 200 mil euros, na prática vou ter que desembolsar cerca de 220 mil euros com os impostos… Mas mesmo assim a maior parte das pessoas assina de cruz, porque acha que o andar é óptimo, e está em conta, mas depois com os impostos, a coisa fia mais fino, e de uma prestação de 500€ mês passam para uma de 600€…. porque se esqueceram dos impostos.

3ª regra: Nunca, mas nunca, compre um andar do qual não sabe qual é o valor patrimonial, ou pelo menos aproximado. Arrisca-se a uma supresa BRUTAL… (Há que diga que é roubo…)

Se o Valor Patrimonial do apartamento de 200 mil euros, for 200 mil euros, pelo menos em Lisboa significa que irá ter de pagar cerca de 1400 euros por ano em IMI… Ou seja o empréstimo de 500/600 euros já leva com mais 110 euros em cima por mês. Este imposto é insidioso porque só aparece duas vezes por ano, e lá se foi o subsídio de férias directamente para a Câmara (seja ela qual for).

Por isso informe-se muito bem:

Determine o factor base para o cálculo do Valor Patrimonial aqui: http://www.e-financas.gov.pt/SIGIMI/default.jsp

Calcule apróximadamente qual o valor patrimonial da habitação aqui: http://www.e-financas.gov.pt/SIGIMI/calculos.jsp?selTipPre=0&radFraPro=on&selTipAfe=2&txtValCons=609%2C00&txtCoeLoc=&txtIdade=&inpCQC=OUT&txtQuaConsOut=0&txtEstDefCons=0&txtLocOperRelAfecOutros=0&txtLocOperRelMin=0&txtAreBruPriFra=&txtAreTot=&txtAreTerIntFra=0&txtAreImpEdi=&txtAreBruDepFra=0&txtTotAreTerIntFra=0&txtPerFra=&inpEstado=

E veja quanto é que pagará de IMI aqui: http://www.millenniumbcp.pt/Simul/ContribuicaoAutarquica/ContribuicaoAutarquica.jhtml

Assustado?

Utilize os simuladores dos vários bancos para determinar o que pagará em termos de custos associados. Um bastante bom é o do banco BPI, embora os valores finais, impliquem que tenhamos comprado todo o tipo de produtos ao banco… Mas serve de exemplo.

4ª regra) Faça duas contas: Preço do andar a dividir pela área útil  e Preço do andar a dividir pela área bruta (inclui arrecadações, varadas, estacionamentos, etc).

Tem um valor? Vá comparando com o que for vendo. Um andar mais barato em termos totais pode ser mais caro por m2…

5ª regra) Mesmo em tempo de crise, a maior parte dos constructores, está a contar com o ovo no dito cujo da Galinha. Assumem que os bancos emprestam a 50 anos de forma a cobrir os preços exorbitantes que pedem…

Azar. Não se deixe enganar. Se comprar um andar ao lado, mais pequeno 20m2, mas mais barato 50 mil euros, a diferença paga o IMI durante anos… Faça estas contas e fique a ganhar…

6ª regra) Siga o conselho que um constructor me deu. Se quer barato e bom, não é comigo é em Odivelas(???). O certo é que agora nunca lhe comprarei nada… Tal vai a arrogância…

Segue na parte 2…

Posted in All about all | Tagged: , , , , | Leave a Comment »

SD cards…

Posted by primalcortex on May 14, 2009

Ok. It’s official: TakeMs cards are a piece of junk. And Media Markt sold also this piece of junk.

Next time I’ll spend my money on some know brand…

The history? Canon Legria HF-200 can only recognize 1GB of a 4GB. By the way this piece of junk is Class 6 card…

My Nikon D80 can use the card with the full 4GB.

Did some tests with with fdisk and:

TakeMS:

Disk /dev/sde1: 985 MB, 985591296 bytes
122 heads, 62 sectors/track, 254 cylinders
Units = cylinders of 7564 * 512 = 3872768 bytes
Disk identifier: 0×00000000

San Disk Ultra II:
Disk /dev/sde1: 3960 MB, 3960995840 bytes
122 heads, 62 sectors/track, 1022 cylinders
Units = cylinders of 7564 * 512 = 3872768 bytes

See the difference?

So my short review: for photo it might be ok. For sd card video cameras, forget it.

Posted in All about all | Leave a Comment »

Amalia today – Fado taken to a new level

Posted by primalcortex on May 14, 2009

I’m not a big fan of Fado, despite being PT… :, but there are great musics and singers of this Portuguese musical genre.

Anyway, sometimes something appears that rocks your world:

Fernando Ribeiro of  Moonspell (yeahh!), the lead singer of the most famous death metal, gothic metal portuguese band and two elements of the The Gift band (Electronic,Pop), the vocal singer Sónia Tavares and Nuno Gonçalves joined and produced an amazing tribute to Amalia the most world wide known Fado Singer.

It blows you away:

And if you never heard of Moonspell:

And Gift:

Cool? :-)

Posted in All about all | Tagged: , , , , , | Leave a Comment »

SMC 7904 WBRA – Vodafone Duplex – Parte 2

Posted by primalcortex on March 21, 2008

Bem após um largo tempo de espera para ter o Vodafone Duplex, finalmente chegou…

Não tenho nenhum equipamento da Vodafone, somente uso o meu router SMC 7904 WBRA (que ja suporta ADSL2+) que já tem quase três anos, se não mesmo três anos, com o firmware 0.53.

A quando da instalação, o router ligou-se de imediato e tive logo acesso  á internet. Boa atenuação, à roda dos 27 dBs, e um margem de ruído de 6 dBs. Isto é que achei estranho pois tinha anteriormente cerca de 36dBs. Mas aparentemente é mesmo assim. A margem é imposta pelo equipamento da central e controlada dinâmicamente de forma a ter sempre esse valor constante independentemente das  condições da linha. A ver vamos…

Pouco depois começou a tourada…

Aparentemente após a expiração do lease time do DHCP, o router não voltava a ganhar IP, ou seja reportava sempre que não conseguia contactar o servidor DHCP da Vodafone e ficava com 0.0.0.0 … Aparentemente só acontece quando não há actividade, mas é chato ligar o PC e ter de fazer reset ao router para voltar a ter IP. Estranho, então não obtém IP, mas fazendo reset ao router, tinha logo IP…

Aqui coloca-se duas questões: Problemas do router, ou o DHCP da Vodafone só o reconhece depois do link ter caído e voltado a cima… boa questão… Vou supor que é o router, mas o reset com a quebra do link pode despoletar algo do lado da Vodafone, não sei.

Bem, após o reset parece que não há problema algum e tenho IP. Fiz algumas experiências com o MAC do router, mas ao fim de um bocado deixou mesmo de obter qualquer IP. O link UP, mas IP népias. Já estava a ver a minha vida a andar para trás e ter de comprar um router da Vodafone de emergência…

Decidi por uma acção drástica, e fiz reset total e completo ao router… e ficou como tinha saído de fábrica. Configurei todo de início usando o Wizard de configuração e escolhendo o RFC1483 com cliente DHCP, e aparentemente agora está OK. Talvez ainda houvesse resquícios da configuração para o operador anterior e portanto houvesse aqui alguma baralhação…

No entanto prognósticos só no fim do jogo, e vamos ver se é mesmo desta…

Posted in All about all, Geral | Tagged: , , , , , | 2 Comments »

Firefox context menu editor

Posted by primalcortex on March 18, 2008

Sometimes the way Firefox menus are organized is not quite like we want. For example I’ve liked that the first option on the right click over an URL is Open New tab and not Open in new Window.

So Firefox Menu Editor:  http://menueditor.mozdev.org/index.html   can change and organize the way every menu looks like. Take a look…

Posted in All about all, Linux | Tagged: , | Leave a Comment »

Does a better camera makes a better photographer? No, but it helps a lot

Posted by primalcortex on March 17, 2008

After three years of owning a prosumer camera (Konica Minolta Z5) and only having a bunch o photographs worthwhile to watch in terms of general quality, I took the jump and said good buy to a bunch of Euros… and I bought a Nikon D80. And oh boy, I can be a lousy photographer, but the sheer image quality of some of the pictures taken where just jaw dropping… Definition, sharpness, depth of field, high iso’s, focus speed, ergonomics, it was just like moving from a Smart to a Volvo…

Despite it’s size and being so “high profile” camera, I will not go back… I took me a while to choose between the Nikon D80, Canon 400D and the newcomer Canon 450D (Sony did not even enter the equation). Nikon D80 is almost two years old, and a replacement is probably near (that might be the reason why it drop down it’s price). It’s more expensive than the 400D and the same price for the 450D probably, but I feel in love with it’s viewfinder and ergonomics. Also it uses SD cards, and that means that I could still use my Minolta cards. I really didn’t like 400D: too small and so with a hand grip a bit weird, small viewfinder, and the kit lens meant that I had to buy something better latter on. So I payed a bit more and chose Nikon. Nikon D80 kit lenses, the 18-135, is not top of the line, it’s a compromise, but it delivers amazing images… Regarding the 450D was probably like the 400D, so I’ve passed.

Well, Nikon D80 can shoot JPG and RAW: the NEF format. NEF format is like a digital negative, where you can process it a bit to improve something that went wrong, like white balance or sharpness. But Nikon’s NEF manipulation program, Capture NX cost’s some more money, and well I looked for alternatives. They might not be the best or give the ultimate results, but for an amateur like me it’s enough. Also Adobe CS3 and Photoshop where out of the question, as Capture NX, for only running on Windows and also the former from costing an arm and both legs.

Well the list for some free programs that can process Nikon’s D80 NEF format:

- The Gimp: http://www.gimp.org with the UFRaw plugin.

- UFRaw: http://ufraw.sourceforge.net/

- Raw Therapee: http://www.rawtherapee.com/

After some shooting, and reading the manual and some practice, still I’m not a better photographer, but my photos look much better…

NOTE: On Windows, Irfanview with the plugin package can also render NEF files for viewing.

Posted in All about all | Tagged: , , , | Leave a Comment »

Patch installation – Install program from hell

Posted by primalcortex on December 17, 2007

Suppose that you want to install a patch. Let’s suppose 9.2.0.6 for Oracle Client.

Also suppose that you have several products that need that patch. Let make them around 30.

Now suppose that on the patch installation you need to specifically  tell each and every one of these products that the patch does in fact applies to it. In fact there is a Select ALL checkbox, but it doesn’t work.

Thanks Oracle, for making sure that my mouse dexterity is kept up to date :)

Posted in All about all | Leave a Comment »

JBoss and JAAS debug

Posted by primalcortex on November 28, 2007

I’m having a lot of problems debugging an application that is supposedly to be able to run on JBoss…

One of the main issues is the authentication process between the Web Container and the EJB container. For authentication the Java JAAS architecture is used. Jboss has different configuration files than BEA or WebSphere, namely the configuration file login-config.xml. In this file an application policy is defined, namely how users are validated: if they use a file with user/password, database or LDAP. In this file an application policy used by the EJB and WEB cointaner must be defined (it can be the same).

On the Web container/application side, the jboss-web.xml file on the WEB-INF folder of the Web application has the Authentication domain used for login that, of course, must match the other configuration files, in this case the login-config.xml file and the web.xml file. The web.xml file must also protect the resources that access the EJB container. This means that users must pass container authentication so a JAAS instantiation is built.

So the quick tip is:

1) Make sure that everything connects: login-config.xml<-> jboss-web.xml <-> web.xml

Content of jboss-web.xml file on the Web application WEB-INF directory:

<jboss-web><security-domain>java:/jaas/APPLICATION_DOMAIN</security-domain></jboss-web>

2) Make sure that on your web.xml file the <realm-name> on the <login-config> section matches the name on the security domain, in this case APPLICATION_DOMAIN.

3) On Jboss login-config.xml file a there should be also an <application-policy name=”APPLICATION_DOMAIN”> with the configuration that you need (Database module, LDAP module.

But this might be not enough, so if you need to debug the JAAS, you can add to the log4j.xml file the following:

On the log4j.xml file add the following sections:

<category name="org.jboss.security">
    <priority value="TRACE" class="org.jboss.logging.XLevel"/>
    <appender-ref ref="SECURITY_F"/>
</category> <appender name="SECURITY_F"
    class='org.jboss.logging.appender.DailyRollingFileAppender'>
    <param name="Append" value="true"/>
    <param name="DatePattern" value="'.'yyyy-MM-dd"/>
    <param name="File"
    value="${jboss.server.home.dir}/log/jboss.security.log"/>
    <layout class="org.apache.log4j.PatternLayout">
        <param name="ConversionPattern"
            value="%d{ABSOLUTE} %-5p [%c] %m%n"/>
    </layout>
</appender>

This is more or les in the middle of the file, just where the <category-name> section begins.

With this configuration a new log file named jboss.security.log will be created with the JAAS information, so you can see what’s going on.

 

Posted in All about all | Tagged: , , , | Leave a Comment »