shawnthunt

Archive for September, 2008

Visual Studio 2008 Error on GetPrivateProfileStringW

In Uncategorized on 23 September, 2008 at 09:20 am

error C2664: ‘GetPrivateProfileStringW’ : cannot convert parameter 1 from ‘const char *’ to ‘LPCWSTR’

Under Property Settings | General, set the Character set to “Use Multi-Byte Character Set”

Firefox losing settings

In Uncategorized on 13 September, 2008 at 19:56 pm

This has happened twice on me now, both time in Ubuntu 8.04.  The thing that ended up working was to delete the .mozilla folder in my home directory, remove Firefox, and install it again.

Perl script, Project Euler

In perl on 6 September, 2008 at 19:11 pm

So, the bioinformatics class uses Perl.  I looked into Perl a long time ago and it never really appealed to me but it seems like computer science classes love it and Java.  I have been wanting to try some of the problems over at Project Euler out for a while and thought this would be an ideal time.  I wish I had the time to try more but I probably won’t — desides, there are more interesting problems that have my interest right now.  Here is Perl script to find solution 1.

#!/usr/bin/perl

# problem number 1 from project euler

use strict;

use warnings;

my $sum = 0;

my $i = 0;

for ($i = 1; $i < 1000; $i++) {

if ($i % 3 == 0 || $i % 5 == 0) {

$sum = $sum + $i;

}

}

# print the answer

print “The sum of all of the multiples of 3 and 5 below 1000 is $sum\n\n”;

Installing R-project on Ubuntu

In linux on 5 September, 2008 at 13:14 pm

I thought I would get the R software loaded for a bioinformatics class I am taking this semester on my Ubuntu machine.  Here are the packages that were needed before I could compile it:

sudo apt-get install build-essential

sudo apt-get install gfortran

sudo apt-get install libreadline5-dev

sudo apt-get install xorg-dev

./configure

make

sudo make install