7F08,$7F20,$7F37,$7F4C
		dc.w	$7F61,$7F74,$7F86,$7F96,$7FA6,$7FB4,$7FC1,$7FCD
		dc.w	$7FD7,$7FE0,$7FE8,$7FEF,$7FF5,$7FF9,$7FFC,$7FFE

text:	dc.b	' If you think this is all,boy you''re so wrong...                                           FUCK OFF YA BASTARD!       Furk orf.  Fekk oerf.       Bloody hell if you expect one of those big headed ''we are little shits'' scrolltexts '
	dc.b	'then go look at the Mind Bum demo by The Lousy Boys.      Oh,before anything,I must thank Russel Payne for getting me started in 3D and all those hints & tips plus Griff for suggesting the expansion of objects so they''d be smoother. '
	dc.b	'   Rite...  Now did you know this demo was controllable?  No?  Neither did I coz this is all ripped code and...      Oh,sorry about that,I thought I was Manikin.       Rite...  Keys are...  Keys 1 to 4 on the keyboard change palettes '
	dc.b	'for the objects.  Keys 1-3 on the keypad (keyPAD!) change the light source from front,top and side respectively.  The TAB key will invert the light source point (so if you have pressed 2 on the keypad and then you press TAB then the '
	dc.b	'light source will change from left to right and vice (chains) versa)    The bracket ( ) keys on the keypad will zoom in and out ''('' bracket for zoom out and the other for in. (Sounds like sex this though I wouldn''t know!)   '
	dc.b	'More!!  The Insert and Clr home keys decrease and increase the Z rotation respectively.  The same for both sets of arrow keys: up & down for Y and left and right for X.  Hitting the UNDO key will stop all rotations,and at any point '
	dc.b	'pressing (or hitting depending if you''re into sado-masochism) the HELP key will restore everything back to normal (and a happy ending when Dorothy gets banged by the Tin Man and gang banged by a pack of schoolchildren)...   You can '
	dc.b	'also step through the objects yourself by using the plus and minus keys (+- for those absolute bastards who think I don''t have a full character set so NAAAAAAAAAAH!) to increase/decrease the object number... Although you have to press '
	dc.b	'the ESCape key first to tell me ole proggy to stop cycling through


.jupiter.api.Test;
import org.mockito.Mockito;

public class AdminRequestHandlerTest {
  private Admin admin = mock(Admin.class);
  private MockHttpResponder httpResponder;

  private AdminRequestHandler handler;

  @BeforeEach
  public void init() {
    httpResponder = new MockHttpResponder();

    handler =
        new AdminRequestHandler(
            AdminRoutes.forClient(),
            admin,
            new BasicResponseRenderer(),
            new NoAuthenticator(),
            false,
            Collections.emptyList(),
            Collections.emptyList(),
            new DataTruncationSettings(Limit.UNLIMITED));
  }

  @Test
  public void shouldSaveMappingsWhenSaveCalled() {
    Request request = aRequest().withUrl("/mappings/save").withMethod(POST).build();

    handler.handle(request, httpResponder, null);
    Response response = httpResponder.response;

    assertThat(response.getStatus(), is(HTTP_OK));
    verify(admin).saveMappings();
  }

  @Test
  public void shouldClearMappingsJournalAndRequestDelayWhenResetCalled() {
    Request request = aRequest().withUrl("/reset").withMethod(POST).build();

    handler.handle(request, httpResponder, null);
    Response response = httpResponder.response;

    assertThat(response.getStatus(), is(HTTP_OK));
    verify(admin).resetAll();
  }

  @Test
  public void shouldClearJournalWhenResetRequestsCalled() {
    Request request = aRequest().withUrl("/requests").withMethod(DELETE).build();

    handler.handle(request, httpResponder, null);
    Response response = httpResponder.response;

    assertThat(response.getStatus(), is(HTTP_OK));
    verify(admin).resetRequests();
  }

  private static final String REQUEST_PATTERN_SAMPLE =
      "{												\n"
          + "	\"method\": \"DELETE\",						\n"
          + "	\"url\": \"/some/resource\"					\n"
          + "}												";

  @Test
  public void shouldReturnCountOfMatchingRequests() {
    RequestPattern requestPattern = newRequestPattern(DELETE, urlEqualTo("/some/resource")).build();
    Mockito.when(admin.countRequestsMatching(requestPattern))
        .thenReturn(VerificationResult.withCount(5));

    handler.handle(
        aRequest()
            .withUrl("/requests/count")
            .withMethod(POST)
            .withBody(REQUEST_PATTERN_SAMPLE)
            .build(),
        httpResponder,
        null);
    Response response = httpResponder.response;

    assertThat(response.getStatus(), is(HTTP_OK));
    assertThat(
        response.getBodyAsString(),
        equalToJson("{ \"count\": 5, \"requestJournalDisabled\" : false}"));
  }

  private static final String GLOBAL_SETTINGS_JSON =
      "{												\n" + "	\"fixedDelay\": 2000						\n" + "}												";

  @Test
  public void shouldUpdateGlobalSettings() {
    handler.handle(
        aRequest().withUrl("/settings").withMethod(POST).withBody(GLOBAL_SETTINGS_JSON).build(),
        httpResponder,
        null);

    GlobalSettings expectedSettings = GlobalSettings.builder().fixedDelay(2000).build();
    verify(admin).updateGlobalSettings(expectedSettings);
  }
}
/*
 * Copyright (C) 2016-2024 Thomas Akehurst
 *
 * 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 lang


etAdministrator()));
    }

    /**
     * 获取当前企业下所有菜单
     *
     * @api {GET} /backstage/enterprise/menu/list list
     * @apiDescription 获取当前企业下所有菜单
     * @apiVersion 1.0.0
     * @apiGroup EnterpriseMenu
     * @apiName list
     * @apiParamExample 请求参数示例
     * {}
     * @apiSuccessExample 响应结果示例
     * {
     *     code: 0,
     *     status: 'success',
     *     message: '成功!',
     *     data: {
     *          id: '', // ID
     *          name_cn: '', // 中文名称
     *          name_en: '', // 英文名称
     *          type: '', // 类型：0-目录 1-菜单 2-按钮 3-iframe 4-外链
     *          icon: '', // 图标
     *          sort: '', // 排序
     *          menu_id: '', // 菜单ID
     *          parent_id: '', // 父级ID
     *          enterprise_id: '', // 企业ID
     *          children: [{
     *               id: '', // ID
     *               name_cn: '', // 中文名称
     *               name_en: '', // 英文名称
     *               type: '', // 类型：0-目录 1-菜单 2-按钮 3-iframe 4-外链
     *               icon: '', // 图标
     *               sort: '', // 排序
     *               menu_id: '', // 菜单ID
     *               parent_id: '', // 父级ID
     *               enterprise_id: '', // 企业ID
     *               children: []
     *          }]
     *     }
     * }
     */
    @RequiresPermissions("enterpriseMenu:list")
    @GetMapping("/list")
    public R list() {
        return R.success(enterpriseMenuService.list(getEnterpriseId()));
    }

    /**
     * 修改企业菜单
     *
     * @api {GET} /backstage/enterprise/menu/update update
     * @apiDescription 修改企业菜单
     * @apiVersion 1.0.0
     * @apiGroup EnterpriseMenu
     * @apiName update
     * @apiParamExample 请求参数示例
     * {
     *     id: '', // ID
     *     name_cn: '', // 中文名称
     *     name_en: '', // 英文名称
     *     icon: '', // 图标
     *     sort: '', // 排序
     * }
     * @apiSuccessExample 响应结果示例
     * {
     *     code: 0,
     *     status: 'success',
     *     message: '成功!'
     * }
     */
    @Log("编辑企业菜单")
    @RequiresPermissions("enterpriseMenu:update")
    @PostMapping("/update")
    public R update(@RequestBody @Validated EnterpriseMenuUpdateForm enterpriseMenuForm) {
        enterpriseMenuForm.setUpdater(getAdministratorId());
        enterpriseMenuService.update(enterpriseMenuForm);
        return R.success();
    }

    /**
     * 获取管理员在该企业下的菜单权限 非树形 只包括名称 id
     * 超级管理员 返回所有 否则 返回该用户角色下面的所有
     *
     * @


125rem;
    background-size: 1.125rem 1.125rem;
}

.has-success .col-form-label, .has-success .custom-control, .has-success .form-check-label, .has-success .form-control-feedback, .has-success .form-control-label {
  color: $success;
}

.has-success .form-control-success {
  background-image: url(/images/success.svg);
}

.has-success .form-control {
  border-color: $success;
}

.has-warning .col-form-label, .has-warning .custom-control, .has-warning .form-check-label, .has-warning .form-control-feedback, .has-warning .form-control-label {
  color: $warning;
}

.has-warning .form-control-warning {
  background-image: url(/images/warning.svg);
}

.has-warning .form-control {
  border-color: $warning;
}

.has-danger .col-form-label, .has-danger .custom-control, .has-danger .form-check-label, .has-danger .form-control-feedback, .has-danger .form-control-label {
  color: $danger;
}

.has-danger .form-control-danger {
  background-image: url(/images/danger.svg);
}

.has-danger .form-control {
  border-color: $danger;
}

.input-group-addon {
  [type="radio"]:not(:checked),
  [type="radio"]:checked,
  [type="checkbox"]:not(:checked),
  [type="checkbox"]:checked {
    position: initial;
    opacity: 1;
  }
}

.invisible {
  visibility: hidden !important;
}

.hidden-xs-up {
  display: none !important;
}

@media (max-width: 575px) {
  .hidden-xs-down {
    display: none !important;
  }
}

@media (min-width: 576px) {
  .hidden-sm-up {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .hidden-sm-down {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .hidden-md-up {
    display: none !important;
  }
}

@media (max-width: 991px) {
  .hidden-md-down {
    display: none !important;
  }
}

@media (min-width: 992px) {
  .hidden-lg-up {
    display: none !important;
  }
}

@media (max-width: 1199px) {
  .hidden-lg-down {
    display: none !important;
  }
}

@media (min-width: 1200px) {
  .hidden-xl-up {
    display: none !important;
  }
}

.hidden-xl-down {
  display: none !important;
}

.card-inverse {
    .card-blockquote, .card-footer, .card-header, .card-title{
      color:$white;
    }
}
/*
Template Name: Monster Admin
Author: Themedesigner
Email: niravjoshi87@gmail.com
File: scss
*/
@import 'variable';

/*******************
Main sidebar
******************/

.left-sidebar {
  position: absolute;
  width: 200px;
  height: 100%;
  top: 0px;
  z-index: 20;
  padding-top: 40px;
  background: $sidebar;
  /*box-shadow: 1px 0px 20px rgba(0, 0, 0, 0.08);*/
}

.fix-sidebar .left-sidebar {
  position: fixed;
}

/*******************
use profile section
******************/

.user-profile {
  text-align: center;
  pos


 diffLength : impulseModifier;
            // Note the implication that the real rules of physics don't apply to pulling control.
            var accel = diff.Normalized() * multiplier;
            // Now for the part where velocity gets shutdown...
            if (diffLength < SettleShutdownDistance && physics.LinearVelocity.Length() >= SettleMinimumShutdownVelocity)
            {
                // Shutdown velocity increases as we get closer to centre
                var scaling = (SettleShutdownDistance - diffLength) / SettleShutdownDistance;
                accel -= physics.LinearVelocity * SettleShutdownMultiplier * scaling;
            }

            PhysicsSystem.WakeBody(pullableEnt, body: physics);

            var impulse = accel * physics.Mass * frameTime;
            PhysicsSystem.ApplyLinearImpulse(pullableEnt, impulse, body: physics);

            // if the puller is weightless or can't move, then we apply the inverse impulse (Newton's third law).
            // doing it under gravity produces an unsatisfying wiggling when pulling.
            // If player can't move, assume they are on a chair and we need to prevent pull-moving.
            if (_gravity.IsWeightless(puller) && pullerXform.Comp.GridUid == null || !_actionBlockerSystem.CanMove(puller))
            {
                PhysicsSystem.WakeBody(puller);
                PhysicsSystem.ApplyLinearImpulse(puller, -impulse);
            }
        }
    }
}


truct GenericEditorClickCheckboxParams
        {
            //Important: These param names come from the DevEx core. Do not change/add/remove them until this event changes version
            public string name;
            public string tool;
            public string component;
            public bool value;
            public string platform;
        }

        public object CreateEventParams(string platformName)
        {
            return new GenericEditorClickCheckboxParams
            {
                name = m_Name,
                tool = m_Tool,
                component = m_Component,
                value = m_Value,
                platform = platformName
            };
        }
    }
}


Offset, lastOffset,
          (progress - adjustProgress) / (1 - adjustProgress))!;

      path.lineTo(_lastOffset.dx, _lastOffset.dy);
    }

    context.canvas.drawPath(path, paint..style = PaintingStyle.stroke);
  }

  @override
  void performLayout() {
    size = constraints.constrain(
        constraints.isTight ? Size.infinite : const Size(25.0, 25.0));
  }

  @override
  bool hitTestSelf(Offset position) => true;

  // @override
  // void handleEvent(
  //     PointerEvent event, covariant HitTestEntry<HitTestTarget> entry) {
  //   if (event.down) {
  //     pointerId = event.pointer;
  //   } else if (pointerId == event.pointer) {
  //     onChanged?.call(!value);
  //   }
  // }
}
import 'dart:async';
import 'dart:convert';
import 'dart:math';

