This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add/Remove types as needed | |
ls * -recurse -include *.aspx, *.ascx, *.cs, *.ps1, *js | Get-Content | Measure-Object -Line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void SaveChanges() | |
{ | |
try | |
{ | |
_context.ChangeTracker.DetectChanges(); | |
_context.SaveChanges(); | |
} | |
catch (DbEntityValidationException ex) | |
{ | |
// Retrieve the error messages as a list of strings. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Plan | |
//-------------------------------------- | |
// Planning Windows Store apps | |
http://msdn.microsoft.com/en-us/library/windows/apps/hh465427 | |
// Design inspiration | |
http://msdn.microsoft.com/en-us/library/windows/apps/hh868274.aspx | |
// Build | |
//-------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Change the UID | |
>vboxmanage internalcommands sethduuid <NAME_OF_VDI>.vdi | |
// Clone and change format | |
>vboxmanage clonehd <NAME_OF_VDI>.vdi --format VHD | |
// Notes: vboxmanage is located in default installation directory of Virtual Box. If .vdi is currently in use, may | |
// have to shutdown and remove from the player. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Program | |
{ | |
class Program | |
{ | |
/// <summary> | |
/// Show way to reduce cyclomatic complexity in nested conditionals. | |
/// </summary> | |
/// <param name="args"></param> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gallery | |
https://github.com/mbostock/d3/wiki/Gallery | |
A basic SVG line chart in ASP.Net MVC using d3.js: | |
http://www.orbifold.net/default/d3linechart/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Issue: Visual Studio Express 2012 for Web does not come with a console project template. | |
// Resolution: Create class library project, set project "Output type" to console application, and create a file with | |
// the following code: | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace ClassLibrary1 | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Enable remote desktop | |
Control Panel > All Control Panel Items > System > Advanced system settings | |
Navigate to Remote tab and configure settings. | |
// Allow machine to response to ping requests | |
Navigate to "Windows Firewall with Advanced Security" and enable the inbound rules for "File and Print Sharing (Echo Request - ICMPv4-In)". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Development Architecture, Microsoft Web Development: | |
// Web development environment, WebMatrix 2 | |
http://www.microsoft.com/web/webmatrix/next/ | |
// Cloud source control, Team Foundation Server | |
https://[ACCT_NAME.]tfspreview.com/ | |
// Source explorer, Team Explorer for Microsoft Visual Studio 2012 | |
http://www.microsoft.com/en-us/download/details.aspx?id=30656 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Concurrent.go | |
// Simple example that demonstrates usage of Go routines. | |
package main | |
import ( | |
"fmt" | |
"time" | |
"math/rand" | |
) |
NewerOlder