--write-api).\n\nFor information about avaliable fields see [mrgd_w1_1_3](mrgd_w1_1_3) module"]
pub type MRGD_W1_1_3 = crate::Reg<u32, _MRGD_W1_1_3>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _MRGD_W1_1_3;
#[doc = "`read()` method returns [mrgd_w1_1_3::R](mrgd_w1_1_3::R) reader structure"]
impl crate::Readable for MRGD_W1_1_3 {}
#[doc = "`write(|w| ..)` method takes [mrgd_w1_1_3::W](mrgd_w1_1_3::W) writer structure"]
impl crate::Writable for MRGD_W1_1_3 {}
#[doc = "Memory Region Descriptor"]
pub mod mrgd_w1_1_3;
#[doc = "Memory Region Descriptor\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mrgd_w2_1_3](mrgd_w2_1_3) module"]
pub type MRGD_W2_1_3 = crate::Reg<u32, _MRGD_W2_1_3>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _MRGD_W2_1_3;
#[doc = "`read()` method returns [mrgd_w2_1_3::R](mrgd_w2_1_3::R) reader structure"]
impl crate::Readable for MRGD_W2_1_3 {}
#[doc = "`write(|w| ..)` method takes [mrgd_w2_1_3::W](mrgd_w2_1_3::W) writer structure"]
impl crate::Writable for MRGD_W2_1_3 {}
#[doc = "Memory Region Descriptor"]
pub mod mrgd_w2_1_3;
#[doc = "Memory Region Descriptor\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mrgd_w3_1_3](mrgd_w3_1_3) module"]
pub type MRGD_W3_1_3 = crate::Reg<u32, _MRGD_W3_1_3>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _MRGD_W3_1_3;
#[doc = "`read()` method returns [mrgd_w3_1_3::R](mrgd_w3_1_3::R) reader structure"]
impl crate::Readable for MRGD_W3_1_3 {}
#[doc = "`write(|w| ..)` method takes [mrgd_w3_1_3::W](mrgd_w3_1_3::W) writer structure"]
impl crate::Writable for MRGD_W3_1_3 {}
#[doc = "Memory Region Descriptor"]
pub mod mrgd_w3_1_3;
#[doc = "Memory Region Descriptor\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::r


SpotUsage │ m6idn.4xlarge │ i-0a9883f45dddac9dc │     1.272 │       0.5118 │ 0.457918 │  0.89472 │
│ 2023-09-01 03:07:10 │ SpotUsage │ c5d.9xlarge   │ i-04a2d1d907f42badc │     1.728 │       0.6275 │ 0.268081 │  0.42722 │
│ 2023-09-01 03:07:15 │ SpotUsage │ r5dn.4xlarge  │ i-0fcd109ec0a5d72c9 │     1.336 │       0.4926 │ 0.026271 │ 0.053331 │
│ 2023-09-01 03:08:00 │ SpotUsage │ m5ad.2xlarge  │ i-0d03ba891a7be45ef │     0.412 │       0.2576 │ 0.010232 │  0.03972 │
│ 2023-09-01 03:08:14 │ SpotUsage │ r5n.4xlarge   │ i-07cf673d6efc02bb8 │     1.192 │       0.4871 │ 0.017995 │ 0.036943 │
└─────────────────────┴───────────┴───────────────┴─────────────────────┴───────────┴──────────────┴──────────┴──────────┘

Type Inference For Nested JSONs

