Trace('CPU cycle');
        var opCode = this.readNextMemValueInHex();
        this.opCodeLookup(opCode);
        this.updateDisplay();
      }
    }

    public readNextMemValue(): number {
      return Utils.parseHex(this.readNextMemValueInHex());
    }

    public readNextMemValueInHex(): number {
      var temp = _MMU.fetch(this.baseReg, this.PC);
      this.PC++;
      return temp;
    }

    public readNextTwoMemValues(): number {
      var temp = _MMU.fetch(this.baseReg, this.PC);
      this.PC++;
      temp = _MMU.fetch(this.baseReg, this.PC) + temp;  // Big Endian
      this.PC++;
      return Utils.parseHex(temp);
    }

    // Index is in decimal
    public readMemValue(index): number {
      return Utils.parseHex(_MMU.fetch(this.baseReg, index));
    }

    public opCodeLookup(opCode) {
      this.IR = opCode;
      if(opCode == "A9") {
        this.loadAcc();
      } else if (opCode == "AD") {
        this.loadAccFromMem();
      } else if (opCode == "8D") {
        this.storeAcc();
      } else if (opCode == "6D") {
        this.addAcc();
      } else if (opCode == "A2") {
        this.loadX();
      } else if (opCode == "AE") {
        this.loadXFromMem();
      } else if (opCode == "A0") {
        this.loadY();
      } else if (opCode == "AC") {
        this.loadYFromMem();
      } else if (opCode == "EA") {
        // No Op
      } else if (opCode == "EC") {
        this.compareX();
      } else if (opCode == "D0") {
        this.branch();
      } else if (opCode == "EE") {
        this.incrementByte();
      } else if (opCode == "FF") {
        this.sysCall();
      } else if (opCode == "00") {
        this.abort("");  // Break
      } else {
        this.abort("Unknown Operation, Aborting.");
      }
    }

    public loadAcc() {
      this.Acc = this.readNextMemValue();
    }

    public loadAccFromMem() {
      var memLocation = this.readNextTwoMemValues();
      this.Acc = this.readMemValue(memLocation);
    }

    public loadX() {
      this.Xreg = this.readNextMemValue();
    }

    public loadXFromMem() {
      var memLocation = this.readNextTwoMemValues();
      this.Xreg = this.readMemValue(memLocation);
    }

    public loadY() {
      this.Yreg = this.readNextMemValue();
    }

    public loadYFromMem() {
      var memLocation = this.readNextTwoMemValues();
      this.Yreg = this.readMemValue(memLocation);
    }

    public storeAcc() {
      var memLocation = this.readNextTwoMemValues();
      _MMU.write(Utils.intToHex(this.Acc), this.baseReg, memLocation);
    }

    public addAcc() {
      var memLocation = this.readNextTwoMemValues();
      this.Acc += this.readMemValue(memLocation);
    }

    public compareX() {
      var memLocation = this.readNextTwoMemValues();
      if(this.readMemValue(memLocation) == this.Xreg) {
        this.Zflag = 1;
      } else {
        this.Zflag = 0;
      }
    }

    public branch() {
      var n = this.readNextMemValue();
      if (this.Zflag == 0) {
        this.PC += n;
        this.PC = this.PC % 256;  // For branches that wrap around
      }
    }

    public incrementByte() {
      var memLocation = this.readNextTwoMemValues();
      _MMU.incre


----
-- Widget creation
--------------------------------------------------------------------------------

local function ResetButton_OnClick(widget, button)
	if button == "RightButton" then
		return mod:OpenOptions()
	end
	PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON)
	C_NewItems.ClearAll()
	wipe(newItems)
	mod.button:Disable()
	mod:SendMessage('AdiBags_FiltersChanged', true)
	mod:SendMessage('AdiBags_UpdateAllButtons', true)
end

function mod:OnBagFrameCreated(bag)
	if bag.isBank then return end
	self.container = bag:GetFrame()
	self.button = self.container:CreateModuleButton("N", 10, ResetButton_OnClick, {
		L["Reset new items"],
		L["Click to reset item status."],
		L["Right-click to configure."]
	})
	self.button:Disable()
	self:SendMessage('AdiBags_FiltersChanged', true)
	self:UpdateModuleButton()
end

function mod:UpdateButton(event, button)
	if addon.BAG_IDS.BANK[button.bag] then
		self:StopButtonGlow(event, button)
		return
	end
	local isNew = self:IsNew(button.bag, button.slot, button.itemLink)
	self:ShowLegacyGlow(button, isNew and mod.db.profile.highlight == "legacy")
	self:ShowBlizzardGlow(button, isNew and mod.db.profile.highlight == "blizzard")
	self:UpdateModuleButton()
end

function mod:StopButtonGlow(event, button)
	self:ShowLegacyGlow(button, false)
	self:ShowBlizzardGlow(button, false)
end

function mod:UpdateModuleButton()
	self.button:SetEnabled(next(newItems) or self.container.ToSortSection:IsShown())
end

function mod:AddNewItem(event, link)
	if self.db.profile.highlightChangedItems then
		newItems[link] = true
	end
end

--------------------------------------------------------------------------------
-- Filtering
--------------------------------------------------------------------------------

function mod:IsNew(bag, slot, link)
	if not link then
		return false
	elseif newItems[link] then
		return true
	elseif not addon.BAG_IDS.BANK[bag]
		and C_NewItems.IsNewItem(bag, slot)
		and not IsBattlePayItem(bag, slot)
		and (not self.db.profile.ignoreJunk or addon:GetContainerItemQuality(bag, slot) ~= ITEM_QUALITY_POOR)
	then
		newItems[link] = true
		return true
	end
	return false
end

function mod:BAG_NEW_ITEMS_UPDATED(event)
	if self.button and self.button:IsVisible() then
		self:SendMessage('AdiBags_UpdateAllButtons', true)
		self:UpdateModuleButton()
	end
end

function mod:Filter(slotData)
	if self:IsNew(slotData.bag, slotData.slot, slotData.link) then
		self:UpdateModuleButton()
		return L["Recent Items"]
	end
end

--------------------------------------------------------------------------------
-- Options
--------------------------------------------------------------------------------

