Skip to content

Instantly share code, notes, and snippets.

View aliraja-dev's full-sized avatar
🎯
Focusing

Ali Raja aliraja-dev

🎯
Focusing
  • Genworth Financial
  • USA
View GitHub Profile
@aliraja-dev
aliraja-dev / PrisonerProblem&LightSwitch.swift
Created September 11, 2022 22:07 — forked from possen/SwitchProblemSolution.swift
Prisoners visit a room where there is a light switch that is not connected to anything, when all the prisoners have visited the room they can confidently know that they were all in there saving them from the crocodiles.
//
// Description Switch problem in Swift solution
//
// Author: Paul Ossenbruggen
// Date: Nov 8, 2015
// Language: Swift 2.1
// See comment below for problem statement. This solves the second version where we don't know the state
// of the switch at the beginning.
//
@aliraja-dev
aliraja-dev / firebaseCRUD.ts
Created March 31, 2022 22:00 — forked from FelixEhuan/firebaseCRUD.ts
Angular Firestore boilerplate service for basic CRUD operations
import { Injectable } from '@angular/core';
import { AngularFirestoreCollection, AngularFirestoreDocument, AngularFirestore, DocumentReference, DocumentSnapshot } from '@angular/fire/firestore';
import { Productos } from '../interfaces';
@Injectable({
providedIn: 'root'
})
export class ProductosService {
/** Colecciones */
public productosCollection: AngularFirestoreCollection<any>;
/** Documentos */