Fish Theory

1027 2/4/2016 7:02:22 AM

Small Fish in a Big Pond, or a Big Fish in a Small Pond What kind of fish you want to be Small Fish in a Big Pond vs a Big Fish in a Small Pond? It is the questionwhich every person must have thought about it, at least once.If not then that's good. It shows you are satisfied in life –which ever pond you are in. Small Fish in a Big Pond Big Fish in a Small Pond Competition More Competition Less Competition Challenges More Challenges Less Challenges Learning More Learning Less Learning Risk More Risk, there is always risk to be eaten by big Fish (Shark) http://www.readerpublishing.com/...

Ashrama : 4 Stages of Life in Hinduism

678 12/6/2015 9:20:24 AM

Ashram system - will represents four periods/stages of human development. Brahmacharya Grihastashram Vanaprastashram Sanyasa Age in years: 0-24 24-48 48-72 72+ Life: Student Household Retired Renounced Purushartha focus: Dharma Dharma,Artha and Kama Dharma andMoksha Dharma andMoksha Represents: Brahma Vishnu Shiva Ishwara Vedas: Samhitas Brahmanas Aranyakas Sanyasa Qualities of Nature / Guna: Develop Sattva Control Rajas Control Tamas Overcome to effect of qualities Food Unlimited 32 core 16 core 8 core ...

Execute SQL Query Directly Using Entity Framework

1132 11/28/2015 7:28:26 AM

Execute SQL query from Entity Framework: //code sample int employeeID = 1000; var sqlQuery = String.Format(@"SELECT TOP 1 EmployeeName FROM Employee WHERE EmployeeID = '{0}' ", employeeID); var result = dbContext.Database.SqlQuery<string>(sqlQuery); ...

ASP.NET MVC - Difference between Html.Partial vs Html.RenderPartial

1049 11/27/2015 7:29:48 PM

Html.Partial Html.RenderPartial Razor syntax: @Html.Partial("ViewName"); @Html.RenderPartial("ViewName"); Returns: Returns MvcHtmlString Returns void Renders: Returns a html encoded string that gets constructed inline with the parent. Directly render/write on output stream. Speed: Slower than Html.RenderPartial Faster than Html.Partial ...

WCF - Contracts : Data Contracts and Message contracts

865 11/8/2015 9:14:34 PM

WCF Contract: Defines what the service does. Identifies the methods available. Its Interface between client and the server. It’s a simple interface with some attribute. Data Contracts Message Contracts Definition Data contract is a formal agreement between a service and a client that abstractly describes the data to be exchanged Message contracts describe the structure of SOAP messages sent to and from a service and enable you to inspect and control most of the details in the SOAP header and body Describes Describes type of data Describes structure of SOAP. Message Contract is an abstrac...

WCF - Endpoints

942 11/8/2015 9:44:45 AM

Relationship between Address, Contract,Binding and Behaviorsis called Endpoint. Each endpoint consists of four properties: Address, Contract, Binding and Behaviors Address (A) Defines where the service resides. Indicates where to find the endpoint. Binding (B) Defines how to communicate with the service. Specifies how a client can communicate with the endpoint. Specifies how the two parties will communicate in term of transport and encoding and protocols. Contract (C) Defines what the service does. Identifies the methods available. Its Interface between client and the server.It’s a simpl...

What is jQuery.noConflict?

1608 11/8/2015 6:51:32 AM

jQuery.noConflict is used to avoid conflictof jQuery $ function or variable name used/referred by other JavaScript libraries (e.g. Prototype, MooTools). In case of conflict we can use jQuery.noconflict(). After execution of this we can reference JQuery ($) using jQuery or own specific keyword. Example 1: Refer JQuery using jQuery jQuery.noConflict(); // Something with jQuery jQuery( "div p" ).hide(); // Something with another library's $() $( "content" ).style.display = "none"; Example 2: Refer JQuery using own keyword ($own) Var $own = jQuery.noConflict(); //...

Interface Segregation Principle - Understanding SOLID Design Principles

46 10/26/2015 3:50:49 AM

A client should never be forced to implement an interface that it doesn’t use OR clients shouldn’t be forced to depend on methods they do not use. ...

Liskov Substitution Principle - Understanding SOLID Design Principles

271 10/26/2015 3:50:40 AM

