Posts

Showing posts from September, 2017

Get the Radio Button text in JQuery from the particular div

Image
Get the Radio Button text in JQuery from the particular div

What is the output of the following C Code?

What is the output of the following C Code? #include <stdio.h> void main() {                 int k=5;         int *p=&k;         int **m=&p;                  printf("%d%d%d\n",k,*p,**m);          } A) 5 5 5 B) 5 5 junk C) 5 junk junk D) Compile time error

Paging using LINQ Skip and Take

Paging using LINQ Skip and Take Suppose you have a data in result object IEnumerable < RTRDocumentSearchResultViewModel > result; Pass the Parameter of PageIndex and PageSize Suppose, PageIndex=1, PageSize=3   First, count the number data in result count = result.Count(); Then, after int skipCount = (model.PageIndex - 1) * model.PageSize; var resetSet = result.AsQueryable(); resetSet = skipCount == 0 ? resetSet.Take(model.PageSize) : resetSet.Skip(skipCount).Take(model.PageSize); and finally return the new resul AsEnumerable() collection resetSet.AsEnumerable();