Monday, October 29, 2018

What is Flutter ?

What is Flutter?

Flutter - Google's Mobile App SDK

Flutter is an open-source mobile application development SDK created by Google.

Flutter allows you to build beautiful native apps on iOS and Android from a single codebase.

Flutter consists of three Major components,

  • Flutter Engine
  • Foundation Library
  • Design Specific Widgets

Flutter Engine:
  • Primarily written in C++.
  • Provides low-level support using Google’s Skia graphics library.
  • Interfaces with platform specific SDK for Android and iOS.

Foundation Library

  • Written in Dart.
  • Provides APIs to communicate with Flutter Engine.

Design Specific Widgets

  • There are two design specific widgets one for Android and another one for iOS.
  • Material Design widgets implement Google's design language.
  • Cupertino widgets imitate Apple's iOS design.

Getting started with Blazor

In this blogpost, will explain on how to set up Blazor development environment for developing simple Hello World !! application.

If you want to know, What is Blazor?

What is Blazor ??

What is Blazor?
Blazor is a single-page web app framework built on .NET that runs in the browser with WebAssembly.

Browser + Razor = Blazor!!

Blazor makes heavy use of Razor (a template engine), a markup syntax for HTML and C#.

Blazor is based on existing web technologies like HTML and CSS, but you use C# and Razor syntax instead of JavaScript to build composable web UI.  

Blazor will have all the features of a modern web framework, including:

Reference : Signal R

Microsoft team defined Signal-R as, ASP.NET SignalR is a new library for ASP.NET developers that makes developing real-time web functionality easy. 

SignalR allows bi-directional communication between server and client. 

Servers can now push content to connected clients instantly as it becomes available. 

SignalR supports Web Sockets, and falls back to other compatible techniques for older browsers. 

SignalR includes APIs for connection management (for instance, connect and disconnect events), grouping connections, and authorization.

Thursday, August 2, 2018

What is Machine Learning

What is Machine Learning?

Machine learning (ML) is part of Artificial Intelligence (AI), uses the technique that teaches computers how to do tasks by learning data. 

ML uses difference algorithms to find the pattern, similarity, matches for data classification etc to predict the results.

Machine Learning uses different types of learning mechanisms.
  • Supervised Learning
  • Unsupervised Learning.
In Supervised Learning method, train the model with the known input and output data which predicts the future results. 
In Unsupervised Learning method, train the model using the information that is neither classified and allow the algorithm to act on the information without any guidance. 
Each learning method has sub-categories as mentioned below.
  • Supervised Learning
    • Classification 
Classification learning method is used for categorising a certain observation into a group. 
For ex: 
      • A simple use case would be, to predict if a given email is spam or not? 
      • Classifying consumers reasons of visit in store in order to send them a personalized campaign.
Classification Algorithms
      • Discriminant analysis
      • K-nearest neighbor
      • Support Vector Machine (SVM)
      • Boosted decision trees
      • Bagged decision trees

    • Regression
Regressing learning method is used for predicting and forecasting for continuous values. 
For ex: 
      • Predicting a heart attack based on data from an electro cardiogram
Regression Algorithms
      • Linear model
      • Nonlinear model
      • Regularization
      • Stepwise regression

  • Unsupervised Learning
    • Clustering
Clustering is the process of grouping similar entities together. The goal of this unsupervised machine learning technique is to find similarities in the data point and group similar data points together. 
For Ex: 
      • You can identify different groups/segments of customers and market each group in a different way to maximize the revenue. 
Clustering Algorithms
      • Hierarchical clustering 
      • K-means clustering 
      • Gaussian mixture models
      • Hidden Markov models 
      • Self-organizing maps 
      • Fuzzy c-means clustering





Saturday, December 9, 2017

Difference between WebClient and HttpClient

I recently started learning and writing WebAPI services rather WCF REST services. 
While consuming WebAPI services, I learned the below differences between WebClient and HttpClient.


 Avail­able in older ver­sion of .NET  .NET 4.5 only. Cre­ated to sup­port the grow­ing need of the Web API REST calls
 WinRT appli­ca­tions can­not use WebClient  Http­Client can be used with WinRT
 Pro­vides progress report­ing for downloads.  No progress report­ing for downloads.
 Does not reuse resolved DNS, configured-cookies.  Can reuse resolved DNS, cookie con­fig­u­ra­tion, and other authentication.
 You need to new up a Web­Client to make the con­cur­rent request.  Sin­gle Http­Client can make con­cur­rent requests.
 Thin layer over WebRe­quest and WebResponse  Thin layer over Http­We­bRe­quest and HttpWebResponse
 Mock­ing and test­ing Web­Client is difficult  Mock­ing and test­ing Http­Client is easy
 Sup­ports FTP.  No sup­port for FTP.
 Both syn­chro­nous and Asyn­chro­nous meth­ods are avail­able for IO bound requests.  All IO bound meth­ods in HTTP­Client are asynchronous.


Wednesday, December 6, 2017

Differences between Single vs SingleOrDefault and First vs FirstOrDefault and Last vs LastOrDefault?

Differences between Single vs SingleOrDefault and First vs FirstOrDefault and Last vs LastOrDefault?

Difference between Single vs SingleOrDefault?
Single: Returns the element based on the given condition. If the condition matches for more than one element then it throws Invalid operation exception.
SingleOrDefault: Returns the element based on the given condition and returns a default value if no matches found. If the condition matches for more than one element then it throws Invalid operation exception.

Difference between First vs FirstOrDefault?
First: Returns first element based on the given condition. 
FirstOrDefault: Returns first element based on the given condition and returns a default value if no matches found.

Difference between Last vs LastOrDefault?
Last: Returns Last element based on the given condition. 
LastOrDefault: Returns Last element based on the given condition and returns a default value if no matches found.

Sunday, December 3, 2017

Xamarin iOS namespace / class name prefix details

Recently, I'm focussing on Xamarin development for iOS and Android.

Here are some of the Xamarin iOS namespace/class name prefix details.

AVAudioPlayer - AV means Audio Video
ABAddressBook - AB means Address Book
CBCentralManager - CB means Core Bluetooth
CFSocket - CF means Core Foundation
CLLocationManager - CL means Core Location
EKCalendarChooser - EK means Event Kit
EAAccessory - EA means External Accessory
NSCache - NS means NextStep
GLKView - GLK means GL Kit View
GK classes - GK means Games Kit
MKMapView - MK means Map Kit
MPMediaPickerController - MP means Media Picker
PKAddPassesViewController         - PK means Pass Kit
QLPreviewController - QL means Quick Look
SK Classes (SKRequest) - SK means Store Kit
UI Classes (UIAccelerometer)      - UI means User Interface
Ad classes (AdBannerView)         - AD means Advertisment

I hope this will help someone to understand the namespace/ class name prefix.

Friday, June 30, 2017

Extracting war files in Windows 7 without renaming (without 3rd partly tools)

Some times, we need to extract war files in windows 7 machine using windows explorer. For this, we need to rename the file *.war to *.zip .

We need to windows machine, use compress folder option for .war files by using below command.

assoc .war=CompressedFolder
Now you can see, the *.war file icon changed to compress folder icon and you can extract the files without renaming (*.zip) and extracting them or no need to use 7-zip or any other tools.

Step 1: Open command prompt in admin mode.

Step 2: Execute this command assoc .war=CompressedFolder

Step 3:You can extract *.war files by right click + Extract All command.

Similar war, you can associate , jar and ear files using this assocation as mentioned below.

assoc .jar=CompressedFolder
assoc .war=CompressedFolder
assoc .ear=CompressedFolder

Happy coding !