text:
import React from "react";
import PropTypes from "prop-types";
import LightComponent from "ui-lib/light_component";
import Input from "react-toolbox/lib/input";
import Dropdown from "react-toolbox/lib/dropdown";
import Autocomplete from "react-toolbox/lib/autocomplete";
import {
    Form as TAForm,
    Section as TASection,
    utils as tautils
} from "ui-components/type_admin";
import stateVar from "ui-lib/state_var";
import DirectBackendEdit from "./DirectBackendEdit";
import JenkinsBackendEdit from "./JenkinsBackendEdit";
import { getPluginProp } from "ui-lib/plugin_util";

const BACKEND_TYPE = {
    DIRECT: "direct",
    JENKINS: "jenkins"
};

class Edit extends LightComponent {
    constructor(props) {
        super(props);

        this.itemProperties = {
            "_id": {
                editable: false,
                required: () => true,
                defaultValue: ""
            },
            "tags": {
                editable: true,
                required: () => false,
                defaultValue: []
            },
            "backendType": {
                editable: false,
                required: () => true,
                defaultValue: BACKEND_TYPE.DIRECT
            }
        };

        this.state = Object.assign({
            backendData: stateVar(this, "backendData", {}),
            backendDataValid: stateVar(this, "backendDataValid", false)
        }, tautils.createStateProperties(this, this.itemProperties, this.props.item));
    }

    getBackendTypes() {
        const backendTypes = [
            { value: BACKEND_TYPE.DIRECT, label: "Direct" },
            { value: BACKEND_TYPE.JENKINS, label: "Jenkins" }
        ];
        const fromPlugins = getPluginProp("exec.backend.edit.types");
        fromPlugins.forEach((v) => backendTypes.push(...v));

        return backendTypes;
    }

    async onConfirm() {
        const commonData = tautils.serialize(this.state, this.itemProperties, this.props.item);
        const backendData = this.state.backendData.value;
        const data = Object.assign({}, commonData, backendData);

        await this.props.onSave("exec.backend", data, {
            create: !this.props.item
        });
    }

    _isValid() {
        const commonValid = tautils.isValid(this.state, this.itemProperties);
        const backendValid = this.state.backendDataValid.value;

        return commonValid && backendValid;
    }

    render() {
        this.log("render", this.props, this.state);

        const backendTypes = this.getBackendTypes();
        let backendComponent;
        if (this.state.backendType.value === BACKEND_TYPE.DIRECT) {
            backendComponent = (
                <DirectBackendEdit
                    theme={this.props.theme}
                    item={this.props.item}
                    data={this.state.backendData}
                    isValid={this.state.backendDataValid}
                />
            );
        } else if (this.state.backendType.value === BACKEND_TYPE.JENKINS) {
            backendComponent = (
                <JenkinsBackendEdit
                    theme={this.props.theme}
                    item={this.props.item}
                    data={this.state.backendData}
                    isValid={this.state.backendDataValid}
                />
            );
        } else {
            const componentKey = `exec.backend.edit.component.${this.state.backendType.value}`;
            const PluginBackendComponent = getPluginProp(componentKey)[0];
            if (PluginBackendComponent) {
                backendComponent = (
                    <PluginBackendComponent
                        theme={this.props.theme}
                        item={this.props.item}
                        data={this.state.backendData}
                        isValid={this.state.backendDataValid}
                    />
                );
            }
        }

        return (
            <TASection
                breadcrumbs={this.props.breadcrumbs}
                controls={this.props.controls}
                menuItems={this.props.menuItems}
            >
                <TAForm
                    confirmAllowed={this._isValid()}
                    confirmText={this.props.item ? "Save" : "Create"}
                    primaryText={`${this.props.item ? "Edit" : "Create"} execution backend`}
                    secondaryText="An execution backend contains information about..."
                    onConfirm={() => this.onConfirm()}
                    onCancel={() => this.props.onCancel()}
                >
                    <Input
                        type="text"
                        label="Name"
                        name="_id"
                        floating={true}
                        required={this.itemProperties._id.required()}
                        disabled={this.props.item && !this.itemProperties._id.editable}
                        value={this.state._id.value}
                        onChange={this.state._id.set}
                    />
                    <Dropdown
                        label="Backend type"
                        required={this.itemProperties.backendType.required()}
                        disabled={this.props.item && !this.itemProperties.backendType.editable}
                        onChange={this.state.backendType.set}
                        source={backendTypes}
                        value={this.state.backendType.value}
                    />
                    {backendComponent}
                    <Autocomplete
                        selectedPosition="below"
                        allowCreate={true}
                        label="Tags"
                        disabled={this.props.item && !this.itemProperties.tags.editable}
                        onChange={this.state.tags.set}
                        source={this.state.tags.value}
                        value={this.state.tags.value}
                    />
                </TAForm>
            </TASection>
        );
    }
}

Edit.propTypes = {
    theme: PropTypes.object,
    item: PropTypes.object,
    pathname: PropTypes.string.isRequired,
    breadcrumbs: PropTypes.array.isRequired,
    controls: PropTypes.array.isRequired,
    menuItems: PropTypes.array.isRequired,
    onSave: PropTypes.func.isRequired,
    onCancel: PropTypes.func.isRequired
};

export default Edit;


text:
using System.Collections.Generic;
using System.Linq;

namespace GSMailApi.Model.Files.Managment
{
    public class DwtFile : ManagmentFile
    {
        public string FieldMonth { get; set; }

        public double WorkingDay { get; set; }

        public double WorkingDayPercent => 21 / WorkingDay * 100;

        public List<BaseModel> TaskBasis { get; set; }

        public double TaskBasisEfforts
        {
            get
            {
                if (TaskBasis != null && TaskBasis.Count > 0 && TaskBasis.First() is LineDwtBasis)
                {
                    return TaskBasis.Sum(lineDwtBasise => (lineDwtBasise as LineDwtBasis).Efforts);
                }
                return 0;
            }
        }

        public List<BaseModel> NippoBasis { get; set; }

        public double NippoBasisEfforts
        {
            get
            {
                if (NippoBasis != null && NippoBasis.Count > 0 && NippoBasis.First() is LineDwtBasis)
                {
                    return NippoBasis.Sum(lineDwtBasise => (lineDwtBasise as LineDwtBasis).Efforts);
                }
                return 0;
            }
        }

        public List<BaseModel> BtBasis { get; set; }

        public double BtBasisEfforts
        {
            get
            {
                if (BtBasis != null && BtBasis.Count > 0 && BtBasis.First() is LineDwtBasis)
                {
                    return BtBasis.Sum(lineDwtBasise => (lineDwtBasise as LineDwtBasis).Efforts);
                }
                return 0;
            }
        }

        public double Reserved => WorkingDay - (BtBasisEfforts + NippoBasisEfforts + TaskBasisEfforts);
    }

    public class LineDwtBasis : ManagmentFile
    {
        public string TaskName { get; set; }

        public string Member { get; set; }

        public double Efforts { get; set; }

