Snippets Collections
docker run --rm \
    -v $PWD:/local openapitools/openapi-generator-cli generate \
    -i /local/petstore.yaml \
    -g go \
    -o /local/out/go
                
# install the latest version of "openapi-generator-cli"
npm install @openapitools/openapi-generator-cli -g

# use a specific version of "openapi-generator-cli"
openapi-generator-cli version-manager set 6.2.0

# Or install it as dev-dependency in your node.js projects
npm install @openapitools/openapi-generator-cli -D
                
print("She said: \"Hello\" and then left.")
import gzip
content = b"Lots of content here"
with gzip.open('/home/joe/file.txt.gz', 'wb') as f:
    f.write(content)
import gzip
with gzip.open('/home/joe/file.txt.gz', 'rb') as f:
    file_content = f.read()
import gzip
s_in = b"Lots of content here"
s_out = gzip.compress(s_in)
Update sr.ht build manifest for mirroring to Github
# install the latest version of "openapi-generator-cli"
npm install @openapitools/openapi-generator-cli -g

# use a specific version of "openapi-generator-cli"
openapi-generator-cli version-manager set 6.2.0

# Or install it as dev-dependency in your node.js projects
npm install @openapitools/openapi-generator-cli -D
                
/* Center Form - Start */

.center-form .gform_footer input[type=submit] {
    width: 220px !important;
    max-width: 100% !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    font-size: 18px;
    padding: 5px 10px !important;
}

.center-form  {
    width: 900px !important;
    max-width: 100% !important;
    margin-inline: auto;
}

.center-form {
    border: 1px solid #e1e1e1;
    padding: 25px 25px 10px;
    border-radius: 10px;
    box-shadow: 0 0 6px 2px #efefef;
}

@media (min-width: 768px) {
    .center-form {
        padding: 40px 40px 20px;
    }
}

@media (min-width: 641px) {
    .center-form .gform_footer input[type=submit]  {
        padding:15px !important
    }
}

/* Center Form - Ends */
//html
<div class="register-wrapper d-flex justify-content-center align-items-center">
    <div class="card box">
      <div class="card-header text-center">
        <h4 class="card-title">Sign-up</h4>
      </div>
      <form class="form" [formGroup]="registerForm" (ngSubmit)="RegisterEmployee()">
        <div class="card-body">
          <div class="row">
            <div class="col-md-6">
              <div class="form-group">
                <label for="Name" class="form-label">Name</label>
                <input type="text" class="form-control" id="Name" placeholder="Enter your Name" formControlName="Name">
                <div *ngIf="registerForm.controls['Name'].invalid && (registerForm.controls['Name'].dirty || registerForm.controls['Name'].touched)" class="text-danger">
                  <div *ngIf="registerForm.controls['Name'].errors?.['required']">Name is required.</div>
                  <div *ngIf="registerForm.controls['Name'].errors?.['minlength']">Name must be at least 2 characters long.</div>
                  <div *ngIf="registerForm.controls['Name'].errors?.['maxlength']">Name must be at most 20 characters long.</div>
                </div>
              </div>
              <div class="form-group">
                <label for="Surname" class="form-label">Surname</label>
                <input type="text" class="form-control" id="Surname" placeholder="Enter your Surname" formControlName="Surname">
                <div *ngIf="registerForm.controls['Surname'].invalid && (registerForm.controls['Surname'].dirty || registerForm.controls['Surname'].touched)" class="text-danger">
                  <div *ngIf="registerForm.controls['Surname'].errors?.['required']">Surname is required.</div>
                  <div *ngIf="registerForm.controls['Surname'].errors?.['minlength']">Surname must be at least 2 characters long.</div>
                  <div *ngIf="registerForm.controls['Surname'].errors?.['maxlength']">Surname must be at most 20 characters long.</div>
                </div>
              </div>
              <div class="form-group">
                <label for="Email" class="form-label">Email Address</label>
                <input type="Email" class="form-control" id="Email" placeholder="Enter a valid Email address" formControlName="Email">
                <div *ngIf="registerForm.controls['Email'].invalid && (registerForm.controls['Email'].dirty || registerForm.controls['Email'].touched)" class="text-danger">
                  <div *ngIf="registerForm.controls['Email'].errors?.['required']">Email is required.</div>
                  <div *ngIf="registerForm.controls['Email'].errors?.['email']">Email is invalid.</div>
                </div>
              </div>
              <div class="form-group">
                <label for="Password" class="form-label">Password</label>
                <input type="Password" class="form-control" id="password" placeholder="Enter between 8 to 15 characters" formControlName="Password">
                <div *ngIf="registerForm.controls['Password'].invalid && (registerForm.controls['Password'].dirty || registerForm.controls['Password'].touched)" class="text-danger">
                  <div *ngIf="registerForm.controls['Password'].errors?.['required']">Password is required.</div>
                  <div *ngIf="registerForm.controls['Password'].errors?.['minlength']">Password must be at least 8 characters.</div>
                  <div *ngIf="registerForm.controls['Password'].errors?.['maxlength']">Password cannot be more than 15 characters.</div>
                </div>
              </div>
              <div class="form-group">
                <label for="PhoneNumber" class="form-label">Phone Number</label>
                <input type="text" class="form-control" id="PhoneNumber" placeholder="Enter your Phone Number" formControlName="PhoneNumber">
                <div *ngIf="registerForm.controls['PhoneNumber'].invalid && (registerForm.controls['PhoneNumber'].dirty || registerForm.controls['PhoneNumber'].touched)" class="text-danger">
                  <div *ngIf="registerForm.controls['PhoneNumber'].errors?.['required']">Phone Number is required.</div>
                  <div *ngIf="registerForm.controls['PhoneNumber'].errors?.['pattern']">Phone Number format invalid.</div>
                </div>
              </div>
            </div>
  
            <div class="col-md-6">
              <div class="form-group">
                <label for="Date_of_Birth" class="form-label">Date of Birth</label>
                <input type="date" class="form-control" id="Date_of_Birth" placeholder="Enter your Date of Birth" formControlName="Date_of_Birth">
                <div *ngIf="registerForm.controls['Date_of_Birth'].invalid && (registerForm.controls['Date_of_Birth'].dirty || registerForm.controls['Date_of_Birth'].touched)" class="text-danger">
                  <div *ngIf="registerForm.controls['Date_of_Birth'].errors?.['required']">Date of Birth is required.</div>
                  <div *ngIf="registerForm.controls['Date_of_Birth'].errors?.['futureDate']">Date of birth cannot be a future date.</div>
                  <div *ngIf="registerForm.controls['Date_of_Birth'].errors?.['olderThan100']">Date of birth cannot be more than 100 years ago.</div>
                  <div *ngIf="registerForm.controls['Date_of_Birth'].errors?.['futureYear']">User cannot be younger than 16.</div>
                </div>
              </div>
              <div class="form-group">
                <label for="Id_Number" class="form-label">ID Number</label>
                <input type="text" class="form-control" id="Id_Number" placeholder="Enter your ID Number" formControlName="Id_Number">
                <div *ngIf="registerForm.controls['Id_Number'].invalid && (registerForm.controls['Id_Number'].dirty || registerForm.controls['Id_Number'].touched)" class="text-danger">
                  <div *ngIf="registerForm.controls['Id_Number'].errors?.['required']">ID Number is required.</div>
                  <div *ngIf="registerForm.controls['Id_Number'].errors?.['pattern']">ID Number must be 13 digits.</div>
                </div>
              </div>
              <div class="form-group">
                <label for="Physical_Address" class="form-label">Physical Address</label>
                <input type="text" class="form-control" id="Physical_Address" placeholder="Enter your Physical Address" formControlName="Physical_Address">
                <div *ngIf="registerForm.controls['Physical_Address'].invalid && (registerForm.controls['Physical_Address'].dirty || registerForm.controls['Physical_Address'].touched)" class="text-danger">
                  <div *ngIf="registerForm.controls['Physical_Address'].errors?.['required']">Physical Address is required.</div>
                  <div *ngIf="registerForm.controls['Physical_Address'].errors?.['minlength']">Physical Address must be at least 7 characters long.</div>
                  <div *ngIf="registerForm.controls['Physical_Address'].errors?.['maxlength']">Physical Address must be at most 100 characters long.</div>
                </div>
              </div>
              <div class="form-group">
                <label for="Photo" class="form-label">Photo</label>
                <input type="file" class="form-control" id="Photo" (change)="onFileChange($event)">
              </div>
            </div>
          </div>
        </div>
        <div class="card-footer d-flex justify-content-between">
          <button type="submit" class="btn btn-primary">Sign-up</button>
          <button type="button" class="btn btn-secondary">Cancel</button>
        </div>
      </form>
    </div>
  </div>
//ts
import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
import { Router } from '@angular/router';
import { UserService } from '../Services/userprofile.service';

@Component({
  selector: 'app-register-employee',
  standalone: true,
  imports: [ReactiveFormsModule, CommonModule, FlexLayoutModule],
  templateUrl: './register-employee.component.html',
  styleUrl: './register-employee.component.css'
})
export class RegisterEmployeeComponent {
  registerForm: FormGroup;
  selectedFile: File | null = null;

