Showing posts from 2017

Factory and Decorator in AngularJS

Factory pattern is very ubiquitous design pattern which finds its uses in most of the design strategy. In this post we will use factory with Decorator and demonstrate - how decorator can be used along side of factory and provide extra functionality wi…

Custom filter in Angular : How to write a custom filter in AngularJS

Angular provides filtering capability which can be converting string from lower case to uppercase, converting time to Date or Sort(increasing or decreasing) an array based on some attributes. In this post we will see how to write custom filter - Filte…

How to exploit Singleton class with Reflection API and Its prevention

Singleton design pattern is intended to create only one instance of given class in context of given class loader (class loader which loads this given class). i.e: One instance per class loader. This post will discuss how to exploit a Singleton class w…

Linear classifier using least square approach in Pyhton

Sample Data:-   Use following data set 1 and data set-2 for classifier using least square approach Data Set -1 Data Set -2 Problem statement  :- Sample program to find the linear classifier using least square approach. import sys import …

Perceptron Learning - Implement online perceptron algorithm in python

The perceptron is a linear classifier, therefore it will never get to the state with all the input vectors classified correctly if the training set D is not linearly separable, i.e. if the positive examples can not be separated from the negative examp…

Load More
That is All