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
//Fire-and-Forget | |
BackgroundJob.Enqueue(()=>Console.WriteLine("Fire-and-Forget ")); | |
//Recurring | |
RecurringJob.AddOrUpdate(()=>Console.WriteLine("Recurring "),Cron.Daily); | |
//Delayed Jobs | |
var jobId= BackgroundJob.Schedule(()=>Console.WriteLine("10 seconds Delayed"),TimeSpan.FromSeconds(10)); | |
//Continuations |
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
GlobalConfiguration.Configuration | |
.SetDataCompatibilityLevel(CompatibilityLevel.Version_170) | |
.UseSimpleAssemblyNameTypeSerializer() | |
.UseRecommendedSerializerSettings() | |
.UseSqlServerStorage(@"Server=.\SQLEXPRESS;Database=Hangfire.Sample; Integrated Security=True;"); |
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 System; | |
using HtmlAgilityPack; | |
namespace YtuYemekhane_TelegramBot | |
{ | |
class Program | |
{ | |
const string crawlUri=@"http://www.sks.yildiz.edu.tr"; | |
static void Main(string[] args) |
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
module.exports=(arg)=>{ | |
const str= arg.toString(); | |
let newStr=""; | |
for (let index = str.length-1; index >= 0; index--) { | |
newStr += str[index]; | |
} | |
return newStr; | |
} |
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="book-form-categories" formArrayName="bookCategories" | |
*ngFor="let item of addBookForm.get('bookCategories')['controls']; let i = index;"> | |
<mat-form-field [formGroupName]="i" class="book-form-category"> | |
<mat-label>Book Category</mat-label> | |
<mat-select formControlName="bookCategory" required> | |
<mat-option *ngFor="let category of data" [value]="category.Name"> | |
{{category.Name}} | |
</mat-option> | |
</mat-select> | |
</mat-form-field> |
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, Inject } from '@angular/core'; | |
import { FormGroup, FormBuilder, FormControl, FormArray } from '@angular/forms'; | |
import { Category } from 'src/app/models/category.model'; | |
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; | |
import { BookService } from 'src/app/services/book.service'; | |
import { Book } from 'src/app/models/book.model'; | |
@Component({ | |
selector: 'app-addbook-dialog', | |
templateUrl: './addbook-dialog.component.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
<div mat-dialog-content class="book-dialog-content"> | |
<form [formGroup]="addBookForm" class="add-book-form"> | |
<mat-form-field> | |
<input formControlName="bookName" matInput placeholder="Book Name" required > | |
</mat-form-field> | |
<mat-form-field> | |
<input matInput formControlName="bookAuthor" placeholder="Book Author" required> | |
</mat-form-field> |
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="container"> | |
<div class="category-list"> | |
<mat-button-toggle-group #categoryGroup="matButtonToggleGroup"> | |
<mat-button-toggle [value]="category.Name" *ngFor="let category of categories"> | |
{{category.Name}} | |
</mat-button-toggle> | |
</mat-button-toggle-group> | |
</div> |
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, ViewChild, ElementRef } from '@angular/core'; | |
import { BookService } from './services/book.service'; | |
import { Book } from './models/book.model'; | |
import { CategoryService } from './services/category.service'; | |
import { Category } from './models/category.model'; | |
import { SwalComponent } from '@sweetalert2/ngx-sweetalert2'; | |
import { MatDialog } from '@angular/material/dialog'; | |
import { BookDialogComponent } from './components/book-dialog/book-dialog.component'; | |
import { AddbookDialogComponent } from './components/addbook-dialog/addbook-dialog.component'; | |
import { AddcategoryDialogComponent } from './components/addcategory-dialog/addcategory-dialog.component'; |
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 { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore'; | |
import { Injectable } from '@angular/core'; | |
import { Book } from "../models/book.model"; | |
import { Category } from '../models/category.model'; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class BookService { | |
NewerOlder