Click here to Skip to main content
14,327,358 members

Articles by Doc Lobster (Articles: 6, Tip/Tricks: 8)

Articles: 6, Tip/Tricks: 8

RSS Feed

Average article rating: 4.61

Miscellaneous
Beginners
Posted: 15 Jul 2012   Updated: 7 Aug 2012   Views: 38,552   Rating: 4.31/5    Votes: 5   Popularity: 3.01
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 0
Preparing a WPF user control to make it accept clipboard commands
C / C++ Language
Templates
Posted: 21 Jul 2011   Updated: 21 Jul 2011   Views: 21,700   Rating: 4.68/5    Votes: 10   Popularity: 4.68
Licence: The Code Project Open License (CPOL)      Bookmarked: 20   Downloaded: 132
When to use the typename keyword to identify dependent types, and when not to.
Posted: 25 Aug 2011   Updated: 25 Aug 2011   Views: 19,410   Rating: 4.60/5    Votes: 7   Popularity: 3.89
Licence: The Code Project Open License (CPOL)      Bookmarked: 17   Downloaded: 237
An introduction to advanced template metaprogramming using an explanatory project
Posted: 1 Jul 2011   Updated: 4 Oct 2011   Views: 41,660   Rating: 4.60/5    Votes: 9   Popularity: 4.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 15   Downloaded: 443
Establishing a strong binding between enumerations and arrays
C#
Reporting
Posted: 7 Sep 2011   Updated: 7 Sep 2011   Views: 26,302   Rating: 4.82/5    Votes: 10   Popularity: 4.82
Licence: The Code Project Open License (CPOL)      Bookmarked: 51   Downloaded: 790
Reporting Progress for Complex Algorithms
Windows Presentation Foundation
Applications
Posted: 13 Dec 2012   Updated: 5 Oct 2016   Views: 39,321   Rating: 4.66/5    Votes: 13   Popularity: 5.19
Licence: The Code Project Open License (CPOL)      Bookmarked: 46   Downloaded: 1,170
A C#/WPF application for displaying folders on a grid and performing combined functions on them.
No blogs have been submitted.

Average tips rating: 4.84

C / C++ Language
General
Posted: 7 Feb 2012   Updated: 7 Feb 2012   Views: 7,860   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
How to quickly check whether C++ Template Instances have the same parameters
Bugs & Workarounds
General
Posted: 10 Jul 2011   Updated: 10 Jul 2011   Views: 14,340   Rating: 4.83/5    Votes: 3   Popularity: 2.31
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
Have a look at the http://www.pdfclown.org[^] library (licensed under LGPL and can be interfaced from C#), it has support for rotating PDFs and seems very simple to handle. I was able to construct the following example quite easily without knowing the library:public bool Rotate(){ File...
Collections
General
Posted: 21 Sep 2011   Updated: 2 Oct 2011   Views: 7,800   Rating: 4.67/5    Votes: 5   Popularity: 3.26
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
Despite the existance of all that fancy lambda stuff, I would still write this the old-school way:var studentList = new List();foreach (var st in studentList) { if (st.Age == 0) st.AgeInMonths = DateTime.Now.Subtract(st.DOB).TotalDays / 30);} My "solution" needs ~160...
Exception Handling
General
Posted: 19 Oct 2011   Updated: 30 Oct 2011   Views: 26,680   Rating: 4.64/5    Votes: 8   Popularity: 4.19
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 0
When you have to raise an exception, there is always the question whether to create a new exception type or use one of the numerous ones in the .NET class library.
Programming Tips
General
Posted: 30 Jun 2011   Updated: 30 Jun 2011   Views: 17,110   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
Consider a class template of the form (the method cout is just explanatory):template struct A { static void cout() { std::cout << str << std::endl; };};How can this template be instantiated?From the C++ standard can be understood that the address...
Posted: 7 Jul 2011   Updated: 7 Jul 2011   Views: 12,901   Rating: 4.56/5    Votes: 6   Popularity: 3.54
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
Be sure that your array has the right size - without using size_of!
String handling
General
Posted: 14 May 2011   Updated: 15 May 2011   Views: 21,310   Rating: 5.00/5    Votes: 6   Popularity: 3.89
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 0
String conversion using the C++ Standard Library only
Posted: 17 May 2011   Updated: 19 May 2011   Views: 8,490   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
I found another option using the code_cvt facet. This code is a "bit" more complex but will also work with MBCSs such as codepage 932 (Japanese). I have tested it with some central european and japanese characters on VS2008:#include #include #include...
No reference articles have been posted.
No projects have been posted.

Doc Lobster
Software Developer
Germany Germany
No Biography provided