Tuesday, December 15, 2015

wysiwyg text editors for Angular 1.x

Besides most popular wysiwyg text editor for Angular 1.x - TextAngularhttps://github.com/fraywing/textAngular, I've recently discovered couple of other plugins.


Wednesday, November 18, 2015

Pascal's triangle drawing with JavaScript

Pascal's triangle is a triangular array of the binomial coefficients. It has a a long history and lots of interesting details related to calculus theory. Graphical implementation using svg library RaphaelJS can be fond here: http://codepen.io/shershen08/pen/Gpzzvp?editors=001

Tuesday, October 20, 2015

ReactJs component template

//inheritance and used 'variables'
        propTypes: {},
        mixins : [],
//lifecycle, occur before an instance of the component is created
        getInitialState: function() {},
        getDefaultProps: function() {},
//lifecycle, occur during the mounting/updating/mounted cycle
        componentWillMount : function() {},
        componentWillReceiveProps: function() {},
        componentWillUnmount : function() {},
//handy to have your custom methods separate and named differently
        _myCustomParseData : function() {},
        _onSelect : function() {},
//min lifecycle method
        render : function() {}
See the Pen jbYMoL by Mike (@shershen08) on CodePen.

Wednesday, September 16, 2015

Polymer project and polymer summit 2015

Polymer is a relatively new web framework by Google designed to leverage the evolving web platform. It has just released version 1.0, previously it was 0.5, the whole project is about 1.5 year old. Polymer in its core makes use of webcomponents specification
Below is short overview of the platform and some notes about the Polymer summit 2015 event.

Thursday, August 27, 2015

How to enable CORS in Chrome, Mozilla Firefox, Safari and IE

Source: https://vaadin.com/blog/

Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts, JavaScript, etc.) on a web page to be requested from another domain outside the domain from which the resource originated.

That can be extremely handy for development - when your page partly loads data from you main dev server and some API or resources are received from your local server with mocked APIs for example.

Below there instructions how to enable cross-domain requests (in other words disable default CORS policy) in all major browsers: Chrome, Mozilla Firefox, Safari and IE.