{
  "ip": "188.132.130.41",
  "data": {
    "tls": {
      "status": "success",
      "protocol": "tls",
      "result": {
        "handshake_log": {
          "server_hello": {
            "version": {
              "name": "TLSv1.2",
              "value": 771
            },
            "random": "Xdxt8cDOO0iv3ZEiOaLKVlNWW+s5VxHAGF83f1sULdc=",
            "session_id": "ASH0ObQdWuaaninII+3+QcWfaiGJuWuvrsh1QGxAHaY=",
            "cipher_suite": {
              "hex": "0xC014",
              "name": "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
              "value": 49172
            },
            "compression_method": 0,
            "ocsp_stapling": false,
            "ticket": false,
            "secure_renegotiation": true,
            "heartbeat": false,
            "extended_master_secret": false
          },
          "server_certificates": {
            "ce


 c in remoteWindowCoords) {
      if (x >= c.relativeOffset.dx &&
          y >= c.relativeOffset.dy &&
          x <= c.relativeOffset.dx + c.windowRect.width &&
          y <= c.relativeOffset.dy + c.windowRect.height) {
        return c;
      }
    }
    return null;
  }

  Point? _handlePointerDevicePos(
    String kind,
    double x,
    double y,
    bool moveInCanvas,
    CanvasCoords canvas,
    Rect? rect,
    String evtType, {
    bool onExit = false,
    int buttons = kPrimaryMouseButton,
  }) {
    if (rect == null) {
      return null;
    }

    final nearThr = 3;
    var nearRight = (canvas.size.width - x) < nearThr;
    var nearBottom = (canvas.size.height - y) < nearThr;
    final imageWidth = rect.width * canvas.scale;
    final imageHeight = rect.height * canvas.scale;
    if (canvas.scrollStyle == ScrollStyle.scrollbar) {
      x += imageWidth * canvas.scrollX;
      y += imageHeight * canvas.scrollY;

      // boxed size is a center widget
      if (canvas.size.width > imageWidth) {
        x -= ((canvas.size.width - imageWidth) / 2);
      }
      if (canvas.size.height > imageHeight) {
        y -= ((canvas.size.height - imageHeight) / 2);
      }
    } else {
      x -= canvas.x;
      y -= canvas.y;
    }

    x /= canvas.scale;
    y /= canvas.scale;
    if (canvas.scale > 0 && canvas.scale < 1) {
      final step = 1.0 / canvas.scale - 1;
      if (nearRight) {
        x += step;
      }
      if (nearBottom) {
        y += step;
      }
    }
    x += rect.left;
    y += rect.top;

    if (onExit) {
      final pos = setNearestEdge(x, y, rect);
      x = pos.dx;
      y = pos.dy;
    }

    return InputModel.getPointInRemoteRect(
        true, peerPlatform, kind, evtType, x, y, rect,
        buttons: buttons);
  }

  static Point<double>? getPointInRemoteRect(
      bool isLocalDesktop,
      String? peerPlatform,
      String kind,
      String evtType,
      double evtX,
      double evtY,
      Rect rect,
      {int buttons = kPrimaryMouseButton}) {
    double minX = rect.left;
    // https://github.com/rustdesk/rustdesk/issues/6678
    // For Windows, [0,maxX], [0,maxY] should be set to enable window snapping.
    double maxX = (rect.left + rect.width) -
        (peerPlatform == kPeerPlatformWindows ? 0 : 1);
    double minY = rect.top;
    double maxY = (rect.top + rect.height) -
        (peerPlatform == kPeerPlatformWindows ? 0 : 1);
    evtX = InputModel.tryGetNearestRange(evtX, minX, maxX, 5);
    evtY = InputModel.tryGetNearestRange(evtY, minY, maxY, 5);
    if (isLocalDesktop) {
      if (kind == kPointerEventKindMouse) {
        if (evtX < minX || evtY < minY || evtX > maxX || evtY > maxY) {
          // If left mouse up, no early return.
          if (!(buttons == kPrimaryMouseButton &&
              evtType == kMouseEventTypeUp)) {
            return null;
          }
        }
      }
    } else {
      bool evtXInRange = evtX >= minX && evtX <= maxX;


+"#"+K3.ERMarkers.ONE_OR_MORE_START+")");break;case p.db.Cardinality.ONLY_ONE:y.attr("marker-start","url("+T+"#"+K3.ERMarkers.ONLY_ONE_START+")");break;case p.db.Cardinality.MD_PARENT:y.attr("marker-start","url("+T+"#"+K3.ERMarkers.MD_PARENT_START+")");break}const _=y.node().getTotalLength(),A=y.node().getPointAtLength(_*.5),P="rel"+qUe,F=i.append("text").classed("er relationshipLabel",!0).attr("id",P).attr("x",A.x).attr("y",A.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",qt().fontFamily).style("font-size",d1.fontSize+"px").text(s.roleA).node().getBBox();i.insert("rect","#"+P).classed("er relationshipLabelBox",!0).attr("x",A.x-F.width/2).attr("y",A.y-F.height/2).attr("width",F.width).attr("height",F.height)},etn=function(i,s,u,d){d1=qt().er,Xe.info("Drawing ER diagram");const p=qt().securityLevel;let v;p==="sandbox"&&(v=Ir("#i"+s));const y=Ir(p==="sandbox"?v.nodes()[0].contentDocument.body:"body").select(`[id='${s}']`);K3.insertMarkers(y,d1);let T;T=new P0({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:d1.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const _=Xen(y,d.db.getEntities(),T),A=Jen(d.db.getRelationships(),T);qD(T),Qen(y,T),A.forEach(function(W){Zen(y,W,T,_,d)});const P=d1.diagramPadding;So.insertTitle(y,"entityTitleText",d1.titleTopMargin,d.db.getDiagramTitle());const R=y.node().getBBox(),F=R.width+P*2,j=R.height+P*2;Og(y,j,F,d1.useMaxWidth),y.attr("viewBox",`${R.x-P} ${R.y-P} ${F} ${j}`)},ttn="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function ntn(i="",s=""){const u=i.replace(Ken,"");return`${HUe(s)}${HUe(u)}${Gen(i,ttn)}`}function HUe(i=""){return i.length>0?`${i}-`:""}const rtn=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:Ien,db:Pen,renderer:{setConf:Wen,draw:etn},styles:i=>`
  .entityBox {
    fill: ${i.mainBkg};
    stroke: ${i.nodeBorder};
  }

  .attributeBoxOdd {
    fill: ${i.attributeBackgroundColorOdd};
    stroke: ${i.nodeBorder};
  }

  .attributeBoxEven {
    fill:  ${i.attributeBackgroundColorEven};
    stroke: ${i.nodeBorder};
  }

  .relationshipLabelBox {
    fill: ${i.tertiaryColor};
    opacity: 0.7;
    backgroun


t">0899be27 0820            or      byte ptr [eax],ah
0899be29 288c0740c69908  sub     byte ptr [edi+eax+899C640h],cl
0899be30 40              inc     eax
0899be31 c6              ???
0899be32 99              cdq
0899be33 08b8a1ff5e40    or      byte ptr [eax+405EFFA1h],bh
0899be39 c6              ???
0899be3a 99              cdq
0899be3b 0800            or      byte ptr [eax],al
0899be3d 40              inc     eax
0899be3e 5f              pop     edi
0899be3f e6d8            out     0D8h,al
0899be41 1401            adc     al,1
0899be43 8000ac          add     byte ptr [eax],0ACh
0899be46 8b07            mov     eax,dword ptr [edi]
0899be48 40              inc     eax
0899be49 858d07020000    test    dword ptr [ebp+207h],ecx
0899be4f 00609b          add     byte ptr [eax-65h],ah
0899be52 01640000        add     dword ptr [eax+eax],esp
0899be56 0000            add     byte ptr [eax],al
0899be58 2028            and     byte ptr [eax],ch
0899be5a 8c07            mov     word ptr [edi],es
0899be5c 0000            add     byte ptr [eax],al
0899be5e 9a080000000000  call    0000:00000008
0899be65 0000            add     byte ptr [eax],al
0899be67 0000            add     byte ptr [eax],al
0899be69 0000            add     byte ptr [eax],al
0899be6b 0068bb          add     byte ptr [eax-45h],ch
0899be6e af              scas    dword ptr es:[edi]
0899be6f 003cbe          add     byte ptr [esi+edi*4],bh
0899be72 99              cdq
0899be73 0832            or      byte ptr [edx],dh
0899be75 74b4            je      0899be2b
<span class="CD


        assertTrue(rock.getFlag("IsBlessed"));
    }

    public void testUnholyWater() {
        Thing rock = Lib.create("rock");
        assertTrue(!rock.getFlag("IsBlessed"));
        assertTrue(!rock.getFlag("IsCursed"));

        Thing hw=Lib.create("potion of unholy water");
        Potion.dip(null,rock,hw);

        assertTrue(rock.getFlag("IsCursed"));
    }

    public void testPotionOfStrength() {
        Thing b = Lib.create("human");

        int st=b.getStat("ST");

        Thing p=Lib.create("potion of strength");
        Potion.drink(b,p);

        assertTrue(b.getStat("ST")>st);
    }

    public void testPotionOfRepair() {
        Thing rock = Lib.create("rock");
        rock.set("HPS",1);

        Thing pot=Lib.create("potion of perfect repair");
        Potion.dip(null,rock,pot);

        assertEquals(rock.getStat("HPSMAX"), rock.getStat("HPS"));
    }
}
package mikera.tyrant;

import mikera.tyrant.engine.Lib;
import mikera.tyrant.engine.Map;
import mikera.tyrant.engine.RPG;
import mikera.tyrant.engine.Script;
import mikera.tyrant.engine.Thing;
import mikera.util.Rand;

/**
 * Special map items and effects
 *
 * @author Mike
 *
 * To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
public class Special {
	public static void init() {
		Thing t=Lib.extend("base special","base thing");
        t.set("IsInvisible",1);
        t.set("IsDestructible",0);
        t.set("IsPhysical",0);
        t.set("ImageSource","Effects");
        t.set("LevelMin",1);
        t.set("Image",25);
        Lib.add(t);

        t=Lib.extend("message point","base special");
        t.set("IsInvisible",0);
        t.set("IsDestructible",0);
        t.set("IsMessagePoint", true);
        t.set("LevelMin",1);
        t.set("ImageSource","Effects");
        t.set("Image",40);
        t.set("Message","No message here!");
        t.set("OnEnterTrigger",new MessagePointAction());
        t.set("ASCII", "m");
        Lib.add(t);

		initStockingPoints();
		initPortalPoints();
		initBuilderPoints();
		initAIMarkers();
	}

	private static class MessagePointAction extends Script {
		private static final long serialVersionUID = 3905525999230595378L;

        public boolean handle(Thing t, Event e) {
			Thing tt=e.getThing("Target");
			if (!tt.isHero()) return false;
            tt.isRunning(false);
			if (tt.getMap().getFlag("IsHostile")) return false;

			// Game.warn("Message point at "+t.x+","+t.y);
			Game.message(t.getString("Message"));

			if (!Game.isDebug()) {
				Game.message("[Press space to continue]");
				for (char c=Game.getChar(); c!=' ';) {
                    c=Game.getChar();
                }
				Game.message("");
			}

			t.remove();
			return true;
		}
	}

	private static class CloudAction extends


BuilderForStage builder(forOp, schedule);
  Value zero = builder.create<arith::ConstantIntOp>(forOp.getLoc(), 0, 32);

  Operation *firstUse = getFirstUseOfPipelinedOp({loadOp}, forOp, schedule);
  assert(firstUse && "LoadOp has no users");
  // Replace the load with async copy, wait and loal_load.
  OpBuilder::InsertionGuard guard(builder);
  builder.setInsertionPoint(loadOp);
  builder.setStageCluster(schedule[loadOp]);
  Location loc = loadOp.getLoc();
  Value src = loadOp.getPtr();
  Value mask = loadOp.getMask();
  Value other = loadOp.getOther();
  ttg::MemDescType allocTy = cast<ttg::MemDescType>(alloc.getType());

  // Create async copy
  Value view = createSingleBufferView(builder, alloc, insertIdx);
  Operation *copy = builder.create<ttg::AsyncCopyGlobalToLocalOp>(
      loc, src, view, mask, other, loadOp.getCache(), loadOp.getEvict(),
      loadOp.getIsVolatile());
  Operation *commit =
      builder.create<ttg::AsyncCommitGroupOp>(loc, copy->getResult(0));

  // Create wait and local load
  builder.setStageCluster(schedule[firstUse]);
  auto wait = builder.create<ttg::AsyncWaitOp>(loc, commit->getResult(0), 0);
  auto viewLoad = createSingleBufferView(builder, alloc, extractIdx);

  if (!loadOp.getOther() || isZeroConst(loadOp.getOther())) {
    // If masking isn't required, load directly from shared
    replaceUsesWithLocalLoad(builder, loadOp->getResult(0), viewLoad,
                             wait.getResult());
  } else if (loadOp->use_begin() != loadOp->use_end()) {
    // Otherwise, create a select for non-zero other values as they are not
    // handled by AsyncCopyGlobalToLocalOp for now.
    auto sharedLoad = builder.create<ttg::LocalLoadOp>(
        loc, loadOp.getType(), viewLoad, wait.getResult());
    auto select = builder.create<arith::SelectOp>(
        loc, loadOp.getType(),
        // Use the mask operand from the original load, not the one with a
        // potentially transformed layout.
        loadOp.getMask(), sharedLoad.getResult(), other);
    loadOp->replaceAllUsesWith(select->getResults());
  }
  schedule.erase(loadOp);
  loadOp->erase();
}

void createTMAAsyncCopy(
    scf::ForOp forOp, Operation *loadOp, Value desc, Value alloc,
    Value insertIdx, Value extractIdx, Value barrier, Operation *waitOp,
    CoarseSchedule &schedule,
    function_ref<void(OpBuilderForStage &, Value, Value, Value, Value)>
        createCopy) {
  OpBuilderForStage builder(forOp, schedule);
  Value zero = builder.create<arith::ConstantIntOp>(forOp.getLoc(), 0, 32);

  Operation *firstUse = getFirstUseOfPipelinedOp({loadOp}, forOp, schedule);
  assert(firstUse && "LoadOp has no users");
  Attribute sharedMemorySpace =
      ttg::SharedMemorySpaceAttr::get(forOp.getContext());
  Location loc = loadOp->getLoc();

  builder.setInsertionPoint(loadOp);
  builder.setStageCluster(schedule[loadOp]);
  ttg::MemDescType allocTy = cast<ttg::MemDescType>(alloc.getType());

  // Create async copy
  Value view = createSingleBufferView(builder, alloc, insertIdx);

  Value pred = builder.create<arith::ConstantIntOp>(loc, 1, 1);
  Value tmaPtr =
      builder.create<triton::nvidia_gpu::TensorDescToTMAPtrOp>(loc, desc);
  createCopy(builder, tmaPtr, barrier, view, pred);

  // Create local load after the wait
  builder.setInsertionPointAfter(waitOp);
  builder.setStageCluster(schedule[firstUse]);
  auto viewLoad = createSingleBufferView(builder,


destructor,
    HTMLElement_cpc,
    HTMLElement_clone,
    HTMLElement_handle_event,
    HTMLElement_get_attr_col,
    NULL,
    NULL,
    NULL,
    NULL,
    HTMLScriptElement_get_readystate,
    NULL,
    NULL,
    HTMLScriptElement_bind_to_tree,
    HTMLScriptElement_traverse,
    HTMLScriptElement_unlink
};

HRESULT script_elem_from_nsscript(nsIDOMHTMLScriptElement *nsscript, HTMLScriptElement **ret)
{
    nsIDOMNode *nsnode;
    HTMLDOMNode *node;
    nsresult nsres;
    HRESULT hres;

    nsres = nsIDOMHTMLScriptElement_QueryInterface(nsscript, &IID_nsIDOMNode, (void**)&nsnode);
    assert(nsres == NS_OK);

    hres = get_node(nsnode, TRUE, &node);
    nsIDOMNode_Release(nsnode);
    if(FAILED(hres))
        return hres;

    assert(node->vtbl == &HTMLScriptElementImplVtbl);
    *ret = impl_from_HTMLDOMNode(node);
    return S_OK;
}

static const tid_t HTMLScriptElement_iface_tids[] = {
    HTMLELEMENT_TIDS,
    IHTMLScriptElement_tid,
    0
};

static dispex_static_data_t HTMLScriptElement_dispex = {
    L"HTMLScriptElement",
    NULL,
    DispHTMLScriptElement_tid,
    HTMLScriptElement_iface_tids,
    HTMLElement_init_dispex_info
};

HRESULT HTMLScriptElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
    HTMLScriptElement *ret;
    nsresult nsres;

    ret = heap_alloc_zero(sizeof(HTMLScriptElement));
    if(!ret)
        return E_OUTOFMEMORY;

    ret->IHTMLScriptElement_iface.lpVtbl = &HTMLScriptElementVtbl;
    ret->element.node.vtbl = &HTMLScriptElementImplVtbl;

    HTMLElement_Init(&ret->element, doc, nselem, &HTMLScriptElement_dispex);

    nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLScriptElement, (void**)&ret->nsscript);
    assert(nsres == NS_OK);

    *elem = &ret->element;
    return S_OK;
}


id="9045" href="Relation.Binary.Bundles.html#1098" class="Field Operator">_≈_; refl)
  open Membership S using (_∈_)

  ∈-applyUpTo⁺ : ∀ f {i n} → i < n → f i ∈ applyUpTo f n
  ∈-applyUpTo⁺ f = Any.applyUpTo⁺ f refl

  ∈-applyUpTo⁻ <a id="9203


final String? errorMessage_;

  @ColumnInfo(name: 'error_code')
  // ignore: non_constant_identifier_names
  final String? errorCode_;

  @ColumnInfo(name: 'error_stackTrace')
  // ignore: non_constant_identifier_names
  final String? errorStackTrace_;
}

enum TrackingResponseStatus {
  @JsonValue('success')
  success,

  @JsonValue('fail')
  fail,

  @JsonValue('noInfo')
  noInfo,

  @JsonValue('trackingStopped')
  trackingStopped,
}

enum TrackingErrorType {
  @JsonValue('unknown')
  unknown,

  @JsonValue('network')
  network,

  @JsonValue('service')
  service,

  @JsonValue('auth')
  auth,

  @JsonValue('invalidTrackNumber')
  invalidTrackNumber,

  @JsonValue('missingAuthData')
  missingAuthData,

  @JsonValue('missingTrackingService')
  missingTrackingService,
}

@freezed
class TrackingError with _$TrackingError {
  const factory TrackingError({
    required TrackingErrorType type,
    required bool isRetryable,
    String? message,
    String? code,
    String? stackTrace,
  }) = _TrackingError;

  factory TrackingError.fromJson(Map<String, dynamic> json) =>
      _$TrackingErrorFromJson(json);
}
// Copyright (C) 2021 Yaroslav Pronin <proninyaroslav@mail.ru>
// Copyright (C) 2021 Insurgo Inc. <insurgo@riseup.net>
//
// This file is part of LibreTrack.
//
// LibreTrack is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// LibreTrack is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with LibreTrack.  If not, see <http://www.gnu.org/licenses/>.

part of 'model.dart';

class ParcelsFilterBatch extends Equatable with IterableMixin<ParcelsFilter?> {
  final Map<String, ParcelsFilter?> _filters;

  ParcelsFilterBatch() : _filters = {};

  ParcelsFilterBatch.from(ParcelsFilterBatch other) : _filters = {} {
    _filters.addAll(other._filters);
  }

  set statusFilter(ParcelsFilter? filter) {
    assert(filter == null || filter is ParcelsFilterStatus);
    _filters['status'] = filter;
  }

  ParcelsFilterStatus? get statusFilter {
    return _filters['status'] as ParcelsFilterStatus?;
  }

  set newInfoFilter(ParcelsFilter? filter) {
    assert(filter == null || filter is ParcelsFilterNewInfo);
    _filters['newInfo'] = filter;
  }

  ParcelsFilterNewInfo? get newInfoFilter {
    return _filters['newInfo'] as ParcelsFilterNewInfo?;
  }

  set errorFilter(ParcelsFilter? filter) {
    assert(filter == null || filter is ParcelsFilterError);
    _filters['error'] = filter;
  }

  ParcelsFilterError? get errorFilter {
    return _filters['error'] as ParcelsFilterError?;
  }

  set postalServiceFilter(ParcelsFilter? filter) {
    assert(filter == null || filter is ParcelsFilterPostalService);
    _filters['postalService'] = filter;
  }

  ParcelsFilterPostalService? get postalServiceFilter {
    return _filters['postalService'] as ParcelsFilterPostalService?;
  }

  @override
  List<Object> get props => [_filters];

  @override
  bool get stringify => true;

  @override
  Iterator<ParcelsFilter?> get iterator => _filters.values.iterator;

  Parcels


      t0 = t1, t1 = t1._next;
    } else {
      t2 = t1._next, t1._next = null;
      t1 = t0 ? t0._next = t2 : taskHead = t2;
    }
  }
  taskTail = t0;
  sleep(time);
}

function sleep(time) {
  if (frame) return; // Soonest alarm already set, or will be.
  if (timeout) timeout = clearTimeout(timeout);
  var delay = time - clockNow; // Strictly less than if we recomputed clockNow.
  if (delay > 24) {
    if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);
    if (interval) interval = clearInterval(interval);
  } else {
    if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);
    frame = 1, setFrame(wake);
  }
}

function timeout$1(callback, delay, time) {
  var t = new Timer;
  delay = delay == null ? 0 : +delay;
  t.restart(function(elapsed) {
    t.stop();
    callback(elapsed + delay);
  }, delay, time);
  return t;
}

function interval$1(callback, delay, time) {
  var t = new Timer, total = delay;
  if (delay == null) return t.restart(callback, delay, time), t;
  delay = +delay, time = time == null ? now() : +time;
  t.restart(function tick(elapsed) {
    elapsed += total;
    t.restart(tick, total += delay, time);
    callback(elapsed);
  }, delay, time);
  return t;
}

var emptyOn = dispatch("start", "end", "interrupt");
var emptyTween = [];

var CREATED = 0;
var SCHEDULED = 1;
var STARTING = 2;
var STARTED = 3;
var RUNNING = 4;
var ENDING = 5;
var ENDED = 6;

function schedule(node, name, id, index, group, timing) {
  var schedules = node.__transition;
  if (!schedules) node.__transition = {};
  else if (id in schedules) return;
  create$1(node, id, {
    name: name,
    index: index, // For context during callback.
    group: group, // For context during callback.
    on: emptyOn,
    tween: emptyTween,
    time: timing.time,
    delay: timing.delay,
    duration: timing.duration,
    ease: timing.ease,
    timer: null,
    state: CREATED
  });
}

function init(node, id) {
  var schedule = get$1(node, id);
  if (schedule.state > CREATED) throw new Error("too late; already scheduled");
  return schedule;
}

function set$1(node, id) {
  var schedule = get$1(node, id);
  if (schedule.state > STARTING) throw new Error("too late; already started");
  return schedule;
}

function get$1(node, id) {
  var schedule = node.__transition;
  if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found");
  return schedule;
}

function create$1(node, id, self) {
  var schedules = node.__transition,
      tween;

  // Initialize the self timer when the transition is created.
  // Note the actual delay is not known until the first callback!
  schedules[id] = self;
  self.timer = timer(schedule, 0, self.time);

  function schedule(elapsed) {
    self.state = SCHEDULED;
    self.timer.restart(start, self.delay, self.time);

    // If the elapsed delay is less than our first sleep, start immediately.
    if (self.delay <= elapsed) start(elapsed - self.delay);
  }

  function start(elapsed) {
    var i, j, n, o;

    // If the state is not SCHEDULED, then we previously errored on start.
    if (self.state !==


 for watchers.
	DefaultRefreshRate = 30 * time.Second
)

func NewWatcherManager() *WatcherManager {
	return &WatcherManager{
		Watchers: []IWatcher{
			endpoint.Watcher(),
			apiserver.Watcher(),
		},
		l:           log.Logger().Named("watcher-manager"),
		refreshRate: DefaultRefreshRate,
	}
}

func (wm *WatcherManager) Start(ctx context.Context) error {
	newCtx, cancelCtx := context.WithCancel(ctx)
	wm.cancel = cancelCtx

	for _, w := range wm.Watchers {
		if err := w.Init(ctx); err != nil {
			wm.l.Error("init failed", zap.String("watcher_type", fmt.Sprintf("%T", w)), zap.Error(err))
			return err
		}
		wm.wg.Add(1)
		go wm.runWatcher(newCtx, w)
		wm.l.Info("watcher started", zap.String("watcher_type", fmt.Sprintf("%T", w)))
	}
	return nil
}

func (wm *WatcherManager) Stop(ctx context.Context) error {
	if wm.cancel != nil {
		wm.cancel() // cancel all runWatcher
	}
	for _, w := range wm.Watchers {
		if err := w.Stop(ctx); err != nil {
			wm.l.Error("failed to stop", zap.String("watcher_type", fmt.Sprintf("%T", w)), zap.Error(err))
			return err
		}
	}
	wm.wg.Wait() // wait for all runWatcher to stop
	wm.l.Info("watcher manager stopped")
	return nil
}

func (wm *WatcherManager) runWatcher(ctx context.Context, w IWatcher) error {
	defer wm.wg.Done() // signal that this runWatcher is done
	ticker := time.NewTicker(wm.refreshRate)
	defer ticker.Stop()
	for {
		select {
		case <-ctx.Done():
			wm.l.Info("watcher stopping...", zap.String("watcher_type", fmt.Sprintf("%T", w)))
			return nil
		case <-ticker.C:
			err := w.Refresh(ctx)
			if err != nil {
				wm.l.Error("refresh failed", zap.Error(err))
				return err
			}
		}
	}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

package filtermanager

import (
	"net"
	"sync"

	"github.com/microsoft/retina/pkg/log"
	"github.com/microsoft/retina/pkg/plugin/filter"
	"github.com/microsoft/retina/pkg/utils"
	"github.com/pkg/errors"
	"go.uber.org/zap"
)

var (
	f    *FilterManager
	once sync.Once
)

type FilterManager struct {
	mu sync.Mutex
	l  *log.ZapLogger
	c  ICache
	fm filter.IFilterMap
	// retry is the number of times to retry adding/deleting IPs to/from the filter map.
	retry int
}

// Init returns a new instance of FilterManager.
// It is a singleton.
// retry is the number of times to retry adding/deleting IPs to/from the filter map.
// Retry is exponential backoff with a base of 2. For example, retry=3 means:
// 1st try: 1 second
// 2nd try: 2 seconds
// 3rd try: 4 seconds
// Total time: 7 seconds
// The manager locks the cache during retry.
// Suggest to keep retry to a small number (not more than 3).
func Init(retry int) (*FilterManager, error) {
	var err err


n1._.mutable["x"].append("y")
    assert len(token1._.mutable) == 2
    assert token1._.mutable["x"] == ["y"]
    assert len(token2._.mutable) == 0

def test_underscore_dir(en_vocab):
    """Test that dir() correctly returns extension attributes. This enables
    things like tab-completion for the attributes in doc._."""
    Doc.set_extension("test_dir", default=None)
    doc = Doc(en_vocab, words=["hello", "world"])
    assert "_" in dir(doc)
    assert "test_dir" in dir(doc._)
    assert "test_dir" not in dir(doc[0]._)
    assert "test_dir" not in dir(doc[0:2]._)

def test_underscore_docstring(en_vocab):
    """Test that docstrings are available for extension methods, even though
    they're partials."""

    def test_method(doc, arg1=1, arg2=2):
        """I am a docstring"""
        return (arg1, arg2)

    Doc.set_extension("test_docstrings", method=test_method)
    doc = Doc(en_vocab, words=["hello", "world"])
    assert test_method.__doc__ == "I am a docstring"
    assert doc._.test_docstrings.__doc__.rsplit(". ")[-1] == "I am a docstring"


flex;align-items:center;justify-content:center;cursor:pointer;background:rgba(0, 0, 0, 0.3);color:#fff;}.amis-scope .cxd-ImageGallery-prevList.is-disabled,.amis-scope .cxd-ImageGallery-nextList.is-disabled{background:rgba(0, 0, 0, 0.3);color:rgba(255, 255, 255, 0.1);pointer-events:none;}.amis-scope .cxd-ImageGallery-prevList:hover,.amis-scope .cxd-ImageGallery-nextList:hover{background:black;color:#fff;}.amis-scope .cxd-ImageGallery-itemsWrap{flex-grow:1;flex-basis:0;width:0;overflow-x:auto;overflow-y:hidden;align-items:flex-start;justify-content:flex-start;display:flex;scrollbar-width:thin;scrollbar-color:#111 transparent;}.amis-scope .cxd-ImageGallery-itemsWrap::-webkit-scrollbar{background-color:transparent;width:6px;height:6px;overflow:visible;height:10px !important;}.amis-scope .cxd-ImageGallery-itemsWrap ::-webkit-scrollbar-track{background-color:transparent;}.amis-scope .cxd-ImageGallery-itemsWrap::-webkit-scrollbar-thumb{width:6px;height:6px;background-color:#111;border-radius:6px;border:4px solid transparent;}.amis-scope .cxd-ImageGallery-itemsWrap::-webkit-scrollbar-thumb:hover{background-color:#000;}.amis-scope .cxd-ImageGallery-itemsWrap::-webkit-scrollbar-button{display:none;}.amis-scope .cxd-ImageGallery-items{display:inline-block;white-space:nowrap;margin:0 auto;}.amis-scope .cxd-ImageGallery-item{margin:10px 5px 0;width:54px;height:54px;display:inline-flex;position:relative;border:1px solid #666;justify-content:center;align-items:center;cursor:pointer;}.amis-scope .cxd-ImageGallery-item > img{display:block;max-width:100%;max-height:100%;}@supports (object-fit: cover){.amis-scope .cxd-ImageGallery-item > img{width:100%;height:100%;object-fit:cover;}}.amis-scope .cxd-ImageGallery-item:after{position:absolute;content:"";display:block;background:rgba(0, 0, 0, 0.5);z-index:1;left:0;top:0;width:100%;height:100%;}.amis-scope .cxd-ImageGallery-item:hover{border:1px solid #e5e5e5;}.amis-scope .cxd-ImageGallery-item:hover:after{display:none;}.amis-scope .cxd-ImageGallery-item.is-active{border:1px solid #2468f2;}.amis-scope .cxd-ImageGallery-item.is-active:after{display:none;}.amis-scope .ImageGallery-prevBtn{content:'<svg viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="currentColor" fill-rule="evenodd"><polyline stroke="currentColor" transform="translate(10.496854, 8.006854) rotate(-135.000000) translate(-10.496854, -8.006854) " points="6.49685425 4.00685425 14.4968542 4.00685425 14.4968542 12.0068542" stroke-width="1" fill="none" stroke-linecap="butt" stroke-linejoin="round"/></g></svg>';}.amis-scope .ImageGallery-nextBtn{content:'<svg viewBox="0 0 16 16" version="1.1"


minc_con
fminc_cnan:
	cmpib	#0x60,%d0			|check if stag is NaN
	bnes	fminc_czero
	orl	#nan_mask,USER_FPSR(%a6) |if nan, nothing yet has set NaN
	movel	ETEMP_EX(%a6),FPTEMP_EX(%a6)	|set up fptemp sign for
|						;snan handler
	tstw	LOCAL_EX(%a0)		|check sign
	bges	fminc_con
	orl	#neg_mask,USER_FPSR(%a6)
	bra	fminc_con
fminc_czero:
	cmpib	#0x20,%d0			|check if zero
	bnes	fminc_con
	orl	#z_mask,USER_FPSR(%a6)	|if zero, set Z
	tstw	LOCAL_EX(%a0)		|check sign
	bges	fminc_con
	orl	#neg_mask,USER_FPSR(%a6)
fminc_con:
	bfextu	CMDREG1B(%a6){#6:#3},%d0	|extract fp destination register
	cmpib	#3,%d0
	bles	fp0123			|check if dest is fp0-fp3
	movel	#7,%d1
	subl	%d0,%d1
	clrl	%d0
	bsetl	%d1,%d0
	fmovemx ETEMP(%a6),%d0
	rts

fp0123:
	cmpib	#0,%d0
	beqs	fp0_dst
	cmpib	#1,%d0
	beqs	fp1_dst
	cmpib	#2,%d0
	beqs	fp2_dst
fp3_dst:
	movel	ETEMP_EX(%a6),USER_FP3(%a6)
	movel	ETEMP_HI(%a6),USER_FP3+4(%a6)
	movel	ETEMP_LO(%a6),USER_FP3+8(%a6)
	rts
fp2_dst:
	movel	ETEMP_EX(%a6),USER_FP2(%a6)
	movel	ETEMP_HI(%a6),USER_FP2+4(%a6)
	movel	ETEMP_LO(%a6),USER_FP2+8(%a6)
	rts
fp1_dst:
	movel	ETEMP_EX(%a6),USER_FP1(%a6)
	movel	ETEMP_HI(%a6),USER_FP1+4(%a6)
	movel	ETEMP_LO(%a6),USER_FP1+8(%a6)
	rts
fp0_dst:
	movel	ETEMP_EX(%a6),USER_FP0(%a6)
	movel	ETEMP_HI(%a6),USER_FP0+4(%a6)
	movel	ETEMP_LO(%a6),USER_FP0+8(%a6)
	rts

opclass3:
	st	CU_ONLY(%a6)
	movew	CMDREG1B(%a6),%d0	|check if packed moveout
	andiw	#0x0c00,%d0	|isolate last 2 bits of size field
	cmpiw	#0x0c00,%d0	|if size is 011 or 111, it is packed
	beq	pack_out	|else it is norm or denorm
	bra	mv_out

|
|	MOVE OUT
|

mv_tbl:
	.long	li
	.long	sgp
	.long	xp
	.long	mvout_end	|should never be taken
	.long	wi
	.long	dp
	.long	bi
	.long	mvout_end	|should never be taken
mv_out:
	bfextu	CMDREG1B(%a6){#3:#3},%d1	|put source specifier in d1


的`sel="/tr[0]"`，会被当做`sel="#usersTable/tr[0]"`处理。用于用户名`<td>`的选择器会被当做`sel="#usersTable/tr[0]//td.username"`处理。

因此，一旦合并，上面看到的两个文件会等同于：
```html
<!DOCTYPE html>
<html>
  <body>
    <table id="usersTable" th:remove="all-but-first">
      <tr th:each="user : ${users}">
        <td class="username" th:text="${user.name}">Jeremy Grapefruit</td>
        <td class="usertype" th:text="#{|user.type.${user.type}|}">Normal User</td>
      </tr>
      <tr>
        <td class="username">Alice Watermelon</td>
        <td class="usertype">Administrator</td>
      </tr>
    </table>
  </body>
</html>
```
这看起来更为熟悉，比起创建两个独立的文件，也确实更加简单。但是，解耦的模板的优势在于我们能够给予模板完全的自由。因此，从设计的观点来看，有更好的可维护性。

当然，设计者和开发人员之间还是需要某些协议。比如，用户`<table>`需要一个`id="usersTable"`。但是，在许多的场景下，纯HTML模板更易于设计团队与开发团队之间的交流。
### 6.2 保持遍历状态

当使用`th:each`时，Thymeleaf提供了一种有用的机制来跟踪遍历的状态：状态变量。

状态变量定义在`th:each`属性里，并包含以下数据：

- 当前的遍历索引，从0开始。此为index属性。
- 当前的遍历索引，从1开始。此为count属性。
- 被遍历变量里的元素数量。此为size属性。
- 每次遍历的遍历变量。此为current属性。
- 当前的遍历是偶数次还是奇数次。此为even/odd布尔属性。
- 当前是否为首次遍历。此为first布尔属性。
- 当前是否为最后一次遍历。此为last布尔属性。

让我们看看怎么在之前的例子里使用它：
```html
<table>
  <tr>
    <th>NAME</th>
    <th>PRICE</th>
    <th>IN STOCK</th>
  </tr>
  <tr th:each="prod,iterStat : ${prods}" th:class="${iterStat.odd}? 'odd'">
    <td th:text="${prod.name}">Onions</td>
    <td th:text="${prod.price}">2.41</td>
    <td th:text="${prod.inStock}? #{true} : #{false}">yes</td>
  </tr>
</table>
```
状态变量（此例子里的`iterStat`）定义在`th:each`属性里，跟在遍历变量后面，由逗号分隔。就像遍历变量一样，状态变量的作用范围也是在由持有`th:each`属性的标签定义的代码片段之上。

让我们看一下处理我们的模版的结果：
```html
<!DOCTYPE html>

<html>

  <head>
    <title>Good Thymes Virtual Grocery</title>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
    <link rel="stylesheet" type="text/css" media="all" href="/gtvg/css/gtvg.css" />
  </head>

  <body


 () {
            l.renameSync(ns('/baz'));
          });
        });

        test('throwsIfDestinationExistsAsDirectory', () {
          var l = fs.link(ns('/foo'))..createSync(ns('/bar'));
          fs.directory(ns('/baz')).createSync();
          expectFileSystemException(ErrorCodes.EINVAL, () {
            l.renameSync(ns('/baz'));
          });
        });

        test('succeedsIfDestinationExistsAsLinkToFile', () {
          var l = fs.link(ns('/foo'))..createSync(ns('/bar'));
          fs.file(ns('/baz')).createSync();
          fs.link(ns('/qux')).createSync(ns('/baz'));
          l.renameSync(ns('/qux'));
          expect(fs.typeSync(ns('/foo')), FileSystemEntityType.notFound);
          expect(fs.typeSync(ns('/baz'), followLinks: false),
              FileSystemEntityType.file);
          expect(fs.typeSync(ns('/qux'), followLinks: false),
              FileSystemEntityType.link);
          expect(fs.link(ns('/qux')).targetSync(), ns('/bar'));
        });

        test('throwsIfDestinationExistsAsLinkToDirectory', () {
          var l = fs.link(ns('/foo'))..createSync(ns('/bar'));
          fs.directory(ns('/baz')).createSync();
          fs.link(ns('/qux')).createSync(ns('/baz'));
          l.renameSync(ns('/qux'));
          expect(fs.typeSync(ns('/foo')), FileSystemEntityType.notFound);
          expect(fs.typeSync(ns('/baz'), followLinks: false),
              FileSystemEntityType.directory);
          expect(fs.typeSync(ns('/qux'), followLinks: false),
              FileSystemEntityType.link);
          expect(fs.link(ns('/qux')).targetSync(), ns('/bar'));
        });

        test('succeedsIfDestinationExistsAsLinkToNotFound', () {
          var l = fs.link(ns('/foo'))..createSync(ns('/bar'));
          fs.link(ns('/baz')).createSync(ns('/qux'));
          l.renameSync(ns('/baz'));
          expect(fs.typeSync(ns('/foo')), FileSystemEntityType.notFound);
          expect(fs.typeSync(ns('/baz'), followLinks: false),
              FileSystemEntityType.link);
          expect(fs.link(ns('/baz')).targetSync(), ns('/bar'));
        });
      });
    });
  });
}
// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:convert';

import 'ast.dart';
import 'block_syntaxes/block_syntax.dart';
import 'document.dart';
import 'extension_set.dart';
import 'inline_syntaxes/inline_syntax.dart';

/// Converts the given string of Markdown to HTML.
String markdownToHtml(
  String markdown, {
  Iterable<BlockSyntax> blockSyntaxes = const [],
  Iterable<InlineSyntax> inlineSyntaxes = const [],
  ExtensionSet? extensionSet,
  Resolver? linkResolver,
  Resolver? imageLinkResolver,
  bool inlineOnly = false,
  bool encodeHtml = true,
  bool enableTagfilter = false,
  bool withDefaultBlockSyntaxes = true,
  bool withDefaultInlineSyntaxes = true,
}) {
  final document = Document(
    blockSyntaxes: blockSyntaxes,
    inlineSyntaxes: inlineSyntaxes,
    extensionSet: extensionSet,
    linkResolver: linkResolver,
    imageLinkResolver: imageLinkResolver,
    encodeHtml: encodeHtml,
    withDefaultBlockSyntaxes: withDefau


", DisplayTotal: "$0.00 USD"},
	},
	{
		// check one payment, no currency
		payments: []libkb.MiniChatPayment{
			{Username: libkb.NewNormalizedUsername("alice"), Amount: "1"},
		},
		summary: libkb.MiniChatPaymentSummary{
			Specs: []libkb.MiniChatPaymentSpec{
				{Username: libkb.NewNormalizedUsername("alice"), XLMAmount: "1 XLM"},
			},
			XLMTotal:     "1 XLM",
			DisplayTotal: "$0.32 USD",
		},
	},
	{
		// check one payment, XLM currency
		payments: []libkb.MiniChatPayment{
			{Username: libkb.NewNormalizedUsername("alice"), Amount: "1", Currency: "XLM"},
		},
		summary: libkb.MiniChatPaymentSummary{
			Specs: []libkb.MiniChatPaymentSpec{
				{Username: libkb.NewNormalizedUsername("alice"), XLMAmount: "1 XLM"},
			},
			XLMTotal:     "1 XLM",
			DisplayTotal: "$0.32 USD",
		},
	},
	{
		// check one payment, USD currency
		payments: []libkb.MiniChatPayment{
			{Username: libkb.NewNormalizedUsername("alice"), Amount: "1", Currency: "USD"},
		},
		summary: libkb.MiniChatPaymentSummary{
			Specs: []libkb.MiniChatPaymentSpec{
				{
					Username:      libkb.NewNormalizedUsername("alice"),
					XLMAmount:     "3.1414139 XLM",
					DisplayAmount: "$1.00 USD",
				},
			},
			XLMTotal:     "3.1414139 XLM",
			DisplayTotal: "$1.00 USD",
		},
	},
	{
		// check multiple payments
		payments: []libkb.MiniChatPayment{
			{Username: libkb.NewNormalizedUsername("alice"), Amount: "1", Currency: "USD"},
			{Username: libkb.NewNormalizedUsername("bob"), Amount: "9.12", Currency: "XLM"},
		},
		summary: libkb.MiniChatPaymentSummary{
			Specs: []libkb.MiniChatPaymentSpec{
				{
					Username:      libkb.NewNormalizedUsername("alice"),
					XLMAmount:     "3.1414139 XLM",
					DisplayAmount: "$1.00 USD",
				},
				{
					Username:  libkb.NewNormalizedUsername("bob"),
					XLMAmount: "9.1200000 XLM",
				},
			},
			XLMTotal:     "12.2614139 XLM",
			DisplayTotal: "$3.90 USD",
		},
	},
	{
		// check that the order of the results is the order of the payments argument
		payments: []libkb.MiniChatPayment{
			{Username: libkb.NewNormalizedUsername("bob"), Amount: "9.12", Currency: "XLM"},
			{Username: libkb.NewNormalizedUsername("alice"), Amount: "1", Currency: "USD"},
		},
		summary: libkb.MiniChatPaymentSummary{
			Specs: []libkb.MiniChatPaymentSpec{
				{
					Username:  libkb.NewNormalizedUsername("bob"),
					XLMAmount: "9.1200000 XLM",
				},
				{
					Username:      libkb.NewNormalizedUsername("alice"),
					XLMAmount:     "3.1414139 XLM",
					DisplayAmount: "$1.00 USD",
				},
			},
			XLMTotal:     "12.2614139 XLM",
			DisplayTotal: "$3.90 USD",
		},
	},
	{
		// check that an invalid currency returns an error in the spec
		payments: []libkb.MiniChatPayment{
			{Username: libkb.NewNormalizedUsername("alice"), Amount: "1", Currency: "USD"},
			{Userna


 connection clean?
      int state_result= ACE::handle_ready (sh->peer ().get_handle (),
                                           &ACE_Time_Value::zero,
                                           1, // read ready
                                           0, // write ready
                                           1);// exception ready

      if (state_result == 1)
        {
          // The connection was disconnected during idle.
          // close the svc_handler down.
          if (sh->close () == -1)
            {
              ACE_ASSERT (0);
              return -1;
            }
          sh = 0;
          // and rotate once more...
        }
      else if ((state_result == -1) && (errno == ETIME))
        {
          // Found!!!
          // Set the flag
          found = 1;

          // Tell the <svc_handler> that it should prepare itself for
          // being recycled.
          if (this->prepare_for_recycling (sh) == -1)
            {
              ACE_ASSERT (0);
              return -1;
            }

          return 0;
        }
      else  // some other return value or error...
        {
          ACE_ASSERT (0); // just to see it coming

          ACE_ERROR ((LM_ERROR,
                      ACE_TEXT ("(%t)ACE_Bounded_Cached_Connect_Strategy<>::")
                      ACE_TEXT ("find_or_create_svc_handler_i - ")
                      ACE_TEXT ("error polling server socket state.\n")));

          return -1;
        }
    }

  // Not found...

  // Set the flag
  found = 0;

  // Check the limit of handlers...
  if ((this->max_size_ > 0) &&
      (this->connection_cache_.current_size () >= this->max_size_))
    {
      // Try to purge idle connections
      if (this->purge_connections () == -1)
        return -1;

      // Check limit again.
      if (this->connection_cache_.current_size () >= this->max_size_)
        // still too much!
        return -1;

      // OK, we have room now...
    }

  // We need to use a temporary variable here since we are not
  // allowed to change <sh> because other threads may use this
  // when we let go of the lock during the OS level connect.
  //
  // Note that making a new svc_handler, connecting remotely,
  // binding to the map, and assigning of the hint and recycler
  // should be atomic to the outside world.
  SVC_HANDLER *potential_handler = 0;

  // Create a new svc_handler
  if (this->make_svc_handler (potential_handler) == -1)
    return -1;

  // Connect using the svc_handler.
  if (this->cached_connect (potential_handler,
                            remote_addr,
                            timeout,
                            local_addr,
                            reuse_addr,
                            flags,
                            perms) == -1)
    {
      // Close the svc handler.
      potential_handler->close (0);
      return -1;
    }
  else
    {
      // Insert the new SVC_HANDLER instance into the cache.
      if (this->connection_cache_.bind (search_addr,
                                        potential_handler,
                                        entry) == -1)
        {
          // Close the svc handler and reset <sh>.
          potential_handler->close (0);

          return -1;
        }

      // Everything succeeded as planned. Assign <sh> to
      // <p


sp - 1)];
  h$sp -= 18;
  var c = ((((a >>> 1) > 120) || (((a >>> 1) == 120) && ((a & 1) >= 1))) ? 1 : 0);
  if((c === 1))
  {
    var d = ((((a >>> 1) < 121) || (((a >>> 1) == 121) && ((a & 1) <= 1))) ? 1 : 0);
    if((d === 1))
    {
      var e = ((((b >>> 1) > 64) || (((b >>> 1) == 64) && ((b & 1) >= 0))) ? 1 : 0);
      if((e === 1))
      {
        var f = ((((b >>> 1) < 95) || (((b >>> 1) == 95) && ((b & 1) <= 1))) ? 1 : 0);
        if((f === 1))
        {
          h$sp += 16;
          ++h$sp;
          return h$$qa;
        }
        else
        {
          h$sp += 17;
          ++h$sp;
          return h$$qj;
        };
      }
      else
      {
        h$sp += 17;
        ++h$sp;
        return h$$qj;
      };
    }
    else
    {
      h$sp += 17;
      ++h$sp;
      return h$$qj;
    };
  }
  else
  {
    h$sp += 17;
    ++h$sp;
    return h$$qj;
  };
};
function h$$qh()
{
  var a = h$stack[(h$sp - 18)];
  var b = h$stack[(h$sp - 17)];
  var c = h$stack[(h$sp - 16)];
  var d = h$stack[(h$sp - 15)];
  var e = h$stack[(h$sp - 14)];
  var f = h$stack[(h$sp - 13)];
  var g = h$stack[(h$sp - 12)];
  var h = h$stack[(h$sp - 11)];
  var i = h$stack[(h$sp - 10)];
  var j = h$stack[(h$sp - 9)];
  var k = h$stack[(h$sp - 8)];
  var l = h$stack[(h$sp - 7)];
  var m = h$stack[(h$sp - 6)];
  var n = h$stack[(h$sp - 5)];
  var o = h$stack[(h$sp - 4)];
  var p = h$stack[(h$sp - 3)];
  var q = h$stack[(h$sp - 2)];
  var r = h$stack[(h$sp - 1)];
  h$sp -= 19;
  var s = p;
  if((s === 244))
  {
    var t = ((((q >>> 1) > 64) || (((q >>> 1) == 64) && ((q & 1) >= 0))) ? 1 : 0);
    if((t === 1))
    {
      var u = ((((q >>> 1) < 71) || (((q >>> 1) == 71) && ((q & 1) <= 1))) ? 1 : 0);
      if((u === 1))
      {
        var v = ((((r >>> 1) > 64) || (((r >>> 1) == 64) && ((r & 1) >= 0))) ? 1 : 0);
        if((v === 1))
        {
          var w = ((((r >>> 1) < 95) || (((r >>> 1) == 95) && ((r & 1) <= 1))) ? 1 : 0);
          if((w === 1))
          {
            h$sp += 16;
            ++h$sp;
            return h$$qa;
          }
          else
          {
            var x = h$c7(h$baseZCGHCziIOziBufferziBuffer_con_e, g, h, i, j, k, l, o);
            var y;
            var


 context,
            &*literal(2f64),
            &*literal(4f64),
            &*var("x"),
            "x",
        )
        .unwrap();

        assert!(cmp(result.to_f64(), 6f64));
    }

    #[test]
    fn test_integrate_complex() {
        let mut symbol_table = SymbolTable::new();
        let mut context = get_context(&mut symbol_table);
        let result = super::integrate(
            &mut context,
            &*literal(2f64),
            &ast::build_literal_ast(&KalkValue::Number(float!(3f64), float!(4f64), None)),
            &*binary(var("x"), Star, var("i")),
            "x",
        )
        .unwrap();

        assert!(cmp(result.to_f64(), -12f64));
        assert!(cmp(result.imaginary_to_f64(), -5.5f64));
    }
}
use crate::config::BucketIndexType;
use std::sync::atomic::{AtomicUsize, Ordering};

struct Counters {
    index: AtomicUsize,
}

pub struct UnitigLinksManager {
    links_data: Vec<Counters>,
    prefix_indexes: Vec<usize>,
    final_unitig_indexes_offset: usize,
}

impl UnitigLinksManager {
    pub fn new(buckets_count: usize) -> Self {
        UnitigLinksManager {
            links_data: (0..(buckets_count + 1))
                .map(|_| Counters {
                    index: AtomicUsize::new(0),
                })
                .collect(),
            prefix_indexes: vec![0; buckets_count + 2],
            final_unitig_indexes_offset: 0,
        }
    }

    pub fn compute_id_offsets(&mut self) {
        // Build the final ids offsets
        for i in 0..self.links_data.len() {
            self.prefix_indexes[i + 1] =
                self.prefix_indexes[i] + self.links_data[i].index.load(Ordering::Relaxed);
        }

        // Set the final unitigs offset
        self.final_unitig_indexes_offset = self.prefix_indexes[self.links_data.len() - 1];
    }

    #[inline(always)]
    #[track_caller]
    pub fn get_unitig_index(&self, bucket: BucketIndexType, index: usize) -> usize {
        self.prefix_indexes[bucket as usize] + index
    }

    #[inline(always)]
    #[track_caller]
    pub fn get_final_unitig_index(&self, index: usize) -> usize {
        self.final_unitig_indexes_offset + index
    }
}

pub struct ThreadUnitigsLinkManager<'a> {
    links_manager: &'a UnitigLinksManager,
    bucket_index: BucketIndexType,
    counter: usize,
}

impl<'a> ThreadUnitigsLinkManager<'a> {
    pub fn new(links_manager: &'a UnitigLinksManager, bucket: BucketIndexType) -> Self {
        Self {
            links_manager,
            bucket_index: bucket,
            counter: links_manager.links_data[bucket as usize]
                .index
                .load(Ordering::Relaxed),
        }
    }

    #[inline(always)]
    pub fn notify_add_read(&mut self) {
        self.counter += 1;
    }
}

impl<'a> Drop for ThreadUnitigsLinkManager<'a> {
    fn drop(&mut self) {
        self.links_manager.links_data[self.bucket_index as usize]
            .index
            .store(self.counter, Ordering::Relaxed);
    }
}
use crate::software_vault::SoftwareVault;
use crate::VaultError;
use ockam_core::Result;
use ockam_core::{async_trait, compat::boxed::Box};
use ockam_vault_core::{PublicKey, SecretType, Signature, Verifier, CURVE25519_PUBLIC_LENGTH};

#[async_trait]
impl Verifier for SoftwareVault {
    /// Verify signature
    async fn verify(
        &mut self,
        signature: &Signature


 update, provides a list of all pairs that have started to collide in the current tick (if any)
         * @param obj
         * @param name
         * @param callback
         */
        static on(obj:Engine, name:"collisionStart", callback:(e:any) => void ):void;

        /**
         * Fired when the mouse is down (or a touch has started) during the last step
         * @param obj
         * @param name
         * @param callback
         */
        static on(obj:Engine, name:"mousedown", callback:(e:any) => void ):void;

        /**
         * Fired when the mouse has moved (or a touch moves) during the last step
         * @param obj
         * @param name
         * @param callback
         */
        static on(obj:Engine, name:"mousemove", callback:(e:any) => void ):void;

        /**
         * Fired when the mouse is up (or a touch has ended) during the last step
         * @param obj
         * @param name
         * @param callback
         */
        static on(obj:Engine, name:"mouseup", callback:(e:any) => void ):void;

        /**
         * Fired after engine timing updated, but just before engine state updated
         * @param obj
         * @param name
         * @param callback
         */
        static on(obj:Engine, name:"tick", callback:(e:any) => void ):void;

        static on(obj:Engine, name:string, callback:(e:any) => void ):void;

        /**
         * Removes the given event callback. If no callback, clears all callbacks in eventNames. If no eventNames, clears all events.
         *
         * @param obj
         * @param eventName
         * @param callback
         */
        static off(obj:any, eventName:string, callback: (e:any) => void ):void;

        /**
         * Fires all the callbacks subscribed to the given object's eventName, in the order they subscribed, if any.
         *
         * @param object
         * @param eventNames
         * @param event
         */
        static trigger( object:any,  eventNames:string,  event: any ):void;

    }
}
input.onButtonPressed(Button.A, function () {
    sepet.change(LedSpriteProperty.X, -1)
})
input.onButtonPressed(Button.B, function () {
    sepet.change(LedSpriteProperty.X, 1)
})
let hak = 0
let sepet: game.LedSprite = null
let elma = game.createSprite(randint(0, 4), 0)
sepet = game.createSprite(2, 4)
let oyun = true
basic.forever(function () {
    while (oyun == true) {
        elma.change(LedSpriteProperty.Y, 1)
        basic.pause(500)
        if (elma.get(LedSpriteProperty.Y) == 4) {
            if (elma.isTouching(sepet)) {
                game.addScore(10)
            } else {
                hak += 1
                game.setScore(game.score() - -10)
            }
            if (hak == 0) {
                game.gameOver()
            }
            elma.set(LedSpriteProperty.X, randint(0, 4))
            elma.set(LedSpriteProperty.Y, 0)
        }
    }
})
import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit{
  title = '@InputDemo';
  msg : string = 'Hello Radhe Krishna...!';

  msgList : string[] = [
    "Hello",
    "Hi",
    "How are you?",
    "Good Morning",
    "Good Afternoon",
    "Good Evening",
    "Good Night"
  ];

  stateList : any[] = [
    {
      id : 11,
      code : 'GJ',
      desc : 'Gujarat'
    },
    {
      id : 12,
      code : 'MH',
      desc : 'Maharashtra'
    },
    {
      id: 13,
      code : 'MP',
      desc : 'Madhya Pradesh'


      hitItem = null;
      return hitItem;
    }
    hitItem = trackData.features!.firstOrNullWhere((feature) => feature.groupRect?.contains(position) ?? false);
    return hitItem;
  }

  @override
  bool hitTest(Offset position) {
    var item = findHitItem(position);
    if (item != null) return true;
    return super.hitTest(position);
  }

  @override
  bool painterChanged(AbstractTrackPainter painter) {
    return super.painterChanged(painter);
  }
}
import 'dart:async';
import 'dart:convert';
import 'dart:math';

import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter/services.dart' show rootBundle;
import 'package:flutter/widgets.dart';
import 'package:flutter_smart_genome/widget/track/common.dart';

import 'utils.dart';

import 'track_line_entry.dart';

typedef OnAnimationEnd();
typedef PaintCallback(bool lastFrame);
typedef ChangeEraCallback(TrackLineEntry era);
typedef ChangeHeaderColorCallback(Color background, Color text);

class Timeline {
  /// Some aptly named constants for properly aligning the Timeline view.
  static const double LineWidth = 2.0;
  static const double LineSpacing = 10.0;
  static const double DepthOffset = LineSpacing + LineWidth;

  static const double EdgePadding = 8.0;
  static const double MoveSpeed = 10.0;
  static const double MoveSpeedInteracting = 40.0;
  static const double Deceleration = 3.0;
  static const double GutterLeft = 45.0;
  static const double GutterLeftExpanded = 75.0;

  static const double EdgeRadius = 4.0;
  static const double MinChildLength = 50.0;
  static const double BubbleHeight = 50.0;
  static const double BubbleArrowSize = 19.0;
  static const double BubblePadding = 20.0;
  static const double BubbleTextHeight = 20.0;
  static const double AssetPadding = 30.0;
  static const double Parallax = 100.0;
  static const double AssetScreenScale = 0.3;

//  static const double InitialViewportPadding = 100.0;
//  static const double TravelViewportPaddingTop = 400.0;

  static const double ViewportPaddingTop = 0.0;
  static const double ViewportPaddingBottom = 0.0;
  static const int SteadyMilliseconds = 500;

  /// The current platform is initialized at boot, to properly initialize
  /// [ScrollPhysics] based on the platform we're on.
  late TargetPlatform _platform;

  late Range _totalRange;
  late Axis _orientation;

  double _start = 0.0;
  double _end = 0.0;
  late double _renderStart;
  late double _renderEnd;
  double _lastFrameTime = 0.0;
  double _height = 0.0;
  double _offsetDepth = 0.0;
  double _renderOffsetDepth = 0.0;

  double _simulationTime = 0.0;
  double _timeMin = 0.0;
  double _timeMax = 0.0;
  double _gutterWidth = GutterLeft;

  bool _showFavorites = false;
  bool _isFrameScheduled = false;
  bool _isInteracting = false;
  bool _isScaling = false;
  bool _isActive = false;
  bool _isSteady = false;

  HeaderColors? _currentHeaderColors;

  Color? _headerTextColor;
  Color? _headerBackgroundColor;

  /// Depending on the current [Platform], different values are initialized
  /// so that they behave properly on iOS&Android.
  ScrollPhysics? _scrollPhysics;

  /// [_scrollPhysics] needs a [ScrollMetrics] value to function.
  ScrollMetrics? _scrollMetrics;
  Simulation? _scrollSimulation;

  EdgeInsets padding = EdgeInsets.zero;
  EdgeInsets devicePadding = EdgeInsets.zero;

  Tim


FALSE(Some.isSingleElement());
  EXPECT_FALSE(Wrap.isSingleElement());
}

TEST_F(ConstantRangeTest, GetSetSize) {
  EXPECT_EQ(Full.getSetSize(), APInt(17, 65536));
  EXPECT_EQ(Empty.getSetSize(), APInt(17, 0));
  EXPECT_EQ(One.getSetSize(), APInt(17, 1));
  EXPECT_EQ(Some.getSetSize(), APInt(17, 0xaa0));

  ConstantRange Wrap(APInt(4, 7), APInt(4, 3));
  ConstantRange Wrap2(APInt(4, 8), APInt(4, 7));
  EXPECT_EQ(Wrap.getSetSize(), APInt(5, 12));
  EXPECT_EQ(Wrap2.getSetSize(), APInt(5, 15));
}

TEST_F(ConstantRangeTest, GetMinsAndMaxes) {
  EXPECT_EQ(Full.getUnsignedMax(), APInt(16, UINT16_MAX));
  EXPECT_EQ(One.getUnsignedMax(), APInt(16, 0xa));
  EXPECT_EQ(Some.getUnsignedMax(), APInt(16, 0xaa9));
  EXPECT_EQ(Wrap.getUnsignedMax(), APInt(16, UINT16_MAX));

  EXPECT_EQ(Full.getUnsignedMin(), APInt(16, 0));
  EXPECT_EQ(One.getUnsignedMin(), APInt(16, 0xa));
  EXPECT_EQ(Some.getUnsignedMin(), APInt(16, 0xa));
  EXPECT_EQ(Wrap.getUnsignedMin(), APInt(16, 0));

  EXPECT_EQ(Full.getSignedMax(), APInt(16, INT16_MAX));
  EXPECT_EQ(One.getSignedMax(), APInt(16, 0xa));
  EXPECT_EQ(Some.getSignedMax(), APInt(16, 0xaa9));
  EXPECT_EQ(Wrap.getSignedMax(), APInt(16, INT16_MAX));

  EXPECT_EQ(Full.getSignedMin(), APInt(16, (uint64_t)INT16_MIN));
  EXPECT_EQ(One.getSignedMin(), APInt(16, 0xa));
  EXPECT_EQ(Some.getSignedMin(), APInt(16, 0xa));
  EXPECT_EQ(Wrap.getSignedMin(), APInt(16, (uint64_t)INT16_MIN));

  // Found by Klee
  EXPECT_EQ(ConstantRange(APInt(4, 7), APInt(4, 0)).getSignedMax(),
            APInt(4, 7));
}

TEST_F(ConstantRangeTest, SignWrapped) {
  EXPECT_TRUE(Full.isSignWrappedSet());
  EXPECT_FALSE(Empty.isSignWrappedSet());
  EXPECT_FALSE(One.isSignWrappedSet());
  EXPECT_FALSE(Some.isSignWrappedSet());
  EXPECT_TRUE(Wrap.isSignWrappedSet());

  EXPECT_FALSE(ConstantRange(APInt(8, 127), APInt(8, 128)).isSignWrappedSet());
  EXPECT_TRUE(ConstantRange(APInt(8, 127), APInt(8, 129)).isSignWrappedSet());
  EXPECT_FALSE(ConstantRange(APInt(8, 128), APInt(8, 129)).isSignWrappedSet());
  EXPECT_TRUE(ConstantRange(APInt(8, 10), APInt(8, 9)).isSignWrappedSet());
  EXPECT_TRUE(ConstantRange(APInt(8, 10), APInt(8, 250)).isSignWrappedSet());
  EXPECT_FALSE(ConstantRange(APInt(8, 250), APInt(8, 10)).isSignWrappedSet());
  EXPECT_FALSE(ConstantRange(APInt(8, 250), APInt(8, 251)).isSignWrappedSet());
}

TEST_F(ConstantRangeTest, Trunc) {
  ConstantRange TFull = Full.truncate(10);
  ConstantRange TEmpty = Empty.truncate(10);
  ConstantRange TOne = One.truncate


regions.Count; i++) {
				string name = regions[i].name;
				menu.AddItem(new GUIContent(name), !property.hasMultipleDifferentValues && name == property.stringValue, HandleSelect, new SpineDrawerValuePair(name, property));
			}

			menu.Sh


��","on with exclamation mark with left right arrow above":"ON! 위 왼쪽 오른쪽 화살표","soon with rightwards arrow above":"SOON 위 오른쪽 화살표","top with upwards arrow above":"TOP 위 위쪽 화살표","Dollar sign":"달러 기호","Euro sign":"유로 기호","Yen sign":"엔 기호","Pound sign":"파운드 기호","Cent sign":"센트 기호","Euro-currency sign":"유로화 기호","Colon sign":"콜론 기호","Cruzeiro sign":"크루제이루 기호","French franc sign":"프랑스 프랑 기호","Lira sign":"리라 기호","Currency sign":"통화 기호","Bitcoin sign":"비트코인 기호","Mill sign":"밀 기호","Naira sign":"나이라 기호","Peseta sign":"페세타 기호","Rupee sign":"루피 기호","Won sign":"원 기호","New sheqel sign":"뉴 세켈 기호","Dong sign":"동 기호","Kip sign":"킵 기호","Tugrik sign":"투그리크 기호","Drachma sign":"드라크마 기호","German penny sign":"독일 페니 기호","Peso sign":"페소 기호","Guarani sign":"과라니 기호","Austral sign":"오스트랄 기호","Hryvnia sign":"흐리브냐 기호","Cedi sign":"세디 기호","Livre tournois sign":"리브르 트르누아 기호","Spesmilo sign":"스페스밀로 기호","Tenge sign":"텡게 기호","Indian rupee sign":"인도 루피 기호","Turkish lira sign":"터키 리라 기호","Nordic mark sign":"노르딕 마크 기호","Manat sign":"마나트 기호","Ruble sign":"루블 기호","Latin capital letter a with macron":"장음 부호가 있는 라틴어 대문자 A","Latin small letter a with macron":"장음 부호가 있는 라틴어 소문자 a","Latin capital letter a with breve":"반달점 부호가 있는 라틴어 대문자 A","Latin small letter a with breve":"반달점 부호가 있는 라틴어 소문자 a","Latin capital letter a with ogonek":"꼬리 부호가 있는 라틴어 대문자 A","Latin small letter a with ogonek":"꼬리 부호가 있는 라틴어 소문자 a","Latin capital letter c with acute":"양음 부호가 있는


glabel func_809A9E28
/* 007A8 809A9E28 460C6082 */  mul.s   $f2, $f12, $f12
/* 007AC 809A9E2C 00057080 */  sll     $t6, $a1,  2
/* 007B0 809A9E30 3C01809B */  lui     $at, %hi(D_809AA530)       ## $at = 809B0000
/* 007B4 809A9E34 002E0821 */  addu    $at, $at, $t6
/* 007B8 809A9E38 C42EA530 */  lwc1    $f14, %lo(D_809AA530)($at)
/* 007BC 809A9E3C 3C013F80 */  lui     $at, 0x3F80                ## $at = 3F800000
/* 007C0 809A9E40 4602703C */  c.lt.s  $f14, $f2
/* 007C4 809A9E4


-ranlib$exe');

    final ndkVersionParsed = Version.parse(ndkVersion);
    final rustFlagsKey = 'CARGO_ENCODED_RUSTFLAGS';
    final rustFlagsValue = _libGccWorkaround(targetTempDir, ndkVersionParsed);

    final runRustTool =
        Platform.isWindows ? 'run_build_tool.cmd' : 'run_build_tool.sh';

    final packagePath = (await Isolate.resolvePackageUri(
            Uri.parse('package:build_tool/buildtool.dart')))!
        .toFilePath();
    final selfPath = path.canonicalize(path.join(
      packagePath,
      '..',
      '..',
      '..',
      runRustTool,
    ));

    // Make sure that run_build_tool is working properly even initially launched directly
    // through dart run.
    final toolTempDir =
        Platform.environment['CARGOKIT_TOOL_TEMP_DIR'] ?? targetTempDir;

    return {
      arKey: arValue,
      ccKey: ccValue,
      cfFlagsKey: cFlagsValue,
      cxxKey: cxxValue,
      cxxFlagsKey: cxxFlagsValue,
      ranlibKey: ranlibValue,
      rustFlagsKey: rustFlagsValue,
      linkerKey: selfPath,
      // Recognized by main() so we know when we're acting as a wrapper
      '_CARGOKIT_NDK_LINK_TARGET': targetArg,
      '_CARGOKIT_NDK_LINK_CLANG': ccValue,
      'CARGOKIT_TOOL_TEMP_DIR': toolTempDir,
    };
  }

  // Workaround for libgcc missing in NDK23, inspired by cargo-ndk
  String _libGccWorkaround(String buildDir, Version ndkVersion) {
    final workaroundDir = path.join(
      buildDir,
      'cargokit',
      'libgcc_workaround',
      '${ndkVersion.major}',
    );
    Directory(workaroundDir).createSync(recursive: true);
    if (ndkVersion.major >= 23) {
      File(path.join(workaroundDir, 'libgcc.a'))
          .writeAsStringSync('INPUT(-lunwind)');
    } else {
      // Other way around, untested, forward libgcc.a from libunwind once Rust
      // gets updated for NDK23+.
      File(path.join(workaroundDir, 'libunwind.a'))
          .writeAsStringSync('INPUT(-lgcc)');
    }

    var rustFlags = Platform.environment['CARGO_ENCODED_RUSTFLAGS'] ?? '';
    if (rustFlags.isNotEmpty) {
      rustFlags = '$rustFlags\x1f';
    }
    rustFlags = '$rustFlags-L\x1f$workaroundDir';
    return rustFlags;
  }
}
import 'dart:io';
import 'dart:isolate';
import 'dart:math' as math;

import 'package:collection/collection.dart';
import 'package:path/path.dart' as path;
import 'package:version/version.dart';

import 'target.dart';
import 'util.dart';

class AndroidEnvironment {
  AndroidEnvironment({
    required this.sdkPath,
    required this.ndkVersion,
    required this.minSdkVersion,
    required this.targetTempDir,
    required this.target,
  });

  static void clangLinkerWrapper(List<String> args) {
    final clang = Platform.environment['_CARGOKIT_NDK_LINK_CLANG'];
    if (clang == null) {
      throw Exception(
          "cargo-ndk rustc linker: didn't find _CARGOKIT_NDK_LINK_CLANG env var");
    }
    final target = Platform.environment['_CARGOKIT_NDK_LINK_TARGET'];
    if (target == null) {
      throw Exception(
          "cargo-ndk rustc linker: didn't find _CARGOKIT_NDK_LINK_TARGET env var");


rame, elementData)
		local follower = frame.Follower
		if follower and not follower.backdrop then
			follower:CreateBackdrop("Overlay")
			follower.backdrop:SetPoint("TOPLEFT", 0, 0)
			follower.backdrop:SetPoint("BOTTOMRIGHT", 0, 0)
			follower:StyleButton()

			follower.BG:Hide()
			follower.Selection:SetTexture("")
			follower.AbilitiesBG:SetTexture("")
			follower.BusyFrame:SetAllPoints()
			follower.Name:SetWordWrap(false)

			if follower.PortraitFrame then
				HandleGarrisonPortrait(follower.PortraitFrame)
				follower.PortraitFrame:ClearAllPoints()
				follower.PortraitFrame:SetPoint("TOPLEFT", 6, -5)
			end
		end

		local counters = follower.Counters
		if counters then
			for _, counter in next, counters do
				if counter and not counter.styled then
					-- counter:SetTemplate("Default") -- FIXME looks ugly, not pixelperfect

					if counter.Border then
						counter.Border:SetTexture("")
					end

					if counter.Icon then
						counter.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
						counter.Icon:SetInside()
					end
					counter.styled = true
				end
			end
		end

		if follower then
			if follower.Selection and follower.backdrop then
				if follower.Selection:IsShown() then
					follower.backdrop:SetBackdropBorderColor(1, 0.82, 0, 1)
					follower.backdrop.overlay:SetVertexColor(1 * 0.3, 0.82 * 0.3, 0, 1)
					follower.PortraitFrame.backdrop:SetBackdropBorderColor(1, 0.82, 0, 1)
				else
					follower.backdrop:SetBackdropBorderColor(unpack(C.media.border_color))
					follower.backdrop.overlay:SetVertexColor(0.1, 0.1, 0.1, 1)
					follower.PortraitFrame.backdrop:SetBackdropBorderColor(unpack(C.media.border_color))
				end
			end

			local color = ITEM_QUALITY_COLORS[follower.PortraitFrame.quality]
			if color then
				follower.Name:SetTextColor(color.r, color.g, color.b)
			else
				follower.Name:SetTextColor(1, 1, 1)
			end
		end
	end)

	hooksecurefunc("GarrisonFollowerButton_AddAbility", function(self, index)
		local ability = self.Abilities[index]
		if not ability.skinned then
			ability.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
			ability.skinned = true
		end
	end)

	-- Set border color according to rarity of item
	hooksecurefunc("GarrisonMissionButton_SetRewards", function(self)
		local firstRegion, r, g, b
		local index = 0
		for _, reward in pairs(self.Rewards) do
			firstRegion = reward.GetRegions and reward:GetRegions()
			if firstRegion then firstRegion:Hide() end

			reward:ClearAllPoints()
			if IsAddOnLoaded("GarrisonMissionManager") then
				reward:SetPoint("TOPRIGHT", -T.mult * 65 + (index * -65), -T.mult)
			else
				reward:SetPoint("TOPRIGHT", -T.mult + (index * -65), -T.mult)
			end

			if reward.IconBorder then
				reward.IconBorder:SetTexture(nil)
			end

			if reward.IconBorder and reward.IconBorder:IsShown() then
				r, g, b = reward.IconBorder:GetVertexColor()
			else
				r, g, b = unpack(C.media.border_color)
			end

			if (r > 0.64 and r < 0.67) or (r > 0.99 and g > 0.99 and b > 0.99) then
				r, g,


pathParamObj(pathParam1Name), rc.pathParamObj(pathParam2Name), rc)
}

internal inline fun <reified T> RoutingContext.pathParamObj(name: String) = convertString<T>(pathParam(name))

inline fun <reified T> RoutingContext.queryParamObjs(name: String) = queryParam(name).map {
    convertString<T>(it)
}

inline fun <reified T> RoutingContext.queryParamObj(name: String) = convertString<T>(queryParam(name).first())

inline fun <reified T> convertString(obj: String?): T {
    val result: Any? = when (T::class) {
        String::class -> obj
        Int::class -> obj?.toInt()
        Long::class -> obj?.toLong()
        Boolean::class -> obj?.toBoolean()
        Float::class -> obj?.toFloat()
        Double::class -> obj?.toDouble()
        else -> error("Unknown object type: ${T::class.qualifiedName}")
    }

    return result as? T ?: error("Parameter value '$obj' could not be casted!")
}
/*
 * Copyright 2016 Andy Bao
 *
 * 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 xyz.nulldev.ts.api.http.manga

import eu.kanade.tachiyomi.data.database.DatabaseHelper
import spark.Request
import spark.Response
import xyz.nulldev.ts.api.http.TachiWebRoute
import xyz.nulldev.ts.ext.kInstanceLazy

/**
 * Project: TachiServer
 * Author: nulldev
 * Creation Date: 30/09/16
 */
class SetFlagRoute : TachiWebRoute() {

    private val db: DatabaseHelper by kInstanceLazy()

    override fun handleReq(request: Request, response: Response): Any {
        val mangaId = request.params(":mangaId")?.toLong()
                ?: return error("MangaID must be specified!")
        val manga = db.getManga(mangaId).executeAsBlocking()
                ?: return error("The specified manga does not exist!")
        val flag: MangaFlag
        try {
            flag = MangaFlag.valueOf((request.params(":flag") ?: "").toUpperCase())
        } catch (e: IllegalArgumentException) {
            return error("Invalid/no flag specified!")
        }

        val flagState = flag.findFlagState((request.params(":state") ?: "").toUpperCase())
                ?: return error("Invalid/no flag state specified!")
        flag.set(manga, flagState)
        db.insertManga(manga).executeAsBlocking()
        return success()
    }
}
package xyz.nulldev.ts.api.http.serializer

import com.github.salomonbrys.kotson.bool
import com.github.salomonbrys.kotson.int
import com.github.salomonbrys.kotson.nullObj
import com.github.salomonbrys.kotson.set
import com.google.gson.JsonArray
import com.google.gson.JsonNull
import com.google.gson.JsonObject
import eu.kanade.tachiyomi.source.model.Filter
import kotlin.reflect.KClass
import kotlin.reflect.KProperty1

interface Serializer<in T : Filter<out Any?>> {
    fun serialize(json: JsonObject, filter: T) {}
    fun deserialize(json: JsonObject, filter: T) {}

    /**
     * Automatic two-way mappings between fields and JSON
     */
    fun mappings(): List<Pair<String, KProperty1<in T, *>>> = emptyList()

    val serializer: FilterSerializer
    val type: String


.")
[Altaria](../../pokemon/altaria.md/)
Lv. 70 |
| ![School Kid Torin (W8p-5a)](../../assets/trainers/school_kid.png "School Kid Torin (W8p-5a)")
School Kid Torin (W8p-5a) | ![Sandslash](../../assets/sprites/sandslash/front.gif "Sandslash: If it digs at an incredible pace, it may snap off its spikes and claws. They grow back in a day.")
[Sandslash](../../pokemon/sandslash.md/)
Lv. 62 | ![Golbat](../../assets/sprites/golbat/front.gif "Golbat: It can drink more than 10 ounces of blood at once. If it has too much, it gets heavy and flies clumsily.")
[Golbat](../../pokemon/golbat.md/)
Lv. 62 | ![Castform](../../assets/sprites/castform/front.gif "Castform: This Pokémon can change its cells, taking different forms based on the temperature and humidity.")
[Castform](../../pokemon/castform.md/)
Lv. 62 |
| ![School Kid Torin (W8p-5a)](../../assets/trainers/school_kid.png "School Kid Torin (W8p-5a)")
School Kid Torin (W8p-5a) | ![Sandslash](../../assets/sprites/sandslash/front.gif "Sandslash: If it digs at an incredible pace, it may snap off its spikes and claws. They grow back in a day.")
[Sandslash](../../pokemon/sandslash.md/)
Lv. 65 | ![Golbat](../../assets/sprites/golbat/front.gif "Golbat: It can drink more than 10 ounces of blood at once. If it has too much, it gets heavy and flies clumsily.")
[Golbat](../../pokemon/golbat.md/)
Lv. 65 | ![Castform](../../assets/sprites/castform/front.gif "Castform: This Pokémon can change its cells, taking different forms based on the temperature and humidity.")
[Castform](../../pokemon/castform.md/)
Lv. 65 |
| ![School Kid Torin (W8p-5a)](../../assets/trainers/school_kid.png "School Kid Torin (W8p-5a)")
School Kid Torin (W8p-5a) | ![Sandslash](../../assets/sprites/sandslash/front.gif "Sandslash: If it digs at an incredible pace, it may snap off its spikes and claws. They grow back in a day.")
[Sandslash](../../pokemon/sandslash.md/)
Lv. 68 | ![Crobat](../../assets/sprites/crobat/front.gif "Crobat: The development of wings on its legs enables it to fly fast but also makes it tough to stop and rest.")
[Crobat](../../pokemon/crobat.md/)
Lv. 68 | ![Castform](../../assets/sprites/castform/front.gif "Castform: This Pokémon can change its cells, taking different forms based on the temperature and humidity.")
[Castform](../../pokemon/castform.md/)
Lv. 68 |

# #183 Marill (Aqua Mouse Pokémon)

| Official Artwork | Shiny Artwork |
|------------------|---------------|
| ![Official Artwork](../assets/sprites/marill/official.png "Marill") | ![Shiny Artwork](../assets/sprites/marill/official_shiny.png "Marill") |

The oil-filled end of its tail floats on water. It keeps MARILL from drowning even in a strong current.

---

## Media

### Default Sprites

| Front | Shiny | Back | Shiny |
|-------|-------|------|-------|
| ![Marill](../assets/sprites/marill/front.gif "Marill: The oil-filled end of its tail floats on water. It keeps MARILL from drowning even in a strong current.") | ![Marill](../assets/sprites/marill/front_shiny.png "Marill: The oil-filled end of its tail f


abled:indeterminate~.mdc-checkbox__background {
    background-color: #4285F4 !important;
    border-color: #4285F4 !important;

}

::ng-deep .mat-mdc-slide-toggle.mat-mdc-slide-toggle-checked:not(.mat-disabled) .mdc-switch__shadow {
    background-color: #4285F4;
    /*replace with your color*/
}

::ng-deep .mat-mdc-slide-toggle.mat-mdc-slide-toggle-checked:not(.mat-disabled) .mdc-switch__track::after {
    background-color: #4285F4 !important;
    /*replace with your color*/
}

.buttons-container {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    width: 100%;
    padding-top: 1%;
    padding-bottom: 1%;
    padding-left: 3%;
}

.saved-intents-container {
    padding-top: 2%;
    padding-bottom: 2%;
}

.heading-container {
    width: 73%;
    align-content: center;
    flex-wrap: wrap;
    display: flex;
    flex-direction: row;

    span {
        font-family: 'Google Sans', sans-serif !important;
        font-style: normal;
        font-weight: 400;
        font-size: 20px;
        line-height: 14px;
        color: #161A1D;
    }
}

.button-child-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 24%;
    justify-content: center;

    button {
        border-radius: 30px;
        font-family: 'Google Sans', sans-serif !important;
        font-style: normal;
        font-weight: 500;
        font-size: 14px;
        line-height: 23px;
        letter-spacing: unset;
        box-shadow: none;
    }

    .bulk-delete-button {
        color: #f70808;
        border: 1px solid #f70808;
    }

    .create-notification-button {
        color: #fff;
        background: #4285F4;
    }
}

.form-field {
    width: 100%;
}

.dialog-toggle-button-container {
    font-family: 'Google Sans', sans-serif !important;
    font-style: normal;
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding-bottom: 4%;

    button {
        height: 45px;
        border: none;
    }

    .error {
        background: #e9867e33;
        width: 28%;
    }

    .warning {
        background: rgb(241 226 183 / 44%);
        width: 28%;
    }

    .info {
        background: #F6F9FE;
        width: 35%;
    }

    .errorOutline {
        border: 1px solid red;
    }

    .warningOutline {
        border: 1px solid #fbc645;
    }

    .infoOutline {
        border: 1px solid #4285F4;
    }
}

.delete-confirmation-text {
    font-family: 'Google Sans', sans-serif !important;
    font-style: normal;
    width: 100%;
    display: flex;
    justify-content: center;
    font-size: 20px;
    color: #161A1D;
}

.dialog-delete-button {
    border-radius: 30px;
    font-family: 'Google Sans', sans-serif !important;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 23px;
    letter-spacing: unset;
    box-shadow: none;
    color: #f70808;
    border: 1px solid #f70808;
}

.disableDiv {
    pointer-events: none;
}


urn acc;
  }, {x: 0, y: 0});
  return [Math.round(sumPoints.x/polynomPoints.length), Math.round(sumPoints.y/polynomPoints.length)];
}

