Click here to Skip to main content
15,889,833 members

Articles by PeteBarber (Articles: 6, Technical Blogs: 31)

Articles: 6, Technical Blogs: 31

RSS Feed

Average article rating: 4.61

Desktop Programming
WPF
23 May 2011   Updated: 23 May 2011   Rating: 4.86/5    Votes: 22   Popularity: 6.52
Licence: CPOL    Views: 77,085     Bookmarked: 52   Downloaded: 3,492
Please Sign up or sign in to vote.
Shows how to use a WPF TreeView control to draw a graph style hierarchy with connecting lines.
11 Jul 2011   Updated: 11 Jul 2011   Rating: 4.44/5    Votes: 12   Popularity: 4.62
Licence: CPOL    Views: 113,229     Bookmarked: 24   Downloaded: 2,959
Please Sign up or sign in to vote.
This article shows how to access WPF Dependency Properties used to form a User Control.
18 Jul 2011   Updated: 18 Jul 2011   Rating: 4.33/5    Votes: 3   Popularity: 2.07
Licence: CPOL    Views: 27,112     Bookmarked: 8   Downloaded: 863
Please Sign up or sign in to vote.
This shows a couple of techniques using WPF to create a control to select a SolidColorBrush via a ComboBox and compares and contrasts them.
Programming Languages
C#
10 Jan 2012   Updated: 10 Jan 2012   Rating: 4.96/5    Votes: 9   Popularity: 4.73
Licence: CPOL    Views: 43,124     Bookmarked: 37   Downloaded: 1,595
Please Sign up or sign in to vote.
This article introduces an easy to use attribute/reflection based library for seamlessly parsing command line arguments for applications.
3 Jan 2012   Updated: 3 Jan 2012   Rating: 4.86/5    Votes: 11   Popularity: 4.86
Licence: CPOL    Views: 77,600     Bookmarked: 29   Downloaded: 3,210
Please Sign up or sign in to vote.
A basic implementation of an NFS server in C#.
Objective C
9 Jun 2014   Updated: 9 Jun 2014   Rating: 4.22/5    Votes: 6   Popularity: 3.28
Licence: CPOL    Views: 38,681     Bookmarked: 4   Downloaded: 0
Please Sign up or sign in to vote.
As a way to learn Swift I decided to have a play with Sprite Kit. One of the first things I did was to create a subclass of SKSpriteNode. This has a very handy initializer:init(imageNamed name: string) (in Swift)-(instanceType)initWithImageNamed:(NString*)name (in Objective-C)I then derived from thi

Average blogs rating: 4.72

