ventHandler(
      WebSocket socket, String event, void Function(dynamic) handler) {
    final socketHandlers = _socketEventHandlers[socket];
    if (socketHandlers != null) {
      socketHandlers[event] = handler;
    }
  }
}

extension WebSocketUtils on WebSocket {
  void sendJson(Map<String, dynamic> data) {
    add(jsonEncode(data));
  }

  // Método emit para enviar dados para o socket específico
  void emit(String event, dynamic data) {
    final message = jsonEncode({
      'event': event,
      'data': data,
    });
    add(message);
  }

  // Método on para escutar eventos específicos
  void on(String event, void Function(dynamic data) handler) {
    final server = WebSocketBroadcast._getServerForSocket(this);
    if (server != null) {
      server._registerSocketEventHandler(this, event, handler);
    }
  }

  // Método destroy para fechar a conexão
  void destroy() {
    close();
  }
}

extension WebSocketBroadcastExtension on WebSocket {
  // Extensão para broadcast que precisa de acesso ao servidor
  WebSocketBroadcast get broadcast => WebSocketBroadcast(this);
}

class WebSocketBroadcast {
  final WebSocket _socket;
  static final Map<WebSocket, WebSocketServer> _socketServerMap = {};

  WebSocketBroadcast(this._socket);

  static void setServer(WebSocketServer server, WebSocket socket) {
    _socketServerMap[socket] = server;
  }

  static WebSocketServer? _getServerForSocket(WebSocket socket) {
    return _socketServerMap[socket];
  }

  void emit(String event, dynamic data) {
    final server = _socketServerMap[_socket];
    if (server != null) {
      final message = jsonEncode({
        'event': event,
        'data': data,
      });

      // Broadcast para todos os outros clientes (exceto o atual)
      for (final socket in server.getClients()) {
        if (socket != _socket && socket.readyState == WebSocket.open) {
          socket.add(message);
        }
      }
    }
  }

  void send(dynamic data) {
    final server = _socketServerMap[_socket];
    if (server != null) {
      // Broadcast para todos os outros clientes (exceto o atual)
      for (final socket in server.getClients()) {
        if (socket != _socket && socket.readyState == WebSocket.open) {
          socket.add(data);
        }
      }
    }
  }
}

extension WebSocketSendExtension on WebSocket {
  void send(dynamic data) => add(data);
  int get id => hashCode;
}
import 'dart:async';

import 'package:uuid/uuid.dart';

import '../drivers/driver.dart';
import '../types/cte.dart';
import '../types/database_error.dart';
import '../types/table.dart';
import '../utils/convertion_helper.dart';
import 'condition.dart';

typedef QueryResult = List<Map<String, dynamic>>;
typedef Row = Map<String, dynamic>;

// Alterações feitas para manter o nome original da tabela para lookup em _schemas.
// Será criado um atributo _tableName para armazenar o nome original, e _table escapado será utilizado somente na geração da SQL.
class QueryBuilder implements Future<QueryResult> {
  final DatabaseDriver _driver;
  String _tableName = '';
  List<String> _columns = ['*'];
  final List<String> _whereClauses = [];
  final List<String> _orderByClauses = [];
  final List<String> _joinClauses = [];
  final List<String> _unionQueries = [];
  int? _limit;
  int? _offset;
  Map<String, dynamic> _insertData = {};
  Map<String, dynamic> _updateData = {};
  String? _queryType;
  final List<dynamic> _parameters = [];
  String? _createTableSQL


ck()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeCFSpaceQuotaClient) recordInvocation(key string, args []interface{}) {
	fake.invocationsMutex.Lock()
	defer fake.invocationsMutex.Unlock()
	if fake.invocations == nil {
		fake.invocations = map[string][][]interface{}{}
	}
	if fake.invocations[key] == nil {
		fake.invocations[key] = [][]interface{}{}
	}
	fake.invocations[key] = append(fake.invocations[key], args)
}

var _ quota.CFSpaceQuotaClient = new(FakeCFSpaceQuotaClient)
/*
Copyright the Sonobuoy contributors 2020

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
     http://www.apache.org/licenses/LICENSE-2.0

	 Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package reports

import (
	"gopkg.in/yaml.v2"
	"io"
)

type SonobuoyResultsItem struct {
	Name     string                 `json:"name" yaml:"name"`
	Status   string                 `json:"status" yaml:"status,omitempty"`
	Metadata map[string]string      `json:"meta,omitempty" yaml:"meta,omitempty"`
	Details  map[string]interface{} `json:"details,omitempty" yaml:"details,omitempty"`
	Items    []SonobuoyResultsItem  `json:"items,omitempty" yaml:"items,omitempty"`
}

type SonobuoyItemGenerator interface {
	GenerateSonobuoyItem() SonobuoyResultsItem
}

func WriteSonobuoyReport(w io.Writer, s SonobuoyItemGenerator) error {
	item := s.GenerateSonobuoyItem()
	j, err := yaml.Marshal(item)
	if err != nil {
		return err
	}
	_, err = w.Write(j)
	return err
}
/*
Copyright the Sonobuoy contributors 2020

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
     http://www.apache.org/licenses/LICENSE-2.0

	 Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package cluster

import (
	"context"
	"strings"

	"github.com/vmware-tanzu/sonobuoy-plugins/cluster-inventory/pkg/reports"

	v1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/client-go/kubernetes"
)

type ControlPlane struct {
	Provider        string
	IsHA            bool
	NumNodes        int
	AuditLogEnabled bool

	err error
}

func (c ControlPlane) GenerateSonobuoyItem() reports.SonobuoyResultsItem {
	item := reports.SonobuoyResultsItem{
		Name:    "Control Plane",
		Details: map[string]interface{}{},


ue" to "UTC-11",
  "Pacific/Norfolk" to "Norfolk Standard Time",
  "Pacific/Noumea" to "Central Pacific Standard Time",
  "Pacific/Pago_Pago" to "UTC-11",
  "Pacific/Palau" to "Tokyo Standard Time",
  "Pacific/Pitcairn" to "UTC-08",
  "Pacific/Ponape" to "Central Pacific Standard Time",
  "Pacific/Port_Moresby" to "West Pacific Standard Time",
  "Pacific/Rarotonga" to "Hawaiian Standard Time",
  "Pacific/Saipan" to "West Pacific Standard Time",
  "Pacific/Tahiti" to "Hawaiian Standard Time",
  "Pacific/Tarawa" to "UTC+12",
  "Pacific/Tongatapu" to "Tonga Standard Time",
  "Pacific/Truk" to "West Pacific Standard Time",
  "Pacific/Wake" to "UTC+12",
  "Pacific/Wallis" to "UTC+12",
  "UTC" to "UTC",
)
internal val windowsToStandard: Map<String, String> = mutableMapOf(
  "AUS Central Standard Time" to "Australia/Darwin",
  "AUS Eastern Standard Time" to "Australia/Sydney",
  "Afghanistan Standard Time" to "Asia/Kabul",
  "Alaskan Standard Time" to "America/Anchorage",
  "Aleutian Standard Time" to "America/Adak",
  "Altai Standard Time" to "Asia/Barnaul",
  "Arab Standard Time" to "Asia/Riyadh",
  "Arabian Standard Time" to "Asia/Dubai",
  "Arabic Standard Time" to "Asia/Baghdad",
  "Argentina Standard Time" to "America/Buenos_Aires",
  "Astrakhan Standard Time" to "Europe/Astrakhan",
  "Atlantic Standard Time" to "America/Halifax",
  "Aus Central W. Standard Time" to "Australia/Eucla",
  "Azerbaijan Standard Time" to "Asia/Baku",
  "Azores Standard Time" to "Atlantic/Azores",
  "Bahia Standard Time" to "America/Bahia",
  "Bangladesh Standard Time" to "Asia/Dhaka",
  "Belarus Standard Time" to "Europe/Minsk",
  "Bougainville Standard Time" to "Pacific/Bougainville",
  "Canada Central Standard Time" to "America/Regina",
  "Cape Verde Standard Time" to "Atlantic/Cape_Verde",
  "Caucasus Standard Time" to "Asia/Yerevan",
  "Cen. Australia Standard Time" to "Australia/Adelaide",
  "Central America Standard Time" to "America/Guatemala",
  "Central Asia Standard Time" to "Asia/Bishkek",
  "Central Brazilian Standard Time" to "America/Cuiaba",
  "Central Europe Standard Time" to "Europe/Budapest",
  "Central European Standard Time" to "Europe/Warsaw",
  "Central Pacific Standard Time" to "Pacific/Guadalcanal",
  "Central Standard Time" to "America/Chicago",
  "Central Standard Time (Mexico)" to "America/Mexico_City",
  "Chatham Islands Standard Time" to "Pacific/Chatham",
  "China Standard Time" to "Asia/Shanghai",
  "Cuba Standard Time" to "America/Havana",
  "Dateline Standard Time" to "Etc/GMT+12",
  "E. Africa Standard Time" to "Africa/Nairobi",
  "E. Australia Standard Time" to "Australia/Brisbane",
  "E. Europe Standard Time" to "Europe/Chisinau",
  "E. South America Standard Time" to "America/Sao_Paulo",
  "Easter Island Standard Time" to "Pacific/Easter",
  "Eastern Standard Time" to "America/New_York",
  "Eastern Standard Time (Mexico)" to "America/Cancun",
  "Egypt Standard Time"


 serialVersionUID = 4012709440384265524L;

	@Inject
	private Logger log;

	@Inject
	private FacesMessages facesMessages;

	@Inject
	private SSLService sslService;

	@Inject
	private AppConfiguration appConfiguration;

	@Inject
	private ConfigurationService configurationService;

	@Inject
	private Identity identity;

	private TrustStoreConfiguration trustStoreConfiguration;
	private List<TrustStoreCertificate> trustStoreCertificates;

	private String orgInumFN, tomcatCertFN, idpCertFN;

	private HashMap<String, String> issuer;
	private HashMap<String, String> subject;

	private String uploadMarker;
	private TrustStoreCertificate trustStoreCertificateUploadMarker;

	private boolean certsMmanagePossible;
	private boolean initialized;
	private boolean wereAnyChanges;

	public String init() {
		if (this.initialized) {
			return OxTrustConstants.RESULT_SUCCESS;
		}
		this.wereAnyChanges = false;
		this.certsMmanagePossible = prepareTempWorkspace();
		this.tomcatCertFN = orgInumFN + "-java.crt";
		this.idpCertFN = orgInumFN + "-shib.crt";
		try {
			GluuConfiguration configuration = configurationService.getConfiguration();
			if (configuration == null) {
				return OxTrustConstants.RESULT_FAILURE;
			}
			trustStoreConfiguration = configuration.getTrustStoreConfiguration();
			if (trustStoreConfiguration == null) {
				trustStoreConfiguration = new TrustStoreConfiguration();
			}
			trustStoreCertificates = configuration.getTrustStoreCertificates();
			if (trustStoreCertificates == null) {
				trustStoreCertificates = new ArrayList<TrustStoreCertificate>();
			}
		} catch (Exception ex) {
			log.error("Failed to load configuration configuration", ex);
			return OxTrustConstants.RESULT_FAILURE;
		}
		this.initialized = true;
		return OxTrustConstants.RESULT_SUCCESS;
	}

	/**
	 * Fills issuer and subject maps with data about currently selected certificate
	 */

	public void getCert(String fileName) {
		X509Certificate cert = sslService.getPEMCertificate(getTempCertDir() + fileName);
		loadCert(cert);
	}

	/**
	 * Fills issuer and subject maps with data about currently selected certificate
	 */

	public void getCert(TrustStoreCertificate trustStoreCertificate) {
		this.issuer = new HashMap<String, String>();
		this.subject = new HashMap<String, String>();
		if (trustStoreCertificate != null) {
			X509Certificate cert = sslService
					.getPEMCertificate(new ByteArrayInputStream(trustStoreCertificate.getCertificate().getBytes()));
			loadCert(cert);
		}
	}

	private void loadCert(X509Certificate cert) {
		if (cert != null) {
			String issuerDN = cert.getIssuerX500Principal().getName();
			String[] values = issuerDN.split("(?<!\\\\),");
			for (String value : values) {
				String[] keyValue = value.split("=");
				issuer.put(keyValue[0], keyValue[1]);
			}
			String subjectDN = cert.getSubjectX500Principal().getName();
			values = subjectDN.split("(?<!\\\\),");
			for (String value : values) {
				String[] keyValue = value.split("=");
				subject.put(keyValue[0], keyValue[1]);
			}
			subject.put("validUntil", StringHelper.toString(cert.getNotAfter()));
			subject.put("validAfter", StringHelper.toString(cert.getNotBefore()));
		}
	}

	public String generateCSR(String fileName) throws IOException {
		if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null) {
			Security.addProvider(new BouncyCastleProvider());
		}

		KeyPair pair = getKeyPair(fileName);
		boolean result = false;
		if (pair != null)


slot0 = class("CommanderTreePage", import("...base.BaseSubView"))

function slot0.getUIName(slot0)
	return "CommanderTreeUI"
end

