Click here to Skip to main content
15,861,125 members

Articles by Orjan Westin (Technical Blogs: 12, Tip/Tricks: 5)

Technical Blogs: 12, Tip/Tricks: 5

RSS Feed

Average article rating:

No articles have been posted.

Average blogs rating: 4.76

Desktop Programming
Win32
12 Nov 2012   Updated: 13 Nov 2012   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: BSD    Views: 13,031     Bookmarked: 11   Downloaded: 99
Please Sign up or sign in to vote.
In this article, we will write a simple multi-threaded example implementation of the Observer pattern, and show how to re-synchronise a past event to look current. Then we’ll demonstrate a technique to treat future events like they’re current, too.
Programming Languages
C++
5 Aug 2010   Updated: 5 Aug 2010   Rating: 4.00/5    Votes: 2   Popularity: 1.20
Licence: BSD    Views: 29,241     Bookmarked: 11   Downloaded: 0
Please Sign up or sign in to vote.
A static, or compile-time, assert for C++
5 Aug 2010   Updated: 5 Aug 2010   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: BSD    Views: 8,250     Bookmarked: 5   Downloaded: 0
Please Sign up or sign in to vote.
A shared_ptr memory manager for the Xerces XML parser
5 Aug 2011   Updated: 24 Apr 2017   Rating: 4.89/5    Votes: 10   Popularity: 4.89
Licence: BSD    Views: 28,320     Bookmarked: 13   Downloaded: 0
Please Sign up or sign in to vote.
Using template specialization to create code handling common base64 encoding varieties
5 Aug 2010   Updated: 5 Aug 2010   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: BSD    Views: 14,971     Bookmarked: 3   Downloaded: 0
Please Sign up or sign in to vote.
Revisiting an old function to convert hexadecimal strings into integer byte arrays
5 Aug 2010   Updated: 5 Aug 2010   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: BSD    Views: 30,851     Bookmarked: 9   Downloaded: 0
Please Sign up or sign in to vote.
Converting any contents of a memory buffer into a hexadecimal string and back
5 Aug 2010   Updated: 9 Aug 2010   Rating: 4.60/5    Votes: 10   Popularity: 4.39
Licence: BSD    Views: 20,411     Bookmarked: 11   Downloaded: 0
Please Sign up or sign in to vote.
Safely defining integer bounds at compile-time
5 Aug 2010   Updated: 10 Aug 2010   Rating: 4.56/5    Votes: 6   Popularity: 3.54
Licence: BSD    Views: 14,090     Bookmarked: 11   Downloaded: 0
Please Sign up or sign in to vote.
Declaring a range of any type
10 Aug 2010   Updated: 10 Aug 2010   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: BSD    Views: 14,290     Bookmarked: 8   Downloaded: 0
Please Sign up or sign in to vote.
Splitting or tokenizing a string into substrings divided by a separator
12 Aug 2010   Updated: 12 Aug 2010   Rating: 4.50/5    Votes: 4   Popularity: 2.71
Licence: BSD    Views: 28,970     Bookmarked: 11   Downloaded: 0
Please Sign up or sign in to vote.
How would you remove all whitespace from a std::string? Here's a look at a number of different ways.
18 Oct 2012   Updated: 21 Oct 2012   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: BSD    Views: 21,850     Bookmarked: 8   Downloaded: 0
Please Sign up or sign in to vote.
Splitting strings again - strtok redeemed
XML
5 Aug 2010   Updated: 5 Aug 2010   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: BSD    Views: 13,880     Bookmarked: 5   Downloaded: 0
Please Sign up or sign in to vote.
Xerces is a powerful validating XML parser, which needs some care to avoid memory leaks. Here is a helper for that.

Average tips rating: 4.69

Desktop Programming
Win32
19 Oct 2012   Updated: 19 Oct 2012   Rating: 4.89/5    Votes: 7   Popularity: 4.13
Licence: BSD    Views: 48,157     Bookmarked: 6   Downloaded: 0
Please Sign up or sign in to vote.
Simple function to get the text message corresponding to a system error.
Programming Languages
C++
26 Mar 2018   Updated: 4 Apr 2018   Rating: 4.90/5    Votes: 18   Popularity: 6.15
Licence: BSD    Views: 15,160     Bookmarked: 16   Downloaded: 267
Please Sign up or sign in to vote.
Function and supporting class to write a memory dump with hex values and characters to an output stream
C++11
18 Feb 2016   Updated: 19 Feb 2016   Rating: 3.80/5    Votes: 2   Popularity: 1.14
Licence: CPOL    Views: 28,127     Bookmarked: 11   Downloaded: 0
Please Sign up or sign in to vote.
Getting negative numbers from 10-bit (and other unusual size) integers
VC++
6 Nov 2014   Updated: 6 Nov 2014   Rating: 5.00/5    Votes: 9   Popularity: 4.77
Licence: BSD    Views: 22,556     Bookmarked: 25   Downloaded: 0
Please Sign up or sign in to vote.
Simplifying the use of dynamically sized C structs
Visual C++ 10.0
15 Nov 2013   Updated: 15 Nov 2013   Rating: 4.83/5    Votes: 4   Popularity: 2.91
Licence: BSD    Views: 9,250     Bookmarked: 7   Downloaded: 0
Please Sign up or sign in to vote.
Reading an input of any type, or simply enter, from the command line

Average reference rating:

No reference articles have been posted.

Average project rating:

No projects have been posted.
Software Developer (Senior)
Sweden Sweden
Orjan has worked as a professional developer - in Sweden and England - since 1993, using a range of languages (C++, Pascal, Delphi, C, C#, Visual Basic, Python and assemblers), but tends to return to C++.