import 'package:back_button_interceptor/back_button_interceptor.dart';
import 'package:desktop_multi_window/desktop_multi_window.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_hbb/common/formatter/id_formatter.dart';
import 'package:flutter_hbb/desktop/widgets/refresh_wrapper.dart';
import 'package:flutter_hbb/desktop/widgets/tabbar_widget.dart';
import 'package:flutter_hbb/main.dart';
import 'package:flutter_hbb/models/peer_model.dart';
import 'package:flutter_hbb/models/state_model.dart';
import 'package:flutter_hbb/utils/multi_window_manager.dart';
import 'package:flutter_hbb/utils/platform_channel.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:uni_links/uni_links.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:uuid/uuid.dart';
import 'package:window_manager/window_manager.dart';
import 'package:window_size/window_size.dart' as window_size;

import '../consts.dart';
import 'common/widgets/overlay.dart';
import 'mobile/pages/file_manager_page.dart';
import 'mobile/pages/remote_page.dart';
import 'mobile/pages/view_camera_page.dart';
import 'mobile/pages/terminal_page.dart';
import 'desktop/pages/remote_page.dart' as desktop_remote;
import 'desktop/pages/file_manager_page.dart' as desktop_file_manager;
import 'desktop/pages/view_camera_page.dart' as desktop_view_camera;
import 'package:flutter_hbb/desktop/widgets/remote_toolbar.dart';
import 'models/model.dart';
import 'models/platform_model.dart';

import 'package:flutter_hbb/native/win32.dart'
    if (dart.library.html) 'package:flutter_hbb/web/win32.dart';
import 'package:flutter_hbb/native/common.dart'
    if (dart.library.html) 'package:flutter_hbb/web/common.dart';
import 'package:http/http.dart' as http;

final globalKey = GlobalKey<NavigatorState>();
final navigationBarKey = GlobalKey();

final isAndroid = isAndroid_;
final isIOS = isIOS_;
final isWindows = isWindows_;
final isMacOS = isMacOS_;
final isLinux = isLinux_;
final isDesktop = isDesktop_;
final isWeb = isWeb_;


return function()
	local Packages = script.Parent.Parent.Parent.Parent
	local Roact = require(Packages.Roact)
	local CheckboxList = require(script.Parent.CheckboxList)
	local mockStyleComponent = require(Packages.UIBlox.Utility.mockStyleComponent)
	local Images = require(Packages.UIBlox.App.ImageSet.Images)

	describe("lifecycle", function()
		it("should mount and unmount without issue", function()
			local frame = Instance.new("Frame")
			local element = mockStyleComponent({
				CheckboxList = Roact.createElement(CheckboxList, {
					checkboxes = {"a", "b", "c"},
					onActivated = function() end,
					elementSize = UDim2.new(0, 50, 0, 50),
				})
			})
			local instance = Roact.mount(element, frame, "CheckboxList")
			Roact.unmount(instance)
		end)

		it("should have the proper default values", function()
			local frame = Instance.new("Frame")
			local elem


: message\n");
        Ok(())
    }

    #[test]
    fn test_confirm() -> anyhow::Result<()> {
        let tests = &[
            (true, "", false, true),
            (false, "y", false, true),
            (false, "Y", false, true),
            (false, "yes", false, true),
            (false, "Yes", false, true),
            (false, "n", true, false),
            (false, "N", true, false),
            (false, "no", true, false),
            (false, "No", true, false),
            (false, "hoge", true, true),
            (false, "hoge", false, false),
            (false, "", true, true),
            (false, "", false, false),
        ];
        for (assume_yes, input, default, expected) in tests {
            let conf = ConsoleConfig {
                assume_yes: *assume_yes,
            };
            let mut cnsl = Console::buf(conf);
            cnsl.write_input(input);
            let actual = cnsl.confirm("message", *default).unwrap();
            assert_eq!(actual, *expected);
        }
        Ok(())
    }

    #[test]
    fn test_get_env_or_prompt_and_read() -> anyhow::Result<()> {
        let cnsl_term = Console::term(ConsoleConfig::default());
        let cnsl_buf_0 = Console::buf(ConsoleConfig::default());
        let mut cnsl_buf_1 = Console::buf(ConsoleConfig::default());
        cnsl_buf_1.write_input("test_input");
        let cnsl_sink_0 = Console::sink(ConsoleConfig::default());
        let cnsl_sink_1 = Console::sink(ConsoleConfig::default());
        let env_name_exists = if cfg!(windows) { "APPDATA" } else { "HOME" };
        let env_val: &str = &env::var(env_name_exists).unwrap();
        let tests = &mut [
            (cnsl_term, env_name_exists, env_val),
            (cnsl_buf_0, env_name_exists, env_val),
            (cnsl_buf_1, "ACICK_TEST_UNKNOWN_VAR", "test_input"),
            (cnsl_sink_0, env_name_exists, env_val),
            (cnsl_sink_1, "ACICK_TEST_UNKNOWN_VAR", ""),
        ];

        for (ref mut cnsl, env_name, expected) in tests {
            let actual = cnsl.get_env_or_prompt_and_read(env_name, "prompt >", true)?;
            assert_eq!(&actual, expected);
        }
        Ok(())
    }
}
<gh_stars>0
use super::codes::{Code, Label, BLANK, LETTER_MASK, UNINIT};
use super::{Item, Tile};
use crate::error::Error;
use std::convert::TryFrom;
use std::num::NonZeroU8;

/// A letter that can be used as [`Tile`](crate::Tile) on the board.
///
/// Either a regular letter or a `blank` ("*") that can be used as any letter.
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub struct Letter(pub(super) NonZeroU8);

impl Default for Letter {
    fn default() -> Self {
        Self::new(UNINIT)
    }
}

impl Item for Letter {
    fn code(&self) -> Code {
        self.0.get()
    }
}

impl Letter {
    fn new(code: Code) -> Letter {
        let label = NonZeroU8::new(code).expect("label can't be 0");
        Letter(label)
    }

    /// Create


using System;

namespace Avalonia.Utilities
{
    internal class EnumHelper
    {
#if NET6_0_OR_GREATER
        public static T Parse<T>(ReadOnlySpan<char> key, bool ignoreCase) where T : struct
        {
            return Enum.Parse<T>(key, ignoreCase);
        }

        public static bool TryParse<T>(ReadOnlySpan<char> key, bool ignoreCase, out T result) where T : struct
        {
            return Enum.TryParse(key, ignoreCase, out result);
        }
#else
        public static T Parse<T>(string key, boo


|Source+Sans+Pro:400,300,700" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link rel="stylesheet" href="static-assets/github.css">
  <link rel="stylesheet" href="static-assets/styles.css">
  <link rel="icon" href="static-assets/favicon.png">

  <button id="sidenav-left-toggle" type="button"> </button>

shake

dart:typed_data

Int32x4

zzww constant

zzww

  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>

      <form class="search-sidebar" role="search">
        <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
      </form>

shake

dart:typed_data

Int32x4

zzww constant

Int32x4 class

Constructors

Int32x4

bool

fromFloat32x4Bits

        Properties

flagW

flagX

flagY

flagZ

<a href="dart-typed_data/Int32x4/signMask


mple['imagesize']
            height = imgSiz[0][0]
            width = imgSiz[1][0]
            fileList.extend(sample['fname'])

            if self.cuda:
                image = image.cuda()
            with torch.no_grad():
                output = self.model(image)

            # Get probability maps
            sm = torch.nn.Softmax(dim=1)
            prob = sm(output)

            # Reshape probability map
            probMap = np.squeeze(prob.cpu().numpy())

            if i == 0:
                probMapAll = np.zeros((self.nClass, height, width, numImgs))

            for c in range(0, self.nClass):
                classProbMap = probMap[c, :, :]
                resizProbMap = resize(classProbMap, (height, width), anti_aliasing=True)
                probMapAll[c, :, :, i] = resizProbMap

        if self.view == 'axial':
            probMapAllAx = probMapAll
        elif self.view == 'sagittal':
            # Transform to axial orientation
            probMapAllAx = np.transpose(probMapAll, (0, 2, 3, 1))
        elif self.view == 'coronal':
            # Transform to axial orientation
            probMapAllAx = np.transpose(probMapAll, (0, 3, 2, 1))

        return probMapAllAx, fileList[-1]

def main(inputPath, outputPath):
    """
    Run model ensemble and fuse results
    """

    # Get probability maps from different views
    print('Beginning inference...')
    t0 = process_time()
    chewingAx = Chewing(inputPath, 'axial')
    probMapAx, fName = chewingAx.segment()
    nClass = chewingAx.nClass
    print("%.1f" % (process_time() - t0) + ' s')

    t1 = process_time()
    chewingSag = Chewing(inputPath, 'sagittal')
    probMapSag, __ = chewingSag.segment()
    print("%.1f" % (process_time() - t1) + ' s')

    t2 = process_time()
    chewingCor = Chewing(inputPath, 'coronal')
    probMapCor, __ = chewingCor.segment()
    print("%.1f" % (process_time() - t2) + ' s')

    # Fuse maps
    print('Generating consensus segmentations...')
    t3 = process_time()
    avgProb = (probMapAx + probMapSag + probMapCor) / 3
    labels = np.argmax(avgProb, axis=0)
    mask = labelToBin(labels, nClass-1)
    print("%.1f" % (process_time() - t3) + ' s')

    # Write to NIfTI
    print('Writing output mask to disk...')
    t4 = process_time()
    #path, file = os.path.split(fName)
    inputImg = sitk.ReadImage(fName)
    writeFile(mask, outputPath, inputImg)

    print("%.1f" % (process_time() - t4) + ' s')

    return mask

if __name__ == '__main__':
    if 'MKL_NUM_THREADS' in os.environ:
        del os.environ['MKL_NUM_THREADS']
    main(sys.argv[1], sys.argv[2])


/***************************************************************************
 *                                                                         *
 * Module  : rwversion.h                                                   *
 *                                                                         *
 * Purpose : RenderWare Versioning                                         *
 *                                                                         *
 **************************************************************************/

#ifndef RWVERSION_H
#define RWVERSION_H

/*
 * Library version number
 *
 * 0xVJNBB:
 *
 * V  = RenderWare version (3 - 7)
 * J  = Release major revision (0 - 15)
 * N  = Release minor revision (0 - 15)
 * BB = Binary format revision (0 - 63)
 *
 * The limits given above are imposed by the 16-bit packed version
 * format contained in stream chunk headers.
 *
 * rwLIBRARYBASEVERSION     Earliest binary compatible version.
 *
 * rwLIBRARYNOWARNVERSION   'No Warning' version. Binary data older than
 *                          this will cause warnings to be generated on
 *                          loading.
 */

#define rwLIBRARYCURRENTRWVERSION       3
#define rwLIBRARYCURRENTMAJORREVISION   7
#define rwLIBRARYCURRENTMINORREVISION   0
#define rwLIBRARYCURRENTBINARYREVISION  2

#define rwLIBRARYBASEVERSION    0x35000
#define rwLIBRARYNOWARNVERSION  0x36000
#define rwLIBRARYCURRENTVERSION ((rwLIBRARYCURRENTRWVERSION << 16) |        \
                                 (rwLIBRARYCURRENTMAJORREVISION << 12) |    \
                                 (rwLIBRARYCURRENTMINORREVISION << 8) |     \
                                 (rwLIBRARYCURRENTBINARYREVISION))

#define rwLIBRARYVERSION35000   0x35000
#if (rwLIBRARYVERSION35000 < rwLIBRARYBASEVERSION)
#error "Time to remove all rwLIBRARYVERSION35000 code"
#endif

#define rwLIBRARYVERSION36000   0x36000
#if (rwLIBRARYVERSION36000 < rwLIBRARYBASEVERSION)
#error "Time to remove all rwLIBRARYVERSION36000 code"
#endif

#define rwLIBRARYVERSION36002   0x36002
#if (rwLIBRARYVERSION36002 < rwLIBRARYBASEVERSION)
#error "Time to remove all rwLIBRARYVERSION36002 code"
#endif

#define rwLIBRARYVERSION36003   0x36003
#if (rwLIBRARYVERSION36003 < rwLIBRARYBASEVERSION)
#error "Time to remove all rwLIBRARYVERSION36003 code"
#endif

/*
 * RWBUILDNUMBER
 *
 * This 16-bit int will be externally defined in an official build, and
 * is used to construct library ID stamp contained in stream chunk headers.
 * All unofficial builds will be stamped with the following:-
 */

#if !defined(RWBUILDNUMBER)
#define RWBUILDNUMBER 10
#endif

/*
 *
 * Library ID stamp
 *
 * Bits allocated in packed format (MSB first):-
 *
 *   2  SDK version (zero is RW3)
 *   4  Major revision number
 *   4  Minor revision number
 *   6  Binary format revision number
 *  16  Library build number
 */

#define RWLIBRARYIDPACK(_version, _buildNum)                \
    (  ((((_version) - 0x30000U) & 0x3ff00U) << 14)         \
     | (((_version) & 0x0003fU) << 16)                      \
     | ((_buildNum) & 0xffffU))

#define RWLIBRARYIDUNPACKVERSION(_libraryID)                \
    (  ((((_libraryID) >> 14) & 0x3ff00U) + 0x30000U)       \
     | (((_libraryID) >> 16) & 0x0003fU))

#define RWLIBRARYIDUNPACKBUILDNUM(_libraryID)               \
    ((_libraryID) & 0xffffU)

#endif /* RWVERSION_H */


      import threading

        def send_ws_log():
            try:
                # 创建新的事件循环并运行
                loop = asyncio.new_event_loop()
                asyncio.set_event_loop(loop)
                loop.run_until_complete(send_evaluation_log(task_id, json.dumps(log_entry, default=json_serializer)))
                loop.close()
            except Exception as e:
                logger.error(f"WebSocket发送失败: {str(e)}")

