text:
package cmd

import (
	"bytes"
	"net/http"
	"strings"
	"testing"

	"k8s.io/kubernetes/pkg/api"
	client "k8s.io/kubernetes/pkg/client/unversioned"
	"k8s.io/kubernetes/pkg/runtime"
	"k8s.io/kubernetes/pkg/util"
)

func TestRunExposeService(t *testing.T) {
	tests := []struct {
		name     string
		args     []string
		ns       string
		calls    map[string]string
		input    runtime.Object
		flags    map[string]string
		output   runtime.Object
		expected string
		status   int
	}{
		{
			name: "expose-service-from-service-no-selector-defined",
			args: []string{"service", "baz"},
			ns:   "test",
			calls: map[string]string{
				"GET":  "/namespaces/test/services/baz",
				"POST": "/namespaces/test/services",
			},
			input: &api.Service{
				ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"},
				Spec: api.ServiceSpec{
					Selector: map[string]string{"app": "go"},
				},
			},
			flags: map[string]string{"protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test"},
			output: &api.Service{
				ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}},
				Spec: api.ServiceSpec{
					Ports: []api.ServicePort{
						{
							Protocol:   api.ProtocolUDP,
							Port:       14,
							TargetPort: util.NewIntOrStringFromInt(14),
						},
					},
					Selector: map[string]string{"app": "go"},
				},
			},
			expected: "service \"foo\" exposed",
			status:   200,
		},
		{
			name: "expose-service-from-service",
			args: []string{"service", "baz"},
			ns:   "test",
			calls: map[string]string{
				"GET":  "/namespaces/test/services/baz",
				"POST": "/namespaces/test/services",
			},
			input: &api.Service{
				ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"},
				Spec: api.ServiceSpec{
					Selector: map[string]string{"app": "go"},
				},
			},
			flags: map[string]string{"selector": "func=stream", "protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test"},
			output: &api.Service{
				ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}},
				Spec: api.ServiceSpec{
					Ports: []api.ServicePort{
						{
							Protocol:   api.ProtocolUDP,
							Port:       14,
							TargetPort: util.NewIntOrStringFromInt(14),
						},
					},
					Selector: map[string]string{"func": "stream"},
				},
			},
			expected: "service \"foo\" exposed",
			status:   200,
		},
		{
			name: "no-name-passed-from-the-cli",
			args: []string{"service", "mayor"},
			ns:   "default",
			calls: map[string]string{
				"GET":  "/namespaces/default/services/mayor",
				"POST": "/namespaces/default/services",
			},
			input: &api.Service{
				ObjectMeta: api.ObjectMeta{Name: "mayor", Namespace: "default", ResourceVersion: "12"},
				Spec: api.ServiceSpec{
					Selector: map[string]string{"run": "this"},
				},
			},
			// No --name flag specified below. Service will use the rc's name passed via the 'default-name' parameter
			flags: map[string]string{"selector": "run=this", "port": "80", "labels": "runas=amayor"},
			output: &api.Service{
				ObjectMeta: api.ObjectMeta{Name: "mayor", Namespace: "", Labels: map[string]string{"runas": "amayor"}},
				Spec: api.ServiceSpec{
					Ports: []api.ServicePort{
						{
							Protocol:   api.ProtocolTCP,
							Port:       80,
							TargetPort: util.NewIntOrStringFromInt(80),
						},
					},
					Selector: map[string]string{"run": "this"},
				},
			},
			expected: "service \"mayor\" exposed",
			status:   200,
		},
		{
			name: "expose-external-service",
			args: []string{"service", "baz"},
			ns:   "test",
			calls: map[string]string{
				"GET":  "/namespaces/test/services/baz",
				"POST": "/namespaces/test/services",
			},
			input: &api.Service{
				ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"},
				Spec: api.ServiceSpec{
					Selector: map[string]string{"app": "go"},
				},
			},
			flags: map[string]string{"selector": "func=stream", "protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test", "create-external-load-balancer": "true"},
			output: &api.Service{
				ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}},
				Spec: api.ServiceSpec{
					Ports: []api.ServicePort{
						{
							Protocol:   api.ProtocolUDP,
							Port:       14,
							TargetPort: util.NewIntOrStringFromInt(14),
						},
					},
					Selector: map[string]string{"func": "stream"},
					Type:     api.ServiceTypeLoadBalancer,
				},
			},
			expected: "service \"foo\" exposed",
			status:   200,
		},
		{
			name: "expose-external-affinity-service",
			args: []string{"service", "baz"},
			ns:   "test",
			calls: map[string]string{
				"GET":  "/namespaces/test/services/baz",
				"POST": "/namespaces/test/services",
			},
			input: &api.Service{
				ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"},
				Spec: api.ServiceSpec{
					Selector: map[string]string{"app": "go"},
				},
			},
			flags: map[string]string{"selector": "func=stream", "protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test", "create-external-load-balancer": "true", "session-affinity": "ClientIP"},
			output: &api.Service{
				ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}},
				Spec: api.ServiceSpec{
					Ports: []api.ServicePort{
						{
							Protocol:   api.ProtocolUDP,
							Port:       14,
							TargetPort: util.NewIntOrStringFromInt(14),
						},
					},
					Selector:        map[string]string{"func": "stream"},
					Type:            api.ServiceTypeLoadBalancer,
					SessionAffinity: api.ServiceAffinityClientIP,
				},
			},
			expected: "service \"foo\" exposed",
			status:   200,
		},
		{
			name: "expose-external-service",
			args: []string{"service", "baz"},
			ns:   "test",
			calls: map[string]string{
				"GET":  "/namespaces/test/services/baz",
				"POST": "/namespaces/test/services",
			},
			input: &api.Service{
				ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"},
				Spec: api.ServiceSpec{
					Ports: []api.ServicePort{},
				},
			},
			// Even if we specify --selector, since service/test doesn't need one it will ignore it
			flags: map[string]string{"selector": "svc=fromexternal", "port": "90", "labels": "svc=fromexternal", "name": "frombaz", "generator": "service/test"},
			output: &api.Service{
				ObjectMeta: api.ObjectMeta{Name: "frombaz", Namespace: "", Labels: map[string]string{"svc": "fromexternal"}},
				Spec: api.ServiceSpec{
					Ports: []api.ServicePort{
						{
							Protocol:   api.ProtocolTCP,
							Port:       90,
							TargetPort: util.NewIntOrStringFromInt(90),
						},
					},
				},
			},
			expected: "service \"frombaz\" exposed",
			status:   200,
		},
	}

	for _, test := range tests {
		f, tf, codec := NewAPIFactory()
		tf.Printer = &testPrinter{}
		tf.Client = &client.FakeRESTClient{
			Codec: codec,
			Client: client.HTTPClientFunc(func(req *http.Request) (*http.Response, error) {
				switch p, m := req.URL.Path, req.Method; {
				case p == test.calls[m] && m == "GET":
					return &http.Response{StatusCode: test.status, Body: objBody(codec, test.input)}, nil
				case p == test.calls[m] && m == "POST":
					return &http.Response{StatusCode: test.status, Body: objBody(codec, test.output)}, nil
				default:
					t.Fatalf("unexpected request: %#v\n%#v", req.URL, req)
					return nil, nil
				}
			}),
		}
		tf.Namespace = test.ns
		buf := bytes.NewBuffer([]byte{})

		cmd := NewCmdExposeService(f, buf)
		cmd.SetOutput(buf)
		for flag, value := range test.flags {
			cmd.Flags().Set(flag, value)
		}
		cmd.Run(cmd, test.args)

		out, expectedOut := buf.String(), test.expected
		if !strings.Contains(out, expectedOut) {
			t.Errorf("%s: Unexpected output! Expected\n%s\ngot\n%s", test.name, expectedOut, out)
		}
	}
}

func TestRunExposeServiceFromFile(t *testing.T) {
	test := struct {
		calls    map[string]string
		input    runtime.Object
		flags    map[string]string
		output   runtime.Object
		expected string
		status   int
	}{
		calls: map[string]string{
			"GET":  "/namespaces/test/services/redis-master",
			"POST": "/namespaces/test/services",
		},
		input: &api.Service{
			ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"},
			TypeMeta:   api.TypeMeta{Kind: "Service", APIVersion: "v1"},
			Spec: api.ServiceSpec{
				Selector: map[string]string{"app": "go"},
			},
		},
		flags: map[string]string{"selector": "func=stream", "protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test"},
		output: &api.Service{
			ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "12", Labels: map[string]string{"svc": "test"}},
			TypeMeta:   api.TypeMeta{Kind: "Service", APIVersion: "v1"},
			Spec: api.ServiceSpec{
				Ports: []api.ServicePort{
					{
						Name:     "default",
						Protocol: api.Protocol("UDP"),
						Port:     14,
					},
				},
				Selector: map[string]string{"func": "stream"},
			},
		},
		status: 200,
	}

	f, tf, codec := NewAPIFactory()
	tf.Printer = &testPrinter{}
	tf.Client = &client.FakeRESTClient{
		Codec: codec,
		Client: client.HTTPClientFunc(func(req *http.Request) (*http.Response, error) {
			switch p, m := req.URL.Path, req.Method; {
			case p == test.calls[m] && m == "GET":
				return &http.Response{StatusCode: test.status, Body: objBody(codec, test.input)}, nil
			case p == test.calls[m] && m == "POST":
				return &http.Response{StatusCode: test.status, Body: objBody(codec, test.output)}, nil
			default:
				t.Fatalf("unexpected request: %#v\n%#v", req.URL, req)
				return nil, nil
			}
		}),
	}
	tf.Namespace = "test"
	buf := bytes.NewBuffer([]byte{})

	cmd := NewCmdExposeService(f, buf)
	cmd.SetOutput(buf)

	for flag, value := range test.flags {
		cmd.Flags().Set(flag, value)
	}
	cmd.Flags().Set("filename", "../../../examples/guestbook/redis-master-service.yaml")
	cmd.Run(cmd, []string{})
	if len(test.expected) > 0 {
		out := buf.String()
		if !strings.Contains(out, test.expected) {
			t.Errorf("unexpected output: %s", out)
		}
	}
}


text:
package com.nicolas.coding.model;

import android.graphics.Color;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.Serializable;

/**
 * Created by Neutra on 2015/4/23.
 * 标签的数据结构
 */
public class TopicLabelObject implements Serializable {
    public int id;
    public int count;
    public String name;
    private int color;

    public TopicLabelObject(JSONObject json) throws JSONException {
        id = json.optInt("id");
        name = json.optString("name", "");
        count = json.optInt("count", 0);
        String colorString = json.optString("color", "#222222");
        color = Color.parseColor(colorString);
    }

    public TopicLabelObject(int id, String name, int color) {
        this.id = id;
        this.name = name;
        this.color = color;
    }

    public TopicLabelObject(TopicLabelObject src) {
        id = src.id;
        name = src.name;
        count = src.count;
        color = src.getColor();
    }

    public int getColor() {
        return color;
    }

    public boolean isEmpty() {
        return name == null || name.isEmpty();
    }
}

redpajama_set_name: RedPajamaGithub


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using Microsoft.MixedReality.Toolkit.Core.Definitions;
using Microsoft.MixedReality.Toolkit.Core.Definitions.Devices;
using UnityEngine;

namespace Microsoft.MixedReality.Toolkit.Core.DataProviders.Controllers
{
    /// <summary>
    /// Base Controller Mapping profile.
    /// </summary>
    public abstract class BaseMixedRealityControllerMappingProfile : BaseMixedRealityProfile
    {
        [SerializeField]
        private bool hasSetupDefaults = false;

