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.Collections.Generic; | |
using System.ComponentModel.DataAnnotations; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
namespace QuickTests | |
{ | |
[TestClass] | |
public class SingerTests | |
{ |
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
internal static class ExceptionHandlingUtility | |
{ | |
/// <summary> | |
/// Determines if an <see cref="Exception"/> is fatal and therefore should not be handled. | |
/// </summary> | |
/// <example> | |
/// try | |
/// { | |
/// // Code that may throw | |
/// } |
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
<!-- What you can do today --> | |
<label for="firstname" class="@(ModelState.IsValidField("firstname") ? "" : "invalid")">First Name</label> | |
<!-- A proposed helper method that needs a name --> | |
<label for="firstname" class="@Validation.InvalidClass("firstname", "invalid")">First Name</label> | |
<!-- With a property that defines the invalid class name, which could be defaulted to "invalid" --> | |
@{ Validation.InvalidClassName = "invalid"; } | |
<label for="firstname" class="@Validation.InvalidClass("firstname")">First Name</label> |
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
<!-- Raw --> | |
<link href="~/Content/themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css" /> | |
<link href="~/Content/Site.css" rel="stylesheet" type="text/css" /> | |
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" /> | |
<script src="~/Scripts/jquery-1.6.2.min.js"></script> | |
<script src="~/Scripts/jquery-ui-1.8.11.js"></script> | |
<script src="~/Scripts/modernizr-2.0.6-development-only.js"></script> | |
<script src="~/Scripts/AjaxLogin.js"></script> |
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
SELECT TOP (30) | |
[Project1].[PackageRegistrationKey] AS [PackageRegistrationKey], | |
[Project1].[Id] AS [Id], | |
[Project1].[Version] AS [Version], | |
[Project1].[FlattenedAuthors] AS [FlattenedAuthors], | |
[Project1].[Copyright] AS [Copyright], | |
[Project1].[Created] AS [Created], | |
[Project1].[FlattenedDependencies] AS [FlattenedDependencies], | |
[Project1].[Description] AS [Description], | |
[Project1].[DownloadCount1] AS [DownloadCount], |
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
<# | |
.SYNOPSIS | |
Returns a random, timestamped, password | |
#> | |
# Base64-encode the Guid to add some additional characters | |
[DateTime]::Now.ToString("MMMddyy") + "!" + [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes([Guid]::NewGuid().ToString())) |
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
// What Example 46 shows here: http://json-ld.org/spec/latest/json-ld | |
"@graph" : [ | |
{ | |
"@id": "#homer", | |
"http://example.com/vocab#name": "Homer" | |
}, | |
{ | |
"@id": "#bart", | |
"http://example.com/vocab#name": "Bart", | |
"http://example.com/vocab#parent": { "@id": "#homer" } |
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
import React from 'react'; | |
export default (req, res, callback) => { | |
// Do async work, consuming data off req if needed | |
// Potentially set headers or other data on res | |
// When all the data is loaded, call the callback with the component | |
callback(React.createClass({ | |
render() { | |
return ( | |
<html> |
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
// Returns a translated form of "Welcome back, <strong>Jeff</strong>. It's good to see you again." | |
// There are several messages that can be supplied and they can have different sentence structures | |
// Regardless of the message, the name needs to be wrapped in a <strong> tag | |
import React from 'react'; | |
import ReactDOMServer from 'react-dom/server'; | |
export default React.createClass({ | |
displayName: 'Greeting', |
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
{ | |
"scripts": { | |
"build:core": "babel src -d lib && webpack", | |
"build": "NODE_ENV=production npm run build:core", | |
"postbuild": "echo 'Build Complete'", | |
"predev": "webpack --config webpack.dev.config.babel.js", | |
"dev": "NODE_ENV=development babel-node src/server", | |
"start": "nodemon --watch src/ -e js,jsx --exec npm run dev" | |
}, | |
"devDependencies": { |
OlderNewer