        # 在单独线程中执行异步操作
        threading.Thread(target=send_ws_log, daemon=True).start()
    except Exception as e:
        logger.error(f"WebSocket评估日志异常: {str(e)}")

# 扩展JSON序列化函数，处理更多类型
def json_serializer(obj):
    """自定义JSON序列化函数，处理各种类型的对象"""
    if isinstance(obj, EvaluationMetrics):
        # 特殊处理评估指标对象
        metrics_dict = {
            "accuracy": obj.accuracy,
            "f1_score": obj.f1_score,
            "precision": obj.precision,
            "recall": obj.recall,
            "perplexity": obj.perplexity,
            "bleu": obj.bleu,
            "rouge": obj.rouge,
            "exact_match": obj.exact_match,
            "custom_metrics": obj.custom_metrics
        }
        return metrics_dict
    elif hasattr(obj, '__dict__'):
        return obj.__dict__
    elif isinstance(obj, datetime.datetime):
        return obj.isoformat()
    elif isinstance(obj, Exception):
        return str(obj)
    elif isinstance(obj, (np.int32, np.int64)):
        return int(obj)
    elif isinstance(obj, (np.float32, np.float64)):
        return float(obj)
    elif isinstance(obj, np.ndarray):
        return obj.tolist()
    elif isinstance(obj, (set, frozenset)):
        return list(obj)
    elif isinstance(obj, bytes):
        return obj.decode('utf-8', errors='replace')
    else:
        # 对于其他无法处理的类型，尝试转换为字符串
        try:
            return str(obj)
        except:
            return f"<不可序列化的对象: {type(obj).__name__}>"


dccd3b61d5e070d9a432103616959a72dd302043e9db2dbd7827944ecb2d555a8f72a48bb8f916ec5aac6ec210362f9c79cd0586704d6a9ea863573f3b123d90a31faaa5a1d9a69bf9631c78ae321036899d94ad9d3f24152dd4fa79b9cb8dddbd26d18297be4facb295f57c9de60bd210376e4cb35baa8c46b0dcffaf303785c5f7aadf457df30ac956234cc8114e2f47d2103a587256beec4e167aebc478e1d6502bb277a596ae9574ccb646da11fffbf36502103bb9da162c3f581ced93167f86d7e0e5962762a1188f5bd1f8b5d08fed46ef73d2103c34fcd05cef2733ea7337c37f50ae26245646aba124948c6ff8dcdf8212849982103f8ac768e683a07ac4063f72a6d856aedeae109f844abcfa34ac9519d715177460114ae68");
        Script redeemScript = new Script(redeemScriptHex);

        removeSignaturesFromMultiSigTransaction(btcTx);
        Sha256Hash expectedSigHash = btcTx.hashForSignature(
            0,
            redeemScript,
            BtcTransaction.SigHash.ALL,
            false
        );

        // Act
        Optional<Sha256Hash> sigHash = getSigHashForPegoutIndex(btcTx);

        // Assert
        assertTrue(sigHash.isPresent());
        assertEquals(expectedSigHash, sigHash.get());
    }

    @Test
    void getFirstInputLegacySigHash_no_input() {
        // Arrange
        BtcTransaction btcTx = new BtcTransaction(btcMainnetParams);
        btcTx.addOutput(Coin.COIN, destinationAddress);

        // Act
        Optional<Sha256Hash> sigHash = BitcoinUtils.getSigHashForPegoutIndex(btcTx);

        // Assert
        assertFalse(sigHash.isPresent());
    }

    @Test
    void getFirstInputLegacySigHash_invalid_input_no_redeem_script() {
        // Arrange
        BtcTransaction btcTx = new BtcTransaction(btcMainnetParams);
        btcTx.addInput(BitcoinTestUtils.createHash(1), 0, new Script(new byte[]{}));
        btcTx.addOutput(Coin.COIN, destinationAddress);

        // Act
        Optional<Sha256Hash> sigHash = BitcoinUtils.getSigHashForPegoutIndex(btcTx);

        // Assert
        assertTrue(sigHash.isEmpty());
    }

    @Test
    void extractRedeemScriptFromInput_forP2shP2wshInput_withInvalidRedeemScript_shouldReturnEmpty() {
        // Arrange
        BtcTransaction btcTx = new BtcTransaction(bt


//
//  NCExtractorCell.h
//  Neocom
//
//  Created by Артем Шиманский on 26.01.16.
//  Copyright © 2016 Artem Shimanski. All rights reserved.
//

#import "NCTableViewCell.h"
#import "NCBarChartView.h"

@interface NCExtractorCell : NCTableViewCell
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet NCBarChartView *barChartView;
@property (weak, nonatomic) IBOutlet UILabel *axisYLabel;
@property (weak, nonatomic) IBOutlet UILabel *axisXLabel;
@property (weak, nonatomic) IBOutlet UILabel *markerLabel;
@property (weak, nonatomic) IBOutlet UIView *markerAuxiliaryView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *markerAuxiliaryViewConstraint;

@property (weak, nonatomic) IBOutlet UILabel *productLabel;
@property (weak, nonatomic) IBOutlet UILabel *sumLabel;
@property (weak, nonatomic) IBOutlet UILabel *yieldLabel;
@property (weak, nonatomic) IBOutlet UILabel *cycleTimeLabel;
@property (weak, nonatomic) IBOutlet UILabel *currentCycleLabel;
@property (weak, nonatomic) IBOutlet UILabel *wasteTimeLabel;
@property (weak, nonatomic) IBOutlet UILabel *wasteLabel;
@property (weak, nonatomic) IBOutlet UILabel *wasteTitleLabel;
@property (weak, nonatomic) IBOutlet UILabel *expiredLabel;

@end


      }
        }

        Flush();
      }

      internal RlePacketStateMachine(Stream stream)
      {
        m_stream = stream;
      }
    }

    ////////////////////////////////////////////////////////////////////////

    public static int EncodedRow(Stream stream, byte[] imgData, int startIdx, int columns)
    {
      long startPosition = stream.Position;

      RlePacketStateMachine machine = new RlePacketStateMachine(stream);
      machine.PushRow(imgData, startIdx, startIdx + columns);

      return (int)(stream.Position - startPosition);
    }

    ////////////////////////////////////////////////////////////////////////

    public static void DecodedRow(Stream stream, byte[] imgData, int startIdx, int columns)
    {
      int count = 0;
      while (count < columns)
      {
        byte byteValue = (byte)stream.ReadByte();

        int len = (int)byteValue;
        if (len < 128)
        {
          len++;
          while (len != 0 && (startIdx + count) < imgData.Length)
          {
            byteValue = (byte)stream.ReadByte();

            imgData[startIdx + count] = byteValue;
            count++;
            len--;
          }
        }
        else if (len > 128)
        {
          // Next -len+1 bytes in the dest are replicated from next source byte.
          // (Interpret len as a negative 8-bit int.)
          len ^= 0x0FF;
          len += 2;
          byteValue = (byte)stream.ReadByte();

          while (len != 0 && (startIdx + count) < imgData.Length)
          {
            imgData[startIdx + count] = byteValue;
            count++;
            len--;
          }
        }
        else if (128 == len)
        {
          // Do nothing
        }
      }

    }
  }

}


 the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANNTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER INN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#include <hip_test_common.hh>
#include <hip_test_helper.hh>
#include <utils.hh>

static constexpr unsigned int N = 2 * 1024 * 1024;
static constexpr size_t NBYTES = N * sizeof(int);

/**
 * Local Function to fill the array with given value
 */
static void fillArr(int* arr, unsigned int size, int value) {
  for (int i = 0; i < size; i++) {
    arr[i] = value;
  }
}

/**
 * Test Description
 * ------------------------
 *  - This test, tests the following scenario with per thread compiler option:-
 *  - Do Memory copy Asynchronously H2D in Legacy stream
 *  - and do Memory copy Asynchronously D2H in Legacy stream.
 *  - The task 2 should wait till the execution of task 1.
 *  - Even it is compiled with stream per thread, since one stream for both
 *  - these should be in sync.
 * Test source
 * ------------------------
 *  - unit/stream/hipStreamLegacy_compiler_options.cc
 * Test requirements
 * ------------------------
 *  - HIP_VERSION >= 6.3
 */
TEST_CASE("Unit_hipStreamLegacy_WithSptCompilerOption") {
  int* hostArrSrc = new int[N];
  REQUIRE(hostArrSrc != nullptr);
  fillArr(hostArrSrc, N, 1);

  int* devArr = nullptr;
  HIP_CHECK(hipMalloc(&devArr, NBYTES));
  REQUIRE(devArr != nullptr);

  int* hostArrDst = new int[N];
  REQUIRE(hostArrDst != nullptr);
  fillArr(hostArrDst, N, 3);

  HIP_CHECK(hipMemcpyAsync(devArr, hostArrSrc, NBYTES, hipMemcpyHostToDevice, hipStreamLegacy));
  HIP_CHECK(hipMemcpyAsync(hostArrDst, devArr, NBYTES, hipMemcpyDeviceToHost, hipStreamLegacy));
  HIP_CHECK(hipStreamSynchronize(hipStreamLegacy));

  for (int i = 0; i < N; i++) {
    INFO("At index : " << i << " Got value : " << hostArrDst[i] << " Expected value : 1 \n");
    REQUIRE(hostArrDst[i] == 1);
  }

  delete[] hostArrSrc;
  delete[] hostArrDst;
  HIP_CHECK(hipFree(devArr));
}

/*
 * Local helper function to copy data from host to device
 */
static void copyHostToDevice(int* hostArr, int* devArr) {
  HIP_CHECK(hipMemcpyAsync(devArr, hostArr, NBYTES, hipMemcpyHostToDevice, hipStreamLegacy));
}

/*
 * Local helper function to copy data from device to host
 */
static void copyDeviceToHost(int* devArr, int* hostArr) {
  HIP_CHECK(hipMemcpyAsync(hostArr, devArr, NBYTES, hipMemcpyDeviceToHost, hipStreamLegacy));
}

/**
 * Test Description
 * ------------------------
 *  - This test, tests the following scenario with per thread compiler option:-
 *  - Launch two threads,
 *  -  In


      "balance": "$2,974.40",
            "picture": "http://placehold.it/32x32",
            "age": 29,
            "eyeColor": "brown",
            "name": "Rodriguez Torres",
            "gender": "male",
            "company": "ZYTRAC",
            "email": "rodrigueztorres@zytrac.com",
            "phone": "+1 (814) 459-2850",
            "address": "369 Seagate Terrace, Eureka, Massachusetts, 2193",
            "about": "Cillum magna culpa fugiat eiusmod aute sint consectetur nostrud cupidatat eiusmod ullamco magna aute aliqua. Exercitation laborum proident est excepteur elit ullamco veniam sunt eu. Eu cillum dolore ea tempor consectetur aliqua eu in sit qui nostrud culpa. Nisi enim sunt exercitation aliqua tempor ipsum anim magna laboris non aliqua ea. Anim veniam adipisicing incididunt duis nulla est consequat aliqua ex irure commodo consectetur elit. Aliquip laborum ad nulla ea reprehenderit ut voluptate nisi laboris. Commodo eiusmod veniam anim ipsum incididunt tempor sunt labore eiusmod.\\r\\n",
            "registered": "2015-11-05T08:14:44 -02:00",
            "latitude": -15.861528,
            "longitude": 82.818214,
            "tags": [
              "laboris",
              "laborum",
              "irure",
              "aliqua",
              "proident",
              "laborum",
              "id"
            ],
            "friends": [
              {
                "id": 0,
                "name": "Chris Booker"
              },
              {
                "id": 1,
                "name": "Lilia Riddle"
              },
              {
                "id": 2,
                "name": "Marsha Webb"
              }
            ],
            "greeting": "Hello, Rodriguez Torres! You have 8 unread messages.",
            "favoriteFruit": "banana"
          },
          {
            "_id": "5789f4e57feb29fe1500fe39",
            "index": 13,
            "guid": "3b88055f-656d-455a-b40b-b132c1c9ea2c",
            "isActive": false,
            "balance": "$3,793.19",
            "picture": "http://placehold.it/32x32",
            "age": 23,
            "eyeColor": "blue",
            "name": "Levine Gillespie",
            "gender": "male",
            "company": "COMTOUR",
            "email": "levinegillespie@comtour.com",
            "phone": "+1 (829) 512-3201",
            "address": "231 Box Street, Springhill, Indiana, 3853",
            "about": "Ipsum sit velit occaecat veniam id est ut dolor esse tempor elit voluptate dolor. Exercitation esse nisi dolore proident culpa cillum pariatur cillum mollit nisi non nulla aliquip veniam. In consectetur ea ad excepteur sit enim commodo do eu.\\r\\n",
            "registered": "2016-03-25T03:07:49 -03:00",
            "latitude": -18.792521,
            "longitude": 23.43746,
            "tags": [
              "voluptate",
              "adipisicing",
              "duis",
              "cillum",
              "ex",
              "magna",
              "Lorem"
            ],
            "friends": [
              {
                "id": 0,
                "name": "Cecile Hardin"
              },
              {
                "id": 1,
                "name": "Clarke Mckay"
              },
              {
                "id": 2,
                "name":


_duty\'})">使用百度前必读\xa0意见反馈\xa0京ICP证030173号\xa0\xa0京公网安备11000002000001号\xa0

\n\n

\n        \n\n\t\n\t\n\t
\n\t\t\t\n\t\t\t\n\n\n\t\t\t\n

\n            \n\t        \n\t\n\t\n            \n\t\n\n
\n                                                                    \n\t                                \n\n
 \n\n    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n    \n    \n    \n\n
\n    \n\n
SHINee的热门歌曲
\n
\n
\n        \n            <img class="c-img c-img4" src="https://ss2.baidu.com/6ONYsjip0QIZ8tyhnq/it/u=92877206,2848872847&amp;fm=58"


 [ElementPlusResolver()],
            }),
            Components({
                resolvers: [ElementPlusResolver()],
            }),
            VueI18nPlugin({
                include: [path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../i18n/**")]
            }),
        ],
        build: {
            rollupOptions: {
                external: ['document'],
            },
        }
    },
    transformPageData(pageData) {
        if (pageData.frontmatter.date) {
        const date = new Date(pageData.frontmatter.date)
            pageData.frontmatter.date = date.toISOString().split('T')[0]
        }
        return pageData
    }
});
console.log('service-worker.js')
// advanced config for injectManifest approach
importScripts(
  'https://storage.googleapis.com/workbox-cdn/releases/7.1.0/workbox-sw.js'
)
// Detailed logging is very useful during development
workbox.setConfig({
  debug: false,
})
// Updating SW lifecycle to update the app after user triggered refresh
self.skipWaiting()
workbox.core.clientsClaim()
// data-uris shall not be cached and also work offline
workbox.routing.registerRoute(
  ({ url }) => url.search.startsWith('?data:text'),
  async ({ event }) => {
    const cache = await caches.open(workbox.core.cacheNames.precache)
    const response = await cache.match(event.request.url.split('?data:text')[0])
    return response || fetch(event.request)
  }
)
// workbox.googleAnalytics.initialize();
workbox.routing.registerRoute(
  // Match all navigation requests, except those for URLs whose
  // path starts with '/admin/'
  ({ request, url }) =>
    request.mode === 'navigate' && !url.pathname.startsWith('/LiveEditor/'),
  new workbox.strategies.NetworkFirst()
)
//workbox.routing.registerRoute(/\/*/, new workbox.strategies.NetworkFirst())
workbox.routing.registerRoute(
  /https:\/\/code\.responsivevoice\.org/,
  new workbox.strategies.NetworkFirst()
)
workbox.routing.registerRoute(
  'https://storage.googleapis.com/workbox-cdn/releases/7.0.0/workbox-sw.js',
  new workbox.strategies.CacheFirst()
)
// Add error handling for fetch operations
workbox.routing.setCatchHandler(({ event }) => {
  console.error(`Failed to handle fetch: ${event.request.url}`)
  return Response.error()
})
workbox.precaching.precacheAndRoute(self.__WB_MANIFEST)
const{floor:e,random:r}=Math,t="Trystero",n=(e,r)=>Array(e).fill().map(r),a="0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz",o=t=>n(t,(()=>a[e(62*r())])).join(""),s=o(20),i=Promise.all.bind(Promise),c="undefined"!=typeof window,{entries:l,fromEntries:d,keys:f}=Object,u=()=>{},p=e=>Error(`${t}: ${e}`),y=new TextEncoder,m=new TextDecoder,w=e=>y.encode(e),g=e=>m.decode(e),h=(...e)