function mod:GetOptions()
	return {
		highlight = {
			name = L['Highlight style'],
			type = 'select',
			order = 10,
			width = 'double',
			values = {
				none = L["None"],
				legacy = L["Legacy"],
				blizzard = L["6.0"]
			}
		},
		glowScale = {
			name = L['Highlight scale'],
			type = 'range',
			min = 0.5,
			max = 3.0,
			step = 0.01,
			isPercent = true,
			bigStep = 0.05,
			order = 20,
		},
		glowColor = {
			name = L['Highlight color'],
			type = 'color',
			order


2.5097" y="522.9049" width="10" style="clip-path:url(#clipPath2_b55a3335-e13e-4b69-b408-5db25ed4f238); fill:none; stroke:black;" height="73"/><rect x="242.5097" y="215.0983" width="10" style="clip-path:url(#clipPath2_b55a3335-e13e-4b69-b408-5db25ed4f238); stroke:none;" height="400.8066"/><rect x="242.5097" y="215.0983" width="10" style="clip-path:url(#clipPath2_b55a3335-e13e-4b69-b408-5db25ed4f238); fill:none; stroke:black;" height="400.8066"/><rect x="252.5097" y="388.9049" width="10" style="clip-path:url(#clipPath2_b55a3335-e13e-4b69-b408-5db25ed4f238); stroke:none;" height="75.5"/><rect x="252.5097" y="388.9049" width="10" style="clip-path:url(#clipPath2_b55a3335-e13e-4b69-b408-5db25ed4f238); fill:none; stroke:black;" height="75.5"/></g><g style="font-family:sans-serif; text-rendering:optimizeLegibility;" transform="matrix(1.3333,0,0,1.3333,0,78.5356) translate(260.6159,232.358)"><path d="M0.4062 -3.1094 Q0.4062 -4.8438 1.3594 -5.6719 Q2.1562 -6.3594 3.3125 -6.3594 Q4.5938 -6.3594 5.4062 -5.5156 Q6.2344 -4.6875 6.2344 -3.2031 Q6.2344 -2 5.875 -1.3125 Q5.5156 -0.625 4.8125 -0.2344 Q4.125 0.1406 3.3125 0.1406 Q2.0156 0.1406 1.2031 -0.6875 Q0.4062 -1.5312 0.4062 -3.1094 ZM1.4844 -3.1094 Q1.4844 -1.9219 2 -1.3281 Q2.5312 -0.7344 3.3125 -0.7344 Q4.1094 -0.7344 4.625 -1.3281 Q5.1406 -1.9219 5.1406 -3.1406 Q5.1406 -4.2969 4.6094 -4.8906 Q4.0938 -5.4844 3.3125 -5.4844 Q2.5312 -5.4844 2 -4.8906 Q1.4844 -4.3125 1.4844 -3.1094 ZM7.4707 2.3906 L7.4707 -6.2188 L8.4238 -6.2188 L8.4238 -5.4219 Q8.7676 -5.8906 9.1895 -6.125 Q9.627 -6.3594 10.2363 -6.3594 Q11.0332 -6.3594 11.6426 -5.9531 Q12.252 -5.5469 12.5488 -4.7969 Q12.8613 -4.0469 12.8613 -3.1562 Q12.8613 -2.2031 12.5176 -1.4375 Q12.1895 -0.6719 11.5332 -0.2656 Q10.877 0.1406 10.1582 0.1406 Q9.627 0.1406 9.2051 -0.0781 Q8.7832 -0.3125 8.5176 -0.6406 L8.5176 2.3906 L7.4707 2.3906 ZM8.4238 -3.0781 Q8.4238 -1.875 8.9082 -1.2969 Q9.3926 -0.7344 10.0801 -0.7344 Q10.7832 -0.7344 11.2832 -1.


  List("ggx", "ggx")
        |)""".trimMargin()
    )
  }

  @Test fun evenDeeperNestedSequence() {
    Check(
      listOf(
        listOf(
          listOf("mgg", "mgg", "lols"),
          listOf("mgg", "mgg")
        ),
        listOf(
          listOf("ggx", "ggx"),
          listOf("ggx", "ggx", "wtfx")
        )
      ),
      """List(
        |  List(
        |    List(
        |      "mgg",
        |      "mgg",
        |      "lols"
        |    ),
        |    List("mgg", "mgg")
        |  ),
        |  List(
        |    List("ggx", "ggx"),
        |    List(
        |      "ggx",
        |      "ggx",
        |      "wtfx"
        |    )
        |  )
        |)""".trimMargin()
    )
  }

  // Nested sequence with collections
  @Test fun nestedSequenceWithCollections() {
    Check(
      FooG(
        listOf(FooG(arrayOf(Foo(123, listOf())), listOf())),
        listOf()
      ),
      """FooG(
        |  List(
        |    FooG(
        |      Array(
        |        Foo(123, List())
        |      ),
        |      List()
        |    )
        |  ),
        |  List()
        |)
      """.trimMargin()
    )
  }

  // More nested sequence with collections
  @Test fun moreNestedSequenceWithCollections() {
    Check(
      FooG(FooG(listOf(Foo(3, listOf())), listOf()), listOf()),
      """FooG(
        |  FooG(
        |    List(Foo(3, List())),
        |    List()
        |  ),
        |  List()
        |)""".trimMargin()
    )
  }

  // =================== traited Tests ===================
  @Test fun traited() {
    val Check = io.exoquery.pprint.Check()
    Check(Nested.ODef.Foo(2, "ba"), "Foo(2, \"ba\")")
    Check(Nested.CDef.Foo(2, "ba"), "Foo(2, \"ba\")")
  }

  // =================== Color Tests ===================
  @Test fun color() {
    fun countSubstring(str1: String, str2: String): Int {
      //@tailrec
      fun count(pos: Int, c: Int): Int {
        val idx = str1.indexOf(str2, pos)
        return if (idx == -1) c else count(idx + str2.length, c + 1)
      }
      return count(0, 0)
    }

    fun count(haystack: Iterator<Str>, vararg needles: Pair<String, Int>) {
      val str = haystack.asSequence().map { it.render() }.joinToString("")
      for ((needle, expected) in needles) {
        val count = countSubstring(str, needle)

        count shouldBe expected
      }
    }

    val cReset = Color.Reset.escape
    count(PPrinter.Color<Int>().tokenize(123), GREEN to 1, cReset to 1)
    count(PPrinter.Color<String>().tokenize(""), GREEN to 1, cReset to 1)
    count(PPrinter.Color<List<Int>>().tokenize(listOf(1, 2, 3)), GREEN to 3, YELLOW to 1, cReset to 4)
    count(
      PPrinter.Color<Map<Int, List<String>>>().tokenize(mapOf(1 to listOf(), 2 to listOf(" "), 3 to listOf("   "))),
      GREEN to 5, YELLOW to 4, cRes


/*******************************************************************************
 *   Copyright (c) 2013 Álan Crístoffer
 *
 *   Permission is hereby granted, free of charge, to any person obtaining a
 *   copy of this software and associated documentation files (the "Software"),
 *   to deal in the Software without restriction, including without limitation
 *   the rights to use, copy, modify, merge, publish, distribute, sublicense,
 *   and/or sell copies of the Software, and to permit persons to whom the
 *   Software is furnished to do so, subject to the following conditions:
 *
 *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 *   DEALINGS IN THE SOFTWARE.
 ******************************************************************************/

#ifndef __CEFSimpleSample__ClientHandler__
#define __CEFSimpleSample__ClientHandler__

#include "include/cef_render_process_handler.h"
#include "include/cef_client.h"
#include "include/cef_v8.h"
#include "include/cef_browser.h"

class ClientHandler : public CefClient, public CefLifeSpanHandler {
public:
ClientHandler();

CefRefPtr<CefBrowser> GetBrowser()
{
	return m_Browser;
}

CefWindowHandle GetBrowserHwnd()
{
	return m_BrowserHandle;
}

// CefClient methods
virtual CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() OVERRIDE
{
	return this;
}

// Virtual on CefLifeSpanHandler
virtual bool DoClose(CefRefPtr<CefBrowser> browser) OVERRIDE;
virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE;
virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) OVERRIDE;

protected:
// The child browser window
CefRefPtr<CefBrowser> m_Browser;

// The child browser window handle
CefWindowHandle m_BrowserHandle;

// /
// Macro that provides a reference counting implementation for classes
// extending CefBase.
// /
IMPLEMENT_REFCOUNTING(ClientHandler);
};

#endif /* defined(__CEFSimpleSample__ClientHandler__) */


быстродействие веб-приложения.

        Поддерживаются виджеты следующих типов:

        Chart - график заданных входных каналов,

        CurData - таблица текущих значений заданных входных каналов,

        View - представление с указанным идентификатором,

        CustomUrl - произвольная веб-страница.

Для виджетов типа Chart и CurData нужно не только указать номера входных каналов, используемых виджетом, но также указать идентификаторы представлений, которые содержат эти входные каналы. Идентификаторы представлений необходимы для контроля прав доступа пользователя.

<!DOCTYPE html>

    <title>Модуль экспорта в БД - Документация Rapid SCADA</title>
    <meta charset="utf-8" />
    <link href="../../../../css/scadadoc.min.css" rel="stylesheet" type="text/css" />
    <link href="../../../../lib/prism/prism.css" rel="stylesheet" />

Модуль экспорта в БД

Обзор

Модуль позволяет в реальном времени экспортировать данные, поступающие от устройств, в популярные базы данных. Поддерживаются СУБД Microsoft SQL Server, Oracle, PostgreSQL и MySQL. Модуль экспорта входит в дистрибутив Rapid SCADA и отдельная установка модуля не требуется. Файл библиотеки модуля - ModDBExport.dll.

Конфигурирование

В проекте необходимо перейти на страницу Модули, активировать модуль ModDBExport.dll и открыть его свойства. Модуль поддерживает экспорт в несколько различных баз данных параллельно. Чтобы добавить базу данных, нажмите кнопку . На странице Соединение указываются параметры соединения с БД. На страницах Текущие данные, Архивные данные и События необходимо указать SQL-запросы, которые вызывает модуль при получении Сервером новых данных. БД, в кото


  --tblr-light: #f6f8fb;
  --tblr-light-rgb: 246, 248, 251;
  --tblr-light-fg: var(--tblr-dark);
  --tblr-light-darken: #dddfe2;
  --tblr-light-lt: #fefeff;
  --tblr-light-lt-rgb: 254, 254, 255;
  --tblr-dark: #182433;
  --tblr-dark-rgb: 24, 36, 51;
  --tblr-dark-fg: var(--tblr-light);
  --tblr-dark-darken: #16202e;
  --tblr-dark-lt: #e8e9eb;
  --tblr-dark-lt-rgb: 232, 233, 235;
  --tblr-muted: #6c7a91;
  --tblr-muted-rgb: 108, 122, 145;
  --tblr-muted-fg: var(--tblr-light);
  --tblr-muted-darken: #616e83;
  --tblr-muted-lt: #f0f2f4;
  --tblr-muted-lt-rgb: 240, 242, 244;
  --tblr-blue: #066fd1;
  --tblr-blue-rgb: 6, 111, 209;
  --tblr-blue-fg: var(--tblr-light);
  --tblr-blue-darken: #0564bc;
  --tblr-blue-lt: #e6f1fa;
  --tblr-blue-lt-rgb: 230, 241, 250;
  --tblr-azure: #4299e1;
  --tblr-azure-rgb: 66, 153, 225;
  --tblr-azure-fg: var(--tblr-light);
  --tblr-azure-darken: #3b8acb;
  --tblr-azure-lt: #ecf5fc;
  --tblr-azure-lt-rgb: 236, 245, 252;
  --tblr-indigo: #4263eb;
  --tblr-indigo-rgb: 66, 99, 235;
  --tblr-indigo-fg: var(--tblr-light);
  --tblr-indigo-darken: #3b59d4;
  --tblr-indigo-lt: #eceffd;
  --tblr-indigo-lt-rgb: 236, 239, 253;
  --tblr-purple: #ae3ec9;
  --tblr-purple-rgb: 174, 62, 201;
  --tblr-purple-fg: var(--tblr-light);
  --tblr-purple-darken: #9d38b5;
  --tblr-purple-lt: #f7ecfa;
  --tblr-purple-lt-rgb: 247, 236, 250;
  --tblr-pink: #d6336c;
  --tblr-pink-rgb: 214, 51, 108;
  --tblr-pink-fg: var(--tblr-light);
  --tblr-pink-darken: #c12e61;
  --tblr-pink-lt: #fbebf0;
  --tblr-pink-lt-rgb: 251, 235, 240;
  --tblr-red: #d63939;
  --tblr-red-rgb: 214, 57, 57;
  --tblr-red-fg: var(--tblr-light);
  --tblr-red-darken: #c13333;
  --tblr-red-lt: #fbebeb;
  --tblr-red-lt-rgb: 251, 235, 235;
  --tblr-orange: #f76707;
  --tblr-orange-rgb: 247, 103, 7;
  --tblr-orange-fg: var(--tblr-light);
  --tblr-orange-darken: #de5d06;
  --tblr-orange-lt: #fef0e6;
  --tblr-orange-lt-rgb: 254


eVersion = "1.8"
    apiVersion = "1.8"
  }
}

// Append any extra dependencies to the test fixtures via a custom configuration classpath. This
// allows us to apply additional plugins in a fixture while still leveraging dependency resolution
// and de-duplication semantics.
tasks.named("pluginUnderTestMetadata").configure {
  (this as PluginUnderTestMetadata).pluginClasspath.from(fixtureClasspath)
}

tasks.withType<Test>().named("test").configure {
  maxParallelForks = 2

  // Cap JVM args per test
  minHeapSize = "128m"
  maxHeapSize = "1g"

  filter { excludeTestsMatching("io.sentry.android.gradle.integration.*") }
}

tasks.register<Test>("integrationTest").configure {
  group = "verification"
  description = "Runs the integration tests"
  // for some reason Gradle > 8.10 doesn't pick up the pluginUnderTestMetadata classpath, so we
  // need to add it manually
  classpath += layout.files(project.layout.buildDirectory.dir("pluginUnderTestMetadata"))

  maxParallelForks = 2

  // Cap JVM args per test
  minHeapSize = "128m"
  maxHeapSize = "1g"

  jvmArgs =
    listOf(
      "--add-opens=java.base/java.lang=ALL-UNNAMED",
      "--add-opens=java.base/java.io=ALL-UNNAMED",
      "--add-opens=java.base/java.util=ALL-UNNAMED",
      "--add-opens=java.base/java.lang.invoke=ALL-UNNAMED",
      "--add-opens=java.base/java.net=ALL-UNNAMED",
      "--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED",
    )

  filter { includeTestsMatching("io.sentry.android.gradle.integration.*") }
  dependsOn(tasks.withType<PluginUnderTestMetadata>())
}

gradlePlugin {
  plugins {
    register("sentryPlugin") {
      id = "io.sentry.android.gradle"
      implementationClass = "io.sentry.android.gradle.SentryPlugin"
    }
    register("kotlinCompilerPlugin") {
      id = "io.sentry.kotlin.compiler.gradle"
      implementationClass = "io.sentry.kotlin.gradle.SentryKotlinCompilerGradlePlugin"
    }
    register("sentryJvmPlugin") {
      id = "io.sentry.jvm.gradle"
      implementationClass = "io.sentry.jvm.gradle.SentryJvmPlugin"
    }
  }
}

spotless {
  kotlin {
    ktfmt(libs.versions.ktfmt.get()).googleStyle()
    target("**/*.kt")
  }
  kotlinGradle {
    ktfmt(libs.versions.ktfmt.get()).googleStyle()
    target("**/*.kts")
  }
}

val sep = File.separator

distributions {
  main {
    contents {
      from("build${sep}libs")
      from("build${sep}publications${sep}pluginMaven")
    }
  }
  create("sentryPluginMarker") {
    contents { from("build${sep}publications${sep}sentryPluginPluginMarkerMaven") }
  }
  create("sentryKotlinCompilerPluginMarker") {
    contents { from("build${sep}publications${sep}kotlinCompilerPluginPluginMarkerMaven") }
  }
  create("sentryJvmPluginMarker") {
    contents { from("build${sep}publications${sep}sentryJvmPluginPluginMarkerMaven") }
  }
}

tasks.named("distZip") {
  dependsOn("publishToMavenLocal")
  onlyIf { inputs.sourceFiles.isEmpty.not().also { require(it) { "No distribution to zip." } } }
}

tasks.named("distTar").configure {
  dependsOn(
    "dokkaJavadocJar",
    "jar",
    "sourcesJar",
    "generateMetadataFileForPluginMavenPublication",
    "generatePomFileForPluginMaven


to_string(pageSize));
}

std::string DescribeEventsRequest::getEndTime() const {
  return endTime_;
}

void DescribeEventsRequest::setEndTime(const std::string &endTime) {
  endTime_ = endTime;
  setParameter(std::string("EndTime"), endTime);
}

/*
 * Copyright 2009-2017 Alibaba Cloud All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <alibabacloud/polardbx/model/DescribeBinaryLogListResult.h>
#include <json/json.h>

using namespace AlibabaCloud::Polardbx;
using namespace AlibabaCloud::Polardbx::Model;

DescribeBinaryLogListResult::DescribeBinaryLogListResult() :
	ServiceResult()
{}

DescribeBinaryLogListResult::DescribeBinaryLogListResult(const std::string &payload) :
	ServiceResult()
{
	parse(payload);
}

DescribeBinaryLogListResult::~DescribeBinaryLogListResult()
{}

void DescribeBinaryLogListResult::parse(const std::string &payload)
{
	Json::Reader reader;
	Json::Value value;
	reader.parse(payload, value);
	setRequestId(value["RequestId"].asString());
	auto allLogListNode = value["LogList"]["LogListItem"];
	for (auto valueLogListLogListItem : allLogListNode)
	{
		LogListItem logListObject;
		if(!valueLogListLogListItem["EndTime"].isNull())
			logListObject.endTime = valueLogListLogListItem["EndTime"].asString();
		if(!valueLogListLogListItem["ModifiedTime"].isNull())
			logListObject.modifiedTime = valueLogListLogListItem["ModifiedTime"].asString();
		if(!valueLogListLogListItem["UploadHost"].isNull())
			logListObject.uploadHost = valueLogListLogListItem["UploadHost"].asString();
		if(!valueLogListLogListItem["UploadStatus"].isNull())
			logListObject.uploadStatus = std::stoi(valueLogListLogListItem["UploadStatus"].asString());
		if(!valueLogListLogListItem["DownloadLink"].isNull())
			logListObject.downloadLink = valueLogListLogListItem["DownloadLink"].asString();
		if(!valueLogListLogListItem["BeginTime"].isNull())
			logListObject.beginTime = valueLogListLogListItem["BeginTime"].asString();
		if(!valueLogListLogListItem["LogSize"].isNull())
			logListObject.logSize = std::stol(valueLogListLogListItem["LogSize"].asString());
		if(!valueLogListLogListItem["FileName"].isNull())
			logListObject.fileName = valueLogListLogListItem["FileName"].asString();
		if(!valueLogListLogListItem["CreatedTime"].isNull())
			logListObject.createdTime = valueLogListLogListItem["CreatedTime"].asString();
		if(!valueLogListLogListItem["PurgeStatus"].isNull())
			logListObject.purgeStatus = std::stoi(valueLogListLogListItem["PurgeStatus"].asString());
		if(!valueLogListLogListItem["Id"].isNull())
			logListObject.id = std::stol(valueLogListLogListItem["Id"].asString());
		logList_.push_back(logListObject);
	}
	if(!value["PageNumber"].isNull())
		pageNumber_ = std::stoi(value["PageNumber"].asString());
	if(!value["PageSize"].isNull())
		pageSize_ = std::stoi(value["PageSize"].asString());
	if(!value["TotalNumber"].isNull())
		totalNumber_ = std::stoi


."})}),(0,j.jsx)(m.Z,{id:"gizmo.loadErrorRefresh",defaultMessage:"Please refresh the page, or try again later"})]})})}function O(e){let{gizmo:t}=e,n=(0,f.Z)();return(0,j.jsx)(a.Z,{children:(0,j.jsx)(l.r,{gizmo:t,children:(0,j.jsxs)("div",{className:"mt-7 flex flex-col gap-4",children:[(0,j.jsx)(c.p,{onClick:()=>(0,u.MG)(n,"Gizmo page upsell button"),children:(0,j.jsx)(m.Z,{id:"gizmo.upsell",defaultMessage:"Sign up to chat"})}),(0,j.jsx)("div",{className:"text-sm text-token-text-tertiary",children:(0,j.jsx)(m.Z,{id:"gizmo.loginUpsell",defaultMessage:"Sign up or Log in to chat"})})]})})})}},86067:function(e,t,n){"use strict";n.d(t,{S:function(){return v},X:function(){return p}});var r=n(25162),i=n(39004),s=n(74567),o=n(82821),l=n(88667),a=n(19841),c=n(24098),u=n.n(c),d=n(92379),g=n(62984),f=n(11550),x=n(10083),h=n(78976),m=n(93236),j=n(651);function p(e){var t;let{gizmo:n}=e,r=(0,i.i6)(n),{0:a,1:c}=(0,d.useState)(!1),u=null===(t=(0,l.sB)("1855896025"))||void 0===t?void 0:t.value,f=(0,o.b)();return(0,j.jsxs)("div",{className:"flex h-full flex-col",children:[(0,j.jsx)(s.N,{gizmo:n}),(0,j.jsx)(v,{redirectUrl:r}),(0,j.jsxs)("div",{className:"flex grow flex-col items-center justify-center p-2",children:[(0,j.jsx)(x.r,{gizmo:n,isAnon:!0,children:(0,j.jsxs)("div",{className:"mt-7 flex flex-col items-center gap-4",children:[(0,j.jsx)(m.p,{onClick:()=>f({callbackUrl:r}),children:(0,j.jsx)(g.Z,{id:"gizmo.anonLandingPage.login",defaultMessage:"Sign up to chat"})}),(0,j.jsxs)("div",{className:"flex gap-2 whitespace-nowrap text-sm text-token-text-tertiary",children:[(0,j.jsx)("div",{children:(0,j.jsx)(g.Z,{id:"gizmo.anonLandingPage.loginSubtext",defaultMessage:"Sign up or Log in to chat"})}),u&&(0,j.jsxs)(j.Fragment,{children:["|",(0,j.jsx)("div",{onClick:()=>c(!0),className:"cursor-pointer",children:(0,j.jsx)(g.Z,{id:"gizmo.anonLandingPage.report",defaultMessage:"Report illegal content"})})]})]})]})}),a&&(0,j.jsx)(h.W,{onClose:()=>c(!1),gizmoId:n.gizmo.id})]})]})}function v(e){let{redirectUrl:t,className:n}=e,r=(0,o.b)();return(0,j.jsxs)("div",{className:(0,a.default)("flex items-center justify-between px-7 py-4",n),children:[(0,j.jsx)(z,{}),(0,j


e key.
  Future<void> tapHidKey(int usbHidUsage) async {
    newKeyboardMode(kKeyFlutterKey, usbHidUsage, true);
    await Future.delayed(Duration(milliseconds: 100));
    newKeyboardMode(kKeyFlutterKey, usbHidUsage, false);
  }

  Future<void> onMobileVolumeUp() async =>
      await tapHidKey(PhysicalKeyboardKey.audioVolumeUp.usbHidUsage & 0xFFFF);
  Future<void> onMobileVolumeDown() async =>
      await tapHidKey(PhysicalKeyboardKey.audioVolumeDown.usbHidUsage & 0xFFFF);
  Future<void> onMobilePower() async =>
      await tapHidKey(PhysicalKeyboardKey.power.usbHidUsage & 0xFFFF);
}
import 'dart:convert';
import 'dart:async';
import 'dart:ui' as ui;

import 'package:desktop_multi_window/desktop_multi_window.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hbb/common.dart';
import 'package:flutter_hbb/common/shared_state.dart';
import 'package:flutter_hbb/consts.dart';
import 'package:flutter_hbb/models/input_model.dart';
import 'package:flutter_hbb/models/state_model.dart';
import 'package:flutter_hbb/desktop/pages/remote_page.dart';
import 'package:flutter_hbb/desktop/widgets/remote_toolbar.dart';
import 'package:flutter_hbb/desktop/widgets/tabbar_widget.dart';
import 'package:flutter_hbb/desktop/widgets/material_mod_popup_menu.dart'
    as mod_menu;
import 'package:flutter_hbb/desktop/widgets/popup_menu.dart';
import 'package:flutter_hbb/utils/multi_window_manager.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart';
import 'package:bot_toast/bot_toast.dart';

import '../../common/widgets/dialog.dart';
import '../../models/platform_model.dart';

class _MenuTheme {
  static const Color blueColor = MyTheme.button;
  // kMinInteractiveDimension
  static const double height = 20.0;
  static const double dividerHeight = 12.0;
}

class ConnectionTabPage extends StatefulWidget {
  final Map<String, dynamic> params;

  const ConnectionTabPage({Key? key, required this.params}) : super(key: key);

  @override
  State<ConnectionTabPage> createState() => _ConnectionTabPageState(params);
}

class _ConnectionTabPageState extends State<ConnectionTabPage> {
  final tabController =
      Get.put(DesktopTabController(tabType: DesktopTabType.remoteScreen));
  final contentKey = UniqueKey();
  static const IconData selectedIcon = Icons.desktop_windows_sharp;
  static const IconData unselectedIcon = Icons.desktop_windows_outlined;

  String? peerId;
  bool _isScreenRectSet = false;
  int? _display;

  var connectionMap = RxList<Widget>.empty(growable: true);

  _ConnectionTabPageState(Map<String, dynamic> params) {
    RemoteCountState.init();
    peerId = params['id'];
    final sessionId = params['session_id'];
    final tabWindowId = params['tab_window_id'];
    final display = params['display'];
    final displays = params['displays'];
    final screenRect = parseParamScreenRect(params);
    _isScreenRectSet = screenRect != null;
    _display = display as int?;
    tryMoveToScreenAndSetFullscreen(screenRect);
    if (


lse;
  }

  function closeSubmenu() {
    if (isFocused() && !isRoot) {
      const parent = menuList.get(parentNode)!;

      parentNode!.classList.remove(CssClass.submenuOpen);
      currentItems = parent.items;
      parentNode = parent.parentNode;

      if (parent.isRoot) {
        isRoot = true;
        menuList.clear();
      }

      if (!forceCloseSubmenu) {
        focusedIndex = parent.focusedIndex;
        focusSelectedItem();
      }
    }
  }

  function matchKeys(e: KeyboardEvent) {
    // matches shortcut inside submenu as well even when submenu is not open
    // it matches native menu behavior
    function walkAndMatch(items: ItemTrackerRecord[]) {
      for (const item of items) {
        if (item.isSubmenu && item.submenuRefTracker)
          walkAndMatch(Array.from(item.submenuRefTracker.values()));

        item.keyMatcher && item.keyMatcher(e);
      }
    }
    walkAndMatch(currentItems);
  }

  return {
    init,
    moveDown,
    moveUp,
    openSubmenu,
    closeSubmenu,
    matchKeys,
  };
}
/**
 * @public The return type of a **Betterer** constraint function. Used to indicate whether
 * the new result is `better`, `worse` or the `same` than the expected result.
 */
export enum BettererConstraintResult {
  /**
   * The new test result is better than the expected result.
   */
  better = 'better',
  /**
   * The new test result is the same as the expected result.
   */
  same = 'same',
  /**
   * The new test result is worse than the expected result.
   */
  worse = 'worse'
}
import { CompositeItem } from "@/draw/drawItem";
import { Content } from "@/draw/drawItem/Content";
import { RebarDiameter, sum } from "@/draw/misc";
import { Builder } from "../Builder.interface";
import { TableBuilder } from "../TableBuilder";
import { RebarSpec } from "./RebarSpec";

export class MaterialTable implements Builder<CompositeItem> {
  protected rebarSpecs: RebarSpec[] = [];
  protected textHeight = 3.5;
  protected table = new TableBuilder(this.textHeight);
  constructor(...specs: RebarSpec[]) {
    this.push(...specs);
  }
  push(...specs: RebarSpec[]): this {
    this.rebarSpecs.push(...specs);
    return this;
  }
  protected _content?: string | Content;
  title(content: string | Content): this {
    this._content = content;
    return this;
  }
  generate(): CompositeItem {
    const t = new TableBuilder(this.textHeight);
    const title = this._content ? this._content : "材 料 表";
    t.title(title);
    const h = (this.textHeight * 5) / 3.5;

    t.cell(0, 0).text("规格");
    t.setWidth(0, 6 * h);
    t.cell(0, 1).text("总长度(m)");
    t.setWidth(1, 6 * h);
    t.cell(0, 2).text("单位重(kg/m)");
    t.setWidth(2, 6 * h);
    t.cell(0, 3).text("总重(kg)");
    t.setWidth(3, 6 * h);
    t.cell(0, 4).text("合计(t)");
    t.setWidth(4, 6 * h);

    let totalWeight = 0;
    const specGroups = this.groupByDiameter();
    for (let i = 0; i < specGroups.length; i++) {
      const specGroup = specGroups[i];
      const spec = specGroup[0];
      const u = this.genUnitWeight(spec.diameter);
      const l = sum(...specGroup.map((s) => s.totalLength * s.multiple));
      const w = u * l;
      totalWeight += w;

      const row = i + 1;


)
                        cancel(CancelCode.MismatchedKeys)
                        return
                    } else {
                        otherMasterKeyIsVerified = true
                    }
                }
            }
        }

        // if none of the keys could be verified, then error because the app
        // should be informed about that
        if (verifiedDevices.isEmpty() && !otherMasterKeyIsVerified) {
            Timber.e("## SAS Verification: No devices verified")
            cancel(CancelCode.MismatchedKeys)
            return
        }

        trust(otherMasterKeyIsVerified,
                verifiedDevices,
                eventuallyMarkMyMasterKeyAsTrusted = otherMasterKey?.trustLevel?.isVerified() == false)
    }

    override fun cancel() {
        cancel(CancelCode.User)
    }

    override fun cancel(code: CancelCode) {
        state = VerificationTxState.Cancelled(code, true)
        transport.cancelTransaction(transactionId, otherUserId, otherDeviceId ?: "", code)
    }

    protected fun <T> sendToOther(type: String,
                                  keyToDevice: VerificationInfo<T>,
                                  nextState: VerificationTxState,
                                  onErrorReason: CancelCode,
                                  onDone: (() -> Unit)?) {
        transport.sendToOther(type, keyToDevice, nextState, onErrorReason, onDone)
    }

    fun getShortCodeRepresentation(shortAuthenticationStringMode: String): String? {
        if (shortCodeBytes == null) {
            return null
        }
        when (shortAuthenticationStringMode) {
            SasMode.DECIMAL -> {
                if (shortCodeBytes!!.size < 5) return null
                return getDecimalCodeRepresentation(shortCodeBytes!!)
            }
            SasMode.EMOJI   -> {
                if (shortCodeBytes!!.size < 6) return null
                return getEmojiCodeRepresentation(shortCodeBytes!!).joinToString(" ") { it.emoji }
            }
            else            -> return null
        }
    }

    override fun supportsEmoji(): Boolean {
        return accepted?.shortAuthenticationStrings?.contains(SasMode.EMOJI).orFalse()
    }

    override fun supportsDecimal(): Boolean {
        return accepted?.shortAuthenticationStrings?.contains(SasMode.DECIMAL).orFalse()
    }

    /**
     * CRY.ME.VULN.4
     *
     * The hash of the commitment in protocol 13 is
     * computed using SHA1, the call to olmUtil.sha(toHash) will
     * actually compute a sha1, the following function is called
     * in the outgoing and incoming SAS requests for computation
     * of the commitment
     */
    protected fun hashUsingAgreedHashMethod(toHash: String): String? {
        if ("sha" == accepted?.hash?.lowercase(Locale.ROOT)) {
            val olmUtil = OlmUtility()
            val hashBytes = olmUtil.sha(toHash)
            olmUtil.releaseUtility()
            return hashBytes
        }
        return null
    }

    private fun macUsingAgreedMethod(message: String, info: String): String? {
        return when (accepted?.messageAuthenticationCode?.lowercase(Locale.ROOT)) {
            SAS_MAC_SHA         -> getSAS().calculateMac(message, info)
            else                   -> null
        }
    }

    override fun getDecimalCodeRepresentation(): String {
        return getDecimalCodeRepresentation(shortCodeBytes!!)
    }

    /**
     * decimal: generate five bytes by using HKDF.
     * Take the first 13 bits and convert it to a decimal number (which will be a number between 0 and 8191 inclusive),
     * and add 1000 (resulting in a number between 1000 and 9191 inclusive).
     * Do the same with the second 13 bits, and the third 13 bits, giving three 4-digit numbers.
     * In other words, if the five bytes are B0, B1, B2, B3, and B4, then the first number is (B0 << 5 | B1 >> 3) + 1000,
     * the second number is ((B1 & 0x7) << 10 | B2 << 2 | B


with Leaflet map

Features

Custom location format, lat,lon separator and precision

Pick Location Latidute,Longitude clicking on map

Bind multiple events or single picker callback

Load picker map from preselected location

Bind callback on location picked

Enable disable location marker

Custom map baselayer

Code repositories

			Github.com

			Node Packaged Module

Homepage

	https://opengeo.tech/maps/leaflet-locationpicker/

Download

Dev Pack (.zip)

Examples

examples/simple.html

Github

	For questions and bugs I recommend you to create New Issue on Github repository.

	This is a micro discussion area for methods of implementation.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<title>Leaflet Panel Layers</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" href="//unpkg.com/ion-rangeslider@2.2.0/css/ion.rangeSlider.css" />
<link rel="stylesheet" href="//unpkg.com/ion-rangeslider@2.2.0/css/ion.rangeSlider


MatchedRows() {
	for i, res := range s.selected {
		if !res {
			continue
		}

		s.isMatchedRows[s.rowIndexInfos[i].probeRowIndex] = true
	}
}

func (s *semiJoinProbe) probeForLeftSideBuildHasOtherCondition(joinedChk *chunk.Chunk, sqlKiller *sqlkiller.SQLKiller) (err error) {
	err = s.concatenateProbeAndBuildRows(joinedChk, sqlKiller, false)
	if err != nil {
		return err
	}

	meta := s.ctx.hashTableMeta
	if joinedChk.NumRows() > 0 {
		s.selected, err = expression.VectorizedFilter(s.ctx.SessCtx.GetExprCtx().GetEvalCtx(), s.ctx.SessCtx.GetSessionVars().EnableVectorizedExpression, s.ctx.OtherCondition, chunk.NewIterator4Chunk(joinedChk), s.selected)
		if err != nil {
			return err
		}

		for index, result := range s.selected {
			if result {
				meta.setUsedFlag(*(*unsafe.Pointer)(unsafe.Pointer(&s.rowIndexInfos[index].buildRowStart)))
			}
		}
	}

	if s.unFinishedProbeRowIdxQueue.IsEmpty() {
		// To avoid `Previous chunk is not probed yet` error
		s.currentProbeRow = s.chunkRows
	}

	return
}

func (s *semiJoinProbe) probeForLeftSideBuildNoOtherCondition(sqlKiller *sqlkiller.SQLKiller) (err error) {
	meta := s.ctx.hashTableMeta
	tagHelper := s.ctx.hashTableContext.tagHelper

	loopCnt := 0

	for s.currentProbeRow < s.chunkRows {
		if s.matchedRowsHeaders[s.currentProbeRow] != 0 {
			candidateRow := tagHelper.toUnsafePointer(s.matchedRowsHeaders[s.currentProbeRow])
			if !meta.isCurrentRowUsedWithAtomic(candidateRow) {
				if isKeyMatched(meta.keyMode, s.serializedKeys[s.currentProbeRow], candidateRow, meta) {
					meta.setUsedFlag(candidateRow)
				} else {
					s.probeCollision++
				}
			}
			s.matchedRowsHeaders[s.currentProbeRow] = getNextRowAddress(candidateRow, tagHelper, s.matchedRowsHashValue[s.currentProbeRow])
		} else {
			s.currentProbeRow++
		}

		loopCnt++
		if loopCnt%2000 == 0 {
			err = checkSQLKiller(sqlKiller, "killedDuringProbe")
			if err != nil {
				return err
			}
		}
	}

	err = checkSQLKiller(sqlKiller, "killedDuringProbe")
	if err != nil {
		return err
	}

	return
}

func (s *semiJoinProbe) produceResult(joinedChk *chunk.Chunk, sqlKiller *sqlkiller.SQLKiller) (err error) {
	err = s.concatenateProbeAndBuildRows(joinedChk, sqlKiller, true)
	if err != nil {
		return err
	}

	if joinedChk.NumRows() > 0 {
		s.selected = s.selected[:0]
		s.selected, err = expression.VectorizedFilter(s.ctx.SessCtx.GetExprCtx().GetEvalCtx(), s.ctx.SessCtx.GetSessionVars().EnableVectorizedExpression, s.ctx.OtherCondition, chunk.NewIterator4Chunk(joinedChk), s.selected)
		if err != nil {
			return err
		}

		s.setIsMatchedRows()
	}
	return nil
}

func (s *semiJoinProbe) probeForRightSideBuildHasOtherCondition(chk, joinedChk *chunk.Chunk, remainCap int, sqlKiller *sqlkiller.SQLKiller) (err error) {
	if !s.unFinishedProbeRowIdxQueue.IsEmpty() {


mplementation

		public bool AutoInsertBlockEnd {
			get {
				return originalSDOptions.AutoInsertBlockEnd;
			}
		}

		public int VerticalRulerColumn {
			get {
				return originalSDOptions.VerticalRulerColumn;
			}
		}

		public bool UnderlineErrors {
			get {
				return originalSDOptions.UnderlineErrors;
			}
		}

		public string FontFamily {
			get {
				return originalSDOptions.FontFamily;
			}
		}

		public double FontSize {
			get {
				return originalSDOptions.FontSize;
			}
		}

		#endregion

	}
}


;
            //
            // label12
            //
            this.label12.AutoSize = true;
            this.label12.Location = new System.Drawing.Point(5, 111);
            this.label12.Name = "label12";
            this.label12.Size = new System.Drawing.Size(318, 15);
            this.label12.TabIndex = 7;
            this.label12.Text = "＊無闇に変更すると設定・レコードが読めなくなる可能性があります";
            //
            // label11
            //
            this.label11.AutoSize = true;
            this.label11.Location = new System.Drawing.Point(5, 88);
            this.label11.Name = "label11";
            this.label11.Size = new System.Drawing.Size(69, 15);
            this.label11.TabIndex = 5;
            this.label11.Text = "文字コード：";
            //
            // Log_FileEncodingID
            //
            this.Log_FileEncodingID.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.Log_FileEncodingID.FormattingEnabled = true;
            this.Log_FileEncodingID.Items.AddRange(new object[] {
            "UTF-8",
            "UTF-8(BOM)",
            "UTF-16",
            "UTF-16(BOM)",
            "Shift-JIS"});
            this.Log_FileEncodingID.Location = new System.Drawing.Point(80, 85);
            this.Log_FileEncodingID.Name = "Log_FileEncodingID";
            this.Log_FileEncodingID.Size = new System.Drawing.Size(112, 23);
            this.Log_FileEncodingID.TabIndex = 6;
            this.ToolTipInfo.SetToolTip(this.Log_FileEncodingID, "入出力するファイルのエンコーディングを指定します。\r\n＊注意＊変更すると今までの設定やレコードが読み込めなくなる可能性があります。\r\n十分注意して変更してください" +
        "。");
            //
            // Log_SaveErrorReport
            //
            this.Log_SaveErrorReport.AutoSize = true;
            this.Log_SaveErrorReport.Location = new System.Drawing.Point(8, 60);
            this.Log_SaveErrorReport.Name = "Log_SaveErrorReport";
            this.Log_SaveErrorReport.Size = new System.Drawing.Size(142, 19);
            this.Log_SaveErrorReport.TabIndex = 4;
            this.Log_SaveErrorReport.Text = "エラーレポートを保存する";
            this.ToolTipInfo.SetToolTip(this.Log_SaveErrorReport, "エラーが発生した際に記録を残します。\r\n記録されたファイルを送信していただければバグ修正に役立てることができます。\r\nデフォルトでは実行フォルダ内 ErrorRe" +
        "port フォルダに保存されます。");
            this.Log_SaveErrorReport.UseVisualStyleBackColor = true;
            //
            // Log_SaveLogFlag
            //
            this.Log_SaveLogFlag.AutoSize = true;
            this.Log_SaveLogFlag.Location = new System.Drawing.Point(8, 6);
            this.Log_SaveLogFlag.Name = "Log_SaveLogFlag";
            this.Log_SaveLogFlag.Size = new System.Drawing.Size(139, 19);
            this.Log_SaveLogFlag.TabIndex = 0;
            this.Log_SaveLogFlag.Text = "ログをファイルに保存する";
            this.Log_SaveLogFlag.UseVisualStyleBackColor


-2a.93.93 0 00-.33-.21 1 1 0 00-1.09.21 1.15 1.15 0 00-.21.33 1 1 0 001.3 1.3 1.15 1.15 0 00.33-.21 1 1 0 00.21-1.09 1.15 1.15 0 00-.21-.33Zm-4-2a1 1 0 00-1.09-.21 1 1 0 00-.33.21 1.15 1.15 0 00-.21.33 1 1 0 00.21 1.09 1.15 1.15 0 00.33.21.94.94 0 00.76 0 1.15 1.15 0 00.33-.21A1 1 0 009.5 17a.84.84 0 00-.08-.38 1.15 1.15 0 00-.21-.33Zm2.91-2.21a1 1 0 00-.33.21 1.05 1.05 0 00-.29.71 1 1 0 00.29.71 1.15 1.15 0 00.33.21.84.84 0 00.38.08 1 1 0 001-1 1.05 1.05 0 00-.29-.71 1 1 0 00-1.09-.21ZM21 7h-.8a4.25 4.25 0 00-.52-1.27l.56-.56a1 1 0 00-1.41-1.41l-.56.56A4.25 4.25 0 0017 3.8V3a1 1 0 00-2 0v.8a4.1 4.1 0 00-1.26.52l-.57-.56a1 1 0 00-1.41 1.41l.56.57c-.09.15-.16.32-.24.48A5.85 5.85 0 0010.5 6a6 6 0 00-5.94 5.13 3.5 3.5 0 00-.46 6.58 1.14 1.14 0 00.4.08 1 1 0 00.4-1.92A1.48 1.48 0 014 14.5 1.5 1.5 0 015.5 13a1 1 0 001-1 4 4 0 017.78-1.29 1 1 0 00.78.67 2.32 2.32 0 01.94 4.23 1 1 0 001.1 1.68 4.34 4.34 0 001.9-3.62 4.19 4.19 0 00-.3-1.55l.13.12a1 1 0 00.7.29 1 1 0 00.71-.29 1 1 0 000-1.41l-.56-.56A4.25 4.25 0 0020.2 9h.8a1 1 0 000-2Zm-3.34 2.65a2.09 2.09 0 01-.6.42A4.17 4.17 0 0016 9.54a6.12 6.12 0 00-2.09-2.49 2.42 2.42 0 01.46-.7 2.43 2.43 0 013.3 0 2.37 2.37 0 010 3.3Z"/></svg>';
  static const String cloud_sun_meatball =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="M12.5 16.92h-.77l.39-.67a1 1 0 00-1.74-1l-.38.67-.38-.67a1 1 0 00-1.74 1l.39.67H7.5a1 1 0 000 2h.77l-.39.66a1 1 0 001.74 1l.38-.66.38.66a1 1 0 101.74-1l-.39-.66h.77a1 1 0 000-2Zm8.5-9h-.8a4.25 4.25 0 00-.52-1.27l.56-.56a1 1 0 00-1.41-1.41l-.56.56A4.25 4.25 0 0017 4.72v-.8a1 1 0 00-2 0v.8a


y({ email, password }),
  });
  return response.json();
}

// Создание чата
async function createChat(name, participants, token) {
  const response = await fetch('/api/v1/chats', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${token}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ name, participants }),
  });
  return response.json();
}

// WebSocket соединение
function connectToChat(chatId, token) {
  const ws = new WebSocket(`ws://localhost:8000/api/v1/messages/ws/${chatId}?token=${token}`);

  ws.onmessage = function(event) {
    const message = JSON.parse(event.data);
    console.log('New message:', message);
  };

  return ws;
}
```

## Разработка

### Структура проекта

```
src/
├── api/
│   ├── v1/
│   │   ├── auth.py          # Аутентификация
│   │   ├── chat.py          # Управление чатами
│   │   ├── messages.py      # WebSocket сообщения
│   │   ├── monitoring.py    # Мониторинг
│   │   └── users.py         # Управление пользователями
│   ├── docs.py              # Документация API
│   └── router.py            # Основной роутер
├── db/                      # База данных
├── schemas/                 # Pydantic схемы
├── services/                # Бизнес-логика
└── utils/                   # Утилиты
```

### Тестирование

```bash
# Запуск тестов
poetry run pytest

# Запуск тестов с покрытием
poetry run pytest --cov=src

# Запуск конкретных тестов
poetry run pytest tests/auth/test_integration/
```

### Линтинг и форматирование

```bash
# Проверка кода
poetry run flake8 src/
poetry run mypy src/

# Форматирование
poetry run black src/
poetry run isort src/
```

## Развертывание

### Docker

```bash
# Сборка образа
docker build -t messenger-api .

# Запуск контейнера
docker run -p 8000:8000 messenger-api
```

### Docker Compose

```bash
# Запуск всех сервисов
docker-compose up -d

# Просмотр логов
docker-compose logs -f
```

## Безопасность

### Рекомендации

1. **Токены**: Используйте короткое время жизни для access токенов
2. **HTTPS**: Всегда используйте HTTPS в продакшене
3. **Валидация**: Валидируйте все входные данные
4. **Логирование**: Ведите логи всех операций
5. **Мониторинг**: Настройте алерты для критических ошибок

### Ограничения

- Максимальный размер сообщения: 1000 символов
- Максимальное количество участников в чате: 100
- Лимит зап


With(appBaseDir))
	{
		throw new Error('Invalid file data');
	}

	var retryCount = 0;
	var backupCreated = false;
	var bkpPath = path.join(path.dirname(fileObject.path), BKP_PREFEX + path.basename(fileObject.path) + BKP_EXT);
	const oldBkpPath = path.join(path.dirname(fileObject.path), OLD_BKP_PREFEX + path.basename(fileObject.path) + BKP_EXT);
	var writeEnc = defEnc || fileObject.encoding;

	var writeFile = async function()
	{
		let fh;

		try
		{
			// O_SYNC is for sync I/O and reduce risk of file corruption
			fh = await fsProm.open(fileObject.path, O_SYNC | O_CREAT | O_WRONLY | O_TRUNC);
			await fsProm.writeFile(fh, data, writeEnc);
			await fh.sync(); // Flush to disk
		}
		finally
		{
			await fh?.close();
		}

		let stat2 = await fsProm.stat(fileObject.path);
		// Workaround for possible writing errors is to check the written
		// contents of the file and retry 3 times before showing an error
		let writtenData = await fsProm.readFile(fileObject.path, writeEnc);

		if (data != writtenData)
		{
			retryCount++;

			if (retryCount < 3)
			{
				return await writeFile();
			}
			else
			{
				throw new Error('all saving trials failed');
			}
		}
		else
		{
			//We'll keep the backup file in case the original file is corrupted. TODO When should we delete the backup file?
			if (backupCreated)
			{
				//fs.unlink(bkpPath, (err) => {}); //Ignore errors!

				//Delete old backup file with old prefix
				if (fs.existsSync(oldBkpPath))
				{
					fs.unlink(oldBkpPath, (err) => {}); //Ignore errors
				}
			}

			return stat2;
		}
	};

	async function doSaveFile(isNew)
	{
		if (enableStoreBkp && !isNew)
		{
			//Copy file to backup file (after conflict and stat is checked)
			let bkpFh;

			try
			{
				//Use file read then write to open the backup file direct sync write to reduce the chance of file corruption
				let fileContent = await fsProm.readFile(fileObject.path, writeEnc);
				bkpFh = await fsProm.open(bkpPath, O_SYNC | O_CREAT | O_WRONLY | O_TRUNC);
				await fsProm.writeFile(bkpFh, fileContent, writeEnc);
				await bkpFh.sync(); // Flush to disk
				backupCreated = true;
			}
			catch (e)
			{
				if (__DEV__)
				{
					console.log('Backup file writing failed', e); //Ignore
				}
			}
			finally
			{
				await bkpFh?.close();

				if (isWin)
				{
					try
					{
						// Add Hidden attribute:
						var child = spawn('attrib', ['+h', bkpPath]);
						child.on('error', function(err)
						{
							console.log('hiding backup file error: ' + err);
						});
					} catch(e) {}
				}
			}
		}

		return await writeFile();
	};

	if (overwrite)
	{
		return await doSaveFile(true);
	}
	else
	{
		let stat = fs.existsSync(fileObject.path)?
					await fsProm.stat(fileObject.path) : null;

		if (stat && isConflict(origStat, stat))
		{
			throw new Error('conflict');
		}
		else
		{
			return await doSaveFile(stat == null);


){
        var arr = [];
        for (var i = 0; i < mapIds.length; i++) {
            let f = scene.fighters.get(mapIds[i]);
            if (f && f.hp > 0) {
                arr.push(f);
            }
        }
        return arr
    }
    /**
     * @description 取得fighters的mapId
     */
    static getMapId(fighters: Array<Fighter>, scene: Scene): Array<number> {
        var arr = [];
        for (var i = 0; i < fighters.length; i++) {
            if (scene.fighters.get(fighters[i].mapId)) {
                arr.push(fighters[i].mapId);
            }
        }
        return arr
    }
    /**
     * @description 选择战斗者, 如果sortKey为undefined, ascending为随机种子, oldTarget上一次选定的目标
     * @param arr
     * @param n
     * @param sortKey
     * @param ascending
     * @param oldTarget
     */
    static limit(arr, n, sortKey, ascending, oldTarget?){
        var i,len;
        if (arr.length <= n)
            return ascending;
        if (!sortKey) {
            for (i = arr.length - 1; i >= 0; i--) {
                arr[i].rand = ascending;
                ascending = this.randNumber(ascending);
            }
            sortKey = 'rand';
        }
        arr.sort(ascending ? function (a, b) {
            return b[sortKey] - a[sortKey];
        } : function (a, b) {
            return a[sortKey] - b[sortKey];
        });
        //把自己换到第一个位置
        if(oldTarget){
            for(i=0,len=arr.length;i<len;i++){
                if(arr[i].mapId == oldTarget){
                    if(i!==0){
                        var o = arr[0];
                        arr[0] = arr[i];
                        arr[i] = o;
                    }
                    break;
                }
            }
        }
        arr.length = n;
        return ascending;
    }
// 检查概率是否通过
    static checkProbability = function (probability: number,s: Scene) {
        if (probability < 1) {
            var r = s.seed;
            s.seed = this.randNumber(r);
            if (probability < r / 2147483647)
                return false;
        }
        return true;
    }
    // 查找指定键值对应元素的位置
    static indexByAttr(arr, key, value) {
        var i;
        for (i = arr.length - 1; i >= 0; i--){
            if(arr[i] && arr[i][key] === value){
                break;
            }
        };
        return i;
    }
    // 复制
    static copy(o){
        var deepClone = (obj) => {
            var t = typeof obj,
                newObj;
            if(obj === null || t !== "object")
                return obj;
            newObj= obj instanceof Array?[]:{};
            for(var i in obj){
                newObj[i] = deepClone(obj[i]);
            }
            return newObj;
        }
        return deepClone(o);
    }
    // 从后往前遍历数组， 返回true表示移除该元素， 返回false表示停止遍历
    static traversal(arr, func){
        // TODO 用链表实现，可以更简单的处理删除、添加的问题
        if (!arr) return;
        var n = arr.length, delIndex = -1, i, el, r;
        for (i = n - 1; i >= 0; i--) {
            el = arr[i];
            if (el) {
                try {
                    r = func(el);
                } catch (ex) {


meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function aK(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oK(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function os(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let i="";if(o===37&&nn(e.charCodeAt(n+1))&&nn(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(i=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(i=String.fromCharCode(o,s),a=1):i="\uFFFD"}else i=String.fromCharCode(o);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+a+1,i=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function QT(e,t){const n=String(t.identifier).toUpperCase(),r=os(n.toLowerCase()),a=e.footnoteOrder.indexOf(n);let o;a===-1?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,o=e.footnoteOrder.length):(e.footnoteCounts[n]++,o=a+1);const i=e.footnoteCounts[n],s={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(i>1?"-"+i:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,s);const l={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,l),e.applyData(t,l)}function iK(e,t){const n=e.footnoteById;let r=1;for(;r in n;)r++;const a=String(r);return n[a]={type:"footnoteDefinition",identifier:a,children:[{type:"paragraph",children:t.children}],position:t.position},QT(e,{type:"footnoteReference",identifier:a,position:t.position})}function sK(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lK(e,t){if(e.dangerous){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null}function HT(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return{type:"text",value:"!["+t.alt+r};const a=e.all(t),o=a[0];o&&o.type==="text"?o.value="["+o.value:a.unshift({type:"text",value:"["});const i=a[a.l


# Program 8.2
# x87 FPU Rounding Control - GAS, Clang/LLVM on macOS (64-bit)
# Copyright (c) 2019 Hall & Slonka

.data
default_cw:  .word 0x0000
nearest:     .word 0x0000
down:        .word 0x0400
up:          .word 0x0800
zero:        .word 0x0C00

.bss
.lcomm result, 8

.text
.global _main
_main:

finit                           # initialize FPU
fstcw default_cw(%rip)          # store initialized control word in default
movw default_cw(%rip), %ax      # move default control word to AX register
andb $0b11110011, %ah           # clear RC field (bits 10 and 11)
orw %ax, nearest(%rip)          # set RC bits to 00 and store in nearest
orw %ax, down(%rip)             # set RC bits to 01


the format of \"name : value\", separated by semi-colons.","cssLengthTooltip":"Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).","unavailable":"%1, unavailable"},"basicstyles":{"bold":"ตัวหนา","italic":"ตัวเอียง","strike":"ตัวขีดเส้นทับ","subscript":"ตัวห้อย","superscript":"ตัวยก","underline":"ตัวขีดเส้นใต้"},"blockquote":{"toolbar":"Block Quote"},"clipboard":{"copy":"สำเนา","copyError":"ไม่สามารถสำเนาข้อความที่เลือกไว้ได้เนื่องจากการกำหนดค่าระดับความปลอดภัย. กรุณาใช้ปุ่มลัดเพื่อวางข้อความแทน (กดปุ่ม Ctrl/Cmd และตัว C พร้อมกัน).","cut":"ตัด","cutError":"ไม่สามารถตัดข้อความที่เลือกไว้ได้เนื่องจากการกำหนดค่าระดับความปลอดภัย. กรุณาใช้ปุ่มลัดเพื่อวางข้อความแทน (กดปุ่ม Ctrl/Cmd และตัว X พร้อมกัน).","paste":"วาง","pasteArea":"Paste Area","pasteMsg":"กรุณาใช้คีย์บอร์ดเท่านั้น โดยกดปุ๋ม (Ctrl/Cmd และ V)พร้อมๆกัน และกด OK.","securityMsg":"Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.","title":"วาง"},"button":{"selectedLabel":"%1 (Selected)"},"colorbutton":{"auto":"สีอัตโนมัติ","bgColorTitle":"สีพื้นหลัง","colors":{"000":"Black","800000":"Maroon","8B4513":"Saddle Brown","2F4F4F":"Dark Slate Gray","008080":"Teal","000080":"Navy","4B0082":"Indigo","696969":"Dark Gray","B22222":"Fire Brick","A52A2A":"Brown","DAA520":"Golden Rod","006400":"Dark Green","40E0D0":"Turquoise","0000CD":"Medium Blue","800080":"Purple","808080":"Gray","F00":"Red","FF8C00":"Dark Orange","FFD700":"Gold","008000":"Green","0FF":"Cyan","00F":"Blue","EE82EE":"Violet","A9A9A9":"Dim Gray","FFA07A":"Light Salmon","FFA500":"Orange","FFFF00":"Yellow","00FF00":"Lime","AFEEEE":"Pale Turquoise","ADD8E6":"Light Blue","DDA0DD":"Plum","D3D3D3":"Light Grey","FFF0F5":"Lavender Blush","FAEBD7":"Antique White","FFFFE0":"Light Yellow","F0FFF0":"Honeydew","F0FFFF":"Azure","


alues.
pub trait FromSql<'a> : Sized {
    /**
        Converts, if possible, data stored in the column buffer into the requested
        type and returns the instance of it. Returns error if the conversion fails
        or conversion from the type of the column buffer into a requested type is
        not defined.
    */
    fn value(row: &'a Row<'a>, col: &mut ColumnData) -> Result<Self>;
}

impl<'a> FromSql<'a> for String {
    fn value(row: &'a Row<'a>, col: &mut ColumnData) -> Result<Self> {
        match col.buf {
            ColumnBuffer::Text( oci_str_ptr )       => Ok( varchar::to_string(&oci_str_ptr, row.as_ref()) ),
            ColumnBuffer::Number( ref oci_num_box ) => number::to_string("TM", oci_num_box.as_ref(), row.as_ref()),
            ColumnBuffer::Date( ref oci_date )      => date::to_string("YYYY-MM-DD HH24::MI:SS", oci_date, row.as_ref()),
            ColumnBuffer::Timestamp( ref ts )       => timestamp::to_string("YYYY-MM-DD HH24:MI:SSXFF", 3, ts.as_ref(), row),
            ColumnBuffer::TimestampTZ( ref ts )     => timestamp::to_string("YYYY-MM-DD HH24:MI:SSXFF TZH:TZM", 3, ts.as_ref(), row),
            ColumnBuffer::TimestampLTZ( ref ts )    => timestamp::to_string("YYYY-MM-DD HH24:MI:SSXFF TZH:TZM", 3, ts.as_ref(), row),
            ColumnBuffer::IntervalYM( ref int )     => interval::to_string(int.as_ref(), 4, 3, row),
            ColumnBuffer::IntervalDS( ref int )     => interval::to_string(int.as_ref(), 9, 5, row),
            ColumnBuffer::Float( val )              => Ok( val.to_string() ),
            ColumnBuffer::Double( val )             => Ok( val.to_string() ),
            ColumnBuffer::Rowid( ref rowid )        => rowid::to_string(rowid, row.as_ref()),
            _                                       => Err( Error::new("cannot return as a String") )
        }
    }
}

impl<'a> FromSql<'a> for Varchar<'a> {
    fn value(row: &'a Row<'a>, col: &mut ColumnData) -> Result<Self> {
        if let ColumnBuffer::Text( oci_str_ptr ) = col.buf {
            Varchar::from_ocistring(&oci_str_ptr, row)
        } else {
            let text : String = FromSql::value(row, col)?;
            Varchar::from(&text, row)
        }
    }
}

impl<'a> FromSql<'a> for &'a str {
    fn value(row: &'a Row<'a>, col: &mut ColumnData) -> Result<Self> {
        match col.buf {
            ColumnBuffer::Text( oci_str_ptr ) => Ok( varchar::as_str(&oci_str_ptr, row.as_ref()) ),
            _ => Err( Error::new("cannot borrow as &str") )
        }
    }
}

impl<'a> FromSql<'a> for &'a [u8] {
    fn value(row: &'a Row<'a>, col: &mut ColumnData) -> Result<Self> {
        match col.buf {
            ColumnBuffer::Binary( oci_raw_ptr ) => Ok( {
                // inlined Raw::as_bytes to deal with the buffer lifetime issue
                let ptr = raw::as_ptr(&oci_raw_ptr, row.as_ref());
                let len = raw::len(&oci_raw_ptr, row.as_ref());
                unsafe {
                    std::slice::from_raw_parts(ptr, len)
                }
            }),
            _ => Err( Error::new("cannot borrow as &[u8]") )
        }


=====================================

"## viviendas por edades"
fig=px.bar(
    df.groupby(['edades', 'person_home_ownership']).size().reset_index(name='count'),
    x="edades",
    y="count",
    color="person_home_ownership",
    barmode="group",
    labels={'loan_status': 'Estado del crédito', 'count': 'Conteo', 'loan_intent': 'Intención de crédito'}
)
st.plotly_chart(fig)

"## Viviendas por credito aprobado"
fig=px.bar(
    df.groupby(['person_home_ownership', "loan_status_cat"]).size().reset_index(name='count'),
    x="person_home_ownership",
    y="count",
    color="loan_status_cat",
    barmode="group",
    labels={'loan_status': 'Estado del crédito', 'count': 'Conteo', 'loan_intent': 'Intención de crédito'}
)
st.plotly_chart(fig)

"## Ingresos por edades"
fig=px.bar(
    df.groupby(['edades', 'person_income', "loan_status_cat"]).size().reset_index(name='count'),
    x="edades",
    y="count",
    color="person_income",
    barmode="group",
    labels={'loan_status': 'Estado del crédito', 'count': 'Conteo', 'loan_intent': 'Intención de crédito'}
)
st.plotly_chart(fig)

"## Ingresos por credito aprobado"
Q1 = df['person_income'].quantile(0.25)
Q3 = df['person_income'].quantile(0.75)
IQR = Q3 - Q1
lower_bound = Q1 - 1.5 * IQR
upper_bound = Q3 + 1.5 * IQR

fig=px.bar(
    df[(df['person_income'] >= lower_bound) & (df['person_income'] <= upper_bound)].groupby(['person_income', "loan_status_cat"]).size().reset_index(name='count'),
    x="person_income",
    y="count",
    color="loan_status_cat",
    barmode="group",
    labels={'loan_status': 'Estado del crédito', 'count': 'Conteo', 'loan_intent': 'Intención de crédito'}
)
st.plotly_chart(fig)


:first-child,
  .table-responsive > .table-bordered > tfoot > tr > td:first-child {
    border-left: 0;
  }
  .table-responsive > .table-bordered > thead > tr > th:last-child,
  .table-responsive > .table-bordered > tbody > tr > th:last-child,
  .table-responsive > .table-bordered > tfoot > tr > th:last-child,
  .table-responsive > .table-bordered > thead > tr > td:last-child,
  .table-responsive > .table-bordered > tbody > tr > td:last-child,
  .table-responsive > .table-bordered > tfoot > tr > td:last-child {
    border-right: 0;
  }
  .table-responsive > .table-bordered > thead > tr:last-child > th,
  .table-responsive > .table-bordered > tbody > tr:last-child > th,
  .table-responsive > .table-bordered > tfoot > tr:last-child > th,
  .table-responsive > .table-bordered > thead > tr:last-child > td,
  .table-responsive > .table-bordered > tbody > tr:last-child > td,
  .table-responsive > .table-bordered > tfoot > tr:last-child > td {
    border-bottom: 0;
  }
}

fieldset {
  padding: 0;
  margin: 0;
  border: 0;
}

legend {
  display: block;
  width: 100%;
  padding: 0;
  margin-bottom: 20px;
  font-size: 21px;
  line-height: inherit;
  color: #333333;
  border: 0;
  border-bottom: 1px solid #e5e5e5;
}

label {
  display: inline-block;
  margin-bottom: 5px;
  font-weight: bold;
}

input[type="search"] {
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;
}

input[type="radio"],
input[type="checkbox"] {
  margin: 4px 0 0;
  margin-top: 1px \9;
  /* IE8-9 */

  line-height: normal;
}

input[type="file"] {
  display: block;
}

select[multiple],
select[size] {
  height: auto;
}

select optgroup {
  font-family: inherit;
  font-size: inherit;
  font-style: inherit;
}

input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
  outline: thin dotted #333;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  height: auto;
}

.form-control:-moz-placeholder {
  color: #999999;
}

.form-control::-moz-placeholder {
  color: #999999;
}

.form-control:-ms-input-placeholder {
  color: #999999;
}

.form-control::-webkit-input-placeholder {
  color: #999999;
}

.form-control {
  display: block;
  width: 100%;
  height: 34px;
  padding: 6px 12px;
  font-size: 14px;
  line-height: 1.428571429;
  color: #555555;
  vertical-align: middle;
  background-color: #ffffff;
  border: 1px solid #cccccc;
  border-radius: 4px;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.0


<3>::from_units_frac(2, 1)?;
                let one_decimal = FixedP::<1>::try_from_fixed(two_point_one_thousandth);

                assert!(one_decimal.is_err());
                assert_eq!(one_decimal.unwrap_err(), Error::<1>::OutOfRangeFrac);

                Ok(())
            }

            #[test]
            fn equal() -> Result<(), Box<dyn std::error::Error>> {
                let two_point_one_hundred = FixedP::<3>::from_units_frac(2, 100)?;
                let two_point_another_hundred = FixedP::<3>::try_from_fixed(two_point_one_hundred);

                assert!(two_point_another_hundred.is_ok());
                assert_eq!(two_point_another_hundred.unwrap(), two_point_one_hundred);

                Ok(())
            }
        }
    }

    mod representation {
        use super::*;

        #[test]
        fn display() -> Result<(), Error<P>> {
            let val = FixedP::from_units_frac(12, 3)?;

            assert_eq!(
                &format!("{}", val),
                &format!("12.{:0width$}", 3, width = (P as usize))
            );

            Ok(())
        }

        #[test]
        fn display_frac_zero() -> Result<(), Error<P>> {
            let val = FixedP::from_units(12)?;

            assert_eq!(
                &format!("{}", val),
                &format!("12.{:0width$}", 0, width = (P as usize))
            );

            Ok(())
        }

        #[test]
        fn debug() -> Result<(), Error<P>> {
            let val = FixedP::from_units_frac(12, 3)?;

            let debug_s = format!(
                "FixedP<{P}> {{ \
                units: {units}, \
                frac: {frac}, \
                unit_bits: {unit_bits}, \
                frac_bits: {frac_bits}, \
                unit_max: {unit_max}, \
                frac_max: {frac_max}, \
                bitvalue: {bitvalue} }}",
                P = P,
                units = &val.units(),
                frac = &val.frac(),
                unit_bits = &FixedP::<P>::UNIT_BITS,
                frac_bits = &FixedP::<P>::FRAC_BITS,
                unit_max = &FixedP::<P>::UNIT_MAX,
                frac_max = &FixedP::<P>::FRAC_MAX,
                bitvalue = &val.n
            );

            assert_eq!(&format!("{:?}", val), &debug_s);

            Ok(())
        }
    }

    mod parsing {
        use super::*;

        #[test]
        fn integers() -> Result<(), Error<P>> {
            let val = FixedP::from_units(12)?;

            assert_eq!("12".parse::<FixedP<P>>()?, val);
            assert_eq!("12.0".parse::<FixedP<P>>()?, val);

            Ok(())
        }

        // Note: some tests below require P > 1, so we will use a local
        //       precision constant.
        #[test]
        #[allow(clippy::assertions_on_constants)]
        fn frac_missing_right_zeroes() {
            const P: Precision = 3;
            assert!(P > 1);
            let val = FixedP::from_units_frac(12, 3 * 10u64.pow((P - 1) as u32)).unwrap();

            assert_eq!("12.3".parse::<FixedP<P>>().unwrap(), val);
        }

        #[test]
        #[allow(clippy::assertions_on_constants)]
        fn frac_including_left_zeroes() -> Result<(), Box<dyn std::error::Error>> {


roundColor in fontBackgroundColors)
            {
                var spans = backGroundColor.Value.SelectMany(s => s.Spans).OrderBy(s => s.Offset);
                var styleContents = spans.Select(s => result.Content.Substring(s.Offset, s.Length));

                Console.WriteLine($"- Font background color: '{backGroundColor.Key}'");
                Console.WriteLine($"  Text: '{string.Join(",", styleContents)}'");
            }
        }
    }
}


""" Change metric_type from enum to text

Rename private_poi_dataset to poi_dataset

Revision ID: 858b24967ff2
Revises: 214932354af8
Create Date: 2019-07-29 16:36:25.324639

"""

# revision identifiers, used by Alembic.
revision = '858b24967ff2'
down_revision = '214932354af8'

from alembic import op
import sqlalchemy as sa

def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('metric', 'type', type_=sa.TEXT())
    sa.Enum(name='metric_type').drop(op.get_bind(), checkfirst=False)
    # ### end Alembic commands ###

def downgrade():
    metric_type = sa.Enum(
        'ed2nav', 'fusio2ed', 'gtfs2ed', 'osm2ed', 'geopal2ed', 'synonym2ed', 'poi2ed', name='metric_type'
    )
    metric_type.create(op.get_bind())

    op.alter_column('metric', 'type', new_column_name='_type')
    op.add_column('metric', sa.Column('type', metric_type))
    op.execute("update metric set type=_type::metric_type;")
    op.drop_column('metric', '_type')

    # ### commands auto generated by Alembic - please adjust! ###
    # ### end Alembic commands ###


import com.facebook.ads.sdk.APIException.MalformedResponseException;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */
public class AdAccountAdRulesHistory extends APINode {
  @SerializedName("evaluation_spec")
  private AdRuleEvaluationSpec mEvaluationSpec = null;
  @SerializedName("exception_code")
  private Long mExceptionCode = null;
  @SerializedName("exception_message")
  private String mExceptionMessage = null;
  @SerializedName("execution_spec")
  private AdRuleExecutionSpec mExecutionSpec = null;
  @SerializedName("is_manual")
  private Boolean mIsManual = null;
  @SerializedName("results")
  private List<AdRuleHistoryResult> mResults = null;
  @SerializedName("rule_id")
  private Long mRuleId = null;
  @SerializedName("schedule_spec")
  private AdRuleScheduleSpec mScheduleSpec = null;
  @SerializedName("timestamp")
  private String mTimestamp = null;
  protected static Gson gson = null;

  public AdAccountAdRulesHistory() {
  }

  public String getId() {
    return null;
  }
  public static AdAccountAdRulesHistory loadJSON(String json, APIContext context, String header) {
    AdAccountAdRulesHistory adAccountAdRulesHistory = getGson().fromJson(json, AdAccountAdRulesHistory.class);
    if (context.isDebug()) {
      JsonParser parser = new JsonParser();
      JsonElement o1 = parser.parse(json);
      JsonElement o2 = parser.parse(adAccountAdRulesHistory.toString());
      if (o1.getAsJsonObject().get("__fb_trace_id__") != null) {
        o2.getAsJsonObject().add("__fb_trace_id__", o1.getAsJsonObject().get("__fb_trace_id__"));
      }
      if (!o1.equals(o2)) {
        context.log("[Warning] When parsing response, object is not consistent with JSON:");
        context.log("[JSON]" + o1);
        context.log("[Object]" + o2);
      }
    }
    adAccountAdRulesHistory.context = context;
    adAccountAdRulesHistory.rawValue = json;
    adAccountAdRulesHistory.header = header;
    return adAccountAdRulesHistory;
  }

  public static APINodeList<AdAccountAdRulesHistory> parseResponse(String json, APIContext context, APIRequest request, String header) throws MalformedResponseException {
    APINodeList<AdAccountAdRulesHistory> adAccountAdRulesHistorys = new APINodeList<AdAccountAdRulesHistory>(request, json, header);
    JsonArray arr;
    JsonObject obj;
    JsonParser parser = new JsonParser();
    Exception exception = null;
    try{
      JsonElement result = parser.parse(json);
      if (result.isJsonArray()) {
        // First, check if it's a pure JSON Array
        arr = result.getAsJsonArray();
        for (int i = 0; i < arr.size(); i++) {
          adAccountAdRulesHistorys.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header));
        };
        return adAccountAdRulesHistorys;
      } else if (result.isJsonObject()) {
        obj = result.getAsJsonObject();
        if (obj.has("data")) {
          if (obj.has("paging")) {
            JsonObject paging = obj.get("paging").getAsJsonObject();
            if (paging.has("cursors")) {
                JsonObject cursors = paging.get("cursors").getAsJsonObject();
                String before = cursors.has("before") ? cursors.get("before").getAsString() : null;
                String after = cursors.has("after") ? cursors.get("after").getAsString() : null;
                adAccountAd


lea	sourcedata,a1
	move.w	numsources,d7
	bra	.endlp
.lp
	move.w	S_X(a0),d0
	add.w	posx,d0
	move.w	d0,Source_X(a1)

	move.w	S_Y(a0),d0
	add.w	posy,d0
	move.w	d0,Source_Y(a1)

	move.w	S_Index(a0),d0
	move.w	d0,d1
	add.w	S_Inc(a0),d1
	and.w	#4095,d1
	move.w	d1,S_Index(a0)
	move.w	(SINE.l,d0.w*2),d0
	muls	S_Amp(a0),d0
	add.l	d0,d0
	move.w	S_Base(a0),d1
	swap	d1
	clr.w	d1
	add.l	d1,d0
	asr.l	d0
	move.l	d0,Source_Height(a1)
	lea	S_Skip(a0),a0
	lea	Source_Skip(a1),a1
.endlp
	dbf	d7,.lp
	rts

posx			dc.w	32
posxamp		dc.w	40
posxindex		dc.w	1024
posxbase		dc.w	32
posxinc		dc.w	35

posy			dc.w	20
posyamp		dc.w	30
posyindex		dc.w	0
posybase		dc.w	20
posyinc		dc.w	23

numsources
	dc.w	1

sourcedata
	ds.w	Source_Skip*10

sourcespecs

	dc.w	0,0,0,200,127,128

; Swirl (n=4)
a	set	127
b	set	128
i	set	200
	dc.w	0,-1,0,i,a,b
	dc.w	1,0,1024,i,a,b
	dc.w	0,1,2048,i,a,b
	dc.w	-1,0,3072,i,a,b

; BigSwirl (n=8)
	rept	0
a	set	127
b	set	128
i	set	-400
	dc.w	0,-2,0,i,a,b
	dc.w	1,-1,512,i,a,b
	dc.w	2,0,1024,i,a,b
	dc.w	1,1,1536,i,a,b
	dc.w	0,2,2048,i,a,b
	dc.w	-1,1,2560,i,a,b
	dc.w	-2,0,3072,i,a,b
	dc.w	-1,-1,3584,i,a,b
	endr

; Dipole (n=2)
	dc.w	0,0,0,200,127,128
	dc.w	1,0,2048,200,127,128

; Confuse (n=2)
;	dc.w	40,20,0,50,127,128
;	dc.w	41,20,0,800,17,18

; Line (n=20)
qp	set	0
qx	set	30
	rept	20
	dc.w	qx,20,qp,50,127/2,128/2
qp	set	qp+102
qx	set	qx+1
	endr

;-----------------------------------------------------------------------
; Include DSP library
;-----------------------------------------------------------------------

	ifnd	INCIT

	include	"dsplib.s"

	endc
;-----------------------------------------------------------------------
; Include DSP program
;-----------------------------------------------------------------------

		even
DSP_Bum:	incbin	waves\waves.dsp
DSP_BumE:	even
DSP_BumL:	=


MessageTypes().get(5);
    internal_static_seldon_mlops_chainer_Batch_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
        internal_static_seldon_mlops_chainer_Batch_descriptor,
        new java.lang.String[] { "Size", "WindowMs", "Rolling", });
    internal_static_seldon_mlops_chainer_PipelineUpdateStatusMessage_descriptor =
      getDescriptor().getMessageTypes().get(6);
    internal_static_seldon_mlops_chainer_PipelineUpdateStatusMessage_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
        internal_static_seldon_mlops_chainer_PipelineUpdateStatusMessage_descriptor,
        new java.lang.String[] { "Update", "Success", "Reason", });
    internal_static_seldon_mlops_chainer_PipelineUpdateStatusResponse_descriptor =
      getDescriptor().getMessageTypes().get(7);
    internal_static_seldon_mlops_chainer_PipelineUpdateStatusResponse_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
        internal_static_seldon_mlops_chainer_PipelineUpdateStatusResponse_descriptor,
        new java.lang.String[] { });
    descriptor.resolveAllFeaturesImmutable();
  }

  // @@protoc_insertion_point(outer_class_scope)
}
/*
 * Copyright 2007-2009 Selenium committers
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package io.selendroid.server.model;

import java.util.List;
import java.util.NoSuchElementException;

public interface SearchContext {
  /**
   * Find all elements within the current context using the given mechanism.
   *
   * @param by The locating mechanism to use
   * @return A list of all {@link AndroidElement}s, or an empty list if nothing matches
   * @see org.openqa.selenium.By
   */
  List<AndroidElement> findElements(By by);

  /**
   * Find the first {@link AndroidElement} using the given method.
   *
   * @param by The locating mechanism
   * @return The first matching element on the current context
   * @throws NoSuchElementException If no matching elements are found
   */
  AndroidElement findElement(By by);
}
/*
 * Copyright 2011 NativeDriver committers Copyright 2011 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */

package io.selendroid.server.android;

import io.selendroid.server.common.exceptions.SelendroidException;
import android.view.KeyEvent;

/**
 * Contains keys that can be sent to Android


y0, intWrapper0, (-26), intArray0, intWrapper1, 9);
        fail("Expecting exception: RuntimeException");

      } catch(RuntimeException e) {
         //
         // shouldn't happen
         //
         verifyException("me.lemire.integercompression.Simple9", e);
      }
  }

  @Test(timeout = 4000)
  public void test37()  throws Throwable  {
      Simple9 simple9_0 = new Simple9();
      int[] intArray0 = new int[7];
      IntWrapper intWrapper0 = new IntWrapper(2);
      IntWrapper intWrapper1 = new IntWrapper(2);
      simple9_0.compress0(intArray0, intWrapper1, (-2147467251), intArray0, intWrapper1);
      simple9_0.headlessUncompress(intArray0, intWrapper0, 2, intArray0, intWrapper0, 2);
      assertEquals((short)4, intWrapper0.shortValue());
      assertEquals(4.0, intWrapper0.doubleValue(), 0.01);
  }

  @Test(timeout = 4000)
  public void test38()  throws Throwable  {
      Simple9 simple9_0 = new Simple9();
      int[] intArray0 = new int[8];
      IntWrapper intWrapper0 = new IntWrapper(2);
      simple9_0.uncompress0(intArray0, intWrapper0, 2, intArray0, intWrapper0);
      intArray0[4] = 2;
      intArray0[3] = (-1379);
      IntWrapper intWrapper1 = new IntWrapper(2);
      simple9_0.compress0(intArray0, intWrapper1, 2, intArray0, intWrapper1);
      simple9_0.headlessUncompress(intArray0, intWrapper0, 1979711488, intArray0, intWrapper1, 2);
      assertEquals((byte)4, intWrapper0.byteValue());
      assertEquals((short)6, intWrapper1.shortValue());
  }

  @Test(timeout = 4000)
  public void test39()  throws Throwable  {
      Simple9 simple9_0 = new Simple9();
      int[] intArray0 = new int[8];
      IntWrapper intWrapper0 = new IntWrapper(2);
      intArray0[3] = (-1383);
      IntWrapper intWrapper1 = new IntWrapper(1);
      simple9_0.compress0(intArray0, intWrapper1, 2, intArray0, intWrapper1);
      // Undeclared exception!
      try {
        simple9_0.headlessUncompress(intArray0, intWrapper0, 0, intArray0, intWrapper0, 9);
        fail("Expecting exception: ArrayIndexOutOfBoundsException");

      } catch(ArrayIndexOutOfBoundsException e) {
         //
         // Index 8 out of bounds for length 8
         //
         verifyException("me.lemire.integercompression.Simple9", e);
      }
  }

  @Test(timeout = 4000)
  public void test40()  throws Throwable  {
      Simple9 simple9_0 = new Simple9();
      int[] intArray0 = new int[7];
      IntWrapper intWrapper0 = new IntWrapper(2);
      simple9_0.uncompress0(intArray0, intWrapper0, 2, intArray0, intWrapper0);
      intArray0[3] = 54;
      IntWrapper intWrapper1 = new IntWrapper(2);
      simple9_0.compress0(intArray0, intWrapper1, 2, intArray0, intWrapper1);
      // Undeclared exception!
      try {
        simple9_0.headlessUncompress(intArray0, intWrapper0, 4, intArray0, intWrapper1, 4);
        fail("Expecting exception: ArrayIndexOutOfBoundsException");

      } catch(ArrayIndexOutOfBoundsException e) {
         //
         // Index 7 out of bounds for length 7
         //
         verifyException("me.lemire.integercompression.Simple9", e);
      }
  }


=Open+Sans:400,700");:root{--blue: #007bff;--indigo: #6610f2;--purple: #9B479F;--pink: #e83e8c;--red: #D9230F;--orange: #D9831F;--yellow: #ffc107;--green: #469408;--teal: #20c997;--cyan: #029ACF;--white: #fff;--gray: #777;--gray-dark: #373a3c;--primary: #D9230F;--secondary: #fff;--success: #469408;--info: #029ACF;--warning: #9B479F;--danger: #D9831F;--light: #fff;--dark: #373a3c;--breakpoint-xs: 0;--breakpoint-sm: 576px;--breakpoint-md: 768px;--breakpoint-lg: 992px;--breakpoint-xl: 1200px;--font-family-sans-serif: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:"Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0.8125rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#FCFCFC}[tabindex="-1"]:focus{outline:0 !important}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:0.5rem}p{margin-top:0;margin-bottom:1rem}abbr[title],abbr[data-original-title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul,dl{margin-top:0;margin-bottom:1rem}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#D9230F;text-decoration:none;background-color:transparent}a:hover{color:#91170a;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):hover,a:not([href]):not([tabindex]):focus{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}pre,code,kbd,samp{font-family:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:1em}pre{marg


important}a.wy-text-neutral:hover{color:#595959!important}.rst-content .toctree-wrapper>p.caption,h1,h2,h3,h4,h5,h6,legend{margin-top:0;font-weight:700;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif}p{line-height:24px;font-size:16px;margin:0 0 24px}h1{font-size:175%}.rst-content .toctree-wrapper>p.caption,h2{font-size:150%}h3{font-size:125%}h4{font-size:115%}h5{font-size:110%}h6{font-size:100%}hr{display:block;height:1px;border:0;border-top:1px solid #e1e4e5;margin:24px 0;padding:0}.rst-content code,.rst-content tt,code{white-space:nowrap;max-width:100%;background:#fff;border:1px solid #e1e4e5;font-size:75%;padding:0 5px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#e74c3c;overflow-x:auto}.rst-content tt.code-large,code.code-large{font-size:90%}.rst-content .section ul,.rst-content .toctree-wrapper ul,.rst-content section ul,.wy-plain-list-disc,article ul{list-style:disc;line-height:24px;margin-bottom:24px}.rst-content .section ul li,.rst-content .toctree-wrapper ul li,.rst-content section ul li,.wy-plain-list-disc li,article ul li{list-style:disc;margin-left:24px}.rst-content .section ul li p:last-child,.rst-content .section ul li ul,.rst-content .toctree-wrapper ul li p:last-child,.rst-content .toctree-wrapper ul li ul,.rst-content section ul li p:last-child,.rst-content section ul li ul,.wy-plain-list-disc li p:last-child,.wy-plain-list-disc li ul,article ul li p:last-child,article ul li ul{margin-bottom:0}.rst-content .section ul li li,.rst-content .toctree-wrapper ul li li,.rst-content section ul li li,.wy-plain-list-disc li li,article ul li li{list-style:circle}.rst-content .section ul li li li,.rst-content .toctree-wrapper ul li li li,.rst-content section ul li li li,.wy-plain-list-disc li li li,article ul li li li{list-style:square}.rst-content .section ul li ol li,.rst-content .toctree-wrapper ul li ol li,.rst-content section ul li ol li,.wy-plain-list-disc li ol li,article ul li ol li{list-style:decimal}.rst-content .section ol,.rst-content .section ol.arabic,.rst-content .toctree-wrapper ol,.rst-content .toctree-wrapper ol.arabic,.rst-content section ol,.rst-content section ol.arabic,.wy-plain-list-decimal,article ol{list-style:decimal;line-height:24px;margin-bottom:24px}.rst-content .section ol.arabic li,.rst-content .section ol li,.rst-content .toctree-wrapper ol.arabic li,.rst-content .toctree-wrapper ol li,.rst-content section ol.arabic li,.rst-content section ol li,.wy-plain-list-decimal li,article ol li{list-style:decimal;margin-left:24px}.rst-content .section ol.arabic li ul,.rst-content .section ol li p:last-child,.rst-content .section ol li ul,.rst-content .toctree-wrapper ol.arabic li ul,.r


e(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 22)) | ((value as u32 & 0x03) << 22);
        self.w
    }
}
#[doc = "Field `CH1_NEG_MODE_U1` reader - This register is used to control the mode of channel1's input negedge signal for unit1. 2'd1: increase at the negedge of input signal 2'd2:decrease at the negedge of input signal others:forbidden"]
pub struct CH1_NEG_MODE_U1_R(crate::FieldReader<u8, u8>);
impl CH1_NEG_MODE_U1_R {
    #[inline(always)]
    pub(crate) fn new(bits: u8) -> Self {
        CH1_NEG_MODE_U1_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for CH1_NEG_MODE_U1_R {
    type Target = crate::FieldReader<u8, u8>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `CH1_NEG_MODE_U1` writer - This register is used to control the mode of channel1's input negedge signal for unit1. 2'd1: increase at the negedge of input signal 2'd2:decrease at the negedge of input signal others:forbidden"]
pub struct CH1_NEG_MODE_U1_W<'a> {
    w: &'a mut W,
}
impl<'a> CH1_NEG_MODE_U1_W<'a> {
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24);
        self.w
    }
}
#[doc = "Field `CH1_POS_MODE_U1` reader - This register is used to control the mode of channel1's input posedge signal for unit1. 2'd1: increase at the posedge of input signal 2'd2:decrease at the posedge of input signal others:forbidden"]
pub struct CH1_POS_MODE_U1_R(crate::FieldReader<u8, u8>);
impl CH1_POS_MODE_U1_R {
    #[inline(always)]
    pub(crate) fn new(bits: u8) -> Self {
        CH1_POS_MODE_U1_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for CH1_POS_MODE_U1_R {
    type Target = crate::FieldReader<u8, u8>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `CH1_POS_MODE_U1` writer - This register is used to control the mode of channel1's input posedge signal for unit1. 2'd1: increase at the posedge of input signal 2'd2:decrease at the posedge of input signal others:forbidden"]
pub struct CH1_POS_MODE_U1_W<'a> {
    w: &'a mut W,
}
impl<'a> CH1_POS_MODE_U1_W<'a> {
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 26)) | ((value as u32 & 0x03) << 26);
        self.w
    }
}
#[doc = "Field `CH1_HCTRL_MODE_U


__all__ = (
    "group_attempts",
    "fails_filter",
    "reduce_to_failures",
)

def group_attempts(sequence, filter_func=None):
    if filter_func is None:
        filter_func = lambda x: True
    last, l = None, []
    for x in sequence:
        if isinstance(x, tuple) and x[0] == "inspecting":
            if l:
                yield last, l
            last, l = x[1], []
        elif last is not None:
            if filter_func(x):
                # inline ignored frames
                if getattr(x, "ignored", False):
                    l.extend(y for y in x.events if filter_func(y))
                else:
                    l.append(x)
    if l:
        yield last, l

def fails_filter(x):
    if not isinstance(x, tuple):
        return not x.succeeded
    if x[0] == "viable":
        return not x[1]
    return x[0] != "inspecting"

def reduce_to_failures(frame):
    if frame.succeeded:
        return []
    l = [frame]
    for pkg, nodes in group_attempts(frame.events, fails_filter):
        l2 = []
        for x in nodes:
            if not isinstance(x, tuple):
                l2.append(reduce_to_failures(x))
            else:
                l2.append(x)
        l.append((pkg, l2))
    return l


/* This code runs some sanity checks on the PAPI_BGL_TS_FULL */
/*   (BlueGene Torus no token UPC cycles) events.                   */

/* by Vince Weaver, vweaver1 _at_ eecs.utk.edu           */

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

#include "papi.h"

#include "test_utils.h"

int main(int argc, char **argv) {

	int events[1];
	long long counts[1];

	int retval,quiet;

	char test_string[]="Testing PAPI_BGL_TS_FULL predefined event...";

	quiet=test_quiet();

	retval = PAPI_library_init(PAPI_VER_CURRENT);
	if (retval != PAPI_VER_CURRENT) {
		if (!quiet) printf("Error! PAPI_library_init %d\n",retval);
		test_fail(test_string);
	}

	retval = PAPI_query_event(PAPI_BGL_TS_FULL);
	if (retval != PAPI_OK) {
		if (!quiet) printf("PAPI_BGL_TS_FULL not available\n");
		test_skip(test_string);
	}

	events[0]=PAPI_BGL_TS_FULL;

	PAPI_start_counters(events,1);

	PAPI_stop_counters(counts,1);

	if (counts[0]<1) {
		if (!quiet) printf("Error! Count too low\n");
		test_fail(test_string);
	}

	PAPI_shutdown();

	test_unimplemented(test_string);

	return 0;
}


const MoreInfoMenuBody({Key? key, required this.playlist}) : super(key: key);
  final Playlist? playlist;

  Future<void> _onOpenInSpotify() async {
    final url = playlist?.externalUrl;
    if (url != null) {
      await PlaylistActions.openInSpotify(url);
    }
  }

  Future<void> _onShareAsLink() async {
    final currentPlaylist = playlist;
    if (currentPlaylist != null) {
      await PlaylistActions.shareAsLink(currentPlaylist);
    }
  }

  Future<void> _onSavePlaylist(BuildContext context) async {
    final spotifyAuth = context.read<SpotifyAuth>();
    final currentPlaylist = playlist;
    final currentUser = spotifyAuth.user;
    if (currentPlaylist != null && currentUser != null) {
      await PlaylistActions.savePlaylist(currentUser.id, currentPlaylist);
    }
  }

  Future<void> _onUnsavePlaylist(BuildContext context) async {
    final spotifyAuth = context.read<SpotifyAuth>();
    final currentUser = spotifyAuth.user;
    final currentPlaylist = playlist;

    if (currentPlaylist != null && currentUser != null) {
      await PlaylistActions.unsavePlaylist(currentUser.id, currentPlaylist.id);
    }
  }

  @override
  Widget build(BuildContext context) {
    final _firebaseDB = FirebaseDB();
    final userId = context.watch<SpotifyAuth>().user!.id;
    return Center(
        child: Padding(
      padding: const EdgeInsets.symmetric(vertical: 96.0),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: <Widget>[
          _buildPlaylistInfo(),
          Column(
            children: <Widget>[
              CustomFlatTextButton(
                text: 'OPEN IN SPOTIFY',
                onPressed: _onOpenInSpotify,
                leadingWidget: Image.asset(
                  'images/spotify.png',
                  width: 32.0,
                ),
              ),
              SizedBox(
                height: 16.0,
              ),
              CustomFlatTextButton(
                text: 'SHARE AS LINK',
                onPressed: _onShareAsLink,
                leadingWidget: Icon(
                  Icons.link,
                  color: CustomColors.primaryTextColor,
                  size: 32.0,
                ),
              ),
              SizedBox(
                height: 16.0,
              ),
              StreamBuilder<bool>(
                stream: _firebaseDB.isPlaylistSavedStream(
                    userId: userId, playlistId: playlist?.id),
                builder: (context, snapshot) {
                  if (snapshot.hasData) {
                    final isPlaylistSaved = snapshot.data!;
                    return CustomFlatTextButton(
                      text: isPlaylistSaved
                          ? 'REMOVE FROM SAVED'
                          : 'SAVE PLAYLIST',
                      onPressed: isPlaylistSaved
                          ? () => _onUnsavePlaylist(context)
                          : () => _onSavePlaylist(context),
                      leadingWidget: Icon(
                        isPlaylistSaved
                            ? Icons.bookmark
                            : Icons.bookmark_border,
                        color: CustomColors.primaryTextColor,
                        size: 32.0,
                      ),
                    );
                  } else {
                    return Container(
                      height: 48.0,
                    );
                  }
                },
              ),
            ],
          ),
        ],
      ),
    ));
  }

  Column _buildPlaylistInfo() {
    final playlistImage = playlist?.playlistImageUrl;
    final avatarImageUrl = playlist?.owner.avatarImageUrl;


ts(uc)
	xy.Y.ToDots(uc)
}

// String implements the fmt.Stringer interface.
func (xy *XY) String() string {
	return "(" + xy.X.String() + ", " + xy.Y.String() + ")"
}

// Zero sets values to 0
func (xy *XY) Zero() {
	xy.X.Zero()
	xy.Y.Zero()
}

// Set sets the x and y values according to the given values.
// No values: set both to 0.
// One value: set both to that value.
// Two values: set x to the first value and y to the second value.
func (xy *XY) Set(v ...Value) {
	switch len(v) {
	case 0:
		var zv Value
		xy.X = zv
		xy.Y = zv
	case 1:
		xy.X = v[0]
		xy.Y = v[0]
	default:
		xy.X = v[0]
		xy.Y = v[1]
	}
}

// Dim returns the value for given dimension
func (xy *XY) Dim(d math32.Dims) Value {
	switch d {
	case math32.X:
		return xy.X
	case math32.Y:
		return xy.Y
	default:
		panic("units.XY dimension invalid")
	}
}

// SetDim sets the value for given dimension
func (xy *XY) SetDim(d math32.Dims, val Value) {
	switch d {
	case math32.X:
		xy.X = val
	case math32.Y:
		xy.Y = val
	default:
		panic("units.XY dimension invalid")
	}
}

// Dots returns the dots values as a math32.Vector2 vector
func (xy *XY) Dots() math32.Vector2 {
	return math32.Vec2(xy.X.Dots, xy.Y.Dots)
}
// Copyright (c) 2018, Cogent Core. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package units

import (
	"fmt"
	"testing"

	"cogentcore.org/core/base/tolassert"
)

func TestToDots(t *testing.T) {
	tests := map[Units]float32{
		UnitPx:   83.33333,
		UnitDp:   50,
		UnitEw:   200,
		UnitEh:   250,
		UnitPw:   450,
		UnitPh:   350,
		UnitRem:  800,
		UnitEm:   800,
		UnitEx:   400,
		UnitCh:   400,
		UnitVw:   960,
		UnitVh:   540,
		UnitVmin: 540,
		UnitVmax: 960,
		UnitCm:   3149.6064,
		UnitMm:   314.96063,
		UnitQ:    78.74016,
		UnitIn:   8000,
		UnitPc:   1333.3333,
		UnitPt:   111.111115,
		UnitDot:  50,
	}
	var uc Context
	uc.Defaults()
	uc.Vpw = 1920
	uc.Vph = 1080
	uc.Elw = 400
	uc.Elh = 500
	uc.Paw = 900
	uc.Pah = 700
	for unit, want := range tests {
		v := New(50, unit)
		have := v.ToDots(&uc)
		tolassert.Equal(t, want, have, unit)
	}
}

func TestValueConvert(t *testing.T) {
	var ctxt Context
	ctxt.Defaults()
	for _, un := range UnitsValues() {
		v1 := New(1.0, un)
		s1 := fmt.Sprintf("%v = %v dots", v1, v1.ToDots(&ctxt))
		v2 := StringToValue("1.0" + un.String())
		s2 := fmt.Sprintf("%v = %v dots", v2, v2.ToDots(&ctxt))
		if s1 != s2 {
			t.Errorf("strings don't match: %v != %v\n", s1, s2