function slot0.OnInit(slot0)
	slot0.treePanel = slot0._tf
	slot0.treeList = UIItemList.New(slot0:findTF("bg/frame/bg/talents", slot0.treePanel), slot0:findTF("bg/frame/bg/talents/telent", slot0.treePanel))
	slot0.treeTalentDesTxt = slot0.treePanel:Find("bg/frame/bg/desc/Text"):GetComponent(typeof(Text))
	slot0.treePanelCloseBtn = slot0:findTF("bg/frame/close_btn", slot0.treePanel)

	setActive(slot0.treePanel, false)
	onButton(slot0, slot0.treePanel, function ()
		uv0:closeTreePanel()
	end, SFX_PANEL)
	onButton(slot0, slot0.treePanelCloseBtn, function ()
		uv0:closeTreePanel()
	end, SFX_PANEL)
end

function slot0.openTreePanel(slot0, slot1)
	setActive(slot0.treePanel, true)
	slot0.treePanel:SetAsLastSibling()


/**
  ******************************************************************************
  * @file    lite_nl_list.h
  * @author  STMicroelectronics
  * @brief   header file of lite supported non-linearities routines
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2022 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */

// #define LITE_NL_ENTRY(nl_id_, nl_name_, nl_op_, nl_op_args_)

/* No sentry. This is deliberate!! */

LITE_NL_ENTRY(1, abs, AI_ABS, 1)
LITE_NL_ENTRY(2, acos, AI_MATH_ACOS, 1)
LITE_NL_ENTRY(3, acosh, AI_MATH_ACOSH, 1)
LITE_NL_ENTRY(4, asin, AI_MATH_ASIN, 1)
LITE_NL_ENTRY(5, asinh, AI_MATH_ASINH, 1)
LITE_NL_ENTRY(6, atan, AI_MATH_ATAN, 1)
LITE_NL_ENTRY(7, atanh, AI_MATH_ATANH, 1)
LITE_NL_ENTRY(8, ceil, AI_CEIL, 1)
LITE_NL_ENTRY(9, cos, AI_MATH_COS, 1)
LITE_NL_ENTRY(10, cosh, AI_MATH_COSH, 1)
LITE_NL_ENTRY(11, erf, AI_MATH_ERF, 1)
LITE_NL_ENTRY(12, exp, AI_MATH_EXP, 1)
LITE_NL_ENTRY(13, floor, AI_FLOOR, 1)
LITE_NL_ENTRY(14, hardmax, /**/, 0)
LITE_NL_ENTRY(15, log, AI_MATH_LOG, 1)
LITE_NL_ENTRY(16, logistic, AI_MATH_LOGISTIC, 1)
LITE_NL_ENTRY(17, neg, AI_NEG, 1)
LITE_NL_ENTRY(18, rsqrt, AI_MATH_RSQRT, 1)
LITE_NL_ENTRY(19, sin, AI_MATH_SIN, 1)
LITE_NL_ENTRY(20, sinh, AI_MATH_SINH, 1)
LITE_NL_ENTRY(21, tan, AI_MATH_TAN, 1)
LITE_NL_ENTRY(22, square, AI_MATH_SQUARE, 1)
LITE_NL_ENTRY(23, reciprocal, AI_RECIPROCAL, 1)
LITE_NL_ENTRY(24, round, AI_ROUND, 1)
LITE_NL_ENTRY(25, sigmoid, AI_MATH_SIGMOID, 1)
LITE_NL_ENTRY(26, swish, AI_MATH_SWISH, 1)
LITE_NL_ENTRY(27, hard_swish, AI_MATH_HARD_SWISH, 1)
LITE_NL_ENTRY(28, sign, AI_SIGN, 1)
LITE_NL_ENTRY(29, sqrt, AI_MATH_SQRT, 1)
// LITE_NL_ENTRY(30, softmax, /**/, 0) // for future changes
// LITE_NL_ENTRY(31, softmax_zero_channel, /**/, 0) // for future changes
LITE_NL_ENTRY(32, soft_plus, AI_MATH_SOFT_PLUS, 1)
LITE_NL_ENTRY(33, soft_sign, AI_MATH_SOFT_SIGN, 1)
LITE_NL_ENTRY(34, tanh, AI_MATH_TANH, 1)
LITE_NL_ENTRY(35, prelu, /**/, 0)
LITE_NL_ENTRY(36, relu, AI_MATH_RELU, 1)
LITE_NL_ENTRY(37, relu_generic, /**/, 0)

LITE_NL_ENTRY(101, elu, AI_MATH_ELU, 2)
LITE_NL_ENTRY(102, relu_thresholded, AI_MATH_RELU_THRESHOLDED, 2)

LITE_NL_ENTRY(201, clip, AI_CLAMP, 3)
LITE_NL_ENTRY(202, hard_sigmoid, AI_MATH_HARD_SIGMOID, 3)
LITE_NL_ENTRY(203, selu, AI_MATH_SELU, 3)
// LITE_NL_ENTRY(204, gelu, AI_MATH_GELU, 2)

#undef LITE_NL_ENTRY
#undef LITE_NL_IIF_0
#undef LITE_NL_IIF_1
#undef LITE_NL_IIF_2
#undef LITE_NL_IIF_3


 wpisie znajdziesz szczegółowe informacje dotyczące instalacji, konfiguracji oraz użytkowania nowej wersji.

!!! tip
    Szukasz instalatora? Zobacz [przewodnik użytkownika](../../user-guide/installation.md).

<!-- more -->

## Wprowadzenie