setx 0xb49799d19aedc1c4, %g1, %r30
	setx 0x1207773525f03512, %g1, %r31
	restore
	mov	0x18, %r16
	mov	0x50, %r17
	mov	0x58, %r18
	mov	0x38, %r19
	mov	0x3e8, %r20
	mov	0x3f8, %r21
	mov	0x3d8, %r22
	mov	0x7e8, %r23
	mov	0x50, %r24
	mov	0x28, %r25
	mov	0x60, %r26
	mov	0x0, %r27
	mov	0, %r28
	mov	0, %r29
	mov	0, %r30
	mov	0, %r31
	ta	%icc, T_CHANGE_HPRIV
	wr	%g0, 0x73, %asi
	stxa	%g0, [%g0] 0x42
	mov	0x38, %g1
	stxa	%g0, [%g1] 0x58
	ta	%icc, T_RD_THID
! fork: source strm = 0xffffffff; target strm = 0x2
	cmp	%o1, 1
	setx	fork_lbl_0_1, %g2, %g3
	be,a	.+8
	jmp	%g3
	nop
! fork: source strm = 0xffffffff; target strm = 0x4
	cmp	%o1, 2
	setx	fork_lbl_0_2, %g2, %g3
	be,a	.+8
	jmp	%g3
	nop
! fork: source strm = 0xffffffff; target strm = 0x8
	cmp	%o1, 3
	setx	fork_lbl_0_3, %g2, %g3
	be,a	.+8
	jmp	%g3
	nop
	mov	0x8, %r27
	.word 0xec8649e0  ! 2: LDUWA_R	lduwa	[%r25, %r0] 0x4f, %r22
	.word 0xecb70e60  ! 3: STHA_R	stha	%r22, [%r28 + %r0] 0x73
	.word 0xecf76000  ! 4: STXA_I	stxa	%r22, [%r29 + 0x0000] %asi
	.word 0xe8f48400  ! 5: STXA_R	stxa	%r20, [%r18 + %r0] 0x20
	.word 0x8780204f  ! 6: WRASI_I	wr	%r0, 0x004f, %asi
	.word 0xe8c62000  ! 7: LDSWA_I	ldswa	[%r24, + 0x0000] %asi, %r20
	mov	0x7c0, %r23
	mov	0x0, %r27
	mov	0x40, %r25
	mov	0x58, %r24
	.word 0xeacfce40  ! 12: LDSBA_R	ldsba	[%r31, %r0] 0x72, %r21
	.word 0xeabe2000  ! 13: STDA_I	stda	%r21, [%r24 + 0x0000] %asi
	.word 0xeedc4400  ! 14: LDXA_R	ldxa	[%r17, %r0] 0x20, %r23
	.word 0xeedf0e60  ! 15: LDXA_R	ldxa	[%r28, %r0] 0x73, %r23
	.word 0xee8fce60  ! 16: LDUBA_R	lduba	[%r31, %r0] 0x73, %r23
	.word 0xeeae2000  ! 17: STBA_I	stba	%r23, [%r24


 (createPipelineJobRequest != null)
      'createPipelineJobRequest': createPipelineJobRequest!,
    if (createTime != null) 'createTime': createTime!,
    if (cron != null) 'cron': cron!,
    if (displayName != null) 'displayName': displayName!,
    if (endTime != null) 'endTime': endTime!,
    if (lastPauseTime != null) 'lastPauseTime': lastPauseTime!,
    if (lastResumeTime != null) 'lastResumeTime': lastResumeTime!,
    if (lastScheduledRunResponse != null)
      'lastScheduledRunResponse': lastScheduledRunResponse!,
    if (maxConcurrentRunCount != null)
      'maxConcurrentRunCount': maxConcurrentRunCount!,
    if (maxRunCount != null) 'maxRunCount': maxRunCount!,
    if (name != null) 'name': name!,
    if (nextRunTime != null) 'nextRunTime': nextRunTime!,
    if (startTime != null) 'startTime': startTime!,
    if (startedRunCount != null) 'startedRunCount': startedRunCount!,
    if (state != null) 'state': state!,
    if (updateTime != null) 'updateTime': updateTime!,
  };
}

/// Status of a scheduled run.
class GoogleCloudAiplatformV1ScheduleRunResponse {
  /// The response of the scheduled run.
  core.String? runResponse;

  /// The scheduled run time based on the user-specified schedule.
  core.String? scheduledRunTime;

  GoogleCloudAiplatformV1ScheduleRunResponse({
    this.runResponse,
    this.scheduledRunTime,
  });

  GoogleCloudAiplatformV1ScheduleRunResponse.fromJson(core.Map json_)
    : this(
        runResponse: json_['runResponse'] as core.String?,
        scheduledRunTime: json_['scheduledRunTime'] as core.String?,
      );

  core.Map<core.String, core.dynamic> toJson() => {
    if (runResponse != null) 'runResponse': runResponse!,
    if (scheduledRunTime != null) 'scheduledRunTime': scheduledRunTime!,
  };
}

/// All parameters related to queuing and scheduling of custom jobs.
class GoogleCloudAiplatformV1Scheduling {
  /// Indicates if the job should retry for internal errors after the job starts
  /// running.
  ///
  /// If true, overrides `Scheduling.restart_job_on_worker_restart` to false.
  ///
  /// Optional.
  core.bool? disableRetries;

  /// This is the maximum duration that a job will wait for the requested
  /// resources to be provisioned if the scheduling strategy is set to
  /// \[Strategy.DWS_FLEX_START\].
  ///
  /// If set to 0, the job will wait indefinitely. The default is 24 hours.
  ///
  /// Optional.
  core.String? maxWaitDuration;

  /// Restarts the entire CustomJob if a worker gets restarted.
  ///
  /// This feature can be used by distributed training jobs that are not
  /// resilient to workers leaving and joining a job.
  ///
  /// Optional.
  core.bool? restartJobOnWorkerRestart;

  /// This determines which type of scheduling strategy to use.
  ///
  /// Optional.
  /// Possible string values are:
  /// - "STRATEGY_UNSPECIFIED" : Strategy will default to STANDARD.
  /// - "ON_DEMAND" : Deprecated. Regular on-demand provisioning strategy.
  /// - "LOW_COST" : Deprecated. Low cost by making potential use of spot
  /// resources.
  /// - "STANDARD" : Standard provisioning strategy uses regular on-demand
  /// resources.
  /// - "SPOT" : Spot provisioning strategy uses spot resources.
  /// - "FLEX_START" : Flex Start strategy uses DWS to queue for resources.
  core.String? strategy;

  /// The maximum job running time.
  ///
  /// The defaul


namespace TraktNET.Enums
{
    public sealed class TraktCommentSortOrderTests
    {
        [Fact]
        public void TestTraktCommentSortOrderToJson()
        {
            TraktCommentSortOrder.Unspecified.ToJson().ShouldBeNull();
            TraktCommentSortOrder.Newest.ToJson().ShouldBe("newest");
            TraktCommentSortOrder.Oldest.ToJson().ShouldBe("oldest");
            TraktCommentSortOrder.Likes.ToJson().ShouldBe("likes");
            TraktCommentSortOrder.Replies.ToJson().ShouldBe("replies");
            TraktCommentSortOrder.Highest.ToJson().ShouldBe("highest");
            TraktCommentSortOrder.Lowest.ToJson().ShouldBe("lowest");
            TraktCommentSortOrder.Plays.ToJson().ShouldBe("plays");
            TraktCommentSortOrder.Watched.ToJson().ShouldBe("watched");
        }