  constructor(
    private router: Router,
    private userService: UserService,
    private fb: FormBuilder,
    private snackBar: MatSnackBar
  ) {
    this.registerForm = this.fb.group({
      Name: ['', [Validators.required, Validators.minLength(2), Validators.maxLength(20)]],
      Surname: ['', [Validators.required, Validators.minLength(2), Validators.maxLength(20)]],
      Email: ['', [Validators.required, Validators.email]],
      Physical_Address: ['', [Validators.required, Validators.minLength(7), Validators.maxLength(100)]],
      PhoneNumber: ['', [Validators.required, Validators.pattern('^\\d{10}$')]],
      Password: ['', [Validators.required, Validators.minLength(8), Validators.maxLength(15)]],
      Id_Number: ['', [Validators.required, Validators.pattern('^\\d{13}$')]],
      Date_of_Birth: ['', [Validators.required, this.validateDateOfBirth]],
      User_Status_ID: [1, Validators.required],
      User_Type_ID: [2, Validators.required],
      Employment_Date: [new Date(), Validators.required],
      Hours_Worked: [0, Validators.required],
      Employee_Type_ID: [1, Validators.required],
      Shift_ID: [null]
    });    
  }

  validateDateOfBirth(control: any): { [key: string]: any } | null {
    const selectedDate = new Date(control.value);
    const currentDate = new Date();
    const minDate = new Date(currentDate.getFullYear() - 100, currentDate.getMonth(), currentDate.getDate());
    const maxDate = new Date(currentDate.getFullYear() - 16, currentDate.getMonth(), currentDate.getDate());
  
    if (selectedDate > currentDate) {
      return { 'futureDate': true };
    }
  
    if (selectedDate < minDate) {
      return { 'olderThan100': true };
    }
  
    if (selectedDate > maxDate) {
      return { 'futureYear': true };
    }
  
    return null;
  }
  

  onFileChange(event: any) {
    this.selectedFile = event.target.files[0];
  }

  RegisterEmployee() {
    if (this.registerForm.invalid) {
      return;
    }

    if (!this.selectedFile) {
      this.snackBar.open('Photo is required', 'Close', { duration: 3000 });
      return;
    }

    const formValues = this.registerForm.value;
    formValues.Date_of_Birth = new Date(formValues.Date_of_Birth).toISOString();

    this.userService.registerEmployee(this.registerForm.value, this.selectedFile).subscribe({
      next: (response) => {
        console.log('Registration Success:', response);
        this.snackBar.open('Employee registered successfully', 'Close', { duration: 3000 });
        this.registerForm.reset();
        this.selectedFile = null;
        this.router.navigate(['/login']);
      },
      error: (error) => {
        console.log('Registration Error:', error);
        this.snackBar.open('Failed to register employee', 'Close', { duration: 3000 });
      }
    });
  }
}

