/*
 * Copyright (C) 2009 Google Inc. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 *     * Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above
 * copyright notice, this list of conditions and the following disclaimer
 * in the documentation and/or other materials provided with the
 * distribution.
 *     * Neither the name of Google Inc. nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#ifndef WebScreenInfo_h
#define WebScreenInfo_h

#include "WebRect.h"

namespace WebKit {

struct WebScreenInfo {
    // The screen depth in bits per pixel
    int depth;

    // The bits per colour component. This assumes that the colours are balanced
    // equally.
    int depthPerComponent;

    // This can be true for black and white printers
    bool isMonochrome;

    // This is set from the rcMonitor member of MONITORINFOEX, to whit:
    //   "A RECT structure that specifies the display monitor rectangle,
    //   expressed in virtual-screen coordinates. Note that if the monitor
    //   is not the primary display monitor, some of the rectangle's
    //   coordinates may be negative values."
    WebRect rect;

    // This is set from the rcWork member of MONITORINFOEX, to whit:
    //   "A RECT structure that specifies the work area rectangle of the
    //   display monitor that can be used by applications, expressed in
    //   virtual-screen coordinates. Windows uses this rectangle to
    //   maximize an application on the monitor. The rest of the area in
    //   rcMonitor contains system windows such as the task bar and side
    //   bars. Note that if the monitor is not the primary display monitor,
    //   some of the rectangle's coordinates may be negative values".
    WebRect availableRect;

    WebScreenInfo()
        : depth(0)
        , depthPerComponent(0)
        , isMonochrome(false) { }
};

} // namespace WebKit

#endif


��시기",nil},
[26075] = {"경리",nil},
[26081] = {"함대 사령관 \"쉘리\" 조릭","퇴역자"},
[26089] = {"케이리","특수 장비 상인"},
[26090] = {"카린나","특수 장비 상인"},
[26091] = {"올루스","특수 장비 상인"},
[26092] = {"소린","특수 장비 상인"},
[26101] = {"불꽃 악령",nil},
[26111] = {"그림토템부족 늑대 정령",nil},
[26113] = {"불꽃 마술의 대가",nil},
[26116] = {"서리파도 부관",nil},
[26119] = {"새끼 불사조",nil},
[26120] = {"Wisp Dest Bunny",nil},
[26121] = {"Wisp Source Bunny",nil},
[26123] = {"한여름 축제 보급원",nil},
[26124] = {"한여름 축제 상인",nil},
[26131] = {"날쌘 흰색 매타조",nil},
[26164] = {"붉은색 로켓 탈것",nil},
[26166] = {"이단자 수정 경비병",nil},
[26178] = {"우박의 부관",nil},
[26192] = {"푸른색 로켓 탈것",nil},
[26204] = {"서리바람 부관",nil},
[26207] = {"충성스러운 멧돼지",nil},
[26214] = {"극한의 부관",nil},
[26215] = {"빙하의 부관",nil},
[26216] = {"빙하의 기사",nil},
[26221] = {"속세의 고리회 장로","속세의 고리회"},
[26222] = {"황혼의 냉기술사","황혼의 망치단"},
[26223] = {"황혼의 서리검사","황혼의 망치단"},
[26230] = {"눈",nil},
[26238] = {"코륨 멧돼지",nil},
[26239] = {"아훈의 유령",nil},
[26240] = {"바다안개 알바트로스",nil},
[26242] = {"창공의 거북이",nil},
[26243] = {"진홍빛 뱀",nil},
[26244] = {"어둠노래 퓨마",nil},
[26246] = {"예언자 벨렌",nil},
[26247] = {"여군주 리아드린","혈기사단 여군주"},
[26251]


 * Majorly from: https://github.com/android/testing-samples/blob/main/ui/espresso/ScreenshotSample/app/src/androidTest/java/com/example/android/testing/espresso/screenshotsample
 *
 * When this test is executed via gradle managed devices, the saved image files will be stored at
 * build/outputs/managed_device_android_test_additional_output/debugAndroidTest/managedDevice/nexusOneApi30/
 * or
 * build/outputs/connected_android_test_additional_output/debugAndroidTest/connected/Pixel_2_API_30(AVD) - 11
 */
@RunWith(AndroidJUnit4::class)
class MainActivityTest : PVRInstrumentationBase() {

    @get:Rule
    var perms1: GrantPermissionRule =
        GrantPermissionRule.grant(android.Manifest.permission.READ_EXTERNAL_STORAGE)

    @get:Rule
    var perms2: GrantPermissionRule =
        GrantPermissionRule.grant(android.Manifest.permission.WRITE_EXTERNAL_STORAGE)

    @get:Rule var nameRule = TestName()

    @get:Rule val activityScenarioRule = activityScenarioRule<MainActivity>()

    /** Captures and saves an image of the entire device screen to storage. */
    @SuppressLint("CheckResult")
    @Test
    @Throws(IOException::class)
    fun saveDeviceScreenBitmap() {
        onView(isRoot())
        sleep(1000)

        takeScreenshot().writeToTestStorage("${javaClass.simpleName}_${nameRule.methodName}")
    }
}
package com.vladgba.keyb

internal val LATIN_KEYS = 97..122
internal const val LATIN_OFFSET = 68
internal const val MULTIBYTE_UTF = 56320

internal const val SETTINGS_FILENAME = "settings"
internal const val NUM_FILENAME = "123"
internal const val NUM2_FILENAME = "$123e"
internal const val EMOJI_FILENAME = "emoji"

internal const val LAYOUT_EXT = "txt"
internal const val BLANK_LAYOUT = "blank"
internal const val THEME_EXT = "ini"
internal const val BLANK_THEME = "blank"
internal const val SETTING_DEBUG = "debug"
internal const val SETTING_INPUT_DEVICE = "inputDevice"

// Hardware Key
internal const val SETTING_REDEFINE_HW_ACTION = "redefineHardwareActions"
internal const val KEY_DO_IF_HIDDEN = "doIfHidden"

// Settings
internal const val SETTING_DEF_LAYOUT = "defaultLayout"

// Key
internal const val KEY_KEY = "key"
internal const val KEY_CODE = "code"
internal const val KEY_HOLD = "hold"
internal const val KEY_HOLD_REPEAT = "holdRepeat"
internal const val KEY_HARD_REPEAT = "hardRepeat"
internal const val KEY_HARD_PRESS = "hard"
internal const val KEY_TOP_ACTION = "top"
internal const val KEY_BOTTOM_ACTION = "bottom"
internal const val KEY_LEFT_ACTION = "left"
internal const val KEY_RIGHT_ACTION = "right"
internal const val KEY_TEXT = "text"
internal const val KEY_TEXT_CURSOR_OFFSET = "textCurOffset"
internal const val KEY_LAYOUT = "layout"

// Modifier
internal const val KEY_MOD_META = "meta"

//Mode
internal const val KEY_MODE = "mode"
internal const val KEY_MODE_POPUP = "popup"
internal const val KEY_MODE_JOY = "joy"
internal const val KEY_MODE_META = "meta"
internal const val KEY_MODE_RANDOM = "random"

// Action
internal const val KEY_ACTION = "action"
internal const val KEY_RANDOM = "random"
internal const val KEY_RECORD = "record"
internal const val KEY_CLIPBOARD = "clipboard"
internal const val KE


 GNU General Public License        *
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.    *
 *                                                                           *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#ifndef __WINDOWSERVER_COMPONENTS_ACTIONCOMPONENT__
#define __WINDOWSERVER_COMPONENTS_ACTIONCOMPONENT__
#include "component.hpp"

class action_component_t;

/**
 * Used so the window server can itself be the handler for an action component.
 */
class internal_action_handler_t
{
public:
    virtual ~internal_action_handler_t() = default;

    virtual void handle(action_component_t* source) = 0;
};

/**
 * An action component is capable of being observed by an action listener.
 * The component may fire actions which are dispatched to the registered
 * listener for processing.
 */
class action_component_t : virtual public component_t
{
    internal_action_handler_t* internalHandler;

public:
    explicit action_component_t() : internalHandler(nullptr)
    {
    }

    ~action_component_t() override = default;

    virtual void fireAction();
    virtual void setInternalActionHandler(internal_action_handler_t* handler);
};

#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 *                                                                           *
 *  Ghost, a micro-kernel based operating system for the x86 architecture    *
 *  Copyright (C) 2022, Max Schlüssel <lokoxe@gmail.com>                     *
 *                                                                           *
 *  This program is free software: you can redistribute it and/or modify     *
 *  it under the terms of the GNU General Public License as published by     *
 *  the Free Software Foundation, either version 3 of the License, or        *
 *  (at your option) any later version.                                      *
 *                                                                           *
 *  This program is distributed in the hope that it will be useful,          *
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of           *
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            *
 *  GNU General Public License for more details.                             *
 *                                                                           *
 *  You should have received a copy of the GNU General Public License        *
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.    *
 *                                                                           *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#include "components/window.hpp"
#include "components/cursor.hpp"
#include "events/mouse_event.hpp"
#include "windowserver.hpp"
#include "component_registry.hpp"

#include <cairo/cairo.h>
#include <libfont/font_manager.hpp>
#include <libproperties/parser.hpp>
#include <libwindow/properties.hpp>
#include <math.h>

window_t::window_t() :
	backgroundColor(RGB(244, 244, 248)), borderWidth(DEFAULT_BORDER_WIDTH), cornerSize(DEFAULT_CORNER_SIZE)
{
	focused = false;
	visible = false;
	resizable = true


p = Dn, // material refined from dolamide ore
	Uqh     = unknown( 1460,  248),
	Uqs     = unknown( 1470,  251),
	Uqo     = unknown( 1480,  254),
	Uqe     = unknown( 1490,  257),
	Upn     = unknown( 1500,  260),
	Upu     = unknown( 1510,  263),
	Vb      = element( 1520, "Vibranium"             , "Vb"      , 152, 266,  4852, 9415, 3.23978365, SET_EMERALD, 200, 128, 255, 100, G_GEM_ORES_TRANSPARENT, UUM, VALUABLE, GLOWING, UNBURNABLE, "Unpentbium").aspects(TC.VITREUS, 10, TC.SENSUS, 10).setPriorityPrefix(1).qual(3, 1000.0, 512, 15), Upb = Vb,
	Upt     = unknown( 1530,  269),
	Upq     = unknown( 1540,  272),
	Upp     = unknown( 1550,  276),
	Uph     = unknown( 1560,  280),
	Ups     = unknown( 1570,  284),
	Upo     = unknown( 1580,  288),
	Upe     = unknown( 1590,  292),
	Uhn     = unknown( 1600,  296),
	Uhu     = unknown( 1610,  300),
	Uhb     = unknown( 1620,  304),
	Uht     = unknown( 1630,  308),
	Uhq     = unknown( 1640,  312),
	Uhp     = unknown( 1650,  316),
	Uhh     = unknown( 1660,  320),
	Uhs     = unknown( 1670,  324),
	Uho     = unknown( 1680,  328),
	Uhe     = unknown( 1690,  332),
	Usn     = unknown( 1700,  336),
	Usu     = unknown( 1710,  340),
	Usb     = unknown( 1720,  344),
	Ust     = unknown( 1730,  348),
	Nq      = element( 1740, "Naquadah"              , "Nq"      , 174, 352, 1500, 3000, 21.0, SET_RAD       ,  50,  50,  50, 255, G_INGOT_MACHINE_ORES, UUM, METAL, SMITHABLE, MELTING, MOLTEN, EXTRUDER, "Unseptquadium").aspects(TC.METALLUM, 3, TC.RADIO, 1, TC.NEBRISUM, 1).setRGBaLiquid(  0, 255,   0, 255).qual(3, 6.0, 1280, 4), Usq = Nq,
	Nq_528  = element( 1741, "Naquadah-Enriched"     , "Nq-528"  , 174, 354, 1500, 3000, 22.0, SET_RAD       ,  60,  60,  60, 255, G_INGOT_ORES, METAL, SMITHABLE, MELTING, MOLTEN, EXTRUDER, EXPLOSIVE).aspects(TC.METALLUM, 3, TC.RADIO, 2, TC.NEBRISUM, 2).setRGBaLiquid( 64, 255,  64, 255).setLocal("Enriched Naquadah").qual(3, 6.0, 1280, 4),
	Nq_522  = element( 1742, "Naquadria"             , "Nq-522"  , 174, 348, 1500, 3000, 20.0, SET_RAD       ,  30,  30,  30, 255, G_INGOT_ORES, METAL, SMITHABLE, MELTING, MOLTEN, EXTRUDER, EXPLOSIVE).aspects(TC.METALLUM, 4, TC.RADIO, 3, TC.NEBRISUM, 3).setRGBaLiquid(128, 255, 128, 255).qual(3, 1.0, 512, 4),
	Usp     = unknown( 1750,  356),
	Ush     = unknown( 1760,  360),
	Uss     = unknown( 1770,  364),


e Flow.eSave_Con_line_a:
	  line_a.open( reader);
	  break;
	case Flow.eSave_Con_arc_a:
	  arc_a.open( reader);
	  break;
	case Flow.eSave_Con_arrow_a:
	  arrow_a.open( reader);
	  break;
	case Flow.eSave_Con_ref_a:
	  ref_a.open( reader);
	  break;
	case Flow.eSave_Con_p_num:
	  p_num = new Integer( token.nextToken()).intValue();
	  break;
	case Flow.eSave_Con_l_num:
	  l_num = new Integer( token.nextToken()).intValue();
	  break;
	case Flow.eSave_Con_a_num:
	  a_num = new Integer( token.nextToken()).intValue();
	  break;
	case Flow.eSave_Con_arrow_num:
	  arrow_num = new Integer( token.nextToken()).intValue();
	  break;
	case Flow.eSave_Con_ref_num:
	  ref_num = new Integer( token.nextToken()).intValue();
	  break;
	case Flow.eSave_Con_point_x:
	  for ( i = 0; i < p_num; i++)
	    point_x[i] = new Double( reader.readLine()).doubleValue();
	  break;
	case Flow.eSave_Con_point_y:
	  for ( i = 0; i < p_num; i++)
	    point_y[i] = new Double( reader.readLine()).doubleValue();
	  break;

	case Flow.eSave_Con_source_ref_cnt:
	case Flow.eSave_Con_dest_ref_cnt:
	  break;
	case Flow.eSave_Con_trace_object:
	  if ( token.hasMoreTokens())
	    trace_object = token.nextToken();
	  break;
	case Flow.eSave_Con_trace_attribute:
	  if ( token.hasMoreTokens())
	    trace_attribute = token.nextToken();
	  break;
	case Flow.eSave_Con_trace_attr_type:
	  trace_attr_type = new Integer( token.nextToken()).intValue();
	  break;
	case Flow.eSave_Con_temporary_ref:
	  temporary_ref = new Integer( token.nextToken()).intValue();
	  break;
	case Flow.eSave_End:
	  end = true;
	  break;
	default:
	  System.out.println( "Syntax error in FlowCon");
	  break;
	}
	if ( end)
	  break;
      }
    } catch ( Exception e) {
      System.out.println( "IOExeption FlowCon");
    }
  }

  public void setBounds() {
      // Make extra space for arrows witch is not included in rectangel
      int x = (int)((x_left - cmn.x_left) * cmn.zoom_factor) - 3 * Flow.DRAWOFFSET;
      int y = (int)((y_low - cmn.y_low) * cmn.zoom_factor) - 3 * Flow.DRAWOFFSET;
      int width = (int)((x_right - x_left) * cmn.zoom_factor) + 6 * Flow.DRAWOFFSET;
      int height = (int)((y_high - y_low) * cmn.zoom_factor) + 6 * Flow.DRAWOFFSET;
      setBounds( x, y, width, height);
  }

  public boolean getSelect() {
    return false;
  }
  public void setSelect( boolean select) {
  }

  public void paintComponent( Graphics g1) {
    Graphics2D g = (Graphics2D) g1;
    if ( cmn.antiAliasing)
      g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);

    // Adjust pos to javabean koordinates
    FlowPoint p = new FlowPoint(cmn);
    p.x = - x_left + ((double) (3 * Flow.DRAWOFFSET)) / cmn.zoom_factor;