        [Fact]
        public void TestTraktCommentSortOrderFromJson()
        {
            "unspecified".ToTraktCommentSortOrder().ShouldBe(TraktCommentSortOrder.Unspecified);
            "newest".ToTraktCommentSortOrder().ShouldBe(TraktCommentSortOrder.Newest);
            "oldest".ToTraktCommentSortOrder().ShouldBe(TraktCommentSortOrder.Oldest);
            "likes".ToTraktCommentSortOrder().ShouldBe(TraktCommentSortOrder.Likes);
            "replies".ToTraktCommentSortOrder().ShouldBe(Trakt


	const bytes = this.ComputeHash(key, data);
			return System.Convert.ToBase64String(bytes, false);
		};
		this._ComputeHash = function (key, data) {
			if (!data) {
				data = key;
				key = this.Key;
			}
			if (key.length > 64) key = this.Algorithm.ComputeHash(key);
			const ipad = new Array(64),
				opad = new Array(64);
			for (let i = 0; i < 64; i++) {
				ipad[i] = key[i] ^ 0x36;
				opad[i] = key[i] ^ 0x5c;
			}
			const hash = this.Algorithm.ComputeHash(ipad.concat(data));
			return this.Algorithm.ComputeHash(opad.concat(hash));
		};
		this.Initialize = function () {
			this.Algorithm = new System.Security.Cryptography.SHA1();
			this.Key = arguments[0];
		};
		this.Initialize.apply(this, arguments);
	};
	System.Type.RegisterNamespace('System.Security.Cryptography');
	System.Security.Cryptography.RijndaelManaged = function () {
		this.KeySize = 256;
		this.BlockSize = 128;
		this.FeedbackSize = 128;
		this.IV;
		this.Key;
		this.Mode = System.Security.Cryptography.CipherMode.CBC;
		this.Padding = System.Security.Cryptography.PaddingMode.PKCS7;
		let rng;
		const Rcon = [
			0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e,
			0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91,
		];
		const S5 = new Array(256);
		const T1 = new Array(256);
		const T2 = new Array(256);
		const T3 = new Array(256);
		const T4 = new Array(256);
		const T5 = new Array(256);
		const T6 = new Array(256);
		const T7 = new Array(256);
		const T8 = new Array(256);
		const U1 = new Array(256);
		const U2 = new Array(256);
		const U3 = new Array(256);
		const U4 = new Array(256);
		const S = [
			0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca,
			0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd,
			0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23,
			0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a,
			0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed, 0x20,
			0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d,
			0x33, 0x85, 0x45, 0xf9, 0x02


"""
Copyright (c) 2018-2024 Intel Corporation

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.
"""

from .base_representation import BaseRepresentation

class RawTensorRepresentation(BaseRepresentation):
    pass

class RawTensorAnnotation(RawTensorRepresentation):
    def __init__(self, identifier, annotation):
        super().__init__(identifier)
        self.value = annotation

class RawTensorPrediction(RawTensorRepresentation):
    def __init__(self, identifiers, prediction):
        super().__init__(identifiers)
        self.value = prediction


QxJPc+vFCBN+Ji+Hd65tu5eUOLqfwv4uhkHvgLAR9vNQFlkEx4ueDB/XUg0Cjomr7i3KUxLqrpHYp7lZR1Y+RxKqx2DLnP+HWsxU9pipVUFlMZ7VXFSmLibkbFLSK5FJEOhcqGyLVliyUO/hym9Agl0S/JZZ+JbfSr9CLklQjGvxyodCFlN2IbIV9ULFaKAb4YmmJ72iIllCsqgi/uHijClWXTmLwo2rQCgZQEqMpoQYjXnu+GC96HFlVhFIVFwTHqmKN4KsgYvotCaITTZSYxonmTuB2FhsoqrSD57aXxZKtyqioKrR8zi7W0NxKkc5fs5PICCNJ7jNUkhvvhqoMLf7pklusomqAqCHVhT9XKCgIk6Qi07ys6o8LiaNbv0Q19iAJoz1iO4U3zJIkqyeZVBCzkvhriRNTQrfV/fqqKEecT/m/+b56TTlRU+AAAAAASUVORK5CYII=" alt="" />
-----------------------
Name: FFmpeg Movie Player
Creator: Fabrice Bellard|FFmpeg team|Libretro
HMOD By: KMFDManic|madmonkey
Category: KMFD Cores
Emulated System: FFmpeg Video Support
Command Line: /bin/ffmpeg
-----------------------
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAADhCAMAAADRaBMuAAAABGdBTUEAALGPC/xhBQAAAwBQTFRF7MKssKCUcWlfonZafFMoOh0Xt4pvfndYwZR6xJ6Kal5B3Nvbl21SmpR7z6iTp35llo9qkoRXvby8cEcijGk+inNGhGY5gV00m5iLTioWd2lNzczMm3pn5ublj4FJjXZU2belpoRxfHt6qamoYVdP7tXH5su8blVDOhoOz7CfZ048NDQxSEVD19fW3sGy9N3QVzQZYjoeindcb1ArJxEQNyIbhXhqGw8ORSMRi2VLBwMA+OTZkndiLxsX/ezhmIFxYWBeVzcjeVE0fFY8hIWGkYN1HxYKkHBdjIJ2TTMiYUMlSDchwKmbREA7Wkoyi3xiZEEqb0owVElAjoZ9gWVFgmJNhG5RmJmZwa6hIxoNc15EcFEzd1lE0L2ya2tpJxYIWk9Fm4V2y7isDw4PjoFmKBsZLxcMj4RuU0EnPzgwHRIFNislqpCBkI6QTUQ6OyIRkYh3jH1wFA8OioqLFhYZiWxURDQdMh4PKB0QPi8Zn4l6o41/xrOnSTolTUxLRS0WTDMZTzwoRi0dLSIdPCkcNiYWVUMugWhNcVg9MCwmeFw/KSYhcnJxaU4zRD00PDQrgWdUgF1CPigWEQsC1MO42ci9Y00zWVhWe2BLtp+QuqWXdGFS3MzCkn1tXEUr1dXU


 (isHenkan.get()) {
            suggestionAdapter?.suggestions = emptyList()
            isHenkan.set(false)
            suggestionClickNum = 0
            suggestionAdapter?.updateHighlightPosition(-1)
        }
    }

    private var isFirstClickHasStringTail = false

    private fun setSuggestionComposingText(suggestions: List<Candidate>, insertString: String) {
        if (suggestionClickNum == 1 && stringInTail.get().isNotEmpty()) {
            isFirstClickHasStringTail = true
        }

        val index = (suggestionClickNum - 1).coerceAtLeast(0)
        if (suggestionClickNum <= 0) suggestionClickNum = 1

        val nextSuggestion = suggestions[index]
        val candidateType = nextSuggestion.type.toInt()
        val suggestionText = nextSuggestion.string
        val suggestionLength = nextSuggestion.length.toInt()

        if (candidateType == 5 || candidateType == 7 || candidateType == 8) {
            val tail = insertString.substring(suggestionLength)
            if (!isFirstClickHasStringTail) stringInTail.set(tail)
        } else if (candidateType == 15) {
            val (correctedReading) = nextSuggestion.string.correctReading()
            val fullText = correctedReading + stringInTail
            applyComposingText(fullText, correctedReading.length)
            return
        } else {
            if (!isFirstClickHasStringTail) stringInTail.set("")
        }
        val fullText = suggestionText + stringInTail
        applyComposingText(fullText, suggestionText.length)
    }

    private fun applyComposingText(text: String, highlightLength: Int) {
        val spannableString = SpannableString(text)
        spannableString.setSpan(
            BackgroundColorSpan(getColor(com.kazumaproject.core.R.color.orange)),
            0,
            highlightLength,
            Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
        )
        setComposingText(spannableString, 1)
    }

    private fun setNextReturnInputCharacter(insertString: String) {
        _dakutenPressed.value = true
        englishSpaceKeyPressed.set(false)
        val sb = StringBuilder()
        if (insertString.isNotEmpty()) {
            val insertPosition = insertString.last()
            insertPosition.let { c ->
                c.getNextReturnInputChar()?.let { charForReturn ->
                    appendCharToStringBuilder(
                        charForReturn, insertString, sb
                    )
                }
            }
        }
    }

    private fun setKeyboardSize() {
        val binding = mainLayoutBinding ?: return

        val heightPref = tenkeyHeightPreferenceValue ?: 280
        val widthPref = tenkeyWidthPreferenceValue ?: 100
        val positionPref = tenkeyPositionPreferenceValue ?: true
        val keyboardMarginBottomPref = tenkeyBottomMarginPreferenceValue ?: 0

        val qwertyHeightPref = qwertyHeightPreferenceValue ?: 280
        val qwertyWidthPref = qwertyWidthPreferenceValue ?: 100
        val qwertyPositionPref = qwertyPositionPreferenceValue ?: true
        val qwertyKeyboardMarginBottomPref =
            qwertyBottomMarginPreferenceValue ?: 0

        val density = resources.displayMetrics.density
        val screenWidth = resources.displayMetrics.widthPixels
        val isPortrait = resources.configuration.orientation == Configuration.ORIENTATION_PORTRAIT
        val keyboardMarginBottom =
            if (qwertyMode.value == TenKeyQWERTYMode.TenKeyQWERTY || qwertyMode.value == TenKeyQWERTYMode.TenKeyQWERTYRomaji) {
                (qwertyKeyboardMarginBottomPref * density).toInt()
            } else {
                (keyboardMarginBottomPref * density).toInt()
            }

        val heightPx = when {
            keyboardSymbolViewState.value -> {
                val height = if (isPortrait) 320 else 220


 any) {
    return this.client.put(this.resourceUrl, data)
  }

  retrieveEmailSettings() {
    return this.client.get(`${this.resourceUrl}/email`)
  }

  updateEmailSettings(data: any) {
    return this.client.put(`${this.resourceUrl}/email`, data)
  }

  retrieveImportSettings() {
    return this.client.get(`${this.resourceUrl}/import`)
  }

  updateImportSettings(data: any) {
    return this.client.put(`${this.resourceUrl}/import`, data)
  }

  retrieveEmailTemplate(name: string) {
    return this.client.get(`${this.resourceUrl}/email/templates/${name}`)
  }

  updateEmailTemplate(name: string, data: any) {
    return this.client.put(`${this.resourceUrl}/email/templates/${name}`, data)
  }

  uploadLogo(formData: any) {
    return this.client.postFormData(`${this.resourceUrl}/logo`, formData)
  }

  deleteLogo() {
    return this.client.delete(`${this.resourceUrl}/logo`)
  }
}

export default Settings
import { ParseAggregate } from "../ParseAggregate";
import { lookupParser } from "../parseAggregateQuery/lookupParser";

describe("#ParseAggregate",()=>{

     it("should be an array and have proper values",(done)=>{
         let str=`match 'name eq 'abc''
         THEN project '_id,name,created'
         THEN sort 'last asc, name'
         THEN unwind 'path name,preserveNullAndEmptyArrays true'`;
         let aggregationArray = ParseAggregate(str);
        aggregationArray.should.be.a("Array");
        aggregationArray.should.have.length(4);
        aggregationArray[0].should.have.property("$match");
        aggregationArray[1].should.have.property("$project");
        aggregationArray[2].should.have.property("$sort");
        aggregationArray[3].should.have.property("$unwind");

        done();
    });

    it("should have a mutated project statement",(done)=>{
        let str=`match 'name eq 'abc''
         THEN project '_id,name,created,Logging $SomeText.0'`;
        let aggregationArray = ParseAggregate(str);
        aggregationArray.should.be.a("Array");
        aggregationArray.should.have.length(2);
        aggregationArray[0].should.have.property("$match");
        aggregationArray[1].should.have.property("$project");

        done();
    })
    it("should have a mutated project statement",(done)=>{
        let str=`match 'name eq 'abc''
         THEN project '_id,name contains 'object eq someMatch',created,Logging $SomeText.0'`;
        let aggregationArray = ParseAggregate(str);

        aggregationArray.should.be.a("Array");
        aggregationArray.should.have.length(2);
        aggregationArray[0].should.have.property("$match");
        aggregationArray[1].should.have.property("$project");

        done();
    })
    describe("Lookup function",()=>{
//grades contains 'grade eq 'B'
        it("should contain and object with correct values",(done)=>{
            let str = "lookup 'FROM users WHERE thisprop=otherprop AS somethingElse'";
            let obj = lookupParser(str);
            obj.should.be.a("Object");

            done();
        })
        it("should contain and object",(done)=>{
            let str = "lookup 'WHERE thisprop eq otherprop AS somethingElse FROM users'";
            let obj = lookupParser(str);

            done();
        })
        it("should contian and object",(done)=>{
            let str = "lookup 'FROM users WHERE thisprop=otherprop AS somethingElse '";
            let obj = ParseAggregate(str);


itial_pred_chars_index, initial_pred_chars_values)], key = lambda a: a.sort_key())
        for _ in range(max_seq_length):
            new_beams = []
            all_ended = True
            for beam in beams:
                if not beam.seq_end(end_tok):
                    logprobs = run(beam.chars)
                    pred_chars_values, pred_chars_index = torch.topk(logprobs, beams_k, dim = 2)
                    # beams_k, L
                    pred_chars_values = pred_chars_values.squeeze(0).permute(1, 0)
                    pred_chars_index = pred_chars_index.squeeze(0).permute(1, 0)
                    #print(pred_chars_index.view(-1)[-1])
                    new_beams.extend([beam.extend(tok[-1], logprob[-1]) for tok, logprob in zip(pred_chars_index, pred_chars_values)])
                    #new_beams.extend([Beam(tok, logprob) for tok, logprob in zip(pred_chars_index, pred_chars_values)]) # extend other top k
                    all_ended = False
                else:
                    new_beams.append(beam) # seq ended, add back to queue
            beams = sorted(new_beams, key = lambda a: a.sort_key())[: beams_k] # keep top k
            #print(beams[0].chars)
            if all_ended:
                break
        final_tokens = beams[0].chars[:-1]
        #print(beams[0].logprobs.mean().exp())
        return run(final_tokens, char_only = False), beams[0].logprobs.mean().exp().item()

def test():
    with open('../SynthText/alphabet-all-v2.txt', 'r') as fp:
        dictionary = [s[:-1] for s in fp.readlines()]
    img = torch.randn(4, 3, 32, 1224)
    idx = torch.zeros(4, 32).long()
    mask = torch.zeros(4, 32).bool()
    model = ResNet_FeatureExtractor(3, 256)
    out = model(img)

def test_inference():
    with torch.no_grad():
        with open('../SynthText/alphabet-all-v3.txt', 'r') as fp:
            dictionary = [s[:-1] for s in fp.readlines()]
        img = torch.zeros(1, 3, 32, 128)
        model = OCR(dictionary, 32)
        m = torch.load("ocr_ar_v2-3-test.ckpt", map_location='cpu')
        model.load_state_dict(m['model'])
        model.eval()
        (char_probs, _, _, _, _, _, _, _), _ = model.infer_beam(img, max_seq_length = 20)
        _, pred_chars_index = char_probs.max(2)
        pred_chars_index = pred_chars_index.squeeze_(0)
        seq = []
        for chid in pred_chars_index:
            ch = dictionary[chid]
            if ch == '<SP>':
                ch == ' '
            seq.append(ch)
        print(''.join(seq))

if __name__ == "__main__":
    test()


22%2F%3E%3Cpath d=%22M499.997 577.895 562.5 541.85v-72.083l-62.503 36.044v72.084Z%22 fill=%22%234c4e7244%22 stroke-width=%22.83334%22%2F%3E%3Cpath d=%22m437.5 469.766 62.497-36.038 62.503 36.038-62.503 36.045-62.497-36.045Z%22 fill=%22%234c4e7222%22 stroke-width=%22.83334%22%2F%3E%3C%2Fg%3E%3Cg fill=%22none%22%3E%3Cpath d=%22M562.5 469.767v72.083l62.497 36.045V505.81L562.5 469.767ZM624.997 577.895 687.5 541.85v-72.083l-62.503 36.044v72.084Z%22 stroke-width=%22.83334%22%2F%3E%3Cpath d=%22m562.5 469.766 62.497-36.038 62.503 36.038-62.503 36.045-62.497-36.045Z%22 stroke-width=%22.83334%22%2F%3E%3C%2Fg%3E%3Cg fill=%22none%22%3E%3Cpath d=%22M687.5 469.767v72.083l62.497 36.045V505.81L687.5 469.767ZM749.997 577.895 812.5 541.85v-72.083l-62.503 36.044v72.084Z%22 stroke-width=%22.83334%22%2F%3E%3Cpath d=%22m687.5 469.766 62.497-36.038 62.503 36.038-62.503 36.045-62.497-36.045Z%22 stroke-width=%22.83334%22%2F%3E%3C%2Fg%3E%3Cg fill=%22none%22%3E%3Cpath d=%22M812.5 469.767v72.083l62.497 36.045V505.81L812.5 469.767ZM874.997 577.895 937.5 541.85v-72.083l-62.503 36.044v72.084Z%22 stroke-width=%22.83334%22%2F%3E%3Cpath d=%22m812.5 469.766 62.497-36.038 62.503 36.038-62.503 36.045-62.497-36.045Z%22 stroke-width=%22.83334%22%2F%3E%3C%2Fg%3E%3Cg fill=%22none%22%3E%3Cpath d=%22M937.5 469.767v72.083l62.497 36.045V505.81L937.5 469.767ZM999.997 577.895l62.503-36.045v-72.083l-62.503 36.044v72.084Z%22 stroke-width=%22.83334%22%2F%3E%3Cpath d=%22m937.5 469.766 62.497-36.038 62.503 36.038-62.503 36.045-62.497-36.045Z%22 stroke-width=%22.83334%22%2F%3E%3C%2Fg%3E%3Cg fill=%22none%22%3E%3Cpath d=%22M1062.5 469.767v72.083l62.497 36.045V505.81l-62.497-36.044ZM1124.997 577.895l62.503-36.045v-72.083l-62.503 36.044v72.084Z%22 stroke-width=%22.83334%22%2F%3E%3Cpath d=%22m1062.5 469.766 62.497-36.038 62.503 36.038-62.503 36.04


dd(nn.LeakyReLU(0.1))

	-- stage 6 : Convolution
	model:add(nn.SpatialConvolutionMM(nstates[5], 1, filtsize, filtsize, 1, 1, 1))

	model:add(nn.LeakyReLU(0.001))
	model:add(nn.AddConstant(-1,true))
	model:add(nn.MulConstant(-1,true))
	model:add(nn.LeakyReLU(0.001))
	model:add(nn.MulConstant(-1,true))
	model:add(nn.AddConstant(1,true))

	return model
end

function newthreshold()
	local model = nn.Sequential()
	model:add(nn.ReLU())
	model:add(nn.AddConstant(-1,true))
	model:add(nn.MulConstant(-1,true))
	model:add(nn.ReLU())
	model:add(nn.MulConstant(-1,true))
	model:add(nn.AddConstant(1,true))

	return model
end

---------- main ----------

torch.setdefaulttensortype('torch.CudaTensor')

model = newmodel()
print(model)

thresholding = newthreshold()
print(thresholding)

-- loss function
criterion = nn.MSECriterion()
print '==> here is the loss function:'
print(criterion)

torch.setdefaulttensortype('torch.FloatTensor')

model:cuda()
thresholding:cuda()
criterion:cuda()


}");
        if (info.Info.Contributors.Length > 0)
            sb.AppendLine(CultureInfo.CurrentCulture, $"Contributors: {info.Info.Contributors}");
        return sb.ToString();
    }

    private void ModulePlansPopup(BossModuleRegistry.Info info)
    {
        if (_planDB == null)
            return;

        var mplans = _planDB.Plans.GetOrAdd(info.ModuleType);
        foreach (var (cls, plans) in mplans)
        {
            foreach (var plan in plans.Plans)
            {
                if (ImGui.Selectable($"Edit {cls} '{plan.Name}' ({plan.Guid})"))
                {
                    UIPlanDatabaseEditor.StartPlanEditor(_planDB, plan);
                }
            }
        }

        var player = _ws.Party.Player();
        if (player != null)
        {
            if (ImGui.Selectable($"New plan for {player.Class}..."))
            {
                var plans = mplans.GetOrAdd(player.Class);
                var plan = new Plan($"New {plans.Plans.Count + 1}", info.ModuleType) { Guid = Guid.NewGuid().ToString(), Class = player.Class, Level = info.PlanLevel };
                _planDB.ModifyPlan(null, plan);
                UIPlanDatabaseEditor.StartPlanEditor(_planDB, plan);
            }
        }
    }
}


base = int(input("Digite o valor da base do seu retangulo: "))
altura = int(input("Digite o valor da altura do seu retangulo: "))

area = base * altura

print("A area do seu retangulo é : ",area)


import cv2
import numpy as np
import torch
from torchvision.transforms import Compose, Normalize, ToTensor

def preprocess_image(img: np.ndarray, mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]) -> torch.Tensor:
    preprocessing = Compose([
        ToTensor(),
        Normalize(mean=mean, std=std)
    ])
    return preprocessing(img.copy()).unsqueeze(0)

def deprocess_image(img):
    """ see https://github.com/jacobgil/keras-grad-cam/blob/master/grad-cam.py#L65 """
    img = img - np.mean(img)
    img = img / (np.std(img) + 1e-5)
    img = img * 0.1
    img = img + 0.5
    img = np.clip(img, 0, 1)
    return np.uint8(img * 255)

def show_cam_on_image(img: np.ndarray,
                      mask: np.ndarray,
                      use_rgb: bool = False,
                      colormap: int = cv2.COLORMAP_JET) -> np.ndarray:
    """ This function overlays the cam mask on the image as an heatmap.
    By default the heatmap is in BGR format.

    :param img: The base image in RGB or BGR format.
    :param mask: The cam mask.
    :param use_rgb: Whether to use an RGB or BGR heatmap, this should be set to True if 'img' is in RGB format.
    :param colormap: The OpenCV colormap to be used.
    :returns: The default image with the cam overlay.
    """
    heatmap = cv2.applyColorMap(np.uint8(255 * mask), colormap)
    if use_rgb:
        heatmap = cv2.cvtColor(heatmap, cv2.COLOR_BGR2RGB)
    heatmap = np.float32(heatmap) / 255

    if np.max(img) > 1:
        raise Exception(
            "The input image should np.float32 in the range [0, 1]")

    cam = heatmap + img
    cam = cam / np.max(cam)
    return np.uint8(255 * cam)


ئارىلىقى","img2Button":"نۆۋەتتىكى سۈرەتنى توپچىغا ئۆزگەرتەمسىز؟","infoTab":"سۈرەت","linkTab":"ئۇلانما","lockRatio":"نىسبەتنى قۇلۇپلا","menu":"سۈرەت خاسلىقى","resetSize":"ئەسلى چوڭلۇق","title":"سۈرەت خاسلىقى","titleButton":"سۈرەت دائىرە خاسلىقى","upload":"يۈكلە","urlMissing":"سۈرەتنىڭ ئەسلى ھۆججەت ئادرېسى كەم","vSpace":"بويىغا ئارىلىقى","validateBorder":"گىرۋەك چوڭلۇقى چوقۇم سان بولىدۇ","validateHSpace":"توغرىسىغا ئارىلىق چوقۇم پۈتۈن سان بولىدۇ","validateVSpace":"بويىغا ئارىلىق چوقۇم پۈتۈن سان بولىدۇ"},"horizontalrule":{"toolbar":"توغرا سىزىق قىستۇر"},"format":{"label":"پىچىم","panelTitle":"پىچىم","tag_address":"ئادرېس","tag_div":"ئابزاس (DIV)","tag_h1":"ماۋزۇ 1","tag_h2":"ماۋزۇ 2","tag_h3":"ماۋزۇ 3","tag_h4":"ماۋزۇ 4","tag_h5":"ماۋزۇ 5","tag_h6":"ماۋزۇ 6","tag_p":"ئادەتتىكى","tag_pre":"تىزىلغان پىچىم"},"fakeobjects":{"anchor":"لەڭگەرلىك نۇقتا","flash":"Flash جانلاندۇرۇم","hiddenfield":"يوشۇرۇن دائىرە","iframe":"IFrame","unknown":"يوچۇن نەڭ"},"elementspath":{"eleLabel":"ئېلېمېنت يولى","eleTitle":"%1 ئېلېمېنت"},"contextmenu":{"options":"قىسقا يول تىزىملىك تاللانمىسى"},"clipboard":{"copy":"كۆچۈر","copyError":"تور كۆرگۈڭىزنىڭ بىخەتەرلىك تەڭشىكى تەھرىرلىگۈچنىڭ كۆچۈر مەشغۇلاتىنى ئۆزلۈكىدىن ئىجرا قىلىشىغا يول قويمايدۇ، ھەرپتاختا تېز كۇنۇپكا (Ctrl/Cmd+C) ئارقىلىق تاماملاڭ","cut":"كەس","cutError":"تور كۆرگۈڭىزنىڭ بىخەتەرلىك تەڭشىكى تەھرىرلىگۈچنىڭ كەس مەشغۇلاتىنى ئۆزلۈكىدىن ئىجرا قىلىشىغا يول قويمايدۇ، ھەرپتاختا تېز كۇنۇپكا (Ctrl/Cmd+X) ئارقىلىق تاماملاڭ","paste":"چاپلا","pasteArea":"چاپلاش د


].
///
/// Returns:
/// The parsed `line-height` value as a double in pixels.
///
/// Examples:
/// ```dart
/// print(parseLineHeight('0.8'));   // 1.0
/// print(parseLineHeight('1.1'));   // 1.0
/// print(parseLineHeight('1.2'));   // 1.15
/// print(parseLineHeight('1.3'));   // 1.5
/// print(parseLineHeight('1.7'));   // 1.5
/// print(parseLineHeight('2.2'));   // 2.0
///
/// // Example with different units
/// print(parseLineHeight('120%'));  // 19.2 (16 * 1.2)
/// print(parseLineHeight('1.5em')); // 24.0 (16 * 1.5)
/// print(parseLineHeight('1.2rem')); // 19.2 (16 * 1.2)
/// ```
double parseLineHeight(
  String lineHeight, {
  double fontSize = 16,
  double rootFontSize = 16,
}) {
  // Convert line-height values
  double parsedValue;
  if (lineHeight.endsWith('px')) {
    parsedValue = double.parse(lineHeight.replaceAll('px', ''));
  } else if (lineHeight.endsWith('%')) {
    parsedValue =
        fontSize * (double.parse(lineHeight.replaceAll('%', '')) / 100);
  } else if (lineHeight.endsWith('rem')) {
    parsedValue = rootFontSize * double.parse(lineHeight.replaceAll('rem', ''));
  } else if (lineHeight.endsWith('em')) {
    parsedValue = fontSize * double.parse(lineHeight.replaceAll('em', ''));
  } else if (lineHeight == 'normal') {
    parsedValue = fontSize * normalLineHeightMultiplier;
  } else if (lineHeight.startsWith(_cssVariables)) {
    parsedValue = 1.0;
  } else {
    parsedValue = fontSize * (double.tryParse(lineHeight) ?? 1.0);
  }

  // Apply additional constraints
  if (parsedValue < 1.0) {
    parsedValue = 1.0;
  } else if (parsedValue > 1.0 && parsedValue < 1.15) {
    parsedValue = 1.0;
  } else if (parsedValue > 1.15 && parsedValue < 1.25) {
    parsedValue = 1.15;
  } else if (parsedValue > 1.25 && parsedValue < 1.5) {
    parsedValue = 1.5;
  } else if (parsedValue > 1.5 && parsedValue < 2.0) {
    parsedValue = 1.5;
  } else if (parsedValue > 2.0) {
    parsedValue = 2.0;
  }

  return parsedValue;
}
import 'package:dart_quill_delta/dart_quill_delta.dart';
import 'package:flutter_quill_delta_from_html/flutter_quill_delta_from_html.dart';
import 'package:html/dom.dart' as dom;

/// Processes a DOM [node], converting it into Quill Delta operations.
///
/// Recursively processes the DOM nodes, converting text nodes, inline styles,
/// links, and custom HTML blocks into Quill Delta operations.
///
/// Parameters:
/// - [node]: The DOM node to process.
/// - [attributes]: The current Delta attributes to apply.
/// - [delta]: The Delta object to push operations into.
/// - [addSpanAttrs]: Whether to add attributes from <span> tags.
/// - [customBlocks]: Optional list of custom HTML block definitions.
///
/// Example:
/// ```dart
/// final htmlNode = dom.Element.tag('p')..append(dom.Text('Hello, <strong><em>World</em></strong>!'));
/// final delta = Delta();
/// processNode(htmlNode, {}, delta);
/// print(delta.toJson()); // Output: [{"insert": "Hello, "}, {"insert": "World", "attributes": {"italic": true, "bold": true}}, {"insert": "!"}]
/// ```
void processNode(
  dom.Node node,
  Map<String, dynamic> attributes,
  Delta delta, {
  bool addSpanAttrs = false,
  List<CustomHtmlPart>? customBlocks,
  List<String>? removeTheseAttributesFromSpan,
  CSSVarible? onDetectLineheightCssVariable,
}) {
  if (node is dom.Text) {
    delta.insert(node.text, attributes.isEmpty


 data_name);
    //results_mgr.file_lookup(dbData, iterator_instance, data_name);
  }
}

template<typename StoredType>
ResultsEntry<StoredType>::
ResultsEntry(const ResultsManager& results_mgr,
	     const StrStrSizet& iterator_id,
	     const std::string& data_name,
	     size_t array_index):
  coreActive(results_mgr.core_db_active())
{
  // populate the local dbData object if needed
  if (coreActive)
    dbDataPtr =
      results_mgr.core_lookup_ptr<StoredType>(iterator_id, data_name,
					      array_index);
  else {
    Cerr << "\nResults database not active, can't retrieve." << std::endl;
    abort_handler(-1);
    // copy for now, eventually file lookup
    //dbData =
    //  results_mgr.core_lookup<StoredType>(iterator_id, data_name, array_index);
    //results_mgr.file_lookup(dbData, iterator_instance, data_name);
  }
}

// inactive for now: may cause compile issues w/ Intel C++
// template<typename StoredType>
// const StoredType& ResultsEntry<StoredType>::const_view() const
// {
//   // prefer return of core data
//   if (coreActive)
//     if (dbDataPtr)
//       return *dbDataPtr;
//     else {
//       Cerr << "Unexpected NULL pointer in ResultsManager!" << std::endl;
//       abort_handler(-1);
//     }
//   return dbData;
// }

#endif

}  // namespace Dakota

#endif  // RESULTS_MANAGER_H
/*  _______________________________________________________________________

    Dakota: Explore and predict with confidence.
    Copyright 2014-2025
    National Technology & Engineering Solutions of Sandia, LLC (NTESS).
    This software is distributed under the GNU Lesser General Public License.
    For more information, see the README file in the top Dakota directory.
    _______________________________________________________________________ */

#ifndef NOND_GLOBAL_EVIDENCE_H
#define NOND_GLOBAL_EVIDENCE_H

#include "dakota_data_types.hpp"
#include "NonDGlobalInterval.hpp"
#include "DakotaModel.hpp"
#include "DakotaIterator.hpp"

namespace Dakota {

/// Class for the Dempster-Shafer Evidence Theory methods within DAKOTA/UQ

/** The NonDEvidence class implements the propagation of epistemic uncertainty
    using Dempster-Shafer theory of evidence. In this approach, one assigns
    a set of basic probability assignments (BPA) to intervals defined
    for the uncertain variables.  Input interval combinations are calculated,
    along with their BPA.  Currently, the response function is evaluated at
    a set of sample points, then a response surface is constructed which is
    sampled extensively to find the minimum and maximum within each input
    interval cell, corresponding to the belief and plausibility within that
    cell, respectively.  This data is then aggregated to calculate cumulative
    distribution functions for belief and plausibility. */

class NonDGlobalEvidence: public NonDGlobalInterval
{
public:

