[Browse] [Tag cloud]

Log on:
Powered by Elgg

Ferrey, Mark :: Blog

January 19, 2012


Does anyone know how to automatically set “sat nav” style navigation from a c# application?


quick fix :


string postcodeq = ("RG6 6UR")


webBrowser2.Navigate("http://maps.google.com/maps?q=" + postcodeq);


Reference: http://www.youtube.com/watch?v=CmfkV3NRz8c


 However this does not offer turn by turn guided navigation.


 


Any ideas?


I have a c# application with a string containing a UK postcode


I have a tomtom navigation device. (one 3rd gen)


Any suggestions are appreciated.

Keywords: sat nav tom tom navigation c# postcode

Posted by Ferrey, Mark | 0 comment(s) | Share

March 17, 2010

<!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:"Times New Roman"; mso-fareast-language:EN-US;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:ZH-CN;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 72.0pt 72.0pt 72.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Section1;} -->

C++ card game review by Mark Ferrey.


What I have learnt:


Whilst programming this project I have found that my coding skills have improved.


When starting out I could hardly write a line of code without at least 3 compilation errors. Now it is possible for me to complete entire functions without error. Based on this dramatic change in my confidence and skill I would say that I have learnt a lot in a short time. I can defiantly say that I have learnt to appreciate the fun side of programming, The feeling of elation when you get the thing to work after hours of failure is fantastic, It also gets easier the longer you spend doing it.


The challenge of programming this game has facilitated the revision of topics when memory fails me. I have improved my skills in functions, structures, logic, code formatting and debugging significantly.  I am proud of my work and this Gives me confidence to program more advance topics.


When you start comparing conversations to types of do while loops you know you have been programming for too long that day!!!          


Difficulties encountered:


I found coding difficult when stuck with a problem.


For me the only strategy was a simple one, delete everything in that function and start again! Often it would help to write things down. Asking for help is another skill that has been perfected, even if the person you are talking to knows nothing about programming just having someone to bounce ideas off is valuable to my style of learning.


When coding on my own, I found myself stuck more often.


Random unsolved difficulty: The Linux system does not like system("CLS");// the screen clear command.


 


Game evaluation of bugs


Quick overview:


My game is blackjack, but to 100 instead of 21.


To speed things up the dealer deals 5 cards per turn.


Like blackjack over 100 and your bust, closest to 100 when you both stick wins.


The wins and losses record are stored in files.


 


Some problems:


There are vast quantities of spelling grammar and punctuation mistakes in my code.


The user can crash the program if they enter the wrong characters.


The dealer twists, even when you have stuck, and his number is higher than yours but less than 80


-this means that the dealer seems less intelligent sometimes busting itself when close to a win.


There is some debugging text that was left in the game


Thinking about it, my game should draw 10 cards for the first go instead of 5.  This would be a truer variance to blackjack.


The game does not bust the player automatically


Some output missing to tell you that the dealer is bust. – It does however tell you that you have won.


Again to create a more blackjack feel to the game I wanted to Instead of a 5 card trick.


 Put in a “25 card trick”.


Some excuses:


 The dealer cannot see your hand. That is why it twists even though it could have won


There is a shortcut in the program to avoid unwanted output


 


With exception handling a dictionary, thesaurus and more time, these bugs would not exist and my program would be perfect in my eyes.


 


Mark Ferrey NT014895


Keywords: c++

Posted by Ferrey, Mark | 0 comment(s) | Share

November 09, 2009


 

1. What day will it be?

Consider you need a system that takes as input a year, in the Gregorian Calendar (that is the one in common use), and prints the day of the week that the 1st January will be. Hint: The 1st January 2000 was a Saturday, and you can limit the dates used to 2000 and beyond.The user should have the option of selecting a series of years (e.g. 2009, 2007, 2011), terminated by a sentinel value, or a range of years (e.g. 2001 to 2008). Output should be in the form of a line per year, giving the year and then the day

program that outputs what day the first of January was/will be, for a given year:

initial thoughts:
printf- enter a year (yyyy)
scanf- year

Monday =1
Tuesday=2
Wednesday=3
Thursday=4
Friday=5
Saturday=6
Sunday=7

2000 = 6
there are 7 days per week (1-7)  365.25/7= 52.17- weeks per year.
2001=?

yea I’m kind of stuck before I start with this one. I’m thinking that I could cycle through a loop of 7 days 52.17 times to make a year. as long as I start from Saturday for 2000.. Would this land me with Monday for 2001?
how do I work in the leap year?

am I on the right lines or completely wrong?
any kind words of advice appreciated, thanks.








 

Posted by Ferrey, Mark | 7 comment(s) | Share

October 13, 2009

sugestions for more exciting programs:

1. Writing out longer messages, that maybe greetings or poems.
2. Doing something mathematical, basic calculator, of converting temperatures.

Posted by Ferrey, Mark | 1 comment(s) | Share

/