makerUnlockedKnc(maker1);
//         Helper.assertEqual(freeKnc2, 0);

//         let makerKncAmount = await reserve.makerKnc(maker1);
//         let expectedBurn2 = await reserve.calcBurnAmountFromFeeBurner(orderDstWei);
//         Helper.assertGreater(expectedBurn2, makerKncAmount);

//         //see now conversion rate 0
//         rate = await reserve.getConversionRate(ethAddress, tokenAdd, PRECISION, 52);
//         Helper.assertEqual(rate, 0);
//     });

//     it("change knc rate so less stake required. see reflected in burn amount calculation", async() => {
//         let tokenWeiDepositAmount = token18Dec.mul(new BN(70));
//         let kncTweiDepositAmount = PRECISION.mul(new BN(600));
//         let ethWeiDepositAmount = PRECISION.mul(new BN(0));
//         await makerDeposit(maker1, ethWeiDepositAmount, tokenWeiDepositAmount, kncTweiDepositAmount);

//         let orderSrcAmountTwei = token18Dec.mul(new BN(6));
//         let orderDstWei = new BN(minNewOrderWei);

//         //add orders
//         let rc = await reserve.submitTokenToEthOrder(orderSrcAmountTwei, orderDstWei, {from: maker1});
//         let rate = await reserve.getConversionRate(ethAddress, tokenAdd, PRECISION, 522);
//         Helper.assertGreater(rate, 0);

//         let freeKnc1 = await reserve.makerUnlockedKnc(maker1);
//         await reserve.withdrawKncFee(freeKnc1, {from: maker1});

//         freeKnc1 = await reserve.makerUnlockedKnc(maker1);
//         Helper.assertEqual(freeKnc1, 0);

//         let stakedKnc1 = await reserve.makerRequiredKncStake(maker1);

//         // set higher Eth to KNC rate (less knc per eth)
//         ethKncRate = initialEthKncRate.div(new BN(2));
//         let ethToKncRatePrecision = PRECISION.mul(ethKncRate);
//         let kncToEthRatePrecision = PRECISION.div(ethKncRate);

//         await mockNetwork.setPairRate(ethAddress, kncAddress, ethToKncRatePrecision);
//         await mockNetwork.setPairRate(kncAddress, ethAddress, kncToEthRatePrecision);

//         //burn amount should equal for fee burner and local rate
//         let expectedBurnLocal1 = await reserve.calcBurnAmount(orderDstWei);
//         let expectedBurnFeeBurnRate1 = await reserve.calcBurnAmountFromFeeBurner(orderDstWei);
//         Helper.assertEqual(expectedBurnLocal1, expectedBurnFeeBurnRate1);

//         await feeBurner.setKNCRate();

//         let expectedBurnLocal2 = await reserve.calcBurnAmount(orderDstWei);
//         let expectedBurnFeeBurnRate2 = await reserve.calcBurnAmountFromFeeBurner(orderDstWei);
//         Helper.assertEqual(expectedBurnLocal1, expectedBurnLocal2);
//         Helper.assertEqual(expectedBurnFeeBurnRate2.mul(new BN(2)), expectedBurnFeeBurnRate1);

//         await reserve.setKncPerEthBaseRate();

//         let expectedBurnLocal3 = await reserve.calcBurnAmount(orderDstWei);
//         let expectedBurnFeeBurnRate3 = await reserve.calcBurnAmountFromFeeBurner(orderDstWei);
//         Helper.assertEqual(expectedBurnFeeBurnRate3, expectedBurnLocal3);
//         Helper.assertEqual(expectedBurnFeeBurnRate3, expectedBurnFeeBurnRate2);
//     });

//     it("change knc rate so less s


rt_eq!(id2.is_client_initiated(), false);
        assert_eq!(id2.is_server_initiated(), true);
        assert_eq!(id2.role(), Role::Server);
        assert_eq!(id2.is_self_initiated(Role::Client), false);
        assert_eq!(id2.is_self_initiated(Role::Server), true);
        assert_eq!(id2.is_remote_initiated(Role::Client), true);
        assert_eq!(id2.is_remote_initiated(Role::Server), false);
        assert_eq!(id2.is_send_only(Role::Server), true);
        assert_eq!(id2.is_send_only(Role::Client), false);
        assert_eq!(id2.is_recv_only(Role::Server), false);
        assert_eq!(id2.is_recv_only(Role::Client), true);
        assert_eq!(id2.as_u64(), 35);
    }

    #[test]
    fn test_conn_stream_create() {
        let mut client = default_client();
        let out = client.process(None, now());
        let mut server = default_server();
        let out = server.process(out.dgram(), now());

        let out = client.process(out.dgram(), now());
        let _ = server.process(out.dgram(), now());
        assert!(maybe_authenticate(&mut client));
        let out = client.process(None, now());

        // client now in State::Connected
        assert_eq!(client.stream_create(StreamType::UniDi).unwrap(), 2);
        assert_eq!(client.stream_create(StreamType::UniDi).unwrap(), 6);
        assert_eq!(client.stream_create(StreamType::BiDi).unwrap(), 0);
        assert_eq!(client.stream_create(StreamType::BiDi).unwrap(), 4);

        let _ = server.process(out.dgram(), now());
        // server now in State::Connected
        assert_eq!(server.stream_create(StreamType::UniDi).unwrap(), 3);
        assert_eq!(server.stream_create(StreamType::UniDi).unwrap(), 7);
        assert_eq!(server.stream_create(StreamType::BiDi).unwrap(), 1);
        assert_eq!(server.stream_create(StreamType::BiDi).unwrap(), 5);
    }

    #[test]
    fn test_conn_handshake() {
        qdebug!("---- client: generate CH");
        let mut client = default_client();
        let out = client.process(None, now());
        assert!(out.as_dgram_ref().is_some());
        assert_eq!(out.as_dgram_ref().unwrap().len(), 1232);
        qdebug!("Output={:0x?}", out.as_dgram_ref());

        qdebug!("---- server: CH -> SH, EE, CERT, CV, FIN");
        let mut server = default_server();
        let out = server.process(out.dgram(), now());
        assert!(out.as_dgram_ref().is_some());
        qdebug!("Output={:0x?}", out.as_dgram_ref());

        qdebug!("---- client: cert verification");
        let out = client.process(out.dgram(), now());
        assert!(out.as_dgram_ref().is_some());
        qdebug!("Output={:0x?}", out.as_dgram_ref());

        let out = server.process(out.dgram(), now());
        assert!(out.as_dgram_ref().is_none());

        assert!(maybe_authenticate(&mut client));

        qdebug!("---- client: SH..FIN -> FIN");
        let out = client.process(out.dgram(), now());
        assert!(out.as_dgram_ref().is_some());
        qdebug!("Output={:0x?}", out.as_dgram_ref());
        assert_eq!(*client.state(), State::Connected);

        qdebug!("---- server: FIN -> ACKS");
        let out = server.process(out.dgram(), now());
        assert!(out.as_dgram


import pytest
from appium.webdriver.common.appiumby import AppiumBy

@pytest.mark.parametrize("browser",["android"],indirect=True)
def test_android_browser(browser):

    browser.get("https://ogorodnik.by/")
    browser.implicitly_wait(5)
    browser.find_elements(AppiumBy.CSS_SELECTOR,"[title='Поиск по каталогу']")[1].send_keys("Перец сладкий Аристотель F1")
    assert  browser.find_element(AppiumBy.CSS_SELECTOR,".stock.out-of-stock.wd-style-default").text == "Нет в наличии", "Под товаром НЕТ информации, что товвара нет!!!!"

    # browser.get("https://ogorodnik.by/")
    # # print(browser.page_source)
    # browser.find_element(AppiumBy.TAG_NAME, "TEXTAREA").send_keys("Meow")
    # browser.find_element(AppiumBy)
    # el = browser.find_element(by=AppiumBy.ANDROID_UIAUTOMATOR, value='new UiScrollable(new UiSelector().scrollable(true)).scrollIntoView(new UiSelector().text("Battery"))')
    # el.click()
    # print(browser.current_activity)
    # print(browser.current_context)
    # print(browser.current_package)
    # browser.activate_app("com.android.settings")
    # browser.save_screenshot("screen_battery.png")


[key]) {
        return;
    }

    func();
    doOnceFlags[key] = true;
}

/** Clear doOnce() state (for test purposes). */
export function clearDoOnceFlags() {
    for (const key in doOnceFlags) {
        delete doOnceFlags[key];
    }
}
import {
  FetchFeedListQuery,
} from '@app/graphql';

import {
  AddFeedListData,
} from './types';

export const addFeedListState = (
  /*
   * New Data to update on the state
   *
   * **/
  data: AddFeedListData,
  /*
   * Existing data on the state
   *
   * **/
  prevState: FetchFeedListQuery
): FetchFeedListQuery => {
  const feedList = prevState?.feed ?? [];
  return {
    feed: [
      {
        id: `${feedList.length + 1}`,
        likes: 0,
        retweets: 0,
        comments: 0,
        ...data,
      },
      ...feedList
    ]
  };
}

import "test/w3api";
import { normalize, proximityProportions, GOLEM_TYPE } from "./proximityProportions";
import { wolfTeam, WOLF_TYPE, sheepTeam, sheeps, SHEEP_TYPE } from "shared";

describe( "normalize", () => {

	it( "sample 1", () => expect( normalize(
		[ 1, 1, 1, 1, 1 ],
	) ).toEqual(
		[ 1 / 5, 1 / 5, 1 / 5, 1 / 5, 1 / 5 ],
	) );

	it( "sample 2", () => expect( normalize(
		[ 1, 2, 3, 4, 5 ],
	) ).toEqual(
		[ 1 / 15, 2 / 15, 3 / 15, 4 / 15, 5 / 15 ],
	) );

} );