  //
  //- Heading: Constructors and destructor
  //

  NonDGlobalEvidence(ProblemDescDB& problem_db, ParallelLibrary& parallel_lib,  std::shared_ptr<Model> model); ///< constructor
  ~NonDGlobalEvidence() override;                                       ///< destructor

  //
  //- Heading: Virtual function redefinitions
  //

  void initialize() override;
  void set_cell_bounds() override;
  void get_best_sample(bool maximize, bool eval_approx) override;
  void post_process_cell_results(bool maximize) override;
  void post_process_response_fn_results() override;
  void post_process_final_results() over


/***********************************************************************
*                                                                      *
*               This software is part of the ast package               *
*          Copyright (c) 1985-2011 AT&T Intellectual Property          *
*                      and is licensed under the                       *
*                 Eclipse Public License, Version 1.0                  *
*                    by AT&T Intellectual Property                     *
*                                                                      *
*                A copy of the License is available at                 *
*          http://www.eclipse.org/org/documents/epl-v10.html           *
*         (with md5 checksum b35adb5213ca9657e911e9befb180842)         *
*                                                                      *
*              Information and Software Systems Research               *
*                            AT&T Research                             *
*                           Florham Park NJ                            *
*                                                                      *
*                 Glenn Fowler <gsf@research.att.com>                  *
*                  David Korn <dgk@research.att.com>                   *
*                   Phong Vo <kpv@research.att.com>                    *
*                                                                      *
***********************************************************************/
#include	"sfhdr.h"

#undef sfllen

#if __STD_C
int sfllen(reg Sflong_t v)
#else
int sfllen(v)
reg Sflong_t	v;
#endif
{
	return __sf_llen(v);
}


['https-proxy'], 'https://localhost/', 'https-proxy is set')
    t.equal(rc['local-address'], '127.0.0.1', 'local-address is set')
    t.equal(rc.target, '1.4.0', 'target is set')
    t.equal(rc.runtime, 'electron', 'runtime is set')
    t.equal(rc.platform, 'linux', 'platform is set')
    t.equal(rc.buildFromSource, true, 'build-from-source is set')
    t.equal(rc.libc, 'testlibc', 'libc is set')
    t.end()
  })
})

