text:
/** Resource Dialog Components **
********************************/

import { Component, OnInit, Inject, ChangeDetectorRef } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatBottomSheetRef, MAT_BOTTOM_SHEET_DATA } from '@angular/material/bottom-sheet';
import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';
import { Convert } from 'src/app/lib/convert';
import { Position } from 'src/app/lib/geoutils';
import { AppInfo } from 'src/app/app.info';
import { SignalKClient } from 'signalk-client-angular';

/********* ResourceDialog **********
	data: {
        title: "<string>" title text,
        name: "<string>"resource name,
        comment: "<string>"resource comment,
    }
***********************************/
@Component({
	selector: 'ap-resourcedialog',
	template: `

{{data.title}}

            <mat-dialog-content>

                        <mat-icon color="primary">{{icon}}</mat-icon>

                                <mat-form-field hintLabel="Enter a Name">
                                    <input matInput #inpname="ngModel"
                                        type="text" required
                                        placeholder="Resource Name"
                                        [disabled]="false"
                                        [(ngModel)]="data.name">
                                    <mat-error *ngIf="inpname.invalid && (inpname.dirty || inpname.touched)">
                                        Please enter a waypoint name
                                    </mat-error>
                                </mat-form-field>

                                <mat-form-field hintLabel="Enter a Description">
                                    <textarea matInput rows="2" #inpcmt="ngModel"
                                        placeholder="Resource Description"
                                        [(ngModel)]="data.comment">
                                    </textarea>
                                </mat-form-field>

                                <mat-form-field style="width:100%;" hintLabel="Signal K Type">
                                    <mat-select #resourcetype
                                            [(value)]="data.skType">
                                        <mat-option *ngFor="let i of resourceTypeList" [value]="i.type">
                                            <mat-icon></mat-icon> {{i.name}}
                                        </mat-option>
                                    </mat-select>
                                </mat-form-field>

Lat:

Lon:

            </mat-dialog-content>
            <mat-dialog-actions>

                    <button mat-raised-button color="primary"
                        [disabled]="inpname.invalid"
                        (click)="dialogRef.close({result:true, data: data})">
                        SAVE
                    </button>
                    <button mat-raised-button (click)="dialogRef.close({result:false, data: data})">
                        CANCEL
                    </button>

            </mat-dialog-actions>

    `,
    styles: [`  ._ap-resource {
                    font-family: arial;
                    min-width: 300px;
                }
                .ap-confirm-icon {
                    min-width: 35px;
                    max-width: 35px;
                    color: darkorange;
                    text-align: left;
                }
                .ap-confirm-icon .mat-icon {
                    font-size: 25pt;
                }

                @media only screen
                    and (min-device-width : 768px)
                    and (max-device-width : 1024px),
                    only screen	and (min-width : 800px) {
                    .ap-confirm-icon {
                        min-width: 25%;
                        max-width: 25%;
                    }
                    .ap-confirm-icon .mat-icon {
                        font-size: 40pt;
                    }
                }
			`]
})
export class ResourceDialog implements OnInit {
	public icon:string;

    public resourceTypeList= [
        {type: '', name: 'Waypoint', icon: './assets/img/marker-gold.png'},
        {type: 'pseudoAtoN', name: 'Pseudo AtoN', icon: './assets/img/marker-red.png'}
    ]

    constructor(
        public app:AppInfo,
        public dialogRef: MatDialogRef<ResourceDialog>,
        @Inject(MAT_DIALOG_DATA) public data: any) {
	}

	//** lifecycle: events **
    ngOnInit() {
        this.data.name= this.data.name || '';
        this.data.comment= this.data.comment || '';
        this.data.title= this.data.title || '';
        this.data.position= this.data.position || [null,null];
        this.data.addMode= this.data.addMode || false;
        this.data.type= this.data.type || 'waypoint';
        this.data.skType= this.data.skType || '';

        this.icon= (this.data.type=='route') ? 'directions' :
            (this.data.type=='note') ? 'local_offer' :
            this.data.addMode ? 'add_location' : 'edit_location';
    }

}

/********* AISPropertiesModal **********
	data: {
        title: "<string>" title text,
        target: "<SKVessel>" vessel,
        id: <string> vessel id
    }
***********************************/
@Component({
	selector: 'ap-ais-modal',
	template: `

            <mat-toolbar>

                    <mat-icon color="primary"> directions_boat</mat-icon>

                    {{data.title}}

                    <button mat-icon-button (click)="modalRef.dismiss()"
                        matTooltip="Close" matTooltipPosition="below">
                        <mat-icon>keyboard_arrow_down</mat-icon>
                    </button>

            </mat-toolbar>

            <mat-card>

Name:

{{vInfo.name}}

MMSI:

{{vInfo.mmsi}}

Flag:

{{vInfo.flag}}

Port:

{{vInfo.port}}

Call sign:

{{vInfo.callsign}}

Dimensions:

                            {{vInfo.length}} x {{vInfo.beam}}

Draft:

{{vInfo.draft}}

Height:

{{vInfo.height}}

State:

{{vInfo.state}}

Destination:

{{vInfo.destination}}

ETA:

{{vInfo.eta.toLocaleString()}}

                    <signalk-details-list [details]=" data.target.properties"></signalk-details-list>

            </mat-card>

    `,
    styles: [`  ._ap-ais {
                    font-family: arial;
                }
                ._ap-ais .key-label {
                    width:150px;
                    font-weight:bold;
                }
			`]
})
export class AISPropertiesModal implements OnInit {

    public target: any;
    public vInfo= {
        name: null,
        mmsi: null,
        callsign: null,
        length: null,
        beam: null,
        draft: null,
        height: null,
        shipType: null,
        destination: null,
        eta: null,
        state: null,
        flag: null,
        port: null
    }

    constructor(
        public app: AppInfo,
        private sk: SignalKClient,
        public modalRef: MatBottomSheetRef<AISPropertiesModal>,
        @Inject(MAT_BOTTOM_SHEET_DATA) public data: any) {
    }

    ngOnInit() {
        this.target= this.data.target;
        this.getVesselInfo();
    }

    formatDegrees(val: number) {
        return (val ? `${Convert.radiansToDegrees(val).toFixed(1)} ${String.fromCharCode(186)}` : '0.0');
    }

    formatKnots(val: number) {
        return (val ? `${Convert.msecToKnots(val).toFixed(1)} kn` : '0.0');
    }

    private getVesselInfo() {
        let path: string;
        if(!this.data.id) { path='vessels/self' }
        else { path= this.data.id.split('.').join('/') }

        this.sk.api.get(path).subscribe(
            v=> {
                if(typeof v['name']!=='undefined') { this.vInfo.name= v['name'] }
                if(typeof v['mmsi']!=='undefined') { this.vInfo.mmsi= v['mmsi'] }
                if(typeof v['flag']!=='undefined') { this.vInfo.flag= v['flag'] }
                if(typeof v['port']!=='undefined') { this.vInfo.port= v['port'] }
                if(typeof v['communication']!=='undefined') {
                    if(typeof v['communication']['callsignVhf']!=='undefined') {
                        this.vInfo.callsign= v['communication']['callsignVhf'];
                    }
                }
                if(typeof v['navigation']!=='undefined') {
                    if(typeof v['navigation']['destination']!=='undefined') {
                        if(typeof v['navigation']['destination']['commonName']!=='undefined') {
                            this.vInfo.destination= v['navigation']['destination']['commonName']['value'];
                        }
                        if(typeof v['navigation']['destination']['eta']!=='undefined') {
                            this.vInfo.eta= new Date(v['navigation']['destination']['eta']['value']).toUTCString();
                        }
                    }
                    if(typeof v['navigation']['state']!=='undefined'
                            && typeof v['navigation']['state']['value']!=='undefined') {
                        this.vInfo.state= v['navigation']['state']['value'];
                    }
                }
                if(typeof v['design']!=='undefined') {
                    if(typeof v['design']['length']!=='undefined'
                            && v['design']['length']['value']['overall']) {
                        this.vInfo.length= v['design']['length']['value']['overall'];
                    }
                    if(typeof v['design']['beam']!=='undefined') {
                        this.vInfo.beam= v['design']['beam']['value'];
                    }
                    if(typeof v['design']['draft']!=='undefined'
                            && v['design']['draft']['value']) {
                        if(typeof v['design']['draft']['value']['maximum']!=='undefined') {
                            this.vInfo.draft= `${v['design']['draft']['value']['maximum']} (max)`;
                        }
                        else if(typeof v['design']['draft']['value']['current']!=='undefined') {
                            this.vInfo.draft= `${v['design']['draft']['value']['current']} (current)`;
                        }
                    }
                    if(typeof v['design']['airHeight']!=='undefined') {
                        this.vInfo.height= v['design']['airHeight']['value'];
                    }
                    if(typeof v['design']['aisShipType']!=='undefined') {
                        this.vInfo.shipType= v['design']['aisShipType']['value']['name'];
                    }
                }

            }
        )
    }

}

/********* AtoNPropertiesModal **********
	data: {
        title: "<string>" title text,
        target: "<SKAtoN>" aid to navigation
    }
***********************************/
@Component({
	selector: 'ap-aton-modal',
	template: `

            <mat-toolbar>

                    <mat-icon color="primary"> {{data.icon}}</mat-icon>

                    {{data.title}}

                    <button mat-icon-button (click)="modalRef.dismiss()"
                        matTooltip="Close" matTooltipPosition="below">
                        <mat-icon>keyboard_arrow_down</mat-icon>
                    </button>

            </mat-toolbar>

            <mat-card>

Name:

{{data.target.name}}

MMSI:

{{data.target.mmsi}}

Type:

{{data.target.type.name}}

                    <signalk-details-list [details]=" data.target.properties"></signalk-details-list>

            </mat-card>

    `,
    styles: [`  ._ap-aton {
                    font-family: arial;
                    min-width: 300px;
                }
                ._ap-aton .key-label {
                    width:150px;
                    font-weight:bold;
                }
			`]
})
export class AtoNPropertiesModal implements OnInit {

    public target: any;

    constructor(
        public modalRef: MatBottomSheetRef<AtoNPropertiesModal>,
        @Inject(MAT_BOTTOM_SHEET_DATA) public data: any) {
    }

    ngOnInit() {
        this.target= this.data.target;
    }

}