        public string Description { get; set; }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package main

import (
	"fmt"
	"io"
	"os"

	vision "cloud.google.com/go/vision/apiv1"
	"golang.org/x/net/context"
)

func init() {
	// Refer to these functions so that goimports is happy before boilerplate is inserted.
	_ = context.Background()
	_ = vision.ImageAnnotatorClient{}
	_ = os.Open
}

// detectFaces gets faces from the Vision API for an image at the given file path.
func detectFaces(w io.Writer, file string) error {
	var client *vision.ImageAnnotatorClient // Boilerplate is inserted by gen.go
	annotations, err := client.DetectFaces(ctx, image, nil, 10)
	if err != nil {
		return err
	}
	if len(annotations) == 0 {
		fmt.Fprintln(w, "No faces found.")
	} else {
		fmt.Fprintln(w, "Faces:")
		for i, annotation := range annotations {
			fmt.Fprintln(w, "  Face", i)
			fmt.Fprintln(w, "    Anger:", annotation.AngerLikelihood)
			fmt.Fprintln(w, "    Joy:", annotation.JoyLikelihood)
			fmt.Fprintln(w, "    Surprise:", annotation.SurpriseLikelihood)
		}
	}
	return nil
}

// detectLabels gets labels from the Vision API for an image at the given file path.
func detectLabels(w io.Writer, file string) error {
	var client *vision.ImageAnnotatorClient // Boilerplate is inserted by gen.go
	annotations, err := client.DetectLabels(ctx, image, nil, 10)
	if err != nil {
		return err
	}

	if len(annotations) == 0 {
		fmt.Fprintln(w, "No labels found.")
	} else {
		fmt.Fprintln(w, "Labels:")
		for _, annotation := range annotations {
			fmt.Fprintln(w, annotation.Description)
		}
	}

	return nil
}

// detectLandmarks gets landmarks from the Vision API for an image at the given file path.
func detectLandmarks(w io.Writer, file string) error {
	var client *vision.ImageAnnotatorClient // Boilerplate is inserted by gen.go
	annotations, err := client.DetectLandmarks(ctx, image, nil, 10)
	if err != nil {
		return err
	}

	if len(annotations) == 0 {
		fmt.Fprintln(w, "No landmarks found.")
	} else {
		fmt.Fprintln(w, "Landmarks:")
		for _, annotation := range annotations {
			fmt.Fprintln(w, annotation.Description)
		}
	}

	return nil
}

// detectText gets text from the Vision API for an image at the given file path.
func detectText(w io.Writer, file string) error {
	var client *vision.ImageAnnotatorClient // Boilerplate is inserted by gen.go
	annotations, err := client.DetectTexts(ctx, image, nil, 10)
	if err != nil {
		return err
	}

	if len(annotations) == 0 {
		fmt.Fprintln(w, "No text found.")
	} else {
		fmt.Fprintln(w, "Text:")
		for _, annotation := range annotations {
			fmt.Fprintf(w, "%q\n", annotation.Description)
		}
	}

	return nil
}

// detectDocumentText gets the full document text from the Vision API for an image at the given file path.
func detectDocumentText(w io.Writer, file string) error {
	var client *vision.ImageAnnotatorClient // Boilerplate is inserted by gen.go
	annotation, err := client.DetectDocumentText(ctx, image, nil)
	if err != nil {
		return err
	}

	if annotation == nil {
		fmt.Fprintln(w, "No text found.")
	} else {
		fmt.Fprintln(w, "Text:")
		fmt.Fprintf(w, "%q\n", annotation.Text)
	}

	return nil
}

// detectProperties gets image properties from the Vision API for an image at the given file path.
func detectProperties(w io.Writer, file string) error {
	var client *vision.ImageAnnotatorClient // Boilerplate is inserted by gen.go
	props, err := client.DetectImageProperties(ctx, image, nil)
	if err != nil {
		return err
	}

	fmt.Fprintln(w, "Dominant colors:")
	for _, quantized := range props.DominantColors.Colors {
		color := quantized.Color
		r := int(color.Red) & 0xff
		g := int(color.Green) & 0xff
		b := int(color.Blue) & 0xff
		fmt.Fprintf(w, "%2.1f%% - #%02x%02x%02x\n", quantized.PixelFraction*100, r, g, b)
	}

	return nil
}

// detectCropHints gets suggested croppings the Vision API for an image at the given file path.
func detectCropHints(w io.Writer, file string) error {
	var client *vision.ImageAnnotatorClient // Boilerplate is inserted by gen.go
	res, err := client.CropHints(ctx, image, nil)
	if err != nil {
		return err
	}

	fmt.Fprintln(w, "Crop hints:")
	for _, hint := range res.CropHints {
		for _, v := range hint.BoundingPoly.Vertices {
			fmt.Fprintf(w, "(%d,%d)\n", v.X, v.Y)
		}
	}

	return nil
}

// detectSafeSearch gets image properties from the Vision API for an image at the given file path.
func detectSafeSearch(w io.Writer, file string) error {
	var client *vision.ImageAnnotatorClient // Boilerplate is inserted by gen.go
	props, err := client.DetectSafeSearch(ctx, image, nil)
	if err != nil {
		return err
	}

	fmt.Fprintln(w, "Safe Search properties:")
	fmt.Fprintln(w, "Adult:", props.Adult)
	fmt.Fprintln(w, "Medical:", props.Medical)
	fmt.Fprintln(w, "Spoofed:", props.Spoof)
	fmt.Fprintln(w, "Violence:", props.Violence)

	return nil
}

// detectWeb gets image properties from the Vision API for an image at the given file path.
func detectWeb(w io.Writer, file string) error {
	var client *vision.ImageAnnotatorClient // Boilerplate is inserted by gen.go
	web, err := client.DetectWeb(ctx, image, nil)
	if err != nil {
		return err
	}

	fmt.Fprintln(w, "Web properties:")
	if len(web.FullMatchingImages) != 0 {
		fmt.Fprintln(w, "\tFull image matches:")
		for _, full := range web.FullMatchingImages {
			fmt.Fprintf(w, "\t\t%s\n", full.Url)
		}
	}
	if len(web.PagesWithMatchingImages) != 0 {
		fmt.Fprintln(w, "\tPages with this image:")
		for _, page := range web.PagesWithMatchingImages {
			fmt.Fprintf(w, "\t\t%s\n", page.Url)
		}
	}
	if len(web.WebEntities) != 0 {
		fmt.Fprintln(w, "\tEntities:")
		for _, entity := range web.WebEntities {
			fmt.Fprintf(w, "\t\t%-12s %s\n", entity.EntityId, entity.Description)
		}
	}

	return nil
}

// detectLogos gets logos from the Vision API for an image at the given file path.
func detectLogos(w io.Writer, file string) error {
	var client *vision.ImageAnnotatorClient // Boilerplate is inserted by gen.go
	annotations, err := client.DetectLogos(ctx, image, nil, 10)
	if err != nil {
		return err
	}

	if len(annotations) == 0 {
		fmt.Fprintln(w, "No logos found.")
	} else {
		fmt.Fprintln(w, "Logos:")
		for _, annotation := range annotations {
			fmt.Fprintln(w, annotation.Description)
		}
	}

	return nil
}


text:
import sys
from fortify_compare import FortifyCompare

if __name__ == "__main__":
    print('Number of arguments:', len(sys.argv), 'arguments.')
    print('Argument List:', str(sys.argv))

    if len(sys.argv) < 2:
        print("Usage: fortify_compare.py [Previous FPR File Name] [Current FPR File Name]")

    # just some default file names
    PREVIOUS_FPR = 'MyPreviousScan.fpr'
    CURRENT_FPR = 'MyCurrentScan.fpr'

    if len(sys.argv) > 1:
        PREVIOUS_FPR = sys.argv[1]

    if len(sys.argv) > 2:
        CURRENT_FPR = sys.argv[2]

    COMPARER = FortifyCompare(PREVIOUS_FPR, CURRENT_FPR)
    COMPARER.execute()


text:
#include <aws/codecommit/model/DescribePullRequestEventsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>

#include <utility>

using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;

DescribePullRequestEventsResult::DescribePullRequestEventsResult()
{
}

DescribePullRequestEventsResult::DescribePullRequestEventsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
  *this = result;
}

DescribePullRequestEventsResult& DescribePullRequestEventsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
  JsonView jsonValue = result.GetPayload().View();
  if(jsonValue.ValueExists("pullRequestEvents"))
  {
    Array<JsonView> pullRequestEventsJsonList = jsonValue.GetArray("pullRequestEvents");
    for(unsigned pullRequestEventsIndex = 0; pullRequestEventsIndex < pullRequestEventsJsonList.GetLength(); ++pullRequestEventsIndex)
    {
      m_pullRequestEvents.push_back(pullRequestEventsJsonList[pullRequestEventsIndex].AsObject());
    }
  }

  if(jsonValue.ValueExists("nextToken"))
  {
    m_nextToken = jsonValue.GetString("nextToken");

  }

  return *this;
}


text:
sensors
=======

Code for temperature sensors that send their output to a raspberry pi hub and then to tempodb

![IMG_1465](IMG_1465.jpg?raw=true)

![nrf24l01](nrf24l01.jpg?raw=true)


text:
<?php

######################################################################
# PHP-NUKE: Web Portal System
# ===========================
#
# Copyright (c) 2000 by Francisco Burzi (fbc@mandrakesoft.com)
# http://phpnuke.org
#
# This file is to configure XForum module options for your site
# Original Forum  by XMB Dev Team http://www.xmbforum.com
#
# XForum module by Trollix (trollix@hacknuke.com)
# C. Deltheil http://www.trollix.com
#
#
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License.
######################################################################

######################################################################

$nukesystem = "phpnuke5x";
$tablepre = "nuke_xmb_";
$table_banned = "nuke_xmb_banned";
$table_forums = "nuke_xmb_forums";
$table_members = "nuke_xmb_members";
$table_posts = "nuke_xmb_posts";
$table_ranks = "nuke_xmb_ranks";
$table_smilies = "nuke_xmb_smilies";
$table_themes = "nuke_xmb_themes";
$table_threads = "nuke_xmb_threads";
$table_whosonline = "nuke_xmb_whosonline";
$table_words = "nuke_xmb_words";

$langfile = "english";
$bbname = "Forums";
$postperpage = "25";
$topicperpage = "30";
$hottopic = "20";
$XFtheme = "gray";
$bbstatus = "on";
$whosonlinestatus = "on";
$regstatus = "on";
$bboffreason = "";
$regviewonly = "off";
$floodctrl = "5";
$memberperpage = "45";
$catsonly = "off";
$hideprivate = "on";
$showsort = "on";
$emailcheck = "off";
$bbrules = "off";
$bbrulestxt = "Your rules go here";
$searchstatus = "on";
$faqstatus = "on";
$memliststatus = "on";
$piconstatus = "on";
$sitename = "Terra Vista";
$siteurl = "http://terravista.dhs.org/";
$avastatus = "on";
$noreg = "off";
$gzipcompress = "off";
$boardurl = "http://terravista.dhs.org/news//modules.php?op=modload&name=XForum&file=index";
$coppa = "off";
$timeformat = "24";
$adminemail = "webmaster@uveais.dhs.org";
$dateformat = "dd/mm/yyyy";
$statspage = "on";
$affheader = "on";
$afffooter = "on";
$sigbbcode = "on";
$sightml = "off";
$indexstats = "on";
$reportpost = "on";
$showtotaltime = "on";
$dbuser = "user";
$dbpw = "";
$dbhost = "localhost";