test('can pass in external package config to rc', function (t) {
  const pkg = {
    config: {
      target: '1.0.0',
      runtime: 'electron',
      arch: 'woohoo-arch'
    }
  }
  const rc = require('../rc')(pkg)
  t.equal(rc.target, '1.0.0', 'correct target')
  t.equal(rc.runtime, 'electron', 'correct runtime')
  t.equal(rc.arch, 'woohoo-arch', 'correct arch')
  t.end()
})

test('use default ABI', function (t) {
  runRc(t, '', {}, function (rc) {
    t.equal(rc.abi, process.versions.modules, 'correct default ABI')
    t.end()
  })
})

test('using --tag-prefix will set the tag prefix', function (t) {
  const args = ['--tag-prefix @scoped/package@']
  runRc(t, args.join(' '), {}, function (rc) {
    t.equal(rc['tag-prefix'], '@scoped/package@', 'tag prefix should be set')
    t.end()
  })
})

test('libc works on linux platform', function (t) {
  const args = [
    '--libc musl --platform linux'
  ]
  runRc(t, args.join(' '), {}, function (rc, tmp) {
    t.equal(rc.libc, 'musl', 'libc family')
    t.equal(rc.platform, 'linux', 'platform')
    t.end()
  })
})

test('libc glibc is passed as empty', function (t) {
  const args = [
    '--libc glibc --platform linux'
  ]
  runRc(t, args.join(' '), {}, function (rc, tmp) {
    t.equal(rc.libc, '', 'libc family')
    t.equal(rc.platform, 'linux', 'platform')
    t.end()
  })
})

test('libc is discarded on non-linux platform', function (t) {
  const args = [
    '--libc musl --platform windows'
  ]
  runRc(t, args.join(' '), {}, function (rc, tmp) {
    t.equal(rc.libc, '', 'libc family')
    t.equal(rc.platform, 'windows', 'platform')
    t.end()
  })
})

function runRc (t, args, env, cb) {
  const pkg = {
    name: 'test',
    private: true,
    scripts: {
      install: 'node ' + path.resolve(__dirname, '..', 'rc.js') + ' ' + args
    }
  }

  const tmp = tempy.directory()
  const json = JSON.stringify(pkg)

  fs.writeFile(path.join(tmp, 'package.json'), json, function (err) {
    if (err) throw err

    const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm'
    const cmd = npm + ' run install'

    env = Object.assign(cleanEnv(process.env), env)

    exec(cmd, { env, cwd: tmp }, function (err, stdout, stderr) {
      t.error(err, 'no error')
      t.equal(stderr.trim(), '', 'no stderr')

      let result

      try {
        result = JSON.parse(stdout.slice(stdout.indexOf('{')))
      } catch (e) {
        return t.fail(e)
      }

      cb(result, tmp)
    })
  })
}
const test = require('tape')
const fs = require('fs'


#!/usr/bin/env python3
"""
Script to post [Grafana Annotations](https://grafana.com/docs/grafana/latest/dashboards/annotations/)

This is primarily used to annotate deployments in Grafana,
which can be very useful when displayed alongside various graphs.

This script requires:

- An environment variable GRAFANA_API_KEY with a grafana
  [API Key](https://grafana.com/docs/grafana/latest/http_api/auth/#create-api-token)
  with at least Editor permissions
- The requests library
"""
import argparse
import os
import time

import requests

def create_annotation(grafana_url, grafana_api_key, tags, text):
    """
    Create annotation in a grafana instance.
    """
    return requests.post(
        grafana_url + "/api/annotations",
        json={
            "tags": tags,
            "text": text,
            "time": int(time.time() * 1000),
            "isRegion": False,
        },
        headers={"Authorization": f"Bearer {grafana_api_key}"},
    ).text

def main():
    argparser = argparse.ArgumentParser()
    argparser.add_argument("--grafana-url", help="URL of the grafana instance to use")

    argparser.add_argument(
        "--tag",
        help="Tags to add to the annotation",
        default=[],
        action="append",
        dest="tags",
    )

    argparser.add_argument("text", help="Text to use for the annotation")

    args = argparser.parse_args()
    print(
        create_annotation(
            args.grafana_url, os.environ["GRAFANA_API_KEY"], args.tags, args.text
        )
    )

if __name__ == "__main__":
    main()


ya*cxa)
			sx,sy,sz = vnorm(this.sx, this.sy, this.sz)
			ax,ay,az = vnorm(vcross(fx,fy,fz,sx,sy,sz))
			bx,by,bz = vnorm(vcross(fx,fy,fz,ax,ay,az))

			-- rotate forward and sky

			fx,fy,fz = vrotate(this.dangy,fx,fy,fz,bx,by,bz)
			sx,sy,sz = vrotate(this.dangy,sx,sy,sz,bx,by,bz)

			-- normalise F and S
			fx,fy,fz = vnorm(fx,fy,fz)
			sx,sy,sz = vnorm(sx,sy,sz)

			-- stash sky arrow
			this.sx = sx
			this.sy = sy
			this.sz = sz

			-- convert forward from vector to polar
			this.angx = math.asin(fy)
			local langx = this.angx

			if math.cos(langx) <= 0.0 then
				fx = -fx
				fz = -fz
			end

			this.angy = math.atan2(fx,fz)

			--print("polar",this.angx, this.angy)

		else
			this.angx = this.angx + this.dangx
			this.angy = this.angy + this.dangy
		end
		this.dangx = 0
		this.dangy = 0
	end

	function this.calc_motion_local(sec_current, sec_delta)
		-- move along
		local mvx = 0.0
		local mvy = 0.0
		local mvz = 0.0

		if this.ev_forward then
			mvz = mvz + 1.0
		end
		if this.ev_back then
			mvz = mvz - 1.0
		end
		if this.ev_left then
			mvx = mvx + 1.0
		end
		if this.ev_right then
			mvx = mvx - 1.0
		end

		if this.mode == PLM_NORMAL then
			if this.ev_crouch then
				if this.grounded and not this.crouching then
					if MODE_SOFTCROUCH then this.jerkoffs = this.jerkoffs - 1 end
					this.y = this.y + 1
				end
				this.crouching = true
			end
			if this.ev_jump and this.alive and (MODE_CHEAT_FLY or this.grounded) then
				this.vy = -MODE_JUMP_SPEED

				if not MODE_JUMP_POGO then
					this.ev_jump = false
				end

				if client then
					client.wav_play_global(wav_jump_up, this.x, this.y, this.z)
				end
			end
		else
			if this.ev_crouch then
				mvy = mvy + 1.0
			end
			if this.ev_jump then
				mvy = mvy - 1.0
			end
		end

		-- normalise mvx,mvy,mvz
		local mvd = math.max(0.00001,math.sqrt(mvx*mvx + mvy*mvy + mvz*mvz))
		mvx = mvx / mvd
		mvy = mvy / mvd
		mvz = mvz / mvd

		-- apply base slowdown
		local mvspd = MODE_PSPEED_NORMAL
		local mvchange = MODE_PSPEED_CHANGE
		if this.mode ~= PLM_NORMAL then mvspd = MODE_PSPEED_FLYMODE end
		mvx = mvx * mvspd
		mvy = mvy * mvspd
		mvz = mvz * mvspd

		-- apply extra slowdowns
		if this.mode == PLM_NORMAL then
			if not this.grounded then
				mvx = mvx * MODE_PSPEED_AIRSLOW
				mvz = mvz * MODE_PSPEED_AIRSLOW
				mvchange = mvchange * MODE_PSPEED


图|||總平面圖|zǒngpíngmiàntú",
    "总干事|||總幹事|zǒnggànshi",
    "总后勤部|||總後勤部|Zǒnghòuqínbù",
    "总得|||總得|zǒngděi",
    "总成本|||總成本|zǒngchéngběn",
    "总括|||總括|zǒngkuò",
    "总指挥部|||總指揮部|zǒngzhǐhuībù",
    "总揽|||總攬|zǒnglǎn",
    "总收入|||總收入|zǒngshōurù",
    "总收益|||總收益|zǒngshōuyì",
    "总政治部|||總政治部|Zǒngzhèngzhìbù",
    "总数|||總數|zǒngshù",
    "总方针|||總方針|zǒngfāngzhēn",
    "总是|||總是|zǒngshì",
    "总书记|||總書記|zǒngshūji",
    "总会三明治|||總會三明治|zǒnghuìsānmíngzhì",
    "总会会长|||總會會長|zǒnghuìhuìzhǎng",
    "总有|||總有|zǒngyǒu",
    "总杆赛|||總桿賽|zǒnggānsài",
    "总机|||總機|zǒngjī",
    "总次数|||總次數|zǒngcìshù",
    "总归|||總歸|zǒngguī",
    "总决赛|||總決賽|zǒngjuésài",
    "总法律顾问|||總法律顧問|zǒngfǎlǜgùwèn",
    "总热值|||總熱值|zǒngrèzhí",
    "总理|||總理|zǒnglǐ",
    "总理衙门|||總理衙門|zǒnglǐyámen",
    "总产值|||總產值|zǒngchǎnzhí",
    "总产量|||總產量|zǒngchǎnliàng",
    "总的来说|||總的來說|zǒngdeláishuō",
    "总监|||總監|zǒngjiān",
    "总目|||總目|zǒngmù",
    "总督|||總督|zǒngdū",
    "总社|||總社|zǒngshè",
    "总称|||總稱|zǒngchēng",
    "总站|||總站