const isWithinPolynom = (polynomPoints, shot) => {
 for(let i = 0; i < polynomPoints.length + 1; ++i) {
    const length = polynomPoints.length;
    const p1 = polynomPoints[i%length];
    const p2 = polynomPoints[(i+1)%length];
    if (isWithinTriangle(calculConvexPolynomCenter(polynomPoints), p1, p2, shot)) {
      return true;
    }
  }
  return false;
};

// execution
const N = parseInt(readline());
const polynomPoints = [];
for (let i = 0; i < N; i++) {
  polynomPoints.push(
    readline().split(' ').map(c => parseInt(c, 10))
  );
}

const M = parseInt(readline(), 10);
for (let i = 0; i < M; i++) {
  const shot = readline().split(' ').map(c => parseInt(c, 10));
  if (isWithinPolynom(polynomPoints, shot)) {
    print('hit');
  } else {
    print('miss');
  }
}
import assert from "assert";
import { CoreConfig } from "reg-suit-interface";
import { createLogger } from "reg-suit-util";
import { ConfigManager } from "./config-manager";

const coreConf: CoreConfig = {
  actualDir: "",
  workingDir: "",
};

function createManager() {
  const logger = createLogger();
  logger.setLevel("silent");
  return new ConfigManager({ logger, noEmit: true });
}

