sert.assertTrue("Test3 - supposed to contain only zero bytes",
                isFilledWithZeros(testBufferArray, 0, 128 * 1024));
    }

    boolean isFilledWithZeros(byte[] byteArray, int start, int length) {
        for (int i = start; i < (start + length); i++) {
            if (byteArray[i] != 0) {
                return false;
            }
        }
        return true;
    }
}
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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.apache.avro.reflect;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;

import org.apache.avro.Schema;
import org.apache.avro.io.Decoder;
import org.apache.avro.io.DecoderFactory;
import org.apache.avro.io.Encoder;
import org.apache.avro.io.EncoderFactory;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

/**
 * https://issues.apache.org/jira/browse/AVRO-1851
 */
public class TestReflectDatumWithAnonymousInstances {
  private static Pojo pojo;

  @BeforeAll
  public static void init() {
    // 1. Anonymous instance
    pojo = new Pojo() {
      {
        // 2. Anonymous instance
        Person person = new Person() {
          {
            setAddress("Address");
          }
        };
        setPerson(person);
        // 3. Anonymous instance
        setTestEnum(TestEnum.V);
      }
    };
  }

  // Properly serializes and deserializes a POJO with an enum instance
  // (TestEnum#V)
  @Test
  void handleProperlyEnumInstances() throws IOException {
    byte[] output = serialize(pojo);
    Pojo deserializedPojo = deserialize(output);
    assertEquals(pojo, deserializedPojo);
    assertTrue(deserializedPojo.getTestEnum().is_V());
  }

  private Pojo deserialize(byte[] input) throws IOException {
    ByteArrayInputStream inputStream = new ByteArrayInputStream(input);
    Decoder decoder = DecoderFactory.get().binaryDecoder(inputStream, null);
    ReflectData reflectData = ReflectData.AllowNull.get();
    ReflectDatumReader<Pojo> reflectDatumReader = new ReflectDatumReader<>(reflectData);
    Schema schema = reflectData.getSchema(Pojo.class);
    reflectDatumReader.setSchema(schema);
    return reflectDatumReader.read(null, decoder);
  }

  private byte[] serialize(Pojo input) throws IOException {
    // Reflect data that supports nulls
    ReflectData reflectData = ReflectData.AllowNull.get();
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    Encoder encoder = EncoderFactory.get().binaryEncoder(outputStream, null);
    ReflectDatumWriter<Pojo> datumWriter = new ReflectDatumWriter<>(Pojo.class, reflectData);
    datumWriter.write(input, encoder);
    encoder.flush();
    return outputStream.toByteArray();
  }

  private static class Pojo {
    private TestEnum testEnum;
    private Person person;

    public TestEnum getTestEnum() {
      return testEnum


el }) => [2, 3].includes(level))
      )
    })

    it('complexTree', () => {
      const env: MarkdownEnv = {}

      md.render(complexTree[0], env)

      expect(env.headers).toEqual(
        complexTree[1].filter(({ level }) => [2, 3].includes(level))
      )
    })
  })
})
import {DeviceStrategy} from "./devicestrategy"

export class PopfigBrowser implements DeviceStrategy {
    readConfig(env:string,success: (config:any)=>void, error: (error:any)=>void): any{
        var fileName = "/config/popfig." + env+".json";
        var r = new XMLHttpRequest();
        r.open("GET", fileName,true);
        r.onload = ()=>{
            if (r.readyState != 4 || r.status != 200){
                return;
            }
            var config = JSON.parse(r.responseText);
            success(config);
        };
        r.onerror = ()=>{
            error(r.response);
        };
        r.send();
    }

    host(){
        return location.hostname;
    }
}import RankCtrl from "./RankCtrl";
import WXCore from "./WXCore";

const {ccclass, property} = cc._decorator;

@ccclass
export default class Self extends cc.Component {
    @property(cc.Label)     // 积分
    integral:cc.Label=null;
    @property(cc.Sprite)    // 用户头像
    userPic:cc.Sprite=null;
    @property(cc.Label)     // 用户昵称
    userName:cc.Label=null;
    @property(cc.Sprite)    // 奖牌节点
    medalNode:cc.Sprite = null;
    @property(cc.SpriteFrame)  // 第一名
    medalOne:cc.SpriteFrame = null;
    @property(cc.SpriteFrame)  // 第二名
    medalTwo:cc.SpriteFrame = null;
    @property(cc.SpriteFrame)  // 第三名
    medalThree:cc.SpriteFrame = null;
    @property(cc.SpriteFrame)  // 其他名次奖牌
    medalFour:cc.SpriteFrame = null;
    @property(cc.Label) // 其他名次
    place:cc.Label = null;

    private _data:object;
    get data():object{
        return this._data;
    }
    set data(v:object){
        if(this._data != v){
            this._data = v;
            this.refreshUI();
        }
    }
    // onLoad () {}

    start () {
        if(!this._isOnLoadCalled) return;
        console.log("自己的排行",this.data)
        RankCtrl.instance.on("getselfRankEvent", this.getselfRank, this);
        this.getselfRank();
    }

    private getselfRank(){
        this.data = RankCtrl.instance.getSelfRank();
        console.log("self",this.data)
    }

    private refreshUI(){
        this.integral.string = this.data["maxScore"] ? this.data["maxScore"] : 0;
        if(this.data["avatarUrl"]){
            this.userPic.spriteFrame= WXCore.createImage(this.data["avatarUrl"]);
        }
        this.userName.string = this.data["nickname"] ? this.data["nickname"] : "";
        this.place.string = this.data["rank"] ? this.data["rank"] : 0;

        if(this.data["rank"] == 1){
            this.med


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

  @$pb.TagNumber(1)
  $core.bool get overTempModemAsicFault => $_getBF(0);
  @$pb.TagNumber(1)
  set overTempModemAsicFault($core.bool v) { $_setBool(0, v); }
  @$pb.TagNumber(1)
  $core.bool hasOverTempModemAsicFault() => $_has(0);
  @$pb.TagNumber(1)
  void clearOverTempModemAsicFault() => clearField(1);

  @$pb.TagNumber(2)
  $core.bool get overTempPcbaFault => $_getBF(1);
  @$pb.TagNumber(2)
  set overTempPcbaFault($core.bool v) { $_setBool(1, v); }
  @$pb.TagNumber(2)
  $core.bool hasOverTempPcbaFault() => $_has(1);
  @$pb.TagNumber(2)
  void clearOverTempPcbaFault() => clearField(2);

  @$pb.TagNumber(3)
  $core.bool get dcVoltageFault => $_getBF(2);
  @$pb.TagNumber(3)
  set dcVoltageFault($core.bool v) { $_setBool(2, v); }
  @$pb.TagNumber(3)
  $core.bool hasDcVoltageFault() => $_has(2);
  @$pb.TagNumber(3)
  void clearDcVoltageFault() => clearField(3);
}

class TransceiverGetTelemetryRequest extends $pb.GeneratedMessage {
  factory TransceiverGetTelemetryRequest() => create();
  TransceiverGetTelemetryRequest._() : super();
  factory TransceiverGetTelemetryRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
  factory TransceiverGetTelemetryRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'TransceiverGetTelemetryRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'SpaceX.API.Device'), createEmptyInstance: create)
    ..hasRequiredFields = false
  ;

  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
  'Will be removed in next major version')
  TransceiverGetTelemetryRequest clone() => TransceiverGetTelemetryRequest()..mergeFromMessage(this);
  @$core.Deprecated(
  'Using this can add significant overhead to your binary. '
  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
  'Will be removed in next major version')
  TransceiverGetTelemetryRequest copyWith(void Function(TransceiverGetTelemetryRequest) updates) => super.copyWith((message) => updates(message as TransceiverGetTelemetryRequest)) as TransceiverGetTelemetryRequest;

  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static TransceiverGetTelemetryRequest create() => TransceiverGetTelemetryRequest._();
  TransceiverGetTelemetryRequest createEmptyInstance() =>


Screen

    // Define layout parameters
    const int estimated_label_height = 16; // Estimated height for the SSID label
    const int padding_qr_to_label = 5;     // Padding between QR code and SSID label
    const int screen_top_padding = 5;      // Padding at the top of the QR screen area
    const int screen_bottom_padding = 5;   // Padding at the bottom of the QR screen area

    // Calculate QR code size
    // qr_size = _height (total card height) - top_pad - bottom_pad - space_between_qr_label - label_height
    const int qr_size = _height - screen_top_padding - screen_bottom_padding - padding_qr_to_label - estimated_label_height;

    // Create a placeholder QR code (will be updated later)
    _qrCode = lv_qrcode_create(_qrScreen);
    lv_qrcode_set_size(_qrCode, qr_size);
    lv_qrcode_set_dark_color(_qrCode, lv_color_black());
    lv_qrcode_set_light_color(_qrCode, lv_color_white());
    // Align QR code to the top-center with padding
    lv_obj_align(_qrCode, LV_ALIGN_TOP_MID, 0, screen_top_padding);

    // Initialize with placeholder text
    lv_qrcode_update(_qrCode, "WIFI:T:WPA;", 10);

    // Create SSID label beneath the QR code
    _ssidLabel = lv_label_create(_qrScreen);
    lv_obj_set_style_text_font(_ssidLabel, Style::valueFont(), 0);
    lv_obj_set_style_text_color(_ssidLabel, Style::valueColor(), 0);
    lv_obj_set_width(_ssidLabel, LV_PCT(100)); // Set label width to fill screen width
    lv_obj_set_style_text_align(_ssidLabel, LV_TEXT_ALIGN_CENTER, 0); // Center text within the label

    // Set initial SSID text - will be updated by showQRCode if/when called
    const String& currentSsid = _wifiInterface.getSSID();
    lv_label_set_text(_ssidLabel, ("SSID: " + currentSsid).c_str());
    lv_obj_align_to(_ssidLabel, _qrCode, LV_ALIGN_OUT_BOTTOM_MID, 0, padding_qr_to_label); // 5px padding below QR code
}

void ProvisioningCard::createStatusScreen() {
    lv_obj_set_style_bg_color(_statusScreen, Style::backgroundColor(), 0);
    lv_obj_set_style_pad_all(_statusScreen, 0, 0);
    lv_obj_set_style_border_width(_statusScreen, 0, 0);

    // Create container for status items
    lv_obj_t* table = lv_obj_create(_statusScreen);
    lv_obj_set_size(table, LV_PCT(100), LV_SIZE_CONTENT); // Width 100%, height adjusts to content
    lv_obj_set_style_pad_hor(table, 5, 0);  // 5px horizontal padding for the table itself
    lv_obj_set_style_pad_ver(table, 5, 0);  // Add some vertical padding for the table itself
    lv_obj_set_style_border_width(table, 0, 0);
    lv_obj_set_style_bg_opa(table, 0, 0); // Make table background transparent

    // Configure Flexbox layout for the table (parent of rows)
    lv_obj_set_layout(table, LV_LAYOUT_FLEX); // Enable Flexbox
    lv_obj_set_flex_flow(table, LV_FLEX_FLOW_COLUMN); // Arrange children (rows) in a column
    lv_obj_set_flex_align(table, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_START); // Main-axis, Cross-axis, Track-cross-axis alignment
    lv_obj_set_style_pad_row(table, 3, 0); // Spacing between rows (flex items)

    // Create rows with titl


�员黄桂林、赵克光、陈加尤等都参与杀人，吊打人，马承干更凶，还常用弹弓把文德坚当活靶来打，不是打头就是打身，把文都打怕了（谭瑞国揭）

   煤矿与砖厂合并时，黎焕堂被打死，刘绍全、黎旭生等被吊打致伤致残。现在却把责任推给已死的韦启韬，难道当时的煤矿领导何权和韦美元没有责任？又：原工业局长零映春、秘书廖伯芳被杀，应追究黎龙熙、杨党林、李连明、黄若芬杀人罪。（同上）

   财税局所有被揪斗、被杀的人，都是黄海波一手策划的，我被批斗、捆打时，是黄海波主持会议。斗吊陆光春时，也是黄海波主持。（水泥厂林育才揭）

   财税局“四清”后是黄海波、翁清林、刘达芳掌权。全局职工70多人“文革”中仅被害死的就有12人。他们3人是推卸不了罪责的。有一天，黄海波斗甘志贤打电话找周朝德回来，第二天周回来后，不知是谁叫他回拿琴公社，周到那琴不几天就被杀了。（财税组同志揭发）。

   昌墩供销社黎利国，据说是被刘光用石头砸死的。凌宣德当时是思阳公社财贸支书，他最清楚内情。（供销社组黄光宪提）

   县银行批斗农有勤时，陆舞发、韩忠玲用铁丝进行绑吊，伍品重、颜富益等人也参予吊打。韦群、罗积才被杀与上面几个人有关。（同上）

   要揭思阳公社的盖子，还要找黄卓南。他在“文革”中是王召腾陆巨吉的得力打手和心腹。（供销社梁青连揭）

   阮本华是原商业局斗打老干部的女干，斗陆英心时她去踢陆的下阴，黄菊芳是她奉命送去被人打死的。（商业一组揭）

   “二


is available in this transaction
    db.flush()

    season_stats = analytics_service.update_player_season_stats(sample_player.id, datetime.now().year)

    assert season_stats is not None
    assert season_stats.player_id == sample_player.id
    assert season_stats.games_played == 10
    assert season_stats.ppg > 0
    assert season_stats.rpg > 0
    assert season_stats.apg > 0
    assert season_stats.fantasy_ppg > 0
    assert season_stats.per > 0
    assert season_stats.true_shooting_percentage > 0

def test_update_player_trends(db: Session, sample_player, sample_games_and_stats):
    """Test updating player trends."""
    analytics_service = AnalyticsService(db)

    # Flush to ensure all data is available in this transaction
    db.flush()

    trends = analytics_service.update_player_trends(sample_player.id)

    assert trends is not None
    assert trends.player_id == sample_player.id
    assert trends.last_5_games_ppg > 0
    assert trends.last_10_games_ppg > 0
    assert trends.last_5_games_fantasy > 0

def test_project_fantasy_points(db: Session, sample_player, sample_team, sample_games_and_stats):
    """Test fantasy point projection."""
    analytics_service = AnalyticsService(db)

    # Flush to ensure all data is available in this transaction
    db.flush()

    # First calculate season stats
    analytics_service.update_player_season_stats(sample_player.id, datetime.now().year)

    projection = analytics_service.project_fantasy_points(sample_player.id, sample_team.id)

    assert projection > 0
    # Projection should be reasonable based on the sample data
    assert 20 < projection < 60

def test_analytics_api_endpoints(client, db: Session, sample_player, sample_games_and_stats):
    """Test analytics API endpoints."""
    # Flush to ensure all data is available in this transaction
    db.flush()

    # Test get player analytics
    response = client.get(f"/api/v1/players/{sample_player.id}/analytics")
    assert response.status_code == 200
    data = response.json()
    assert data['player_id'] == sample_player.id
    assert data['ppg'] > 0

    # Test get player trends
    response = client.get(f"/api/v1/players/{sample_player.id}/trends")
    assert response.status_code == 200
    data = response.json()
    assert data['player_id'] == sample_player.id
    assert 'last_5_games_ppg' in data

    # Test trigger calculation
    response = client.post(f"/api/v1/analytics/calculate?player_id={sample_player.id}")
    assert response.status_code == 200


sthttp.MethodOptions, path.url, ctx)
		if h == nil {
			t.Error("Path (method: OPTIONS) is not registered in internal router")
		}
	}

	// Check if the mutable is disable when adds a new path with the same url of another already added
	for i := range paths {
		p := paths[i]

		r.mutable(true)

		err := catchPanic(func() {
			r.handlePath(p)
		})

		if err == nil {
			t.Errorf("(Method: %s) Panic expected, Mutable must be disabled", p.method)
		}
	}
}

