Skip to main content

Posts

Generic Method for Class DB table mapping

·       Code for mapping db selection to the class using System; using System.Collections.Generic; using System.Data; using System.Reflection; namespace DataSourceLib {     public class DataSource     {         private DataSource() { }         public DataSource(DataSet data) {             if (data == null ) { data = new DataSet(); }             dataSet = data;         }         private DataSet dataSet { set ; get ; }         public IList<T> GetList< T >()         {             List<T> list = new List<T>();             try             {                 DataTable dt = dataSet.Tables[0];                 foreach (DataRow dr in dt.Rows)                 {                     T obj = (T)Activator.CreateInstance( typeof (T));                     PropertyInfo[] propertyInfos;                     propertyInfos = obj.GetType().GetProperties();                     for ( int i = 0; i < data
Recent posts

Machine learning in a Nutshell

you start with the data that contains patterns. you can feed that data to the machine learning algorithm (may be more algorithms) to find the patterns in the data .This algorithm generates something called a model.Model functionality is to recognizes the patterns then presented with the new data. Application supplies new data to see if it matches known patterns such as the data about new transactions. The model can determine the probability whether the transaction is fraudulent or not, it knows that because of the patterns.      Machine learning lets us find patterns in existing data, then create and use a model that recognizes those patterns in new data Machine learning has gone mainstream - big vendors think there's big money in this market      Machine learning can probably help your organization.

Understanding machine learning

What is machine learning does?  It Finds patterns in data and uses those patterns to predict the future.          EXAMPLES :  Detecting credit card fraud : You can use machine learning  detect credit card fraud, Suppose you have data about previous credit card transactions. You could find patterns in that data potentially  that allows you to detect when a new credit card transaction is likely to be fraudulent. Determining whether a customer is likely to switch to a competitor :  You could possibly find the patterns in the existing customer data that will help you do that Lots more What does it mean to learn ? Yes it's something like your own learning process. You have learned reading,listening, walking everything by using your experience on it, the data you have in your mind and continuous improvements.  How did you learn to read? Well learning requires identifying patterns. Reading for instance you identifies letters and then the patterns of the le

The Core Concepts of Angular -- Jithin CJ

I started to learn angular from 2016, I was very curious about the celibacy of this super hero. From my initial understanding is like, the power of angular is only limited on " html decoration "  But this JavaScript framework has the potential to re-define conventional html-css patterns . Modern browsers support for things like modules, classes, lambdas, generators, etc. These features fundamentally transform the JavaScript programming experience. But big changes aren't constrained merely to JavaScript. Web Components are on the horizon. The term Web Components usually refers to a collection of four related W3C specifications: Custom Elements - Enables the extension of HTML through custom tags.  HTML Imports - Enables packaging of various resources (HTML, CSS, JS, etc.).  Template Element - Enables the inclusion of inert HTML in a document.  Shadow DOM - Enables encapsulation of DOM and CSS.  Developers can create fully encapsulated (Shadow DOM) declar

New in C#6

1. $ sign The purpose for it is to simplify string based indexing and that is all. its not some thing like current dynamic features of C# since it internally uses regular indexing functionality. to understand lets consider following example: var col = new Dictionary() { // using inside the intializer $first = "Hassan" }; //Assign value to member //the old way: col["first"] = "Hassan"; // the new way col.$first = "Hassan"; 2. Exception filters: Exception filters are already supported in VB compiler but now they are coming into C#. exception filters lets you specify a condition for a catch block. the catch block gets executed only if the condition is satisfied, this one is my favorite feature, so let's look at an example: Collapse | Copy Code try { throw new Exception("Me"); } catch (Exception ex) if (ex.Message == "You") { // this one will not execute. } catch (Exception ex) if (ex.Message == "Me") { // this one

Deligates

Delegates A delegate is a type that represents references to methods with a particular parameter list and return type.When you instantiate a delegate, you can associate its instance with any method with a compatible signature and return type. You can invoke (or call) the method through the delegate instance. When and Why to use Delegates A delegate can be seen as a placeholder for a/some method(s). By defining a delegate, you are saying to the user of your class "Please feel free to put any method that match this signature here and it will be called each time my delegate is called". Typical use is of course events. All the OnEventX delegate to the methods the user defines. Delegates are useful to offer to the user of your objects some ability to customize their behaviour. Most of the time, you can use other ways to achieve the same purpose and I do not believe you can ever be forced to create delegates. It is just the easiest way in some situations t

Web Services

Web Services A Web Service is programmable application logic accessible via standard Web protocols. One of these Web protocols is the Simple Object Access Protocol (SOAP). SOAP is a W3C submitted note (as of May 2000) that uses standards based technologies (XML for data description and HTTP for transport) to encode and transmit application data. Consumers of a Web Service do not need to know anything about the platform, object model, or programming language used to implement the service; they only need to understand how to send and receive SOAP messages (HTTP and XML). Soap Message A SOAP message consists of several elements, most notably an envelope. The envelope encapsulates the data transmitted within the SOAP message. Below is a simple SOAP message complete with HTTP headers: POST /demo/MSDN/PerfCounter.asmx HTTP/1.1 Connection: Keep-Alive Content-Length: 150 Content-Type: text/xml Host: localhost User-Agent: MS Web Services Client Protoc