test("replace placeholders in config", () => {
  const conf = {
    core: { actualDir: "$HOGE_FOO", workingDir: "HOGE_FOO" },
    plugins: {
      "some-plugin": { xxx: "$HOGE_FOO", yyy: "${HOGE_FOO}", zzz: "HOGE_FOO" },
    },
  };
  const manager = createManager();
  manager._loadedConfig = conf;
  const actual = manager.replaceEnvValue() as any;
  assert.equal(actual.plugins["some-plugin"].xxx, process.env["HOGE_FOO"]);
  assert.equal(actual.plugins["some-plugin"].yyy, process.env["HOGE_FOO"]);
  assert.equal(actual.plugins["some-plugin"].zzz, "HOGE_FOO");
  assert.equal(actual.core.actualDir, process.env["HOGE_FOO"]);
  assert.equal(actual.core.workingDir, "HOGE_FOO");
});

test("replace nested placeholders", () => {
  const conf = {
    core: coreConf,
    plugins: {
      "some-plugin": { xxx: { yyy: "$HOGE_FOO" } },
    },
  };
  const manager = createManager();
  manager._loadedConfig = conf;
  const actual = manager.replaceEnvValue() as any;
  assert.equal(actual.plugins["some-plugin"].xxx.yyy, process.env["HOGE_FOO"]);
});