?>


text:
branch-unique-id: mildenhall-library
branch-name: Mildenhall Library
branch-image: /images/branches/mildenhall-library.jpg
branch-monday-hours: Closed
branch-tuesday-hours:	1100 – 1500
branch-wednesday-hours: 1100 – 1500
branch-thursday-hours: Closed
branch-friday-hours: 1100 – 1500
branch-saturday-hours: 1100 – 1500
branch-sunday-hours: Closed
branch-manager: Denise Gray
branch-address: Chestnut Close, Mildenhall
branch-post-code: IP28 7NL
branch-tel: 01638 713558
branch-friends: Friends of Mildenhall Library
branch-accessibility: https://www.accessable.co.uk/venues/mildenhall-library
branch-parking: free parking next to the library
branch-bookdrop: y
branch-refreshments: tea and coffee making facilities
branch-which: y
branch-social-media: y
branch-facebook: mildenhalllibrary
branch-wifi: y
branch-borrowing-ereaders-and-ipads: an iPad for use in the library only
branch-photocopying: A3 and A4 colour photocopying
branch-colour-printing: A4 colour printing
branch-scan-to-email: y
branch-for-sale: handmade cards, postage stamps
breadcrumb: y
branch-payments: cash, cheques and cards accepted
meta-description: "Books, CDs, DVDs, free computer access, wifi, printing, scanning, children's activities, older people's activities."
---


text:
/*

=====================
Portfolio
=====================

*/
#portfolio .portfolio-item {
    font-family: "Open Sans", Helvetica, Arial, sans-serif;
    margin: 0 auto;
    padding: 0;
    text-align: center;
    background-color: #fff;
}

#portfolio .portfolio-item .portfolio-link {
    display: block;
    position: relative;
    margin: 0 auto;
}

#portfolio .portfolio-item .portfolio-link .portfolio-hover {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    background: rgba(76, 175, 80, 0.6);
    -webkit-transition: all ease .5s;
    -moz-transition: all ease .5s;
    transition: all ease .5s;
}

#portfolio .portfolio-item .portfolio-link .portfolio-hover:hover {
    opacity: 1;
}

#portfolio .portfolio-item .portfolio-link:focus {
  background-image: none;
  outline: 0;
  -webkit-box-shadow: none;
          box-shadow: none;
}

#portfolio .portfolio-item .portfolio-link .portfolio-hover .portfolio-hover-content {
    position: absolute;
    top: 50%;
    bottom: 20px;
    left: 20px;
    right: 20px;
    margin-top: -25px;
    text-align: center;
    color: #fff;
}

#portfolio .portfolio-item .portfolio-link .portfolio-hover .portfolio-hover-content h4 {
    margin-bottom: 20px;
    font-weight: 500;
    color: #fff;
    font-size: 24px;
    text-transform: none;
}

#portfolio .portfolio-item .portfolio-link .portfolio-hover .portfolio-hover-content p {
    margin: 0;
    font-size: 16px;
}

#portfolio * {
    z-index: 2;
}

.portfolio-modal .modal-content {
    padding: 100px 0;
    min-height: 100%;
    border: 0;
    border-radius: 0;
    text-align: center;
    background-clip: border-box;
    -webkit-box-shadow: none;
    box-shadow: none;
}

.portfolio-modal .modal-content h2 {
    margin-bottom: 15px;
    font-size: 3em;
}

.portfolio-modal .modal-content p {
    margin-bottom: 30px;
}

.portfolio-modal .modal-content p.item-intro {
    margin: 20px 0 30px;
    font-family: "Lato","Helvetica Neue",Helvetica,Arial,sans-serif;
    font-size: 16px;
}

.portfolio-modal .modal-content ul.list-inline {
    margin-top: 0;
    margin-bottom: 30px;
}

.portfolio-modal .modal-content img {
    margin-bottom: 30px;
}

.portfolio-modal .close-modal {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 75px;
    height: 75px;
    background-color: transparent;
    cursor: pointer;
}

.portfolio-modal .close-modal:hover {
    opacity: .3;
}

.portfolio-modal .close-modal .lr {
    z-index: 1051;
    width: 1px;
    height: 75px;
    margin-left: 35px;
    background-color: #222;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.portfolio-modal .close-modal .lr .rl {
    z-index: 1052;
    width: 1px;
    height: 75px;
    background-color: #222;
    -webkit-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    transform: rotate(90deg);
}

.portfolio-modal .modal-backdrop {
    display: none;
    opacity: 0;
}

::-moz-selection {
    text-shadow: none;
    background: #4CAF50;
}

::selection {
    text-shadow: none;
    background: #4CAF50;
}

img::selection {
    background: 0 0;
}

img::-moz-selection {
    background: 0 0;
}

body {
    webkit-tap-highlight-color: #4CAF50;
}


text:
<?php

use Behat\Behat\Context\Context;
use Behat\Behat\Context\SnippetAcceptingContext;
use Behat\Mink\Exception\ResponseTextException;
use Behat\MinkExtension\Context\MinkContext;

/**
 * Defines application features from the specific context.
 */
class FeatureContext extends MinkContext implements Context, SnippetAcceptingContext
{
    /**
     * Initializes context.
     *
     * Every scenario gets its own context instance.
     * You can also pass arbitrary arguments to the
     * context constructor through behat.yml.
     */
    public function __construct()
    {
    }

    /**
     * @Given I am logged as admin
     */
    public function iAmLoggedAsAdmin()
    {
        $this->visit('/login');
        $this->fillField('_username', 'admin');
        $this->fillField('_password', 'test');
        $this->pressButton('Логин');
    }

    /**
     * @Then I should see edit solutions flash
     */
    public function iShouldSeeEditSolutionsFlash()
    {
        $this->matchRegexpOnPage('/Решение ID: \d+ отредактировано/ui');
    }

    /**
     * @Then I should see delete solutions flash
     */
    public function iShouldSeeDeleteSolutionsFlash()
    {
        $this->matchRegexpOnPage('/Решение ID: \d+ удалено/ui');
    }

    /**
     * @param string $regex
     *
     * @throws ResponseTextException
     */
    protected function matchRegexpOnPage($regex)
    {
        $actual = $this->getSession()->getPage()->getText();
        $actual = preg_replace('/\s+/u', ' ', $actual);
        $message = sprintf('The regexp "%s" was not matched on the current page.', $regex);

        if (!preg_match($regex, $actual)) {
            throw new ResponseTextException($message, $this->getSession()->getDriver());
        }
    }
}


text:
import json
import logging

import numpy as np
from kmodes import kprototypes

log = logging.getLogger(__name__)

def analyze(data):
    # Convert this to python data for us to be able to run ML algorithms
    json_to_python = json.loads(data)

    log.debug("******   Analysis #6: IP-URL Input   ******")

    per_url = dict()  # IP-url

    hostlist = dict()

    # Data pre-processing here:
    for y in json_to_python:

        hostlist[y['HOST']] = 1

        if y['HOST'] in per_url:

            reque = y['REQUEST']
            req = reque.split()
            per_url[y['HOST']].append(req[1])

        else:

            reque = y['REQUEST']
            req = reque.split()
            per_url[y['HOST']] = [req[1]]

    ###Analysis 6: Host-IP and most frequently used URL. (K-Prototypes)

    Z = np.array([[0.00, '0']])

    for x in hostlist:

        word_counter = {}
        for word in per_url[x]:
            if word in word_counter:
                word_counter[word] += 1
            else:
                word_counter[word] = 1

        popular_words = sorted(
            word_counter, key=word_counter.get, reverse=True)
        popular_url = popular_words[0]
        # print x + ": " + popular_url
        log.debug(x + ": " + popular_url)

        y = x.split(".")
        ip = ""
        for z in range(4):
            l = len(y[z])
            l = 3 - l
            if (l > 0):
                zero = ""
                for t in range(3 - len(y[z])):
                    zero = zero + "0"
                y[z] = zero + y[z]

            ip = ip + y[z]

        # print str(float(float(ip)/1000)) + ": " + popular_url
        le = [float(float(ip) / 1000), popular_url]
        Z = np.vstack([Z, le])

    log.info(
        "******   Analysis #6: IP-URL Input data to k-prototypes:     ********"
    )
    # print "PRINTING IP-URL:"
    # print Z

    ####do k-proto analysis:
    ##For k-proto analysis:
    kproto = kprototypes.KPrototypes(n_clusters=5, init='Cao', verbose=2)

    result = kproto.fit_predict(Z, categorical=1)
    # print "Printing result for url-IP clustering:"
    # print result

    X = Z

    num_clust = dict()
    clust_content = dict()

    X_index = 0
    for x in result:
        if x in num_clust:
            num_clust[x] += 1
            clust_content[x].append(X_index)
        else:
            num_clust[x] = 1
            clust_content[x] = [X_index]
        X_index += 1

    min_index = min(num_clust, key=num_clust.get)

    max_index = max(num_clust, key=num_clust.get)

    log.info("Cluster no. " + str(min_index) + " has the least elements: " +
             str(num_clust[min_index]))
    log.info("Check INFO.log to view its contents!")

    content_arr = clust_content[min_index]

    log.info(
        "****  Contents of the cluster with minimum number of elements!  *****"
    )

    # Prints contents of min cluster
    input_index = 0
    for y in X:
        if input_index in content_arr:
            log.info(y)
        input_index += 1

    log.info("Cluster no. " + str(max_index) + " has the maximum elements: " +
             str(num_clust[max_index]))
    log.info("Check INFO.log to view its contents!")
    log.info(
        "Check DEBUG.log to view contents of all clusters along with the main input X!"
    )

    content_arr = clust_content[max_index]

    log.info(
        "***** Contents of the cluster with maximum number of elements! *****")
    # Prints contents of max cluster
    input_index = 0
    for y in X:
        if input_index in content_arr:
            log.info(y)
        input_index += 1

    log.debug("***** Contents of all clusters! *****")
    # Prints contents of all clusters

    for k in clust_content:
        content_arr = clust_content[k]
        log.debug("***** Contents of cluster #" + str(k) + ":  *****")
        log.debug("***** This cluster has " + str(num_clust[k]) +
                  " elements!  *****")

        input_index = 0
        for y in X:
            if input_index in content_arr:
                log.debug(y)
            input_index += 1


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * GeneratorSettings.java
 *
 * Created on 20-Jul-2009, 13:10:12
 */