func TestRouter_NewGroupPath(t *testing.T) {
	r := testRouter()
	g := r.NewGroupPath("/fast")

	if g.parent != r {
		t.Errorf("Group router parent == '%p', want %p", g.parent, r)
	}

	if g.prefix != "/fast" {
		t.Errorf("Group router prefix == '%s', want '%s'", g.prefix, "/fast")
	}

	if g.router == nil {
		t.Error("Group router instance is nil")
	}

	if g.routerMutable != r.routerMutable {
		t.Errorf("Group router routerMutable == '%v', want '%v'", g.routerMutable, r.routerMutable)
	}

	if !isEqual(g.errorView, r.errorView) {
		t.Errorf("Group router errorView == '%p', want '%p'", g.errorView, r.errorView)
	}

	if g.handleOPTIONS != r.handleOPTIONS {
		t.Errorf("Group router handleOPTIONS == '%v', want '%v'", g.handleOPTIONS, r.handleOPTIONS)
	}
}

func TestRouter_ListPaths(t *testing.T) {
	server := New(testConfig)

	server.Path("GET", "/foo", func(_ *RequestCtx) error { return nil })
	server.Path("GET", "/bar", func(_ *RequestCtx) error { return nil })

	static := server.NewGroupPath("/static")
	static.Static("/buzz", "./docs")

	if !reflect.DeepEqual(server.ListPaths(), server.router.List()) {
		t.Errorf("Router.List() == %v, want %v", server.ListPaths(), server.router.List())
	}
}

func TestRouter_Middlewares(t *testing.T) {
	r := testRouter()
	r.Middlewares(Middlewares{Before: middlewareFns, After: middlewareFns, Skip: middlewareFns})

	if len(r.middlewares.Before) != len(middlewareFns) {
		t.Errorf("Before middlewares are not registered")
	}

	if len(r.middlewares.After) != len(middlewareFns) {
		t.Errorf("After middlewares are not registered")
	}

	if len(r.middlewares.Skip) != len(middlewareFns) {
		t.Errorf("Skip middlewares are not registered")
	}
}

func TestRouter_UseBefore(t *testing.T) {
	r := testRouter()
	r.UseBefore(middlewareFns...)

	if len(r.middlewares.Before) != len(middlewareFns) {
		t.Errorf("Before middlewares are not registered")
	}
}

func TestRouter_UseAfter(t *testing.T) {
	r := testRouter()
	r.UseAfter(middlewareFns...)

	if len(r.middlewares.After) != len(middlewareFns) {
		t.Errorf("After middlewares are not registered")
	}
}

func TestRouter_SkipMiddlewares(t *testing.T) {
	r := testRouter()
	r.SkipMiddlewares(middlewareFns...)

	if len(r.middlewares.Skip) != len(middlewareFns) {
		t.Errorf("Before middlewares are not registered")
	}
}

func TestRouter_Path_Shortcuts(t *testing.T) { //nolint:funlen
	path := "/"
	viewFn := func(_ *RequestCtx) error


-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
	border: 1px solid #999;
	}

/* div icon */

.leaflet-div-icon {
	background: #fff;
	border: 1px solid #666;
	}

/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
	position: absolute;
	padding: 6px;
	background-color: #fff;
	border: 1px solid #fff;
	border-radius: 3px;
	color: #222;
	white-space: nowrap;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	pointer-events: none;
	box-shadow: 0 1px 3px rgba(0,0,0,0.4);
	}
.leaflet-tooltip.leaflet-clickable {
	cursor: pointer;
	pointer-events: auto;
	}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	position: absolute;
	pointer-events: none;
	border: 6px solid transparent;
	background: transparent;
	content: "";
	}

/* Directions */

.leaflet-tooltip-bottom {
	margin-top: 6px;
}
.leaflet-tooltip-top {
	margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
	left: 50%;
	margin-left: -6px;
	}
.leaflet-tooltip-top:before {
	bottom: 0;
	margin-bottom: -12px;
	border-top-color: #fff;
	}
.leaflet-tooltip-bottom:before {
	top: 0;
	margin-top: -12px;
	margin-left: -6px;
	border-bottom-color: #fff;
	}
.leaflet-tooltip-left {
	margin-left: -6px;
}
.leaflet-tooltip-right {
	margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	top: 50%;
	margin-top: -6px;
	}
.leaflet-tooltip-left:before {
	right: 0;
	margin-right: -12px;
	border-left-color: #fff;
	}
.leaflet-tooltip-right:before {
	left: 0;
	margin-left: -12px;
	border-right-color: #fff;
	}
.leaflet-control-fullscreen a {
  background:#fff url(css/fullscreen.png) no-repeat 0 0;
  background-size:26px 52px;
  }
  .leaflet-touch .leaflet-control-fullscreen a {
    background-position: 2px 2px;
    }
  .leaflet-fullscreen-on .leaflet-control-fullscreen a {
    background-position:0 -26px;
    }
  .leaflet-touch.leaflet-fullscreen-on .leaflet-control-fullscreen a {
    background-position: 2px -24px;
    }

/* Do not combine these two rules; IE will break. */
.leaflet-container:-webkit-full-screen {
  width:100%!important;
  height:100%!important;
  }
.leaflet-container.leaflet-fullscreen-on {
  width:100%!important;
  height:100%!important;
  }

.leaflet-pseudo-fullscreen {
  position:fixed!important;
  width:100%!important;
  height:100%!important;
  top:0!important;
  left:0!important;


0x04,0x02,0x00]

v_cmpx_f_i16_e64 s[10:11], flat_scratch_hi, v2
// CHECK: [0x0a,0x00,0xb0,0xd0,0x67,0x04,0x02,0x00]

v_cmpx_f_i16_e64 s[10:11], vcc_lo, v2
// CHECK: [0x0a,0x00,0xb0,0xd0,0x6a,0x04,0x02,0x00]

v_cmpx_f_i16_e64 s[10:11], vcc_hi, v2
// CHECK: [0x0a,0x00,0xb0,0xd0,0x6b,0x04,0x02,0x00]

v_cmpx_f_i16_e64 s[10:11], m0, v2
// CHECK: [0x0a,0x00,0xb0,0xd0,0x7c,0x04,0x02,0x00]

v_cmpx_f_i16_e64 s[10:11], exec_lo, v2
// CHECK: [0x0a,0x00,0xb0,0xd0,0x7e,0x04,0x02,0x00]

v_cmpx_f_i16_e64 s[10:11], exec_hi, v2
// CHECK: [0x0a,0x00,0xb0,0xd0,0x7f,0x04,0x02,0x00]

v_cmpx_f_i16_e64 s[10:11], 0, v2
// CHECK: [0x0a,0x00,0xb0,0xd0,0x80,0x04,0x02,0x00]

v_cmpx_f_i16_e64 s[10:11], -1, v2
// CHECK: [0x0a,0x00,0xb0,0xd0,0xc1,0x04,0x02,0x00]

v_cmpx_f_i16_e64 s[10:11], 0.5, v2
// CHECK: [0x0a,0x00,0xb0,0xd0,0xf0,0x04,0x02,0x00]

v_cmpx_f_i16_e64 s[10:11], -4.0, v2
// CHECK: [0x0a,0x00,0xb0,0xd0,0xf7,0x04,0x02,0x00]

v_cmpx_f_i16_e64 s[10:11], v1, v255
// CHECK: [0x0a,0x00,0xb0,0xd0,0x01,0xff,0x03,0x00]

v_cmpx_f_i16_e64 s[10:11], v1, s2
// CHECK: [0x0a,0x00,0xb0,0xd0,0x01,0x05,0x00,0x00]

v_cmpx_f_i16_e64 s[10:11], v1, s101
// CHECK: [0x0a,0x00,0xb0,0xd0,0x01,0xcb,0x00,0x00]

v_cmpx_f_i16_e64 s[10:11], v1, flat_scratch_lo
// CHECK: [0x0a,0x00,0xb0,0xd0,0x01,0xcd,0x00,0x00]

v_cmpx_f_i16_e64 s[10:11], v1, flat_scratch_hi
// CHECK: [0x0a,0x00,0xb0,0xd0,0x01,0xcf,0x00,0x00]

v_cmpx_f_i16_e64 s[10:11], v1, vcc_lo
//


tart()
    }
}package org.ninetripods.lib_bytecode.asm.treeApi

import org.ninetripods.lib_bytecode.BConstant
import org.objectweb.asm.ClassReader
import org.objectweb.asm.tree.ClassNode

/**
 * ASM Tree API
 * blog: https://juejin.cn/post/6844904118700474375
 * 优缺点：
 * 1、优点：处理简单类时修改比较简单，改动较少
 * 2、缺点：不适合处理复杂逻辑，代码复用困难
 */
object ATreeMethodCost {

    fun processByTreeApi(bytes: ByteArray) {
        val classNode = ClassNode(BConstant.ASM9)
        val classReader = ClassReader(bytes)
        classReader.accept(classNode, ClassReader.EXPAND_FRAMES)

        //遍历field
//        classNode.fields.forEach { field ->
//            println(field.name + "," + field.desc)
//            field.access = Opcodes.ACC_PUBLIC
//        }
//        //生成字段，相当于 public static int xmkp = 10
//        val fieldNode = FieldNode(Opcodes.ACC_PUBLIC or Opcodes.ACC_STATIC, "xmkp", "I", null, 10)
//        classNode.fields.add(fieldNode)
//
//        //遍历method
//        classNode.methods.forEach { methodNode ->
//            //instructions表示操作码列表
//            methodNode.instructions.forEach {
//                if (it.opcode == Opcodes.SIPUSH && (it as IntInsnNode).operand == 16) {
//
//                }
//            }
//        }

    }

//    private fun notMatchBlackList(className: String): Boolean {
//        for (blackMethodName in ExtUtil.methodExt.normalMethod.blackMethods) {
//            if (className.contains(blackMethodName)) return false
//        }
//        return true
//    }
}package org.ninetripods.lib_bytecode.asm.demo

import org.objectweb.asm.*

