,-(A7)
	JSR	F158_ayzz_(PC)
	ADDQ.L	#2,A7
	MOVE.L	D0,A2
	MOVE.B	2(A2),D0
	AND	#255,D0
	ADD	D0,D7
	CLR	D6
	MOVE.B	1(A2),D5
	AND	#255,D5
	CMPI	#0,D5
	BEQ.S	L591
	CMPI	#2,D5
	BNE.S	L590
L591:
	MOVE	#4,-(A7)
	MOVE	8(A6),-(A7)
	JSR	F303_AA09_(PC)
	ADDQ.L	#4,A7
	MOVE	D0,D6
L590:
	CMPI	#0,D5
	BEQ.S	L592
	CMPI	#16,D5
	BCC.S	L592
	MOVE	#10,-(A7)
	MOVE	8(A6),-(A7)
	JSR	F303_AA09_(PC)
	ADDQ.L	#4,A7
	ADD	D0,D6
L592:
	CMPI	#16,D5
	BCS.S	L593
	CMPI	#112,D5
	BCC.S	L593
	MOVE	#11,-(A7)
	MOVE	8(A6),-(A7)
	JSR	F303_AA09_(PC)
	ADDQ.L	#4,A7
	ADD	D0,D6
L593:
	MOVE	D6,D0
	ASL	#1,D0
	ADD	D0,D7
L589:
	MOVE	D7,-(A7)
	MOVE.L	A3,-(A7)
	JSR	F306_xxxx_(PC)
	ADDQ.L	#6,A7
	MOVE	D0,D7
	MOVE	50(A3),D0
	CMPI	#0,10(A6)
	BNE.S	L595
	MOVE	#1,D1
	BRA.S	L596
L595:
	MOVE	#2,D1
L596:
	AND	D1,D0
	BEQ.S	L594
	MOVE	D7,D0
	ASR	#1,D0
	MOVE	D0,D7
L594:
	MOVE	#100,-(A7)
	MOVE	D7,D0
	ASR	#1,D0
	MOVE	D0,-(A7)
	CLR	-(A7)
	JSR	F026_a003_(PC)
	ADDQ.L	#6,A7
L584:
	MOVEM.L	(A7)+,D4-D7/A2-A3
	UNLK	A6
	RTS
L$583:	.EQU	#-12
F313_xxxx_:/* global */
	LINK	A6,L$597
	MOVEM.L	A3-A2/D7-D4,-(A7)
	MOVE	8(A6),D0
	MULS	#800,D0
	LEA	G407_s_Par(A4),A0
	ADDA	D0,A0
	LEA	(A0),A0
	MOVE.L	A0,A3
	MOVE	10(A6),D5
	AND	#-32768,D5
	BEQ.S	L599
	ANDI	#32767,10(A6)
L599:
	MOVE	#0,D0
	MOVE	D0,D6
	MOVE	#0,D0
	MOVE	D0,D7
	BRA	L600(PC)
L601:


x
[d*="M10.5,14.41V9.6l4.17,2.4L10.5,14.41z M8.48,8.45L7.77,7.75C"] {
  d: path("M15,5.77,13.7,7.1a4.86,4.86,0,0,1,0,6.7L15,15.13a6.74,6.74,0,0,0,0-9.36ZM17.6,3.09,16.3,4.43a8.66,8.66,0,0,1,2.43,6,8.53,8.53,0,0,1-2.43,6l1.29,1.34a10.59,10.59,0,0,0,0-14.72ZM5.91,5.77a6.74,6.74,0,0,0,0,9.36L7.2,13.8a4.86,4.86,0,0,1,0-6.7ZM4.6,4.43,3.31,3.09a10.59,10.59,0,0,0,0,14.72l1.3-1.34a8.66,8.66,0,0,1-2.43-6A8.53,8.53,0,0,1,4.6,4.43Zm3.85,9V7.49l5.12,3Z") !important;
}
// sign in
[d*="M12,2C6.48,2,2,6.48,2,12c0,5.52,4.48,10,10,10s10-4.48,10-10C22,6.48,17.52,2,12,2z M12,3c4.96,0,9,4.04,9,9 c0,1.42-0.34"] {
  d: path("M12,0 C18.62375,0 24,5.37625 24,12 C24,18.62375 18.62375,24 12,24 C5.37625,24 0,18.62375 0,12 C0,5.37625 5.37625,0 12,0 Z M12,10.63625 C13.66,10.63625 15,9.29625 15,7.63625 C15,5.97625 13.66,4.63625 12,4.63625 C10.34,4.63625 9,5.97625 9,7.63625 C9,9.29625 10.34,10.63625 12,10.63625 Z M12,12.40875 C8.33375,12.40875 5.455,14.18125 5.455,15.8175 C6.84125,17.95 9.26875,19.3625 12,19.3625 C14.73125,19.3625 17.15875,17.95 18.545,15.8175 C18.545,14.18125 15.66625,12.40875 12,12.40875 Z") !important;
}
// smiley
[d*="M12,2C6.48,2,2,6.48,2,12c0,5.52,4.48,10,10,10s10-4.48,10-10C22,6.48,17.52,2,12,2z M12"] {
  d: path("M6.87494031,14 C7.67500942,16.0486784 9.66801755,17.5 12,17.5 C14.3319824,17.5 16.3249906,16.0486784 17.1250597,14 L6.87494031,14 Z M12,22 C6.4771525,22 2


.MODE3,"#00B4CC"),d),tealHi:(s={},(0,lr.Z)(s,Zr.H.DARK,"rgba(0, 180, 204, 0.5)"),(0,lr.Z)(s,Zr.H.LIGHT,"rgba(0, 180, 204, 0.5)"),(0,lr.Z)(s,Zr.H.MODE3,"rgba(0, 180, 204, 0.5)"),s),tealLo:(g={},(0,lr.Z)(g,Zr.H.DARK,"#00B4CC33"),(0,lr.Z)(g,Zr.H.LIGHT,"#00B4CC33"),(0,lr.Z)(g,Zr.H.MODE3,"#00B4CC33"),g),tealMd:(b={},(0,lr.Z)(b,Zr.H.DARK,"#00B4CCB3"),(0,lr.Z)(b,Zr.H.LIGHT,"#00B4CCB3"),(0,lr.Z)(b,Zr.H.MODE3,"#00B4CCB3"),b),dbt:(f={},(0,lr.Z)(f,Zr.H.DARK,"#FC6949"),(0,lr.Z)(f,Zr.H.LIGHT,"#FC6949"),(0,lr.Z)(f,Zr.H.MODE3,"#FC6949"),f),dbtHi:(A={},(0,lr.Z)(A,Zr.H.DARK,"#FC6949D9"),(0,lr.Z)(A,Zr.H.LIGHT,"#FC6949D9"),(0,lr.Z)(A,Zr.H.MODE3,"#FC6949D9"),A),dbtLo:(p={},(0,lr.Z)(p,Zr.H.DARK,"rgba(252, 105, 73, 0.3)"),(0,lr.Z)(p,Zr.H.LIGHT,"rgba(252, 105, 73, 0.3)"),(0,lr.Z)(p,Zr.H.MODE3,"rgba(252, 105, 73, 0.3)"),p),dbtMd:(y={},(0,lr.Z)(y,Zr.H.DARK,"rgba(252, 105, 73, 0.5)"),(0,lr.Z)(y,Zr.H.LIGHT,"rgba(252, 105, 73, 0.5)"),(0,lr.Z)(y,Zr.H.MODE3,"rgba(252, 105, 73, 0.5)"),y),glow:(O={},(0,lr.Z)(O,Zr.H.DARK,"#0500FF66"),(0,lr.Z)(O,Zr.H.LIGHT,"#0500FF4D"),(0,lr.Z)(O,Zr.H.MODE3,"#000000"),O),glow2:(E={},(0,lr.Z)(E,Zr.H.DARK,"#0500FF"),(0,lr.Z)(E,Zr.H.LIGHT,"#FFFFFF"),(0,lr.Z)(E,Zr.H.MODE3,"#18181C"),E),gray:(M={},(0,lr.Z)(M,Zr.H.DARK,"#34404C"),(0,lr.Z)(M,Zr.H.LIGHT,"#BBAFDA"),(0,lr.Z)(M,Zr.H.MODE3,"#2E3036"),M),grayLo:(L={},(0,lr.Z)(L,Zr.H.DARK,"#34404C33"),(0,lr.Z)(L,Zr.H.LIGHT,"#BBAFDA1A"),(0,lr.Z)(L,Zr.H.MODE3,"#2E303633"),L),grayMd:(B={},(0,lr.Z)(B,Zr.H.DARK,"#34404CB3"),(0,lr.Z)(B,Zr.H.LIGHT,"#BBAFDAB3"),(0,l


ult_instance()
    }
}

impl SendTensorResponse {
    pub fn new() -> SendTensorResponse {
        ::std::default::Default::default()
    }
}

