Programação

User’s browser and platform php class

Because I’ve been working in a drupal website, I tought it would be handy to learn some php so I can make some scripts for it, although I’m still a long long way from making a working drupal module. For now I’m using php code input format when I want to include some script.
As parte [...]

Another C mathematical program

Disclaimer: For the non geeky programming lovers out there, sorry for spamming you with this bunch of incomprehensible lines of text!
The first time I wrote some kind of program was back in high school with a Ti80 calculator which had some sort of BASIC programming language. After reading the manual I spent hours making small [...]

Prime factors code in C and Python

Today someone spoke about prime factors and I thought it was something interesting to code. I needed to practice my C so I’ve coded it in C. Here it goes:

#include <stdio.h>
#define VMAX 25
 
int main()
{
/*Prime numbers < 100 */
int primes[VMAX] = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97};
int factors[VMAX] = {}; [...]

Update

Não tenho tido tempo para postar e muito menos para ler as minhas feeds. Ando apenas a ouvir alguns podcasts enquanto trabalho e é o que me mantém um pouco actualizado sobre as novidades do mundo FOSS. Pouco mais tenho feito do que trabalhar e uma formação em horário pós-laboral ocupa-me quase todo o tempo [...]