Skip to content

Instantly share code, notes, and snippets.

View NeelBhatt's full-sized avatar
👨‍💻

NeelBhatt

👨‍💻
View GitHub Profile
@NeelBhatt
NeelBhatt / background.js
Created April 19, 2019 10:53
background.js
// The following sample code uses modern ECMAScript 6 features
// that aren't supported in Internet Explorer 11.
// To convert the sample for environments that do not support ECMAScript 6,
// such as Internet Explorer 11, use a transpiler such as
// Babel at http://babeljs.io/.
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
@NeelBhatt
NeelBhatt / popup.html
Created April 19, 2019 10:55
popup.html
<!doctype html>
<html>
<head>
<title>Pi MonitR Dashboard</title>
<script src="popup.js" type="text/javascript"></script>
</head>
<body>
<h1>Pi MonitR - Stream Dashboard</h1>
@NeelBhatt
NeelBhatt / popup.js
Created April 19, 2019 10:56
popup.js
var __awaiter = chrome.extension.getBackgroundPage().__awaiter;
var connection = chrome.extension.getBackgroundPage().connection;
document.addEventListener('DOMContentLoaded', function () {
const streamStartButton = document.getElementById('streamStartButton');
const streamStopButton = document.getElementById('streamStopButton');
const streamContent = document.getElementById('streamContent');
const logContent = document.getElementById('logContent');
streamStartButton.addEventListener("click", (event) => __awaiter(this, void 0, void 0, function* () {
using System;
public interface ILogger
{
void Log(string Info);
}
public interface ILogger
{
void Log(string info);
void Log(string type of information,string info)
}
using System;
public interface ILogger
{
void Log(string info);
//Default implementation
class Program
{
static void Main(string[] args)
{
ILogger _logger = new TextLogger();
Interface First
{
void WritetoConsole() => Console.Write("In First");
}
interface Second:First{
using System;
interface First
{
void WritetoConsole() => Console.Write("In First");
}
using System;
interface IInterfaceModifiers
{
//By Default default method is private
virtual void DefaultMethod()=>Console.WriteLine("Default method");