Minggu, 03 April 2011
Even more about CPUs: What is CPU Caching?
Well, the slowest steps in the fetch-execute cycle are those that require accessing memory (Englander, 2007). CPU caching is a technique developed to minimize the impact that accessing memory has on the overall processing performance of a CPU. The technique involves placing a small amount (or multiple amounts) of high-speed memory between the CPU and main memory. This memory is referred to as
Little-known gems: Atomic conditional removals from ConcurrentDictionary
ConcurrentDictionary, first introduced in .NET 4, is an efficient dictionary data structure that enables thread-safe reading and writing, meaning that multiple threads may all be accessing the dictionary at the same time without corrupting it. It supports adding through its TryAdd method, conditional updates through its TryUpdate method, non-conditional adds or updates through its
ASP.NET: Obfuscating the Querystring
Some time ago I answered somebody's post on the MS C# newsgroup. This person was trying to "pass a connection" to another ASP.NET application from a redirect or a link and couldn't figure out how to do it. Of course, you wouldn't be able to pass the connection object itself (nor should you even try) but you could put the connection string to create it on the QueryString, grab it back out in the
More on Cores: Single Core? Dual Core? Quad Core? What's the Difference?
The core of a processor refers its components, along with system memory, that facilitate the fetch-execute cycle by which computers read (fetch) and process (execute) the instructions of programs. Although the physical implementation of a chip depends upon its architecture, all CPUs consist of two logical components: the arithmetic/logic unit (ALU) and the control unit (CU) (Englander, 2003).
Open Window, Dialog or Message Box from a ViewModel – part 2
In my previous post I have shown how to open a Window bound to a view-model triggered by the view, using a simple Action. In this post I'll show how to open a Window, triggered by the view-model. Opening a window directly by the view where the view decides when a Window should be opened, is an incorrect approach since the view shouldn't make that decision. This decision belongs to the Application
C# Adds Duck Typing, Latin keyword
It’s that time of year when I announce another new C# feature: robust duck typing.The C# language team chose a syntax that makes duck typing an opt-in feature, you specify it by using the new ‘duck’ keyword. Compare these two type definitions (note bold text): public class Foo{ public int Compare(Foo right) { ... }}public anatis Foo{ public int Compare(Foo right) { ... }} The first case is
SQL Server: TSQL Script to Get Hard Drives Detail
Recently, I need a script which can provide me detail (Driver Letter, Drive Label, Free Space, Used Space etc) of all installed hard drives. I found following script by G. Rayburn very helpful. Valid for versions: SQL Server 2005 and aboveNote: Before executing script, don't forget to enable Ole Automation Procedures from Surface Area Configuration or using sp_configure. /************************
Deciphering a SOAP fault with a 400 status code
Recently working with a partner I came across a solution for a limitation in WCF error handling. The root of the issue is a difference between SOAP 1.1 and SOAP 1.2 in the allowed HTTP status codes when a SOAP fault is returned. For SOAP 1.1, the status code must be 500 “Internal Server Error”. For SOAP 1.2, it varies based on the type of the SOAP fault. For env:Sender, the status code is 400
Jumat, 01 April 2011
Permutations in C# Using Recursion
IntroductionRecently, while searching for a method to descramble a string of characters, I came across an article by Alexander Bogomolny, entitled ‘Counting and Listing All Permutations’. The article, from Interactive Mathematics Miscellany and Puzzles, introduces three separate algorithms all capable of generating a list of permutations for a given set of elements. To rewrite a word descrambler
6 steps to implement DUAL security on WCF using User name + SSL
Introduction and Goal Basics Transport and Message level security Step 1:- Customize ‘WsHttp’ Bindings with security mode and credential type Step 2:- Create your custom validator class Step 3:- Define runtime behavior Step 4:- Define SSL for your WCF service Step 5 :- Consume WCF Service Step 6: Run your WCF service Source codeMy other WCF articles Introduction and Goal In the article we will
Langganan:
Postingan (Atom)