package view.generatorSettings;

import controller.Controller;
import view.Display;

import java.awt.*;
import java.awt.event.KeyEvent;

/**
 * @author mb724
 */
public class GeneratorSettings extends javax.swing.JFrame {

    private final Controller controller;
    private Display parent;

    private javax.swing.JPanel pane;
    private javax.swing.JLabel graphTypeLabel;
    private javax.swing.JComboBox type;
    private javax.swing.JLabel help;
    private javax.swing.JCheckBox autodetermineIconCheckBox;
    private javax.swing.JLabel autodetermineIconHelp;
    private javax.swing.JButton ok;
    private javax.swing.JButton cancel;

    /**
     * Creates new form GeneratorSettings
     *
     * @param parent
     */
    public GeneratorSettings(Display parent) {
        this.parent = parent;
        initComponents();
        setVisible(true);
        pane.setLayout(new FlowLayout());
        type.setSelectedIndex(0);
        this.controller = parent.getController();
    }

    /**
     * Programatically sets the selected index of the combo box
     *
     * @param n
     */
    public void setIndex(int n) {
        type.setSelectedIndex(n);
    }

    @SuppressWarnings("unchecked")
    private void initComponents() {

        graphTypeLabel = new javax.swing.JLabel();
        type = new javax.swing.JComboBox();
        cancel = new javax.swing.JButton();
        ok = new javax.swing.JButton();
        pane = new javax.swing.JPanel();
        help = new javax.swing.JLabel();
        autodetermineIconCheckBox = new javax.swing.JCheckBox();
        autodetermineIconHelp = new javax.swing.JLabel();

        autodetermineIconCheckBox.setText("Autodetermine initial node type based on degree.");
        autodetermineIconHelp.setText("* If checked, vertex icons will be selected based on the number of connections
when the graph is initially generated.");

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Generate network");
        addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                formKeyTyped(evt);
            }
        });

        graphTypeLabel.setText("Graph type:");

        type.setModel(new javax.swing.DefaultComboBoxModel(new String[]{"Rectangular Lattice",
                                                                        "Hexagonal Lattice",
                                                                        "Scale-free",
                                                                        "Small-world",
                                                                        "Erdos-Renyi",
                                                                        "Random"}));
        type.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                typeActionPerformed(evt);
            }
        });

        cancel.setText("Cancel");
        cancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cancelActionPerformed(evt);
            }
        });

        ok.setText("OK");
        ok.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                okActionPerformed(evt);
            }
        });

        pane.setMinimumSize(new java.awt.Dimension(300, 300));

        javax.swing.GroupLayout paneLayout = new javax.swing.GroupLayout(pane);
        pane.setLayout(paneLayout);
        paneLayout.setHorizontalGroup(
                paneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 399, Short.MAX_VALUE)
        );
        paneLayout.setVerticalGroup(
                paneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 186, Short.MAX_VALUE)
        );

        help.setText("Instructions:");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(layout.createSequentialGroup()
                                        .addComponent(type, 0, 399, Short.MAX_VALUE)
                                        .addContainerGap())
                                .addGroup(layout.createSequentialGroup()
                                        .addComponent(pane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addContainerGap())
                                .addComponent(help, javax.swing.GroupLayout.DEFAULT_SIZE, 409, Short.MAX_VALUE)
                                .addGroup(layout.createSequentialGroup()
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(graphTypeLabel)
                                                .addComponent(autodetermineIconHelp)
                                                .addComponent(autodetermineIconCheckBox)
                                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                                        .addComponent(cancel)
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 283, Short.MAX_VALUE)
                                                        .addComponent(ok)))
                                        .addContainerGap())))
        );
        layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(graphTypeLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(type, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(help, javax.swing.GroupLayout.DEFAULT_SIZE, 152, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(pane, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(autodetermineIconCheckBox)
                        .addComponent(autodetermineIconHelp)
                        .addGap(32,32,32)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(ok)
                                .addComponent(cancel))
                        .addContainerGap())
        );

        pack();
    }

    private void cancelActionPerformed(java.awt.event.ActionEvent evt) {
        this.dispose();
    }

    private void typeActionPerformed(java.awt.event.ActionEvent evt) {
        int index = type.getSelectedIndex();
        pane.removeAll();
        if (index == 0) {
            pane.add(new LatticeSettings(this));
        }
        if (index == 1) {
            pane.add(new LatticeSettings(this));
        }
        if (index == 2) {
            pane.add(new BASettings(this));
        }
        if (index == 3) {
            pane.add(new SmallWorldSettings(this));
        }
        if (index == 4) {
            pane.add(new ErdosRenyiSettings(this));
        }
        help.setText("Parameters:");
        if (index == 5) {
            pane.add(new RandomSettings(this));
            help.setText("Parameters:
* Generates a new random graph with the specified number of nodes
and edges.");
        }
        pane.setVisible(true);
        pane.validate();
        pane.repaint();
        this.pack();
        this.repaint();
        this.validate();
    }

    private void listenForKeys(KeyEvent evt) {
        if (evt.getKeyChar() == KeyEvent.VK_ENTER) {
            ok.doClick();
        }
        if (evt.getKeyChar() == KeyEvent.VK_ESCAPE) {
            cancel.doClick();
        }
    }

    private void okActionPerformed(java.awt.event.ActionEvent evt) {
        boolean autodetermineIconType = autodetermineIconCheckBox.isSelected();
        try {
            switch (type.getSelectedIndex()) {
                case 0: {
                    controller.generate4Lattice(
                            Integer.parseInt(((LatticeSettings) pane.getComponent(0)).getM().getText()),
                            Integer.parseInt(((LatticeSettings) pane.getComponent(0)).getN().getText()),
                            Integer.parseInt(((LatticeSettings) pane.getComponent(0)).getN1().getText()), autodetermineIconType);
                    break;
                }
                case 1: {
                    controller.generate6Lattice(
                            Integer.parseInt(((LatticeSettings) pane.getComponent(0)).getM().getText()),
                            Integer.parseInt(((LatticeSettings) pane.getComponent(0)).getN().getText()),
                            Integer.parseInt(((LatticeSettings) pane.getComponent(0)).getN1().getText()), autodetermineIconType);
                    break;
                }
                case 2: {
                    controller.generateScaleFree(
                            Integer.parseInt(((BASettings) pane.getComponent(0)).getS().getText()), 1, 1, autodetermineIconType);
                    break;
                }
                case 3: {
                    controller.generateKleinbergSmallWorld(
                            Integer.parseInt(((SmallWorldSettings) pane.getComponent(0)).getM().getText()),
                            Integer.parseInt(((SmallWorldSettings) pane.getComponent(0)).getN().getText()),
                            Double.parseDouble(((SmallWorldSettings) pane.getComponent(0)).getE().getText()), autodetermineIconType);
                    break;
                }
                case 4: {
                    controller.generateErdosRenyi(
                            Integer.parseInt(((ErdosRenyiSettings) pane.getComponent(0)).getM().getText()),
                            Double.parseDouble(((ErdosRenyiSettings) pane.getComponent(0)).getP().getText()),
                            autodetermineIconType);
                    break;
                }
                case 5: {
                    controller.generateRandom(
                            Integer.parseInt(((RandomSettings) pane.getComponent(0)).getV().getText()),
                            Integer.parseInt(((RandomSettings) pane.getComponent(0)).getE().getText()), autodetermineIconType);
                    break;
                }
            }
//            Display.redisplayCompletely();
            dispose();
        } catch (IllegalArgumentException e) {
            //do nothing until the input verifier says so
        }
    }

    private void formKeyTyped(java.awt.event.KeyEvent evt) {
        listenForKeys(evt);
    }

    /**
     * Used by listeners in the classes, which provided the contents of
     * this.pane
     */
    protected void clickOk() {
        this.ok.doClick();
    }

    protected void clickCancel() {
        this.cancel.doClick();
    }
}


