Over the years I have created and seen some interesting ways to create frozen columns. Some involved using javascript and some with just css.
To make a fixed or frozen column you typically create a table with a cell that has a cell with position absolute and provide a width.
Example: http://jsfiddle.net/72077p7g/
Another example: http://jsfiddle.net/m5rn687d/
Javascript example:
http://www.fixedheadertable.com/
Sunday, June 21, 2015
Thursday, June 18, 2015
Azure Cloud Service - Change Default Guest OS Windows Version via Service Configuration file
Azure Cloud Services use Windows 2008 Server R2 operating system by default.
How do you override your Azure Cloud Service to use Windows 2012 Server R2 or other operating system? You could manually change it via the Azure web interface but then each time you deploy your cloud service it will be overwritten.
To automate this you can update osFamily value in the Service Configuration file for your web role.
- Windows 2008 Server R2 = 2
- Windows 2012 Server = 3
- Windows 2012 Server R2 = 4
<ServiceConfiguration serviceName="TestCloudService"xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration"osFamily="4" osVersion="*" schemaVersion="2014-01.2.3">
Reactive Programming in JavaScript - Reactive Manifesto
Reactive Programming in JavaScript could be considered the next evolution of asynchronous programming; the next pattern for asynchronous development after JavaScript promised based patterns.
Reactive Manifesto - http://www.reactivemanifesto.org/
RxJS
MS Open Technologies has developed RxJS - RxJS or Reactive Extensions for JavaScript is a library for transforming, composing, and querying streams of data.
The Reactive Extensions for JavaScript (RxJS) is a set of libraries for composing asynchronous and event-based programs using observable sequences and fluent query operators that many of you already know by Array#extras in JavaScript. Using RxJS, developers represent asynchronous data streams with Observables, query asynchronous data streams using our many operators, and parameterize the concurrency in the asynchronous data streams using Schedulers. Simply put, RxJS = Observables + Operators + Schedulers.
RxJS Overview
Wednesday, June 17, 2015
Angular directive that will only allow numeric input
Create an input that is of type text. The directive will take the value and parse int therefore turning it into a number.
<input type="text" numeric-input-only ng-model="test.Units" required />
Directive:
angular.module('directives').directive('numericInputOnly', [function () {
return {
require: 'ngModel',
link: function (scope, element, attrs, modelCtrl) {
modelCtrl.$parsers.push(function (inputValue) {
// When ng required is used
// In such cases, when a letter is typed first, this parser will be called
// again, and the 2nd time, the value will be undefined
if (inputValue == undefined)
{
return '';
}
var transformedInput = inputValue.toString().replace(/[^0-9]/g, '');
if (transformedInput != inputValue) {
modelCtrl.$setViewValue(parseInt(transformedInput));
modelCtrl.$render();
}
return parseInt(transformedInput);
});
}
};
}]);
Another example that I haven't tried yet is to prevent the user from being able to enter certain keys by binding to keydown.
.directive('onlyNum', function() {
return function(scope, element, attrs) {
var keyCode = [8,9,37,39,48,49,50,51,52,53,54,55,56,57,96,97,98,99,100, 101,102,103,104,105,110];
element.bind("keydown", function(event) {
console.log($.inArray(event.which,keyCode));
if($.inArray(event.which,keyCode) == -1) {
scope.$apply(function(){
scope.$eval(attrs.onlyNum);
event.preventDefault();
});
event.preventDefault();
}
});
};
})
Wednesday, June 10, 2015
To quote "The Dumbest Man in Congress"...advice for companies, advice to clients
Good read: http://cognition.happycog.com/article/the-dumbest-man-in-congress
Subscribe to:
Posts (Atom)