/**
 * use[#org.ninetripods.mq.study.customView.alipayView.AlipayView]
find class: AlipayView.class
visit(52,4128,org/ninetripods/mq/study/customView/alipayView/AlipayView$1:java/lang/Object,null,[Ljava.lang.String;@4ab48b2b)
visitSource(AlipayView.java, null)
visitOuterClass(org/ninetripods/mq/study/customView/alipayView/AlipayView, null, null)
visitInnerClass(org/ninetripods/mq/study/customView/alipayView/AlipayView$1, null, null, 4104)
visitInnerClass(org/ninetripods/mq/study/customView/alipayView/AlipayView$State, org/ninetripods/mq/study/customView/alipayView/AlipayView, State, 16408)
visitField(4120,$SwitchMap$org$ninetripods$mq$study$customView$alipayView$AlipayView$State, [I, null, null)
visitMethod(8, <clinit>, ()V, null, null)
CustomMethodVisitor: visitInsn opcode 190
CustomMethodVisitor: visitInsn opcode 4
CustomMethodVisitor: visitInsn opcode 79
CustomMethodVisitor: visitInsn opcode 5
CustomMethodVisitor: visitInsn opcode 79
CustomMethodVisitor: visitInsn opcode 6
CustomMethodVisitor: visitInsn opcode 79
CustomMethodVisitor: visitInsn opcode 177
visitEnd()
 */
class AClassVisitor(api: Int, classVisitor: ClassVisitor? = null) :
    ClassVisitor(api, classVisitor) {

    /**
     * 如：visit(52,4128,org/ninetripods/mq/study/customView/alipayView/AlipayView$1:java/lang/Object,null,[Ljava.lang.String;@4ab48b


.Node V(Arc arc)
    {
        var pos = GetEdge((int)arc.Id);
        return ToNode(Graph.Nodes[pos.TargetId]);
    }

    ///<inheritdoc/>
    public Dictionary<string, object>? GetArcProperties(Arc arc)
    {
        var e = GetEdge((int)arc.Id);
        if(e.Properties is Dictionary<string,object> p)
            return p


 paragraph.createLine(paragraphStart, paragraphEnd)
            writeLineText(builder, line)
            writeMirrorsText(builder, line)
        } finally {
            line?.dispose()
        }

        builder.append("\n")
    }

    private fun writeRunText(builder: SpannableStringBuilder, run: BidiRun, index: Int) {
        val runStart = run.charStart
        val runEnd = run.charEnd
        val runLength = runEnd - runStart
        val runText = (if (run.isRightToLeft) RLI else LRI).toString() + bidiText.substring(runStart, runEnd) + PDI

        builder.append("Run $index\n", spansSecondHeading())
        builder.append("Run Text:", spansInlineHeading())
        builder.append(" “$runText”\n")
        builder.append("Run Range:", spansInlineHeading())
        builder.append(" Start=$runStart Length=$runLength\n")
        builder.append("Embedding Level:", spansInlineHeading())
        builder.append(" ${run.embeddingLevel}\n\n")
    }

    private fun writeLineText(builder: SpannableStringBuilder, line: BidiLine) {
        val visualMap = SparseIntArray()

        var counter = 1
        for (bidiRun in line.visualRuns) {
            visualMap.put(bidiRun.charStart, counter)
            counter++
        }

        val runCount = visualMap.size()
        if (runCount > 0) {
            builder.append("Visual Order\n", spansSecondHeading())

            for (i in 0 until runCount) {
                val runIndex = visualMap.valueAt(i)
                builder.append("<Run $runIndex>", spansInlineHeading())
                builder.append(" ")
            }

            builder.append("\n\n")
        }
    }

    private fun writeMirrorsText(builder: SpannableStringBuilder, line: BidiLine) {
        var wroteHeading = false

        for (bidiPair in line.mirroringPairs) {
            if (!wroteHeading) {
                wroteHeading = true
                builder.append("Mirrors\n", spansSecondHeading())
            }

            builder.append("*", spansInlineHeading())
            builder.append(" Index=" + bidiPair.charIndex)
            builder.append(
                " Character=‘" + String(Character.toChars(bidiPair.actualCodePoint)) + "’"
            )
            builder.append(
                builder, " Mirror=‘${String(Character.toChars(bidiPair.pairingCodePoint))}’\n"
            )
        }

        if (wroteHeading) {
            builder.append("\n")
        }
    }

    override fun onSupportNavigateUp(): Boolean {
        onBackPressed()
        return true
    }

    companion object {
        const val BIDI_TEXT = "bidi_text"

        private const val LRI = '\u2066'
        private const val RLI = '\u2067'
        private const val PDI = '\u2069'
    }
}
package net.tjado.usbgadget

import android.util.Log as ALog

class Log {
    fun interface OnLogChangeListener {
        fun onLogChanged()
    }

    fun setOnDataChangeListener(onLogChangeListener: OnLogChangeListener?) {
        Log.onLogChangeListener = onLogChangeListener
    }

    companion object {
        private var log = StringBuffer()
        var onLogChangeListener: OnLogChangeListener? = null

        // error
        fun e(tag: String, msg: String) {
            ALog.e(tag, msg)
            internalLog(tag, msg)
        }

        fun e(tag: String, msg: String, t: Throwable?) {
            ALog.e(tag, msg, t)
            internalLog(tag, msg, t)
        }

        // debug
        fun d(tag: String, msg: String) {
            ALog.d(tag, msg)
            internalLog(tag, msg)
        }

        fun d(tag: String, msg: String, t: Throwable?) {
            ALog.d(tag, msg, t)
            internalLog(tag, msg, t)
        }

        //


github.truenine.composeserver.domain

/**
 * 策略模式基础接口
 *
 * @param <T> 选择类型
 * @author TrueNine
 * @since 2022-12-11 </T>
 */
@Deprecated("多此一举，当作范例", level = DeprecationLevel.ERROR)
interface IChoose<T> {
  /**
   * 查找第一个符合判断条件的类型
   *
   * @param chooses 策略组
   * @param type 类型
   * @param <R> 实现类
   * @return 实现 </R>
   */
  @Suppress("UNCHECKED_CAST", "DEPRECATION_ERROR")
  fun <R> firstOrNull(chooses: List<IChoose<T>>, type: T): R? {
    return chooses.firstOrNull { it.choose(type) } as? R?
  }

  /**
   * 获取一组实现
   *
   * @param chooses 被选择服务
   * @param type 选择类型
   * @param <R> 实现类
   * @return 选中的一组服务 </R>
   */
  @Suppress("UNCHECKED_CAST", "DEPRECATION_ERROR")
  fun <R> all(chooses: List<IChoose<T>>, type: T): List<R> {
    return chooses.filter { ele -> ele.choose(type) }.map { r: IChoose<T>? -> r as R }
  }

  /**
   * 类型判断
   *
   * @param type 类型
   * @return 是否为当前类型
   */
  fun choose(type: T): Boolean
}
package io.github.truenine.composeserver.consts

/**
 * 缓存 key 命名空间
 *
 * @author TrueNine
 * @since 2023-01-01
 */
interface ICacheNames {
  interface IRedis {
    companion object {
      const val HANDLE: String = "JsonStringRedisTemplateYan100Handle"
      const val CACHE_MANAGER: String = "JsonStringRedisTemplateYan100CacheManager"
    }
  }

  interface ICaffeine {
    companion object {
      const val HANDLE: String = "JavaCaffeineTemplateYan100Handle"
      const val CACHE_MANAGER: String = "JavaCaffeineTemplateYan100CacheManager"
    }
  }

  companion object {
    const val M1: String = "durational_cache_duration_1m"
    const val M5: String = "durational_cache_duration_5m"
    const val M10: String = "durational_cache_duration_10m"
    const val M30: String = "durational_cache_duration_30m"

    const val H1: String = "durational_cache_duration_1h"
    const val H2: String = "durational_cache_duration_2h"
    const val H3: String = "durational_cache_duration_3h"

    const val D1: String = "durational_cache_duration_1d"
    const val D2: String = "durational_cache_duration_2d"
    const val D3: String = "durational_cache_duration_3d"
    const val D7: String = "durational_cache_duration_7d"

    const val D30: String = "durational_cache_duration_30d"
    const val D60: String = "durational_cache_duration_60d"
    const val D180: String = "durational_cache_duration_180d"
    const val D365: String = "durational_cache_duration_365d"

    const val FOREVER: String = "durational_cache_duration_fo"

    const val W1: String = D7
    const val MO1: String = D30
    const val Y1: String = D365

    val ALL: Array<String> = arrayOf(M1, M5, M10, M30, H1, H2, H3, D1, D2, D3, D7, D30, D60, D180, D365, FOREVER)
  }
}
package io.github.truenine.composeserver.holders.optimization

import io.github.truenine.composeserver.logger
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.locks.ReentrantReadWriteLock
import kotlin.concurrent.read
import kotlin.concurrent.write

/**
 * Performance optimization utilities for ResourceHolder operations.
 *
 * This class provides various optimization techniques:
 * - String interning for common patterns
 * - Path normalization caching
 * - Resource metadata caching
 * - Memory-efficient operations
 *
 * @author TrueNine
 * @since 2024-07-18
 */
object


stem firmware integrity.\",\"d3f:ref-count\":{\"@type\":\"http://www.w3.org/2001/XMLSchema#integer\",\"@value\":\"2\"},\"rdfs:label\":\"System Firmware Verification\"}],\"d3f:d3fend-id\":\"D3-FV\",\"d3f:definition\":\"Cryptographically verifying firmware integrity.\",\"d3f:ref-count\":{\"@type\":\"http://www.w3.org/2001/XMLSchema#integer\",\"@value\":\"3\"},\"rdfs:label\":\"Firmware Verification\"},{\"@id\":\"d3f:OperatingSystemMonitoring\",\"children\":[{\"@id\":\"d3f:EndpointHealthBeacon\",\"d3f:d3fend-id\":\"D3-EHB\",\"d3f:definition\":\"Monitoring the security status of an endpoint by sending periodic messages with health status, where absence of a response may indicate that the endpoint has been compromised.\",\"d3f:ref-count\":{\"@type\":\"http://www.w3.org/2001/XMLSchema#integer\",\"@value\":\"1\"},\"rdfs:label\":\"Endpoint Health Beacon\"},{\"@id\":\"d3f:InputDeviceAnalysis\",\"d3f:d3fend-id\":\"D3-IDA\",\"d3f:definition\":\"Operating system level mechanisms to prevent abusive input device exploitation.\",\"d3f:ref-count\":{\"@type\":\"http://www.w3.org/2001/XMLSchema#integer\",\"@value\":\"2\"},\"rdfs:label\":\"Input Device Analysis\"},{\"@id\":\"d3f:MemoryBoundaryTracking\",\"d3f:d3fend-id\":\"D3-MBT\",\"d3f:definition\":\"Analyzing a call stack for return addresses which point to unexpected  memory locations.\",\"d3f:ref-count\":{\"@type\":\"http://www.w3.org/2001/XMLSchema#integer\",\"@value\":\"1\"},\"rdfs:label\":\"Memory Boundary Tracking\"},{\"@id\":\"d3f:ScheduledJobAnalysis\",\"d3f:d3fend-id\":\"D3-SJA\",\"d3f:definition\":\"Analysis of source files, processes, destination files, or destination servers associated with a scheduled job to detect unauthorized use of job scheduling.\",\"d3f:ref-count\":{\"@type\":\"http://www.w3.org/2001/XMLSchema#integer\",\"@value\":\"3\"},\"rdfs:label\":\"Scheduled Job Analysis\"},{\"@id\":\"d3f:SystemDaemonMonitoring\",\"d3f:d3fend-id\":\"D3-SDM\",\"d3f:definition\":\"Tracking changes to the state or configuration of critical system level processes.\",\"d3f:ref-count\":{\"@type\":\"http://www.w3.org/2001/XMLSchema#integer\",\"@value\":\"3\"},\"rdfs:label\":\"System Daemon Monitoring\"},{\"@id\":\"d3f:SystemFileAnalysis\",\"children\":[{\"@id\":\"d3f:ServiceBinaryVerification\",\"d3f:d3fend-id\":\"D3-SBV\",\"d3f:definition\":\"Analyzing changes in service binary files by comparing to a source of truth.\",\"d3f:ref-count\":{\"@type\":\"http://www.w3.org/2001/XMLSchema#integer\",\"@value\":\"1\"},\"rdfs:label\":\"Service Binary Verification\"}],\"d3f:d3fend-id\":\"D3-SFA\",\"d3f:definition\":\"Monitoring system files such as authentication databases, configuration files, system logs, and system executables for modification or tampering.\",\"d3f:ref-count\":{\"@type\":\"http://www.w3.org/2001/XMLSchema#integer\",\"@value\":\"3\"},\"rdfs:label\":\"System File Analysis\"},{\"@id\":\"d3f:SystemInitConfigAnalysis


,    0,    0,    0,    0,    0,    0,    0,    0,
           0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    ];
}
#[cfg(test)]
mod tests_227 {
    use crate::GF227;
    use crate::prime_field::*;