/********* AircraftPropertiesModal **********
	data: {
        title: "<string>" title text,
        target: "<SKAircraft>" aid to navigation
    }
***********************************/
@Component({
	selector: 'ap-aircraft-modal',
	template: `

            <mat-toolbar>

                    <mat-icon color="primary"> airplanemode_active</mat-icon>

                    {{data.title}}

                    <button mat-icon-button (click)="modalRef.dismiss()"
                        matTooltip="Close" matTooltipPosition="below">
                        <mat-icon>keyboard_arrow_down</mat-icon>
                    </button>

            </mat-toolbar>

            <mat-card>

Name:

{{data.target.name}}

MMSI:

{{data.target.mmsi}}

Call sign:

{{data.target.callsign}}

                    <signalk-details-list [details]=" data.target.properties"></signalk-details-list>

            </mat-card>

    `,
    styles: [`  ._ap-aircraft {
                    font-family: arial;
                    min-width: 300px;
                }
                ._ap-aircraft .key-label {
                    width:150px;
                    font-weight:bold;
                }
			`]
})
export class AircraftPropertiesModal implements OnInit {

    public target: any;

    constructor(
        public modalRef: MatBottomSheetRef<AircraftPropertiesModal>,
        @Inject(MAT_BOTTOM_SHEET_DATA) public data: any) {
    }

    ngOnInit() {
        this.target= this.data.target;
    }

}

/********* ActiveResourcePropertiesModal **********
	data: {
        title: "<string>" title text,
        type: 'dest' | 'route' resource type,
        resource: "<SKWaypoint | SKRoute>" active resource info
        skres: pointer to SKResources service
    }
***********************************/
@Component({
	selector: 'ap-dest-modal',
	template: `

                <mat-toolbar>

                        <button mat-button color="primary" *ngIf="showClearButton"
                            (click)="deactivate()"
                            [matTooltip]="clearButtonText">
                            <mat-icon>clear_all</mat-icon>
                            Clear
                        </button>

                        {{data.title}}

                        <button mat-icon-button (click)="close()"
                            matTooltip="Close" matTooltipPosition="below">
                            <mat-icon>keyboard_arrow_down</mat-icon>
                        </button>

                </mat-toolbar>

                    <mat-card *ngFor="let pt of points; let i=index;" cdkDrag>

1 && selIndex!=-1) ? 'pointer': 'initial'">

                                <mat-icon color="warn" *ngIf="selIndex==i && !orderChanged">
                                    flag
                                </mat-icon>

Lat:

Lon:

                                <div style="display:flex;" *ngIf="i<pointNames.length">

Name:

                                <mat-icon *ngIf="data.type=='route'">drag_indicator</mat-icon>

                    </mat-card>

    `,
    styles: [`  ._ap-dest {
                    font-family: arial;
                    min-width: 300px;
                }
                ._ap-dest .key-label {
                    width:50px;
                    font-weight:bold;
                }
                ._ap-dest .selected {
                    background-color: silver;
                }
                .point-drop-placeholder {
                    background: #ccc;
                    border: dotted 3px #999;
                    min-height: 90px;
                    transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
                }
                .cdk-drag-preview {
                    box-sizing: border-box;
                    border-radius: 4px;
                    box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),
                                0 8px 10px 1px rgba(0, 0, 0, 0.14),
                                0 3px 14px 2px rgba(0, 0, 0, 0.12);
                }
			`]
})
export class ActiveResourcePropertiesModal implements OnInit {

    public points: Array<Position>= [];
    public pointNames: Array<string>= [];
    public selIndex: number=- 1;
    public orderChanged: boolean= false;
    public clearButtonText: string= 'Clear Route';

    public showClearButton: boolean= false;

    constructor(
        public app: AppInfo,
        public modalRef: MatBottomSheetRef<ActiveResourcePropertiesModal>,
        @Inject(MAT_BOTTOM_SHEET_DATA) public data: any) {
    }

    ngOnInit() {
        if(this.data.resource[1].feature && this.data.resource[1].feature.geometry.coordinates) {
            if(this.app.data.navData.position) {
                this.showClearButton= true;
            }
            if(this.data.type=='route'){
                this.points= this.data.resource[1].feature.geometry.coordinates;
                this.data.title= (this.data.resource[1].name) ? `
                    ${this.data.resource[1].name} Points` : 'Route Points';
                if(this.data.resource[0]==this.app.data.activeRoute) {
                    this.selIndex= this.app.data.navData.pointIndex;
                }
                if(this.data.resource[1].feature.properties.points &&
                        this.data.resource[1].feature.properties.points.names &&
                        Array.isArray(this.data.resource[1].feature.properties.points.names)) {
                    this.pointNames= this.data.resource[1].feature.properties.points.names;
                }
            }
            else {
                if(this.app.data.activeRoute) {
                    let rte= this.app.data.routes.filter(i=> {
                        return (i[0]==this.app.data.activeRoute) ? true : false;
                    })[0];
                    if(rte.length!=0) {
                        this.points= rte[1].feature.geometry.coordinates;
                        this.data.title= (rte[1].name) ? `${rte[1].name} Points` : 'Active Route Points';
                        this.selIndex= this.app.data.navData.pointIndex;
                    }
                }
                else {
                    this.data.title= (this.data.title) ? this.data.title : 'Destination';
                    this.points= [this.data.resource[1].feature.geometry.coordinates];
                    this.clearButtonText= 'Clear Destination';
                }
            }
        }
    }

    selectPoint(idx:number) {
        if(this.points.length<2 || this.selIndex<0 || this.orderChanged) { return }
        let nextPoint= {
            latitude: this.points[idx][1],
            longitude: this.points[idx][0],
        }
        this.selIndex= idx;
        if(this.data.skres) { this.data.skres.setNextPoint(nextPoint) }
    }

    drop(e:CdkDragDrop<any>) {
        if(this.data.type=='route') {
            moveItemInArray(this.points, e.previousIndex, e.currentIndex);
            this.orderChanged= true;
        }
    }

    close() {
        if(this.orderChanged) {
            this.app.showConfirm(
                'Route points have been changed.\n\nSave changes to server?',
                'Route Changed'
            ).subscribe( r=> {
                if(r && this.data.skres) {
                    this.data.skres.updateRouteCoords(this.data.resource[0], this.points);
                }
            })
        }
        this.modalRef.dismiss();
    }

    // ** deactivate route / clear destination
    deactivate() { this.modalRef.dismiss(true) }

}

/********* ChartInfoDialog **********
	data: {
        chart: "<SKChart>"
    }
***********************************/
@Component({
	selector: 'ap-chartproperties',
	template: `

                    <mat-icon color="primary">{{isLocal(data.tilemapUrl)}}</mat-icon>

                    Chart Properties

                    <button mat-icon-button (click)="dialogRef.close()"
                        matTooltip="Close" matTooltipPosition="below">
                        <mat-icon>close</mat-icon>
                    </button>

            <mat-card>

Name:

{{data.name}}

Description:

{{data.description}}

Scale:

{{data.scale}}

Zoom:

                                Min:
                                {{data.minZoom}},
                                Max:
                                {{data.maxZoom}}

Bounds:

Region:

{{data.region}}

Format:

{{data.chartFormat}}

Type:

{{data.type}}

Layers:

{{data.chartLayers}}

URL:

{{data.tilemapUrl}}

            </mat-card>

    `,
    styles: [`  ._ap-chartinfo {
                    font-family: arial;
                    min-width: 300px;
                }
                .ap-confirm-icon {
                    min-width: 35px;
                    max-width: 35px;
                    color: darkorange;
                    text-align: left;
                }
                .ap-confirm-icon .mat-icon {
                    font-size: 25pt;
                }

                ._ap-chartinfo .key-label {
                    width:150px;
                    font-weight:500;
                }

                @media only screen
                    and (min-device-width : 768px)
                    and (max-device-width : 1024px),
                    only screen	and (min-width : 800px) {
                    .ap-confirm-icon {
                        min-width: 25%;
                        max-width: 25%;
                    }
                    .ap-confirm-icon .mat-icon {
                        font-size: 40pt;
                    }
                }
			`]
})
export class ChartInfoDialog implements OnInit {
	public icon:string;

    constructor(
        public app:AppInfo,
        public dialogRef: MatDialogRef<ChartInfoDialog>,
        @Inject(MAT_DIALOG_DATA) public data: any) {
	}

	//** lifecycle: events **
    ngOnInit(){ }

    isLocal(url:string) { return (url && url.indexOf('signalk')!=-1) ? 'map' : 'language' }
}

/********* TracksModal **********
	data: {
        title: "<string>" title text
        skres: SKTrack
    }
***********************************/
@Component({
	selector: 'ap-tracks-modal',
	template: `

            <mat-toolbar>

                    <button mat-icon-button
                        [disabled]="app.config.selections.tracks.length==0"
                        matTooltip="Clear selections" matTooltipPosition="right"
                        (click)="clearSelections()">
                        <mat-icon>check_box_outline_blank</mat-icon>
                    </button>

                    <button mat-icon-button
                        matTooltip="Fetch track entries" matTooltipPosition="right"
                        (click)="getTracks()">
                        <mat-icon color="primary">refresh</mat-icon>
                    </button>

                    {{data.title}}

                    <button mat-icon-button (click)="closeModal()"
                        matTooltip="Close" matTooltipPosition="left">
                        <mat-icon>keyboard_arrow_down</mat-icon>
                    </button>

            </mat-toolbar>

            <mat-card *ngFor="let trk of trackList; let idx= index">

                        <mat-checkbox color="primary"
                            [checked]="selTrk[idx]"
                            (change)="handleCheck($event.checked, trk[0], idx)"
                        ></mat-checkbox>

                            {{trk[1].feature?.properties?.name}}

                            {{trk[1].feature?.properties?.description}}

                        <button mat-icon-button color="warn"
                            matTooltip="Delete Track"
                            matTooltipPosition="left"
                            (click)="handleDelete(trk[0], idx)">
                            <mat-icon>delete</mat-icon>
                        </button>

            </mat-card>

    `,
    styles: [`  ._ap-tracks {
                    font-family: arial;
                    min-width: 300px;
                }
                ._ap-tracks .key-label {
                    font-weight: 500;
                }
                ._ap-tracks .key-desc {
                    font-style: italic;
                }
			`]
})
export class TracksModal implements OnInit {

    public trackList:any;
    public selTrk= [];

    constructor(
        public app: AppInfo,
        private cdr: ChangeDetectorRef,
        private sk: SignalKClient,
        public modalRef: MatBottomSheetRef<TracksModal>,
        @Inject(MAT_BOTTOM_SHEET_DATA) public data: any) {
    }

    ngOnInit() {
        if(this.data.title==='undefined') { this.data['title']= 'Tracks' }
        this.getTracks();
    }

    closeModal() { this.modalRef.dismiss() }

