This file contains hidden or 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
public class MinHeap | |
{ | |
public List<int> Heap {get; set;} | |
public int Count {get; set;} | |
public MinHeap() | |
{ | |
Heap = new(); | |
} |
This file contains hidden or 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
constructor(private afAuth: AngularFireAuth, private http: HTTP) { | |
afAuth.authState.subscribe(user => { | |
this.user = user; | |
}); | |
} | |
async signInWithGoogle(user) { | |
return await this.afAuth.auth.signInAndRetrieveDataWithCredential( | |
firebase.auth.GoogleAuthProvider.credential(user.idToken) |
This file contains hidden or 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
<?php | |
require 'fpdf/fpdf.php'; | |
$pdf = new FPDF(); | |
$pdf->AddPage(); | |
$pdf->SetFont('Arial', 'B', 13); | |
// Here's how to display the POST parameters you passed from HTML | |
$pdf->Cell(0, 0, "Form: " . $_POST['name']); |
This file contains hidden or 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
import copy | |
import numpy as np | |
import chess | |
import sys | |
from chess import svg | |
def exists(i, j): | |
# Checks if square exists within boundary |
This file contains hidden or 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
from __future__ import print_function | |
from PIL import Image | |
def encode(image, string_to_encode): | |
image_data = list(image.getdata()) | |
bin_string = "".join(["{0:08b}".format(ord(c)) for c in string_to_encode]) | |
print("Initial pixel values: ") | |
print(image_data[:25], end=" ") | |
print(",....") |
This file contains hidden or 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
print("Enter number of elements: ") | |
n = int(input()) | |
elements, binary_elements = [], [] | |
for i in range(n): | |
# Take input and store in array | |
x = int(input()) | |
elements.append(x) | |
# Convert to binary array of 8 bits |
This file contains hidden or 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
import { Component } from "@angular/core"; | |
import { NavController } from "ionic-angular"; | |
import { Subscription } from "rxjs"; | |
import { finalize } from "rxjs/operators"; | |
import { Geolocation } from "@ionic-native/geolocation"; | |
@Component({ | |
selector: "page-new-post", | |
templateUrl: "new-post.html" | |
}) |
This file contains hidden or 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
<ion-header> | |
<ion-navbar> | |
<ion-title>Create Post</ion-title> | |
</ion-navbar> | |
</ion-header> | |
<ion-content padding> |
This file contains hidden or 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
declare module '*'; |
This file contains hidden or 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
Show hidden characters
{ | |
"compilerOptions": { | |
... | |
}, | |
"files": [ | |
"types/MicrosoftMaps/CustomMapStyles.d.ts", | |
"types/MicrosoftMaps/Modules/Autosuggest.d.ts" | |
], | |
... | |
} |
NewerOlder