    #[test]
    fn gf227() {
        let zero = GF227::zero;
        let one = GF227::one;
        for x in GF227::elts() {
            assert_eq!(x, x);
            assert_eq!(zero + x, x);
            assert_ne!(one + x, x);
            assert_eq!(x - x, zero);
        }
        for x in GF227::elts() {
            for y in GF227::elts() {
                assert_eq!(x + y, y + x);
                assert_eq!(x * y, y * x);
                assert_eq!(x - y, - (y - x));
            }
        }
        for x in GF227::elts() {
            assert_eq!(x / x, one);
        }
        let mut x = zero;
        for i in 0..228 {
            assert_eq!(x, PrimeFieldElt::from(i % 227));
            x = x + one;
        }
        for i in 0..227 {
            for j in 0..227 {
                if i != j {
                  assert_ne!(PrimeFieldElt::<GF227>::from(i), PrimeFieldElt::from(j));
                }
            }
        }
    }
}

#[derive(Clone, Copy, Debug)]
pub struct GF229 {}
impl PrimeField for GF229 {
    const CHARACTERISTIC : u8 = 229;
    const DIVISION_TABLE : [u8; 256] = [
           0,    1,  115,  153,  172,   46,  191,  131,   86,   51,   23,  125,  210,  141,  180,  168,
          43,   27,  140,  217,  126,  120,  177,   10,  105,   55,  185,   17,   90,   79,   84,  133,
         136,  118,  128,   72,   70,  130,  223,   47,   63,  162,   60,   16,  203,   56,    5,   39,
         167,  215,  142,    9,  207,  121,  123,   25,   45,  225,  154,   66,   42,  214,  181,   40,
          68,   74,   59,  188,   64,  156,   36,  100,   35,  160,   65,  171,  226,  116,  138,   29,
         146,   82,   81,  149,   30,   97,    8,  179,  216,  211,   28,  151,  117,  197,  134,  135,
         198,   85,  222,  192,   71,  195,  119,  209,  218,   24,  175,  122,  176,  208,  127,  196,
         137,  152,  227,    2,   77,   92,   33,  102,   21,   53,  107,   54,  205,   11,   20,  110,
          34,  158,   37,    7,  144,   31,   94,   95,   32,  112,   78,  201,   18,   13,   50,  221,
         132,  199,   80,  148,  147,   83,  200,   91,  113,    3,   58,  164,   69,  194,  129,  193,
          73,  165,   41,  170,  155,  161,  189,   48,   15,  187,


y(config);
    q.add("f", "f1");
    assertEquals(0, searcher.count(q));

    IOUtils.close(taxoReader, reader, writer, dir, taxoDir);
  }

  public void testDrillDownTermsDefaultWithHierarchicalSetting() throws Exception {
    Directory dir = newDirectory();
    RandomIndexWriter writer =
        new RandomIndexWriter(
            random(),
            dir,
            newIndexWriterConfig(new MockAnalyzer(random(), MockTokenizer.KEYWORD, false)));
    Directory taxoDir = newDirectory();
    TaxonomyWriter taxoWriter = new DirectoryTaxonomyWriter(taxoDir);
    FacetsConfig config = new FacetsConfig();
    config.setHierarchical("a", true);

    Document doc = new Document();
    doc.add(new FacetField("a", "1", "2", "3"));
    doc.add(new FacetField("b", "4"));
    writer.addDocument(config.build(taxoWriter, doc));
    taxoWriter.close();

    IndexReader reader = writer.getReader();
    DirectoryTaxonomyReader taxoReader = new DirectoryTaxonomyReader(taxoDir);
    IndexSearcher searcher = newSearcher(reader);

    DrillDownQuery q = new DrillDownQuery(config);
    q.add("a");
    assertEquals(1, searcher.count(q));

    q = new DrillDownQuery(config);
    q.add("a", "1");
    assertEquals(1, searcher.count(q));

    q = new DrillDownQuery(config);
    q.add("a", "1", "2");
    assertEquals(1, searcher.count(q));

    q = new DrillDownQuery(config);
    q.add("a", "1", "2", "3");
    assertEquals(1, searcher.count(q));

    q = new DrillDownQuery(config);
    q.add("b");
    assertEquals(1, searcher.count(q));

    q = new DrillDownQuery(config);
    q.add("b", "4");
    assertEquals(1, searcher.count(q));

    IOUtils.close(taxoReader, reader, writer, dir, taxoDir);
  }

  public void testGetDrillDownQueries() throws Exception {
    DrillDownQuery q = new DrillDownQuery(config);
    q.add("a", "1");
    q.add("b", "1");

    Query[] drillDownQueries = q.getDrillDownQueries();
    Query[] drillDownQueriesCopy = q.getDrillDownQueries();

    assert Arrays.equals(drillDownQueries, drillDownQueriesCopy);

    q.add("c", "1");
    q.add("a", "2");
    q.add("a", "3");
    Query[] drillDownQueriesModified = q.getDrillDownQueries();
    Query[] drillDownQueriesModifiedCopy = q.getDrillDownQueries();

    // the cached builtDimQueries object is now stale
    assert Arrays.equals(drillDownQueriesModified, drillDownQueriesCopy) == false;
    assert Arrays.equals(drillDownQueriesModified, drillDownQueriesModifiedCopy);
  }
}
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you 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
 *


import discord
from discord.ext import commands
import requests

# Variables
version = "2.6.4"
emico = "https://media.discordapp.net/attachments/1179492325957840926/1190400494699552928/IMG_1124.png?ex=65a1a9da&is=658f34da&hm=cf80c472c2fb38010a58d69c13056a714134bdd590ed9e885a4af64b68126b83&=&format=webp&quality=lossless&width=640&height=662"
name = "Henri's bot"

class meme(commands.Cog):
    def __init__(self, bot):
        self.bot = bot

    @commands.command(name="meme", help="random meme")
    async def meme(self, ctx):
        response = requests.get("https://meme-api.com/gimme")
        data = response.json()

        memeUrl = data["url"]
        memeName = data["title"]
        memePoster = data["author"]
        memeSub = data["subreddit"]
        memeLink = data["postLink"]

        em = discord.Embed(title=memeName, color=discord.colour.Color.yellow())
        em.set_image(url=memeUrl)
        em.set_footer(
            text=f"Created by: {memePoster}, subreddit: {memeSub}, post: {memeLink}")
        await ctx.send(embed=em)

async def setup(bot):
    await bot.add_cog(meme(bot))


Sto16Ux4:
		case Iop_QandQSarNnarrow64Sto32Ux2:
		case Iop_QandQRShrNnarrow16Uto8Ux8:
		case Iop_QandQRShrNnarrow32Uto16Ux4:
		case Iop_QandQRShrNnarrow64Uto32Ux2:
		case Iop_QandQRSarNnarrow16Sto8Sx8:
		case Iop_QandQRSarNnarrow32Sto16Sx4:
		case Iop_QandQRSarNnarrow64Sto32Sx2:
		case Iop_QandQRSarNnarrow16Sto8Ux8:
		case Iop_QandQRSarNnarrow32Sto16Ux4:
		case Iop_QandQRSarNnarrow64Sto32Ux2:
			return BINARY(Ity_V128, Ity_I8, Ity_V128);

		case Iop_F32ToFixed32Ux4_RZ:
		case Iop_F32ToFixed32Sx4_RZ:
		case Iop_Fixed32UToF32x4_RN:
		case Iop_Fixed32SToF32x4_RN:
			return BINARY(Ity_V128, Ity_I8, Ity_V128);

		case Iop_F32ToFixed32Ux2_RZ:
		case Iop_F32ToFixed32Sx2_RZ:
		case Iop_Fixed32UToF32x2_RN:
		case Iop_Fixed32SToF32x2_RN:
			return BINARY(Ity_I64, Ity_I8, Ity_I64);

		case Iop_GetElem8x16:
			return BINARY(Ity_V128, Ity_I8, Ity_I8);
		case Iop_GetElem16x8:
			return BINARY(Ity_V128, Ity_I8, Ity_I16);
		case Iop_GetElem32x4:
			return BINARY(Ity_V128, Ity_I8, Ity_I32);
		case Iop_GetElem64x2:
			return BINARY(Ity_V128, Ity_I8, Ity_I64);
		case Iop_GetElem8x8:
			return BINARY(Ity_I64, Ity_I8, Ity_I8);
		case Iop_GetElem16x4:
			return BINARY(Ity_I64, Ity_I8, Ity_I16);
		case Iop_GetElem32x2:
			return BINARY(Ity_I64, Ity_I8, Ity_I32);
		case Iop_SetElem8x8:
			return TERNARY(Ity_I64, Ity_I8, Ity_I8, Ity_I64);
		case Iop_SetElem16x4:
			return TERNARY(Ity_I64, Ity_I8, Ity_I16, Ity_I64);
		case Iop_SetElem32x2:
			return TERNARY(Ity_I64, Ity_I8, Ity_I32, Ity_I64);

		case Iop_Slice64:
			return TERNARY(Ity_I64, Ity_I64, Ity_I8, Ity_I64);
		case Iop_SliceV128:
			return TERNARY(Ity_V128, Ity_V128, Ity_I8, Ity_V128);

		case Iop_BCDAdd:
		case Iop_BCDSub:
			return TERNARY(Ity_V128, Ity_V128, Ity_I8, Ity_V128);
		case Iop_QDMull16Sx4:
		case Iop_QDMull32Sx2:
			return BINARY(Ity_I64, Ity_I64, Ity_V128);

		/* s390 specific */
		case Iop_


_ONE_MINUS_SRC_ALPHA)
	--glPolygonOffset(false)
	--glCulling(false)
	--glDepthTest(false)
end

function gadget:DrawWorld()
  local morphUnits = SYNCED.morphUnits

  if (not next(morphUnits)) then
    return --//no morphs to draw
  end

  gameFrame = GetGameFrame()

  glBlendFunc(GL_SRC_ALPHA, GL_ONE)
  glDepthTest(GL_LEQUAL)

  local spec, specFullView = GetSpectatingState()
  local readTeam
  if (specFullView) then
    readTeam = Script.ALL_ACCESS_TEAM
  else
    readTeam = GetLocalTeamID()
  end

  CallAsTeam({ ['read'] = readTeam }, function()
    for unitID, morphData in pairs(morphUnits) do
      if (unitID and morphData)and(IsUnitVisible(unitID)) then
		if morphData.combatMorph then
		  DrawCombatMorphUnit(unitID, morphData,readTeam)
		else
          DrawMorphUnit(unitID, morphData,readTeam)
		end
      end
    end
  end)
  glDepthTest(false)
  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
  phase = phase + .06
end

