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
namespace Grader.Service | |
{ | |
public class GradeConverter | |
{ | |
/// <summary> | |
/// 90 and above = 'A' | |
/// 80 - 90 = 'B' | |
/// 70 - 80 = 'C' | |
/// 60 - 70 = 'D' | |
/// 60 and below = 'F' |
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
using NUnit.Framework; | |
using Grader.Service; | |
namespace Tests | |
{ | |
public class Tests | |
{ | |
private GradeConverter gc = new GradeConverter(); | |
[TestCase(90)] |
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
namespace Grader.Service | |
{ | |
public class GradeConverter | |
{ | |
/// <summary> | |
/// This function will take in a positive integer representing a grade percentage | |
/// and return the letter grade corresponding to that percentage. | |
/// </summary> | |
public char GetLetterGrade(int grade) | |
{ |
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
export const Errors = [ | |
{ | |
code: 'auth/expired-action-code', | |
title: 'Your token is expired', | |
message: 'Your verification token has expired!' | |
}, | |
{ | |
code: 'auth/invalid-action-code', | |
title: 'This action code is invalid', | |
message: |
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
.auth-container { | |
flex: 1 1 100%; | |
box-sizing: border-box; | |
flex-direction: column; | |
display: flex; | |
max-width: 50%; | |
// this will catch tablets | |
@media only screen and (max-width: 960px) { | |
flex: 1 1 100%; |
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, OnInit } from '@angular/core'; | |
import { | |
FormBuilder, | |
FormControl, | |
FormGroup, | |
Validators | |
} from '@angular/forms'; | |
import { IUser } from 'firebasenoteapptypes'; | |
import { AuthService } from 'src/app/services'; |
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 * as admin from "firebase-admin"; | |
import * as functions from "firebase-functions"; | |
import { IUser } from "firebasenoteapptypes"; | |
import { checkStorageItemsAndDeleteOldFile } from "../utilities/storage"; | |
export const UserCreated = functions.firestore | |
.document("Users/{UserId}") | |
.onCreate((snapshot, context) => { | |
const user = snapshot.data() as IUser; |
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
<div class="main-container"> | |
<!-- SIDENAV CONTAINER --> | |
<mat-sidenav-container class="sidenav-container" *ngIf="user | async as User"> | |
<!-- SIDENAV --> | |
<mat-sidenav | |
#mainSidenav | |
class="sidenav-shadow" | |
[opened]="windowWidth > breakWidth" | |
[mode]="windowWidth >= breakWidth ? 'side' : 'over'" | |
position="start" |
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 * as admin from "firebase-admin"; | |
export const DeleteStorageBucketItem = function(url: string) { | |
// We want to make sure we have a proper file path, rather than a URL normalized file path | |
const filePath = url | |
.split("/o/")[1] | |
.split("?")[0] | |
.replace(/%2F/g, "/"); | |
// Make sure that we delete the file |
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
<mat-card class="md-margin"> | |
<mat-toolbar [style.background]="'none'" *ngIf="note !== undefined"> | |
<span flex>{{ note.Title }}</span> | |
<button mat-icon-button color="warn" (click)="deleteNote()"> | |
<mat-icon>delete</mat-icon> | |
</button> | |
</mat-toolbar> | |
<div layout="column" *ngIf="noteForm.disabled" class="md-padding"> | |
<p>{{ note.Note }}</p> |
OlderNewer