Tag Archives: c#

Video – Introducing the C++ Memory Model

The memory model is perhaps one of the most valuable but misunderstood changes in c++11. For the first time, c++ programmers have a language contract with the runtime about how their code will be executed in the face of hardware optimizations, memory hierarchies and multiple threads of execution.

This talk introduces the key concepts in the memory model, and show how these concepts apply to the new atomic primitives in c++11.

2 Comments

Filed under Uncategorized

C++ for Marine Streamer Positioning and Navigation

Here are the Slides from my ACCU 2011 Conference presentation.  The presentation was about how to use C++ in resource constrained devices, and building a C++ cross compile toolchain for the LM3S8962 Cortex-M3 processor.

Topics include:

  • Short introduction to the domain
  • Building a gcc cross compile toolchain
  • Programming and On-chip debugging
  • Stacks & Heaps: Linker Scripts
  • The time before “int main()”
  • C++ on a diet (living without dynamic memory allocation, the standard library, exceptions, and rtti)
  • Testable Embedded C++

Leave a comment

Filed under software, testing

A Windows Screensaver to cycle through webpages

It started pretty simply, I just wanted to have a screensaver on the big screen outside of our development lab to cycle though some webpages on our hudson server.  I thought that there must be an open source tool somewhere that does what I need but alas couldn’t find anything out there.  I am in general quite reluctant to download any free screensaver software from the web after the time I’ve spent fixing the computers of relatives after they downloaded a “screensaver”.  After a few false starts (windows scripting of IE is not option for a screensaver (think what happens when you send a keypress to a screensaver!)) I finally came across a quite simple solution using C# and Windows Forms, based on the tutorial at Geekpedia.  I put the source up on github so hopefully no one else will have to learn the hard way :-)

Things to watch out for:

  • There is a difference between the WPF WebBrowser control and the Windows Forms WebBrowser control.
  • The WPF WebBrowser doesn’t expose the full functionality of the control so this is a bad otion for the screensaver (in particular you want to suppress the scripting errors dialogs).
  • You have to add the mouse and keyboard event listeners not to the WebBrowser control but to each document as it’s loaded.

Good luck!

4 Comments

Filed under Uncategorized