Install magento 2 extension

Manual installation process:
  1. Unzip extension package and upload them into Magento root directory.
  2. Run the following command in magento root folder
    • php bin/magneto setup:upgrade
    • php bin/magento setup:static-content:deploy

Get contact form 7 submmitted data

function contactform7_before_send_mail( $submission ) {

    $submission = WPCF7_Submission::get_instance();
    if ( $submission ) {
        $formData = $submission->get_posted_data();
$uploaded_files = $submission->uploaded_files();     
    }
}

remove_all_filters ('wpcf7_before_send_mail');
add_action( 'wpcf7_before_send_mail', 'contactform7_before_send_mail' );

Image Load detection

$('<img />').load( function(){
console.log('Image Loaded');
$(".js-gallery-popup-loader").hide();
}).attr('src', item.imagePath);

Cron job

Step1: Login to cPanle
Step2: Find "Cron Jobs" link and click.
Step3: Set time and command

Note: Command should be like bellow to execute a php script to send email.
/usr/bin/php -q /home/fictions/public_html/send_mail.php

If you want to execute an URL not file then command should be like bellow.
wget http://fictionsoft.com/demo/amazonapp/productRanks/send_mail

If you don't want to send an cron job operation status email(Given cron jobs form) then command should be like bellow.
wget http://fictionsoft.com/demo/amazonapp/productRanks/send_mail >/dev/null 2>&1


=====
find /home/angelasmaneattra/public_html/var/session/ -mtime +1 -exec rm -rf '{}' \;

find /home/angelasmaneattra/public_html/var/session/ -mtime +1 -exec rm {} \;


/usr/bin/find

Get rsa key

cat ~/.ssh/
ls ~/.ssh/
cat ~/.ssh/id_rsa

.Net Technologies

The list of Technologies:

C#
.Net Core
ASP.NET Web API
NLog
EF Core
AutoMapper
FluentValidation
MediatR
Hangfire
SignalR
Repository Pattern
Unit Of Work Pattern
Dependency Injection
Identity Server

Descendant property set and get

setDescendantProp (obj: any, dottedPropPath: any, value: any) {
const arr = dottedPropPath.split('.');
while (arr.length > 1) {
obj = obj[arr.shift()];
}
obj[arr[0]] = value;
}

getDescendantProp (obj: any, dottedPropPath: any) {
if (obj) {
const arr = dottedPropPath.split('.');
while (arr.length) {
obj = obj[arr.shift()];
if (obj === undefined) {
break;
}
}
}
return obj;
}

this.utilsService.setDescendantProp(this.model, fieldName, files[0]);

Angular Option field change value

<mat-select [(ngModel)]="model.workRightType" formControlName="workrighttype" (change)="onWorkRightChange($event)" placeholder="Engagement Type">
<mat-option *ngFor="let item of workRightTypes" [value]="item.value">       
  {{ item.title}}
  </mat-option>
  </mat-select>     
</mat-form-field>

onWorkRightChange(event){   
this.selectedWorkRight = event.value;       
}

Reactive from

import { FormGroup, FormBuilder } from '@angular/forms';

form: FormGroup;
model: OrganizationAddModel;

constructor(private formBuilder: FormBuilder, private organizationService: OrganizationService) {
    this.model = new OrganizationAddModel();
}

ngOnInit() {
this.form = this.formBuilder.group({
name:[],
email:[]     
});
}

<form [formGroup]="form">
<input [(ngModel)]="model.name" formControlName="name" matInput placeholder="Name">
  <div *ngIf="form.controls.name.invalid">
{{form.controls.name.errors.message}}
</div>
<input  [(ngModel)]="model.email" formControlName="email" matInput placeholder="Email">
</form>

let controls = this.form.controls;       
for (var field in controls) {         
   controls[field].setErrors({
message: "This is required field"
});
}

Form validation

<form [formGroup]="form">
<input [(ngModel)]="model.name" formControlName="name" matInput placeholder="Name">
  <div *ngIf="form.controls.name.invalid">
{{form.controls.name.errors.message}}
</div>
</form>

let controls = this.form.controls;        
for (var field in controls) {          
   controls[field].setErrors({
message: field + "aaaaa"
});
}