This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const url = "https://nvgs.com/analytics"; | |
const data = JSON.stringify({ | |
event: "checkout", | |
time: performance.now() | |
}); | |
fetch(url, { | |
method: 'POST', | |
body: data, | |
keepalive: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener('visibilitychange', function logData() { | |
if (document.visibilityState === 'hidden') { | |
navigator.sendBeacon('/log', analyticsData); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const url = "https://nvgs.com/analytics"; | |
const data = JSON.stringify({ | |
event: "checkout", | |
time: performance.now() | |
}); | |
navigator.sendBeacon(url, data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function blog(title, body) { | |
this.title = title; | |
this.body = body; | |
return "function invcation pattern"; | |
} | |
var output = blog("My New Blog", "Lorem Ipsum ... "); | |
console.log("output: ", output); // "function invcation pattern" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2021-04-30T02:29:53.607Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Highcharts CheatSheet Part 1. | |
// Create interactive charts easily for your web projects. | |
// Download: http://www.highcharts.com/download | |
// More: http://api.highcharts.com/highcharts | |
// 1. Installation. | |
// Highcharts requires two files to run, highcharts.js and either jQuery, MooTools or Prototype or the Highcharts Standalone Framework which are used for some common JavaScript tasks. | |
// <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
// <script src="https://code.highcharts.com/highcharts.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
using namespace std; | |
class A //base class | |
{ | |
public: | |
int i; | |
void data1(int j) | |
{ | |
i=j; | |
cout<<"The result is: \t"<<i<<endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <stdio.h> | |
#include <conio.h> | |
using namespace std; | |
class Main | |
{ | |
private: | |
char Name[20]; | |
int roll; | |
protected: |