text:
namespace IPC {
namespace internal {

#ifdef IPC_MESSAGE_LOG_ENABLED

namespace {
std::string GetMessageText(const Message& message) {
  std::string name;
  Logging::GetInstance()->GetMessageText(
      message.type(), &name, &message, nullptr);
  return name;
}
}  // namespace

#define EMIT_TRACE_EVENT(message)                                       \
  TRACE_EVENT_WITH_FLOW1(                                               \
      "ipc,toplevel", "ChannelReader::DispatchInputData",               \
      (message).flags(), TRACE_EVENT_FLAG_FLOW_IN, "name",              \
      GetMessageText(message));
#else
#define EMIT_TRACE_EVENT(message)                                              \
  TRACE_EVENT_WITH_FLOW2("ipc,toplevel", "ChannelReader::DispatchInputData",   \
                         (message).flags(), TRACE_EVENT_FLAG_FLOW_IN, "class", \
                         IPC_MESSAGE_ID_CLASS((message).type()), "line",       \
                         IPC_MESSAGE_ID_LINE((message).type()));
#endif  // IPC_MESSAGE_LOG_ENABLED

ChannelReader::ChannelReader(Listener* listener)
  : listener_(listener),
    max_input_buffer_size_(Channel::kMaximumReadBufferSize) {
  memset(input_buf_, 0, sizeof(input_buf_));
}

ChannelReader::~ChannelReader() {
}

ChannelReader::DispatchState ChannelReader::ProcessIncomingMessages() {
  while (true) {
    int bytes_read = 0;
    ReadState read_state = ReadData(input_buf_, Channel::kReadBufferSize,
                                    &bytes_read);
    if (read_state == READ_FAILED)
      return DISPATCH_ERROR;
    if (read_state == READ_PENDING)
      return DISPATCH_FINISHED;

    DCHECK(bytes_read > 0);
    if (!TranslateInputData(input_buf_, bytes_read))
      return DISPATCH_ERROR;
  }
}

ChannelReader::DispatchState ChannelReader::AsyncReadComplete(int bytes_read) {
  if (!TranslateInputData(input_buf_, bytes_read))
    return DISPATCH_ERROR;

  return DISPATCH_FINISHED;
}

bool ChannelReader::IsInternalMessage(const Message& m) {
  return m.routing_id() == MSG_ROUTING_NONE &&
      m.type() >= Channel::CLOSE_FD_MESSAGE_TYPE &&
      m.type() <= Channel::HELLO_MESSAGE_TYPE;
}

bool ChannelReader::IsHelloMessage(const Message& m) {
  return m.routing_id() == MSG_ROUTING_NONE &&
      m.type() == Channel::HELLO_MESSAGE_TYPE;
}

void ChannelReader::CleanUp() {
}

void ChannelReader::DispatchMessage(Message* m) {
  EMIT_TRACE_EVENT(*m);
  listener_->OnMessageReceived(*m);
  HandleDispatchError(*m);
}

bool ChannelReader::TranslateInputData(const char* input_data,
                                       int input_data_len) {
  const char* p;
  const char* end;

  // Possibly combine with the overflow buffer to make a larger buffer.
  if (input_overflow_buf_.empty()) {
    p = input_data;
    end = input_data + input_data_len;
  } else {
    if (!CheckMessageSize(input_overflow_buf_.size() + input_data_len))
      return false;
    input_overflow_buf_.append(input_data, input_data_len);
    p = input_overflow_buf_.data();
    end = p + input_overflow_buf_.size();
  }

  size_t next_message_size = 0;

  // Dispatch all complete messages in the data buffer.
  while (p < end) {
    Message::NextMessageInfo info;
    Message::FindNext(p, end, &info);
    if (info.message_found) {
      int pickle_len = static_cast<int>(info.pickle_end - p);
      Message translated_message(p, pickle_len);

      if (!HandleTranslatedMessage(&translated_message))
        return false;

      p = info.message_end;
    } else {
      // Last message is partial.
      next_message_size = info.message_size;
      if (!CheckMessageSize(next_message_size))
        return false;
      break;
    }
  }

  // Account for the case where last message's byte is in the next data chunk.
  size_t next_message_buffer_size = next_message_size ?
      next_message_size + Channel::kReadBufferSize - 1:
      0;

  // Save any partial data in the overflow buffer.
  if (p != input_overflow_buf_.data())
    input_overflow_buf_.assign(p, end - p);

  if (!input_overflow_buf_.empty()) {
    // We have something in the overflow buffer, which means that we will
    // append the next data chunk (instead of parsing it directly). So we
    // resize the buffer to fit the next message, to avoid repeatedly
    // growing the buffer as we receive all message' data chunks.
    if (next_message_buffer_size > input_overflow_buf_.capacity()) {
      input_overflow_buf_.reserve(next_message_buffer_size);
    }
  }

  // Trim the buffer if we can
  if (next_message_buffer_size < max_input_buffer_size_ &&
      input_overflow_buf_.size() < max_input_buffer_size_ &&
      input_overflow_buf_.capacity() > max_input_buffer_size_) {
    // std::string doesn't really have a method to shrink capacity to
    // a specific value, so we have to swap with another string.
    std::string trimmed_buf;
    trimmed_buf.reserve(max_input_buffer_size_);
    if (trimmed_buf.capacity() > max_input_buffer_size_) {
      // Since we don't control how much space reserve() actually reserves,
      // we have to go other way around and change the max size to avoid
      // getting into the outer if() again.
      max_input_buffer_size_ = trimmed_buf.capacity();
    }
    trimmed_buf.assign(input_overflow_buf_.data(),
                       input_overflow_buf_.size());
    input_overflow_buf_.swap(trimmed_buf);
  }

  if (input_overflow_buf_.empty() && !DidEmptyInputBuffers())
    return false;
  return true;
}

bool ChannelReader::HandleTranslatedMessage(Message* translated_message) {
  // Immediately handle internal messages.
  if (IsInternalMessage(*translated_message)) {
    EMIT_TRACE_EVENT(*translated_message);
    HandleInternalMessage(*translated_message);
    HandleDispatchError(*translated_message);
    return true;
  }

  return HandleExternalMessage(translated_message);
}

bool ChannelReader::HandleExternalMessage(Message* external_message) {
  if (!GetAttachments(external_message))
    return false;

  DispatchMessage(external_message);
  return true;
}

void ChannelReader::HandleDispatchError(const Message& message) {
  if (message.dispatch_error())
    listener_->OnBadMessageReceived(message);
}

bool ChannelReader::CheckMessageSize(size_t size) {
  if (size <= Channel::kMaximumMessageSize) {
    return true;
  }
  input_overflow_buf_.clear();
  LOG(ERROR) << "IPC message is too big: " << size;
  return false;
}

}  // namespace internal
}  // namespace IPC


text:
#ifndef XENIA_CPU_RAW_MODULE_H_
#define XENIA_CPU_RAW_MODULE_H_

#include <string>

#include "xenia/cpu/module.h"

namespace xe {
namespace cpu {

class RawModule : public Module {
 public:
  explicit RawModule(Processor* processor);
  ~RawModule() override;

  bool LoadFile(uint32_t base_address, const std::filesystem::path& path);

  // Set address range if you've already allocated memory and placed code
  // in it.
  void SetAddressRange(uint32_t base_address, uint32_t size);

  const std::string& name() const override { return name_; }
  bool is_executable() const override { return is_executable_; }
  void set_name(const std::string_view name) { name_ = name; }
  void set_executable(bool is_executable) { is_executable_ = is_executable; }

  bool ContainsAddress(uint32_t address) override;

 protected:
  std::unique_ptr<Function> CreateFunction(uint32_t address) override;

 private:
  std::string name_;
  bool is_executable_ = false;
  uint32_t base_address_;
  uint32_t low_address_;
  uint32_t high_address_;
};

}  // namespace cpu
}  // namespace xe

#endif  // XENIA_CPU_RAW_MODULE_H_


text:
title:  Embrace the Loneliness
date:  26/04/2019
---

**Exploration**: John 16:32

**Conclude**

Loneliness is confirmation that we were created by a relational God. It is also evidence that sin has marred God's original plan for our lives. In that sense, we ought to embrace our loneliness as an experience that could deepen our relationship with God (cf. Rom. 5:3). Rather than pretending that we are not lonely, we need to acknowledge the feeling and allow God to minister to us through it. As we find our primary companionship in Christ, He will lead us to Christian fellowship that will ease the feelings of isolation we may face.

**Consider**

- Journaling about the times when you have felt lonely.
- Listening to the song "That's What the Lonely Is For" by David Wilcox and "Alone Yet Not Alone" by Joni Eareckson Tada.
- Reflecting on the times in the life of Christ when He was lonely. Consider especially His 40-day fast in the wilderness and His experience in Gethsemane.
- Writing a letter/email/message to someone you know to be lonely, such as a single person, a widow/widower, an orphan, or someone who has recently relocated.
- Spending a weekend alone with God. Ask Him to reveal areas of your life that He needs to shape.
- Composing a song that reflects the lessons you have learned during this week's study.
- CONNECT

