Visual studio feeds

All Visual Studio blogs in one place

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Google+

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Search

C++/CLI Enumerable::GroupJoin example for MSDN

AddThis Social Bookmark Button
Originally posted on: http://geekswithblogs.net/THines01/archive/2015/08/25/166492.aspxAdding to the “Missing from MSDN” series of posts: I find tremendous benefit in the Enumerable::GroupJoin method for mimicking the function of a left outer join in SQL --
the construct where the system reports back to you all “keys” and “values” even if the values (results) are null or empty. With the regular Enumerable::Join, only the Key-Value pairs or groupings are returned when there is an associated result.
I had found a nifty way of inverting the join to retrieve non-matching results and it was of use until I discovered
Enumerable::GroupJoin.

For all of my uses of Enumerable.* in C++/CLI, I always create a helper class to hold methods and the Funcs that will be used as delegates.
This helps prevent clutter and allows for easier reuse. Keeping with the tradition of creating an examples that COULD HAVE BEEN in MSDN, please examine the code below.
I took the liberty of using IEnumerable^ instead of List^ to remove unnecessary code (well, sort of…).
I also chose to not give Magnus Hedland a pet, so the alternate benefit could be shown (a record with no result). #include "stdafx.h" using namespace System;
using namespace System::Collections::Generic;
using namespace...(Read whole news on source site)

Microsoft Hates Enterprise Developers? -Telerik Developer Network

AddThis Social Bookmark Button
Microsoft Hates Enterprise Developers? -Telerik Developer Network



With hundreds of thousands of downloads
per week, tools like Bower, Grunt, Gulp, and Node have become
mainstream. Microsoft chose to not resist the trend but embrace it by
supporting these new tools in Visual Studio. As a result some enterprise
developers will be faced with tough choices. Those choices are to adopt
new processes, learn and bring it safely and securely to their
enterprise, or resist and hold on to what will eventually be legacy
software.

Unsafe operations are required in the real world

AddThis Social Bookmark Button
There is a pretty interesting discussion in the Raft mailing list, about clarifying some aspects of the Raft protocol. This led to some in depth discussion on the difference between algorithms in their raw state and the actual practice that you need in the real world. In case you aren’t aware, Raft is a distributed consensus protocol. It allows a group of machines to reach a decision together (a gross over simplification, but good enough for this). In a recent post, I spoke about dedicated operations bypasses. This discussion surfaced another one. One of the things that make
Raft much simpler to work with is that it explicitly handles topology changes (adding / removing nodes). Since that is part of the same distributed consensus algorithm, it means that it is safe to add or remove a node at runtime. Usually when you build a consensus algorithm, you are very much focused on safety. So you make sure that all your operations are actually safe (otherwise, why bother?). Except that you must, in your design, explicitly allow the administrator to make inherently unsafe operations. Why? Consider the case of a three node cluster, that has been running along...(Read whole news on source site)

The Morning Brew #1932

AddThis Social Bookmark Button
Information The Zen of Code Reviews: Best Practices – Michael Sorens Usage of into and let keyword in Query Expression C# – Ashish Kumar Switchable Actor Behaviour in Akka.NET – Jason Roberts The series Microsoft #Azure Essentials: Free #eBooks – Sergio Govoni Deploying to Linux & Windows Docker Containers, Why doesn’t Docker Tools for Visual […]

Using PowerShell cmdlets to create a VM in Azure resource manager

AddThis Social Bookmark Button
If you are a PowerShell fan like me, and wants to create Virtual machines and resources in an Azure resource group, you have to combine a set of PowerShell cmdlets to achieve this.
I have written a simple module which can be used in this case to create VM's in azure resource manager.

Switch-AzureMode AzureResourceManager
$ErrorActionPreference = 'Stop'