All Topics
26 Jan 2016   Updated: 26 Jan 2016   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: CPOL    Views: 2,810     Bookmarked: 2   Downloaded: 0
Please Sign up or sign in to vote.
The perils of debugging with return statements in languages without semi-colon statement terminators, i.e. Swift
3 Jan 2017   Updated: 3 Jan 2017   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: CPOL    Views: 14,921     Bookmarked: 2   Downloaded: 0
Please Sign up or sign in to vote.
How to debug AWS lambda functions locally using VS code and lambda-local
24 Feb 2015   Updated: 24 Feb 2015   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: CPOL    Views: 4,491     Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
When a Swift immutable collection isn't or is at least immutable-ish
23 Dec 2015   Updated: 23 Dec 2015   Rating: 4.50/5    Votes: 4   Popularity: 2.71
Licence: CPOL    Views: 22,118     Bookmarked: 7   Downloaded: 0
Please Sign up or sign in to vote.
Git Remote Repos with OneDrive
2 Feb 2016   Updated: 2 Feb 2016   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: CPOL    Views: 6,490     Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
Swift's defer statement is funkier than I thought
5 Jan 2014   Updated: 5 Jan 2014   Rating: 4.00/5    Votes: 1   Popularity: 0.00
Licence: CPOL    Views: 6,990     Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
Recently I've been doing some ActionScript programming. Rather than target a Flash Player app. I've been using ActionScript in combination with Adobe AIR in order to create an iOS app.
11 Sep 2015   Updated: 11 Sep 2015   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: CPOL    Views: 3,230     Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
Apple announced tvOS yesterday. Downloading Xcode 7.1 Beta comes with the SDK and simulator for tvOS apps.
19 Jan 2016   Updated: 19 Jan 2016   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: CPOL    Views: 8,191     Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
OAuth Authentication on tvOS
Database Development
SQL Server
28 Jun 2012   Updated: 28 Jun 2012   Rating: 3.00/5    Votes: 2   Popularity: 0.90
Licence: CPOL    Views: 22,651     Bookmarked: 5   Downloaded: 0
Please Sign up or sign in to vote.
How to generate a SQL Server CE database schema from a SQL Server database using Entity Framework
Desktop Programming
ATL
17 Apr 2012   Updated: 17 Apr 2012   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: CPOL    Views: 7,321     Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
The prescribed solution to this problem is to not place the COM types directly into the STL container but instead wrap them with the ATL CAdapt class.
Cocoa
28 Jan 2015   Updated: 28 Jan 2015   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: CPOL    Views: 9,780     Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
Optional Chaining with Dictionaries (in Swift)
XAML
12 Jun 2011   Updated: 12 Jun 2011   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: CPOL    Views: 27,701     Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
It is critically important to make sure that a View's DataContext is properly created and attached before the underlying Window is displayed, otherwise initial events will be missed.
DevOps
Testing
2 Sep 2017   Updated: 2 Sep 2017   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: CPOL    Views: 7,911     Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
Unit testing with Mocha, a local instance of dynamoDB and promises
Mobile Apps
iOS
3 Jan 2018   Updated: 3 Jan 2018   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: CPOL    Views: 5,432     Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
Resizable UIWindow on iOS
Windows Mobile
3 Apr 2012   Updated: 3 Apr 2012   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: CPOL    Views: 13,963     Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
How to use NUnit and Entity Framework DbContext to programmatically create SQL Server CE databases and specify the database directory.
NUnit
3 Aug 2012   Updated: 3 Aug 2012   Rating: 4.33/5    Votes: 2   Popularity: 1.30
Licence: CPOL    Views: 33,715     Bookmarked: 14   Downloaded: 0
Please Sign up or sign in to vote.
Integration Testing with NUnit and Entity Framework
Operating Systems
Windows
18 Aug 2011   Updated: 18 Aug 2011   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: CPOL    Views: 11,730     Bookmarked: 2   Downloaded: 0
Please Sign up or sign in to vote.
Unit Testing C# Custom Attributes with NUnit
Programming Languages
ASP
22 Feb 2015   Updated: 22 Feb 2015   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: CPOL    Views: 8,341     Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
Book review: Swift Essentials
C#
27 Jul 2011   Updated: 27 Jul 2011   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: CPOL    Views: 12,270     Bookmarked: 3   Downloaded: 0
Please Sign up or sign in to vote.
Unit Testing C# Custom Attributes with NUnit
27 Jul 2011   Updated: 27 Jul 2011   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: CPOL    Views: 17,601     Bookmarked: 3   Downloaded: 0
Please Sign up or sign in to vote.
Unit Testing C# Custom Attributes with NUnit
24 May 2011   Updated: 24 May 2011   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: CPOL    Views: 14,591     Bookmarked: 4   Downloaded: 0
Please Sign up or sign in to vote.
Evolution of C# enumerators
30 Dec 2013   Updated: 30 Dec 2013   Rating: 4.80/5    Votes: 2   Popularity: 1.44
Licence: CPOL    Views: 10,511     Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
Using IntelliJ, Adobe ActionScript and AIR SDK to create & package iOS 7 apps
4 May 2015   Updated: 4 May 2015   Rating: 4.00/5    Votes: 1   Popularity: 0.00
Licence: CPOL    Views: 15,590     Bookmarked: 3   Downloaded: 0
Please Sign up or sign in to vote.
Drawing into bitmaps and saving as a PNG in Swift on OS X
25 Jul 2011   Updated: 25 Jul 2011   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: CPOL    Views: 42,058     Bookmarked: 6   Downloaded: 0
Please Sign up or sign in to vote.
A simple generic way to test Custom Attributes with NUnit.
C++
6 Dec 2011   Updated: 6 Dec 2011   Rating: 4.80/5    Votes: 9   Popularity: 4.58
Licence: CPOL    Views: 36,914     Bookmarked: 15   Downloaded: 0
Please Sign up or sign in to vote.
How to obtain the size of a C++ array using templates and other techniques.
15 Aug 2013   Updated: 15 Aug 2013   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: CPOL    Views: 8,990     Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
Capturing lvalue references in C++11 lambdas.
22 May 2011   Updated: 22 May 2011   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: CPOL    Views: 9,640     Bookmarked: 2   Downloaded: 0
Please Sign up or sign in to vote.
I've been learning about BOOST Spirit; a C++ expression based compiler generator. One of the examples is for a Roman Numeral parser. This contained the following interesting code for pre-loading a symbol table...
22 Nov 2011   Updated: 22 Nov 2011   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: CPOL    Views: 17,403     Bookmarked: 2   Downloaded: 0
Please Sign up or sign in to vote.
Recently I was helping somebody debug an issue around the use of swprintf_s.  The issue turned out to an Obi-Wan (off by one) error.  I don't tend use the likes of printf() very much instead preferring to use a std::stringstream if I need to format into a string.I'd assumed that the Microsoft's secu
Objective C
30 Jun 2014   Updated: 30 Jun 2014   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: CPOL    Views: 15,231     Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
How to resolve strong references between Swift and Objective-C classes - using unowned and weak references from Swift to Objective-C classes
SQL
7 Aug 2012   Updated: 7 Aug 2012   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: CPOL    Views: 17,821     Bookmarked: 6   Downloaded: 0
Please Sign up or sign in to vote.
Specifying the directory to create SQL CE databases when using Entity Framework
STL
16 Jun 2014   Updated: 16 Jun 2014   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: CPOL    Views: 11,630     Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
XCode 5 Versus XCode 6 Default Generated Game (Sprite Kit) Project and Scene Sizes

Average tips rating:

No tips have been posted.

Average reference rating:

No reference articles have been posted.

Average project rating:

No projects have been posted.
Team Leader
United Kingdom United Kingdom
My day job is mostly working in C++ with a bit of C#. I write a fair amount of command line based tools and really wish they could have a GUI front-end to them hence why I spend my spare time working with WPF.

I started a blog few years back but didn't do a lot with it. I've started describing some of the interesting programming things I come across on it. Please take a look.