Letf(objMainClass)be a property provable about objects objMainClassof type MainClass. Thenf(objSublass)should be provable for objectsobjSublassof typeSubClasswhereSubClassis a subtype ofMainClass. ...


Open Closed Principle - Understanding SOLID Design Principles

288 10/26/2015 3:48:53 AM

Objects or entities should be open for extension, but closed for modification. ...

Single Responsibility Principle - Understanding SOLID Design Principles

353 10/26/2015 3:05:00 AM

Object or Entityshould have only one responsibility. ...

SQL Server - Delete vs Truncate

279 10/25/2015 2:59:06 AM

Delete Truncate Type DML DDL Rollback Possoble Not possible Space Reclamation Does not recover space Recover space Indexes NA Renders unusable indexes usable again Object Type Delete can be applied to tables and tables inside a cluster. Truncate applies only to tables or the entire cluster. Identity Columns NA Resets the sequence for IDENTITY column types Locking At row level At table and page level Where Clause Can use where clause Can not use in where clause Data Removal Deletes specified data if where condition exists Removes all the data Speed Slower than truncate because Faster in perform...

ASP.NET - Differences between GridView, DetailView and FormView

389 10/25/2015 1:57:18 AM

GridView DetailView FormView Display: All rows in table Show's Details of each row in separate space Appears in separate space Occues When: Grid is loaded When row is clicked Inserting new row Updading existing row Viewing single row ...

ASP.NET - Validation Groups

308 10/25/2015 1:21:08 AM

Validation groups allow you to organize validation controls on a page as a set. Each validation group can perform validation independently from other validation groups on the page. Each validation group can be attached to button for validatingall validator controls belongsto that gourp. ...

ASP.NET - Types of Validation for Server Controls

337 10/25/2015 1:09:25 AM

Type of validation Control to use Description Required entry RequiredFieldValidator Ensures that the user does not skip an entry. Comparison to a value CompareValidator Compares a user's entry against a constant value, against the value of another control (using a comparison operator such as less than, equal, or greater than), or for a specific data type Range checking RangeValidator Checks that a user's entry is between specified lower and upper boundaries Pattern matching RegularExpressionValidator Checks that the entry matches a pattern defined by a regular expression. This type of ...

Threading - Programming Concepts

671 10/24/2015 7:27:19 PM

What is Threading? Threading to perform concurrent processing so that you can do more than one operation at a time. For example, you can use threading to monitor input from the user, perform background tasks, and handle simultaneous streams of input. ...

Serialization - Programming Concepts

658 10/24/2015 7:20:21 PM

What is Serialization? Serialization is the process of converting an object into a stream of bytes in order to store the object or transmit it to memory, a database, or a file. Its main purpose is to save the state of an object in order to be able to recreate it when needed. The reverse process is called deserialization. ...

Reflection - Programming Concepts

793 10/24/2015 7:05:33 PM

What is Reflection? Reflection is used todynamically create an instance of a type, bind the type to an existing object, or get the type from an existing object and invoke its methods or access its fields and properties. ...

Programming Concepts- Interview Questions With Answers

703 10/24/2015 6:55:54 PM

Programming Concepts- Interview Questions With Answers...

OOPS - Structs vs Classes

729 8/30/2015 10:05:25 PM

Struct Class Definition: A Struct is a value type if it holds the data within its own memory allocation. A Class is reference type -contains a pointer to another memory location that holds the data. Includes: All numeric data types Boolean , Char, and Date All structures, even if their members are reference types Enumerations, since their underlying type is always SByte, Short, Integer, Long, Byte, UShort, UInteger, or ULong String All arrays, even if their elements are value types Class types, such as Form Delegates Holds Actual Data: Yes No Pointer to another memory location: No Yes Example:...

AngularJS - $scope : Adding Behavior

750 8/22/2015 3:08:04 AM

Business logic in the controller means exposing functions or reacting to events Append properties or methods to the $scope These methods need to be exposed to the view ...

AngularJS - Understanding $scope

725 8/22/2015 3:07:53 AM

Child scopes prototypically inherit JavaScript Prototypical Inheritance : If it doesn’t exist in current, it will go up the chain ( parent ). Hiding and shadowing of properties. Best practice of always have a “.” in model ...

AngularJS - Binding : double curly braces {{}} vs ng-bind directive

1703 7/19/2015 7:31:47 PM