local function split(msg,sep)
  local s=sep or '|'
  local t={}
  for e in string.gmatch(msg..s,'([^%'..s..']+)%'..s) do
    t[#t+1] = e
  end
  return t
end

-- Exemple of AI messages:
-- "aiShortName|morph|762" -- morph the unit of unitId 762
-- "aiShortName|morph|861|12" -- morph the unit of unitId 861 into an unit of unitDefId 12
--
-- Does not work because apparently Spring.GiveOrderToUn


underlord_firestorm_lua:OnSpellStart()
	self:StopEffects()

	-- unit identifier
	local caster = self:GetCaster()
	local point = self:GetCursorPosition()

	-- create thinker
	CreateModifierThinker(
		caster, -- player source
		self, -- ability source
		"modifier_underlord_firestorm_lua_thinker", -- modifier name
		{}, -- kv
		point,
		caster:GetTeamNumber(),
		false
	)
end

--------------------------------------------------------------------------------
function underlord_firestorm_lua:PlayEffects( point )
	-- Get Resources
	local particle_cast = "particles/units/heroes/heroes_underlord/underlord_firestorm_pre.vpcf"
	local sound_cast = "Hero_AbyssalUnderlord.Firestorm.Start"

	-- get data
	local radius = self:GetSpecialValueFor( "radius" )

	-- Create Particle
	self.effect_cast = ParticleManager:CreateParticleForTeam( particle_cast, PATTACH_WORLDORIGIN, self:GetCaster(), self:GetCaster():GetTeamNumber() )
	ParticleManager:SetParticleControl( self.effect_cast, 0, point )
	ParticleManager:SetParticleControl( self.effect_cast, 1, Vector( 2, 2, 2 ) )

	-- Create Sound
	EmitSoundOnLocationWithCaster( point, sound_cast, self:GetCaster() )
end

function underlord_firestorm_lua:StopEffects()
	ParticleManager:DestroyParticle( self.effect_cast, true )
	ParticleManager:ReleaseParticleIndex( self.effect_cast )
end


数下的是雷总情况数
    // 例如：[[17, 18, 19, 20, 21, 22, 23, 24], [48, 2144, 16872, 49568, 68975, 48960, 16608, 2046]]
    let mut table_cell_minenum: Vec<Vec<usize>> = vec![];
    // 每格是雷情况数表：记录了每块每格（或者地位等同的复合格）、每种总雷数下的是雷情况数
    if matrixx_squeeze.len() > 45 {
        // 超出枚举极限长度
        return Err(0);
    }
    let enum_comb_table: Vec<Vec<u8>> = enum_comb(&matrixA_squeeze, &matrixx_squeeze, &matrix_b);
    if enum_comb_table.len() == 0 {
        // 无解局面
        return Err(1);
    }
    for s in enum_comb_table.clone() {
        // println!("s: {:?}", s);
        let s_sum = s.iter().sum::<u8>();
        let mut si_num = 1; // 由于enum_comb_table中的格子每一个都代表了与其地位等同的所有格子，由此的情况数
        for s_i in 0..s.len() {
            si_num *= C_query(combination_relationship[s_i].len(), s[s_i]);
        }
        let fs = table_minenum[0]
            .clone()
            .iter()
            .position(|x| *x == s_sum.into());
        match fs {
            None => {
                table_minenum[0].push(s_sum.into());
                table_minenum[1].push(si_num.into());
                let mut ss = vec![];
                for c in 0..s.len() {
                    if s[c] == 0 {
                        ss.push(0);
                    } else {
                        let mut sss = 1;
                        for d in 0..s.len() {
                            if c != d {
                                sss *= C_query(combination_relationship[d].len(), s[d]);
                                // println!("comb_relp_s = {:?}", comb_relp_s);
                                // println!("sss = {:?}", sss);
                            } else {
                                sss *= C_query(combination_relationship[d].len() - 1, s[d] - 1);
                            }
                        }
                        ss.push(sss as usize);
                    }
                }
                table_cell_minenum.push(ss);
            }
            _ => {
                table_minenum[1][fs.unwrap()] += si_num as usize;
                for c in 0..s.len() {
                    if s[c] == 0 {
                        continue;
                    } else {
                        let mut sss = 1;
                        for d in 0..s.len() {
                            if c != d {
                                sss *= C_query(combination_relationship[d].len(), s[d]);
                                // println!("comb_relp_s=={:?}", comb_relp_s);
                                // println!("s=={:?}", s);
                            } else {
                                sss *= C_query(combination_relationship[d].len() - 1, s[d] - 1);
                            }
                        }
                        table_cell_minenum[fs.unwrap()][c] += sss as usize;
                    }
                }
            }
        }
    }

    Ok((


t' hide Card;
import 'package:flutter_bloc/flutter_bloc.dart';

import '../../widgets/card/cells/card_cell.dart';
import '../../widgets/card/card_cell_builder.dart';
import '../../widgets/row/cell_builder.dart';
import '../application/board_bloc.dart';
import '../../widgets/card/card.dart';
import 'toolbar/board_toolbar.dart';

class BoardPage extends StatelessWidget {
  BoardPage({
    required this.view,
    Key? key,
    this.onEditStateChanged,
  }) : super(key: ValueKey(view.id));

  final ViewPB view;

  /// Called when edit state changed
  final VoidCallback? onEditStateChanged;

  @override
  Widget build(BuildContext context) {
    return BlocProvider(
      create: (context) =>
          BoardBloc(view: view)..add(const BoardEvent.initial()),
      child: BlocBuilder<BoardBloc, BoardState>(
        buildWhen: (p, c) => p.loadingState != c.loadingState,
        builder: (context, state) {
          return state.loadingState.map(
            loading: (_) =>
                const Center(child: CircularProgressIndicator.adaptive()),
            finish: (result) {
              return result.successOrFail.fold(
                (_) => BoardContent(
                  onEditStateChanged: onEditStateChanged,
                ),
                (err) => FlowyErrorPage(err.toString()),
              );
            },
          );
        },
      ),
    );
  }
}

class BoardContent extends StatefulWidget {
  const BoardContent({
    Key? key,
    this.onEditStateChanged,
  }) : super(key: key);

  final VoidCallback? onEditStateChanged;

  @override
  State<BoardContent> createState() => _BoardContentState();
}

class _BoardContentState extends State<BoardContent> {
  late AppFlowyBoardScrollController scrollManager;
  final renderHook = RowCardRenderHook<String>();

  final config = const AppFlowyBoardConfig(
    groupBackgroundColor: Color(0xffF7F8FC),
  );

  @override
  void initState() {
    scrollManager = AppFlowyBoardScrollController();
    renderHook.addSelectOptionHook((options, groupId, _) {
      // The cell should hide if the option id is equal to the groupId.
      final isInGroup =
          options.where((element) => element.id == groupId).isNotEmpty;
      if (isInGroup || options.isEmpty) {
        return const SizedBox();
      }
      return null;
    });

    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return BlocListener<BoardBloc, BoardState>(
      listener: (context, state) {
        _handleEditStateChanged(state, context);
        widget.onEditStateChanged?.call();
      },
      child: BlocBuilder<BoardBloc, BoardState>(
        buildWhen: (previous, current) => previous.groupIds != current.groupIds,
        builder: (context, state) {
          final column = Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [const _ToolbarBlocAdaptor(), _buildBoard(context)],
          );

          return Padding(
            padding: const EdgeInsets.symmetric(horizontal: 20),
            child: column,
          );
        },
      ),
    );
  }

  Widget _buildBoard(BuildContext context) {
    return Expanded(
      child: AppFlowyBoard(
        boardScrollController: scrollManager,
        scrollController: ScrollController(),
        controller: context.read<BoardBloc>().boardController,
        headerBuilder: _buildHeader,


 (time since system boot).
   * units = ms
   */
  @GeneratedMavField(type = "uint32_t")
  public val timeBootMs: UInt = 0u,
  /**
   * Quaternion component 1, w (1 in null-rotation)
   */
  @GeneratedMavField(type = "float")
  public val q1: Float = 0F,
  /**
   * Quaternion component 2, x (0 in null-rotation)
   */
  @GeneratedMavField(type = "float")
  public val q2: Float = 0F,
  /**
   * Quaternion component 3, y (0 in null-rotation)
   */
  @GeneratedMavField(type = "float")
  public val q3: Float = 0F,
  /**
   * Quaternion component 4, z (0 in null-rotation)
   */
  @GeneratedMavField(type = "float")
  public val q4: Float = 0F,
  /**
   * Roll angular speed
   * units = rad/s
   */
  @GeneratedMavField(type = "float")
  public val rollspeed: Float = 0F,
  /**
   * Pitch angular speed
   * units = rad/s
   */
  @GeneratedMavField(type = "float")
  public val pitchspeed: Float = 0F,
  /**
   * Yaw angular speed
   * units = rad/s
   */
  @GeneratedMavField(type = "float")
  public val yawspeed: Float = 0F,
  /**
   * Rotation offset by which the attitude quaternion and angular speed vector should be rotated for
   * user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0]
   * if field not supported). This field is intended for systems in which the reference attitude may
   * change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees
   * between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode
   * and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode.
   */
  @GeneratedMavField(
    type = "float[4]",
    extension = true,
  )
  public val reprOffsetQ: List<Float> = emptyList(),
) : MavMessage<AttitudeQuaternion> {
  override val instanceCompanion: MavMessage.MavCompanion<AttitudeQuaternion> = Companion

  override fun serializeV1(): ByteArray {
    val encoder = MavDataEncoder(SIZE_V1)
    encoder.encodeUInt32(timeBootMs)
    encoder.encodeFloat(q1)
    encoder.encodeFloat(q2)
    encoder.encodeFloat(q3)
    encoder.encodeFloat(q4)
    encoder.encodeFloat(rollspeed)
    encoder.encodeFloat(pitchspeed)
    encoder.encodeFloat(yawspeed)
    return encoder.bytes
  }

  override fun serializeV2(): ByteArray {
    val encoder = MavDataEncoder(SIZE_V2)
    encoder.encodeUInt32(timeBootMs)
    encoder.encodeFloat(q1)
    encoder.encodeFloat(q2)
    encoder.encodeFloat(q3)
    encoder.encodeFloat(q4)
    encoder.encodeFloat(rollspeed)
    encoder.encodeFloat(pitchspeed)
    encoder.encodeFloat(yawspeed)
    encoder.encodeFloatArray(reprOffsetQ, 16)
    return encoder.bytes.truncateZeros()
  }

  public companion object : MavMessage.MavCompanion<AttitudeQuaternion> {
    private const val SIZE_V1: Int = 32

    private const val SIZE_V2: Int = 48

    override val id: UInt = 31u

    override val crcExtra: Byte = -10

    override fun deserialize(bytes: ByteArray): AttitudeQuaternion {
      val decoder = MavDataDecoder(bytes)

      val timeBootMs = decoder.safeD


ghtness / 255;

      return {
        x: dot.x,
        y: dot.y,
        size: dot.size,
        sizeMax: dot.sizeMax * pixelFactor,
        sizeMin: dot.sizeMin * pixelFactor,
      };
    };
    return createDotGrid(cols, rows, dotSize, gap, maxScale, processor);
  }

  function createDotGrid(
    cols: number,
    rows: number,
    dotSize = 5,
    gap = 5,
    maxScale = 4,
    configurator?: (
      currentCol: number,
      currentRow: number,
      dot: Dot,
      dotGrid: DotGrid
    ) => Dot
  ): DotGrid {
    const minSize = dotSize;
    const maxSize = dotSize * maxScale;

    const gridOffsetX = (cols * (minSize + gap)) / 2;
    const gridOffsetY = (rows * (minSize + gap)) / 2;

    let dotGrid: DotGrid = {
      cols,
      rows,
      dots: [],
      x: p.width / 2 - gridOffsetX,
      y: p.height / 2 - gridOffsetY,
    };

    // use configurator function if the user provide one
    if (configurator !== undefined) {
      for (let i = 0; i < cols; i++) {
        for (let j = 0; j < rows; j++) {
          const dot = {
            x: dotGrid.x + i * (dotSize + gap),
            y: dotGrid.y + j * (dotSize + gap),
            sizeMax: maxSize,
            sizeMin: minSize,
            size: dotSize,
          };
          dotGrid.dots.push(configurator(i, j, dot, dotGrid));
        }
      }
      return dotGrid;
    }

    for (let i = 0; i < cols; i++) {
      for (let j = 0; j < rows; j++) {
        dotGrid.dots.push({
          x: dotGrid.x + i * (dotSize + gap),
          y: dotGrid.y + j * (dotSize + gap),
          sizeMax: maxSize,
          sizeMin: minSize,
          size: dotSize,
        });
      }
    }

    return dotGrid;
  }

  function drawDotGrid(dotGrid: DotGrid) {
    // setup colours
    p.fill(230, 27, 46); // ted red
    p.strokeWeight(0);
    p.ellipseMode(p.CENTER);
    dotGrid.dots.forEach((dot) => {
      p.ellipse(dot.x, dot.y, dot.size, dot.size);
    });
  }

  function updateDotGrid(dotGrid: DotGrid) {
    const maxDist = 200;
    dotGrid.dots.forEach((dot) => {
      // scale base on mouse pos
      const mouseDist = p.dist(dot.x, dot.y, p.mouseX, p.mouseY);
      const mappedSize = p.map(
        mouseDist / maxDist,
        1,
        0,
        dot.sizeMin,
        dot.sizeMax
      );
      dot.size = p.constrain(mappedSize, dot.sizeMin, dot.sizeMax);
    });
  }

  function applyEffectConfiguration(forceUpdate?: boolean) {
    if (
      sizeSliderValue !== sizeSlider.value() ||
      scaleSliderValue !== scaleSlider.value() ||
      dotCountValue !== dotCountSlider.value() ||
      dotGapValue !== dotGapSlider.value() ||
      forceUpdate
    ) {
      sizeSliderValue = sizeSlider.value();
      scaleSliderValue = scaleSlider.value();
      dotCountValue = dotCountSlider.value();
      dotGapValue = dotGapSlider.value();

      // create the new dot grid here
      if (currentImage) {
        dots = createDotGridFromImage(
          dotCountValue,
          dotCountValue,
          INIT


 therapy_plan.name)
		start_nursing_tasks(therapy_session)

		self.assertRaises(frappe.ValidationError, therapy_session.submit)

		complete_nursing_tasks(therapy_session)
		therapy_session.submit()

def start_nursing_tasks(document):
	filters = {
		"reference_name": document.name,
		"mandatory": 1,
		"status": ["not in", ["Completed", "Cancelled"]],
	}
	tasks = frappe.get_all("Nursing Task", filters=filters)
	for task_name in tasks:
		task = frappe.get_doc("Nursing Task", task_name)
		task.submit()
		task.status = "In Progress"  # should set task_start_time
		task.save()

def complete_nursing_tasks(document):
	filters = {
		"reference_name": document.name,
		"mandatory": 1,
		"status": ["not in", ["Completed", "Cancelled"]],
	}
	tasks = frappe.get_all("Nursing Task", filters=filters)
	for task_name in tasks:
		task = frappe.get_doc("Nursing Task", task_name)
		task.status = "Completed"
		task.task_document_name = create_vital_signs(document.patient).name
		task.save()

def create_vital_signs(patient):
	return frappe.get_doc(
		{
			"doctype": "Vital Signs",
			"patient": patient,
			"signs_date": frappe.utils.nowdate(),
			"signs_time": frappe.utils.nowtime(),
			"bp_systolic": 120,
			"bp_diastolic": 80,
		}
	).insert(ignore_if_duplicate=True)


 string
      val pathSegments = uri.pathSegments
      builder.path(null)
      for (segment: String in pathSegments) {
        if ((ExponentManifest.DEEP_LINK_SEPARATOR == segment)) {
          break
        }
        builder.appendEncodedPath(segment)
      }
    }

    val snackChannel = uri.getQueryParameter(ExponentManifest.QUERY_PARAM_KEY_SNACK_CHANNEL)

    // transfer the release-channel param to the built URL as this will cause Expo Go to treat
    // this as a different project
    var releaseChannel = uri.getQueryParameter(ExponentManifest.QUERY_PARAM_KEY_RELEASE_CHANNEL)
    builder.query(null)
    if (releaseChannel != null) {
      // release channels cannot contain the ' ' character, so if this is present,
      // it must be an encoded form of '+' which indicated a deep link in SDK <27.
      // therefore, nothing after this is part of the release channel name so we should strip it.
      // TODO: remove this check once SDK 26 and below are no longer supported
      val releaseChannelDeepLinkPosition = releaseChannel.indexOf(' ')
      if (releaseChannelDeepLinkPosition > -1) {
        releaseChannel = releaseChannel.substring(0, releaseChannelDeepLinkPosition)
      }
      builder.appendQueryParameter(
        ExponentManifest.QUERY_PARAM_KEY_RELEASE_CHANNEL,
        releaseChannel
      )
    }

    // transfer the expo-updates query params: runtime-version, channel-name
    val expoUpdatesQueryParameters = listOf(
      ExponentManifest.QUERY_PARAM_KEY_EXPO_UPDATES_RUNTIME_VERSION,
      ExponentManifest.QUERY_PARAM_KEY_EXPO_UPDATES_CHANNEL_NAME
    )
    for (queryParameter: String in expoUpdatesQueryParameters) {
      val queryParameterValue = uri.getQueryParameter(queryParameter)
      if (queryParameterValue != null) {
        builder.appendQueryParameter(queryParameter, queryParameterValue)
      }
    }

    snackChannel?.let {
      builder.appendQueryParameter(ExponentManifest.QUERY_PARAM_KEY_SNACK_CHANNEL, it)
    }

    // ignore fragments as well (e.g. those added by auth-session)
    builder.fragment(null)
    var newUriString = builder.build().toString()
    val deepLinkPositionPlus = newUriString.indexOf('+')
    if (deepLinkPositionPlus >= 0 && deepLinkPositionDashes < 0) {
      // need to keep this for backwards compatibility
      newUriString = newUriString.substring(0, deepLinkPositionPlus)
    }

    // manifest url doesn't have a trailing slash
    if (newUriString.isNotEmpty()) {
      val lastUrlChar = newUriString[newUriString.length - 1]
      if (lastUrlChar == '/') {
        newUriString = newUriString.substring(0, newUriString.length - 1)
      }
    }
    return newUriString
  }

  private fun openManifestUrl(
    manifestUrl: String?,
    options: ExperienceOptions?,
    isOptimistic: Boolean,
    forceCache: Boolean = false
  ) {
    SoLoader.init(context, OpenSourceMergedSoMapping)
    if (options == null) {
      manifestUrlToOptions.remove(manifestUrl)
    } else {
      manifestUrlToOptions[manifestUrl] = options
    }
    if (manifestUrl == null || (manifestUrl == KernelConstants.HOME_MANIFEST_URL)) {
      openHomeActivity()
      return
    }

    ErrorActivity.clearErrorList()
    val tasks: List<AppTask> = experienceActivityTasks
    var existingTask: AppTask? = run {
      for (i in tasks.indices) {
        val task = tasks[i]
        // When deep linking from `NotificationForwarderActivity`, the task will finish immediately.
        // There is race condition to retrieve the taskInfo from the finishing task.
        // Uses try-catch to handle the cases.
        try {
          val baseIntent = task.taskInfo.baseIntent
          if (baseIntent.hasExtra(KernelConstants.MANIFEST_URL_KEY) && (
              baseIntent.getStringExtra(


<< Warrior/Rogue
    #optional
    #completewith next << Warrior
    #completewith RogueOptTrain << Rogue
    .goto Elwynn Forest,43.877,66.546,9 >> Travel upstairs in the Inn
step << Warrior/Rogue
    .goto Elwynn Forest,43.392,65.550
    >>|Tinterface/worldmap/chatbubble_64grey.blp:20|tTalk to |cRXP_FRIENDLY_Michelle Belle|r
    .train 3273 >> Train |T135966:0|t[First Aid]
    .target Michelle Belle
step << Rogue
    #optional
    #label RogueOptTrain
    .goto Elwynn Forest,43.872,65.937
    >>|Tinterface/worldmap/chatbubble_64grey.blp:20|tTalk to |cRXP_FRIENDLY_Keryn Sylvius|r
    >>|cRXP_WARN_Only train|r |T132147:0|t[Dual Wield] |cRXP_WARN_and|r |T132307:0|t[Sprint]|cRXP_WARN_. Do not train other spells to save your money for later|r
    .train 674 >> Train |T132147:0|t[Dual Wield]
    .train 2983 >> Train |T132307:0|t[Sprint]
    .target Keryn Sylvius
    .xp <10,1
step
    .goto Elwynn Forest,42.105,65.927
	>>|Tinterface/worldmap/chatbubble_64grey.blp:20|tTalk to |cRXP_FRIENDLY_Marshal Dughan|r
    .turnin 39 >> Turn in Deliver Thomas' Report
    .turnin 76 >> Turn in The Jasperlode Mine
    .accept 239 >> Accept Westbrook Garrison Needs Help!
    .accept 59 >> Accept Cloth and Leather Armor << Warlock
    .accept 109 >> Accept Report to Gryan Stoutmantle
    .target Marshal Dughan
step
    #sticky
    #label GoldshireVendor
    .goto Elwynn Forest,41.529,65.900
    >>|Tinterface/worldmap/chatbubble_64grey.blp:20|tTalk to |cRXP_FRIENDLY_Corina Steele|r
    .vendor >> Vendor Trash
    .target Corina Steele
    .money >0.75
step
    .goto Elwynn Forest,41.706,65.544
	>>|Tinterface/worldmap/chatbubble_64grey.blp:20|tTalk to |cRXP_FRIENDLY_Smith Argus|r
    .accept 1097 >> Accept Elmore's Task
    .target Smith Argus
step << Warlock/Warrior
    #requires GoldshireVendor
    #optional
    .xp 10 >> Grind to 10
step << Warrior
    .goto Elwynn Forest,41.087,65.768
    >>|Tinterface/worldmap/chatbubble_64grey.blp:20|tTalk to |cRXP_FRIENDLY_Lyria Du Lac|r
    .accept 1638 >> Accept A Warrior's Training
    .trainer >> Train your class spells
    .target Lyria Du Lac
    .money <0.5
step << Warrior
    #optional
    .goto Elwynn Forest,41.087,65.768
    >>|Tinterface/worldmap/chatbubble_64grey.blp:20|tTalk to |cRXP_FRIENDLY_Lyria Du Lac|r
    >>|cRXP_WARN_Do not train as you need to save your money for later|r
    .accept 1638 >> Accept A Warrior's Training
    .target Lyria Du Lac
step << Paladin
    #optional
    #requires GoldshireVendor
    .goto Elwynn Forest,41.096,66.041
    >>|Tinterface/worldmap/chatbubble_64grey.blp:20|tTalk to |cRXP_FRIENDLY_Brother Wilhelm|r
    .trainer >> Train your cl


เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(\n            '_'\n        ),\n        monthsShort:\n            'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),\n        weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference\n        weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY เวลา H:mm',\n            LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',\n        },\n        meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,\n        isPM: function (input) {\n            return input === 'หลังเที่ยง';\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ก่อนเที่ยง';\n            } else {\n                return 'หลังเที่ยง';\n            }\n        },\n        calendar: {\n            sameDay: '[วันนี้ เวลา] LT',\n            nextDay: '[พรุ่งนี้ เวลา] LT',\n            nextWeek: 'dddd[หน้า เวลา] LT',\n            lastDay: '[เมื่อวานนี้ เวลา] LT',\n            lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'อีก %s',\n            past: '%sที่แล้ว',\n            s: 'ไม่กี่วินาที',\n            ss: '%d วินาที',\n            m: '1 นาที',\n            mm: '%d นาที',\n            h: '1 ชั่วโมง',\n            hh: '%d ชั่วโมง',\n            d: '1 วัน',\n            dd: '%d วัน',\n            w: '1 สัปดาห์',\n            ww: '%d สัปดาห์',\n            M: '1 เดือน',\n            MM: '%d เดือน',\n            y: '1 ปี',\n            yy: '%d ปี',\n        },\n    });\n\n    return th;\n\n})));\n\n\n//# sourceURL=webpack://wepos/./node_modules/moment/locale/th.js?")},"./node_modules/moment/locale/tk.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/tk.js ***!
  \******************************************/function(__unused_webpack_module,__unused_webpack_exports,__webpack_require__){eval("//! moment.js locale configuration\n//! locale : Turkmen [tk]\n//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment


import re
import sys
import time

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.firefox.options import Options

YOUTUBE_PLAYLIST_URL = "https://www.youtube.com/playlist?list={}"
YOUTUBE_VIDEO_URL = "https://www.youtube.com/watch?v={}"
RE_VIDEO_ID = re.compile("\"/watch\?v=(.{11})")

class GetAllVideoID:
    def __init__(self):
        options = Options()
        # options.add_argument('--headless')
        self.driver = webdriver.Firefox(options=options)

    def get_all_video(self, channel_id):
        self.driver.get(YOUTUBE_PLAYLIST_URL.format(channel_id))
        num_video = 0
        body = self.driver.find_element_by_css_selector('body')
        while True:
            # Scroll down to the bottom.
            for i in range(5):
                body.send_keys(Keys.PAGE_DOWN)
                body.send_keys(Keys.PAGE_DOWN)
                body.send_keys(Keys.PAGE_DOWN)
                time.sleep(1)
            new_num_video = len(self.driver.find_elements_by_css_selector("#contents > ytd-playlist-video-renderer"))
            # print(str(num_video), str(new_num_video))
            if num_video == new_num_video:
                break
            num_video = new_num_video
        ids = set(re.findall(RE_VIDEO_ID, self.driver.page_source))
        return list(ids)

if __name__ == '__main__':
    USAGE = """
###############################################
    # Cách chạy:
        python3 GetAllVideoIDFromPlaylist.py <playlist_id> <output_file_path>
    # Cách tìm PLAYLIST_ID:
        https://www.youtube.com/playlist?list=PLtti_OfloMJKtvnkuHwpAoulSg_cNcMli
        => Playlist ID: PLtti_OfloMJKtvnkuHwpAoulSg_cNcMli
    # Ví dụ:
        python3 GetAllVideoIDFromPlaylist.py PLtti_OfloMJKtvnkuHwpAoulSg_cNcMli output.txt
###############################################
    """
    channel_id = ''
    output_file = ''
    getAllVideo = GetAllVideoID()
    if len(sys.argv) < 3:
        print(USAGE)
        sys.exit(1)
    try:
        channel_id = sys.argv[1]
        output_file = sys.argv[2]
        ids = getAllVideo.get_all_video(channel_id)
        with open(output_file, 'w', encoding='utf8') as fp:
            for id in ids:
                fp.write(YOUTUBE_VIDEO_URL.format(id) + "\n")
    except:
        sys.exit(2)
    finally:
        getAllVideo.driver.close()


/*	$NetBSD: select.h,v 1.37 2014/04/25 15:52:45 pooka Exp $	*/

/*-
 * Copyright (c) 1992, 1993
 *	The Regents of the University of California.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. 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.
 * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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.
 *
 *	@(#)select.h	8.2 (Berkeley) 1/4/94
 */

#ifndef _SYS_SELECT_H_
#define	_SYS_SELECT_H_

#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <sys/fd_set.h>

#ifdef _KERNEL
#include <sys/selinfo.h>		/* for struct selinfo */
#include <sys/signal.h>			/* for sigset_t */

struct lwp;
struct proc;
struct timespec;
struct cpu_info;
struct socket;

int	selcommon(register_t *, int, fd_set *, fd_set *, fd_set *,
    struct timespec *, sigset_t *);
void	selrecord(struct lwp *selector, struct selinfo *);
void	selnotify(struct selinfo *, int, long);
void	selsysinit(struct cpu_info *);
void	selinit(struct selinfo *);
void	seldestroy(struct selinfo *);

#else /* _KERNEL */

#include <sys/sigtypes.h>
#include <time.h>

__BEGIN_DECLS
#ifndef __LIBC12_SOURCE__
int	pselect(int, fd_set * __restrict, fd_set * __restrict,
    fd_set * __restrict, const struct timespec * __restrict,
    const sigset_t * __restrict) __RENAME(__pselect50);
int	select(int, fd_set * __restrict, fd_set * __restrict,
    fd_set * __restrict, struct timeval * __restrict) __RENAME(__select50);
#endif /* __LIBC12_SOURCE__ */
__END_DECLS
#endif /* _KERNEL */

#endif /* !_SYS_SELECT_H_ */


OVER_WATER_FGH && centerIndex <= BASE_COVER_WATER_H) centerIndex = HALF_DRY;
        else if(centerIndex >= HALF_COVER_SWAMP_FGH && centerIndex <= HALF_COVER_SWAMP_H) centerIndex = GRASS;
        else if(centerIndex >= BASE_COVER_SWAMP_FGH && centerIndex <= BASE_COVER_SWAMP_H) centerIndex = HALF_GRASS;

        if(isGrass(centerIndex)) {
            if(isGrassPath(adjacentF)) bits |= 1;
            if(isGrassPath(adjacentG)) bits |= 2;
            if(isGrassPath(adjacentT)) bits |= 4;
            if(isGrassPath(adjacentR)) bits |= 8;
            centerIndex = PATHS.get(bits, PATH_GRASS_GR);
        } else if(isHalfGrass(centerIndex)) {
            if(isHalfGrassPath(adjacentF)) bits |= 1;
            if(isHalfGrassPath(adjacentG)) bits |= 2;
            if(isHalfGrassPath(adjacentT)) bits |= 4;
            if(isHalfGrassPath(adjacentR)) bits |= 8;
            centerIndex = PATHS.get(bits, PATH_GRASS_GR) + 11;
        } else if(isDry(centerIndex)) {
            if(isDryPath(adjacentF)) bits |= 1;
            if(isDryPath(adjacentG)) bits |= 2;
            if(isDryPath(adjacentT)) bits |= 4;
            if(isDryPath(adjacentR)) bits |= 8;
            centerIndex = PATHS.get(bits, PATH_GRASS_GR) + 22;
        } else if(isHalfDry(centerIndex)) {
            if(isHalfDryPath(adjacentF)) bits |= 1;
            if(isHalfDryPath(adjacentG)) bits |= 2;
            if(isHalfDryPath(adjacentT)) bits |= 4;
            if(isHalfDryPath(adjacentR)) bits |= 8;
            centerIndex = PATHS.get(bits, PATH_GRASS_GR) + 33;
        }
        return centerIndex;
    }

    /**
     * Given a 3D int array indexed in {@code [f][g][h]} order, this takes existing paths that may have become unaligned
     * and resets their connections so they link up to each other. This also takes into account neighboring paths with
     * up to one tile difference on h, higher or lower.
     * @param area a 3D int array indexed in {@code [f][g][h]} order that will be modified in-place
     * @return {@code area}, potentially after modifications, for chaining
     */
    public static LocalMap realignPaths(LocalMap area) {
        final int fSize = area.getFSize(), gSize = area.getGSize(), hSize = area.getHSize();
        final int fLimit = fSize - 1, gLimit = gSize - 1, hLimit = hSize - 1;
        final int[][][] tiles = area.tiles;
        for (int f = 0; f < fSize; f++) {
            for (int g = 0; g < gSize; g++) {
                for (int h = hLimit; h >= 0; h--) {
                    int t = tiles[f][g][h];
                    if(t == -1) continue;
                    int bits = 0;
                    if(isGrassPath(t)) {
                        if(f == 0 |


f the item to set or get.</value>
		public TValue this[TKey key]
		{
			get
			{
				var node = FindNode(key);

				if (node == null)
				{
					throw new KeyNotFoundException("key");
				}

				return node.Data.Value;
			}
			set
			{
				var node = FindNode(key);

				if (node == null)
				{
					throw new KeyNotFoundException("key");
				}

				node.Data = new KeyValuePair<TKey,TValue>(key, value);
			}
		}

		#endregion

		#region ICollection<KeyValuePair<TKey,TValue>> Members

		/// <inheritdoc />
		/// <example>
		/// <code source="..\..\NGenerics.Examples\DataStructures\Trees\BinarySearchTreeBaseExamples.cs" region="Contains" lang="cs" title="The following example shows how to use the Contains method."/>
		/// </example>
		public override bool Contains(KeyValuePair<TKey, TValue> item) {
			return Contains(item, true);
		}

		#endregion
	}
}


                buy_ratio = buy_weight / total_weight
                sell_ratio = sell_weight / total_weight

                if buy_ratio >= threshold:
                    combined_signals.loc[idx, "signal"] = 1
                    combined_signals.loc[idx, "confidence"] = buy_ratio
                elif sell_ratio >= threshold:
                    combined_signals.loc[idx, "signal"] = -1
                    combined_signals.loc[idx, "confidence"] = sell_ratio
                else:
                    combined_signals.loc[idx, "signal"] = 0
                    combined_signals.loc[idx, "confidence"] = max(buy_ratio, sell_ratio)

        return combined_signals

    def get_signal_statistics(self) -> Dict[str, Dict]:
        """獲取訊號統計資訊

        Returns:
            Dict[str, Dict]: 各策略的訊號統計
        """
        statistics = {}

        for strategy, signals in self.signals.items():
            signal_counts = signals["signal"].value_counts()

            statistics[strategy] = {
                "total_signals": len(signals),
                "buy_signals": signal_counts.get(1, 0),
                "sell_signals": signal_counts.get(-1, 0),
                "hold_signals": signal_counts.get(0, 0),
                "buy_ratio": signal_counts.get(1, 0) / len(signals),
                "sell_ratio": signal_counts.get(-1, 0) / len(signals),
                "hold_ratio": signal_counts.get(0, 0) / len(signals),
            }

            # 如果有信心度資訊
            if "confidence" in signals.columns:
                statistics[strategy]["avg_confidence"] = signals["confidence"].mean()
                statistics[strategy]["max_confidence"] = signals["confidence"].max()
                statistics[strategy]["min_confidence"] = signals["confidence"].min()

        return statistics

    def export_combined_signals(self, file_path: str):
        """匯出合併後的訊號

        Args:
            file_path (str): 檔案路徑
        """
        if self.combined_signals is None:
            raise ValueError("尚未合併訊號，請先調用 combine_signals 方法")

        try:
            self.combined_signals.to_csv(file_path)
            logger.info("合併訊號已匯出到: %s", file_path)
        except Exception as e:
            logger.error("匯出合併訊號時發生錯誤: %s", e)

    def clear_signals(self):
        """清除所有訊號"""
        self.signals.clear()
        self.combined_signals = None
        logger.info("已清除所有訊號")

    def remove_signal(self, strategy_name: str):
        """移除指定策略的訊號

        Args:
            strategy_name (str): 策略名稱
        """
        if strategy_name in self.signals:
            del self.signals[strategy_name]
            logger.info("已移除策略訊號: %s", strategy_name)
        else:
            logger.warning("策略 '%s' 不存在", strategy_name)

    def list_strategies(self) -> list:
        """列出所有策略名稱

        Returns:
            list: 策略名稱列表
        """
        return list(self.signals.keys())


7    2
## [57,]    7    3
## [58,]    7    4
## [59,]    7    5
## [60,]    7    6
## [61,]    7    8
## [62,]    7    9
## [63,]    7   10
## [64,]    8    1
## [65,]    8    2
## [66,]    8    3
## [67,]    8    4
## [68,]    8    5
## [69,]    8    6
## [70,]    8    7
## [71,]    8    9
## [72,]    8   10
## [73,]    9    1
## [74,]    9    2
## [75,]    9    3
## [76,]    9    4
## [77,]    9    5
## [78,]    9    6
## [79,]    9    7
## [80,]    9    8
## [81,]    9   10
## [82,]   10    1
## [83,]   10    2
## [84,]   10    3
## [85,]   10    4
## [86,]   10    5
## [87,]   10    6
## [88,]   10    7
## [89,]   10    8
## [90,]   10    9

casos_edad=data.frame(uno=edades[casos[,1]],
                      dos=edades[casos[,2]])
casos_edad$media=apply(casos_edad,1,mean)
casos_edad

##    uno dos media
## 1   19  19  19.0
## 2   19  19  19.0
## 3   19  20  19.5
## 4   19  20  19.5
## 5   19  20  19.5
## 6   19  20  19.5
## 7   19  21  20.0
## 8   19  24  21.5
## 9   19  26  22.5
## 10  19  19  19.0
## 11  19  19  19.0
## 12  19  20  19.5
## 13  19  20  19.5
## 14  19  20  19.5
## 15  19  20  19.5
## 16  19  21  20.0
## 17  19  24  21.5
## 18  19  26  22.5
## 19  19  19  19.0
## 20  19  19  19.0
## 21  19  20  19.5
## 22  19  20  19.5
## 23  19  20  19.5
## 24  19  20  19.5
## 25  19  21  20.0
## 26  19  24  21.5
## 27  19  26  22.5
## 28  20  19  19.5
## 29  20  19  19.5
## 30  20  19  19.5
## 31  20  20  20.0
## 32  20  20  20.0
## 33  20  20  20.0
## 34  20  21  20.5
## 35  20  24  22.0
## 36  20  26  23.0
## 37  20  19  19.5
## 38  20  19  19.5
## 39  20  19  19.5
## 40  20  20  20.0
## 41  20  20  20.0
## 42  20  20  20.0
## 43  20  21  20.5
## 44  20  24  22.0
## 45  20  26  23.0
## 46  20  19  19.5
## 47  20  19  19.5
## 48  20  19  19.5
## 49  20  20  20.0
## 50  20  20  20.0
## 51  20  20  20.0
## 52  20  21  20.5
## 53  20  24  22.0
## 54  20  26  23.0
## 55  20  19  19.5
## 56  20  19  19.5


IyMDIzLTAxLTAxVDAwOjAyOjAwWiIsImxpZCI6WzAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDJdfQ",
			cursor: &aud.RecordCursor{},
			want: &aud.RecordCursor{
				LastOperationTime: &opTime,
				LastID:            &id,
			},
			err: nil,
		},
		{
			token:  "e30",
			cursor: &aud.RecordCursor{},
			want:   &aud.RecordCursor{},
			err:    nil,
		},
		{
			token:  "",
			cursor: &aud.RecordCursor{},
			want:   &aud.RecordCursor{},
			err:    nil,
		},
	}

	for _, test := range tests {
		test := test
		t.Run(test.name, func(t *testing.T) {
			err := aud.DecodePageToken(test.token, test.cursor)
			assert.Equal(t, test.want, test.cursor)
			assert.Equal(t, test.err, err)
		})
	}
}

func TestEncodePageToken(t *testing.T) {
	id1 := aud.MustParseID("00000000-0000-0000-0000-000000000001")
	opTime1 := time.Date(2023, 1, 1, 0, 1, 0, 0, time.UTC)
	id2 := aud.MustParseID("00000000-0000-0000-0000-000000000002")
	opTime2 := time.Date(2023, 1, 1, 0, 2, 0, 0, time.UTC)

	tests := []struct {
		name   string
		cursor aud.Cursor
		want   string
		err    error
	}{
		{
			cursor: aud.NewRecordCursor(
				[]aud.Record{
					{
						ID: id1,
						Operation: aud.Operation{
							Time: opTime1,
						},
					},
					{
						ID: id2,
						Operation: aud.Operation{
							Time: opTime2,
						},
					},
				},
				2,
			),
			want: "eyJsb3QiOiIyMDIzLTAxLTAxVDAwOjAyOjAwWiIsImxpZCI6WzAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDJdfQ",
			err:  nil,
		},
		{
			cursor: aud.NewRecordCursor(
				[]aud.Record{
					{
						ID: id1,
						Operation: aud.Operation{
							Time: opTime1,
						},
					},
					{
						ID: id2,
						Operation: aud.Operation{
							Time: opTime2,
						},
					},
				},
				20,
			),
			want: "",
			err:  nil,
		},
		{
			cursor: aud.NewRecordCursor(
				[]aud.Record{},
				20,
			),
			want: "",
			err:  nil,
		},
	}

	for _, test := range tests {
		test := test
		t.Run(test.name, func(t *testing.T) {
			got, err := aud.EncodePageToken(test.cursor)
			assert.Equal(t, test.want, got)
			assert.Equal(t, test.err, err)
		})
	}
}
// Copyright 2023 Igor Zibarev
//
// 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 postgres

import (
	"fmt"

	"github.com/golang-migrate/migrate/v4"
	"github.com/golang-migrate/migrate/v4/


_usd",
					"2020-01-01T00:00:00.000Z",
					"2020-01-01T00:01:00.000Z"
				);
				expect(result.length).to.equal(41);
				expect(result[0].id).to.equal("80350317");
				expect(result[0].unix).to.equal(1577836800222);
				expect(result[0].side).to.equal("Ask");
				expect(result[0].price).to.equal("7165.72000000");
				expect(result[0].amount).to.equal("0.01392747");
			});

			it("when invalid market throws error", done => {
				expectReject(
					sut.trades(
						"coinbaser_btc_usd",
						"2020-01-01T00:00:00.000Z",
						"2020-01-01T00:01:00.000Z"
					),
					done
				);
			});

			it("when invalid start throws error", done => {
				expectReject(
					sut.trades("coinbasepro_btc_usd", "2020-01-01", "2020-01-01T00:01:00.000Z"),
					done
				);
			});

			it("when invalid end throws error", done => {
				expectReject(
					sut.trades("coinbasepro_btc_usd", "2020-01-01T00:00:00.000Z", "2020-01-01"),
					done
				);
			});
		});
	});
});
import { postData, extractedData, country, match } from './type'
import { logger } from '.'

