NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
| // knockout 2.2.1 | |
| ko.utils.arrayFilter = function (array, predicate) { /* .. */ } | |
| ko.utils.arrayFirst = function (array, predicate, predicateOwner) { /* .. */ } | |
| ko.utils.arrayForEach = function (array, action) { /* .. */ } | |
| ko.utils.arrayGetDistinctValues = function (array) { /* .. */ } |
NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
| using System; | |
| using System.Web; | |
| using System.Web.Mvc; | |
| /// <summary> | |
| /// See http://stackoverflow.com/questions/1171035/asp-net-mvc-custom-error-handling-application-error-global-asax/5952774#5952774 | |
| /// for implementation details | |
| /// </summary> | |
| public class AjaxRedirectResult : RedirectResult { |
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Reflection; | |
| using NUnit.Framework; | |
| namespace MyProject | |
| { | |
| [TestFixture] |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| input { | |
| height: 34px; | |
| width: 100%; | |
| border-radius: 3px; | |
| border: 1px solid transparent; | |
| border-top: none; | |
| border-bottom: 1px solid #DDD; | |
| box-shadow: inset 0 1px 2px rgba(0,0,0,.39), 0 -1px 1px #FFF, 0 1px 0 #FFF; | |
| } |
| ################### | |
| # compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.pdb | |
| *.dll.config | |
| *.cache |
| define(function(require) { | |
| var system = require('../system'); | |
| var animationTypes = [ | |
| 'bounce', | |
| 'bounceIn', | |
| 'bounceInDown', | |
| 'bounceInLeft', | |
| 'bounceInRight', | |
| 'bounceInUp', |
| public static class IISExpress | |
| { | |
| private static readonly List<string> sites = new List<string>(); | |
| private static readonly List<string> paths = new List<string>(); | |
| public static void StartIISExpress(string site, int port = 7329) | |
| { | |
| if(!sites.Contains(site.ToLower())) | |
| sites.Add(site.ToLower()); | |
| else return; |
When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.
Raw Attribute Strings
<div my-directive="some string" another-param="another string"></div>