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
PolicyManagement.UpsertPolicyView = SC.View.design({ | |
childViews: [ "header", "body" ], | |
header: SC.TemplateView.extend({ | |
templateName: "upsert_policy_header", | |
render: function(){ | |
return "<h1>blah</h1>"; | |
} |
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
App -> Controllers -> Views -> Templates | |
\------- Javascript --------/ \- HTML - / | |
App: The App bootstraps the application environment, defines application routes and orchestrates controller transitions. | |
It provides controllers with an outgoing interface to communicate with the application. | |
Controllers: Controllers define islands of functionality in the application. They instantiate models and bootstrap views. | |
They provide views with an outgoing interface to communicate with the controller. | |
Views: Views bootstrap templates and nested views and translate user events into view method calls. |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type"/> | |
<title>Jasmine suite</title> | |
<link rel="stylesheet" href="/__JASMINE_ROOT__/lib/jasmine.css" type="text/css" media="screen"/> | |
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
@validator << myMethod param1, param2 | |
@validator[' __invoke_message__ '] 'myMethod', param1, param2 |
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
{ | |
isValid: false | |
payload: [ | |
{ field: "field 1", message: "message 1" }, | |
{ field: "field 2", message: "message 2" } | |
] | |
} |
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
{ | |
"Raven-Entity-Name": "LinkLibraries", | |
"Raven-Clr-Type": "TNW.PolicyManagement.Entities.LinkLibrary, TNW.PolicyManagement-Core" | |
} | |
============= | |
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
[StepArgumentTransformation] | |
public static DateTime GetDateTime(string match) | |
{ | |
return DateTime.Parse(match); | |
} | |
[StepArgumentTransformation(@"(.*) (?:to|-|through) (.*)")] | |
public static Range<DateTime> DateRange(string lowerBound, string upperBound) { | |
return new Range<DateTime> { Lower = DateTime.Parse(lowerBound), Upper = DateTime.Parse(upperBound) }; | |
} |
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
fileType = Enum.Parse(typeof(ArtifactStore.ArtifactFileType), fileExtension.ToUpper()); | |
fileType = Enum.GetValues(typeof (ArtifactStore.ArtifactFileType)) | |
.Cast<ArtifactStore.ArtifactFileType>() | |
.Where(m => m.ToString() == fileExtension.ToUpper()).SingleOrDefault(); |
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 static class Serializer | |
{ | |
private static JsonSerializer ServerToServerInstanceBacker; | |
private static JsonSerializer ServerToClientBacker; | |
private static JsonSerializer ClientToServerBacker; | |
public static JsonSerializer ServerToServerInstance { get { return ServerToServerInstanceBacker = ServerToServerInstanceBacker ?? Get(); } } | |
public static JsonSerializer ServerToClientInstance { |
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 static Guid Combine(params Guid[] guids) { | |
const int BYTECOUNT = 16; | |
byte[] destByte = new byte[BYTECOUNT]; | |
var listOfByteArrays = guids.Select(guid => guid.ToByteArray()).ToArray(); | |
for (int i = 0; i < BYTECOUNT; i++) { | |
destByte[i] = listOfByteArrays.Aggregate<byte[], byte>(0, (current, array) => (byte) (current ^ array[i])); | |
} | |
return new Guid(destByte); | |
} |
OlderNewer