Skip to content

Instantly share code, notes, and snippets.

View niemet0502's full-sized avatar
🔺
The Nothing

Marius Vincent NIEMET niemet0502

🔺
The Nothing
View GitHub Profile
class Graph {
numberNodes;
adjacencyMatrix;
constructor(numberNodes){
this.numberNodes = numberNodes;
this.adjacencyMatrix = [];
for(let i = 0; i < this.numberNodes; i++){
class Graph {
numberNodes;
adjacencyMatrix;
constructor(numberNodes){
this.numberNodes = numberNodes;
this.adjacencyMatrix = [];
for(let i = 0; i < this.numberNodes; i++){
class Graph {
numberNodes;
adjacencyMatrix;
constructor(numberNodes){
this.numberNodes = numberNodes;
this.adjacencyMatrix = [];
for(let i = 0; i < this.numberNodes; i++){
class Graph {
adjacencyList;
constructor(){
this.adjacencyList = new Map();
}
addNode(node){
this.adjacencyList.set(node, new Map());
}
addEdge(node1, node2){
this.adjacencyList.get(node1).add(node2);
}
class Graph {
adjacencyList;
constructor(){
this.adjacencyList = new Map();
}
addNode(node){
this.adjacencyList.set(node, new Set());
}
class Graph {
adjacencyList;
constructor(){
this.adjacencyList = new Map();
}
}
import { Body, Controller, Post } from '@nestjs/common';
import { AppService } from './app.service';
import { Mail } from './dto/mail.interface';
@Controller()
export class AppController {
constructor(private readonly appService: AppService) {}
@Post()
async sendEmail(@Body() data: Mail) {
export interface Mail {
from: string;
to: string;
subject: string;
text: string;
[key: string]: any;
}
import { MailerService } from '@nestjs-modules/mailer';
import { Process, Processor } from '@nestjs/bull';
import { Job } from 'bull';
import { Mail } from './mail.interface';
@Processor('emailSending')
export class EmailProcessor {
constructor(private readonly mailService: MailerService) {}
@Process('welcome')