const extractMain: (
  data: postData[]
) => Promise<{ violated: postData[]; data: postData[] }> = async (data: postData[]) => {
  let violated: postData[] = []

  let nd = data
    .map(d => {
      // make everything lower case for the ease of developing
      let body = removeDecoration(d.body.toLowerCase())

      let nb: extractedData
      try {
        nb = extractBody(body)
        d.match = nb
      } catch (err) {
        // logger.error(d.url)
        // logger.error(err)
        d.match = []
        d.error = `${err}`
        violated.push(d)
      } finally {
        return d
      }
    })
    .filter(d => !d.error)

  nd = nd.filter(d => {
    //@ts-ignore
    if (d.match.every(i => i === 'o')) {
      violated.push(d)
      return false
    } else {
      return true
    }
  })

  return { violated: violated, data: nd }
}

const extractBody: (body: string) => extractedData = (body: string) => {
  let matchData: extractedData = []
  // Russia and Saudi Arab first
  let tempChunk = body
    .toLowerCase()
    .split(/[t,w,l]+[* |\t]+russia+[*| \t]+[v, vs]+[* |\t]+saudi arabia+[* |\t]+[l,w,t]/)[0]
  let tempBody: string = body.toLowerCase().slice(tempChunk.length, body.length)

  // create a for loop of 48 times (48 matches)
  for (let i = 0; i < 48; i++) {
    let c = country[i].split(' v ')
    let fc = c[0].toLowerCase()
    let sc = c[1].toLowerCase()
    let { body: chunk, match } = eachCountryFilter(tempBody, fc, sc)
    tempBody = chunk
    matchData.push(match)
  }
  return matchData
}

