Skip to main content

Posts

Windows form color

Recent posts

Google Service Account -- Uploading document to Google Workspace Bucket

  1, Create an account in google 2, Open url  https://console.cloud.google.com/ From the highlighted part of the above screenshot, click and add a new project, It is the project to which we are going to create service account. 3, After project is created , we need to create the authentication type for clients to access our project Click  Create Credentials  => Choose Service Account Create Service account, Generate key json file, also set permissions. 4, Next Create bucket to dump documents

JSON Serialization & Deserialization in c#

 Serialization: Serialization is the process of converting an object into a stream of bytes to store the object or transmit it to memory, a database, or a file. JSON Serialization: JSON serialization serializes the public properties of an object into a string, byte array, or stream.  public static string SerializeObject(object obj)         {             string jsonString = null;             DataContractJsonSerializer serializer = null;             MemoryStream memorystream = null;             try             {                 serializer = new DataContractJsonSerializer(obj.GetType());                 memorystream = new MemoryStream();                 serializer.WriteObject(memorystream, obj);...

Angular 4 Interview questions

Angular 4 Interview questions experienced Angular 4 Interview questions Animations Questions: How do you define transition between two states in Angular? How do you define a wildcard state? Architecture Questions: What is a good use case for ngrx/store? Can you talk about a bug related to a race condition, how to solve it and how to test it? API Questions: What does this code do: @ HostBinding ( ' class.valid ' ) isValid ; < div * ngIf = ' someObservableData | async as data; else loading ' >{{data}}</ div > < ng-template # loading > Loading Data... </ ng-template > Why would you use renderer methods instead of using native element methods? What is the point of calling renderer.invokeElementMethod(rendererEl, methodName)? How would you control size of an element on resize of the window in a component? What would be a good use for NgZone service? How would you protect a component being activated throu...

MVC5-Call Back function Usage

MVC5-Call Back function Usage A callback function is executed once the current action is over.It works asynchronsouly function LoadDASummaryListUserFields(clFieldsFrom) {     var qs = '?clFieldsFrom=' + clFieldsFrom;     CallWebApiGetPartial('CallList', 'GetPerformaSummaryListFields', CBLoadCLDASummaryListUserUserFields, qs); } It is a sample jquery function. Here we are calling a function inside  CallWebApiGetPartial .It takes 4 parameters 1,Our Controller 2,Action 3,CallbackFunction 4,Query String Which may need to be passed function CallWebApiGetPartial(controller, action, callBack, qryString) { //alert(serviceData); //alert(controller + action);    FnShowLoader(); if ((qryString === undefined) || (qryString === null)) { qryString = ''; } $.ajax({ url: "/" + controller + "/" + action + qryString, dataType: "html", success: function (data) { FNHideLoader(); callBack(dat...

Localization in angular4 by fetching data from server using VS2017

Localization in angular4 by fetching data from server using VS2017 Localization  in angular4 by fetching data from server using VS2017 1,This is my webapi controller from where the data for localization is fetched //This is our webApi COntroller  // GET: api/local/5    [HttpGet, Route("api/local/{name}")]         public IDictionary Get(string name)         {                             Dictionary dict = new Dictionary ();                 dict.Add("user01", "Nombre");//Name                 dict.Add("user02", "Nombre del Padre");//Father Name                 dict.Add("user03", "Direccion postal");//Postal Address                 return dict.ToDictionary(p => p.Ke...

Sql Interview Questions with answers

1.Compare SQL & PL/SQL Criteria SQL PL/SQL What it is Single query or command execution Full programming language What it comprises Data source for reports, web pages Application language to build, format and display report, web pages Characteristic Declarative in nature Procedural in nature Used for Manipulating data Creating applications 2.What is BCP? When is it used? It is a tool used to duplicate enormous quantity of information from tables and views. It does not facsimile the structures same as foundation to target. BULK INSERT command helps to bring in a data folder into a record, table or view in a user-specific arrangement. 3.When is the UPDATE_STATISTICS command used? This command is used, ones the processing of large data is done. When we delete a large number of files, alteration or reproduction takes place in the tables, to be concerned of these changes we need to restructure the indexes This is done UPDATE_STATISTICS. 4.Explain the steps n...