When AngularJS is initialized,loaded with module andknows with model to use for particular scope/code block it will start replacing all binding elements (e.g. curly braces, ng-bind) ng-bind: ng-bind elements are bindated as attribute to html element. If AngularJS is not loaded thenhtml element will be displayed without value. After angularJS module is loaded correct value will displayed on html element. Double Curly Braces: Double curly brace could be loaded anywhere on html If {{SomeDataAttribute}} placeholder forvalue of html element and if angularJS is not loaded then '{{SomeDataAttribu...

AngularJS - What are Modules?

974 7/15/2015 2:20:16 AM

AngularJS module is placeholder - a collection of services, directives, controllers, filters, and configuration information. Moduld is a declarative approache for re-using componet as an when required, makes unit and End-to-End test more easy. ...

AngularJS - Hello World Application

1390 7/11/2015 10:39:28 PM

It is good start to learn a programming language with first example as Hello World. Lets take a look in AngulaJS way- . ...

AngularJS - How it works?

913 7/11/2015 10:38:18 PM

AngularJS will initialize when the DOM content is loaded. Looks for the ng-app directive – if its found, that is the root of the app Directives can be declared a variety of ways: typically with the ng- prefix (e.g. ng-controller) Load the module associated with the directive if specified When it knows with model to use for particular scope/code block it will start replacing all binding elements (e.g. curly braces, ng-bind) Uses Constructor Injection to pass dependences and decide order of initialization AnuglarJS Modularizeclient side code primarily into Model, View and Controller (MVC)....

AngularJS - What and Why?

987 6/29/2015 4:28:13 PM

What is AngularJS? AngularJS is front-end javascript framework Usedto create dynamic web pages Follows MVC pattern of development Its open source framework maintained by Google Uses declarative programming Does all sorts of client side operations like DOM manipulation, registaring callbacks, Updating UI based on data, input and filters Why we need AngularJS? AngularJS allows to doclient side code to be modularized, reusable and remove d Creating dynamic UI Decouple client side from server side Modularize application at client side Writing resuable code Manupulating DOM dynamically Do more work...

ASP.NET MVC - Show static .html files directly without controller

1861 6/20/2015 2:09:29 AM

MVC framework provide support to static files e.g. images, css, js. Its just .html files are not configured by default. In order us to include static files in application we need to tell MVC application to allow Html file. routes.IgnoreRoute("StaticHtmls/{*path}"); After you include this in Route configuration files. You should be able to access all .html files in 'StaticHtmls' folder directly. e.g. http://YourSite/StaticHtmls/YourHtmlFile.html http://YourSite/StaticHtmls/YourHtmlFile.cshtml . ...

SOA - Investigating SOAP vs REST

1107 6/2/2015 12:09:24 AM

REST SOAP Stands for: Representational State Transfer Protocol Simple Object Access Protocol What is it: RESTs sweet spot is when you are exposing a public API over the internet to handle CRUD operations on data. SOAPbrings its own protocol and focuses on exposing pieces of application logic (not data) as services. Addresses : Resource Method Transport Protocol Supported: Only supports HTTP. REST requires use of HTTP. SOAPcan be sent over almost any protocol such as HTTP, SMTP, TCP, or JMS. SOAPis Language, platform, and transport independent. Data vs Function Driven : REST is very data-driven...

SQL Server - Dynamically Convert Row Data Into Columns

884 5/21/2015 11:47:42 PM

Code Snippet: DECLARE @COLUMNHEADERS VARCHAR(MAX); SET @COLUMNHEADERS = STUFF( (SELECT DISTINCT ', [' + CAST(HIREDATE AS VARCHAR(255)) + ']' FROM EMPLOYEE FOR XML PATH(''), TYPE).VALUE('.', 'VARCHAR(MAX)') , 1, 2, ''); DECLARE @SQL NVARCHAR(MAX); SET @SQL = 'SELECT * FROM ( SELECT [DEPARTMENTID], [HIREDATE], [SORTNAME], ROW_NUMBER() OVER(ORDER BY (SELECT 1)) AS RN FROM EMPLOYEE ) T PIVOT ( MAX([SORTNAME]) FOR [HIREDATE] IN (' + @COLUMNHEADERS + ') ) P'; EXECUTE SP_EXECUTESQL @SQL; ...