ifySessionResponse(
      identity: json['identity'] as String?,
    );
  }

  Map<String, dynamic> toJson() {
    final identity = this.identity;
    return {
      if (identity != null) 'identity': identity,
    };
  }
}

/// Information about a workflow definition file.
class WorkflowDefinition {
  /// The path to the workflow definition file stored in the source repository for
  /// the project, including the file name.
  final String path;

  WorkflowDefinition({
    required this.path,
  });

  factory WorkflowDefinition.fromJson(Map<String, dynamic> json) {
    return WorkflowDefinition(
      path: json['path'] as String,
    );
  }

  Map<String, dynamic> toJson() {
    final path = this.path;
    return {
      'path': path,
    };
  }
}

/// Information about a workflow definition.
class WorkflowDefinitionSummary {
  /// The path to the workflow definition file stored in the source repository for
  /// the project, including the file name.
  final String path;

  WorkflowDefinitionSummary({
    required this.path,
  });

  factory WorkflowDefinitionSummary.fromJson(Map<String, dynamic> json) {
    return WorkflowDefinitionSummary(
      path: json['path'] as String,
    );
  }

  Map<String, dynamic> toJson() {
    final path = this.path;
    return {
      'path': path,
    };
  }
}

enum WorkflowRunMode {
  queued('QUEUED'),
  parallel('PARALLEL'),
  superseded('SUPERSEDED'),
  ;

  final String value;

  const WorkflowRunMode(this.value);

  static WorkflowRunMode fromString(String value) =>
      values.firstWhere((e) => e.value == value,
          orElse: () =>
              throw Exception('$value is not known in enum WorkflowRunMode'));
}

/// Information used to sort workflow runs in the returned list.
class WorkflowRunSortCriteria {
  WorkflowRunSortCriteria();

  Map<String, dynamic> toJson() {
    return {};
  }
}

enum WorkflowRunStatus {
  succeeded('SUCCEEDED'),
  failed('FAILED'),
  stopped('STOPPED'),
  superseded('SUPERSEDED'),
  cancelled('CANCELLED'),
  notRun('NOT_RUN'),
  validating('VALIDATING'),
  provisioning('PROVISIONING'),
  inProgress('IN_PROGRESS'),
  stopping('STOPPING'),
  abandoned('ABANDONED'),
  ;

  final String value;

  const WorkflowRunStatus(this.value);

  static WorkflowRunStatus fromString(String value) =>
      values.firstWhere((e) => e.value == value,
          orElse: () =>
              throw Exception('$value is not known in enum WorkflowRunStatus'));
}

/// Information about the status of a workflow run.
class WorkflowRunStatusReason {
  WorkflowRunStatusReason();

  factory WorkflowRunStatusReason.fromJson(Map<String, dynamic> _) {
    return WorkflowRunStatusReason();
  }

  Map<String, dynamic> toJson() {
    return {};
  }
}

/// Information about a workflow run.
class WorkflowRunSummary {
  /// The system-generated unique ID of the workflow run.
  final String id;

  /// The date and time the workflow was last updated, in coordinated universal
  /// time (UTC) timestamp format as specified in RFC 3339
  final DateTime lastUpdatedTime;

  /// The date and time the workflow run began, in coordinated universal time
  /// (UTC) timestamp format as specified in RFC 3339.
  final DateTime startTime;

  /// The status of the workflow run.
  final Wor


#pragma once
#include <iostream>

class NumberWrapper {
public:
    NumberWrapper() = default;
    explicit NumberWrapper(int val);

    NumberWrapper& operator+=(const NumberWrapper& other);
    NumberWrapper& operator-=(const NumberWrapper& other);
    NumberWrapper& operator*=(const NumberWrapper& other);
    NumberWrapper& operator/=(const NumberWrapper& other);

    NumberWrapper operator++(int dummy); // dummy param for postfix operator++
    NumberWrapper& operator++(); // no dummy param for prefix operator++

    NumberWrapper operator--(int dummy);
    NumberWrapper& operator--();

    operator int() const; // this is same as getter for the value
    operator bool() const; // this operator helps us use the object in an if statement and treat it as a bool

    friend std::istream& operator>>(std::istream& is, NumberWrapper& number);

private:
    int value = 0;
};

NumberWrapper operator+(const NumberWrapper& lhs, const NumberWrapper& rhs);
NumberWrapper operator-(const NumberWrapper& lhs, const NumberWrapper& rhs);
NumberWrapper operator*(const NumberWrapper& lhs, const NumberWrapper& rhs);
NumberWrapper operator/(const NumberWrapper& lhs, const NumberWrapper& rhs);
std::ostream& operator<<(std::ostream& os, const NumberWrapper& number);
bool operator==(const NumberWrapper& lhs, const NumberWrapper& rhs);
bool operator!=(const NumberWrapper& lhs, const NumberWrapper& rhs);
bool operator<(const NumberWrapper& lhs, const NumberWrapper& rhs);
bool operator>(const NumberWrapper& lhs, const NumberWrapper& rhs);
bool operator<=(const NumberWrapper& lhs, const NumberWrapper& rhs);
bool operator>=(const NumberWrapper& lhs, const NumberWrapper& rhs);


clerView.ViewHolder>() {
    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder = when (viewType) {
        UNDERLINE ->
            UnderLineViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.row_paragraph_item, parent, false))
        ANCHOR_LINK ->
            AnchorLinkViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.row_paragraph_item, parent, false))
        BODY ->
            BodyViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.row_paragraph_item, parent, false))
        BOLD ->
            BoldViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.row_paragraph_item, parent, false))
        EMPHASIZES ->
            EmphasizesViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.row_paragraph_item, parent, false))
        UNKNOWN ->
            UnknownViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.row_paragraph_item, parent, false))
        else ->
            UnknownViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.row_paragraph_item, parent, false))

    }

    override fun getItemCount(): Int = list.size

    override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
        val paragraph = list[position]
        when (holder) {
            is EmphasizesViewHolder -> holder.paragraphText.text = htmlfiy("${(paragraph as Emphasizes).text}")
            is BodyViewHolder -> holder.paragraphText.text = (paragraph as Body).bodyText
            is AnchorLinkViewHolder -> {
                val anchorLink = paragraph as AnchorLinkInParagraph
                holder.paragraphText.apply {
                    text = anchorLink.text
                    setTextColor(Color.BLUE)
                    setOnClickListener {
                        Toast.makeText(holder.itemView.context, anchorLink.url, Toast.LENGTH_SHORT).show()
                    }
                }
            }
            is UnderLineViewHolder ->
                holder.paragraphText.text = htmlfiy("${(paragraph as UnderLine).text}")

            is BoldViewHolder->
                holder.paragraphText.text = htmlfiy("${(paragraph as Bold).text}")

        }

    }

    override fun getItemViewType(position: Int): Int = when (list[position]) {
        is Body -> BODY
        is UnderLine -> UNDERLINE
        is AnchorLinkInParagraph -> ANCHOR_LINK
        is Bold -> BOLD
        is Emphasizes -> EMPHASIZES

        else -> UNKNOWN
    }

    companion object {
        const val UNKNOWN = 0

        const val ANCHOR_LINK = 1
        const val BODY = 2
        const val BOLD = 3
        const val EMPHASIZES = 4
        const val UNDERLINE = 5

    }
}package com.iguigui.maaj.dto

import com.iguigui.maaj.util.Json
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonElement
import kotlinx.serialization.json.encodeToJsonElement
import kotlinx.serialization.json.jsonObject

@Serializable
data class HttpResponse(
    @SerialName("data")
    val data: JsonElement = EmptyBaseData.toJsonElement(),
    @SerialName("code")
    val code: Int = 0,
    @SerialName("message")
    val message: String = "success"
)

@Serializable
data class WsResponse(
    @SerialName("data")
    val data: JsonElement,
    @SerialName("command")
    val command: String,
    @SerialName("msgId")
    val msgId: Int = 0,
    @SerialName("code")
    val code: Int = 0,
    @SerialName("message")
    val message


 => {
          registration.unregister().then(() => {
            window.location.reload();
          });
        });
      } else {
        // Service worker found. Proceed as normal.
        registerValidSW(swUrl, config);
      }
    })
    .catch(() => {
      console.log(
        'No internet connection found. App is running in offline mode.'
      );
    });
}

export function unregister() {
  if ('serviceWorker' in navigator) {
    navigator.serviceWorker.ready.then(registration => {
      registration.unregister();
    });
  }
}
// Copyright (c) 2005  Tom Wu
// All Rights Reserved.
// See "LICENSE" for details.

// Basic JavaScript BN library - subset useful for RSA encryption.

// Bits per digit
var dbits;

// JavaScript engine analysis
var canary = 0xdeadbeefcafe;
var j_lm = ((canary&0xffffff)==0xefcafe);

// (public) Constructor
function BigInteger(a,b,c) {
  if(a != null)
    if("number" == typeof a) this.fromNumber(a,b,c);
    else if(b == null && "string" != typeof a) this.fromString(a,256);
    else this.fromString(a,b);
}

// return new, unset BigInteger
function nbi() { return new BigInteger(null); }

// am: Compute w_j += (x*this_i), propagate carries,
// c is initial carry, returns final carry.
// c < 3*dvalue, x < 2*dvalue, this_i < dvalue
// We need to select the fastest one that works in this environment.