const eachCountryFilter = (filteredBody: string, firstCountry: string, secondCountry: string) => {
  // chunkA
  // [chunkA][italy v australia (chunkB)]
  // italy v australia[chunkC]
  let chunkA:


 통해 캐노 네비게이션에 있는 두 명의 개인을 보여준다. 홍수는 보통 차량의 도로인 교통에 카누가 필요한 특이한 장면의 직접적인 원인이다. 폭우로 인한 여파, 허리케인 같은 자연 재해, 인근 수체가 급상승해 지역이 침수되는 것으로 보인다. 이는 이동성을 위해 보트를 사용해야 하며 정상적인 운송 방법을 파괴했기 때문에 홍수 심각도를 나타낸다.\n' +
      '\n' +
      '### 4.3.3 LLaVA\n' +
      '\n' +
      '네, 사진에 기재된 사건들 사이에 인과관계가 있습니다. 침수된 거리와 카누에 있는 사람들은 허리케인이나 폭풍 폭우로 인한 폭우나 자연 재해로 인해 발생할 가능성이 높다. 홍수로 인해 거리가 물에 잠겨 차량이 대체 교통수단을 찾기 어렵게 되었다. 이 경우 부부는 카누를 사용하여 침수된 거리를 탐색하도록 선택했으며, 이는 상황에 대한 파격적인 창의적 해결책이다. 이미지에 자동차와 트럭이 존재하는 것도 홍수가 해당 지역의 정기적인 교통 흐름과 교통에 차질을 빚었다는 것을 시사한다.\n' +
      '\n' +
      '4.3.4 Gemini Pro Pro.### 4.3.4 Gemini Pro Pro.### 4.3.4 Gemini Pro Pro.\n' +
      '\n' +
      '그림은 침수된 거리를 통해 카누를 패딩하는 커플을 보여준다. 물은 무리고 갈색이에요. 부부가 캐주얼한 옷을 입고 있고 남자는 패들 들고 있다. 길에는 주차된 자동차와 건물이 줄지어 있습니다. 오른쪽에는 \'퍼미트 홀더 파킹\' 표지판이 있습니다. 그림은 낮은 각도로 촬영되어


UseFinalizerName).
					PodSets(*utiltesting.MakePodSet(kueue.NewPodSetReference(podUID), 2).Request(corev1.ResourceCPU, "1").Obj()).
					Queue("test-queue").
					OwnerReference(corev1.SchemeGroupVersion.WithKind("Pod"), "pod", "test-uid").
					OwnerReference(corev1.SchemeGroupVersion.WithKind("Pod"), "pod2", "test-uid").
					Condition(metav1.Condition{
						Type:               kueue.WorkloadEvicted,
						Status:             metav1.ConditionTrue,
						LastTransitionTime: metav1.Now(),
						Reason:             kueue.WorkloadEvictedByPreemption,
						Message:            "Preempted to accommodate a higher priority Workload",
					}).
					Obj(),
			},
			workloadCmpOpts: defaultWorkloadCmpOpts,
		},
		"Pods are finalized even if one of the pods in the finished group is absent": {
			pods: []corev1.Pod{
				*basePodWrapper.
					Clone().
					KueueFinalizer().
					ManagedByKueueLabel().
					Group("test-group").
					GroupTotalCount("2").
					StatusPhase(corev1.PodSucceeded).
					Obj(),
			},
			wantPods: []corev1.Pod{
				*basePodWrapper.
					Clone().
					ManagedByKueueLabel().
					Group("test-group").
					GroupTotalCount("2").
					StatusPhase(corev1.PodSucceeded).
					Obj(),
			},

			workloads: []kueue.Workload{
				*utiltesting.MakeWorkload("test-group", "ns").
					PodSets(
						*utiltesting.MakePodSet(kueue.NewPodSetReference(podUID), 2).
							Request(corev1.ResourceCPU, "1").
							Obj(),
					).
					Queue("user-queue").
					OwnerReference(corev1.SchemeGroupVersion.WithKind("Pod"), "pod", "test-uid").
					ReserveQuota(utiltesting.MakeAdmission("cq").PodSets(utiltesting.MakePodSetAssignment(kueue.DefaultPodSetName).Obj()).Obj()).
					Admitted(true).
					Condition(metav1.Condition{
						Type:    "Finished",
						Status:  "True",
						Reason:  kueue.WorkloadFinishedReasonSucceeded,
						Message: "Pods succeeded: 1/2. Pods failed: 1/2",
					}).
					Condition(metav1.Condition{
						Type:    WorkloadWaitingForReplacementPods,
						Status:  metav1.ConditionTrue,
						Reason:  WorkloadPodsFailed,
						Message: "Some Failed pods need replacement",
					}).
					Obj(),
			},
			wantWorkloads: []kueue.Workload{
				*utiltesting.MakeWorkload("test-group", "ns").
					PodSets(
						*utiltesting.MakePodSet(kueue.NewPodSetReference(podUID), 2).
							Request(corev1.ResourceCPU, "1").
							Obj(),
					).
					Queue("user-queue").
					OwnerReference(corev1.SchemeGroupVersion.WithKind("Pod"), "pod", "test-uid").
					ReserveQuota(utiltesting.MakeAdmission("cq").PodSets(utiltesting.MakePodSetAssignment(kueue.DefaultPodSetName).Obj()).Obj()).
					Admitted(true).
					Condition(metav1.Condition{
						Type:    "Finished",
						Status:  "True",
						Reason:  kueue.WorkloadFinishedReasonSucceeded,
						Message: "Pods succeeded: 1/2. Pods failed: 1/2",
					}).
					Condition(metav1.Condition{
						Type:    WorkloadWaitingForReplacementPods,
						Status:  metav1.ConditionTrue,
						Reason:  WorkloadPodsFailed,
						Message: "Some Failed pods need replacement",


widget.onChange(e.index!);
          },
          child: MouseRegion(
            cursor: SystemMouseCursors.click,
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                SizedBox(
                  child: widget.index == e.index
                      ? e.selectedIcon
                      : e.unselectedIcon,
                ),
                const SizedBox(height: 4),
                Text(
                  e.title,
                  style: TextStyle(
                    color: hexToColor("d9dbe2"),
                    fontSize: 10,
                  ),
                )
              ],
            ),
          ),
        ),
      );
    }).toList();
  }

  @override
  Widget build(BuildContext context) {
    final theme = Provider.of<DefaultThemeData>(context).theme;
    return Column(
      crossAxisAlignment: CrossAxisAlignment.center,
      mainAxisAlignment: MainAxisAlignment.start,
      children: [
        SizedBox(
          height: 40,
          child: MoveWindow(
            child: Container(),
          ),
        ),
        Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: bottomNavigatorList(theme),
        ),
        Expanded(
            child: MoveWindow(
          child: Container(),
        )),
        UserAvatar(
          onChangeIndex: widget.onChange,
        ),
      ],
    );
  }
}
//
// Tencent is pleased to support the open source community by making
// Hippy available.
//
// Copyright (C) 2022 THL A29 Limited, a Tencent company.
// All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