//css
.register-wrapper {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f0f4f7; /* Light blue background */
  }
  
  .box {
    padding: 60px 50px 40px;
    width: 100%;
    max-width: 800px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  .card-header {
    text-align: center;
    font-weight: 700;
    color: #000; /* Blue color for header text */
  }
  
  .card-title {
    font-size: 30px;
    margin: 0;
  }
  
  .form-group label {
    color: #000; /* Blue color for form labels */
  }
  
  .form-control {
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    transition: border-color 0.3s ease-in-out;
  }
  
  .form-control:focus {
    border-color: #000; /* Blue border on focus */
    box-shadow: 0 0 5px rgba(63, 81, 181, 0.2); /* Light blue shadow on focus */
  }
  
  .text-danger {
    color: #f44336; /* Red color for error messages */
  }
  
  .btn-primary {
    background-color: #4caf50; /* Green background for primary button */
    border-color: #4caf50; /* Green border for primary button */
    color: #fff; /* White text for primary button */
  }
  
  .btn-secondary {
    background-color: #f44336; /* Red background for secondary button */
    border-color: #f44336; /* Red border for secondary button */
    color: #fff; /* White text for secondary button */
  }
  
  .card-footer {
    display: flex;
    justify-content: space-between;
    padding: 20px;
  }
  
  .card-footer .btn {
    width: 48%;
  }
  
  /* Snackbar Styles */
  .snackbar {
    visibility: visible;
    min-width: 250px;
    margin-left: -125px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 2px;
    padding: 16px;
    position: fixed;
    z-index: 1;
    left: 50%;
    bottom: 30px;
    font-size: 17px;
  }
  
  .snackbar-success {
    background-color: #4caf50; /* Green for success */
  }
  
  .snackbar-danger {
    background-color: #f44336; /* Red for error */
  }
  
  .close-snackbar {
    color: white;
    font-weight: bold;
    float: right;
    font-size: 22px;
    line-height: 20px;
    cursor: pointer;
    background: none;
    border: none;
  }
  
//html
<div class="register-wrapper d-flex justify-content-center align-items-center">
  <div class="card box">
    <div class="card-header text-center">
      <h4 class="card-title">Sign-up</h4>
    </div>
    <form class="form" [formGroup]="registerFormGroup" (ngSubmit)="RegisterUser()">
      <div class="card-body">
        <div class="row">
          <div class="col-md-6">
            <div class="form-group">
              <label for="name" class="form-label">Name</label>
              <input type="text" class="form-control" id="name" placeholder="Enter your Name" formControlName="name">
              <div *ngIf="registerFormGroup.controls['name'].invalid && (registerFormGroup.controls['name'].dirty || registerFormGroup.controls['name'].touched)" class="text-danger">
                <div *ngIf="registerFormGroup.controls['name'].errors?.['required']">Name is required.</div>
                <div *ngIf="registerFormGroup.controls['name'].errors?.['minlength']">Name must be at least 2 characters long.</div>
                <div *ngIf="registerFormGroup.controls['name'].errors?.['maxlength']">Name must be at most 20 characters long.</div>
              </div>
            </div>
            <div class="form-group">
              <label for="surname" class="form-label">Surname</label>
              <input type="text" class="form-control" id="surname" placeholder="Enter your Surname" formControlName="surname">
              <div *ngIf="registerFormGroup.controls['surname'].invalid && (registerFormGroup.controls['surname'].dirty || registerFormGroup.controls['surname'].touched)" class="text-danger">
                <div *ngIf="registerFormGroup.controls['surname'].errors?.['required']">Surname is required.</div>
                <div *ngIf="registerFormGroup.controls['surname'].errors?.['minlength']">Surname must be at least 2 characters long.</div>
                <div *ngIf="registerFormGroup.controls['surname'].errors?.['maxlength']">Surname must be at most 20 characters long.</div>
              </div>
            </div>
            <div class="form-group">
              <label for="email" class="form-label">Email Address</label>
              <input type="email" class="form-control" id="email" placeholder="Enter a valid Email address" formControlName="email">
              <div *ngIf="registerFormGroup.controls['email'].invalid && (registerFormGroup.controls['email'].dirty || registerFormGroup.controls['email'].touched)" class="text-danger">
                <div *ngIf="registerFormGroup.controls['email'].errors?.['required']">Email is required.</div>
                <div *ngIf="registerFormGroup.controls['email'].errors?.['email']">Email is invalid.</div>
              </div>
            </div>
            <div class="form-group">
              <label for="password" class="form-label">Password</label>
              <input type="password" class="form-control" id="password" placeholder="Enter between 8 to 15 characters" formControlName="password">
              <div *ngIf="registerFormGroup.controls['password'].invalid && (registerFormGroup.controls['password'].dirty || registerFormGroup.controls['password'].touched)" class="text-danger">
                <div *ngIf="registerFormGroup.controls['password'].errors?.['required']">Password is required.</div>
                <div *ngIf="registerFormGroup.controls['password'].errors?.['minlength']">Password must be at least 8 characters.</div>
                <div *ngIf="registerFormGroup.controls['password'].errors?.['maxlength']">Password cannot be more than 15 characters.</div>
              </div>
            </div>
            <div class="form-group">
              <label for="PhoneNumber" class="form-label">Phone Number</label>
              <input type="text" class="form-control" id="PhoneNumber" placeholder="Enter your Phone Number" formControlName="PhoneNumber">
              <div *ngIf="registerFormGroup.controls['PhoneNumber'].invalid && (registerFormGroup.controls['PhoneNumber'].dirty || registerFormGroup.controls['PhoneNumber'].touched)" class="text-danger">
                <div *ngIf="registerFormGroup.controls['PhoneNumber'].errors?.['required']">Phone Number is required.</div>
                <div *ngIf="registerFormGroup.controls['PhoneNumber'].errors?.['minlength']">Phone Number must be 10 digits.</div>
                <div *ngIf="registerFormGroup.controls['PhoneNumber'].errors?.['maxlength']">Phone Number must be 10 digits.</div>
              </div>
            </div>
          </div>

          <div class="col-md-6">
            <div class="form-group">
              <label for="Date_of_Birth" class="form-label">Date of Birth</label>
              <input type="date" class="form-control" id="Date_of_Birth" placeholder="Enter your Date of Birth" formControlName="Date_of_Birth">
              <div *ngIf="registerFormGroup.controls['Date_of_Birth'].invalid && (registerFormGroup.controls['Date_of_Birth'].dirty || registerFormGroup.controls['Date_of_Birth'].touched)" class="text-danger">
                <div *ngIf="registerFormGroup.controls['Date_of_Birth'].errors?.['required']">Date of Birth is required.</div>
                <div *ngIf="registerFormGroup.controls['Date_of_Birth'].errors?.['futureDate']">Date of birth cannot be a future date.</div>
                <div *ngIf="registerFormGroup.controls['Date_of_Birth'].errors?.['olderThan100']">Date of birth cannot be more than 100 years ago.</div>
                <div *ngIf="registerFormGroup.controls['Date_of_Birth'].errors?.['futureYear']">User cannot be younger than 16.</div>
              </div>
            </div>
            <div class="form-group">
              <label for="Id_Number" class="form-label">ID Number</label>
              <input type="text" class="form-control" id="Id_Number" placeholder="Enter your ID Number" formControlName="Id_Number">
              <div *ngIf="registerFormGroup.controls['Id_Number'].invalid && (registerFormGroup.controls['Id_Number'].dirty || registerFormGroup.controls['Id_Number'].touched)" class="text-danger">
                <div *ngIf="registerFormGroup.controls['Id_Number'].errors?.['required']">ID Number is required.</div>
                <div *ngIf="registerFormGroup.controls['Id_Number'].errors?.['minlength']">ID Number must be 13 digits.</div>
                <div *ngIf="registerFormGroup.controls['Id_Number'].errors?.['maxlength']">ID Number must be 13 digits.</div>
              </div>
            </div>
            <div class="form-group">
              <label for="Physical_Address" class="form-label">Physical Address</label>
              <input type="text" class="form-control" id="Physical_Address" placeholder="Enter your Physical Address" formControlName="Physical_Address">
              <div *ngIf="registerFormGroup.controls['Physical_Address'].invalid && (registerFormGroup.controls['Physical_Address'].dirty || registerFormGroup.controls['Physical_Address'].touched)" class="text-danger">
                <div *ngIf="registerFormGroup.controls['Physical_Address'].errors?.['required']">Physical Address is required.</div>
                <div *ngIf="registerFormGroup.controls['Physical_Address'].errors?.['minlength']">Physical Address must be at least 7 characters long.</div>
                <div *ngIf="registerFormGroup.controls['Physical_Address'].errors?.['maxlength']">Physical Address must be at most 100 characters long.</div>
              </div>
            </div>
            <div class="form-group">
              <label for="Photo" class="form-label">Photo</label>
              <input type="file" class="form-control" id="Photo" (change)="onFileSelected($event)">
              <div *ngIf="registerFormGroup.controls['Photo'].invalid && (registerFormGroup.controls['Photo'].dirty || registerFormGroup.controls['Photo'].touched)" class="text-danger">
                <div *ngIf="registerFormGroup.controls['Photo'].errors?.['required']">Photo is required.</div>
              </div>
            </div>
            <div class="form-group">
              <label for="User_Type_ID" class="form-label">User Type</label>
              <select class="form-control" id="User_Type_ID" formControlName="User_Type_ID">
                <option value="1">Owner</option>
                <option value="2">Employee</option>
                <option value="3">Member</option>
              </select>
              <div *ngIf="registerFormGroup.controls['User_Type_ID'].invalid && (registerFormGroup.controls['User_Type_ID'].dirty || registerFormGroup.controls['User_Type_ID'].touched)" class="text-danger">
                <div *ngIf="registerFormGroup.controls['User_Type_ID'].errors?.['required']">User Type is required.</div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="card-footer d-flex justify-content-between">
        <button type="submit" class="btn btn-primary">Sign-up</button>
        <button type="button" class="btn btn-secondary" (click)="resetForm()">Cancel</button>
      </div>
    </form>
  </div>
</div>

//ts
import { Component } from '@angular/core';
import { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { MatSnackBar } from '@angular/material/snack-bar';
import { UserService } from '../../Services/userprofile.service';
import { FlexLayoutModule } from '@angular/flex-layout';
import { CommonModule } from '@angular/common';

@Component({
  selector: 'app-register',
  standalone: true,
  imports: [ReactiveFormsModule, CommonModule, FlexLayoutModule],
  templateUrl: './register.component.html',
  styleUrls: ['./register.component.css']
})
export class RegisterComponent {
  submitted = false;
  registerFormGroup: FormGroup;
  selectedFile: File | null = null;

  constructor(
    private router: Router,
    private userService: UserService,
    private fb: FormBuilder,
    private snackBar: MatSnackBar
  ) {
    this.registerFormGroup = this.fb.group({
      // email: ['', [Validators.required, Validators.email, Validators.pattern(/^[a-z0-9._%+-]+@gmail\.com$/), Validators.minLength(3), Validators.maxLength(50)]],
      email: ['', [Validators.required, Validators.email]],
      password: ['', [Validators.required, Validators.minLength(8), Validators.maxLength(15)]],
      name: ['', [Validators.required, Validators.minLength(2), Validators.maxLength(20)]],
      surname: ['', [Validators.required, Validators.minLength(2), Validators.maxLength(20)]],
      // PhoneNumber: ['', [Validators.required, Validators.pattern(/^0\d{9}$/)]],
      PhoneNumber: ['', [Validators.required, Validators.minLength(10), Validators.maxLength(10)]],
      Date_of_Birth: ['', [Validators.required, this.validateDateOfBirth]],
      // Id_Number: ['', [Validators.required, Validators.pattern(/^\d{2}(0[1-9]|1[0-2])(0[1-9]|[12][0-9]|3[01])\d{7}$/)]],
      Id_Number: ['', [Validators.required, Validators.minLength(13), Validators.maxLength(13)]],
      Physical_Address: ['', [Validators.required, Validators.minLength(7), Validators.maxLength(100)]],
      Photo: ['', Validators.required],
      // User_Status_ID: [1, [Validators.required, Validators.min(1), Validators.max(2)]],
      // User_Type_ID: ['', [Validators.required, Validators.min(1), Validators.max(3)]]
      User_Status_ID: [1, Validators.required],
      User_Type_ID: ['', Validators.required]
    });
  }

  ngOnInit() { }

  validateDateOfBirth(control: any): { [key: string]: any } | null {
    const selectedDate = new Date(control.value);
    const currentDate = new Date();
    const minDate = new Date(currentDate.getFullYear() - 100, currentDate.getMonth(), currentDate.getDate());
    const maxDate = new Date(currentDate.getFullYear() - 16, currentDate.getMonth(), currentDate.getDate());

    if (selectedDate > currentDate) {
      return { 'futureDate': true };
    }

    if (selectedDate < minDate) {
      return { 'olderThan100': true };
    }

    if (selectedDate > maxDate) {
      return { 'futureYear': true };
    }

    return null;
  }

  onFileSelected(event: any) {
    const file = event.target.files[0];
    if (file) {
      this.selectedFile = file;
      this.registerFormGroup.patchValue({ Photo: file });
    } else {
      this.selectedFile = null;
    }
  }

  RegisterUser() {
    this.submitted = true;
  
    if (this.registerFormGroup.valid && this.selectedFile) {
      console.log('Form is valid');
      console.log('Selected file:', this.selectedFile);

      const emailLowerCase = this.registerFormGroup.value.email.toLowerCase();
      this.registerFormGroup.patchValue({ email: emailLowerCase });
  
      const formData: FormData = new FormData();
      formData.append('name', this.registerFormGroup.value.name);
      formData.append('surname', this.registerFormGroup.value.surname);
      formData.append('email', this.registerFormGroup.value.email);
      formData.append('password', this.registerFormGroup.value.password);
      formData.append('PhoneNumber', this.registerFormGroup.value.PhoneNumber);
      formData.append('Date_of_Birth', this.registerFormGroup.value.Date_of_Birth);
      formData.append('Id_Number', this.registerFormGroup.value.Id_Number);
      formData.append('Physical_Address', this.registerFormGroup.value.Physical_Address);
      formData.append('Photo', this.selectedFile, this.selectedFile.name);
      formData.append('User_Status_ID', this.registerFormGroup.value.User_Status_ID);
      formData.append('User_Type_ID', this.registerFormGroup.value.User_Type_ID);
  
      this.userService.RegisterUser(formData).subscribe({
        next: (response) => {
          console.log('Registration Success:', response);
          this.registerFormGroup.reset();
          this.openSnackbar('Your user profile has been created', 'success');
          this.router.navigate(['/login']);
        },
        error: (error) => {
          console.log('Registration Error:', error);
          let errorMessage = 'Registration failed: ';
  
          if (error.error === 'DuplicateEmail') {
            errorMessage += 'This email address is already registered.';
          } else if (error.error === 'DuplicatePhoneNumber') {
            errorMessage += 'This phone number is already registered.';
          } else if (error.error === 'DuplicateDateOfBirth') {
            errorMessage += 'This date of birth is already registered.';
          } else if (error.error === 'DuplicateIdNumber') {
            errorMessage += 'This ID number is already registered.';
          } else if (error.error === 'DuplicatePhoto') {
            errorMessage += 'This photo is already associated with another user.';
          } else {
            errorMessage += 'Unknown error. Please try again later.';
          }
  
          this.openSnackbar(errorMessage, 'danger');
        }
      });
    } else {
      console.log('Form is not valid or file is not selected');
      console.log(this.registerFormGroup.errors);
      console.log(this.registerFormGroup.controls);

      this.openSnackbar('Form is not filled in correctly', 'danger');
    }
  }
  

  openSnackbar(message: string, type: 'success' | 'danger') {
    this.snackBar.open(message, 'Close', {
      duration: 5000,
      panelClass: type === 'success' ? 'snackbar-success' : 'snackbar-danger'
    });
  }

  get f() {
    return this.registerFormGroup.controls;
  }

  resetForm() {
    this.registerFormGroup.reset({
      user_status_id: 1  // Reset user_status_id to default value of 1 (Active)
    });
    this.router.navigate(['/login']);
  }
}

//css
.register-wrapper {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f0f4f7; /* Light blue background */
}

.box {
  padding: 60px 50px 40px;
  width: 100%;
  max-width: 800px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-header {
  text-align: center;
  font-weight: 700;
  color: #000; /* Blue color for header text */
}

.card-title {
  font-size: 30px;
  margin: 0;
}

.form-group label {
  color: #000; /* Blue color for form labels */
}

.form-control {
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 5px;
  transition: border-color 0.3s ease-in-out;
}

.form-control:focus {
  border-color: #000; /* Blue border on focus */
  box-shadow: 0 0 5px rgba(63, 81, 181, 0.2); /* Light blue shadow on focus */
}

.text-danger {
  color: #f44336; /* Red color for error messages */
}

.btn-primary {
  background-color: #4caf50; /* Green background for primary button */
  border-color: #4caf50; /* Green border for primary button */
  color: #fff; /* White text for primary button */
}

.btn-secondary {
  background-color: #f44336; /* Red background for secondary button */
  border-color: #f44336; /* Red border for secondary button */
  color: #fff; /* White text for secondary button */
}

.card-footer {
  display: flex;
  justify-content: space-between;
  padding: 20px;
}

.card-footer .btn {
  width: 48%;
}

/* Snackbar Styles */
.snackbar {
  visibility: visible;
  min-width: 250px;
  margin-left: -125px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 2px;
  padding: 16px;
  position: fixed;
  z-index: 1;
  left: 50%;
  bottom: 30px;
  font-size: 17px;
}

.snackbar-success {
  background-color: #4caf50; /* Green for success */
}

.snackbar-danger {
  background-color: #f44336; /* Red for error */
}

.close-snackbar {
  color: white;
  font-weight: bold;
  float: right;
  font-size: 22px;
  line-height: 20px;
  cursor: pointer;
  background: none;
  border: none;
}
The for...of loop
The basic tool for looping through a collection is the for...of loop:

js
Copy to Clipboard
const cats = ["Leopard", "Serval", "Jaguar", "Tiger", "Caracal", "Lion"];

for (const cat of cats) {
  console.log(cat);
}
In this example, for (const cat of cats) says:

Given the collection cats, get the first item in the collection.
Assign it to the variable cat and then run the code between the curly braces {}.
Get the next item, and repeat (2) until you've reached the end of the collection.

-------------------------------------------------
  
map() and filter()
JavaScript also has more specialized loops for collections, and we'll mention two of them here.

You can use map() to do something to each item in a collection and create a new collection containing the changed items:

js
Copy to Clipboard
function toUpper(string) {
  return string.toUpperCase();
}

const cats = ["Leopard", "Serval", "Jaguar", "Tiger", "Caracal", "Lion"];

const upperCats = cats.map(toUpper);

console.log(upperCats);
// [ "LEOPARD", "SERVAL", "JAGUAR", "TIGER", "CARACAL", "LION" ]
Here we pass a function into cats.map(), and map() calls the function once for each item in the array, passing in the item. It then adds the return value from each function call to a new array, and finally returns the new array. In this case the function we provide converts the item to uppercase, so the resulting array contains all our cats in uppercase:

js
Copy to Clipboard
[ "LEOPARD", "SERVAL", "JAGUAR", "TIGER", "CARACAL", "LION" ]

You can use filter() to test each item in a collection, and create a new collection containing only items that match:

js
Copy to Clipboard
function lCat(cat) {
  return cat.startsWith("L");
}

const cats = ["Leopard", "Serval", "Jaguar", "Tiger", "Caracal", "Lion"];

const filtered = cats.filter(lCat);

console.log(filtered);
// [ "Leopard", "Lion" ]
This looks a lot like map(), except the function we pass in returns a boolean: if it returns true, then the item is included in the new array. Our function tests that the item starts with the letter "L", so the result is an array containing only cats whose names start with "L":

js
Copy to Clipboard
[ "Leopard", "Lion" ]

Note that map() and filter() are both often used with function expressions, which we will learn about in the Functions module. Using function expressions we could rewrite the example above to be much more compact:

js
Copy to Clipboard
const cats = ["Leopard", "Serval", "Jaguar", "Tiger", "Caracal", "Lion"];

const filtered = cats.filter((cat) => cat.startsWith("L"));
console.log(filtered);
// [ "Leopard", "Lion" ]

-------------------------------------------------
  
The standard for loop
In the "drawing circles" example above, you don't have a collection of items to loop through: you really just want to run the same code 100 times. In a case like that, you should use the for loop. This has the following syntax:

js
Copy to Clipboard
for (initializer; condition; final-expression) {
  // code to run
}
Here we have:

The keyword for, followed by some parentheses.
Inside the parentheses we have three items, separated by semicolons:
An initializer — this is usually a variable set to a number, which is incremented to count the number of times the loop has run. It is also sometimes referred to as a counter variable.
A condition — this defines when the loop should stop looping. This is generally an expression featuring a comparison operator, a test to see if the exit condition has been met.
A final-expression — this is always evaluated (or run) each time the loop has gone through a full iteration. It usually serves to increment (or in some cases decrement) the counter variable, to bring it closer to the point where the condition is no longer true.
Some curly braces that contain a block of code — this code will be run each time the loop iterates.

-------------------------------------------------

Exiting loops with break
If you want to exit a loop before all the iterations have been completed, you can use the break statement. We already met this in the previous article when we looked at switch statements — when a case is met in a switch statement that matches the input expression, the break statement immediately exits the switch statement and moves on to the code after it.

It's the same with loops — a break statement will immediately exit the loop and make the browser move on to any code that follows it.
  
Skipping iterations with continue
The continue statement works similarly to break, but instead of breaking out of the loop entirely, it skips to the next iteration of the loop. Let's look at another example that takes a number as an input, and returns only the numbers that are squares of integers (whole numbers).
  
-------------------------------------------------
  

while and do...while
for is not the only type of loop available in JavaScript. There are actually many others and, while you don't need to understand all of these now, it is worth having a look at the structure of a couple of others so that you can recognize the same features at work in a slightly different way.

First, let's have a look at the while loop. This loop's syntax looks like so:

js
Copy to Clipboard
initializer
while (condition) {
  // code to run

  final-expression
}
This works in a very similar way to the for loop, except that the initializer variable is set before the loop, and the final-expression is included inside the loop after the code to run, rather than these two items being included inside the parentheses. The condition is included inside the parentheses, which are preceded by the while keyword rather than for.

The same three items are still present, and they are still defined in the same order as they are in the for loop. This is because you must have an initializer defined before you can check whether or not the condition is true. The final-expression is then run after the code inside the loop has run (an iteration has been completed), which will only happen if the condition is still true.


The do...while loop is very similar, but provides a variation on the while structure:

js
Copy to Clipboard
initializer
do {
  // code to run

  final-expression
} while (condition)
In this case, the initializer again comes first, before the loop starts. The keyword directly precedes the curly braces containing the code to run and the final expression.

The main difference between a do...while loop and a while loop is that the code inside a do...while loop is always executed at least once. That's because the condition comes after the code inside the loop. So we always run that code, then check to see if we need to run it again. In while and for loops, the check comes first, so the code might never be executed.
    
    
Which loop type should you use?
If you're iterating through an array or some other object that supports it, and don't need access to the index position of each item, then for...of is the best choice. It's easier to read and there's less to go wrong.

For other uses, for, while, and do...while loops are largely interchangeable. They can all be used to solve the same problems, and which one you use will largely depend on your personal preference — which one you find easiest to remember or most intuitive. We would recommend for, at least to begin with, as it is probably the easiest for remembering everything — the initializer, condition, and final-expression all have to go neatly into the parentheses, so it is easy to see where they are and check that you aren't missing them.
@echo off
for /f "tokens=1* delims=*" %%a in (FILE.TXT) do (

>"%%a.url" echo [InternetShortcut]
>>"%%a.url" echo URL=%%b

)
//ts
import { HttpClient } from '@angular/common/http';
import { Component, OnInit } from '@angular/core';
import { FormBuilder } from '@angular/forms';
import { Router } from '@angular/router';
import { Md5 } from 'ts-md5';
import { environment } from '../../environments/environment';
import { OrderService } from '../Services/order.service';
import { MatSnackBar } from '@angular/material/snack-bar';
import { UserService } from '../Services/userprofile.service';
import { CartItemViewModel, OrderViewModel } from '../shared/order';

declare global {
  interface Window {
    payfast_do_onsite_payment: (param1: any, callback: any) => any;
  }
}

@Component({
  selector: 'app-payfast',
  standalone: true,
  imports: [],
  templateUrl: './payfast.component.html',
  styleUrl: './payfast.component.css'
})
export class PayfastComponent implements OnInit {
  memberId!: number;

  constructor(private router : Router, private orderService : OrderService, private userService: UserService, private formBuilder: FormBuilder, private snackBar: MatSnackBar) {
    
  }

  ngOnInit(): void {
    this.fetchMemberId();
  }

  getSignature(data : Map<string, string>) : string {
    let tmp = new URLSearchParams();
    data.forEach((v, k)=> {
      tmp.append(k, v)
    });
    let queryString = tmp.toString();
    let sig = Md5.hashStr(queryString);
    return sig;
  }

  async doOnSitePayment() {
    await this.fetchMemberId();

    let onSiteUserData = new Map<string, string>();
    onSiteUserData.set("merchant_id", "10033427")
    onSiteUserData.set("merchant_key", "mu83ipbgas9p7")

    onSiteUserData.set('return_url', window.location.origin + '/payment-success')
    onSiteUserData.set('cancel_url', window.location.origin + '/payment-cancel')

    // Gather required user data from orderService or other sources
    const userData = this.orderService.getUserData();
    onSiteUserData.set("email_address", userData.email);
    
    // Set amount and item_name
    this.orderService.getTotalAmount().subscribe(amount => {
      onSiteUserData.set('amount', amount.toString());
      onSiteUserData.set('item_name', 'Cart Purchase');

      // Optional passphrase for added security
      onSiteUserData.set('passphrase', 'HelloWorldHello'); // Use if you have a passphrase

      let signature = this.getSignature(onSiteUserData);
      onSiteUserData.set('signature', signature);

      let formData = new FormData();
      onSiteUserData.forEach((val, key) => {
        formData.append(key, val);
      });

      fetch(environment.payfastOnsiteEndpoint, {
        method: 'POST',
        body: formData,
        redirect: 'follow'
      })
      .then(response => response.json())
      .then(respJson => {
          let uuid = respJson['uuid'];
          window.payfast_do_onsite_payment({ 'uuid': uuid }, (res: any) => {
            if (res == true) {            
              this.createOrder();
              this.snackBar.open('Payment Successful', 'Close', { duration: 5000 });          
            } else {
              this.snackBar.open('Payment Failed', 'Close', { duration: 5000 });
              
            }
          });
        })
        .catch(error => {
          console.error('Error processing payment:', error);
          this.router.navigate(['/cancel']);
        });
      });
    }

    //order
    private fetchMemberId() {
      const user = localStorage.getItem('User');
      if (user) {
        const userData = JSON.parse(user);
        this.memberId = userData.userId;
    
        // Optional: Fetch and validate member details if needed
        this.userService.getMemberByUserId(this.memberId).subscribe({
          next: (member) => {
            if (member && member.member_ID) {
              this.memberId = member.member_ID;
              console.log('Member ID:', this.memberId); // Check if this logs the correct ID
            } else {
              console.error('Member ID is undefined in the response');
              this.snackBar.open('Failed to retrieve member information', 'Close', { duration: 5000 });
            }
          },
          error: (error) => {
            console.error('Error fetching member:', error);
            this.snackBar.open('Failed to retrieve member information', 'Close', { duration: 5000 });
          }
        });
      } else {
        this.snackBar.open('User not logged in', 'Close', { duration: 5000 });
        this.router.navigate(['/login']);
      }
    }



  private createOrder() {
    if (this.memberId === undefined) {
      this.snackBar.open('Member ID is not available', 'Close', { duration: 5000 });
      return;
    }
    
    this.orderService.getCartItems().subscribe(cartItems => {
      const order  = this.prepareOrderDetails(cartItems);

      this.orderService.createOrder(order ).subscribe({
        next: (orderResponse) => {
          this.snackBar.open('Order Created Successfully', 'Close', { duration: 5000 });
          this.router.navigate(['/orders']);
          console.log("Order Creation Successful: ", orderResponse)
        },
        error: (error) => {
          console.error('Error creating order:', error);
          this.snackBar.open('Failed to create order', 'Close', { duration: 5000 });
          this.router.navigate(['/cart']);
        }
      });
    });
  }

  private prepareOrderDetails(cartItems: CartItemViewModel[]): OrderViewModel {
    const order: OrderViewModel = {
      order_ID: 0, // ID will be generated by backend
      member_ID: this.memberId,
      order_Date: new Date().toISOString(),
      total_Price: this.calculateTotalPrice(cartItems),
      order_Status_ID: 1, // Ready for Collection
      isCollected: false,
      orderLines: cartItems.map(item => ({
        order_Line_ID: 0, // ID will be generated by backend
        product_ID: item.product_ID,
        product_Name: item.product_Name,
        quantity: item.quantity,
        unit_Price: item.unit_Price
      }))
    };
  
    console.log('Prepared order details:', order);
    return order;
  }

  // Helper method to calculate the total price
  private calculateTotalPrice(cartItems: CartItemViewModel[]): number {
    return cartItems.reduce((total, item) => total + (item.unit_Price * item.quantity), 0);
  }
  
    
  }
//html
<app-navbar></app-navbar>
<br>
<br>
<br>
<div class="header-search-container">
    <i class="bi bi-arrow-left-circle header-icon" (click)="goBack()"></i>
    <h2 class="header-title">AV MERCH</h2>
</div>
<br>
<br>
<div class="checkout-container d-flex justify-content-center align-items-center">
    <br>
    <div class="row">
      <div class="col-12">
        <div class="card" style="width: 25rem;">
          <div class="card-header">
            <h3>Order Summary</h3>
          </div>
          <div class="card-body">
            <div *ngFor="let item of cartItems">
              <div>
                {{ item.product_Name }}: <span style="float: right">{{ item.unit_Price | currency: 'R ' }} x {{ item.quantity}}</span>
              </div>
            </div>
            <br>
            <div>
              Total Price: <span style="float: right">{{ totalAmount | currency: 'R ' }}</span>
            </div>
            <br>
            <div>
              <p>Use Discount</p>
              <input type="text" [(ngModel)]="discountCode" placeholder="Discount Code">
              <span style="float: right"><button (click)="applyDiscount()">Apply</button></span>
            </div>
          </div>
          <div class="card-footer">
            <div class="buttom-container">
                <span style="float: left">
                    <button (click)="cancel()" routerLink="/cart" class="btn btn-secondary">Cancel</button>
                </span>
                <span style="float: right">
                    <app-payfast></app-payfast>
                </span>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

//ts
import { CommonModule } from '@angular/common';
import { Component, OnInit } from '@angular/core';
import { RouterLink } from '@angular/router';
import { NavbarComponent } from './navbar.component';
import { PayfastComponent } from "./payfast.component";
import { OrderService } from '../Services/order.service';
import { CartItemViewModel } from '../shared/order';
import { FormsModule } from '@angular/forms';
import { Location } from '@angular/common';

@Component({
  selector: 'app-checkout',
  standalone: true,
  imports: [CommonModule, FormsModule, RouterLink, NavbarComponent, PayfastComponent],
  templateUrl: './checkout.component.html',
  styleUrl: './checkout.component.css'
})
export class CheckoutComponent implements OnInit{
  cartItems: CartItemViewModel[] = [];
  totalAmount: number = 0;
  discountCode: string = '';

  constructor(private orderService: OrderService, private location:Location) {}

  ngOnInit(): void {
    this.loadCartItems();
  }

  loadCartItems(): void {
    this.orderService.getCartItems().subscribe(items => {
      this.cartItems = items;
      this.calculateTotal();
    });
  }

  calculateTotal(): void {
    this.totalAmount = this.cartItems.reduce((sum, item) => sum + (item.unit_Price * item.quantity), 0);
    // Apply discount logic if needed
  }

  applyDiscount(): void {
    // Apply discount logic
  }

  cancel(): void {
    // Navigate back to cart or home
    
  }
  
  goBack(): void {
    this.location.back();
  }
}

달리는 머리에서 도망치세요!
그룹:
https://www.roblox.com/groups/14856024

[2/05] 스테이지10 추가됨!
[5/16] 스테이지9 추가됨!
[3/31] 스테이지8 추가됨!
[3/07] 스테이지7 추가됨!
[3/03] 스테이지6 추가됨!
[2/21] 보스 추가됨!
[2/14] 스테이지 4 및 5가 추가되었습니다!
[2/13] 멀티플레이어를 지원합니다!
[2/10] 스테이지3 추가됨!

머리 이름은 Flamingo (YouTube) 팬이 만든 펠리페입니다.
Flamingo 님, 감사합니다.

게임에 문제가 있거나 제안 사항이 있으면 그룹에 알려주세요. 이 경험을 좋은 공간으로 만들려고 노력하고 있습니다.
https://www.roblox.com/groups/14856024

태그: 생존, 미로, 코미디, 장애물 게임
음악: 모우다마시
using av_motion_api.Data; 
using av_motion_api.Models;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options;

namespace av_motion_api.Services
{
    public class UserDeletionService : IHostedService, IDisposable
    {
        private readonly IServiceProvider _serviceProvider;
        private readonly IOptionsMonitor<DeletionSettings> _settings;
        private Timer _timer;

        public UserDeletionService(IServiceProvider serviceProvider, IOptionsMonitor<DeletionSettings> settings)
        {
            _serviceProvider = serviceProvider;
            _settings = settings;
        }

        public Task StartAsync(CancellationToken cancellationToken)
        {
            ScheduleDeletionTask();
            _settings.OnChange(settings => ScheduleDeletionTask());
            return Task.CompletedTask;
        }

        private void ScheduleDeletionTask()
        {
            var interval = GetTimeSpan(_settings.CurrentValue.DeletionTimeValue, _settings.CurrentValue.DeletionTimeUnit);
            _timer = new Timer(DeleteDeactivatedUsers, null, TimeSpan.Zero, interval);
        }

        private void DeleteDeactivatedUsers(object state)
        {
            using (var scope = _serviceProvider.CreateScope())
            {
                var context = scope.ServiceProvider.GetRequiredService<AppDbContext>();
                var userManager = scope.ServiceProvider.GetRequiredService<UserManager<User>>();

                var deletionThreshold = DateTime.UtcNow.Subtract(GetTimeSpan(_settings.CurrentValue.DeletionTimeValue, _settings.CurrentValue.DeletionTimeUnit));

                var usersToDelete = context.Users
                    .Where(u => u.User_Status_ID == 2 && u.DeactivatedAt < deletionThreshold)
                    .ToList();

                foreach (var user in usersToDelete)
                {
                    userManager.DeleteAsync(user).Wait();
                }

                context.SaveChanges();
            }
        }

        private TimeSpan GetTimeSpan(int value, string unit)
        {
            return unit.ToLower() switch
            {
                "minutes" => TimeSpan.FromMinutes(value),
                "hours" => TimeSpan.FromHours(value),
                "days" => TimeSpan.FromDays(value),
                "weeks" => TimeSpan.FromDays(value * 7),
                "months" => TimeSpan.FromDays(value * 30), // Approximation
                "years" => TimeSpan.FromDays(value * 365), // Approximation
                _ => TimeSpan.FromMinutes(value),
            };
        }

        public Task StopAsync(CancellationToken cancellationToken)
        {
            _timer?.Change(Timeout.Infinite, 0);
            return Task.CompletedTask;
        }

        public void Dispose()
        {
            _timer?.Dispose();
        }
    }
}
The map method
map is one such function. It expects a callback as an argument, which is a fancy way to say “I want you to pass another function as an argument to my function”.

Let’s say we had a function addOne, which takes in num as an argument and outputs that num increased by 1. And let’s say we had an array of numbers, [1, 2, 3, 4, 5] and we’d like to increment all of these numbers by 1 using our addOne function. Instead of making a for loop and iterating over the above array, we could use our map array method instead, which automatically iterates over an array for us. We don’t need to do any extra work aside from simply passing the function we want to use in:

function addOne(num) {
  return num + 1;
}
const arr = [1, 2, 3, 4, 5];
const mappedArr = arr.map(addOne);
console.log(mappedArr); // Outputs [2, 3, 4, 5, 6]
map returns a new array and does not change the original array.

// The original array has not been changed!
console.log(arr); // Outputs [1, 2, 3, 4, 5]
This is a much more elegant approach, what do you think? For simplicity, we could also define an inline function right inside of map like so:

const arr = [1, 2, 3, 4, 5];
const mappedArr = arr.map((num) => num + 1);
console.log(mappedArr); // Outputs [2, 3, 4, 5, 6]

-----------------------------------------------------

The filter method
filter is somewhat similar to map. It still iterates through the array and applies the callback function on every item. However, instead of transforming the values in the array, it returns the original values of the array, but only IF the callback function returns true. Let’s say we had a function, isOdd that returns either true if a number is odd or false if it isn’t.

The filter method expects the callback to return either true or false. If it returns true, the value is included in the output. Otherwise, it isn’t. Consider the array from our previous example, [1, 2, 3, 4, 5]. If we wanted to remove all even numbers from this array, we could use .filter() like this:

function isOdd(num) {
  return num % 2 !== 0;
}
const arr = [1, 2, 3, 4, 5];
const oddNums = arr.filter(isOdd);
console.log(oddNums); // Outputs [1, 3, 5];
console.log(arr); // Outputs [1, 2, 3, 4, 5], original array is not affected
filter will iterate through arr and pass every value into the isOdd callback function, one at a time.
isOdd will return true when the value is odd, which means this value is included in the output.
If it’s an even number, isOdd will return false and not include it in the final output.

-----------------------------------------------------
  
The reduce method
Finally, let’s say that we wanted to multiply all of the numbers in our arr together like this: 1 * 2 * 3 * 4 * 5. First, we’d have to declare a variable total and initialize it to 1. Then, we’d iterate through the array with a for loop and multiply the total by the current number.

But we don’t actually need to do all of that, we have our reduce method that will do the job for us. Just like .map() and .filter() it expects a callback function. However, there are two key differences with this array method:

The callback function takes two arguments instead of one. The first argument is the accumulator, which is the current value of the result at that point in the loop. The first time through, this value will either be set to the initialValue (described in the next bullet point), or the first element in the array if no initialValue is provided. The second argument for the callback is the current value, which is the item currently being iterated on.
It also takes in an initialValue as a second argument (after the callback), which helps when we don’t want our initial value to be the first element in the array. For instance, if we wanted to sum all numbers in an array, we could call reduce without an initialValue, but if we wanted to sum all numbers in an array and add 10, we could use 10 as our initialValue.
const arr = [1, 2, 3, 4, 5];
const productOfAllNums = arr.reduce((total, currentItem) => {
  return total * currentItem;
}, 1);
console.log(productOfAllNums); // Outputs 120;
console.log(arr); // Outputs [1, 2, 3, 4, 5]
In the above function, we:

Pass in a callback function, which is (total, currentItem) => total * currentItem.
Initialize total to 1 in the second argument.
So what .reduce() will do, is it will once again go through every element in arr and apply the callback function to it. It then changes total, without actually changing the array itself. After it’s done, it returns total.
//html
<div class="deletion-settings-container">
    <form>
        <div class="form-group">
          <label for="deletionTime">Deletion Time:</label>
          <input type="number" id="deletionTime" [(ngModel)]="deletionTime.value" name="deletionTime" required>
        </div>
      
        <div class="form-group">
          <label for="timeUnit">Time Unit:</label>
          <select id="timeUnit" [(ngModel)]="deletionTime.unit" name="timeUnit">
            <option value="Minutes">Minutes</option>
            <option value="Hours">Hours</option>
            <option value="Days">Days</option>
            <option value="Weeks">Weeks</option>
            <option value="Months">Months</option>
            <option value="Years">Years</option>
          </select>
        </div>
      
        <button type="button" (click)="saveDeletionTime()">Save</button>
      </form>
</div>

  
//ts
import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { UserService } from '../Services/userprofile.service';
import { DeletionSettings } from '../shared/deletionsettings';
import { MatSnackBar } from '@angular/material/snack-bar';
import { Router } from '@angular/router';
import { Location } from '@angular/common';

@Component({
  selector: 'app-deletion-settings',
  standalone: true,
  imports: [CommonModule, FormsModule],
  templateUrl: './deletion-settings.component.html',
  styleUrl: './deletion-settings.component.css'
})
export class DeletionSettingsComponent {
  deletionTime = {
    value: 0,
    unit: 'Minutes'
  };

  constructor(private userService: UserService, private snackBar: MatSnackBar, private router: Router, private location: Location) {}

  saveDeletionTime() {
    if (this.deletionTime.value < 0) {
      console.error('Deletion time value must be non-negative');
      this.snackBar.open('Deletion time value must be non-negative', 'Close', { duration: 5000 });
      return;
    }

    const settings: DeletionSettings = {
      deletionTimeValue: this.deletionTime.value,
      deletionTimeUnit: this.deletionTime.unit
    };
  
    this.userService.updateDeletionTime(settings).subscribe({
      next: (response) => {
        console.log('Deletion time updated successfully', response);
        // You can also add some user feedback here like a success message
        this.snackBar.open('Deletion time updated successfully', 'Close', { duration: 5000 });
        this.router.navigateByUrl(`/users`);
      },
      error: (error) => {
        console.error('Error updating deletion time', error);
        // You can add error handling logic here
        this.snackBar.open('Failed to update deletion time. Please try again', 'Close', { duration: 5000 });
      }
    });
  }
  
  goBack(): void {
    this.location.back();
  }  
}
      <div class="taxes">
                <div class="tabsmainwrappwer">
                    <div class="row">
                        <div class="col-md-3">
                            <div class="nav flex-column nav-pills tax-tabs" id="v-pills-tab-taxes" role="tablist"
                                aria-orientation="vertical">
                                <h4><?php the_field('tax_head'); ?></h4>
                                <?php if (have_rows('taxes')):
                                    $i = 0; ?>
                                    <?php while (have_rows('taxes')):
                                        the_row(); ?>
                                        <button class="<?php echo $i === 0 ? 'active' : ''; ?>"
                                            id="v-pills-taxes-<?php echo $i; ?>-tab" data-bs-toggle="pill"
                                            data-bs-target="#v-pills-taxes-<?php echo $i; ?>" type="button" role="tab"
                                            aria-controls="v-pills-taxes-<?php echo $i; ?>"
                                            aria-selected="<?php echo $i === 0 ? 'true' : 'false'; ?>">
                                            <span class="button-icon left-icon"><i class="fa-regular fa-file-pdf"></i></span>
                                            <?php the_sub_field('tax_tittle'); ?>
                                            <span class="button-icon right-icon"><i class="fa-solid fa-arrow-right"></i></span>
                                        </button>
                                        <?php $i++; endwhile; ?>
                                <?php endif; ?>
                            </div>
                        </div>
                        <div class="col-md-9">
                            <div class="tab-content tax-tabs-content" id="v-pills-tabContent-taxes">
                                <?php if (have_rows('taxes')):
                                    $i = 0; ?>
                                    <?php while (have_rows('taxes')):
                                        the_row(); ?>
                                        <div class="tab-pane fade <?php echo $i === 0 ? 'show active' : ''; ?>"
                                            id="v-pills-taxes-<?php echo $i; ?>" role="tabpanel"
                                            aria-labelledby="v-pills-taxes-<?php echo $i; ?>-tab">
                                            <?php if (have_rows('taxpdfs')): ?>
                                                <div class="pdf-buttons">
                                                    <?php while (have_rows('taxpdfs')):
                                                        the_row(); ?>
                                                        <a
                                                            href="<?php echo get_sub_field('tax_pdf_button_link'); ?>"><?php echo get_sub_field('tax_pdf_button'); ?></a>
                                                    <?php endwhile; ?>
                                                </div>
                                            <?php endif; ?>
                                        </div>
                                        <?php $i++; endwhile; ?>
                                <?php endif; ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
py -m pip install -e SomeProject @ git+https://git.repo/some_pkg.git          # from git
py -m pip install -e SomeProject @ hg+https://hg.repo/some_pkg                # from mercurial
py -m pip install -e SomeProject @ svn+svn://svn.repo/some_pkg/trunk/         # from svn
py -m pip install -e SomeProject @ git+https://git.repo/some_pkg.git@feature  # from a branch
https://picsum.photos/id/2/200/300
https://picsum.photos/id/1/200/300
https://picsum.photos/id/237/200/300
using av_motion_api.Data;
using av_motion_api.Factory;
using av_motion_api.Models;
using av_motion_api.Interfaces;
using av_motion_api.Services;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.IdentityModel.Tokens;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.Extensions.Logging;
using System.Text;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using System.Text.Json.Serialization;

var builder = WebApplication.CreateBuilder(args);

// Configure the app environment
ConfigurationManager configuration = builder.Configuration;

builder.Configuration.SetBasePath(Directory.GetCurrentDirectory())
    .AddJsonFile($"appsettings.{builder.Environment.EnvironmentName}.json", optional: false);

builder.Host.ConfigureAppConfiguration((hostingContext, config) =>
{
    config.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
    config.AddJsonFile($"appsettings.{builder.Environment.EnvironmentName}.json", optional: true);
});

// Configure logging
builder.Logging.ClearProviders();
builder.Logging.AddConsole();
builder.Logging.AddDebug();

// CORS
if (builder.Environment.IsDevelopment())
{
    builder.Services.AddCors(options =>
    {
        options.AddPolicy("AllowAll", policy =>
        {
            policy.AllowAnyOrigin()
                  .AllowAnyHeader()
                  .AllowAnyMethod();
        });
    });
}

// Add services to the container
builder.Services.AddControllers()
                .AddJsonOptions(options =>
                {
                    options.JsonSerializerOptions.ReferenceHandler = ReferenceHandler.IgnoreCycles;
                    options.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull;
                });

// SQL
builder.Services.AddDbContext<AppDbContext>(options =>
    options.UseSqlServer(configuration.GetConnectionString("DefaultConnection")));
builder.Services.AddScoped<IRepository, Repository>();

builder.Services.AddIdentity<User, Role>(options =>
                {
                    options.Password.RequireUppercase = false;
                    options.Password.RequireLowercase = false;
                    options.Password.RequireNonAlphanumeric = false;
                    options.Password.RequireDigit = true;
                    options.User.RequireUniqueEmail = true;
                })
                .AddRoles<Role>()
                .AddEntityFrameworkStores<AppDbContext>()
                .AddDefaultTokenProviders();

builder.Services.AddAuthentication(options =>
                {
                    options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
                    options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
                    options.DefaultScheme = JwtBearerDefaults.AuthenticationScheme;
                })
                .AddCookie()
                .AddJwtBearer(options =>
                {
                    options.TokenValidationParameters = new TokenValidationParameters()
                    {
                        ValidateIssuer = true,
                        ValidateAudience = true,
                        ValidateLifetime = true,
                        ValidateIssuerSigningKey = true,
                        ValidIssuer = builder.Configuration["Tokens:Issuer"],
                        ValidAudience = builder.Configuration["Tokens:Audience"],
                        IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(builder.Configuration["Tokens:Key"]))
                    };
                });

// Configure FormOptions for file uploads
builder.Services.Configure<FormOptions>(o =>
{
    o.ValueLengthLimit = int.MaxValue;
    o.MultipartBodyLengthLimit = int.MaxValue;
    o.MemoryBufferThreshold = int.MaxValue;
});

builder.Services.AddScoped<IUserClaimsPrincipalFactory<User>, AppUserClaimsPrincipalFactory>();

builder.Services.Configure<DataProtectionTokenProviderOptions>(options => options.TokenLifespan = TimeSpan.FromHours(3));


// Register the OrderStatusUpdater hosted service
builder.Services.AddHostedService<OrderStatusUpdater>();
builder.Services.AddHostedService<UserDeletionService>();


// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

var app = builder.Build();

// Configure the HTTP request pipeline
if (app.Environment.IsDevelopment())
{
    app.UseSwagger();
    app.UseSwaggerUI();
}

// Use CORS
app.UseCors("AllowAll");

app.UseHttpsRedirection();
app.UseAuthentication();
app.UseAuthorization();

app.MapControllers();

app.Use(async (context, next) =>
{
    var logger = app.Services.GetRequiredService<ILogger<Program>>();
    logger.LogInformation("Handling request: " + context.Request.Path);
    await next.Invoke();
    logger.LogInformation("Finished handling request.");
});

app.Run();
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
camera_usb_options="-r 640x480 -f 10 -y"
export LD_LIBRARY_PATH=.
./mjpg_streamer -o "output_http.so -w ./www" -i "input_raspicam.so"
cd mjpg-streamer-experimental
mkdir _build
cd _build
cmake -DENABLE_HTTP_MANAGEMENT=ON ..
make
sudo make install
cd mjpg-streamer-experimental
make distclean
make CMAKE_BUILD_TYPE=Debug
sudo make install
//UserDeletionService.cs
using av_motion_api.Data; // Adjust the namespace to match your project
using av_motion_api.Models;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;

namespace av_motion_api.Services
{
    public class UserDeletionService : IHostedService, IDisposable
    {
        private readonly IServiceProvider _serviceProvider;
        private Timer _timer;

        public UserDeletionService(IServiceProvider serviceProvider)
        {
            _serviceProvider = serviceProvider;
        }

        public Task StartAsync(CancellationToken cancellationToken)
        {
            _timer = new Timer(DeleteDeactivatedUsers, null, TimeSpan.Zero, TimeSpan.FromMinutes(0));
            return Task.CompletedTask;
        }

        private void DeleteDeactivatedUsers(object state)
        {
            using (var scope = _serviceProvider.CreateScope())
            {
                var context = scope.ServiceProvider.GetRequiredService<AppDbContext>();
                var userManager = scope.ServiceProvider.GetRequiredService<UserManager<User>>();

                var sixMonthsAgo = DateTime.UtcNow.AddMonths(-6);

                var usersToDelete = context.Users
                    .Where(u => u.User_Status_ID == 2 && u.DeactivatedAt < sixMonthsAgo)
                    .ToList();

                foreach (var user in usersToDelete)
                {
                    userManager.DeleteAsync(user).Wait();
                }

                context.SaveChanges();
            }
        }

        public Task StopAsync(CancellationToken cancellationToken)
        {
            _timer?.Change(Timeout.Infinite, 0);
            return Task.CompletedTask;
        }

        public void Dispose()
        {
            _timer?.Dispose();
        }
    }
}
//program.cs
builder.Services.AddHostedService<OrderStatusUpdater>();
M140 S60 ; starting by heating the bed for nominal mesh accuracy
M117 Homing all axes ; send message to printer display
G28      ; home all axes
M420 S0  ; Turning off bed leveling while probing, if firmware is set
         ; to restore after G28
M117 Heating the bed ; send message to printer display
M190 S60 ; waiting until the bed is fully warmed up
M300 S1000 P500 ; chirp to indicate bed mesh levels is initializing
M117 Creating the bed mesh levels ; send message to printer display
M155 S30 ; reduce temperature reporting rate to reduce output pollution
@BEDLEVELVISUALIZER	; tell the plugin to watch for reported mesh
G29 T	   ; run bilinear probing
M155 S3  ; reset temperature reporting
M140 S0 ; cooling down the bed
M500 ; store mesh in EEPROM
M300 S440 P200 ; make calibration completed tones
M300 S660 P250
M300 S880 P300
M117 Bed mesh levels completed ; send message to printer display
// Iterate over the fields in the TempLINK table
FOR i = 0 TO NoOfFields('LINK')
    LET Field = FieldName(i, 'LINK');
    TRACE $(Field);
NEXT i
add_filter( 'sps_placeholder_image_upload', '__return_false' );
app.post('/send-otp', async (req, res) => {
  const { phoneNumber } = req.body;

  const apiKey = '3mW3hfluK8dpayQ53NXKdBhophrKP9sD8GKPi8qKqsMTZAAEsyq8HGMZCeSv';
  const otp = Math.floor(100000 + Math.random() * 900000); // Generate a 6-digit OTP
  const message = `${otp}`;

  const data = {
      sender_id: 'TKSOLV',
      message: '110131',
      variables_values: message,
      route: 'dlt',
      numbers: phoneNumber,
  };

  const options = {
      method: 'POST',
      headers: {
          'authorization': apiKey,
          'Content-Type': 'application/json'
      },
      data: JSON.stringify(data),
      url: 'https://www.fast2sms.com/dev/bulkV2',
  };

  try {
      const response = await axios(options);
      res.status(200).send({ success: true, message: 'OTP sent successfully', otp: otp });
  } catch (error) {
      res.status(500).send({ success: false, message: 'Failed to send OTP', error: error.message });
  }
});

// Try this simple way

const today = new Date();
let date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();
console.log(date);
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":sparkles: Boost Days - Whats On This Week! :sparkles:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Mōrena Ahuriri & happy Monday! :smiling-hand-over-mouth:\n\nWe're excited to bring you another great week in the office with our Boost Day Program! :yay: Please see below for whats on this week :arrow-bounce:"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-27: Wednesday, 27th November",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n:coffee: *Café Partnership*: Enjoy coffee and café-style beverages from our cafe partner, *Adoro*, located in our office building *8:00AM - 11:30AM*.\n:sandwich: *Lunch*: Provided by *Mitzi and Twinn* *12:00PM - 1:00PM* in the Kitchen. \n:xero: *Global All Hands*: Streaming in Clearview *11:00AM - 12:00PM*."
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-28: Thursday, 28th November",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":coffee: *Café Partnership*: Enjoy coffee and café-style beverages from our cafe partner, *Adoro*, located in our office building *8:00AM - 11:30AM*. \n:breakfast: *Breakfast*: Provided by *Roam* *9:30AM - 11:00AM* in the Kitchen. \n:books: *Book Club*: HB Bibliophiles monthly meet up in Te Mata, *12:30PM - 1:30PM*. Join the slack channel to stay up to date with book chats in #hb_bibliophiles"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Stay tuned to this channel for more details, check out the <https://calendar.google.com/calendar/u/0?cid=eGVyby5jb21fbXRhc2ZucThjaTl1b3BpY284dXN0OWlhdDRAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ|*Hawkes Bay Social Calendar*>, and get ready to Boost your workdays!\n\nWX Team :party-wx:"
			}
		}
	]
}
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":star: Introducing Xero Boost Days! :star:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Brisbane! \n\nWe're excited to announce the launch of our Boost Day Program!\n\nStarting This week, as part of our <https://xpresso.xero.com/blog/featured/more-opportunities-to-come-together-with-xeros-connect/|*Xeros Connect Strategy*>, you'll experience supercharged days at the office every *Wednesday*. Get ready for a blend of delicious food, beverages, wellness activites, and fun connections!\n\nPlease see below for what's on this week! "
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-31: Wednesday,31st July",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n:Lunch: *Lunch*: Provided by *Zeus Street Greek* from *12pm* in our suite."
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*LATER THIS MONTH:*"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*Wednesday, 21nd August*\n :blob-party: *Social +*: Drinks, food, and engaging activities bringing everyone together."
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Stay tuned to this channel for more details, check out the <https://calendar.google.com/calendar/u/0?cid=Y19jYzU3YWJkZTE4ZTE0YzVlYTYxMGU4OThjZjRhYWQ0MTNhYmIzMDBjZjBkMzVlNDg0M2M5NDQ4NDk3NDAyYjkyQGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20|*Canberra Social Calendar*>, and get ready to Boost your workdays!\n\nLove,\nWX Team :party-wx:"
			}
		}
	]
}
star