impl ::protobuf::Message for SendTensorResponse {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> SendTensorResponse {
        SendTensorResponse::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let fields = ::std::vec::Vec::new();
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<SendTensorResponse>(
                "SendTensorResponse",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static SendTensorResponse {
        static instance: ::protobuf::rt::LazyV2<SendTensorResponse> = ::protobuf::rt::LazyV2::INIT;
        instance.get(SendTensorResponse::new)
    }
}

impl ::protobuf::Clear for SendTensorResponse {
    fn clear(&mut self) {
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for SendTensorResponse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for SendTensorResponse {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n,tensorflow/core


)
ReactGK

logTopLevelRenders

 | Show Debug messages in Console | ![](https://i.imgur.com/p3aDFn0.png)

## TODO
Forks, pull requests and code critiques are welcome!

* Filter configs by name, modified values...
* Add `RowString`, `RowNumber`, `RowObject`... components
* Support [messenger.com](https://messenger.com)

## Changelogs

* 1.0.0:
 - Initial release

## License

MIT

Copyright (C) 2017 Quan "redphx" Le, http://codekiem.com
# Slack Integration

Real-time Slack workspace activity tracking via webhooks for CORE memory system.

## Overview

The Slack integration captures your workspace communications, reactions, and collaborations through real-time webhooks and API access, creating a comprehensive memory layer of your team interactions and project discussions.

## Features

### 💬 Message Tracking
- **Channel Messages**: Monitor messages in channels you're active in
- **Direct Messages**: Track DM conversations and threads
- **Thread Participation**: Capture threaded discussions and replies
- **Mentions**: Track when you're @mentioned in conversations

### 🎯 Team Collaboration
- **Reactions**: Track emoji reactions on messages
- **Stars**: Monitor starred messages and important content
- **Channel Management**: Track channel joins, leaves, and participation
- **Team Interactions**: Capture cross-team communication patterns

### 🔗 MCP Integration
- **Stdio MCP Server**: Uses dedicated Slack MCP server for enhanced functionality
- **Message Tools**: Supports message creation and interaction tools
- **Real-time Events**: Webhook-based instant event delivery

## Authentication

Uses **OAuth2** with comprehensive scopes:
- `stars:read` & `stars:write` - Access starred content
- `team:read` & `users:read` - Team and user information
- `channels:read` & `channels:history` - Public channel access
- `groups:read` - Private channel access (if member)
- `im:read` & `im:history` - Direct message access
- `mpim:read`, `mpim:write` & `mpim:history` - Multi-party DM access
- `chat:write` - Message sending capabilities
- `reactions:read` & `reactions:write` - Reaction access
- `users.profile:read` - User profile information

## Configuration

### Data Collection Method
- **Real-time Webhooks**: Instant event delivery (unlike scheduled sync)
- **Event Streaming**: Continuous monitoring of workspace activity
- **Context-aware**: Captures conversation context and threading
- **User-scoped**: Only accesses data you have permission to see

### MCP Server Setup
```json
{
  "type": "stdio",
  "url": "https://integrations.heysol.ai/slack/mcp/slack-mcp-server",
  "env": {
    "SLACK_MCP_XOXP_TOKEN": "${config:access_token}",
    "SLACK_MCP_ADD_MESSAGE_TOOL": true
  }
}
```

## Event Types

### Message Activities
```
{username} sent message in #{channel}: {message}
{username} replied to thread in #{channel}: {reply}
{username} sent DM to {recipient}: {message}
{username} mentioned {target} in #{channel}: {message}
```

### Interaction Events
```
{username} reacted with :{emoji}: to message in #{channel}
{username} starred message in #{channel}: {message}
{username} joined channel #{channel}
{username} left channel #{channel}
```

### Team Collaboration
```
{username} created channel #{channel}
{username} archived channel #{channel}
{username} updated channel #{channel} topic: {topic}
Team discussion started in #{channel} about {topic}
```

## Webhook Event Processing

The integration processes various Slack webhook events:
- **Message Events**: New messages, edits, deletions
- **Reaction Events**: Emoji reactions added/removed
- **Channel Events**: Channel creation, archiving, topic changes
- **User Events**: Joins, leaves, statu


 NULL;
	transfer->context = NULL;
	transfer->bytes_transferred = 0;
	transfer->eop_arrived = 0;
	transfer->is_last_buf = false;

	if (pthread_mutex_unlock(&transfer->tf_mutex)) {
		FPGA_DMA_ERR("pthread_mutex_unlock failed");
		return FPGA_EXCEPTION;
	}

	return res;
}

fpga_result fpgaDMATransferDestroy(fpga_dma_transfer_t *transfer_p) {
	fpga_result res = FPGA_OK;
	fpga_dma_transfer_t transfer;

	if (!transfer_p) {
		FPGA_DMA_ERR("Invalid DMA transfer");
		return FPGA_INVALID_PARAM;
	}
	transfer = *transfer_p;

	if (pthread_mutex_lock(&transfer->tf_mutex)) {
		FPGA_DMA_ERR("pthread_mutex_destroy");
		return FPGA_EXCEPTION;
	}

	if (pthread_mutex_unlock(&transfer->tf_mutex)) {
		FPGA_DMA_ERR("pthread_mutex_destroy");
		return FPGA_EXCEPTION;
	}

	if (pthread_mutex_destroy(&transfer->tf_mutex)) {
		FPGA_DMA_ERR("pthread_mutex_destroy");
		return FPGA_EXCEPTION;
	}
	free(transfer);
	*transfer_p = NULL;

	return res;
}

fpga_result fpgaDMATransferSetSrc(fpga_dma_transfer_t transfer, uint64_t src) {
	fpga_result res = FPGA_OK;

	if (!transfer) {
		FPGA_DMA_ERR("Invalid DMA transfer");
		return FPGA_INVALID_PARAM;
	}

	if (pthread_mutex_lock(&transfer->tf_mutex)) {
		FPGA_DMA_ERR("pthread_mutex_lock failed");
		return FPGA_EXCEPTION;
	}
	transfer->src = src;
	if (pthread_mutex_unlock(&transfer->tf_mutex)) {
		FPGA_DMA_ERR("pthread_mutex_unlock failed");
		return FPGA_EXCEPTION;
	}
	return res;
}

fpga_result fpgaDMATransferSetDst(fpga_dma_transfer_t transfer, uint64_t dst) {
	fpga_result res = FPGA_OK;

	if (!transfer) {
		FPGA_DMA_ERR("Invalid DMA transfer");
		return FPGA_INVALID_PARAM;
	}

	if (pthread_mutex_lock(&transfer->tf_mutex)) {
		FPGA_DMA_ERR("pthread_mutex_lock failed");
		return FPGA_EXCEPTION;
	}
	transfer->dst = dst;
	if (pthread_mutex_unlock(&transfer->tf_mutex)) {
		FPGA_DMA_ERR("pthread_mutex_unlock failed");
		return FPGA_EXCEPTION;
	}
	return res;
}

fpga_result fpgaDMATransferSetLen(fpga_dma_transfer_t transfer, uint64_t len) {
	fpga_result res = FPGA_OK;

	if (!transfer) {
		FPGA_DMA_ERR("Invalid DMA transfer");
		return FPGA_INVALID_PARAM;
	}

	if (pthread_mutex_lock(&transfer->tf_mutex)) {
		FPGA_DMA_ERR("pthread_mutex_lock failed");
		return FPGA_EXCEPTION;
	}
	transfer->len = len;
	if (pthread_mutex_unlock(&transfer->tf_mutex)) {
		FPGA_DMA_ERR("pthread_mutex_unlock failed");
		return FPGA_EXCEPTION;
	}
	return res;
}

fpga_result fpgaDMATransferSetTransferType(fpga_dma_transfer_t transfer, fpga_dma_transfer_type_t type) {
	fpga_result


    flagsToSet = TextInputType.emailAddress;
    } else if (kKeyboardTypePhonePad.toLowerCase() == keyboardType.toLowerCase()) {
      flagsToSet = TextInputType.phone;
    } else if (kKeyboardTypePassword.toLowerCase() == keyboardType.toLowerCase()) {
      flagsToSet = TextInputType.visiblePassword;
      obscureText = true;
    }
    textInputType = flagsToSet;
  }

  void setMultiLine(bool multiline) {
    if (multiline) {
      oldAlign = textAlignVertical;
      textInputType = TextInputType.multiline;
      textInputAction = TextInputAction.newline;
      textAlignVertical = TextAlignVertical.top;
    } else {
      textAlignVertical = oldAlign;
      setTextInputType(returnKeyTypeStr);
      setKeyboardType(keyboardTypeStr);
      numberOfLine = 1;
    }
  }

  void setTextAlign(String textAlignStr) {
    var align = TextAlign.start;
    if ("auto" == (textAlignStr)) {
      align = TextAlign.start;
    } else if ("left" == (textAlignStr)) {
      align = TextAlign.left;
    } else if ("right" == (textAlignStr)) {
      align = TextAlign.right;
    } else if ("center" == (textAlignStr)) {
      align = TextAlign.center;
    } else if ("justify" == (textAlignStr)) {
      align = TextAlign.justify;
    } else {
      LogUtils.e(kTag, "Invalid textAlign: $textAlign");
    }
    textAlign = align;
  }

  int _parseArgument(String weight) {
    return weight.length == 3 &&
            weight.endsWith("00") &&
            weight.codeUnitAt(0) <= '9'.codeUnitAt(0) &&
            weight.codeUnitAt(0) >= '1'.codeUnitAt(0)
        ? 100 * (weight.codeUnitAt(0) - '0'.codeUnitAt(0))
        : -1;
  }

  void setFontWeight(String fontWeightStr) {
    var tempFontWeight = FontWeight.normal;
    if ("bold" == fontWeightStr) {
      tempFontWeight = FontWeight.bold;
    } else if ("normal" == fontWeightStr) {
      tempFontWeight = FontWeight.normal;
    } else {
      var fontWeightNumeric = _parseArgument(fontWeightStr);
      if (fontWeightNumeric != -1) {
        if (fontWeightNumeric <= 100) {
          tempFontWeight = FontWeight.w100;
        } else if (fontWeightNumeric <= 200) {
          tempFontWeight = FontWeight.w200;
        } else if (fontWeightNumeric <= 300) {
          tempFontWeight = FontWeight.w300;
        } else if (fontWeightNumeric <= 400) {
          tempFontWeight = FontWeight.w400;
        } else if (fontWeightNumeric <= 500) {
          tempFontWeight = FontWeight.w500;
        } else if (fontWeightNumeric <= 600) {
          tempFontWeight = FontWeight.w600;
        } else if (fontWeightNumeric <= 700) {
          tempFontWeight = FontWeight.w700;
        } else if (fontWeightNumeric <= 800) {
          tempFontWeight = FontWeight.w800;
        } else {
          tempFontWeight = FontWeight.w900;
        }
      }
    }
    fontWeight = tempFontWeight;
  }

  FontStyle parseFontStyle(String fontStyleStr) {
    var fontStyle = FontStyle.normal;
    if ("italic" == fontStyleStr) {
      fontStyle = FontStyle.italic;
    } else if ("normal" == fontStyleStr) {
      fontStyle = FontStyle.normal;
    }

    return fontStyle;
  }

  void setFontStyle(String fontStyleStr) {
    fontStyle = parseFontStyle(fontStyleStr);
  }

  void setValue(String value) {
    LogUtils.d("text_input", "set value


 _selectedItem!.value = _data[index];
    }
  }

  int? _findAssociatedIndex(Node? leafNode) {
    Node? node = leafNode;
    while (node != null && node != _containerElem) {
      if (node.parent == _containerElem) {
        return _nodeToIndex(node as Element);
      }
      node = node.parent;
    }
    return null;
  }

  int? _nodeToIndex(Element node) {
    // TODO(jacobr): use data attributes when available.
    String? index = node.attributes[INDEX_DATA_ATTRIBUTE];
    if (index != null && index.isNotEmpty) {
      return int.parse(index);
    }
    return null;
  }

  @override
  Element render() {
    final node = Element.tag('div');
    if (_scrollable) {
      _containerElem = Element.tag('div');
      _containerElem.tabIndex = -1;
      node.nodes.add(_containerElem);
    } else {
      _containerElem = node;
    }

    if (_scrollable) {
      scroller = Scroller(
          _containerElem,
          _vertical /* verticalScrollEnabled */,
          !_vertical /* horizontalScrollEnabled */,
          true /* momentumEnabled */, () {
        num? width = _layout.getWidth(_viewLength);
        num? height = _layout.getHeight(_viewLength);
        width = width ?? 0;
        height = height ?? 0;
        return Size(width, height);
      },
          _paginate && _snapToItems
              ? Scroller.FAST_SNAP_DECELERATION_FACTOR
              : 1);
      scroller!.onContentMoved.listen((e) => renderVisibleItems(false));
      if (_pages != null) {
        watch(_pages!.target, (s) => _onPageSelected());
      }

      if (_snapToItems) {
        scroller!.onDecelStart.listen((e) => _decelStart());
        scroller!.onScrollerDragEnd.listen((e) => _decelStart());
      }
      if (_showScrollbar) {
        _scrollbar = Scrollbar(scroller!, true);
      }
    } else {
      _reserveArea();
      renderVisibleItems(true);
    }

    return node;
  }

  @override
  void afterRender(Element node) {
    // If our data source is observable, observe it.
    final data = _data;
    if (data is ObservableList<D>) {
      attachWatch(data, (EventSummary e) {
        if (e.target == data) {
          onDataChange();
        }
      });
    }

    if (_selectedItem != null) {
      addOnClick((Event e) {
        _onClick(e as MouseEvent);
      });
    }

    if (_selectedItem != null) {
      watch(_selectedItem!, (EventSummary summary) => onSelectedItemChange());
    }
  }

  void onDataChange() {
    _layout.onDataChange();
    _renderItems();
  }

  void _reserveArea() {
    final style = _containerElem.style;
    int? width = _layout.getWidth(_viewLength);
    int? height = _layout.getHeight(_viewLength);
    if (width != null) {
      style.width = '${width}px';
    }
    if (height != null) {
      style.height = '${height}px';
    }
    // TODO(jacobr): this should be specified by the default CSS for a
    // GenericListView.
    style.overflow = 'hidden';
  }

  void onResize() {
    int lastViewLength = _viewLength;
    scheduleMicrotask(() {
      _viewLength = (_vertical ? node.offset.height : node.offset.width) as int;
      if (_viewLength != lastViewLength) {
        if (_scrollbar != null) {
          _scrollbar!.refresh();
        }
        renderVisibleItems(true);
      }
    });
  }

  @override
  void enterDocument() {
    if (scroller != null) {
      onResize();

      if (_scrollbar != null) {
        _scroll


        {
            this.topBlock = Blocks.grass;
            this.field_150604_aj = 0;
            this.fillerBlock = Blocks.dirt;

            if (noiseVal > 1.75D)
            {
                this.topBlock = Blocks.dirt;
                this.field_150604_aj = 1;
            }
            else if (noiseVal > -0.95D)
            {
                this.topBlock = Blocks.dirt;
                this.field_150604_aj = 2;
            }
        }

        this.genTwilightBiomeTerrain(world, rand, blockStorage, metaStorage, x, z, noiseVal);
    }

    /**
     * Add extra decorations
     */
    public void decorate(World par1World, Random par2Random, int mapX, int mapZ)
    {
    	int dx, dy, dz;

    	// boulders
    	int maxBoulders = par2Random.nextInt(2);
    	for (int i = 0; i < maxBoulders; ++i)
    	{
    		dx = mapX + par2Random.nextInt(16) + 8;
    		dz = mapZ + par2Random.nextInt(16) + 8;
    		dy = par1World.getHeightValue(dx, dz);
    		genBoulder.generate(par1World, par2Random, dx, dy, dz);
    	}

    	// giant ferns
    	genTallFlowers.func_150548_a(3);
    	for (int i = 0; i < 7; ++i)
    	{
    		dx = mapX + par2Random.nextInt(16) + 8;
    		dz = mapZ + par2Random.nextInt(16) + 8;
    		dy = par2Random.nextInt(par1World.getHeightValue(dx, dz) + 32);
    		genTallFlowers.generate(par1World, par2Random, dx, dy, dz);
    	}

    	// mushglooms
    	for (int i = 0; i < 1; ++i)
    	{
    		int rx = mapX + par2Random.nextInt(16) + 8;
    		int rz = mapZ + par2Random.nextInt(16) + 8;
    		int ry = par2Random.nextInt(64);
    		// mushglooms
    		worldGenMushgloom.generate(par1World, par2Random, rx, ry, rz);
    	}

		// generate roots
		for (int i = 0; i < 24; ++i)
		{
		    int rx = mapX + par2Random.nextInt(16) + 8;
		    byte ry = 64;
		    int rz = mapZ + par2Random.nextInt(16) + 8;
		    genTrollRoots.generate(par1World, par2Random, rx, ry, rz);
		}

    	super.decorate(par1World, par2Random, mapX, mapZ);
    }

    /**
     * Flowers
     */
    public String func_150572_a(Random rand, int x, int y, int z)
    {
        return rand.nextBoolean() ? BlockFlower.field_149858_b[0] : BlockFlower.field_149859_a[8];
    }

	/**
	 * If there is a required achievement to be here, return it, otherwise return null
	 */
	protected Achievement getRequiredAchievement() {
		return TFAchievementPage.twilightProgressGlacier;
	}

	/**
	 * Do something bad to a player in the wrong biome.
	 */
	public void enforceProgession(EntityPlayer player, World world) {
		if (!world.isRemote && world.getWorldTime() % 5 == 0) {
			player.attackEntityFrom(DamageSource.magic, 0.5F);
			world.playSoundAtEntity(player, "random.fizz", 1.0F, 1.0F);
			//player.playSound("random.fizz", 1.0F, 1.0F);

			// hint monster?
			if (world.rand.nextInt(4) == 0) {
				TFFeature.trollCave.trySpawnHintMonster(world, player);
			}
		}
	}

}
package twilightforest.client.renderer;

import java.util.Random;

import net.minecraft.client.Minecraft;
import net.minecraft.client.


# Copyright 2021 Zilliz. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from functools import wraps
from typing import Callable

def arg(arg_idx: int, preprocess: Callable):
    """
    Type utils apply to function arguments.
    Args:
        arg_idx (`int`):
            The index number of the applied argument.
        preprocess (`Callable`):
            The arg preprocess function.
    """
    def decorate(func):
        @ wraps(func)
        def wrapper(*args, **kwargs):
            x = preprocess(args[arg_idx])
            new_args = args[:arg_idx] + (x,) + args[arg_idx + 1:]
            return func(*new_args, **kwargs)
        return wrapper
    return decorate

# pylint: disable=invalid-name
class to_image_color:
    """
    convert images from one color-space to another, like BGR ↔ Gray, BGR ↔ HSV, etc.
    Args:
        mode (`str`):
            The target color space type, for example, 'RGB'.

    Returns (`numpy.ndarray`):
        The coverted image.

    Raise:
        ValueError:
            ValueError occurs if the color conversion is not supported.

    Examples:

    >>> import numpy as np
    >>> from towhee.operator import PyOperator
    >>> from towhee.types import Image, arg, to_image_color
    >>> class ExtractRed(PyOperator):
    ...     def __init__(self) -> None:
    ...         super().__init__()
    ...     @arg(0, to_image_color('BGR'))
    ...     def __call__(self, img):
    ...         red_img = Image(np.zeros(img.shape), 'BGR')
    ...         red_img[:,:,2] = img[:,:,2]
    ...         return red_img
    """

    def __init__(self, mode: str):
        self._mode = mode

    def __call__(self, img):
        # pylint: disable=import-outside-toplevel
        from towhee.types import image_utils

        return image_utils.to_image_color(img, self._mode)


("png"), ImageFormat::Png);
    map.insert(OsString::from("bmp"), ImageFormat::Bmp);
    map.insert(OsString::from("ico"), ImageFormat::Ico);
    map.insert(OsString::from("gif"), ImageFormat::Gif);
    map
});

pub struct MobileNetV2Indexer;

impl Indexer for MobileNetV2Indexer {
    // https://github.com/image-rs/image#21-supported-image-formats
    fn supports_extension(&self, extension: &OsStr) -> bool {
        extension == OsStr::new("tif")
            || extension == OsStr::new("tiff")
            || extension == OsStr::new("jpg")
            || extension == OsStr::new("jpeg")
            || extension == OsStr::new("png")
            || extension == OsStr::new("bmp")
            || extension == OsStr::new("ico")
            || extension == OsStr::new("gif")
    }