    getTracks() {
        this.sk.api.get('resources/tracks').subscribe(
            (trks:any)=> {
                this.trackList= Object.entries(trks).map( trk=> {
                    trk[1]['feature']['id']= trk[0].toString();
                    delete(trk[1]['$source']);
                    delete(trk[1]['timestamp']);
                    return trk;
                });
                this.selTrk= [];
                for(let i=0;i<this.trackList.length;i++) {
                    this.selTrk.push(
                        (this.app.config.selections.tracks.includes(this.trackList[i][0])) ?
                        true : false
                    );
                }
                this.cdr.detectChanges();
            },
            ()=> {
                this.trackList= [];
                this.selTrk= [];
                this.cdr.detectChanges();
            }
        );
    }

    handleDelete(id:string, idx:number) {
        if(!this.data.skres) { return }
        this.trackList= this.trackList.filter( t=> {
            return (t[0]==id) ? false : true;
        });
        this.data.skres.showTrackDelete(id).subscribe( ok=> {
            if(ok) {
                let i= this.app.config.selections.tracks.indexOf(id);
                if(i!=-1) { this.app.config.selections.tracks.splice(i,1) }
                this.data.skres.deleteTrack(id);
                setTimeout(this.getTracks.bind(this), 2000);
                this.app.saveConfig();
            }
            else { this.getTracks() }
        });

    }

    handleCheck(checked:boolean, id:string, idx:number) {
        this.selTrk[idx]=checked;
        if(checked) {
            this.app.config.selections.tracks.push(id);
        }
        else {
            let i= this.app.config.selections.tracks.indexOf(id);
            if(i!=-1) { this.app.config.selections.tracks.splice(i,1) }
        }
        this.app.saveConfig();
        this.updateTracks();
    }

    clearSelections() {
        this.selTrk= [];
        for(let i=0;i<this.trackList.length;i++) {
            this.selTrk[i]= false;
        }
        this.app.config.selections.tracks= [];
        this.app.saveConfig();
        this.updateTracks();
    }

    updateTracks() {
        this.app.data.tracks= this.trackList.map( trk=> {
            return trk[1];
        }).filter( t=> {
            return (this.app.config.selections.tracks.includes(t.feature.id) ) ?
                true : false;
        });
        if(this.data.skres) { this.data.skres.trackSelected() }
    }
}

/********* ResourceSetModal **********
	data: {
        path: "<string>" resource path
        skres: SKResource
    }
***********************************/
@Component({
	selector: 'ap-resourceset-modal',
	template: `

            <mat-toolbar>

                    <button mat-icon-button
                        [disabled]="app.config.selections.resourceSets[data.path].length==0"
                        matTooltip="Clear selections" matTooltipPosition="right"
                        (click)="clearSelections()">
                        <mat-icon>check_box_outline_blank</mat-icon>
                    </button>

                    <button mat-icon-button
                        matTooltip="Fetch resource entries" matTooltipPosition="right"
                        (click)="getItems()">
                        <mat-icon color="primary">refresh</mat-icon>
                    </button>

                    {{title}}

                    <button mat-icon-button (click)="closeModal()"
                        matTooltip="Close" matTooltipPosition="left">
                        <mat-icon>keyboard_arrow_down</mat-icon>
                    </button>

            </mat-toolbar>

            <mat-card *ngFor="let res of resList; let idx= index">

                        <mat-checkbox color="primary"
                            [checked]="selRes[idx]"
                            (change)="handleCheck($event.checked, res.id, idx)"
                        ></mat-checkbox>

                            {{res.name}}

                            {{res.description}}

            </mat-card>

    `,
    styles: [`  ._ap-resource-set {
                    font-family: arial;
                    min-width: 300px;
                }
                ._ap-resource-set  .key-label {
                    font-weight: 500;
                }
                ._ap-resource-set  .key-desc {
                    font-style: italic;
                }
			`]
})
export class ResourceSetModal implements OnInit {

    public resList:any;
    public selRes= [];
    public title= 'Resources: ';

    constructor(
        public app: AppInfo,
        private cdr: ChangeDetectorRef,
        private sk: SignalKClient,
        public modalRef: MatBottomSheetRef<ResourceSetModal>,
        @Inject(MAT_BOTTOM_SHEET_DATA) public data: any) {
    }

    ngOnInit() {
        if(this.data.path!=='undefined') { this.title+= this.data.path }
        this.getItems();
    }

    closeModal() { this.modalRef.dismiss() }

    getItems() {
        this.sk.api.get(`resources/${this.data.path}`).subscribe(
            (resSet:any)=> {
                this.resList= this.data.skres.processItems(resSet);
                this.selRes= [];
                for(let i=0;i<this.resList.length;i++) {
                    this.selRes.push(
                        (this.app.config.selections.resourceSets[this.data.path].includes(this.resList[i].id)) ?
                        true : false
                    );
                }
                this.cdr.detectChanges();
            },
            ()=> {
                this.resList= [];
                this.selRes= [];
                this.cdr.detectChanges();
            }
        );
    }

    handleCheck(checked:boolean, id:string, idx:number) {
        this.selRes[idx]=checked;
        if(checked) {
            this.app.config.selections.resourceSets[this.data.path].push(id);
        }
        else {
            let i= this.app.config.selections.resourceSets[this.data.path].indexOf(id);
            if(i!=-1) { this.app.config.selections.resourceSets[this.data.path].splice(i,1) }
        }
        this.app.saveConfig();
        this.updateItems();
        this.data.skres.resourceSelected();
    }

    clearSelections() {
        this.selRes= [];
        for(let i=0;i<this.resList.length;i++) {
            this.selRes[i]= false;
        }
        this.app.config.selections.resourceSets[this.data.path]= [];
        this.app.saveConfig();
        this.updateItems();
        this.data.skres.resourceSelected();
    }

    updateItems() {
        this.app.data.resourceSets[this.data.path]= this.resList.filter( t=> {
            return (this.app.config.selections.resourceSets[this.data.path].includes(t.id) ) ?
                true : false;
        });
    }
}

redpajama_set_name: RedPajamaGithub


text:
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User

from kitsune.sumo.urlresolvers import reverse

def _activate_users(admin, request, qs):
    num = qs.update(is_active=True)
    msg = "%s users activated." % num if num != 1 else "One user activated."
    admin.message_user(request, msg)

_activate_users.short_description = "Activate selected users"

def _deactivate_users(admin, request, qs):
    num = qs.update(is_active=False)
    msg = "%s users deactivated." % num if num != 1 else "One user deactivated."
    admin.message_user(request, msg)

_deactivate_users.short_description = "Deactivate selected users"

def patch_user_admin():
    """Prevent User objects from being deleted, even by superusers."""
    if not getattr(UserAdmin, "_monkeyed", False):
        UserAdmin._monkeyed = True
        UserAdmin.actions = [_activate_users, _deactivate_users]

def patch_user_model():
    """Add a more accurate User.get_absolute_url."""

    def get_absolute_url(self):
        return reverse("users.profile", args=[self.pk])

    User.get_absolute_url = get_absolute_url

def patch_all():
    patch_user_admin()
    patch_user_model()


text:
Cross-Border Taxes
Tax Amnesty Guidelines
Tax Amnesty Guidelines for Non-Resident US Citizens
Non-resident U.S. taxpayers who have resided outside of the U.S. since January 1, 2009 and who have not filed a U.S. tax return during the same period must present a low level of compliance risk.
What is low level of compliance risk?
Generally, a 'low risk' return will consist of a simple tax return with no taxes owing (or less than $1,500). However, IRS will determine if a tax return presents a low compliance risk.
What will happen?
If a tax return is determined to be 'low risk', the review will be expedited and the IRS will not assert penalties or pursue follow-up actions.
Taxpayers utilizing this procedure will be required to file delinquent tax return for the past three years (reduced from six years) and to file delinquent FBARs for the past six years. Payment for the tax and interest, if applicable, must be remitted along with delinquent tax returns.
What is an FBAR?
Foreign Bank Account Reporting (FBAR) is a form required by the IRS from U.S. citizens who own or have signing authority over a foreign financial account, including a bank account, brokerage account, mutual fund, unit trust, or other types of financial accounts.
"I have used Jonathan and his staff for many years for my own personal tax-planning work and have been continually impressed by their timeliness, professionalism and results-oriented commitment to meeting client's needs. I have also referred to Jonathan numerous US-based corporate clients looking for assistance in complying with Canada's tax and filing obligations and they have been uniformly laudatory in their comments about his work."
~Partner, 450 lawyers~
We serve clients in Toronto/GTA including Pickering, Scarborough, Vaughan, Hamilton, Mississauga, Brampton, Newmarket, Markham, Ajax, Whitby & Oshawa as well as other Canadian cities including Calgary, Vancouver, Sarnia, Montreal & in the USA including California, Florida, Washington & Colorado.
Jonathan Ruben Professional Corp.
Chartered Professional Accountant
Certified Financial Planner
56 Shaftesbury Avenue
Toronto ON M4T 1A3
Call: 416.487.3000 x225
Visit Our Parent Site
Webcraft & Hosting By
Website Design, Maintenance & Hosting By Thistle Site Design/Joomla!® Specialists

redpajama_set_name: RedPajamaCommonCrawl


The lawn service guys didn't show up today ....... again.
It takes too long recovering from a day of shoveling.
What size ? What HP ? What brand ?
Driveway is 350' long, 11' wide.
Why not put a plow on what looked like a Hummer sitting in your garage?
Can those things be used in the snow ?
What ever you choose.......nothin worse than suckin up the Sunday newspaper!!
Just spent 45min removing it from the 2nd stage.
If you shoveled that driveway today you just got a heck of a workout. I do like the cart idea.
I would be very surprise if you could get a plow for that Ranger. Then I'd build a make-shift enclosure for it, doors and all.
I picked up a "Simplicity", 9.5 HP with a 24" cut.
an 11 HP/30" which was way too much for what I need.
involves sitting and not walking.
Just pony up the dough for a Bobcat. Plow the neighborhood and have fun doing it.
I was kinda joking about the Polaris, $10k for a snow plow is a little much. Then I would feel obligated to start doing yard work, which is out of the question.
Well, Husky makes some fine equipment and the price on this one is good.
Good luck in whatever you decide to purchase.
strikerthree - I got a recommendation from someone else on the Ariens. Made in the USA. I notice they have a French model. I'm guessing it's equipped with a white flag if the snow gets over 18"
Gotta be a 24" two stage. I got mine at Home Depot 3 years ago, and it's been excellent ever since. In the spring I siphon all the gas out and then run it dry. Still on the original plug (new one due, I know). Be absolutely sure to buy a couple of the correct shear pins when you buy the blower, because you'll bust one on a fat twig and wlll want to fix it ASAP. You don't want to try to find one when the snow's still on the ground! Trust me on that.
Trust me, I live in Maine and we get plenty of snow and no way is a 24" clearing width gonna cut it on a 350' driveway. You will be out there for hours. I have an 8HP 2 stage Toro with a 24" width and it absolutely struggles sometimes, especially when we get wetter snow. If the snow is deep enough a lot times you can't even use the whole cutting width, you have to take less off at each pass or the chute is more likely to clog which is a major PIA. My driveway is 140' long and as soon as this winter is over I am getting something bigger. Hopefully a snowblower attachment for my JD tractor. You wouldn't want an underpowered outboard, don't buy a wimpy snowblower. If you don't have a pickup you can put a plow on and you insist on a snowblower, buy the biggest, baddest machine you can get your hands on. Otherwise, save yourself some aggravation and pay the plow guy. Some of the brands mentioned are good, Simplicity, Gravely, Honda, Ariens, etc.
5hp Yardman, 20 years old, first shear pin still. Absolute trooper, has swallowed a phonebook, newspaper, and a squirrel (long story) Still runs great and fires right up! I bought it back at lechmere, when they were still in business, it doesnt owe me a dime, awesome machine.
For the budget minded who need to exercise too!
What's a snowblower and where do you mount it???


Our cozy Sparrow rug in thick loops feels heavenly underfoot and sets the tone for any room in our bold pattern and neutral undyed wool palette. Chunky hand-woven loop rug.
We partnered with legendary family-run Indian weaving studio V-Weave, founded in 1951, and worked closely with their team to interpret our paintings into hand-dyed and hand-woven rugs.
Wool weave, wool warp. Light shedding is common as the rug wears; vacuum on low setting.
Please email hello@blockshoptextiles.com for availability of 9x12 rugs, or for international shipping on 4x6 or 6x9 rugs.


text:
Hamilton native takes helm at Bitterroot Forest West Fork District
editor's pick alert
Hamilton native Dan Pliley was recently named the Bitterroot National Forest's West Fork District Ranger.
One month after he graduated from Hamilton High School more than a quarter-century ago, Dan Pliley raised his right hand and became a member of the U.S. Army.
At the time, he planned to serve three years and then return to his native state.
But his plans changed as opportunities arose. And for 24 years, Pliley served his country both as an enlisted soldier and then as an officer in the military police.
During those years, he worked with a hand-picked team to help rectify the situation at Iraq's Abu Ghraib prison, served as a platoon leader at Guantanamo Bay detention camp, was a company commander for a criminal investigative unit in Afghanistan, taught tactics at Valley Forge Military College and ended his military career as an executive officer at the Department of Defense's only maximum-security detention site at Fort Leavenworth, Kansas.
Through all those years and experiences, both Pliley and his wife, Trisha, hoped someday to return to their roots.
In late October, that hope became a reality when Pliley officially became the Bitterroot National Forest's West Fork Ranger. He replaces Seth Carbonari, who recently accepted a new position with the Kootenai National Forest in Eureka.
While he's not certain whether his family goes back four or five generations in the Bitterroot, Pliley said it's been a great homecoming for the couple who still have a large family living in the valley.
"The Bitterroot Valley has always been a special place for us," Pliley said. "I grew up camping and hunting around the valley. It's home to my wife and me."
Pliley served in the Army for 10 years enlisted and 14 years as an officer. He holds bachelor's degrees in biology and environmental science and a master's degree in business and organizational security management. He is also an avid sportsman who enjoys hunting, fishing, camping, skiing, rebuilding motorcycles, and spending time outdoors with his family.
Following his Army career, Pliley worked a two-year stint as the team leader on the Forest Service's Northern Regional NEPA Strike Team, which served three national forests in eastern Montana and the Dakotas.
That job provided him with experience and a foundation for working within the sideboards required of many projects on national forest lands. That position and the years of leadership skills he honed with the Army have prepared him to take on the Darby ranger post, he said.
"I wanted to gain experience and figure out how the Forest Service works," he said. "That position gave me a great foundation by working directly with rangers and forest supervisors. I knew that my next job would likely be a district ranger."
The opportunity to move back to the Bitterroot was a dream come true.
"I have inherited an excellent staff here with a ton of knowledge and expertise on this district and across the forest," Pliley said. "If I learned anything in the Army, it was to surround yourself with smart people in order to be successful. I've joined a district that has a lot going on and has the right people in the right places."
"I equate it to military command time, where you have your different staff," he said. "You may not be an expert in all of them but they know how to do their jobs. They just need empowerment and resourcing to get those jobs done. I'm excited to be on this team and help them complete their mission."
The district is seeing a growing interest from the public wanting to find new places to recreate, Pliley said. Funding through the Great American Outdoors Act will provide opportunities for the district to address a variety of deferred maintenance projects.
Another priority is addressing the reduction of hazardous fuels, especially in the wildland/urban interface, he said.
Pliley is also working to reach out to the community to learn firsthand about their concerns and needs.
Bitterroot National Forest Supervisor Matt Anderson is happy to have Pliley on board.
"We selected Dan to be the next West Fork District Ranger because he has demonstrated the type of leadership skills needed to continue the great work happening up the West Fork," Anderson said. "I'm thrilled for Dan to be able to come back to the Bitterroot to manage a landscape that is very near and dear to his heart. I encourage our neighbors and partners to reach out to Dan and discuss the challenges and opportunities of managing the incredible resources on the West Fork District."
Dan and Trisha have two adult children who attend school and work in the Kansas City area.
Their family also includes Kona, their chocolate lab.
West Fork District Ranger
Bitterroot National Forest
West Fork
District Ranger
Forever preserved: Yoder family decision keeps agricultural land intact
When Jake Yoder walks over the 150 acres on Illinois Bench that his family recently placed under a conservation easement, he can't help but remember his father's advice.
Elk harvest down in Bitterroot, no general hunting extension planned
With one weekend left in Montana's general hunting season, the elk harvest is trailing the five-year average at the Darby check station and in the region.
Christmas angels: Hamilton's Massa Home Center hosts Angel Tree for 10th year
For the Ravalli Head Start families served by the program that matches generous community members with children in need, the Angel Tree is a godsend for their Christmas season.
Family asks for help finding dog following fatal crash on Chief Joseph Pass
A 69-year-old Wyoming woman died Sunday in a single-vehicle crash on Highway 43 about 8 miles from the top of Chief Joseph Pass.
Rocky Mountain Laboratories to begin work on $93M animal facility
Trucks will start rolling through Hamilton next week as excavation begins on a new $93 million animal facility at Rocky Mountain Laboratories.
Fall burning season closes
The fall burning season closed Tuesday, Nov. 30.
Ravalli County adds 44 COVID deaths to official count
The number of reported COVID-19 related deaths in Ravalli County increased by 44 this week following a vetting and reconciliation process completed by the county's public health department.
Changing of the guard: Longtime Historic St. Mary's Mission director to retire
On the last day of December, Colleen Meyer will pass the executive director baton to Dora Bradt.
COVID: HOSPITALIZATIONS AT ALL TIME HIGH


Delta state Governor, Sen. Ifeanyi Okowa has condoled with the Speaker of the state House of Assembly, Sheriff Oborevwori and the entire Oborevwori family of Osubi in Okpe Local Government Area of Delta state over the demise of their uncle and father Pa. Johnson Oborevwori.
He commended the late Pa. Oborevwori's commitment to the peace, stability and development of not only his community, but also the entire Urhobo nation, describing his death as a great loss not only to the family but the state in general, given his invaluable contributions to the cause of humanity.
According to the statement, the deceased was a dedicated businessman, a devout Christian whose support and contributions to his family in no small way impacted positively on speaker's illustrious political career, culminating in his election as speaker of the 6th assembly.
"The late Pa. Johnson Oborevwori was a quintessential father, devout Christian who devoted his lifetime to the service of God and humanity. On behalf of the government and people of Delta state, I commiserate with Mr. Speaker, Sheriff Oborevwori over the painful loss of his beloved uncle, Pa. Johnson Oborevwori.
"Our thoughts and prayers are with his family, the entire Osubi community and the people of Okpe Kingdom on the irreparable loss of this selfless and patriotic businessman," the governor added.
He called on the bereaved family to uphold the cherished ideals of community service, kindness and generosity associated with the late Pa. Oborevwori and prayed the Almighty God to grant repose to his soul and give the family the fortitude to bear the irreparable loss.


(Dissection Lab) Inhale. Exhale. The life-sustaining process of breathing is vital to the maintenance of all organs in the body. Embark on a voyage with Dr. Callentine, your tour guide, through the lungs. In this interactive hands-on lab, you will observe a lung dissection and see live demonstrations on lung functions.


Develop a love for the dance when you attend the classes of West London Dance Academy. We follow a world-renowned IDTA dance syllabus, which provides a thorough and developmental curriculum that has supported the training of many dance professionals.
- Classes held in Ealing, all day Saturday at All Saints Church Hall, Elm Grove Road, London, W5 3JH.
We offer free trial lessons for students who want to find out which class suits their preferences before enrolling in the academy. There are also examinations in Ballet Tap and Modern Jazz for Grades and Professional Vocational sessions two to three times a year. This enables all pupils to progress quickly. We have a history of 100% pass rate with all pupils achieving Merits or Distinctions .
Our academy provides Intensive Professional Teacher Training for dance students within and outside of the Academy. If you want to become a dance teacher in the future, this programme can help you. We offer Pre Associate and Level 4 diploma courses in Ballet, Tap and Modern Jazz . Every course is designed to help you qualify quickly but successfully around your busy training, teaching , studying or work schedule. For more information about our 3 courses on offer contact Head Office and you will be directed to the principal for a general discussion on the best course for you. You will need to pass a short interview, class participation and application in order to be eligible to attend one of our courses.
To showcase the talent of our students, we organize at least one production every 18 months in a large venue. We always encourage students to take part in the dance production. In 2017, we performed the beloved ballet, "The Nutcracker" at the Chiswick Town Hall and received a standing ovation from the audience . Our next production this March 2019 will be "Alice In The Greatest Wonderland"at Hounslow Arts Centre . Tickets have almost sold out already !!
Please view our amazing pictures on the WLDA Nutcracker page.


text:
NIS / Library
ARRB Impact
Global accolade for ARRB young scientist
by Australian Road Research Board on September 24, 2018
Only a handful of young scientists worldwide are chosen to attend a prestigious annual summit in Singapore.
In January 2019, ARRB's Mitchell Cunningham will be among them.
Mitch, a Senior Professional Scientist, Safe Systems and Human Factors at ARRB - your National Transport Research Organisation - has been nominated by the University of Sydney to attend the 2019 Global Young Scientists Summit.
The summit in Singapore is a gathering of young researchers worldwide for a chance to interact with eminent scientists and technology leaders. It was started in 2013 with the objective of exciting and engaging young scientists to pursue their scientific dreams through close interactions with distinguished scientists and researchers and peers. The Summit provides a platform for conversations about science and research, technology innovation and society, and solutions to global challenges.
Image courtesy: GYSS 2018
The theme for this year's Summit is "Advancing Science, Creating Technologies for a Better World". During the Summit, promising young scientists will exchange ideas and knowledge with the speakers and their peers over five days under this theme.
In close collaboration with Dr Mike Regan, the former Chief Scientist, Safe Systems and Human Factors at ARRB, Mitch prepared a successful application based on the Automated Vehicle (AV) work they have done together, which embodies the theme perfectly.
This is a prestigious and highly competitive event, at which only a chosen few international nominees are sponsored to be able to meet and be mentored by Nobel Laureates and other eminent world researchers, scientists and technologists.
"It's great to see that researchers on a global level are seeing and recognising the importance of work in the Human Factors and AV space that I've been lucky enough to undertake under Dr Mike Regan's mentorship. I'm tremendously grateful for his invaluable guidance in helping me prepare a strong and successful application." Mitch said.
For more information on this year's summit, you can click here.
Topics: ARRB News
ARRB News (178)
Australian Road Research Board (117)
Road and Transport Research (94)
ARRB (72)
Road Infrastructure (57)
Road Safety (57)
Pavement (47)
Asphalt (40)
Bitumen (39)
Transport Data (36)
Future Transport (31)
Connected and Automated Vehicles (24)
Intelligent Transport Systems (24)
Recycled Pavement (24)
Driverless (20)
Road design (20)
Heavy Vehicles (15)
Autonomous (14)
Platooning (5)
Unsealed Roads (4)
Best Practice Guides (3)
Driver Distraction (3)
NRSPP (2)
NACOE (1)
NZ (1)
ARRB's Vision


These came nicely packaged and in great shape. They are truly real human hair, nothing added. I have thin hair so it works for me best with just one pack. But if you have medium or thick hair, you will need 2+ packs. But at this price, it is worth it.
looks more natural than clip ins.


Steven Spielberg has given the green light for the Jurassic Park 3D conversion re-release. Before you go on and think "first the Toy Story films, then Lion King, then Titanic and now this? What other old school film are they going to ruin?" Spielberg supposedly has good reason to do it (and of course there's the money. Okay, it might just be the money).
Since Avatar, 3D hasn't really been done right. It wasn't done completely right with Avatar. Usually, the story takes a back seat to the 3D gimmick, but there are films out there that have utilized 3D well, like Martin Scorsese's Hugo. Spielgberg has never been one to want to digitally alter his films, but he gave in with Jurassic Park. There's something magical about re-watching older films on the big screen again, it's almost like time travel. Yeah, the 3D may get in the way, but it's better than not having the opportunity to watch a film you loved on the big screen once again.
However, there will be a small portion of theaters that will play the film in regular 2D. How awesome is that? Jurassic Park just the way you remembered it in 1993.
The film will hit theaters July 19, 2013.


New Brighton is a community of 22,328 people. It is ideally located equidistant from the downtowns of Minneapolis and St. Paul, a 30 minute ride from the Twin Cities International Airport. It is located in Ramsey County at the intersection of interstates 35W and 694, providing easy access to cities, work places, and amenities in all directions.
New Brighton is a fully developed City that prides itself on the quality of life it offers its citizens. It is served by the Mounds View School District 621 and the St. Anthony/New Brighton District 282. Community information is broadcast on New Brighton local Channel 16. Many local organizations and churches compliment the New Brighton community as well. From its award-winning schools, ample parks and lakes, to its beautiful homes, the City offers a safe and satisfying community that residents continue to give high marks.
Like its motto "the city that works for you", New Brighton is committed to its citizens, ensuring that their investment in the City will be protected and returned to them in financial and social dividends. The City strives to be the preferred place to live, work and do business.


text:
Q: How to pass on change, the value of a drop down list to a PHP variable? my question is how can I get the value of the current selected option
<select id="termid" class="selectfield">
    <option>Επιλέξτε</option>
    <option value="1">Number1</option>
    <option value="2">Number2</option>
</select>

and use it as a PHP variable in $value without submiting or updating the page?
<?php echo get_post_meta($value, "Note1", true); ?>

I made use of this to load a file but I can not do it for the above.
$(document).ready(function() {
    $('#termid').change(function() {
        var val = $(this).val();
        $('#reservationdetails').empty().addClass('loading').load('../' + val + '.php', function(){$('#reservationdetails').removeClass('loading') });
    });
});

Thank you for any help

A: You can use PHP GET method to transfer the variable to PHP. For example, in your select option, use Javascript ( I mean, when user clicks on the option, this will happen: He will be redirected to yoursite.com/sub.php?value=1 ) . now on sub.php, you can use GET Variable like this: $_GET['value'] .
<?php
if($_GET['value'] == 1){
// do this
}
else if($_GET['value'] == 2){
// do this
}
?>

if you want to save it in a variable, then do this:
$value = $_GET['value'];

A: You should get the value of the selected option:
var val = $('#termid option:selected').val();

A: So you want to assign a value to a PHP variable based on a choice the user makes on the client side?
You can't without submitting/updating in some way because PHP is handled server-side and once it hits the client, all PHP work is 100% done. Now you can either do something in Javascript that will perhaps trigger hidden form elements to become activated that will be useful in a triggered refresh (perhaps along with HTML that'll become visible to indicate the change) and/or assign the selected data to a JavaScript variable and do whatever needs to be done within JavaScript before ultimately sending the data back to PHP in some way.
But nothing can be done with the PHP once it leaves the server.

redpajama_set_name: RedPajamaStackExchange


text:
In Defense of Horror
December 27, 2015 December 27, 2015 Kalie Zamierowskiaction, Drama, evil, fantasy, Fiction, Frankl, horror, Horror Films, horror stories, Man's Search for Meaning, the Holocaust, writing
I've heard the argument that there's no need for horror movies because there's enough horror in this world already. Perhaps, but perhaps not. What is horror? Bing's search engine defines it as an intense feeling of fear, shock, or disgust. Okay, that doesn't really help. What is horror as a genre? To cheapen a genre I love, we could say that horror is fiction-stuff marketed to manufacture fear, shock, or disgust. But horror movies do this by departing from reality, by placing us in far-flung scenarios that aren't emotionally troubling – at least not in the long run – because they're so blatantly fictional. The horror we see in movies really has nothing at all to do with the horror we see in real life. There are very few witches, vampires, and monsters traipsing about North America, and while there are murderers, there aren't many methodical, superhuman, Michael Meyers-esque serial killers like the ones we see in slasher movies. People will say that we're an apathetic nation, desensitized by horror and violence. But often times, entertainment violence is grounded in pure fancy; it bears no semblance to the problematic, and often violent scenarios we find in the real world. If I were concerned with avoiding real world horror, I would be more likely to cut myself off from action movies or any movie involving any kind of war – whether it be The Force Awakens, The Hunger Games, or Saving Private Ryan.
Aside from reading and blogging about horror, I did a number of other recreational things when my holiday break began. I watched the first six Star Wars and saw The Force Awakens three times, mostly because Michael likes Star Wars and I'm a moderate fan and a supportive girlfriend, and I started exercising again, which was nice. Go for the cardio. As I stated in my last post, I started building virtual amusement parks on a game I used to play when I was 15, which has become an addiction I don't want to kick. And I started reading Victor Frankl's Man's Search for Meaning. There was only one thing I patently didn't want to do on Christmas Eve or Christmas Day. (Okay, well, maybe I didn't want to watch Star Wars, but there was one other, major thing I definitely didn't want to do on Christmas Eve or Christmas Day). I basically refused to pick up Man's Search for Meaning. I will finish it, but it was too much for a holiday. And it was too much because large parts of it epitomize what horror really means.
So-named horror books and movies, however, are another story. I contemplated reading one of the horror anthologies my sister bought me for Christmas when I went to bed on the night of the 25th. I haven't gotten around to it, but my dad and I did watch the 1960's cult classic, Black Sunday, on Christmas Night. (Blog post to come. I need to watch it again). That was nothing I couldn't handle on Christmas Night – a Satanic witch rises from her grave 200 years after her death and tries to inhabit the body of a woman who looks just like her, so she can reign supreme. I don't think the amount of horror in the real world makes this fare less palatable. If anything, such stories serve as a distraction, or maybe a sort of focal point or release mechanism, for the anxieties that the real world does provoke. I was intrigued by the film, but never emotionally unsettled, even when they nailed the mask of Satan onto the witch's face. The directing of the scene is truly excellent; the camera angle and background music escalate the tension making the scene not more realistic, but more fanciful. The scene never troubled me when I slept.
What really troubled me was Man's Search for Meaning, and I'm not done with it yet. Don't misread my intent: I'm not saying people shouldn't read books like Man's Search for Meaning. I've been meaning to read this book for quite some time now, and the philosophy Frankl espouses is (predictably) brilliant. In some ways, I guess it should be uplifting, but I find the book so very hard to read. If you've not read the book, Frankl details the time he spent at concentration camps – Auschwitz and Dachau – during the Holocaust. He depicts the starvation, the sickness, the torture by the guards. What really struck me was when he recalled being roused from a good dream to find himself in an abysmal concentration camp at the crack of dawn. Have you ever woken up from a good dream and thought, "Damn, that wasn't real?" Now imagine that happening in a concentration camp. The transition from sleep to waking would be inconceivably brutal. We need not avoid horror films because things like concentration camps have existed. Indeed, the best horror films can't begin to mimic this real life horror, and don't intend to. They are two different examples of the word horror entirely.
After the first night I started reading Man's Search for Meaning I woke up thinking about the Holocaust. I'm a "bed worrier," a less-than-creative phrase I'm making up right now for someone whose concerns amplify when then lights are off, at night. If I wake up in the middle of the night, I'm likely to turn any trivial problem into some overstated conundrum and perseverate over it until sleep overtakes me again. Life always seems darker and more sinister at night. So Man's Search for Meaning seemed especially dark and sinister. I was half-awake, half-asleep, imagining suffering, emaciated people and the sheer emptiness, dark brutality and hopelessness that would accompany such an existence. Dante's hell is less scary, but perhaps that's because it's fiction. Maybe because it was night, and maybe because everything is scarier at night, I contemplated not reading the book anymore as I squirmed in bed. It's an inspiring story of how humans can rise above circumstances, and so far Frankl has provided some beautiful quotations about love and choice. But it's so hard to read about what life was like in a concentration camp. Whenever I pick up the book – which I've done only twice now – I feel like I'm entering the darkness. I never feel this way when watching a horror film, because horror films don't mimic the horror of the real world.
After binge-watching The Walking Dead, I had a dream that I was in a zombie apocalypse. On the bright side, I found refuge in a functioning outpost of survivors. On the downside, everyone at the outpost had to take turns going on runs – fighting the zombies to get food and supplies. In my dream I felt a feeling I've never felt in real life – the darkness and dreariness that accompanies the possible onset of imminent death. I suppose one who serenely accepts his or her fate evades this feeling, but in the dream I clearly hadn't done so. It was very evident to me that I might die the next day, killing zombies, and the world seemed all the emptier and more formidable for it. I felt an emotion in sleep that I doubt I've ever felt in waking life.
Heaven forbid I have such a dream about the Holocaust. A dream, of course, would never allow me to really conceive what life was like in a concentration camp – but thank God for that. Man's Search for Meaning is far more troubling than The Walking Dead, and probably more troubling than any horror movie I've ever watched. It epitomizes the word "horror" and makes the genre-specific label for movies about monsters and haunted houses seem inadequate. Which is to say that what the genre's made of isn't really horror at all; it's the darker side of fantasy. Perhaps this is why horror author Stephen King wrote so much fantasy early in his career; the two genres overlap almost seamlessly at times.
And I don't think that we're as desensitized as a population as critics would have us think. I don't think this highly fictional, imaginative horror numbs us. It's simply that numbers and figures don't provoke much pathos for anybody. We can hear that 6 million Jews and 11 million people died in the Holocaust. We know it's awful, but numbers often don't incite strong sentiment, which is why in the documentary Paperclips a group of middle school students endeavor to collect 11 million paperclips to provide a visual representation of those deaths. Such representations drive the point home, as does literature. I think even more fanatical horror fans than myself could read Frankl's account of the Holocaust and be deeply troubled, despite having viewed a pantheon of murder movies. One cannot prepare you for the other. And, for as much horror as there is in the world, to what extent are we all really exposed to it?
I've had some difficulties in life, but starvation is horror. Unchecked plague is horror. And, of course, genocide is horror. Frankly, I think the only reason we call the horror genre "horror" is because we're often so far removed from the worst of what life has to offer. And I think it's perfectly reasonable to be deeply troubled, by the horrors of our times or times past, and still indulge in a good ghost movie, even a slasher flick. I've written in a previous post that horror, for me, puts life into perspective, and I stand by that. My woes don't seem so awful compared to some of the dreadful situations presented in horror movies. And, if we avoided any films that mirrored real-world horror, we'd have to avoid any movie with brutal death, like, as I mentioned, The Force Awakens and the entire Star Wars franchise. War, poverty, and dictatorship certainly mimic real-world horror more than Satanic witches.
And let's presume for a second – which I doubt – that horror movies do provoke the troubling sense of dread in an individual that horrific real world situations provoke. I would argue that if they did, they wouldn't be so popular; there is an extreme difference between scary and horrific. But let's say they did. Would they not provide an entertaining opportunity to help us learn to process and deal with the sometimes negative emotions induced by the real world? Could we not, on a smaller and more fictional scale, work out the problems that face us on a larger and more realistic level? Indeed, the world, as a collective entity, sometimes seems ill-equipped to process and smoothly handle the horrors that the real world provides. Maybe we need to be exposed to more outlets that provoke this emotion, so we find healthier ways to deal with fear.
But I maintain that horror movies are a mere deviation. As I've argued in previous posts, sheer evil does not exist at the heart of most horror movies, and when it does, first, it takes highly fanciful and unrealistic forms, and second, it provides ample fodder for philosophizing and contemplating evil, and even human malice, as a troubling phenomenon to be understood and grappled with. Horror movies are the fantasy film's more awkward and angsty cousin, or the black sheep of the drama family. That they're labeled "horror" films in a world that can seem, at times, horrific enough, does not detract from their merit. In fact, in art, we recreate that which we have trouble understanding in real life. Perhaps, if fictional horror does bear any semblance to the real world, it can help us start understanding human motives and the insidious underpinnings of vengefulness and atrocity. Perhaps, indeed, our struggling world has a use for the genre, after all.
← Will Hell House Scare the Hell Out of You?
From Hell House to Hill House: Some Perspective on the Original "The Haunting" (1963) →
2 thoughts on "In Defense of Horror"
Whoa, whoa, whoa…let's leave Star Wars out of this :).
A Lifelong Love Affair with Spider-Man | My Comic Relief says:
[…] now as well. The world can often be a dark, tragic place. Kalie's written beautifully on the power of the horror genre to help elevate us from the darkness around us. I can see the truth in that argument. But for me, I've always sought the light, first […]


Using a high-powered microscope, Michael Davidson at the Florida State Research Foundation used cross-polarized light microscope to refract light through alcoholic beverages on the microscopic level, then photograph it. The result is a series of colorful and shocking images.
Belgian dark ale close up, for example, looks like graffiti falling ferns.
While an English oatmeal Stout might as well be some pic you snapped in the woods.
All the images are available to view and buy here. They assure us that no touch ups or staining is involved, but hell, these images could be of anything and we'd buy it.


text:
How to Get a Title to a Motorcycle From a Bill of Sale
By: William Carpenter
In most states, a motorcycle is considered a motor vehicle and therefore falls under motor vehicle titling laws. Typically, when you purchase a motorcycle, the seller will endorse -- that is, sign -- the title certificate and hand it over to you, the buyer. You would then use the endorsed title to apply for a new title in your name from your state's motor vehicle authority. In cases where the original title is not at hand, however, many states allow the use of a bill of sale instead of an endorsed title. To get a title for a motorcycle from a bill of sale, submit the appropriate application to the motor vehicle authority in your state.
Visit the local office of your state's motor vehicle authority. Inquire about the procedure for obtaining a motorcycle title. Commonly, the procedure for motorcycles is the same as for cars and trucks. Inquire further about what is required for a valid bill of sale. Most motor vehicle authorities provide bill of sale forms that meet the titling regulations.
Before you leave the office, obtain the appropriate title application and a blank bill of sale. Alternatively, most states make these forms available online for download and printing.
Determine whether your bill of sale meets your state's titling regulations. Generally, a bill of sale must include contact information and signatures from both the buyer and the seller, identification details for the motorcycle and the sale price. In some cases, the motorcycle engine number must be included on the bill of sale. If the bill of sale that you hold does not meet the requirements in your state, you must contact the seller to remedy the deficiencies.
Complete a title application. Though applications differ from state to state, in every case you must identify the motorcycle and yourself. Commonly, one application form is used for many related purposes; indicate that you are applying for a new title in the appropriate space.
Take the completed title application and the bill of sale to your local DMV. Submit the documents along with the required fees. Alternatively, mail the documents and fees to the address indicated on the application. After your application is processed, a new title will be issued in your name according to local procedure.
How to Sell a Car With no Warranty
By: Jamie Lisse
How To Get a Replacement Copy of a Car Title
By: Jeannine Mancini
4 Habits That Helped Me Stop Scraping By
How to Sell a Car by Signing the Title Over
By: Jack Gerard
Can I Sell My Car Without a Title in Texas?
By: Kristine Tucker
How to Sell a Car Out of State
By: Shanan Miller


text:
import { TypedVariadic } from './$types';

export function $<T, U>(fns: Array<TypedVariadic<T, U>>): TypedVariadic<T, U[]>;