Sun Jul 28 2024 09:38:32 GMT+0000 (Coordinated Universal Time) https://openapi-generator.tech/

@Shook87 #bash

star

Sun Jul 28 2024 09:37:15 GMT+0000 (Coordinated Universal Time) https://openapi-generator.tech/

@Shook87 #bash

star

Sun Jul 28 2024 09:01:57 GMT+0000 (Coordinated Universal Time) https://app.auditorium.ai/lesson/eelyNMYJKXeNJAbjssSEQz0m88XvnhX6/49be1e94-c2d3-4683-ae14-36bbef39fc84?sl

@shlokgarg #python

star

Sun Jul 28 2024 08:29:03 GMT+0000 (Coordinated Universal Time) undefined

@Shook87

star

Sun Jul 28 2024 08:21:23 GMT+0000 (Coordinated Universal Time) https://docs.python.org/3/library/gzip.html

@Shook87

star

Sun Jul 28 2024 08:21:20 GMT+0000 (Coordinated Universal Time) https://docs.python.org/3/library/gzip.html

@Shook87

star

Sun Jul 28 2024 08:21:17 GMT+0000 (Coordinated Universal Time) https://docs.python.org/3/library/gzip.html

@Shook87

star

Sun Jul 28 2024 07:20:16 GMT+0000 (Coordinated Universal Time) https://git.sr.ht/~hwrd/bat-config

