Most Recent

Power BI Interview Questions with Answers

Read morecds
Sequel skills Tuesday, 4 September 2018
Difference between Direct Query and Import in Power BI

Read morecds
Sequel skills Friday, 31 August 2018
power bi qtd calculation | qtd in power bi | qtd in dax

Read morecds
Sequel skills
DAX Interview Questions and Answers

Power BI Interview Questions with Answers

Read morecds
Sequel skills
What is the difference between Append Queries and Merge Queries in Power BI

Read morecds
Sequel skills
TCS Power BI Interview Questions and Answers

Read morecds
Sequel skills
Boxing and Un-Boxing in c#?

If at all a value type is converted into reference type.we called as boxing

 value type --> reference type   //Boxing

 Example:  int x=100;

          Object obj=x;

If at all a value type which is converted into reference type the process of boxing is again converted back as value type is unboxing,but unboxing requires and explicit converstion.


  value type --> reference type -->   value type

 Example int x=100;

          Object obj=x;

         int y=convert.ToInt32(obj);       //un-boxing

 Note : A direct reference type can never be converted into value type by using explicit conversion also.
Read morecds
Sequel skills Thursday, 19 July 2018
Implicitly typed local variables in c#?

These are introduced in c# 3.0 which allows to declare a variable by using var keyword.Here the datatype of the variable is recoganaiesd depending upon the value we assign to the variable.

 Example :

          var i=100;          //i is of type int

          var f=3.14f;       // f is of type float

          var b=false;       // b is of type bool

          var s="Hello";      // s is of type string

We can declare variables by using the var keyword only with in a block of code can't be declared on the top of the class and consumed through out the class

we can't declare a variable using var keyword without initializing the variable

     Example: var y;        //invalid
Read morecds
Sequel skills
Nullable value types in c#

Nullable value types are newly added in c# 2.0 .which allows storing null values under valuetypes.because before this feature.we can never store a null value under value type.In any programinng language.They can be stored only in reference types.

To declare a variable as nullable.we need to suffix with a question mark at the time of declaration.

   Example: string str=null;          //valid

            int x=null;               //invalid

            int? x=null;              //valid.
Read morecds
Sequel skills
Data Types in C# What are the types of data types in C# ?

a) Integer data types

  c# types        IL Types                              Capacity/Size

   Byte           System.Byte                            0-255

   Short          System.Int16                          -32768-32767

   Int            System.Int32                           -2^31-2^31-1

   Long           System.Int64                           -2^63-2^63-1

   Sbyte          System.SByte                            -128-127

   Ushort         System.UInt16                            0-65535

   Uint           System.UInt32                            0-2^32-1

   ULong          System.UInt64                            0-2^64-1


b) Decimal or Float Types

   float          System.Single                            4 Bytes

   double         System.Double                            8 Bytes

   decimal        System.Decimal                           16 Bytes

c) Boolean Types

    bool          System.Boolean                          True or False

d) Character Types

    char           System.Char                                2 bytes
 
    string         System.String                             
    The size of the char data type has been increased to two bytes for providing support to unicode values i.e other language characters

Note: As we are awar that a computer standards english language character are identified in a format called Unicode.Where ASCII format consumes one byte space for string and unicode format consumes 2 bytes for space for store it


     char ch='A'  --> ASCII --> 1 byte

     char ch=''   --> Uniocde --> 2 bytes

 String is a variable length type.where the size of the string depends upon the value we assigned to the string

e) Base types

   Object            System.Object

   Object is a parent of all the datatypes above.so we can store any type of value under object type and more ever it is also a variable length type.whose size depends on the value assigned to it.

Read morecds
Sequel skills
Cannot find module 'underscore' or How to install underscore module in angular 2

First of all we need to install following commands

 > npm install -g typescript@next

then next install following commands

 > npm install --save underscore
   npm install --save @types/underscore

Read morecds
Sequel skills Wednesday, 11 July 2018
Generate or Export data to CSV with headers in Angular 2/4/5/6

First of all you need to install angular2-csv library by following below command

Run the following command in command prompt

> npm install --save angular2-csv

Create a component name it as 'pdfcomponent'

> ng g component 'csvcomponent'


In csvcomponent.component.html page add the follwoing code:

 <button (click)="download()">download/export</button>

In csvcomponent.component.ts page add the follwoing code:


import { Component, OnInit } from '@angular/core';
import { Angular2Csv } from 'angular2-csv/Angular2-csv';
import { UserService } from '../_services/index';

@Component({
selector: 'app-csv',
templateUrl: './csv.component.html',
styleUrls: ['./csv.component.css']
})
export class CsvComponent implements OnInit {

private allItems: {};
constructor(private csvService: CsvService) { }

ngOnInit() {
}

download() {
this.userService.getAll()
.subscribe(data => {
//API data
this.allItems = data.result.users;

/*var TestStaticData = [
{
first_name: "srinivas",
last_name: "arevarapu",
id: 11
},
{
first_name: "anji",
last_name: "arevarapu",
id: 12
}];
*/

var options = {
fieldSeparator: ',',
quoteStrings: '"',
decimalseparator: '.',
showLabels: true,
showTitle: true,
headers: ['First Name','Last Name','ID']
};
new Angular2Csv(this.allItems, 'TestCsv Report',options);
//new Angular2Csv(TestStaticData, 'TestCsv Report',options);
});
}

}
Read morecds
Sequel skills Tuesday, 10 July 2018