text:
Glenn Dorsey 50-50 to Make Debut Against Saints
In his weekly meeting with the media, San Francisco 49ers defensive coordinator Vic Fangio discussed the potential return of a disruptive interior defensive lineman.
Dorsey Nears First Action
After returning to practice last week, nose tackle Glenn Dorsey could make his season debut on Sunday against the New Orleans Saints.
"To me, that's truly 50-50 right now," Fangio said.
Dorsey suffered a torn biceps injury in August and has been on the Reserve/Injured; Designated for Return List.
The 49ers currently have an open spot on the 53-man roster after the team waived defensive tackle Demarcus Dobbs on Tuesday.
Dorsey, who is from Louisiana and played collegiately at LSU, tallied 41 tackles and two sacks in 16 games for San Francisco last year.
Willis, Brock Updates
Joe Staley missed practice again on Thursday because of his nagging toe injury.
If the linebacker is to avoid missing his third consecutive game, he'll likely need to return to the practice field by Friday.
"It's questionable," Fangio said. "As the week rolls on, if he doesn't start practicing at some point then it starts moving to doubtful."
Although Willis hasn't had any setbacks in his recovery, Fangio added that the veteran's toe "hasn't gotten much better."
As for Tramaine Brock, his toe injury has progressed enough to participate limitedly in practice this week.
The cornerback played Week 7 against the Denver Broncos after missing the previous five games, but he sat out versus the St. Louis Rams following the bye.
"He looked like a guy that was rusty," Fangio said of Brock's performance in Denver. "A guy that hadn't played in a long time and didn't play as well as he's capable of playing. (He) had a little minor setback last week but just wasn't ready and gave it one more week. Hopefully this week, we'll get him in there in the mix.
Defending Graham
In Jimmy Graham, the 49ers face one of the best pass-catching tight ends in the NFL on Sunday. Through eight games, Graham has caught 46 passes for 518 yards and five touchdowns.
So just how does San Francisco plan on stopping him, especially if the team is without Willis? Fangio responded with a question of his own.
"Do you have any ideas?" Fangio said. "It'll be a mix of guys depending upon the coverage we're in and depending upon where he lines up. Could be a corner type, could be a safety type, could be a linebacker type, so it will be a mix."
In three previous matchups against Graham, the 49ers have done a remarkable job containing the Pro Bowler, limiting him to a combined 74 yards on 10 catches and no scores.
"It's a tough matchup and makes it tougher that he's a part of a very balanced offense," Fangio said. "So it's hard to give special attention to one guy all the time. We just have to go out and play."
Lynch's Role
With linebacker Dan Skuta's availability for Sunday's game in question due to an ankle injury, Aaron Lynch has garnered additional reps in the 49ers base defense this week.
"It's been a point of emphasis for him every week," Fangio said. "But obviously he's getting more with Dan not practicing yet."
The rookie linebacker has played the vast majority of his snaps during games in the nickel package, proving valuable as a pass-rusher on the edge. But if Skuta is held out of the Week 10 contest in New Orleans, Lynch's responsibilities would likely increase as he would have to cover receivers in the flat.
Corey Lemonier could also see playing time on defense in Skuta's absence.
SUGGESTED: ________
**READ: [Kaepernick Shares Respect for Brees
](http://www.49ers.com/news/article-2/Colin-Kaepernick-Drew-Brees-Run-Similar-Offenses/6eeb79e1-a8ab-4f6c-b5e9-7e59d4067c83)* * *READ: Lattimore Plans to Retire * * *READ: [Borland Nominated for Rookie of the Week
](http://prod.static.49ers.clubs.nfl.com//assets/images/imported/SF/100414-borland-CP3.jpg)* * *READ: [RB Hunter Signs Contract Extension
](http://www.49ers.com/news/article-2/49ers-Sign-RB-Kendall-Hunter-to-Contract-Extension/8284abe6-dd9f-44ba-a312-c520e6aae9fc)* * READ: 49ers Waive DT Dobbs
* *LISTEN: [49ers GM Assesses State of Team
](http://www.49ers.com/video/audio/Trent-Baalke-Assesses-State-of-49ers/7a65b248-5f2b-46f4-a258-eb48cff3dd8c)** * WATCH: 1-on-1 Interview with NT Williams


, selects the best libraries with ideal quality just for you, and this photographs is actually among photographs selections inside our finest photos gallery regarding Elegant Pics Of How to Make A Cover Letter for Resume. I'm hoping you can want it.
put up by Christian Hart in 2018-08-09 12:32:54. To view just about all images inside Elegant Pics Of How to Make A Cover Letter for Resume photos gallery please abide by this kind of web page link.


Description: Located in the southeast portion of Crater Lake National Park, the short one-mile trail winds through old-growth hemlock, and climaxes with a view of the lush and serene waterfall. Below the falls wildflowers line the stream and immediately surrounding canyon. The route is short and wheelchair/stroller accessible.
Directions: From Rim Village, drive south 2.8 miles toward Highway 62. Just beyond Park Headquarters, fork to the left on East Rim Drive for 8.5 miles. Just before the Phantom Ship Overlook at Kerr Notch, turn right on Pinnacles Road. After a mile down this paved road, park at a pullout on the left.


In this episode of Good News for a Change, on the Sunday before the Elevation of the Holy Cross, Fr. Constantine Lazarakis shares thoughts on this important Feast Day. When we elevate the cross in September and then when we venerate it during Great Lent, our relationship with the Cross is the same. It is above us. We are subservient to it. When we consider the sacrifice of Jesus on that Holy Cross, we should reflect on what place sacrifice should have in our lives as Orthodox Christians. There is a spiritual benefit to be gained when we realize, in sacrifice, that things don't really belong to us. They are God's. God asks us to surrender control in order that we may grasp something infinitely greater.


text:
using System;
using ChartDirector;

namespace CSharpChartExplorer
{
    public class threedscattergroups : DemoModule
    {
        //Name of demo module
        public string getName() { return "3D Scatter Groups"; }

        //Number of charts produced in this demo module
        public int getNoOfCharts() { return 1; }

        //Main code for creating chart.
        //Note: the argument chartIndex is unused because this demo only has 1 chart.
        public void createChart(WinChartViewer viewer, int chartIndex)
        {
            // The random XYZ data for the first 3D scatter group
            RanSeries r0 = new RanSeries(7);
            double[] xData0 = r0.getSeries2(100, 100, -10, 10);
            double[] yData0 = r0.getSeries2(100, 0, 0, 20);
            double[] zData0 = r0.getSeries2(100, 100, -10, 10);

            // The random XYZ data for the second 3D scatter group
            RanSeries r1 = new RanSeries(4);
            double[] xData1 = r1.getSeries2(100, 100, -10, 10);
            double[] yData1 = r1.getSeries2(100, 0, 0, 20);
            double[] zData1 = r1.getSeries2(100, 100, -10, 10);

            // The random XYZ data for the third 3D scatter group
            RanSeries r2 = new RanSeries(8);
            double[] xData2 = r2.getSeries2(100, 100, -10, 10);
            double[] yData2 = r2.getSeries2(100, 0, 0, 20);
            double[] zData2 = r2.getSeries2(100, 100, -10, 10);

            // Create a ThreeDScatterChart object of size 800 x 520 pixels
            ThreeDScatterChart c = new ThreeDScatterChart(800, 520);

            // Add a title to the chart using 20 points Times New Roman Italic font
            c.addTitle("3D Scatter Groups                    ", "Times New Roman Italic", 20);

            // Set the center of the plot region at (350, 240), and set width x depth x height to
            // 360 x 360 x 270 pixels
            c.setPlotRegion(350, 240, 360, 360, 270);

            // Set the elevation and rotation angles to 15 and 30 degrees
            c.setViewAngle(15, 30);

            // Add a legend box at (640, 180)
            c.addLegend(640, 180);

            // Add 3 scatter groups to the chart with 9 pixels glass sphere symbols of red (ff0000),
            // green (00ff00) and blue (0000ff) colors
            c.addScatterGroup(xData0, yData0, zData0, "Alpha", Chart.GlassSphere2Shape, 9, 0xff0000)
                ;
            c.addScatterGroup(xData1, yData1, zData1, "Beta", Chart.GlassSphere2Shape, 9, 0x00ff00);
            c.addScatterGroup(xData2, yData2, zData2, "Gamma", Chart.GlassSphere2Shape, 9, 0x0000ff)
                ;

            // Set the x, y and z axis titles
            c.xAxis().setTitle("X-Axis Place Holder");
            c.yAxis().setTitle("Y-Axis Place Holder");
            c.zAxis().setTitle("Z-Axis Place Holder");

            // Output the chart
            viewer.Chart = c;
        }
    }
}


Park hours are dawn to dusk. Lighted athletic fields or tennis courts are open until 10:00 p.m. Park rules are posted in each park.
We invite you to visit and enjoy all of Lake Forest's 32 parks offering outdoor entertainment for all ages. Whether it is relaxing under a tree, playing with the kids, exploring the City's history, or practicing your skills at Orange County's largest free skatepark, Lake Forest has it all.


text:
Kalraj Mishra appointed Himachal Pradesh Governor; Acharya Devvrat transferred to Gujarat
Bengaluru, First Published 16, Jul 2019, 11:11 AM IST
Mishra, 78, had resigned from the Narendra Modi-led government as minister for micro, small and medium enterprises in 2017. The Uttar Pradesh leader did not contest the last Lok Sabha election
New Delhi: Senior BJP leader Kalraj Mishra was on Monday (July 15) appointed as the Governor of Himachal Pradesh, replacing Acharya Devvrat, who has been transferred and appointed as the Governor of Gujarat.
#PresidentKovind is pleased to make the following appointment/ changes.
◾Acharya Devvrat, Governor of #HimachalPradesh is transferred and appointed as Governor of #Gujarat.
◾Shri Kalraj Mishra as the Governor of #HimachalPradesh.https://t.co/kJJuF4xIx5 pic.twitter.com/WH8VA3axVS
— PIB India (@PIB_India) July 15, 2019
A Rashtrapati Bhavan press communique said the appointments of Mishra and Devvrat will come into effect from the dates they assume charge of their respective offices.
Mishra, 78, had resigned from the Narendra Modi-led government as minister for micro, small and medium Enterprises in 2017 after he crossed the age of 75, the BJP's unofficial age limit for holding an elected post.
Mishra was a swayamsewak of RSS since childhood and became RSS purnkalik pracharak in 1963. Mishra was the first elected national president of Bharatiya Janata Yuva Morcha. Mishra was three-term member of Rajya Sabha in 1978, 2001 and 2006.
The Uttar Pradesh leader did not contest the last Lok Sabha election.
Devvrat, 60, was appointed as Governor of Himachal Pradesh on August 12, 2015. He will replace Governor of Gujarat OP Kohli, who retires on Monday.
Kohli was made the Gujarat Governor on July 16, 2014.
* With PTI inputs
Last Updated 11:11 AM IST
Kalraj Mishra
Acharya Devvrat
Himachal Pradesh Governor
Gujarat Governor


text:
Josepha Fabianna Kodis (1865 – 1940), was a Polish philosopher, psychologist and women's rights activist, who advocated for women's emancipation and equal rights. She was a co-organizer of the People's University for Polish emigrants in the St. Louis, Missouri. In Minsk, she organized the Free Polish University and public library.

Life and work
Josepha Krzyżanowska was born on 19 April 1865 on the Załucze estate in Nowogrodek west of Minsk, into a Polish landowning and clergy family in Belarus. Her parents, Erazm Krzyżanowski and Zofia Kozielska, had become impoverished as a result of the confiscation of their property after the unsuccessful November and January uprisings of 1863/1864 against the Russian Empire.

In 1881, she passed the state teacher's examination and after her father died she began to work as a private teacher in Lithuania. In 1886 she went to Geneva, Switzerland to study and a year later she moved to Zurich, to study philosophy. She received her doctorate in 1893 from Richard Avenarius in Zurich on the doctrine of "empirical criticism" or empirio-criticism as the first female doctoral student in psychology.

According to the writer Gerhart Hauptmann, Josepha was the model for the 24-year-old Anna Mahr in his play Lonely People (1890). Josepha was a fellow student and friend of Gerhart's brother Carl Hauptmann (who became a writer himself). In the play, the main character, who is based on Carl Hauptmann, is alienated from his previous life and family. As a result of a visit by Anna Mahr, who is described as extremely fascinating and intellectually stimulating, Carl ultimately commits suicide.

Marriage
In 1889, Josepha Krzyżanowska married Teodor Kodis (1861-1917) who was a doctor from Lithuania and studied medicine in Leipzig, Strasbourg and Zurich. He was also an activist associated with the socialist left. In 1894 Josepha followed her husband to St. Louis, Missouri. There, she was involved in an association of Poles in America and organized a people's university for Polish immigrants. She continued her research activities and published articles in scientific journals in Europe and the United States.

Free Polish University
In 1901 she returned to her native Poland with her husband and daughter and settled again in Minsk. There she continued her scientific work and at the same time actively campaigned for the emancipation and equal rights of women. She was also involved in the pacifist movement and organized extensive educational activities for the Polish population of Minsk. From 1907 on, she taught at the Free Polish University (Wolna Wszechnica Polska). This was an underground school for the popular education of Poles in the Russian Empire until 1906. It was primarily intended for Polish women, who had been banned from entering universities in the Russian Empire since 1863.

After her husband's death in 1918, she moved to Warsaw. There she worked during the years 1919 to 1921 as a librarian in the Ministry of Public Works. From 1921 to 1930 she was an employee of the Warsaw City Council.

Josepha died in Warsaw on 30 December 1940 and was buried in the Służew New Cemetery on Wałbrzyska Street.

Family
Her daughter, Zofia Kodis-Freyer (1899-1992) was a painter and weaver. Josepha's sister Ewa Krzyżanowska was the wife of the politician and first Polish President Gabriel Narutowicz.

Selected publications
 Kodis, J. (1894). Zur Analyse des Apperceptionsbegriffes. Philosophical Review, 3(a).
 Kodis, J. (1896). Richard Avenarius.
 Kodis, J. (1898). Der Emfindungsbegriff auf empiriokritischer Grundlage betrachtet. Philosophical Review, 7(a).

References

1865 births
1940 deaths
Polish women psychologists
Polish women philosophers
20th-century Polish philosophers
20th-century Polish women scientists
People from Minsk

redpajama_set_name: RedPajamaWikipedia


At Northern Insurance Group we recommend that our clients review their auto insurance policy with one of our local agents so that the policy covers the eventuality of striking an animal on the road. As our agents live in Portland and are familiar with Maine accident statistics regarding animal related damages, they can recommend the right type and level of auto insurance coverage to protect your vehicle.
If you are involved in an animal-related accident, pull over and check to ensure that you and any passengers have not sustained any injuries. If the animal is alive, be cautious as it is likely terrified and could become dangerous. Report the accident to the police immediately. In many jurisdictions in Maine, hitting a domestic animal requires that police are notified.
If you don't currently have comprehensive car insurance, one of our agents will be happy to review your policy coverages and find you the best auto insurance coverage to provides the protection you need. Our agents live and work in Portland and drive the same roads that you do. We know how unsettling it is to be involved in any type of accident, whether it is related to hitting an animal or another vehicle. Our job is to ensure that our clients have the coverage they need, and at the most affordable rates.


Should you have a concern please contact your child's class teacher or Head of Keystage. They will strive to contact you within 24 hours.
If you do not feel you have had a satisfactory response we have a rigorous complaints procedure. Formal complaints will always follow the Complaints Procedure. Formal and informal opportunities for feedback from both students and parents are central to our self-evaluation work.
Please read the attached Policy below.
A complaint may be made in person, by telephone, or in writing.
If in the unlikely event that your complaint is not resolved to your satisfaction you are welcome to contact the Governors.
Should you need to complain further, the four organisations below can be contacted.


text:
package com.intellij.java.refactoring;

import com.intellij.JavaTestUtil;
import com.intellij.codeInsight.TargetElementUtil;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiMethod;
import com.intellij.refactoring.makeStatic.MakeMethodStaticProcessor;
import com.intellij.refactoring.makeStatic.MakeStaticUtil;
import com.intellij.refactoring.makeStatic.Settings;
import com.intellij.refactoring.util.VariableData;
import org.jetbrains.annotations.NotNull;

import java.util.ArrayList;

public class MakeMethodStaticTest extends LightRefactoringTestCase {
  @NotNull
  @Override
  protected String getTestDataPath() {
    return JavaTestUtil.getJavaTestDataPath();
  }

  public void testEmptyMethod() {
    configureByFile("/refactoring/makeMethodStatic/before1.java");
    perform(true);
    checkResultByFile("/refactoring/makeMethodStatic/after1.java");
  }

  public void testUseStatic() {
    configureByFile("/refactoring/makeMethodStatic/before2.java");
    perform(true);
    checkResultByFile("/refactoring/makeMethodStatic/after2.java");
  }

  public void testUseField() {
    configureByFile("/refactoring/makeMethodStatic/before3.java");
    perform(true);
    checkResultByFile("/refactoring/makeMethodStatic/after3.java");
  }

  public void testIDEADEV2556() {
    configureByFile("/refactoring/makeMethodStatic/before21.java");
    perform(false);
    checkResultByFile("/refactoring/makeMethodStatic/after21.java");
  }

  public void testUseFieldWithThis() {
    configureByFile("/refactoring/makeMethodStatic/before4.java");
    perform(true);
    checkResultByFile("/refactoring/makeMethodStatic/after4.java");
  }

  public void testUseFieldWithSuperEmptyExtends() {
    configureByFile("/refactoring/makeMethodStatic/before5.java");
    perform(true);
    checkResultByFile("/refactoring/makeMethodStatic/after5.java");
  }

  public void testUseFieldWithSuper() {
    configureByFile("/refactoring/makeMethodStatic/before6.java");
    perform(true);
    checkResultByFile("/refactoring/makeMethodStatic/after6.java");
  }

  public void testUseMethod() {
    configureByFile("/refactoring/makeMethodStatic/before7.java");
    perform(true);
    checkResultByFile("/refactoring/makeMethodStatic/after7.java");
  }

  public void testThisInsideAnonymous() {
    configureByFile("/refactoring/makeMethodStatic/before8.java");
    perform(true);
    checkResultByFile("/refactoring/makeMethodStatic/after8.java");
  }

  public void testUsageInSubclass() {
    configureByFile("/refactoring/makeMethodStatic/before9.java");
    perform(true);
    checkResultByFile("/refactoring/makeMethodStatic/after9.java");
  }

  public void testGeneralUsageNoParam() {
    configureByFile("/refactoring/makeMethodStatic/before10.java");
    perform(false);
    checkResultByFile("/refactoring/makeMethodStatic/after10-np.java");
  }

  public void testGeneralUsage() {
    configureByFile("/refactoring/makeMethodStatic/before10.java");
    perform(true);
    checkResultByFile("/refactoring/makeMethodStatic/after10.java");
  }

  public void testUsageInSubclassWithSuper() {
    configureByFile("/refactoring/makeMethodStatic/before11.java");
    perform(true);
    checkResultByFile("/refactoring/makeMethodStatic/after11.java");
  }

  public void testSuperUsageWithComplexSuperClass() {
    configureByFile("/refactoring/makeMethodStatic/before12.java");
    perform(true);
    checkResultByFile("/refactoring/makeMethodStatic/after12.java");
  }

  public void testExplicitThis() {
    configureByFile("/refactoring/makeMethodStatic/before13.java");
    perform(true);
    checkResultByFile("/refactoring/makeMethodStatic/after13.java");
  }

  public void testQualifiedThis() {
    configureByFile("/refactoring/makeMethodStatic/before14.java");
    perform(true);
    checkResultByFile("/refactoring/makeMethodStatic/after14.java");
  }

  public void testSCR8043() {
    configureByFile("/refactoring/makeMethodStatic/before15.java");
    perform(true);
    checkResultByFile("/refactoring/makeMethodStatic/after15.java");
  }

  public void testJavadoc1() {
    configureByFile("/refactoring/makeMethodStatic/before16.java");
    performWithFields();
    checkResultByFile("/refactoring/makeMethodStatic/after16.java");
  }

  public void testJavadoc2() {
    configureByFile("/refactoring/makeMethodStatic/before17.java");
    performWithFields();
    checkResultByFile("/refactoring/makeMethodStatic/after17.java");
  }

  public void testGenericClass() {
    configureByFile("/refactoring/makeMethodStatic/before18.java");
    performWithFields();
    checkResultByFile("/refactoring/makeMethodStatic/after18.java");
  }

  public void testFieldWriting() {
    configureByFile("/refactoring/makeMethodStatic/before19.java");
    performWithFields();
    checkResultByFile("/refactoring/makeMethodStatic/after19.java");
  }

  public void testQualifiedInnerClassCreation() {
    configureByFile("/refactoring/makeMethodStatic/before20.java");
    performWithFields();
    checkResultByFile("/refactoring/makeMethodStatic/after20.java");
  }

  public void testQualifiedThisAdded() {
    configureByFile("/refactoring/makeMethodStatic/before22.java");
    performWithFields();
    checkResultByFile("/refactoring/makeMethodStatic/after22.java");
  }

  public void testDeepStaticOverrides() {
    configureByFile("/refactoring/makeMethodStatic/beforeOverrides.java");
    perform(false);
    checkResultByFile("/refactoring/makeMethodStatic/afterOverrides.java");
  }

  public void testDeepStatic() {
    configureByFile("/refactoring/makeMethodStatic/beforeDeep.java");
    perform(false);
    checkResultByFile("/refactoring/makeMethodStatic/afterDeep.java");
  }

  public void testPreserveTypeParams() {
    doTestFields(false);
  }

  public void testFieldsAndDelegation() {
    doTestFields(true);
  }

  public void testInnerStaticClassUsed() {
    configureByFile("/refactoring/makeMethodStatic/beforeInnerStaticClassUsed.java");
    PsiElement element = TargetElementUtil.findTargetElement(myEditor, TargetElementUtil.ELEMENT_NAME_ACCEPTED);
    assertTrue(element instanceof PsiMethod);
    assertFalse(MakeStaticUtil.isParameterNeeded((PsiMethod)element));
  }

  public void testMethodReference() {
    doTest(true);
  }

  public void testThisMethodReference() {
    doTest(false);
  }

  public void testPreserveParametersAlignment() {
    doTest();
  }

  public void testDelegatePlace() {
    doTest(true, true);
  }

  public void testClearOverrideAnnotation() {
    doTest(true, true);
  }

  private void doTest() {
    doTest(false);
  }

  private void doTest(final boolean addClassParameter) {
    doTest(addClassParameter, false);
  }

  private void doTest(final boolean addClassParameter, boolean delegate) {
    configureByFile("/refactoring/makeMethodStatic/before" + getTestName(false) + ".java");
    perform(addClassParameter, delegate);
    checkResultByFile("/refactoring/makeMethodStatic/after" + getTestName(false) + ".java");
  }

  private void doTestFields(boolean delegate) {
    final String testName = getTestName(false);
    configureByFile("/refactoring/makeMethodStatic/before" + testName + ".java");
    performWithFields(delegate);
    checkResultByFile("/refactoring/makeMethodStatic/after" + testName + ".java");
  }

  private static void perform(boolean addClassParameter) {
    perform(addClassParameter, false);
  }

  private static void perform(boolean addClassParameter, boolean delegate) {
    PsiElement element = TargetElementUtil.findTargetElement(myEditor, TargetElementUtil.ELEMENT_NAME_ACCEPTED);
    assertTrue(element instanceof PsiMethod);
    PsiMethod method = (PsiMethod) element;

    new MakeMethodStaticProcessor(
            getProject(),
            method,
            new Settings(true, addClassParameter ? "anObject" : null, null, delegate)).run();
  }

  private static void performWithFields() {
    performWithFields(false);
  }

  private static void performWithFields(boolean delegate) {
    PsiElement element = TargetElementUtil.findTargetElement(myEditor, TargetElementUtil.ELEMENT_NAME_ACCEPTED);
    assertTrue(element instanceof PsiMethod);
    PsiMethod method = (PsiMethod) element;
    final ArrayList<VariableData> parametersForFields = new ArrayList<>();
    final boolean addClassParameter = MakeStaticUtil.buildVariableData(method, parametersForFields);

    new MakeMethodStaticProcessor(
            getProject(),
            method,
            new Settings(true, addClassParameter ? "anObject" : null,
                         parametersForFields.toArray(
                           new VariableData[0]), delegate)).run();
  }
}