Friday, December 6, 2019

Communication between 2 tabs using jQuery

//tab 1 
var ch = new BroadcastChannel('true');
    ch.postMessage(true);

    // tab 2
    //ch = new BroadcastChannel('true');
    ch.addEventListener('message', function (e) {
        console.log('Message:', e.data);
        isActive = e.data;
        //alert(e.data);
    }); 

Wednesday, November 20, 2019

Monday, November 18, 2019

Unable to load DLL 'Syncfusion.WebKitWrapper.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)



Solution:


Our WebKit HTML converter requires VC++ 2010 redistributable (MSVCP100.dll and MSVCR100.dll) for HTML to PDF conversion. If VC++ 2010 redistributable is not present in server then the converter may throw this exception. So, please make sure the VC++ redistributables are present in the server

How to configure length value in query string in ASP.Net Core?

Need to Add following lines of code in Web.config
<system.webServer>
  <security>
    <requestFiltering>
      <requestLimits maxQueryString="32768"/>
    </requestFiltering>
  </security>
</system.webServer>

Tuesday, November 5, 2019

Converting Json Object into List in C#


Json Object Structure :

var readResult = "{\"data\":[{\"id\":1,\"fullname\":\"Todd\",\"email\":\"phoenix@apiexample.com\",\"age\":19,\"address\":\"No:49,anna salai\"}]}"


Conversion logic :

JObject jObject = JObject.Parse(readResult);
JArray user = (JArray)jObject["data"];
List<user> UserObj = user.ToObject<List<user>>();

The user model contains following properties

id, fullname, email, age, address

Friday, October 18, 2019

Check the element exists inside the Array in Mongo DB

Description


The below mentioned query is used to check whether the specific element is exists in an array.


Query


db.getCollection('ProcessFlows').find({"Processes" : {$size: 1 ,$elemMatch: { "_t": {$exists: true}}}}) 

Saturday, October 12, 2019

Change author name / email of a commit


Step 1: git commit --amend --author="Author Name <email@address.com>"

Step 2: Press Escape key

Step 3: Type :x! and press Enter key

Step 4: git push origin –f (ticket number)

How to change last commit message in git lab



Step 1: git commit –amend

Step 2: Press Shift + i

Step 3: Edit your message

Step 4: Press Escape key

Step 5: Type :x! and press Enter key

Step 6: git push origin –f (ticket number)