        /// <summary>
        /// Has this controller profile setup the default interactions?
        /// </summary>
        protected bool HasSetupDefaults => hasSetupDefaults;

        /// <summary>
        /// The supported controller type for this profile.
        /// </summary>
        public virtual SupportedControllerType ControllerType => SupportedControllerType.GenericUnity;

        [SerializeField]
        private MixedRealityControllerMapping[] controllerMappings;

        /// <summary>
        /// The controller mappings for this device.
        /// </summary>
        public MixedRealityControllerMapping[] ControllerMappings
        {
            get { return controllerMappings; }
            protected set { controllerMappings = value; }
        }

        protected virtual void Awake()
        {
            if (!hasSetupDefaults)
            {
                for (int i = 0; i < controllerMappings?.Length; i++)
                {
                    controllerMappings[i].SetDefaultInteractionMapping();
                }

                hasSetupDefaults = true;
            }
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 323401 $ -->

<refentry xml:id="sessionhandlerinterface.destroy" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>SessionHandlerInterface::destroy</refname>
  <refpurpose>Destroy a session</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <modifier>abstract</modifier> <modifier>public</modifier> <type>bool</type><methodname>SessionHandlerInterface::destroy</methodname>
   <methodparam><type>string</type><parameter>session_id</parameter></methodparam>
  </methodsynopsis>
  <para>
   Destroys a session. Called by <function>session_regenerate_id</function> (with $destroy = &true;),
   <function>session_destroy</function> and when <function>session_decode</function> fails.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>session_id</parameter></term>
     <listitem>
      <para>
       The session ID being destroyed.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   &returns.session.storage.retval;
  </para>
 </refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->


text:
<?php

namespace AppBundle\Services\Badges;

use AppBundle\Entity\RecordHolderPerson;

class RecordHandler
{
    const IDENT = 'record';

    /**
     * @param RecordHolderPerson $recordHolderPerson
     */
    public function handle(RecordHolderPerson $recordHolderPerson)
    {
        // throw new \Exception("TODO");
    }
}


text:
singleton TSShapeConstructor(PlayerAnim_Turret_SittingDAE)
{
   baseShape = "./PlayerAnim_Turret_Sitting.dae";
   neverImport = "EnvironmentAmbientLight";
   loadLights = "0";
};

function PlayerAnim_Turret_SittingDAE::onLoad(%this)
{
   %this.setSequenceCyclic("ambient", "true");
   %this.addSequence("ambient", "Sitting", "730", "735");
}


text:
<?php

/* ::base.html.twig */
class __TwigTemplate_e4ca1d7bc0b1b40c6f4b68c9b0279ba88bdc76ea5e792db986eb37b3ec151850 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = array(
            'title' => array($this, 'block_title'),
            'header' => array($this, 'block_header'),
            'body' => array($this, 'block_body'),
            'javascripts' => array($this, 'block_javascripts'),
            'footer' => array($this, 'block_footer'),
        );
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 1
        echo "<!DOCTYPE html>

    <meta charset=\"utf-8\">
    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">
    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
        <title>
            ";
        // line 9
        $this->displayBlock('title', $context, $blocks);
        echo " NoonKa
        </title>

        ";
        // line 12
        if (isset($context['assetic']['debug']) && $context['assetic']['debug']) {
            // asset "67e607f_0"
            $context["asset_url"] = isset($context['assetic']['use_controller']) && $context['assetic']['use_controller'] ? $this->env->getExtension('routing')->getPath("_assetic_67e607f_0") : $this->env->getExtension('assets')->getAssetUrl("_controller/compiled/css/custom_bootstrap.min_1.css");
            // line 26
            echo "            <link rel=\"stylesheet\" href=\"";
            echo twig_escape_filter($this->env, (isset($context["asset_url"]) ? $context["asset_url"] : $this->getContext($context, "asset_url")), "html", null, true);
            echo "\" />
        ";
            // asset "67e607f_1"
            $context["asset_url"] = isset($context['assetic']['use_controller']) && $context['assetic']['use_controller'] ? $this->env->getExtension('routing')->getPath("_assetic_67e607f_1") : $this->env->getExtension('assets')->getAssetUrl("_controller/compiled/css/custom_metisMenu.min_2.css");
            echo "            <link rel=\"stylesheet\" href=\"";
            echo twig_escape_filter($this->env, (isset($context["asset_url"]) ? $context["asset_url"] : $this->getContext($context, "asset_url")), "html", null, true);
            echo "\" />
        ";
            // asset "67e607f_2"
            $context["asset_url"] = isset($context['assetic']['use_controller']) && $context['assetic']['use_controller'] ? $this->env->getExtension('routing')->getPath("_assetic_67e607f_2") : $this->env->getExtension('assets')->getAssetUrl("_controller/compiled/css/custom_timeline_3.css");
            echo "            <link rel=\"stylesheet\" href=\"";
            echo twig_escape_filter($this->env, (isset($context["asset_url"]) ? $context["asset_url"] : $this->getContext($context, "asset_url")), "html", null, true);
            echo "\" />
        ";
            // asset "67e607f_3"
            $context["asset_url"] = isset($context['assetic']['use_controller']) && $context['assetic']['use_controller'] ? $this->env->getExtension('routing')->getPath("_assetic_67e607f_3") : $this->env->getExtension('assets')->getAssetUrl("_controller/compiled/css/custom_sb-admin-2_4.css");
            echo "            <link rel=\"stylesheet\" href=\"";
            echo twig_escape_filter($this->env, (isset($context["asset_url"]) ? $context["asset_url"] : $this->getContext($context, "asset_url")), "html", null, true);
            echo "\" />
        ";
            // asset "67e607f_4"
            $context["asset_url"] = isset($context['assetic']['use_controller']) && $context['assetic']['use_controller'] ? $this->env->getExtension('routing')->getPath("_assetic_67e607f_4") : $this->env->getExtension('assets')->getAssetUrl("_controller/compiled/css/custom_morris_5.css");
            echo "            <link rel=\"stylesheet\" href=\"";
            echo twig_escape_filter($this->env, (isset($context["asset_url"]) ? $context["asset_url"] : $this->getContext($context, "asset_url")), "html", null, true);
            echo "\" />
        ";
            // asset "67e607f_5"
            $context["asset_url"] = isset($context['assetic']['use_controller']) && $context['assetic']['use_controller'] ? $this->env->getExtension('routing')->getPath("_assetic_67e607f_5") : $this->env->getExtension('assets')->getAssetUrl("_controller/compiled/css/custom_font-awesome.min_6.css");
            echo "            <link rel=\"stylesheet\" href=\"";
            echo twig_escape_filter($this->env, (isset($context["asset_url"]) ? $context["asset_url"] : $this->getContext($context, "asset_url")), "html", null, true);
            echo "\" />
        ";
            // asset "67e607f_6"
            $context["asset_url"] = isset($context['assetic']['use_controller']) && $context['assetic']['use_controller'] ? $this->env->getExtension('routing')->getPath("_assetic_67e607f_6") : $this->env->getExtension('assets')->getAssetUrl("_controller/compiled/css/custom_style_7.css");
            echo "            <link rel=\"stylesheet\" href=\"";
            echo twig_escape_filter($this->env, (isset($context["asset_url"]) ? $context["asset_url"] : $this->getContext($context, "asset_url")), "html", null, true);
            echo "\" />
        ";
            // asset "67e607f_7"
            $context["asset_url"] = isset($context['assetic']['use_controller']) && $context['assetic']['use_controller'] ? $this->env->getExtension('routing')->getPath("_assetic_67e607f_7") : $this->env->getExtension('assets')->getAssetUrl("_controller/compiled/css/custom_acme-bootstrap_8.css");
            echo "            <link rel=\"stylesheet\" href=\"";
            echo twig_escape_filter($this->env, (isset($context["asset_url"]) ? $context["asset_url"] : $this->getContext($context, "asset_url")), "html", null, true);
            echo "\" />
        ";
            // asset "67e607f_8"
            $context["asset_url"] = isset($context['assetic']['use_controller']) && $context['assetic']['use_controller'] ? $this->env->getExtension('routing')->getPath("_assetic_67e607f_8") : $this->env->getExtension('assets')->getAssetUrl("_controller/compiled/css/custom_footer-distributed_9.css");
            echo "            <link rel=\"stylesheet\" href=\"";
            echo twig_escape_filter($this->env, (isset($context["asset_url"]) ? $context["asset_url"] : $this->getContext($context, "asset_url")), "html", null, true);
            echo "\" />
        ";
            // asset "67e607f_9"
            $context["asset_url"] = isset($context['assetic']['use_controller']) && $context['assetic']['use_controller'] ? $this->env->getExtension('routing')->getPath("_assetic_67e607f_9") : $this->env->getExtension('assets')->getAssetUrl("_controller/compiled/css/custom_demo_10.css");
            echo "            <link rel=\"stylesheet\" href=\"";
            echo twig_escape_filter($this->env, (isset($context["asset_url"]) ? $context["asset_url"] : $this->getContext($context, "asset_url")), "html", null, true);
            echo "\" />
        ";
            // asset "67e607f_10"
            $context["asset_url"] = isset($context['assetic']['use_controller']) && $context['assetic']['use_controller'] ? $this->env->getExtension('routing')->getPath("_assetic_67e607f_10") : $this->env->getExtension('assets')->getAssetUrl("_controller/compiled/css/custom_bootstrap-social_11.css");
            echo "            <link rel=\"stylesheet\" href=\"";
            echo twig_escape_filter($this->env, (isset($context["asset_url"]) ? $context["asset_url"] : $this->getContext($context, "asset_url")), "html", null, true);
            echo "\" />
        ";
        } else {
            // asset "67e607f"
            $context["asset_url"] = isset($context['assetic']['use_controller']) && $context['assetic']['use_controller'] ? $this->env->getExtension('routing')->getPath("_assetic_67e607f") : $this->env->getExtension('assets')->getAssetUrl("_controller/compiled/css/custom.css");
            echo "            <link rel=\"stylesheet\" href=\"";
            echo twig_escape_filter($this->env, (isset($context["asset_url"]) ? $context["asset_url"] : $this->getContext($context, "asset_url")), "html", null, true);
            echo "\" />
        ";
        }
        unset($context["asset_url"]);
        // line 28
        echo "
        <link rel=\"icon\" type=\"image/x-icon\" href=\"";
        // line 29
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("favicon.ico"), "html", null, true);
        echo "\" />

    ";
        // line 34
        echo "        ";
        $this->displayBlock('header', $context, $blocks);
        // line 121
        echo "    ";
        // line 122
        echo "

    ";
        // line 125
        echo "        ";
        $this->displayBlock('body', $context, $blocks);
        // line 126
        echo "    ";
        // line 127
        echo "

    ";
        // line 130
        echo "        ";
        $this->displayBlock('javascripts', $context, $blocks);
        // line 140
        echo "    ";
        // line 141
        echo "

    ";
        // line 145
        echo "        ";
        $this->displayBlock('footer', $context, $blocks);
        // line 146
        echo "    ";
        // line 147
        echo "";
    }

    // line 9
    public function block_title($context, array $blocks = array())
    {
    }

