View auth.service.ts
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
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) |
View generate_receipt.php
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
<?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']); |
View queen_hill_climbing.py
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
import copy | |
import numpy as np | |
import chess | |
import sys | |
from chess import svg | |
def exists(i, j): | |
# Checks if square exists within boundary |
View steganography.py
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
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(",....") |
View igs.py
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
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 |
View autocomplete.ts
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
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" | |
}) |
View autocomplete.html
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
<ion-header> | |
<ion-navbar> | |
<ion-title>Create Post</ion-title> | |
</ion-navbar> | |
</ion-header> | |
<ion-content padding> |
View declarations.d.ts
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
declare module '*'; |
View tsconfig.json
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
Show hidden characters
{ | |
"compilerOptions": { | |
... | |
}, | |
"files": [ | |
"types/MicrosoftMaps/CustomMapStyles.d.ts", | |
"types/MicrosoftMaps/Modules/Autosuggest.d.ts" | |
], | |
... | |
} |
View hough_transform.c
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 <stdio.h> | |
int main() | |
{ | |
int points[10][2], table[20][100]; | |
int nPoints, cal_a, cal_b, max; | |
printf("Enter number of points: "); | |
scanf("%d", &nPoints); |
NewerOlder