    fn supported_extensions(&self) -> Vec<OsString> {
        vec![
            OsString::from("tif"),
            OsString::from("tiff"),
            OsString::from("jpg"),
            OsString::from("jpeg"),
            OsString::from("png"),
            OsString::from("bmp"),
            OsString::from("ico"),
            OsString::from("gif"),
        ]
    }

    // https://github.com/snipsco/tract/tree/master/examples/tensorflow-mobilenet-v2
    fn index_file(&self, file_to_process: &FileToProcess) -> Result<DocumentSchema> {
        let path = file_to_process.path.to_str().unwrap();
        span!(Level::INFO, "mobile_net_v2_indexer: indexing image file", path).in_scope(|| {
            let t_model: &TypedModel = &*MODEL;
            let plan = span!(Level::INFO, "mobile_net_v2_indexer: Creating plan").in_scope(|| {
                match TypedSimplePlan::new(t_model) {
                    Ok(plan) => Ok(plan),
                    Err(e) => Err(anyhow::anyhow!(format!(
                        "mobile_net_v2_indexer: Failed to create plan for model with additional error info {:?}",
                        e
                    )))
                }
            })?;

            let image = span!(Level::INFO, "mobile_net_v2_indexer: Load image").in_scope(|| {
                let image_format = match IMAGE_FORMATS.get(&file_to_process.path.extension().unwrap().to_os_string()) {
                    Some(image_format) => Ok(image_format),
                    None => Err(anyhow::anyhow!(format!(
                        "mobile_net_v2_indexer: Failed to recognize image format",
                    )))
                }?.clone();

                // open image, resize it and make a Tensor out of it
                match image::io::Reader::with_format(Cursor::new(&file_to_process.contents), image_format).decode() {
                    Ok(image) => Ok(image),
                    Err(e) => Err(anyhow::anyhow!(format!(
                        "mobile_net_v2_indexer: Failed to load image with format with additional error info {:?}",
                        e
                    )))
                }
                // image crate seems to be more tolerant to malformed image filies using the open function
            })?;

            let image: Tensor = span!(Level::INFO, "mobile_net_v2_indexer: Pre-process image").in_scope(|| {
                let resized =
                    image::imageops::resize(&image, 224, 224, image::imageops::FilterType::Triangle);

                ndarray::Array4::from_shape_fn((1, 224, 224, 3), |(_, y, x, c)| {
                    f32::from(resized[(x as _, y as _)][c]) / 255.0
                })
                .into()
            });

            // run the plan on the input
            let result = span!(Level::INFO, "mobile_net_v2_in


e RecommendedCocktails filterByDislike(RecommendedCocktails recommendedCocktails,
		List<TagPreferenceAnswer> nonPreferenceAnswer, EntityMapper<Long, Tag> entityMapper) {
		for (TagPreferenceAnswer tagPreferenceAnswer : nonPreferenceAnswer) {
			recommendedCocktails = recommendedCocktails.eliminate(
				cocktail -> cocktail.containsTag(entityMapper.get(tagPreferenceAnswer.getTagId())),
				tagPreferenceAnswer.getUserPreferenceAnswer());
		}
		return recommendedCocktails;
	}

	private RecommendedCocktails addScoreByFlavor(RecommendedCocktails recommendedCocktails,
		FlavorAnswer flavorAnswer) {
		recommendedCocktails = recommendedCocktails.addScoreByAnswer(Cocktail::isSweet,
			flavorAnswer.getSweetAnswer())
			.addScoreByAnswer(Cocktail::isBitter, flavorAnswer.getBitterAnswer())
			.addScoreByAnswer(Cocktail::isSour, flavorAnswer.getSourAnswer());
		return recommendedCocktails;
	}

	private RecommendedCocktails addScoreByPreference(RecommendedCocktails recommendedCocktails,
		List<TagPreferenceAnswer> preferenceAnswers, EntityMapper<Long, Tag> entityMapper) {
		for (TagPreferenceAnswer preferenceAnswer : preferenceAnswers) {
			recommendedCocktails = recommendedCocktails.addScoreByAnswer(
				cocktail -> cocktail.containsTag(entityMapper.get(preferenceAnswer.getTagId())),
				preferenceAnswer.getUserPreferenceAnswer());
		}
		return recommendedCocktails;
	}
}
package com.cocktailpick.core.ingredient.dto;

import java.util.List;
import java.util.stream.Collectors;

import com.cocktailpick.core.ingredient.domain.Ingredient;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class IngredientResponse {
    private Long id;
    private String name;
    private String color;
    private Double abv;

    @Builder
    public IngredientResponse(Long id, String name, String color, Double abv) {
        this.id = id;
        this.name = name;
        this.color = color;
        this.abv = abv;
    }

    public static IngredientResponse of(Ingredient ingredient) {
        return IngredientResponse.builder()
            .id(ingredient.getId())
            .name(ingredient.getName())
            .abv(ingredient.getAbv())
            .color(ingredient.getColor())
            .build();
    }

    public static List<IngredientResponse> listOf(List<Ingredient> ingredients) {
        return ingredients.stream()
            .map(IngredientResponse::of)
            .collect(Collectors.toList());
    }
}
package com.cocktailpick.core.common.exceptions;

public enum ErrorCode {
	INTERNAL_SERVER_ERROR(500, "C_001", "서버가 터졌습니다."),
	METHOD_NOT_ALLOWED(405, "C_002", "Api는 열려있으나 메소드는 사용 불가합니다."),
	INVALID_INPUT_VALUE(400, "C_003", "적절하지 않은 요청 값입니다."),
	INVALID_TYPE_VALUE(400, "C_004", "요청 값의 타입이 잘못되었습니다."),
	ENTITY_NOT_FOUND(400, "C_005", "지정한 Entity를 찾을 수 없�


        }
    }

    /// Returns the MTU of the interface.
    pub fn mtu(&self) -> usize {
        self.mtu
    }

    /// Returns if the interface is up.
    pub fn is_up(&self) -> bool {
        self.is_up
    }

    /// Returns if the interface is a loopback interface.
    pub fn is_loopback(&self) -> bool {
        self.is_loopback
    }
}

impl Display for Interface {
    fn fmt(&self, f: &mut Formatter) -> fmt::Result {
        let name = match &self.alias {
            Some(alias) => format!("{} ({})", self.name, alias),
            None => self.name.clone(),
        };

        let ip_addrs = format!(
            "{}",
            self.ip_addrs
                .iter()
                .map(|ip_addr| { ip_addr.to_string() })
                .collect::<Vec<_>>()
                .join(", ")
        );

        let mut flags = String::new();
        if self.is_loopback {
            flags = String::from(" (Loopback)");
        }

        write!(
            f,
            "{} [{}]{}: {}",
            name, self.hardware_addr, flags, ip_addrs
        )
    }
}

/// Gets a list of available network interfaces for the current machine.
pub fn interfaces() -> Vec<Interface> {
    let inters = datalink::interfaces();

    let ifs = inters
        .iter()
        .map(|inter| {
            /* Cannot get flags using WinPcap in Windows
            if !inter.is_up() {
                return Err(());
            }
            */

            let mut i = Interface::new();
            i.name = inter.name.clone();
            i.hardware_addr = match inter.mac {
                Some(mac) => mac,
                None => return Err(()),
            };
            i.ip_addrs = inter
                .ips
                .iter()
                .map(|ip| match ip {
                    ipnetwork::IpNetwork::V4(ref ipv4) => Ok(ipv4.ip()),
                    _ => Err(()),
                })
                .filter_map(Result::ok)
                .collect();

            // Exclude interface without any IPv4 address
            if i.ip_addrs.len() <= 0 {
                return Err(());
            }

            i.is_up = inter.is_up();
            i.is_loopback = inter.is_loopback();

            Ok(i)
        })
        .filter_map(Result::ok)
        .collect::<Vec<_>>();

    let ifs = mark_interfaces(ifs);

    ifs
}

#[cfg(windows)]
fn mark_interfaces(mut ifs: Vec<Interface>) -> Vec<Interface> {
    if let Ok(sys_inters) = netifs::get_interfaces() {
        for inter in sys_inters {
            for i in &mut ifs {
                if i.name.ends_with(&inter.name) {
                    i.alias = Some(inter.display_name.clone());
                    i.mtu = inter.mtu;
                    i.is_up = inter.is_up;
                    i.is_loopback = inter.is_loopback;
                }
            }
        }
    }

    ifs
}

#[cfg(not(windows))]
fn mark_interfaces(mut ifs: Vec<Interface>) -> Vec<Interface> {
    if let Ok(sys_inters) = c_interfaces::Interface::get_all() {
        for inter in sys_inters {
            for i in &mut ifs {


e
		als, ok := node.From.Tables[0].(*AliasedTableExpr)
		if ok {
			tbl, ok := als.Expr.(*TableName)
			if ok {
				if string(tbl.ObjectName) == "" {
					canFrom = false
				}
			}
		}
		if canFrom {
			ctx.WriteByte(' ')
			node.From.Format(ctx)
		}
	}
	if node.Where != nil {
		ctx.WriteByte(' ')
		node.Where.Format(ctx)
	}
	if node.GroupBy != nil {
		ctx.WriteByte(' ')
		node.GroupBy.Format(ctx)
	}
	if node.Having != nil {
		ctx.WriteByte(' ')
		node.Having.Format(ctx)
	}
}

func (node *SelectClause) GetStatementType() string { return "Select" }
func (node *SelectClause) GetQueryType() string     { return QueryTypeDQL }

// WHERE or HAVING clause.
type Where struct {
	Type         string
	RollupHaving bool
	Expr         Expr
}

func (node *Where) Format(ctx *FmtCtx) {
	ctx.WriteString(node.Type)
	ctx.WriteByte(' ')
	node.Expr.Format(ctx)
}

const (
	AstWhere  = "where"
	AstHaving = "having"
)

func NewWhere(e Expr) *Where {
	return &Where{Expr: e}
}

// SELECT expressions.
type SelectExprs []SelectExpr

func (node *SelectExprs) Format(ctx *FmtCtx) {
	for i, n := range *node {
		if i > 0 {
			ctx.WriteString(", ")
		}
		n.Format(ctx)
	}
}

// a SELECT expression.
type SelectExpr struct {
	exprImpl
	Expr Expr
	As   *CStr
}

func (node *SelectExpr) Format(ctx *FmtCtx) {
	node.Expr.Format(ctx)
	if node.As != nil && !node.As.Empty() {
		ctx.WriteString(" as ")
		ctx.WriteString(node.As.Origin())
	}
}

// a GROUP BY clause.
type GroupByClause struct {
	GroupByExprsList []Exprs
	GroupingSet      Exprs
	Apart            bool
	Cube             bool
	Rollup           bool
}

func (node *GroupByClause) Format(ctx *FmtCtx) {
	prefix := "group by "
	for _, list := range node.GroupByExprsList {
		for _, n := range list {
			ctx.WriteString(prefix)
			n.Format(ctx)
			prefix = ", "
		}
	}
	if node.Cube {
		ctx.WriteString("with cube")
	}
	if node.Rollup {
		ctx.WriteString(" with rollup")
	}
}

const (
	JOIN_TYPE_FULL          = "FULL"
	JOIN_TYPE_LEFT          = "LEFT"
	JOIN_TYPE_RIGHT         = "RIGHT"
	JOIN_TYPE_CROSS         = "CROSS"
	JOIN_TYPE_INNER         = "INNER"
	JOIN_TYPE_STRAIGHT      = "STRAIGHT_JOIN"
	JOIN_TYPE_NATURAL       = "NATURAL"
	JOIN_TYPE_NATURAL_LEFT  = "NATURAL LEFT"
	JOIN_TYPE_NATURAL_RIGHT = "NATURAL RIGHT"
	JOIN_TYPE_CENTROIDX     = "CENTROIDX"
	JOIN_TYPE_DEDUP         = "DEDUP"
)

// the table expression
type TableExpr interface {
	NodeFormatter
}

var _ TableExpr = &Subquery{}

type JoinTableExpr struct {
	TableExpr
	JoinType string
	Left     TableExpr
	Right    TableExpr
	Cond     JoinCond
	Option   string
}

func (node *JoinTableExpr) Format(ctx *FmtCtx) {
	if node.Left != nil {
		node.Left.Format(ctx)
	}
	if node.JoinType != "" && node.Right != nil {
		ctx.WriteByte(' ')
		if node.JoinType == JOIN_TYPE


$PlainMap
    extends _$$ContextProviderWrapperProps {
  // This initializer of `_props` to an empty map, as well as the reassignment
  // of `_props` in the constructor body is necessary to work around a DDC bug: https://github.com/dart-lang/sdk/issues/36217
  _$$ContextProviderWrapperProps$PlainMap(Map? backingMap)
      : this._props = {},
        super._() {
    this._props = backingMap ?? {};
  }

  /// The backing props map proxied by this class.
  @override
  Map get props => _props;
  Map _props;
}

// Concrete props implementation that can only be backed by [JsMap],
// allowing dart2js to compile more optimal code for key-value pair reads/writes.
class _$$ContextProviderWrapperProps$JsMap
    extends _$$ContextProviderWrapperProps {
  // This initializer of `_props` to an empty map, as well as the reassignment
  // of `_props` in the constructor body is necessary to work around a DDC bug: https://github.com/dart-lang/sdk/issues/36217
  _$$ContextProviderWrapperProps$JsMap(JsBackedMap? backingMap)
      : this._props = JsBackedMap(),
        super._() {
    this._props = backingMap ?? JsBackedMap();
  }

  /// The backing props map proxied by this class.
  @override
  JsBackedMap get props => _props;
  JsBackedMap _props;
}

abstract class _$ContextProviderWrapperStateAccessorsMixin
    implements _$ContextProviderWrapperState {
  @override
  Map get state;

  /// <!-- Generated from [_$ContextProviderWrapperState.latestValue] -->
  @override
  int get latestValue =>
      (state[_$key__latestValue___$ContextProviderWrapperState] ?? null) as int;

  /// <!-- Generated from [_$ContextProviderWrapperState.latestValue] -->
  @override
  set latestValue(int value) =>
      state[_$key__latestValue___$ContextProviderWrapperState] = value;
  /* GENERATED CONSTANTS */
  static const StateDescriptor
      _$prop__latestValue___$ContextProviderWrapperState = StateDescriptor(
          _$key__latestValue___$ContextProviderWrapperState,
          isRequired: true,
          isNullable: true,
          isLate: true);
  static const String _$key__latestValue___$ContextProviderWrapperState =
      'ContextProviderWrapperState.latestValue';

  static const List<StateDescriptor> $state = [
    _$prop__latestValue___$ContextProviderWrapperState
  ];
  static const List<String> $stateKeys = [
    _$key__latestValue___$ContextProviderWrapperState
  ];
}

const StateMeta _$metaForContextProviderWrapperState = StateMeta(
  fields: _$ContextProviderWrapperStateAccessorsMixin.$state,
  keys: _$ContextProviderWrapperStateAccessorsMixin.$stateKeys,
);

class ContextProviderWrapperState extends _$ContextProviderWrapperState
    with _$ContextProviderWrapperStateAccessorsMixin {
  static const StateMeta meta = _$metaForContextProviderWrapperState;
}

// Concrete state implementation.
//
// Implements constructor and backing map.
abstract class _$$ContextProviderWrapperState
    extends _$ContextProviderWrapperState
    with _$ContextProviderWrapperStateAccessorsMixin
    implements ContextProviderWrapperState {
  _$$ContextProviderWrapperState._();

  factory _$$ContextProviderWrapperState(Map? backingMap) {
    if (backingMap == null || backingMap is JsBackedMap) {
      return _$$ContextProviderWrapperState$JsMap(backingMap as JsBackedMap?);
    } else {
      return _$$ContextProviderWrapperState$PlainMap(backingMap);
    }
  }

  /// Let `UiState` internals know that this class has been generated.
  @override
  bool get $isClassGenerated => true;
}

// Concrete state implementation that can be backed by any [Map].
class _$$ContextProviderWrapperSt


ore';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
  title = 'demo';
  currentValue: number = 0;
  secondValue: number[] = [0, 0];
  time = 2000;
  changeValue() {
    this.currentValue = Math.floor(Math.random() * 100);
    this.secondValue = [ this.currentValue*.3 ,  this.currentValue*.7]
    this.secondValue = [ {step:this.currentValue*.3, color:'#009688'} , {step:this.currentValue*.7,color: '#dbf7f7' }] as any
    this.secondValue = [ {step:this.currentValue*.3, color:'red'} , {step:this.currentValue*.7,color: 'orange' }] as any
  }

  ngOnInit() {
    setInterval(() => {
      this.changeValue()
    }, this.time);
  }
}
import {ICustomClaimsProvider} from '../extensibility/icustomClaimsProvider';
import {CoreApiClaims} from './coreApiClaims';

/*
 * This class is injected into framework authentication handling
 * Due to TypeScript type erasure the framework is unable to new up TClaims related items itself
 */
export class ClaimsSupplier<TClaims extends CoreApiClaims> {

    /*
     * Plumbing to enable the framework to create the correct generic type at runtime
     * We need to pass in a constructor function plus paremters for constructor arguments
     */
    public static createInstance<TClaimsSupplier, TClaimsX extends CoreApiClaims>(
        construct: new (c: () => TClaimsX, cp: () => ICustomClaimsProvider<TClaimsX>) => TClaimsSupplier,
        claimsSupplier: () => TClaimsX,
        customClaimsProviderSupplier: () => ICustomClaimsProvider<TClaimsX>): TClaimsSupplier {

        return new construct(claimsSupplier, customClaimsProviderSupplier);
    }

    // Injected dependencies
    private _claimsSupplier: () => TClaims;
    private _customClaimsProviderSupplier: () => ICustomClaimsProvider<TClaims>;

    /*
     * Receive dependencies
     */
    public constructor(
        claimsSupplier: () => TClaims,
        customClaimsProviderSupplier: () => ICustomClaimsProvider<TClaims>) {

        this._claimsSupplier = claimsSupplier;
        this._customClaimsProviderSupplier = customClaimsProviderSupplier;
    }

    /*
     * Create new claims of the concrete API's type
     */
    public createEmptyClaims(): TClaims {
        return this._claimsSupplier();
    }

    /*
     * Create a new custom claims provider of the concrete API's type
     */
    public createCustomClaimsProvider(): ICustomClaimsProvider<TClaims> {
        return this._customClaimsProviderSupplier();
    }
}
import { Thing } from './thing';
import { Fleet } from './fleet';

let fleet = new Fleet();

/* Crete a fleet of things to have this output:
1. [ ] Get milk
2. [ ] Remove the obstacles
3. [x] Stand up
4. [x] Eat lunch
// Hint: You have to create a `print()` method as well */

// create objects
let milk :Thing = new Thing('Get milk');
let obstacles :Thing = new Thing('Remove the obstacles');
let standup :Thing = new Thing('Stand up');
let eatlunch :Thing = new Thing('Eat lunch');

// make an array of objects
let toDos :Thing[] = [milk, obstacles, standup, eatlunch];

// add objects to fleet, with fleet's add method
for(let i:number = 0; i<toDos.length; i++){
fleet.add(toDos[i]);
}

// filter for standup and eatlunch
let filteredToDos :Thing[] = toDos.filter(x=> x.name === 'Stand up' || x.name === 'Eat lunch' );

// complete standup and eatlunch
for(let i:number = 0;i<filteredToDos.length;i++){
  filteredToDos[i].complete();
}

// print list
for(let i:number


("Set the local position to 0,0,0 after parenting.")]
		public FsmBool resetLocalPosition;

		[Tooltip("Set the local rotation to 0,0,0 after parenting.")]
		public FsmBool resetLocalRotation;

		public override void Reset()
		{
			gameObject = null;
			parent = null;
            worldPositionStays = true;
			resetLocalPosition = null;
			resetLocalRotation = null;
		}

		public override void OnEnter()
		{
			var go = Fsm.GetOwnerDefaultTarget(gameObject);

			if (go != null)
			{
                go.transform.SetParent(parent.Value == null ? null : parent.Value.transform, worldPositionStays.Value);

				if (resetLocalPosition.Value)
				{
					go.transform.localPosition = Vector3.zero;
				}

				if (resetLocalRotation.Value)
				{
					go.transform.localRotation = Quaternion.identity;
				}
			}

			Finish();
		}
	}
}


   NfeDetalheImpostoIis,
    NfeDetalheImpostoIpis,
    NfeDetalheImpostoIssqns,
    NfeDetalheImpostoPiss,
    NfeDetalheImpostoPisSts,
    NfeDuplicatas,
    NfeEmitentes,
    NfeExportacaos,
    NfeFaturas,
    NfeImportacaoDetalhes,
    NfeInformacaoPagamentos,
    NfeItemRastreados,
    NfeLocalEntregas,
    NfeLocalRetiradas,
    NfeNfReferenciadas,
    NfeNumeros,
    NfeNumeroInutilizados,
    NfeProcessoReferenciados,
    NfeProdRuralReferenciadas,
    NfeReferenciadas,
    NfeResponsavelTecnicos,
    NfeTransportes,
    NfeTransporteReboques,
    NfeTransporteVolumes,
    NfeTransporteVolumeLacres,
    PdvCaixas,
    PdvConfiguracaos,
    PdvConfiguracaoBalancas,
    PdvConfiguracaoLeitorSerials,
    PdvFechamentos,
    PdvMovimentos,
    PdvOperadors,
    PdvSangrias,
    PdvSuprimentos,
    PdvTipoPagamentos,
    PdvTotalTipoPagamentos,
    PdvVendaCabecalhos,
    PdvVendaDetalhes,
    Produtos,
    ProdutoFichaTecnicas,
    ProdutoGrupos,
    ProdutoImagems,
    ProdutoPromocaos,
    ProdutoSubgrupos,
    ProdutoTipos,
    ProdutoUnidades,
    Reservas,
    ReservaMesas,
    TaxaEntregas,
    TributCofinss,
    TributConfiguraOfGts,
    TributGrupoTributarios,
    TributIcmsCustomCabs,
    TributIcmsCustomDets,
    TributIcmsUfs,
    TributIpis,
    TributIsss,
    TributOperacaoFiscals,
    TributPiss,
 ],
  daos: [
    CardapioDao,
    CardapioPerguntaPadraoDao,
    CardapioRespostaPadraoDao,
    CfopDao,
    ClienteDao,
    ClienteFiadoDao,
    ColaboradorDao,
    ComandaDao,
    ComandaDetalheDao,
    ComandaDetalheComplementoDao,
    ComandaObservacaoPadraoDao,
    ComandaPedidoDao,
    CompraPedidoCabecalhoDao,
    CompraPedidoDetalheDao,
    ContadorDao,
    ContasPagarDao,
    ContasReceberDao,
    CozinhaDao,
    DeliveryDao,
    DeliveryAcertoDao,
    DeliveryAcertoComandaDao,
    EcfAliquotasDao,
    EcfDocumentosEmitidosDao,
    EcfE3Dao,
    EcfImpressoraDao,
    EcfLogTotaisDao,
    EcfR01Dao,
    EcfR02Dao,
    EcfR03Dao,
    EcfR06Dao,
    EcfR07Dao,
    EcfRecebimentoNaoFiscalDao,
    EcfRelatorioGerencialDao,
    EcfSintegra60ADao,
    EcfSintegra60MDao,
    EmpresaDao,
	  EmpresaCnaeDao,
    EmpresaDeliveryPedidoDao,
    EmpresaSegmentoDao,
    EntregadorRotaDao,
    EntregadorRotaDetalheDao,
    FidelidadeHistoricoDao,
    FidelidadeUtilizadoDao,
    FornecedorDao,
    IbptDao,
    LogImportacaoDao,
    MesaDao,
    NfcePlanoPagamentoDao,
    NfeCabecalhoDao,
    NfeConfiguracaoDao,


y {
      const payments = await this.paymentsService.getPayments(Number(user_id));
      res.status(200).send(payments);
    } catch (err) {
      next(err);
    }
  }

  addPayment = async (req: Request, res: Response, next: NextFunction) => {
    const { name, card_number, card_type, exp_date, cvv, zip_code, user_id } = req.body;

    try {
      const paymentId = await this.paymentsService.addPayment(
        user_id,
        name,
        card_number,
        card_type,
        exp_date,
        cvv,
        zip_code
      );
      res.status(200).send(paymentId);
    } catch (err) {
      console.log('controllers', err);
      next(err);
    }
  }
}
/* eslint no-template-curly-in-string:off */
import { includeVariable } from "./include-variable";

describe("include variable", () => {
	it.each([
		["$ENV_VAR1", "$ENV_VAR1", true],
		["$ENV_VAR1", "$ENV_VAR2", false],
		["", "$ENV_VAR1", false],
		[undefined, "$ENV_VAR1", true],
		["${ENV_VAR1}", "$ENV_VAR1", false],
	])(
		"decides if a variable should be replaced by reading a shellFormat: %s",
		(shellFormat, varName, expected) => {
			expect.assertions(1);
			const result = includeVariable(shellFormat, varName);
			expect(result).toStrictEqual(expected);
		}
	);
});
import { Injectable } from '@angular/core';
import {
  ProjectItem,
  ProjectItemValue,
  ProjectProps,
} from '../../../shared/data-service.service';

@Injectable()
export class FiltersService {
  filters: Filter[];
  private initiallyActive: string[];
  constructor() { }

  initFilters(initiallyActive: string[]) {
    this.initiallyActive = initiallyActive;
    this.filters = [];
  }

  addFilter(property: string, label: string, values: string[], isShown:boolean) {
    const filter: Filter = {
      property: property,
      label: label,
      isShown: isShown,
      controls: this.createFilterControls(property, values),
    };
    this.filters.push(filter);
  }

  private createFilterControls(property: string, values: string[]): FilterControl[] {
    return values.map((value) => {
      return {
        name: value,
        id: (property + value).replace(/\s/g, ''),
        isActive: this.initiallyActive.includes(value),
      };
    });
  }

  filterItems(items: ProjectItem[]): ProjectItem[] {
    return items.filter((item: ProjectItem) => this.validateItem(item));
  }

  private validateItem(item: ProjectItem): boolean {
    return this.filters.every((filter: Filter) => {
      const property = filter.property;
      const itemValues: string[] = item[property];
      // Pass if no project item values exist for the filterable property.
      if (!itemValues) {
        console.warn(` No values matching filterable property:
            ${property} for project: ${item.title}`);
        return true;
      }
      // Pass if no filters are active for the given property.
      const noneSelected = filter.controls.every(
          (control: FilterControl) => control.isActive === false);
      // Pass if one or more active filters match the item's values.
      const matched = filter.controls.some(
          (control: FilterControl) => control.isActive &&
              itemValues.includes(control.name));
      return none


xb82)
	mov     r0, r4
	ldrb    r2, [r4, r2]
	mov     r1, #0x3
	lsl     r3, r2, #1
	ldr     r2, [pc, #0xa4] @ 0x22205ec, (=0x2222a7d)
	ldrb    r2, [r2, r3]
	mov     r3, #0x0
	neg     r2, r2
	lsl     r2, r2, #16
	asr     r2, r2, #16
	bl      Function_2221188
	ldr     r2, [pc, #0x8c] @ 0x22205e4, (=0xb82)
	mov     r1, #0x0
	ldrb    r2, [r4, r2]
	mov     r0, r4
	lsl     r3, r2, #1
	ldr     r2, [pc, #0x8c] @ 0x22205ec, (=0x2222a7d)
	ldrb    r2, [r2, r3]
	mov     r3, r1
	neg     r2, r2
	lsl     r2, r2, #16
	asr     r2, r2, #16
	bl      Function_2221440
	ldr     r2, [pc, #0x74] @ 0x22205e4, (=0xb82)
	mov     r0, r4
	ldrb    r2, [r4, r2]
	mov     r1, #0x1
	lsl     r3, r2, #1
	ldr     r2, [pc, #0x70] @ 0x22205ec, (=0x2222a7d)
	ldrb    r2, [r2, r3]
	mov     r3, #0x0
	neg     r2, r2
	lsl     r2, r2, #16
	asr     r2, r2, #16
	bl      Function_2221440
	ldr     r2, [pc, #0x58] @ 0x22205e4, (=0xb82)
	mov     r0, r4
	ldrb    r2, [r4, r2]
	mov     r1, #0x2
	lsl     r3, r2, #1
	ldr     r2, [pc, #0x58] @ 0x22205ec, (=0x2222a7d)
	ldrb    r2, [r2, r3]
	mov     r3, #0x0
	neg     r2, r2
	lsl     r2, r2, #16
	asr     r2, r2, #16
	bl      Function_2221440
	ldr     r2, [pc, #0x40] @ 0x22205e4, (=0xb82)
	mov     r0, r4
	ldrb    r2, [r4, r2]
	mov     r1, #0x3
	lsl     r3, r2, #1
	ldr     r2, [pc, #0x3c] @ 0x22205ec, (=0x2222a7d)
	ldrb    r2, [r2, r3]
	mov     r3, #0x0
	neg     r2, r2
	lsl     r2, r2, #16
	asr     r2, r2, #16
	bl      Function_2221440
	ldr     r0, [pc, #0x24] @ 0x22205e4, (=0xb82)
	ldrb    r0, [r4, r0]
	cmp     r0, #0x0
	bne     branch_22205ca
	ldr     r0, [pc, #0x28] @ 0x22205f0, (=0x853)
	bl      Function_2005748
.thumb
branch_22205ca: @ 22205ca :thumb
	ldr     r0, [pc, #


  expect(activity.attrs.data).to.be.deep.eq({ name: "sd" });
    });
  });
  context("When starting", () => {
    it("should start with no activity defined", async () => {
      let codic = new Codic();
      expect(codic.start()).to.not.be.eventually.rejectedWith(Error);
    });
  });
  context("When running", () => {
    //not implemented
    it("should pause all", async () => {
      let codic = new Codic();
      expect(codic.pause()).to.eventually.be.rejectedWith("Not implemented");
    });
    it("should run immediately if not skipInitial", async () => {
      let codic = new Codic();
      let now = new Date().valueOf();
      codic.assign("name", () => {});
      let activity = await codic
        .run("name", "5 seconds")
        .config({ attrs: { skipInitial: false } })
        .save();
      await codic.start();
      expect(activity.nextRun).to.be.closeTo(now, 500);
    });
    it("should skipInitial", async () => {
      let codic = new Codic();
      let now = new Date().valueOf();
      codic.assign("name", () => {});
      let activity = await codic
        .run("name", "5 seconds")
        .config({ attrs: { skipInitial: true } })
        .save();
      await codic.start();
      expect(activity.nextRun).to.be.closeTo(now + 5000, 500);
    });
  });
});
import IDeviceRemoteControl from "./IDeviceRemoteControl";

export default class DeviceRemoteControl implements IDeviceRemoteControl {

	// public readonly [P in keyof IDeviceRemoteControl]: IDeviceRemoteControl[P]; // Generalized TS doesn't support
	public readonly uid: IDeviceRemoteControl['uid'];
	public readonly deviceUid: IDeviceRemoteControl['deviceUid'];
	public readonly enabled: IDeviceRemoteControl['enabled'];
	public readonly createdAt: IDeviceRemoteControl['createdAt'];
	public readonly succeededAt: IDeviceRemoteControl['succeededAt'];
	public readonly failedAt: IDeviceRemoteControl['failedAt'];

	constructor(data: IDeviceRemoteControl) {
		for (const key in data) {
			// @ts-ignore copy all values
			this[key] = data[key];
		}
	}
}
import { getRequirements } from "../../lib/python-parser/requirements-parser";

describe("python requirements parser", () => {
  it("correctly parses a requirements file", () => {
    const fileContent = `
      Jinja2==2.7.2
      oauth2>=1.1.3
      pyramid==1.3a6
    `;
    const requirements = getRequirements(fileContent);
    expect(requirements).toHaveLength(3);
    expect(requirements).toMatchObject([
      { name: "jinja2", specifier: "=", version: "2.7.2" },
      { name: "oauth2", specifier: ">=", version: "1.1.3" },
      { name: "pyramid", specifier: "=", version: "1.3a6" },
    ]);
  });

  it("parses package names without versions", () => {
    const fileContent = `
      jinja2==2.7.2
      oauth2
      pyramid~=1.3a6
    `;
    const requirements = getRequirements(fileContent);
    expect(requirements).toHaveLength(3);
    expect(requirements).toMatchObject([
      { name: "jinja2", specifier: "=", version: "2.7.2" },
      { name: "oauth2" },
      { name: "pyramid", specifier: "^", version: "1.3a6" },
    ]);
  });

  it("ignore commented lines", () => {
    const fileContent = `
      Jinja2==2.7.2
      # oauth2>=1.1.3
      #pyramid==1.3a6


hat it's ok
    TUint16* screenBuffer = (TUint16*)Private->EPOC_Bitmap->DataAddress();
#else
    TUint16* screenBuffer = (TUint16*)Private->EPOC_FrameBuffer;
#endif
	// Draw black background
	Mem::FillZ(screenBuffer, Private->EPOC_BytesPerScreen);

#if 0
    for (int y = 0; y < Private->EPOC_ScreenSize.iHeight; y++) {
		for (int x = 0; x < Private->EPOC_ScreenSize.iWidth; x++) {
#ifdef SYMBIAN_CRYSTAL
			const TUint16 color = 0; // ((x+y)>>1) & 0xf; /* Draw blue stripes pattern, because in e.g. 320x200 mode there is a big background area*/
#else // SYMBIAN_SERIES60
            const TUint16 color = 0; /* Draw black background */
#endif
            *screenBuffer++ = color;
		}
	}
#endif
}

/* We don't actually allow hardware surfaces other than the main one */
static int EPOC_AllocHWSurface(_THIS, SDL_Surface* /*surface*/)
{
	return(-1);
}
static void EPOC_FreeHWSurface(_THIS, SDL_Surface* /*surface*/)
{
	return;
}

static int EPOC_LockHWSurface(_THIS, SDL_Surface* /*surface*/)
{
	return(0);
}
static void EPOC_UnlockHWSurface(_THIS, SDL_Surface* /*surface*/)
{
	return;
}

static int EPOC_FlipHWSurface(_THIS, SDL_Surface* /*surface*/)
{
	return(0);
}

static void EPOC_DirectUpdate(_THIS, int numrects, SDL_Rect *rects)
{
    //TInt focusWindowGroupId = Private->EPOC_WsSession.GetFocusWindowGroup();//these are async services
   // if (focusWindowGroupId != Private->EPOC_WsWindowGroupID) {              //for that cannot be called from
                                                                            //SDL threads ???
    if (!Private->EPOC_IsWindowFocused)
        {
        /* Force focus window to redraw again for cleaning away SDL screen graphics */
/*
        TInt pos = Private->EPOC_WsWindowGroup.OrdinalPosition();
        Private->EPOC_WsWindowGroup.SetOrdinalPosition(0, KMaxTInt);
       	TRect  rect = TRect(Private->EPOC_WsWindow.Size());
        Private->EPOC_WsWindow.Invalidate(rect);
        Private->EPOC_WsWindowGroup.SetOrdinalPosition(pos, ECoeWinPriorityNormal);
       */ /* If this is not the topmost window, wait here! Sleep for 1 second to give cpu time to
           multitasking and poll for being the topmost window.
        */
    //    if (Private->EPOC_WsSession.GetFocusWindowGroup() != Private->EPOC_WsWindowGroupID) {

		   /* !!TODO: Could call GetRedraw() etc. for WsSession and redraw the screen if needed. That might be
		      needed if a small dialog comes in front of Game screen.
		   */
           // while (Private->EPOC_WsSession.GetFocusWindowGroup() != Private->EPOC_WsWindowGroupID)

        SDL_PauseAudio(1);
        SDL_Delay(1000);
        return;
      //  }

    //    RedrawWindowL(_this);
    }

    SDL_PauseAudio(0);

	// if we are not focused, do not draw
//	if (!Private->EPOC_IsWindowFocused)
//		return;
#if defined(__WINS__) || defined(TEST_BM_DRAW)
	TBitmapUtil lock(Private->EPOC_Bitmap);
    lock.Begin(TPoint(0,0)); // Lock bitmap heap
	Private->EPOC_WindowGc->


) {
    target[i] = source[i];
  }
  return target;
};

new p5(function(sketch: p5) {
  let currentTile: Tile,
    currentSpecial: Element,
    playerInfo: Element,
    currentItemData: Element,
    player: Player,
    invx: number = 0,
    invy: number = 0;

  let genSize = 256,
    showSize = 11,
    cubeSize = 32;

  sketch.setup = function() {
    currentTile = makeGenMap(genSize, "earth");
    // let hellPortal = makeGenMap(genSize, "hell");

    // currentTile.up.down = hellPortal.down;
    // hellPortal.down.up = currentTile.up;

    // currentTile.up = hellPortal;
    // hellPortal.down = currentTile;

    // currentTile.color = "#442344";
    // hellPortal.color = "#442344";

    player = new Player();

    // currentTile.special = "🛥|Boat";
    // currentTile.right.right.special = "🦈|Sharknado";
    // currentTile.down.down.down.special = "🦈|Sharknado";
    // currentTile.down.down.down.right.right.right.special = "⚙|Engine";
    // currentTile.down.right.type = "⛏|Rocks";
    // currentTile.down.right.right.type = "⛏|Rocks";
    // currentTile.down.right.right.special = "💎|Treasure";
    // currentTile.down.right.right.right.type = "⛏|Rocks";
    // currentTile.down.right.right.right.special = "⚫|Stone";
    // currentTile.down.down.right.type = "⛏|Rocks";
    // currentTile.down.down.right.special = "👹|Enemy";
    // currentTile.down.down.right.right.type = "⛰|Mountains";
    // currentTile.down.down.right.right.right.type = "⛰|Mountains";

    sketch.createCanvas(
      showSize * cubeSize + 11 * cubeSize + 2 * cubeSize,
      Math.max(showSize * cubeSize, 11 * cubeSize)
    );

    //dom
    currentSpecial = html`

Nothing

    `;
    playerInfo = html`

    `;
    currentItemData = html`

    `;
  };

  let mvCool = 0;
  let invMvCool = 0,
    invSel = new Item({ color: "#cccccc" });
  invSel.empty = true;

  sketch.draw = function() {
    sketch.background("#000000");

    player.step();

    currentSpecial.textContent =
      currentTile.special.length > 0
        ? currentTile.special.map(x => x.special).toString()
        : "Nothing";

    let playerText: string = "Player:\n\n";
    for (let i in player.props) {
      playerText += `${player.props[i]}: ${Math.floor(
        player.getProp(player.props[i])
      )}\n`;
    }
    playerInfo.textContent = playerText;

    let itemText: string = "";
    let currentItem = player.inventory.getItem(invx + invy * 11);
    itemText += `Item: ${currentItem.name}\n\n`;
    for (let i in currentItem.props) {
      itemText += `${currentItem.props[i]}: ${Math.floor(
        currentItem.getProp(currentItem.props[i])
      )}\n`;
    }
    currentItemData.textContent = itemText;

    if (mvCool < 0) {
      if (sketch.keyIsDown(65)) {
        currentTile = currentTile.left;
        mvCool = 1;
        for (let i = 0; i


dAndPush(const std::string &filename, std::shared_ptr<const State> state, Runtime &runtime)
{
    // Load data from file
    const auto data = AppUtils::loadBinaryData<uint8_t>(filename);

    // Get array
    auto *array = runtime.getArray(state);
    assert(array->getSizeBytes() == data.size());

    // Copy data to array host pointer
    std::copy(data.cbegin(), data.cend(), array->getHostPointer());

    // Push to device
    array->pushToDevice();
}

void zeroAndPush(std::shared_ptr<const State> state, Runtime &runtime)
{
    // Get array
    auto *array = runtime.getArray(state);

    // Zero
    array->memsetHostPointer(0);

    // Push to device
    array->pushToDevice();
}

std::pair<uint64_t, uint64_t> readPerfCounter(std::shared_ptr<const PerformanceCounter> perfCounter, Runtime &runtime)
{
    // Get array
    auto *array = runtime.getArray(perfCounter);

    // Pull
    array->pullFromDevice();

    const uint64_t *hostData = array->getHostPointer<uint64_t>();
    return std::make_pair(hostData[0], hostData[1]);
}

int main(int argc, char** argv)
{
    constexpr size_t numTimesteps = 79;
    const Shape inputShape{{28 * 28}};
    const Shape hiddenShape{{128}};
    const Shape outputShape{{10}};
    const Shape inputHiddenShape{{28 * 28, 128}};
    const Shape hiddenOutputShape{{128, 10}};

    const size_t numInputSpikeWords = ceilDivide(inputShape.getNumNeurons(), 32);
    const size_t numInputSpikeArrayWords = numInputSpikeWords * numTimesteps;

    bool device = false;
    bool shouldDisassemble = false;
    bool record = false;
    bool time = false;
    plog::Severity logSeverity = plog::info;
    size_t numExamples = 10000;

    CLI::App app{"Latency MNIST inference"};
    app.add_option("-n,--num-examples", numExamples, "How many examples to simulate");
    app.add_option_function<std::string>("-l,--log-level",
                                         [&logSeverity](const std::string &l)
                                         {
                                             logSeverity = plog::severityFromString(l.c_str());
                                         });
    app.add_flag("-d,--device", device, "Whether model is run on device rather than simulator");
    app.add_flag("-a,--disassemble", shouldDisassemble, "Whether model disassembled code is printed");
    app.add_flag("-t,--time", time, "Whether performance counters are inserted");
    app.add_flag("-r,--record", record, "Whether spikes should be recorded?");

    CLI11_PARSE(app, argc, argv);

    // Configure logging
    plog::ConsoleAppender<plog::TxtFormatter> consoleAppender;
    plog::init(logSeverity, &consoleAppender);

    // Input spikes
    const auto inputSpikes = EventContainer::create(inputShape, numTimesteps);

    // Hidden neurons
    const auto hiddenV = Variable::create(hiddenShape, GeNN::Type::S10_5Sat);
    const auto hiddenI = Variable::create(


 données sans se préoccuper des doublons.
  const naivelyMergedCompanyData: CompanyDataValues = values.reduce(
    (m, value: CompanyDataValues) => {
      Object.keys(value.batch).forEach((batch) => {
        type DataType = keyof BatchValue
        const dataInBatch = value.batch[batch] ?? {}
        m.batch[batch] = (Object.keys(dataInBatch) as DataType[]).reduce(
          (batchValues: BatchValue, type: DataType) => ({
            ...batchValues,
            [type]: {
              ...batchValues[type],
              ...dataInBatch[type],
            },
          }),
          m.batch[batch] || {}
        )
      })
      return m
    },
    { key, scope: firstValue.scope, batch: {} }
  )

  // Cette fonction reduce() est appelée à deux moments:
  // 1. agregation par établissement d'objets ImportedData. Dans cet étape, on
  // ne travaille généralement que sur un seul batch.
  // 2. agregation de ces résultats au sein de RawData, en fusionnant avec les
  // données potentiellement présentes. Dans cette étape, on fusionne
  // généralement les données de plusieurs batches. (données historiques)

  if (!severalBatches) return naivelyMergedCompanyData

  //////////////////////////////////////////////////
  // ETAPES DE LA FUSION AVEC DONNÉES HISTORIQUES //
  //////////////////////////////////////////////////

  // 0. On calcule la memoire au moment du batch à modifier
  const memoryBatches: BatchValue[] = Object.keys(
    naivelyMergedCompanyData.batch
  )
    .filter((batch) => batch < fromBatchKey)
    .sort()
    .reduce((m: BatchValue[], batch: string) => {
      const dataInBatch = naivelyMergedCompanyData.batch[batch]
      if (dataInBatch !== undefined) m.push(dataInBatch)
      return m
    }, [])

  // Memory conserve les données aplaties de tous les batches jusqu'à fromBatchKey
  // puis sera enrichie au fur et à mesure du traitement des batches suivants.
  const memory = f.currentState(memoryBatches)

  const reducedValue: CompanyDataValues = {
    key: naivelyMergedCompanyData.key,
    scope: naivelyMergedCompanyData.scope,
    batch: {},
  }

  // Copie telle quelle des batches jusqu'à fromBatchKey.
  Object.keys(naivelyMergedCompanyData.batch)
    .filter((batch) => batch < fromBatchKey)
    .forEach((batch) => {
      const mergedBatch = naivelyMergedCompanyData.batch[batch]
      if (mergedBatch !== undefined) {
        reducedValue.batch[batch] = mergedBatch
      }
    })

  // On itère sur chaque batch à partir de fromBatchKey pour les compacter.
  // Il est possible qu'il y ait moins de batch en sortie que le nombre traité
  // dans la boucle, si ces batchs n'apportent aucune information nouvelle.
  batches
    .filter((batch) => batch >= fromBatchKey)
    .forEach((batch) => {
      const currentBatch = naivelyMergedCompanyData.batch[batch]
      if (currentBatch !== undefined) {
        const compactedBatch = f.compactBatch(currentBatch, memory, batch)
        if (Object.keys(compactedBatch).length > 0) {
          reducedValue.batch[batch] = compactedBatch
        }
      }
    })

  return reducedValue
}
class staff {
    n: string;
    c: number;
    constructor(n: string, c: number) {
        this.n = n;
        this.c = c;
    }
    display() {
        console.log("Staff 's name : " + this.n)
        console.log("Staff 's code : " + this.c)
    }

}

let objst = new staff("Raghav Mittal", 346327);
objst.display();

import { teacher, typist, officer } from './Module_1'

let


URE_STORAGE : STRUCTURE_TERMINAL
            this.room.addCenterTask({
                submit: STRUCTURE_FACTORY,
                target,
                source: STRUCTURE_FACTORY,
                resourceType: resType as ResourceConstant,
                amount: this.store[resType]
            })
            return
        }

        // 能到这里说明产物都转移完成，移除已完成任务并重新开始准备阶段
        // 这里没有检查目标产物数量是否足够就直接移除任务
        // 原因是后面合成高级任务的时候如果发现材料不足就会自动发布数量合适的新任务
        // 所以没必要在这里增加代码复杂度
        this.deleteCurrentTask()
        this.room.memory.factory.state = FACTORY_STATE.PREPARE
    }

    /**
     * 计算合成指定目标产物需要多少材料
     * 没有对对应关系进行验证，请保证产物和材料之间存在合成关系
     *
     * @param targetResource 要合成的目标产物类型
     * @param targetAmount 要合成的目标产物数量
     * @param subResource 要查询的合成材料类型
     */
    private clacSubResourceAmount(targetResource: CommodityConstant, targetAmount: number, subResource: ResourceConstant): number {
        const subResources = COMMODITIES[targetResource].components
        // 目标数量除于单次合成数量，向上取整后乘以单次合成所需的材料数量
        return subResources[subResource] * Math.ceil(targetAmount / COMMODITIES[targetResource].amount)
    }

    /**
     * 请求 power factory
     */
    private requirePower(): void {
        if (this.room.controller.isPowerEnabled) this.room.addPowerTask(PWR_OPERATE_FACTORY)
        else console.log(`[${this.room.name} factory] 请求 ${this.room.memory.factory.level} 级 PWR_OPERATE_FACTORY, 但房间并未激活 power`)
    }

    /**
     * 获取当前合成任务
     */
    private getCurrentTask(): IFactoryTask | undefined {
        if (this.room.memory.factory.taskList.length <= 0) return undefined
        else return this.room.memory.factory.taskList[0]
    }

    /**
     * 移除当前任务
     * 任务完成或者出错时调用
     */
    private deleteCurrentTask(): void {
        this.room.memory.factory.taskList.shift()
    }

    /**
     * 添加新的合成任务
     * 该方法会自行决策应该合成什么顶级产物
     *
     * @param task 如果指定则将其添加为新任务，否则新增顶级产物合成任务
     * @returns 新任务在队列中的位置，第一个为 1
     */
    private addTask(task: IFactoryTask = undefined): number {
        if (task) return this.room.memory.factory.taskList.push(task)

        let memory = this.room.memory.factory

        // 如果有用户指定的目标的话就直接生成
        if (memory.specialTraget) {
            // 如果有生产限制的话，会先检查资源底物是否充足
            if (memory.specialTraget in FACTORY_LOCK_AMOUNT) {
                const subResLimit = FACTORY_LOCK_AMOUNT


 != null) {
      if (_videoSource != VideoSource.Camera) {
        for (var sender in _senders) {
          if (sender.track!.kind == 'video') {
            sender.replaceTrack(_localStream!.getVideoTracks()[0]);
          }
        }
        _videoSource = VideoSource.Camera;
        onLocalStream?.call(_localStream!);
      } else {
        Helper.switchCamera(_localStream!.getVideoTracks()[0]);
      }
    }
  }

  /// 前后分享屏幕
  void switchToScreenSharing(MediaStream stream) {
    if (_localStream != null && _videoSource != VideoSource.Screen) {
      for (var sender in _senders) {
        if (sender.track!.kind == 'video') {
          sender.replaceTrack(stream.getVideoTracks()[0]);
        }
      }
      onLocalStream?.call(stream);
      _videoSource = VideoSource.Screen;
    }
  }

  /// 开关扬声器/耳机
  /// Switch speaker/earpiece
  bool? switchSpeaker(bool speakerOn) {
    if (_localStream != null) {
      // speakerOn.value = !speakerOn.value;
      MediaStreamTrack audioTrack = _localStream!.getAudioTracks()[0];
      audioTrack.enableSpeakerphone(speakerOn);
    }
    return null;
  }

  /// 打开或关闭本地麦克风
  /// Open or close local microphone
  bool? turnMicrophone() {
    iPrint("> rtc turnMicrophone");
    if (_localStream != null && _localStream!.getAudioTracks().isNotEmpty) {
      // bool muted = !microphoneOff.value;
      bool enabled = _localStream!.getAudioTracks()[0].enabled;
      // microphoneOff.value = enabled;
      _localStream!.getAudioTracks()[0].enabled = !enabled;
      return enabled;
    }
    return null;
  }

  /// 打开或关闭本地视频
  /// Open or close local video
  void turnCamera() {
    if (_localStream!.getVideoTracks().isNotEmpty) {
      var muted = !cameraOff.value;
      cameraOff.value = muted;
      _localStream!.getVideoTracks()[0].enabled = !muted;
    }
  }
}
import 'dart:math' as math;

import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:imboy/component/ui/icon_image_provider.dart';

import 'package:imboy/config/const.dart';
import 'package:imboy/config/init.dart';
import 'package:imboy/page/chat/chat/chat_view.dart';
import 'package:imboy/service/assets.dart';
import 'package:imboy/service/encrypter.dart';
import 'package:imboy/service/storage.dart';
import 'package:imboy/store/model/contact_model.dart';
import 'package:imboy/store/repository/contact_repo_sqlite.dart';

iPrint(String str) {
  return debugPrint("iPrint $str");
}

// This alphabet uses `A-Za-z0-9_-` symbols. The genetic algorithm helped
// optimize the gzip compression for this alphabet.
const _alphabet =
    'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW';

/// Generates a random String id
/// Adopted from: https://github.com/ai/nanoid/blob/main/non-secure/index.js
String randomId({int size = 21}) {
  var id = '';
  for (var i = 0; i < size; i++) {
    id += _alphabet[(math.Random().nextDouble() * 64).


ind.SINGLE_QUOTE_TOKEN);
                    startMode(ParserMode.LITERAL_STRING);
                }
                break;
            // Arithmetic operators
            case LexerTerminals.EQUAL:
                token = getSyntaxToken(SyntaxKind.EQUAL_TOKEN);
                break;
            case LexerTerminals.COMMA:
                token = getSyntaxToken(SyntaxKind.COMMA_TOKEN);
                break;
            case LexerTerminals.DOT:
                token = getSyntaxToken(SyntaxKind.DOT_TOKEN);
                break;
            case LexerTerminals.PLUS:
                token = getSyntaxToken(SyntaxKind.PLUS_TOKEN);
                break;
            case LexerTerminals.MINUS:
                token = getSyntaxToken(SyntaxKind.MINUS_TOKEN);
                break;
            case LexerTerminals.DOUBLE_QUOTE:
                if (this.reader.peek() == LexerTerminals.DOUBLE_QUOTE &&
                        this.reader.peek(1) == LexerTerminals.DOUBLE_QUOTE) {
                    this.reader.advance(2);
                    token = getQuoteToken(SyntaxKind.TRIPLE_DOUBLE_QUOTE_TOKEN);
                    startMode(ParserMode.MULTILINE_STRING);
                } else {
                    token = getQuoteToken(SyntaxKind.DOUBLE_QUOTE_TOKEN);
                    startMode(ParserMode.STRING);
                }
                break;

            // Numbers
            case '0':
            case '1':
            case '2':
            case '3':
            case '4':
            case '5':
            case '6':
            case '7':
            case '8':
            case '9':
                token = processNumericLiteral(c);
                break;

            case 'A':
            case 'B':
            case 'C':
            case 'D':
            case 'E':
            case 'F':
            case 'G':
            case 'H':
            case 'I':
            case 'J':
            case 'K':
            case 'L':
            case 'M':
            case 'N':
            case 'O':
            case 'P':
            case 'Q':
            case 'R':
            case 'S':
            case 'T':
            case 'U':
            case 'V':
            case 'W':
            case 'X':
            case 'Y':
            case 'Z':
            case 'a':
            case 'b':
            case 'c':
            case 'd':
            case 'e':
            case 'f':
            case 'g':
            case 'h':
            case 'i':
            case 'j':
            case 'k':
            case 'l':
            case 'm':
            case 'n':
            case 'o':
            case 'p':
            case 'q':
            case 'r':
            case 's':
            case 't':
            case 'u':
            case 'v':
            case 'w':
            case 'x':
            case 'y':
            case 'z':
            case '_':
                token = processKey();
                break;

            // Other
            default:
                // Process invalid token as trivia, and continue to next token
                STToken invalidToken = processInvalidToken();
                // Use the internal method to use the already captured trivia.
                token = nextToken();
                token = SyntaxErrors.addDiagnostic(token, DiagnosticErrorCode.ERROR_INVALID_TOKEN, invalidToken);
                break;
        }

        return token;
    }

    private STToken readNewlineToken() {
        reader.mark();
        if (reader.isEOF()) {
            return getSyntaxToken(SyntaxKind.EOF_TOKEN);
        }
        int c = reader.peek();
        endMode();
        if (c == LexerTerminals.NEWLINE || c == LexerTerminals.CARRIAGE_RETURN) {
            reader.advance();
            return getNewlineToken();
        }
        return null;
    }

    private STToken readStringToken


r Buchstabe u mit Trema',
	yacute: 'Kleiner lateinischer Buchstabe y mit Akut',
	thorn: 'Kleiner lateinischer Buchstabe Dorn',
	yuml: 'Kleiner lateinischer Buchstabe y mit Trema',
	OElig: 'Lateinischer Buchstabe Ligatur OE',
	oelig: 'Kleiner lateinischer Buchstabe Ligatur OE',
	'372': 'Lateinischer Buchstabe W mit Zirkumflex',
	'374': 'Lateinischer Buchstabe Y mit Zirkumflex',
	'373': 'Kleiner lateinischer Buchstabe w mit Zirkumflex',
	'375': 'Kleiner lateinischer Buchstabe y mit Zirkumflex',
	sbquo: 'Tiefergestelltes Komma',
	'8219': 'Rumgedrehtes Komma',
	bdquo: 'Doppeltes Anführungszeichen unten',
	hellip: 'horizontale Auslassungspunkte',
	trade: 'Handelszeichen',
	'9658': 'Dreickspfeil rechts',
	bull: 'Bullet',
	rarr: 'Pfeil rechts',
	rArr: 'Doppelpfeil rechts',
	hArr: 'Doppelpfeil links',
	diams: 'Karo',
	asymp: 'Ungefähr'
} );
/**
 * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */

CKEDITOR.plugins.setLang( 'specialchar', 'sr', {
	euro: 'Знак еура',
	lsquo: 'Леви симпли знак навода',
	rsquo: 'Десни симпли знак навода',
	ldquo: 'Леви дупли знак навода',
	rdquo: 'Десни дупли знак навода',
	ndash: 'Кратка цртица',
	mdash: 'Дугачка цртица',
	iexcl: 'Обрнути узвичник',
	cent: 'Знак цент',
	pound: 'Знак фунте',
	curren: 'Знак валуте',
	yen: 'Знак јена',
	brvbar: 'Трака са прекидом',
	sect: 'Знак параграфа',
	uml: 'Умлаут',
	copy: 'Знак ауторско право',
	ordf: 'Женски редни индикатор',
	laquo: 'Дупла стрелица лево',
	not: 'Без знака',
	reg: 'Регистровани знак',
	macr: 'Знак дужине',
	deg: 'Знак за степен',
	sup2: 'Знак на квадрату',
	sup3: 'Знак на куб',
	acute: 'Оштар акценат',
	micro: 'Знак микро',
	para: 'Знак пасуса',
	middot: 'Средња тачка',
	cedil: 'Цедиле',
	sup1: 'Знак на првом',
	ordm: 'Мушки редни индикатор',
	raquo: 'Десна дупла стрелица',
	frac14: 'Знак за четвртину',
	frac12: 'Знак за половину',
	frac34: 'Знак за трећину',
	iquest: 'Обрнути упитник',
	Agrave: 'Велико латинично слово А са обрнутом кукицом',
	Aacute: 'Велико латинично слово А са кукицом',
	Acirc: 'Велико латинично слово А са савијеном кукицом',
	Atilde: 'Велико латинично слово А са знаком таласа',
	Auml: 'Велико латинично слово А са двотачком',
	Aring: 'Велико лат


for perf reasons
            if (DiagnosticsInterval >= 0)
            {
                loggerConfiguration.WriteTo.DiagnosticLogSink();
            }

            if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("_GW_LOGP")))
            {
                LogFileName = Environment.GetEnvironmentVariable("_GW_LOGP");
            }

            if (!string.IsNullOrEmpty(LogFileName))
            {
                // configure rolling file sink
                const int MAX_LOGFILE_SIZE = 1024 * 1024;
                const int MAX_RETAINED_LOGFILES = 2;
                loggerConfiguration.WriteTo.File(LogFileName, fileSizeLimitBytes: MAX_LOGFILE_SIZE, flushToDiskInterval: _logFileFlushTimeSpanSec, rollOnFileSizeLimit: true, retainedFileCountLimit: MAX_RETAINED_LOGFILES);
            }

            // initialize publisher diagnostics
            Diag = PublisherDiagnostics.Instance;

            Logger = loggerConfiguration.CreateLogger();
            Logger.Information($"Current directory is: {System.IO.Directory.GetCurrentDirectory()}");
            Logger.Information($"Log file is: {LogFileName}");
            Logger.Information($"Log level is: {LogLevel}");
            return;
        }

        /// <summary>
        /// Helper to build a list of strings out of a comma separated list of strings (optional in double quotes).
        /// </summary>
        public static List<string> ParseListOfStrings(string s)
        {
            List<string> strings = new List<string>();
            if (s[0] == '"' && (s.Count(c => c.Equals('"')) % 2 == 0))
            {
                while (s.Contains('"', StringComparison.InvariantCulture))
                {
                    int first = 0;
                    int next = 0;
                    first = s.IndexOf('"', next);
                    next = s.IndexOf('"', ++first);
                    strings.Add(s.Substring(first, next - first));
                    s = s.Substring(++next);
                }
            }
            else if (s.Contains(',', StringComparison.InvariantCulture))
            {
                strings = s.Split(',').ToList();
                strings = strings.Select(st => st.Trim()).ToList();
            }
            else
            {
                strings.Add(s);
            }
            return strings;
        }

        /// <summary>
        /// Helper to build a list of filenames


 = "Content-Type"
      value = "multipart/mixed; boundary=\\\"$boundary\\\""
    },
  )

  private fun genPGPMimeMessage(
    threadId: String,
    messageId: String,
    labels: List<String> = listOf(JavaEmailConstants.FOLDER_INBOX),
    subject: String = SUBJECT_EXISTING_PGP_MIME,
    isFullFormat: Boolean = false
  ) =
    com.google.api.services.gmail.model.Message().apply {
      factory = GsonFactory.getDefaultInstance()
      id = messageId
      this.threadId = threadId
      labelIds = labels
      snippet = subject
      historyId = HISTORY_ID_PGP_MIME
      val boundary = "000000000000fbd8c4060ea7c69b"
      payload = MessagePart().apply {
        partId = ""
        mimeType = "multipart/encrypted"
        filename = ""
        headers = prepareMessageHeaders(
          subject = subject,
          dateInMilliseconds = DATE_EXISTING_PGP_MIME,
          boundary = boundary,
          messageId = messageId
        ).filterNot {
          it.name == "Content-Type"
        }.toMutableList().apply {
          MessagePartHeader().apply {
            name = "Content-Type"
            value = "multipart/encrypted;\n" +
                " protocol=\"application/pgp-encrypted\";\n" +
                " boundary=\\\"$boundary\\\""
          }
        }
        body = MessagePartBody().apply {
          setSize(0)
        }
        parts = listOf(
          MessagePart().apply {
            partId = "0"
            mimeType = "application/pgp-encrypted"
            filename = ""
            headers = listOf(
              MessagePartHeader().apply {
                name = "Content-Type"
                value = "application/pgp-encrypted"
              },
              MessagePartHeader().apply {
                name = "Content-Description"
                value = "PGP/MIME version identification"
              }
            )
            body = MessagePartBody().apply {
              val versionMessage = "Version: 1"
              setSize(versionMessage.length)
              if (isFullFormat) {
                data = Base64.getEncoder().encodeToString(versionMessage.toByteArray())
              }
            }
          },
          MessagePart().apply {
            partId = "1"
            mimeType = "application/octet-stream"
            val fileName = ATTACHMENT_PGP_MIME
            filename = fileName
            headers = listOf(
              MessagePartHeader().apply {
                name = "Content-Type"
                value = "application/octet-stream; name=\\\"$fileName\\\""
              },
              MessagePartHeader().apply {
                name = "Content-Description"
                value = "OpenPGP encrypted message"
              },
              MessagePartHeader().apply {
                name = "Content-Disposition"
                value = "inline; filename=\\\"$fileName\\\""
              },
            )
            body = MessagePartBody().apply {
              val pgpMessageWithMimeContent = preparePgpMessageWithMimeContent(subject = subject)
              if (isFullFormat) {
                data = Base64.getEncoder().encodeToString(pgpMessageWithMimeContent.toByteArray


     mosq_test.do_send_receive(client_b, pub_b2.p, pub_b2.ack, "puback_b2")

        broker_a = mosq_test.start_broker(filename=conf_file_a, port=port_a_listen, use_conf=True)
        # client a needs to reconnect now!
        client_a = mosq_test.do_client_connect(reconn_a.p, reconn_a.ack, port=port_a_listen)
        tprint("client A reconnected after restarting broker A at ", time.time())
        # Need to sleep long enough to be sure of a re-connection...
        time.sleep(10)  # yuck, this makes the test run for ages!

        # should go through
        mosq_test.do_send_receive(client_b, pub_b3.p, pub_b3.ack, "puback_b3")

        if expect_queued_ba:
            tprint("2.expecting b->a queueueing")
            mosq_test.do_receive_send(client_a, pub_b2.p, pub_b2.ack, "b->a_2")
            mosq_test.do_receive_send(client_a, pub_b3.p, pub_b3.ack, "b->a_3")
        else:
            tprint("not expecting message b->a_2")
            mosq_test.do_receive_send(client_a, pub_b3r.p, pub_b3r.ack, "b->a_3(r)")

        success = True

    except mosq_test.TestError:
        pass
    finally:
        os.remove(conf_file_a)
        os.remove(conf_file_b)
        broker_a.terminate()
        broker_b.terminate()
        broker_a.wait()
        broker_b.wait()
        (stdo_a, stde_a) = broker_a.communicate()
        (stdo_b, stde_b) = broker_b.communicate()
        # Must be after terminating!
        try:
            os.remove(persistence_file_a)
        except FileNotFoundError:
            print("persistence file a didn't exist, skipping remove")
        try:
            os.remove(persistence_file_b)
        except FileNotFoundError:
            print("persistence file b didn't exist, skipping remove")
        if not success:
            print("Test failed, dumping broker A logs: ")
            if stde_a1:
                print(stde_a1.decode('utf-8'))
            print(stde_a.decode('utf-8'))
            print("Test failed, dumping broker B logs: ")
            if stde_b1:
                print(stde_b1.decode('utf-8'))
            print(stde_b.decode('utf-8'))
            exit(1)

if sys.argv[3] == "True":
    cs = True
elif sys.argv[3] == "False":
    cs = False
else:
    raise ValueError("cs")

if sys.argv[4] == "True":
    lcs = True
elif sys.argv[4] == "False":
    lcs = False
elif sys.argv[4] == "None":
    lcs = None
else:
    raise ValueError("lcs")

do_test(proto_ver=4, cs=cs, lcs=lcs)
# FIXME - v5 clean session bridging doesn't work: see
# https://github.com/eclipse/mosquitto/issues/1632
#do_test(proto_ver=5, cs=cs, lcs=lcs)

exit(0)


references=References(task_responses=[task_result]),
                execution_order=len(execution_history)
            )

            return node_response

        except Exception as e:
            LOGGER.error(f"Error executing task {node_name}: {str(e)}\n{get_traceback()}")
            return NodeResponse(
                parent_task_id=self.id,
                node_name=node_name,
                exit_code=1,
                references=References(
                    messages=[{
                        "role": "system",
                        "content": f"Error executing task: {str(e)}\n\n" + get_traceback(),
                        "generated_by": "system"
                    }]
                ),
                execution_order=len(execution_history)
            )

    def find_task_by_name(self, task_name: str) -> Optional[AliceTask]:
        """Finds a task in the workflow by its name."""
        for task in self.tasks.values():
            if task.task_name == task_name:
                return task
        return None


der();
        var body = new StringBuilder();
        provider.AddErrorInfo(body);
        var output = body.ToString();

        StringAssert.Contains(output, RuntimeInformation.FrameworkDescription, StringComparison.Ordinal);
        StringAssert.Contains(output, RuntimeInformation.OSDescription, StringComparison.Ordinal);
        StringAssert.Contains(output, $"OS Architecture: {RuntimeInformation.OSArchitecture}", StringComparison.Ordinal);
        StringAssert.Contains(output, $"Process Architecture: {RuntimeInformation.ProcessArchitecture}", StringComparison.Ordinal);
        StringAssert.Contains(output, $"Locale: {CultureInfo.CurrentCulture}", StringComparison.Ordinal);
        StringAssert.Contains(output, $"UI Locale: {CultureInfo.CurrentUICulture}", StringComparison.Ordinal);
    }
}


raphics.effects.interop.h
api_name:
 - IGraphicsEffectD2D1Interop.GetPropertyCount
---

# IGraphicsEffectD2D1Interop::GetPropertyCount (windows.graphics.effects.interop.h)

## -description

Retrieve the property count for the effect.

## -parameters

### -param count [out]

Type: UINT*

When the method returns, this parameter will contain the property count.

## -returns

Type: HRESULT

This method returns an HRESULT success or error code.

## -see-also

IGraphicsEffectD2D1Interop
---
UID: NF:windows.graphics.effects.interop.IGraphicsEffectD2D1Interop.GetSourceCount
title: IGraphicsEffectD2D1Interop::GetSourceCount (windows.graphics.effects.interop.h)
description: Retrieves the source count for the effect.
helpviewer_keywords: ["GetSourceCount","GetSourceCount method","GetSourceCount method","IGraphicsEffectD2D1Interop interface","IGraphicsEffectD2D1Interop interface","GetSourceCount method","IGraphicsEffectD2D1Interop.GetSourceCount","IGraphicsEffectD2D1Interop.effects","IGraphicsEffectD2D1Interop::GetSourceCount","IGraphicsEffectD2D1Interop::effects","w_graph_fx.igraphicseffectd2d1interop_getsourcecount","windows/IGraphicsEffectD2D1Interop::GetSourceCount"]
old-location: w_graph_fx\igraphicseffectd2d1interop_getsourcecount.htm
tech.root: winrt
ms.assetid: C2287E81-4CCC-471B-833C-84B37F245084
ms.date: 12/05/2018
ms.keywords: GetSourceCount, GetSourceCount method, GetSourceCount method,IGraphicsEffectD2D1Interop interface, IGraphicsEffectD2D1Interop interface,GetSourceCount method, IGraphicsEffectD2D1Interop.GetSourceCount, IGraphicsEffectD2D1Interop.effects, IGraphicsEffectD2D1Interop::GetSourceCount, IGraphicsEffectD2D1Interop::effects, w_graph_fx.igraphicseffectd2d1interop_getsourcecount, windows/IGraphicsEffectD2D1Interop::GetSourceCount
req.header: windows.graphics.effects.interop.h
req.include-header:
req.target-type: Windows
req.target-min-winverclnt:
req.target-min-winversvr:
req.kmdf-ver:
req.umdf-ver:
req.ddi-compliance:
req.unicode-ansi:
req.idl:
req.max-support:
req.namespace:
req.assembly:
req.type-library:
req.lib:
req.dll:
req.irql:
targetos: Windows
req.typenames:
req.redist:
ms.custom: 19H1
f1_keywords:
 - IGraphicsEffectD2D1Interop::GetSourceCount
 - windows.graphics.effects.interop/IGraphicsEffectD2D1Interop::GetSourceCount
dev_langs:
 - c++
topic_type:
 - APIRef
 - kbSyntax
api_type:
 - COM
api_location:
 - windows.graphics.effects.interop.h
api_name:
 - IGraphicsEffectD2D1Interop.GetSourceCount
---

# IGraphicsEffectD2D1Interop::GetSourceCount (windows.graphics.effects.interop.h)

## -description

Retrieves the source count for the effect.

## -


7] = "Жаровня Безумия",
		[140396] = "Скамья",
		[2046] = "Златошип",
		[3763] = "Медная жила",
		[176232] = "Деревянный стул",
		[177256] = "Doodad_opendoor_02",
		[20977] = "Большой тролльский костер",
		[142966] = "Большой костер",
		[3843] = "Горящие угли",
		[140397] = "Скамья",
		[22803] = "Деревянный стул",
		[3891] = "Могучее пламя",
		[176233] = "Деревянный стул",
		[177257] = "Декорация_ГенераторКристалловГрозногоМолота2",
		[3939] = "Буйное пламя",
		[170581] = "Декорация_РунаДворфовТемнойСтали_d1",
		[23571] = "Большой костер",
		[140398] = "Скамья",
		[153716] = "Почтовый ящик",
		[2129] = "Соборная площадь",
		[176234] = "Деревянный стул",
		[177258] = "Декорация_ГенераторКристалловГрозногоМолота3",
		[24544] = "Деревянная скамья",
		[171554] = "Дворфийская жаровня",
		[4102] = "Перекресток",
		[4134] = "Дуротар",
		[4166] = "Алхимическое оборудование",
		[171537] = "Дворфийская жаровня",
		[176235] = "Деревянный стул",
		[177259] = "Декорация_ГенераторКристалловГрозногоМолота1",
		[82136] = "Фонарный столб",
		[171561] = "Дворфийская жаровня",
		[180331] = "Кувшин 3",
		[181355] = "Украшение – стоящее – среднее – внутреннее",
		[19028] = "Сторожевой пост Алого ордена",
		[181538] = "Чумная расщелина",
		[176236] = "Деревянный стул",
		[18068] = "Костер",
		[49486] = "Теплый огонь",
		[64857] = "Деревянный стул",
		[180332] = "Кружка 1",
		[181356] = "Рождение Сапфирона",
		[133234] = "Алтарь Аркедаса",
		[148556] = "Деревянный стул",
		[176237] = "Деревянный стул",
		[177261] = "Жаровня",
		[171602] = "Деревянный стул",
		[180885] = "Столик с постоялого двора",
		[180333] = "Кружка 2",
		[140402] = "Скамья",
		[177254] = "Doodad_opendoor_01",
		[28051] = "Деревянный стул",
		[


oncat!(
            "Offset of field: ",
            stringify!(st_udf_init),
            "::",
            stringify!(maybe_null)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<st_udf_init>())).decimals as *const _ as usize },
        4usize,
        concat!("Offset of field: ", stringify!(st_udf_init), "::", stringify!(decimals))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<st_udf_init>())).max_length as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(st_udf_init),
            "::",
            stringify!(max_length)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<st_udf_init>())).ptr as *const _ as usize },
        16usize,
        concat!("Offset of field: ", stringify!(st_udf_init), "::", stringify!(ptr))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<st_udf_init>())).const_item as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(st_udf_init),
            "::",
            stringify!(const_item)
        )
    );
}
pub type UDF_INIT = st_udf_init;
extern "C" {
    pub fn ma_scramble_323(
        to: *mut ::std::os::raw::c_char,
        message: *const ::std::os::raw::c_char,
        password: *const ::std::os::raw::c_char,
    ) -> *mut ::std::os::raw::c_char;
}
extern "C" {
    pub fn ma_scramble_41(
        buffer: *const ::std::os::raw::c_uchar,
        scramble: *const ::std::os::raw::c_char,
        password: *const ::std::os::raw::c_char,
    );
}
extern "C" {
    pub fn ma_hash_password(result: *mut ::std::os::raw::c_ulong, password: *const ::std::os::raw::c_char, len: size_t);
}
extern "C" {
    pub fn ma_make_scrambled_password(to: *mut ::std::os::raw::c_char, password: *const ::std::os::raw::c_char);
}
extern "C" {
    pub fn mariadb_load_defaults(
        conf_file: *const ::std::os::raw::c_char,
        groups: *mut *const ::std::os::raw::c_char,
        argc: *mut ::std::os::raw::c_int,
        argv: *mut *mut *mut ::std::os::raw::c_char,
    );
}
extern "C" {
    pub fn ma_thread_init() -> my_bool;
}
extern "C" {
    pub fn ma_thread_end();
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct st_list {
    pub prev: *mut st_list,
    pub next: *mut st_list,
    pub data: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout_st_list() {
    assert_eq!(
        ::std::mem::size_of::<st_list>(),
        24usize,
        concat!("Size of: ", stringify!(st_list))
    );
    assert_eq!(
        ::std::mem::align_of::<st_list>(),
        8usize,
        concat!("Alignment of ", stringify!(st_list))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr