/*
 * Copyright 2020 TensorFlow Authors
 *
 * 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.
 */

#pragma once

#include "tensorflow/compiler/tf2xla/xla_tensor/aten_compat.h"
#include "tensorflow/compiler/xla/client/xla_builder.h"

namespace swift_xla {

// Computes binary comparison operations.
xla::XlaOp BuildComparisonOp(c10::Symbol kind, xla::XlaOp lhs, xla::XlaOp rhs);

// Computes the elementwise threshold of the input: if the value is below the
// threshold, replace it with the provided value, otherwise leave it unchanged.
xla::XlaOp BuildThreshold(xla::XlaOp input, xla::XlaOp output,
                          const float threshold, const float value);

// Computes the rectified linear unit (replace negative elements with 0).
xla::XlaOp BuildRelu(xla::XlaOp input);

std::vector<xla::XlaOp> BuildRrelu(xla::XlaOp input, at::Scalar lower,
                                   at::Scalar upper, bool training,
                                   xla::XlaOp rng_seed);

xla::XlaOp BuildRreluBackward(xla::XlaOp grad_output, xla::XlaOp input,
                              xla::XlaOp noise, at::Scalar lower,
                              at::Scalar upper, bool training);

xla::XlaOp BuildHardshrink(xla::XlaOp input, at::Scalar lambda);
xla::XlaOp BuildHardSigmoid(xla::XlaOp input);
xla::XlaOp BuildHardSigmoidBackward(xla::XlaOp grad_output, xla::XlaOp input);
xla::XlaOp BuildSoftshrink(xla::XlaOp input, at::Scalar lambda);
xla::XlaOp BuildShrinkBackward(xla::XlaOp grad_output, xla::XlaOp input,
                               at::Scalar lambda);

xla::XlaOp BuildHardtanhBackward(xla::XlaOp grad_output, xla::XlaOp input,
                                 at::Scalar min_val, at::Scalar max_val);

// Computes the leaky rectified linear unit:
// LeakyReLU(x) = max(0, input) + negative_slope ∗ min(0, input).
xla::XlaOp BuildLeakyRelu(xla::XlaOp input, double negative_slope);

xla::XlaOp BuildLeakyReluBackward(xla::XlaOp grad_output, xla::XlaOp input,
                                  double negative_slope_value);

// Computes the sigmoid function using Tanh
// Sigmoid(x) = (tanh(x ∗ 0.5) + 1) ∗ 0.5
xla::XlaOp BuildSigmoid(xla::XlaOp input);

// Computes the reciprocal function.
// Reciprocal(x) = 1 / x
xla::XlaOp BuildReciprocal(xla::XlaOp input);

// Computes the sign of the input.
// If x is NaN then 0, otherwise the actual sign
xla::XlaOp BuildSign(xla::XlaOp input);

// Computes the absolute value of the input.
xla::XlaOp BuildAbs(xla::XlaOp input);

}  // namespace swift_xla


 BChar = label:getChildByTag(0)
    local FChar = label:getChildByTag(7)
    local AChar = label:getChildByTag(12)

    local rotate = CCRotateBy:create(2, 360)
    local rot_4ever = CCRepeatForever:create(rotate)

    local scale = CCScaleBy:create(2, 1.5)
    local scale_back = scale:reverse()
    local action_arr = CCArray:create()
    action_arr:addObject(scale)
    action_arr:addObject(scale_back)

    local scale_seq = CCSequence:create(action_arr)
    local scale_4ever = CCRepeatForever:create(scale_seq)

    local jump = CCJumpBy:create(0.5, ccp(0, 0), 60, 1)
    local jump_4ever = CCRepeatForever:create(jump)

    local fade_out = CCFadeOut:create(1)
    local fade_in = CCFadeIn:create(1)

    local action_arr2 = CCArray:create()
    action_arr2:addObject(fade_out)
    action_arr2:addObject(fade_in)
    local seq = CCSequence:create(action_arr2)
    local fade_4ever = CCRepeatForever:create(seq)

    BChar:runAction(rot_4ever)
    BChar:runAction(scale_4ever)
    FChar:runAction(jump_4ever)
    AChar:runAction(fade_4ever)

    -- Bottom Label
    local label2 = CCLabelBMFont:create("00.0", "fonts/bitmapFontTest.fnt")
    layer:addChild(label2, 0, kTagBitmapAtlas2)
    label2:setPosition( ccp(s.width/2.0, 80) )

    local lastChar = label2:getChildByTag(3)
    lastChar:runAction(tolua.cast( rot_4ever:copy():autorelease(), "CCAction" ))

    layer:registerScriptHandler(Atlas4.onNodeEvent)

    Helper.titleLabel:setString("CCLabelBMFont")
    Helper.subtitleLabel:setString( "Using fonts as CCSprite objects. Some characters should rotate.")
    return layer
end

function Atlas4.draw()
    local s = CCDirector:sharedDirector():getWinSize()
    ccDrawLine( ccp(0, s.height/2), ccp(s.width, s.height/2) )
    ccDrawLine( ccp(s.width/2, 0), ccp(s.width/2, s.height) )
end

function Atlas4.step(dt)
    m_time = m_time + dt

    local string = string.format("%04.1f", m_time)

    local label1 = tolua.cast(Atlas4.layer:getChildByTag(kTagBitmapAtlas2), "CCLabelBMFont")
    label1:setString(string)
end

--------------------------------------------------------------------
--
-- Atlas5
--
-- Use any of these editors to generate BMFonts:
--	   http:--glyphdesigner.71squared.com/ (Commercial, Mac OS X)
--	   http:--www.n4te.com/hiero/hiero.jnlp (Free, Java)
--	   http:--slick.cokeandcode.com/demos/hiero.jnlp (Free, Java)
--	   http:--www.angelcode.com/products/bmfont/ (Free, Windows only)
--
--------------------------------------------------------------------