QuadraticBase> (g: Ratio<T>, y: &Ratio<T>) -> Option<(T, T, T)> where
        for<'r> &'r T: RefNum<T> {
            let two_ab = (T::one() + T::one()) * g.numer() * g.denom();
            let d = two_ab.gcd(y.numer());
            let scale = y.numer() / d;
            let c2 = two_ab * &scale * &scale * y.denom() / y.numer();
            let (a, b) = (g.numer() * &scale, g.denom() * scale);
            if c2.is_negative() {
                return None;
            }
            let c = c2.sqrt();
            if &c * &c != c2 {
                None
            } else {
                Some((a, b, c))
            }
        }

        let ret = if let Some((a, b, c)) = get_abc(&x_y - &delta, &y) {
            QuadraticSurd::new(a, b, c, target.discr)
        } else if let Some((a, b, c)) = get_abc(&x_y + delta, &y) {
            QuadraticSurd::new(a, b, c, target.discr)
        } else {
            return Err(reconstruct(x_y, y, target.discr, SqrtErrorKind::Unrepresentable))
        };

        debug_assert!(!ret.coeffs.0.is_negative());
        Ok(ret)
    }
}

#[cfg(test)]
mod tests {
    use super::*;
    use core::convert::TryFrom;

    pub const PHI: QuadraticSurd<i32> = QuadraticSurd::new_raw(1, 1, 2, 5); // 1.618
    pub const PHI_R: QuadraticSurd<i32> = QuadraticSurd::new_raw(-1, 1, 2, 5); // 0.618
    pub const N_PHI: QuadraticSurd<i32> = QuadraticSurd::new_raw(-1, -1, 2, 5); // -1.618
    pub const N_PHI_R: QuadraticSurd<i32> = QuadraticSurd::new_raw(1, -1, 2, 5); // -0.618
    pub const PHI_SQ: QuadraticSurd<i32> = QuadraticSurd::new_raw(3, 1, 2, 5);

    pub const PHI45: QuadraticSurd<i32> = QuadraticSurd::new_raw(3, 1, 6, 45); // non-reduced version of PHI
    pub const PHI45_R: QuadraticSurd<i32> = QuadraticSurd::new_raw(-3, 1, 6, 45); // non-reduced version of PHI_R

    pub const SQ5: QuadraticSurd<i32> = QuadraticSurd::new_raw(0, 1, 1, 5);
    pub const N_SQ5: QuadraticSurd<i32> = QuadraticSurd::new_raw(0, -1, 1, 5);

    #[test]
    fn creation_test() {
        let coeffs: (i32, i32, i32, i32) = QuadraticSurd::new(2, 6, 2, 5).into();
        assert_eq!(coeffs, (1, 3, 1, 5)); // reduce common divisors

        let coeffs: (i32, i32, i32, i32) = QuadraticSurd::new(2, 1, 2, 18).into();
        assert_eq!(coeffs, (2, 1, 2, 18)); // 18 is not trivially reducible

        let coeffs: (i32, i32, i32, i32) = QuadraticSurd::new(3, 1, 3, 18).into();
        assert_eq!(coeffs, (1, 1, 1, 2)); // 18 is reducible with the help of gcd hint

        let coeffs: (i32, i32, i32, i32) = QuadraticSurd::new(3, 1, 3, 9).into();
        assert_eq!(coeffs, (2, 0, 1, 0)); // 9 is a square number
    }

    #[test]
    fn conversion_test() {
        assert_eq!(PHI.floor().to_i32(), Some(1));
        assert_eq!(PHI_R.floor().to_


bgeu, x3, x10, x11, 0x5, 0x10000, 0x80, 3f, x2, 728,0)

inst_203:
// rs1_val==858993459 and rs2_val==3,
// opcode: bgeu, op1:x10; op2:x11; op1val:0x33333333; op2val:0x3; immval:0x400; align:0
TEST_BRANCH_OP(bgeu, x3, x10, x11, 0x33333333, 0x3, 0x400, 1b, x2, 732,0)

inst_204:
// rs1_val==858993459 and rs2_val==1431655765,
// opcode: bgeu, op1:x10; op2:x11; op1val:0x33333333; op2val:0x55555555; immval:0x100; align:0
TEST_BRANCH_OP(bgeu, x3, x10, x11, 0x33333333, 0x55555555, 0x100, 3f, x2, 736,0)

inst_205:
// rs1_val==858993459 and rs2_val==2863311530,
// opcode: bgeu, op1:x10; op2:x11; op1val:0x33333333; op2val:0xaaaaaaaa; immval:0x6; align:0
TEST_BRANCH_OP(bgeu, x3, x10, x11, 0x33333333, 0xaaaaaaaa, 0x6, 3f, x2, 740,0)

inst_206:
// rs1_val==858993459 and rs2_val==5,
// opcode: bgeu, op1:x10; op2:x11; op1val:0x33333333; op2val:0x5; immval:0x100; align:0
TEST_BRANCH_OP(bgeu, x3, x10, x11, 0x33333333, 0x5, 0x100, 3f, x2, 744,0)

inst_207:
// rs1_val==858993459 and rs2_val==858993459,
// opcode: bgeu, op1:x10; op2:x11; op1val:0x33333333; op2val:0x33333333; immval:0x2; align:0
TEST_BRANCH_OP(bgeu, x3, x10, x11, 0x33333333, 0x33333333, 0x2, 3f, x2, 748,0)

inst_208:
// rs1_val==858993459 and rs2_val==1717986918,
// opcode: bgeu, op1:x10; op2:x11; op1val:0x33333333; op2val:0x66666666; immval:0x20; align:0
TEST_BRANCH_OP(bgeu, x3, x10, x11, 0x33333333, 0x66666666, 0x20, 3f, x2, 752,0)

inst_209:
// rs1_val==858993459 and rs2_val==46340,
// opcode: bgeu, op1:x10; op2:x11; op1val:0x33333333; op2val:0xb504; immval:0x100; align:0
TEST_BRANCH_OP(bgeu, x3, x10, x11, 0x33333333, 0xb504, 0x100, 3f, x2, 756,0)

inst_210:
// rs1_val==858993459 and rs2_val==0,
// opcode: bgeu, op1:x10; op2:x11; op1val:0x33333333; op2val:0x0; immval:0x400; align:0
TEST_BRANCH_OP(bgeu, x3, x10, x11, 0x33333333


OutputResult::Success=>break,
            res => panic!("UH OH"),
        }
    }
    assert_eq!(count, 1); // this is not necessary for correctness
    // this just asserts that the algorithm did the job in one go
    let mut first_copy_data = [0u8;15];
    let mut first_readout = [0u8;65];
    first_copy_data.clone_from_slice(&buffer[(TEST_RING_SIZE - 15)..TEST_RING_SIZE]);

    let mut first_index = 0;
    state.flush(&mut first_readout, &mut first_index);
    assert_eq!(first_index, 64);
    assert_eq!(first_readout[..15], first_copy_data);
    assert_eq!(first_readout[15..30], first_copy_data);
    assert_eq!(first_readout[45..60], first_copy_data);
    assert_eq!(first_readout[60..64], first_copy_data[0..4]);
    assert_eq!(first_readout[64], 0);
}
#[allow(unused)]
fn help_copy_big_overlap(mut state: super::DivansRecodeState<ExRingBuffer>,
             buffer: &[u8]) {
    assert!(state.state.ring_buffer_decode_index == 102); //thhis makes sure we test wraparound
    assert_state_equals_history_buffer(&state, buffer);
    let mut scratch_buffer = [0u8; TEST_RING_SIZE];
    let mut count = 0;
    for _i in 0..256 {
        count += 1;
        match state.parse_copy(&super::CopyCommand{distance:125,
                                                   num_bytes:258}) {
            DivansOutputResult::NeedsMoreOutput=>{},
            DivansOutputResult::Success=>panic!("Not enough buffer room"),
            res => panic!("uh oh"),
        }
    }
    assert_eq!(count, 256); // this is not necessary for correctness
    // this just asserts that the algorithm did the job in one go
    let mut first_copy_data = [0u8;125];
    first_copy_data.clone_from_slice(&buffer[(TEST_RING_SIZE - 125)..TEST_RING_SIZE]);
    let mut first_readout = [0u8;128];
    let mut first_index = 0;
    state.flush(&mut first_readout, &mut first_index);
    for _i in 0..64 {
        count += 1;
        match state.parse_copy(&super::CopyCommand{distance:125,
                                                   num_bytes:258}) {
            DivansOutputResult::NeedsMoreOutput=>{},
            DivansOutputResult::Success=>panic!("Not enough buffer room"),
            res => panic!("uh oh"),
        }
    }
    let mut sec_readout = [0u8;128];
    let mut sec_index = 0;
    state.flush(&mut sec_readout, &mut sec_index);
    assert_eq!(first_index, 127);

    assert_eq!(first_readout[..64], first_copy_data[..64]);
    assert_eq!(first_readout[64..125], first_copy_data[64..]);
    assert_eq!(first_readout[125..127], first_copy_data[..2]);
    assert_eq!(first_readout[..64], first_copy_data[..64]);
    assert_eq!(first_readout[64..125], first_copy_data[64..]);
    assert_eq!(first_readout[125..127], first_copy_data[..2]);

    assert_eq!(sec_index, 127);
    assert_eq!(sec_readout[0..123], first_copy_data[2..125]);
    assert_eq!(sec_readout[123..127], first_copy_data[0..4]);
    for _i in 0..16 {
        count += 1;


Source = new InMemoryTraceSource();
      IPropertyInjection propertyInjection = ILogicAbstraction.NewPropertyInjection();
      propertyInjection.TraceSource = traceSource;
      propertyInjection.Alpha();
      propertyInjection.Bravo();
      propertyInjection.Charlie();
      propertyInjection.Delta();
      traceSource.CheckConsistency();
      propertyInjection.TraceSource = new DoNothingTraceSource(); //It is possible to inject new object of a different type.
      propertyInjection.Alpha();
      propertyInjection.Bravo();
      propertyInjection.Charlie();
      propertyInjection.Delta();
      traceSource.CheckConsistency();
    }

    [TestMethod]
    public void ConstructorInjectionTest()
    {
      InMemoryTraceSource traceSource = new InMemoryTraceSource();
      ILogic _ConstructorInjection = ILogicAbstraction.NewConstructorInjection(traceSource);
      _ConstructorInjection.Alpha();
      _ConstructorInjection.Bravo();
      _ConstructorInjection.Charlie();
      _ConstructorInjection.Delta();
      traceSource.CheckConsistency();
    }
  }
}


Gilet bleu en lin"
L["Blue Overalls"] = "Salopette bleue"
L["Blue Rocket Cluster"] = "Chapelet de comètes bleues"
L["Boiled Clams"] = "Palourdes bouillies"
L["Bolt of Linen Cloth"] = "Rouleau d'étoffe de lin"
L["Bolt of Mageweave"] = "Rouleau de tisse-mage"
L["Bolt of Runecloth"] = "Rouleau d'étoffe runique"
L["Bolt of Silk Cloth"] = "Rouleau d'étoffe de soie"
L["Bolt of Woolen Cloth"] = "Rouleau d'étoffe de laine"
L["Boots of the Enchanter"] = "Bottes de l'enchanteur"
L["Bottomless Bag"] = "Sac sans fond"
L["Bramblewood Belt"] = "Ceinture de la ronceraie"
L["Bramblewood Boots"] = "Bottes de la ronceraie"
L["Bramblewood Helm"] = "Casque de la ronceraie"
L["Bright Yellow Shirt"] = "Chemise jaune vif"
L["Bright-Eye Goggles"] = "Lunettes d'oeil brillant"
L["Brightcloth Cloak"] = "Cape en étoffe lumineuse"
L["Brightcloth Gloves"] = "Gants en étoffe lumineuse"
L["Brightcloth Pants"] = "Pantalon en étoffe lumineuse"
L["Brightcloth Robe"] = "Robe en étoffe lumineuse"
L["Brilliant Mana Oil"] = "Huile de mana brillante"
L["Brilliant Smallfish"] = "Goujon brillant"
L["Brilliant Wizard Oil"] = "Huile de sorcier brillante"
L["Bristle Whisker Catfish"] = "Poisson-chat moustachu"
L["Bronze Axe"] = "Hache en bronze"
L["Bronze Battle Axe"] = "Hache de guerre en bronze"
L["Bronze Framework"] = "Structure en bronze"
L["Bronze Greatsword"] = "Epée de guerre en bronze"
L["Bronze Mace"] = "Masse en bronze"
L["Bronze Shortsword"] = "Epée courte en bronze"
L["Bronze Tube"] = "Tube de bronze"
L["Bronze Warhammer"] = "Marteau de guerre en bronze"
L["Brown Linen Pants"] = "Pantalon marron en lin"
L["Brown Linen Robe"] = "Robe marron en lin"
L["Brown Linen Shirt"] = "Chemise marron en lin"
L["Brown Linen Vest"] = "Gilet marron en lin"
L["Carrion Surprise"] = "Tourte surprise"
L["Catseye Elixir"] = "Elixir d'oeil de chat"
L["Catseye Ultra Goggles"] = "Lunettes d'oeil de chat"
L["Cenarion Herb Bag"] = "Sac d'herbes cénarien"
L["Charred Wolf Meat"] = "Viande de loup grillée"
L["Chimeric Boots"] = "Bottes chimériques"
L["Chimeric Gloves"] = "Gants chimériques"
L["Chimeric Leggings"] = "Jambières chimériques"
L["Chimeric Vest"] = "Gilet chimérique"
L["Chromatic Cloak"] = "Cape chromatique"
L["Chromatic Gauntlets"] = "Gantelets chromatiques"
L["Cindercloth Boots"] = "Bottes en étoffe cendrée"
L["Cindercloth Cloak"] = "Cape en étoffe cendrée"
L["Cindercloth Gloves"] = "Gants en étoffe cendrée"
L["Cindercloth Pants"] = "Pantalon en étoffe