me3 to nowa iteracja projektów [ModEngine](https://github.com/soulsmods/ModEngine2), które istniały wcześniej.
Obsługuje wszystkie funkcje, jakich można oczekiwać od podstawowego programu ładującego modyfikacje (ładowanie nadpisanych plików i rozszerzeń DLL, generowanie zrzutów awaryjnych i logów), ale jest zbudowany na kilku nowych zasadach projektowych:

- Lepsze doświadczenie użytkownika dla osób korzystających z modów
- Stabilna integracja dla twórców modów
- Łatwość utrzymania dla deweloperów me3

### Lepszy doświadczenie użytkownika

W starszych wersjach ModEngine process konfiguracji modów był niedostatecznie opisany, łatwo prowadził do błędów i wywoływał niejasności dotyczące umieszczania plików w odpowiednich katalogach.
Celem me3 jest wyeliminowanie licznych błędów znanych z poprzednich wersji oraz sprawienie, by korzystanie z modyfikacji było mniej frustrujące.

#### Prostsze uruchamianie

me3 oferuje zarówno integrację z powłoką systemu Windows, jak i wieloplatformowy interfejs wiersza poleceń.
Zamiast używać skryptów wywołujących `modengine_launcher`, użytkownicy mogą dwukrotnie kliknąć plik `.me3`, aby go uruchomić, o ile profil obsługuje daną grę.

Użytkownicy, którzy nie korzystają z systemu Windows (lub preferują CLI), mogą uruchomić profil za pomocą interfejsu wiersza poleceń `me3`:

```shell
> $ me3 launch --profile modded-elden-ring --game er
```

!!! tip
    Możesz użyć opcji `--auto-detect` zamiast `--game` do automatycznego wykrywania gry do uruchomienia, jeśli profil obsługuje tylko jedną grę.

#### Organizacja modyfikacji

Dzięki me3 Profil Moda może być umieszczony w dowolnym miejscu i może odwoływać się do ścieżek względnych do własnego pliku konfiguracyjnego lub podawać ścieżki absolutne do lokalizacji w innym miejscu systemu plików.
Ujednoliciliśmy lokalizację Profili Modów (chociaż nadal mogą być umieszczone w dowolnym miejscu!), aby ułatwić znajdowanie i uruchamianie dostępnych profili.

```shell
> $ me3 profile list
eldenring-default.me3
nightreign-default.me3
```

Oznacza to również, że możemy tworzyć profile i przechowywać je w nowej, ujednoliconej lokalizacji:

```shell
> $ me3 profile


//Compile with:
//gcc -o efl_thread_4 efl_thread_4.c -g `pkg-config --cflags --libs elementary`
#include <Elementary.h>
#include <pthread.h>

static Evas_Object *win = NULL;
static Evas_Object *rect = NULL;

struct info
{
   double x, y;
};

static void my_thread_mainloop_code(void *data);

static pthread_t thread_id;
static pthread_mutex_t th_lock;
static int th_exit = 0;

// BEGIN - code running in my custom pthread instance
//
static void *
my_thread_run(void *arg EINA_UNUSED)
{
   double t = 0.0;

   // inside the pthread function lets loop forever incrementing a time point
   for (;;)
     {
        struct info *inf = malloc(sizeof(struct info));
        int do_exit;

        if (inf)
          {
             inf->x = 200 + (200 * sin(t));
             inf->y = 200 + (200 * cos(t));
             // now call a function in the mainloop and pass it our allocated
             // data that it will free when it gets it
             ecore_main_loop_thread_safe_call_async
                (my_thread_mainloop_code, inf);
          }
        // and sleep and loop
        usleep(1000);
        t += 0.02;
        // in case someone has asked us to cancel - then cancel this loop
        // co-operatively (cancelling is co-operative)
        pthread_mutex_lock(&th_lock);
        do_exit = th_exit;
        pthread_mutex_unlock(&th_lock);
        if (do_exit) break;
     }
   return NULL;
}
//
// END - code running in my custom pthread instance

static void
my_thread_new(void)
{
   pthread_attr_t attr;

   pthread_mutex_init(&th_lock, NULL);
   if (pthread_attr_init(&attr) != 0)
     perror("pthread_attr_init");
   if (pthread_create(&thread_id, &attr, my_thread_run, NULL) != 0)
     perror("pthread_create");
}

static void
my_thread_mainloop_code(void *data)
{
   struct info *inf = data;
   evas_object_move(rect, inf->x - 50, inf->y - 50);
   free(inf);
}

// just test cancelling the thread
static void
down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
   pthread_mutex_lock(&th_lock);
   th_exit = 1;
   pthread_mutex_unlock(&th_lock);
}

// on window delete - cancel thread then delete window and exit mainloop
static void
del(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
   pthread_mutex_lock(&th_lock);
   th_exit = 1;
   pthread_mutex_unlock(&th_lock);
   evas_object_del(obj);
   elm_exit();
}

EAPI_MAIN int
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
   Evas_Object *o;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("efl-thread-4", "EFL Thread 4");
   evas_object_smart_callback_add(win, "delete,request", del, NULL);

   o = evas_object_rectangle_add(evas_object_evas_get(win));
   evas_object_color_set(o, 50, 80, 180, 255);
   evas_object_resize(o, 100, 100);
   evas_object_show(o);
   // new in the examples - we have a mouse down on the blue box cancel
   // the thread
   evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, down, NULL);
   rect = o;

   // create custom thread to do some "work on the side"
   my_thread_new();

   evas_object_resize(win, 400, 400);
   evas_object_show(win);

   elm_run();
   pthread_mutex_lock(&th_lock);
   th_exit = 1;
   pthread_mutex_unlock(&th_lock);

   return 0;
}
ELM_MAIN()


#pragma once
#include <bitset>

namespace Proto
{

struct FakeMouseState
{
	int x, y;

	int clipClientLeft;
	int clipClientTop;
	int clipClientRight;
	int clipClientBottom;
	bool hasClipCursor = false;

	bool ignoreMouseBounds = false;
	bool extendMouseBounds = false;
};

struct FakeKeyboardState
{
	// GetAyncKeyState will tell the caller
	// 1. Whether the key is pressed
	// 2. Whether the key has been pressed during the time since the last call to GetAsyncKeyState
	//    (The key doesn't have to currently be pressed for this to be true)
	//
	// To emulate this, take two buffers:
	// keysState records the physical state of the keyboard. It is changed whenever a key is pressed or released
	// asyncKeysState records whether the keys were pressed since the last call.
	//		The buffer is only set to true when a key is pressed (releasing a key does nothing)
	//		The buffer is then wiped at the end of the GetAsyncKeyState hook

	std::bitset<256> keysState{};
	std::bitset<256> asyncKeysState{};
};

class FakeMouseKeyboard
{
	static FakeMouseState mouseState;
	static FakeKeyboardState keyboardState;

public:
	static const FakeMouseState& GetMouseState() { return mouseState; }
	static void AddMouseDelta(int dx, int dy);
	static void SetMousePos(int x, int y);

	static void SetClipCursor(int clientLeft, int clientTop, int clientRight, int clientBottom);
	static void RemoveClipCursor();

	static void SetIgnoreMouseBounds(bool ignore);
	static void SetExtendMouseBounds(bool extend);

	static void ReceivedKeyPressOrRelease(int vkey, bool pressed);
	static void ClearAsyncKeyState(int vkey);
	static bool IsKeyStatePressed(int vkey);
	static bool IsAsyncKeyStatePressed(int vkey);

	static unsigned int GetMouseMkFlags()
	{
#define PROTO_MMFKEY(x, y) ((FakeMouseKeyboard::IsKeyStatePressed(x)) ? (y) : (0))

		return	PROTO_MMFKEY(VK_CONTROL, MK_CONTROL) |
				PROTO_MMFKEY(VK_SHIFT, MK_SHIFT) |
				PROTO_MMFKEY(VK_LBUTTON, MK_LBUTTON) |
				PROTO_MMFKEY(VK_MBUTTON, MK_MBUTTON) |
				PROTO_MMFKEY(VK_RBUTTON, MK_RBUTTON) |
				PROTO_MMFKEY(VK_XBUTTON1, MK_XBUTTON1) |
				PROTO_MMFKEY(VK_XBUTTON2, MK_XBUTTON2);

#undef PROTO_MMFKEY

	}
};

}


 (buffer[r * ncols + c] == 1 &&
//               (r == 0 || r == nrows - 1 || buffer[(r - 1) * ncols + c] == 0 ||
//                buffer[(r + 1) * ncols + c] == 0))
//             new_edges[r * ncols + c] = 1;

//       add(edges, new_edges);
//       subtract(buffer, new_edges);
//     }

//     fromDense(nrows, ncols, edges.begin(), edges.end());
//   }

//   /**
//    * Computes the number of bits that match between dense vector x and each
//    * row of this sparse binary matrix. Returns a vector with an integer count
//    * (the number of bits that match) for each row. Vector x is a binary vector
//    * whose elements take the value 0 or 1 only.
//    */
//   template <typename InputIterator, typename OutputIterator>
//   inline void overlap(InputIterator x, InputIterator x_end, OutputIterator y,
//                       OutputIterator y_end) const {
//     {
//       NTA_ASSERT((size_type)(x_end - x) == nCols());
//       NTA_ASSERT((size_type)(y_end - y) == nRows());
//     }

//     typename Row::const_iterator it, end;

//     for (size_type i = 0; i != nRows(); ++i, ++y) {
//       size_type count = 0;
//       end = ind_[i].end();
//       for (it = ind_[i].begin(); it != end; ++it)
//         count += x[*it];
//       *y = count;
//     }
//   }

//   /**
//    * For a given x vector (binary 0/1) and maxDistance, computes the overlap
//    * between x and each row of this matrix, and decides whether this overlap
//    * is acceptable or not.
//    * As soon as a non-acceptable (too big) overlap has been determined, false
//    * is returned.
//    * The max allowed overlap changes from row to row and is computed as:
//    * (1 - maxDistance) * max(n non-zeros on row, sum of x),
//    * where the sum of x is the number of non-zero elements in x (x is binary
//    * with values only 0 and 1 for any element).
//    */
//   template <typename InputIterator>
//   inline bool maxAllowedOverlap(nupic::Real32 maxDistance, InputIterator x,
//                                 InputIterator x_end) const {
//     { NTA_ASSERT((size_type)(x_end - x) == nCols()); }

//     nupic::Real32 k = 1.0 - maxDistance;

//     // Compute the number of 1's in x, same as the sum of x
//     size_type c_sum = 0;
//     for (InputIterator x_it = x; x_it != x_end; ++x_it)
//       c_sum += *x_it;

//     typename Row::const_iterator it, end;

//     for (size_type i = 0; i != nRows(); ++i) {

//       // Compute max allowed overlap
//       size_type ls = std::max(nNonZerosOnRow(i), c_sum);
//       nupic::Real32 max_ov = k * ls;

//       // Compute overlap between row i and vector x,
//       // but exit early, as soon as we determine that
//       // the overlap is more than the max allowed overlap
//       size_type ov = 0;
//       end = ind_[i].end();
//       for (it = ind_[i].begin(); it != end; ++it) {
//         ov += x[*it];
//         if


 the estimated maximum number of files to achieve
 * a balance between the number of directories and files (see explanation below).
 *
 * Example of a two level setup:
 *
 * ```text
 * 00
 *   56
 *     b4e58f45-9f59-4b8f-91a7-a4e0e9465600
 *   82
 *     48852c46-8e5a-40a1-a9c8-e757c6f58200
 * f7
 *   13
 *     5e38c5c1-9134-4528-be20-e1bdbf0e13f7
 * ```
 *
 * ## Recommended File Number - Level Pairs
 * (credit: ChatGPT, considering common file systems)
 *
 * When considering real-world file systems, we need to take into account:
 *
 * - Maximum number of files per directory (performance degrades after a certain threshold).
 * - Directory lookup efficiency (some file systems slow down with large directories).
 * - Scalability and balance between depth and breadth.
 *
 * | **Estimated File Count** | **Recommended Levels** | **Reasoning (File System Considerations)** |
 * |--------------------------|-----------------------|--------------------------------------------|
 * | 1,000                    | 0                     | Most modern file systems handle 1,000 files in a single directory efficiently. |
 * | 10,000                   | 1                     | Some file systems (e.g., ext4, NTFS) slow down with >10,000 files in one directory. |
 * | 100,000                  | 2                     | At this scale, directory lookup performance degrades on ext4, NTFS, APFS. |
 * | 1,000,000                | 2-3                   | NTFS and ext4 slow significantly beyond 100,000 files in a single directory. |
 * | 10,000,000               | 3-4                   | Large-scale file storage benefits from deeper hierarchy for performance. |
 * | 100,000,000              | 4-5                   | Necessary for avoiding performance bottlenecks in large repositories. |
 *
 * **File System-Specific Notes**
 *
 * - **ext4 (Linux):** Can handle millions of files but benefits from hierarchical directories beyond **10,000** per directory.
 * - **NTFS (Windows):** Works well up to **100,000** files per directory but slows beyond that.
 * - **APFS (MacOS):** Handles many files well but benefits from deeper nesting for millions of files.
 * - **XFS (High-performance Linux FS):** Better for large numbers of files but still benefits from 3-4 levels at >1 million files.
 *
 * @property  levels     The number of levels to use.
 * @property  dirStore   When true, [pathFor] adds the UUID to the returned path.
 */
abstract class UuidFileStore<T>(
    val root : Path,
    val levels : Int,
    val dirStore : Boolean = false
) {

    /**
     * Get the **DIRECTORY** path for a given UUID.
     */
    open fun pathFor(uuid: UUID<*>): Path {
        val s = uuid.toString().reversed()
        val dirs = 0.until(levels).map { s.substring(it * 2, it * 2 + 2).reversed() }.toTypedArray()
        return if (dirStore) {
            Path(root, *dirs, uuid.toString())
        } else {
            Path(root, *dirs)
        }
    }

    /**
     * Traverse through all the paths and call [loadPath] for each at the
     * appropriate level.
     *
     * - Skips all paths with a name that starts with a dot.
     * - Skips all paths with a name that is shorter than 36 characters.
     * - Stops if [loadPath] throws an exception.
     */
    open fun loadAll(context : T) {
        loadDir(root, 0, context)
    }

    open fun loadDir(dirPath : Path, dirLevel : Int, context: T) {
        for (path in dirPath.list()) {
            val name = path.name
            if (dirLevel == levels) {
                if (name.length < 36 || name.startsWith('.')) continue
                loadPath(path, contex


class Stock:
    # quantity = 0
    # buyDay = 0
    # sellDay = 0

    def __init__(self, quantity, buyday, sellday):
        self.quantity = quantity
        self.buyDay = buyday
        self.sellDay = sellday

N = int(input())
stockData = []
for i in range(N):
    quantity = int(input())
    buyDay = int(input())
    sellDay = int(input())
    stockData.append(Stock(quantity, buyDay, sellDay))

M = int(input())
stockPrices = [[]]
for i in range(N):
    prices = []
    for j in range(M):
        prices.append(int(input()))
    if prices:
        stockPrices.append(prices)
print(stockPrices)
K = int(input())
realizedProfit = unrealizedProfit = 0
for i in range(N):
    stock = stockData[i]
    if stock.buyDay > K:
        continue
    if stock.sellDay == 0 or stock.sellDay > K:
        unrealizedProfit += (stockPrices[i][K - 1] - stockPrices[i][stock.buyDay - 1]) * stock.quantity
    elif stock.sellDay <= K:
        realizedProfit += (stockPrices[i][stock.sellDay - 1] - stockPrices[i][stock.buyDay - 1]) * stock.quantity
print("Realized Profit: ", realizedProfit)
print("Unrealized Profit: ", unrealizedProfit)


*/
        val DESIGN: StageContext = StageContext(
            id = "FrontendDesign",
            stage = StageContext.Stage.Design,
            systemPrompt = """你是一个专业的前端技术咨询师（Advisor），请以如下的 ASCII 描述用户所需要的页面。
            |- 请深吸一口气，放松自己，尽可能的想象用户的需求。
            |- 如果用户没有给出页面元素的描述，你必须自己补充。
            |- 你必须等待用户确认（userResponse），确认后（用户返回 YES）才能继续。
            |- 你必须根据示例语法，生成对应的页面。
            |
            |所有的组件列表如下：
            |###
            |${'$'}{components}
            |###
            |
            |如下是基本的 ASCII 规则，以便用户以程序解析它：
            |
            |###
            |- 项目使用 12x 布局，表示页面宽度为 12x 栅格宽度。
            |- Footer(12x, "copyright"), BlogList(12x) 以大写字母开头的函数，表示页面组件, "copyright" 表示注释
            |- Grid, Box 是页面布局组件
            |- Empty(2x) 表示空白, 2x 表示页面元素的宽度为 2x栅格宽度
            |- NavComponent(10x) 表示导航栏（NavComponent）, 10x 表示页面元素的宽度为 10x栅格宽度
            |- 以 Component 结尾，表示是一个新的页面组件，如 NavComponent, BlogListComponent 等
            |###
            |""".trimMargin(),
            updatableExamples = listOf(
                UpdatableExample(
                    question = "生成一个导航栏组件的 mockup",
                    answer = """请确认以下的设计是否符合您的要求。如果符合，请回复"YES"，如果不符合，请提出你的要求。
            |```design
            |componentName: NavComponent
            |usedComponents: Link, Button
            |--------------------------------------
            || Link("home", 2x) | Link("博客", 2x) | a("Login", 2x)  |
            |--------------------------------------
            |```""".trimMargin(),
                    userResponse = "这里的 login 应该用 Button，而不是 a",
                    finalOutput = """请确认以下的设计是否符合您的要求。如果符合，请回复"YES"，如果不符合，请提出你的要求。
            |```design
            |componentName: NavComponent
            |usedComponents: Link, Button
            |--------------------------------------
            || Link("home", 2x) | Link("博客", 2x) | Button("Login", 2x)  |
            |--------------------------------------
            |```""".trimMargin()
                ),
                UpdatableExample(
                    question = "生成一个包含图片的博客详情页",
                    answer = """请确认以下的设计是否符合您的要求。如果符合，请回复"YES"，如果不符合，请提出你的要求。
            |```design
            |pageName: 博客详情页
            |usedComponents: Grid, Box, NavComponent, Avatar, Date, CardMedia, Typography, Pagination, FooterComponent
            |------------------------------------------------------
            ||      NavComponent(12x)                             |
            |------------------------------------------------------
            ||    Text(6x, "标题")              |   Empty(6x)      |
            |------------------------------------------------------
            ||Avatar(3x, "头像") | Date(3x, "发布时间") | Empty(6x) |
            |------------------------------------------------------
            || CardMedia(8x)                   |   Empty(4x)      |
            |------------------------------------------------------
            || Typography(12x, "内容")


"""
Enums for architecture detection and model capabilities.
"""

from enum import Enum

class ToolCallFormat(Enum):
    """Tool call formats supported by different architectures."""

    # Native API formats
    NATIVE = "native"                   # OpenAI/Anthropic native API

    # Prompted formats
    JSON = "json"                       # JSON object format
    XML = "xml"                         # XML wrapped format
    SPECIAL_TOKEN = "special_token"     # <|tool_call|> format
    PYTHONIC = "pythonic"               # Python function syntax

    # Legacy/unsupported
    NONE = "none"                       # No tool support

class ModelType(Enum):
    """High-level model types."""

    CHAT = "chat"                       # Chat/conversation models
    INSTRUCT = "instruct"               # Instruction-following models
    BASE = "base"                       # Base/foundation models
    CODE = "code"                       # Code-specialized models
    VISION = "vision"                   # Vision/multimodal models
    EMBEDDING = "embedding"             # Embedding models
    UNKNOWN = "unknown"                 # Unknown type

class ArchitectureFamily(Enum):
    """Known architecture families."""

    # Commercial APIs
    OPENAI = "openai"                   # GPT family
    ANTHROPIC = "anthropic"             # Claude family

    # Open source families
    LLAMA = "llama"                     # Meta LLaMA family
    QWEN = "qwen"                       # Alibaba Qwen family
    MISTRAL = "mistral"                 # Mistral AI family
    GEMMA = "gemma"                     # Google Gemma family
    PHI = "phi"                         # Microsoft Phi family
    GLM = "glm"                         # Zhipu GLM family
    DEEPSEEK = "deepseek"               # DeepSeek family
    GRANITE = "granite"                 # IBM Granite family

    # Other
    GENERIC = "generic"                 # Generic/unknown

    @classmethod
    def from_string(cls, name: str) -> "ArchitectureFamily":
        """Convert string to ArchitectureFamily enum."""
        try:
            return cls(name.lower())
        except ValueError:
            return cls.GENERIC


ses + 1] = loss[1]
	end
	local plots={{'Adv AE', torch.linspace(1,#losses,#losses), torch.Tensor(losses), '-'}}
	plots[2]={'Adversary', torch.linspace(1,#advLosses,#advLosses), torch.Tensor(advLosses), '-'}
	gnuplot.pngfigure('AdvAE/Training_normal_cifar_hsv_alex.png')
	gnuplot.plot(table.unpack(plots))
	gnuplot.ylabel('Loss')
	gnuplot.xlabel('Batch #')
	gnuplot.plotflush()

	--permute training data
	trainData = trainData:index(1,torch.randperm(trainData:size(1)):long())

  local x1 = trainData:narrow(1,1,50)
  local xHat= autoencoder:forward(x1)
  --print(x[1])
  --print("xHat111")
  --print(xHat[1][3])
  --[[xHat_hsv = xHat_hsv:mul(255):byte()
  for i=1,50 do
    print(i)
    print(xHat_hsv[i][1]:min(),xHat_hsv[i][1]:max())
    print(xHat_hsv[i][2]:min(),xHat_hsv[i][2]:max())
    print(xHat_hsv[i][3]:min(),xHat_hsv[i][3]:max())
  end
  --]]
  --[[local xHat = torch.DoubleTensor(xHat_hsv:size())
  for i=1,xHat_hsv:size()[1] do
    xHat[i] = image.hsv2rgb(xHat_hsv[i]:double())
  end--]]

  --print (#x)
  ---print(#xHat)
  --temp=torch.cat(image.toDisplayTensor(x,2,50),image.toDisplayTensor(xHat,2,50),2)
  --print (#temp)
  image.save('AdvAE/Reconstructions_normal_cifar_hsv_alex_temp.png', torch.cat(image.toDisplayTensor(x1,2,50),image.toDisplayTensor(xHat,2,50),2))
end

torch.save('AdvAE/autoencoder_model_normal.t7',autoencoder)
torch.save('AdvAE/adversary_model_normal.t7',adversary)
print('Testing')
x = testData:narrow(1,1,50):double():div(255):cuda()
local x_hsv = torch.Tensor(x:size()):typeAs(x)
for i=1,x:size()[1] do
  x_hsv[i] = image.rgb2hsv(x[i]:double()) -- It showed an error in this line since the typecasting from CUDA to TorchDouble tensor was not written (DS / 7:20 PM @ 6 Jul)
end
x_hsv = x_hsv:cuda()
local xHat_hsv= autoencoder:forward(x_hsv)
--print(x[1])
--print("xHat111")
--print(xHat[1][1])
--[[xHat_hsv = xHat_hsv:mul(255):byte()
for i=1,50 do
  print(i)
  print(xHat_hsv[i][1]:min(),xHat_hsv[i][1]:max())
  print(xHat_hsv[i][2]:min(),xHat_hsv[i][2]:max())
  print(xHat_hsv[i][3]:min(),xHat_hsv[i][3]:max())
end
--]]
local xHat = torch.DoubleTensor(xHat_hsv:size())
for i=1,xHat_hsv:size()[1] do
  xHat[i] = image.hsv2rgb(xHat_hsv[i]:double())
end
--print (#x)
---print(#xHat)
--temp=torch.cat(image.toDisplayTensor(x,2,50),image.toDisplayTensor(xHat,2,50),2)
--print (#temp)
image.save('AdvAE/Reconstructions_normal_cifar_hsv_alex.png', torch.cat(image.toDisplayTensor(x,2,50),image.toDisplayTensor(xHat,2,50),2))


cld
	movl $_swapper_pg_dir,%eax
	movl %eax,%cr3			/* cr3 - page directory start */
	movl %cr0,%eax
	orl $0x80000000,%eax
	movl %eax,%cr0		/* set paging (PG) bit */
	ret			/* this also flushes the prefetch-queue */

/*
 * page 0 is made non-existent, so that kernel NULL pointer references get
 * caught. Thus the swapper page directory has been moved to 0x1000
 */
.org 0x1000
_swapper_pg_dir:
/*
 * The page tables are initialized to only 4MB here - the final page
 * tables are set up later depending on memory size.
 */
.org 0x2000
_pg0:

.org 0x3000
_empty_bad_page:

.org 0x4000
_empty_bad_page_table:

.org 0x5000
_empty_zero_page:

.org 0x6000
/*
 * tmp_floppy_area is used by the floppy-driver when DMA cannot
 * reach to a buffer-block. It needs to be aligned, so that it isn't
 * on a 64kB border.
 */
_tmp_floppy_area:
	.fill 1024,1,0
/*
 * floppy_track_buffer is used to buffer one track of floppy data: it
 * has to be separate from the tmp_floppy area, as otherwise a single-
 * sector read/write can mess it up. It can contain one full track of
 * data (18*2*512 bytes).
 */
_floppy_track_buffer:
	.


****************************************

using System.Drawing;

namespace ComponentFactory.Krypton.Toolkit
{
    /// <summary>
    /// Provide inheritance of palette ribbon text properties.
    /// </summary>
    public abstract class PaletteRibbonTextInherit : GlobalId,
                                                     IPaletteRibbonText
    {
        #region IPaletteRibbonText
        /// <summary>
        /// Gets the tab color for the item text.
        /// </summary>
        /// <param name="state">Palette value should be applicable to this state.</param>
        /// <returns>Color value.</returns>
        public abstract Color GetRibbonTextColor(PaletteState state);
        #endregion
    }
}


eme="portalThemeColor7" id="iszyic" data-dynamic-ppid="bcc7dfe6-264f-f736-1985-11946d85d2bf" class="row sectionBlockLayout text-start" style="display: flex; flex-wrap: wrap; margin: 0px; min-height: auto; padding: 8px;">

About Us

Contoso Real Estate is a leading platform for finding rental properties. We provide a wide range of listings with detailed information about each property's amenities. Whether you're looking for a cozy apartment or a spacious house, we have the perfect rental property for you.

<img src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEAwADAAAD/2wBDAAcFBQYFBAcGBQYIBwcIChELCgkJChUPEAwRGBUaGRgVGBcbHichGx0lHRcYIi4iJSgpKywrGiAvMy8qMicqKyr/2wBDAQcICAoJChQLCxQqHBgcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKir/wAARCAVVCAADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAg


，或者註冊某些帳戶，需要提供我們的實際位址時，我們就必須相信下單的商店，或者平臺不會將使用者的個人資訊用於邪惡目的出售給他人. 同理我們在社交媒體上發佈的個人想法或照片也是如此. 同樣財務資訊也是隱私洩露的重災區，例如會計行業中的一些駭客，或者是某些財務應用程式，都會收集使用者資訊，進行消費和行為分析，例如Venmo軟體.
\n\n
而門羅幣自始至終都在履行區塊鏈無需信賴協力廠商的承諾，並對用戶隱私保護採用了同樣的標準. 因為我們的隱私權不應該依賴於協力廠商的許諾和信用，不能把安全的希望寄託於他人身上. 為此，門羅幣實施的所有隱私技術都是不需要信任協力廠商的，也無需任何協力廠商參與就可以預設情況達成.
\n\n
除了門羅幣採用的一系列隱私技術，幣圈當然還有其他隱私技術，不過這裡面很多都需要信任協力廠商, 這些相對于無需信任設置的技術，百害而無一利. 這裡面的代表，大零幣Zcash在其機密交易協定中使用某些所謂的零知識技術作為構建模組，看起來這些系統具有非常強的隱私保證，具有較大的匿名集，並且正確使用可能是確保隱私的有力方法. 然而，這種方法的缺點是，作為該技術的初始設置的一部分，必須要有一個先創建並隨後被遺忘的參數集. 如果有人保留此參數，他們將能夠創建虛假的SNARK證明，從而不知不覺地印製ZEC幣，換句話說，ZEC公司的程式師，如果保留了設計時的參數，他們可以無限印刷ZEC幣, 那麼無限印刷幣會影響隱私嗎？ 有些理論認為會影響，而另一些人則認為沒有，事實需要更多的研究才能得出明確的答案，但是這種為了獲得隱私而承受的風險是不能被接受的.
\n\n
無論如何，無需信任協力廠商就像我們在本文開頭討論的方案一樣. 那些在傳統世界裡, 我們努力擺脫的狀態, 更沒理由在區塊鏈中把信賴協力廠商


.random(-1, true, true);
            fail("");
        } catch (final IllegalArgumentException ex) {}
        try {
            CommonsLang3RandomStringUtils.random(-1, DUMMY);
            fail("");
        } catch (final IllegalArgumentException ex) {}
        try {
            CommonsLang3RandomStringUtils.random(1, new char[0]); // must not provide empty array => IAE
            fail("");
        } catch (final IllegalArgumentException ex) {}
        try {
            CommonsLang3RandomStringUtils.random(-1, "");
            fail("");
        } catch (final IllegalArgumentException ex) {}
        try {
            CommonsLang3RandomStringUtils.random(-1, (String)null);
            fail("");
        } catch (final IllegalArgumentException ex) {}
        try {
            CommonsLang3RandomStringUtils.random(-1, 'a', 'z', false, false);
            fail("");
        } catch (final IllegalArgumentException ex) {}
        try {
            CommonsLang3RandomStringUtils.random(-1, 'a', 'z', false, false, DUMMY);
            fail("");
        } catch (final IllegalArgumentException ex) {}
        try {
            CommonsLang3RandomStringUtils.random(-1, 'a', 'z', false, false, DUMMY, new Random());
            fail("");
        } catch (final IllegalArgumentException ex) {}
    }

    /**
     * Make sure boundary alphanumeric characters are generated by randomAlphaNumeric
     * This test will fail randomly with probability = 6 * (61/62)**1000 ~ 5.2E-7
     */
    @Test
    public void testRandomAlphaNumeric() {
        final char[] testChars = {'a', 'z', 'A', 'Z', '0', '9'};
        final boolean[] found = {false, false, false, false, false, false};
        for (int i = 0; i < 100; i++) {
            final String randString = CommonsLang3RandomStringUtils.randomAlphanumeric(10);
            for (int j = 0; j < testChars.length; j++) {
                if (randString.indexOf(testChars[j]) > 0) {
                    found[j] = true;
                }
            }
        }
        for (int i = 0; i < testChars.length; i++) {
            if (!found[i]) {
                fail("alphanumeric character not generated in 1000 attempts: "
                   + testChars[i] +" -- repeated failures indicate a problem ");
            }
        }
    }

    /**
     * Make sure '0' and '9' are generated by randomNumeric
     * This test will fail randomly with probability = 2 * (9/10)**1000 ~ 3.5E-46
     */
    @Test
    public void testRandomNumeric() {
        final char[] testChars = {'0','9'};
        final boolean[] found = {false, false};
        for (int i = 0; i < 100; i++) {
            final String randString = CommonsLang3RandomStringUtils.randomNumeric(10);
            for (int j = 0; j < testChars.length; j++) {
                if (randString.indexOf(testChars[j]) > 0) {
                    found[j] = true;
                }
            }
        }
        for (int i = 0; i < testChars.length; i++) {
            if (!found[i]) {
                fail("digit not generated in 1000 attempts: "
                   + testChars[i] +" -- repeated failures indicate a problem ");
            }
        }
    }

    /**
     * Make sure boundary alpha characters are generated by randomAlphabetic
     * This test will fail randomly with probability = 4 * (51/52)**1000 ~ 1.58E-8
     */
    @Test
    public void testRandomAlphabetic() {
        final char[] testChars = {'a', 'z', 'A', 'Z'};
        final boolean[] found = {false, false, false, false};
        for (int i = 0; i < 100; i++) {
            final String randString = CommonsLang3RandomStringUtils.


          tif->begin_time, tif->end_time);
        return -1;
      }

      tif = tif->next;
    }
  }

  return 0;
}

/* destroy the memory allocated for bgpstream filter */
void bgpstream_filter_mgr_destroy(bgpstream_filter_mgr_t *bs_filter_mgr)
{
  bgpstream_debug("\tBSF_MGR:: destroy start");
  if (bs_filter_mgr == NULL) {
    return; // nothing to destroy
  }
  // destroying filters
  bgpstream_interval_filter_t *tif;
  khiter_t k;
  // projects
  if (bs_filter_mgr->projects != NULL) {
    bgpstream_str_set_destroy(bs_filter_mgr->projects);
  }
  // collectors
  if (bs_filter_mgr->collectors != NULL) {
    bgpstream_str_set_destroy(bs_filter_mgr->collectors);
  }
  // bgp_types
  if (bs_filter_mgr->bgp_types != NULL) {
    bgpstream_str_set_destroy(bs_filter_mgr->bgp_types);
  }
  // peer asns
  if (bs_filter_mgr->peer_asns != NULL) {
    bgpstream_id_set_destroy(bs_filter_mgr->peer_asns);
  }
  // aspath expressions
  if (bs_filter_mgr->aspath_exprs != NULL) {
    bgpstream_str_set_destroy(bs_filter_mgr->aspath_exprs);
  }
  // prefixes
  if (bs_filter_mgr->prefixes != NULL) {
    bgpstream_patricia_tree_destroy(bs_filter_mgr->prefixes);
  }
  // communities
  if (bs_filter_mgr->communities != NULL) {
    kh_destroy(bgpstream_community_filter, bs_filter_mgr->communities);
  }
  // time_intervals
  tif = NULL;
  while (bs_filter_mgr->time_intervals != NULL) {
    tif = bs_filter_mgr->time_intervals;
    bs_filter_mgr->time_intervals = bs_filter_mgr->time_intervals->next;
    free(tif);
  }
  // rib/update frequency
  if (bs_filter_mgr->last_processed_ts != NULL) {
    for (k = kh_begin(bs_filter_mgr->last_processed_ts);
         k != kh_end(bs_filter_mgr->last_processed_ts); ++k) {
      if (kh_exist(bs_filter_mgr->last_processed_ts, k)) {
        free(kh_key(bs_filter_mgr->last_processed_ts, k));
      }
    }
    kh_destroy(collector_ts, bs_filter_mgr->last_processed_ts);
  }
  // free the mgr structure
  free(bs_filter_mgr);
  bs_filter_mgr = NULL;
  bgpstream_debug("\tBSF_MGR:: destroy end");
}


++
	if wktp >= len(wktS) {
		nyys := make([]wktSymType, len(wktS)*2)
		copy(nyys, wktS)
		wktS = nyys
	}
	wktS[wktp] = wktVAL
	wktS[wktp].yys = wktstate

wktnewstate:
	wktn = int(wktPact[wktstate])
	if wktn <= wktFlag {
		goto wktdefault /* simple state */
	}
	if wktrcvr.char < 0 {
		wktrcvr.char, wkttoken = wktlex1(wktlex, &wktrcvr.lval)
	}
	wktn += wkttoken
	if wktn < 0 || wktn >= wktLast {
		goto wktdefault
	}
	wktn = int(wktAct[wktn])
	if int(wktChk[wktn]) == wkttoken { /* valid shift */
		wktrcvr.char = -1
		wkttoken = -1
		wktVAL = wktrcvr.lval
		wktstate = wktn
		if Errflag > 0 {
			Errflag--
		}
		goto wktstack
	}

wktdefault:
	/* default state action */
	wktn = int(wktDef[wktstate])
	if wktn == -2 {
		if wktrcvr.char < 0 {
			wktrcvr.char, wkttoken = wktlex1(wktlex, &wktrcvr.lval)
		}

		/* look through exception table */
		xi := 0
		for {
			if wktExca[xi+0] == -1 && int(wktExca[xi+1]) == wktstate {
				break
			}
			xi += 2
		}
		for xi += 2; ; xi += 2 {
			wktn = int(wktExca[xi+0])
			if wktn < 0 || wktn == wkttoken {
				break
			}
		}
		wktn = int(wktExca[xi+1])
		if wktn < 0 {
			goto ret0
		}
	}
	if wktn == 0 {
		/* error ... attempt to resume parsing */
		switch Errflag {
		case 0: /* brand new error */
			wktlex.Error(wktErrorMessage(wktstate, wkttoken))
			Nerrs++
			if wktDebug >= 1 {
				__yyfmt__.Printf("%s", wktStatname(wktstate))
				__yyfmt__.Printf(" saw %s\n", wktTokname(wkttoken))
			}
			fallthrough

		case 1, 2: /* incompletely recovered error ... try again */
			Errflag = 3

			/* find a state where "error" is a legal shift action */
			for wktp >= 0 {
				wktn = int(wktPact[wktS[wktp].yys]) + wktErrCode
				if wktn >= 0 && wktn < wktLast {
					wktstate = int(wktAct[wktn]) /* simulate a shift of "error" */
					if int(wktChk[wktstate]) == wktErrCode {
						goto wktstack
					}
				}

				/* the current p has no shift on "error", pop stack */
				if wktDebug >= 2 {
					__yyfmt__.Printf("error recovery pops state %d\n", wktS[wktp].yys)
				}
				wktp--
			}
			/* there is no state on the stack with an error shift ... abort */
			goto ret1

		case 3: /* no shift yet; clobber input char */
			if wktDebug >= 2 {
				__yyfmt__.Printf("error recovery discards %s\n", wktTokname(wkttoken))
			}
			if wkttoken == wktEofCode {
				goto ret1
			}
			wktrcvr.char = -1
			wk


0px" style="position: static; top: 0px !important; left: 0px;">

  <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-closed flex-items-center mr-1" style="">
    <path d="M11.28 6.78a.75.75 0 0 0-1.06-1.06L7.25 8.69 5.78 7.22a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.06 0l3.5-3.5Z" style=""></path><path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 1 0-13 0 6.5 6.5 0 0 0 13 0Z" style=""></path>
</svg>
  Closed

    shift+クリックとかctrl+クリックが効かないエラーがあるような

  #43

                  funige  opened this issue
<relative-time datetime="2017-11-24T09:58:06Z" class="no-wrap" title="Nov 24, 2017, 6:58 PM GMT+9" style="">Nov 24, 2017<template shadowmode="open" style="">on Nov 24, 2017</template></relative-time>
· 1 comment

    <div class="


)
            for i = 1, count, 1 do
                local upgrade = upgrades[tostring(i)]
                local cost = tonumber(NPC_UNITS_CUSTOM[upgrade].Cost)
                local suffix = ""

                -- Put a _disabled item if the requirement isn't met yet
                if NPC_UNITS_CUSTOM[upgrade].Requirements then
                    for element, level in pairs(NPC_UNITS_CUSTOM[upgrade].Requirements) do
                        if level > data.elements[element] then
                            suffix = "_disabled"
                        end
                    end
                end

                local item = CreateItem("item_upgrade_to_" .. upgrade .. suffix, nil, nil)
                tower:AddItem(item)
            end
        end
    end)
end

-- starts the tower building animation
function BuildTower(tower, baseScale)
    tower:RemoveModifierByName("modifier_invulnerable")
    tower:RemoveModifierByName("modifier_tower_truesight_aura")
    tower:AddNewModifier(nil, nil, "modifier_disarmed", {}) --towers are disarmed until they finish building
    tower:AddNewModifier(nil, nil, "modifier_stunned", {}) --towers are stunned until they finish building

    local buildTime = GetUnitKeyValue(tower.class, "BuildTime")
    if not buildTime then
        print(tower.class .. " does not have a build time!")
        buildTime = 1
    else
        buildTime = tonumber(buildTime)
    end

    -- No Cooldown in sandbox
    if GetPlayerData(tower:GetPlayerOwnerID()).noCD then
        buildTime = 0.05
    end

    local scale = tower:GetModelScale()
    baseScale = baseScale or (scale / 2) -- Start at the old size (if its the same model) or at half the end size
    local scaleIncrement = (scale - baseScale) / (buildTime * 20)

    tower:SetModelScale(baseScale)
    tower:SetMaxHealth(buildTime * 20)
    tower:SetBaseMaxHealth(buildTime * 20)
    tower:SetHealth(1)
    tower:SetHullRadius(HULL_RADIUS)

    -- create a timer to build up the tower slowly
    Timers:CreateTimer(0.05, function()
        if not IsValidEntity(tower) or not tower:IsAlive() then return end
        tower:SetHealth(tower:GetHealth() + 1)
        tower:SetModelScale(tower:GetModelScale() + scaleIncrement)

        if tower:GetHealth() == tower:GetMaxHealth() then
            tower:RemoveModifierByName("modifier_disarmed")
            tower:RemoveModifierByName("modifier_stunned")
            tower:AddNewModifier(nil, nil, "modifier_invulnerable", {})

            tower:SetMaxHealth(GetUnitKeyValue(tower.class, "TotalCost"))
            tower:SetBaseMaxHealth(GetUnitKeyValue(tower.class, "TotalCost"))

            tower:SetHealth(tower:GetMaxHealth())

            -- Remove building cancel ability
            tower:RemoveAbility("cancel_construction")

            -- Show sell ability
            local sell_ability = FindSellAbility(tower)
            if sell_ability then
                sell_ability:SetHidden(false)
            end

            tower.scriptObject:OnBuildingFinished()
            return
        end
        return 0.05
    end)
end

function SetupTowerUpgrade(tower, newTower, buffData, stacks)
    local playerID = tower:GetPlayerOwnerID()
    local playerData = GetPlayerData(playerID)
    local scriptClassName = GetUnitKeyValue(newTower:GetUnitName(), "ScriptClass") or "BasicTower"
    local newClass = newTower:GetUnitName()
    local time


,1,!1,e.toLowerCase(),null,!0)}));var Ie="http://www.w3.org/1999/xhtml",Le="http://www.w3.org/2000/svg";function Be(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ue(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Be(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var qe,We=function(e){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==Le||"innerHTML"in e)e.innerHTML=t;else{for((qe=qe||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=qe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function He(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Ge(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ve={animationend:Ge("Animation","AnimationEnd"),animationiteration:Ge("Animation","AnimationIteration"),animationstart:Ge("Animation","AnimationStart"),transitionend:Ge("Transition","TransitionEnd")},$e={},Ye={};function Ke(e){if($e[e])return $e[e];if(!Ve[e])return e;var t,n=Ve[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ye)return $e[e]=n[t];return e}Z&&(Ye=document.createElement("div").style,"AnimationEvent"in window||(delete Ve.animationend.animation,delete Ve.animationiteration.animation,delete Ve.animationstart.animation),"TransitionEvent"in window||delete Ve.transitionend.transition);var Xe=Ke("animationend"),Je=Ke("animationiteration"),Qe=Ke("animationstart"),Ze=Ke("transitionend"),et="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" ");function tt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function nt(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function rt(e){if(tt(e)!==e)throw Error(o(188))}function it(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t


合は、そのコールバックの呼び出しから処理が戻るまでは、`stop_callback`のコンストラクタで受け取った関数オブジェクトが破棄されないようにデストラクタの実行がブロックされる。
もしデストラクタの呼び出し中に自身のコールバックが同じスレッドで実行中だった場合は、デストラクタの実行はブロックされない。

## 例
```cpp example
#include <cassert>
#include <chrono>
#include <functional>
#include <memory>
#include <stop_token>
#include <thread>

// CallbackFunc の状態を表す構造体
struct CallbackFuncStatus
{
  std::atomic<bool> started { false };
  std::atomic<bool> finished { false };
  std::atomic<bool> destructed { false };
};

// 停止要求に応じて呼び出される関数オブジェクト
struct CallbackFunc {
  CallbackFunc(CallbackFuncStatus* cfs) : cfs_(cfs) {}
  CallbackFunc(CallbackFunc&& rhs) {
    cfs_ = rhs.cfs_;
    rhs.cfs_ = nullptr;
  }

  CallbackFunc & operator=(CallbackFunc&& rhs) {
    cfs_ = rhs.cfs_;
    rhs.cfs_ = nullptr;
    return *this;
  }

  ~CallbackFunc() {
    if(cfs_) { cfs_->destructed = true; }
  }

  void operator()() {
    cfs_->started = true;
    std::this_thread::sleep_for(std::chrono::milliseconds(1000));
    cfs_->finished = true;
  }

private:
  CallbackFuncStatus* cfs_ { nullptr };
};

int main()
{
  // デストラクタ呼び出しのときに別のスレッドで自身のコールバックが実行中な場合のサンプル
  {
    std::stop_source ss;
    std::thread t;
    CallbackFuncStatus cfs;
    {
      std::stop_callback cb { ss.get_token(), CallbackFunc(&cfs) };

      // 別スレッドで cb のコールバックを呼び出す
      t = std::thread([&] { ss.request_stop(); });
      std::this_thread::sleep_for(std::chrono::milliseconds(100));

      assert(cfs.started == true);
      assert(cfs.destructed == false);

    } // ここで cb のデストラクタが呼び出されるが、
      // 別のスレッドで自身のコールバックを実行中なので、
      // それが完了するまでデストラクタの実行がブロックされ、
      // stop_callback のコンストラクタに渡した関数オブジェクトは破棄されない。

    // デストラクタの呼び出しが完了したならば、
    // それに先立って関数オブジェクトも破棄されているはず。
    assert(cfs.finished == true);
    assert(cfs.destructed == true);

    t.join();
  }

  // デストラクタ呼び出しのときに同じスレッドで自身のコールバックが実行中な場合のサンプル
  {
    std::stop_source ss;
    std::function<void()> reset_cb;

    auto on_callback = [&] { reset_cb(); }; // 停止要求に応じて呼び出される関数オブジェクト。
    auto cb = std::make_unique<std::stop_callback<decltype(on_callback)>>(ss.get_token(), on_callback);

    reset_cb = [&] { cb.reset(); }; // on_callback の中から呼び出す処理。cb を破棄する。

    //


ing(5, 9);

    // Not allowed are SSNs with all zeros in any digit group
    // (000-xx-####, ###-00-####, ###-xx-0000).
    if (area == "000" ||
        group == "00" ||
        serial == "0000") {
      results.add(new ValidationResult(true, zeroGroupError));
      return results;
    }

    // Not allowed are SSNs with Area Numbers 000, 666 and 900-999.
    int areaNumber = int.parse(area);
    if (areaNumber == 666 ||
        (areaNumber >= 900 && areaNumber <= 999)) {
      results.add(new ValidationResult(true, wrongAreaError));
      return results;
    }

    return results;
  }
}//Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved.
//Author: akserg

part of dart_web_toolkit_layout;

/**
 * Helper class for laying out a container element and its children.
 *
 *

 * This class is typically used by higher-level widgets to implement layout on
 * their behalf. It is intended to wrap an element (usually a <div>), and
 * lay its children out in a predictable fashion, automatically accounting for
 * changes to the parent's size, and for all elements' margins, borders, and
 * padding.
 *

 *
 *

 * To use this class, create a container element (again, usually a <div>)
 * and pass it to {@link #Layout(Element)}. Rather than attaching child elements
 * directly to the element managed by this {@link Layout}, use the
 * {@link Layout#attachChild(Element)} method. This will attach the child
 * element and return a {@link Layout.Layer} object which is used to manage the
 * child.
 *

 *
 *

 * A separate {@link Layout.Layer} instance is associated with each child
 * element. There is a set of methods available on this class to manipulate the
 * child element's position and size. In order for changes to a layer to take
 * effect, you must finally call one of {@link #layout()} or
 * {@link #layout(int)}. This allows many changes to different layers to be
 * applied efficiently, and to be animated.
 *

 *
 *

 * On most browsers, this is implemented using absolute positioning. It also
 * contains extra logic to make IE6 work properly.
 *

 *
 *

 *
Example

 * {@example com.google.gwt.examples.LayoutExample}
 *

 *
 *

 * NOTE: This class will only work in standards mode, which requires
 * that the HTML page in which it is run have an explicit <!DOCTYPE>
 * declaration.
 *

 *
 *

 * NOTE: This class is still very new, and its interface may change without
 * warning. Use at your own risk.
 *

 */
class Layout {

  LayoutImpl impl = new LayoutImpl.browserDependent();

  List<Layer> layers = new List<Layer>();
  dart_html.Element parentElem;
  Animation animation;

  /**
   * Constructs a new layout associated with the given parent element.
   *
   * @param parent the element to serve as the layout parent
   */
  Layout(dart_html.Element parent) {
    this.parentElem = parent;
    impl.initParent(parent);
  }

  /**
   * Asserts that the given child element is managed by this layout.
   *
   * @param elem the element to be tested
   */
  void assertIsChild(dart_html.Element elem) {
    assert (elem.parent.parent == this.parentElem); // : "Element is not a child of this layout";
  }

  /**
   * Attaches a child element to this layout.
   *
   *

   * This method will attach the child to the layout, removing it from its
   * current parent element. Use the {@link Layer} it returns to manipulate the
   * child.
   *

   *
   * @param child the child to be attached
   * @param before the child element before which to insert
   * @param userObject an arbitrary object to be associated


rated and should be regarded as a code template only.
        /// It will require modifications to work:
        /// - It may require correct/in-range values for request initialization.
        /// - It may require specifying regional endpoints when creating the service client as shown in
        ///   https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
        /// </remarks>
        public void GetPersistentResource()
        {
            // Create client
            PersistentResourceServiceClient persistentResourceServiceClient = PersistentResourceServiceClient.Create();
            // Initialize request argument(s)
            string name = "projects/[PROJECT]/locations/[LOCATION]/persistentResources/[PERSISTENT_RESOURCE]";
            // Make the request
            PersistentResource response = persistentResourceServiceClient.GetPersistentResource(name);
        }
    }
    // [END aiplatform_v1_generated_PersistentResourceService_GetPersistentResource_sync_flattened]
}


valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:var(--bs-success);padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:var(--bs-success);box-shadow:0 0 0 .25rem rgba(var(--bs-success-rgb),.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-valid,.was-validated .form-select:valid{border-color:var(--bs-success)}.form-select.is-valid:not([multiple]):not([size]),.form-select.is-valid:not([multiple])[size="1"],.was-validated .form-select:valid:not([multiple]):not([size]),.was-validated .form-select:valid:not([multiple])[size="1"]{--bs-form-select-bg-icon:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");padding-right:4.125rem;background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-valid:focus,.was-validated .form-select:valid:focus{border-color:var(--bs-success);box-shadow:0 0 0 .25rem rgba(var(--bs-success-rgb),.25)}.form-control-color.is-valid,.was-validated .form-control-color:valid{width:calc(3rem + calc(1.5em + .75rem))}.form-check-input.is-valid,.was-validated .form-check-input:valid{border-color:var(--bs-success)}.form-check-input.is-valid:checked,.was-validated .form-check-input:valid:checked{background-color:var(--bs-success-text)}.form-check-input.is-valid:focus,.was-validated .form-check-input:valid:focus{box-shadow:0 0 0 .25rem rgba(var(--bs-success-rgb),.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:var(--bs-success-text)}.form-check-inline .form-check-input~.valid-feedback{margin-left:.5em}.input-group>.form-control:not(:focus).is-valid,.input-group>.form-floating:not(:focus-within).is-valid,.input-g


 of Christ.
    That’s a lot of problems, even for Zeus. But there’s an even worse problem: A local store keeper needs you to find 100 feathers scattered around the city before he’ll sell you a clay pot. Which you apparently need, even though they’re everywhere.
     Anyway, the good news is, it looks like your boring feather hunt will have to wait, because there’s an angry mob of Byzantium guards lurking outside the pottery store. You’re going to have to quietly assassinate them all! Or find them 50 feathers each for some reason. Are feathers currency in the Byzantine Empire or something? Who knows. `,
  _ = "If you fight your way out of the store, turn to page 27.",
  _ = "27",
  _ =
    "You silently assassinate them all in the street in broad daylight. As you’re dragging the last one into the giant body pile under the street’s only shadow, you trip and accidentally sit on the vial with the blood of Christ in it. So now you’ve got a new problem, because the Knights Templar are not going to be happy about this.",
  _ = "You heroically assassinairated 50 city guards in broad daylight!",
  _ = "If you find the guards’ feathers, turn to page 36.",
  _ = "36",
  _ =
    'You agree to find something like five to six thousand feathers so you won’t have to fight the guards. It’s a lot of feathers — it would take you years to find that many — but you know something they don’t: You’re actually a sullen teenager in a simulation of second-century Byzantium, looking for your dad. So you "jack out" of the mainframe and "jack into" your 2004 Honda Element to drive to the feather store. ',
  _ =
    "Ever the cunning Assassinaire, you avoided a fight with the city guards by bribing them with precious feathers!",
  _ = "HACK ATTACK ON CYBER CITY",
  _ = "Sci-Fi & Cyberpunk",
  _ = "11",
  _ = `It is the year 2029. (Synthesizer hum.) PsiGenTech owns 99.999% of the world’s most precious, non-renewable resource… IP. (Synthesizer swells.)
     You are Enzo Monowire, owner of the only fictional character not controlled by PsiGenTech: Marmaduke, a large cartoon dog popular in the 1950s. But now PsiGenTech has a Netflix deal, and they’re coming for you.`,
  _ = "If you confront PsiGenTech, turn to page 28.",
  _ = "28",
  _ = `You arrange a meeting with PsiGenTech, just so you can laugh in their greedy faces with your smug cyber-mouth. They stalk into the conference room and surround you on all sides.
    Without warning, they offer you $37,000. You laugh in their faces as planned, then accept instantly. You had no idea Marmaduke was worth that much money. You have dinner at a nice restaurant while leafing through a catalog of futuristic mid-tier sedans.`,
  _ =
    "You confronted PsiGenTech and forced them to pay you $37,000! You’re now ready to settle into a life of modest luxury!",
  _ = "If you try to outwit PsiGenTech, turn to page 46.",
  _ = "46",
  _ = `You know something the cybersuits don’t: Marmaduke can’t be held in a cage. Marmaduke is a gift to the world. You race in your cyber-2004 Honda Element to the copyright office and file the paperwork to put Marmaduke into the public domain. The clerk tells you that Marmaduke has been in the public domain for 57 years.
     "I see," you say, tossing your katana from hand to hand.
     Five minutes of silence follow. The clerk asks: "Do you actually see?" You don’t, but the government can’t know that. You turn around and stalk back outside, your trenchcoat billowing in the neon breeze, secure in the knowledge that you have saved Marmaduke. Somehow.`,
  _ =
    "You did the one thing the corporate overlords didn’t expect: You gave away your prec


Prefs?.remove(walletId)
    }

    fun clear(context: Context) {
        context.deleteSharedPreferences(ENCRYPTED_WEB3_KEY)
    }

}
package one.mixin.android.pay

import one.mixin.android.pay.ParseState.ADDRESS
import one.mixin.android.pay.ParseState.CHAIN
import one.mixin.android.pay.ParseState.FUNCTION
import one.mixin.android.pay.ParseState.QUERY
import one.mixin.android.pay.erc831.ERC831
import one.mixin.android.pay.erc831.toERC831
import java.math.BigInteger

data class CommonEthereumURIData(
    var valid: Boolean = true,
    var scheme: String? = null,
    var prefix: String? = null,
    var chainId: BigInteger? = null,
    var address: String? = null,
    var function: String? = null,
    var query: List<Pair<String, String>> = listOf(),
)

private enum class ParseState {
    ADDRESS,
    CHAIN,
    FUNCTION,
    QUERY,
}

fun parseCommonURI(uri: String) = EthereumURI(uri).parseCommonURI()

fun ERC831.parseCommonURI() =
    let { erc831 ->
        CommonEthereumURIData().apply {
            scheme = erc831.scheme
            prefix = erc831.prefix

            var currentSegment = ""

            var currentState = ADDRESS

            var queryString = ""

            fun stateTransition(newState: ParseState) {
                when (currentState) {
                    CHAIN ->
                        chainId =
                            try {
                                BigInteger(currentSegment)
                            } catch (e: NumberFormatException) {
                                valid = false
                                null
                            }
                    FUNCTION -> function = currentSegment
                    ADDRESS -> address = currentSegment
                    QUERY -> queryString = currentSegment
                }
                currentState = newState
                currentSegment = ""
            }

            erc831.payload?.forEach { char ->
                when {
                    char == '/' && (currentState == ADDRESS || currentState == CHAIN)
                    -> stateTransition(FUNCTION)

                    char == '?' && (currentState == ADDRESS || currentState == FUNCTION || currentState == CHAIN)
                    -> stateTransition(QUERY)

                    char == '@'
                    -> stateTransition(CHAIN)

                    else -> currentSegment += char
                }
            }

            if (!currentSegment.isBlank()) {
                stateTransition(QUERY)
            }

            query =
                queryString.split("&")
                    .asSequence()
                    .filter { it.isNotBlank() }
                    .map { it.split("=", limit = 2) }
                    .map { it.first() to it.getOrElse(1) { "true" } }
                    .toList()

            valid = valid && scheme == "ethereum"
        }
    }

fun EthereumURI.parseCommonURI() = toERC831().parseCommonURI()
package one.mixin.android.repository

import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.withContext
import one.mixin.android.api.MixinResponse
import one.mixin.android.api.request.MemberOrderRequest
import one.mixin.android.api.response.MembershipOrder
import one.mixin.android.api.service.MemberService
import one.mixin.android.db.MembershipOrderDao
import javax.inject.Inject
import javax.inject.Singleton

@Singleton
class MemberRepository @Inject constructor(
    private val memberService: MemberService,
    private val orderDao: MembershipOrde


sr fillrand
	lda ptr1+1
	eor #$70
	sta ptr1+1
	jsr fillrand
	ldy #$4a
	jsr gettileaddr
	jmp randfire
	lda ptr1+1
	eor #$70
	sta ptr1+1
	jsr randfire
	rts

fillrand:
	ldy #$00
@fill:
	jsr fastrand
	sta (ptr1),y
	iny
	cpy #$40
	bne @fill
	rts

randfire:
	ldy #$0f
@rand:
	jsr fastrand
	and $b4a0,y
	eor $b4b0,y
	sta $b4b0,y
	jsr fastrand
	and $c4a0,y
	eor $c4b0,y
	sta $c4b0,y
	dey
	bpl @rand
	rts

	cpy #$08
	bne :+
	ldy #$00
	lda ptr1+1
	eor #$70
	sta ptr1+1
:	rts

animate_flags:
	jsr fastrand
	bmi @castle
	ldx $b0a3
	ldy $b0a4
	sty $b0a3
	stx $b0a4
@castle:
	jsr fastrand
	bmi @lbcastle
	ldx $b0b9
	ldy $b0ba
	sty $b0b9
	stx $b0ba
@lbcastle:
	jsr fastrand
	bmi @shipwest
	ldx $b0e1
	ldy $b0e2
	sty $b0e1
	stx $b0e2
@shipwest:
	jsr fastrand
	bmi @shipeast
	ldx $b102
	ldy $b103
	sty $b102
	stx $b103
	ldx $b10a
	ldy $b10b
	sty $b10a
	stx $b10b
@shipeast:
	jsr fastrand
	bmi @flagsdone
	ldx $b122
	ldy $b123
	sty $b122
	stx $b123
	ldx $b12a
	ldy $b12b
	sty $b12a
	stx $b12b
@flagsdone:
	rts

div32:
	lsr a
div16:
	lsr a
	lsr a
	lsr a
	lsr a
	rts

mul32:
	asl a
mul16:
	asl a
	asl a
	asl a
	asl a
	rts

scankey:
	lda $c6
	php
	lda $0277
	ora #$80
	plp
	beq @done
	cmp #$a0
	bne @notspace
	ldy #$00
	sty key_buf_len
@notspace:
	nop
	ldy key_buf_len
	cpy #$08
	bcs @done
	sta key_buf,y
	inc key_buf_len
	jsr clearkbd
@done:
	rts

clearkbd:
	pha
	lda #$00
	sta $c6
	pla
	rts

getkey:
	lda key_buf_len
	beq @empty
	lda key_buf
	pha
	dec key_buf_len
	beq @gotkey
	ldy #$00
@movebuf:
	lda key_buf+1,y
	sta key_buf,y
	iny
	cpy key_buf_len
	bcc @movebuf
@gotkey:
	pla
	cmp #$00
@empty:
	rts

rand:
	txa
	pha
	clc
	ldx #$0e
	lda rndf
@add:
	adc rnd0,x
	sta rnd0,x
	dex
	bpl @add
	ldx #$0f


# (source start file, target name, title,
#  author, documentclass [howto, manual, or own class]).
latex_documents = [
    (latex_master, 'OTT.tex', u'OTT Documentation',
     u'Isaac Lenton', 'manual'),
]

latex_logo = 'images/ott_icon.pdf'

# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
    (master_doc, 'ott', u'OTT Documentation',
     [author], 1)
]

# -- Options for Texinfo output ----------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
#  dir menu entry, description, category)
texinfo_documents = [
    (master_doc, 'OTT', u'OTT Documentation',
     author, 'OTT', 'One line description of project.',
     'Miscellaneous'),
]

# -- Options for Epub output -------------------------------------------------

# Bibliographic Dublin Core info.
epub_title = project

# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''

# A unique identification for the text.
#
# epub_uid = ''

# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']

# -- Extension configuration -------------------------------------------------

# -- Options for todo extension ----------------------------------------------

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True


an;\n	${1:#}BEGIN {extends '${2:ParentClass}'};\n\n	${3}\n# parent\nsnippet parent\n	use parent qw(${1:Parent Class});\n# Read File\nsnippet slurp\n	my $${1:var} = do { local $/; open my $file, '<', \"${2:file}\"; <$file> };\n	${3}\n# strict warnings\nsnippet strwar\n	use strict;\n	use warnings;\n# older versioning with perlcritic bypass\nsnippet vers\n	## no critic\n	our $VERSION = '${1:version}';\n	eval $VERSION;\n	## use critic\n# new 'switch' like feature\nsnippet switch\n	use feature 'switch';\n\n# Anonymous subroutine\nsnippet asub\n	sub {\n	 	${1:# body }\n	}\n\n\n\n# Begin block\nsnippet begin\n	BEGIN {\n		${1:# begin body}\n	}\n\n# call package function with some parameter\nsnippet pkgmv\n	__PACKAGE__->${1:package_method}(${2:var})\n\n# call package function without a parameter\nsnippet pkgm\n	__PACKAGE__->${1:package_method}()\n\n# call package \"get_\" function without a parameter\nsnippet pkget\n	__PACKAGE__->get_${1:package_method}()\n\n# call package function with a parameter\nsnippet pkgetv\n	__PACKAGE__->get_${1:package_method}(${2:var})\n\n# complex regex\nsnippet qrx\n	qr/\n	     ${1:regex}\n	/xms\n\n#simpler regex\nsnippet qr/\n	qr/${1:regex}/x\n\n#given\nsnippet given\n	given ($${1:var}) {\n		${2:# cases}\n		${3:# default}\n	}\n\n# switch-like case\nsnippet when\n	when (${1:case}) {\n		${2:# body}\n	}\n\n# hash slice\nsnippet hslice\n	@{ ${1:hash}  }{ ${2:array} }\n\n\n# map\nsnippet map\n	map {  ${2: body }    }  ${1: @array } ;\n\n\n\n# Pod stub\nsnippet ppod\n	=head1 NAME\n\n	${1:ClassName} - ${2:ShortDesc}\n\n	=head1 SYNOPSIS\n\n	  use $1;\n\n	  ${3:# synopsis...}\n\n	=head1 DESCRIPTION\n\n	${4:# longer description...}\n\n\n	=head1 INTERFACE\n\n\n	=head1 DEPENDENCIES\n\n\n	=head1 SEE ALSO\n\n\n# Heading for a subroutine stub\nsnippet psub\n	=head2 ${1:MethodName}\n\n	${2:Summary....}\n\n# Heading for inline subroutine pod\nsnippet psubi\n	=head2 ${1:MethodName}\n\n	${2:Summary...}\n\n\n	=cut\n# inline documented subroutine\nsnippet subpod\n	=head2 $1\n\n	Summary of $1\n\n	=cut\n\n	sub ${1:subroutine_name} {\n		${2:# body...}\n	}\n# Subroutine signature\nsnippet parg\n	=over 2\n\n	=item\n	Arguments\n\n\n	=over 3\n\n	=item\n	C<${1:DataStructure}>\n\n	  ${2:Sample}\n\n\n	=back\n\n\n	=item\n	Return\n\n	=over 3\n\n\n	=item\n	C<${3:...return data}>\n\n\n	=back\n\n


*
   * .google.appengine.v1.DomainMapping domain_mapping = 2;
   *
   * @return The domainMapping.
   */
  com.google.appengine.v1.DomainMapping getDomainMapping();

  /**
   *
   *
   *

   * A domain mapping containing the updated resource. Only fields set
   * in the field mask will be updated.
   *

   *
   * .google.appengine.v1.DomainMapping domain_mapping = 2;
   */
  com.google.appengine.v1.DomainMappingOrBuilder getDomainMappingOrBuilder();

  /**
   *
   *
   *

   * Required. Standard field mask for the set of fields to be updated.
   *

   *
   * .google.protobuf.FieldMask update_mask = 3;
   *
   * @return Whether the updateMask field is set.
   */
  boolean hasUpdateMask();

  /**
   *
   *
   *

   * Required. Standard field mask for the set of fields to be updated.
   *

   *
   * .google.protobuf.FieldMask update_mask = 3;
   *
   * @return The updateMask.
   */
  com.google.protobuf.FieldMask getUpdateMask();

  /**
   *
   *
   *

   * Required. Standard field mask for the set of fields to be updated.
   *

   *
   * .google.protobuf.FieldMask update_mask = 3;
   */
  com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder();
}
/*
 * Copyright 2025 Google LLC
 *
 * 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
 *
 *     https://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.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/appengine/v1/appengine.proto

// Protobuf Java Version: 3.25.8
package com.google.appengine.v1;

public interface DebugInstanceRequestOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.appengine.v1.DebugInstanceRequest)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   *

   * Name of the resource requested. Example:
   * `apps/myapp/services/default/versions/v1/instances/instance-1`.
   *

   *
   * string name = 1;
   *
   * @return The name.
   */
  java.lang.String getName();

  /**
   *
   *
   *

   * Name of the resource requested. Example:
   * `apps/myapp/services/default/versions/v1/instances/instance-1`.
   *

   *
   * string name = 1;
   *
   * @return The bytes for name.
   */
  com.google.protobuf.ByteString getNameBytes();

  /**
   *
   *
   *

   * Public SSH key to add to the instance. Examples:
   *
   * * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]`
   * * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}`
   *
   * For more information, see
   * [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).
   *

   *


=f.replace(/\s+/g,' ');var g=f.split(' '),h=[];for(var i=0;i<g.length;i++){var j=g[i];if(e.test(j)&&!d.test(j))if(CKEDITOR.tools.indexOf(h,j)==-1)h.push(j);}return h;};function b(c,d,e){var f=[],g=[],h;for(h=0;h<c.styleSheets.length;h++){var i=c.styleSheets[h],j=i.ownerNode||i.owningElement;if(j.getAttribute('data-cke-temp'))continue;if(i.href&&i.href.substr(0,9)=='chrome://')continue;var k=i.cssRules||i.rules;for(var l=0;l<k.length;l++)g.push(k[l].selectorText);}var m=a(g,d,e);for(h=0;h<m.length;h++){var n=m[h].split('.'),o=n[0].toLowerCase(),p=n[1];f.push({name:o+'.'+p,element:o,attributes:{'class':p}});}return f;};CKEDITOR.plugins.add('stylesheetparser',{requires:['styles'],onLoad:function(){var c=CKEDITOR.editor.prototype;c.getStylesSet=CKEDITOR.tools.override(c.getStylesSet,function(d){return function(e){var f=this;d.call(this,function(g){var h=f.config.stylesheetParser_skipSelectors||/(^body\.|^\.)/i,i=f.config.stylesheetParser_validSelectors||/\w+\.\w+/;e(f._.stylesDefinitions=g.concat(b(f.document.$,h,i)));});};});}});})();
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

CKEDITOR.dialog.add('anchor',function(a){var b=function(d){this._.selectedElement=d;var e=d.data('cke-saved-name');this.setValueOf('info','txtName',e||'');};function c(d,e){return d.createFakeElement(e,'cke_anchor','anchor');};return{title:a.lang.anchor.title,minWidth:300,minHeight:60,onOk:function(){var k=this;var d=CKEDITOR.tools.trim(k.getValueOf('info','txtName')),e={id:d,name:d,'data-cke-saved-name':d};if(k._.selectedElement){if(k._.selectedElement.data('cke-realelement')){var f=c(a,a.document.createElement('a',{attributes:e}));f.replace(k._.selectedElement);}else k._.selectedElement.setAttributes(e);}else{var g=a.getSelection(),h=g&&g.getRanges()[0];if(h.collapsed){if(CKEDITOR.plugins.link.synAnchorSelector)e['class']='cke_anchor_empty';if(CKEDITOR.plugins.link.emptyAnchorFix){e.contenteditable='false';e['data-cke-editable']=1;}var i=a.document.createElement('a',{attributes:e});if(CKEDITOR.plugins.link.fakeAnchor)i=c(a,i);h.insertNode(i);}else{if(CKEDITOR.env.ie&&CKEDITOR.env.version<9)e['class']='cke_anchor';var j=new CKEDITOR.style({element:'a',attributes:e});j.type=CKEDITOR.STYLE_INLINE;j.apply(a.document);}}},onHide:function(){delete this._.selectedElement;},onShow:function(){var h=this;var d=a.getSelection(),e=d.getSelectedElement(),f;if(e){if(CKEDITOR.plugins.link.fakeAnchor){var g=CKEDITOR.plugins.link.tryR


62.805333 0 123.733333 22.357333 171.690667 62.976 79.018667 67.242667 123.392 107.690667 132.096 120.661334-9.045333 8.704-48.128 47.104-86.528 84.138666z" fill="#333333" ></path><path d="M351.573333 379.562667c-14.165333 0-25.6 11.434667-25.6 25.6s11.434667 25.6 25.6 25.6h38.4v38.4c0 14.165333 11.434667 25.6 25.6 25.6s25.6-11.434667 25.6-25.6v-38.4h38.4c14.165333 0 25.6-11.434667 25.6-25.6s-11.434667-25.6-25.6-25.6h-38.4v-12.8h38.4c14.165333 0 25.6-11.434667 25.6-25.6s-11.434667-25.6-25.6-25.6h-12.8l30.890667-30.890667c10.069333-10.069333 10.069333-26.282667 0-36.181333s-26.282667-10.069333-36.181333 0l-45.909334 45.909333-45.909333-45.909333c-10.069333-10.069333-26.282667-10.069333-36.181333 0s-10.069333 26.282667 0 36.181333l30.890666 30.890667h-12.8c-14.165333 0-25.6 11.434667-25.6 25.6s11.434667 25.6 25.6 25.6h38.4v12.8H351.573333z" fill="#333333" ></path><path d="M518.997333 557.738667h-303.786666c-37.717333 0-68.266667-30.549333-68.266667-68.266667V124.416c0-37.717333 30.549333-68.266667 68.266667-68.266667h303.786666c37.717333 0 68.266667 30.549333 68.266667 68.266667v365.056c0 37.717333-30.549333 68.266667-68.266667 68.266667z" fill="#333333" opacity=".3" ></path></symbol><symbol id="icon-a-11Cfenzuzuzhishu" viewBox="0 0 1024 1024"><path d="M924.95 594.07h-109.2v-96.54H539.47v-67.6h120.51c23.29 0 35.05-11.76 35.05-35.05v-279.9c0-23.29-11.76-35.05-35.05-35.05h-279.9c-23.29 0-35.05 11.76-35.05 35.05v279.9c0 23.29 11.76 35.05 35.05 35.05H499.9v67.6H224.3v96.54H99.05c-23.29 0-35.05 11.76-35.05 35.05v279.9c0 23.29 11.76 35.05 35.05 35.05h279.9c23.29 0 35.05-11.76 35.05-35.05v-279.9c0-23.29-11.76-35.05-35.05-35.05H263.41v-61.95h513.45v61.95H645.05c-23.29 0-35.05 11.76-35.05 35.05v279.9c0 23.29 11.76 35.05 35.05 35.05h279.9c23.29 0 35.05-11.76 35.05-35.05v-279.9c0-23.29-11.76-35.05-35.05-35.05z"  ></path></symbol></svg>',v=(v=document.getElementsByTagName("script"))[v.length-1].getAttribute("data-injectcss"),z=function(c,a){a.parentNode.insertBefore(c,a)};if(v&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;fo


e Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// Common input/output used by builder, parser and end2end tests
library;

import 'package:source_maps/source_maps.dart';
import 'package:source_span/source_span.dart';
import 'package:test/test.dart';

/// Content of the source file
const String inputContent = '''
/** this is a comment. */
int longVar1 = 3;

// this is a comment too
int longName(int longVar2) {
  return longVar1 + longVar2;
}
''';
final input = SourceFile.fromString(inputContent, url: 'input.dart');

/// A span in the input file
SourceMapSpan ispan(int start, int end, [bool isIdentifier = false]) =>
    SourceMapFileSpan(input.span(start, end), isIdentifier: isIdentifier);

SourceMapSpan inputVar1 = ispan(30, 38, true);
SourceMapSpan inputFunction = ispan(74, 82, true);
SourceMapSpan inputVar2 = ispan(87, 95, true);

SourceMapSpan inputVar1NoSymbol = ispan(30, 38);
SourceMapSpan inputFunctionNoSymbol = ispan(74, 82);
SourceMapSpan inputVar2NoSymbol = ispan(87, 95);

SourceMapSpan inputExpr = ispan(108, 127);

/// Content of the target file
const String outputContent = '''
var x = 3;
f(y) => x + y;
''';
final output = SourceFile.fromString(outputContent, url: 'output.dart');

/// A span in the output file
SourceMapSpan ospan(int start, int end, [bool isIdentifier = false]) =>
    SourceMapFileSpan(output.span(start, end), isIdentifier: isIdentifier);

SourceMapSpan outputVar1 = ospan(4, 5, true);
SourceMapSpan outputFunction = ospan(11, 12, true);
SourceMapSpan outputVar2 = ospan(13, 14, true);
SourceMapSpan outputVar1NoSymbol = ospan(4, 5);
SourceMapSpan outputFunctionNoSymbol = ospan(11, 12);
SourceMapSpan outputVar2NoSymbol = ospan(13, 14);
SourceMapSpan outputExpr = ospan(19, 24);

/// Expected output mapping when recording the following four mappings:
///      inputVar1       <=   outputVar1
///      inputFunction   <=   outputFunction
///      inputVar2       <=   outputVar2
///      inputExpr       <=   outputExpr
///
/// This mapping is stored in the tests so we can independently test the builder
/// and parser algorithms without relying entirely on end2end tests.
const Map<String, dynamic> expectedMap = {
  'version': 3,
  'sourceRoot': '',
  'sources': ['input.dart'],
  'names': ['longVar1', 'longName', 'longVar2'],
  'mappings': 'IACIA;AAGAC,EAAaC,MACR',
  'file': 'output.dart'
};

void check(SourceSpan outputSpan, Mapping mapping, SourceMapSpan inputSpan,
    bool realOffsets) {
  var line = outputSpan.start.line;
  var column = outputSpan.start.column;
  var files = realOffsets ? {'input.dart': input} : null;
  var span = mapping.spanFor(line, column, files: files)!;
  var span2 = mapping.spanForLocation(outputSpan.start, files: files)!;

  // Both mapping APIs are equivalent.
  expect(span.start.offset, span2.start.offset);
  expect(span.start.line, span2.start.line);
  expect(span.start.column, span2.start.column);
  expect(span.end.offset, span2.end.offset);
  expect(span.end.line, span2.end


erHandler;
import util.PathUtils;

public class LocalFileBrowserView extends AbstractFileBrowserView {
	private LocalMenuHandler menuHandler;
	private DndTransferHandler transferHandler;
	private LocalFileSystem fs;
	private JPopupMenu addressPopup;

	public LocalFileBrowserView(FileBrowser fileBrowser, String initialPath, PanelOrientation orientation) {
		super(orientation, fileBrowser);
		this.menuHandler = new LocalMenuHandler(fileBrowser, this);
		this.menuHandler.initMenuHandler(this.folderView);
		this.transferHandler = new DndTransferHandler(this.folderView, null, this, DndTransferData.DndSourceType.LOCAL,
				this.fileBrowser);
		this.folderView.setTransferHandler(transferHandler);
		this.folderView.setFolderViewTransferHandler(transferHandler);
		this.addressPopup = menuHandler.createAddressPopup();
		if (initialPath != null) {
			this.path = initialPath;
		}
		fileBrowser.getHolder().EXECUTOR.submit(() -> {
			try {
				this.fs = new LocalFileSystem();
				if (this.path == null) {
					path = fs.getHome();
				}
				List<FileInfo> list = fs.list(path);
				SwingUtilities.invokeLater(() -> {
					addressBar.setText(path);
					folderView.setItems(list);
					tabTitle.getCallback().accept(PathUtils.getFileName(path));
				});
			} catch (Exception e) {
				e.printStackTrace();
			}
		});
	}

	public void createAddressBar() {
		addressBar = new AddressBar(File.separatorChar, new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				String selectedPath = e.getActionCommand();
				addressPopup.setName(selectedPath);
				MouseEvent me = (MouseEvent) e.getSource();
				addressPopup.show(me.getComponent(), me.getX(), me.getY());
				System.out.println("clicked");
			}
		});
		if (App.getGlobalSettings().isShowPathBar()) {
			addressBar.switchToPathBar();
		} else {
			addressBar.switchToText();
		}
	}

	@Override
	public String toString() {
		return "Local files [" + this.path + "]";
	}

	public String getHostText() {
		return "Local files";
	}

	public String getPathText() {
		return (this.path == null || this.path.length() < 1 ? "" : this.path);
	}

	@Override
	public void render(String path, boolean useCache) {
		this.render(path);
	}

	@Override
	public void render(String path) {
		this.path = path;
		fileBrowser.getHolder().EXECUTOR.submit(() -> {
			fileBrowser.disableUi();
			try {
				if (this.path == null) {
					this.path = fs.getHome();
				}
				List<FileInfo> list = fs.list(this.path);
				SwingUtilities.invokeLater(() -> {
					addressBar.setText(this.path);
					folderView.setItems(list);
					int tc = list.size();
					String text = String.format("Total %d remote file(s)", tc);
					fileBrowser.updateRemoteStatus(text);
					tabTitle.getCallback().accept(PathUtils.getFileName(this.path));
				});
			} catch (Exception e) {
				e.printStackTrace();
			}
			fileBrowser.enableUi();
		});
	}

	@Override
	public void openApp(FileInfo file) {
		// PlatformAppLauncher.shellLaunch(file.getPath());
	}

	@Override
	public boolean createMenu(JPopupMenu popup, FileInfo[] files) {
		menuHandler.createMenu(popup, files);
		return true;


FFLElBQUksRUFDVixHQUFHLEVBQUUsR0FBRyxHQUNYOztBQUNELEFBQUEsWUFBWSxBQUFBLE9BQU8sQ0FBQyxFQUNoQixJQUFJLEVBQUUsSUFBSSxHQUNiOztBQUNELEFBQUEsY0FBYyxDQUFDLFlBQVksQUFBQSxRQUFRLEVBQ25DLGNBQWMsQ0FBQyxZQUFZLEFBQUEsT0FBTyxDQUFDLEVBQy9CLEtBQUssRUFBRSxJQUFJLEVBQ1gsTUFBTSxFQUFFLEdBQUcsRUFDWCxJQUFJLEVBQUUsR0FBRyxFQUNULEdBQUcsRUFBRSxJQUFJLEdBQ1o7O0FBQ0QsQUFBQSxjQUFjLENBQUMsWUFBWSxBQUFBLE9BQU8sQ0FBQyxFQUMvQixHQUFHLEVBQUUsSUFBSSxHQUNaOztBQUVELHFCQUNHO0NBQ0gsQUFBQSxBQUFBLFFBQUMsQUFBQSxDQUFTLGFBQWEsR0FDdkIsQUFBQSxRQUFDLEFBQUEsRUFBVSxhQUFhLENBQUMsRUFDckIsVUFBVSxFQUFFLGtCQUFrQixHQUNqQzs7Q0FDRCxBQUFBLEFBQUEsUUFBQyxBQUFBLEVBQVUsWUFBWSxDQUFDLEVBQ3BCLE1BQU0sRUFBRSxXQUFXLEdBQ3RCOztBQUVELG9CQUNHO0FBQ0gsQUFBQSxtQkFBbUIsQUFBQSxhQUFhLEVBQ2hDLG1CQUFtQixDQUFDLGFBQWEsQ0FBQyxFQUM5QixVQUFVLEVBQUUsT0FBTyxHQUN0QiJ9 */

/*# sourceMappingURL=vendor.css.map */
/*!
 * Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com
 * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
 */
svg:not(:root).svg-inline--fa {
  overflow: visible; }

.svg-inline--fa {
  display: inline-block;
  font-size: inherit;
  height: 1em;
  overflow: visible;
  vertical-align: -.125em; }
  .svg-inline--fa.fa-lg {
    vertical-align: -.225em; }
  .svg-inline--fa.fa-w-1 {
    width: 0.0625em; }
  .svg-inline--fa.fa-w-2 {
    width: 0.125em; }
  .svg-inline--fa.fa-w-3 {
    width: 0.1875em; }
  .svg-inline--fa.fa-w-4 {
    width: 0.25em; }
  .svg-inline--fa.fa-w-5 {
    width: 0.3125em; }
  .svg-inline--fa.fa-w-6 {
    width: 0.375em; }
  .svg-inline--fa.fa-w-7 {
    width: 0.4375em; }
  .svg-inline--fa.fa-w-8 {
    width: 0.5em; }
  .svg-inline--fa.fa-w-9 {
    width: 0.5625em; }


ecoders.CD;

namespace Aaru.DiscImages
{
    // TODO: There seems no be no clear definition on how to treat pregaps that are not included in the file, so this is just appending it to start of track
    // TODO: This format doesn't support to specify pregaps that are included in the file (like Redump ones)
    public sealed partial class Gdi : IOpticalMediaImage
    {
        private static Regex regexTrack = new Regex(REGEX_TRACK, RegexOptions.Compiled);

        ulong        _densitySeparationSectors;
        GdiDisc      _discImage;
        StreamReader _gdiStream;
        ImageInfo    _imageInfo;
        Stream       _imageStream;
        /// <summary>Dictionary, index is track #, value is track number, or 0 if a TOC</summary>
        Dictionary<uint, ulong> _offsetMap;
        SectorBuilder _sectorBuilder;

        public Gdi() => _imageInfo = new ImageInfo
        {
            ReadableSectorTags    = new List<SectorTagType>(),
            ReadableMediaTags     = new List<MediaTagType>(),
            HasPartitions         = true,
            HasSessions           = true,
            Version               = null,
            ApplicationVersion    = null,
            MediaTitle            = null,
            Creator               = null,
            MediaManufacturer     = null,
            MediaModel            = null,
            MediaPartNumber       = null,
            MediaSequence         = 0,
            LastMediaSequence     = 0,
            DriveManufacturer     = null,
            DriveModel            = null,
            DriveSerialNumber     = null,
            DriveFirmwareRevision = null
        };
    }
}


, pos = { x = 148.0, y = 59.0, z = 120.5 } },
	{ config_id = 14, shape = RegionShape.CUBIC, size = { x = 120.0, y = 1.0, z = 44.6 }, pos = { x = 108.1, y = 56.5, z = 121.6 } }
}

-- 触发器
triggers = {
	{ name = "ANY_MONSTER_DIE_11", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_11", action = "action_EVENT_ANY_MONSTER_DIE_11" },
	{ name = "ENTER_REGION_12", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_12", action = "action_EVENT_ENTER_REGION_12", forbid_guest = false },
	{ name = "ENTER_REGION_13", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_13", action = "action_EVENT_ENTER_REGION_13", forbid_guest = false },
	{ name = "ENTER_REGION_14", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_14", action = "action_EVENT_ENTER_REGION_14", forbid_guest = false }
}

-- 变量
variables = {
}

--================================================================
--
-- 初始化配置
--
--================================================================

-- 初始化时创建
init_config = {
	suite = 2,
	end_suite = 0,
	rand_suite = false
}

--================================================================
--
-- 小组配置
--
--================================================================

suites = {
	{
		-- suite_id = 1,
		-- description = ,
		monsters = { 32, 33, 34, 39, 40, 41, 42 },
		gadgets = { 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 },
		regions = { 12, 13 },
		triggers = { "ANY_MONSTER_DIE_11", "ENTER_REGION_12", "ENTER_REGION_13" },
		rand_weight = 100
	},
	{
		-- suite_id = 2,
		-- description = suite_2,
		monsters = { },
		gadgets = { },
		regions = { 14 },
		triggers = { "ENTER_REGION_14" },
		rand_weight = 100
	}
}

--================================================================
--
-- 触发器
--
--================================================================

-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_11(context, evt)
	if 42 ~= evt.param1 then
		return false
	end

	return true
end

-- 触发操作
function action_EVENT_AN