using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Memory_understanding { class Reapting_elements { public void getfirstrepeatingelements(int[] arr) { int min = -1; int element=0; HashSet<int> set = new HashSet<int>(); for (int i = arr.Length-1; i >= 0; i--) { if(set.Contains(arr[i])) { min=i; element=arr[i]; ...
$watch keeps track of a variable and its value <div ng-controller="mycontroller"> <input ng-model="a"> <div> {{ b }}</div> </div> app.controller('mycontroller',function(){ $scope.a=1; $scope.b=2; }) whenever a databinding with the scope variable is created , a $watch will automatically be created by the angular js framework $watch -a:1 and $watch -b:2, And this will be used by the digest cycle . Since C is not used in any databinding , so $watch is not created for variable c. If the value gets changes for those variable, angular performs necessary updates to the DOM elements With the help pg $watch custom functions can be created which are called $watchListeners and this gets executed as soon a the value of the variables is changed They are mainly used for databinding and angular Js constantly uses watchers behind the scene number of watchers should be kept less the 2000 There are number of ways to get...
To develop a code for the below requirement: 1)Create a GridView to display Employee table (first_name ,Last_name, Id) 2)For each row in the grid ,place a button "Exclude"inside the grid 3)On click of the button "Exclude" put include the Emplyee name in a excluded list. 4)Write a function which can exclude and include the name of the employees from the Grid. 5)On submit button click show the number of Employess included and excluded. ASPX Code <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Employee_Example.aspx.cs" Inherits="WebApplication1.Employee_Example" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:GridView ID="employeeGrid" runat="server" CellPadding...
Comments
Post a Comment