function EnsureResourceGroup
{
       [CmdletBinding()]
       param
       (
              [string] $ResourceGroupName,
              [string] $Location
       )

       Write-Information "Checking for existing resource group $($ResourceGroupName)"

       if((Get-AzureResourceGroup -Name $ResourceGroupName -ErrorAction SilentlyContinue) -eq $null)
       {
              Write-Verbose "$($ResourceGroupName) does not exist. Creating a new one at location $($Location)"
              New-AzureResourceGroup -Name
$ResourceGroupName -Location $Location
       }
       else
       {
              Write-Information "Success"
       }

       $ResourceGroupName
}

function EnsureStorageAccount
{
       [CmdletBinding()]
       param
       (
              [string] $ResourceGroupName,
              [string] $StorageAccountName
       )
      
       $resourceGroup = Get-AzureResourceGroup -Name $ResourceGroupName
       $location = $resourceGroup.Location

       Write-Information "Checking for existing storage account in resource group $($ResourceGroupName)"
       $storageAccount = Get-AzureStorageAccount -ResourceGroupName $ResourceGroupName -Name $StorageAccountName -ErrorAction SilentlyContinue

       if(($storageAccount) -eq $null)
       {
              Write-Verbose "$($StorageAccountName) does not exist. Creating a new one in resource group $($ResourceGroupName)"
              $storageAccount = New-AzureStorageAccount -ResourceGroupName $ResourceGroupName -Name $StorageAccountName -Location $location -Type Standard_LRS
       }
       else
       {
              Write-Information "Success"
       }

       $storageAccount
}

function EnsureVirtualNetwork
{
       [CmdletBinding()]
       param
       (
              [string] $VNetName,
              [string] $ResourceGroupName,
              [string] $Location
       )

Handle SQL Database Corruption like a pro!

AddThis Social Bookmark Button
Two main worries of an SQL DBA include making sure that data within the database is easily accessible to the right people and that there are no issues that pose any temporary or permanent threat to the data. While the first task revolves around assessing the performance of the database, the second task includes tackling database corruption and if possible, preventing it from occurring.

When it comes to achieving ideal SQL database performance, there are quite a few factors that should be assessed:
CPU and memory utilizationI/O bottlenecksClient CommunicationsConfigurations for operating system, storage and database installationAnd more
If all of these areas are
properly addressed, a DBA can be sure that everything is working fine performance wise. However, the “handling corruption” bit of his task is not so straightforward. It involves understanding what factors can lead up to it and how to recover from it if it happens. The subsequent sections address both these points in detail.

Database Corruption and its Causes

The technical definition of SQL database corruption is any problem within the database that causes an improper storage of the actual zeros and ones needed to store the data at the disk or IO sub-system level. In layman terms, an SQL database is...(Read whole news on source site)

Building your first end-to-end Cross Platform app – Part 2 – Windows Universal App

AddThis Social Bookmark Button
Hello and Welcome again to the second part of the series. In the Part 1, Building your first end-to-end Cross Platform app , we have learned the building the Core  Till now we have created Weather.Common, from a blank Visual Studio 2015 solution. Now ,we will be creating windows 10 universal app which can run [...]

New ASPNET5 Course Coming

AddThis Social Bookmark Button
I’m diligently working towards my new Pluralsight course and I am very excited about it. The new course is an end-to-end building of a web app using ASP.NET 5, MVC6, Entity Framework 7, Angular 1.4, and Bootstrap 3.x. This course is a bit different than other courses I’ve done because we’re releasing it before the RTM of ASP.NET 5. Because of this, I wanted to let my students know what to expect. The course will build a web app from an empty ASP.NET 5 project through to a deployed app. This mirrors my ASP.NET MVC5 course from a couple
of years ago, but is written with the new stack. The course will build a whole new project as well. This time, you’ll be building a tool for trip planning called “The World”. The course will be initially released based on ASP.NET 5 Beta 7 (expected late this month). Over the rest of the year, we’ll update it for every new drop (Beta 8, RC, and RTM if Microsoft sticks to their schedule. This new course should be available by the end of September. Cross your fingers!
Home