Skip to main content

Posts

AngularJS

What is AngularJS? AngularJS is an open source web application framework. It was originally developed in 2009 by Misko Hevery and Adam Abrons. It is now maintained by Google. Its latest version is 1.4.3. Definition of AngularJS as put by its  official documentation  is as follows − AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. Angular's data binding and dependency injection eliminate much of the code you currently have to write. And it all happens within the browser, making it an ideal partner with any server technology. Features AngularJS is a powerful JavaScript based development framework to create RICH Internet Application(RIA). AngularJS provides developers options to write client side application (using JavaScript) in a clean MVC(Model View Controller) way. Application written in AngularJS is c
Recent posts

C# - Difference between String and Stringbuilder in C#, Asp.net

String String is immutable. Immutable means once we create string object we cannot modify. Any operation like insert, replace or append happened to change string simply it will discard the old value and it will create new instance in memory to hold the new value. Example string  str =  "hi" ; // create a new string instance instead of changing the old one str +=  "test" ; str +=  "help" ; String Builder String builder is mutable it means once we create string builder object we can perform any operation like insert, replace or append without creating new instance for every time. Example StringBuilder  sb =  new   StringBuilder ( "" ); sb.Append( "hi" ); sb.Append( "test " ); string  str = sb.ToString(); Differences String It’s an immutable Performance wise string is slow  because every time it will  create new instance In string we don’t have append keyword String belongs to 

OOPs Interview Question

All the programming languages supporting Object Oriented Programming will be supporting these three main concepts: Abstraction Encapsulation Inheritance Polymorphism Abstraction Abstraction is "To represent the essential feature without representing the background details."   Abstraction lets you focus on what the object does instead of how it does it.   Abstraction provides you a generalized view of your classes or objects by providing relevant information.   Abstraction is the process of hiding the working style of an object, and showing the information of an object in an understandable manner.   Real-world Example of Abstraction Suppose you have an object Mobile Phone.   Suppose you have 3 mobile phones as in the following:    Nokia 1400 (Features: Calling, SMS) Nokia 2700 (Features: Calling, SMS, FM Radio, MP3, Camera) Black Berry (Features:Calling, SMS, FM Radio, MP3, Camera, Video Recording, Reading E-mails)   Abstract information (necessary and common inf

SQL Query :- Create Tables,Primary key,Foreign key,Merge Statment

SQL Query 1)    Using CASE Statement : - To Check the Particular column ISNULL              CASE WHEN ISNULL ([Col_Name], ' ') = ' ' THEN 'Others'                       ELSE [Col_Name] END AS [Col_Name] 2)    Convert Data format into VARCHAR and save 10/18/2012 this Format and also check if Date Column is Empty or not.                 CONVERT (VARCHAR,[Col_CreatedDt], 101) AS CreatedDt                        , CASE WHEN ISNULL ([Col_ModifiedDt], ' ') = ' ' THEN ' not available'                        ELSE CONVERT (VARCHAR, [ Col_ModifiedDt], 101) END AS ModifiedDt 3)    Casting  and Check Date Difference               CAST (Col_Name or ParameterName AS VARCHAR)               DATEDIFF(HOUR,Col_Date, GETDATE())<=24 4)    Create two table and set Primary key and Foreign Key             Create Table Exams            (                 exam_id int primary key,                 exam_name varchar(50),            );    

Check folder and Delete All Files from Existing Folder in C#

Dynamically check the Particular name Folder exist or not, it not exits create folder dynamically. if (!Directory.Exists(FolderName))         {             Directory.CreateDirectory(FolderName);         }         if (Directory.Exists(FolderName))         {             string[] filePaths = Directory.GetFiles(FolderName);             foreach (string filePath in filePaths)                 File.Delete(filePath);             //Directory.Delete(FolderName);                    }

Sorting the Data in Grid view Manually.

Session["SortTable"] = table; //From Which table  data you are going to bind in gridview  keep that table data in session. protected void gvtest_Sorting1(object sender, GridViewSortEventArgs e)     {         try         {             GridView grid = (GridView)sender;             ViewState["sortexpression"] = e.SortExpression;             if (ViewState["sortdirection"] == null)             {                 ViewState["sortdirection"] = "asc";             }             else             {                 if (ViewState["sortdirection"].ToString() == "asc")                 {                     ViewState["sortdirection"] = "desc";                 }                 else                 {                     ViewState["sortdirection"] = "asc";                 }             }             DataTable dtLive = (DataTable)Session["SortTable "];             DataView dv = dtLive.D