This file contains hidden or 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
<ul> | |
<li ng-repeat="(key, errors) in editForm.$error track by $index"> <strong>{{ key }}</strong> errors | |
<ul> | |
<li ng-repeat="e in errors">{{ e.$name }} has an error: <strong>{{ key }}</strong>.</li> | |
</ul> | |
</li> | |
</ul> |
This file contains hidden or 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
// Arrange | |
// Act | |
// Assert | |
Naming convention |
This file contains hidden or 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
Update nuget.exe | |
nuget.exe update -self | |
Update source credentials so you don't have to keep entering them over and over | |
nuget.exe sources Update||Add -Name sourceNameHere -UserName userNameHere -Password passwordHere -Source sourceUrlHere |
This file contains hidden or 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
To be ran against mongo.exe | |
// Start up - specify db file location | |
"PathToMongo.exe" --dbpath C:\mongodb\data | |
// Connect to shell | |
mongo --port 27017 -u "username" -p "password" --authenticationDatabase "admin" | |
Option param --nodb | |
// Select db |
This file contains hidden or 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
protected void Application_BeginRequest() | |
{ | |
if (Request.Headers.AllKeys.Any(x => x.ToUpper() == "ORIGIN") && Request.HttpMethod.ToUpper() == "OPTIONS") | |
{ | |
Response.Flush(); | |
} | |
} | |
<customHeaders> | |
<remove name="X-Powered-By" /> |
This file contains hidden or 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
console.table(data); |
This file contains hidden or 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
.tt-hint, .tt-input { | |
display: block; | |
width: 100%; | |
padding: 3px 6px; | |
color: #555; | |
vertical-align: middle; | |
background-color: #ffffff; | |
border: 1px solid #cccccc; | |
border-radius: 4px; | |
} |
This file contains hidden or 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
var implementations = Assembly.GetExecutingAssembly().GetTypes() | |
.Where(x => typeof(IInterface).IsAssignableFrom(x) && | |
!x.IsInterface && | |
!x.IsAbstract && | |
x.IsClass && | |
x.IsPublic) | |
.Select(x => Activator.CreateInstance(x) as IInterface); |
This file contains hidden or 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
function htmlEncode(html) { | |
return document.createElement('div').appendChild( | |
document.createTextNode(html)).parentNode.innerHTML; | |
}; | |
function htmlDecode(html) { | |
var div = document.createElement('div'); | |
div.innerHTML = html; | |
return div.textContent; | |
}; |
This file contains hidden or 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; | |
using System.IO; | |
using System.Net.Mail; | |
namespace EmailValidator | |
{ | |
class Program | |
{ | |
static void Main() | |
{ |