local Atlas5 = {}
Atlas5.layer = nil
function Atlas5:create()
    local layer = CCLayer:create()
    Helper.initWithLayer(layer)
    Atlas5.layer = layer

    local label = CCLabelBMFont:create("abcdefg", "fonts/bitmapFontTest4.fnt")
    layer:addChild(label)

    local s = CCDirector:sharedDirector():getWinSize()

    label:setPosition( ccp(s.width/2, s.height/2) )
    label:setAnchorPoint( ccp(0.5, 0.5) )

    Helper.titleLabel:setString("CCLabelBMFont


  {

    private val _uiState = MutableLiveData<QrCodeUiState>()
    val uiState: LiveData<QrCodeUiState> = _uiState

    fun fetchQrCode() {
        _uiState.value = QrCodeUiState.Loading

        viewModelScope.launch {
            try {
                _uiState.value = QrCodeUiState.Loading
                val qrCodeHex = qrCodeRepository.getQrHex()
                _uiState.postValue(QrCodeUiState.Success(qrCodeHex))
            } catch (e: Exception) {
                val errorMessage = "Failed to update qr code: ${e.message}"
                _uiState.postValue(QrCodeUiState.Error(errorMessage))
                e.printStackTrace()
            }
        }
    }
}package me.alllexey123.itmowidgets.ui.settings

import android.content.Intent
import android.os.Bundle
import androidx.core.content.ContextCompat
import androidx.core.content.edit
import androidx.core.net.toUri
import androidx.preference.EditTextPreference
import androidx.preference.ListPreference
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.SwitchPreference
import me.alllexey123.itmowidgets.AppContainer
import me.alllexey123.itmowidgets.ItmoWidgetsApp
import me.alllexey123.itmowidgets.R
import me.alllexey123.itmowidgets.data.ACCESS_TOKEN_EXPIRES_KEY
import me.alllexey123.itmowidgets.data.ACCESS_TOKEN_KEY
import me.alllexey123.itmowidgets.data.BEFOREHAND_SCHEDULING_KEY
import me.alllexey123.itmowidgets.data.DYNAMIC_QR_COLORS_KEY
import me.alllexey123.itmowidgets.data.HIDE_PREVIOUS_LESSONS_KEY
import me.alllexey123.itmowidgets.data.HIDE_TEACHER_KEY
import me.alllexey123.itmowidgets.data.ID_TOKEN_KEY
import me.alllexey123.itmowidgets.data.LAST_UPDATE_TIMESTAMP_KEY
import me.alllexey123.itmowidgets.data.LESSON_WIDGET_STYLE_CHANGED_KEY
import me.alllexey123.itmowidgets.data.REFRESH_TOKEN_EXPIRES_KEY
import me.alllexey123.itmowidgets.data.REFRESH_TOKEN_KEY
import me.alllexey123.itmowidgets.data.SMART_SCHEDULING_KEY
import me.alllexey123.itmowidgets.ui.login.LoginActivity
import me.alllexey123.itmowidgets.ui.widgets.WidgetUtils
import java.lang.Thread.sleep
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
import kotlin.concurrent.thread

class SettingsFragment : PreferenceFragmentCompat() {

    override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
        setPreferencesFromResource(R.xml.root_preferences, rootKey)

        val appContainer = (requireContext().applicationContext as ItmoWidgetsApp).appContainer

        val storage = appContainer.storage

        val refreshTokenPreference = findPreference<EditTextPreference>(REFRESH_TOKEN_KEY)
        refreshTokenPreference?.setOnPreferenceChangeListener { preference, newValue ->
            val currentValue = preferenceManager.sharedPreferences?.getString(REFRESH_TOKEN_KEY, "")

            if (newValue is String && newValue != currentValue) {
                onRefreshTokenChange(appContainer)
            }

            true
        }

        val smartSchedulingPreference = findPreference<SwitchPreference>(SMART_SCHEDULING_KEY)
        smartSchedulingPreference?.setOnPreferenceChangeListener { preference, newValue ->
            updateAllWidgets()
            true
        }

        val beforehandSchedulingPreference = findPreference<SwitchPreference>(BEFOREHAND_SCHEDULING_KEY)
        beforehandSchedulingPreference?.setOnPreferenceChangeListener { preference, newValue ->
            updateAllWidgets()
            true


x000c0208: 'VK_PRINT',
};

/// The windows targets in the publish time order.
enum WindowsTarget {
  naw, // not a windows target
  xp,
  vista,
  w7,
  w8,
  w8_1,
  w10,
  w11
}

/// A convenient method to transform a build number to the corresponding windows version.
extension WindowsTargetExt on int {
  WindowsTarget get windowsVersion => getWindowsTarget(this);
}

const kCheckSoftwareUpdateFinish = 'check_software_update_finish';
import 'dart:convert';
import 'package:flutter/material.dart';

void handlePluginEvent(
  Map<String, dynamic> evt,
  Function(Map<String, dynamic> e) handleMsgBox,
) {
  Map<String, dynamic>? content;
  try {
    content = json.decode(evt['content']);
  } catch (e) {
    debugPrint(
        'Json decode plugin event content failed: $e, ${evt['content']}');
  }
  if (content?['t'] == 'MsgBox') {
    handleMsgBox(content?['c']);
  }
}
import 'dart:convert';

typedef PluginId = String;

// ui location
const String kLocationHostMainPlugin = 'host|main|settings|plugin';
const String kLocationClientRemoteToolbarDisplay =
    'client|remote|toolbar|display';

class MsgFromUi {
  String id;
  String name;
  String location;
  String key;
  String value;
  String action;

  MsgFromUi({
    required this.id,
    required this.name,
    required this.location,
    required this.key,
    required this.value,
    required this.action,
  });

  Map<String, dynamic> toJson() {
    return <String, dynamic>{
      'id': id,
      'name': name,
      'location': location,
      'key': key,
      'value': value,
      'action': action,
    };
  }

  @override
  String toString() {
    return jsonEncode(toJson());
  }
}
import 'dart:convert';
import 'dart:ffi';

import 'package:ffi/ffi.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hbb/plugin/ui_manager.dart';
import 'package:flutter_hbb/plugin/utils/dialogs.dart';

abstract class NativeHandler {
  bool onEvent(Map<String, dynamic> evt);
}

typedef OnSelectPeersCallback = Bool Function(Int returnCode,
    Pointer<Void> data, Uint64 dataLength, Pointer<Void> userData);
typedef OnSelectPeersCallbackDart = bool Function(
    int returnCode, Pointer<Void> data, int dataLength, Pointer<Void> userData);

class NativeUiHandler extends NativeHandler {
  NativeUiHandler._();

  static NativeUiHandler instance = NativeUiHandler._();

  @override
  bool onEvent(Map<String, dynamic> evt) {
    final name = evt['name'];
    final action = evt['action'];
    if (name != "native_ui") {
      return false;
    }
    switch (action) {
      case "select_peers":
        int cb = evt['cb'];
        int userData = evt['user_data'] ?? 0;
        final cbFuncNative = Pointer.fromAddress(cb)
            .cast<NativeFunction<OnSelectPeersCallback>>();
        final cbFuncDart = cbFuncNative.asFunction<OnSelectPeersCallbackDart>();
        onSelectPeers(cbFuncDart, userData);
        break;
      case "register_ui_entry":
        int cb = evt['on_tap_cb'];
        int userData = evt['user_data'] ?? 0;
        String title = evt['title'] ?? "";
        final cbFuncNative = Pointer.fromAddress(cb)
            .cast<NativeFunction<OnSelectPeersCallback>>();
        final cbFuncDart = cbFuncNative.asFunction<OnSe


);
			}
			if (pathImage.equals(""))
				return getImageFromLbl(lblHinh);

		}
		return getBytesImg(pathImage);
	}

	private byte[] getBytesImg(String filePath) {
		if (filePath == null)
			return getImageFromLbl(lblHinh);
		File fnew = new File(filePath);
		BufferedImage originalImage = null;
		try {
			originalImage = ImageIO.read(fnew);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		try {
			ImageIO.write(originalImage, "jpg", baos);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return baos.toByteArray();
	}

	public boolean validDataSanPham() {
		String tenSanPham = txtTenSanPham.getText().trim();
		String giaNhapSanPham = txtGiaNhapSanPham.getText().trim();
		String giaBanSanPham = txtGiaBanSanPham.getText();
		String soLuongSanPham = txtSoLuongSanPham.getText().trim();
		if (!(tenSanPham.length() > 0)) {
			JOptionPane.showMessageDialog(null, "Tên sản phẩm không được rỗng! ");
			return false;
		}

		if (!(giaNhapSanPham.length() > 0 && giaNhapSanPham.matches("^[0-9]+$"))) {
			JOptionPane.showMessageDialog(null, "Giá bán không hợp lệ! ");
			return false;
		}
		if (!(soLuongSanPham.length() > 0 && soLuongSanPham.matches("^[0-9]+$"))) {
			JOptionPane.showMessageDialog(null, "Số lượng không hợp lệ! ");
			return false;
		}
		if (!(giaBanSanPham.length() > 0 && giaBanSanPham.matches("^[0-9]+$"))) {
			JOptionPane.showMessageDialog(null, "Giá nhập không hợp lệ! ");
			return false;
		}
		return true;
	}

	public static void updateDataForResetData(List<SanPham> danhSach) {
		// xoaTrangTable(tbl_DanhSachSanPham);

		df = new DecimalFormat("#,###");
		dtf = DateTimeFormatter.ofPattern("dd-MM-yyyy");

		List<SanPham> list = sanPham_DAO.getDsSanPham();
		for (SanPham sanPham : list) {
			String[] rowData = { sanPham.getMaSP(), sanPham.getTenSP(), Double.toString(sanPham.getGiaNhap()),
					Double.toString(sanPham.getGiaBan()), dtf.format(sanPham.getNgayNhap()).substring(0, 10),
					sanPham.getLoaiSP().getTenLoai(), sanPham.getMauSac().getTenMauSac(),
					sanPham.getChatLieu().getTenChatLieu(), sanPham.getKichCo().getTenKichCo(),
					sanPham.getNhaCungCap().getTenNCC(), Integer.toString(sanPham.getSoLuongTon()),
					sanPham.getTrangThai() };
			model_DanhSachSanPham.addRow(rowData);
		}

	}

	public static void resetData() {
		SanPham_DAO sanPham_DAO = new SanPham_DAO();
		List<SanPham> danhSach = sanPham_DAO.getDsSanPham();
		ManHinhTimKiemSanPham.updateDataForResetData(danhSach


        val androidActivity = mClassPool[AndroidActivityClassname]
        val androidFragment = mClassPool[AndroidFragmentClassname]
        val androidIntent = mClassPool[AndroidIntentClassname]
        val androidBundle = mClassPool[AndroidBundleClassname]
        val androidContext = mClassPool[AndroidContextClassname]
        val androidAttributeSet = mClassPool[AndroidAttributeSetClassname]
        val shadowActivity = mClassPool[ShadowActivityClassname]
        val shadowFragmentSupport = mClassPool[ShadowFragmentSupportClassname]
        val getActivityMethod = androidFragment.getDeclaredMethod("getActivity")
        val getContextMethod = androidFragment.getDeclaredMethod("getContext")
        val getHostMethod = androidFragment.getDeclaredMethod("getHost")
        val fragmentGetActivityMethod = shadowFragmentSupport.getMethod(
            "fragmentGetActivity",
            Descriptor.ofMethod(
                shadowActivity,
                arrayOf(androidFragment)
            )
        )
        val fragmentGetContextMethod = shadowFragmentSupport.getMethod(
            "fragmentGetContext",
            Descriptor.ofMethod(
                androidContext,
                arrayOf(androidFragment)
            )
        )
        val fragmentGetHostMethod = shadowFragmentSupport.getMethod(
            "fragmentGetHost",
            Descriptor.ofMethod(
                javaObject,
                arrayOf(androidFragment)
            )
        )

        mClassPool.importPackage("android.app")
        mClassPool.importPackage("android.content")
        mClassPool.importPackage("android.util")
        mClassPool.importPackage("android.os")
        mClassPool.importPackage("com.tencent.shadow.core.runtime")

        //appClass中的Activity都已经被改名为ShadowActivity了．所以要把方法签名也先改一下．
        getActivityMethod.methodInfo.descriptor =
            "()Lcom/tencent/shadow/core/runtime/ShadowActivity;"

        val startActivityMethod1 = androidFragment.getMethod(
            "startActivity",
            Descriptor.ofMethod(
                CtClass.voidType,
                arrayOf(androidIntent)
            )
        )
        val fragmentStartActivityMethod1 = shadowFragmentSupport.getMethod(
            "fragmentStartActivity",
            Descriptor.ofMethod(
                CtClass.voidType,
                arrayOf(androidFragment, androidIntent)
            )
        )
        val startActivityMethod2 = androidFragment.getMethod(
            "startActivity",
            Descriptor.ofMethod(
                CtClass.voidType,
                arrayOf(androidIntent, androidBundle)
            )
        )
        val fragmentStartActivityMethod2 = shadowFragmentSupport.getMethod(
            "fragmentStartActivity",
            Descriptor.ofMethod(
                CtClass.voidType,
                arrayOf(androidFragment, androidIntent, androidBundle)
            )
        )

        val startActivityForResultMethod1 = androidFragment.getMethod(
            "startActivityForResult",
            Descriptor.ofMethod(
                CtClass.voidType,
                arrayOf(androidIntent, CtClass.intType)
            )
        )
        val fragmentStartActivityForResultMethod1 = shadowFragmentSupport.getMethod(
            "fragmentStartActivityForResult",
            Descriptor.ofMethod(
                CtClass.voidType,
                arrayOf(androidFragment, androidIntent, CtClass.intType)
            )
        )
        val startActivityForResultMethod2 = androidFragment.getMethod(
            "startActivityForResult",
            Descriptor.ofMethod(
                CtClass.voidType,
                arrayOf(androidIntent, CtClass.intType, androidBundle)
            )
        )
        val fragmentStartActivityForResultMethod2 = shadowFragmentSupport.getMethod(
            "fragmentStartActivityForResult",
            Descriptor.ofMethod(
                CtClass.voidType,
                arrayOf(androidFragment, androidIntent, CtClass.intType, androidBundle)
            )
        )

        /**
         * 调用插件Fragment的Activity相关方法时将ContainerActivity转换成ShadowActivity
         */
        newStep(object : TransformStep {
            override fun filter(allInputClass: Set<CtClass>) = allInputClass

            override fun transform(ctClass: CtClass) {
                ctClass.defrost()
                val codeConverter = EnhancedCodeConverter()
                codeConverter.redirectMethodCallToStatic(
                    getActivityMethod,


3
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0x83,0x94,0x80,0x23,0x01,0x00,0x00,0x7b]
         {evex}	adc	dword ptr [r8 + 4*rax + 291], 123
# CHECK: adc	ecx, dword ptr [r8 + 4*rax + 291], 123
# CHECK: encoding: [0x62,0xd4,0x74,0x18,0x83,0x94,0x80,0x23,0x01,0x00,0x00,0x7b]
         adc	ecx, dword ptr [r8 + 4*rax + 291], 123
# CHECK: {evex}	adc	qword ptr [r8 + 4*rax + 291], 123
# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0x83,0x94,0x80,0x23,0x01,0x00,0x00,0x7b]
         {evex}	adc	qword ptr [r8 + 4*rax + 291], 123
# CHECK: adc	r9, qword ptr [r8 + 4*rax + 291], 123
# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0x83,0x94,0x80,0x23,0x01,0x00,0x00,0x7b]
         adc	r9, qword ptr [r8 + 4*rax + 291], 123
# CHECK: {evex}	adc	dx, 1234
# CHECK: encoding: [0x62,0xf4,0x7d,0x08,0x81,0xd2,0xd2,0x04]
         {evex}	adc	dx, 1234
# CHECK: adc	ax, dx, 1234
# CHECK: encoding: [0x62,0xf4,0x7d,0x18,0x81,0xd2,0xd2,0x04]
         adc	ax, dx, 1234
# CHECK: {evex}	adc	word ptr [r8 + 4*rax + 291], 1234
# CHECK: encoding: [0x62,0xd4,0x7d,0x08,0x81,0x94,0x80,0x23,0x01,0x00,0x00,0xd2,0x04]
         {evex}	adc	word ptr [r8 + 4*rax + 291], 1234
# CHECK: adc	dx, word ptr [r8 + 4*rax + 291], 1234
# CHECK: encoding: [0x62,0xd4,0x6d,0x18,0x81,0x94,0x80,0x23,0x01,0x00,0x00,0xd2,0x04]
         adc	dx, word ptr [r8 + 4*rax + 291], 1234
# CHECK: {evex}	adc	ecx, 123456
# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0x81,0xd1,0x40,0xe2,0x01,0x00]
         {evex}	adc	ecx, 123456
# CHECK: adc	edx, ecx, 123456
# CHECK: encoding: [0x62,0xf4,0x6c,0x18,0x81,0xd1,0x40,0xe2,0x01,0x00]
         adc	edx, ecx, 123456
# CHECK: {evex}	adc	r9, 123456
# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0x81,0xd1,0x40,0xe2,0x01,0x00]
         {evex}	adc	r9, 123456
# CHECK: adc	r15, r9, 123456
# CHECK: encoding: [0x62,0xd4,0x84,0x18,


.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}};tl.getModule=function(e){var t=tl.modules[iie(e)];return t?t._module:!1};tl.traceIs=function(e,t){if(e=iie(e),e==="various")return!1;var r=tl.modules[e];return r||(e&&l3.log("Unrecognized trace type "+e+"."),r=tl.modules[Hrt.type.dflt]),!!r.categories[t]};tl.getComponentMethod=function(e,t){var r=tl.componentsRegistry[e];return r&&r[t]||Jre};tl.call=function(){var e=arguments[0],t=[].slice.call(arguments,1);return tl.apiMethodRegistry[e].apply(null,t)};function Xrt(e){var t=e.name,r=e.categories,n=e.meta;if(tl.modules[t]){l3.log("Type "+t+" already registered");return}tl.subplotsRegistry[e.basePlotModule.name]||Zrt(e.basePlotModule);for(var i={},a=0;a<r.length;a++)i[r[a]]=!0,tl.allCategories[r[a]]=!0;tl.modules[t]={_module:e,categories:i},n&&Object.keys(n).length&&(tl.modules[t].meta=n),tl.allTypes.push(t);for(var o in tl.componentsRegistry)tie(o,t);e.layoutAttributes&&Wrt(tl.traceLayoutAttributes,e.layoutAttributes);var s=e.basePlotModule,l=s.name;if(l==="mapbox"){var u=s.constants.styleRules;for(var c in u)Grt(".js-plotly-plot .plotly .mapboxgl-"+c,u[c])}l==="map"&&(Kre(),B1(Urt)),(l==="geo"||l==="mapbox"||l==="map")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function Zrt(e){var t=e.name;if(tl.subplotsRegistry[t]){l3.log("Plot type "+t+" already registered.");return}eie(e),tl.subplotsRegistry[t]=e;for(var r in tl.componentsRegistry)rie(r,e.name)}function Yrt(e){if(typeof e.name!="string")throw new Error("Component module *name* must be a string.");var t=e.name;tl.componentsRegistry[t]=e,e.layoutAttributes&&(e.layoutAttributes._isLinkedToArray&&$re(tl.layoutArrayContainers,t),eie(e));for(var r in tl.modules)tie(t,r);for(var n in tl.subplotsRegistry)rie(t,n);e.schema&&e.schema.layout&&BO(jrt,e.schema.layout)}function Krt(e){if(typeof e.name!="string")throw new Error("Transform module *name* must be a string.");var t="Transform module "+e.name,r=typeof e.transform=="function",n=typeof e.calcTransform=="function";if(!r&&!n)throw new Error(t+" is missing a *transform* or *calcTransform* method.");r&&n&&l3.log([t+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),Vrt(e.attributes)||l3.log(t+" registered without an *attributes* object."),typeof e.supplyDefaults!="function"&&l3.log(t+" registered without a *supplyDefaults* method.")}function Jrt(e){var t=e.name,r=t.split("-")[0],n=e.dictionary,i=e.format,a=n&&Object.keys(n).length,o=i&&Object.keys(i).length,s=tl.localeRegistry,l=s[t];if(l||(s[t]=l={}),r!==t){var u=s[r];u||(


output = String::new();
		fn post_order(node: &Node, output_str: &mut String) {
			if let Some(left) = &node.left {
				post_order(left.as_ref(), output_str);
			}
			if let Some(right) = &node.right {
				post_order(right.as_ref(), output_str);
			}
			output_str.push(node.letter);
		}

		post_order(huffman_node, &mut output);
		return output;
	}
	/// Convert huffman tree to vector of bytes
	///
	/// First element is length of tree
	///
	/// There are only 100 or so printable characters
	/// based on python's string.printable
	/// So worst case tree size is 2N-1 = 199
	/// So a unsigned char will suffice for length of tree
	///
	/// Following elements are charectars in post-order traversal of tree
	fn embed_tree(huffman_node: &Node) -> Vec<u8> {
		let mut compressed_data = to_string(huffman_node).into_bytes();
		compressed_data.insert(0, compressed_data.len() as u8); // Append length
		return compressed_data;
	}

	/// Simply maps input characters to their corresponding encoding and return as byte array
	///
	/// The first element is padding, (Number of zeroes appended for last encoding), as encoding might not fit into 8 bits
	fn compress_data(text: &String, huffman_node: &Node) -> Vec<u8> {
		let mut byte_stream: Vec<u8> = Vec::new();
		let (mut byte, mut count) = (0, 0);

		let huffman_map = to_hashmap(huffman_node);
		for c in text.chars() {
			let encoding = huffman_map.get(&c).unwrap();
			for e in encoding.bytes() {
				let bit: bool = (e - '0' as u8) != 0;
				byte = byte << 1 | (bit as u8);
				count = (count + 1) % 8;
				if count == 0 {
					byte_stream.push(byte);
					byte = 0;
				}
			}
		}
		if count != 0 {
			let padding: u8 = 8 - count;
			byte <<= padding;
			byte_stream.push(byte);
			byte_stream.insert(0, padding);
		} else {
			byte_stream.insert(0, 0);
		}
		return byte_stream;
	}
	/// Compression using huffman's algorithm
	/// # Data Format
	/// First byte (n): Length of post-order traversal of huffman tree
	///
	/// Following n bytes contain post-order traversal
	///
	/// Padding byte (p): Padding for final byte
	///
	/// All remaining bytes are data
	pub fn compress(text: &String) -> Vec<u8> {
		let frequency = freq_count(text.chars());
		let huffman_tree = construct_huffman_tree(frequency);
		let mut compressed_data = Vec::from(embed_tree(&huffman_tree));
		compressed_data.extend(compress_data(text, &huffman_tree));
		return compressed_data;
	}
	fn construct_tree_from_postorder(postorder: &[u8]) -> Node {
		// parent left right
		// Assuming input does not contain null
		let mut stack = Vec::new();
		for c in postorder {
			if *c == 0 as u8 {
				let (left, right) = (
					stack.pop().expect("Input contains Null byte"),
					stack.pop().expect("Input contains Null byte"),
				);
				stack.push(Node {
					letter: '\0',
					freq: 0,
					left: Option::from(Box::from(right)),
					right: Option::from(Box::from(left)),
				});
			}


L55_1 = _ENV
L56_1 = "C3243F6830E113575"
L57_1 = _hx_e
L57_1 = L57_1()
L55_1[L56_1] = L57_1
_ENV["C3243F6830E113575"]["new"] = function(A0_2)

  local L1_2, L2_2, L3_2, L4_2
  L1_2 = lua_helper_new
  L2_2 = C3243F6830E113575
  L2_2 = L2_2.prototype
  L3_2 = 8
  L4_2 = 15
  L1_2 = L1_2(L2_2, L3_2, L4_2)
  L2_2 = C3243F6830E113575
  L2_2 = L2_2.super
  L3_2 = L1_2
  L4_2 = A0_2
  L2_2(L3_2, L4_2)
  return L1_2
end

_ENV["C3243F6830E113575"]["super"] = function(A0_2, A1_2)

  local L2_2, L3_2, L4_2
  L2_2 = L26_1.new
  L2_2 = L2_2()
  A0_2[8] = L2_2
  A0_2[6] = 1.0
  L2_2 = CDC3F92928A2194E6
  L2_2 = L2_2.super
  L3_2 = A0_2
  L4_2 = A1_2
  L2_2(L3_2, L4_2)
end

L68_1 = "C3243F6830E113575"
L69_1 = _ENV["C3243F6830E113575"]
L25_1[L68_1] = L69_1
L68_1 = _ENV["C3243F6830E113575"]
L69_1 = "__name__"
L70_1 = "C3243F6830E113575"
L68_1[L69_1] = L70_1
L68_1 = _ENV["C3243F6830E113575"]
L69_1 = "prototype"
L70_1 = _hx_e
L70_1 = L70_1()
L68_1[L69_1] = L70_1
_ENV["C3243F6830E113575"]["prototype"]["F7C68FEDB79AB6396"] = function(A0_2, A1_2)

  local L2_2, L3_2, L4_2, L5_2
  L2_2 = A0_2
  L4_2 = A0_2
  L3_2 = A0_2.F903B84488FBFD0BC
  L3_2(L4_2)
  L3_2 = C1DB14DCC9D7634FA
  L3_2 = L3_2.new
  function L4_2()
    local L0_3, L1_3, L2_3, L3_3, L4_3, L5_3, L6_3, L7_3
    L0_3 = L2_2
    L1_3 = cECB91E31
    L1_3 = L1_3.fB41FD22F
    L2_3 = L2_2
    L2_3 = L2_3[1]
    L1_3 = L1_3(L2_3)
    L0_3[3] = L1_3
    while true do
      L0_3 = nil
      L1_3 = cECB91E31
      L1_3 = L1_3.fB6A00A1B
      L2_3 = L2_2
      L2_3 = L2_3[3]
      L3_3 = L0_


 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 searcher

import (
	"context"
	"fmt"
	"math"
	"reflect"

	"github.com/blevesearch/bleve/v2/search"
	"github.com/blevesearch/bleve/v2/size"
	index "github.com/blevesearch/bleve_index_api"
)

var reflectStaticSizePhraseSearcher int

func init() {
	var ps PhraseSearcher
	reflectStaticSizePhraseSearcher = int(reflect.TypeOf(ps).Size())
}

type PhraseSearcher struct {
	mustSearcher search.Searcher
	queryNorm    float64
	currMust     *search.DocumentMatch
	terms        [][]string
	path         phrasePath
	paths        []phrasePath
	locations    []search.Location
	initialized  bool
	// map a term to a list of fuzzy terms that match it
	fuzzyTermMatches map[string][]string
}

func (s *PhraseSearcher) Size() int {
	sizeInBytes := reflectStaticSizePhraseSearcher + size.SizeOfPtr

	if s.mustSearcher != nil {
		sizeInBytes += s.mustSearcher.Size()
	}

	if s.currMust != nil {
		sizeInBytes += s.currMust.Size()
	}

	for _, entry := range s.terms {
		sizeInBytes += size.SizeOfSlice
		for _, entry1 := range entry {
			sizeInBytes += size.SizeOfString + len(entry1)
		}
	}

	return sizeInBytes
}

func NewPhraseSearcher(ctx context.Context, indexReader index.IndexReader, terms []string,
	fuzziness int, autoFuzzy bool, field string, boost float64, options search.SearcherOptions) (*PhraseSearcher, error) {

	// turn flat terms []string into [][]string
	mterms := make([][]string, len(terms))
	for i, term := range terms {
		mterms[i] = []string{term}
	}
	return NewMultiPhraseSearcher(ctx, indexReader, mterms, fuzziness, autoFuzzy, field, boost, options)
}

func NewMultiPhraseSearcher(ctx context.Context, indexReader index.IndexReader, terms [][]string,
	fuzziness int, autoFuzzy bool, field string, boost float64, options search.SearcherOptions) (*PhraseSearcher, error) {

	options.IncludeTermVectors = true
	var termPositionSearchers []search.Searcher
	var err error
	var ts search.Searcher
	// The following logic checks if fuzziness is enabled.
	// Fuzziness is considered enabled if either:
	//    a. `fuzziness` is greater than 0, or
	//    b. `autoFuzzy` is set to true.
	// if both conditions are true, `autoFuzzy` takes precedence.
	// If enabled, a map will be created to store the matches for fuzzy terms.
	fuzzinessEnabled := autoFuzzy || fuzziness > 0
	var fuzzyTermMatches map[string][]string
	if fuzzinessEnabled {
		fuzzyTermMatches = make(map[string][]string)
		ctx = context.WithValue(ctx, search.FuzzyMatchPhraseKey, fuzzyTermMatches)
	}
	// in case of fuzzy multi-phrase, phrase and match-phrase queries we hardcode the
	// prefix length to 0, as setting a per word matching prefix length would not
	// make sense from a user perspective.
	for _, termPos := range terms {
		if len(termPos) == 1 && termPos[0] != "" {
			// single term
			if fuzzinessEnabled {
				// fuzzy
				if autoFuzzy {
					// auto fuzzy
					ts, err = NewAutoFuzzySearcher(ctx, indexReader, termPos[0


coraggio sinistro per rendere l'oggetto simmetrico?](images/Q9.png)

- [ ] Rimuoverla.
- [ ] Taglia il percorso nel punto di ancoraggio.
- [x] Convertilo in un punto d'angolo.
- [ ] Convertilo in un punto morbido.

#### D10. Quando usi lo strumento Coltello?

- [ ] quando si desidera tagliare un oggetto nei punti di ancoraggio esistenti
- [x] quando vuoi tagliare un oggetto in pezzi uguali
- [ ] quando si desidera ritagliare un'immagine incorporata o collegata
- [ ] quando si desidera dividere rapidamente un oggetto disegnando tracciati chiusi a mano libera

#### Domanda11. Hai un documento RGB a colori e devi creare una versione in scala di grigi che verrà stampata solo sulla lastra nera. Come puoi raggiungere questo obiettivo?

- [x] Seleziona tutto nel documento e quindi applica il comando Converti in scala di grigi.
- [ ] Applica il comando Converti in scala di grigi e modifica la modalità colore del documento in CMYK.
- [ ] Utilizzare il comando Ricolora grafica e selezionare la preimpostazione Lavoro a 1 colore.
- [] Elimina tutti i campioni di colore dal pannello Campioni ad eccezione di Bianco e nero.

#### Domanda12. Hai lavorato nell'area di lavoro Essenziali e hai modificato la disposizione dei pannelli, chiudendone alcuni che erano aperti per impostazione predefinita e aprendone altri dal menu Finestra. Come è possibile ripristinare la disposizione predefinita dei pannelli?

- [ ] Passa a qualsiasi altra area di lavoro, quindi torna a Essentials.
- [ ] Esci da Illustrator, tieni premuto Comando+Maiusc+Opzione (Mac) o Ctrl+Maiusc+Alt (Windows) e riavvia Illustrator.
- [x] Scegli Ripristina elementi essenziali dal menu Area di lavoro o dal commutatore dell'area di lavoro.
- [ ] Esci e riavvia Illustrator.

#### Domanda13. Al tuo capo piace il nuovo logo che hai desideratoGned ma mi piacerebbe vedere alcune variazioni utilizzando combinazioni di colori diversi. Quale funzionalità potresti utilizzare per generare rapidamente queste variazioni?

- [ ] Variabili
- [ ] Ricolora grafica
- [x] Pittura dal vivo
- [ ] Colori di prova

#### Domanda14. Qual è il modo più rapido ed efficiente per garantire che tutti gli oggetti mostrati nella figura seguente siano posizionati esattamente uno accanto all'altro senza spazio tra loro?

- [x] Specificare un oggetto chiave, quindi utilizzare il comando Distribuisci spazio orizzontale nel pannello Allinea con un valore di Spaziatura pari a 0
- [ ] Attiva le guide intelligenti e trascina ciascun oggetto finché non si aggancia a quello accanto.
- [ ] Scegli il comando Sposta e nella finestra di dialogo imposta il valore Distanza su 0.
- [ ] Seleziona gli oggetti con lo strumento Selezione, quindi trascina dal lato del riquadro di selezione finché gli oggetti non si agganciano insieme.

#### D15. Selezioni un nuovo colore nel selettore colori e desideri vedere diverse variazioni in diverse sfumature e tinte. Quale funzionalità ti consente di farlo?

- [ ] Temi


on = Axis3DPermutation.XYZ,
    bits: Int = 10,
): List<Vector3> {
    val bounds = this.bounds
    val md = max(max(bounds.width, bounds.height), bounds.depth) * scale
    val rbounds = Box(bounds.corner.x, bounds.corner.y, bounds.corner.z, md, md, md)
    val inputPoints = map {
        it.map(
            rbounds.position(0.0, 0.0, 0.0),
            rbounds.position(1.0, 1.0, 1.0),
            Vector3(0.0, 0.0, 0.0),
            Vector3(1023.0, 1023.0, 1023.0)
        )
    }
    val mortonCodes = when (bits) {
        5 -> when (permutation) {
            Axis3DPermutation.XYZ -> inputPoints.map { morton3dEncode5Bit(it.x.toUInt(), it.y.toUInt(), it.z.toUInt()) }
            Axis3DPermutation.XZY -> inputPoints.map { morton3dEncode5Bit(it.x.toUInt(), it.z.toUInt(), it.y.toUInt()) }
            Axis3DPermutation.YXZ -> inputPoints.map { morton3dEncode5Bit(it.y.toUInt(), it.x.toUInt(), it.z.toUInt()) }
            Axis3DPermutation.YZX -> inputPoints.map { morton3dEncode5Bit(it.y.toUInt(), it.z.toUInt(), it.x.toUInt()) }
            Axis3DPermutation.ZXY -> inputPoints.map { morton3dEncode5Bit(it.z.toUInt(), it.x.toUInt(), it.y.toUInt()) }
            Axis3DPermutation.ZYX -> inputPoints.map { morton3dEncode5Bit(it.z.toUInt(), it.y.toUInt(), it.x.toUInt()) }
        }
        10 -> when (permutation) {
            Axis3DPermutation.XYZ -> inputPoints.map { morton3dEncode10Bit(it.x.toUInt(), it.y.toUInt(), it.z.toUInt()) }
            Axis3DPermutation.XZY -> inputPoints.map { morton3dEncode10Bit(it.x.toUInt(), it.z.toUInt(), it.y.toUInt()) }
            Axis3DPermutation.YXZ -> inputPoints.map { morton3dEncode10Bit(it.y.toUInt(), it.x.toUInt(), it.z.toUInt()) }
            Axis3DPermutation.YZX -> inputPoints.map { morton3dEncode10Bit(it.y.toUInt(), it.z.toUInt(), it.x.toUInt()) }
            Axis3DPermutation.ZXY -> inputPoints.map { morton3dEncode10Bit(it.z.toUInt(), it.x.toUInt(), it.y.toUInt()) }
            Axis3DPermutation.ZYX -> inputPoints.map { morton3dEncode10Bit(it.z.toUInt(), it.y.toUInt(), it.x.toUInt()) }
        }
        else -> error("Only 5 and 10 bit modes are supported.")
    }
    return (this zip mortonCodes).sortedBy { it.second }.map { it.first }
}

fun List<Vector3>.hilbertOrder(
    scale: Double = 1.0,
    permutation: Axis3DPermutation = Axis3DPermutation.XYZ,
    bits: Int
): List<Vector3> {
    val bounds = this.bounds
    val md = max(max(bounds.width, bounds.height), bounds.depth) * scale
    val rbounds = Box(bounds.corner.x, bounds.corner.y, bounds.corner.z, md, md, md)
    val inputPoints = map {
        it.map(
            rbounds.position(0.0, 0.0, 0.0),
            rbounds.position(1.0, 1.0, 1.0),
            Vector3(0.0, 0.0, 0.0),
            Vector3(1023.0, 1023.0, 1023.0)
        )
    }
    val hilbertCodes = when(bits) {


DuringVideoPlaying() {
  // Test TextTrack::ActiveCues.
  let cueInfo = [
    { startTime: 0.51, endTime: 0.71, ids: ["Cue 01"] },
    { startTime: 0.72, endTime: 1.19, ids: [] },
    { startTime: 1.2, endTime: 1.9, ids: [2] },
    { startTime: 2, endTime: 2.4, ids: [2, 2.5] },
    { startTime: 2.41, endTime: 2.70, ids: [2.5] },
    { startTime: 2.71, endTime: 2.91, ids: [2.5, 3] },
    { startTime: 2.92, endTime: 3.216, ids: [2.5] },
    { startTime: 3.217, endTime: 3.5, ids: [2.5, 4, 5] },
    { startTime: 3.51, endTime: 3.989, ids: [4, 5] },
    { startTime: 3.99, endTime: 4, ids: [] }
  ];

  video.addEventListener("timeupdate", function() {
    let activeCues = trackElement.track.activeCues,
        playbackTime = video.currentTime;

    for (let i = 0; i < cueInfo.length; i++) {
      let cue = cueInfo[i];
      if (playbackTime >= cue.startTime && playbackTime < cue.endTime) {
        is(activeCues.length, cue.ids.length, `There should be ${cue.ids.length} currently active cue(s).`);
        for (let j = 0; j < cue.ids.length; j++) {
          isnot(activeCues.getCueById(cue.ids[j]), undefined,
                `The cue with ID ${cue.ids[j]} should be active.`);
        }
        break;
      }
    }
  });

  info(`start video from 0s.`);
  video.currentTime = 0;
  video.play();
  await once(video, "playing");
  info(`video starts playing.`);
  await once(video, "ended");
}

</script>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
  <title>Test for seamless loop of HTMLAudioElements</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  <script type="text/javascript" src="manifest.js"></script>
</head>
<body>
<canvas id="canvas" width="300" height="300"></canvas>
<script type="application/javascript">
/**
 * This test is used to ensure every time we loop audio, the audio can loop
 * seamlessly which means there won't have any silenece or noise between the
 * end and the start.
 */

SimpleTest.waitForExplicitFinish();

// Set DEBUG to true to add a canvas with a little drawing of what is going
// on, and actually outputs the audio to the speakers.
var DEBUG = true;
var LOOPING_COUNT = 0;
var MAX_LOOPING_COUNT = 10;
var TONE_FREQUENCY = 440;

(async function testSeamlesslooping() {
  info(`- create looping audio element -`);
  let audio = createAudioElement();

  info(`- start audio and analyze audio wave data to ensure looping audio without any silence or noise -`);
  await playAudioAndStartAnalyzingWaveData(audio);

  info(`- test seamless looping multiples times -`);
  for (LOOPING_COUNT = 0; LOOPING_COUNT < MAX_LOOPING_COUNT; LOOPING_COUNT++) {
    await once(audio, "seeked");
    info(`- the round ${LOOPING_COUNT} of the seamless looping succeeds -`);
  }

  info(`- end of seamless looping test -`);
  SimpleTest.finish();
})();

/**
 * Test utility functions
 */
function createSrcBuffer


ngStrategy()
    public data class Copy(val from: String) : RenderingStrategy()
    public data class Write(val text: String) : RenderingStrategy()
    public data class DriLocationResolvableWrite(val contentToResolve: (DriResolver) -> String) : RenderingStrategy()
    public data class PageLocationResolvableWrite(val contentToResolve: (PageResolver) -> String) : RenderingStrategy()
    public object DoNothing : RenderingStrategy()

    public companion object {
        public inline operator fun <reified T: Renderer> invoke(crossinline instructions: T.(PageNode) -> String): RenderingStrategy {
            return Callback { if (this is T) instructions(it) else throw WrongRendererTypeException(T::class) }
        }
    }
}

public data class WrongRendererTypeException(val expectedType: KClass<*>): Exception()
package glm_.vec4.operators

import glm_.*
import glm_.vec4.Vec4b
import glm_.vec4.Vec4b.Companion.div
import glm_.vec4.Vec4b.Companion.minus
import glm_.vec4.Vec4b.Companion.plus
import glm_.vec4.Vec4b.Companion.rem
import glm_.vec4.Vec4b.Companion.times
import kotlin.experimental.and
import kotlin.experimental.inv
import kotlin.experimental.or
import kotlin.experimental.xor

/**
 * Created by GBarbieri on 08.11.2016.
 */
interface vec4b_operators {

    fun plus(res: Vec4b, a: Vec4b, bX: Byte, bY: Byte, bZ: Byte, bW: Byte): Vec4b {
        res.x = (a.x + bX).b
        res.y = (a.y + bY).b
        res.z = (a.z + bZ).b
        res.w = (a.w + bW).b
        return res
    }

    fun plus(res: Vec4b, a: Vec4b, bX: Int, bY: Int, bZ: Int, bW: Int): Vec4b {
        res.x = (a.x + bX).b
        res.y = (a.y + bY).b
        res.z = (a.z + bZ).b
        res.w = (a.w + bW).b
        return res
    }

    fun minus(res: Vec4b, a: Vec4b, bX: Byte, bY: Byte, bZ: Byte, bW: Byte): Vec4b {
        res.x = (a.x - bX).b
        res.y = (a.y - bY).b
        res.z = (a.z - bZ).b
        res.w = (a.w - bW).b
        return res
    }

    fun minus(res: Vec4b, a: Vec4b, bX: Int, bY: Int, bZ: Int, bW: Int): Vec4b {
        res.x = (a.x - bX).b
        res.y = (a.y - bY).b
        res.z = (a.z - bZ).b
        res.w = (a.w - bW).b
        return res
    }

    fun minus(res: Vec4b, aX: Byte, aY: Byte, aZ: Byte, aW: Byte, b: Vec4b): Vec4b {
        res.x = (aX - b.x).b
        res.y = (aY - b.y).b
        res.z = (aZ - b.z).b
        res.w = (aW - b.w).b
        return res
    }

    fun minus(res: Vec4b, aX: Int, aY: Int, aZ: Int, aW: Int, b: Vec4b): Vec4b {
        res.x = (aX - b.x).b
        res.y = (aY -


= { 50, 45, 10, 0, 9 },
			["double-expert"] = { 60, 50, 22, 0, 32 },
			["double-challenge"] = { 87, 67, 20, 3, 100 },
			["couple-p1-basic"] = { 39, 28, 41, 0, 2 },
			["couple-p2-basic"] = { 38, 28, 42, 0, 2 },
			["couple-p1-difficult"] = { 42, 33, 29, 0, 6 },
			["couple-p2-difficult"] = { 42, 33, 30, 0, 6 },
			["couple-p1-expert"] = { 56, 44, 22, 0, 21 },
			["couple-p2-expert"] = { 56, 44, 22, 0, 21 },
		},
		["KEEP ON MOVIN'"] = {
			["single-beginner"] = { 15, 11, 24, 0, 0 },
			["single-basic"] = { 32, 27, 27, 0, 0 },
			["single-difficult"] = { 41, 38, 25, 0, 6 },
			["single-expert"] = { 54, 44, 19, 0, 17 },
			["double-basic"] = { 33, 27, 16, 0, 0 },
			["double-difficult"] = { 48, 44, 21, 0, 13 },
			["double-expert"] = { 48, 44, 14, 0, 27 },
			["couple-p1-difficult"] = { 33, 44, 8, 0, 7 },
			["couple-p2-difficult"] = { 33, 44, 6, 0, 6 },
			["solo-basic"] = { 32, 22, 14, 0, 0 },
			["solo-difficult"] = { 40, 38, 14, 0, 6 },
			["solo-expert"] = { 53, 44, 9, 0, 17 },
		},
		["LOVE"] = {
			["single-basic"] = { 26, 21, 20, 0, 0 },
			["single-difficult"] = { 32, 26, 46, 0, 1 },
			["single-expert"] = { 40, 37, 27, 0, 13 },
			["single-challenge"] = { 80, 59, 5, 0, 93 },
			["double-basic"] = { 26, 21, 23, 0, 0 },
			["double-difficult"] = { 32, 26, 47, 0, 1 },
			["double-expert"] = { 57, 43, 4, 0, 24 },
			["couple-p1-basic"] = { 20, 21, 12, 0, 0 },
			["couple-p2-basic"] = { 20, 21, 12, 0, 0 },
			["couple-p1-difficult"] = { 28, 26, 28, 0, 1 },
			["couple-p2-difficult"] = { 28, 26, 28, 0, 1 },
			["couple-p1-expert"] = { 35, 32, 19, 0, 11 },
			["couple-p2-expert"] = { 35, 32, 19, 0, 11 },
			["solo-basic"] = { 26, 21, 20, 0, 0 },
			["solo-difficult"] = { 32, 26, 46, 0, 1 },
			["solo-expert"] = { 40, 37, 27, 0, 13 },
		},
		["MAKE A JAM!"] = {
			["single-beginner"] = { 13, 10, 1, 0, 0 },
			["single-basic"] = { 33, 31, 8, 0, 2 },
			["single-difficult"] = { 41, 36, 44, 0, 8 },
			["single-expert"] = { 51, 36, 49, 0, 14 },
			["double-basic"] = { 33, 31, 9, 0, 2 },
			["double-difficult"] = { 42, 36, 29, 0, 8 },
			["double-expert"] = { 63, 41, 29, 0, 29 },
			["couple-p1-basic"] = { 25, 31, 5, 0, 2 },
			["couple-p2-basic"] = { 26, 31, 5, 0, 2 },
			["couple-p1-difficult"] = {


    protected IDatabaseTestConnection _connection;

        protected void InitialiseTestObjects()
        {
            _teams = new EFTeamRepository { CreateContext = () => _connection.GetContext() };
            _users = new EFMembershipService { CreateContext = () => _connection.GetContext() };
            _repos = new EFRepositoryRepository { CreateContext = () => _connection.GetContext() };
            _roles = new EFRoleProvider { CreateContext = () => _connection.GetContext() };

            _service = new RepositoryPermissionService
            {
                Repository = _repos,
                TeamRepository = _teams,
                RoleProvider = _roles
            };

            new AutomaticUpdater().RunWithContext(_connection.GetContext());
        }

        protected override TeamModel CreateTeam()
        {
            var newTeam = new TeamModel { Name = "Team1" };
            _teams.Create(newTeam);
            return newTeam;
        }

        protected override void UpdateTeam(TeamModel team)
        {
            _teams.Update(team);
        }
    }
}


using System;
using KeePassRPC.Models.DataExchange;

namespace KeePassRPC.Models.Shared
{
    public class FieldMatcherConfig : IEquatable<FieldMatcherConfig>
    {
        public FieldMatcherType? MatcherType;
        public FieldMatcher CustomMatcher;
        public int? Weight; // 0 = client decides or ignores locator
        public MatchAction? ActionOnMatch;

        public static FieldMatcherConfig ForSingleClientMatch(string id, string name, FormFieldType fft)
        {
            var htmlType = Utilities.FormFieldTypeToHtmlType(fft);
            return ForSingleClientMatch(id, name, htmlType, null);
        }

        public static FieldMatcherConfig ForSingleClientMatch(string id, string name, string htmlType, string domSelector)
        {
            return new FieldMatcherConfig
            {
                CustomMatcher = new FieldMatcher
                {
                    Ids = string.IsNullOrEmpty(id) ? new string[0] : new[] { id },
                    Names = string.IsNullOrEmpty(name) ? new string[0] : new[] { name },
                    Types = string.IsNullOrEmpty(htmlType) ? new string[0] : new []{ htmlType },
                    Queries = string.IsNullOrEmpty(domSelector) ? new string[0] : new []{ domSelector }
                }
            };
        }

        public bool Equals(FieldMatcherConfig other)


from django.db import models

# Create your models here.
class Slide(models.Model):
    image = models.ImageField(upload_to='images')


using System.Threading.Tasks;
using BlazorApp.Chat;
using BlazorApp.Utils;
using Entity;
using k8s;
using k8s.Autorest;
using k8s.Models;
using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.Logging;

namespace BlazorApp.Service.k8s;

public class Watcher<T, TL>(IHubContext<ChatHub> ctx)
    where T : IKubernetesObject<V1ObjectMeta>
{
    private static readonly ILogger<Watcher<T, TL>> Logger = LoggingHelper<Watcher<T, TL>>.Logger();

    public async Task Watch(Task<HttpOperationResponse<TL>> listResp)
    {
        var cache = ResourceCache


/*-
 * Copyright (c) 2006-2008 Bruce M. Simpson
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions, and the following disclaimer,
 *    without modification, immediately at the beginning of the file.
 * 2. The name of the author may not be used to endorse or promote products
 *    derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 */

#include <sys/cdefs.h>
__FBSDID("$FreeBSD: release/9.1.0/sys/mips/malta/yamon.c 202175 2010-01-12 21:36:08Z imp $");

#include <sys/param.h>
#include <sys/systm.h>

#include <mips/malta/yamon.h>

char *
yamon_getenv(char *name)
{
	char *value;
	yamon_env_t *p;

	value = NULL;
	for (p = *fenvp; p->name != NULL; ++p) {
	    if (!strcmp(name, p->name)) {
		value = p->value;
		break;
	    }
	}

	return (value);
}

uint32_t
yamon_getcpufreq(void)
{
	uint32_t freq;
	int ret;

	ret = YAMON_SYSCON_READ(SYSCON_BOARD_CPU_CLOCK_FREQ_ID, &freq,
	    sizeof(freq));
	if (ret != 0)
		freq = 0;

	return (freq);
}


(lightGray);
  int y = (loc?.hasFlag ?? false) ? 16 : 15;
  mvaddstrCenter(y++, slogan);
  addCenteredOptionText(y++, "s", "(S - Change the Slogan)", baseColorKey: "m");
  if (loc != null) {
    printSafehouseSecurityBox(loc);
  }
}

void printSafehouseSecurityBox(Site site) {
  int heat = site.heat;
  int heatProtection = site.heatProtection;

  setColor(lightGray);
  mvaddstr(9, 1, "┌────────────────┐");
  mvaddstr(10, 1, "│                │");
  mvaddstr(11, 1, "│                │");
  mvaddstr(12, 1, "└────────────────┘");

  mvaddstr(9, 2, site.getName(short: true, includeCity: true));
  if (site.siege.underAttack) {
    mvaddstrc(10, 3, red, "Under Attack");
  } else if (site.siege.underSiege) {
    mvaddstrc(10, 3, yellow, "Under Siege");
  } else {
    mvaddstrc(10, 2, lightGray, "Heat: ");
    addstrc(heat > heatProtection ? red : darkGray, "$heat");
    mvaddstrc(11, 2, lightGray, "Secrecy: ");
    addstrc(heat > heatProtection ? red : darkGray, "$heatProtection");
  }
  int extrajudicialHeat = [
    site.extraHeatFromCIA ~/ 2,
    site.extraHeatFromCCS,
    site.extraHeatFromCorps,
    site.extraHeatFromRuralMobs * 2,
  ].max;
  if (extrajudicialHeat > heatProtection * 0.3) {
    setColor(lightGray);
    mvaddstr(12, 1, "│                │");
    mvaddstr(13, 1, "│                │");
    mvaddstr(14, 1, "└────────────────┘");
    Color color = darkGray;
    String description = "Possible";
    if (extrajudicialHeat > heatProtection * 0.6) {
      color = midGray;
      description = "Likely";
    }
    if (extrajudicialHeat > heatProtection * 0.9) {
      color = red;
      description = "Overt";
    }
    mvaddstrc(12, 4, color, description);
    mvaddstrc(13, 4, color, "Surveillance");
  }
}

Future<bool> checkForVision() async {
  bool forceWait = true;
  cantSeeReason = CantSeeReason.other;
  if (disbanding) {
    cantSeeReason = CantSeeReason.disbanded;
    disbanding = await showDisbandingScreen();
  } else {
    for (Creature c in pool) {
      if (c.isActiveLiberal) {
        cantSeeReason = CantSeeReason.none;
        if (c.clinicMonthsLeft == 0) {
          forceWait = false;
          break;
        }
      } else {
        if (c.clinicMonthsLeft > 0 &&
            cantSeeReason.index > CantSeeReason.hospital.index) {
          cantSeeReason = CantSeeReason.hospital;
        } else if (c.vacationDaysLeft > 0 &&
            cantSeeReason.index > CantSeeReason.dating.index) {
          cantSeeReason = CantSeeReason.dating;
        } else if (c.hidingDaysLeft > 0 &&
            cantSeeReason.index > CantSeeReason.hiding.index) {
          cantSeeReason = CantSeeReason.hiding;
        }
      }
    }
  }
  return forceWait;
}

Future<void> howTimesHaveChanged(int daysWithoutVision) async {
  Str


hts reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE.md file.

import 'dart:async' show StreamController;
import 'dart:convert' show utf8, LineSplitter;
import 'dart:io' show Directory, File, FileSystemEntity, IOSink, exitCode;

import 'package:front_end/src/api_prototype/language_version.dart'
    show uriUsesLegacyLanguageVersion;
import 'package:front_end/src/api_unstable/vm.dart'
    show CompilerOptions, NnbdMode, StandardFileSystem;
import 'package:frontend_server/starter.dart';
import 'package:kernel/ast.dart' show Component;
import 'package:kernel/kernel.dart' show loadComponentFromBytes;
import 'package:kernel/verifier.dart' show verifyComponent;

main(List<String> args) async {
  String? flutterDir;
  String? flutterPlatformDir;
  for (String arg in args) {
    if (arg.startsWith("--flutterDir=")) {
      flutterDir = arg.substring(13);
    } else if (arg.startsWith("--flutterPlatformDir=")) {
      flutterPlatformDir = arg.substring(21);
    }
  }

  await compileTests(flutterDir, flutterPlatformDir, StdoutLogger());
}

Future<NnbdMode> _getNNBDMode(Uri script, Uri packageConfigUri) async {
  final CompilerOptions compilerOptions = CompilerOptions()
    ..sdkRoot = null
    ..fileSystem = StandardFileSystem.instance
    ..packagesFileUri = packageConfigUri
    ..sdkSummary = null
    ..nnbdMode = NnbdMode.Weak;

  if (await uriUsesLegacyLanguageVersion(script, compilerOptions)) {
    return NnbdMode.Weak;
  }
  return NnbdMode.Strong;
}

Future compileTests(
    String? flutterDir, String? flutterPlatformDir, Logger logger,
    {String? filter, int shards = 1, int shard = 0}) async {
  if (flutterDir == null || !(Directory(flutterDir).existsSync())) {
    throw "Didn't get a valid flutter directory to work with.";
  }
  if (shards < 1) {
    throw "Shards must be >= 1";
  }
  if (shard < 0) {
    throw "Shard must be >= 0";
  }
  if (shard >= shards) {
    throw "Shard must be < shards";
  }
  // Ensure the path ends in a slash.
  final Directory flutterDirectory =
      Directory.fromUri(Directory(flutterDir).uri);

  List<FileSystemEntity> allFlutterFiles =
      flutterDirectory.listSync(recursive: true, followLinks: false);
  Directory flutterPlatformDirectoryTmp;

  if (flutterPlatformDir == null) {
    List<File> platformFiles = List<File>.from(allFlutterFiles.where((f) => f
        .uri
        .toString()
        .endsWith("/flutter_patched_sdk/platform_strong.dill")));
    if (platformFiles.isEmpty) {
      throw "Expected to find a flutter platform file but didn't.";
    }
    flutterPlatformDirectoryTmp = platformFiles.first.parent;
  } else {
    flutterPlatformDirectoryTmp = Directory(flutterPlatformDir);
  }
  if (!flutterPlatformDirectoryTmp.existsSync()) {
    throw "$flutterPlatformDirectoryTmp doesn't exist.";
  }
  // Ensure the path ends in a slash.
  final Directory flutterPlatformDirectory =
      Directory.fromUri(flutterPlatformDirectoryTmp.uri);

  if (!File.fromUri(
          flutterPlatformDirectory.uri.resolve("platform_strong.dill"))
      .existsSync()) {
    throw "$flutterPlatformDirectory doesn't contain a "


               y = np.cross(n, x)

                    basis_x[v,:] = x
                    basis_y[v,:] = y
                    basis_n[v,:] = n
    if return_basis_vectors:
        basis_x = basis_x / np.linalg.norm(basis_x, axis=1)[:, None]
        basis_y = basis_y / np.linalg.norm(basis_y, axis=1)[:, None]
        basis_n = basis_n / np.linalg.norm(basis_n, axis=1)[:, None]
        return hE_tangent_vectors, v2he_x, basis_x, basis_y, basis_n
    else:
        return hE_tangent_vectors, v2he_x

def half_edge_one_ring_possibly_boundary(twins,he_start, alternate_basis=False):
    """
    Get one-ring face sides of a vertex (similar to the face_side_one_ring.py with a different set of inputs).
    """
    he = he_start
    one_ring = [he]
    is_boundary_vertex = False
    while True:
        he = twin(twins, next(next(he)))
        if he == he_start:
            # this is an interior vertex, so it reaches the starting fs
            break
        if he == GHOST_HALF_EDGE: # hit boundary, then go clock wise
            is_boundary_vertex = True
            he = he_start
            while True:
                if twin(twins, he) == GHOST_HALF_EDGE:
                    break
                he = next(twin(twins, he))
                one_ring.insert(0,he)
            break
        one_ring.append(he)
    if alternate_basis:
        one_ring = np.roll(np.array(one_ring), 1).tolist()

    return one_ring, is_boundary_vertex


b3`](https://github.com/juspay/hyperswitch/commit/3fe24b3255039d6a5dff59203ffcfd024ff0d60b))
- **router:**
  - Added retrieval flow for connector file uploads and added support for stripe connector ([#990](https://github.com/juspay/hyperswitch/pull/990)) ([`38aa9ea`](https://github.com/juspay/hyperswitch/commit/38aa9eab3f2453593e7b0c3fa63b37f7f2609514))
  - Add disputes block in payments retrieve response ([#1038](https://github.com/juspay/hyperswitch/pull/1038)) ([`1304d91`](https://github.com/juspay/hyperswitch/commit/1304d912e53cf223f8f15760e29b84faafe4f6ea))
- Allow payment cancels for more statuses ([#1027](https://github.com/juspay/hyperswitch/pull/1027)) ([`a2a6bab`](https://github.com/juspay/hyperswitch/commit/a2a6bab56cc70463d25232ce40ca4f115bee24e0))

### Bug Fixes

- **applepay:** Rename applepay_session_response to lowercase ([#1090](https://github.com/juspay/hyperswitch/pull/1090)) ([`736a236`](https://github.com/juspay/hyperswitch/commit/736a236651523b7f72ff95ad9223f4dda875301a))
- **router:** Fix recursion bug in straight through algorithm ([#1080](https://github.com/juspay/hyperswitch/pull/1080)) ([`aa610c4`](https://github.com/juspay/hyperswitch/commit/aa610c49f5a24e3e858515d9dfe0872d43251ee5))
- **tests:** Remove ui tests from ci pipeline ([#1082](https://github.com/juspay/hyperswitch/pull/1082)) ([`2ab7f83`](https://github.com/juspay/hyperswitch/commit/2ab7f83103d0907095e5b15a35f298ae60e6d180))
- Connector-customer-id missing bug fix ([#1085](https://github.com/juspay/hyperswitch/pull/1085)) ([`c5db5c3`](https://github.com/juspay/hyperswitch/commit/c5db5c37ec8f15e90d56aca59d14331fd8a2ea30))

### Refactors

- **router:** Add `id` field in `MerchantConnectorAccountNotFound` ([#1098](https://github.com/juspay/hyperswitch/pull/1098)) ([`5214e22`](https://github.com/juspay/hyperswitch/commit/5214e22f20c01e7dfb402ae619fdf2e7339d0fe7))

### Documentation

- **changelog:** Adding changelog for v0.5.10 ([#1078](https://github.com/juspay/hyperswitch/pull/1078)) ([`cb77b01`](https://github.com/juspay/hyperswitch/commit/cb77b012a2751f10395c3ff698aed4714a6b4223))

### Miscellaneous Tasks

- **CODEOWNERS:** Update CODEOWNERS ([#1076](https://github.com/juspay/hyperswitch/pull/1076)) ([`1456580`](https://github.com/juspay/hyperswitch/commit/1456580366c618300db4e0746db08a7466e04ea8))

- - -

## 0.5.10 (2023-05-08)

### Features

- **common_utils:**
  - Impl deref for email newtype


382,0,198.117,0,225.365c0,34.792,20.897,65.455,57.886,85.851
      c-0.572,3.32-0.886,6.726-0.886,10.206c0,33.084,26.916,60,60,60c7.527,0,14.766-1.134,21.63-3.044
      c3.444,4.59,7.37,13.093,7.37,28.044c0,25.437-35.48,36.76-35.747,36.843l11.494,38.313c1.602-0.481,16.076-4.998,30.831-15.474      C174.443,450.58,186,429.943,186,406.422c0-19.833-4.884-34.967-11.464-46.071c9.843-7.178,17.546-14.704,22.438-19.963
      c1.927,0.02,3.86,0.034,5.8,0.034c68.761,0,144.557-17.642,202.753-47.193C474.188,258.365,512,210.92,512,159.635
      C512,112.727,488.465,76.598,443.938,55.155z M117,341.422c-11.028,0-20-8.973-20-20c0-11.028,8.972-20,20-20
      c15.314,0,31.084,10.385,42.075,19.992C148.123,330.958,132.28,341.422,117,341.422z M387.417,257.563
      c-52.851,26.837-121.876,42.859-184.643,42.859c-2.61,0-5.21-0.021-7.786-0.061c-13.414-13.891-42.521-38.939-77.989-38.939
      c-15.142,0-28.981,5.65-39.55,14.937C53.199,263.158,40,245.328,40,225.365c0-36.285,30.12-74.771,82.638-105.59
      C175.299,88.872,242.799,70.422,303.2,70.422c112.008,0,168.8,30.016,168.8,89.213C472,207.471,419.006,241.523,387.417,257.563z"
          />
        </symbol>
        <symbol id="lasso-add-icon" viewBox="0 0 512 512">
          <path fill="none" d="M-1-1h802v602H-1z" />
          <g>
            <path d="M443.938 55.155c-34.079-16.412-81.43-24.733-140.737-24.733-67.208 0-142.276 20.507-200.808 54.855-30.429 17.857-54.75 38.254-72.289 60.625C10.128 171.382 0 198.117 0 225.365c0 34.792 20.897 65.455 57.886 85.851A60.038 60.038 0 0057 321.422c0 33.084 26.916 60 60 60 7.527 0 14.766-1.134 21.63-3.044 3.444 4.59 7.37 13.093 7.37 28.044 0 25.437-35.48 36.76-35.747 36.843l11.494 38.313c1.602-.481 16.076-4.998 30.831-15.474C174.443 450.58 186 429.943 186 406.422c0-19.833-4.884-34.967-11.464-46.071 9.843-7.178 17.546-14.704 22.438-19.963 1.927.02 3.86.034 5.8.034 68.761 0 144.557-17.642 202.753-47.193C474.188 2


th_panel_id", &annotation),
					resource.TestCheckResourceAttr("grafana_annotation.test_with_panel_id", "text", testAccAnnotationUpdatedText),

					// Check that the annotation is in the correct organization
					resource.TestMatchResourceAttr("grafana_annotation.test_with_panel_id", "id", nonDefaultOrgIDRegexp),
					orgCheckExists.exists("grafana_organization.test", &org),
					checkResourceIsInOrg("grafana_annotation.test_with_panel_id", "grafana_organization.test"),
				),
			},
			{
				// Importing matches the state of the previous step.
				ResourceName:      "grafana_annotation.test_with_panel_id",
				ImportState:       true,
				ImportStateVerify: true,
			},
		},
	})
}

func TestAccAnnotation_dashboardUID(t *testing.T) {
	testutils.CheckOSSTestsEnabled(t, ">=9.0.0")

	var annotation models.Annotation
	var org models.OrgDetailsDTO

	orgName := acctest.RandString(10)

	resource.ParallelTest(t, resource.TestCase{
		ProtoV5ProviderFactories: testutils.ProtoV5ProviderFactories,
		CheckDestroy:             annotationsCheckExists.destroyed(&annotation, &org),
		Steps: []resource.TestStep{
			{
				// Test resource creation with declared dashboard_uid.
				Config: testAnnotationConfigInOrgWithDashboardUID(orgName, testAccAnnotationInitialText),
				Check: resource.ComposeTestCheckFunc(
					annotationsCheckExists.exists("grafana_annotation.test_with_dashboard_uid", &annotation),
					resource.TestCheckResourceAttr("grafana_annotation.test_with_dashboard_uid", "text", testAccAnnotationInitialText),
				),
			},
			{
				// Updates text in resource with declared dashboard_id.
				Config: testAnnotationConfigInOrgWithDashboardUID(orgName, testAccAnnotationUpdatedText),
				Check: resource.ComposeTestCheckFunc(
					annotationsCheckExists.exists("grafana_annotation.test_with_dashboard_uid", &annotation),
					resource.TestCheckResourceAttr("grafana_annotation.test_with_dashboard_uid", "text", testAccAnnotationUpdatedText),

					// Check that the annotation is in the correct organization
					resource.TestMatchResourceAttr("grafana_annotation.test_with_dashboard_uid", "id", nonDefaultOrgIDRegexp),
					orgCheckExists.exists("grafana_organization.test", &org),
					checkResourceIsInOrg("grafana_annotation.test_with_dashboard_uid", "grafana_organization.test"),
				),
			},
			{
				// Importing matches the state of the previous step.
				ResourceName:      "grafana_annotation.test_with_dashboard_uid",
				ImportState:       true,
				ImportStateVerify: true,
			},
		},
	})
}

func testAnnotationConfig(text string) string {
	return fmt.Sprintf(`
	resource "grafana_annotation" "test" {
		text = "%s"
	}`, text)
}

func testAnnotationConfigInOrg(orgName, text string) string {
	return fmt.Sprintf(`
resource "grafana_organization" "test" {
    name = "%[1]s"
}

resource "grafana_annotation" "test" {
    org_id = grafana_organization.test.id
    text = "%s"
}
`, orgName, text)
}

func testAnnotationConfigInOrgWithDashboardUID(orgName, text string) string {
	return fmt.Sprintf(`
resource "grafana_organization" "test" {
	  name = "%[1]s"
}

resource "grafana_dashboard" "test_with_dashboard_uid" {
    org_id = grafana_organization.test.id
    config_json = <<EOD
{
  "title": "%[2]s"
}
EOD
}

resource "grafana_annotation" "test_with_dashboard_uid" {
    org_id = grafana_organization.test.id
    text         = "%[2]s"
    dashboard_uid = graf


#include <fuchsia/accessibility/semantics/cpp/fidl.h>
#include <fuchsia/buildinfo/cpp/fidl.h>
#include <fuchsia/component/cpp/fidl.h>
#include <fuchsia/fonts/cpp/fidl.h>
#include <fuchsia/input/report/cpp/fidl.h>
#include <fuchsia/kernel/cpp/fidl.h>
#include <fuchsia/logger/cpp/fidl.h>
#include <fuchsia/memorypressure/cpp/fidl.h>
#include <fuchsia/metrics/cpp/fidl.h>
#include <fuchsia/net/interfaces/cpp/fidl.h>
#include <fuchsia/sys/cpp/fidl.h>
#include <fuchsia/tracing/provider/cpp/fidl.h>
#include <fuchsia/ui/app/cpp/fidl.h>
#include <fuchsia/ui/input/cpp/fidl.h>
#include <fuchsia/ui/scenic/cpp/fidl.h>
#include <fuchsia/ui/test/input/cpp/fidl.h>
#include <fuchsia/web/cpp/fidl.h>
#include <lib/async/cpp/task.h>
#include <lib/fidl/cpp/binding_set.h>
#include <lib/sys/component/cpp/testing/realm_builder.h>
#include <lib/sys/component/cpp/testing/realm_builder_types.h>
#include <zircon/status.h>
#include <zircon/types.h>
#include <zircon/utc.h>

#include <cstddef>
#include <cstdint>
#include <iostream>
#include <memory>
#include <optional>
#include <queue>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>

#include <gtest/gtest.h>

#include "flutter/fml/logging.h"
#include "flutter/shell/platform/fuchsia/flutter/tests/integration/utils/portable_ui_test.h"
#include "lib/fidl/cpp/interface_ptr.h"

namespace mouse_input_test::testing {
namespace {
// Types imported for the realm_builder library.
using component_testing::ChildRef;
using component_testing::ConfigValue;
using component_testing::LocalComponentImpl;
using component_testing::ParentRef;
using component_testing::Protocol;
using component_testing::Realm;
using component_testing::Route;

using fuchsia_test_utils::PortableUITest;
using RealmBuilder = component_testing::RealmBuilder;

// Alias for Component child name as provided to Realm Builder.
using ChildName = std::string;

// Alias for Component Legacy URL as provided to Realm Builder.
using LegacyUrl = std::string;

// Maximum pointer movement during a clickpad press for the gesture to
// be guaranteed to be interpreted as a click. For movement greater than
// this value, upper layers may, e.g., interpret the gesture as a drag.
//
// This value corresponds to the one used to instantiate the ClickDragHandler
// registered by Input Pipeline in Scene Manager.
constexpr int64_t kClickToDragThreshold = 16.0;

constexpr auto kMouseInputListener = "mouse_input_listener";
constexpr auto kMouseInputListenerRef = ChildRef{kMouseInputListener};
constexpr auto kMouseInputView = "mouse-input-view";
constexpr auto kMouseInputViewRef = ChildRef{kMouseInputView};
constexpr auto kMouseInputViewUrl =
    "fuchsia-pkg://fuchsia.com/mouse-input-view#meta/mouse-input-view.cm";

struct Position {
  double x = 0.0;
  double y = 0.0;
};

// Combines all vectors in `vecs` into one.
template <typename T>
std::vector<T> merge(std::initializer_list<std::vector<T>> vecs) {
  std::vector<T> result;
  for (


"],[210,"O - grave"],[211,"O - acute"],[212,"O - circumflex"],[213,"O - tilde"],[214,"O - diaeresis"],[216,"O - slash"],[332,"O - macron"],[338,"ligature OE"],[352,"S - caron"],[217,"U - grave"],[218,"U - acute"],[219,"U - circumflex"],[220,"U - diaeresis"],[362,"U - macron"],[221,"Y - acute"],[376,"Y - diaeresis"],[562,"Y - macron"],[222,"THORN"],[224,"a - grave"],[225,"a - acute"],[226,"a - circumflex"],[227,"a - tilde"],[228,"a - diaeresis"],[229,"a - ring above"],[257,"a - macron"],[230,"ligature ae"],[231,"c - cedilla"],[232,"e - grave"],[233,"e - acute"],[234,"e - circumflex"],[235,"e - diaeresis"],[275,"e - macron"],[236,"i - grave"],[237,"i - acute"],[238,"i - circumflex"],[239,"i - diaeresis"],[299,"i - macron"],[240,"eth"],[241,"n - tilde"],[242,"o - grave"],[243,"o - acute"],[244,"o - circumflex"],[245,"o - tilde"],[246,"o - diaeresis"],[248,"o slash"],[333,"o macron"],[339,"ligature oe"],[353,"s - caron"],[249,"u - grave"],[250,"u - acute"],[251,"u - circumflex"],[252,"u - diaeresis"],[363,"u - macron"],[253,"y - acute"],[254,"thorn"],[255,"y - diaeresis"],[563,"y - macron"],[913,"Alpha"],[914,"Beta"],[915,"Gamma"],[916,"Delta"],[917,"Epsilon"],[918,"Zeta"],[919,"Eta"],[920,"Theta"],[921,"Iota"],[922,"Kappa"],[923,"Lambda"],[924,"Mu"],[925,"Nu"],[926,"Xi"],[927,"Omicron"],[928,"Pi"],[929,"Rho"],[931,"Sigma"],[932,"Tau"],[933,"Upsilon"],[934,"Phi"],[935,"Chi"],[936,"Psi"],[937,"Omega"],[945,"alpha"],[946,"beta"],[947,"gamma"],[948,"delta"],[949,"epsilon"],[950,"zeta"],[951,"eta"],[952,"theta"],[953,"iota"],[954,"kappa"],[955,"lambda"],[956,"mu"],[957,"nu"],[958,"xi"],[959,"omicron"],[960,"pi"],[961,"rho"],[962,"final sigma"],[963,"sigma"],[964,"tau"],[965,"upsilon"],[966,"phi"],[967,"chi"],[968,"psi"],[969,"omega"]]},{name:"Symbols",characters:[[8501,"alef symbol"],[982,"pi symbol"],[8476,"real part symbol"],[978,"upsilon - hook symbol"],[8472,"Weierstrass p"],[8465,"imaginary part"]]},{name:"Arrows",characters:[[8592,"leftwards arrow"],[8593,"upwards arrow"],[8594,"rightwards arrow"],[8595,"downwards arrow"],[8596,"left right arrow"],[8629,"carriage return"],[8656,"leftwards double arrow"],[8657,"upwards double arrow"],[8658,"rightwards double arrow"],[8659,"downwards double arrow"],[8660,"left right double arrow"],[8756,"therefore"],[8834,"subset of"],[8835,"superset of"],[8836,"not a subset of"],[8838,"subset of or equal to"],[8839,"


 void testFallthroughConflictUseForAllPickMy() throws Exception {

		setupFallthroughConflictUseForAll();

		executeMerge(ASK_USER);

		chooseCodeUnit("0x01002f49", "0x01002f4a", KEEP_MY, true); // Fallthrough is now a code unit diff.
//		chooseCodeUnit("0x01003059", "0x0100305a", KEEP_MY); // 0x01003059 Handled by Use For All.
		chooseReference("0x01002f5d", 1, KEEP_LATEST, false); // 01002f5d
		waitForMergeCompletion();

		ReferenceManager refMgr = resultProgram.getReferenceManager();
		Reference[] refs;
		refs = refMgr.getReferencesFrom(addr("0x01002f49"), -1);
		assertEquals(1, refs.length);
		assertEquals(addr("0x01002f5d"), refs[0].getToAddress());
		assertEquals(RefType.FALL_THROUGH, refs[0].getReferenceType());
		assertTrue(refs[0].isPrimary());

		refs = refMgr.getReferencesFrom(addr("0x01002f5d"), 1);
		assertEquals(2, refs.length);
		assertEquals(addr("0x10024ce"), refs[0].getToAddress());
		assertEquals(addr("0x1002517"), refs[1].getToAddress());
		assertEquals(RefType.DATA, refs[0].getReferenceType());
		assertTrue(refs[0].isPrimary());

		Listing listing = resultProgram.getListing();
		assertNull(listing.getInstructionAt(addr("0x01003059")).getFallThrough());
	}

	private void setupPrimaryConflictUseForAll() throws Exception {
		mtf.initialize("NotepadMergeListingTest", new ProgramModifierListener() {

			@Override
			public void modifyLatest(ProgramDB program) {
				Listing listing = program.getListing();
				ReferenceManager refMgr = program.getReferenceManager();
				refMgr.addMemoryReference(addr(program, "0x01002f49"),
					addr(program, "0x01002f55"), RefType.READ_WRITE, SourceType.USER_DEFINED,
					-1);
				refMgr.addMemoryReference(addr(program, "0x1002f5d"),
					addr(program, "0x10024ce"), RefType.DATA, SourceType.USER_DEFINED, 1);
				listing.getInstructionAt(addr(program, "0x01003059")).setFallThrough(
					addr(program, "0x01003060"));
			}

			@Override
			public void modifyPrivate(ProgramDB program) {
				Listing listing = program.getListing();
				ReferenceManager refMgr = program.getReferenceManager();
				refMgr.addMemoryReference(addr(program, "0x01002f49"),
					addr(program, "0x01002f5d"), RefType.READ, SourceType.USER_DEFINED, -1);
				refMgr.addMemoryReference(addr(program, "0x1002f5d"),
					addr(program, "0x1002517"), RefType.READ, SourceType.USER_DEFINED, 1);
				listing.getInstructionAt(addr(program, "0x01003059")).setFallThrough(null);
			}
		});
	}

@Test
    public void testPrimaryConflictDontUseForAllPickLatest() throws Exception {

		setupPrimaryConflictUseForAll();

		executeMerge(ASK_USER);

		chooseCodeUnit("0x01003059", "0x0100305a", KEEP_LATEST, false);
		chooseReference("0x01002f49", -1, KEEP_LATEST, true); // 0x01002f49
//		chooseReference("0x01002f5d", 1, KEEP_LATEST, false); // 0x01002f5d Handled by Use For All.
		waitForMergeCompletion();

		ReferenceManager refMgr = resultProgram.getReferenceManager();
		Reference[] ref


he checkpoint states are saved in a common filepath with `DeepspeedStrategy` ([#12887](https://github.com/Lightning-AI/lightning/pull/12887))
- Fixed `trainer.logger` deprecation message ([#12671](https://github.com/Lightning-AI/lightning/pull/12671))
- Fixed an issue where sharded grad scaler is passed in when using BF16 with the `ShardedStrategy` ([#12915](https://github.com/Lightning-AI/lightning/pull/12915))
- Fixed an issue wrt recursive invocation of DDP configuration in hpu parallel plugin ([#12912](https://github.com/Lightning-AI/lightning/pull/12912))
- Fixed printing of ragged dictionaries in `Trainer.validate` and `Trainer.test` ([#12857](https://github.com/Lightning-AI/lightning/pull/12857))
- Fixed threading support for legacy loading of checkpoints ([#12814](https://github.com/Lightning-AI/lightning/pull/12814))
- Fixed pickling of `KFoldLoop` ([#12441](https://github.com/Lightning-AI/lightning/pull/12441))
- Stopped `optimizer_zero_grad` from being called after IPU execution ([#12913](https://github.com/Lightning-AI/lightning/pull/12913))
- Fixed `fuse_modules` to be qat-aware for `torch>=1.11` ([#12891](https://github.com/Lightning-AI/lightning/pull/12891))
- Enforced eval shuffle warning only for default samplers in DataLoader ([#12653](https://github.com/Lightning-AI/lightning/pull/12653))
- Enable mixed precision in `DDPFullyShardedStrategy` when `precision=16` ([#12965](https://github.com/Lightning-AI/lightning/pull/12965))
- Fixed `TQDMProgressBar` reset and update to show correct time estimation (1/2) ([#12889](https://github.com/Lightning-AI/lightning/pull/12889))
- Fixed fit loop restart logic to enable resume using the checkpoint ([#12821](https://github.com/Lightning-AI/lightning/pull/12821))

## [1.6.2] - 2022-04-27

### Fixed

- Fixed `ImportError` when `torch.distributed` is not available. ([#12794](https://github.com/Lightning-AI/lightning/pull/12794))
- When using custom DataLoaders in LightningDataModule, multiple inheritance is resolved properly ([#12716](https://github.com/Lightning-AI/lightning/pull/12716))
- Fixed encoding issues on terminals that do not support unicode characters ([#12828](https://github.com/Lightning-AI/lightning/pull/12828))
- Fixed support for `ModelCheckpoint` monitors with dots ([#12783](https://github.com/Lightning-AI/lightning/pull/12783))

## [1.6.1] - 2022-04-13

### Changed

- Support `strategy` argument being case insensitive ([#12528](https://github.com/Lightning-AI/lightning/pull/12528))

### Fixed

- Run main progress bar updates independent of val progress bar updates in `TQDMProgressBar` ([#12563](https://github.com/Lightning-AI/lightning/pull/12563))
- Avoid calling `average_parameters` multiple times per optimizer step ([#12452](https://github.com/Lightning-AI/lightning/pull/12452))
- Properly pass some Logger's parent's arguments to `super().__init__()` ([#12609](https://github.com/Lightning-AI/lightning/pull/12609))
- Fixed an issue where incorrect type warnings appear when the overridden `LightningLite.run` method accepts user-defined arguments ([#12629](https://github.com/Lightning-AI/lightning/pull/12629))
- Fixed `rank_zero_only` decorator in LSF environments ([#12587](https://github.com/Lightning-AI/lightning/pull/12587))


intF point = matrix.map(convert(*it));
      painter->drawPoint(point);
    }
  }
}

// We let the bounding box only grow, so that when vertices get removed
// the maximal bbox gets refreshed in the GraphicsView
template <typename P>
void
PolygonWithHolesGraphicsItem<P>::updateBoundingBox()
{
  Converter<Traits> convert;
  prepareGeometryChange();
  if(poly->outer_boundary().size() == 0){
    return;
  }
  bounding_rect = convert(poly->outer_boundary().bbox());
}

template <typename P>
void
PolygonWithHolesGraphicsItem<P>::modelChanged()
{
  if((poly->outer_boundary().size() == 0) ){
    this->hide();
  } else if((poly->outer_boundary().size() > 0) && (! this->isVisible())){
    this->show();
  }
  updateBoundingBox();
  update();
}

} // namespace Qt
} // namespace CGAL

#endif // CGAL_QT_POLYGON_WITH_HOLES_GRAPHICS_ITEM_H


 */
static const struct v4l2_ctrl_config vimc_sen_ctrl_class = {
	.flags = V4L2_CTRL_FLAG_READ_ONLY | V4L2_CTRL_FLAG_WRITE_ONLY,
	.id = VIMC_CID_VIMC_CLASS,
	.name = "VIMC Controls",
	.type = V4L2_CTRL_TYPE_CTRL_CLASS,
};

static const struct v4l2_ctrl_config vimc_sen_ctrl_test_pattern = {
	.ops = &vimc_sen_ctrl_ops,
	.id = VIMC_CID_TEST_PATTERN,
	.name = "Test Pattern",
	.type = V4L2_CTRL_TYPE_MENU,
	.max = TPG_PAT_NOISE,
	.qmenu = tpg_pattern_strings,
};

static const char * const vimc_ctrl_osd_mode_strings[] = {
	"All",
	"Counters Only",
	"None",
	NULL,
};

static const struct v4l2_ctrl_config vimc_sen_ctrl_osd_mode = {
	.ops = &vimc_sen_ctrl_ops,
	.id = VIMC_CID_OSD_TEXT_MODE,
	.name = "Show Information",
	.type = V4L2_CTRL_TYPE_MENU,
	.max = ARRAY_SIZE(vimc_ctrl_osd_mode_strings) - 2,
	.qmenu = vimc_ctrl_osd_mode_strings,
};

static struct vimc_ent_device *vimc_sen_add(struct vimc_device *vimc,
					    const char *vcfg_name)
{
	struct v4l2_device *v4l2_dev = &vimc->v4l2_dev;
	struct vimc_sen_device *vsen;
	int ret;

	/* Allocate the vsen struct */
	vsen = kzalloc(sizeof(*vsen), GFP_KERNEL);
	if (!vsen)
		return ERR_PTR(-ENOMEM);

	v4l2_ctrl_handler_init(&vsen->hdl, 4);

	v4l2_ctrl_new_custom(&vsen->hdl, &vimc_sen_ctrl_class, NULL);
	v4l2_ctrl_new_custom(&vsen->hdl, &vimc_sen_ctrl_test_pattern, NULL);
	v4l2_ctrl_new_custom(&vsen->hdl, &vimc_sen_ctrl_osd_mode, NULL);
	v4l2_ctrl_new_std(&vsen->hdl, &vimc_sen_ctrl_ops,
			  V4L2_CID_VFLIP, 0, 1, 1, 0);
	v4l2_ctrl_new_std(&vsen->hdl, &vimc_sen_ctrl_ops,
			  V4L2_CID_HFLIP, 0, 1, 1, 0);
	v4l2_ctrl_new_std(&vsen->hdl, &vimc_sen_ctrl_ops,
			  V4L2_CID_BRIGHTNESS, 0, 255, 1, 128);
	v4l2_ctrl_new_std(&vsen->hdl, &vimc_sen_ctrl_ops,
			  V4L2_CID_CONTRAST, 0, 255, 1, 128);
	v4l2_ctrl_new_std(&vsen->hdl, &vimc_sen_ctrl_ops,
			  V4L2_CID_HUE, -128, 127, 1, 0);
	v4l2_ctrl_new_std(&vsen->hdl, &vimc_sen_ctrl_ops,
			  V4L2_CID_SATURATION, 0, 255, 1, 128);
	vsen->sd.ctrl_handler = &vsen->hdl;
	if (vsen->hdl.error) {
		ret = vsen->hdl.error;
		goto err_free_vsen;
	}

	/* Initialize the test pattern generator */
	tpg_init(&vsen->tpg, vsen->mbus_format.width,
		 vsen->mbus_format.height);
	ret = tpg_alloc(&vsen->tpg, VIMC_FRAME_MAX_WIDTH);
	if (ret)
		goto err_free_hdl;

	/* Initialize ved and sd */
	vsen->pad.flags = MEDIA_PAD_FL_SOURCE;
	ret = vimc_ent_sd_register(&vsen->ved, &vsen->sd, v4l2_dev,
				   vcfg_name,
				   MEDIA_ENT_F_CAM_SENSOR, 1, &vsen->pad,
				   &vimc_sen_ops);
	if (ret)
		goto err_free_tpg;

	vsen->ved.process_frame = vimc_sen_process_frame;
	vsen->ved.dev = vimc->mdev.dev;

	/* Initialize the frame format */
	vsen->mbus_format = fmt_default;

	return &vsen->ved;

err_free_tpg:
	tpg_free(&vsen->tpg);
err_free_hdl:
	v4l2_ctrl_handler_free(&vsen->hdl);
err_free_vsen:
	kfree(vsen);

	return ERR_PTR(ret);
}

struct vimc_ent_type vimc_sen_type = {
	.add = vimc_sen_add,
	.release = vimc_sen_release
};


#ifndef __TOPOLOGY_COMPARISON_H__
#define __TOPOLOGY_COMPARISON_H__

#include <vector>

namespace GuidancePlanner
{
  class Environment;
  class GeometricPath;

  class HomotopyComparison
  {

  public:
    virtual bool AreEquivalent(const GeometricPath &a, const GeometricPath &b, Environment &environment, bool compute_all = false) = 0;
    virtual std::vector<bool> LeftPassingVector(const GeometricPath &path, Environment &environment)
    {
      (void)path;
      (void)environment;
      return std::vector<bool>({});
    };

    virtual void Visualize(Environment &environment) { (void)environment; };
    virtual void Clear() {};
  };

  /** @brief To disable topology comparison, you can use this topology comparison instead */
  class NoHomotopyComparison : public HomotopyComparison
  {
    // There are no equivalences
    bool AreEquivalent(const GeometricPath &a, const GeometricPath &b, Environment &environment, bool compute_all = false) override
    {
      (void)a;
      (void)b;
      (void)environment;
      (void)compute_all;
      return false;
    }
  };
} // namespace Homotopy

#endif // __TOPOLOGY_COMPARISON_H__


ic int	hashexpire = -1;
static int	spantree = -1;
static int	ipaddr[4] = { -1 };
static int	iptrap[4] = { -1 };
static __u32	ipxnet = -1;
static int	nicmode = -1;

MODULE_PARM(debug, "i");
MODULE_PARM(dma, "i");
MODULE_PARM(hashexpire, "i");
MODULE_PARM(spantree, "i");
MODULE_PARM(ipaddr, "1-4i");
MODULE_PARM(iptrap, "1-4i");
MODULE_PARM(ipxnet, "i");
MODULE_PARM(nicmode, "i");
MODULE_PARM_DESC(debug, "Digi RightSwitch enable debugging (0-1)");
MODULE_PARM_DESC(dma, "Digi RightSwitch enable BM DMA (0-1)");
MODULE_PARM_DESC(nicmode, "Digi RightSwitch operating mode (1: switch, 2: multi-NIC)");

static int __init dgrs_init_module (void)
{
	int	cards_found;
	int	i;

	/*
	 *	Command line variable overrides
	 *		debug=NNN
	 *		dma=0/1
	 *		spantree=0/1
	 *		hashexpire=NNN
	 *		ipaddr=A,B,C,D
	 *		iptrap=A,B,C,D
	 *		ipxnet=NNN
	 *		nicmode=NNN
	 */
	if (debug >= 0)
		dgrs_debug = debug;
	if (dma >= 0)
		dgrs_dma = dma;
	if (nicmode >= 0)
		dgrs_nicmode = nicmode;
	if (hashexpire >= 0)
		dgrs_hashexpire = hashexpire;
	if (spantree >= 0)
		dgrs_spantree = spantree;
	if (ipaddr[0] != -1)
		for (i = 0; i < 4; ++i)
			dgrs_ipaddr[i] = ipaddr[i];
	if (iptrap[0] != -1)
		for (i = 0; i < 4; ++i)
			dgrs_iptrap[i] = iptrap[i];
	if (ipxnet != -1)
		dgrs_ipxnet = htonl( ipxnet );

	if (dgrs_debug)
	{
		printk(KERN_INFO "dgrs: SW=%s FW=Build %d %s\nFW Version=%s\n",
		       version, dgrs_firmnum, dgrs_firmdate, dgrs_firmver);
	}

	/*
	 *	Find and configure all the cards
	 */
	dgrs_root_dev = NULL;
	cards_found = dgrs_scan();

	return cards_found ? 0 : -ENODEV;
}

static void __exit dgrs_cleanup_module (void)
{
        while (dgrs_root_dev)
	{
		struct net_device	*next_dev;
		DGRS_PRIV	*priv;

		priv = (DGRS_PRIV *) dgrs_root_dev->priv;
                next_dev = priv->next_dev;
                unregister_netdev(dgrs_root_dev);

		proc_reset(priv->devtbl[0], 1);

		if (priv->vmem)
			iounmap(priv->vmem);
		if (priv->vplxdma)
			iounmap((uchar *) priv->vplxdma);

		release_region(dgrs_root_dev->base_addr, 256);

		if (dgrs_root_dev->irq)
			free_irq(dgrs_root_dev->irq, dgrs_root_dev);

                kfree(dgrs_root_dev);
                dgrs_root_dev = next_dev;
        }
}

module_init(dgrs_init_module);
module_exit(dgrs_cleanup_module);


duun|r.
    .turnin 9283 >>Turn in Rescue the Survivors!
	.target Zalduun
step
    .xp >10,1
    #completewith next
    #label Spare Parts
    >>|Tinterface/worldmap/chatbubble_64grey.blp:20|tTalk to |cRXP_FRIENDLY_Technician Zhanaa|r and |cRXP_FRIENDLY_Vindicator Aldar|r.
    .accept 37445 >>Accept Spare Parts
    .accept 37444 >>Accept Inoculation
	.target Technician Zhanaa
    .target Vindicator Aldar
step
    .xp >10,1
    #completewith Spare Parts
    .goto 468,50.55,47.41,20 >>Leave the House
step
    .xp >10,1
    #requires Spare Parts
    >>|Tinterface/worldmap/chatbubble_64grey.blp:20|tTalk to |cRXP_FRIENDLY_Technician Zhanaa|r and |cRXP_FRIENDLY_Vindicator Aldar|r.
    .accept 37445 >>Accept Spare Parts
    .goto 468,50.52,47.93
    .accept 37444 >>Accept Inoculation
    .goto 468,50.65,48.76
	.target Technician Zhanaa
    .target Vindicator Aldar
step <<!Hunter
    .xp >10,1
    #completewith next
    #label Emitter Spare Part
    >>|TInterface/cursor/crosshair/interact.blp:20|tClick on |cRXP_PICK_Spare Parts|r.
    .complete 37445,1 --4/4 Emitter Spare Part
step <<Hunter
    .xp >10,1
    #completewith next
    #hidewindow
    #label Emitter Spare Part
    >>|TInterface/cursor/crosshair/interact.blp:20|tClick on |cRXP_PICK_Spare Parts|r.
    .complete 37445,1 --4/4 Emitter Spare Part
step <<!Hunter
    .xp >10,1
    #completewith Emitter Spare Part
    #title |cFFFCDC00Follow the Arrow|r
    .goto 468,53.63,53.97,10,0
    .goto 468,54.58,54.58,5,0
    .goto 468,54.98,55.51,10,0
    .goto 468,55.27,57.62,20 >>Jump onto the white stone by the waterfall, then jump down to the ground.
step <<Hunter
    .xp >10,1
    #completewith Emitter Spare Part
    #title |cFFFCDC00Follow the Arrow|r
    .goto 468,53.68,51.21,10,0
    .goto 468,55.81,53.12,10 >>Use |T132294:0|t[Disengage] to leap across the Water.
step <<Hunter
    #requires Emitter Spare Part
    .xp >10,1
    #completewith next
    #label Emitter Spare Part2
    >>|TInterface/cursor/crosshair/interact.blp:20|tClick on |cRXP_PICK_Spare Parts|r.
    .complete 37445,1 --4/4 Emitter Spare Part
step <<Hunter
    #requires Emitter Spare Part
    #completewith Emitter Spare Part2
    .goto 468,56.53,53.88
    .cast 1515 >>Cast |T132164:0|t[Tame Beast


kiaImageRepresentation::ScopedWriteAccess> m_scopedSkiaWriteAccess;
        std::unique_ptr<gpu::SkiaImageRepresentation::ScopedReadAccess> m_scopedSkiaReadAccess;
        std::unique_ptr<gpu::OverlayImageRepresentation> m_overlayRepresentation;
        std::unique_ptr<gpu::OverlayImageRepresentation::ScopedReadAccess>
                m_scopedOverlayReadAccess;
        std::vector<GrBackendSemaphore> m_endSemaphores;
        int m_presentCount = 0;

        mutable QMutex m_skImageMutex;
        sk_sp<SkImage> m_cachedSkImage;
    };

protected:
    scoped_refptr<gpu::SharedContextState> m_contextState;
    std::unique_ptr<Buffer> m_frontBuffer;
    bool m_readyWithTexture = false;
    bool m_isNativeBufferSupported = true;

private:
    friend class NativeSkiaOutputDevice::Buffer;

    void SwapBuffersFinished();

    bool m_requiresAlpha;
    gpu::SharedImageFactory *const m_factory;
    gpu::SharedImageRepresentationFactory *const m_representationFactory;
    viz::SkiaOutputSurfaceDependency *const m_deps;
    mutable QMutex m_mutex;
    Shape m_shape;
    std::unique_ptr<Buffer> m_middleBuffer;
    std::unique_ptr<Buffer> m_backBuffer;
    viz::OutputSurfaceFrame m_frame;
    bool m_readyToUpdate = false;
    scoped_refptr<base::SingleThreadTaskRunner> m_gpuTaskRunner;
};

} // namespace QtWebEngineCore

#endif // !NATIVE_SKIA_OUTPUT_DEVICE_H


from(r#"{"library":"hyper"}"#))
        .ok()
        .unwrap();

    println!("{:?}", request);
    let resp = client.request(request).await;
    let resp_ref = resp.as_ref();
    let err = resp_ref.err();
    println!("{:?}", err);
    assert_eq!(false, resp_ref.is_err());

    started_latch.wait();
    println!("REQ",);

    let request_params_len =
        Option::<i64>::from(actor.get_global("request_params_len").ok().unwrap());
    let headers_len = Option::<i64>::from(actor.get_global("headers_len").ok().unwrap());
    let uri = actor.get_global("uri").ok().unwrap();
    let request_body = actor.get_global("request_body").ok().unwrap();
    println!(
        "request_params_len={:?}, headers_len={:?}, uri={:?}, request_body={:?}",
        request_params_len, headers_len, uri, request_body,
    );
    assert_ne!(Some(0), request_params_len);
    assert_ne!(Some(0), headers_len);
    assert_ne!(Some("".to_string()), Option::<String>::from(uri));
    assert_ne!(Some("".to_string()), Option::<String>::from(request_body));

    hyper_latch.mark_done();
    // hyper_latch.countdown();

    println!("OK");
}
<reponame>coolofficials/rv6
#![allow(clippy::unit_arg)]

use core::{
    cell::UnsafeCell,
    mem::{self, MaybeUninit},
    ops::Deref,
    pin::Pin,
    ptr, str,
    sync::atomic::{AtomicBool, AtomicI32, Ordering},
};

use array_macro::array;
use pin_project::pin_project;

use crate::{
    file::RcFile,
    fs::RcInode,
    kernel::{kernel, kernel_builder, KernelBuilder},
    lock::{
        pop_off, push_off, Guard, RawLock, Spinlock, SpinlockProtected, SpinlockProtectedGuard,
    },
    memlayout::kstack,
    page::Page,
    param::{MAXPROCNAME, NOFILE, NPROC, ROOTDEV},
    println,
    riscv::{intr_get, intr_on, r_tp, PGSIZE},
    trap::usertrapret,
    vm::{Addr, UVAddr, UserMemory},
};

extern "C" {
    // swtch.S
    fn swtch(_: *mut Context, _: *mut Context);

    // trampoline.S
    static mut trampoline: [u8; 0];
}

/// Saved registers for kernel context switches.
#[derive(Copy, Clone, Default)]
#[repr(C)]
pub struct Context {
    pub ra: usize,
    pub sp: usize,

    /// Callee-saved
    pub s0: usize,
    pub s1: usize,
    pub s2: usize,
    pub s3: usize,
    pub s4: usize,
    pub s5: usize,
    pub s6: usize,
    pub s7: usize,
    pub s8: usize,
    pub s9: usize,
    pub s10: usize,
    pub s11: usize,
}

/// Per-CPU-state.
#[derive(Copy, Clone)]
pub struct Cpu {
    /// The process running on this cpu, or null.
    proc: *const Proc,

    /// swtch() here to enter scheduler().
    context: Context,

    /// Depth of push_off() nesting.
    pub noff: i32,

    /// Were interrupts enabled before push_off()?
    pub interrupt_enabled: bool,
}

/// Per-process data for the trap handling code in trampoline.S.
/// Sits in a page by itself just under the trampoline page in the
/// user page table. Not specially mapped


ineVideo createEmptyInstance() => create();
  static $pb.PbList<EpInlineVideo> createRepeated() =>
      $pb.PbList<EpInlineVideo>();
  @$core.pragma('dart2js:noInline')
  static EpInlineVideo getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<EpInlineVideo>(create);
  static EpInlineVideo? _defaultInstance;

  @$pb.TagNumber(1)
  $fixnum.Int64 get materialNo => $_getI64(0);
  @$pb.TagNumber(1)
  set materialNo($fixnum.Int64 value) => $_setInt64(0, value);
  @$pb.TagNumber(1)
  $core.bool hasMaterialNo() => $_has(0);
  @$pb.TagNumber(1)
  void clearMaterialNo() => $_clearField(1);

  @$pb.TagNumber(2)
  $fixnum.Int64 get aid => $_getI64(1);
  @$pb.TagNumber(2)
  set aid($fixnum.Int64 value) => $_setInt64(1, value);
  @$pb.TagNumber(2)
  $core.bool hasAid() => $_has(1);
  @$pb.TagNumber(2)
  void clearAid() => $_clearField(2);

  @$pb.TagNumber(3)
  $fixnum.Int64 get cid => $_getI64(2);
  @$pb.TagNumber(3)
  set cid($fixnum.Int64 value) => $_setInt64(2, value);
  @$pb.TagNumber(3)
  $core.bool hasCid() => $_has(2);
  @$pb.TagNumber(3)
  void clearCid() => $_clearField(3);
}

class EpInlineVideoInfo extends $pb.GeneratedMessage {
  factory EpInlineVideoInfo({
    $core.Iterable<EpInlineVideo>? epInlineVideo,
  }) {
    final result = create();
    if (epInlineVideo != null) result.epInlineVideo.addAll(epInlineVideo);
    return result;
  }

  EpInlineVideoInfo._();

  factory EpInlineVideoInfo.fromBuffer($core.List<$core.int> data,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(data, registry);
  factory EpInlineVideoInfo.fromJson($core.String json,
          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(json, registry);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'EpInlineVideoInfo',
      package: const $pb.PackageName(
          _omitMessageNames ? '' : 'bilibili.playershared'),
      createEmptyInstance: create)
    ..pPM<EpInlineVideo>(1, _omitFieldNames ? '' : 'epInlineVideo',
        subBuilder: EpInlineVideo.create)
    ..hasRequiredFields = false;

  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  EpInlineVideoInfo clone() => deepCopy();
  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
  EpInlineVideoInfo copyWith(void Function(EpInlineVideoInfo) updates) =>
      super.copyWith((message) => updates(message as EpInlineVideoInfo))
          as EpInlineVideoInfo;

  @$core.override
  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static EpInlineVideoInfo create() => EpInlineVideoInfo._();
  @$core.override
  EpInlineVideoInfo createEmptyInstance() => create();
  static $pb.PbList<EpInlineVideoInfo> createRepeated() =>
      $pb.PbList<EpInlineVideoInfo>();
  @$core.pragma('


skin-1 .sidebar-collapse:before{border-color:#3f4e54}.skin-1 .sidebar-collapse>[class*="icon-"]{background-color:#222a2d}.skin-1 .sidebar-shortcuts,.skin-1 .sidebar-shortcuts-mini{background-color:#141a1b;border-color:#3f4e54}.skin-1 .sidebar>.nav-search{background-color:#141a1b;border-color:#3f4e54}.skin-1 .menu-min .sidebar-shortcuts-large{background-color:#141a1b;box-shadow:none;border:0;top:0}.skin-1 .breadcrumbs{border:0;background-color:#f0f0f0}@media only screen and (max-width:991px){.skin-1 .sidebar{border:0;box-shadow:none}.skin-1 .nav-list li.active>a:after{display:none}.skin-1 .menu-min .nav-list>li.active.open>a:after{display:none}.skin-1 .menu-min .nav-list>li.active:hover>a:after{display:block}}.skin-1 .nav-list>li>.submenu>li>.submenu a{border-top-color:#7b858c}.skin-1 .nav-list>li.active>.submenu>li>.submenu a{border-top-color:#545b60}.skin-1 .nav-list>li .submenu li>.submenu>li a{color:#d1dae1;font-size:13px}.skin-1 .nav-list>li .submenu li>.submenu>li a>[class*="icon-"]:first-child{color:inherit}.skin-1 .nav-list>li .submenu li>.submenu>li a:hover{color:#8ab4de;text-decoration:none}.skin-1 .nav-list>li .submenu li>.submenu>li a:hover>[class*="icon-"]:first-child{color:#55a0dc}.skin-1 .nav-list>li .submenu li.open>a,.skin-1 .nav-list>li .submenu li>.submenu>li.open>a{color:#85c0ec}.skin-1 .nav-list>li .submenu li.open>a>[class*="icon-"]:first-child,.skin-1 .nav-list>li .submenu li>.submenu>li.open>a>[class*="icon-"]:first-child{color:inherit}.skin-1 .nav-list>li .submenu li>.submenu li.active>a{color:#61a8dd}.skin-1 .nav-list>li .submenu li>.submenu li.active>a>[class*="icon-"]:first-child{color:inherit}.skin-1 .nav-list>li .submenu li>.submenu li.active>a:hover{color:#85c0ec}.skin-1 .nav-list>li .submenu li>a>.arrow{color:#BBB}.skin-1 .nav-list>li>.submenu>li.open>a>.arrow,.skin-1 .nav-list>li>.submenu>li>a:hover>.arrow,.skin-1 .nav-list>li>.submenu>li>.submenu>li.open>a>.arrow,.skin-1 .nav-list>li>.submenu>li>.submenu>li>a:hover>.arrow{color:inherit}.skin-2{background-color:#5c5c5c}.skin-2 .navbar{background:#c6487e}.skin-2 .sidebar,.skin-2 .sidebar:before{background-color:#505050;border-right:0}.skin-2 .nav-list>li{border-color:#444;border-top-width:0}.skin-2 .nav-list>li:last-child{border-bottom-width:0}.skin-2 .nav-list>li>a,.skin-2 .menu-min .nav-list>li.open>a,.skin-2 .nav-list .open>a,.skin-2 .nav-list .open>a:hover,.s


ild){margin-right:4px}@media screen and (max-width:419px){.toolbox-3ulPxfe->:not(:last-child){margin-right:8px}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.feature-no-touch .item-2xPVYue0:hover .toolbox-3ulPxfe-.showOnHover-1q6ySzZc{opacity:1}}.popupWidget-2X0DYakn{display:flex;padding:12px 14px}@media only screen and (min-width:420px){.popupWidget-2X0DYakn{max-width:296px}}.popupWidget-2X0DYakn:not(:last-child){border-bottom:1px solid #f0f3fa}html.theme-dark .popupWidget-2X0DYakn:not(:last-child){border-bottom:1px solid #2a2e39}.popupWidget-2X0DYakn .desc-btEANXbj{display:flex;flex-direction:column}.popupWidget-2X0DYakn .icon-2jQlAvgr{flex:0 0 auto;margin:2px 0 2px 6px;overflow:hidden}.popupWidget-2X0DYakn .icon-2jQlAvgr.medium-Fe1be2K2{width:18px;height:18px;border-radius:9px}.popupWidget-2X0DYakn .icon-2jQlAvgr.large-2BZlk4pO{width:22px;height:22px;border-radius:11px}.popupWidget-2X0DYakn .title-1Yt34zFi{font-weight:700}.popupWidget-2X0DYakn .title-1Yt34zFi.medium-Fe1be2K2{font-size:16px;line-height:22px;margin-bottom:4px}.popupWidget-2X0DYakn .title-1Yt34zFi.large-2BZlk4pO{font-size:18px;line-height:26px;margin-bottom:2px}.popupWidget-2X0DYakn .text-Md3DtcCM.medium-Fe1be2K2{font-size:14px;line-height:21px}.popupWidget-2X0DYakn .text-Md3DtcCM.large-2BZlk4pO{font-size:16px;line-height:25px}.popupWidget-2X0DYakn .action-6Ezy2_v3{color:#2196f3;margin-top:8px;cursor:pointer}.popupWidget-2X0DYakn .action-6Ezy2_v3.medium-Fe1be2K2{font-size:14px;line-height:21px}.popupWidget-2X0DYakn .action-6Ezy2_v3.large-2BZlk4pO{font-size:16px;line-height:25px}.tv-dialog__section{padding:30px;border-bottom:1px solid;border-bottom-color:#dadde0}html.theme-dark .tv-dialog__section{border-bottom-color:#363c4e}.tv-dialog__section--last,.tv-dialog__section--no-border,.tv-dialog__section:last-child{border-bottom:none!important}@media screen and (max-width:767px){.tv-dialog__section{padding:20px}}.tv-dialog__section--no-padding_bottom{padding-bottom:0}.tv-dialog__section--actions{display:inline-block;box-sizing:border-box;white-space:nowrap;width:100%;padding-bottom:40px;text-align:right}.tv-dialog__section--actions_with-help:after{clear:both;display:table;content:""}.tv-dialog__section--actions_with-border{border-top:1px solid;border-top-color:#dadde0;padding-