Thursday, 7 July 2016

Console application pass parameters

Target of application to be like calculator, you will pass the string like n1+n2-n3/n4*n5 and it will calculate the value and give the result. e.g. 2+2-2*2/2 will give the result as 2

Friday, 24 June 2016

get current location in android example code.

Below demonstration is in Visual Studio 2015, cordova application to get the current location in android. It will give the overview that how you will get your current location in google map. Like Below.


Follow the below steps to get current location in android code.

Sunday, 19 June 2016

Issue : procedure entry point __crtCreateSymbolicLinkW could not be located in the dynamic link library MSVCR110.dll.

Issue :

if you are getting below issue while starting the visual studio 2012,

---------------------------
devenv.exe - Entry Point Not Found
---------------------------
The procedure entry point __crtCreateSymbolicLinkW could not be located in the dynamic link library MSVCR110.dll.
---------------------------
OK
---------------------------

Solution

Just install Visual C++ Redistributable for Visual Studio 2012 Update 4 from below link,
Based on requirement download 32bit or 64bit setup.

https://www.microsoft.com/en-in/download/details.aspx?id=30679

Sunday, 5 June 2016

Difference between string and String builder

Show below for demonstration of  Difference between string and String builder.

String
String belongs to system namespace. Its commonly use reference type.  If we are not perform any operation string is fast.  We can initialize the string directly like below.

string str = "name";

Friday, 20 May 2016

Visual studio shortcut keys.

Find out the Visual studio shortcut keys which helps in day to day development activity and makes your development fast. These visual studio shortcut keys and just common keys to use.


SNO
Short Cut Key
Description
1
Ctrl+C , Ctrl+Ins
Copy Content
2
Ctrl+X, Shift+Del
Cut content
3
Ctrl+V, Shift+Ins
Paste content
4
Ctrl+Shift+V, Ctrl+Shift+Ins
Cycle Clipboard Ring, paste the multiple copy content
5
Del, Ctrl+Del
Delete

Thursday, 19 May 2016

Javascript Interview Question

1.       What is JavaScript?
2.       What is feature of JavaScript?
3.       Where we can use JavaScript.
4.       What Advantage and Disadvantage of JavaScript?
5.       What is difference in JavaScript and Asp Script and which is faster.
6.       Which has invented JavaScript?
7.       How to defined variable in JavaScript?
8.       What is Undeclared and undefined variables?
9.       What is global variable in Javascript?

Tuesday, 3 May 2016

AngularJs Service, Factories and Providers

 Service in AngularJS

AngularJs Service, Factories and providers are all injectable types.
An AngularJs service encapsulates specific business logic & exposes an API to be used by other components to invoke this logic.

e.g. $timeout service executes function after specifies interval. $http service encapsulates the logic required to interact with REST backbends.

AngularJS service is always Singleton.

Service is registered using service function of angular.module().
The Second argument to service() is a constructor function to inject the service.

Tuesday, 12 April 2016

encode and decode query string asp.net

Use below code to encode the query string using AntiXSS library for it you need to refer the antixss library in your code.

What is Antixsslibrary ?
It helps you to protect your code from cross site scripting. It helps to encode the text.
Cross site scripting (XSS) occurs  mostly on  due following .
1. When Dynamically data changing.
2. Passing the data through query string.
3. Displaying data to UI which is allowing to insert from user (they can insert the script aswell)
4. Showing any messages to UI.

clear controls in asp.net

Suppose you have the list of input control that you want to clear it after saving the records or updating the records, you can use the generic method and that you can call from your derived class and pass the control.

Use below method  for same it will clear your input control from C# code behind.

Tuesday, 29 March 2016

Simple Crud Operation Using AngularJS.

A step by step and simple demonstration of doing the crud operation in AngularJS.
Create a simple form like  below.

1.       Defined the Ng-App and Ng-Controller at top.

Tuesday, 22 March 2016

Custom Filter in AngularJS

1. What is Filter in AngularJS.
AngularJs provide the in build filter which will modify your output. There are  certain inbuilt filters like.
LowerCase : which will change the output as lower case.
Upper Case : which will change the output as Upper case
Number : which will change it to number type.
Currency : Convert out put to currency type.

On the same line AngularJS give the facility to extend the filter and we can create our own custom filter.

2. What is Custom Filters.
Create your own filter to modify the output.
Lets see the two type of custom filter in AngularJs which is very simple to understand and Helpful to know of the custom filter will create.

Sunday, 6 March 2016

Top 30 angularjs interview questions

1.       What is AngularJs?
AngularJs is a JavaScript framework which we use to create highly scalable client application & simplifies the binding of JS object with HTML elements. It extends the syntax of HTML to express application components. It extends the HTML extension using the attributes e.g. ng-
<div ng-app>
Angular JS provides many attributes which extend the feature but all of them start with ng-.

2.       What is the key features of AngularJs
AngularJs come with lots of flexibility and features like:
a.       Two way data bindings
b.      Scope
c.       Follow MVC patterns
d.      Injectable Types (like Service, factory, Providers)
e.      Directive
f.        Filters

Thursday, 18 February 2016

VS2015 New Features

1.       Download Visual studio community version as free.
Use below link to get the download page. Microsoft announce for open source of community version of VS2015.


Wednesday, 17 February 2016

Dependency Injection in MVC using Unity