- Ellen G. White, Counsels for the Church, chap. 1, "A Vision of the Reward of the Faithful," pp. 33–36; Daughters of God, pp. 229–230; The Desire of Ages, chap. 22, "Imprisonment and Death of John," pp. 214–224.

---

_Nompilo Hlatshwayo, Bulawayo, Zimbabwe_


text:
//
//  BUYObject.h
//  Mobile Buy SDK
//
//  Created by Shopify.
//  Copyright (c) 2015 Shopify Inc. All rights reserved.
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//

#import <Foundation/Foundation.h>
#import "BUYObjectProtocol.h"
#import "BUYModelManagerProtocol.h"
NS_ASSUME_NONNULL_BEGIN

@interface BUYObject : NSObject<BUYObject>

/**
 *  Objects marked as "dirty" are unsynced with Shopify and will
 *  sync on any calls to Shopify when updating a checkout.
 */
@property (nonatomic, readonly, getter=isDirty) BOOL dirty;

- (nullable NSSet *)dirtyProperties;
- (void)markPropertyAsDirty:(NSString *)property;
- (void)markAsClean;

@end

NS_ASSUME_NONNULL_END


text:
using UnityEditor.Rendering;
using UnityEngine;

namespace UnityEditor.Experimental.Rendering.HDPipeline
{

    partial class InfluenceVolumeUI
    {
        // We need to provide gamma values to the Gizmos and Handle because they are translated back to linear
        // during the drawing call.
        internal static readonly Color k_GizmoThemeColorBase = new Color(230 / 255f, 229 / 255f, 148 / 255f, 0.7f).gamma;
        static readonly Color k_GizmoThemeColorInfluence = new Color(83 / 255f, 255 / 255f, 95 / 255f, 0.7f).gamma;
        static readonly Color k_GizmoThemeColorInfluenceNormal = new Color(128 / 255f, 128 / 255f, 255 / 255f, 0.7f).gamma;
        internal static readonly Color[] k_HandlesColor = new Color[]
        {
            Color.red,
            Color.green,
            Color.blue,
            new Color(.5f, 0f, 0f, 1f),
            new Color(0f, .5f, 0f, 1f),
            new Color(0f, 0f, .5f, 1f)
        };

        static readonly GUIContent shapeContent = EditorGUIUtility.TrTextContent("Shape", "Specifies the shape of the Influence Volume.");
        static readonly GUIContent boxSizeContent = EditorGUIUtility.TrTextContent("Box Size", "Sets the size of the Box Influence Volume on a per axis basis. The Transform Scale does not affect these dimensions.");
        static readonly GUIContent offsetContent = EditorGUIUtility.TrTextContent("Offset", "Sets the coordinates for the Influence Volumes's center relative to the Transform Position.");
        static readonly GUIContent blendDistanceContent = EditorGUIUtility.TrTextContent("Blend Distance", "Sets the boundaries inside the Influence Volume within which the Reflection Probe blends with other Reflection Probes. Only available for deferred Reflection Probes.");
        static readonly GUIContent blendNormalDistanceContent = EditorGUIUtility.TrTextContent("Blend Normal Distance", "Area around the probe where the normals influence the probe. Only available for deferred Reflection Probes.");
        static readonly GUIContent faceFadeContent = EditorGUIUtility.TrTextContent("Face Fade", "Fade faces of the cubemap.");

        static readonly GUIContent radiusContent = EditorGUIUtility.TrTextContent("Radius", "Sets the radius of the Sphere Influence Volume. The Transform Scale does not affect this value.");

        static readonly GUIContent normalModeContent = EditorGUIUtility.TrTextContent("Normal", "Normal parameters mode (Box Shape only).");
        static readonly GUIContent advancedModeContent = EditorGUIUtility.TrTextContent("Advanced", "Advanced parameters mode (Box Shape only).");
    }
}


text:
typedef NSMutableArray <NSMutableArray<NSNumber *> *> YJIndexPathHeightsBySection;

@interface YJIndexPathHeightCache ()
@property (nonatomic, strong) YJIndexPathHeightsBySection *heightsBySectionForPortrait;
@property (nonatomic, strong) YJIndexPathHeightsBySection *heightsBySectionForLandscape;
@end

@implementation YJIndexPathHeightCache

- (instancetype)init
{
    self = [super init];
    if (self) {
        _heightsBySectionForPortrait = [NSMutableArray array];
        _heightsBySectionForLandscape = [NSMutableArray array];
    }
    return self;
}

- (YJIndexPathHeightsBySection *)heightsBySectionForCurrentOrientation {
    return UIDeviceOrientationIsPortrait([UIDevice currentDevice].orientation) ? self.heightsBySectionForPortrait: self.heightsBySectionForLandscape;
}

- (void)enumerateAllOrientationsUsingBlock:(void (^)(YJIndexPathHeightsBySection *heightsBySection))block {
    block(self.heightsBySectionForPortrait);
    block(self.heightsBySectionForLandscape);
}

- (BOOL)existsHeightAtIndexPath:(NSIndexPath *)indexPath {
    [self buildCachesAtIndexPathsIfNeeded:@[indexPath]];
    NSNumber *number = self.heightsBySectionForCurrentOrientation[indexPath.section][indexPath.row];
    return ![number isEqualToNumber:@-1];
}

- (void)cacheHeight:(CGFloat)height byIndexPath:(NSIndexPath *)indexPath {
    self.automaticallyInvalidateEnabled = YES;
    [self buildCachesAtIndexPathsIfNeeded:@[indexPath]];
    self.heightsBySectionForCurrentOrientation[indexPath.section][indexPath.row] = @(height);
}

- (CGFloat)heightForIndexPath:(NSIndexPath *)indexPath {
    [self buildCachesAtIndexPathsIfNeeded:@[indexPath]];
    NSNumber *number = self.heightsBySectionForCurrentOrientation[indexPath.section][indexPath.row];
#if CGFLOAT_IS_DOUBLE
    return number.doubleValue;
#else
    return number.floatValue;
#endif
}

- (void)invalidateHeightAtIndexPath:(NSIndexPath *)indexPath {
    [self buildCachesAtIndexPathsIfNeeded:@[indexPath]];
    [self enumerateAllOrientationsUsingBlock:^(YJIndexPathHeightsBySection *heightsBySection) {
        heightsBySection[indexPath.section][indexPath.row] = @-1;
    }];
}

- (void)invalidateAllHeightCache {
    [self enumerateAllOrientationsUsingBlock:^(YJIndexPathHeightsBySection *heightsBySection) {
        [heightsBySection removeAllObjects];
    }];
}

- (void)buildCachesAtIndexPathsIfNeeded:(NSArray *)indexPaths {
    // Build every section array or row array which is smaller than given index path.
    [indexPaths enumerateObjectsUsingBlock:^(NSIndexPath *indexPath, NSUInteger idx, BOOL *stop) {
        [self buildSectionsIfNeeded:indexPath.section];
        [self buildRowsIfNeeded:indexPath.row inExistSection:indexPath.section];
    }];
}

- (void)buildSectionsIfNeeded:(NSInteger)targetSection {
    [self enumerateAllOrientationsUsingBlock:^(YJIndexPathHeightsBySection *heightsBySection) {
        for (NSInteger section = 0; section <= targetSection; ++section) {
            if (section >= heightsBySection.count) {
                heightsBySection[section] = [NSMutableArray array];
            }
        }
    }];
}

- (void)buildRowsIfNeeded:(NSInteger)targetRow inExistSection:(NSInteger)section {
    [self enumerateAllOrientationsUsingBlock:^(YJIndexPathHeightsBySection *heightsBySection) {
        NSMutableArray<NSNumber *> *heightsByRow = heightsBySection[section];
        for (NSInteger row = 0; row <= targetRow; ++row) {
            if (row >= heightsByRow.count) {
                heightsByRow[row] = @-1;
            }
        }
    }];
}

@end

@implementation UITableView (YJIndexPathHeightCache)