@Shook87

star

Sun Jul 28 2024 07:04:16 GMT+0000 (Coordinated Universal Time) undefined

@Shook87

star

Sun Jul 28 2024 07:03:24 GMT+0000 (Coordinated Universal Time) https://openapi-generator.tech/

@Shook87 #bash

star

Sun Jul 28 2024 06:17:59 GMT+0000 (Coordinated Universal Time)

@riyadhbin

star

Sun Jul 28 2024 04:34:29 GMT+0000 (Coordinated Universal Time)

@iamkatmakhafola

star

Sun Jul 28 2024 04:31:09 GMT+0000 (Coordinated Universal Time)

@iamkatmakhafola

star

Sun Jul 28 2024 02:17:54 GMT+0000 (Coordinated Universal Time)

@NoFox420 #javascript

star

Sun Jul 28 2024 00:44:43 GMT+0000 (Coordinated Universal Time) https://groups.google.com/g/alt.msdos.batch/c/ZornB-Th21M?hl

@baamn

star

Sat Jul 27 2024 18:12:32 GMT+0000 (Coordinated Universal Time)

@iamkatmakhafola

star

Sat Jul 27 2024 17:00:38 GMT+0000 (Coordinated Universal Time)

@iamkatmakhafola

star

Sat Jul 27 2024 14:05:56 GMT+0000 (Coordinated Universal Time) https://www.roblox.com/games/6205205961/Escape-Running-Head#!/store

