Wednesday, October 2, 2013

Bicycle Racks on Viva Buses in Toronto

All different transit authorities in Greater Toronto Area and surroundings  have bicycle racks installed on theirs buses but Viva. To make things worse they don't have a "set" policy for allowing bicycles in the bus and it is the drivers discretion to let the bicycles in the bus. So you can never be certain if you can get to your destination or you have to wait for another Viva bus to arrive and see if next driver will pity you and let you in.
This is what YRT (the YRT/Viva) has on its website for bicycle policy and here is their "Bike 'n' Bus" program that fails to explain what happens if you get into a Viva bus.

How much more we have to wait before the bike racks are installed? Maybe this blog reaches them, because my phone calls and emails did not!

Base pointer, pointing to a derived class with no virtual members!

I was teaching Virtual Methods in my C++ class today, one of my students sent me this in response to what was taught in class.
I think its funny; take a look:

Friday, September 27, 2013

Basic Math Challege OOP344

A student was asking about "sscanf" and how it works for the week 3 ToDo (basicMath challenge), so here is the example:
#include <cstdio>
#include <iostream>
using namespace std;

int main(){
  double d;
  char num1[80] = "1234.5678";
  char num2[80] = "1234.5678a";
  char num3[80] = "12a34.5678";
  char num4[80] = "a1234.5678";
  char ch ;
  int ret;
  d = 0.0;
  ch = 'X';
  ret = sscanf(num1,"%lf%c", &d, &ch);
  cout<<ret<<endl;
  cout<<ch<<endl;
  cout<<d<<endl;
  cout<<"----------------------------"<<endl;
  d = 0.0;
  ch = 'X';
  ret = sscanf(num2,"%lf%c", &d, &ch);
  cout<<ret<<endl;
  cout<<ch<<endl;
  cout<<d<<endl;
  cout<<"----------------------------"<<endl;
  d = 0.0;
  ch = 'X';
  ret = sscanf(num3,"%lf%c", &d, &ch);
  cout<<ret<<endl;
  cout<<ch<<endl;
  cout<<d<<endl;
  cout<<"----------------------------"<<endl;
  d = 0.0;
  ch = 'X';
  ret = sscanf(num4,"%lf%c", &d, &ch);
  cout<<ret<<endl;
  cout<<ch<<endl;
  cout<<d<<endl;
  cout<<"----------------------------"<<endl;
  return 0;
}
output:
1
X
1234.57
----------------------------
2
a
1234.57
----------------------------
2
a
12
----------------------------
0
X
0

----------------------------

Friday, July 12, 2013

Zotac - H55-ITX WIFI HDMI Audio

Installing windows 7 on my Zotac H55-ITX WIFI miniboard, I noticed that there is no sound through HDMI port.

First make sure you have the latest driver for you intel graphics from  Zotac downloads then restart the computer and go to BIOS settings (hit DELETE when computer boots up).

Under "the southbridge settings" make sure "internal HDMI" is "Enabled".

Login to windows, right click on computer and select Mange. Under the computer management list select "Device Manager"

Now under "Sound, video and game controllers" you should have a "High definition audio...." device added.

Right click on it and select update driver and choose to browse your computer for the driver.

From the Graphics driver you just downloaded select the directory "ibxHDMI" which contains "IntcDAud.inf" file and click ok.

This will install the correct driver fro you "Intel Display Audio Device". (make sure in "Playback devices" you have your HDMI device selected as default.

Enjoy....