describe( "proximityProportions", () => {

	describe( "sheep", () => {

		const withTempSheep = ( arr: number[], fn: ( () => void ) ): void => {

			const oldSheep: unit[] = [];
			arr.forEach( pId => {

				oldSheep[ pId ] = sheeps[ pId ];
				ForceAddPlayer( sheepTeam, Player( pId ) );
				sheeps[ pId ] = CreateUnit( Player( pId ), SHEEP_TYPE, 64 * 1.5 ** pId, 64 * 1.5 ** pId, 270 );

			} );

			fn();

			arr.forEach( pId => {

				RemoveUnit( sheeps[ pId ] );
				sheeps[ pId ] = oldSheep[ pId ];

			} );

		};

		const sheepPlayerIds = [ 0, 1, 3, 4, 6, 7, 9, 10 ];

		for ( let i = 0; i < sheepPlayerIds.length; i ++ ) {

			const playerIds = sheepPlayerIds.slice( 0, i + 1 );

			it( `with ${i + 1} sheep`, () => withTempSheep( playerIds, () => {

				playerIds.forEach( i => {

					SetPlayerController( Player( i ), MAP_CONTROL_USER );
					Player( i ).slotState = PLAYER_SLOT_STATE_PLAYING;

				} );

				const entries = Array.from( proximityProportions(
					{ x: 0, y: 0 },
					{ gold: 1000 },
					Player( 0 ),
				).entries() );

				expect( entries.map( v => [ v[ 0 ].playerId, v[ 1 ] ] ) ).toMatchSnapshot();

			} ) );

		}

	} );

	describe( "wolves", () => {

		it( "solo", () => {

			ForceAddPlayer( wolfTeam, Player( 8 ) );
			const wolf = CreateUnit( Player( 8 ), WOLF_TYPE, 64, 64, 270 );

			const entries = Array.from( proximityProportions(
				{ x: 0, y: 0 },
				{ gold: 125, experience: 100 },
				Player( 8 ),
				"sheep",
			).entries() );

			ForceRemovePlayer( wolfTeam, Player( 8 ) );
			R


import moviepy.editor as mp
import moviepy.video.fx.all as vfx
import os
import imageio

def mask_png(frames):
    for frame in frames:
        im = imageio.imread(frame)
        im[im[:, :, 3] < 1, :] = 255
        imageio.imwrite(frame, im[:, :, 0:3])
    return

class Video:
    def __init__(self, frame_path: str, fps: float = 12.5, res="high"):
        frame_path = str(frame_path)
        self.fps = fps

        self._conf = {"codec": "libx264",
                      "fps": self.fps,
                      "audio_codec": "aac",
                      "temp_audiofile": "temp-audio.m4a",
                      "remove_temp": True}

        if res == "low":
            bitrate = "500k"
        else:
            bitrate = "5000k"

        self._conf = {"bitrate": bitrate,
                      "fps": self.fps}

        # Load video
        # video = mp.VideoFileClip(video1_path, audio=False)
        # Load with frames
        frames = [os.path.join(frame_path, x)
                  for x in sorted(os.listdir(frame_path))]

        # mask background white for videos
        mask_png(frames)

        video = mp.ImageSequenceClip(frames, fps=fps)
        self.video = video
        self.duration = video.duration

    def add_text(self, text):
        # needs ImageMagick
        video_text = mp.TextClip(text,
                                 font='Amiri',
                                 color='white',
                                 method='caption',
                                 align="center",
                                 size=(self.video.w, None),
                                 fontsize=30)
        video_text = video_text.on_color(size=(self.video.w, video_text.h + 5),
                                         color=(0, 0, 0),
                                         col_opacity=0.6)
        # video_text = video_text.set_pos('bottom')
        video_text = video_text.set_pos('top')

        self.video = mp.CompositeVideoClip([self.video, video_text])

    def save(self, out_path):
        out_path = str(out_path)
        self.video.subclip(0, self.duration).write_videofile(
            out_path, **self._conf)


.Spec.ResourceModels) == 0 {
		return nil
	}
	modelingSummary, err := modeling.InitSummary(cluster.Spec.ResourceModels)
	if err != nil {
		klog.ErrorS(err, "Failed to init cluster summary from cluster resource models for Cluster", "cluster", cluster.GetName())
		return nil
	}

	nodePodResourcesMap := make(map[string]*util.Resource)
	for _, pod := range pods {
		// When the phase of a pod is Succeeded or Failed, kube-scheduler would not consider its resource occupation.
		if len(pod.Spec.NodeName) != 0 && pod.Status.Phase != corev1.PodSucceeded && pod.Status.Phase != corev1.PodFailed {
			if nodePodResourcesMap[pod.Spec.NodeName] == nil {
				nodePodResourcesMap[pod.Spec.NodeName] = util.EmptyResource()
			}
			nodePodResourcesMap[pod.Spec.NodeName].AddPodRequest(&pod.Spec)
			nodePodResourcesMap[pod.Spec.NodeName].AddResourcePods(1)
		}
	}

	for _, node := range nodes {
		nodeAvailable := getNodeAvailable(node.Status.Allocatable.DeepCopy(), nodePodResourcesMap[node.Name])
		if nodeAvailable == nil {
			break
		}
		modelingSummary.AddToResourceSummary(modeling.NewClusterResourceNode(nodeAvailable))
	}

	m := make([]clusterv1alpha1.AllocatableModeling, len(modelingSummary.RMs))
	for index, resourceModel := range modelingSummary.RMs {
		m[index].Grade = cluster.Spec.ResourceModels[index].Grade
		m[index].Count = resourceModel.Quantity
	}

	return m
}
/*
Copyright 2023 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

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

package monitor

import (
	"time"

	autoscalingv2 "k8s.io/api/autoscaling/v2"
)

// ActionLabel represents an action taken by HPA controller.
type ActionLabel string

// ErrorLabel represents an error type.
type ErrorLabel string

const (
	// ActionLabelScaleUp represents a scale up action.
	ActionLabelScaleUp ActionLabel = "scale_up"
	// ActionLabelScaleDown represents a scale down action.
	ActionLabelScaleDown ActionLabel = "scale_down"
	// ActionLabelNone represents no action.
	ActionLabelNone ActionLabel = "none"

	// ErrorLabelSpec represents an error due to an invalid spec of HPA object.
	ErrorLabelSpec ErrorLabel = "spec"
	// ErrorLabelInternal represents an error from an internal computation or communication with other component.
	ErrorLabelInternal ErrorLabel = "internal"
	// ErrorLabelNone represents no error.
	ErrorLabelNone ErrorLabel = "none"
)

// Monitor records some metrics so that people can monitor HPA controller.
type Monitor interface {
	ObserveReconciliationResult(action ActionLabel, err ErrorLabel, duration time.Duration)
	ObserveMetricComputationResult(action ActionLabel, err ErrorLabel, duration time.Duration, metricType autoscalingv2.MetricSourceType)
}

type monitor struct{}

// New creates a new Monitor.
func New() Monitor {
	return &monitor{}
}

// ObserveReconciliationResult observes some metrics from a reconciliation result.
func (r *monitor) ObserveReconciliationResult(action ActionLabel, err ErrorLabel, duration time.Duration) {
	reconciliationsTotal.WithLabelValues(string(action), string(err)).Inc()
	reconciliationsDuration.WithLabelValues(string(action), string(err)).Observe(duration.Seconds())
}

// ObserveMet


Skill()
    --处理技能开始前的API
    FightActionUtil:PlayFightActions(self.faPreArr);
    FuncUtil:Call(self.Complete,self,1500);
end

function this:ShowFightEvent()
    local eventDesc = nil;
    local typeIndex = nil;
    if(self.data.api == APIType.BeatAgain)then
        --eventDesc = StringConstant.fight_beat_again;
        typeIndex = 2;
    elseif(self.data.api == APIType.BeatBack)then
        --eventDesc = StringConstant.fight_beat_back;
        typeIndex = 3;
    elseif(self.data.api == APIType.CallSkill or self.data.api == APIType.Skill)then
        local cfgSkill = Cfgs.skill:GetByID(self:GetSkillID());
        local cfgSkillDesc = Cfgs.CfgSkillDesc:GetByID(cfgSkill.id);
        eventDesc = cfgSkillDesc and cfgSkillDesc.name;
        typeIndex = 5;
    end

    if(typeIndex)then
        EventMgr.Dispatch(EventType.Fight_Trigger_Event_Update,{ character = self:GetActorCharacter(),desc = eventDesc,typeIndex = typeIndex});
    end
end
function this:ApplySkillComplete()
    FightActionMgr:TryStopSkip();

    self.skillComplete = 1;
    self:Complete();
end
function this:IsSkillComplete()
    return self.skillComplete;
end
--function this:Complete()
--    FightActionBase.Complete(self);

--    if(self.isComplete)then
--       -- LogError("技能完成，重置位置");
--        self:ResetCharacterPlace();
----         LogError("技能完成================，id = " .. self.data.id .. "，skill = " .. self.data.skillID);
----         LogError(self.data);
--    end
--end

--恢复角色位置
function this:ResetCharacterPlace()
    if(self.isResetedPlace)then
        return;
    end
    self.isResetedPlace = 1;

    if(not self:IsHelp())then
        local allCharacters = self:GetAllCharacters();
        if(allCharacters)then
            for _,character in pairs(allCharacters)do
                if(character ~= nil)then
                    character.ResetPlace();
                end
            end
        end
    end
end

function this:OnComplete()
    self:CheckLeftData();

    if(self.data["AfterCallSkill"])then
        FightActionUtil:PlayAPIsByOrder(self.data["AfterCallSkill"]);
    end
end
function this:OnClean()

    --self:CleanFightActionArr(self.faDamageArr);
    self.faDamageArr = nil;
    --self:CleanFightActionArr(self.faCureArr);
    self.faCureArr = nil;
    self.faBuffArr = nil;
    self.faDebuffArr = nil;
    self.faArrCurr = nil;
    self.faBlockCurr = nil;

    self.enemys = nil;
    self.cures = nil;
    self.buffs = nil;
    self.debuffs = nil;
    self.allCharacters = nil;

    --技能前直接处理的FightAction
    self.faPreArr = nil;
    --技能后处理列表（分三组，我方、敌方、不区分）
    self.faAfts = nil;
    self.faAfts_1 = nil;
    --技能伤害后扣血展示
    self.faHitResult = nil;
    --死亡事件
    self.faBeforeDeathEvent = nil;
    --协战
    if(self.faHelp)then
        --LogError("清理协


(tpz.abyssea.getAbyssiteTotal(player, "FURTHERANCE") *10), 0, 0)
        player:addStatusEffectEx(tpz.effect.ABYSSEA_MND, tpz.effect.MND_BOOST, 10+(tpz.abyssea.getAbyssiteTotal(player, "FURTHERANCE") *10), 0, 0)
        player:addStatusEffectEx(tpz.effect.ABYSSEA_CHR, tpz.effect.CHR_BOOST, 10+(tpz.abyssea.getAbyssiteTotal(player, "FURTHERANCE") *10), 0, 0)
        player:delCurrency("cruor", 100)
    elseif option == 720900 then -- All Enhancements
        player:addStatusEffectEx(tpz.effect.ABYSSEA_HP, tpz.effect.MAX_HP_BOOST, 20+(tpz.abyssea.getAbyssiteTotal(player, "MERIT") *10), 0, 0)
        player:addHP(20+(tpz.abyssea.getAbyssiteTotal(player, "MERIT") *10) *10)
        player:addStatusEffectEx(tpz.effect.ABYSSEA_MP, tpz.effect.MAX_MP_BOOST, 10+(tpz.abyssea.getAbyssiteTotal(player, "MERIT") *5), 0, 0)
        player:addMP(10+(tpz.abyssea.getAbyssiteTotal(player, "MERIT") *5) *10)
        player:addStatusEffectEx(tpz.effect.ABYSSEA_STR, tpz.effect.STR_BOOST, 10+(tpz.abyssea.getAbyssiteTotal(player, "FURTHERANCE") *10), 0, 0)
        player:addStatusEffectEx(tpz.effect.ABYSSEA_DEX, tpz.effect.DEX_BOOST, 10+(tpz.abyssea.getAbyssiteTotal(player, "FURTHERANCE") *10), 0, 0)
        player:addStatusEffectEx(tpz.effect.ABYSSEA_VIT, tpz.effect.VIT_BOOST, 10+(tpz.abyssea.getAbyssiteTotal(player, "FURTHERANCE") *10), 0, 0)
        player:addStatusEffectEx(tpz.effect.ABYSSEA_AGI, tpz.effect.AGI_BOOST, 10+(tpz.abyssea.getAbyssiteTotal(player, "FURTHERANCE") *10), 0, 0)
        player:addStatusEffectEx(tpz.effect.ABYSSEA_INT, tpz.effect.INT_BOOST, 10+(tpz.abyssea.getAbyssiteTotal(player, "FURTHERANCE") *10), 0, 0)
        player:addStatusEffectEx(tpz.effect.ABYSSEA_MND, tpz.effect.MND_BOOST, 10+(tpz.abyssea.getAbyssiteTotal(player, "FURTHERANCE") *10), 0, 0)
        player:addStatusEffectEx(tpz.effect.ABYSSEA_CHR, tpz.effect.CHR_BOOST, 10+(tpz.abyssea.getAbyssiteTotal(player, "FURTHERANCE") *10), 0, 0)
        player:delCurrency("cruor", 470)
    end

    if ItemID ~= 0 then
        if player:getFreeSlotsCount() >= 1 then
            player:messageSpecial(ID.text.ITEM_OBTAINED, ItemID)
            player:addItem(ItemID, Quantity)
            player:delCurrency("cruor", Price)
        else
            player:messageSpecial(ID.text.ITEM_CANNOT_BE_OBTAINED, ItemID)
        end
    end
end


y至y',
    '_': 'y年'
  },
  YEAR_FULL_WITH_ERA: {
    'G': 'Gy – Gy',
    'y': 'Gy–y',
    '_': 'Gy年'
  },
  YEAR_MONTH_ABBR: {
    'G': 'Gy年MMM – Gy年MMM',
    'M': 'y年M月至M月',
    'y': 'y年M月至y年M月',
    '_': 'y年M月'
  },
  YEAR_MONTH_FULL: {
    'G': 'Gy年MMMM – Gy年MMMM',
    'M': 'y年M月至M月',
    'y': 'y年M月至y年M月',
    '_': 'y年M月'
  },
  YEAR_MONTH_SHORT: {
    'G': 'GGGGGy-MM – GGGGGy-MM',
    'My': 'M/y 至 M/y',
    '_': 'MM/y'
  },
  MONTH_DAY_ABBR: {
    'M': 'M月d日至M月d日',
    'd': 'M月d日至d日',
    'y': 'y年M月d日至y年M月d日',
    '_': 'M月d日'
  },
  MONTH_DAY_FULL: {
    'M': 'M月d日至M月d日',
    'd': 'M月d日至d日',
    'y': 'y年M月d日至y年M月d日',
    '_': 'M月dd日'
  },
  MONTH_DAY_SHORT: {
    'Md': 'd/M 至 d/M',
    'y': 'd/M/y 至 d/M/y',
    '_': 'd/M'
  },
  MONTH_DAY_MEDIUM: {
    'M': 'M月d日至M月d日',
    'd': 'M月d日至d日',
    'y': 'y年M月d日至y年M月d日',
    '_': 'M月d日'
  },
  MONTH_DAY_YEAR_MEDIUM: {
    'G': 'Gy年MMMd日 – Gy年MMMd日',
    'M': 'y年M月d日至M月d日',
    'd': 'y年M月d日至d日',
    'y': 'y年M月d日至y年M月d日',
    '_': 'y年M月d日'
  },
  WEEKDAY_MONTH_DAY_MEDIUM: {
    'M': 'M月d日E至M月d日E',
    'd': 'M月d日E至d日E',
    'y': 'y年M月d日E至y年M月d日E',
    '_': 'M月d日EEE'
  },
  WEEKDAY_MONTH_DAY_YEAR_MEDIUM: {
    'G': 'Gy年MMMd日, E – Gy年MMMd日, E',
    'Md': 'y年M月d日E至M月d日E',
    'y': 'y年M月d日E至y年M月d日E',
    '_': 'y年M月d日EEE'
  },
  DAY_ABBR: {
    'M': 'd/M 至 d/M',
    'd': 'd日至d日',
    'y': 'd/M/y 至 d/M/y',
    '_': 'd日'
  }
};

/** @const {!dateIntervalPatterns.DateIntervalPatterns} */
exports.DateIntervalPatterns_zh_Hant_TW = {
  YEAR_FULL: {
    'G': 'Gy – Gy',
    'y': 'y至y',
    '_': 'y年'
  },
  YEAR_FULL_WITH_ERA: {
    'G': 'Gy – Gy',
    'y': 'Gy–


from dragonfly import (Grammar, AppContext, MappingRule, Dictation, Key, Text, Integer, Mimic)
javascript = AppContext(title="javascript")
grammar = Grammar("javascript", context=(javascript))

noSpaceNoCaps = Mimic("\\no-caps-on") + Mimic("\\no-space-on")

rules = MappingRule(
    name = "javascript",
    mapping = {
    "smear"                : Text("err"),
    "function"             : Text("fn") + Key("tab") + noSpaceNoCaps,
    "very equal"           : Text("var_equal") + Key("tab") + noSpaceNoCaps,
    "very"                 : Text("var") + Key("tab") + noSpaceNoCaps,
    "require J query"      : Text("req_jquery") + Key("tab"),
    "require"              : Text("req") + Key("tab") + noSpaceNoCaps,
    "load"                 : Text("load") + Key("tab") + noSpaceNoCaps,
    "define model"                : Text("model") + Key("tab") + noSpaceNoCaps,
    "define collection": Text("collection") + Key("tab") + noSpaceNoCaps,
    "define"               : Text("def") + Key("tab") + noSpaceNoCaps,
    "single if"            : Text("single_if") + Key("tab") + noSpaceNoCaps,
    "if"                   : Text("if") + Key("tab") + noSpaceNoCaps,
    "undies"               : Text("undermethod") + Key("tab") + noSpaceNoCaps,
    "require undies"       : Text("require_underscore") + Key("tab"),
    "require lodash"       : Text("require_lodash") + Key("tab"),
    "chain undies"         : Text("chain_undies") + Key("tab") + noSpaceNoCaps,
    "for each"             : Text(".forEach()") + Key("escape, i") + noSpaceNoCaps,
    "express method"       : Text("express_method") + Key("tab") + noSpaceNoCaps,
    "happy"                : Text("app"),
    "return call back air" : Text("return_callback_error") + Key("tab"),
    "callback function"    : Text("callback_function") + Key("tab") + noSpaceNoCaps,
    "log"                  : Text("cl") + Key("tab") + noSpaceNoCaps,
    "comment <text>"       : Text("// %(text)s"),
    "type of"              : Text("typeof") + Key('tab') + noSpaceNoCaps,
    "homey"                : Text("home"),
    "module exports"              : Text("module.exports"),
    "regex"                       : Text("//") + Key("escape, i") + noSpaceNoCaps,
    "push task": Text("push_task") + Key("tab") + noSpaceNoCaps,
    },

    extras = [
        Dictation("text", format=False),
        Integer("n", 1, 20000),
      ],
    defaults = {
      "n" : 1
      }
    )

grammar.add_rule(rules)
grammar.load()
def unload():
  global grammar
  if grammar: grammar.unload()
  grammar = None


ddf816f,0x44f1816b,0x3c2e01d6}},	//   gka_, प्तत, _mš_, _býva_,
   {{0x7c29838e,0x28c5809a,0x290301b9,0x44f18bda}},	// [8a0] iker, _विडि, _arja_, _lš_,
   {{0x44291292,0xe1f70638,0x4a431293,0x7a2486c4}},	//   aka_, нгу_, гнув, _dòtw,
   {{0x442902c1,0x7c298d5b,0x4c861294,0x3ead9295}},	//   bka_, kker, _плов, _awet_,
   {{0x44291296,0x7c299297,0x6f041298,0x768b0035}},	//   cka_, jker, _kric, _użyc,
   {{0x68260510,0xdcfc0201,0x5fd18076,0xc8ec9299}},	//   _códi, marı, _हारल, _जन्म_,
   {{0xdcfc0b06,0x80db00ab,0xceb303c8,0x63b60079}},	//   ları, ণিজ্, ריג_, layn,
   {{0x3da5835f,0xa3d704e5,0x442f929a,0xdb1d0176}},	//   тріб, _साम_, _blg_, _adsè,
   {{0x6f040012,0x61f8929b,0x63b60079,0x7c29929c}},	//   _oric, _savl, nayn, gker,
   {{0x44f18267,0x53348087,0xa3ce01d0,0x661e129d}},	//   _eš_, тепт, _राई_, _oopk,
   {{0x4429129e,0x2d8c03f2,0x63b601b4,0xdb0f0580}},	//   zka_, ždej_, hayn, _decè,
   {{0x44290063,0xdcfc0214,0x6f04129f,0x403512a0}},	//   yka_, karı, _aric, венс,
   {{0x2fc080f7,0x7c2992a1,0x442912a2,0x63b601b4}},	//   óigh_, cker, xka_, jayn,
   {{0x61f892a3,0x6d480511,0x63b60079,0x44f1816b}},	//   _tavl, údan, dayn, _zš_,
   {{0x4429009a,0x6f04016d,0x787612a4,0xbe880198}},	//   wka_, _dric, váve, ессе_,
   {{0xf1b38051,0xcfb00264,0x2d8512a5,0xd12f804a}},	//   _עסק_, _কারন, äle_, _сх_,
   {{0x442912a6,0x6f0412a7,0xd6db1294,0x3ea004b7}},	//   uka_, _fric, _ето_, _ftit_,
   {{0x442912a8,0x78ba92a9,0xa3d7058c,0x06e880ab}},	// [8b0] rka_, lstv, _साठ_, পিডি,
   {{0x787612aa,0x51f80150,0x2296006a,0x7c298102}},	//   ráve, нную_, _dæk_, zker,


='button' name='button1' value='pushme'></form>\n"
            + "
a

b

c
\n"
            + "";

        final HtmlPage page = loadPage(firstContent);

        final DomNodeList<DomElement> divs = page.getElementsByTagName("div");

        assertEquals(3, divs.getLength());
        validateDomNodeList(divs);

        final HtmlDivision newDiv = new HtmlDivision(HtmlDivision.TAG_NAME, page, null);
        page.getBody().appendChild(newDiv);
        assertEquals(4, divs.getLength());
        validateDomNodeList(divs);
    }

    /**
     * @throws Exception if the test fails
     */
    @Test
    public void getChildNodes() throws Exception {
        final String firstContent = DOCTYPE_HTML
            + "<title>First</title>\n"
            + "\n"
            + "<form><input type='button' name='button1' value='pushme'></form>\n"
            + "
a

b

c
\n"
            + "";

        final HtmlPage page = loadPage(firstContent);
        final DomNodeList<DomNode> bodyChildren = page.getBody().getChildNodes();
        validateDomNodeList(bodyChildren);
    }

    private <E extends DomNode> void validateDomNodeList(final DomNodeList<E> nodes) {
        assertEquals(nodes.getLength(), nodes.size());
        final Iterator<E> nodesIterator = nodes.iterator();
        for (int i = 0; i < nodes.getLength(); i++) {
            assertEquals(nodes.item(i), nodes.get(i));
            assertEquals(nodes.item(i), nodesIterator.next());
            assertEquals(i, nodes.indexOf(nodes.item(i)));
        }
        assertEquals(false, nodesIterator.hasNext());
        final ListIterator<E> nodesListIterator = nodes.listIterator();
        assertEquals(nodes.item(0), nodesListIterator.next());
        assertEquals(nodes.item(1), nodesListIterator.next());
        assertEquals(nodes.item(1), nodesListIterator.previous());
    }

}
/*
 * Copyright (c) 2002-2025 Gargoyle Software Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.htmlunit.html;

import java.util.ArrayList;
import java.util.List;

import org.htmlunit.SimpleWebTestCase;
import org.htmlunit.junit.annotation.Alerts;
import org.junit.jupiter.api.Test;

/**
 * Tests for {@link HtmlPage}.
 *
 * @author Ronald Brill
 */
public class HtmlPageTest5 extends SimpleWebTestCase {
    /**
     * Test tabbing to the next element.
     * @throws Exception if something goes wrong
     */
    @Test
    @Alerts({"focus-0", "blur-0", "focus-1", "blur-1", "focus-2"})
    public void tabNext() throws Exception {
        final String html = DOCTYPE_HTML
                + "\n"
                + "<title>First</title>\n"
                + "\n"
                + "\n"
                + "  <form name='form1' method='post' onsubmit='return false;'>\n"
                + "    <input type='submit' name='submit0' id='submit0' "
                         + "tabindex='1' onblur='alert(\"blur-0\")' onfocus='alert(\"focus-0\


tems */
#define SDL_LOADSO_DLOPEN   1

/* Enable various threading systems */
#define SDL_THREAD_PTHREAD  1
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX  1

/* Enable various timer systems */
#define SDL_TIMER_UNIX  1

/* Enable various video drivers */
#define SDL_VIDEO_DRIVER_COCOA  1
#define SDL_VIDEO_DRIVER_DUMMY  1
#undef SDL_VIDEO_DRIVER_X11
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/opt/X11/lib/libX11.6.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/opt/X11/lib/libXext.6.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/opt/X11/lib/libXi.6.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/opt/X11/lib/libXrandr.2.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/opt/X11/lib/libXss.1.dylib"
#define SDL_VIDEO_DRIVER_X11_XDBE 1
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1

#ifdef MAC_OS_X_VERSION_10_8
/*
 * No matter the versions targeted, this is the 10.8 or later SDK, so you have
 *  to use the external Xquartz, which is a more modern Xlib. Previous SDKs
 *  used an older Xlib.
 */
#define SDL_VIDEO_DRIVER_X11_XINPUT2 1
#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
#endif

#ifndef SDL_VIDEO_RENDER_OGL
#define SDL_VIDEO_RENDER_OGL    1
#endif

#ifndef SDL_VIDEO_RENDER_OGL_ES2
#define SDL_VIDEO_RENDER_OGL_ES2 1
#endif

/* Metal only supported on 64-bit architectures with 10.11+ */
#if TARGET_RT_64_BIT && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
#define SDL_PLATFORM_SUPPORTS_METAL    1
#else
#define SDL_PLATFORM_SUPPORTS_METAL    0
#endif

#ifndef SDL_VIDEO_RENDER_METAL
#if SDL_PLATFORM_SUPPORTS_METAL
#define SDL_VIDEO_RENDER_METAL    1
#else
#define SDL_VIDEO_RENDER_METAL    0
#endif
#endif

/* Enable OpenGL support */
#ifndef SDL_VIDEO_OPENGL
#define SDL_VIDEO_OPENGL    1
#endif
#ifndef SDL_VIDEO_OPENGL_ES2
#define SDL_VIDEO_OPENGL_ES2    1
#endif
#ifndef SDL_VIDEO_OPENGL_EGL
#define SDL_VIDEO_OPENGL_EGL    1
#endif
#ifndef SDL_VIDEO_OPENGL_CGL
#define SDL_VIDEO_OPENGL_CGL    1
#endif
#ifndef SDL_VIDEO_OPENGL_GLX
#define SDL_VIDEO_OPENGL_GLX    1
#endif

/* Enable Vulkan and Metal support */
#ifndef SDL_VIDEO_VULKAN
#if SDL_PLATFORM_SUPPORTS_METAL
#define SDL_VIDEO_VULKAN 1
#else
#define SDL_VIDEO_VULKAN 0
#endif
#endif

#ifndef SDL_VIDEO_METAL
#if SDL_PLATFORM_SUPPORTS_METAL
#define SDL_VIDEO_METAL 1
#else
#define SDL_VIDEO_METAL 0
#endif
#endif

#define HAVE_COREMEDIA  1

/* Enable system power support */
#define SDL_POWER_MACOSX 1

/* enable filesystem support */
#define SDL_FILESYSTEM_COCOA   1

/* Enable assembly routines */
#ifdef __ppc__
#define SDL_ALTIVEC_BLITTERS    1
#endif

#endif /* SDL_build_config_macos_h_ */


eturn BeginProcessTime 智能标签任务开始执行的时间，采用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。
     */
    public String getBeginProcessTime() {
        return this.BeginProcessTime;
    }

    /**
     * Set 智能标签任务开始执行的时间，采用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。
     * @param BeginProcessTime 智能标签任务开始执行的时间，采用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。
     */
    public void setBeginProcessTime(String BeginProcessTime) {
        this.BeginProcessTime = BeginProcessTime;
    }

    /**
     * Get 智能标签任务执行完毕的时间，采用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。
     * @return FinishTime 智能标签任务执行完毕的时间，采用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。
     */
    public String getFinishTime() {
        return this.FinishTime;
    }

    /**
     * Set 智能标签任务执行完毕的时间，采用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。
     * @param FinishTime 智能标签任务执行完毕的时间，采用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。
     */
    public void setFinishTime(String FinishTime) {
        this.FinishTime = FinishTime;
    }

    public AiAnalysisTaskTagResult() {
    }

    /**
     * NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
     *       and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
     */
    public AiAnalysisTaskTagResult(AiAnalysisTaskTagResult source) {
        if (source.Status != null) {
            this.Status = new String(source.Status);
        }
        if (source.ErrCodeExt != null) {
            this.ErrCodeExt = new String(source.ErrCodeExt);
        }
        if (source.ErrCode != null) {
            this.ErrCode = new Long(source.ErrCode);
        }
        if (source.Message != null) {
            this.Message = new String(source.Message);
        }
        if (source.Input != null) {
            this.Input = new AiAnalysisTaskTagInput(source.Input);
        }
        if (source.Output != null) {
            this.Output = new AiAnalysisTaskTagOutput(source.Output);
        }
        if (source.Progress != null) {
            this.Progress = new Long(source.Progress);
        }
        if (source.BeginProcessTime != null)


0,000

    $number = Number::format(100000, precision: 2);

    // 100,000.00

    $number = Number::format(100000.123, maxPrecision: 2);

    // 100,000.12

    $number = Number::format(100000, locale: 'de');

    // 100.000

#### `Number::ordinal()` {.collection-method}

`Number::ordinal`メソッドは、数値の序数英語表現を返します。

    use Illuminate\Support\Number;

    $number = Number::ordinal(1);

    // 1st

    $number = Number::ordinal(2);

    // 2nd

    $number = Number::ordinal(21);

    // 21st

#### `Number::pairs()` {.collection-method}

`Number::pairs`メソッドは、指定する範囲とステップ値に基づき、数値のペア（部分範囲）の配列を生成します。このメソッドは、ペジネーションやバッチ処理などのために、大きな範囲の数値を管理しやすい小さな範囲に分割するのに便利です。`pairs`メソッドは配列の配列を返し、各内部配列は数値のペア（部分範囲）を表します。

```php
use Illuminate\Support\Number;

$result = Number::pairs(25, 10);

// [[1, 10], [11, 20], [21, 25]]

$result = Number::pairs(25, 10, offset: 0);

// [[0, 10], [10, 20], [20, 25]]
```

#### `Number::percentage()` {.collection-method}

`Number::percentage`メソッドは、指定値のパーセンテージ表現を文字列で返します。

    use Illuminate\Support\Number;

    $percentage = Number::percentage(10);

    // 10%

    $percentage = Number::percentage(10, precision: 2);

    // 10.00%

    $percentage = Number::percentage(10.123, maxPrecision: 2);

    // 10.12%

    $percentage = Number::percentage(10, precision: 2, locale: 'de');

    // 10,00%

#### `Number::spell()` {.collection-method}

Number::spell`メソッドは、指定する数字を単語の文字列へ変換します。

    use Illuminate\Support\Number;

    $number = Number::spell(102);

    // one hundred and two

    $number = Number::spell(88, locale: 'fr');

    // quatre-vingt-huit

`after`引数は、これより大きい数字は文字へ変換する値を指定します。

    $number = Number::spell(10, after: 10);

    // 10

    $number = Number::spell(11, after: 10);

    // eleven

`until`引数は、これより大きい数字は文字へ変換する値を指定します。

    $number = Number::spell(5, until: 10);

    // five

    $number = Number::spell(10, until: 10);

    // 10

#### `Number::trim()` {.collection-method}

The `Number::trim` method removes any trailing zero digits after the decimal point of the given number:

    use Illuminate\Support\Number;

    $number = Number::trim(12.0);

    // 12

    $number = Number::trim(12.30);

    // 12.3


�東路２之５號）",
      "4037" : "埤頭金農店（彰化縣埤頭鄉彰水路三段２６５號）"
   },
   "FMN151" : {
      "3623" : "溪州明道店（彰化縣溪州鄉中央路三段２２５之６號１樓）"
   },
   "FMN152" : {
      "14298" : "二林原斗店（彰化縣二林鎮斗苑路二段６號）",
      "3330" : "二林斗苑店（彰化縣二林鎮斗苑路四段２９９號）"
   },
   "FMN153" : {
      "4112" : "大城大功店（彰化縣大城鄉大城村中平路８號）"
   },
   "FMN154" : {
      "11219" : "芳苑寶成店（彰化縣芳苑鄉三合村１４鄰斗苑路三合段１００號）",
      "15783" : "芳苑王功店（彰化縣芳苑鄉芳漢路王功段５３５號）"
   },
   "FMO61" : {
      "10039" : "新竹新美店（新竹市北區田美三街４７號）",
      "1019" : "新竹師專店（新竹市北區西門街２０３號１樓）",
      "11782" : "新竹漁港店（新竹市北區東大路四段２６９號１樓）",
      "12490" : "新竹經城店（新竹市北區經國路一段３３９號１樓）",
      "1253" : "新竹廟口店（新竹市北區中山路９０號）",
      "12869" : "新竹金竹店（新竹市北區金竹路１１５號１樓）",
      "13421" : "新竹遠百店（新竹市北區西門街１０１號１、２樓）",
      "13643" : "新竹天群店（新竹市北區武陵路３６－１號１、２樓）",
      "14006" : "新竹金鵬店（新竹市北區延平路一段３８８號１樓）",
      "14048" : "新竹水田店（新竹市北區中正路２４０號１樓）",
      "14216" : "新竹大富店（新竹市北區西大路５２７號）",
      "15703" : "新竹客進店（新竹市北區經國路二段５４９號）",
      "18526" : "新竹台大醫店（新竹市北區經國路１段４


要2個秘法水晶，1個聯結水晶和30金。你一定要在銀色黎明達到崇敬聲望。"}},
[9124] = {"地穴巡者護甲的零件……", nil, {"東瘟疫之地聖光之願禮拜堂的獵人里歐波要30個地穴惡魔部位。"}},
[9126] = {"骨鐮掘鏟", nil, {"東瘟疫之地聖光之願禮拜堂的『刺客』羅漢要30個骨頭碎片。"}},
[9128] = {"元素方程式", nil, {"東瘟疫之地聖光之願禮拜堂的大法師安琪拉·多桑杜要30個元素之核。"}},
[9130] = {"銀月城的貨物", nil, {"將珊希歐的提貨單交給晴風村裡的飛行師明曦。"}},
[9131] = {"訂做無畏護甲", nil, {"東瘟疫之地聖光之願禮拜堂的柯菲斯要30個黑鐵碎塊。"}},
[9133] = {"飛往銀月城", nil, {"飛回銀月城並將珊希歐的提貨單交給銀月城的賽詩倫‧蒼曦。"}},
[9134] = {"女飛行師薄暮", nil, {"將珊希歐的貨物帶給銀月城牧羊人之門外的女飛行師薄暮。"}},
[9135] = {"回去找珊希歐", nil, {"使用飛行服務回到永歌森林的飛行師明曦，並將珊希歐貨物送到珊希歐那裡。"}},
[9136] = {"野性植物群", nil, {"東瘟疫之地聖光之願禮拜堂的瑞恩要30個野性藻葉。"}},
[9138] = {"日冠村", nil, {"殺死10個奈幽碧斯守衛，再回到鬼魂之地的安寧地找秘法師范德隆。"}},
[9139] = {"金霧村", nil, {"到金霧村擊敗6個奎爾多雷鬼靈和4個奎爾多雷怨靈，再回到鬼魂之地的安寧地找秘法師范德隆。"}},
[9140] = {"風行者村", nil, {"收集6份幻魅實體和4份石像鬼碎片並帶到鬼魂之地的安寧地給秘法師范德隆。"}},
[9141] = {"他們叫我「鬥士」", nil


 == 0,\n" //
        + "        tb - 320 -8.164*^-8*(qs +qw) == 0}, {{tw,2400+0.000015*I},{t1,-230-240*I},{t2,-241-230*I},{t3,4},{tb,1},{qw,1},{qs,1}})", //
        "{tw->2400.0,t1->2385.213,t2->708.4835,t3->680.6299,tb->320.0402,qw->461596.8,qs->31318.22}");
    check("{2400^4 - tw^4 -1.77*^-6*qw,\n" //
        + "        tw^2 - t1^2 +2454*(tw - t1) - 0.2319 *qw,\n" //
        + "        t1^4 - t2^4 +4.601*^6*(t1^2 - t2^2) + 1.129*^10*(t1 - t2) - 1.6229*^8 * qw,\n" //
        + "        t2^2 - t3^2 + 2454 *(t2 -t3) -0.2319 *qw,\n" //
        + "        tw -t3 -0.0549*qs,\n" //
        + "        t3^4 - tb^4 -4.141*^5*(qs + qw),\n" //
        + "        tb - 320 -8.164*^-8*(qs +qw)} /. {tw->2400.0,t1->2385.213,t2->708.4835,t3->680.6299,tb->320.0402,qw->461596.8,qs->31318.22}", //
        "{-0.816406,1.94471,-2.61528*10^7,0.245478,-0.000178,-35512.4,-0.0000415822}");

    // automatic: AccuracyGoal->6
    checkNumeric("10-x /. FindRoot(Sin(x - 10) - x + 10, {x, 0})", //
        "1.498271155142561E-6");
    checkNumeric("10-x /. FindRoot(Sin(x - 10) - x + 10, {x, 0},AccuracyGoal->4)", //
        "1.9439351756744827E-4");
    // Message FindRoot: interval does not bracket a root: f(NaN) = NaN, f(NaN) = NaN.
    checkNumeric("10-x /. FindRoot(Sin(x - 10) - x + 10, {x, 0},AccuracyGoal->8)", //
        "10-x/.FindRoot(10-x-Sin(10-x),{x,0},AccuracyGoal->8)");
    // Message FindRoot: Value of option AccuracyGoal->test is not Automatic or a machine-sized
    // integer.
    checkNumeric("10-x /. FindRoot(Sin(x - 10) - x + 10, {x, 0},AccuracyGoal->test)", //
        "10-x/.FindRoot(10-x-Sin(10-x),{x,0},AccuracyGoal->test)");

    // univariate cases
    check("FindRoot(sin(x)==x^2, {x, -6.6, 3.99999999})", //
        "{x->-1.84448*10^-19}");
    check("v1:= E^x - 3*x ;v2:={x, 2};", //
        "");
    check("FindRoot(v1,v2)", //
        "{x->1.51213}");
    check("{v1,v2,x}", //
        "{E^x-3*x,{x,2},x}");
    check("FindRoot(Surd(x, 2) == 1.5, {x, 1})", //
        "{x->2.25}");
    check("Exp(1.243624090168953 * E - 16) - 1", //
        "-0.999997");

    checkNumeric("FindRoot(30*x/0.000002==30, {x, 0, 5}, Method->brent)", //
        "{x->2.0E-6}");
    // github issue #60
    // Message Fi


r based on settings"""
        is_per_channel = self.options(guild).per_channel_spam
        if not is_per_channel:
            return member.duplicate_counter

        try:
            channel_id = int(channel_id)
            return member.duplicate_channel_counter_dict[channel_id]
        except (KeyError, TypeError):
            return 1

    def _remove_duplicate_count(
        self, member: Member, guild: Guild, channel_id: int, amount: int = 1
    ):
        """Used when cleaning the cache, to only lower the correct counter"""
        is_per_channel = self.options(guild).per_channel_spam
        if not is_per_channel:
            member.duplicate_counter -= amount
            return

        try:
            member.duplicate_channel_counter_dict[channel_id] -= amount
        except KeyError:
            log.warning(
                "Failed to de-increment duplicate count as the channel id doesnt exist. "
                "Member(id=%s) in Guild(id=%s) with Channel(id=%s)",
                member.id,
                member.guild_id,
                channel_id,
            )


f_t find_last(const std::vector<off_t> &vals, off_t idx)
{
	for (size_t i = idx; i < vals.size(); i++) {
		if (vals[i] != vals[idx])
			return i - 1;
	}
	return vals.size() - 1;
}

static inline matrix_store::const_ptr _get_rows(matrix_store::const_ptr store,
		const std::vector<off_t> &idxs)
{
	matrix_store::const_ptr rows = store->get_rows(idxs);
	if (rows)
		return rows;

	// If we can't get rows from a matrix directly, we can extract them with
	// get_rows of dense_matrix.
	dense_matrix::ptr mat = dense_matrix::create(store);
	dense_matrix::ptr sub = mat->get_rows(idxs);
	assert(sub);
	return sub->get_raw_store();
}

matrix_store::const_ptr combined_matrix_store::get_rows(
		const std::vector<off_t> &idxs) const
{
	// Get rows from a tall matrix.
	if (!is_wide()) {
		if (idxs.size() > get_num_cols()) {
			std::vector<matrix_store::const_ptr> sub_stores(mats.size());
			for (size_t i = 0; i < sub_stores.size(); i++)
				sub_stores[i] = mats[i]->get_rows(idxs);
			return combined_matrix_store::create(sub_stores, store_layout());
		}
		else {
			mem_matrix_store::ptr ret = mem_matrix_store::create(idxs.size(),
					get_num_cols(), store_layout(), get_type(), -1);
			size_t start_col = 0;
			for (size_t i = 0; i < mats.size(); i++) {
				matrix_store::const_ptr sub_store = mats[i]->get_rows(idxs);
				local_matrix_store::const_ptr portion = sub_store->get_portion(0);
				assert(sub_store->get_num_rows() == portion->get_num_rows());
				assert(sub_store->get_num_cols() == portion->get_num_cols());
				local_matrix_store::ptr ret_portion = ret->get_portion(0,
						start_col, idxs.size(), sub_store->get_num_cols());
				ret_portion->copy_from(*portion);
				start_col += sub_store->get_num_cols();
			}
			return ret;
		}

		// TODO I'll deal with this later.
		assert(0);
	}

	// If all the idxs are sorted.
	if (std::is_sorted(idxs.begin(), idxs.end())) {
		std::vector<off_t> mat_idxs(idxs.size());
		std::vector<off_t> local_row_idxs(idxs.size());
		std::vector<off_t> start_rows(mats.size());
		for (size_t i = 1; i < mats.size(); i++)
			start_rows[i] = start_rows[i - 1] + mats[i - 1]->get_num_rows();
		// Find the right matrix.
		auto loc = find_mat(mats.begin(), mats.end(), start_rows[0], idxs[0]);
		mat_idxs[0] = loc.first;
		local_row_idxs[0] = loc.second;
		for (size_t i = 1; i < idxs.size(); i++) {
			off_t mat_idx = mat_idxs[i - 1];
			loc = find_mat(mats.begin() + mat_idx, mats.end(),
					start_rows[mat_idx], idxs[i]);
			assert(loc.first >= 0);
			local_row_idxs[i] = loc.second;
			// find_mat returns a relative idx in the vector of matrices.


Control = 1 << 30 // 1073741824
	UAF_RESERVED_31                    UserAccountControl = 1 << 31 // 2147483648
)

var UserAccountControlMap = map[UserAccountControl]string{
	UAF_SCRIPT:                         "SCRIPT",
	UAF_ACCOUNT_DISABLED:               "ACCOUNT_DISABLED",
	UAF_HOMEDIR_REQUIRED:               "HOMEDIR_REQUIRED",
	UAF_LOCKOUT:                        "LOCKOUT",
	UAF_PASSWD_NOTREQD:                 "PASSWD_NOTREQD",
	UAF_PASSWD_CANT_CHANGE:             "PASSWD_CANT_CHANGE",
	UAF_ENCRYPTED_TEXT_PWD_ALLOWED:     "ENCRYPTED_TEXT_PWD_ALLOWED",
	UAF_TEMP_DUPLICATE_ACCOUNT:         "TEMP_DUPLICATE_ACCOUNT",
	UAF_NORMAL_ACCOUNT:                 "NORMAL_ACCOUNT",
	UAF_INTERDOMAIN_TRUST_ACCOUNT:      "INTERDOMAIN_TRUST_ACCOUNT",
	UAF_WORKSTATION_TRUST_ACCOUNT:      "WORKSTATION_TRUST_ACCOUNT",
	UAF_SERVER_TRUST_ACCOUNT:           "SERVER_TRUST_ACCOUNT",
	UAF_DONT_EXPIRE_PASSWORD:           "DONT_EXPIRE_PASSWORD",
	UAF_MNS_LOGON_ACCOUNT:              "MNS_LOGON_ACCOUNT",
	UAF_SMARTCARD_REQUIRED:             "SMARTCARD_REQUIRED",
	UAF_TRUSTED_FOR_DELEGATION:         "TRUSTED_FOR_DELEGATION",
	UAF_NOT_DELEGATED:                  "NOT_DELEGATED",
	UAF_USE_DES_KEY_ONLY:               "USE_DES_KEY_ONLY",
	UAF_DONT_REQ_PREAUTH:               "DONT_REQ_PREAUTH",
	UAF_PASSWORD_EXPIRED:               "PASSWORD_EXPIRED",
	UAF_TRUSTED_TO_AUTH_FOR_DELEGATION: "TRUSTED_TO_AUTH_FOR_DELEGATION",
	UAF_PARTIAL_SECRETS_ACCOUNT:        "PARTIAL_SECRETS_ACCOUNT",
}

// String returns a string representation of the UserAccountControl flags.
//
// The function iterates over the UserAccountControlMap to check which flags are set in the UserAccountControl value.
// It collects the string representations of the set flags, sorts them alphabetically, and joins them with a pipe ("|") separator.
//
// Returns:
//   - A string containing the names of the set flags, separated by a pipe ("|").
//
// Example usage:
//
//	uac := ldap_attributes.UserAccountControl(0x00000010 | 0x00000020)
//	fmt.Println(uac.String()) // Output: "LOCKOUT|PASSWD_NOTREQD"
//
// This function is useful for debugging and logging purposes, allowing a human-readable representation of the UserAccountControl flags.
func (uac UserAccountControl) String() string {
	flagsString := []string{}
	for flag, val := range UserAccountControlMap {
		if uac&flag != 0 {
			flagsString = append(flagsString, val)
		}
	}

	sort.Strings(flagsString)

	return strings.Join(flagsString, "|")
}

// GetFlags returns a slice of UserAccountControl flags that are set in the UserAccountControl value.
//
// The function iterates over the UserAccountControlMap to check which flags are set in the UserAccountControl value.
// It collects the flags that are set and returns them as a slice of UserAccountControl values, sorted in ascending order.
//
// Returns:
//   - A slice of UserAccountControl values representing the set flags, sorted in ascending order.
//
// Example usage:
//
//	uac := ldap_attributes.UserAccountControl(0x00000010 | 0x00000020)
//	flags := uac.GetFlags()
//


# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
#   Copyright 2018-2021 Fetch.AI Limited
#
#   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.
#
# ------------------------------------------------------------------------------

"""Hash functions of Crypto package."""

import hashlib

# pycryptodome, a dependency of bip-utils
from Crypto.Hash import RIPEMD160  # type: ignore # nosec

def sha256(contents: bytes) -> bytes:
    """
    Get sha256 hash.

    :param contents: bytes contents.

    :return: bytes sha256 hash.
    """
    h = hashlib.sha256()
    h.update(contents)
    return h.digest()

def ripemd160(contents: bytes) -> bytes:
    """
    Get ripemd160 hash using PyCryptodome.

    :param contents: bytes contents.

    :return: bytes ripemd160 hash.
    """
    h = RIPEMD160.new()
    h.update(contents)
    return h.digest()


的 `enc28j60.c` 文件里的函数来初始化的，想了解 ENC28J60 初始化和中断函数详情的，可以查看 `/rt-thread/components/drivers/spi/enc28j60.c` 文件来学习。

## 引用参考

- 《GPIO 设备应用笔记》: docs/AN0002-RT-Thread-通用 GPIO 设备应用笔记.pdf
- 《SPI 设备应用笔记 》: docs/AN0004-RT-Thread-SPI 设备应用笔记.pdf
- 《RT-Thread 编程指南 》: docs/RT-Thread 编程指南.pdf# RT-Thread Nano 简介

RT-Thread Nano 是一个极简版的硬实时内核，它是由 C 语言开发，采用面向对象的编程思维，具有良好的代码风格，是一款可裁剪的、抢占式实时多任务的 RTOS。其内存资源占用极小，功能包括任务处理、软件定时器、信号量、邮箱和实时调度等相对完整的实时操作系统特性。适用于家电、消费电子、医疗设备、工控等领域大量使用的 32 位 ARM 入门级 MCU 的场合。

下图是 RT-Thread Nano 的软件框图，包含支持的 CPU 架构与内核源码，还有可拆卸的 FinSH 组件：

![架构](docs/figures/framework.png)

**支持架构**：ARM：Cortex M0/ M3/ M4/ M7 等、RISC-V 及其他。

**功能**：线程管理、线程间同步与通信、时钟管理、中断管理、内存管理。

## Nano 的特点

### 简单

**1、下载简单**

RT-Thread Nano 以软件包的方式集成在 Keil MDK 与 CubeMX 中，可以直接在软件中下载 Nano 软件包获取源码，获取方式详见 [使用 KEIL MDK 移植 RT-Thread Nano](nano-port-keil/nano-port-keil.md) 与 [使用 CubeMX 移植 RT-Thread Nano](nano-port-cube/nano-port-cube.md) 。

同时也提供 [下载 Nano 源码压缩包]() 的途径，方便在其他开发环境移植 RT-Thread Nano，如 [使用 IAR 移植 RT-Thread Nano](nano-port-iar/nano-port-iar.md)。

**2、代码简单**

与 RT-Thread 完整版不同的是，Nano 不含 Scons 构建系统，不需要 Kconfig 以及 Env 配置工具，也去除了完整版特有的 device 框架和组件，仅是一个纯净的内核。

**3、移植简单**

由于 Nano 的极简特性，使 Nano 的移植过程变得极为简单。添加 Nano 源码到工程，就已完成 90% 的移植工作。并且在 Keil MDK 与 Cube MX 中还提供了 Nano 的软件包，可以一键下载加入到工程。以下是使用不同开发环境时，可以选择移植 Nano 的方法：

- [使用 KEIL MDK 移植 RT-Thread Nano](nano-port-keil/nano-port-keil.md)
- [使用 CubeMX 移植 RT-Thread Nano](nano-port-cube/nano-port-cube.md)
- [使用 IAR 移植 RT-Thread Nano](nano-port-iar/nano-port-iar.md)


        else
            {
                color.g = LaserColorGreen[GetRandomNumber.GetRandomInt(LaserColorGreen.Count)];
                Log.Debug($"VVUP Custom Items: Using random green value: {color.g}");
            }

            if (ServerSpecificSettingsSync.TryGetSettingOfUser<SSPlaintextSetting>(
                    player.ReferenceHub, Plugin.Instance.Config.SsssConfig.LaserGunBlueId, out var blueSetting)
                && int.TryParse(blueSetting.SyncInputText, out int b) && b is > -1 and < 256)
            {
                color.b = b / 255f;
                Log.Debug($"VVUP Custom Items: Using SSSS blue value: {b}");
            }
            else
            {
                color.b = LaserColorBlue[GetRandomNumber.GetRandomInt(LaserColorBlue.Count)];
                Log.Debug($"VVUP Custom Items: Using random blue value: {color.b}");
            }

            Color.RGBToHSV(color, out float h, out float s, out float v);
            Color finalColor = Color.HSVToRGB(h, 1f, 1f);

            Log.Debug($"VVUP Custom Items: Final RGB values for {player.Nickname}: R:{finalColor.r}, G:{finalColor.g}, B:{finalColor.b}");

            return finalColor;
        }
        IEnumerator<float> LaserFade(Primitive Laser)
        {
            Color color = new Color(Laser.Color.r, Laser.Color.g, Laser.Color.b, 1f);

            for (int i = 20; i > 0; i--)
            {
                float brightness = (LaserBrightness * (i / 20f));
                Color newColor = new Color(color.r * brightness, color.g * brightness, color.b * brightness, 1f);

                Laser.Color = newColor;

                yield return Timing.WaitForSeconds(0.05f / 20f);
            }

            Laser.Destroy();
        }
    }
}


ions.
 */

/*
 * @test
 *
 * @summary converted from VM Testbase runtime/jbe/dead/dead05.
 * VM Testbase keywords: [quick, runtime]
 *
 * @library /vmTestbase
 *          /test/lib
 * @run driver jdk.test.lib.FileInstaller . .
 * @run main/othervm vm.compiler.jbe.dead.dead05.dead05
 */

package vm.compiler.jbe.dead.dead05;

/* -- Test the elimination of dead assignment to static class field
In the example below, all the values assigned to i in struct except of the last one are never used,thus can be eliminated.

 */

class struct {
    static int i = 6;
}

public class dead05 {

  public static void main(String args[]) {
    dead05 dce = new dead05();

    System.out.println("f()="+dce.f()+"; fopt()="+dce.fopt());
    if (dce.f() == dce.fopt()) {
      System.out.println("Test dead05 Passed.");
    } else {
      throw new Error("Test dead05 Failed: f()=" + dce.f() + " != fopt()=" + dce.fopt());
    }
  }

  int f() {

    struct.i = 1;
    struct.i = 2;
    struct.i = 3;
    struct.i = 4;
    struct.i = 5;
    struct.i = 6;
    struct.i = 7;
    struct.i = 8;

    struct.i = 1;
    struct.i = 2;
    struct.i = 3;
    struct.i = 4;
    struct.i = 5;
    struct.i = 6;
    struct.i = 7;
    struct.i = 8;

    struct.i = 1;
    struct.i = 2;
    struct.i = 3;
    struct.i = 4;
    struct.i = 5;
    struct.i = 6;
    struct.i = 7;
    struct.i = 8;

    return struct.i;
  }

  // Code fragment after dead code elimination
  int fopt() {

    struct.i = 8;
    return struct.i;
  }
}
/*
 * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

/*
 * @test
 *
 * @summary converted from VM Testbase runtime/jbe/dead/dead12.
 * VM Testbase keywords: [quick, runtime]
 *
 * @library /vmTestbase
 *          /test/lib
 * @run driver jdk.test.lib.FileInstaller . .
 * @run main/othervm vm.compiler.jbe.dead.dead12.dead12
 */

package vm.compiler.jbe.dead.dead12;

// dead12.java

/* -- Test the elimination of dead assignments to a local array within IF statement
      Example:

      boolean bol = true;
      void foo()
      {
         int arr[] = new int[SIZE];
         if (bol) arr[1] = 3;


 eagle_cooling_N_density, eagle_cooling_N_temperature);

        /* Just transpose */
        cooling->table.electron_abundance[internal_index] =
            electron_abundance[hdf5_index];
      }
    }

    status = H5Fclose(file_id);
    if (status < 0) error("error closing file");
  }

  swift_free("cooling-temp", net_cooling_rate);
  swift_free("cooling-temp", electron_abundance);
  swift_free("cooling-temp", temperature);
  swift_free("cooling-temp", he_net_cooling_rate);
  swift_free("cooling-temp", he_electron_abundance);

#ifdef SWIFT_DEBUG_CHECKS
  message("Done reading in general cooling table");
#endif

#else
  error("Need HDF5 to read cooling tables");
#endif
}


from django.db import migrations, models
from django.conf import settings

def set_default_user(apps, schema_editor):
    # Adjust this logic to set a default user or None
    User = apps.get_model(settings.AUTH_USER_MODEL)
    try:
        default_user = User.objects.get(username='default_user')
    except User.DoesNotExist:
        default_user = None

    Note = apps.get_model('notes', 'Note')
    for note in Note.objects.all():
        note.user = default_user
        note.save()

class Migration(migrations.Migration):

    dependencies = [
        ('notes', '0003_post'),  # Adjust to match your actual previous migration
    ]

    operations = [
        migrations.AddField(
            model_name='note',
            name='user',
            field=models.ForeignKey(
                to=settings.AUTH_USER_MODEL,
                on_delete=models.CASCADE,
                default=None,  # Set default value to None or a valid user
            ),
            preserve_default=False,
        ),
        migrations.RunPython(set_default_user, reverse_code=migrations.RunPython.noop),
    ]


 ab_dim1 + 2], &rc, &rs,
		    &ra);
	    d__[i__] = ra;
	    if (i__ < *n) {
		e[i__] = rs * ab[(i__ + 1) * ab_dim1 + 1];
		ab[(i__ + 1) * ab_dim1 + 1] = rc * ab[(i__ + 1) * ab_dim1 + 1]
			;
	    }
	    if (wantq) {
		srot_(m, &q[i__ * q_dim1 + 1], &c__1, &q[(i__ + 1) * q_dim1 +
			1], &c__1, &rc, &rs);
	    }
	    if (wantc) {
		srot_(ncc, &c__[i__ + c_dim1], ldc, &c__[i__ + 1 + c_dim1],
			ldc, &rc, &rs);
	    }
/* L100: */
	}
	if (*m <= *n) {
	    d__[*m] = ab[*m * ab_dim1 + 1];
	}
    } else if (*ku > 0) {

/*        A has been reduced to upper bidiagonal form */

	if (*m < *n) {

/*           Annihilate a(m,m+1) by applying plane rotations from the */
/*           right, storing diagonal elements in D and off-diagonal */
/*           elements in E */

	    rb = ab[*ku + (*m + 1) * ab_dim1];
	    for (i__ = *m; i__ >= 1; --i__) {
		slartg_(&ab[*ku + 1 + i__ * ab_dim1], &rb, &rc, &rs, &ra);
		d__[i__] = ra;
		if (i__ > 1) {
		    rb = -rs * ab[*ku + i__ * ab_dim1];
		    e[i__ - 1] = rc * ab[*ku + i__ * ab_dim1];
		}
		if (wantpt) {
		    srot_(n, &pt[i__ + pt_dim1], ldpt, &pt[*m + 1 + pt_dim1],
			    ldpt, &rc, &rs);
		}
/* L110: */
	    }
	} else {

/*           Copy off-diagonal elements to E and diagonal elements to D */

	    i__1 = minmn - 1;
	    for (i__ = 1; i__ <= i__1; ++i__) {
		e[i__] = ab[*ku + (i__ + 1) * ab_dim1];
/* L120: */
	    }
	    i__1 = minmn;
	    for (i__ = 1; i__ <= i__1; ++i__) {
		d__[i__] = ab[*ku + 1 + i__ * ab_dim1];
/* L130: */
	    }
	}
    } else {

/*        A is diagonal. Set elements of E to zero and copy diagonal */
/*        elements to D. */

	i__1 = minmn - 1;
	for (i__ = 1; i__ <= i__1; ++i__) {
	    e[i__] = 0.f;
/* L140: */
	}
	i__1 = minmn;
	for (i__ = 1; i__ <= i__1; ++i__) {
	    d__[i__] = ab[i__ * ab_dim1 + 1];
/* L150: */
	}
    }
    return 0;

/*     End of SGBBRD */

} /* sgbbrd_ */


isEnableRefreshOrLoadMore(mEnableRefresh) && mSpinner > 0 && mRefreshHeader != null && mRefreshHeader.isSupportHorizontalDrag()) {
                        mRefreshHeader.onHorizontalDrag(percentX, offsetX, offsetMax);
                    } else if (isEnableRefreshOrLoadMore(mEnableLoadMore) && mSpinner < 0 && mRefreshFooter != null && mRefreshFooter.isSupportHorizontalDrag()) {
                        mRefreshFooter.onHorizontalDrag(percentX, offsetX, offsetMax);
                    }
                }
            }
            return ret;
        } else if (!thisView.isEnabled()
                || (!mEnableRefresh && !mEnableLoadMore && !mEnableOverScrollDrag)
                || (mHeaderNeedTouchEventWhenRefreshing && ((mState.isOpening || mState.isFinishing) && mState.isHeader))
                || (mFooterNeedTouchEventWhenLoading && ((mState.isOpening || mState.isFinishing) && mState.isFooter))) {
            return super.dispatchTouchEvent(e);
        } else if (mState.isFinishing) {
            /*
             * https://github.com/scwang90/SmartRefreshLayout/issues/1540
             * 在刷新动画关闭的时候，点击列表无法跳转，
             * 是因为下面的 if (interceptAnimatorByAction || mState.isFinishing ) return false
             * 屏蔽了所有手势事件，屏蔽的原因是如果关闭动画正在执行的时候，随意滑动列表会导致意外的错乱
             * 目前的修复方法并不是放开屏蔽，而是针对 先 ACTION_DOWN 再 ACTION_UP 的点击事件进行补偿处理
             * 从而实现，完成动画执行时，列表不可手动滑动，但是可以点击列表项
             */
            if (action == MotionEvent.ACTION_UP) {
                //要求时间间隔小于半秒钟
                if (System.currentTimeMillis() - mLastTimeOnActionDown < 500) {
                    float dx = touchX - mLastTouchXOnActionDown;
                    float dy = touchY - mLastTouchYOnActionDown;
                    //要求坐标偏移小于系统阈值
                    if (Math.abs(dx) < mTouchSlop && Math.abs(dy) < mTouchSlop) {
                        e.setAction(MotionEvent.ACTION_DOWN);
                        super.dispatchTouchEvent(e);
                        e.setAction(MotionEvent.ACTION_UP);
                        return super.dispatchTouchEvent(e);
                    }
                }
            }
            /*
             * 返回 true，但是不调用 super.dispatchTouchEvent(e)，表示已经处理，但实际情况是没处理。
             * 这样在拦截到 down move 事件时，才会继续触发 up 事件
             * 否则 返回false 后面不会再接收到 move 和 up 的事件
             */
            return true;
        }

        if (interceptAnimatorByAction(action)
                || (mState == RefreshState.Loading && mDisableContentWhenLoading)
                || (mState == RefreshState.Refreshing && mDisableContentWhenRefresh)) {
            return false;
        }

        //-------------------------------------------------------------------------//

        //---------------------------------------------------------------------------
        //传统模式滚动
        //---------------------------------------------------------------------------
        switch (action) {
            case MotionEvent.ACTION_DOWN:
                /*----------------------------------------------------*/
                /*                   速度追踪初始化                    */
                /*----------------------------------------------------*/
                mCurrentVelocity = 0;
                mVelocityTracker.addMovement(e);
                mScroller.forceFinished(true);
                /*----------------------------------------------------*/
                /*                   触摸事件初始化


result.push_back(imuerr.gyrbias[1] * R2D * 3600);
    result.push_back(imuerr.gyrbias[2] * R2D * 3600);
    result.push_back(imuerr.accbias[0] * 1e5);
    result.push_back(imuerr.accbias[1] * 1e5);
    result.push_back(imuerr.accbias[2] * 1e5);
    result.push_back(imuerr.gyrscale[0] * 1e6);
    result.push_back(imuerr.gyrscale[1] * 1e6);
    result.push_back(imuerr.gyrscale[2] * 1e6);
    result.push_back(imuerr.accscale[0] * 1e6);
    result.push_back(imuerr.accscale[1] * 1e6);
    result.push_back(imuerr.accscale[2] * 1e6);
    imuerrfile.dump(result);
}

/**
 * @brief 保存标准差，已转换为常用单位
 *        save standard deviation, converted to common units
 * */
void writeSTD(double time, Eigen::MatrixXd &cov, FileSaver &stdfile) {

    std::vector<double> result;

    result.clear();
    result.push_back(time);
    // 保存位置、速度、姿态标准差
    // save position, velocity and attitude std
    for (int i = 0; i < 6; i++) {
        result.push_back(sqrt(cov(i, i)));
    }
    for (int i = 6; i < 9; i++) {
        result.push_back(sqrt(cov(i, i)) * R2D);
    }

    // 保存IMU误差标准差
    // save imu error std
    for (int i = 9; i < 12; i++) {
        result.push_back(sqrt(cov(i, i)) * R2D * 3600);
    }
    for (int i = 12; i < 15; i++) {
        result.push_back(sqrt(cov(i, i)) * 1e5);
    }
    for (int i = 15; i < 21; i++) {
        result.push_back(sqrt(cov(i, i)) * 1e6);
    }
    stdfile.dump(result);
}// Copyright 2017 The Abseil Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Unit tests for the variant template. The 'is' and 'IsEmpty' methods
// of variant are not explicitly tested because they are used repeatedly
// in building other tests. All other public variant methods should have
// explicit tests.

#include "absl/types/variant.h"

#include <cstddef>
#include <cstdlib>
#include <string>
#include <tuple>

#include "benchmark/benchmark.h"
#include "absl/utility/utility.h"

namespace absl {
ABSL_NAMESPACE_BEGIN
namespace {

template <std::size_t I>
struct VariantAlternative {
  char member;
};

template <class Indices>
struct VariantOfAlternativesImpl;

template <std::size_t... Indices>
struct VariantOfAlternativesImpl<absl::index_sequence<Indices...>> {
  using type = absl::variant<VariantAlternative<Indices>...>;
};

template <std::size_t NumAlternatives>
using VariantOfAlternatives = typename VariantOfAlternativesImpl<
    absl::make_index_sequence<NumAlternatives>>::type;


tion.lockY, true)
        browser!!.connect(root)
        browser!!.loaded()
        properties.put(Boxes.dontSave, true)
        styles = findAndLoad(styleSheet, false)
        browser!!.properties.put(name, "GLASS")

//		boot();
        // we've been having an incredibly hard time tracking down a problem on OS X where sometimes the CefSystem will fail to initialize the browser.
        val t = longArrayOf(0)
        RunLoop.main.loop
            .attach { x: Int ->
                if (t[0] == 0L) t[0] = System.currentTimeMillis()
                if (System.currentTimeMillis() - t[0] > 500) {
                    System.out.println(" -- going to boot the glass browser")
                    boot()
                    return@attach false
                }
                true
            }

        // I've been looking forward to this for a while
        properties.putToMap(
            Keyboard.onKeyDown,
            "__glassbrowser__",
            OnKeyDown { e: Window.Event<Window.KeyboardState>, k: Int ->
                if (!e.properties.isTrue(Window.consumed, false)) {
                    if (e.after.keysDown.contains(GLFW.GLFW_KEY_SPACE) && e.after.isControlDown && !e.before.keysDown.contains(
                            GLFW.GLFW_KEY_SPACE
                        )
                    ) {
//					if (!visible)
                        run {
                            center()
                            runCommands()
                        }
                    }
                }
                null
            })
    }

    fun boot() {
        val s = littleServer.s

        val bootstrap =
            ""
        val res = UUID.randomUUID()
            .toString()
        s.setFixedResource("/$res", bootstrap)
        println("access at: http://localhost:" + s.port + "/" + res)

        browser!!.properties.put(Browser.url, "http://localhost:" + s.port + "/" + res)
        tick = 0
        RunLoop.main.loop
            .attach { x: Int ->
                tick++
                if (browser!!.browser!!.url
                        .startsWith("http://localhost:" + s.port + "/" + res)
                ) {
                    RunLoop.main.delayTicks({ inject2() }, 4)
                    //					inject2();
                    return@attach false
                }
                Log.log("glassBrowser.boot") { "WAITING url:" + browser!!.browser!!.url }
                Drawing.dirty(this)
                if (tick % 200 == 0) {
                    Log.log("glassBrowser.boot") { "trying to dislodge" }
                    browser!!.properties.put(Browser.url, "http://localhost:" + s.port + "/" + res + "?t=" + tick)
                }
                true
            }
        Drawing.dirty(this)
    }

    var ignoreHide = 0
    fun inject2() {
//        show()

        Log.log("glassbrowser.debug") { "inject 2 is happening" }
        for (s in playlist) {
            Log.log("glassbrowser.debug") { "executing :$s" }
            browser!!.executeJavaScript(findAndLoad(s, true))
            try {
                Thread.sleep(100)
            } catch (e: InterruptedException) {
                e.printStackTrace()
            }
        }
        hide()
        littleServer.s.addHandlerLast(
            { x: String -> x == "focus" },
            { server,


-area {
  margin-right: -1px;
}

.right #code-area {
  margin-left: -1px;
}

#code-header {
  margin-bottom: 5px;
}

#code {
  background-color: white;
}

code {
  font-size: 100%;
}

.codewalkhighlight {
  font-weight: bold;
  background-color: #f8f8ff;
}

#code-display {
  margin-top: 0px;
  margin-bottom: 0px;
}

#sizer {
  position: absolute;
  cursor: col-resize;
  left: 0px;
  top: 0px;
  width: 8px;
}

/* Style for options (bottom strip) */

#code-options {
  display: none;
}

#code-options > span {
  padding-right: 20px;
}

#code-options .selected {
  border-bottom: 1px dotted;
}

#comment-options {
  text-align: center;
}

div#content {
  padding-bottom: 0em;
}
/* You can add global styles to this file, and also import other style files */
@import '@angular/material/prebuilt-themes/indigo-pink.css';
@import '@fontsource/roboto';
@import '@fontsource/roboto-mono';
@import 'colors.scss';

@media print {
    @page {
        size: A3;
        margin: 0;
    }
}

@font-face {
    font-family: 'Material Icons';
    font-style: normal;
    font-display: block;
    font-weight: 400;
    src:
        local('Material Icons'),
        local('MaterialIcons-Regular'),
        url(assets/icons/MaterialIcons-Regular.ttf) format('truetype');
}

.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px; /* Preferred icon size */
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;

    /* Support for all WebKit browsers. */
    -webkit-font-smoothing: antialiased;
    /* Support for Safari and Chrome. */
    text-rendering: optimizeLegibility;

    /* Support for Firefox. */
    -moz-osx-font-smoothing: grayscale;

    /* Support for IE. */
    font-feature-settings: 'liga';
}

.text-deemphasis {
    color: on-color-deemphasis(body);
    font-size: 12px !important;
    letter-spacing: normal;
}

body {
    margin: 0;
    overflow-y: scroll;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.svgcontainer {
    @include adaptive-color-dark-only('background-color', white);
}

.mdc-button, .mat-mdc-button-base {
    letter-spacing: normal !important;
}

.mat-dialog {
    .mat-mdc-dialog-actions {
        justify-content: center;
    }
    .mat-mdc-dialog-title {
        text-align: center;
    }
    .mat-mdc-dialog-content {
        color: black !important;
        @include adaptive-color-dark-only('color', on-color(dark) !important);
    }
}

.mat-mdc-dialog-container {
    .mdc-dialog__surface {
        @include adaptive-color-dark-only('background-color', color(dark-2));
    }
    .mdc-dialog__title,
    .mdc-dialog__content {
        @include adaptive-color-dark-only('color', on-color(dark) !important);
    }
    .mat-mdc-button-base {
        @include adaptive-color-dark-only('border-color', color(dark-4));
        @includ


1019{border-width:0px;}
  .Mo_1019 .MoHead{height:35px; line-height:35px; border-width: 2px 0 0;  border-style:solid;}
  .Mo_1019 .MoMore{right:10px;}
  .Mo_1019 .NameTxt a{font-size: 16px;}

/**--Mo_1020 basic setting--**/
.Mo_1020,.Mo_1020 .MoT,.Mo_1020 .MoTL,.Mo_1020 .MoTR,.Mo_1020 .MoTM,.Mo_1020 .MoHead,.Mo_1020 .MoHeadL,.Mo_1020 .MoHeadR,.Mo_1020 .MoHeadM,.Mo_1020 .MoName,.Mo_1020 .MoNameL,.Mo_1020 .MoNameR,.Mo_1020 .MoNameM,.Mo_1020 .MoBody,.Mo_1020 .MoBodyL,.Mo_1020 .MoBodyR,.Mo_1020 .MoBodyM,.Mo_1020 .MoB,.Mo_1020 .MoBL,.Mo_1020 .MoBR,.Mo_1020 .MoBM{background:none; border-width:0px; border-style:none; border-color:none;}
  .Mo_1020{border-width:0px;}
  .Mo_1020 .MoHead{height:35px; line-height:35px; border-width: 0 0 1px;  border-style:solid; position: relative;}
  .Mo_1020 .MoMore{right:10px;}
  .Mo_1020 .MoName .MoNameM .NameTxt{ border-width: 0 0 2px; border-style:solid; padding:0 5px;}
  /*.Mo_1020 .MoName .MoNameM .NameTxt{ border-width: 0 0 2px; border-style:solid; padding:0 5px; bottom:-1px; position: absolute;}*/
  .Mo_1020 .NameTxt a{font-size: 16px;}

/**ťģ鵥**/
.customModuleButgroup .Mo{border-width:0px; overflow:visible; zoom:1; background-color:transparent;}
.customModuleButgroup .Mo .MoHead{display:none}
.customModuleButgroup .Mo .MoBodyM{background-color:transparent;}
.customModuleButgroup .Mo .MoBodyC{overflow:visible;}
/**--HMo_1001 basic setting--**/
.HMo_1001,.HMo_1001 .MoT,.HMo_1001 .MoTL,.HMo_1001 .MoTR,.HMo_1001 .MoTM,.HMo_1001 .MoHead,.HMo_1001 .MoHeadL,.HMo_1001 .MoHeadR,.HMo_1001 .MoHeadM,.HMo_1001 .MoName,.HMo_1001 .MoNameL,.HMo_1001 .MoNameR,.HMo_1001 .MoNameM,.HMo_1001 .MoBody,.HMo_1001 .MoBodyL,.HMo_1001 .MoBodyR,.HMo_1001 .MoBodyM,.HMo_1001 .MoB,.HMo_1001 .MoBL,.HMo_1001 .MoBR,.HMo_1001 .MoBM{background:none; border-width:0px; border-style:none; border-color:none;}
  .HMo_1001 .MoHead{height:40px; line-height:40px;}
	.HMo_1001 .NameTxt{font-size:14px; padding-left:10px;}
  .HMo_1001 .MoMore{right:10px; top:0px;}
/**--HMo_1002 basic setting--**/
.HMo_1002,.HMo_1002 .MoT,.HMo_1002 .MoTL,.HMo_1002 .MoTR,.HMo_1002 .MoTM,.HMo_1002 .MoHead,.HMo_1002 .MoHeadL,.HMo_1002 .MoHeadR,.HMo_1002 .MoHeadM,.HMo_1002 .MoName,.HMo_1002 .MoNameL,.HMo_1002 .MoNameR,.HMo_1002 .MoNameM,.HMo_1002 .MoB,.HMo_1002 .MoBL,.HMo_1002 .


    padding-left: 2rem;
    font-size: 2rem;
  }

  header .navbar ul li a:hover,
  header .navbar ul li a.active {
    color: #333;
    background-color: #1e73c161;
  }

  .fa-times {
    transform: rotate(180deg);
  }

  header .navbar.nav-toggle {
    transform: scaleY(1);
    opacity: 1;
  }

  .home .content {
    text-align: center;
  }

  .home .content h3 {
    font-size: 4.5rem;
  }

  .talks .row .image {
    display: none;
  }

  .dark-mode header .navbar ul {
    background-color: #121212;
  }
}

/*dark mode*/
.dark-mode,
.dark-mode nav,
.dark-mode .btn:hover,
.dark-mode header {
  background-color: #121212;
}

.dark-mode .detail-name,
.dark-mode .member-social-links a {
  color: white;
  font-size: 20px;
}
.dark-mode .team-heading,
.dark-mode .home button,
.dark-mode .home h3,
.dark-mode .home p,
.dark-mode .detail-box-text p,
.dark-mode .heading,
.dark-mode .about .content p,
.dark-mode .about .content h3,
.dark-mode .btn,
.dark-mode .projects .row .content .info h3,
.dark-mode .projects .row .content .info p,
.dark-mode .counter,
.dark-mode .navbar a {
  color: white;
}
.dark-mode .logo {
  border-radius: 100%;
  background-color: white;
}
.dark-mode .member-social-links a:hover {
  color: black;
  background-color: white;
}

.counter {
  position: fixed;
  bottom: 0px;
  right: 12px;
  width: 100px;
  z-index: 99;
  opacity: 1;
  font-size: 40px;
  color: aliceblue;
  border-right: 15px;
  text-align: center;
  margin-right: 40px;
  background-image: linear-gradient(to right, #bdc3c7, #2c3e50);
  color: orange !important;
  background-color: #92858552;
}

header button .icon-box .fa {
  font-size: 40px;
  background-color: white;
  color: black;
}

.dark-mode header button .icon-box .fa {
  font-size: 40px;
  background-color: black;
  color: white;
}

.dark-mode header .navbar ul li a.active,
.dark-mode header .navbar ul li a:hover {
  color: var(--yellow);
  text-decoration: none;
}

.dark-mode .view-work-btn {
  color: #202020;
  background-color: #ffffff;
}
.dark-mode .view-work-btn:hover,
.dark-mode .cancel:hover {
  color: #0e0e0e;
  background-color: #fff;
}

.dark-mode .row .video1 {
  background-color: white;
}

.dark-mode .row .video2 {
  background-color: white;
}

.dark-mode .textp1 {
  color: white;
  font-size: 2.5vmin;
}

.dark-mode .textp2 {
  color: white;
  font-size: 2.5vmin;
}

.dark-mode .subheading {
  color: white;
  text-align: center;
}

.spin


(ind.IncY)+1 {
					return onError("sizeY")
				}
			}
		}
	case fspr, fdspr2, ftpsv, fspmv, ftpmv:
		// ftpsv = triangular packed solve
		// fspmv = symmetric packed product
		// ftpmv = triangular packed
	}
	return nil
}

func check_level3_func(ind *linalg.IndexOpts, fn funcNum, A, B, C matrix.Matrix,
	pars *linalg.Parameters) (err error) {

	// defaults for these
	arows := ind.LDa
	brows := ind.LDb
	crows := ind.LDc

	switch fn {
	case fgemm:
		if ind.M < 0 {
			if pars.TransA == linalg.PNoTrans {
				ind.M = A.Rows()
			} else {
				ind.M = A.Cols()
			}
		}
		if ind.N < 0 {
			if pars.TransB == linalg.PNoTrans {
				ind.N = B.Cols()
			} else {
				ind.N = B.Rows()
			}
		}
		if ind.M == 0 || ind.N == 0 {
			return nil
		}
		if ind.K < 0 {
			if pars.TransA == linalg.PNoTrans {
				ind.K = A.Cols()
			} else {
				ind.K = A.Rows()
			}
			if pars.TransB == linalg.PNoTrans && ind.K != B.Rows() ||
				pars.TransB != linalg.PNoTrans && ind.K != B.Cols() {
				return onError("dimensions of A and B do not match")
			}
		}
		if ind.OffsetA < 0 {
			return onError("offsetA illegal, <0")
		}
		if ind.LDa == 0 {
			ind.LDa = max(1, A.LeadingIndex())
			arows = max(1, A.Rows())
		}
		if ind.K > 0 {
			if (pars.TransA == linalg.PNoTrans && ind.LDa < max(1, ind.M)) ||
				(pars.TransA != linalg.PNoTrans && ind.LDa < max(1, ind.K)) {
				return onError("inconsistent ldA")
			}
			sizeA := A.NumElements()
			if (pars.TransA == linalg.PNoTrans &&
				sizeA < ind.OffsetA+(ind.K-1)*arows+ind.M) ||
				(pars.TransA != linalg.PNoTrans &&
					sizeA < ind.OffsetA+(ind.M-1)*arows+ind.K) {
				return onError("sizeA")
			}
		}
		// B matrix
		if ind.OffsetB < 0 {
			return onError("offsetB illegal, <0")
		}
		if ind.LDb == 0 {
			ind.LDb = max(1, B.LeadingIndex())
			brows = max(1, B.Rows())
		}
		if ind.K > 0 {
			if (pars.TransB == linalg.PNoTrans && ind.LDb < max(1, ind.K)) ||
				(pars.TransB != linalg.PNoTrans && ind.LDb < max(1, ind.N)) {
				return onError("inconsistent ldB")
			}
			sizeB := B.NumElements()
			if (pars.TransB == linalg.PNoTrans &&
				sizeB < ind.OffsetB+(ind.N-1)*brows+ind.K) ||
				(pars.TransB != linalg.PNoTrans &&
					sizeB < ind.OffsetB+(ind.K-1)*brows+ind.N) {
				return onError("sizeB")
			}
		}
		// C matrix
		if ind.OffsetC < 0 {
			return onError


R A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

	.file	"ldgrub2.S"

#include <symbol.h>

#define DATA_ADDR	0x8000

	.text

	.code16

DEF_FUNC(main)
	movl	$DATA_ADDR, %edi

	call	EXT_FUNC(move_memory)

	pushw	%ss
	popw	%ds

	movsbl	%dh, %eax

	/* GRUB_KERNEL_MACHINE_INSTALL_DOS_PART.  */
	movl	%eax, (DATA_ADDR + 0x214)

	movb	$0xFF, %dh

	ljmp	$((DATA_ADDR >> 4) + 0x20), $0


from google_calendar.calendar_api import GoogleCalendarAPI

calendar_api = GoogleCalendarAPI()

# instructors=["Afonso", "Allan", "Ana Duarte", "Bia", "Danielle", "Igor", "João", "Marcelo", "Mirla", "Val", "Daniel", "David", "Rodrigo"]
instructors=["Afonso"]
priorities=[
    ('Bia', 'Storytelling com dados'),
    ('Bia', 'Engenharia reversa com o Power Architect'),
    ('Bia', '3811 - Modelagem de dados: Modelo físico'),
    ('Bia', 'O que é normalização?'),
    ('Igor', 'Qualidade de dados na Cloud'),
    ('Igor', 'Dicionário de Dados'),
    ('Igor', '3809 - Modelagem de dados: Modelo lógico'),
    ('Igor', 'Modelo lógico x Modelo físico'),
    ('Igor', 'O que é e para que serve a modelagem de dados?'),
    ('Allan', '3774 - TensorFlow Keras: Completando textos com redes LSTM'),
    ('Allan', '3773 - TensorFlow Keras: Classificando imagens com redes convolucionais'),
    ('Allan', 'Métricas de avaliação para clusterização'),
    ('Marcelo', 'CRAN, R forge e Git hub: Aonde encontrar meu pacote?'),
    ('Marcelo', 'Governança de dados em um Data Lake'),
    ('Marcelo', 'Séries temporais e suas aplicações'),
    ('Marcelo', 'Como a correlação é utilizada na prática'),
    ('Marcelo', 'Identação e boas práticas em medidas'),
    ('Marcelo', '3777 - Power BI: Construindo cálculos com Dax'),
    ('Marcelo', 'Power BI: DAX Cheat Sheet'),
    ('Marcelo', 'Tipos de dados no Power BI'),
    ('Marcelo', 'Como criar sua conta do Power BI (Colocar dentro do curso)'),
    ('Val', 'Boosting'),
    ('Val', '3765 - NLP: aprendendo processamento de linguagem natural'),
    ('Val', '3768 - Regressão: modelos boosting'),
    ('Mirla', 'Árvores para Classificação e Regressão'),
    ('Mirla', 'PLN: o que é Processamento de Linguagem Natural?'),
    ('Mirla', '3764 - Clusterização: lidando com dados sem rótulo'),
    ('Mirla', '3767 - Regressão: árvores de regressão'),
    ('Afonso', '3766 - Regressão Linear: técnicas avançadas de modelagem'),
    ('Afonso', 'Carreiras em Dados [2024-06-14]'),
    ('Afonso', 'Análise de Dados [2024-05-03]'),
    ('Ana Duarte', 'Importando uma planilha do Excel e tratando células mescladas'),
    ('Ana Duarte', 'Alinhamento da versão'),
    ('João', '9208 - Métricas de regressão'),
    ('João', '3769 - Regressão: Análise de Séries temporais'),
    ('João', 'Quais os algoritmos de clusterização e quando utilizar?'),
]
calendar_api.update_quarterly_calendars(quarter="2_Tri_2024", start_work_cycle="2024-04-01", instructors=instructors, priorities=priorities)