For comments or enquiries please contact webmaster@codeproject.com | View online | Monday, June 20, 2011 |
Welcome to this week's newsletter from The Code Project.
To ensure that future newsletters you receive from The Code Project aren't mistakenly blocked by antispam software, be sure to add the maillist.codeproject.com domain to your list of allowed senders.
Site News
We regularly review our hardware and systems to ensure that (a) the site is up, and (b) it's working as best it can, and (c) we're spending as little as possible in making (a) and (b) happen. As part of this we decided to do a fairly major overhaul of our office systems, where "overhaul" is a euphamism for "throw it all out and start from scratch". It's a little rough on the nerves but means we get to flush out all the little gremlins while also reducing the number of actual machines we have lying around.On a practical note this means we may be a little slower to reply to emails for the next couple of days. It also means that, with the removal of half of the servers, we no longer get to use the server room as a pizza oven, but sacrifices must be made.
Wish us luck.
Don't forget: an iPad 2 is up for grabs in our HTML5 / CSS3 competition.
cheers,
Chris Maunder
The Code Project Offers
Join the AMD OpenCL™ Coding Competition with $50,000 in prizes! This phase of the competition is an open innovation challenge with the only requirement being to use the AMD APP SDK and OpenCL code. Think you have what it takes to think outside the box? Prove it and you might win big! | |
ASP.NET Ad Hoc Reporting. Life can be simpler. Download here. | |
Learn Visual Studio, Silverlight, WPF, SharePoint and more – Just $99.99 Master the hottest Microsoft technologies with this library of 3,000 video tutorials by Microsoft MVPs and experts. An entire year of training is just $99.99 for a limited time. Subscribe now! | |
The Code Project Virtual Tech Summit on Cloud Development is on-demand! Take the fluffiness out of cloud computing and get pragmatic, tactical guidance on deploying, managing, and optimizing your cloud applications. There is still time! Register now – no cost! | |
/n software Red Carpet Subscriptions
Components for every major Internet protocol from SFTP to IMAP to SNMP, SSL & SSH, S/MIME, Credit Cards, Compression, Messaging, Shipping, and more. .NET, COM, C++, Java, Pocket PC, Delphi, Mac OS X, iPhone |
Latest Additions
138 articles overall 87 new, 79 updated, 0 moved. 37 were edited, 101 uneditedArticle topics listed: All Topics
Too many articles? Visit your profile page to change your newsletter article filters.
Tips and Tricks added
Grid & Data Controls
- Distinct Raw Data Population in DataTable - leopard447
How to do distinct raw data population in a DataTable (Unedited)
C#, DataTable
ASP.NET
- Disable ClientID for any control on ASP.NET Page - Lisetsky Val
Disable ClientID for any control on ASP.NET Page (Unedited)
ASP.NET, Controls - Invoke a ASP.NET page method from a User Control - Mohammad A Rahman
How to execute ASP.NET method from control's event handler of a web user control. (Unedited)
C#, ASP.NET - ASP.NET MVC - Debugging your routes - Karthik. A
Debugging ASP.NET MVC routes simplified using "Route Debug" (Unedited)
C#, ASP.NET, MVC, Debugging - Call A Page Method from a Subsequent Page - John Simmons / outlaw programmer
Back-tracking to make sure code is processed before the current page executes (Unedited)
ASP.NET - Make the entire GridView or any Table Row clickable and selectable in ASP.NET - DrABELL
Solution describes adding the "onclick" event and Javascript formatting of Table Rows in ASP.NET web pages (Unedited)
Javascript, ASP.NET, Gridview, Web-Development, CSS3, Tables, RIA, HTML5 - Alternate Rows in ASP.NET GridView, Tables using HTML5 / CSS3 - DrABELL
Novel HTML5/CSS3 features simplify alternate rows styling in GridView, DetailsView and other Tables (Unedited)
ASP.NET, Gridview, DataTable, DataRow, table, format, CSS3, DataGrid, HTML5, Data-Binding
HTML / CSS
- YouTube® Video Playback customization - DrABELL
YouTube® Video playback customization by adding web query parameters (Unedited)
Javascript, HTML, ASP.NET, Ajax, webservices, Web, RIA, HTTP - SAY IT WITH CSS! - Online Slide Show implemented as pure HTML5 / CSS3 solution - DrABELL
Online slide show (Apple iPad 2 in NY) implements "darkbox" pop-up by using novel CSS3/HTML5 features; NO JavaScripting (Unedited)
Web-Development, Application, graphics, CSS3, Web, HTML5, Images
Android
- Get Phone Contact Details - Atulkryadav
Get Phone Contact Details (Unedited)
Android
Azure
- Maintain Scroll Position Problem fix for Chrome. - Prakash Kalakoti
How to maintain scroll position of a long page with vertical scrollbar in browser other than IE. (Unedited)
C#, ASP.NET
DLLs & Assemblies
- 64 Bit Injection Cave - Rimon Orni
Code injection cave for 64 bit processes (Unedited)
C++, ASM, 64-bit
Programming Tips
- Trick when using Array.Contains() - Kiran Sonawane
A trick when using Array.Contains() (Unedited)
C#2.0 - How to validate a user control in ASPX page - Bajrang Singh
How to validate a user control in ASPX page (Unedited)
ASP.NET - How to load a view in maximized mode by default in MFC - Mukit, Ataul
Addresses the issue of opening a view in maximized mode the proper way in MFC. (Unedited)
MFC - Deserialize JSON with C# - ricrodrigues
Convert a JSON string to a List of C# Objects (Unedited)
C#, Javascript, JSON - Crystal Reports: Fix for "Load report failed" error. - Gregory.Gadow
Fix for "Load report failed" error in Crystal Reports (Unedited)
ASP.NET, Crystal - MVVM Friendly DataTemplate switching - Pete O'Hanlon
Switching data templates entirely in XAML. (Unedited)
WPF, DataTemplate - Object Relational Mapping via Reflection - Simon Bridge
Illustrates how to quickly and dynamically populate an object from a data-row (Unedited)
C#, Data, reflection - Simple Trick To Make Form Invisible - charles henington
(Unedited)
C# - Send SMS through way2sms using C# Code - Kalesh.S.R
Using this code user would be able to send SMS through way2sms application (Unedited)
C# - Getting the Office 2010 button like Gradient - vallarasus
Here is how you can achieve Gradients used in Office 2010 Buttons with a glow at the bottom. (Unedited)
C#1.0, C#2.0, C#3.0, C#4.0, Windows, Office - MessageBox wrappers under My Namespace - GlimmerMan
Use less code in your business logic for messages to the UI (Unedited)
VB.NET - Extension method to update controls in a MultiThreaded WinForm application. - RakeshMeena
This extension can be used to update controls in a thread safe manner. This method requires a MethodInvoker delegate as input parameter. It just checks whether the control is on a different thread than the caller. (Unedited)
C#, WinForms, multithreading - Few extension methods of String concatenation in C# - Mohammad A Rahman
Few extension methods of String concatenation in C# (Unedited)
C# (C#3.0, C#4.0)
String handling
- Ordinal suffixes in English for the nth degree - GAMerritt
A short C# method to put the Grammarians in a Good Humor (Unedited)
C# - Basic string to integer conversion extensions - leopard447
String handling Extension Methods (Unedited)
C#
Installation
- How to Distribute C run-time (CRT) Libraries with Your Application - zexspectrum
Some tips on available ways of distributing CRT DLLs with your Visual C++ application (Unedited)
C++, Visual-Studio
Database
- I don’t know why my boss always gets angry - jwood_denver
Why don't you just use a query like this?SELECT CAST(serverproperty(N'servername') AS varchar(50)) AS [Server Name], db_name() AS [Database Name], SCHEMA_NAME(schema_id) AS [Schema Name], [name] AS [Object Name], [type_desc] AS [Object Type], [create_date] AS [Create... (Unedited)
SQL-Server
C#
- Pascal and Camel Case to Display Text Conversion - Steve Roberson
This version treats the input string as an indexed string. The code is a little shorter.private string createDisplayText(string propertyName){ if (String.IsNullOrEmpty(propertyName)) { return String.Empty; } StringBuilder builder = new StringBuilder(); ... (Unedited)
C#, ASP.NET, format
Azure
- Maintain Scroll Position Problem fix for Chrome. - Wonde Tadesse
The other option will be to use Update Panel ASP.NET control as much as possible. It helps to retain the current position on the page whenever a postback happens to the page. (Unedited)
C#, ASP.NET
Win32/64 SDK & OS
- Open a command prompt anywhere. - manish76235
Good one. However typing CMD in the explorer address bar and pressing enter will also open up the command prompt inside the selected folder path as well. Hope this helps. (Unedited)
Win7, Shell, Commands
Programming Tips
- Trick when using Array.Contains() - Ctznkane
The Array class already contains this capability with no casting required. The IndexOf method is a static one that returns the index of the value and a -1 if it doesn't exist.Here is an example:exists = Array.IndexOf(arr, "item") >= 0 (Unedited)
C#2.0 - Changing App.Config on the fly for unit testing - EbenRoux
An alternative is to abstract the settings that you intend to use.So instead of changing your app.config on the fly, simply change a mock or the instance values of the configuration object.For example:public interface IApplicationConfiguration{ string MaybeAFolderINeed { get; } ... (Unedited)
C# - Get Default Mail Client Name - MWBate
I have been using the following code (suggested by someone on an MSDN forum) to determine if a default mail client has been configured:RegistryKey hkey = Registry.ClassesRoot.OpenSubKey( "mailto\\shell\\open\\command", false);hkey will be null if there is no such client. (Unedited)
C# - Deserialize JSON with C# - AlexCode
.NET Framework actually has this functionality built-in.The object is this one: system.web.script.serialization.javascriptserializer.aspx[^]I use this a lot and it works as expected.Here's 2 examples:1. Dumb deserializationHere's the easyest way, where you get what you... (Unedited)
C#, Javascript, JSON - Simple Trick To Make Form Invisible - pranav95
Even simpler.form1.opacity=0; (Unedited)
C#
String handling
- L33t Tr4nsl4t0r (Leet Translator) - Luc Pattyn
Way too much code. Using arrays of characters, your switch constructs can be reduced to just a few lines of code, like so:switch (c) { case 'a': sb.Append("4"); break; case 'e': sb.Append("3"); break; case 'i': sb.Append("1"); break; ... (Unedited)
C#4.0 - Ordinal suffixes in English for the nth degree - YDaoust
What aboutpublic static string NUMthOF(UInt32 v){ return v.ToString() + // Append the ordinal suffix for the unit digit // unless the ten digit is a one (force 'th') "thstndrdthththththth".Substring(2 * (int)(v / 10 % 10 != 1 ? v % 10 : 0), 2);}?Now all... (Unedited)
C# - Basic string to integer conversion extensions - George Swan
As it stands, the TryParse method will fail if the string contains commas. E.g., 10,000. To get around this, you can use:bool isnumber=int.TryParse(text,System.Globalization.NumberStyles.Integer | System.Globalization.NumberStyles.AllowThousands, ... (Unedited)
C#
Technical blogs added
Button Controls
- Ribbon with C++, Part 4: Layout Controls in Windows Ribbon Framework - Arik Poznanski
This is the 4th post about Windows Ribbon Framework features. On previous posts we have introduced the Windows Ribbon Framework, shown a complete example of how to develop a ribbon enabled application and reviewed the different buttons-based UI controls that the ribbon framework provides. In t (Unedited)
All-Topics
Files and Folders
- Linked Files in Visual Studio 2010 - Elad1010
File Linking, File Sharing and Shared Projects (Unedited)
VS2010
Shell and IE programming
- IE Blocking IFrame Cookies - Elad1010
IE Blocking IFrame Cookies (Unedited)
ASP.NET, PHP - Ribbon with C++, Part 1: Introduction to the Windows Ribbon Framework - Arik Poznanski
The basics of the Windows Ribbon Framework - a rich command presentation system that provides a modern alternative to the layered menus, toolbars, and task panes of traditional Windows applications. (Unedited)
C++, Windows, Framework, Controls - Ribbon with C++, Part 3: Using Buttons with Windows Ribbon Framework - Arik Poznanski
On previous posts we have seen an introduction to the Windows Ribbon Framework and learned how to develop a ribbon enabled application. In this post we continue our review of the various features in the Windows Ribbon Framework. This time we will focus on the most common feature in the ribbon: Butt (Unedited)
C++, Windows, Dev
Applications & Tools
- FubuMVC for dummies, noobs, and other noble gentlemen - Artem Smirnov
For those of you scared by the numerous steps required to setup a typical Open Source project, this would be a pleasant surprise. (Unedited)
C#, .NET, ASP.NET, Dev - HW'in it with FubuMVC - Artem Smirnov
A few tricks in using FubuMVC (Unedited)
C#, ASP.NET, Dev
Client side scripting
- JSON Object Code Example - Elad1010
An example to demonstrate the power and accessibility JSON offers to developers. (Unedited)
Javascript, Dev, JSON
HTML / CSS
- IE CSS Hacks - Elad1010
CSS Tips to allow coding for a specific IE version (Unedited)
CSS, HTML
Windows Mobile
- Things to take into account when you deliver applications for Connected Devices – Windows Azure to the rescue (EN) - NunoGodinho
What we should do to take the best out of Windows Azure for Connected Devices. (Unedited)
WinMobile, Azure, Dev
Windows Phone 7
- Metro In Motion Part #7 – Panorama Prettiness and Opacity - Colin Eberhardt
This blog post details a simple metro-in-motion behaviour which reduces the Panorama control’s contents while the user slides from item-to-item so that they can really appreciate your fancy background graphic! (Unedited)
C#, Windows-Phone-7, Dev
Microsoft BizTalk Server
- SQL SERVER – Solution – Puzzle – SELECT * vs SELECT COUNT(*) - pinaldave
Earlier I have published Puzzle Why SELECT * throws an error but SELECT COUNT(*) does not. This question have received many interesting comments. Let us go over few of the answers, which are valid. Before I start the same, let me acknowledge Rob Farley who has not only answered correctly very first (Unedited)
All-Topics
Database
- Database Documentation with a Data Dictionary Part 2 - Andrew Zwicker
A continuation of the data dictionary discussion with information about how the documentation is done. (Unedited)
SQL, SQL-Server, DBA, Dev - Gotcha #1167: Quoted Identifiers in Oracle - MBigglesworth79
Quoted identifiers appear to be causing more problems and confusion than they are worth; not least the potential creation of "duplicate" column names. (Unedited)
SQL, Oracle, Dev - INT to BINARY string in SQL Server - AlexCode
Converting INTs to BINARY in SQL Server (Unedited)
SQL, SQL-Server, Dev - A Look at Dapper.NET - MBigglesworth79
Dapper.NET is an Open-Source, lightweight ORM that is simple to use, and is compatible with any database which implements a provider for .NET. (Unedited)
C#, VB.NET, Dev
C#
- Delegates 101 - Part II: Anonymous Methods and Lambdas - MBigglesworth79
How to use anonymous methods and lambdas to make our code more terse by reducing the amount of code we need to write. (Unedited)
C#, VB.NET, .NET, Dev - Delegates 101 - Part III: Generic Delegates - MBigglesworth79
How to leverage the power of Generics in order to make our delegates more ...well ...generic! (Unedited)
C#, .NET, Dev
Other .NET Languages
- First Steps in F# - Elad1010
A little about F#. (Unedited)
F#, .NET, Dev
.NET Framework
- How To Use a .NET 4 Based DLL From .NET 2 Based Application? - Arik Poznanski
Introduction The official answer is you can’t. Even with the In-Process Side by Side execution (SxS) feature, introduced in .NET 4. The SxS feature was intended to be used when COM is involved. For example, if you got an application that loads plugins, like outlook, and it loads 2 COM plugins, one (Unedited)
All-Topics - Delegates 101 - Part I: What is a Delegate? - MBigglesworth79
What is a Delegate? (Unedited)
C#, Javascript, HTML, VB.NET, .NET
Win32/64 SDK & OS
- Fix Error: An attempt was made to load a program with an incorrect format - Arik Poznanski
Post on how to fix an error while trying to run the sample project ShellObjectWatcherSampleWPF from the latest version of Windows API Code Pack (Unedited)
Visual-Studio (VS2008, VS2010)-Topics
Internet / Network
- RSA private key import from PEM format in C# - Tamir Khason
How to import OpenSSL private key into .NET application and use it with X509 public certificate to establish TLS connection with asymmetric encryption and two phase certificates handshake (Unedited)
C#, Web-Development, security, key
Macros and Add-ins
- Spelling and Grammar Checking Plugin for Windows Live Writer - Arik Poznanski
Spelling and Grammar Checking Plugin for Windows Live Writer (Unedited)
C#, .NET (.NET2.0)
Uncategorised Quick Answers
- Quick JSON Tutorial - Elad1010
A very quick and usable tutorial for JSON (Unedited)
All-Topics, JSON
Uncategorised Tips and Tricks
- SEO One On One - Web of Links - Elad1010
Creating links, connecting other sites to yours (Unedited)
Windows
Design and Architecture
- Seven virtues of Test-Driven Development - Artem Smirnov
The advantages of using TDD. (Unedited)
All-Topics, Architect, Dev, Design
Uncategorised Technical Blogs
- MSSQL Statements Syntax - Elad1010
MSSQL Statements Syntax (Unedited)
SQL-Topics