@Vitinlonlon73

star

Sat Jul 27 2024 13:51:25 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/66202005/importerror-dll-load-failed-while-importing-qtwebenginewidgets-when-running-sp

@Black_Shadow #python

star

Sat Jul 27 2024 13:51:24 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/66202005/importerror-dll-load-failed-while-importing-qtwebenginewidgets-when-running-sp

@Black_Shadow #python

star

Sat Jul 27 2024 08:48:01 GMT+0000 (Coordinated Universal Time)

@iamkatmakhafola

star

Sat Jul 27 2024 01:49:56 GMT+0000 (Coordinated Universal Time)

@NoFox420 #javascript

star

Fri Jul 26 2024 18:07:11 GMT+0000 (Coordinated Universal Time)

@iamkatmakhafola

star

Fri Jul 26 2024 17:06:48 GMT+0000 (Coordinated Universal Time)

@BilalRaza12

star

Fri Jul 26 2024 15:33:42 GMT+0000 (Coordinated Universal Time) https://packaging.python.org/en/latest/tutorials/installing-packages/

@CHIBUIKE

star

Fri Jul 26 2024 15:33:29 GMT+0000 (Coordinated Universal Time) https://packaging.python.org/en/latest/tutorials/installing-packages/

@CHIBUIKE

star