// am1: use a single mult and divide to get the high bits,
// max digit bits should be 26 because
// max internal value = 2*dvalue^2-2*dvalue (< 2^53)
function am1(i,x,w,j,c,n) {
  while(--n >= 0) {
    var v = x*this[i++]+w[j]+c;
    c = Math.floor(v/0x4000000);
    w[j++] = v&0x3ffffff;
  }
  return c;
}
// am2 avoids a big mult-and-extract completely.
// Max digit bits should be <= 30 because we do bitwise ops
// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)
function am2(i,x,w,j,c,n) {
  var xl = x&0x7fff, xh = x>>15;
  while(--n >= 0) {
    var l = this[i]&0x7fff;
    var h = this[i++]>>15;
    var m = xh*l+h*xl;
    l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff);
    c = (l>>>30)+(m>>>15)+xh*h+(c>>>30);
    w[j++] = l&0x3fffffff;
  }
  return c;
}
// Alternately, set max digit bits to 28 since some
// browsers slow down when dealing with 32-bit numbers.
function am3(i,x,w,j,c,n) {
  var xl = x&0x3fff, xh = x>>14;
  while(--n >= 0) {
    var l = this[i]&0x3fff;
    var h = this[i++]>>14;
    var m = xh*l+h*xl;
    l = xl*l+((m&0x3fff


 := fieldtype.MACValidator(v.String()); err != nil {
			return &ValidationError{Name: "mac", err: fmt.Errorf(`ent: validator failed for field "FieldType.mac": %w`, err)}
		}
	}
	if v, ok := _u.mutation.Ndir(); ok {
		if err := fieldtype.NdirValidator(string(v)); err != nil {
			return &ValidationError{Name: "ndir", err: fmt.Errorf(`ent: validator failed for field "FieldType.ndir": %w`, err)}
		}
	}
	if v, ok := _u.mutation.Link(); ok {
		if err := fieldtype.LinkValidator(v.String()); err != nil {
			return &ValidationError{Name: "link", err: fmt.Errorf(`ent: validator failed for field "FieldType.link": %w`, err)}
		}
	}
	if v, ok := _u.mutation.RawData(); ok {
		if err := fieldtype.RawDataValidator(v); err != nil {
			return &ValidationError{Name: "raw_data", err: fmt.Errorf(`ent: validator failed for field "FieldType.raw_data": %w`, err)}
		}
	}
	if v, ok := _u.mutation.IP(); ok {
		if err := fieldtype.IPValidator([]byte(v)); err != nil {
			return &ValidationError{Name: "ip", err: fmt.Errorf(`ent: validator failed for field "FieldType.ip": %w`, err)}
		}
	}
	if v, ok := _u.mutation.Role(); ok {
		if err := fieldtype.RoleValidator(v); err != nil {
			return &ValidationError{Name: "role", err: fmt.Errorf(`ent: validator failed for field "FieldType.role": %w`, err)}
		}
	}
	if v, ok := _u.mutation.Priority(); ok {
		if err := fieldtype.PriorityValidator(v); err != nil {
			return &ValidationError{Name: "priority", err: fmt.Errorf(`ent: validator failed for field "FieldType.priority": %w`, err)}
		}
	}
	return nil
}

func (_u *FieldTypeUpdate) gremlinSave(ctx context.Context) (int, error) {
	if err := _u.check(); err != nil {
		return 0, err
	}
	res := &gremlin.Response{}
	query, bindings := _u.gremlin().Query()
	if err := _u.driver.Exec(ctx, query, bindings, res); err != nil {
		return 0, err
	}
	if err, ok := isConstantError(res); ok {
		return 0, err
	}
	_u.mutation.done = true
	return res.ReadInt()
}

func (_u *FieldTypeUpdate) gremlin() *dsl.Traversal {
	v := g.V().HasLabel(fieldtype.Label)
	for _, p := range _u.mutation.predicates {
		p(v)
	}
	var (
		trs []*dsl.Traversal
	)
	if value, ok := _u.mutation.Int(); ok {
		v.Property(dsl.Single, fieldtype.FieldInt, value)
	}
	if value, ok := _u.mutation.AddedInt(); ok {
		v.Property(dsl.Single, fieldtype.FieldInt, __.Union(__.Values(fieldtype.FieldInt), __.Constant(value)).Sum())
	}
	if value, ok := _u.mutation.Int8(); ok {
		v.Property(dsl.Single, fieldtype.FieldInt8, value)
	}
	if value, ok := _u.mutation.AddedInt8(); ok {
		v.Property(dsl.Single, fieldtype.FieldInt8, __.Union(__.Values(fieldtype.FieldInt8), __.Constant(value)).Sum())
	}
	if value, ok := _u.mutation.Int16(); ok {
		v.Property(dsl.Single, fieldtype.FieldI


::raw::c_int;
}
extern "C" {
    pub fn dmu_buf_add_ref(db: *mut dmu_buf_t, tag: *mut ::std::os::raw::c_void);
}
extern "C" {
    pub fn dmu_buf_try_add_ref(
        arg1: *mut dmu_buf_t,
        os: *mut objset_t,
        object: u64,
        blkid: u64,
        tag: *mut ::std::os::raw::c_void,
    ) -> boolean_t;
}
extern "C" {
    pub fn dmu_buf_rele(db: *mut dmu_buf_t, tag: *mut ::std::os::raw::c_void);
}
extern "C" {
    pub fn dmu_buf_refcount(db: *mut dmu_buf_t) -> u64;
}
extern "C" {
    pub fn dmu_buf_user_refcount(db: *mut dmu_buf_t) -> u64;
}
extern "C" {
    pub fn dmu_buf_hold_array_by_bonus(
        db: *mut dmu_buf_t,
        offset: u64,
        length: u64,
        read: boolean_t,
        tag: *mut ::std::os::raw::c_void,
        numbufsp: *mut ::std::os::raw::c_int,
        dbpp: *mut *mut *mut dmu_buf_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn dmu_buf_rele_array(
        arg1: *mut *mut dmu_buf_t,
        numbufs: ::std::os::raw::c_int,
        tag: *mut ::std::os::raw::c_void,
    );
}
pub type dmu_buf_evict_func_t =
    ::std::option::Option<unsafe extern "C" fn(user_ptr: *mut ::std::os::raw::c_void)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct dmu_buf_user {
    pub dbu_tqent: taskq_ent_t,
    pub dbu_evict_func_sync: dmu_buf_evict_func_t,
    pub dbu_evict_func_async: dmu_buf_evict_func_t,
}
#[test]
fn bindgen_test_layout_dmu_buf_user() {
    assert_eq!(
        ::std::mem::size_of::<dmu_buf_user>(),
        56usize,
        concat!("Size of: ", stringify!(dmu_buf_user))
    );
    assert_eq!(
        ::std::mem::align_of::<dmu_buf_user>(),
        8usize,
        concat!("Alignment of ", stringify!(dmu_buf_user))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<dmu_buf_user>())).dbu_tqent as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(dmu_buf_user),
            "::",
            stringify!(dbu_tqent)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<dmu_buf_user>())).dbu_evict_func_sync as *const _ as usize
        },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(dmu_buf_user),
            "::",
            stringify!(dbu_evict_func_sync)
        )
    );
    assert_eq!(
        unsafe {


="el" href="structtram_1_1_message.html#ad7f83643df194a92e3376d78596b9afda88ef805d301227661029ccb4e90e262e">tram::Message

pitch : tram::Ext::Camera::FirstPersonCamera

pixels : tram::Render::API::SWTexture

planes : tram::Transition

Play() : tram::AnimationComponent, tram::AudioComponent, tram::SpriteComponent

play_on_start : tram::AudioComponent

Player() : tram::Player

PlayerComponent() : tram::PlayerComponent

PlaySound() : tram::Ext::Kitchensink::SoundTable

plomp : tram::Player

point : tram::Audio::Spatial::PathFromAudioSource, tram::Audio::Spatial::PathTracingResult, <a class="el" hr


,futureParentElement:h})}
var e=d.$$slots=S(),f;for(f in b.$$slots)e[f]=b.$$slots[f]?va(a,b.$$slots[f],c):null;return d}function $b(a,b,c,d,e){var f=c.$attr,k;switch(a.nodeType){case 1:Da(b,wa(ta(a)),"E",d,e);for(var l,m,n,p=a.attributes,u=0,r=p&&p.length;u<r;u++){var B=!1,x=!1;l=p[u];k=l.name;m=V(l.value);l=wa(k);if(n=xa.test(l))k=k.replace(Xc,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()});(l=l.match(za))&&Q(l[1])&&(B=k,x=k.substr(0,k.length-5)+"end",k=k.substr(0,k.length-6));l=wa(k.toLowerCase());f[l]=
k;if(n||!c.hasOwnProperty(l))c[l]=m,Tc(a,l)&&(c[l]=!0);ha(a,b,m,l,n);Da(b,l,"A",d,e,B,x)}a=a.className;J(a)&&(a=a.animVal);if(I(a)&&""!==a)for(;k=h.exec(a);)l=wa(k[2]),Da(b,l,"C",d,e)&&(c[l]=V(k[3])),a=a.substr(k.index+k[0].length);break;case Na:if(11===Ba)for(;a.parentNode&&a.nextSibling&&a.nextSibling.nodeType===Na;)a.nodeValue+=a.nextSibling.nodeValue,a.parentNode.removeChild(a.nextSibling);$(b,a.nodeValue);break;case 8:try{if(k=g.exec(a.nodeValue))l=wa(k[1]),Da(b,l,"M",d,e)&&(c[l]=V(k[2]))}catch(A){}}b.sort(X);
return b}function Yc(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw ea("uterdir",b,c);1==a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return G(d)}function O(a,b,c){return function(d,e,f,g,h){e=Yc(e[0],b,c);return a(d,e,f,g,h)}}function ac(a,b,c,d,e,f){var g;return a?aa(b,c,d,e,f):function(){g||(g=aa(b,c,d,e,f),b=c=f=null);return g.apply(this,arguments)}}function Ta(a,b,d,e,f,g,h,k,l){function m(a,b,c,d){if(a){c&&
(a=O(a,c,d));a.require=t.require;a.directiveName=M;if(B===t||t.$$isolateScope)a=fa(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=O(b,c,d));b.require=t.require;b.directiveName=M;if(B===t||t.$$isolateScope)b=fa(b,{isolateScope:!0});k.push(b)}}function n(a,c,e,f,g){function l(a,b,c,d){var e;Za(a)||(d=c,c=b,b=a,a=void 0);w&&(e=z);c


tags-s-f657e6c9f21543.html" target="_blank" class="relatedlink">收费就不是骗人的，据我所知大多都不是骗人的。我经常在58同城免费送狗狗。我家里狗狗没有绝育，每年生十几条狗狗，希望他们有干的归宿就会送人，免费送可以挑选合适的主人。

也有的人突然有事不能继续养了也会挑选合适的主人，不要钱是因为把狗狗当伙伴不是商品。

有类似“土猫网”那样的收养狗狗的网站吗？

这要看是哪个城市的，异地领养不是不可以，但是很麻烦，最好还是在本地找领养。
如果本地没有专门的领养网站，那么可以去本地赶集网，或者58同城网，这些网站都有专门的宠物领养频道。去看看吧，希望对你有帮助。

我想领养一只小狗请问有人知道北京哪有流浪狗<a h


increaseStock(stock:number){
        this.stock+=stock;
    }
    reduceStock(stock:number){
        if(this.stock < stock){
            throw new Error('库存不足');
        }
        this.stock -= stock;
    }
    static fill(id: string, code: string, name: string, price: number, stock: number): Goods {
        let goods = new Goods();
        goods.id = id;
        goods.code = code;
        goods.name = name;
        goods.price = price;
        goods.stock = stock;
        return goods;
    }
}import { fluentOption } from './index';

export default {
  title: 'Components/Listbox Option',
  component: fluentOption,
  argTypes: {
    disabled: {
      control: { type: 'boolean' },
    },
    selected: {
      control: { type: 'boolean' },
    },
    value: {
      control: { type: 'text' },
    },
  },
};

const listBoxTemplate = ({ disabled, label, selected, value }) => `
  <fluent-option
    ${disabled ? 'disabled' : ''}
    ${selected ? 'selected' : ''}
    ${value ? `value="${value}"` : ''}
  >${label}</fluent-option>
`;

export const ListboxOption = listBoxTemplate.bind({});

ListboxOption.args = {
  label: 'This is an Option',
  selected: false,
};

const example = `
<fluent-option> Text content is the value when the value attribute is absent. </fluent-option>
`;

ListboxOption.parameters = {
  docs: {
    source: {
      code: example,
    },
  },
};
import {
  IGBCallInfo,
  IGBCreateCallResult,
  IGBCallEvent,
  IGBCallEnded,
  IGBClientMessage,
} from '../proto';
import { Status } from '../types';
import { Subject } from 'rxjs/Subject';

export interface ICallHandle {
  // Send a message on a streaming call
  write?(msg: any): void;

  // Register a callback handler on a streaming call.
  on?(eventId: string, callback: (arg: any) => void): void;

  // Remove all handlers for an event on a streaming call.
  off?(eventId: string): void;

  // Call to send the 'end' on a client-side streaming call.
  end?(): void;

  // Call to terminate this call on a streaming call.
  terminate?(): void;
}
export class Call<T = any> implements ICallHandle {
  public disposed: Subject<Call<T>> = new Subject<Call<T>>();
  private eventHandlers: { [id: string]: ((arg: any) => void)[] } = {};
  private endEmitted: boolean = false;
  private responseBuilder: import('protobufjs').Type;
  private requestBuilder: import('protobufjs').Type;

  constructor(public clientId: number,
              public clientServiceId: number,
              private info: IGBCallInfo,
              private callMeta: import('protobufjs').Method,
              private callback: (error?: any, response?: T) => void,
              private send: (message: IGBClientMessage) => void) {
    this.requestBuilder = callMeta.resolvedRequestType;
    this.responseBuilder = callMeta.resolvedResponseType;
  }

  public on(eventId: 'error', callback: (arg: Error) => void): void;
  public on(eventId: 'data', callback: (arg: T) => void): void;
  public on(eventId: 'status', callback: (arg: Status) => void): void;
  public on(eventId: 'end', callback: () => void): void;
  public on(eventId: string, callback: (arg: any) => void): void {
    let handlers = this.eventHandlers[e


",
	Ccedil:"Κεφαλαίο λατινικό γράμμα C με υπόστιξη",
	Egrave:"Κεφαλαίο λατινικό γράμμα E με βαρεία",
	Eacute:"Κεφαλαίο λατινικό γράμμα E με οξεία",
	Ecirc:"Κεφαλαίο λατινικό γράμμα E με περισπωμένη circumflex",
	Euml:"Κεφαλαίο λατινικό γράμμα E με διαλυτικά",
	Igrave:"Κεφαλαίο λατινικό γράμμα I με βαρεία",
	Iacute:"Κεφαλαίο λατινικό γράμμα I με οξεία",
	Icirc:"Κεφαλαίο λατινικό γράμμα I με περισπωμένη circumflex",
	Iuml:"Κεφαλαίο λατινικό γράμμα I με διαλυτικά",
	ETH:"Κεφαλαίο λατινικό γράμμα ETH",
	Ntilde:"Κεφαλαίο λατινικό γράμμα N με περισπωμένη tilde",
	Ograve:"Κεφαλαίο λατινικό γράμμα O με βαρεία",
	Oacute:"Κεφαλαίο λατινικό γράμμα O με οξεία",
	Ocirc:"Κεφαλαίο λατινικό γράμμα O με περισπωμένη circumflex",
	Otilde:"Κεφαλαίο λατινικό γράμμα O με περισπωμένη tilde",
	Ouml:"Κεφαλαίο λατινικό γράμμα O με διαλυτικά",
	times:"Σύμβολο πολλαπλασιασμού",
	Oslash:"Κεφαλαίο λατινικό γράμμα O με κάθετο",
	Ugrave:"Κεφαλαίο λατινικό γράμμα U με βαρεία",
	Uacute:"Κεφαλαίο λατινικό γράμμα U με οξεία",
	Ucirc:"Κεφαλαίο λατινικό γράμμα U με περισπωμένη circumflex",
	Uuml:"Κεφαλαίο λατινικό γράμμα U με διαλυτικά",
	Yacute:"Κεφαλαίο λατινικό γράμμα Y με οξεία",
	THORN:"Κεφαλαίο λατινικό γράμμα THORN",
	szlig:"Πεζό λατινικό γράμμα ες-τσετ",
	agrave:"Πεζό λατινικό γράμμα a με βαρεία",
	aacute:"Πεζό λατινικό γράμμα a με οξεία",
	acirc:"Πεζό λατινικό γράμμα a με περισπωμένη circumflex",
	atilde:"Πεζό λατινικό γράμμα a με περισπωμένη tilde",
	auml:"Πεζό λατινικό γράμμα a με διαλυτικά",
	aring:"Πεζό λατινικό γράμμα a με δακτύλιο",
	aelig:"Πεζό λατινικό δίψηφο ae",
	ccedil:"Πεζό λατινικό γράμμα c με υπόστι


: -1, value: null};
                this.itemsCount--;

                return slot.value;
            }
        } while (slot);

        return null;
    }

    /**
     * Search the node with key equal to @key in the table.
     * @time O(1/(1-n/m))
     * @note: under the assumption of uniform hashing.
     */
    search(key: number): T | null {
        let i = 0;
        let counter = 0;
        let hash: number;
        let slot: KeyValueObject<T>;

        do {
            hash = this.calculateHash(key, i++);
            slot = this.table[hash];

            // Node is found.
            if (slot && slot.key === key) return slot.value;
        } while (this.table[hash] && counter++ <= this.capacity); // to avoid inifinite loop.

        return null;
    }

    /**
     * Double-Hashing Probing.
     */
    private calculateHash(key: number, i: number): number {
        const hash01 = key % this.capacity;
        const hash02 = this.prime - (key % this.prime);

        return (hash01 + i * hash02) % this.capacity;
    }
}