library widget;

export 'widget/base.dart';
export 'widget/div.dart';
export 'widget/image.dart';
export 'widget/list.dart';
export 'widget/list_item.dart';
export 'widget/modal.dart';
export 'widget/pull_footer.dart';
export 'widget/pull_header.dart';
export 'widget/refresh.dart';
export 'widget/refresh_item.dart';
export 'widget/root.dart';
export 'widget/scroller.dart';
export 'widget/text.dart';
export 'widget/text_input.dart';
export 'widget/view_pager.dart';
export 'widget/waterfall.dart';
export 'widget/waterfall_item.dart';
export 'widget/web_view.dart';
//
// Tencent is pleased to support the open source community by making
// Hippy available.
//
// Copyright (C) 2022 THL A29 Limited, a Tencent company.
// All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governin


n("");
    obj[sorted] = arr[i];
  }

  return Object.values(obj);
}

let arr = ["nap", "teachers", "cheaters", "PAN", "ear", "era", "hectares"];

alert( aclean(arr) );
```
للحصول على الوقت المنصرم منذ التاريخ `date` حتى الآن -- لنقم بطرح التاريخين.

```js run demo
function formatDate(date) {
  let diff = new Date() - date; // الفرق من مرتبة المللي ثانية

  if (diff < 1000) { // أقل من ثانية
    return 'الآن';
  }

  let sec = Math.floor(diff / 1000); // تحويل الفرق لمرتبة الثواني

  if (sec < 60) {
    return 'منذ ' + sec + ' ثانية';
  }

  let min = Math.floor(diff / 60000); // تحويل الفرق لمرتبة الدقائق
  if (min < 60) {
    return 'منذ ' + min + ' دقيقة';
  }

  // تنسيق التاريخ
  // إضافة الأصفار بادئة إلى اليوم/الشهر/الساعات/الدقائق المكونة من رقم واحد
  let d = date;
  d = [
    '0' + d.getDate(),
    '0' + (d.getMonth() + 1),
    '' + d.getFullYear(),
    '0' + d.getHours(),
    '0' + d.getMinutes()
  ].map(component => component.slice(-2)); // أخذ آخر رقمين من كل مكوّن

  // جمع المكونات في تاريخ واحد
  return d.slice(0, 3).join('.') + ' ' + d.slice(3).join(':');
}

alert( formatDate(new Date(new Date - 1)) ); // "الآن"

alert( formatDate(new Date(new Date - 30 * 1000)) ); // "منذ 30 ثانية"

alert( formatDate(new Date(new Date - 5 * 60 * 1000)) ); // "منذ 5 دقيقة"

// تاريخ الغد كـ 20:00 31.12.2016
alert( formatDate(new Date(new Date - 86400 * 1000)) );
```

حل بديل:

```js run
function formatDate(date) {
  let dayOfMonth = date.getDate();
  let month = date.getMonth() + 1;
  let year = date.getFullYear();
  let hour = date.getHours();
  let minutes = date.getMinutes();
  let diffMs = new Date() - date;
  let diffSec = Math.round(diffMs / 1000);
  let diffMin = diffSec / 60;
  let diffHour = diffMin / 60;

  // التنسيق
  year = year.toString().slice(-2);
  month = month < 10 ? '0' + month : month;
  dayOfMonth = dayOfMonth < 10 ? '0' + dayOfMonth : dayOfMonth;
  hour = hour < 10 ? '0' + hour : hour;
  minutes = minutes < 10 ? '0' + minutes : minutes;

  if (diffSec < 1) {
    return 'الآن';
  } else if (diffMin < 1) {
    return `منذ ${diffSec} ثواني`;
  } else if (diffHour < 1) {
    return `منذ ${diffMin} دقيقة`;
  } else {
    return `${dayOfMonth}.${month}.${year} ${hour}:${minutes}`
  }
}
```
للحصول على عدد الثواني، بإمكاننا توليد غرض من التاريخ باستخدام اليوم بحيث يكون الوقت 00:00:00، ثم ن