Blog

20 Jan 2012 . .
MojoPortal module headings not including h2 solution Comments

I have been gradually upgrading MojoPortal on my www.stuartjames.info site for quite a while now, except for a few migrations the database has remained intact. I came across an interesting problem where sometime over the last year of upgrades some of my module titles had h2 elements to them and some didn't. The older of these module titles didn't.

After trying to figure out a way to solve this then decided enough is enough it must be somewhere in the database so went on a hunt to find it.

What I found is in mp_Modules under the HeadElement column some items had h2 defined and some were null. Therefore with the Developer Tools Query Tool enabled (in web.config, makes available in admin menu) I performed a quick SQL command to solve my problems.

UPDATE mp_Modules SET HeadElement='h2'

So if your a little lazy like me and after a quick hack to solve those rogue h2 tags, give it a try


Stuart James  


23 Dec 2011 . .
A short excursion to Paris (France) Comments

Went on a short pre-christmas trip to Paris for a few days, thought I would share a few of my experiences. The first thing to note in Paris is the cost, plan for expensive meals if you go you will really struggle to avoid it. A good place togo that you can find easily is a Pauls Patisserie we had a nice lunch sandwich and a crape while there for a resonable price. When it comes to evening meals you need to be more careful about where you go. We tried a few different places but average evening meal cost is ~25euros for the food then add on top for drinks, although wine is fine avoid beer found that to be expensive at ~6euro a glass. Its not all doom and gloom though if you are sub 25 the attractions are generally free*, UK student cards dont work I believe international student card does though but that requires sorting out before the trip.

Here are a few shots of paris to cheer you up, will add a few more as my camera master sends me her images.

<image to come>


Stuart James  


14 Dec 2011 . .
gcc compiler dynamic array declaration without warning Comments

I demonstrate for one of Prof Richard Bowden's modules on C programming for first year Electronic Engineering students. Recently one of the tasks given to students was read in a matrix, multiply and write it out. To start with they did 3x3 then 7x7 then were instructed to make it variable size.

So when going round to help I showed a few of them how to allocate deallocate dynamic memory then asked the question had they been taught this. Apparently at they hadnt by this point, later finding out it comes up after Christmas.

My ramblings today are not about the module content or structure but actually the gcc compiler. When learning to program in C++ I learnt on a fairly sensible compiler inside Visual Studio. Then hit the gcc compiler and got annoyed by stupid things, for example

Visual Studio interprets this fine

std::vector<std::vector<int>>

g++

Error, required:

std::vector<std::vector<int> >

To note the space between the last two angle brackets.

While walking round I saw some students code and got a little scare by it they performed operations such as:

 

int size = 0;

scanf("%i",size);

int myArray[size];

for (int i = 0 ; i < size ; i++)

scanf("%f",myArray[i]);

for (int i = 0 ; i < size ; i++)

printf("%f",myArray[i]);

 

To my horror this compiled without warning or error and even worse it worked. I later while chatting to friends found that this was normal for the gcc compiler, and apparently the g++. So therefore we had some guesses about how this would work and the common answer was:

myArray is initialised to length 0, then since taken of the stack when read and written to you corrupted the stack.

The message to take away from this horror story of teaching C, is two things use a compiler that may not follow the letter of the standard but actually is intelligent and knows what you mean; always use -wall when compiling on gcc otherwise you will end up in a pile of mess later on!


Stuart James  


13 Dec 2011 . .
Office 365 Professional Subscription may be more annoying than expected Comments

Office 365 Header

We have been trying Office365 with the company I work for, specifically interesting was the opportunity to use there subscription model to handle Office installs at ~£160 for a retail licence per PC, paying for per user becomes very tempting.

Unfortunatly it may not be as simple as planned. I turned on my laptop today to get the wonderfully helpful and annoying error message telling me to reinstall office... having only installed it a month ago and wanting to try giving this service to novice computer users this message would scare them.

My list of problems with Office 365 seem to be growing, Microsoft could of hit something amazing with this concept but am appalled at the quality of the product is very uncharacteristic of Microsoft.

Office 365 Professional Subscription Error


Stuart James