    // line 34
    public function block_header($context, array $blocks = array())
    {
        // line 35
        echo "

                            ";
        // line 39
        if (isset($context['assetic']['debug']) && $context['assetic']['debug']) {
            // asset "8fbae4a_0"
            $context["asset_url"] = isset($context['assetic']['use_controller']) && $context['assetic']['use_controller'] ? $this->env->getExtension('routing')->getPath("_assetic_8fbae4a_0") : $this->env->getExtension('assets')->getAssetUrl("_controller/images/noonka_noonka_1.png");
            // line 40
            echo "                                env, (isset($context["asset_url"]) ? $context["asset_url"] : $this->getContext($context, "asset_url")), "html", null, true);
            echo "\" class=\"logo\" >
                            ";
        } else {
            // asset "8fbae4a"
            $context["asset_url"] = isset($context['assetic']['use_controller']) && $context['assetic']['use_controller'] ? $this->env->getExtension('routing')->getPath("_assetic_8fbae4a") : $this->env->getExtension('assets')->getAssetUrl("_controller/images/noonka.png");
            echo "                                env, (isset($context["asset_url"]) ? $context["asset_url"] : $this->getContext($context, "asset_url")), "html", null, true);
            echo "\" class=\"logo\" >
                            ";
        }
        unset($context["asset_url"]);
        // line 42
        echo "

                                <form action=\"#\" class=\"navbar-form pull-right no-margin\">
                                    <input type=\"text\" name=\"search\" id=\"search\" class=\"input-sm form-control\" placeholder=\"Search...\">
                                    <button type=\"submit\" class=\"btn btn-primary btn-sm\">
                                         Search
                                    </button>
                                </form>

                        ";
        // line 63
        if ($this->getAttribute($this->getAttribute((isset($context["app"]) ? $context["app"] : $this->getContext($context, "app")), "session", array()), "get", array(0 => "name"), "method")) {
            // line 64
            echo "                            env->getExtension('routing')->getUrl("noon_ka_auth_logoutpage");
            echo "\" class=\"underline-no\" style=\"color:#337ab7;\" title=\"Your messages\">

                            env->getExtension('routing')->getUrl("noon_ka_auth_logoutpage");
            echo "\" class=\"underline-no\" style=\"color:#337ab7;\" title=\"Your notifications\">

                            <button type=\"button\" class=\"btn btn-default btn-xs dropdown-toggle\" id=\"dropdownMenu\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"true\" style=\"color:#008000;\"> Hello,

                                ";
            // line 70
            echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute((isset($context["app"]) ? $context["app"] : $this->getContext($context, "app")), "session", array()), "get", array(0 => "name"), "method"), "html", null, true);
            echo "

                            </button>

                                    env->getExtension('routing')->getUrl("noon_ka_auth_userprofilepage");
            echo "\">
                                        <button class=\"btn btn-block btn-social\"> Your dashboard</button>

                                    env->getExtension('routing')->getUrl("noon_ka_auth_userprofilepage");
            echo "\"> Profile

                                    env->getExtension('routing')->getUrl("noon_ka_auth_userprofilepage");
            echo "\"> Announcements

                                    env->getExtension('routing')->getUrl("noon_ka_auth_logoutpage");
            echo "\" class=\"underline-no\" style=\"color:#FF4500;\">
                                     Logout

                        ";
        } else {
            // line 91
            echo "                            <button type=\"button\" class=\"btn btn-default btn-xs\" data-toggle=\"modal\" href=\"#signUpForm\" >
                                 SignUp
                            </button>

                            <button type=\"button\" class=\"btn btn-default btn-xs\" data-toggle=\"modal\" href=\"#loginForm\">
                                 Login
                            </button>
                        ";
        }
        // line 99
        echo "

env->getExtension('routing')->getUrl("noon_ka_auth_homepage");
        echo "\"> Home

env->getExtension('routing')->getUrl("noon_ka_auth_howpage");
        echo "\"> How it works

env->getExtension('routing')->getUrl("noon_ka_auth_aboutpage");
        echo "\">About Us

Home

        ";
    }

    // line 125
    public function block_body($context, array $blocks = array())
    {
    }

    // line 130
    public function block_javascripts($context, array $blocks = array())
    {
        // line 131
        echo "            ";
        if (isset($context['assetic']['debug']) && $context['assetic']['debug']) {
            // asset "ab925bb_0"
            $context["asset_url"] = isset($context['assetic']['use_controller']) && $context['assetic']['use_controller'] ? $this->env->getExtension('routing')->getPath("_assetic_ab925bb_0") : $this->env->getExtension('assets')->getAssetUrl("_controller/compiled/js/noonka_jquery.min_1.js");
            // line 136
            echo "

            ";
            // asset "ab925bb_1"
            $context["asset_url"] = isset($context['assetic']['use_controller']) && $context['assetic']['use_controller'] ? $this->env->getExtension('routing')->getPath("_assetic_ab925bb_1") : $this->env->getExtension('assets')->getAssetUrl("_controller/compiled/js/noonka_bootstrap.min_2.js");
            // line 136
            echo "

            ";
            // asset "ab925bb_2"
            $context["asset_url"] = isset($context['assetic']['use_controller']) && $context['assetic']['use_controller'] ? $this->env->getExtension('routing')->getPath("_assetic_ab925bb_2") : $this->env->getExtension('assets')->getAssetUrl("_controller/compiled/js/noonka_custom_3.js");
            // line 136
            echo "

            ";
        } else {
            // asset "ab925bb"
            $context["asset_url"] = isset($context['assetic']['use_controller']) && $context['assetic']['use_controller'] ? $this->env->getExtension('routing')->getPath("_assetic_ab925bb") : $this->env->getExtension('assets')->getAssetUrl("_controller/compiled/js/noonka.js");
            // line 136
            echo "

            ";
        }
        unset($context["asset_url"]);
        // line 139
        echo "        ";
    }

    // line 145
    public function block_footer($context, array $blocks = array())
    {
    }

    public function getTemplateName()
    {
        return "::base.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  369 => 145,  365 => 139,  359 => 137,  356 => 136,  349 => 137,  346 => 136,  340 => 137,  337 => 136,  331 => 137,  328 => 136,  323 => 131,  320 => 130,  315 => 125,  295 => 105,  291 => 104,  287 => 103,  281 => 99,  271 => 91,  264 => 87,  258 => 84,  253 => 82,  243 => 75,  235 => 70,  228 => 66,  222 => 64,  220 => 63,  197 => 42,  183 => 40,  179 => 39,  173 => 35,  170 => 34,  165 => 9,  161 => 147,  159 => 146,  156 => 145,  151 => 141,  149 => 140,  146 => 130,  142 => 127,  140 => 126,  137 => 125,  133 => 122,  131 => 121,  128 => 34,  121 => 29,  118 => 28,  44 => 26,  40 => 12,  34 => 9,  24 => 1,);
    }
}


text:
require 'minitest/autorun'
require 'augmented/objects/then_if'

describe Augmented::Objects::ThenIf do
  using Augmented::Objects::ThenIf

  describe '#then_if' do

    it 'applies the given function to the object if the condition is truish' do
      plus_10 = -> i { i + 10 }

      assert_equal 5.then_if(true, &plus_10), 15
      assert_equal 5.then_if(Object.new, &plus_10), 15
    end

    it 'applies the given function to the object if the condition evaluates to truish' do
      plus_10 = -> i { i + 10 }

      condition_1 = -> i { i == 5 }
      condition_2 = -> i { i.to_s }

      assert_equal 5.then_if(condition_1, &plus_10), 15
      assert_equal 5.then_if(condition_2, &plus_10), 15
    end

    it 'returns the object without applying the function if the condition is falsy' do
      plus_10 = -> i { i + 10 }

      assert_equal 5.then_if(false, &plus_10), 5
      assert_equal 5.then_if(nil,   &plus_10), 5
    end

    it 'returns the object without applying the function if the condition evaluates to falsy' do
      plus_10 = -> i { i + 10 }

      condition_1 = -> i { i == 10 }
      condition_2 = -> i { nil }

      assert_equal 5.then_if(condition_1, &plus_10), 5
      assert_equal 5.then_if(condition_2, &plus_10), 5
    end

  end

  describe '#then_unless' do

    it 'applies the given function to the object if the condition is falsy' do
      plus_10 = -> i { i + 10 }

      assert_equal 5.then_unless(false, &plus_10), 15
      assert_equal 5.then_unless(nil,   &plus_10), 15
    end

    it 'applies the given function to the object if the condition evaluates to falsy' do
      plus_10 = -> i { i + 10 }

      condition_1 = -> i { i == 10 }
      condition_2 = -> i { nil }

      assert_equal 5.then_unless(condition_1, &plus_10), 15
      assert_equal 5.then_unless(condition_2, &plus_10), 15
    end

    it 'returns the object without applying the function if the condition is truish' do
      plus_10 = -> i { i + 10 }

      assert_equal 5.then_unless(true, &plus_10), 5
      assert_equal 5.then_unless(Object.new, &plus_10), 5
    end

    it 'returns the object without applying the function if the condition evaluates to truish' do
      plus_10 = -> i { i + 10 }

      condition_1 = -> i { i == 5 }
      condition_2 = -> i { i.to_s }

      assert_equal 5.then_unless(condition_1, &plus_10), 5
      assert_equal 5.then_unless(condition_2, &plus_10), 5
    end

  end

end


text:
package pl.consdata.ico.sqcompanion.violation.user.summary;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import pl.consdata.ico.sqcompanion.violation.user.ViolationHistorySource;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

@Entity(name = "user_project_summary_history_entries")
@Table(
        indexes = {
                @Index(name = "IDX_USER_SUMMARY_HISTORY_ENTRIES_USER_ID", columnList = "userId"),
                @Index(name = "IDX_USER_SUMMARY_HISTORY_ENTRIES_USER_ID_PROJECT_KEY", columnList = "userId,projectKey"),
                @Index(name = "IDX_USER_SUMMARY_HISTORY_ENTRIES_USER_ID_PROJECT_KEY_DATE", columnList = "userId,projectKey,date")
        }
)
@Data
@Builder(toBuilder = true)
@RequiredArgsConstructor
@AllArgsConstructor
public class UserProjectSummaryViolationHistoryEntry implements ViolationHistorySource {

    @Id
    private String id;
    private String serverId;
    private String projectKey;
    private String userId;
    private Integer blockers;
    private Integer criticals;
    private Integer majors;
    private Integer minors;
    private Integer infos;
    private LocalDate date;

    public static String combineId(final String serverId, final String userId, final String projectKey, final LocalDate date) {
        return String.format(
                "%s$%s$%s$%s",
                serverId,
                userId,
                projectKey,
                date.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))
        );
    }

}


text:
<?php

namespace app\components;

use yii\base\Widget;
use yii\helpers\Html;

class ChatWidget extends Widget{

    public function init(){
        parent::init();
    }

    public function run(){
        return $this->render('chat');
    }
}


text:
description: This template creates a ADLS Gen2 datastore in Azure Machine Learning workspace.
page_type: sample
products:
- azure
- azure-resource-manager
urlFragment: machine-learning-datastore-create-adls-gen2
languages:
- json
---
# Create an Azure ADLS Gen2 Datastore

![Azure Public Test Date](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.machinelearningservices/machine-learning-datastore-create-adls-gen2/PublicLastTestDate.svg)
![Azure Public Test Result](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.machinelearningservices/machine-learning-datastore-create-adls-gen2/PublicDeployment.svg)

![Azure US Gov Last Test Date](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.machinelearningservices/machine-learning-datastore-create-adls-gen2/FairfaxLastTestDate.svg)
![Azure US Gov Last Test Result](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.machinelearningservices/machine-learning-datastore-create-adls-gen2/FairfaxDeployment.svg)

![Best Practice Check](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.machinelearningservices/machine-learning-datastore-create-adls-gen2/BestPracticeResult.svg)
![Cred Scan Check](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.machinelearningservices/machine-learning-datastore-create-adls-gen2/CredScanResult.svg)