What is dependency Injection?

Dependency Injection makes your application as decoupled and loosely couple to your code. It use to resolving the dependency of your code. It follow the Dependency Inversion principle of SOLID.
This is the way of injecting the code based on the feature required in application.
There are basically three ways you can approach to implement the dependency Injection.

1.       Using Property Getter and setter
2.       Using Constructor.
3.       Through Interface.


How Implement the Dependency Injection in MVC using Unity?

What is TypeScript

What is TypeScript

Type script is superset of javascript it compile on top of javascript only.  When Type script comple it will convert to javascript only. We are saying it as type script as it provide the Type safe javascript format. It uses the concept of OOPS and implement the javascript as OOPS based.
e.g. in Javascript we defined variable like;
var v = 20; // We don’t defined the type.
But if you see in type script it will be
var v : number = 20; // We defined the type
Command to install Type Script in node.js
npm install -g typescript


You can download the type script from Microsoft by given below link:

Wednesday, 10 February 2016

Difference between Delegate, Func, Action and Predicate.

Lets first see what is delegate.

If you will say delegate always one thing is come into our mind, a function pointer calling as an argument.
But it’s no sense with this Definition its showing the concept of use of delegate it won’t say why we need it and when we need this delegate.
For this we need to check with the English meaning of delegate, a representative. e.g Indian delegate go to US to deal something.
So this representative will give the time to time details of the operation and this delegate is the wrapper for our India which we hide but to present to the US also.

Saturday, 6 February 2016

NodeJS tutorial with Visual studio Code

 node.js tutorial for beginners with visual Studio Code

Download Visual Studio Code : Free IDE developed by microsoft which run under any platform.

Download Node JS :

What is node JS?

Node.js is an open-source, cross-platform runtime environment for developing server-side Web applications. Node.js worked under Chrome V8 JavaScript engine. Node.js was developed by Ryan Dahl in 2009 and its latest version is v0.10.36. Node.js is a runtime environment and library for running Javascript application outside the browser.

Sunday, 31 January 2016

How to call Stored Procedure in Entity Framework

 Entity  frame work providing the option of adding, updating or deleting the records. It is also giving the way of calling the store procedure in entity Framework to Insert, Update and Delete the options.
Entity framework will create User defined function for store procedures.
 Let’s see how we can add call the store procedure in entity frame work.
1.              Creation of store procedure in database.

Entity framework code first example


A simple example of code first approach in entity frame work.

1.       Take the reference of entity frame work from Nugget Package and install it.


Top 30 Entity Framework Interview Question

1.       What is Entity Framework?
Entity Framework is based on Object Relation model (ORM) framework developed by Microsoft.
It will automate the Why of interaction between database and your code. It makes your application as rapid develop by overriding for creating of framework for all your ADO.net.
It make easier to access Data base using linq query.
You can access the tables and storeprocedure detail in c# code and perform the crud operation very easily.

2.       What its advantage?
Advantage of using entity framework is to generate the automated code to interact with data base. Its make your application in fast pace of development.

Friday, 15 January 2016

Angularjs Tutorial for beginners – Part2

Continuing the article what I left in previous article; will cover.

·         What is AngularJS  Filters
·         How to use AngularJS Events             
·         How to do Validation in AngularJS Forms
·         How to use $http in Angular JS
·         How to call service or WebAPI in AngularJS 

Please see the part one before proceeding with this article.


1.    AngularJS Filters


Thursday, 14 January 2016

Angularjs Tutorial for beginners – Part1

This articles is for whom who is going to start working on angularJs and want an over view of it and basic directive. Target audience is only AngularJs beginners.


Once you reed you will get the answer of.
1.       What is angularJs
2.       What is directive in angularJs
3.       How data is binding in angularJS.
4.       What is expression in angularJs
5.       What is modules and controller in Angularjs
6.       How angularjs follow MVC architecture
7.       What is two way binding in angular.

What is AngularJs


       AngularJS is a structural framework for dynamic web apps.

Thursday, 7 January 2016

web api with entity framework example in MVC

You can give the answer of below question after complete this exercise.


  • Webapi example in mvc 5 
  • How to add Web API to an existing ASP.NET MVC (5) 
  • Differnce in WEBApi Controller and MVC Controller
  • List of Verb in WebAPI
  • How to place Routing for WebAPI
  • How to check the WEBApi Get
  • How to use Advance Rest Client.
  • How to  Check WEBApi Post
  • How to  Check WEBApi Put
  • How to  Check WEBApi Delete
  • Convert object to json in MVC.
  • How to Use WebClient to call WebApi
  • How to call WebApi through Webpage
  • call web api from mvc controller
  • How to declare local variable in MVc in Loop
  • How to use @Html.BegainForm
  • How to create Partial view.
  • How to call partial View in MVC
  • How to call web api post Action WebClient
  • How to call web api Put action WebClient
  • How to call web api Delete in WebClient.
  • How to delete record in web api using WebClient
  • Edit operation in mvc 4 with model pop




Demonstrating a simple application using MVC, WebApi and EntityFramework;
Web api example in mvc 5

Monday, 4 January 2016

convert hexadecimal to decimal c#

I tried to find out but did not get proper solution for convert hexadecimal to decimal c# and finally after some research i find it out. So thats why  posting that solution even it is one liner.

string hexValue = "00037FFEBCCBD966";