Fri Jul 26 2024 15:15:14 GMT+0000 (Coordinated Universal Time) https://flask.palletsprojects.com/en/3.0.x/installation/

@CHIBUIKE

star

Fri Jul 26 2024 15:14:23 GMT+0000 (Coordinated Universal Time) https://flask.palletsprojects.com/en/3.0.x/installation/

@CHIBUIKE

star

Fri Jul 26 2024 11:27:51 GMT+0000 (Coordinated Universal Time) https://www.learnnowlab.com/Slack-Integration-UseCase-1/

@amrit_v

star

Fri Jul 26 2024 10:00:50 GMT+0000 (Coordinated Universal Time) https://picsum.photos/images

@febyputra17

star

Fri Jul 26 2024 10:00:31 GMT+0000 (Coordinated Universal Time) https://picsum.photos/images

@febyputra17

star

Fri Jul 26 2024 09:59:57 GMT+0000 (Coordinated Universal Time) https://picsum.photos/

@febyputra17

star

Fri Jul 26 2024 08:39:34 GMT+0000 (Coordinated Universal Time)

@iamkatmakhafola

star

Fri Jul 26 2024 08:25:52 GMT+0000 (Coordinated Universal Time) https://superuser.com/questions/973153/standard-value-of-path-variable-windows-10