/**
 * Open Adress Hash Table Cell interface.
 */
export interface OpenAddressTable<T> {
    [key: number]: KeyValueObject<T>;
}
import Subscriber from './Subscriber'

export default class Observer {

  private _subscribers: Subscriber[] = [];

  constructor(

    /**
     * The name of the callback the subscriber is using when notified
     */
    public callbackName: string = 'onNotify'
  ) { }

  subscribe(subscriber: Subscriber) {

    this._subscribers.push(subscriber);
  }

  unsubscribe(subscriber: Subscriber) {

    const index = this._subscribers.indexOf(subscriber);

    if (index > -1) {

      this._subscribers.splice(index, 1);
    }
  }

  notify(...args: any[]) {

    args.push(this); // Append the observer to the list of arguments to make it accessable to the subscriber

    for (let subscriber of this._subscribers) {

      (subscriber as any)[this.callbackName](...args);
    }
  }
}
import fill from 'lodash/fill'

import type { Ballot } from '../types'
import { toWeightedBallots } from '../utils'

export const abcde = ['a', 'b', 'c', 'd', 'e']

export const balinski: Ballot[] = toWeightedBallots([
  ...fill(new Array(33), [['a'], ['b'], ['c'], ['d'], ['e']]),
  ...fill(new Array(16), [['b'], ['d'], ['c'], ['e'], ['a']]),
  ...fill(new Array(3), [['c'], ['d'], ['b'], ['a'], ['e']]),
  ...fill(new Array(8), [['c'], ['e'], ['b'], ['d'], ['a']]),
  ...fill(new Array(18), [['d'], ['e'], ['c'], ['b'], ['a']]),
  ...fill(new Array(22), [['e'], ['c'], ['b'], ['d'], ['a']]),
])