- (YJIndexPathHeightCache *)yj_indexPathHeightCache {
    YJIndexPathHeightCache *cache = objc_getAssociatedObject(self, _cmd);
    if (!cache) {
        cache = [YJIndexPathHeightCache new];
        objc_setAssociatedObject(self, _cmd, cache, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
    }
    return cache;
}

@end

static void __YJ_TEMPLATE_LAYOUT_CELL_PRIMARY_CALL_IF_CRASH_NOT_OUR_BUG__(void (^callout)(void)) {
    callout();
}
#define YJPrimaryCall(...) do {__YJ_TEMPLATE_LAYOUT_CELL_PRIMARY_CALL_IF_CRASH_NOT_OUR_BUG__(^{__VA_ARGS__});} while(0)

@implementation UITableView (YJIndexPathHeightCacheInvalidation)

- (void)yj_reloadDataWithoutInvalidateIndexPathHeightCache {
    YJPrimaryCall([self yj_reloadData];);
}

+ (void)load {
    //所有会触发高度缓存失效的方法
    SEL selectors[] = {
        @selector(reloadData),
        @selector(insertSections:withRowAnimation:),
        @selector(deleteSections:withRowAnimation:),
        @selector(reloadSections:withRowAnimation:),
        @selector(moveSection:toSection:),
        @selector(insertRowsAtIndexPaths:withRowAnimation:),
        @selector(deleteRowsAtIndexPaths:withRowAnimation:),
        @selector(reloadRowsAtIndexPaths:withRowAnimation:),
        @selector(moveRowAtIndexPath:toIndexPath:)
    };

    for (NSUInteger index = 0; index < sizeof(selectors) / sizeof(SEL); ++index) {
        SEL originalSelector = selectors[index];
        SEL swizzledSelector = NSSelectorFromString([@"yj_" stringByAppendingString:NSStringFromSelector(originalSelector)]);
        Method originalMethod = class_getInstanceMethod(self, originalSelector);
        Method swizzledMethod = class_getInstanceMethod(self, swizzledSelector);
        method_exchangeImplementations(originalMethod, swizzledMethod);
    }
}

- (void)yj_reloadData {
    if(self.yj_indexPathHeightCache.automaticallyInvalidateEnabled) {
        [self.yj_indexPathHeightCache enumerateAllOrientationsUsingBlock:^(YJIndexPathHeightsBySection *heightsBySection) {
            [heightsBySection removeAllObjects];
        }];
    }
    YJPrimaryCall([self yj_reloadData];);
}

- (void)yj_insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation {
    if (self.yj_indexPathHeightCache.automaticallyInvalidateEnabled) {
        [sections enumerateIndexesUsingBlock:^(NSUInteger section, BOOL *stop) {
            [self.yj_indexPathHeightCache buildSectionsIfNeeded:section];
            [self.yj_indexPathHeightCache enumerateAllOrientationsUsingBlock:^(YJIndexPathHeightsBySection *heightsBySection) {
                [heightsBySection insertObject:[NSMutableArray array] atIndex:section];
            }];
        }];
    }
    YJPrimaryCall([self yj_insertSections:sections withRowAnimation:animation];);
}

- (void)fd_deleteSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation {
    if (self.yj_indexPathHeightCache.automaticallyInvalidateEnabled) {
        [sections enumerateIndexesUsingBlock:^(NSUInteger section, BOOL *stop) {
            [self.yj_indexPathHeightCache buildSectionsIfNeeded:section];
            [self.yj_indexPathHeightCache enumerateAllOrientationsUsingBlock:^(YJIndexPathHeightsBySection *heightsBySection) {
                [heightsBySection removeObjectAtIndex:section];
            }];
        }];
    }
    YJPrimaryCall([self fd_deleteSections:sections withRowAnimation:animation];);
}

- (void)yj_reloadSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation {
    if (self.yj_indexPathHeightCache.automaticallyInvalidateEnabled) {
        [sections enumerateIndexesUsingBlock: ^(NSUInteger section, BOOL *stop) {
            [self.yj_indexPathHeightCache buildSectionsIfNeeded:section];
            [self.yj_indexPathHeightCache enumerateAllOrientationsUsingBlock:^(YJIndexPathHeightsBySection *heightsBySection) {
                [heightsBySection[section] removeAllObjects];
            }];

        }];
    }
    YJPrimaryCall([self yj_reloadSections:sections withRowAnimation:animation];);
}

- (void)yj_moveSection:(NSInteger)section toSection:(NSInteger)newSection {
    if (self.yj_indexPathHeightCache.automaticallyInvalidateEnabled) {
        [self.yj_indexPathHeightCache buildSectionsIfNeeded:section];
        [self.yj_indexPathHeightCache buildSectionsIfNeeded:newSection];
        [self.yj_indexPathHeightCache enumerateAllOrientationsUsingBlock:^(YJIndexPathHeightsBySection *heightsBySection) {
            [heightsBySection exchangeObjectAtIndex:section withObjectAtIndex:newSection];
        }];
    }
    YJPrimaryCall([self yj_moveSection:section toSection:newSection];);
}

- (void)yj_insertRowsAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation {
    if (self.yj_indexPathHeightCache.automaticallyInvalidateEnabled) {
        [self.yj_indexPathHeightCache buildCachesAtIndexPathsIfNeeded:indexPaths];
        [indexPaths enumerateObjectsUsingBlock:^(NSIndexPath *indexPath, NSUInteger idx, BOOL *stop) {
            [self.yj_indexPathHeightCache enumerateAllOrientationsUsingBlock:^(YJIndexPathHeightsBySection *heightsBySection) {
                [heightsBySection[indexPath.section] insertObject:@-1 atIndex:indexPath.row];
            }];
        }];
    }
    YJPrimaryCall([self yj_insertRowsAtIndexPaths:indexPaths withRowAnimation:animation];);
}

- (void)yj_deleteRowsAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation {
    if (self.yj_indexPathHeightCache.automaticallyInvalidateEnabled) {
        [self.yj_indexPathHeightCache buildCachesAtIndexPathsIfNeeded:indexPaths];

        NSMutableDictionary<NSNumber *, NSMutableIndexSet *> *mutableIndexSetsToRemove = [NSMutableDictionary dictionary];
        [indexPaths enumerateObjectsUsingBlock:^(NSIndexPath *indexPath, NSUInteger idx, BOOL *stop) {
            NSMutableIndexSet *mutableIndexSet = mutableIndexSetsToRemove[@(indexPath.section)];
            if (!mutableIndexSet) {
                mutableIndexSet = [NSMutableIndexSet indexSet];
                mutableIndexSetsToRemove[@(indexPath.section)] = mutableIndexSet;
            }
            [mutableIndexSet addIndex:indexPath.row];
        }];

        [mutableIndexSetsToRemove enumerateKeysAndObjectsUsingBlock:^(NSNumber *key, NSIndexSet *indexSet, BOOL *stop) {
            [self.yj_indexPathHeightCache enumerateAllOrientationsUsingBlock:^(YJIndexPathHeightsBySection *heightsBySection) {
                [heightsBySection[key.integerValue] removeObjectsAtIndexes:indexSet];
            }];
        }];
    }
    YJPrimaryCall([self yj_deleteRowsAtIndexPaths:indexPaths withRowAnimation:animation];);
}

- (void)yj_reloadRowsAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation {
    if (self.yj_indexPathHeightCache.automaticallyInvalidateEnabled) {
        [self.yj_indexPathHeightCache buildCachesAtIndexPathsIfNeeded:indexPaths];
        [indexPaths enumerateObjectsUsingBlock:^(NSIndexPath *indexPath, NSUInteger idx, BOOL *stop) {
            [self.yj_indexPathHeightCache enumerateAllOrientationsUsingBlock:^(YJIndexPathHeightsBySection *heightsBySection) {
                heightsBySection[indexPath.section][indexPath.row] = @-1;
            }];
        }];
    }
    YJPrimaryCall([self yj_reloadRowsAtIndexPaths:indexPaths withRowAnimation:animation];);
}

- (void)yj_moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath {
    if (self.yj_indexPathHeightCache.automaticallyInvalidateEnabled) {
        [self.yj_indexPathHeightCache buildCachesAtIndexPathsIfNeeded:@[sourceIndexPath, destinationIndexPath]];
        [self.yj_indexPathHeightCache enumerateAllOrientationsUsingBlock:^(YJIndexPathHeightsBySection *heightsBySection) {
            NSMutableArray<NSNumber *> *sourceRows = heightsBySection[sourceIndexPath.section];
            NSMutableArray<NSNumber *> *destinationRows = heightsBySection[destinationIndexPath.section];
            NSNumber *sourceValue = sourceRows[sourceIndexPath.row];
            NSNumber *destinationValue = destinationRows[destinationIndexPath.row];
            sourceRows[sourceIndexPath.row] = destinationValue;
            destinationRows[destinationIndexPath.row] = sourceValue;
        }];
    }
    YJPrimaryCall([self yj_moveRowAtIndexPath:sourceIndexPath toIndexPath:destinationIndexPath];);
}

@end


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.datafactory.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.datafactory.fluent.models.AzureSqlMILinkedServiceTypeProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;
import java.util.Map;

/** Azure SQL Managed Instance linked service. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeName("AzureSqlMI")
@Fluent
public final class AzureSqlMILinkedService extends LinkedService {
    /*
     * Azure SQL Managed Instance linked service properties.
     */
    @JsonProperty(value = "typeProperties", required = true)
    private AzureSqlMILinkedServiceTypeProperties innerTypeProperties = new AzureSqlMILinkedServiceTypeProperties();

    /** Creates an instance of AzureSqlMILinkedService class. */
    public AzureSqlMILinkedService() {
    }

    /**
     * Get the innerTypeProperties property: Azure SQL Managed Instance linked service properties.
     *
     * @return the innerTypeProperties value.
     */
    private AzureSqlMILinkedServiceTypeProperties innerTypeProperties() {
        return this.innerTypeProperties;
    }

    /** {@inheritDoc} */
    @Override
    public AzureSqlMILinkedService withConnectVia(IntegrationRuntimeReference connectVia) {
        super.withConnectVia(connectVia);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public AzureSqlMILinkedService withDescription(String description) {
        super.withDescription(description);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public AzureSqlMILinkedService withParameters(Map<String, ParameterSpecification> parameters) {
        super.withParameters(parameters);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public AzureSqlMILinkedService withAnnotations(List<Object> annotations) {
        super.withAnnotations(annotations);
        return this;
    }

    /**
     * Get the connectionString property: The connection string. Type: string, SecureString or
     * AzureKeyVaultSecretReference.
     *
     * @return the connectionString value.
     */
    public Object connectionString() {
        return this.innerTypeProperties() == null ? null : this.innerTypeProperties().connectionString();
    }

    /**
     * Set the connectionString property: The connection string. Type: string, SecureString or
     * AzureKeyVaultSecretReference.
     *
     * @param connectionString the connectionString value to set.
     * @return the AzureSqlMILinkedService object itself.
     */
    public AzureSqlMILinkedService withConnectionString(Object connectionString) {
        if (this.innerTypeProperties() == null) {
            this.innerTypeProperties = new AzureSqlMILinkedServiceTypeProperties();
        }
        this.innerTypeProperties().withConnectionString(connectionString);
        return this;
    }

    /**
     * Get the password property: The Azure key vault secret reference of password in connection string.
     *
     * @return the password value.
     */
    public AzureKeyVaultSecretReference password() {
        return this.innerTypeProperties() == null ? null : this.innerTypeProperties().password();
    }

    /**
     * Set the password property: The Azure key vault secret reference of password in connection string.
     *
     * @param password the password value to set.
     * @return the AzureSqlMILinkedService object itself.
     */
    public AzureSqlMILinkedService withPassword(AzureKeyVaultSecretReference password) {
        if (this.innerTypeProperties() == null) {
            this.innerTypeProperties = new AzureSqlMILinkedServiceTypeProperties();
        }
        this.innerTypeProperties().withPassword(password);
        return this;
    }

    /**
     * Get the servicePrincipalId property: The ID of the service principal used to authenticate against Azure SQL
     * Managed Instance. Type: string (or Expression with resultType string).
     *
     * @return the servicePrincipalId value.
     */
    public Object servicePrincipalId() {
        return this.innerTypeProperties() == null ? null : this.innerTypeProperties().servicePrincipalId();
    }

    /**
     * Set the servicePrincipalId property: The ID of the service principal used to authenticate against Azure SQL
     * Managed Instance. Type: string (or Expression with resultType string).
     *
     * @param servicePrincipalId the servicePrincipalId value to set.
     * @return the AzureSqlMILinkedService object itself.
     */
    public AzureSqlMILinkedService withServicePrincipalId(Object servicePrincipalId) {
        if (this.innerTypeProperties() == null) {
            this.innerTypeProperties = new AzureSqlMILinkedServiceTypeProperties();
        }
        this.innerTypeProperties().withServicePrincipalId(servicePrincipalId);
        return this;
    }

    /**
     * Get the servicePrincipalKey property: The key of the service principal used to authenticate against Azure SQL
     * Managed Instance.
     *
     * @return the servicePrincipalKey value.
     */
    public SecretBase servicePrincipalKey() {
        return this.innerTypeProperties() == null ? null : this.innerTypeProperties().servicePrincipalKey();
    }

    /**
     * Set the servicePrincipalKey property: The key of the service principal used to authenticate against Azure SQL
     * Managed Instance.
     *
     * @param servicePrincipalKey the servicePrincipalKey value to set.
     * @return the AzureSqlMILinkedService object itself.
     */
    public AzureSqlMILinkedService withServicePrincipalKey(SecretBase servicePrincipalKey) {
        if (this.innerTypeProperties() == null) {
            this.innerTypeProperties = new AzureSqlMILinkedServiceTypeProperties();
        }
        this.innerTypeProperties().withServicePrincipalKey(servicePrincipalKey);
        return this;
    }

    /**
     * Get the tenant property: The name or ID of the tenant to which the service principal belongs. Type: string (or
     * Expression with resultType string).
     *
     * @return the tenant value.
     */
    public Object tenant() {
        return this.innerTypeProperties() == null ? null : this.innerTypeProperties().tenant();
    }

    /**
     * Set the tenant property: The name or ID of the tenant to which the service principal belongs. Type: string (or
     * Expression with resultType string).
     *
     * @param tenant the tenant value to set.
     * @return the AzureSqlMILinkedService object itself.
     */
    public AzureSqlMILinkedService withTenant(Object tenant) {
        if (this.innerTypeProperties() == null) {
            this.innerTypeProperties = new AzureSqlMILinkedServiceTypeProperties();
        }
        this.innerTypeProperties().withTenant(tenant);
        return this;
    }

    /**
     * Get the azureCloudType property: Indicates the azure cloud type of the service principle auth. Allowed values are
     * AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions' cloud type.
     * Type: string (or Expression with resultType string).
     *
     * @return the azureCloudType value.
     */
    public Object azureCloudType() {
        return this.innerTypeProperties() == null ? null : this.innerTypeProperties().azureCloudType();
    }

    /**
     * Set the azureCloudType property: Indicates the azure cloud type of the service principle auth. Allowed values are
     * AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions' cloud type.
     * Type: string (or Expression with resultType string).
     *
     * @param azureCloudType the azureCloudType value to set.
     * @return the AzureSqlMILinkedService object itself.
     */
    public AzureSqlMILinkedService withAzureCloudType(Object azureCloudType) {
        if (this.innerTypeProperties() == null) {
            this.innerTypeProperties = new AzureSqlMILinkedServiceTypeProperties();
        }
        this.innerTypeProperties().withAzureCloudType(azureCloudType);
        return this;
    }

    /**
     * Get the encryptedCredential property: The encrypted credential used for authentication. Credentials are encrypted
     * using the integration runtime credential manager. Type: string (or Expression with resultType string).
     *
     * @return the encryptedCredential value.
     */
    public Object encryptedCredential() {
        return this.innerTypeProperties() == null ? null : this.innerTypeProperties().encryptedCredential();
    }

    /**
     * Set the encryptedCredential property: The encrypted credential used for authentication. Credentials are encrypted
     * using the integration runtime credential manager. Type: string (or Expression with resultType string).
     *
     * @param encryptedCredential the encryptedCredential value to set.
     * @return the AzureSqlMILinkedService object itself.
     */
    public AzureSqlMILinkedService withEncryptedCredential(Object encryptedCredential) {
        if (this.innerTypeProperties() == null) {
            this.innerTypeProperties = new AzureSqlMILinkedServiceTypeProperties();
        }
        this.innerTypeProperties().withEncryptedCredential(encryptedCredential);
        return this;
    }

    /**
     * Get the alwaysEncryptedSettings property: Sql always encrypted properties.
     *
     * @return the alwaysEncryptedSettings value.
     */
    public SqlAlwaysEncryptedProperties alwaysEncryptedSettings() {
        return this.innerTypeProperties() == null ? null : this.innerTypeProperties().alwaysEncryptedSettings();
    }

    /**
     * Set the alwaysEncryptedSettings property: Sql always encrypted properties.
     *
     * @param alwaysEncryptedSettings the alwaysEncryptedSettings value to set.
     * @return the AzureSqlMILinkedService object itself.
     */
    public AzureSqlMILinkedService withAlwaysEncryptedSettings(SqlAlwaysEncryptedProperties alwaysEncryptedSettings) {
        if (this.innerTypeProperties() == null) {
            this.innerTypeProperties = new AzureSqlMILinkedServiceTypeProperties();
        }
        this.innerTypeProperties().withAlwaysEncryptedSettings(alwaysEncryptedSettings);
        return this;
    }

    /**
     * Get the credential property: The credential reference containing authentication information.
     *
     * @return the credential value.
     */
    public CredentialReference credential() {
        return this.innerTypeProperties() == null ? null : this.innerTypeProperties().credential();
    }

    /**
     * Set the credential property: The credential reference containing authentication information.
     *
     * @param credential the credential value to set.
     * @return the AzureSqlMILinkedService object itself.
     */
    public AzureSqlMILinkedService withCredential(CredentialReference credential) {
        if (this.innerTypeProperties() == null) {
            this.innerTypeProperties = new AzureSqlMILinkedServiceTypeProperties();
        }
        this.innerTypeProperties().withCredential(credential);
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
        if (innerTypeProperties() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property innerTypeProperties in model AzureSqlMILinkedService"));
        } else {
            innerTypeProperties().validate();
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(AzureSqlMILinkedService.class);
}


text:
@implementation TranslateSchoolNamesToCoordsItem

@end


text:
import os, re

class Resources:

    APP_NAME = "HipScud"
    SIGNIN_URL = "https://www.hipchat.com/sign_in"
    HOMEPAGE_URL_RE = re.compile(r'^http[s]://[a-zA-Z0-9_\-\.]+/home')
    CHAT_URL_RE = re.compile(r'^http[s]://[a-zA-Z0-9_\-\.]+/chat')

    SPELL_DICT_PATH = "/usr/share/hunspell/"
    SPELL_LIMIT = 6

    # It's initialized in /hipscud script
    INSTALL_DIR = os.path.dirname(os.path.realpath(__file__))

    def get_path(filename):
        return os.path.join(Resources.INSTALL_DIR, 'resources', filename)