test("replace placeholders in array", () => {
  const conf = {
    core: coreConf,
    plugins: {
      "some-plugin": { xxx: ["$HOGE_FOO"] },
    },
  };
  const manager = createManager();
  manager._loadedConfig = conf;
  const actual = manager.replaceEnvValue() as any;
  assert.equal(actual.plugins["some-plugin"].xxx[0], process.env["HOGE_FOO"]);
});

test("escape $$ to $", () => {
  const conf = {
    core: coreConf,
    plugins: {
      "some-plugin": { xxx: "$$HOGE_FOO" },
    },


    }
}

/// Return the root public method which this execution belongs to;
pub fn get_pubblic_method(
    guard: &StackValue,
    stack: &Vec<(&crate::evm_memory::EvmStack, &crate::evm_memory::EvmMemory)>,
) -> Option<U256> {
    if let EQ(a, b) = guard {
        // Method guards allways start with eq
        //println!("looking for calldata in {:?}", guard);
        //println!("{:?}", stack.last().unwrap().0);
        if let ActualValue(x) = **a {
            let hash = x;
            if look_for_calldata(&*b) {
                return Some(hash);
            }
        }
        if let ActualValue(x) = **b {
            let hash = x;
            if look_for_calldata(&*a) {
                return Some(hash);
            }
        }
    }
    None
}

/// looks for a CallDataLoad(0) inside a StackValue tree
pub fn look_for_calldata(val: &StackValue) -> bool {
    match val {
        CallDataLoad(x) => {
            if let ActualValue(v) = **x {
                v == U256::from(0)
            } else {
                false
            }
        }
        And(a, b) => look_for_calldata(&**a) || look_for_calldata(&**b),
        Xor(a, b) => look_for_calldata(&**a) || look_for_calldata(&**b),
        Or(a, b) => look_for_calldata(&**a) || look_for_calldata(&**b),
        Add(a, b) => look_for_calldata(&**a) || look_for_calldata(&**b),
        Sub(a, b) => look_for_calldata(&**a) || look_for_calldata(&**b),
        Mul(a, b) => look_for_calldata(&**a) || look_for_calldata(&**b),
        Div(a, b) => look_for_calldata(&**a) || look_for_calldata(&**b),
        Shr(a, b) => look_for_calldata(&**a) || look_for_calldata(&**b),
        ShL(a, b) => look_for_calldata(&**a) || look_for_calldata(&**b),
        GT(a, b) => look_for_calldata(&**a) || look_for_calldata(&**b),
        _ => false,
    }
}

/// Retrives the "top level" data structure this storage location belongs to
pub fn top_level_data(expr: &StackValue) -> DataType {
    match expr {
        ActualValue(_) => DataType::Field(expr.clone()),
        Add(a, b) => {
            let right = top_level_data(&**b);
            if let DataType::Vector(x) = top_level_data(a) {
                return DataType::Vector(x);
            }
            match right {
                DataType::Unknown(x) => DataType::Unknown(Add(a.clone(), Box::from(x))),
                DataType::Field(y) => DataType::Struct(y),
                DataType::Struct(y) => DataType::Struct(y),
                DataType::Mapping(x, y) => DataType::Mapping(x, y),
                DataType::Vector(y) => DataType::Vector(y),
            }
        }

        Sha3(v) => {
            if v.len() == 1 {
                // Array
                return DataType::Vector(v[0].1.clone());
            }
            if v.len() == 2 {
                // Mapping
                if v[0].0 > v[1].0 {
                    let resolved = top_level_data(&v[0].1);
                    DataType::Mapping(resolved.value(), expr.clone())
                } else {
                    let resolved = top_level_data(&v[1].1);

                    DataType::Mapping(resolved.value(), expr.clone())
                }
            } else {
                DataType::Unknown(expr.clone())
            }
        }

        _ => DataType::Unknown(expr.clone()),
    }
}
/*/// tries to recursivly resolve unknown jump locations
pub fn r


distinctValues += consumeSourceDataUntil(nextThreshold);
			// repeat until we cross the next threshold
		} while (!this.finished && this.thresholdRetriever.applyAsInt(this.sourceData[this.sourceIndex]) < nextThreshold);

		// create bucket in the output histogram
		final CacheableBucket result = new CacheableBucket(
			this.currentStep.setScale(this.limitDecimalPlacesTo, RoundingMode.HALF_UP),
			distinctValues
		);

		// move next threshold as current threshold
		this.currentStep = nextThresholdValue;
		return result;
	}

	/**
	 * Method iterates over source items and consumes all which value is lesser than `nextStop`. Collected weight of
	 * all consumed items is returned as a result.
	 */
	private int consumeSourceDataUntil(int nextStop) {
		int collectedWeight = 0;
		int value = this.thresholdRetriever.applyAsInt(this.sourceData[this.sourceIndex]);
		while (value < nextStop) {
			collectedWeight += this.weightRetriever.applyAsInt(this.sourceData[this.sourceIndex]);
			if (this.sourceIndex + 1 >= this.sourceData.length) {
				this.finished = true;
				break;
			} else {
				this.sourceIndex++;
				value = this.thresholdRetriever.applyAsInt(this.sourceData[this.sourceIndex]);
			}
		}
		return collectedWeight;
	}

	/**
	 * DTO containing information about the biggest empty span in histogram.
	 */
	@RequiredArgsConstructor
	private static final class LongestSpaceRange {
		/**
		 * Contains number of buckets in histogram that are empty and are next to each other.
		 */
		@Getter private final int columns;
		/**
		 * Contains value of the first bucket that is empty in this row.
		 */
		private final BigDecimal start;
		/**
		 * Contains value of the last bucket that is empty in this row.
		 */
		private final BigDecimal end;

		/**
		 * Returns difference between end and start buckets that represents the empty columns.
		 */
		public BigDecimal getSpanWidth() {
			return this.end.subtract(this.start);
		}

	}

}
/*
 *
 *                         _ _        ____  ____
 *               _____   _(_) |_ __ _|  _ \| __ )
 *              / _ \ \ / / | __/ _` | | | |  _ \
 *             |  __/\ V /| | || (_| | |_| | |_) |
 *              \___| \_/ |_|\__\__,_|____/|____/
 *
 *   Copyright (c) 2023-2025
 *
 *   Licensed under the Business Source License, Version 1.1 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *   https://github.com/FgForrest/evitaDB/blob/master/LICENSE
 *
 *   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 io.evitadb.core.query.sort.primaryKey;

import io.evitadb.core.query.sort.Sorter;
import io.evitadb.index.bitmap.BaseBitmap;
import io.evitadb.index.bitmap.Bitmap;
import io.evitadb.index.bitmap.EmptyBitmap;
import io.evitadb.index.bitmap.RoaringBitmapBackedBitmap;
import io.evitadb.utils.ArrayUtils;
import org.roaringbitmap.RoaringBitmap;
import org.roaringbitmap.RoaringBitmapWriter;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.function.IntConsumer;

/**
 * Exact sorter outputs filtered results in an order defined by the order of input entity primary keys.
 *
 * @author Jan Novotný (novotny@fg.cz),


, -350.791, 492.855, 4.48503, false)
                GeometryInstance("TGK_StartR1", false, -350.705, 492.403, 4.48503, false)
            end
            SoundPlay2D("CountBeep")
        elseif MissionTimerGetTimeRemaining() == 2 and flag2 == false then
            flag2 = true
            if AreaGetVisible() == 42 then
                GeometryInstance("TGK_StartGo", true, -350.963, 493.747, 4.48503, false)
                GeometryInstance("TGK_StartR3", true, -350.878, 493.308, 4.48503, false)
                GeometryInstance("TGK_StartR2", false, -350.791, 492.855, 4.48503, false)
                GeometryInstance("TGK_StartR1", false, -350.705, 492.403, 4.48503, false)
            end
            SoundPlay2D("CountBeep")
        elseif MissionTimerGetTimeRemaining() == 1 and flag1 == false then
            flag1 = true
            if AreaGetVisible() == 42 then
                GeometryInstance("TGK_StartGo", true, -350.963, 493.747, 4.48503, false)
                GeometryInstance("TGK_StartR3", false, -350.878, 493.308, 4.48503, false)
                GeometryInstance("TGK_StartR2", false, -350.791, 492.855, 4.48503, false)
                GeometryInstance("TGK_StartR1", false, -350.705, 492.403, 4.48503, false)
            end
            SoundPlay2D("CountBeep")
        elseif MissionTimerGetTimeRemaining() == 0 and flagGo == false then
            flagGo = true
            if AreaGetVisible() == 42 then
                GeometryInstance("TGK_StartGo", false, -350.963, 493.747, 4.48503, false)
                GeometryInstance("TGK_StartR3", true, -350.878, 493.308, 4.48503, false)
                GeometryInstance("TGK_StartR2", true, -350.791, 492.855, 4.48503, false)
                GeometryInstance("TGK_StartR1", true, -350.705, 492.403, 4.48503, false)
            end
            SoundPlay2D("GoBeep")
        end
    end
    MissionTimerStop()
    for i, racer in racers do
        VehicleFollowPath(racer.car, race.path)
    end
end

function SetRacerStats(racers)
    for i, racer in racers do
        RaceSetRacerStats(racer.id, racer.max_sprint_speed, racer.max_normal_speed, racer.catch_up_dist, racer.catch_up_speed, racer.slow_down_dist, racer.slow_down_speed, racer.shortcut_odds, racer.shooting_odds, racer.trick_odds, 0, 0, 0, racer.aggressiveness)
    end
end

function SetTrackGeometry(TrackObjects)
    for i, object in TrackObjects do
        GeometryInstance(object.name, object.bHidden, object.x, object.y, object.z, object.bCol)
    end
end

function PlayerSetup(player)
    if PedIsOnVehicle(gPlayer) then
        local x, y, z = GetPointList(POINTLIST._HACK_BIKEDUMP)
        PlayerSetPosXYZ(x, y, z)
        PlayerDetachFromVehicle(gPlayer)
    end
    PlayerSetPosPoint(player.start_pos)
    player.car = VehicleCreatePoint(player.car_model, player.car_start_pos)
    Wait(0)
    PedWarpIntoCar(gPlayer, player.car)
end

function RaceSetup()
    PauseGameClock()
    debug_print(1, "Start RaceSetup(), before PlayerSetup()")
    MinigameCreate("RACE", true)
    while MinigameIsReady() == false do
        Wait(0)
    end
    AreaTransitionP


/* Generated by RuntimeBrowser
   Image: /System/Library/PrivateFrameworks/WebCore.framework/WebCore
 */