export const sW: Ballot[] = toWeightedBallots([
  ...fill(new Array(5), [['a'], ['c'], ['b'], ['e'], ['d']]),
  ...fill(new Array(5), [['a'], ['d'], ['e'], ['c'], ['b']]),
  ...fill(new Array(8), [['b'], ['e'], ['d'], ['a'], ['c']]),
  ...fill(new Array(3), [['c'], ['a'], ['b'], ['e'], ['d']]),
  ...fill(new Array(7), [['c'], ['a'], ['e'], ['b'], ['d']]),
  ...fill(new Array(2), [['c'], ['b'], ['a'], ['d'], ['e']]),
  ...fill(new Array(7), [['d'], ['c'], ['e'], ['b


/* $NetBSD: db_machdep.h,v 1.3.6.1 1997/11/20 03:13:37 mellon Exp $ */

/*
 * Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author)
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *      This product includes software developed by Jonathan Stone for
 *      the NetBSD Project.
 * 4. The name of the author may not be used to endorse or promote products
 *    derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */
#ifndef	_MIPS_DB_MACHDEP_H_
#define	_MIPS_DB_MACHDEP_H_

#include <vm/vm_param.h>		/* XXX  boolean_t */
#include <mips/trap.h>			/* T_BREAK */
#include <mips/reg.h>			/* register state */
#include <mips/regnum.h>		/* symbolic register indices */
#include <mips/proc.h>			/* register state */

typedef	vm_offset_t	db_addr_t;	/* address - unsigned */
typedef	long		db_expr_t;	/* expression - signed */

typedef struct frame db_regs_t;

db_regs_t		ddb_regs;	/* register state */
#define	DDB_REGS	(&ddb_regs)

#define	PC_REGS(regs)	((db_addr_t)(regs)->f_regs[PC])

#define PC_ADVANCE(regs) do {						\
	if ((db_get_value((regs)->f_regs[PC], sizeof(int), FALSE) &	\
	     0xfc00003f) == 0xd)					\
		(regs)->f_regs[PC] += BKPT_SIZE;			\
} while(0)				/* XXX endianness? */

#define BKPT_INST	0x0001000D	/* XXX endianness? */
#define	BKPT_SIZE	(4)		/* size of breakpoint inst */
#define	BKPT_SET(inst)	(BKPT_INST)

#define	IS_BREAKPOINT_TRAP(type, code)	((type) == T_BREAK)
#define IS_WATCHPOINT_TRAP(type, code)	(0)	/* XXX mips3 watchpoint */

#define	inst_trap_return(ins)	((ins)&0)
#define	inst_return(ins)	((ins)&0)
#define inst_load(ins)		0
#define inst_store(ins)		0

/*
 * Interface to  disassembly (shared with mdb)
 */
db_addr_t  db_disasm_insn __P((int insn, db_addr_t loc,  boolean_t altfmt));

/*
 * Entrypoints to DDB for kernel, keyboard drivers, init hook
 */
void 	kdb_kbd_trap __P((db_regs_t *));
int 	kdb_trap __P((int type, db_regs_t *));
void	db_machine_init __P((void));

/*
 * We use ELF symbols in DDB.
 *
 */
/* #define	DB_ELF_SYMBOLS */
#define	DB_AOUT_SYMBOLS */

/*
 * MIPS cpus have no hardware single-step.
 */
#define SOFTWARE_SSTEP

boolean_t inst_branch __P((int inst));
boolean_t inst_call __P((int inst));
boolean_t inst_unconditional_flow_transfer __P((int inst));
db_addr_t branch_taken __P((int inst, db_addr_t pc, db_regs_t *regs));
db_addr_t next_instr_address __P((db_addr_t pc, boolean_t bd));

/*
 * We have  machine-dependent commands.
 */
#define DB_MACHINE_COMMANDS

#endif	/* _MIPS_DB_MACHDEP_H_ */


re.String? name,
  }) {
    final $result = create();
    if (filter != null) {
      $result.filter = filter;
    }
    if (pageSize != null) {
      $result.pageSize = pageSize;
    }
    if (pageToken != null) {
      $result.pageToken = pageToken;
    }
    if (name != null) {
      $result.name = name;
    }
    return $result;
  }
  ListOperationsRequest._() : super();
  factory ListOperationsRequest.fromBuffer($core.List<$core.int> i,
          [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(i, r);
  factory ListOperationsRequest.fromJson($core.String i,
          [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'ListOperationsRequest',
      package:
          const $pb.PackageName(_omitMessageNames ? '' : 'google.longrunning'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'filter')
    ..a<$core.int>(2, _omitFieldNames ? '' : 'pageSize', $pb.PbFieldType.O3)
    ..aOS(3, _omitFieldNames ? '' : 'pageToken')
    ..aOS(4, _omitFieldNames ? '' : 'name')
    ..hasRequiredFields = false;

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

  $pb.BuilderInfo get info_ => _i;

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

  /// The standard list filter.
  @$pb.TagNumber(1)
  $core.String get filter => $_getSZ(0);
  @$pb.TagNumber(1)
  set filter($core.String v) {
    $_setString(0, v);
  }

  @$pb.TagNumber(1)
  $core.bool hasFilter() => $_has(0);
  @$pb.TagNumber(1)
  void clearFilter() => clearField(1);

  /// The standard list page size.
  @$pb.TagNumber(2)
  $core.int get pageSize => $_getIZ(1);
  @$pb.TagNumber(2)
  set pageSize($core.int v) {
    $_setSignedInt32(1, v);
  }

  @$pb.TagNumber(2)
  $core.bool hasPageSize() => $_has(1);
  @$pb.TagNumber(2)
  void clearPageSize() => clearField(2);

  /// The standard list page token.
  @$pb.TagNumber(3)
  $core.String get pageToken => $_getSZ(2);
  @$pb.TagNumber(3)
  set pageToken($core.String v) {
    $_setString(2, v);
  }

  @$pb


.
     *

     * This represents the concept of the year within the era.
     * This field is typically used with {@link #ERA}.
     *

     * The standard mental model for a date is based on three concepts - year, month and day.
     * These map onto the {@code YEAR}, {@code MONTH_OF_YEAR} and {@code DAY_OF_MONTH} fields.
     * Note that there is no reference to eras.
     * The full model for a date requires four concepts - era, year, month and day. These map onto
     * the {@code ERA}, {@code YEAR_OF_ERA}, {@code MONTH_OF_YEAR} and {@code DAY_OF_MONTH} fields.
     * Whether this field or {@code YEAR} is used depends on which mental model is being used.
     * See {@link ChronoLocalDate} for more discussion on this topic.
     *

     * In the default ISO calendar system, there are two eras defined, 'BCE' and 'CE'.
     * The era 'CE' is the one currently in use and year-of-era runs from 1 to the maximum value.
     * The era 'BCE' is the previous era, and the year-of-era runs backwards.
     *

     * For example, subtracting a year each time yield the following:

     * - year-proleptic 2  = 'CE' year-of-era 2

     * - year-proleptic 1  = 'CE' year-of-era 1

     * - year-proleptic 0  = 'BCE' year-of-era 1

     * - year-proleptic -1 = 'BCE' year-of-era 2

     *

     * Note that the ISO-8601 standard does not actually define eras.
     * Note also that the ISO eras do not align with the well-known AD/BC eras due to the
     * change between the Julian and Gregorian calendar systems.
     *

     * Non-ISO calendar systems should implement this field using the most recognized
     * year-of-era value for users of the calendar system.
     * Since most calendar systems have only two eras, the year-of-era numbering approach
     * will typically be the same as that used by the ISO calendar system.
     * The year-of-era value should typically always be positive, however this is not required.
     */
    YEAR_OF_ERA("YearOfEra", YEARS, FOREVER, ValueRange.of(1, Year.MAX_VALUE, Year.MAX_VALUE + 1)),
    /**
     * The proleptic year, such as 2012.
     *

     * This represents the concept of the year, counting sequentially and using negative numbers.
     * The proleptic year is not interpreted in terms of the era.
     * See {@link #YEAR_OF_ERA} for an example showing the mapping from proleptic year to year-of-era.
     *

     * The standard mental model for a date is based on three concepts - year, month and day.
     * These map onto the {@code YEAR}, {@code MONTH_OF_YEAR} and {@code DAY_OF_MONTH} fields.
     * Note that there is no reference to eras.
     * The full model for a date requires four concepts - era, year, month and day. These map onto
     * the {@code ERA}, {@code YEAR_OF_ERA}, {@code MONTH_OF_YEAR} and {@code DAY_OF_MONTH} fields.
     * Whether this field or {@code YEAR_OF_ERA} is used depends on which mental model is being used.
     * See {@link ChronoLocalDate} for more discussion on this topic.
     *

     * Non-ISO calendar systems should implement this field as follows.
     * If the calendar system has only two eras, before and after a fixed date, then the
     * proleptic-year value must be the same as the year-of-era value for the later era,
     * and increasingly negative for the earlier era.
     * If the calendar system has more than two eras, then the proleptic-year value may be
     * defined with any appropriate value,


Value
import org.luckypray.dexkit.query.enums.StringMatchType

class StringMatcher : BaseQuery, IAnnotationEncodeValue {
    @set:JvmSynthetic
    var value: String? = null
    @set:JvmSynthetic
    var matchType: StringMatchType = StringMatchType.Contains
    @set:JvmSynthetic
    var ignoreCase: Boolean = false

    constructor()

    /**
     * Create a new [StringMatcher].
     * ----------------
     * 创建一个新的 [StringMatcher]。
     *
     * @param value string / 字符串
     * @param matchType match type / 匹配类型
     * @param ignoreCase ignore case / 忽略大小写
     * @return [StringMatcher]
     */
    @JvmOverloads
    constructor(
        value: String,
        matchType: StringMatchType = StringMatchType.Contains,
        ignoreCase: Boolean = false
    ) {
        this.value = value
        this.matchType = matchType
        this.ignoreCase = ignoreCase
    }

    /**
     * Set the matched string.
     * ----------------
     * 设置待匹配的字符串。
     *
     * @param value string / 字符串
     * @return [StringMatcher]
     */
    fun value(value: String) = also {
        this.value = value
    }

    /**
     * Set the match type.
     * ----------------
     * 设置匹配类型。
     *
     * @param matchType match type / 匹配类型
     * @return [StringMatcher]
     */
    fun matchType(matchType: StringMatchType) = also {
        this.matchType = matchType
    }

    /**
     * Set whether to ignore case.
     * ----------------
     * 设置是否忽略大小写。
     *
     * @param ignoreCase ignore case / 忽略大小写
     * @return [StringMatcher]
     */
    fun ignoreCase(ignoreCase: Boolean) = also {
        this.ignoreCase = ignoreCase
    }

    companion object {
        /**
         * Create a new [StringMatcher].
         * ----------------
         * 创建一个新的 [StringMatcher]。
         *
         * @param value string / 字符串
         * @param matchType match type / 匹配类型
         * @param ignoreCase ignore case / 忽略大小写
         * @return [StringMatcher]
         */
        @JvmStatic
        @JvmOverloads
        fun create(
            value: String,
            matchType: StringMatchType = StringMatchType.Contains,
            ignoreCase: Boolean = false
        ) = StringMatcher(value, matchType, ignoreCase)
    }

    override fun innerBuild(fbb: FlatBufferBuilder): Int {
        value ?: throw IllegalArgumentException("value must not be null")
        if (value!!.isEmpty() && matchType != StringMatchType.Equals) {
            matchType = StringMatchType.Equals
        }
        val root = InnerStringMatcher.createStringMatcher(
            fbb,
            fbb.createString(value),
            matchType.value,
            ignoreCase
        )
        fbb.finish(root)
        return root
    }
}import java.nio.file.*

plugins {
    id("java")
    id("application")
    id("org.graalvm.buildtools.native") version "0.10.2"
}

java {
    sourceCompatibility = JavaVersion.VERSION_21
    targetCompatibility = JavaVersion.VERSION_21
}

repositories {
    mavenCentral()
    gradlePluginPortal()
}

group = "org.example"
version = "1.0-SNAPSHOT"
description = "embedding"

var graalVMVersion: String = "24.0.1";
dependencies {
    implementation("org.graalvm.polyglot:polyglot:$graalVMVersion")
    implementation("org.graalvm.polyglot:js:$graalVMVersion")
    testImplementation("junit:junit:4.13.2")
}

val isGraalVM = Files.exists(Paths.get("${System.getProperty("java.home")}/lib/graalvm"))

val jvmDefaultArgs: List<Strin


> - Wanderers' Highway (Floor)
- DLC - Clash of Weapons and Shields (Floor), Timeworn Cave (Shop, Wall)

#### Affixing Bracelet

- [Dune of Batsu](/dungeons/dune-of-batsu) (Floor)
- [Training Path of Shopping](/dungeons/training-path-of-shopping) (Shop)
- [Training Path of Extra Inference](/dungeons/training-path-of-extra-inference) (Floor)
- [Heart of Serpentcoil Island](/dungeons/heart-of-serpentcoil-island) (Floor, Shop)
- DLC - Clash of Weapons and Shields (Floor), Timeworn Cave (Shop)

#### Cursebreak Bracelet

- [Dune of Batsu](/dungeons/dune-of-batsu) (Shop)
- [Training Path of Shopping](/dungeons/training-path-of-shopping) (Shop)
- [Training Path of Extra Inference](/dungeons/training-path-of-extra-inference) (Floor)
- [Heart of Serpentcoil Island](/dungeons/heart-of-serpentcoil-island) (Floor, Shop)
- DLC - Clash of Weapons and Shields (Floor), Timeworn Cave (Shop)

#### Bouncy Bracelet

- [Behemoth Rush](/dungeons/behemoth-rush) (Floor)
- [Training Path of Shopping](/dungeons/training-path-of-shopping) (Shop)
- [Training Path of Extra Inference](/dungeons/training-path-of-extra-inference) (Floor)
- [Heart of Serpentcoil Island](/dungeons/heart-of-serpentcoil-island) (Floor, Shop)
- DLC - Clash of Weapons and Shields (Shop)

#### Daredevil Bracelet

- [Training Path of Shopping](/dungeons/training-path-of-shopping) (Shop)
- [Training Path of Extra Inference](/dungeons/training-path-of-extra-inference) (Floor)
- [Heart of Serpentcoil Island](/dungeons/heart-of-serpentcoil-island) (Floor, Shop)

#### Far-throwing Bracelet

- [Behemoth Rush](/dungeons/behemoth-rush) (Floor)
- [Training Path of Inference](/dungeons/training-path-of-inference)
- [Training Path of Extra Inference](/dungeons/training-path-of-extra-inference)
- [Isle of the Mighty](/dungeons/isle-of-the-mighty)
- [Heart of Serpentcoil Island](/dungeons/heart-of-serpentcoil-island) (Floor, Shop)
- DLC - Clash of Weapons and Shields (Wall), Researcher's Experimental Site (Floor), Timeworn Cave (Floor)

#### Sure-aim Bracelet

- [Training Path of Extra Inference](/dungeons/training-path-of-extra-inference) (4-50F)
- [Isle of the Mighty](/dungeons/isle-of-the-mighty) (Shop, Chow)
- [Heart of Serpentcoil Island](/dungeons/heart-of-serpentcoil-island) (Floor, Shop)
- UPD - Wanderers' Highway (Floor)
- DLC - Clash of Weapons and Shields (Floor), Winding Valley (Floor, Shop)

#### Bad-aim


d
      SMODS.destroy_cards(destroyed_cards)
    elseif idx == 3 then
      for i = 1, #G.hand.highlighted do
        local percent = 0.85 + (i - 0.999) / (#G.hand.highlighted - 0.998) * 0.3
        G.E_MANAGER:add_event(Event({
          trigger = 'after',
          delay = 0.15,
          func = function()
            G.hand.highlighted[i]:flip(); play_sound('tarot2', percent, 0.6); G.hand.highlighted[i]
              :juice_up(
                0.3, 0.3); return true
          end
        }))
      end
      for i=1, #G.hand.highlighted do
        G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function()
          G.hand.highlighted[i]:set_edition("e_polychrome")
          return true end }))
      end
      delay(0.2)
      for i = 1, #G.hand.highlighted do
        local percent = 0.85 + (i - 0.999) / (#G.hand.highlighted - 0.998) * 0.3
        G.E_MANAGER:add_event(Event({
          trigger = 'after',
          delay = 0.15,
          func = function()
            G.hand.highlighted[i]:flip(); play_sound('tarot2', percent, 0.6); G.hand.highlighted[i]
              :juice_up(
                0.3, 0.3); return true
          end
        }))
      end
    end
  end
}

return joker


][HEVC_AAC][繁體內嵌]")
    assertEquals("10..10", r.episodeRange.toString())
    assertEquals("CHT", r.subtitleLanguages.sortedBy { it.id }.joinToString { it.id })
    assertEquals("1080P", r.resolution.toString())
    assertEquals(SubtitleKind.EMBEDDED, r.subtitleKind)
    }
  }

  @Test
  public fun `651006_Mushoku_Tensei___Season_2_10_WebRip_1080p_HEVC_AAC`() {
    kotlin.run {
    val r =
        parse("[北宇治字幕组] 无职转生Ⅱ ～到了异世界就拿出真本事～/ Mushoku Tensei - Season 2 [10][WebRip][1080p][HEVC_AAC][简体内嵌]")
    assertEquals("10..10", r.episodeRange.toString())
    assertEquals("CHS", r.subtitleLanguages.sortedBy { it.id }.joinToString { it.id })
    assertEquals("1080P", r.resolution.toString())
    assertEquals(SubtitleKind.EMBEDDED, r.subtitleKind)
    }
  }

  @Test
  public fun `651005_Mushoku_Tensei___Season_2_10_WebRip_1080p_HEVC_AAC`() {
    kotlin.run {
    val r =
        parse("[北宇治字幕组] 无职转生Ⅱ ～到了异世界就拿出真本事～/ Mushoku Tensei - Season 2 [10][WebRip][1080p][HEVC_AAC][简繁内封]")
    assertEquals("10..10", r.episodeRange.toString())
    assertEquals("CHS, CHT", r.subtitleLanguages.sortedBy { it.id }.joinToString { it.id })
    assertEquals("1080P", r.resolution.toString())
    assertEquals(SubtitleKind.CLOSED, r.subtitleKind)
    }
  }

  @Test
  public fun `650947_S2_Mushoku_Tensei_S2_10_1080p`() {
    kotlin.run {
    val r = parse("[桜都字幕组] 无职转生～到了异世界就拿出真本事～ S2 / Mushoku Tensei S2 [10][1080p][简繁内封]")
    assertEquals("10..10", r.episodeRange.toString())
    assertEquals("CHS, CHT", r.subtitleLanguages.sortedBy { it.id }.joinToString { it.id })
    assertEquals("1080P", r.resolution.toString())
    assertEquals(SubtitleKind.CLOSED, r.subtitleKind)
    }
  }

  @Test
  public fun `650946_S2_Mushoku_Tensei_S2_10_1080P_60FPS`() {
    kotlin.run {
    val r = parse("[桜都字幕組] 無職轉生～到了異世界就拿出真本事～ S2 / Mushoku Tensei S2 [10][1080P@60FPS][繁體內嵌]")
    assertEquals("10..10", r.episodeRange.toString())
    assertEquals("CHT", r.subtitleLanguages.sortedBy { it.id }.joinToString { it.id })
    assertEquals("1080P", r.resolution.toString())
    assertEquals(SubtitleKind.EMBEDDED, r.subtitleKind)
    }
  }

  @Test
  public fun `650945_S2_Mushoku_Tensei_S2_10_1080P_60FPS`() {
    kotlin.run {
    val r = parse("[桜都


}

.button.secondary:hover {
  background-color: #292929;
  border-color: #292929;
}

.button.secondary:active, .button.secondary.active {
  background-color: #0f0f0f;
  border-color: #0f0f0f;
}

.button.secondary[disabled], .button.secondary.disabled {
  color: #fff;
  background-color: #424242;
  border-color: #424242;
}

.button-group {
  display: block;
  margin-bottom: 1.5rem;
}

.button-group:after {
  content: '';
  display: table;
  clear: both;
}

:not(.button-group) > .button {
  width: 100%;
}

@media screen and (min-width: 35em) {
  :not(.button-group) > .button {
    width: auto;
  }
}

form .button {
  display: block;
  margin: 0;
}
@import "minimal-blocks";

:--namespace .glsr {
    --glsr-gray-300: #dcd7ca;
    --glsr-black: #000;
    --glsr-red: #cd2653;
    --glsr-font: "Inter var", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
    --glsr-font-serif: NonBreakingSpaceOverride, "Hoefler Text", "Noto Serif", Garamond, "Times New Roman", serif;
    --glsr-leading: 1.476;
    --glsr-input-radius: 0;
    --glsr-input-px: 1em;
    --glsr-input-py: 0.83333333em;
    --glsr-text-base: 18px;
    --glsr-text-sm: 0.88888889em;
    --glsr-summary-text: 0.88888889em;
    --glsr-toggle-h: 1em;
    --glsr-description-text: 15px;

    @media (min-width: 700px) {
        --glsr-text-base: 21px;
    }
    font-family: var(--glsr-font-serif);
}
:--namespace .glsr-button {
    border: none;
}
:--namespace .glsr .wp-block-button {
    margin: 0 !important;
}
:--namespace .glsr-toggle,
:--namespace .glsr-toggle > label {
    font-family: var(--glsr-font);
    font-size: var(--glsr-text-sm);
    font-weight: normal;
}
:--namespace form.glsr-form .glsr-field-checkbox label,
:--namespace form.glsr-form .glsr-field-radio label {
    font-family: var(--glsr-font);
    font-weight: normal;
}
:--namespace form.glsr-form label.glsr-label {
    font-family: var(--glsr-font);
    font-weight: normal;
    margin-bottom: var(--glsr-gap-sm);
}
:--namespace form.glsr-form .glsr-description {
    font-family: var(--glsr-font);
    font-size: var(--glsr-description-text);
    margin-bottom: var(--glsr-gap-sm);
}
:--namespace form.glsr-form input.glsr-input,
:--namespace form.glsr-form select.glsr-select,
:--namespace form.glsr-form textarea.glsr-textarea {
    border: solid 0.1rem var(--glsr-gray-300);
    border-radius: var(--glsr-input-radius);
    font-family: var(--glsr-font);
    font-size: var(--glsr-text-sm);
    letter-spacing: -0.015em;
    line-height: var(--glsr-leading);
    padding: var(--glsr-input-py) var(--glsr-input-px);
}
:--namespace .glsr-pagination .nav-links {
    al


sher
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.notifications
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.perfmon
import jetbrains.buildServer.configs.kotlin.v2019_2.failureConditions.BuildFailureOnMetric
import jetbrains.buildServer.configs.kotlin.v2019_2.failureConditions.failOnMetricChange
import jetbrains.buildServer.configs.kotlin.v2019_2.projectFeatures.buildReportTab
import jetbrains.buildServer.configs.kotlin.v2019_2.Triggers
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.schedule
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.finishBuildTrigger
import jetbrains.buildServer.configs.kotlin.v2019_2.ParameterDisplay
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.exec
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.ScriptBuildStep

object WPComTests : Project({
	id("WPComTests")
	name = "WPCom Tests"
	description = "Builds which test WordPress.com functionality, such as the Gutenberg plugin."

	params {
		param("docker_image", "%docker_image_e2e%")
		param("build.prefix", "1")
	}

	features {
		buildReportTab {
			title = "VR Report"
			startPage= "vr-report.zip!vr-report.zip!/test/visual/backstop_data/html_report/index.html"
		}
	}

	// Gutenberg Simple
	buildType(gutenbergPlaywrightBuildType("desktop", "fab2e82e-d27b-4ba2-bbd7-232df944e75c", atomic=false, edge=false));
	buildType(gutenbergPlaywrightBuildType("mobile", "77a5a0f1-9644-4c04-9d27-0066cd2d4ada", atomic=false, edge=false));
	// Gutenberg Simple Edge
	buildType(gutenbergPlaywrightBuildType("desktop", "e8817ab4-ec4e-4d58-a215-d1f87b2227b6", atomic=false, edge=true));
	buildType(gutenbergPlaywrightBuildType("mobile", "a655d304-4dcf-4864-8d82-8b22dba29feb", atomic=false, edge=true));
	// Gutenberg Atomic
	buildType(gutenbergPlaywrightBuildType("desktop", "c341e9b9-1118-48e9-a569-325100f5fd9" , atomic=true, edge=false));
	buildType(gutenbergPlaywrightBuildType("mobile", "e0f7e412-ae6c-41d3-9eec-c57c94dd8385", atomic=true, edge=false));
	// Gutenberg Atomic Edge
	buildType(gutenbergPlaywrightBuildType("desktop", "4c66d90d-99c6-4ecb-9507-18bc2f44b551" , atomic=true, edge=true));
	buildType(gutenbergPlaywrightBuildType("mobile", "ba0f925b-497b-4156-977e-5bfbe94f5744", atomic=true, edge=true));
	// Gutenberg Atomic Nightly
	buildType(gutenbergPlaywrightBuildType("desktop", "a3f58555-56bb-42c6-8543-ab27213d3085" , atomic=true, nightly=true));
	buildType(gutenbergPlaywrightBuildType("mobile", "8191e677-0682-4709-9201-66a7788980f0", atomic=true, nightly=true));

	// E2E Tests for Jetpack Simple Deployment
	buildType(jetpackSimpleDeploymentE2eBuildType("desktop", "3007d7a1-5642-4dbf-9935-d93f3cdb4dcc"));
	buildType(jetpackSimpleDeploymentE2eBuildType("mobile", "ccfe7d2c-8f04-406b-8b83-3db6c8475661"));

	// E2E Tests for Jetpack Atomic Deployment
	// Just desktop to start
	buildType(jetpackAtomicDeploymentE2eBuildType("desktop", "81015cf6-27e7-40bd-a52d-df6bd19ffb01"));

	// E2E Tests for smoke testing each new Jetpack build on


作始于对话：提出经过精心考虑的问题；倾听；尊重别人的意见；理解别人真正担心的问题；明白别人最期盼的机遇是什么、他们能付出的努力是什么。 c:703

大家就能先把身份地位放在一边，只想着如何携手把要做的事做好，从而相对有效地避免了潜在的政治混乱。 c:56

### 合作使人不断超越

更气人的是，他们根本就不在乎地位和赞誉，他们一心想的只有成长。 c:120

乔纳森总能在创造成果的过程中获取活力，并且喜欢从中学习。 c:21

首先要做的一件事就是撤掉他自己的照片。人们并不关心乔纳森是谁，他们想知道的是“‘白血病和淋巴瘤协会’的地址在哪儿？我支票本都拿出来了，我现在就想捐钱。 c:31

捐款人希望在12月29日捐款，并且在当年内收到税单，而只有通过乔纳森网站在线捐款才能保证及时完成。 c:11

白血病和淋巴瘤协会”的绝大多数行政机构都在某种程度上妨碍了合作，因为它有明确的层级制度和对维持地位的需求。 c:48

### 地位是成功的产物

作为促进陌生人（只有通过在线搜索才能知道对方的存在）合作的平台，互联网的作用令人震惊。 c:35

有人说，只要你不在乎功劳是谁的，世上就没有办不成的事。倘若能把“地位”看作是在促进合作过程中所创造的成果的副产品，那你的成长之路将永远敞开。 c:774

### 如何起步？

要“掌管”，不要“控制”。最强大有效的领导术，是“掌管”而非“控制”。二者有何区别？前者意为与团队成员清晰地交流设想和目标，并支持团队取得预期成果；后者则是认为自己得推动工作过程的每个环节，并通过命令把事情做成。 c:575

### 法则八 信心为上，安乐次之

安稳和舒适都是达成目标后令人心醉的副产品，但是，倘若二者被当成奋斗的目标，那人一生的成长立刻戛然而止。我们应把愈来愈安乐的生活看作实现更大目标过程中的暂时阶段。不断为更高的目标、更大的成就而努力，“信心为上，安乐次之”。 c:462

### 短时


,
        NavInput::TweakFast,
    ];
    /// Amount of internal/hidden variants (not exposed by imgui-rs)
    const INTERNAL_COUNT: usize = 4;
    /// Total count of `NavInput` variants
    pub const COUNT: usize = sys::ImGuiNavInput_COUNT as usize - NavInput::INTERNAL_COUNT;
}

#[test]
fn test_nav_input_variants() {
    for (idx, &value) in NavInput::VARIANTS.iter().enumerate() {
        assert_eq!(idx, value as usize);
    }
}

/// Settings and inputs/outputs for imgui-rs
#[repr(C)]
pub struct Io {
    /// Flags set by user/application
    pub config_flags: ConfigFlags,
    /// Flags set by backend
    pub backend_flags: BackendFlags,
    /// Main display size in pixels
    pub display_size: [f32; 2],
    /// Time elapsed since last frame, in seconds
    pub delta_time: f32,
    /// Minimum time between saving positions/sizes to .ini file, in seconds
    pub ini_saving_rate: f32,

    pub(crate) ini_filename: *const c_char,
    pub(crate) log_filename: *const c_char,

    /// Time for a double-click, in seconds
    pub mouse_double_click_time: f32,
    /// Distance threshold to stay in to validate a double-click, in pixels
    pub mouse_double_click_max_dist: f32,
    /// Distance threshold before considering we are dragging
    pub mouse_drag_threshold: f32,
    /// Map of indices into the `keys_down` entries array, which represent your "native" keyboard
    /// state
    pub key_map: [u32; sys::ImGuiKey_COUNT as usize],
    /// When holding a key/button, time before it starts repeating, in seconds
    pub key_repeat_delay: f32,
    /// When holding a key/button, rate at which it repeats, in seconds
    pub key_repeat_rate: f32,

    user_data: *mut c_void,
    pub(crate) fonts: *mut FontAtlas,

    /// Global scale for all fonts
    pub font_global_scale: f32,
    /// Allow user to scale text of individual window with CTRL+wheel
    pub font_allow_user_scaling: bool,

    pub(crate) font_default: *mut Font,

    /// For retina display or other situations where window coordinates are different from
    /// framebuffer coordinates
    pub display_framebuffer_scale: [f32; 2],

    #[cfg(feature = "docking")]
    pub config_docking_no_split: bool,
    #[cfg(feature = "docking")]
    pub config_docking_always_tab_bar: bool,
    #[cfg(feature = "docking")]
    pub config_docking_transparent_payload: bool,
    #[cfg(feature = "docking")]
    pub config_viewports_no_auto_merge: bool,
    #[cfg(feature = "docking")]
    pub config_viewports_notask_bar_icon: bool,
    #[cfg(feature = "docking")]
    pub config_viewports_no_decoration: bool,
    #[cfg(feature = "docking")]
    pub config_viewports_no_default_parent: bool,

    /// Request imgui-rs to draw a mouse cursor for you
    pub mouse_draw_cursor: bool,
    /// macOS-style input behavior.
    ///
    /// Defaults to true on Apple platforms. Changes in behavior:
    ///
    /// * Text editing cursor movement using Alt instead of Ctrl
    /// * Shortcuts using Cmd/Super instead of Ctrl
    /// * Line/text start and end using Cmd+Arrows instead of Home/End
    /// * Double-click selects by word instead of selecting the whole text
    /// * Multi-selection in lists uses Cmd/Super instead of Ctrl
    pub config_mac_os_behaviors: bool,
    /// Set to false to


 asset, err
}

func (l library) handle() (err error) {
	var (
		asset           builders.Output
		id              string
		compressedAsset io.ReadSeekCloser
	)
	defer func() {
		l.mergeBuildLogs(asset.Logs())
		if compressedAsset != nil {
			if err == nil {
				if _err := l.handleCompressedBuild(id, compressedAsset); _err != nil {
					_err = fmt.Errorf("handling library build details failed with: %s", err)
					if err != nil {
						err = fmt.Errorf("%s:%w", err, _err)
					} else {
						err = _err
					}
				}
			}

			compressedAsset.Close()
		}
	}()

	if asset, err = l.HandleLibrary(); err != nil {
		return fmt.Errorf("handling library failed with: %s", err)
	}

	if id, err = l.getResourceRepositoryId(); err != nil {
		return fmt.Errorf("resource id for library repo failed with: %s", err)
	}

	if compressedAsset, err = asset.Compress(builders.WASM); err != nil {
		return fmt.Errorf("compressing build files failed with: %w", err)
	}

	return nil
}
package tests

import (
	"context"
	"fmt"
	"os"
	"regexp"
	"time"

	"github.com/taubyte/tau/clients/p2p/patrick/mock"

	commonIface "github.com/taubyte/tau/core/common"
	"github.com/taubyte/tau/core/services/patrick"
	"github.com/taubyte/tau/dream"
	"github.com/taubyte/tau/p2p/peer"
	"github.com/taubyte/tau/pkg/config-compiler/compile"
	"gotest.tools/v3/assert"

	commonTest "github.com/taubyte/tau/dream/helpers"
	gitTest "github.com/taubyte/tau/dream/helpers/git"
	projectLib "github.com/taubyte/tau/pkg/schema/project"
	protocolCommon "github.com/taubyte/tau/services/common"
	"github.com/taubyte/tau/services/monkey"

	_ "github.com/taubyte/tau/clients/p2p/auth/dream"
	_ "github.com/taubyte/tau/clients/p2p/monkey/dream"
	_ "github.com/taubyte/tau/clients/p2p/tns/dream"
	_ "github.com/taubyte/tau/services/auth/dream"
	_ "github.com/taubyte/tau/services/hoarder/dream"
	_ "github.com/taubyte/tau/services/tns/dream"

	"testing"
)

var generatedDomainRegExp = regexp.MustCompile(`^[^.]+\.g\.tau\.link$`)

func TestConfigJob(t *testing.T) {
	protocolCommon.MockedPatrick = true
	monkey.NewPatrick = func(ctx context.Context, node peer.Node) (patrick.Client, error) {
		return &mock.Starfish{Jobs: make(map[string]*patrick.Job, 0)}, nil
	}

	u := dream.New(dream.UniverseConfig{Name: t.Name()})
	defer u.Stop()

	err := u.StartWithConfig(&dream.Config{
		Services: map[string]commonIface.ServiceConfig{
			"monkey":  {},
			"hoarder": {},
			"tns":     {},
			"auth":    {},
		},
		Simples: map[string]dream.SimpleConfig{
			"client": {
				Clients: dream.SimpleConf


llback_image()
        else:
            # 读取生成的图像
            try:
                img = Image.open(temp_png)
                print(f"PyMOL图像读取成功，尺寸: {img.size}")

                # 检查图像是否为黑色或损坏
                img_array = np.array(img)
                if len(img_array.shape) == 3:
                    mean_value = np.mean(img_array)
                    print(f"图像平均像素值: {mean_value:.2f}")

                    if mean_value < 10:  # 图像太暗，可能是黑屏
                        print("检测到PyMOL渲染黑屏，使用备用图像")
                        img = create_fallback_image()
                    else:
                        print("PyMOL渲染成功")
                else:
                    print("图像格式异常，使用备用图像")
                    img = create_fallback_image()

            except Exception as e:
                print(f"图像处理失败: {e}")
                img = create_fallback_image()

        # 生成颜色图例
        legend_html = generate_color_legend(elements)

        # 清理临时文件和 PyMOL 环境
        try:
            if os.path.exists(temp_frame_file):
                os.unlink(temp_frame_file)
                print(f"清理临时帧文件: {temp_frame_file}")
        except Exception as e:
            print(f"清理帧文件失败: {e}")

        try:
            if os.path.exists(temp_png):
                os.unlink(temp_png)
                print(f"清理临时PNG文件: {temp_png}")
        except Exception as e:
            print(f"清理PNG文件失败: {e}")

        try:
            pymol.cmd.delete('all')
        except:
            pass

        # 清理虚拟显示器
        if 'xvfb_process' in locals() and xvfb_process:
            try:
                xvfb_process.terminate()
                xvfb_process.wait(timeout=5)
                print("虚拟显示器已清理")
            except:
                try:
                    xvfb_process.kill()
                except:
                    pass

        # 恢复原始DISPLAY环境变量
        if 'original_display' in locals():
            if original_display:
                os.environ['DISPLAY'] = original_display
            elif 'DISPLAY' in os.environ and os.environ['DISPLAY'].startswith(':99'):
                del os.environ['DISPLAY']

        return img, legend_html, total_frames

    except Exception as e:
        print(f"Error in display_molecule_pymol: {str(e)}")
        return None, "", 0

def export_current_image(img: Optional[Image.Image], export_format: str) -> Optional[str]:
    """导出当前图像为指定格式"""
    if img is None:
        return None

    try:
        # 创建临时文件
        suffix = ".png" if export_format == "PNG" else ".jpg"
        temp_file = tempfile.NamedTemporaryFile(delete=False, suffix=suffix)

        # 转换并保存图像
        if isinstance(img, np.ndarray):
            img = Image.fromarray(img)

        if export_format == "PNG":
            img.save(temp_file.name, format="PNG")
        else:
            img.save(temp_file.name, format="JPEG", quality=95)

        return temp_file.name
    except Exception as e:
        print(f"Error exporting image: {str(e)}")
        return None


import com.natpryce.hamkrest.equalTo
import dev.forkhandles.result4k.orThrow
import dev.forkhandles.result4k.valueOrNull
import org.http4k.ai.llm.chat.ChatResponseFormat.Text
import org.http4k.ai.llm.model.Content
import org.http4k.ai.llm.model.ModelParams
import org.http4k.ai.model.ModelName
import org.http4k.ai.model.Temperature.Companion.ZERO
import org.junit.jupiter.api.Test

interface StreamingChatContract {

    val streamingChat: StreamingChat
    val model: ModelName

    @Test
    fun `can ask a simple question text streaming`() {
        val stream = streamingChat(
            ChatRequest(
                "what is 2+2? do not explain, do not use tools, just give the answer. do not add whitespace to the answer",
                ModelParams(model, ZERO, responseFormat = Text)
            )
        ).orThrow { error(it) }

        val message = stream
            .flatMap { it.message.contents.consolidate() }
            .toList()
        assertThat(message, equalTo(listOf(Content.Text("4"))))
    }
}
package org.http4k.ai.llm.model

import org.http4k.ai.llm.tools.ToolRequest
import org.http4k.ai.model.RequestId
import org.http4k.ai.model.ToolName
import se.ansman.kotshi.JsonSerializable
import se.ansman.kotshi.Polymorphic
import se.ansman.kotshi.PolymorphicLabel

@JsonSerializable
@Polymorphic("type")
sealed class Message {

    @JsonSerializable
    @PolymorphicLabel("system")
    data class System(val text: String) : Message()

    @JsonSerializable
    @PolymorphicLabel("user")
    data class User(val contents: List<Content> = emptyList()) : Message() {
        constructor(message: String) : this(listOf(Content.Text(message)))
    }

    @JsonSerializable
    @PolymorphicLabel("assistant")
    data class Assistant(val contents: List<Content> = emptyList(), val toolRequests: List<ToolRequest> = emptyList()) :
        Message()

    @JsonSerializable
    @PolymorphicLabel("tool")
    data class ToolResult(val id: RequestId, val tool: ToolName, val text: String) : Message()

    @JsonSerializable
    @PolymorphicLabel("custom")
    data class Custom(val attributes: Map<String, Any>) : Message()
}
package org.http4k.hotreload

import org.http4k.hotreload.ProjectCompiler.Companion.Gradle
import org.http4k.hotreload.ProjectCompiler.Companion.Result.Failed
import org.http4k.hotreload.ProjectCompiler.Companion.Result.Ok
import java.io.File
import java.nio.file.FileSystems
import java.nio.file.FileVisitResult
import java.nio.file.FileVisitResult.CONTINUE
import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.SimpleFileVisitor
import java.nio.file.StandardWatchEventKinds.ENTRY_CREATE
import java.nio.file.StandardWatchEventKinds.ENTRY_DELETE
import java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY
import java.nio.file.attribute.BasicFileAttributes
import java.time.Duration
import kotlin.concurrent.thread
import kotlin.io.path.exists

/**
 * Watches for changes on the classpath source and rebuilds the project when changes are detected.
 * If you have a project with a different structure, you can implement your own [PathWatcher] to pick up any
 * custom paths to watch.
 */
class ProjectCompilingPathWatcher(
    private val projectCompiler: ProjectCompiler = Gradle(),
    // This is the default set of directories to watch for changes
    watchedDirs: Set<String> = setOf("src/main", "src/test", "build/classes"),
    private val downtimeSleep: () -> Unit = { Thread.sleep(Duration.ofSeconds(1)) }
) : Path


8.33333333%;
  }
  .col-dt-push-1{
    left:4.16666667%;
  }
  .col-dt-push-0{
    left:0%;
  }
}
@media (min-width: 1366px){
  .container{
    max-width:1326px;
    margin:0 auto;
  }
  .col-ld-24{
    width:100%;
  }
  .col-ld-24,.col-ld-23{
    padding-right:10px;
    padding-left:10px;
    float:left;
  }
  .col-ld-23{
    width:95.83333333%;
  }
  .col-ld-22{
    width:91.66666667%;
  }
  .col-ld-22,.col-ld-21{
    padding-right:10px;
    padding-left:10px;
    float:left;
  }
  .col-ld-21{
    width:87.5%;
  }
  .col-ld-20{
    width:83.33333333%;
  }
  .col-ld-20,.col-ld-19{
    padding-right:10px;
    padding-left:10px;
    float:left;
  }
  .col-ld-19{
    width:79.16666667%;
  }
  .col-ld-18{
    width:75%;
  }
  .col-ld-18,.col-ld-17{
    padding-right:10px;
    padding-left:10px;
    float:left;
  }
  .col-ld-17{
    width:70.83333333%;
  }
  .col-ld-16{
    width:66.66666667%;
  }
  .col-ld-16,.col-ld-15{
    padding-right:10px;
    padding-left:10px;
    float:left;
  }
  .col-ld-15{
    width:62.5%;
  }
  .col-ld-14{
    width:58.33333333%;
  }
  .col-ld-14,.col-ld-13{
    padding-right:10px;
    padding-left:10px;
    float:left;
  }
  .col-ld-13{
    width:54.16666667%;
  }
  .col-ld-12{
    width:50%;
  }
  .col-ld-12,.col-ld-11{
    padding-right:10px;
    padding-left:10px;
    float:left;
  }
  .col-ld-11{
    width:45.83333333%;
  }
  .col-ld-10{
    width:41.66666667%;
  }
  .col-ld-10,.col-ld-9{
    padding-right:10px;
    padding-left:10px;
    float:left;
  }
  .col-ld-9{
    width:37.5%;
  }
  .col-ld-8{
    width:33.33333333%;
  }
  .col-ld-8,.col-ld-7{
    padding-right:10px;
    padding-left:10px;
    float:left;
  }
  .col-ld-7{
    width:29.16666667%;
  }
  .col-ld-6{
    width:25%;
  }
  .col-ld-6,.col-ld-5{
    padding-right:10px;
    padding-left:10px;
    float:left;
  }
  .col-ld-5{
    width:20.83333333%;
  }
  .col-ld-4{
    width:16.66666667%;
  }
  .col-ld-4,.col-ld-3{
    padding-right


x contains the quotient.  Set the sign
; according to the save value, cleanup the stack, and return.
;

        dec     edi             ; check to see if result is negative
        jnz     short L8        ; if EDI == 0, result should be negative
        neg     edx             ; otherwise, negate the result
        neg     eax
        sbb     edx,0

;
; Restore the saved registers and return.
;

L8:
        pop     ebp
        pop     esi
        pop     edi

        ret     16


eJt=new RA(VMt,10),iJt=new RA(QMt,20),p8(0),VQt=new RA(JMt,p8(0)),p8(0),QQt=new RA(tIt,p8(0)),p8(0),JQt=new RA(eIt,p8(0)),cVt=new RA(nIt,!1),cct(),hVt=new RA(iIt,fVt=vWt),oV(),uVt=new RA(rIt,lVt=xKt),cQt=new RA(aIt,!1),p8(0),sQt=new RA(oIt,p8(16)),p8(0),uQt=new RA(sIt,p8(5)),R4(),SJt=new RA(cIt,AJt=A3t),oJt=new RA(uIt,10),uJt=new RA(lIt,1),h0(),wJt=new RA(hIt,yJt=LKt),fJt=new Ib(fIt),pJt=p8(1),p8(0),gJt=new RA(dIt,pJt),W2(),OJt=new RA(gIt,DJt=k3t),MJt=new Ib(pIt),_Jt=new RA(bIt,!0),xJt=new RA(wIt,2),TJt=new RA(yIt,!0),yct(),UVt=new RA(mIt,YVt=tWt),yut(),HVt=new RA(vIt,ZVt=gKt),x5(),vVt=new RA(xIt,xVt=W2t),mVt=new RA(kIt,!1),n8(),dVt=new RA(_It,gVt=MUt),i7(),wVt=new RA(EIt,yVt=v2t),pVt=new RA(TIt,0),bVt=new RA(CIt,0),dQt=FKt,fQt=EKt,xQt=p2t,_Qt=p2t,pQt=f2t,I7(),OVt=One,BVt=TKt,IVt=TKt,CVt=TKt,SVt=One,$Qt=N2t,jQt=L2t,DQt=L2t,BQt=L2t,zQt=D2t,YQt=N2t,UQt=N2t,b9(),eQt=dne,iQt=dne,rQt=m3t,KVt=fne,sJt=M3t,cJt=S3t,lJt=M3t,hJt=S3t,mJt=M3t,vJt=S3t,dJt=IKt,bJt=LKt,NJt=M3t,PJt=S3t,IJt=M3t,LJt=S3t,EJt=S3t,kJt=S3t,CJt=S3t}function Dkt(){Dkt=I,mYt=new yT("DIRECTION_PREPROCESSOR",0),bYt=new yT("COMMENT_PREPROCESSOR",1),vYt=new yT("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER",2),BYt=new yT("INTERACTIVE_EXTERNAL_PORT_POSITIONER",3),eGt=new yT("PARTITION_PREPROCESSOR",4),RYt=new yT("LABEL_DUMMY_INSERTER",5),sGt=new yT("SELF_LOOP_PREPROCESSOR",6),UYt=new yT("LAYER_CONSTRAINT_PREPROCESSOR",7),JYt=new yT("PARTITION_MIDPROCESSOR",8),LYt=new yT("HIGH_DEGREE_NODE_LAYER_PROCESSOR",9),WYt=new yT("NODE_PROMOTION",10),ZYt=new yT("LAYER_CONSTRAINT_POSTPROCESSOR",11),tGt=new yT("PARTITION_POSTPROCESSOR",12),SYt=new yT("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR",13),uGt=new yT("SEMI_INTERACTIVE_CROSSMIN_PROCESSOR",14),lYt=new yT("BREAKING_POINT_INSERTER",15),KYt=new yT("LONG_


zard-pf-step-alt-substep{display:-ms-flexbox;display:flex;border-left:2px solid transparent}.wizard-pf-step-alt-substep a{padding:5px 0 5px 18px;color:#393f44}.wizard-pf-step-alt-substep.active,.wizard-pf-step-alt-substep:not(.disabled):hover{background-color:#ededed;border-color:#39a5dc}.wizard-pf-step-alt-substep.active a,.wizard-pf-step-alt-substep:not(.disabled):hover a{color:#39a5dc}.wizard-pf-step-alt-substep.active a{font-weight:700}.wizard-pf-sidebar .list-group-item.disabled>a:hover,.wizard-pf-step-alt-substep.disabled>a:hover,.wizard-pf-step.disabled>a:hover{cursor:not-allowed}.about-modal-pf{background-color:#292e34;background-image:url(../img/bg-login-2.png);background-position:right bottom;background-repeat:no-repeat;background-size:216px auto}@media (min-width:768px){.about-modal-pf{background-size:auto}}.about-modal-pf .modal-body{color:#fff;padding-bottom:16px;padding-left:40px;padding-right:40px}@media (min-width:768px){.about-modal-pf .modal-body{padding-left:80px;padding-right:80px}}.about-modal-pf .modal-header{background-color:transparent}.about-modal-pf .modal-footer img{width:20%}.about-modal-pf .pficon-close{color:#fff}.product-versions-pf{margin-bottom:30px;margin-top:30px}.product-versions-pf li strong{margin-right:10px}.trademark-pf{font-size:11px}.login-pf{background-color:#1a1a1a}@media (min-width:768px){.login-pf{background-image:url(../img/bg-login-2.png);background-position:100% 100%;background-repeat:no-repeat;background-size:30%}}@media (min-width:992px){.login-pf{background-size:auto}}.login-pf #badge{margin-right:65px;margin-bottom:50px;text-align:right}.login-pf #badge img{width:29%}.login-pf body{background:0 0}@media (min-width:768px){.login-pf body{background-image:url(../img/bg-login.png);background-repeat:no-repeat;background-size:30%;height:100%}}@media (min-width:992px){.login-pf body{background-size:auto}}.login-pf #brand{top:-30px}.login-pf #brand img{height:auto;width:50%}@media (min-width:768px){.login-pf #brand{top:-40px}.login-pf #brand+.alert{margin-top:-20px}}.login-pf .container{padding-top:0}@media (min-width:992px){.login-pf .container{bottom:20%;padding-right:120px}}.login-pf-page-logo{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.login-pf-page-logo img{margin-top:15px;height:50px}.login-pf .login-pf-page-footer{position:fixed;right:0;bottom:50px;left:0}.login-pf .login-pf-page-footer-link{color:#8b8d8f}.navbar-pf-vertical .navbar-brand .navbar-brand-name{height:35px}.cellTreeWidget {

}

.cellTreeEmptyMessage {
    padding-left: 16px;
    font-style: italic;
}

.cellTreeItem {


(elem...) }

// CacheIndexFile returns the path to an index for the given named repository.
func CacheIndexFile(name string) string {
	if name != "" {
		name += "-"
	}
	return name + "index.yaml"
}

// CacheChartsFile returns the path to a text file listing all the charts
// within the given named repository.
func CacheChartsFile(name string) string {
	if name != "" {
		name += "-"
	}
	return name + "charts.txt"
}
// Copyright The Helm Authors.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build !windows

package helmpath

import (
	"runtime"
	"testing"

	"helm.sh/helm/v4/pkg/helmpath/xdg"
)

func TestHelmHome(t *testing.T) {
	t.Setenv(xdg.CacheHomeEnvVar, "/cache")
	t.Setenv(xdg.ConfigHomeEnvVar, "/config")
	t.Setenv(xdg.DataHomeEnvVar, "/data")
	isEq := func(t *testing.T, got, expected string) {
		t.Helper()
		if expected != got {
			t.Error(runtime.GOOS)
			t.Errorf("Expected %q, got %q", expected, got)
		}
	}

	isEq(t, CachePath(), "/cache/helm")
	isEq(t, ConfigPath(), "/config/helm")
	isEq(t, DataPath(), "/data/helm")

	// test to see if lazy-loading environment variables at runtime works
	t.Setenv(xdg.CacheHomeEnvVar, "/cache2")

	isEq(t, CachePath(), "/cache2/helm")
}
// Copyright The Helm Authors.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at

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

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

//go:build !windows && !darwin

package helmpath

import (
	"path/filepath"

	"k8s.io/client-go/util/homedir"
)

// dataHome defines the base directory relative to which user specific data files should be stored.
//
// If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share is used.
func dataHome() string {
	return filepath.Join(homedir.HomeDir(), ".local", "share")
}

// configHome defines the base directory relative to which user specific configuration files should
// be stored.
//
// If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config is used.
func configHome() string {
	return filepath.Join(homedir.HomeDir(), ".config")
}

// cacheHome defines the base directory relative to which user specific non-essential data files
// should be stored.
//
// If $XDG_CACHE_HOME is either not set or empty, a default equal to $HOME/.cache is used.
func cacheHome() string {
	return filepath.Join(homedir.HomeDir(), ".cache")
}
/*
Copyright The Helm Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file e


ser2_1", "org1")
            with pytest.raises(exc.UnauthorizedAuthError):
                env.create_org_admin_policy(exec_user, "guest2_1", "org1")

    # TODO: test_create_site

    # TODO: test_create_site_raise

    # TODO: test_create_contact

    # TODO: test_create_contact_raise

    @pytest.mark.skipif(SKIP_RAISE, reason="Skipped to facilitate debugging")
    def test_create_object_already_exists(self, env: Env) -> None:
        # Organization already exists
        with pytest.raises(exc.UniqueConstraintViolationError):
            env.create_organization("root2_2", "org2")
        # User already exists
        with pytest.raises(exc.UserAlreadyExistsAuthError):
            env.invite_and_register_user("root1_2", "root2_1")
        with pytest.raises(exc.UserAlreadyExistsAuthError):
            env.invite_and_register_user("app_admin1_1", "org_admin2_1")
        # Organization admin policy already exists
        with pytest.raises(exc.UniqueConstraintViolationError):
            env.create_org_admin_policy("app_admin1_1", "org_admin1_1", "org1")

    @pytest.mark.skipif(SKIP_RAISE, reason="Skipped to facilitate debugging")
    def test_create_object_invalid_reference(self, env: Env) -> None:
        # User.organization does not exist
        with pytest.raises(exc.InvalidIdsError):
            env.invite_and_register_user(
                "root1_1", "root11_1", set_dummy_organization=True
            )
        # UserInvitation.token is invalid
        with pytest.raises(exc.UnauthorizedAuthError):
            env.invite_and_register_user("root1_1", "root1_11", set_dummy_token=True)
        # TODO: OrganizationAdminPolicy.user does not exist


import datetime
import json
import os
import random
import re
import sys
import time
from pathlib import Path

import numpy as np
import requests
import yaml
from loguru import logger as eval_logger

from lmms_eval.tasks._task_utils.file_utils import generate_submission_file

def muchomusic_doc_to_audio(doc):
    return [doc["context"]]

def muchomusic_doc_to_text(doc, lmms_eval_specific_kwargs):
    question = doc["instruction"]
    answers = doc["choices"]
    question = f"{question}\n{answers}"
    pre_prompt = lmms_eval_specific_kwargs["pre_prompt"]
    post_prompt = lmms_eval_specific_kwargs["post_prompt"]
    return f"{pre_prompt}{question}{post_prompt}"

def muchomusic_doc_to_target(doc):
    return doc["answer"][1]

def muchomusic_doc_to_choice(doc):
    return ["A", "B", "C", "D"]

def muchomusic_process_results(doc, result):
    response = result[0].strip()
    all_choices = ["A", "B", "C", "D"]
    pred = parse_multi_choice_response(response, all_choices)  # AdaptfromMMMU
    gt_ans = doc["answer"][1]
    score = 1.0 if pred == gt_ans else 0.0
    return {"accuracy": score}

def parse_multi_choice_response(response, all_choices):
    """
    Parse the prediction from the generated response.
    Return the predicted choice letter e.g., A, B, C, D.
    """
    # Clean response of unwanted characters
    for char in [",", ".", "!", "?", ";", ":", "'"]:
        response = response.strip(char)
    response = " " + response + " "  # Add space to avoid partial match

    candidates = []
    # Look for choices with parentheses, e.g., (A)
    for choice in all_choices:
        if f"({choice})" in response:
            candidates.append(choice)

    # Look for simple choices, e.g., A, B, C
    if len(candidates) == 0:
        for choice in all_choices:
            if f" {choice} " in response:
                candidates.append(choice)

    # Look for choices with periods, e.g., A., B., C.
    if len(candidates) == 0:
        for choice in all_choices:
            if f"{choice}." in response:
                candidates.append(choice)

    # If no candidates, randomly choose one
    if len(candidates) == 0:
        pred_index = random.choice(all_choices)
    elif len(candidates) > 1:
        # If more than one candidate, choose the last one found
        start_indexes = [response.rfind(f" {can} ") for can in candidates]
        pred_index = candidates[np.argmax(start_indexes)]
    else:
        # If only one candidate, use it
        pred_index = candidates[0]

    return pred_index


YSPACE, "item.CompressedPlates", 3);
		OreDictManager.INSTANCE.setTarget(OP.compressed     , MT.Mg                     , MD.GC_GALAXYSPACE, "item.CompressedPlates", 4);
		OreDictManager.INSTANCE.setTarget(OP.compressed     , MT.Mithril                , MD.GC_GALAXYSPACE, "item.CompressedPlates", 5);
		OreDictManager.INSTANCE.setTarget(OP.compressed     , MT.Ni                     , MD.GC_GALAXYSPACE, "item.CompressedPlates", 6);
		OreDictManager.INSTANCE.setTarget(OP.compressed     , MT.Oriharukon             , MD.GC_GALAXYSPACE, "item.CompressedPlates", 7);
		OreDictManager.INSTANCE.setTarget(OP.compressed     , MT.Pt                     , MD.GC_GALAXYSPACE, "item.CompressedPlates", 8);
		OreDictManager.INSTANCE.setTarget(OP.compressed     , MT.W                      , MD.GC_GALAXYSPACE, "item.CompressedPlates", 9);
		OreDictManager.INSTANCE.setTarget(OP.blockIngot     , MT.Pb                     , MD.GC_GALAXYSPACE, "metalsblock", 0);
		OreDictManager.INSTANCE.setTarget(OP.blockIngot     , MT.Adamantite             , MD.GC_GALAXYSPACE, "metalsblock", 1);
		OreDictManager.INSTANCE.setTarget(OP.blockIngot     , MT.Co                     , MD.GC_GALAXYSPACE, "metalsblock", 2);
		OreDictManager.INSTANCE.setTarget(OP.blockIngot     , MT.Mg                     , MD.GC_GALAXYSPACE, "metalsblock", 3);
		OreDictManager.INSTANCE.setTarget(OP.blockIngot     , MT.Mithril                , MD.GC_GALAXYSPACE, "metalsblock", 4);
		OreDictManager.INSTANCE.setTarget(OP.blockIngot     , MT.Ni                     , MD.GC_GALAXYSPACE, "metalsblock", 5);
		OreDictManager.INSTANCE.setTarget(OP.blockIngot     , MT.Oriharukon             , MD.GC_GALAXYSPACE, "metalsblock", 6);
		OreDictManager.INSTANCE.setTarget(OP.blockIngot     , MT.Pt                     , MD.GC_GALAXYSPACE, "metalsblock", 7);
		OreDictManager.INSTANCE.setTarget(OP.blockIngot     , MT.W                      , MD.GC_GALAXYSPACE, "metalsblock", 8);
		OreDictManager.INSTANCE.setTarget(OP.blockIngot     , MT.Duralumin              , MD.GC_GALAXYSPACE, "metalsblock", 9);
		OreDictManager.INSTANCE.setTarget(OP.dust           , MT.GlowstoneCeres         , MD.GC_GALAXYSPACE, "item.GlowstoneDusts", 0);
		OreDictManager.INSTANCE.setTarget(OP.dust           , MT.GlowstoneIo            , MD.GC_GALAXYSPACE, "item.GlowstoneDusts", 1);
		OreDictManager.INSTANCE.setTarget(OP.dust           , MT.GlowstoneEnceladus     , MD.GC_GALAXYSPACE, "item.GlowstoneDusts", 2);
		OreDictManager.INSTANCE.setTarget(OP.dust           , MT.GlowstoneProteus       , MD.GC_GALAXYSPACE, "item.GlowstoneDusts", 3);
		OreDictManager.INSTANCE.setTarget(OP.dust           , MT.GlowstonePluto         , MD.GC_GALAXYSPACE, "item.GlowstoneDusts", 4);
		}
		OreDictManager.INSTANCE.setTarget(OP.ingot          , MT.Pb                     , MD.GC_EXTRAPLANETS, "item.ingotLead", 0);


CASE(3, a5, 0xfffffffffffff800, lw a5, 0(a3))

  TEST_CASE(4, a4, 0, \
    li a1, 1; \
    sw x0, 0(a3); \
    amomax.w	a4, a1, 0(a3); \
  )

  TEST_CASE(5, a5, 1, lw a5, 0(a3))

  TEST_CASE(6, a4, 1, \
    li a0, 0x0000000000000001; \
    li a1, 0x0000000080000000; \
    la a3, amo_operand; \
    sw a0, 0(a3); \
    amomax.w	a4, a1, 0(a3); \
  )

  TEST_CASE(7, a5, 1, lw a5, 0(a3))

  TEST_PASSFAIL

RVTEST_CODE_END

  .data
RVTEST_DATA_BEGIN

  TEST_DATA

RVTEST_DATA_END

  .bss
  .align 3
amo_operand:
  .dword 0


href="https://online-broker-vergleich.focus.de/">andere Wertpapiere investieren, sparen Sie im Vergleich zu Robo-Advisors. Die Betreiber dieser digitalen Helfer verlangen aus nachvollziehbaren Gründen einen geringen Aufschlag, um ihr Angebot zu finanzieren und damit Geld zu verdienen. Verfügen Sie über die erforderliche Expertise, sollten Sie sich ohne Unterstützung um Ihre Kapitalanlagen kümmern. Eröffnen Sie bei einem empfehlenswerten Anbieter ein günstiges Depot und setzen Sie Ihre Anlagestrategie um!

Für wen ist die Anlage mit einem Robo-Advisor sinnvoll?

Die digitalen Anlagehelfer eignen sich für alle Sparer, die bisher keine oder kaum Erfahrung mit Börseninvestments aufweisen. Ein Robo Invest ist eine einfache Möglichkeit, Geld anhand einer individuellen Risikobeurteilung anzulegen. Die systematische Aufteilung anhand der eigenen Risikoneigung und der Anlageziele erweist sich als großer Pluspunkt.

Robo-Advisors empfehlen sich zudem für Anleger, denen die Zeit für eine gründliche Beschäftigung mit Wertpapieren und Anlagestrategien fehlt. Als Nutzer müssen Sie sich weder tiefgründige Börsenkenntnisse aneignen noch aufwendig eigene Käufe und Verkäufe durchführen: Der Finanzroboter garantiert eine professionelle Kapitalanlage und erledigt die Transaktionen automatisiert. Er nimmt Ihnen viel Arbeit ab!

Leistungsstarke Anlageroboter perfekt für Einsteiger

Mit einem Robo-Advisor partizipieren auch Laien an den überdurchschnittlich hohen Renditechancen der Aktien-, Anleihen- und Immobilienmärkte. Die automatisierten Anlageberater wählen eine maßgeschneiderte Anlagestrategie und legen Ihre Sparbeiträge wie vereinbart an. Finden Sie im ersten Schritt mit unserem Robo-Advisor-Vergleich den besten Anbieter!

	<img data-src="https://p6.focus.de/img/fotos/id_194503599/finanzen-nl-subscription.png?im=Resize%3D%28630%2C48%29&impolicy=perceptual&quality=mediumHigh&hash=025478f5041ef159255a540cb52962792a8785dbda69730d24329dc63a7968c2&imbypass=true"  alt="Finanzen Newsletter"   class="nl_subscription_header lazyload"  width="630" height="48" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MzAiIGhlaWdodD0iNDgiPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHN0eWxlPSJmaWxsOiM5OTk7Ii8+PC


 they can deposit into the multisig from any source.

An example use case is requesting deposit rights, then sending funds to a user to onboard them without requiring them to purchase ETH for gas.

## Creating a Custom Backup Service

Backup services store channel states on behalf of the client in case their store compromised or otherwise unavailable (i.e. for clearing `localStorage` in a browser, using incognito mode, or seamless multidevice channel usage). If a backup service is not available, the client will still function properly in these scenarios, but will rely on a trusted restore from the node’s version of the channel state.

### Interface

All custom backup services must implement the following interface:

```typescript
export type StorePair = {
  path: string;
  value: any;
};

export interface IBackupService {
  restore(): Promise<StorePair[]>;
  backup(pair: StorePair): Promise<void>;
}
```

The `restore` method will return an array of existing `StorePair` objects that should be used to populate the clients store using the `set` function. This function is called on `connect` if a problem with the store is detected on startup. Client users can also manually restore the state from back-up by calling `await client.restoreState()`.

The `backup` method is called when `set` is called from the `connextStore`, here. If you are using a custom store module instead of the `@connext/store` package, you will want to make sure your `set` function includes [similar logic](https://github.com/ConnextProject/indra/blob/c06f10d0a4ebad4d3fdf0a8302eb35aea4c6b0c2/modules/store/src/connextStore.ts#L48-L56) for backing up pairs. By default, only updates to the main `channel/` key will be automatically backed up.

### Example Usage

To use a backup service with the client, simply instantiate the client with the backupService key populated:

```typescript
/**
 * Imagine that there is an REST API available at some URL that has two endpoints, a
 * GET endpoint `restore` and a POST endpoint for `backup`.
 *
 * NOTE: This code has not been tested, and is designed to be purely illustrative.
 */

import { connect } from "@connext/client";
import { ClientOptions, IBackupService, StorePair } from "@connext/types";
import * as axios from "axios";

class BackupService implements IBackupService {
  private client: any;
  constructor(private readonly baseUrl: string) {
    this.client = axios.create({
      baseURL,
      responseType: "json",
      headers: {
        "Content-Type": "application/json",
      },
    });
  }

  restore = async (): Promise<StorePair[]> => {
    const res = await this.client.get("/restore");
    return res.data;
  };

  backup = async (pair: StorePair): Promise<void> => {
    await this.client.post("/backup", { pair });
  };
}

const connectOptions: ClientOptions = {
  backupService: new BackupService("https://myawesomebackup.com"),
  ethProviderUrl: "https://rinkeby.indra.connext.network/api/ethprovider",
  nodeUrl: "https://rinkeby.indra.connext.network",
  mnemonic: "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat",
};

const client = await connect(connectOptions);
```
# Deploying Contracts

If you're using Mainnet or Rinkeby, contracts have already been deployed for everyone to use. You'll find addresses for all the contracts powering our state channel platform here: `modules/contracts/address-book.json`.

If you want to use custom contracts or a new network though, you'll have to deploy them yourself.

For example: to deploy to Goerli testnet, you'll first need to retrieve the mnemonic for an account that has enough funds to pay


 size + 2]);
        buff.push(0x2b);
    }

    String::from_utf8(buff).unwrap()
}

pub fn make_row(cols: &Vec<&str>, col_sizes: &Vec<usize>) -> String {
    // opening vline
    let mut buff = vec![0x7c];

    for (col, size) in cols.iter().zip(col_sizes.iter()) {
        // one byte of left padding (whitespace)
        buff.push(0x20);

        let padding_size = size - col.len();
        let padding = vec![0x20; padding_size];

        buff.extend_from_slice(&String::from(*col).into_bytes());
        buff.extend_from_slice(&padding);

        // one byte of right padding (whitespace) and closing vline
        buff.push(0x20);
        buff.push(0x7c);
    }

    String::from_utf8(buff).unwrap()
}
<gh_stars>0
#[doc = "Reader of register FTST0"]
pub type R = crate::R<u16, super::FTST0>;
#[doc = "Writer for register FTST0"]
pub type W = crate::W<u16, super::FTST0>;
#[doc = "Register FTST0 `reset()`'s with value 0"]
impl crate::ResetValue for super::FTST0 {
    type Type = u16;
    #[inline(always)]
    fn reset_value() -> Self::Type {
        0
    }
}
#[doc = "Fault Test\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum FTEST_A {
    #[doc = "0: No fault"]
    FTEST_0 = 0,
    #[doc = "1: Cause a simulated fault"]
    FTEST_1 = 1,
}
impl From<FTEST_A> for bool {
    #[inline(always)]
    fn from(variant: FTEST_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Reader of field `FTEST`"]
pub type FTEST_R = crate::R<bool, FTEST_A>;
impl FTEST_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> FTEST_A {
        match self.bits {
            false => FTEST_A::FTEST_0,
            true => FTEST_A::FTEST_1,
        }
    }
    #[doc = "Checks if the value of the field is `FTEST_0`"]
    #[inline(always)]
    pub fn is_ftest_0(&self) -> bool {
        *self == FTEST_A::FTEST_0
    }
    #[doc = "Checks if the value of the field is `FTEST_1`"]
    #[inline(always)]
    pub fn is_ftest_1(&self) -> bool {
        *self == FTEST_A::FTEST_1
    }
}
#[doc = "Write proxy for field `FTEST`"]
pub struct FTEST_W<'a> {
    w: &'a mut W,
}
impl<'a> FTEST_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: FTEST_A) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "No fault"]
    #[inline(always)]
    pub fn ftest_0(self) -> &'a mut W {
        self.variant(FTEST_A::FTEST_0)
    }
    #[doc = "Cause a simulated fault"]
    #[inline(always)]
    pub fn ftest_1(self) -> &'a mut W {
        self.variant(FTEST_A::FTEST_1)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(alw


il, httpgrpc.Errorf(http.StatusBadRequest, "%s", err.Error())
	}
	resps, err := q.forAllIngesters(ctx, func(_ context.Context, client logproto.PatternClient) (interface{}, error) {
		return client.Query(ctx, req)
	})
	if err != nil {
		return nil, err
	}
	iterators := make([]iter.Iterator, len(resps))
	for i := range resps {
		iterators[i] = iter.NewQueryClientIterator(resps[i].response.(logproto.Pattern_QueryClient))
	}
	// TODO(kolesnikovae): Incorporate with pruning
	resp, err := iter.ReadBatch(iter.NewMerge(iterators...), math.MaxInt32)
	if err != nil {
		return nil, err
	}
	return prunePatterns(resp, minClusterSize, q.ingesterQuerierMetrics), nil
}

func prunePatterns(resp *logproto.QueryPatternsResponse, minClusterSize int64, metrics *ingesterQuerierMetrics) *logproto.QueryPatternsResponse {
	patternsBefore := len(resp.Series)
	total := make([]int64, len(resp.Series))

	for i, p := range resp.Series {
		for _, s := range p.Samples {
			total[i] += s.Value
		}
	}

	// Create a slice of structs to keep Series and total together
	type SeriesWithTotal struct {
		Series *logproto.PatternSeries
		Total  int64
	}

	seriesWithTotals := make([]SeriesWithTotal, len(resp.Series))
	for i := range resp.Series {
		seriesWithTotals[i] = SeriesWithTotal{
			Series: resp.Series[i],
			Total:  total[i],
		}
	}

	// Sort the slice of structs by the Total field
	sort.Slice(seriesWithTotals, func(i, j int) bool {
		return seriesWithTotals[i].Total > seriesWithTotals[j].Total
	})

	// Initialize a variable to keep track of the position for valid series
	pos := 0

	// Iterate over the seriesWithTotals
	for i := range seriesWithTotals {
		if seriesWithTotals[i].Total >= minClusterSize {
			// Place the valid series at the current position
			resp.Series[pos] = seriesWithTotals[i].Series
			pos++
		}
	}

	// Slice the resp.Series to include only the valid series
	resp.Series = resp.Series[:pos]

	if len(resp.Series) > maxPatterns {
		resp.Series = resp.Series[:maxPatterns]
	}

	metrics.patternsPrunedTotal.Add(float64(patternsBefore - len(resp.Series)))
	metrics.patternsRetainedTotal.Add(float64(len(resp.Series)))

	return resp
}

// ForAllIngesters runs f, in parallel, for all ingesters
func (q *IngesterQuerier) forAllIngesters(ctx context.Context, f func(context.Context, logproto.PatternClient) (interface{}, error)) ([]ResponseFromIngesters, error) {
	replicationSet, err := q.ringClient.Ring().GetAllHealthy(ring.Read)
	if err != nil {
		return nil, err
	}

	return q.forGivenIngesters(ctx, replicationSet, f)
}

type ResponseFromIngesters struct {
	addr     string
	response interface{}
}

func (q *IngesterQuerier) forGivenIngesters(ctx context.Context, replicationSet ring.ReplicationSet, f func(context.Context, logproto.PatternClient) (interface{}, error)) ([]ResponseFromIngesters, error) {
	g, ctx := errgroup.WithContext(ctx)
	responses := make([]ResponseFromIngesters, len(replicationSet.Instances))

	for i, ingester := range replicationSet.Instances {
		g.Go(func() error {


    GreviewsWithListArgumentData_reviews._initializeBuilder(this);
  }

  GreviewsWithListArgumentData_reviewsBuilder get _$this {
    final $v = _$v;
    if ($v != null) {
      _G__typename = $v.G__typename;
      _episode = $v.episode;
      _$v = null;
    }
    return this;
  }

  @override
  void replace(GreviewsWithListArgumentData_reviews other) {
    _$v = other as _$GreviewsWithListArgumentData_reviews;
  }

  @override
  void update(
      void Function(GreviewsWithListArgumentData_reviewsBuilder)? updates) {
    if (updates != null) updates(this);
  }

  @override
  GreviewsWithListArgumentData_reviews build() => _build();

  _$GreviewsWithListArgumentData_reviews _build() {
    final _$result = _$v ??
        _$GreviewsWithListArgumentData_reviews._(
          G__typename: BuiltValueNullFieldError.checkNotNull(G__typename,
              r'GreviewsWithListArgumentData_reviews', 'G__typename'),
          episode: episode,
        );
    replace(_$result);
    return _$result;
  }
}

// ignore_for_file: deprecated_member_use_from_same_package,type=lint
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint

// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:gql/ast.dart' as _i1;

const HumanWithArgs = _i1.OperationDefinitionNode(
  type: _i1.OperationType.query,
  name: _i1.NameNode(value: 'HumanWithArgs'),
  variableDefinitions: [
    _i1.VariableDefinitionNode(
      variable: _i1.VariableNode(name: _i1.NameNode(value: 'id')),
      type: _i1.NamedTypeNode(
        name: _i1.NameNode(value: 'ID'),
        isNonNull: true,
      ),
      defaultValue: _i1.DefaultValueNode(value: null),
      directives: [],
    )
  ],
  directives: [],
  selectionSet: _i1.SelectionSetNode(selections: [
    _i1.FieldNode(
      name: _i1.NameNode(value: 'human'),
      alias: null,
      arguments: [
        _i1.ArgumentNode(
          name: _i1.NameNode(value: 'id'),
          value: _i1.VariableNode(name: _i1.NameNode(value: 'id')),
        )
      ],
      directives: [],
      selectionSet: _i1.SelectionSetNode(selections: [
        _i1.FieldNode(
          name: _i1.NameNode(value: 'name'),
          alias: null,
          arguments: [],
          directives: [],
          selectionSet: null,
        ),
        _i1.FieldNode(
          name: _i1.NameNode(value: 'height'),
          alias: null,
          arguments: [],
          directives: [],
          selectionSet: null,
        ),
      ]),
    )
  ]),
);
const document = _i1.DocumentNode(definitions: [HumanWithArgs]);
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint

// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:gql/ast.dart' as _i1;

const reviewsWithListArgument = _i1.OperationDefinitionNode(
  type: _i1.OperationType.query,
  name: _i1.NameNode(value: 'reviewsWithListArgument'),
  variableDefinitions: [
    _i1.VariableDefinitionNode(
      variable: _i1.VariableNode(name: _i1.NameNode(value: 'episode')),
      type: _i1.NamedTypeNode(
        name: _i1.NameNode(value: 'Episode'),
        isNonNull: true,
      ),
      defaultValue: _i1.DefaultValueNode(value: null),
      directives: [],
    ),
    _i1.VariableDefinitionNode(
      variable: _i1.VariableNode(nam


的错误.

### 同步加载错误/失败

应用设计中很关键的一步是确认哪些屏用来呈现内容, 而其中又要考虑这些屏在虑预定的内容没能呈现时应该怎么做. 包括如下情况:

* 正常应该呈现一列列表, 但列表项是空的.
* 正常应该显示搜索结果, 但当前搜索结果数为零.
* 正常应该显示基于云端的内容 (cloud-based content), 但因为未知错误导致现在无法显示.

以上这些设想的情况被叫做空数据状态 (empty states). 虽然这方面没有标准规范, 但把它们设计好非常重要, 因为偶然出现的不在预期内的状况可能已经让你的用户彻底失望.

当同步停滞或内容加载失败时, 用户与应用其他部分交互尽可能不要受到影响.

![](../images/patterns_errors_app3.png)

屏幕/内容加载失败的空数据状态.

![](../images/patterns_errors_app4.png)

容器/组件特定的错误及建议操作.

### 联接

当联接 (Connectivity) 失效时, 用户与应用其他部分交互尽可能不要受到影响.

如果可以, 提供一个可以帮助他们完成任务的链接. 确保提供的链接确实可以提供帮助. 例如, 在可以预计到操作会失败的情况下, 就不要提供一个类似 "再试一次" 的操作.

![](../images/patterns_errors_app5.png)

带有重试操作的 Snackbar.

![](../images/patterns_errors_app6.png)

必须联网可见的屏的空数据状态.

## 冲突状态错误

冲突状态错误发生在用户试图运行的操作起冲突时, 例如在飞行模式下拨打电话或在访问受限的账户下截图操作. 尝试清晰地传达出此状态是用户自己所选的并暗示 (implications) 此种情况下体验有何不同, 避免让用户走进死胡同 (putt themselves into these situations). 当触发了这些错误时, 要避免暗示用户这是他们的错.

#### 一般冲突

要清晰地阐明为什么发生错误以及根源在哪.

例子:

* 截图以及其他高级功能 (premium features) 在受限模式 (restricted mode) 中无法使用.

![](../images/patterns_errors_state1.png)

Snackbar + 特殊模式指示器

#### 用户选择离线

当用户处于这种状态下, 可以考虑使用不打扰，但持续显示的指示器.

例子:

* 在飞行模式拨打