- D3
- MomentJS for date manipulation
- lodash very useful functional helpers or Underscore is good also
- GitHub Fetch API polyfill cool library for http, although angular's $http should be fine
- Chart.js charting library, easy to use api, however it's canvas, not SVG
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 el = d3.select('.vis'), | |
| elWidth = parseInt(el.style('width'), 10), | |
| elHeight = parseInt(el.style('height'), 10), | |
| margin = {top: 20, right: 20, bottom: 30, left: 50}, | |
| width = elWidth - margin.left - margin.right, | |
| height = elHeight - margin.top - margin.bottom; | |
| var svg = el.append("svg") | |
| .attr("width", elWidth) |
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 data = [ | |
| // { | |
| // "browser":"Chrome", | |
| // "value": "45" | |
| // }, | |
| // { | |
| // "browser":"Safari", | |
| // "value":"12" | |
| // }, |
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
| d3.select("#selections") | |
| .append("p") | |
| .text("New paragraph!"); | |
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
| .directive('scrollPosition', ['$window', function($window) { | |
| return { | |
| scope: { | |
| target: '=scrollPosition' | |
| }, | |
| link: function (scope, element) { | |
| // Detect request animation frame | |
| var scroll = window.requestAnimationFrame || | |
| window.webkitRequestAnimationFrame || | |
| window.mozRequestAnimationFrame || |
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
| .highlight { background: #ffffff; } | |
| .highlight .c { color: #999988; font-style: italic } /* Comment */ | |
| .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ | |
| .highlight .k { font-weight: bold } /* Keyword */ | |
| .highlight .o { font-weight: bold } /* Operator */ | |
| .highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ | |
| .highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ | |
| .highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ | |
| .highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ | |
| .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ |
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
| describe('Portfolio Module', function () { | |
| var DesignerContextSvc, $httpBackend, authRequestHandler, path, adTypeId = 1; | |
| var metadata = { | |
| collection: [{ | |
| name: "leaderboard", | |
| label: "Leaderboard", | |
| units: [{ | |
| name: "desktop", |
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 PostRequest(Uri serviceReqUrl, string jsonData, Dictionary<string, string> additionalHeaders, out System.Net.HttpStatusCode statusCode) | |
| { | |
| HttpResponseMessage response = null; | |
| try | |
| { | |
| using (HttpClient client = new HttpClient()) | |
| { | |
| HttpContent content = new System.Net.Http.StringContent(jsonData, System.Text.Encoding.UTF8, "application/json"); | |
| if (additionalHeaders != 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 sendFile = function (el) { | |
| scope.uploading = true; | |
| var filename = $('#inputElement').val(), | |
| fObj = el.files[0]; | |
| if (f == '') { | |
| return false; | |
| } | |
| var fPart = filename.split('\\'), | |
| origFilename = fPart[fPart.length - 1]; | |