@interface DOMHTMLButtonElement : DOMHTMLElement

@property (copy) NSString *accessKey;
@property bool autofocus;
@property bool disabled;
@property (readonly) DOMHTMLFormElement *form;
@property (copy) NSString *name;
@property (copy) NSString *type;
@property (copy) NSString *value;
@property (readonly) bool willValidate;

- (id)accessKey;
- (bool)autofocus;
- (bool)checkValidity;
- (void)click;
- (bool)disabled;
- (id)form;
- (id)formAction;
- (id)formEnctype;
- (id)formMethod;
- (bool)formNoValidate;
- (id)formTarget;
- (id)labels;
- (id)name;
- (void)setAccessKey:(id)arg1;
- (void)setAutofocus:(bool)arg1;
- (void)setCustomValidity:(id)arg1;
- (void)setDisabled:(bool)arg1;
- (void)setFormAction:(id)arg1;
- (void)setFormEnctype:(id)arg1;
- (void)setFormMethod:(id)arg1;
- (void)setFormNoValidate:(bool)arg1;
- (void)setFormTarget:(id)arg1;
- (void)setName:(id)arg1;
- (void)setType:(id)arg1;
- (void)setValue:(id)arg1;
- (int)structuralComplexityContribution;
- (id)type;
- (id)validationMessage;
- (id)validity;
- (id)value;
- (bool)willValidate;