[![Deploy To Azure](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/deploytoazure.svg?sanitize=true)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.machinelearningservices%2Fmachine-learning-datastore-create-adls-gen2%2Fazuredeploy.json)
[![Visualize](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/visualizebutton.svg?sanitize=true)](http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.machinelearningservices%2Fmachine-learning-datastore-create-adls-gen2%2Fazuredeploy.json)

This template creates a ADLS Gen2 datastore in Azure Machine Learning workspace.[Setup ADLS Gen2 storage help](https://docs.microsoft.com/azure/storage/blobs/data-lake-storage-introduction)

If you are new to Azure Machine Learning, see:

- [Azure Machine Learning service](https://azure.microsoft.com/services/machine-learning-service/)
- [Azure Machine Learning documentation](https://docs.microsoft.com/azure/machine-learning/)
- [Azure Machine Learning template reference](https://docs.microsoft.com/azure/templates/microsoft.machinelearningservices/allversions)
- [Quickstart templates](https://azure.microsoft.com/resources/templates/)

`Tags: Microsoft.MachineLearningServices/workspaces/datastores, Microsoft.Storage/storageAccounts, Microsoft.KeyVault/vaults, Microsoft.Insights/components, Microsoft.MachineLearningServices/workspaces, systemAssigned`


text:
package com.haulmont.cuba.security.jmx;

import com.haulmont.cuba.security.app.UserSessionsAPI;
import com.haulmont.cuba.security.entity.UserSessionEntity;
import org.springframework.stereotype.Component;

import javax.inject.Inject;
import java.util.UUID;
import java.util.stream.Collectors;

@Component("cuba_UserSessionsMBean")
public class UserSessions implements UserSessionsMBean {

    @Inject
    protected UserSessionsAPI userSessions;

    @Override
    public int getExpirationTimeoutSec() {
        return userSessions.getExpirationTimeoutSec();
    }

    @Override
    public void setExpirationTimeoutSec(int value) {
        userSessions.setExpirationTimeoutSec(value);
    }

    @Override
    public int getSendTimeoutSec() {
        return userSessions.getSendTimeoutSec();
    }

    @Override
    public void setSendTimeoutSec(int timeout) {
        userSessions.setSendTimeoutSec(timeout);
    }

    @Override
    public int getCount() {
        return userSessions.getUserSessionInfo().size();
    }

    @Override
    public String printSessions() {
        return userSessions.getUserSessionEntitiesStream()
                .map(UserSessionEntity::toString)
                .collect(Collectors.joining("\n"));
    }

    @Override
    public void processEviction() {
        userSessions.processEviction();
    }

    @Override
    public String killSession(String id) {
        UUID sessionId;
        try {
            sessionId = UUID.fromString(id);
        } catch (IllegalArgumentException ex) {
            return "Invalid session Id format: use UUID";
        }
        userSessions.killSession(sessionId);
        return "OK";
    }
}


text:
#ifndef eeprom_h
#define eeprom_h

unsigned char eeprom_get_char(unsigned int addr);
void eeprom_put_char(unsigned int addr, unsigned char new_value);
void memcpy_to_eeprom_with_checksum(unsigned int destination, char *source, unsigned int size);
int memcpy_from_eeprom_with_checksum(char *destination, unsigned int source, unsigned int size);

#endif


text:
define( function () {

	'use strict';

	return function ( string, indent ) {
		var indented;

		if ( !indent ) {
			return string;
		}

		indented = string.split( '\n' ).map( function ( line, notFirstLine ) {
			return notFirstLine ? indent + line : line;
		}).join( '\n' );

		return indented;
	};

});


text:
function [parameters_full] = fetch_full_parameters(parameters_subset, cfg);
%
%  function [parameters_full] = fetch_full_parameters(parameters_subset, cfg);
%
% This function is used to build a full parameter set from a subset, and is
% normally used during parameter estimation in the observation details
% function when the entire parameter vector is needed to simulate the system.
%
% The function select_set pulls out a parameter set and can optionally select
% only a subset for estimation:
%
%    cfg=system_select_set(cfg, 'default', {'Vp', 'CL'});
%
% The default values of this subset can be accessed in the following way:
%
%    parameters_subset = cfg.estimation.parameters.guess
%
% The estimation routines will work with this reduced parameter set, but to
% run simulations the full set is needed. The full values can be retrieved
% using the following:
%
% parameters_full = fetch_full_parameters(parameters_subset, cfg);
%

parameters_full = cfg.parameters.values;

parameters_full(cfg.estimation.to_estimate) = parameters_subset;


text:
<!--
Description: item dc:description
Expect:      not bozo and entries[0]['description'] == u'Example description'
-->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<item>
<dc:description>Example description</dc:description>
</item>
</channel>
</rss>


text:
package com.jt.selenium.elements;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.internal.seleniumemulation.JavascriptLibrary;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.testng.Assert;

import com.jt.selenium.configuration.SeleniumConfiguration;
import com.jt.selenium.utils.JTContainer;
import com.jt.selenium.utils.LogExecTime;
import com.thoughtworks.selenium.SeleniumException;

@Component
public class JTCore {

	@Autowired
	JTContainer jtContainer;

	public JTContainer getJtContainer() {
		return jtContainer;
	}

	protected WebDriver getWebDriver() {
		return jtContainer.getWebDriver();
	}

	protected SeleniumConfiguration getConfiguration() {
		return jtContainer.getConfiguration();
	}

	protected int getCommandRepeatMils() {
		return getConfiguration().getCommandRepeatMils();
	}

	protected int getRetryAttempts() {
		return getConfiguration().getRetryAttempts();
	}

	public void validatePage(String identifier) {
		checkServiceAvailability();
		verifyNoJavaScriptErrorOnPage();
		verifyPageLoadedCorrectly();
	}

	public void screenShot(String fileName) throws IOException {
		if (!StringUtils.endsWith(fileName, ".gif")) {
			fileName+=".gif";
		}
		File scrFile = ((TakesScreenshot)getWebDriver()).getScreenshotAs(OutputType.FILE);
		String pathname = getConfiguration().get("screenshot.loc");
		if (pathname==null) {
			throw new IllegalStateException("You need to specify a location to save your screenshots. Set 'screenshot.loc' as a preference");
		}
		FileUtils.copyFile(scrFile, new File(pathname+fileName));
	}

	public Object executeJavaScript(String script) {
		JavascriptExecutor executor = (JavascriptExecutor) getWebDriver();
		return executor.executeScript(script);
	}

	private void verifyPageLoadedCorrectly() {
		String htmlSource = StringUtils.lowerCase(getWebDriver().getPageSource());
		boolean contains = StringUtils.contains(htmlSource, "</body>");
		Assert.assertTrue(contains, "The page did not load properly - no ending body tag was found");
	}

	public void checkServiceAvailability() {
		String message = getConfiguration().getPropertyAsString("service.unavailable.message");
		if (!StringUtils.isEmpty(message)) {
			boolean present = false;
			try {
				present = isTextPresent(message);
			} catch (SeleniumException s) {
				int tries = 0;
				while (!present && tries++ < getRetryAttempts()) {
					try {
						present = isTextPresent(message);
					} catch (SeleniumException se) {
						pause(getCommandRepeatMils());
					}
				}
			}
			Assert.assertFalse(present, "Service is temporarily down");
		}
	}

	public void verifyNoJavaScriptErrorOnPage() {
		String jsErrorId = "js_error";
		boolean elementPresent = isElementPresent(jsErrorId);

		if (elementPresent) {
			try {
				String message = getText(jsErrorId);

				// this code doesn't currently ignore any errors since the code
				// inside these files (which originate these errors) both do so:
				String urlSpan = "";
				String msgSpan = "";
				String lineSpan = "";
				try {
					urlSpan = getText("js_error_span_url");
					msgSpan = getText("js_error_span_msg");
					lineSpan = getText("js_error_span_line");
				} catch (SeleniumException se) {
					// Some problem occurrred - testing the entire content of
					// the js_error div
					msgSpan = message;
				}
				if (!ignorableJsErrors(msgSpan, lineSpan, urlSpan)) {
					Assert.fail(message);
				}
			} catch (SeleniumException se) {
				// Failed as trying to getText when not visible - this is ok, we
				// can ignore... the error does not exist.
			}
		}
	}

	public void waitForPageToLoad() {
		waitHere().until(ExpectedConditions.presenceOfElementLocated(By.tagName("body")));
		validatePage("waitForPageToLoad() method");
		windowFocus();
	}

	public void windowFocus() {
		if (runningInIE() && isElementPresent("tagname=body")) {
			getElement("tagname=body").click();
		}
	}

	private boolean ignorableJsErrors(String message, String line, String url) {
		String list = getConfiguration().getPropertyAsString("javascript.ignore.list");
		if (list != null) {
			String[] ignores = StringUtils.split(list, ',');
			for (String ignore : ignores) {
				if (StringUtils.contains(url, StringUtils.trim(ignore))) {
					return true;
				}
			}
		}
		return false;
	}

	public void open(String url) throws IOException {
		getWebDriver().get(getConfiguration().getTargetWebsite() + url);
		windowFocus();
		validatePage(url);
	}

	/**
	 * @deprecated Frames no longer suported in HTML5
	 *
	 * @param targetFrame
	 */
	public void returnToFrameParent() {
		getWebDriver().switchTo().frame("relative=up");
	}

	/**
	 * @deprecated Frames no longer suported in HTML5
	 *
	 * @param targetFrame
	 */
	public void selectFrame(String targetFrame) {
		waitHere().until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(targetFrame));
	}

	public void verifyElementTextNotEqualTo(String locator, String value) {
		Assert.assertFalse(value.equalsIgnoreCase(getText(locator)), "Values are the same. They should be different ");

	}

	@LogExecTime
	public void waitForElementPresentAndVisible(String locator) {
		waitForElementPresent(locator);
		waitForElementVisible(locator);
	}

	public void verifyOccurrencesInElement(String locator, String regex, int occurs) {
		waitForElementPresent(locator);
		int actual = StringUtils.countMatches(getText(locator), regex);
		Assert.assertEquals(actual, occurs,
				String.format("Expected %s occurrences of %s in %s but there were %s", occurs, regex, locator, actual));
	}

	public int getOccurrences(String regex) {
		return StringUtils.countMatches(getElementByTagName("body").getText(), regex);
	}

	private WebElement getElement(By by) {
		WebElement findElement = getWebDriver().findElement(by);
		return findElement;
	}

	public WebElement getElementByTagName(String locator) {
		return getElement(By.tagName(locator));
	}

	public WebElement getElement(String locator) {
		return getElement(LocatorStrategy.by(locator));
	}

	public void blur(String locator) {
		fireEvent(locator, "blur");
	}

	@LogExecTime
	public boolean isVisible(String locator) {
		waitForElementPresent(locator);
		return getElement(locator).isDisplayed();
	}

	@LogExecTime
	public void pause(int millisecs) {
		try {
			Thread.sleep(millisecs);
		} catch (InterruptedException e) {
			System.err.print("You interrupted me");
		}

	}

	public void verifyElementText(String locator, String value, String message) {
		waitForElementPresent(locator);
		getElement(locator).getText();
		String actualValue = getText(locator);
		int tries = 0;
		while (!actualValue.equals(value) && tries++ < getRetryAttempts()) {
			// present and visible already checked for - just check the text
			// value...
			try {
				actualValue = getText(locator);
			} catch (SeleniumException se) {
				// oops - something went wrong. Never mind, lets keep trying
			}
			pause(getCommandRepeatMils());
		}
		Assert.assertEquals(actualValue, value, "The values don't match");
	}

	@LogExecTime
	public void waitForText(String text) {
		waitHere().until(ExpectedConditions.textToBePresentInElement(By.tagName("body"), text));
	}

	private WebDriverWait waitHere() {
		return new WebDriverWait(getWebDriver(), jtContainer.getConfiguration().getWaitingPeriod());
	}

	public void verifyTitle(String title) {
		Assert.assertEquals(getWebDriver().getTitle(), title, String.format("Title is not \"%s\"", title));
	}

	public String getHtmlSource() {
		return getWebDriver().getPageSource();
	}

	public void verifyElementNotContains(String locator, String value) {
		waitForElementPresent(locator);
		String actualValue = fastCheckOrWait(locator);
		int tries = 0;
		while (StringUtils.contains(actualValue, value) && tries++ < getRetryAttempts()) {
			try {
				actualValue = getText(locator);
			} catch (Exception e) {
				// Ignore... sometimes an element can disappear between the
				// previous checks.
			}

			pause(getCommandRepeatMils());
		}
		Assert.assertTrue(!StringUtils.contains(getText(locator), value),
				String.format("Value \"%s\" is not expected but is present", value));
	}

	public void verifyElementContains(String locator, String value) {
		waitForElementPresent(locator);
		String actualValue = fastCheckOrWait(locator);
		int tries = 0;
		while (!StringUtils.contains(actualValue, value) && tries++ < getRetryAttempts()) {
			try {
				actualValue = getText(locator);
			} catch (Exception e) {
				// Ignore... sometimes an element can disappear between the
				// previous checks.
			}

			pause(getCommandRepeatMils());
		}
		Assert.assertTrue(StringUtils.contains(getText(locator), value),
				String.format("Value \"%s\" is expected but is not present", value));
	}

	String fastCheckOrWait(String locator) {
		if (isVisible(locator)) {
			String text = getText(locator);
			return text == null ? "" : text;
		} else {
			waitForElementPresentAndVisible(locator);
		}
		String text = getText(locator);
		return text == null ? "" : text;
	}

	public void verifyElementPresent(String locator) {
		// this method doesn't care about visibility
		try {
			// attempt fast assertion first
			if (isElementPresent(locator)) {
				Assert.assertTrue(true);
			} else {
				waitForElementPresent(locator);
			}
		} catch (SeleniumException e) {
			waitForElementPresent(locator);
		}
		Assert.assertTrue(isElementPresent(locator),
				String.format("Element \"%s\" is expected but is not present", locator));
	}

	public void verifyTextNotPresent(String text, String message, boolean instantFail) {
		int tries = 0;
		if (instantFail && isTextPresent(text)) {
			Assert.fail(message);
		}
		while (isTextPresent(text) && tries++ < getRetryAttempts()) {
			pause(getCommandRepeatMils());
		}
		Assert.assertFalse(isTextPresent(text), message);
	}

	public void debugPause(int seconds, String message) {
		System.out.println("####### " + message + " #######");
		pause(seconds * 1000);
	}

	public String getText(String locator) {
		waitForElementPresent(locator);
		return getElement(locator).getText();
	}

	public String getAttribute(String locator, String attribute) {
		waitForElementPresent(locator);
		return getElement(locator).getAttribute(attribute);
	}

	public void verifyAttribute(String locator, String attribute, String value) {
		waitForElementPresent(locator);
		String attribute2 = getAttribute(locator, attribute);
		Assert.assertEquals(value, attribute2);
	}

	@LogExecTime
	public void waitForElementVisible(String locator) {
		waitHere().until(ExpectedConditions.visibilityOfElementLocated(LocatorStrategy.by(locator)));
	}

	public void waitForTitle(String title) {
		waitHere().until(ExpectedConditions.titleIs(title));
	}

	public void waitForTitleToContain(String text) {
		waitHere().until(ExpectedConditions.titleContains(text));
	}

	@LogExecTime
	public void waitForElementText(String locator, String text) {
		waitHere().until(ExpectedConditions.textToBePresentInElement(LocatorStrategy.by(locator), text));
	}

	@LogExecTime
	public void waitForValueInElement(String locator, String text) {
		waitHere().until(ExpectedConditions.textToBePresentInElementValue(LocatorStrategy.by(locator), text));
	}

	public void waitForAlert() {
		waitHere().until(ExpectedConditions.alertIsPresent());
	}

	public void closeAlert() {
		getWebDriver().switchTo().alert().accept();
	}

	public void verifyAlert(String regex) {
		waitForAlert();
		Assert.assertTrue(getWebDriver().switchTo().alert().getText().equals(regex));
		closeAlert();
	}

	@LogExecTime
	public void waitForElementPresent(String locator) {
		waitHere().until(ExpectedConditions.presenceOfElementLocated(LocatorStrategy.by(locator)));
	}

	@LogExecTime
	public boolean isElementPresent(String locator) {
		try {
			getElement(locator);
			return true;
		} catch (NoSuchElementException e) {
			return false;
		}
	}

	// public void waitForAjax() throws InterruptedException
	// {
	// // The docs say to use .getCurrentWindow but that method does not exist!
	// // using the .currentWindow property (which is a reference to the
	// application window) works!
	// // but not in FF4?
	// getSelenium().waitForCondition("selenium.browserbot.getCurrentWindow().jQuery.active == 0;",
	// Integer.toString(getConfiguration().getAjaxTimeout()));
	// }

	public void verifyTextPresent(String text) {
		long start = System.currentTimeMillis();
		int tries = 0;
		String textRegexed = text;
		while (!isTextPresent(textRegexed) && tries++ < getRetryAttempts()) {
			pause(getCommandRepeatMils());
		}
		long durationMills = System.currentTimeMillis() - start;
		Assert.assertTrue(isTextPresent(textRegexed), String.format("Text \"%s\" is expected but is not present after " + durationMills
				+ " milliseconds.", text));
	}

	public void verifyTextPresent(String text, String msg) {
		int tries = 0;
		while (!isTextPresent(text) && tries++ < getRetryAttempts()) {
			pause(getCommandRepeatMils());
		}
		Assert.assertTrue(isTextPresent(text), msg);
	}

	public void verifyElementVisible(String locator) {
		long start = System.currentTimeMillis();
		waitForElementPresentAndVisible(locator);
		long durationMills = System.currentTimeMillis() - start;
		Assert.assertTrue(
				isVisible(locator),
				String.format("Element \"%s\" is expected to be visible but is still hidden after " + durationMills
						+ " milliseconds.", locator));
	}

	public void verifyElementNotVisible(String locator) {
		waitForElementPresent(locator);

		// need to reverse the logic contained in
		// waitForElementPresentAndVisible() to only wait while it's still
		// visible (instead of waiting while it's not yet visible)
		long start = System.currentTimeMillis();
		int tries = 0;
		try {
			while (isVisible(locator) && tries++ < getRetryAttempts()) {
				pause(getCommandRepeatMils());
			}
		} catch (SeleniumException se) {
			// isVisible will throw an exception if the element is NOT visible -
			// so catch this exception and pass it
			Assert.assertTrue(true);
		}
		long durationMills = System.currentTimeMillis() - start;
		Assert.assertFalse(
				isVisible(locator),
				String.format("Element \"%s\" is expected to be hidden but is still visible after " + durationMills
						+ " milliseconds.", locator));
	}

	@LogExecTime
	public void waitForElementNotVisible(String locator) {
		boolean visible = isVisible(locator);
		long start = System.currentTimeMillis();
		int tries = 0;
		try {
			// wait for a while for it to appear in the DOM before giving up
			// quietly
			while (visible && tries++ < getRetryAttempts()) {
				visible = isVisible(locator);
				pause(getCommandRepeatMils());
			}
		} catch (Exception e) {
			long durationMills = System.currentTimeMillis() - start;
			Assert.fail("This method threw an exception after " + durationMills
					+ " milliseconds whilst waiting for element " + locator + " to be removed.");
		}
		if (visible) {
			long durationMills = System.currentTimeMillis() - start;
			Assert.fail(String.format("Element %s is still visible after " + durationMills + " milliseconds.", locator));
		}
	}

	@LogExecTime
	public void waitForElementNotPresent(String locator) {
		boolean present = isElementPresent(locator);
		long start = System.currentTimeMillis();
		int tries = 0;
		try {
			// wait for a while for it to appear in the DOM before giving up
			// quietly
			while (present && tries++ < getRetryAttempts()) {
				present = isElementPresent(locator);
				pause(getCommandRepeatMils());
			}
		} catch (Exception e) {
			long durationMills = System.currentTimeMillis() - start;
			Assert.fail("This method threw an exception after " + durationMills
					+ " milliseconds whilst waiting for element " + locator + " to be removed.");
		}
		if (present) {
			long durationMills = System.currentTimeMillis() - start;
			Assert.fail(String.format("Element %s is still present after " + durationMills + " milliseconds.", locator));
		}
	}

	public void verifyElementNotPresent(String locator) {
		int tries = 0;
		long start = System.currentTimeMillis();
		while (isElementPresent(locator) && tries++ < getRetryAttempts()) {
			pause(getCommandRepeatMils());
		}
		long durationMills = System.currentTimeMillis() - start;
		Assert.assertFalse(
				isElementPresent(locator),
				String.format("Element \"%s\" is NOT expected but is still present after " + durationMills
						+ " milliseconds.", locator));
	}

	public boolean isTextPresent(String text) {
		return getWebDriver().getPageSource().contains(text);
	}

	public String getLocation() {
		return getWebDriver().getCurrentUrl();
	}

	public boolean runningInIE() {
		return getConfiguration().getBrowserType().runningInIE();
	}

	public boolean runningInChrome() {
		return getConfiguration().getBrowserType().runningInChrome();
	}

	public boolean runningInPhantom() {
		return getConfiguration().getBrowserType().runningInPhantom();
	}

	public boolean runningInFirefox() {
		return getConfiguration().getBrowserType().runningInFireFox();
	}

	public boolean runningInSafari() {
		return getConfiguration().getBrowserType().runningInSafari();
	}

	public void copy(File src, File dst) throws IOException {
		InputStream in = new FileInputStream(src);
		OutputStream out = new FileOutputStream(dst);
		// Transfer bytes from in to out
		byte[] buf = new byte[1024];
		int len;
		while ((len = in.read(buf)) > 0) {
			out.write(buf, 0, len);
		}
		in.close();
		out.close();
	}

	/**
	 * onChange event on selects are not always invoked within IE when using
	 * selenium... so we had to added a special JQuery handler to simulate the
	 * change using CSS and JQuery click. Why do we not simply do a
	 * selenium.fireEvent ?? ... it's because selenium does not recognise JQuery
	 * onChange event when inside IE so firing the event will still do
	 * nothing.... but it DOES recognise click event so we can invoke this
	 *
	 * @param locator
	 */
	// public void simulateIEOnChangeEvent(String locator)
	// {
	// locator = jqueryfyLocator(locator);
	// if (runningInIE())
	// {
	// try
	// {
	// getSelenium().click(locator);
	// }
	// catch (SeleniumException se)
	// {
	// // the onChange event MAY have been invoked in which case this element
	// may not have been visible to
	// // click... in which case the select has worked and the click was not
	// necessary
	// }
	// }
	// }

	public void fireEvent(String locator, String eventName) {

		WebElement element = getElement(locator);
		JavascriptLibrary javascript = new JavascriptLibrary();

		if (runningInIE()) {
			String script = String.format("$('#%s').trigger('%s');", locator, eventName);
			javascript.executeScript(getWebDriver(), script);
		}
		else {
			javascript.callEmbeddedSelenium(getWebDriver(), "triggerEvent", element, eventName);
		}

	}
}


text:
package resources

import "github.com/awslabs/goformation/cloudformation/policies"

// AWSCloudFrontDistribution_Cookies AWS CloudFormation Resource (AWS::CloudFront::Distribution.Cookies)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cookies.html
type AWSCloudFrontDistribution_Cookies struct {

	// Forward AWS CloudFormation Property
	// Required: true
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cookies.html#cfn-cloudfront-distribution-cookies-forward
	Forward string `json:"Forward,omitempty"`

	// WhitelistedNames AWS CloudFormation Property
	// Required: false
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cookies.html#cfn-cloudfront-distribution-cookies-whitelistednames
	WhitelistedNames []string `json:"WhitelistedNames,omitempty"`

	// _deletionPolicy represents a CloudFormation DeletionPolicy
	_deletionPolicy policies.DeletionPolicy

	// _dependsOn stores the logical ID of the resources to be created before this resource
	_dependsOn []string

	// _metadata stores structured data associated with this resource
	_metadata map[string]interface{}
}

// AWSCloudFormationType returns the AWS CloudFormation resource type
func (r *AWSCloudFrontDistribution_Cookies) AWSCloudFormationType() string {
	return "AWS::CloudFront::Distribution.Cookies"
}

// DependsOn returns a slice of logical ID names this resource depends on.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
func (r *AWSCloudFrontDistribution_Cookies) DependsOn() []string {
	return r._dependsOn
}

// SetDependsOn specify that the creation of this resource follows another.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
func (r *AWSCloudFrontDistribution_Cookies) SetDependsOn(dependencies []string) {
	r._dependsOn = dependencies
}

// Metadata returns the metadata associated with this resource.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html
func (r *AWSCloudFrontDistribution_Cookies) Metadata() map[string]interface{} {
	return r._metadata
}

// SetMetadata enables you to associate structured data with this resource.
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html
func (r *AWSCloudFrontDistribution_Cookies) SetMetadata(metadata map[string]interface{}) {
	r._metadata = metadata
}

// SetDeletionPolicy applies an AWS CloudFormation DeletionPolicy to this resource
// see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html
func (r *AWSCloudFrontDistribution_Cookies) SetDeletionPolicy(policy policies.DeletionPolicy) {
	r._deletionPolicy = policy
}


text:
package org.thingsboard.server.controller;

import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import org.thingsboard.server.common.data.EntityInfo;
import org.thingsboard.server.common.data.TenantProfile;
import org.thingsboard.server.common.data.exception.ThingsboardException;
import org.thingsboard.server.common.data.id.TenantProfileId;
import org.thingsboard.server.common.data.page.PageData;
import org.thingsboard.server.common.data.page.PageLink;
import org.thingsboard.server.queue.util.TbCoreComponent;
import org.thingsboard.server.service.entitiy.tenant.profile.TbTenantProfileService;
import org.thingsboard.server.service.security.permission.Operation;
import org.thingsboard.server.service.security.permission.Resource;

import static org.thingsboard.server.controller.ControllerConstants.MARKDOWN_CODE_BLOCK_END;
import static org.thingsboard.server.controller.ControllerConstants.MARKDOWN_CODE_BLOCK_START;
import static org.thingsboard.server.controller.ControllerConstants.PAGE_DATA_PARAMETERS;
import static org.thingsboard.server.controller.ControllerConstants.PAGE_NUMBER_DESCRIPTION;
import static org.thingsboard.server.controller.ControllerConstants.PAGE_SIZE_DESCRIPTION;
import static org.thingsboard.server.controller.ControllerConstants.SORT_ORDER_ALLOWABLE_VALUES;
import static org.thingsboard.server.controller.ControllerConstants.SORT_ORDER_DESCRIPTION;
import static org.thingsboard.server.controller.ControllerConstants.SORT_PROPERTY_DESCRIPTION;
import static org.thingsboard.server.controller.ControllerConstants.SYSTEM_AUTHORITY_PARAGRAPH;
import static org.thingsboard.server.controller.ControllerConstants.TENANT_PROFILE_ID_PARAM_DESCRIPTION;
import static org.thingsboard.server.controller.ControllerConstants.TENANT_PROFILE_INFO_SORT_PROPERTY_ALLOWABLE_VALUES;
import static org.thingsboard.server.controller.ControllerConstants.TENANT_PROFILE_SORT_PROPERTY_ALLOWABLE_VALUES;
import static org.thingsboard.server.controller.ControllerConstants.TENANT_PROFILE_TEXT_SEARCH_DESCRIPTION;
import static org.thingsboard.server.controller.ControllerConstants.UUID_WIKI_LINK;

@RestController
@TbCoreComponent
@RequestMapping("/api")
@Slf4j
@RequiredArgsConstructor
public class TenantProfileController extends BaseController {

    private static final String TENANT_PROFILE_INFO_DESCRIPTION = "Tenant Profile Info is a lightweight object that contains only id and name of the profile. ";

    private final TbTenantProfileService tbTenantProfileService;

    @ApiOperation(value = "Get Tenant Profile (getTenantProfileById)",
            notes = "Fetch the Tenant Profile object based on the provided Tenant Profile Id. " + SYSTEM_AUTHORITY_PARAGRAPH)
    @PreAuthorize("hasAnyAuthority('SYS_ADMIN')")
    @RequestMapping(value = "/tenantProfile/{tenantProfileId}", method = RequestMethod.GET)
    @ResponseBody
    public TenantProfile getTenantProfileById(
            @ApiParam(value = TENANT_PROFILE_ID_PARAM_DESCRIPTION)
            @PathVariable("tenantProfileId") String strTenantProfileId) throws ThingsboardException {
        checkParameter("tenantProfileId", strTenantProfileId);
        try {
            TenantProfileId tenantProfileId = new TenantProfileId(toUUID(strTenantProfileId));
            return checkTenantProfileId(tenantProfileId, Operation.READ);
        } catch (Exception e) {
            throw handleException(e);
        }
    }

    @ApiOperation(value = "Get Tenant Profile Info (getTenantProfileInfoById)",
            notes = "Fetch the Tenant Profile Info object based on the provided Tenant Profile Id. " + TENANT_PROFILE_INFO_DESCRIPTION + SYSTEM_AUTHORITY_PARAGRAPH)
    @PreAuthorize("hasAnyAuthority('SYS_ADMIN')")
    @RequestMapping(value = "/tenantProfileInfo/{tenantProfileId}", method = RequestMethod.GET)
    @ResponseBody
    public EntityInfo getTenantProfileInfoById(
            @ApiParam(value = TENANT_PROFILE_ID_PARAM_DESCRIPTION)
            @PathVariable("tenantProfileId") String strTenantProfileId) throws ThingsboardException {
        checkParameter("tenantProfileId", strTenantProfileId);
        try {
            TenantProfileId tenantProfileId = new TenantProfileId(toUUID(strTenantProfileId));
            return checkNotNull(tenantProfileService.findTenantProfileInfoById(getTenantId(), tenantProfileId));
        } catch (Exception e) {
            throw handleException(e);
        }
    }

    @ApiOperation(value = "Get default Tenant Profile Info (getDefaultTenantProfileInfo)",
            notes = "Fetch the default Tenant Profile Info object based. " + TENANT_PROFILE_INFO_DESCRIPTION + SYSTEM_AUTHORITY_PARAGRAPH)
    @PreAuthorize("hasAnyAuthority('SYS_ADMIN')")
    @RequestMapping(value = "/tenantProfileInfo/default", method = RequestMethod.GET)
    @ResponseBody
    public EntityInfo getDefaultTenantProfileInfo() throws ThingsboardException {
        try {
            return checkNotNull(tenantProfileService.findDefaultTenantProfileInfo(getTenantId()));
        } catch (Exception e) {
            throw handleException(e);
        }
    }

    @ApiOperation(value = "Create Or update Tenant Profile (saveTenantProfile)",
            notes = "Create or update the Tenant Profile. When creating tenant profile, platform generates Tenant Profile Id as " + UUID_WIKI_LINK +
                    "The newly created Tenant Profile Id will be present in the response. " +
                    "Specify existing Tenant Profile Id id to update the Tenant Profile. " +
                    "Referencing non-existing Tenant Profile Id will cause 'Not Found' error. " +
                    "\n\nUpdate of the tenant profile configuration will cause immediate recalculation of API limits for all affected Tenants. " +
                    "\n\nThe **'profileData'** object is the part of Tenant Profile that defines API limits and Rate limits. " +
                    "\n\nYou have an ability to define maximum number of devices ('maxDevice'), assets ('maxAssets') and other entities. " +
                    "You may also define maximum number of messages to be processed per month ('maxTransportMessages', 'maxREExecutions', etc). " +
                    "The '*RateLimit' defines the rate limits using simple syntax. For example, '1000:1,20000:60' means up to 1000 events per second but no more than 20000 event per minute. " +
                    "Let's review the example of tenant profile data below: " +
                    "\n\n" + MARKDOWN_CODE_BLOCK_START +
                    "{\n" +
                    "  \"name\": \"Default\",\n" +
                    "  \"description\": \"Default tenant profile\",\n" +
                    "  \"isolatedTbRuleEngine\": false,\n" +
                    "  \"profileData\": {\n" +
                    "    \"configuration\": {\n" +
                    "      \"type\": \"DEFAULT\",\n" +
                    "      \"maxDevices\": 0,\n" +
                    "      \"maxAssets\": 0,\n" +
                    "      \"maxCustomers\": 0,\n" +
                    "      \"maxUsers\": 0,\n" +
                    "      \"maxDashboards\": 0,\n" +
                    "      \"maxRuleChains\": 0,\n" +
                    "      \"maxResourcesInBytes\": 0,\n" +
                    "      \"maxOtaPackagesInBytes\": 0,\n" +
                    "      \"transportTenantMsgRateLimit\": \"1000:1,20000:60\",\n" +
                    "      \"transportTenantTelemetryMsgRateLimit\": \"1000:1,20000:60\",\n" +
                    "      \"transportTenantTelemetryDataPointsRateLimit\": \"1000:1,20000:60\",\n" +
                    "      \"transportDeviceMsgRateLimit\": \"20:1,600:60\",\n" +
                    "      \"transportDeviceTelemetryMsgRateLimit\": \"20:1,600:60\",\n" +
                    "      \"transportDeviceTelemetryDataPointsRateLimit\": \"20:1,600:60\",\n" +
                    "      \"maxTransportMessages\": 10000000,\n" +
                    "      \"maxTransportDataPoints\": 10000000,\n" +
                    "      \"maxREExecutions\": 4000000,\n" +
                    "      \"maxJSExecutions\": 5000000,\n" +
                    "      \"maxDPStorageDays\": 0,\n" +
                    "      \"maxRuleNodeExecutionsPerMessage\": 50,\n" +
                    "      \"maxEmails\": 0,\n" +
                    "      \"maxSms\": 0,\n" +
                    "      \"maxCreatedAlarms\": 1000,\n" +
                    "      \"defaultStorageTtlDays\": 0,\n" +
                    "      \"alarmsTtlDays\": 0,\n" +
                    "      \"rpcTtlDays\": 0,\n" +
                    "      \"warnThreshold\": 0\n" +
                    "    }\n" +
                    "  },\n" +
                    "  \"default\": true\n" +
                    "}" +
                    MARKDOWN_CODE_BLOCK_END +
                    "Remove 'id', from the request body example (below) to create new Tenant Profile entity." +
                    SYSTEM_AUTHORITY_PARAGRAPH)
    @PreAuthorize("hasAuthority('SYS_ADMIN')")
    @RequestMapping(value = "/tenantProfile", method = RequestMethod.POST)
    @ResponseBody
    public TenantProfile saveTenantProfile(@ApiParam(value = "A JSON value representing the tenant profile.")
                                           @RequestBody TenantProfile tenantProfile) throws ThingsboardException {
        try {
            TenantProfile oldProfile;
            if (tenantProfile.getId() == null) {
                accessControlService.checkPermission(getCurrentUser(), Resource.TENANT_PROFILE, Operation.CREATE);
                oldProfile = null;
            } else {
                oldProfile = checkTenantProfileId(tenantProfile.getId(), Operation.WRITE);
            }

            return tbTenantProfileService.save(getTenantId(), tenantProfile, oldProfile);
        } catch (Exception e) {
            throw handleException(e);
        }
    }

    @ApiOperation(value = "Delete Tenant Profile (deleteTenantProfile)",
            notes = "Deletes the tenant profile. Referencing non-existing tenant profile Id will cause an error. Referencing profile that is used by the tenants will cause an error. " + SYSTEM_AUTHORITY_PARAGRAPH)
    @PreAuthorize("hasAuthority('SYS_ADMIN')")
    @RequestMapping(value = "/tenantProfile/{tenantProfileId}", method = RequestMethod.DELETE)
    @ResponseStatus(value = HttpStatus.OK)
    public void deleteTenantProfile(@ApiParam(value = TENANT_PROFILE_ID_PARAM_DESCRIPTION)
                                    @PathVariable("tenantProfileId") String strTenantProfileId) throws ThingsboardException {
        try {
            checkParameter("tenantProfileId", strTenantProfileId);
            TenantProfileId tenantProfileId = new TenantProfileId(toUUID(strTenantProfileId));
            TenantProfile profile = checkTenantProfileId(tenantProfileId, Operation.DELETE);
            tbTenantProfileService.delete(getTenantId(), profile);
        } catch (Exception e) {
            throw handleException(e);
        }
    }

    @ApiOperation(value = "Make tenant profile default (setDefaultTenantProfile)",
            notes = "Makes specified tenant profile to be default. Referencing non-existing tenant profile Id will cause an error. " + SYSTEM_AUTHORITY_PARAGRAPH)
    @PreAuthorize("hasAnyAuthority('SYS_ADMIN')")
    @RequestMapping(value = "/tenantProfile/{tenantProfileId}/default", method = RequestMethod.POST)
    @ResponseBody
    public TenantProfile setDefaultTenantProfile(
            @ApiParam(value = TENANT_PROFILE_ID_PARAM_DESCRIPTION)
            @PathVariable("tenantProfileId") String strTenantProfileId) throws ThingsboardException {
        checkParameter("tenantProfileId", strTenantProfileId);
        try {
            TenantProfileId tenantProfileId = new TenantProfileId(toUUID(strTenantProfileId));
            TenantProfile tenantProfile = checkTenantProfileId(tenantProfileId, Operation.WRITE);
            tenantProfileService.setDefaultTenantProfile(getTenantId(), tenantProfileId);
            return tenantProfile;
        } catch (Exception e) {
            throw handleException(e);
        }
    }

    @ApiOperation(value = "Get Tenant Profiles (getTenantProfiles)", notes = "Returns a page of tenant profiles registered in the platform. " + PAGE_DATA_PARAMETERS + SYSTEM_AUTHORITY_PARAGRAPH)
    @PreAuthorize("hasAuthority('SYS_ADMIN')")
    @RequestMapping(value = "/tenantProfiles", params = {"pageSize", "page"}, method = RequestMethod.GET)
    @ResponseBody
    public PageData<TenantProfile> getTenantProfiles(
            @ApiParam(value = PAGE_SIZE_DESCRIPTION, required = true)
            @RequestParam int pageSize,
            @ApiParam(value = PAGE_NUMBER_DESCRIPTION, required = true)
            @RequestParam int page,
            @ApiParam(value = TENANT_PROFILE_TEXT_SEARCH_DESCRIPTION)
            @RequestParam(required = false) String textSearch,
            @ApiParam(value = SORT_PROPERTY_DESCRIPTION, allowableValues = TENANT_PROFILE_SORT_PROPERTY_ALLOWABLE_VALUES)
            @RequestParam(required = false) String sortProperty,
            @ApiParam(value = SORT_ORDER_DESCRIPTION, allowableValues = SORT_ORDER_ALLOWABLE_VALUES)
            @RequestParam(required = false) String sortOrder) throws ThingsboardException {
        try {
            PageLink pageLink = createPageLink(pageSize, page, textSearch, sortProperty, sortOrder);
            return checkNotNull(tenantProfileService.findTenantProfiles(getTenantId(), pageLink));
        } catch (Exception e) {
            throw handleException(e);
        }
    }

    @ApiOperation(value = "Get Tenant Profiles Info (getTenantProfileInfos)", notes = "Returns a page of tenant profile info objects registered in the platform. "
            + TENANT_PROFILE_INFO_DESCRIPTION + PAGE_DATA_PARAMETERS + SYSTEM_AUTHORITY_PARAGRAPH)
    @PreAuthorize("hasAuthority('SYS_ADMIN')")
    @RequestMapping(value = "/tenantProfileInfos", params = {"pageSize", "page"}, method = RequestMethod.GET)
    @ResponseBody
    public PageData<EntityInfo> getTenantProfileInfos(
            @ApiParam(value = PAGE_SIZE_DESCRIPTION, required = true)
            @RequestParam int pageSize,
            @ApiParam(value = PAGE_NUMBER_DESCRIPTION, required = true)
            @RequestParam int page,
            @ApiParam(value = TENANT_PROFILE_TEXT_SEARCH_DESCRIPTION)
            @RequestParam(required = false) String textSearch,
            @ApiParam(value = SORT_PROPERTY_DESCRIPTION, allowableValues = TENANT_PROFILE_INFO_SORT_PROPERTY_ALLOWABLE_VALUES)
            @RequestParam(required = false) String sortProperty,
            @ApiParam(value = SORT_ORDER_DESCRIPTION, allowableValues = SORT_ORDER_ALLOWABLE_VALUES)
            @RequestParam(required = false) String sortOrder) throws ThingsboardException {
        try {
            PageLink pageLink = createPageLink(pageSize, page, textSearch, sortProperty, sortOrder);
            return checkNotNull(tenantProfileService.findTenantProfileInfos(getTenantId(), pageLink));
        } catch (Exception e) {
            throw handleException(e);
        }
    }
}


text:
id: 617b92b9de349513466f6156
title: Step 24
challengeType: 0
dashedName: step-24
---

# --description--

While the red and blue markers look the same, the green one is much lighter than it was before. This is because the `green` color keyword is actually a darker shade, and is about halfway between black and the maximum value for green.

In the `two` CSS rule, set the green value in the `rgb` function to `127` to lower its intensity.

# --hints--

Your `.two` CSS rule should have a `background-color` property set to `rgb(0, 127, 0)`.

```js
assert(new __helpers.CSSHelp(document).getStyle('.two')?.backgroundColor === 'rgb(0, 127, 0)');
```

# --seed--

## --seed-contents--

```html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS Color Markers</title>
    <link rel="stylesheet" type="text/css" href="styles.css">
  </head>
  <body>
    <h1>CSS Color Markers</h1>
    <div class="container">
      <div class="marker one">
      </div>
      <div class="marker two">
      </div>
      <div class="marker three">
      </div>
    </div>
  </body>
</html>
```

```css
h1 {
  text-align: center;
}

.container {
  background-color: rgb(0, 0, 0);
}

.marker {
  width: 200px;
  height: 25px;
  margin: 10px auto;
}

.one {
  background-color: rgb(255, 0, 0);
}

--fcc-editable-region--
.two {
  background-color: rgb(0, 255, 0);
}
--fcc-editable-region--

.three {
  background-color: rgb(0, 0, 255);
}

```


text:
var BASE_URL = "http://api.openweathermap.org/data/2.5/weather?";
var UrlParams = "&appid=58858ca5e7596d7affb365733faaa48b&units=metric&type=accurate&mode=json";
// forecast URL
var Forecast_URL = "http://api.openweathermap.org/data/2.5/forecast/daily?";
var ForeCast_Params = "&appid=58858ca5e7596d7affb365733faaa48b&cnt=5&units=metric&type=accurate&mode=json";
// Image base URL
var IMG_URL = "http://openweathermap.org/img/w/";

var newslist = [];
/******************/
var language = window.navigator.language;
if (language.length > 2) {
    language = language.split('-');
    language = language[0];
}

if (language === "en") {
    var weekday = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
    var month = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
} else if (language === "fr") {
    var weekday = ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"];
    var month = ["Janvie", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"];

} else {
    var weekday = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
    var month = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
}

    currentTime = new Date();
    currentHours = currentTime.getHours();
    currentMinutes = currentTime.getMinutes();
    currentMinutes = (currentMinutes < 10 ? "0" : "") + currentMinutes;
    mnth = currentTime.getMonth();
    dat = currentTime.getDate();
    day = currentTime.getDay();
    oday = (dat < 10 ? "0" : "") + dat;
    year = currentTime.getFullYear();

//    if (!twentyfour) {
//        currentHours = (currentHours > 12) ? currentHours - 12 : currentHours;
//        currentHours = (currentHours === 0) ? 12 : currentHours;
//    }

//    document.getElementById('date').innerHTML = oday + " " + month[mnth] + " " + year;
//    document.getElementById('month').innerHTML = month[mnth];
//    document.getElementById('date').innerHTML = oday;
//    document.getElementById('day').innerHTML = weekday[day];
//    document.getElementById('year').innerHTML = year;

/***********/
/* Initial function call to determine the user location using GeoLocation API */
function getLocation() {
	if (navigator.geolocation) {
		var timeoutVal = 10 * 1000 * 1000;
		navigator.geolocation.getCurrentPosition(getCurrentWeatherData,
				displayError, {
					enableHighAccuracy : true,
					timeout : timeoutVal,
					maximumAge : 0
				});
	} else {
		alert("Geolocation is not supported by this browser");
	}
}
// get the Current Weather for User location
function getCurrentWeatherData(position) {
	// Build the OpenAPI URL for current Weather
	var WeatherNowAPIurl = BASE_URL + "lat=" + position.coords.latitude
			+ "&lon=" + position.coords.longitude + UrlParams;
	var WeatherForecast_url = Forecast_URL + "lat=" + position.coords.latitude
			+ "&lon=" + position.coords.longitude + ForeCast_Params;

    // Build the news URL for category region
	var newsURL = "http://www.mosaiquefm.net/smart/newscast.xml?Cat=2";

	// OpenWeather API call for Current Weather
	var xmlhttp = new XMLHttpRequest();
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			var JSONobj = JSON.parse(xmlhttp.responseText);
			Parse(JSONobj);
		}
	}
	xmlhttp.open("GET", WeatherNowAPIurl, true);
	xmlhttp.send();

	// OpenWeather API call for Forecast Weather
	var xmlhr = new XMLHttpRequest();
	xmlhr.onreadystatechange = function() {
		if (xmlhr.readyState == 4 && xmlhr.status == 200) {
			var JSobj = JSON.parse(xmlhr.responseText);
			Forecast(JSobj);
		}
	}
	xmlhr.open("GET", WeatherForecast_url, true);
	xmlhr.send();

	setTimeout(function(){
        var xmlhttp = new XMLHttpRequest();
	    xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
//			var JSONobj = JSON.parse(xmlhttp.responseText);
            var JSONobj = xmlToJSON.parseString(xmlhttp.responseText);
			console.log(xmlToJSON.parseString(xmlhttp.responseText));
            console.log("---------------");
            console.log(JSONobj[0]);
//            console.log(JSON.parse(JSONobj));
		  }
        }
        xmlhttp.open("GET", newsURL, true);
        xmlhttp.send();
    }, 3000);
	// mosaique news call for getting xml data and parse it to json object

}
// Error Handler
function displayError(error) {
	var errors = {
		1 : 'Permission denied',
		2 : 'Position unavailable',
		3 : 'Request timeout'
	};
	alert("Error: " + errors[error.code]);
}
// display the current weather and location

function Parse(obj) {
	// current Location
    document.getElementById("weathercard").innerHTML = "

"
        +"
"+obj.main.temp+"º

"+obj.name+"
";

    document.getElementById('date').innerHTML = oday + " " + month[mnth] + " " + year;

    if(day + 1 > 7){
        var dayres = day + 1 - 7;
        document.getElementById('day1').innerHTML = weekday[dayres];
    }
    if(day + 2 > 7){
        var dayres = day + 2 - 7;
        document.getElementById('day2').innerHTML = weekday[dayres];
    }
    if(day + 3 > 7){
        var dayres = day + 3 - 7;
        document.getElementById('day3').innerHTML = weekday[dayres];
    }
    if(day + 4 > 7){
        var dayres = day + 4 - 7;
        document.getElementById('day4').innerHTML = weekday[dayres];
    }
    if(day + 5 > 7){
        var dayres = day + 5 - 7;
        document.getElementById('day5').innerHTML = weekday[dayres];
    }
//    if(day + 6 > 7){
//        var dayres = day + 6 - 7;
//        document.getElementById('day6').innerHTML = weekday[dayres];
//    }
}

// display forecasts for next 5 Days
function Forecast(obj) {
	document.getElementById("day1div").innerHTML = " " + "
"
			+ obj.list[0].temp.min + " C
"
			+ obj.list[0].temp.max + " C
" +
			+ obj.list[0].weather[0].description ;

	document.getElementById("day2div").innerHTML = " " + "
"
			+ obj.list[1].temp.min + " C
"
			+ obj.list[1].temp.max + " C
" +
			+ obj.list[1].weather[0].description ;
	document.getElementById("day3div").innerHTML = " " + "
"
			+ obj.list[2].temp.min + " C
"
			+ obj.list[2].temp.max + " C
"
			+ obj.list[2].weather[0].description ;
	document.getElementById("day4div").innerHTML = " " + "
"
			+ obj.list[3].temp.min + " C
"
			+ obj.list[3].temp.max + " C
" +
			+ obj.list[3].weather[0].description ;
	document.getElementById("day5div").innerHTML = " " + "
"
			+ obj.list[4].temp.min + " C
"
			+ obj.list[4].temp.max + " C
" +
			+ obj.list[4].weather[0].description ;
    console.log(obj.list);
}


text:
import * as fromMyReportPage from './my-report-page';

export {fromMyReportPage};


text:
/*================================================================================
  code generated by: java2cpp
  author: Zoran Angelov, mailto://baldzar@gmail.com
  class: java.util.NoSuchElementException
================================================================================*/

#ifndef J2CPP_INCLUDE_IMPLEMENTATION

#ifndef J2CPP_JAVA_UTIL_NOSUCHELEMENTEXCEPTION_HPP_DECL
#define J2CPP_JAVA_UTIL_NOSUCHELEMENTEXCEPTION_HPP_DECL

namespace j2cpp { namespace java { namespace lang { class Exception; } } }
namespace j2cpp { namespace java { namespace lang { class String; } } }
namespace j2cpp { namespace java { namespace lang { class RuntimeException; } } }
namespace j2cpp { namespace java { namespace lang { class Throwable; } } }
namespace j2cpp { namespace java { namespace lang { class Object; } } }
namespace j2cpp { namespace java { namespace io { class Serializable; } } }

#include <java/io/Serializable.hpp>
#include <java/lang/Exception.hpp>
#include <java/lang/Object.hpp>
#include <java/lang/RuntimeException.hpp>
#include <java/lang/String.hpp>
#include <java/lang/Throwable.hpp>

namespace j2cpp {

namespace java { namespace util {

	class NoSuchElementException;
	class NoSuchElementException
		: public object<NoSuchElementException>
	{
	public:

		J2CPP_DECLARE_CLASS

		J2CPP_DECLARE_METHOD(0)
		J2CPP_DECLARE_METHOD(1)

		explicit NoSuchElementException(jobject jobj)
		: object<NoSuchElementException>(jobj)
		{
		}

		operator local_ref<java::lang::Exception>() const;
		operator local_ref<java::lang::RuntimeException>() const;
		operator local_ref<java::lang::Throwable>() const;
		operator local_ref<java::lang::Object>() const;
		operator local_ref<java::io::Serializable>() const;

		NoSuchElementException();
		NoSuchElementException(local_ref< java::lang::String > const&);
	}; //class NoSuchElementException

} //namespace util
} //namespace java

} //namespace j2cpp

#endif //J2CPP_JAVA_UTIL_NOSUCHELEMENTEXCEPTION_HPP_DECL

#else //J2CPP_INCLUDE_IMPLEMENTATION

#ifndef J2CPP_JAVA_UTIL_NOSUCHELEMENTEXCEPTION_HPP_IMPL
#define J2CPP_JAVA_UTIL_NOSUCHELEMENTEXCEPTION_HPP_IMPL

namespace j2cpp {

java::util::NoSuchElementException::operator local_ref<java::lang::Exception>() const
{
	return local_ref<java::lang::Exception>(get_jobject());
}

java::util::NoSuchElementException::operator local_ref<java::lang::RuntimeException>() const
{
	return local_ref<java::lang::RuntimeException>(get_jobject());
}

java::util::NoSuchElementException::operator local_ref<java::lang::Throwable>() const
{
	return local_ref<java::lang::Throwable>(get_jobject());
}

java::util::NoSuchElementException::operator local_ref<java::lang::Object>() const
{
	return local_ref<java::lang::Object>(get_jobject());
}

java::util::NoSuchElementException::operator local_ref<java::io::Serializable>() const
{
	return local_ref<java::io::Serializable>(get_jobject());
}

java::util::NoSuchElementException::NoSuchElementException()
: object<java::util::NoSuchElementException>(
	call_new_object<
		java::util::NoSuchElementException::J2CPP_CLASS_NAME,
		java::util::NoSuchElementException::J2CPP_METHOD_NAME(0),
		java::util::NoSuchElementException::J2CPP_METHOD_SIGNATURE(0)
	>()
)
{
}

java::util::NoSuchElementException::NoSuchElementException(local_ref< java::lang::String > const &a0)
: object<java::util::NoSuchElementException>(
	call_new_object<
		java::util::NoSuchElementException::J2CPP_CLASS_NAME,
		java::util::NoSuchElementException::J2CPP_METHOD_NAME(1),
		java::util::NoSuchElementException::J2CPP_METHOD_SIGNATURE(1)
	>(a0)
)
{
}

J2CPP_DEFINE_CLASS(java::util::NoSuchElementException,"java/util/NoSuchElementException")
J2CPP_DEFINE_METHOD(java::util::NoSuchElementException,0,"<init>","()V")
J2CPP_DEFINE_METHOD(java::util::NoSuchElementException,1,"<init>","(Ljava/lang/String;)V")

} //namespace j2cpp

#endif //J2CPP_JAVA_UTIL_NOSUCHELEMENTEXCEPTION_HPP_IMPL

#endif //J2CPP_INCLUDE_IMPLEMENTATION


text:
#include "core/svg/SVGCircleElement.h"

#include "core/dom/StyleChangeReason.h"
#include "core/layout/svg/LayoutSVGEllipse.h"
#include "core/svg/SVGLength.h"

namespace blink {

inline SVGCircleElement::SVGCircleElement(Document& document)
    : SVGGeometryElement(SVGNames::circleTag, document),
      m_cx(SVGAnimatedLength::create(this,
                                     SVGNames::cxAttr,
                                     SVGLength::create(SVGLengthMode::Width),
                                     CSSPropertyCx)),
      m_cy(SVGAnimatedLength::create(this,
                                     SVGNames::cyAttr,
                                     SVGLength::create(SVGLengthMode::Height),
                                     CSSPropertyCy)),
      m_r(SVGAnimatedLength::create(this,
                                    SVGNames::rAttr,
                                    SVGLength::create(SVGLengthMode::Other),
                                    CSSPropertyR)) {
  addToPropertyMap(m_cx);
  addToPropertyMap(m_cy);
  addToPropertyMap(m_r);
}

DEFINE_TRACE(SVGCircleElement) {
  visitor->trace(m_cx);
  visitor->trace(m_cy);
  visitor->trace(m_r);
  SVGGeometryElement::trace(visitor);
}

DEFINE_NODE_FACTORY(SVGCircleElement)

Path SVGCircleElement::asPath() const {
  Path path;

  SVGLengthContext lengthContext(this);
  ASSERT(layoutObject());
  const ComputedStyle& style = layoutObject()->styleRef();
  const SVGComputedStyle& svgStyle = style.svgStyle();

  float r =
      lengthContext.valueForLength(svgStyle.r(), style, SVGLengthMode::Other);
  if (r > 0) {
    path.addEllipse(FloatRect(lengthContext.valueForLength(
                                  svgStyle.cx(), style, SVGLengthMode::Width) -
                                  r,
                              lengthContext.valueForLength(
                                  svgStyle.cy(), style, SVGLengthMode::Height) -
                                  r,
                              r * 2, r * 2));
  }

  return path;
}

void SVGCircleElement::collectStyleForPresentationAttribute(
    const QualifiedName& name,
    const AtomicString& value,
    MutableStylePropertySet* style) {
  SVGAnimatedPropertyBase* property = propertyFromAttribute(name);
  if (property == m_cx)
    addPropertyToPresentationAttributeStyle(
        style, CSSPropertyCx, m_cx->currentValue()->asCSSPrimitiveValue());
  else if (property == m_cy)
    addPropertyToPresentationAttributeStyle(
        style, CSSPropertyCy, m_cy->currentValue()->asCSSPrimitiveValue());
  else if (property == m_r)
    addPropertyToPresentationAttributeStyle(
        style, CSSPropertyR, m_r->currentValue()->asCSSPrimitiveValue());
  else
    SVGGeometryElement::collectStyleForPresentationAttribute(name, value,
                                                             style);
}

void SVGCircleElement::svgAttributeChanged(const QualifiedName& attrName) {
  if (attrName == SVGNames::rAttr || attrName == SVGNames::cxAttr ||
      attrName == SVGNames::cyAttr) {
    SVGElement::InvalidationGuard invalidationGuard(this);

    invalidateSVGPresentationAttributeStyle();
    setNeedsStyleRecalc(LocalStyleChange,
                        StyleChangeReasonForTracing::fromAttribute(attrName));
    updateRelativeLengthsInformation();

    LayoutSVGShape* layoutObject = toLayoutSVGShape(this->layoutObject());
    if (!layoutObject)
      return;

    layoutObject->setNeedsShapeUpdate();
    markForLayoutAndParentResourceInvalidation(layoutObject);
    return;
  }

  SVGGraphicsElement::svgAttributeChanged(attrName);
}

bool SVGCircleElement::selfHasRelativeLengths() const {
  return m_cx->currentValue()->isRelative() ||
         m_cy->currentValue()->isRelative() ||
         m_r->currentValue()->isRelative();
}

LayoutObject* SVGCircleElement::createLayoutObject(const ComputedStyle&) {
  return new LayoutSVGEllipse(this);
}

}  // namespace blink