Archive

Archive for November, 2013

COSMCtrl v1.16

November 30, 2013 Comments off

Just to let everyone know that v1.16 of COSMCtrl has been released. Updates for this version include:

  • Updated copyright details.
  • Removed If Modified Since functionality from code.
  • Updated the code to compile cleanly on VC 2012 and 2013.
  • IOSMCtrlTileProvider interface now provides a GetDownloadPort method.
  • The sample app now provides Nominatim search and addresss lookup via WinHTTP
  • Reworked the code to use the author’s WinHTTPWrappers classes for downloading in a truly async manner
  • Reworked all the OSMCtrl classes to use std::vector instead of MFC’s CArray
  • Updated text on copyright control to refer to the new ODbL license for OpenStreetMap
  • Removed defunct Osmarender tile provider
  • Updated the URL used for the Mapquest Open Aerial Tile Provider as per http://developer.mapquest.com/web/products/open/map/
  • Updated the URL used for the OpenCycleMap Tile Provider as per http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames
Advertisements
Categories: Web Site Updates

SudokuSolver v1.02

November 9, 2013 Comments off

Just to let everyone know that v1.02 of SudokuSolver has been released. Updates for this version include:

  • Fixed a bug in the Hint algorithm. In v1.01 it would put values in cells which were the first possible value for a cell which had multiple choices. Now the code determines if it has run out of definite cells to fill as you repeatedly hit the "Hint" button and prompts the user to allow the program to solve the puzzle so that it can provide the next hint.
  • General cleanup to the code in SudokuSolverDlg.cpp
Categories: Web Site Updates

SudokuSolver v1.01

November 5, 2013 Comments off

Just to let everyone know that v1.01 of SudokuSolver has been released. Updates for this version include:

  • App now includes support for a Hint feature where it will fill in the next appropriate cell but not do a complete solve of the puzzle.
Categories: Web Site Updates

SudokuSolver v1.0

November 3, 2013 2 comments

Just to let everyone know that v1.0 of SudokoSolver has been released. This is a set of C++ classes which implements support for the classic 9*9 Sudoku puzzle as well as a simple MFC Dialog based app which generates and solves Sudoku puzzles.

Features

  • Provides a simple C++ Header only module and class to represent a Sudoku grid. The class in this header is called CSudokuGrid and provides most of the reusable functionality.
  • The sample app provides a simple VC 2013 dialog based Sudoku puzzle generator and solver. If you click the "Generate" button in the sample app, it will generate a solvable puzzle with the specified number of cells left empty (as taken from the empty cells edit box). The algorithm to generate a puzzle is based on the information from http://blog.forret.com/2006/08/a-sudoku-challenge-generator/.
  • The solving code demonstrates how to integrate MFC multithreading into a algorithm in a manner such that it is cancellable and provides UI feedback while running without the need to provide a blocking modal dialog UI. The logic for this is spread across the Solve, _WorkerThread, WorkerThread, OnThreadFinished, OnThreadStatusUpdate, StopWorkerThread and OnBnClickedSolve methods of the CSudokuSolverDlg class. The solving code is based on a subset of the information from http://norvig.com/sudoku.html.
  • As the solving code runs it will set the background colour of the cell which it is operating on in red and indicate the depth of the algorithm using "[]" in the cell. The code to do this is executing from a worker thread but to update the UI the main thread must do the actual work. To avoid overloading the main thread with update requests, the worker thread implements logic to only update the UI every 100 ms. To review this code, please take a look at the CSudokuSolverDlg::Solve method.
  • When the solving code finds a solution it will set the background colour of any updated cells to green.
  • The background colouring of the edit boxes is done with a very simple CColorEdit MFC class which is derived from the standard CEdit control class. This class demonstrates how to implement background colors in an edit box using MFC using the standard WM_CTLCOLOR message handling mechanism.
  • Please note that as the solving algorithm is currently implemented it will not guarantee that there is only one solution to the provided puzzle and instead will just pick the first solution found.
Categories: Web Site Updates