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
    
  
  
    
  | public static string Properties(object o, Type type, string linebreak) | |
| { | |
| StringBuilder sb = new StringBuilder(); | |
| foreach (var prop in type.GetProperties()) | |
| { | |
| if (prop.CanRead) | |
| { | |
| var value = prop.GetValue(o, null); | |
| if (value != null) | 
  
    
      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 localeNumberFormat(amount, currencySymbol, delimiter, decimalPlaces) { | |
| // setup some default values | |
| if (typeof decimalPlaces === 'undefined' || decimalPlaces === null) { | |
| decimalPlaces = 0; | |
| } | |
| if (typeof decimalPlaces === 'undefined' || delimiter === null) { delimiter = ','; } | |
| //check that the value can be recognised as an Floating point number | |
| try { | |
| amount = parseFloat(amount); | 
  
    
      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
    
  
  
    
  | /* | |
| An example of prototypal inheritance in Javascript for when I forget! | |
| */ | |
| console.log('> inheritance.js'); | |
| function main(){ | |
| console.log('start main.'); | 
  
    
      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
    
  
  
    
  | Host gh | |
| Hostname github.com | |
| User git | |
| IdentityFile ~/.ssh/somekey | 
  
    
      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
    
  
  
    
  | @fixedCols :5; | |
| @fixedRows :2; | |
| .boxXxn(@X:5, @Y:2){ | |
| //iterate from 5 down to 0 X | |
| .boxXY(@indexX, @indexY) when (@indexX > 0) and (@indexY > 0){ | |
| .box@{indexX}x@{indexY}{ | |
| width:((100 / @fixedCols) * @indexX) * 1%; | |
| height:((100/ @fixedRows) * @indexY) * 1%; | 
  
    
      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
    
  
  
    
  | if ('querySelector' in document && | |
| 'localStorage' in window && | |
| 'addEventListener' in window) { | |
| // bootstrap the JavaScript application | |
| } | 
  
    
      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
    
  
  
    
  | define([], | |
| function () { | |
| var resolvePath = function (path, map) { | |
| var pathParts, i, ctx; | |
| ctx = map; | |
| i = 0; | |
| pathParts = path.split('.'); | 
  
    
      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 M = function(){ | |
| } | |
| M.prototype = { | |
| format : function(){ | |
| var s = "/data/mu/programs/{{programCode}}/campaign-mus/{{muid}}/validate"; | |
| var r = /{{[a-zA-Z_-]*}}/gi.exec(s); | |
| var key = ''; | |
| while(r!==null){ | 
  
    
      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
    
  
  
    
  | //<a href="#/my/application/route" rel="" data-forproxy="{myproxy:data}">Some link</a> | |
| var someView = { | |
| events : { | |
| 'click a[rel="proxy"]' : clickProxy | |
| }, | |
| clickProxy : function(e){ | |
| var $anc, proxyData, route; | |
OlderNewer