@end


values.first.toString()) ?? 0;
    } catch (e) {
      rethrow;
    }
  }

  @override
  Future<bool> doesntExist() async {
    try {
      String sql = "SELECT NOT EXISTS(SELECT 1 FROM $getTable";
      if (conditions.isNotEmpty) {
        sql += " WHERE ${conditions.join('')}";
      }
      sql += ") as `exists`";
      final bindings = getBindings();
      var result = await dbConnection!.select(sql, bindings);

      return (int.tryParse(result.first["exists"].toString()) == 1);
    } catch (e) {
      rethrow;
    }
  }

  @override
  Future<void> each(
    void Function(Map<String, dynamic> q) callback,
  ) async {
    var results = await get();
    for (var row in results) {
      callback(row);
    }
  }

  @override
  Future<bool> exists() async {
    try {
      String sql = "SELECT EXISTS(SELECT 1 FROM $getTable";
      if (conditions.isNotEmpty) {
        sql += " WHERE ${conditions.join('')}";
      }
      sql += ") as `exists`";
      final bindings = getBindings();
      var result = await dbConnection!.select(sql, bindings);
      return (int.tryParse(result.first["exists"].toString()) == 1);
    } catch (e) {
      rethrow;
    }
  }

  @override
  Future<Map<String, dynamic>?> find(
    dynamic id, {
    String byColumnName = 'id',
    List<String> columns = const [],
  }) async {
    try {
      String sql = whereEqualTo('$getTable.$byColumnName', id).limit(1).toSql();
      if (columns.isNotEmpty) {
        for (String column in columns) {
          selectColumns.remove(column);
        }
        selectColumns.addAll(columns);
      }
      final bindings = getBindings();
      final result = await dbConnection!.select(sql, bindings);
      if (result.isEmpty) {
        return null;
      }
      return result.first;
    } catch (e) {
      rethrow;
    }
  }

  @override
  Future<Map<String, dynamic>?> findOrFail(
    id, {
    String byColumnName = 'id',
    List<String> columns = const [],
  }) async {
    var result = await find(
      id,
      byColumnName: byColumnName,
      columns: columns,
    );
    if (result == null) {
      throw InvalidArgumentException("Record with id $id not found.");
    }
    return result;
  }

  @override
  Future<Map<String, dynamic>?> first([
    List<String> columns = const [],
  ]) async {
    try {
      if (columns.isNotEmpty) {
        for (String column in columns) {
          selectColumns.remove(column);
        }
        selectColumns.addAll(columns);
      }
      final bindings = getBindings();
      String sql = limit(1).toSql();
      conn = await getConnection();
      final result = await conn.select(sql, bindings);
      if (result.isEmpty) {
        return null;
      }
      return result.first;
    } catch (e) {
      rethrow;
    }
  }

  @override
  Future<Map<String, dynamic>?> firstOrFail([
    List<String> columns = const [],
  ]) async {
    var result = await first(columns);
    if (result == null) {
      throw InvalidArgumentException("No records found.");
    }
    return result;
  }

  @override
  Future<Map<String, dynamic>?> firstWhere(
    String column, [
    String? operator = '=',
    value,
    List<String> columns = const [],
  ]) async {
    if (value == null) {
      throw InvalidArgumentException(
        "Invalid input: Value cannot be null. A valid value must be provided for the firstWhere method.",


YhNVKBIFicCIE7OZibEnmzAStjib8aKzdhZXyZwtw/640?wx_fmt=png&from=appmsg "")
#### 四、构建安全的业务生态

如果业务设计存在风险，那么我们如何构建安全的业务系统呢？答案肯定不是唯一，安全需求自始至终都存在，要看安全管理要求是松还是紧？还是要看业务重要还是安全重要？我想，每个人的看法都不一致。但是笔者认为，适度安全最重要，甚至如果说业务包含敏感信息，安全更为重要。

当前，我们业务开发人员其实很缺乏安全编程能力的。如何提升并强化安全意识，特别是开发人员和运维人员，确保他们在设计和实施业务功能时，能够充分考虑安全因素，是当前大安全、大数据环境下迫切需要解决的问题之一。

其次，实施安全开发生命周期管理，
将安全融入业务开发的每一个环节，从需求分析、设计、编码、测试到部署，形成闭环管理。
采用威胁建模、代码审计、渗透测试等手段，及时发现并修复漏洞也是必不可少的环节治理。

再次，建立网络安全应急响应机制，通过制定详细的应急预案，包括漏洞发现、报告、评估、修复和通报流程。建立快速响应团队，确保在发生安全事件时能够迅速处置，减少损失也是必不可少的重要环节。

最后，加强合作与安全信息共享。与业界安全组织、第三方服务提供商建立合作关系，共享安全信息、威胁情报或最佳安全实践。参与行业安全标准制定，提升业务系统的整体安全水平。

当然，针对重要的业务系统，常态化的持续监控与改进是必不可少的措施。实施全天候的安全监控，利用大数据和人工智能技术，自动识别异常行为和潜在威胁。根据监控结果，不断优化安全策略，提升业务系统的防御能力。

![](https://mmbiz.qpic.cn/mmbiz_png/sF8ZCSicrH3WicmSePu7QrhWQ9utEK5CDricWkNTDClv8N8Hr2FYhNVKBIFicCIE7OZibEnmzAStjib8aKzdhZXyZwtw/640?wx_fmt=png&from=appmsg "")
#### 结束语

业务本身及其功能设计的安全隐患，是


 *COM_RX_PORT[COMn] = {COM1_RX_GPIO_PORT};
  uint16_t         COM_TX_PIN[COMn]  = {COM1_TX_PIN};
  uint16_t         COM_RX_PIN[COMn]  = {COM1_RX_PIN};
  uint8_t          COM_TX_AF[COMn]   = {COM1_TX_AF};
  uint8_t          COM_RX_AF[COMn]   = {COM1_RX_AF};
  COM_TypeDef      COM;

  /* Get COM according instance */
  if (huart->Instance == COM1_UART)
  {
    COM = COM1;
    /* Enable COM and GPIO clocks */
    COM1_TX_GPIO_CLK_ENABLE();
    COM1_RX_GPIO_CLK_ENABLE();
    COM1_CLK_ENABLE();
  }
  else /* COM = ??? */
  {
      return;
  }

  /* Configure COM Tx as alternate function */
  GPIO_Init.Pin       = COM_TX_PIN[COM];
  GPIO_Init.Mode      = GPIO_MODE_AF_PP;
  GPIO_Init.Speed     = GPIO_SPEED_FREQ_HIGH;
  GPIO_Init.Pull      = GPIO_PULLUP;
  GPIO_Init.Alternate = COM_TX_AF[COM];
  HAL_GPIO_Init(COM_TX_PORT[COM], &GPIO_Init);

  /* Configure COM Rx as alternate function */
  GPIO_Init.Pin       = COM_RX_PIN[COM];
  GPIO_Init.Alternate = COM_RX_AF[COM];
  HAL_GPIO_Init(COM_RX_PORT[COM], &GPIO_Init);
}

/**
  * @brief  Deinitialize UART MSP.
  * @param  huart UART handle.
  * @retval None.
  */
static void UART_MspDeInit(UART_HandleTypeDef *huart)
{
  GPIO_TypeDef    *COM_TX_PORT[COMn] = {COM1_TX_GPIO_PORT};
  GPIO_TypeDef    *COM_RX_PORT[COMn] = {COM1_RX_GPIO_PORT};
  uint16_t         COM_TX_PIN[COMn]  = {COM1_TX_PIN};
  uint16_t         COM_RX_PIN[COMn]  = {COM1_RX_PIN};
  COM_TypeDef      COM;

  /* Get COM according instance */
  if (huart->Instance == COM1_UART)
  {
    COM = COM1;
  }
  else
  {
    return;
  }

  /* Disable GPIOs and COM clock */
  HAL_GPIO_DeInit(COM_TX_PORT[COM], COM_TX_PIN[COM]);
  HAL_GPIO_DeInit(COM_RX_PORT[COM], COM_RX_PIN[COM]);
  switch (COM)
  {
    case COM1:
      COM1_CLK_DISABLE();
      break;
    default:
      break;
  }
}

#endif /* (USE_BSP_COM_FEATURE == 1) */

/**
  * @}
  */

/**
  * @}
  */

/**
  * @}
  */

/**
  * @}
  */