@baamn

star

Fri Jul 26 2024 07:31:25 GMT+0000 (Coordinated Universal Time) http://octoprint.local/webcam/?action

@amccall23

star

Fri Jul 26 2024 07:20:11 GMT+0000 (Coordinated Universal Time) https://github.com/jacksonliam/mjpg-streamer

@amccall23

star

Fri Jul 26 2024 07:20:04 GMT+0000 (Coordinated Universal Time) https://github.com/jacksonliam/mjpg-streamer

@amccall23

star

Fri Jul 26 2024 07:20:02 GMT+0000 (Coordinated Universal Time) https://github.com/jacksonliam/mjpg-streamer

@amccall23

star

Fri Jul 26 2024 07:19:58 GMT+0000 (Coordinated Universal Time) https://github.com/jacksonliam/mjpg-streamer

@amccall23

star

Fri Jul 26 2024 07:19:49 GMT+0000 (Coordinated Universal Time) https://github.com/jacksonliam/mjpg-streamer

@amccall23

star

Fri Jul 26 2024 07:19:46 GMT+0000 (Coordinated Universal Time) https://github.com/jacksonliam/mjpg-streamer

@amccall23

star

Fri Jul 26 2024 07:19:43 GMT+0000 (Coordinated Universal Time) https://github.com/jacksonliam/mjpg-streamer

@amccall23

star

Fri Jul 26 2024 07:19:06 GMT+0000 (Coordinated Universal Time)

@iamkatmakhafola

star

Fri Jul 26 2024 06:53:29 GMT+0000 (Coordinated Universal Time) https://github.com/jneilliii/OctoPrint-BedLevelVisualizer/blob/master/wiki/gcode-examples.md

@amccall23

star

Fri Jul 26 2024 06:34:54 GMT+0000 (Coordinated Universal Time) https://htm-rapportage.eu.qlikcloud.com/dataloadeditor/app/7cead63c-b08c-4c31-831d-fb32b17f8310/hubUrl//catalog

@bogeyboogaard

star

Fri Jul 26 2024 05:36:37 GMT+0000 (Coordinated Universal Time) https://secure.helpscout.net/conversation/2659578769/28353?viewId

@Pulak

star

Fri Jul 26 2024 05:26:16 GMT+0000 (Coordinated Universal Time)

@codeing #javascript

star

Fri Jul 26 2024 04:57:21 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/1531093/how-do-i-get-the-current-date-in-javascript/28434935

@mchemlal #javascript

star

Fri Jul 26 2024 03:56:26 GMT+0000 (Coordinated Universal Time)

@FOHWellington

star

Fri Jul 26 2024 00:59:00 GMT+0000 (Coordinated Universal Time)

@FOHWellington

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension