0, 0, 32, 64, 128);
      final b1 = i1.getBytes(order: ChannelOrder.argb);
      expect(b1.length, equals(4));
      expect(b1[0], equals(255));
      expect(b1[1], equals(32));
      expect(b1[2], equals(64));
      expect(b1[3], equals(128));
    });
  });
}
import 'package:image/image.dart';
import 'package:test/test.dart';

void main() {
  group('Color', () {
    test('ColorUint8', () {
      final c0 = ColorUint8(0);
      expect(c0.length, equals(0));
      c0.r = 5;
      expect(c0.r, equals(0));
      expect(c0.g, equals(0));
      expect(c0.b, equals(0));
      expect(c0.a, equals(255));

      final c3 = ColorUint8.rgb(5, 12, 230);
      expect(c3.length, equals(3));
      expect(c3.r, equals(5));
      expect(c3.g, equals(12));
      expect(c3.b, equals(230));
      expect(c3.a, equals(255));
      c3.g = 10;
      expect(c3.g, equals(10));

      final c4 = ColorUint8.rgba(5, 12, 230, 240);
      expect(c4.length, equals(4));
      expect(c4.r, equals(5));
      expect(c4.g, equals(12));
      expect(c4.b, equals(230));
      expect(c4.a, equals(240));

      c3.set(c4);
      expect(c3.r, equals(5));
      expect(c3.g, equals(12));
      expect(c3.b, equals(230));

      num sum = 0;
      for (var c in c4) {
        sum += c;
      }
      expect(sum, equals(5 + 12 + 230 + 240));

      c4.a = 255;
      final a = c4.a / c4.maxChannelValue;
      expect(a, equals(1.0));
    });

    test('ColorUint8.equality', () {
      final ca = ColorUint8.rgba(5, 10, 123, 40);
      final cb = ColorUint8.rgba(3, 10, 123, 40);
      expect(ca == cb, equals(false));
      expect(ca != cb, equals(true));

      cb.r = 5;
      expect(ca == cb, equals(true));
      expect(ca != cb, equals(false));
    });
  });
}
import 'dart:io';
import 'package:image/image.dart';
import 'package:test/test.dart';

import '../_test_util.dart';

void main() {
  group('Transform', () {
    test('trim', () {
      final image =
          decodePng(File('test/_data/png/logo.png').readAsBytesSync())!;
      var trimmed = trim(image);
      File('$testOutputPath/transform/trim.png')
        ..createSync(recursive: true)
        ..writeAsBytesSync(encodePng(trimmed));
      expect(trimmed.width, equals(465));
      expect(trimmed.height, equals(150));

      trimmed = trim(image, mode: TrimMode.transparent);
      File('$testOutputPath/transform/trim_transparent.png')
        ..createSync(recursive: true)
        ..writeAsBytesSync(encodePng(trimmed));
      expect(trimmed.width, 465);
      expect(trimmed.height, equals(image.height));

      trimmed = trim(image, mode: TrimMode.bottomRightColor);
      File('$testOutputPath/transform/trim_bottomRightColor.png')
        ..createSync(recursive: true)
        ..writeAsBytesSync(encodePng(trimmed));
      expect(trimmed.width, 465);
      expect(trimmed.height, 150);
    });
  });
}
import 'dart:io';
import 'dart:typed_data';

import 'package:image/image.dart';
import 'package:test/test.dart';

import '../../_test


>
   * Required. The resource name of the catalog under which the events are
   * created. The format is
   * `projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}`.
   *

   *
   *
   * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
   *
   *
   * @return The bytes for parent.
   */
  com.google.protobuf.ByteString getParentBytes();

  /**
   *
   *
   *

   * Required. The filter string to specify the events to be deleted with a
   * length limit of 5,000 characters. The eligible fields for filtering are:
   *
   * * `eventType`: Double quoted
   * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
   * string.
   * * `eventTime`: in ISO 8601 "zulu" format.
   * * `userPseudoId`: Double quoted string. Specifying this will delete all
   *   events associated with a visitor.
   * * `userId`: Double quoted string. Specifying this will delete all events
   *   associated with a user.
   *
   * Examples:
   *
   * * Deleting all events in a time range:
   *   `eventTime > "2012-04-23T18:25:43.511Z"
   *   eventTime < "2012-04-23T18:30:43.511Z"`
   * * Deleting specific eventType:
   *   `eventType = "search"`
   * * Deleting all events for a specific visitor:
   *   `userPseudoId = "visitor1024"`
   * * Deleting all events inside a DataStore:
   *   `*`
   *
   * The filtering fields are assumed to have an implicit AND.
   *

   *
   * string filter = 2 [(.google.api.field_behavior) = REQUIRED];
   *
   * @return The filter.
   */
  java.lang.String getFilter();

  /**
   *
   *
   *

   * Required. The filter string to specify the events to be deleted with a
   * length limit of 5,000 characters. The eligible fields for filtering are:
   *
   * * `eventType`: Double quoted
   * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
   * string.
   * * `eventTime`: in ISO 8601 "zulu" format.
   * * `userPseudoId`: Double quoted string. Specifying this will delete all
   *   events associated with a visitor.
   * * `userId`: Double quoted string. Specifying this will delete all events
   *   associated with a user.
   *
   * Examples:
   *
   * * Deleting all events in a time range:
   *   `eventTime > "2012-04-23T18:25:43.511Z"
   *   eventTime < "2012-04-23T18:30:43.511Z"`
   * * Deleting specific eventType:
   *   `eventType = "search"`
   * * Deleting all events for a specific visitor:
   *   `userPseudoId = "visitor1024"`
   * * Deleting all events inside a DataStore:
   *   `*`
   *
   * The filtering fields are assumed to have an implicit AND.
   *

   *
   * string filter = 2 [(.google.api.field_behavior) = REQUIRED];
   *
   * @return The bytes for filter.
   */
  com.google.protobuf.ByteString getFilterBytes();

  /**
   *
   *
   *

   * The `force` field is currently not supported. Purge user event requests
   * will permanently delete all purgeable events. Once the development is
   * complete:
   * If `force` is set to false, the method will return the expected
   * purge count without deleting any us


        if (currentInfo->currentState == LFG_STATE_QUEUED)
        {
            // remove from that queue so they can later join this one
            queueSet::iterator qItr = m_queueSet.find(guid);
            if (qItr != m_queueSet.end())
            {
                m_queueSet.erase(qItr);
            }
            // note: do we need to send a packet telling them the current queue is over?
        }

        // are they already in a dungeon?
        if (groupCurrentlyInDungeon)
        {
            std::set<uint32> currentDungeon = currentInfo->dungeonList;

            dungeons.clear();
            dungeons.insert(*currentDungeon.begin()); // they should only have 1 dungeon in the map
        }
    }

    // used for upcoming checks
    bool isRandom  = false;
    bool isRaid    = false;
    bool isDungeon = false;

    LfgJoinResult result = GetJoinResult(plr);
    if (result == ERR_LFG_OK)
    {
        // additional checks on dungeon selection
        for (std::set<uint32>::iterator it = dungeons.begin(); it != dungeons.end(); ++it)
        {
            LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(*it);
            switch (dungeon->typeID)
            {
                case LFG_TYPE_RANDOM_DUNGEON:
                    if (dungeons.size() > 1)
                    {
                        result = ERR_LFG_INVALID_SLOT;
                    }
                    else
                    {
                        isRandom = true;
                    }
                case LFG_TYPE_DUNGEON:
                case LFG_TYPE_HEROIC_DUNGEON:
                    if (isRaid)
                    {
                        result = ERR_LFG_MISMATCHED_SLOTS;
                    }
                    isDungeon = true;
                    break;
                case LFG_TYPE_RAID:
                    if (isDungeon)
                    {
                        result = ERR_LFG_MISMATCHED_SLOTS;
                    }
                    isRaid = true;
                    break;
                default: // one of the other types
                    result = ERR_LFG_INVALID_SLOT;
                    break;
            }
        }
    }

    // since our join result may have just changed, check it again
    if (result == ERR_LFG_OK)
    {
        if (isRandom)
        {
            // fetch all dungeons with our groupID and add to set
            LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(*dungeons.begin());

            if (dungeon)
            {
                uint32 group = dungeon->groupID;

                for (uint32 id = 0; id < sLfgDungeonsStore.GetNumRows(); ++id)
                {
                    LfgDungeonsEntry const* dungeonList = sLfgDungeonsStore.LookupEntry(id);
                    if (dungeonList)
                    {
                        if (dungeonList->groupID == group)
                        {
                            dungeons.insert(dungeonList->ID); // adding to set
                        }
                    }
                }
            }
            else
            {
                result = ERR_LFG_NO_LFG_OBJECT;
            }
        }
    }

    partyForbidden partyLockedDungeons;
    if (result == ERR_LFG_OK)
    {
        // do FindRandomDungeonsNotForPlayer for the plr or whole group
        if (pGroup)
        {
            for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
            {
                if (Player* pGroupPlr = itr->getSource())
                {
                    ObjectGuid plrGuid = pGroupPlr->GetObjectGuid();

                    dungeon


x8c,0x82,0xf0,0x1c,0xf0,0x1c]
punpckhwd 485498096(%edx,%eax,4), %xmm1

// CHECK: punpckhwd 485498096(%edx), %xmm1
// CHECK: encoding: [0x66,0x0f,0x69,0x8a,0xf0,0x1c,0xf0,0x1c]
punpckhwd 485498096(%edx), %xmm1

// CHECK: punpckhwd 485498096, %xmm1
// CHECK: encoding: [0x66,0x0f,0x69,0x0d,0xf0,0x1c,0xf0,0x1c]
punpckhwd 485498096, %xmm1

// CHECK: punpckhwd 64(%edx,%eax), %xmm1
// CHECK: encoding: [0x66,0x0f,0x69,0x4c,0x02,0x40]
punpckhwd 64(%edx,%eax), %xmm1

// CHECK: punpckhwd (%edx), %xmm1
// CHECK: encoding: [0x66,0x0f,0x69,0x0a]
punpckhwd (%edx), %xmm1

// CHECK: punpckhwd %xmm1, %xmm1
// CHECK: encoding: [0x66,0x0f,0x69,0xc9]
punpckhwd %xmm1, %xmm1

// CHECK: punpcklbw -485498096(%edx,%eax,4), %xmm1
// CHECK: encoding: [0x66,0x0f,0x60,0x8c,0x82,0x10,0xe3,0x0f,0xe3]
punpcklbw -485498096(%edx,%eax,4), %xmm1

// CHECK: punpcklbw 485498096(%edx,%eax,4), %xmm1
// CHECK: encoding: [0x66,0x0f,0x60,0x8c,0x82,0xf0,0x1c,0xf0,0x1c]
punpcklbw 485498096(%edx,%eax,4), %xmm1

// CHECK: punpcklbw 485498096(%edx), %xmm1
// CHECK: encoding: [0x66,0x0f,0x60,0x8a,0xf0,0x1c,0xf0,0x1c]
punpcklbw 485498096(%edx), %xmm1

// CHECK: punpcklbw 485498096, %xmm1
// CHECK: encoding: [0x66,0x0f,0x60,0x0d,0xf0,0x1c,0xf0,0x1c]
punpcklbw 485498096, %xmm1

// CHECK: punpcklbw 64(%edx,%eax), %xmm1
// CHECK: encoding: [0x66,0x0f,0x60,0x4c,0x02,0x40]
punpcklbw 64(%edx,%eax), %xmm1

// CHECK: punpcklbw (%edx), %xmm1
// CHECK: encoding: [0x66,0x0f,0x60,0x0a]
punpcklbw (%edx), %xmm1

// CHECK: punpcklbw %xmm1, %xmm1
// CHECK: encoding: [0x66,0x0f,0x60,0xc9]
punpcklbw %xmm1, %xmm1

// CHECK: punpckldq -485498096(%edx,%eax,4), %xmm1
// CHECK: encoding: [0x66,0x0f,0x62,0x8c,0x82,0x10,0xe3,0x0f,0xe3]
punpckldq -485498096(%edx,%eax,4), %xmm


| UART21_DMA_USE_RX)
#endif

#if defined(USART1_MODE_ASYNC)  || \
    defined(USART2_MODE_ASYNC)  || \
    defined(USART3_MODE_ASYNC)  || \
    defined(USART4_MODE_ASYNC)  || \
    defined(USART5_MODE_ASYNC)  || \
    defined(USART6_MODE_ASYNC)  || \
    defined(USART7_MODE_ASYNC)  || \
    defined(USART8_MODE_ASYNC)  || \
    defined(USART9_MODE_ASYNC)  || \
    defined(USART10_MODE_ASYNC) || \
    defined(USART21_MODE_ASYNC)

#define USARTx_MODE_ASYNC               1

// Status flags
#define UART_FLAG_INITIALIZED      ((uint8_t)(1U))
#define UART_FLAG_POWERED          ((uint8_t)(1U << 1))
#define UART_FLAG_CONFIGURED       ((uint8_t)(1U << 2))
#define UART_FLAG_TX_ENABLED       ((uint8_t)(1U << 3))
#define UART_FLAG_RX_ENABLED       ((uint8_t)(1U << 4))

// Transfer Information (Run-Time)
typedef struct {
  uint32_t  rx_num;                    // Total number of receive data
  uint32_t  tx_num;                    // Total number of transmit data
  uint8_t  *rx_data;                   // Pointer to receive data buffer
  uint16_t  def_val;                   // Default transfer value
  uint8_t   rx_dma_flag;               // DMA used for transfer
  uint8_t   tx_dma_flag;               // DMA used for transfer
} UART_TRANSFER_INFO;

// Status Information (Run-time)
typedef struct {
  uint8_t   tx_busy;                   // Transmitter busy flag
  uint8_t   rx_busy;                   // Receiver busy flag
  uint8_t   tx_underflow;              // Transmit data underflow detected (cleared on start of next send operation)
  uint8_t   rx_overflow;               // Receive data overflow detected (cleared on start of next receive operation)
  uint8_t   rx_break;                  // Break detected on receive (cleared on start of next receive operation)
  uint8_t   rx_framing_error;          // Framing error detected on receive (cleared on start of next receive operation)
  uint8_t   rx_parity_error;           // Parity error detected on receive (cleared on start of next receive operation)
  uint8_t   reserved;
} UART_STATUS;

// Information (Run-time)
typedef struct {
  ARM_USART_SignalEvent_t  cb_event;   // Event Callback
  volatile UART_STATUS     status;     // Status flags
  uint8_t                  flags;      // Current USART flags
  uint8_t                  reserved[3];
} UART_INFO;

// Resources definition
typedef const struct {
  const ARM_USART_CAPABILITIES  capabilities;
  UART_HandleTypeDef      *h;          // Handle
  void                    *reg;        // Peripheral pointer
  UART_INFO               *info;       // Run-Time Information
  UART_TRANSFER_INFO      *xfer;       // Transfer information
  uint8_t                  dma_use_tx;
  uint8_t                  dma_use_rx;
  uint8_t                  reserved[2];
} UART_RESOURCES;

// Global functions and variables exported by driver .c module
#ifdef USART1_MODE_ASYNC
extern ARM_DRIVER_USART Driver_USART1;
#endif

#ifdef USART2_MODE_ASYNC
extern ARM_DRIVER_USART Driver_USART2;
#endif

#ifdef USART3_MODE_ASYNC
extern ARM_DRIVER_USART Driver_USART3;
#endif

#ifdef USART4_MODE_ASYNC
extern ARM_DRIVER_USART Driver_USART4;
#endif

#ifdef USART5_MODE_ASYNC
extern ARM_DRIVER_USART Driver_USART5;
#endif

#ifdef USART6_MODE_ASYNC
extern ARM_DRIVER_USART Driver_USART6;
#endif

#ifdef USART7_MODE_ASYNC
extern ARM_DRIVER_USART Driver_USART7;
#endif

#ifdef USART8_MODE_ASYNC
extern ARM_DRIVER_USART Driver_USART8;
#endif

#ifdef USART9_MODE_ASYNC
extern ARM_DRIVER_USART Driver_USART9;
#endif

#ifdef USART10_MODE_ASYNC
extern ARM_DRIVER_USART Driver_USART10;
#endif

#ifdef USART21_MODE_ASYNC
extern ARM_DRIVER_USART Driver_USART21;
#endif

#endif
#endif /* __UART_STM32H7XX_H */


eAsset
		}
		//如果prefix形如：mavl-coins-bty-exec-16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp:  ,则是查找addr在一个合约地址上的余额，找到一个值即可结束。
		if strings.HasSuffix(prefix, ":") {
			addr := strKey[len(prefix):]
			execAddr := []byte(prefix[(len(prefix) - len(addr) - 1):(len(prefix) - 1)])
			fmt.Println("DB.GetExecBalance record for specific exec addr.", "execAddr:", string(execAddr), " addr:", addr)
			reply.AddItem(execAddr, res.Values[i])
		} else {
			combinAddr := strKey[len(prefix):]
			addrs := strings.Split(combinAddr, ":")
			if 2 != len(addrs) {
				fmt.Println("accountDB.GetExecBalance key does not contain exec-addr & addr", "key", strKey, "combinAddr", combinAddr)
				return nil, types.ErrTypeAsset
			}
			fmt.Println("DB.GetExecBalance", "execAddr", addrs[0], "addr", addrs[1])
			reply.AddItem([]byte(addrs[0]), res.Values[i])
		}
	}

	reply.NextKey = res.NextKey

	return reply, nil
}

func TestGetExecBalance2(t *testing.T) {
	accCoin := NewCoinsAccount(types.NewChain33Config(types.GetDefaultCfgstring()))
	key := "mavl-coins-bty-exec-16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp:1JmFaA6unrCFYEWPGRi7uuXY1KthTJxJEP"
	execAddr := "16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp"
	addr := "1JmFaA6unrCFYEWPGRi7uuXY1KthTJxJEP"

	fmt.Println("-------------TestGetExecBalance2---test case1---")
	api := new(mocks.QueueProtocolAPI)
	in := &types.ReqGetExecBalance{}
	api.On("StoreList", mock.Anything).Return(&types.StoreListReply{}, nil)
	_, err := accCoin.GetExecBalance(api, in)
	assert.Nil(t, err)

	fmt.Println("-------------TestGetExecBalance2---test case2---")
	in.Symbol = "bty"
	in.Execer = "coins"
	in.Addr = []byte(addr)
	in.ExecAddr = []byte(execAddr)

	api.On("StoreList", mock.Anything).Return(&types.StoreListReply{}, nil)
	_, err = accCoin.GetExecBalance(api, in)
	assert.Nil(t, err)

	in.NextKey = []byte(key)
	fmt.Println("-------------TestGetExecBalance2---test case3---")
	api.On("StoreList", mock.Anything).Return(&types.StoreListReply{}, nil)
	_, err = accCoin.GetExecBalance(api, in)
	assert.Nil(t, err)

	fmt.Println("-------------TestGetExecBalance2---test case4---")
	api = new(mocks.QueueProtocolAPI)
	api.On("StoreList", mock.Anything).Return(nil, types.ErrInvalidParam)
	_, err = accCoin.GetExecBalance(api, in)
	assert.NotNil(t, err)

	/*
		fmt.Println("TestGetExecBalance---------------test case 1_1------------------------")
		in := &types.ReqGetExecBalance{
			Symbol:    "bty",
			StateHash: []byte("0000000000"),
			Addr:      []byte(addr),
			Execer


dMarker"),
            Token::Name(v) => write!(f, "{}", v),
            Token::Number(v, _) => write!(f, "{}", v),
            Token::String(v, _) => write!(f, "{}", v),
            Token::NewLine => write!(f, "NewLine"),
            Token::Indent => write!(f, "Indent"),
            Token::Dedent => write!(f, "Dedent"),
            Token::LParen => write!(f, "("),
            Token::RParen => write!(f, ")"),
            Token::LBracket => write!(f, "["),
            Token::RBracket => write!(f, "]"),
            Token::Colon => write!(f, ":"),
            Token::Comma => write!(f, ","),
            Token::Semi => write!(f, ";"),
            Token::Plus => write!(f, "+"),
            Token::Minus => write!(f, "-"),
            Token::Star => write!(f, "*"),
            Token::Slash => write!(f, "/"),
            Token::VBar => write!(f, "|"),
            Token::Amper => write!(f, "&"),
            Token::Less => write!(f, "<"),
            Token::Greater => write!(f, ">"),
            Token::Equal => write!(f, "="),
            Token::Dot => write!(f, "."),
            Token::Percent => write!(f, "%"),
            Token::LBrace => write!(f, "{{"),
            Token::RBrace => write!(f, "}}"),
            Token::EqEqual => write!(f, "=="),
            Token::NotEqual => write!(f, "!="),
            Token::LessEqual => write!(f, "<="),
            Token::GreaterEqual => write!(f, ">="),
            Token::Tilde => write!(f, "~"),
            Token::Circumflex => write!(f, "^"),
            Token::LeftShift => write!(f, "<<"),
            Token::RightShift => write!(f, ">>"),
            Token::DoubleStar => write!(f, "**"),
            Token::PlusEqual => write!(f, "+="),
            Token::MinEqual => write!(f, "-="),
            Token::StarEqual => write!(f, "*="),
            Token::SlashEqual => write!(f, "/="),
            Token::PercentEqual => write!(f, "%="),
            Token::AmperEqual => write!(f, "&="),
            Token::VBarEqual => write!(f, "|="),
            Token::CircumFlexEqual => write!(f, "^="),
            Token::LeftShiftEqual => write!(f, "<<="),
            Token::RightShiftEqual => write!(f, ">>="),
            Token::DoubleStarEqual => write!(f, "**="),
            Token::DoubleSlash => write!(f, "//"),
            Token::DoubleSlashEqual => write!(f, "//="),
            Token::At => write!(f, "@"),
            Token::AtEqual => write!(f, "@="),
            Token::RArrow => write!(f, "->"),
            Token::Ellipsis => write!(f, "..."),
            Token::ColonEqual => write!(f, ":="),
            Token::Async => write!(f, "async"),
            Token::Await => write!(f, "await"),
            Token::ErrorToken => write!(f, ""),
            Token::If => write!(f, "if"),
            Token::Elif => write!(f, "elif"),
            Token::Else => write!(f, "else"),
            Token::Raise => write!(f, "raise"),
            Token::Try => write!(f, "try"),
            Token::Except => write!(f, "except"),
            Token::Finally => write!(f, "finally"),
            Token::With => write!(f, "with"),
            Token::For =>


tStack.toStack(), FL.Mana_TE.make(1), NF, ST.make(this, 1, CHISL));
		RM.Hammer       .addRecipe1(T, 16, 16                  , tStack.toStack(), ST.make(this, 1, COBBL));
		RM.Crusher      .addRecipe1(T, 16, 16+mHarvestLevel* 16, tStack.toStack(), ST.make(this, 1, COBBL));
		RM.Shredder     .addRecipe1(T, 16, 16+mHarvestLevel* 16, tStack.toStack(), OP.blockDust.mat(mMaterial, 1));
		RM.generify(tStack.toStack(), ST.make(Blocks.stone, 1, 0));
		RM.add_smelting(tStack.toStack(), ST.make(this, 1, SMOTH), F, F, F);
		CR.shaped(ST.make(this, 4, BRICK), CR.DEF, "XX", "XX", 'X', tStack.toStack());
		if (IL.TF_Pick_Giant.exists()) RM.Boxinator.addRecipe2(T,128,128, ST.amount(64, tStack.toStack()), IL.TF_Pick_Giant.getWildcard(0), IL.TF_Giant_Cobble.get(1));
		RM.Extruder.addRecipe2(F, F, F, F, F, 16,  32, ST.amount(1, tStack.toStack()), IL.Shape_Extruder_Plate       .get(0), OP.plate.mat(mMaterial, 9));
		RM.Extruder.addRecipe2(F, F, F, F, F, 16,  32, ST.amount(1, tStack.toStack()), IL.Shape_Extruder_Plate_Curved.get(0), OP.plateCurved.mat(mMaterial, 9));
		RM.Extruder.addRecipe2(F, F, F, F, T, 16,  32, ST.amount(1, tStack.toStack()), IL.Shape_Extruder_Rod         .get(0), OP.stick.mat(mMaterial, 18));
		RM.Extruder.addRecipe2(F, F, F, F, T, 16,  32, ST.amount(1, tStack.toStack()), IL.Shape_Extruder_Rod_Long    .get(0), OP.stickLong.mat(mMaterial, 9));
		RM.Extruder.addRecipe2(F, F, F, F, T, 16,  32, ST.amount(1, tStack.toStack()), IL.Shape_Extruder_Bolt        .get(0), OP.bolt.mat(mMaterial, 64));
		RM.Extruder.addRecipe2(F, F, F, F, T, 16,  32, ST.amount(1, tStack.toStack()), IL.Shape_Extruder_Ingot       .get(0), ST.make(this, 1, BRICK));
		RM.Extruder.addRecipe2(F, F, F, F, T, 16,  32, ST.amount(1, tStack.toStack()), IL.Shape_Extruder_Block       .get(0), ST.make(this, 1, STONE));
		RM.Extruder.addRecipe2(F, F, F, F, T, 16,  32, ST.amount(1, tStack.toStack()), IL.Shape_Extruder_Shovel      .get(0), OP.toolHeadRawShovel.mat(mMaterial, 9));
		RM.Extruder.addRecipe2(F, F, F, F, T, 16,  32, ST.amount(1, tStack.toStack()), IL.Shape_Extruder_Sword       .get(0), OP.toolHeadRawSword.mat(mMaterial, 4));
		RM.Extruder.addRecipe2(F, F, F, F, T, 16,  32, ST.amount(1, tStack.toStack()), IL.Shape_Extruder_Hoe         .get(0), OP.toolHeadRawHoe.mat(mMaterial, 4));
		RM.


 //$NON-NLS-1$
		println("Reserved:", reserved20); //$NON-NLS-1$
		println("Reserved:", reserved21); //$NON-NLS-1$
		println("Reserved:", reserved22); //$NON-NLS-1$
		println("Reserved:", reserved23); //$NON-NLS-1$
		println("Reserved:", reserved24); //$NON-NLS-1$
		println("Reserved:", reserved25); //$NON-NLS-1$
		println("Reserved:", reserved26); //$NON-NLS-1$
		println("Reserved:", reserved27); //$NON-NLS-1$
		println("Reserved:", reserved28); //$NON-NLS-1$
		println("Reserved:", reserved29); //$NON-NLS-1$
		println("Reserved:", reserved30); //$NON-NLS-1$
		println("Reserved:", reserved31); //$NON-NLS-1$
		println("Reserved:", reserved32); //$NON-NLS-1$
	}

	private void printVmRedefineClassCommand(DataInputStream in)
			throws IOException, UnableToParseDataException {
		int typesCount = in.readInt();
		println("Types count:", typesCount); //$NON-NLS-1$
		for (int i = 0; i < typesCount; i++) {
			long typeId = readReferenceTypeID(in);
			int classfileLength = in.readInt();
			printlnReferenceTypeId("Type id:", typeId); //$NON-NLS-1$
			println("Classfile length:", classfileLength); //$NON-NLS-1$
			while ((classfileLength -= in.skipBytes(classfileLength)) != 0) {
			}
			printDescription("Class bytes:"); //$NON-NLS-1$
			println("skipped"); //$NON-NLS-1$
		}
	}

	private void printVmSetDefaultStratumCommand(DataInputStream in)
			throws IOException {
		String stratumId = readString(in);
		println("Stratum id:", stratumId); //$NON-NLS-1$
	}

	private void printVmAllClassesWithGenericReply(DataInputStream in)
			throws IOException, UnableToParseDataException {
		int classesCount = in.readInt();
		println("Classes count:", classesCount); //$NON-NLS-1$
		for (int i = 0; i < classesCount; i++) {
			byte refTypeTag = in.readByte();
			long typeId = readReferenceTypeID(in);
			String signature = readString(in);
			String genericSignature = readString(in);
			int status = in.readInt();
			printRefTypeTag(refTypeTag);
			printlnReferenceTypeId("Type id:", typeId); //$NON-NLS-1$
			println("Class signature:", signature); //$NON-NLS-1$
			println("Generic class signature:", genericSignature); //$NON-NLS-1$
			printClassStatus(status);
		}
	}

	private void printRtDefaultCommand(DataInputStream in) throws IOException,
			UnableToParseDataException {
		long typeId = readReferenceTypeID(in);
		printlnReferenceTypeId("Type id:", typeId); //$NON-NLS-1$
	}

	private void printRtSignatureReply(DataInputStream in) throws IOException {
		String signature = readString(in);
		println("Signature:", signature); //$NON-NLS-1$
	}

	private void printRtClassLoaderReply(DataInputStream in)
			throws IOException, UnableToParseDataException {
		long classLoaderId = readObjectID(in);
		printlnObjectId("ClassLoader id:", classLoaderId); //$NON-NLS-1$
	}

	private void printRtModifiersReply(DataInputStream in) throws IOException {
		int modifiers = in.readInt();
		printClassModifiers(modifiers);
	}

	private void printRtFieldsReply(DataInputStream in) throws IOException,
			UnableToParseDataException {
		int fieldsCount = in.readInt();
		println("Fields count:", fieldsCoun


�影响第二闪使用)
	 * @return boolean
	 */
	@Override
	public boolean disposable(){
		return this.disposable;
	}
	@Override
	public RunPrepare disposable(boolean disposable) {
		this.disposable = disposable;
		return this;
	}

	@Override
	public String getRuntime() {
		return runtime;
	}

	@Override
	public RunPrepare setRuntime(String runtime) {
		this.runtime = runtime;
		return this;
	}

	public boolean isStrict() {
		return strict;
	}
	public void setStrict(boolean strict) {
		this.strict = strict;
	}

	@Override
	public RunPrepare setQueryColumns(String... columns) {
		if(null != columns) {
			setQueryColumns(BeanUtil.array2list(columns));
		}
		return this;
	}

	@Override
	public RunPrepare setQueryColumns(List<String> columns) {
		this.columns = new LinkedHashMap<>();
		for(String column:columns) {
			this.columns.put(column.toUpperCase(), new Column(column));
		}
		return this;
	}

	@Override
	public LinkedHashMap<String,Column> getColumns() {
		return this.columns;
	}

	@Override
	public List<String> getExcludes() {
		return excludes;
	}

	@Override
	public RunPrepare setExcludeColumns(List<String> excludeColumn) {
		this.excludes = excludeColumn;
		return this;
	}

	@Override
	public RunPrepare setExcludeColumns(String... columns) {
		if(null != columns) {
			this.excludes = BeanUtil.array2list(columns);
		}
		return this;
	}

	@Override
	public int getBatch() {
		return batch;
	}

	public void setBatch(int batch) {
		this.batch = batch;
	}

	@Override
	public ConfigStore condition() {
		return condition;
	}

	@Override
	public RunPrepare condition(ConfigStore condition) {
		this.condition = condition;
		return this;
	}

	@Override
	public RunPrepare setUnionAll(boolean all) {
		this.unionAll = all;
		return this;
	}@Override
	public boolean isUnionAll() {
		return unionAll;
	}
	@Override
	public RunPrepare union(RunPrepare prepare, boolean all) {
		prepare.setUnionAll(all);
		unions.add(prepare);
		return this;
	}

	@Override
	public RunPrepare union(RunPrepare prepare) {
		unions.add(prepare);
		return this;
	}

	@Override
	public RunPrepare union(List<RunPrepare> unions, boolean all) {
		for(RunPrepare union:unions) {
			union(union, all);
		}
		return this;
	}

	@Override
	public RunPrepare union(List<RunPrepare> unions) {
		for(RunPrepare union:unions) {
			union(union);
		}
		return this;
	}

	@Override
	public List<RunPrepare> getUnions() {
		return  unions;
	}

	public GroupStore groups(){
		return this.groups;
	}
	public RunPrepare aggregation(Aggregation aggregation, String column, String result){
		AggregationConfig config = new AggregationConfig(aggregation, column, result);
		aggregations.add(config);
		return this;
	}
	public RunPrepare aggregation(AggregationConfig ... configs){
		for(AggregationConfig config:configs) {
			aggregations.add(config);
		}
		return this;
	}
	public RunPrepare aggregation(List<AggregationConfig> configs){
		for(AggregationConfig config:configs) {
			aggregations.add(config);
		}
		return this;
	}
	public List<AggregationConfig> aggregations() {
		return this.aggregations;
	}
	public RunPrepare box(String box){
		this.box = box;
		return this;
	}
	public RunPrepa


01.geekbang.org/resource/image/00/cb/00e7496341152c09874f2f9e3891b1cb.jpg" alt="">

从这四个维度，我们就可以区分车主的层级，以此发现不同层级的车主都有哪些不同的生活特点。比如说：

- 有不爱钻研的白领车主，在安全分合格后，用了一两次就放弃了；
- 有的是职业车主顺便拉单，安全、质量、频率、里程四高的效率用户；
- 有真的喜欢共享的勤劳车主，周一到周五几乎全勤，各项数据也都杠杠的；
- 有非常随性的车主，一个月一两单，完全看心情；
- 有的只是偶尔使用，但用了一定就是刚需的跨城车主；
- 还有很多沉默消失的车主，超过三个月没有再共享；
- 也有很多随便逛逛的人，进来了以后并不注册，只是逛逛而已。

此外，我们还发现了一个可怕的问题，就是核心贡献GMV的成熟车主都是老车主，并且他们还在不断流失。这也就说明了，我们当时产品的生态可能并没有那么健康。

后来，我们就按照这四个维度和用户出行的时间与间歇度，划分出了以上这几大类车主的典型画像，从而找到了他们的交易行为特点，以此区分地看待我们整个生态中，用户使用产品的真实状况。

所以，**通过抽象用户行为数据去观测自己商业体的时候，你就能清晰地看到产品的用户分布和GMV构成**。有的时候，一个GMV表现很好的业务，有可能已经老去甚至是即将死亡了，因为它所有贡献GMV的用户，都已经到了产品生命周期的末端。分层用户数据模型，就是我们发现业务问题与机会的重要利器。

## 二、定性画像和还原生活场景

仅仅有数据分层画像是远远不够的，我们还要将数据分层画像还原成用户的场景，把一张张画像变成一个个有血有肉的人。

比如，我曾经研究过书店的用户，当时我按照用户到店时间、书籍消费、活动消费、咖啡消费、店中店消费等维度，将用户行为层次进行了抽离，发现了不同的用户特点：

- 有从周一到周五都在会谈客户的白领型用户，他们大多是吃完饭来逛一下，或者约朋友在书店喝咖啡；


ChangeThemeIntent":[{ // 16.2
	"name":"$\ufffc0 Book Appearance $\ufffc1",
	"group":"gOrange",
	"param":{
		"changeOperation":"$\ufffc0",
		"$\ufffc0":"Enable",
		"setting":"$\ufffc1",
}}],
"com.apple.iBooks.BookReaderChangePageNavigationIntent":[{ // 16.2
	"name":"$\ufffc0 Book Page Navigation $\ufffc1",
	"group":"gOrange",
	"param":{
		"changeOperation":"$\ufffc0",
		"$\ufffc0":"Enable",
		"setting":"$\ufffc1",
}}],
"com.apple.iBooks.OpenTabBarItemIntent":[{ // 16.2
	"name":"Change View in Books",
	"group":"gOrange",
}],
"com.apple.iBooks.OpenBookIntent":[{ // 16.2
	"name":"Open Book",
	"group":"gOrange",
}],
"com.apple.iBooks.OpenDefaultCollectionIntent":[{ // 16.2
	"name":"Open Book Collection $\ufffc8",
	"group":"gOrange",
	"param":{
		"$\ufffc8":"target.title.key",
		"target":"$\ufffc9",
}}],
"com.apple.iBooks.OpenRecentBookIntent":[{ // 16.2
	"name":"Open Current Book",
	"group":"gOrange",
}],
"com.apple.iBooks.PlayAudiobookIntent":[{ // 16.2
	"name":"Play Audiobook",
	"group":"gOrange",
}],
"com.apple.iBooks.PlayRecentAudiobookIntent":[{ // 16.2
	"name":"Play Current Audiobook",
	"group":"gOrange",
}],
"com.apple.iBooks.SearchBooksIntent":[{ // 16.2
	"name":"Search $\ufffc0 in Books",
	"group":"gOrange",
	"param":{
		"searchPhrase":"$\ufffc0",
}}],
"com.apple.iBooks.BookReaderNavigatePagesIntent":[{ // 16.2
	"name":"Turn Book to $\ufffc0 Page",
	"group":"gOrange",
	"param":{
		"direction":"$\ufffc0",
}}],
"com.apple.AccessibilityUtilities.AXSettingsShortcuts.AXStartMagnifierIntent":[{
	"name":"Open Magnifier",
}],
"com.apple.Magnifier.DescribeThisIntent":[{ // 18
	"name":"Describe This in Magnifier",
}],
"com.apple.Magnifier.StartDetectionTypeIntent":[{ // 18
	"name":"Detect $\ufffc0 in Magnifier",
	"param":{
		"detectionType":"$\ufffc0",
}}],
"com.apple.Magnifier.PointAndSpeakIntent":[{ // 18
	"name":"Start Point & Speak in Magnifier",
}],
"com.apple.Magnifier.ReaderModeIntent":[{ // 18
	"name":"Open Reader in Magnifier",
}],
"com.apple.Magnifier.StartActivityAppIntent":[{ // 18
	"name":"Start Activity $\ufffc8 in Magnifier",
	"param":{
		"$\ufffc8":"activity.title.key",
		"activity":"$\ufffc9",
}}],
"is.workflow.actions.getmyworkflows":[{
	"name":"Get My Shortcuts",
}],
"com.apple.shortcuts.OpenNavigationDestinationAction":[{ // 16
	"name":"Open Shortcuts Folder",
}],
"com.apple.shortcuts.CreateWorkflowAction":[{ // 16
	"name":"Create Shortcut $\ufffc0",
	"param":{
		"name":"$\ufffc0",
}}],
"is.workflow.actions.openworkflow":[{
	"name":"Open Shortcut $\ufffc0",
	"param":{
		"WFWorkflow":"$\ufffc0",
}}],
"com.apple.shortcuts.DeleteWorkflow


决充分发动广大群众，加强骨干培养、锻炼，有策略的系统打击敌人（首先要着重斗大的、斗政治）和坚持合法斗争等问题，及时总结经验提高干部，保证运动在猛烈的斗争中继续正常发展。铺开面时必须经过第一阶段经验总结会，训练干部，使之进一步领会这些已有经验。除了从重点抽调一定数量的1‰干部和积极分子，增强面的力量外（每一个小乡按两个旧保计，在开辟阶段需要10至12个干部），区的领导必须经常深入检查、掌握较大堡垒村的工作，认真执行报告汇报制度；且应加强检查组的工作，定期（5——7天）召开乡主席团（或农协委员）及工作组长的联席会议，保证及时掌握运动发展情况，发现与解决问题。更应坚持土改干部（包括当地积极分子）的经常学习，提高干部的思想、政策水平，使土改运动的领导得以逐步提高。

   来源：江西省土地改革委员会编印：《江西省土地改革重要文献汇编》，1954年。

    [返回索引页面]

   Copyright (C)  2024  Marxist-Leninist-Maoist.

   Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

 </


import requests
import json
import sys
import os

# Add project root to the Python path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))

from config import API_URL, API_KEY, MODEL_NAME

def analyze_query(query):
    """
    Analyzes the user query using the LLM to break it down into search keywords.
    """
    headers = {
        "Authorization": f"Bearer {API_KEY}",
        "Content-Type": "application/json"
    }

    prompt = f"你是一个智能搜索助手。请将以下用户查询分解为最多7个、简洁的、用于搜索引擎的关键词短语。如果你觉得不能分解这么多，请不要刻意分解，扭曲原始查询内容含义。请只返回关键词短语，每个短语占一行，不要有任何其他多余的文字或编号。\n\n用户查询：{query}"

    data = {
        "model": MODEL_NAME,
        "messages": [
            {"role": "user", "content": prompt}
        ],
        "max_tokens": 100,
        "temperature": 0.5
    }

    try:
        response = requests.post(f"{API_URL}/chat/completions", headers=headers, json=data)
        response.raise_for_status()  # Raise an exception for bad status codes

        completion = response.json()
        content = completion['choices'][0]['message']['content'].strip()

        # Split the content into a list of keywords
        keywords = [kw.strip() for kw in content.split('\n') if kw.strip()]
        print(keywords)
        return keywords

    except requests.exceptions.RequestException as e:
        print(f"Error calling LLM API: {e}")
        return []
    except (KeyError, IndexError) as e:
        print(f"Error parsing LLM response: {e}")
        print(f"Raw response: {response.text}")
        return []

if __name__ == '__main__':
    # Example usage
    test_query = "告诉我关于人工智能在医疗保健领域的最新进展"
    print(f"Analyzing query: '{test_query}'")
    search_keywords = analyze_query(test_query)
    print("\nGenerated keywords:")
    for keyword in search_keywords:
        print(f"- {keyword}")


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

@interface SiriCoreSpeechPacket : NSObject <SiriCoreSessionObject, SiriCoreThunking> {
    NSString * _aceId;
    long long  _packetNumber;
    NSArray * _packets;
    NSString * _refId;
}

@property (nonatomic, copy) NSString *aceId;
@property (readonly, copy) NSString *debugDescription;
@property (readonly, copy) NSString *description;
@property (readonly) unsigned long long hash;
@property (nonatomic) long long packetNumber;
@property (nonatomic, retain) NSArray *packets;
@property (nonatomic, copy) NSString *refId;
@property (readonly) Class superclass;

- (void).cxx_destruct;
- (id)aceId;
- (id)description;
- (long long)packetNumber;
- (id)packets;
- (id)refId;
- (void)setAceId:(id)arg1;
- (void)setPacketNumber:(long long)arg1;
- (void)setPackets:(id)arg1;
- (void)setRefId:(id)arg1;
- (void)siriCore_addSendCompletion:(id /* block */)arg1;
- (bool)siriCore_bufferingAllowedDuringActiveSession;
- (void)siriCore_dispatchSendCompletionsWithResult:(long long)arg1 error:(id)arg2;
- (void)siriCore_invokeThunk;
- (void)siriCore_logDiagnostics;
- (id)siriCore_serializedAceDataError:(id*)arg1;
- (bool)siriCore_supportsSendCompletions;

@end


else {\
        ff_ ## OPNAME ## _pixels16_ ## EXT(dst   , src[0]   , stride, h);\
        ff_ ## OPNAME ## _pixels16_ ## EXT(dst+16, src[0]+16, stride, h);\
    }\
}

DIRAC_PIXOP(put, sse2)
DIRAC_PIXOP(avg, sse2)

HPEL_FILTER(16, sse2)

#endif // HAVE_X86ASM

void ff_diracdsp_init_x86(DiracDSPContext* c)
{
#if HAVE_X86ASM
    int mm_flags = av_get_cpu_flags();

    if (EXTERNAL_MMX(mm_flags)) {
        c->add_dirac_obmc[0] = ff_add_dirac_obmc8_mmx;
    }

    if (EXTERNAL_SSE2(mm_flags)) {
        c->dirac_hpel_filter = dirac_hpel_filter_sse2;
        c->add_rect_clamped = ff_add_rect_clamped_sse2;
        c->put_signed_rect_clamped[0] = (void *)ff_put_signed_rect_clamped_sse2;

        c->add_dirac_obmc[1] = ff_add_dirac_obmc16_sse2;
        c->add_dirac_obmc[2] = ff_add_dirac_obmc32_sse2;

        c->put_dirac_pixels_tab[1][0] = put_dirac_pixels16_sse2;
        c->avg_dirac_pixels_tab[1][0] = avg_dirac_pixels16_sse2;
        c->put_dirac_pixels_tab[2][0] = put_dirac_pixels32_sse2;
        c->avg_dirac_pixels_tab[2][0] = avg_dirac_pixels32_sse2;
    }

    if (EXTERNAL_SSE4(mm_flags)) {
        c->dequant_subband[1]         = ff_dequant_subband_32_sse4;
        c->put_signed_rect_clamped[1] = ff_put_signed_rect_clamped_10_sse4;
    }
#endif
}


SAS(SI_TIME_FORMAT_DDHHMMSS, "<<X:1>>:<<X:2>>:<<X:3>>:<<X:4>>", 1)
SAS(SI_TIME_FORMAT_DDHHMMSSMS_DESC_SHORT, "<<X:1>>日 <<X:2>>時間 <<X:3>>分 <<X:4>>秒 <<X:5>>ミリ秒", 1)
SAS(SI_TIME_FORMAT_DDHHMMSS_DESC_SHORT, "<<X:1>>日 <<X:2>>時間 <<X:3>>分 <<X:4>>秒", 1)
SAS(SI_TIME_FORMAT_DDHHMM_DESC_SHORT, "<<X:1>>日 <<X:2>>時間 <<X:3>>分", 0)
SAS(SI_TIME_FORMAT_HHMMSS, "<<X:1>>:<<X:2>>:<<X:3>>", 2)
SAS(SI_TIME_FORMAT_HHMMSSMS_DESC_SHORT, "<<X:1>>時間 <<X:2>>分 <<X:3>>秒 <<X:4>>ミリ秒", 1)
SAS(SI_TIME_FORMAT_HHMMSS_DESC_SHORT, "<<X:1>>時間 <<X:2>>分 <<X:3>>秒", 1)
SAS(SI_TIME_FORMAT_HHMM_DESC_SHORT, "<<X:1>>時間 <<X:2>>分", 0)
SAS(SI_TIME_FORMAT_HOURS, "<<X:1>>時間", 2)
SAS(SI_TIME_FORMAT_HOURS_DESC, "<<X:1>><<1[時間/時間]>>", 6)
SAS(SI_TIME_FORMAT_HOURS_DESC_COLOR, "|cffffff<<X:1>>|r <<1[時間/時間]>>", 1)
SAS(SI_TIME_FORMAT_HOURS_DESC_SHORT, "<<X:1>>時間", 1)
SAS(SI_TIME_FORMAT_MINUTES, "<<X:1>>分", 3)
SAS(SI_TIME_FORMAT_MINUTES_COLON_SECONDS, "<<X:1>>:<<X:2>>", 2)
SAS(SI_TIME_FORMAT_MINUTES_DESC, "<<X:1>><<1[分/分]>>", 6)
SAS(SI_TIME_FORMAT_MINUTES_DESC_COLOR, "|cffffff<<X:1>>|r <<1[分/分]>>", 1)
SAS(SI_TIME_FORMAT_MINUTES_DESC_SHORT, "<<X:1>>分", 1)
SAS(SI_TIME_FORMAT_MMSSMS_DESC_SHORT, "<<X:1>>分 <<X:2>>秒 <<X:3>>ミリ秒", 1)
SAS(SI_TIME_FORMAT_MMSS_DESC_SHORT, "<<X:1>>分 <<X:2>>秒", 1)
SAS(SI_TIME_FORMAT_MONTHS, "<<X:1>>ヶ月", 2)
SAS(SI_TIME_FORMAT_MONTHS_DESC, "<<X:1>> <<1[ヶ月/ヶ月]>>", 5)
SAS(SI_TIME_FORMAT_MONTHS_DESC_COLOR, "|cffffff<<X:1>>|r <<1[ヶ月/ヶ月]>>", 2)
SAS(SI_TIME_FORMAT_MONTHS_DESC_SHORT, "<<X:1>>ヶ月", 1)
SAS(SI_TIME_FORMAT_SECONDS, "<<X:1>>秒", 2)
SAS(SI_TIME_FORMAT_SECONDS_DESC, "<<F:1>> <<1[秒/秒]>>", 5)
SAS(SI_TIME_FORMAT_SECONDS_DESC_COLOR, "|cffffff<<F:1>>|r <<1[秒/秒]>>", 1)
SAS(SI_TIME_FORMAT_SECONDS_DESC_SHORT, "<<F:1>> 秒", 1)


from django.contrib.auth.models import AbstractUser
from django.db import models
from django.conf import settings

class User(AbstractUser):
    pass

class TimeStampedModel(models.Model):
    """
    An abstract base class model that provides self-updating
    ``created_at`` and ``updated_at`` fields.
    """

    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)

    class Meta:
        abstract = True

class Reagent(TimeStampedModel):
    created = TimeStampedModel.created_at
    reagent_name = models.CharField(max_length=300, blank=True, null=True)
    catalogue_no = models.CharField(max_length=300, blank=True, null=True)
    reagent_url = models.CharField(max_length=300, blank=True, null=True)
    owner = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, null=True)
    reagent_storage = models.CharField(max_length=10, blank=True, null=True)
    reagent_supplier = models.CharField(max_length=64, blank=True, null=True)

    def __str__(self) -> str:
        return f"{self.owner} {self.reagent_name} {self.catalogue_no} {self.reagent_storage} {self.reagent_url}"

    def serialize(self):
        return {
            "id": self.id,
            "name": self.reagent_name,
            "catalogue": self.catalogue_no,
            "url": self.reagent_url,
            "storage": self.reagent_storage
        }

class CellLine(TimeStampedModel):
    CHOICES = [("Wildtype", True), ("Modified", False)]
    created = TimeStampedModel.created_at
    cell_name = models.CharField(max_length=300, blank=True, null=True)
    media = models.CharField(max_length=300, blank=True, null=True)
    genotype = models.CharField(max_length=30, choices=CHOICES, default=True)
    owner = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, null=True)
    storage_position = models.CharField(max_length=10, blank=True, null=True)
    def __str__(self) -> str:
        return f"{self.owner} {self.cell_name} {self.media} {self.genotype} {self.storage_position}"

class Experiment(TimeStampedModel):
    created = TimeStampedModel.created_at
    title = models.CharField(max_length=300, blank=True, null=True)
    objective = models.TextField(blank=True, null=True)
    methods = models.TextField(blank=True, null=True)
    results = models.TextField(blank=True, null=True)
    summary = models.TextField(blank=True, null=True)
    upload = models.FileField(upload_to="docx/", blank=True)
    owner = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, null=True)

    def __str__(self) -> str:
        return f"{self.owner} {self.title} {self.objective} {self.methods} {self.results} {self.summary}"

class Protocol(TimeStampedModel):
    created = TimeStampedModel.created_at
    title = models.CharField(max_length=100, blank=True, null=True)
    owner = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, null=True)
    upload = models.FileField(upload_to="docx/", blank=True)

    def __str__(self) -> str:
        return f"{self.owner} {self.title}"


)
        jointNodeIndices.push_back(jointNodeValue.toInt());
}

GLTFImporter::Channel::Channel()
    : samplerIndex(-1)
    , targetNodeIndex(-1)
    , targetProperty()
{
}

GLTFImporter::Channel::Channel(const QJsonObject &json)
    : samplerIndex(json.value(KEY_SAMPLER).toInt())
    , targetNodeIndex(-1)
    , targetProperty()
{
    const auto targetJson = json.value(KEY_TARGET).toObject();
    targetNodeIndex = targetJson.value(KEY_NODE).toInt();
    targetProperty = targetJson.value(KEY_PATH).toString();
}

GLTFImporter::Sampler::Sampler()
    : inputAccessorIndex(-1)
    , outputAccessorIndex(-1)
    , interpolationMode(Linear)
{
}

GLTFImporter::Sampler::Sampler(const QJsonObject &json)
    : inputAccessorIndex(json.value(KEY_INPUT).toInt())
    , outputAccessorIndex(json.value(KEY_OUTPUT).toInt())
    , interpolationMode(Linear)
{
    const auto interpolation = json.value(KEY_INTERPOLATION).toString();
    if (interpolation == QLatin1String("LINEAR"))
        interpolationMode = Linear;
    else if (interpolation == QLatin1String("STEP"))
        interpolationMode = Step;
    else if (interpolation == QLatin1String("CATMULLROMSPLINE"))
        interpolationMode = CatmullRomSpline;
    else if (interpolation == QLatin1String("CUBICSPLINE"))
        interpolationMode = CubicSpline;
}

QString GLTFImporter::Sampler::interpolationModeString() const
{
    switch (interpolationMode) {
    case Linear: return QLatin1String("LINEAR");
    case Step: return QLatin1String("STEP");
    case CatmullRomSpline: return QLatin1String("CATMULLROMSPLINE");
    case CubicSpline: return QLatin1String("CUBICSPLINE");
    }

    return QLatin1String("Unknown");
}

GLTFImporter::Animation::Animation()
    : name()
    , channels()
    , samplers()
{
}

GLTFImporter::Animation::Animation(const QJsonObject &json)
    : name(json.value(KEY_NAME).toString())
{
    QJsonArray channelsArray = json.value(KEY_CHANNELS).toArray();
    channels.reserve(channelsArray.size());
    for (const auto channelValue : channelsArray) {
        Channel channel(channelValue.toObject());
        channels.push_back(channel);
    }

    QJsonArray samplersArray = json.value(KEY_SAMPLERS).toArray();
    samplers.reserve(samplersArray.size());
    for (const auto samplerValue : samplersArray) {
        Sampler sampler(samplerValue.toObject());
        samplers.push_back(sampler);
    }
}

GLTFImporter::Node::Node()
    : localTransform()
    , childNodeIndices()
    , name()
    , parentNodeIndex(-1)
    , cameraIndex(-1)
    , meshIndex(-1)
    , skinIndex(-1)
{
}

GLTFImporter::Node::Node(const QJsonObject &json)
    : localTransform()
    , childNodeIndices()
    , name(json.value(KEY_NAME).toString())
    , parentNodeIndex(-1)
    , cameraIndex(-1)
    , meshIndex(-1)
    , skinIndex(-1)
{
    // Child nodes - we setup the parent links in a later pass
    QJsonArray childNodes = json.value(KEY_CHILDREN).toArray();
    childNodeIndices.reserve(childNodes.size());
    for (const auto childNodeValue : childNodes)
        childNodeIndices.push_back(childNodeValue.toInt());

    // Local transform - matrix or scale, rotation, translation
    const auto matrixValue =


bl_result, diameter_size, sigma_color, sigma_space)
                    else:

                        if scene.TLM_SceneProperties.tlm_filtering_median_kernel % 2 == 0:
                            kernel_size = (scene.TLM_SceneProperties.tlm_filtering_median_kernel + 1 , scene.TLM_SceneProperties.tlm_filtering_median_kernel + 1)
                        else:
                            kernel_size = (scene.TLM_SceneProperties.tlm_filtering_median_kernel, scene.TLM_SceneProperties.tlm_filtering_median_kernel)

                        opencv_bl_result = cv2.medianBlur(opencv_process_image, kernel_size[0])
                        if scene.TLM_SceneProperties.tlm_filtering_iterations > 1:
                            for x in range(scene.TLM_SceneProperties.tlm_filtering_iterations):
                                opencv_bl_result = cv2.medianBlur(opencv_bl_result, kernel_size[0])

                    filter_file_output = os.path.join(lightmap_dir, file[:-file_split] + "_filtered.hdr")

                    cv2.imwrite(filter_file_output, opencv_bl_result)

                    if bpy.context.scene.TLM_SceneProperties.tlm_verbose:
                        print("Written to: " + filter_file_output)


v0.Aux = sym
		v0.AddArg(ptr)
		v0.AddArg(idx)
		v0.AddArg(mem)
		return true
	}
	// match: (MOVBQZX (ANDLconst [c] x))
	// cond:
	// result: (ANDLconst [c & 0xff] x)
	for {
		v_0 := v.Args[0]
		if v_0.Op != OpAMD64ANDLconst {
			break
		}
		c := v_0.AuxInt
		x := v_0.Args[0]
		v.reset(OpAMD64ANDLconst)
		v.AuxInt = c & 0xff
		v.AddArg(x)
		return true
	}
	return false
}
func rewriteValueAMD64_OpAMD64MOVBload(v *Value, config *Config) bool {
	b := v.Block
	_ = b
	// match: (MOVBload [off] {sym} ptr (MOVBstore [off2] {sym2} ptr2 x _))
	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
	// result: x
	for {
		off := v.AuxInt
		sym := v.Aux
		ptr := v.Args[0]
		v_1 := v.Args[1]
		if v_1.Op != OpAMD64MOVBstore {
			break
		}
		off2 := v_1.AuxInt
		sym2 := v_1.Aux
		ptr2 := v_1.Args[0]
		x := v_1.Args[1]
		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
			break
		}
		v.reset(OpCopy)
		v.Type = x.Type
		v.AddArg(x)
		return true
	}
	// match: (MOVBload  [off1] {sym} (ADDQconst [off2] ptr) mem)
	// cond: is32Bit(off1+off2)
	// result: (MOVBload  [off1+off2] {sym} ptr mem)
	for {
		off1 := v.AuxInt
		sym := v.Aux
		v_0 := v.Args[0]
		if v_0.Op != OpAMD64ADDQconst {
			break
		}
		off2 := v_0.AuxInt
		ptr := v_0.Args[0]
		mem := v.Args[1]
		if !(is32Bit(off1 + off2)) {
			break
		}
		v.reset(OpAMD64MOVBload)
		v.AuxInt = off1 + off2
		v.Aux = sym
		v.AddArg(ptr)
		v.AddArg(mem)
		return true
	}
	// match: (MOVBload  [off1] {sym1} (LEAQ [off2] {sym2} base) mem)
	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
	// result: (MOVBload  [off1+off2] {mergeSym(sym1,sym2)} base mem)
	for {
		off1 := v.AuxInt
		sym1 := v.Aux
		v_0 := v.Args[0]
		if v_0.Op != OpAMD64LEAQ {
			break
		}
		off2 := v_0.AuxInt
		sym2 := v_0.Aux
		base := v_0.Args[0]
		mem := v.Args[1]
		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
			break
		}
		v.reset(OpAMD64MOVBload)
		v.AuxInt = off1 + off2
		v.Aux = mergeSym(sym1, sym2)
		v.AddArg(base)
		v.AddArg(mem)
		return true
	}
	// match: (MOV


vQkFBb0I7WUFDcEJwQixjQUFjdUIsTUFBTSxDQUFDdkIsY0FBY3dCLE9BQU8sQ0FBQ0wseUJBQXlCO1lBQ3BFbEIsa0JBQWtCc0IsTUFBTSxDQUN0QnRCLGtCQUFrQnVCLE9BQU8sQ0FBQ0osNkJBQzFCO1FBRUo7SUFDRixHQUFHO1FBQUNEO1FBQXdCQztLQUEyQjtBQUN6RCIsInNvdXJjZXMiOlsid2VicGFjazovL2FnZW50Z3JhcGgtc3R1ZGlvLXVpLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9jbGllbnQvY29tcG9uZW50cy9yZWFjdC1kZXYtb3ZlcmxheS9pbnRlcm5hbC9oZWxwZXJzL3VzZS1lcnJvci1oYW5kbGVyLnRzPzBhN2IiXSwibmFtZXMiOlsidXNlRXJyb3JIYW5kbGVyIiwiRXJyb3IiLCJzdGFja1RyYWNlTGltaXQiLCJlIiwiaGFzSHlkcmF0aW9uRXJyb3IiLCJlcnJvclF1ZXVlIiwicmVqZWN0aW9uUXVldWUiLCJlcnJvckhhbmRsZXJzIiwicmVqZWN0aW9uSGFuZGxlcnMiLCJ3aW5kb3ciLCJhZGRFdmVudExpc3RlbmVyIiwiZXYiLCJpc05leHRSb3V0ZXJFcnJvciIsImVycm9yIiwicHJldmVudERlZmF1bHQiLCJzdGFjayIsImlzQ2F1c2VkQnlIeWRyYXRpb25GYWlsdXJlIiwiaXNIeWRyYXRpb25FcnJvciIsIm1lc3NhZ2UiLCJpbmNsdWRlcyIsImh5ZHJhdGlvbkVycm9yU3RhdGUiLCJ3YXJuaW5nIiwiZGV0YWlscyIsInB1c2giLCJoYW5kbGVyIiwicmVhc29uIiwiaGFuZGxlT25VbmhhbmRsZWRFcnJvciIsImhhbmRsZU9uVW5oYW5kbGVkUmVqZWN0aW9uIiwidXNlRWZmZWN0IiwiZm9yRWFjaCIsInNwbGljZSIsImluZGV4T2YiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(ssr)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-error-handler.js\n");

/***/ }),

/***/ "(ssr)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-open-in-editor.js":
/*!***********************************************************************************************************!*\
  !*** ./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/use-open-in-editor.js ***!
  \***********************************************************************************************************/
/***/ ((module, exports, __webpack_require__) => {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", ({\n    value: true\n}));\nObject.defineProperty(exports, \"useOpenInEditor\", ({\n    enumerable: true,\n    get: function() {\n        return useOpenInEditor;\n    }\n}));\nconst _react = __webpack_require__(/*! react */ \"(ssr)/./node_modules/next/dist/server/future/route-modules/app-page/vendored/ssr/react.js\");\nfunction


f04e1443db27425e0e5f142",
            "platform":"Linux/g++",
            "buildTime":"20220815 17:44:59"
        },
        "chainID":"chain0",
        "groupID":"group0",
        "smCryptoType":false,
        "isSerialExecute":false,
        "nodeID":"07844e249ca404fd54ac9f430cbc0dde9c23ca28e872f1d1bafd974aae6149bc3d0442a4b278873830c0f0642cbde3fda4884cec508b1bc64c56ad23f4256d0a",
        "nodeName":"07844e249ca404fd54ac9f430cbc0dde9c23ca28e872f1d1bafd974aae6149bc3d0442a4b278873830c0f0642cbde3fda4884cec508b1bc64c56ad23f4256d0a",
        "rpcServiceName":"",
        "gatewayServiceName":"",
        "authCheck":false,
        "isWasm":false,
        "isAuthCheck":false
    },
    "name":"07844e249ca404fd54ac9f430cbc0dde9c23ca28e872f1d1bafd974aae6149bc3d0442a4b278873830c0f0642cbde3fda4884cec508b1bc64c56ad23f4256d0a",
    "serviceInfoList":null,
    "protocol":{
        "compatibilityVersion":50331648,
        "minSupportedVersion":0,
        "maxSupportedVersion":1
    }
}
```

## 权限操作命令

权限治理操作命令分为：查询权限治理状态命令、治理委员专用命令、合约管理员专用命令。

### 1. 查询权限治理命令

该种类的命令没有权限控制，所有账户均可访问。

#### 1.1. getCommitteeInfo

在初始化时，将会部署一个治理委员，该治理委员的地址信息在 build_chain.sh时自动生成或者指定。初始化只有一个委员，并且委员的权重为1

```shell
[group0]: /apps> getCommitteeInfo
---------------------------------------------------------------------------------------------
Committee address   : 0xcbc22a496c810dde3fa53c72f575ed024789b2cc
ProposalMgr address : 0xa0974646d4462913a36c986ea260567cf471db1f
---------------------------------------------------------------------------------------------
ParticipatesRate: 0% , WinRate: 0%
---------------------------------------------------------------------------------------------
Governor Address                                        | Weight
index0 : 0x7fb008862ff69353a02ddabbc6cb7dc31683d0f6     | 1
```

#### 1.2. getProposalInfo

批量获取某个特定范围内的提案信息，若只输入单个ID则返回单个ID的提案信息。

`proposalType` 和  `status` 可以看到提案的类型和状态

proposalType分为以下几种：

- setWeight：当治理委员发起updateGovernorProposal 提案时会生成
- setRate：setRateProposal 提案会生成
- setDeployAuthType：setDeployAuthTypeProposal 提案会生成
- modifyDeployAuth：openDeployAuthProposal 和closeDeployAuthProposal 提案会生成
- resetAdmin：resetAdminProposal 提案会生成
- setConfig: setSysConfigProposal 提案会生成
- setNodeWeight: addObserverProposal、addSealerProposal、setConsensusNodeWeightProposal 提案生成
- removeNode：removeNodeProposal 提案生成
- unknown：这个类型出现时，有可能是有bug

stat


import pygame
import math
import time
import os

# current_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
# if current_time > "2024-06-06 13:00":
#     # 结束整个程序
#     os._exit(0)

# 初始化Pygame
pygame.init()

# 定义屏幕尺寸和画板尺寸
SCREEN_WIDTH, SCREEN_HEIGHT = 800, 600
DRAWING_AREA_WIDTH, DRAWING_AREA_HEIGHT = 600, 400
DRAWING_AREA_POS = (100, 100)
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
pygame.display.set_caption("密铺设计游戏")

# 颜色定义
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)
YELLOW = (255, 255, 0)
DRAWING_AREA_COLOR = (200, 200, 200)

# 形状类定义
class Shape:
    def __init__(self, vertices, color):
        self.vertices = vertices
        self.color = color
        self.selected = False
        self.angle = 0

    def draw(self, screen):
        rotated_vertices = self.get_rotated_vertices()
        pygame.draw.polygon(screen, self.color, rotated_vertices)

    def get_rotated_vertices(self):
        cx, cy = self.get_center()
        rotated_vertices = []
        for x, y in self.vertices:
            x -= cx
            y -= cy
            new_x = x * math.cos(self.angle) - y * math.sin(self.angle)
            new_y = x * math.sin(self.angle) + y * math.cos(self.angle)
            rotated_vertices.append((new_x + cx, new_y + cy))
        return rotated_vertices

    def get_center(self):
        xs, ys = zip(*self.vertices)
        return sum(xs) / len(xs), sum(ys) / len(ys)

    def move(self, dx, dy):
        self.vertices = [(x + dx, y + dy) for x, y in self.vertices]
        if not self.is_inside_drawing_area():
            self.vertices = [(x - dx, y - dy) for x, y in self.vertices]

    def rotate(self, angle):
        self.angle += angle
        if not self.is_inside_drawing_area():
            self.angle -= angle

    def is_point_inside(self, point):
        return pygame.draw.polygon(screen, self.color, self.vertices).collidepoint(point)

    def is_inside_drawing_area(self):
        rotated_vertices = self.get_rotated_vertices()
        min_x = min(v[0] for v in rotated_vertices)
        max_x = max(v[0] for v in rotated_vertices)
        min_y = min(v[1] for v in rotated_vertices)
        max_y = max(v[1] for v in rotated_vertices)
        return (DRAWING_AREA_POS[0] <= min_x <= max_x <= DRAWING_AREA_POS[0] + DRAWING_AREA_WIDTH and
                DRAWING_AREA_POS[1] <= min_y <= max_y <= DRAWING_AREA_POS[1] + DRAWING_AREA_HEIGHT)

def create_regular_polygon_with_equal_sides(sides, side_length, position):
        angle = math.pi * 2 / sides
        radius = side_length / (2 * math.sin(math.pi / sides))
        vertices = [
            (position[0] + math.cos(i * angle) * radius,
             position[1] + math.sin(i * angle) * radius)
            for i in range(sides)
        ]
        return vertices

def create_regular_polygon(sides, radius, position):
    angle = math.pi * 2 / sides
    vertices = [
        (position[0] + math.cos(i * angle) * radius,
         position[1] + math.sin(i * angle) * radius)
        for i in range(sides)
    ]
    return vertices

# 创建形状列表
# 创建形状列表
shapes = [
    Shape(create_regular_polygon_with_equal_sides(3, 50, (150, 150)), RED),
    Shape(create_regular_polygon_with_equal_sides(4, 50, (250, 150)), GREEN),
    Shape(create_regular_polygon_with_equal_sides(5, 50, (350, 150)), BLUE),
    Shape(create_regular_polygon_with_equal_sides(6, 50, (450, 150)), BLACK),
]

# 游戏主循环
running = True
selected_shape = None
while running:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False

        elif event.type == pygame.MOUSEBUTTONDOWN:
            if event.button == 1:  # 左键选择形状
                for shape in shapes:
                    if shape.is_point_inside(event.pos):
                        selected_shape = shape
                        shape.selected = True
                        break

            elif event.button == 3:  # 右键删除形状
                for shape in shapes:
                    if shape.is_point_inside(event.pos):
                        shapes.remove(shape)
                        break

        elif event.type == pygame.MOUSEBUTTONUP:
            if event.button == 1 and selected_shape:  # 左键释放
                selected_shape.selected = False
                selected_shape = None

        elif event.type == pygame.KEYDOWN:
            if event.key == pygame.K_r and selected_shape:
                selected_shape.rotate(math.pi / 48)


),
      ),
    );
  }

}
import 'package:flutter/material.dart';
import 'package:flutter_deer/res/resources.dart';
import 'package:flutter_deer/routers/fluro_navigator.dart';
import 'package:flutter_deer/routers/routers.dart';
import 'package:flutter_deer/widgets/load_image.dart';
import 'package:flutter_deer/widgets/my_app_bar.dart';
import 'package:flutter_deer/widgets/my_button.dart';

/// design/2店铺审核/index.html#artboard2
class StoreAuditResultPage extends StatefulWidget {

  const StoreAuditResultPage({super.key});

  @override
  _StoreAuditResultPageState createState() => _StoreAuditResultPageState();
}

class _StoreAuditResultPageState extends State<StoreAuditResultPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: const MyAppBar(
        title: '审核结果',
      ),
      body: Padding(
        padding: const EdgeInsets.all(16.0),
        child: Column(
          children: <Widget>[
            Gaps.vGap50,
            const LoadAssetImage('store/icon_success',
              width: 80.0,
              height: 80.0,
            ),
            Gaps.vGap12,
            const Text(
              '恭喜，店铺资料审核成功',
              style: TextStyles.textSize16,
            ),
            Gaps.vGap8,
            Text(
              '2021-02-21 15:20:10',
              style: Theme.of(context).textTheme.titleSmall,
            ),
            Gaps.vGap8,
            Text(
              '预计完成时间：02月28日',
              style: Theme.of(context).textTheme.titleSmall,
            ),
            Gaps.vGap24,
            MyButton(
              onPressed: () {
                NavigatorUtils.push(context, Routes.home, clearStack: true);
              },
              text: '进入',
            )
          ],
        ),
      ),
    );
  }
}
import 'dart:math';

import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_deer/res/resources.dart';
import 'package:flutter_deer/statistics/widgets/selected_date.dart';
import 'package:flutter_deer/util/date_utils.dart' as date;
import 'package:flutter_deer/util/image_utils.dart';
import 'package:flutter_deer/util/theme_utils.dart';
import 'package:flutter_deer/widgets/bezier_chart/bezier_chart.dart';
import 'package:flutter_deer/widgets/load_image.dart';
import 'package:flutter_deer/widgets/my_app_bar.dart';
import 'package:flutter_deer/widgets/my_card.dart';

/// design/5统计/index.html#artboard1
/// design/5统计/index.html#artboard6
class OrderStatisticsPage extends StatefulWidget {

  const OrderStatisticsPage(this.index, {super.key});

  final int index;

  @override
  _OrderStatisticsPageState createState() => _OrderStatisticsPageState();
}

class _OrderStatisticsPageState extends State<OrderStatisticsPage> with TickerProviderStateMixin {

  int _selectedIndex = 2;
  late DateTime _initialDay;
  late Iterable<DateTime> _weeksDays;
  late List<DateTime> _currentMonthsDays;
  // 周视图中选择的日期
  late int _selectedWeekDay;
  // 月视图中选择的日期
  late DateTime _selectedDay;
  // 年视图中选择的月份
  late int _selectedMonth;
  final List<int> _monthList = [];
  bool _isExpanded = true;
  late Color _unSelectedTextColor;

  static const List<String> _weeks = ['周一', '周二', '周三', '周四', '周五', '周六', '周日'];

  @override


last-child {
  margin-top: 6rem;
}

.last-child\:mr-24:last-child {
  margin-right: 6rem;
}

.last-child\:mb-24:last-child {
  margin-bottom: 6rem;
}

.last-child\:ml-24:last-child {
  margin-left: 6rem;
}

.last-child\:mt-32:last-child {
  margin-top: 8rem;
}

.last-child\:mr-32:last-child {
  margin-right: 8rem;
}

.last-child\:mb-32:last-child {
  margin-bottom: 8rem;
}

.last-child\:ml-32:last-child {
  margin-left: 8rem;
}

.last-child\:mt-auto:last-child {
  margin-top: auto;
}

.last-child\:mr-auto:last-child {
  margin-right: auto;
}

.last-child\:mb-auto:last-child {
  margin-bottom: auto;
}

.last-child\:ml-auto:last-child {
  margin-left: auto;
}

.last-child\:mt-px:last-child {
  margin-top: 1px;
}

.last-child\:mr-px:last-child {
  margin-right: 1px;
}

.last-child\:mb-px:last-child {
  margin-bottom: 1px;
}

.last-child\:ml-px:last-child {
  margin-left: 1px;
}

.last-child\:mt-header:last-child {
  margin-top: 60px;
}

.last-child\:mr-header:last-child {
  margin-right: 60px;
}

.last-child\:mb-header:last-child {
  margin-bottom: 60px;
}

.last-child\:ml-header:last-child {
  margin-left: 60px;
}

.max-h-0 {
  max-height: 0;
}

.max-h-100 {
  max-height: 100px;
}

.max-h-150 {
  max-height: 150px;
}

.max-h-200 {
  max-height: 200px;
}

.max-h-250 {
  max-height: 250px;
}

.max-h-300 {
  max-height: 300px;
}

.max-h-500 {
  max-height: 500px;
}

.max-h-700 {
  max-height: 700px;
}

.max-h-full {
  max-height: 100%;
}

.max-h-screen {
  max-height: 100vh;
}

.max-h-1\/5 {
  max-height: 20%;
}

.max-h-1\/4 {
  max-height: 25%;
}

.max-h-1\/3 {
  max-height: 33.3333%;
}

.max-h-1\/2 {
  max-height: 50%;
}

.max-h-2\/3 {
  max-height: 66.6666%;
}

.max-h-3\/4 {
  max-height: 75%;
}

.max-w-150 {
  max-width: 150px;
}

.max-w-200 {
  max-width: 200px;
}

.max-w-250 {
  max-width: 250px;
}

.max-w-300 {
  max-width: 300px;
}

.m


矩阵索引。
     * @returns {VertexElementUsage}
     */
    static get BlendIndices(): VertexElementUsage

    /**
     * 混合权重数据。（BlendWeight 的 UsageIndex 为 0）指定固定功能顶点处理中的混合权重。
     * @returns {VertexElementUsage}
     */
    static get BlendWeight(): VertexElementUsage

    /**
     * 包含漫反射或镜面反射颜色的顶点数据。（Color 的 UsageIndex 为 0）指定固定功能顶点着色器和像素着色器（ps_3_0 之前的版本）中的漫反射颜色。（Color 的 UsageIndex 为 1）指定固定功能顶点着色器和像素着色器（ps_3_0 之前）中的镜面反射颜色。
     * @returns {VertexElementUsage}
     */
    static get Color(): VertexElementUsage

    /**
     * 顶点数据包含深度数据。
     * @returns {VertexElementUsage}
     */
    static get Depth(): VertexElementUsage

    /**
     * 顶点数据包含雾化数据。（Fog 的 UsageIndex 为 0）指定像素着色完成后要使用的雾化混合值。此标志适用于 ps_3_0 之前版本的像素着色器。
     * @returns {VertexElementUsage}
     */
    static get Fog(): VertexElementUsage

    /**
     * 顶点法线数据。（Normal 的 UsageIndex 为 0）指定固定功能顶点处理和 N-patch 嵌入器的顶点法线。（法线的 UsageIndex 这 1）指定蒙皮的固定功能顶点处理的顶点法线。
     * @returns {VertexElementUsage}
     */
    static get Normal(): VertexElementUsage

    /**
     * 磅值数据。（PointSize 的 UsageIndex 为 0）指定磅值属性，光栅器安装引擎所使用该属性将一个点扩展为一个四元组以实现点式 sprite 功能。
     * @returns {VertexElementUsage}
     */
    static get PointSize(): VertexElementUsage

    /**
     * 位置数据。（Position 的 UsageIndex 为 0）指定固定功能顶点处理和 N-patch 嵌入器中未变换的位置。（Position 的 UsageIndex 为 1）指定蒙皮的固定功能顶点着色器中未变换的位置。
     * @returns {VertexElementUsage}
     */
    static get Position(): VertexElementUsage

    /**
     * 顶点数据包含采样器数据。（Sample 的 UsageIndex 为 0）指定要查找的替换值。
     * @returns {VertexElementUsage}
     */
    static get Sample(): VertexElementUsage

    /**
     * 顶点切线数据。
     * @returns {VertexElementUsage}
     */
    static get Tangent(): VertexElementUsage

    /**
     * 单精度正浮点值。（TessellateFactor 的 UsageIndex 为 0）指定嵌入单元中用来控制嵌入比率的嵌入因素。
     * @returns {VertexElementUsage}
     */
    static get TessellateFactor(): VertexElementUsage

    /**
     * 纹理坐标数据。(TextureCoordinate, n) 指定固定功能顶点处理和像素着色器（ps_3_0 之前的版本）中的纹理坐标。这些坐标可以用来传送用户定义的数据。
     * @returns {VertexElementUsage}
     */
    static get TextureCoordinate(): VertexElementUsage
}

export default VertexElementUsage;import { Action, ActionCreator } from 'redux';

export const SELECT_PRESET = 'SELECT_PRESET';

export interface SelectPresetAction extends Action {
  type: typeof SELECT_PRESET;
  value: string;
}

export const selectPreset: ActionCreator<SelectPresetAction> = value => ({
  value,
  type: SELECT_PRESET,
});

import * as ActionTypes from "./i18n-


141q-10 10 -10 23t10 23l141 141q28 28 68 28h512v192h256v-192h576z\" />\n<glyph unicode=\"\" horiz-adv-x=\"2048\" d=\"M2020 1525q28 -20 28 -53v-1408q0 -20 -11 -36t-29 -23l-640 -256q-24 -11 -48 0l-616 246l-616 -246q-10 -5 -24 -5q-19 0 -36 11q-28 20 -28 53v1408q0 20 11 36t29 23l640 256q24 11 48 0l616 -246l616 246q32 13 60 -6zM736 1390v-1270l576 -230v1270zM128 1173 v-1270l544 217v1270zM1920 107v1270l-544 -217v-1270z\" />\n<glyph unicode=\"\" horiz-adv-x=\"1792\" d=\"M512 1536q13 0 22.5 -9.5t9.5 -22.5v-1472q0 -20 -17 -28l-480 -256q-7 -4 -15 -4q-13 0 -22.5 9.5t-9.5 22.5v1472q0 20 17 28l480 256q7 4 15 4zM1760 1536q13 0 22.5 -9.5t9.5 -22.5v-1472q0 -20 -17 -28l-480 -256q-7 -4 -15 -4q-13 0 -22.5 9.5t-9.5 22.5v1472 q0 20 17 28l480 256q7 4 15 4zM640 1536q8 0 14 -3l512 -256q18 -10 18 -29v-1472q0 -13 -9.5 -22.5t-22.5 -9.5q-8 0 -14 3l-512 256q-18 10 -18 29v1472q0 13 9.5 22.5t22.5 9.5z\" />\n<glyph unicode=\"\" horiz-adv-x=\"1792\" d=\"M640 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1408 640q0 53 -37.5 90.5t-90.5 37.5 t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-110 0 -211 18q-173 -173 -435 -229q-52 -10 -86 -13q-12 -1 -22 6t-13 18q-4 15 20 37q5 5 23.5 21.5t25.5 23.5t23.5 25.5t24 31.5t20.5 37 t20 48t14.5 57.5t12.5 72.5q-146 90 -229.5 216.5t-83.5 269.5q0 174 120 321.5t326 233t450 85.5t450 -85.5t326 -233t120 -321.5z\" />\n<glyph unicode=\"\" horiz-adv-x=\"1792\" d=\"M640 640q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1024 640q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.


"Wbc=[%0.4f, %0.4f, %0.4f]", Wbc(0),
                                     Wbc(1), Wbc(2)),
              cv::Point(hspace, vspace * ++line_counter), CV_FONT_HERSHEY_PLAIN, font_scale,
              kColorLakeBlue, thickness);

  auto Wsg{X.Rsg.log()};
  cv::putText(disp_, StrFormat("Wsg=[%0.4f, %0.4f, %0.4f]", Wsg(0),
                                      Wsg(1), Wsg(2)),
              cv::Point(hspace, vspace * ++line_counter), CV_FONT_HERSHEY_PLAIN, font_scale,
              kColorLakeBlue, thickness);

  if (print_bias_info) {
    cv::putText(disp_, StrFormat("bg=[%0.4f, %0.4f, %0.4f]", X.bg(0),
          X.bg(1), X.bg(2)),
        cv::Point(hspace, vspace * ++line_counter), CV_FONT_HERSHEY_PLAIN, font_scale,
        kColorLakeBlue, thickness);

    cv::putText(disp_, StrFormat("ba=[%0.4f, %0.4f, %0.4f]", X.ba(0),
          X.ba(1), X.ba(2)),
        cv::Point(hspace, vspace * ++line_counter), CV_FONT_HERSHEY_PLAIN, font_scale,
        kColorLakeBlue, thickness);
  }

#ifdef USE_ONLINE_TEMPORAL_CALIB
  cv::putText(disp_, StrFormat("td=%0.4f", X.td),
      cv::Point(hspace, vspace * ++line_counter), CV_FONT_HERSHEY_PLAIN, font_scale,
      kColorLakeBlue, thickness);
#endif

#ifdef USE_ONLINE_IMU_CALIB
  cv::putText(disp_, StrFormat("Ca=[[%0.4f, %0.4f, %0.4f]", IMU.Ca(0,0),
                               IMU.Ca(0,1), IMU.Ca(0,2)),
      cv::Point(hspace, vspace * ++line_counter), CV_FONT_HERSHEY_PLAIN, font_scale,
      kColorLakeBlue, thickness);

  cv::putText(disp_, StrFormat("    [%0.4f, %0.4f, %0.4f]", IMU.Ca(1,0),
                               IMU.Ca(1,1), IMU.Ca(1,2)),
      cv::Point(hspace, vspace * ++line_counter), CV_FONT_HERSHEY_PLAIN, font_scale,
      kColorLakeBlue, thickness);

  cv::putText(disp_, StrFormat("    [%0.4f, %0.4f, %0.4f]]", IMU.Ca(2,0),
                               IMU.Ca(2,1), IMU.Ca(2,2)),
      cv::Point(hspace, vspace * ++line_counter), CV_FONT_HERSHEY_PLAIN, font_scale,
      kColorLakeBlue, thickness);

  cv::putText(disp_, StrFormat("Cg=[[%0.4f, %0.4f, %0.4f]", IMU.Cg(0,0),
                               IMU.Cg(0,1), IMU.Cg(0,2)),
      cv::Point(hspace, vspace * ++line_counter), CV_FONT_HERSHEY_PLAIN, font_scale,
      kColorLakeBlue, thickness);

  cv::putText(disp_, StrFormat("    [%0.4f, %0.4f, %0.4f]", IMU.Cg(1,0),
                               IMU.Cg(1,1), IMU.Cg(1,2)),
      cv::Point(hspace, vspace * ++line_counter), CV_FONT_HERSHEY_PLAIN, font_scale,
      kColorLakeBlue, thickness);

  cv::putText(disp_, StrFormat("    [%0.4f, %0.4f, %0.4f]]", IMU.Cg(2,


  private val logger = LoggerFactory.getLogger(QualityUrlUtils::class.java)

    fun getCodeCCUrl(
        projectId: String,
        pipelineId: String,
        buildId: String,
        detail: String?,
        client: Client,
        logPrompt: String?
    ): String {
        val variable = client.get(ServiceVarResource::class).getBuildVar(
            projectId = projectId,
            pipelineId = pipelineId,
            buildId = buildId,
            varName = CodeccUtils.BK_CI_CODECC_TASK_ID
        ).data
        var taskId = variable?.get(CodeccUtils.BK_CI_CODECC_TASK_ID)

        return if (detail.isNullOrBlank() || detail!!.split(",").size > 1) {
            "http://$codeccHost/codecc/$projectId/task/$taskId/detail?buildId=$buildId"
        } else {
            var detailValue = logPrompt
            if (detailValue.isNullOrBlank()) {
                detailValue = codeccToolUrlPathMap[detail] ?: DEFAULT_CODECC_URL
            }
            val fillDetailUrl = detailValue.replace("##projectId##", projectId)
                .replace("##taskId##", taskId.toString())
                .replace("##buildId##", buildId)
                .replace("##detail##", detail)
            "http://$codeccHost$fillDetailUrl"
        }
    }
}
/*
 * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
 *
 * Copyright (C) 2019 Tencent.  All rights reserved.
 *
 * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
 *
 * A copy of the MIT License is included in this file.
 *
 *
 * Terms of the MIT License:
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
 * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

package com.tencent.devops.quality.cron

import com.tencent.devops.common.redis.RedisLock
import com.tencent.devops.common.redis.RedisOperation
import com.tencent.devops.quality.dao.v2.QualityRuleBuildHisDao
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.annotation.Value
import org.springframework.scheduling.annotation.Scheduled
import org.springframework.stereotype.Component

@Suppress("ALL")
@Component
class QualityBuildHisJob @Autowired constructor(
    private val qualityRuleBuildHisDao: QualityRuleBuildHisDao,
    private val redisOperation: RedisOperation
) {

    private val logger = LoggerFactory.getLogger(QualityBuildHisJob::class.java)

    @Value("\${quality.buildHis.clean.timeGap:15}")
    var cleanTimeGapDay: Long = 12

    @Value("\${quality.buildHis.clean.enable:#{false}}")
    val cleanEnable: Boolean = false

    @Scheduled(cron = "0 0 6 * * ?")
    fun clean() {
        if (!cleanEnable) {
            logger.info("quality buildHis daily clean disabled


Mechanic.Out;
                _activation = Module.CastFinishAt(spell);
                break;
        }
    }

    public override void OnCastFinished(Actor caster, ActorCastInfo spell)
    {
        switch ((AID)spell.Action.ID)
        {
            case AID.WindShot:
            case AID.EarthenShot:
                ++NumCasts; // we count visual casts, since there's always one per mechanic
                break;
            case AID.WindShotAOE:
            case AID.EarthenShotAOE:
                _mechanic = Mechanic.None;
                if (NumCasts >= 2)
                {
                    NumCasts = 0;
                    _sources.Clear();
                    _activation = default;
                }
                break;
        }
    }
}

class SeedCrystals(BossModule module) : Components.SpreadFromCastTargets(module, AID.SeedCrystalsAOE, 6);
class CrystallineDebris(BossModule module) : Components.Adds(module, (uint)OID.CrystallineDebris)
{
    public override void AddHints(int slot, Actor actor, TextHints hints)
    {
        if (ActiveActors.Any())
            hints.Add("Break debris!");
    }

    public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints)
    {
        hints.PrioritizeTargetsByOID(OID.CrystallineDebris, 1);
    }

    public override void DrawArenaForeground(int pcSlot, Actor pc)


.netflix.com/tudum/top10/tv?week=2023-04-23">最も視聴された番組でした。Netflix、プライム・ビデオ、HBO/Maxは週末に人気がありました。

プライム・ビデオの人気は年初の方が高く、『トップガン マーヴェリック』が公開された週末の3月26日に50位を記録しました。

HBO/Maxは9月以降、総合ランキングで順位を落としていますが、トップ100には残っています。

NBCのストリーミングサービスであるPeacockは、10月の111位がピークで、日曜日により人気がありました。

Paramount+は総合ランキングで順位を下げており、11月には156位まで落ちています。これも日曜日により人気がありました。

ニュース：GloboとBBCのグローバルな視点

パンデミック、戦争、金融不安などの特に危機的な状況下では、世界中の報道機関が世間に情報を提供する上で重要な役割を果たしています。このことを念頭に置きながら、報道機関のランキングは、いくつかのニュースに値する傾向も浮き彫りにしています。

2023年ニュースサービストップ10

Globo

BBC

Foxニュース

CNN

NYタイムズ

デイリー・メール

ワシントン・ポスト

ガーディアン

NPR

ウォール・ストリート・ジャーナル

昨年は、BBCとGloboがこの部門で同率1位でした。2023年は、南米で人気のブラジルのメディア複合企業である「Globo」が常に1位で、英国の国営放送「BBC」がそれに続きました。唯一の例外は6月20日で、BBCが1位でした。これは6月18日の潜水艇タイタンの爆発事故と重なり、翌週も世界的なニュースとして最も取り上げられました。

	<figure class="kg-card kg-image-card kg-width-w


.\d{3}[-+]\d+$"));

    let generated2 = Generator::DateTime(Some("yyyy-MM-dd HH:mm:ssZ".into())).generate_value(&"".to_string(), &hashmap!{});
    assert_that!(generated2.unwrap(), matches_regex(r"^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}[-+]\d+$"));
  }

  #[test]
  fn regex_generator_test() {
    let generated = Generator::Regex(r"\d{4}\w{1,4}".into()).generate_value(&"".to_string(), &hashmap!{});
    assert_that!(generated.unwrap(), matches_regex(r"^\d{4}\w{1,4}$"));

    let generated = Generator::Regex(r"\d{1,2}/\d{1,2}".into()).generate_value(&"".to_string(), &hashmap!{});
    assert_that!(generated.unwrap(), matches_regex(r"^\d{1,2}/\d{1,2}$"));

    let generated = Generator::Regex(r"^\d{1,2}/\d{1,2}$".into()).generate_value(&"".to_string(), &hashmap!{});
    assert_that!(generated.unwrap(), matches_regex(r"^\d{1,2}/\d{1,2}$"));
  }

  #[test]
  fn uuid_generator_test() {
    let generated = Generator::Uuid.generate_value(&"".to_string(), &hashmap!{});
    assert_that!(generated.unwrap(), matches_regex(r"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"));
  }

  #[test]
  fn random_decimal_generator_test() {
    for _ in 1..10 {
      let generated = Generator::RandomDecimal(10).generate_value(&"".to_string(), &hashmap! {}).unwrap();
      expect!(generated.clone().len()).to(be_equal_to(11));
      assert_that!(generated.clone(), matches_regex(r"^\d+\.\d+$"));
      let mut chars = generated.chars();
      let first_char = chars.next().unwrap();
      let second_char = chars.next().unwrap();
      println!("{}: '{}' != '0' || ('{}' == '0' && '{}' == '.')", generated, first_char, first_char, second_char);
      expect!(first_char != '0' || (first_char == '0' && second_char == '.')).to(be_true());
    }
  }

  #[test]
  fn handle_edge_case_when_digits_is_1() {
    let generated = Generator::RandomDecimal(1).generate_value(&"".to_string(), &hashmap! {}).unwrap();
    assert_that!(generated, matches_regex(r"^\d$"));
  }

  #[test]
  fn handle_edge_case_when_digits_is_2() {
    let generated = Generator::RandomDecimal(2).generate_value(&"".to_string(), &hashmap! {}).unwrap();
    assert_that!(generated, matches_regex(r"^\d\.\d$"));
  }

  #[test]
  fn mock_server_url_generator_test() {
    let generator = Generator::MockServerURL("http://localhost:1234/path".into(), ".*(/path)$".into());
    let generated = generator.generate_value(&"".to_string(), &hashmap!{
        "mockServer" => json!({
          "url": "http://192.168.2.1:2345/p",
          "port": 2345
        })
      });
    expect!(generated.unwrap()).to(be_equal_to("http://192.168.2.1:2345/p/path"));
    let generated = generator.generate_value(&"".to_string(), &hashmap!{});
    expect!(generated).to(be_err());
  }

  #[test]
  fn array_contains_generator_test() {
    let


__item{display:inline-block;margin-right:calc(var(--space-xs) / 2);margin-left:calc(var(--space-xs) / 2);vertical-align:top;}.pager__link,.pager__item--current{display:flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:var(--pager-size);height:var(--pager-size);padding-right:var(--space-xs);padding-left:var(--space-xs);text-decoration:none;color:var(--pager-fg-color);border-radius:var(--space-m);background:var(--pager-bg-color);line-height:1;}.pager__link:hover,.pager__link:focus,.pager__link:active{text-decoration:none;}.pager__link:hover,.pager__link.is-active:hover{color:var(--pager-fg-color);background:var(--pager--hover-bg-color);}.pager__link--action-link{border-radius:var(--pager-border-radius--action);}.pager__link.is-active,.pager__item--current{color:var(--pager--active-fg-color);border:var(--pager-border-width) solid transparent;background:var(--pager--active-bg-color);}.pager__item--first .pager__link::before{background-image:url("data:image/svg+xml,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M2 2v12M14 2L8 8l6 6' stroke='%23545560' stroke-width='2'/%3e%3c/svg%3e");}.pager__item--previous .pager__link::before{background-image:url("data:image/svg+xml,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M11 2L5 8l6 6' stroke='%23545560' stroke-width='2'/%3e%3c/svg%3e");}.pager__item--next .pager__link::after{background-image:url("data:image/svg+xml,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5 14l6-6-6-6' stroke='%23545560' stroke-width='2'/%3e%3c/svg%3e");}.pager__item--last .pager__link::after{background-image:url("data:image/svg+xml,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M14 14V2M2 14l6-6-6-6' stroke='%23545560' stroke-width='2'/%3e%3c/svg%3e");}.pager__item--first .pager__link::before,.pager__item--previous .pager__link::before,.pager__item--next .pager__link::after,.pager__item--last .pager__link::after{position:relative;display:inline-block;width:1rem;height:1rem;content:"";background-repeat:no-repeat;background-position:center;}@media (forced-colors:active){.pager__item--first .pager__link::before{-webkit-mask-image:url("data:image/svg+xml,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M2 2v12M14 2L8 8l6 6' stroke='%23545560' stroke-width='2'


roperties")
            val getMethod = clz.getMethod("get", String::class.java, String::class.java
            )
            return (getMethod.invoke(clz, key, "") as String)
        } catch (e:Exception) {
            e.printStackTrace()
        }
        return ""
    }

    /**
     *
     * 判断是哪个运营商
     */
    fun getSimOperatorByMnc(): String {
        val tm = getTelephontManager()
        val operator = tm.simOperator
        return operator?.let {
            when (operator) {
                "46000", "46002", "46007", "46004" -> "中国移动"
                "46001", "46006", "46009" -> "中国联通"
                "46003", "46005", "46011" -> "中国电信"
                else -> operator
            }
        } ?:""
    }

    /**
     *
     * 获取Telephony管理器
     */
    private fun getTelephontManager(): TelephonyManager {
        return getApplicationContext().getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager
    }
}package com.knight.kotlin.library_util.toast

import android.os.Handler
import android.os.Looper
import android.os.Message
import android.view.WindowManager

/**
 * Author:Knight
 * Time:2021/12/17 18:17
 * Description:SafeHandler
 */
class SafeHandler constructor(handler : Handler): Handler(Looper.getMainLooper()) {
    private val mHandler = handler

    @Override
    override fun handleMessage(msg: Message) {
        // 捕获这个异常，避免程序崩溃
        try {
            // 目前发现在 Android 7.1 主线程被阻塞之后弹吐司会导致崩溃，可使用 Thread.sleep(5000) 进行复现
            // 查看源码得知 Google 已经在 Android 8.0 已经修复了此问题
            // 主线程阻塞之后 Toast 也会被阻塞，Toast 因为显示超时导致 Window Token 失效
            mHandler.handleMessage(msg)
        } catch (e: WindowManager.BadTokenException) {
            // android.view.WindowManager$BadTokenException：Unable to add window -- token android.os.BinderProxy is not valid; is your activity running?
            // java.lang.IllegalStateException：View android.widget.TextView has already been added to the window manager.
            e.printStackTrace()
        } catch (e: IllegalStateException) {
            e.printStackTrace()
        }
    }

}package com.knight.kotlin.library_util.toast.style

import android.content.Context
import android.graphics.drawable.Drawable
import android.graphics.drawable.GradientDrawable
import android.os.Build
import android.util.TypedValue
import android.view.Gravity
import android.view.ViewGroup
import android.widget.TextView
import com.knight.kotlin.library_util.toast.callback.IToastStyle

/**
 * Author:Knight
 * Time:2021/12/17 11:20
 * Description:BlackToastStyle
 */
open class BlackToastStyle : IToastStyle<TextView> {
    override fun createView(context: Context): TextView {
        val textView = TextView(context)
        textView.id = android.R.id.message
        textView.gravity = getTextGravity()
        textView.setTextColor(getTextColor())
        textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, getTextSize(context))
        val horizontalPadding = getHorizontalPadding(context)
        val verticalPadding = getVerticalPadding(context)

        //适配布局反方向特性
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
            textView.setPaddingRelative(horizontalPadding, verticalPadding, horizontalPadding, verticalPadding);
        } else {
            textView


/tuple/pop_back.hpp>

#define TUPLE (a, b, c)

BOOST_PP_TUPLE_POP_BACK(TUPLE) // expands to (a, b)

  Copyright Edward Diener 2013

Distributed under the Boost Software License, Version 1.0. (See
          accompanying file LICENSE_1_0.txt
          or copy at www.boost.org/LICENSE_1_0.txt)

    <meta content="text/html; charset=windows-1252" http-equiv="content-type">
    <title>BOOST_PP_TUPLE_INSERT</title>
    <link rel="stylesheet" type="text/css" href="../styles.css">

 The BOOST_PP_TUPLE_INSERT macro
      inserts an element into an tuple.

Usage

 BOOST_PP_TUPLE_INSERT(tuple, i, elem)
      (v)

Arguments

tuple

 The tuple into which an element is to be inserted.

i

 The zero-based position in tuple where an element is to be
        inserted.  Valid values range from 0 to BOOST_PP_TUPLE_SIZE(tuple).

elem

 The element to insert.

Remarks

 This macro inserts elem before the element at index i.

 If the operation attempts to create an tuple that is larger
      than BOOST_PP_LIMIT_TUPLE, the result is undefined.

 This macro uses BOOST_PP_WHILE interally.  Therefore, to
      use the d parameter passed from other macros that use BOOST_PP_WHILE,
      see BOOST_PP_TUPLE_INSERT_D.

See Also

BOOST_PP_TUPLE_INSERT_D

Requirements

 Header:  <boost/preprocessor/tuple/insert.hpp>

Sample Code

#include <boost/preprocessor/tuple/insert.hpp>

#define TUPLE (a, b, d)

BOOST_PP_TUPLE_INSERT(TUPLE, 2, c) // expands to (a, b, c


---
-- @ref https://wiki.facepunch.com/gmod/Entity
-- @class Entity

local entmeta = FindMetaTable("Entity")
if not entmeta then
    return
end

---
-- Checks if the entity is a ragdoll. It also makes sure it is a true ragdoll
-- by checking if it has a player nick name because ragdolls can also be used
-- for props (e.g. a mattress).
-- @return boolean Returns true if it is a true ragdoll
-- @realm shared
function entmeta:IsPlayerRagdoll()
    return self:IsRagdoll() and CORPSE.GetPlayerNick(self, false) ~= false
end

---
-- Returns true if this entity is a default button.
-- @return boolean Returns true if default button
-- @realm shared
function entmeta:IsDefaultButton()
    return butto


d `serde` support to  `linfa-clustering`
 * add accessors for classes in `linfa-logistics`
 * add accessors for `Pca` attributes in `linfa-reduction`
 * add `wasm-bindgen`feature to use linfa in the browser
 * fix covariance update for `GaussianMixtureModel` in `linfa-clustering`
 * bump `ndarray-linalg` to 0.16 and `argmin` to 0.9.0
 * bump MSRV to 1.71.1

Version 0.7.0 - 2023-10-15
==========================
Changes
-----------
 * add `array_from_gz_csv` and `array_from_csv` in `linfa-datasets`
 * make Serde support in `linfa-linear`, `linfa-logistic`, and `linfa-ftrl` optional
 * bump `argmin` to 0.8.1
 * add Serde support to `linfa-preprocessing` and `linfa-bayes`
 * make licenses follow SPDX 2.1 license expression standard

Removals
-----------
 * Removed Approximate DBSCAN from `linfa-clustering` due to performance issues. It's now an alias to regular DBSCAN.
 * Removed `partitions` dependency, which breaks in current versions of Rust.

Version 0.6.1 - 2022-12-03
========================
New Algorithms
-----------
 * Isotonic regression added to `linfa-linear` by [@wildart]
 * Mean absolute percentage error (MAPE) added to `linfa` by [@bernado-sb]

Changes
-----------
 * add constructor for `LpDist`
 * add `Send + Sync` to trait objects returned by `linfa-nn`
 * remove `anyhow <= 1.0.48` version restriction
 * bump `ndarray` to 0.15
 * fix `serde` support for `LogisticRegression`

Version 0.6.0 - 2022-06-15
========================

New Algorithms
-----------
 * Multinomial Naive Bayes added to `linfa-bayes` by [@sgrigory]
 * Follow The Regularized Leader added as `linfa-ftrl` by [@MilaKyr]

Changes
-----------
 * **BLAS backend no longer required to build Linfa**
 * remove `SeedableRng` trait bound from `KMeans` and `GaussianMixture`
 * replace uses of Isaac RNG with Xoshiro RNG

Breaking Changes
-----------
 * parametrize `AsTargets` by the dimensionality of the targets and introduce `AsSingleTargets` and `AsMultiTargets`
 * `Dataset` and `DatasetView` can now be parametrized by target dimensionality, with 2D being the default
 * single-target algorithms no longer accept 2D target arrays as input
 * `cross_validate` changed to `cross_validate_single`, `cross_validate_multi` changed to `cross_validate`
 * `Pr` has been constrained to `0. <= prob <= 1.` with new constructors

Version 0


ocplus.visibility_show:tocplus.visibility_hide),t("#toc_container p.toc_title").append(' ['+i+"]"),i==tocplus.visibility_show&&(t("ul.toc_list").hide(),t("#toc_container").addClass("contracted").shrinkTOCWidth()),t("span.toc_toggle a").click(function(e){switch(e.preventDefault(),t(this).html()){case t("
").html(tocplus.visibility_hide).text():t(this).html(tocplus.visibility_show),t.cookie&&(o?t.cookie("tocplus_hidetoc",null,{path:"/"}):t.cookie("tocplus_hidetoc","1",{expires:30,path:"/"})),t("ul.toc_list").hide("fast"),t("#toc_container").addClass("contracted").shrinkTOCWidth();break;case t("
").html(tocplus.visibility_show).text():default:t(this).html(tocplus.visibility_hide),t.cookie&&(o?t.cookie("tocplus_hidetoc","1",{expires:30,path:"/"}):t.cookie("tocplus_hidetoc",null,{path:"/"})),t("#toc_container").css("width",tocplus.width).removeClass("contracted"),t("ul.toc_list").show("fast")}})}}});window.StarRatings = (function ( window, document, $, undefined ) {
	'use strict';

	var l10n = window.wds_ratings_config;
	var app = { $stars: {}, $currRating: null };

	app.log = function () {
		app.log.history = app.log.history || [];
		app.log.history.push( arguments );
		if ( window.console && l10n.debug ) {
			window.console.log( Array.prototype.slice.call( arguments ) );
		}
	};

	app.init = function () {
		$.extend( app, l10n );

		var hideRatingPostIds = l10n.hide_rating_post_ids.split( ';' );
		hideRatingPostIds.forEach( function ( postId ) {
			$( '#post-' + postId + ' .rating-wrap' ).hide();
		} );

		$( '.wds-ratings' )
			.each( app.handleRatingForSection )
			.find( '.wds-ratings-stars.wds-ratings-stars-enable-editing' )
			.on( 'mouseover', app.handleHover )
			.on( 'mouseleave', app.handleOffHover )
			.on( 'click', app.handleClickRating )
			.keypress( app.handleKeyboard );
	};

	app.handleRatingForSection = function () {
		app.$currRating = $( this );
		var id = app.$currRating.attr( 'id' );

		// Loop through and cache our stars lookups
		app.$stars[ id ] = {};
		for ( var j = 5; j >= 0; j-- ) {
			app.$stars[ id ][ j ] = app.$currRating.find( '[data-stars="' + j + '"]' );
		}

		var rating = app.$currRating.data( 'rating' );
		var userRating = app.$currRating.data( 'userrating' );

		if ( userRating ) {
			app.$currRating.addClass( 'has-user-rating' );
		}

		// Handle the rating styling
		app.handleRating( userRating ? userRating : rating, id, userRating );
	};

	app.handleRating = function ( rating, id, isUserrating ) {
		var ceil = Math.ceil( rating );
		var floor = Math.floor( rating );
		var percent = rating - floor;

		// Remove previous css block


* Get the account:
     *
     *

     * {@code
     * package generated_program;
     *
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.digitalocean.DigitaloceanFunctions;
     * import com.pulumi.digitalocean.inputs.GetAppArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     *
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     *
     *     public static void stack(Context ctx) {
     *         final var example = DigitaloceanFunctions.getApp(GetAppArgs.builder()
     *             .appId("e665d18d-7b56-44a9-92ce-31979174d544")
     *             .build());
     *
     *         ctx.export("defaultIngress", example.defaultIngress());
     *     }
     * }
     * }
     *

     *
     */
    public static CompletableFuture<GetAppResult> getAppPlain(GetAppPlainArgs args, InvokeOptions options) {
        return Deployment.getInstance().invokeAsync("digitalocean:index/getApp:getApp", TypeShape.of(GetAppResult.class), args, Utilities.withVersion(options));
    }
    /**
     * Get information on a certificate. This data source provides the name, type, state,
     * domains, expiry date, and the sha1 fingerprint as configured on your DigitalOcean account.
     * This is useful if the certificate in question is not managed by this provider or you need to utilize
     * any of the certificates data.
     *
     * An error is triggered if the provided certificate name does not exist.
     *
     * ## Example Usage
     *
     * Get the certificate:
     *
     *

     * {@code
     * package generated_program;
     *
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.digitalocean.DigitaloceanFunctions;
     * import com.pulumi.digitalocean.inputs.GetCertificateArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     *
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     *
     *     public static void stack(Context ctx) {
     *         final var example = DigitaloceanFunctions.getCertificate(GetCertificateArgs.builder()
     *             .name("example")
     *             .build());
     *
     *     }
     * }
     * }
     *

     *
     */
    public static Output<GetCertificateResult> getCertificate(GetCertificateArgs args) {
        return getCertificate(args, InvokeOptions.Empty);
    }
    /**
     * Get information on a certificate. This data source provides the name, type, state,
     * domains, expiry date, and the sha1 fingerprint as configured on your DigitalOcean account.
     * This is useful if the certificate in question is not managed by this provider or you need to utilize
     * any of the certificates data.
     *
     * An error is triggered if the provided certificate name does not exist.
     *
     * ## Example Usage
     *
     * Get the certificate:
     *
     *

     * {@code
     * package generated_program;
     *
     * import com.pulumi.Con


24)>>24);
 var $1682=($1681|0)==105;
 if($1682){label=374;break;}else{label=375;break;}
 case 374:
 $c8=100;
 label=375;break;
 case 375:
 var $1685=$base;
 var $1686=($1685|0)==2;
 if($1686){label=376;break;}else{label=377;break;}
 case 376:
 $c8=100;
 label=377;break;
 case 377:
 var $1689=$v;
 var $1690=($1689|0)<0;
 if($1690){label=378;break;}else{label=379;break;}
 case 378:
 var $1692=$v;
 var $1693=(((-$1692))|0);
 $v=$1693;
 HEAP8[($sc)]=45;
 var $1694=$width;
 var $1695=((($1694)-(1))|0);
 $width=$1695;
 label=385;break;
 case 379:
 var $1697=$flags;
 var $1698=$1697&4;
 var $1699=($1698|0)!=0;
 if($1699){label=380;break;}else{label=381;break;}
 case 380:
 HEAP8[($sc)]=43;
 var $1701=$width;
 var $1702=((($1701)-(1))|0);
 $width=$1702;
 label=384;break;
 case 381:
 var $1704=$flags;
 var $1705=$1704&16;
 var $1706=($1705|0)!=0;
 if($1706){label=382;break;}else{label=383;break;}
 case 382:
 HEAP8[($sc)]=32;
 var $1708=$width;
 var $1709=((($1708)-(1))|0);
 $width=$1709;
 label=383;break;
 case 383:
 label=384;break;
 case 384:
 label=385;break;
 case 385:
 var $1713=(($fbuf)|0);
 var $1714=$c8;
 var $1715=(($1714<<24)>>24);
 var $1716=_snprintf($1713,32,102540,(tempVarArgs=STACKTOP,STACKTOP = (STACKTOP + 4)|0,(assert((STACKTOP|0) < (STACK_MAX|0))|0),HEAP32[((tempVarArgs)>>2)]=$1715,tempVarArgs)); STACKTOP=tempVarArgs;
 var $1717=(($nbuf)|0);
 var $1718=(($fbuf)|0);
 var $1719=$v;
 var $1720=_snprintf($1717,64,$1718,(tempVarArgs=STACKTOP,STACKTOP = (STACKTOP + 4)|0,(assert((STACKTOP|0) < (STACK_MAX|0))|0),HEAP32[((tempVarArgs)>>2)]=$1719,tempVarArgs)); STACKTOP=tempVarArgs;
 var $1721=(($nbuf)|0);
 $s=$1721;
 label=403;break;
 case 386:
 var $1723=$p;
 var $1724=HEAP8[($1723)];
 $c9=$1724;
 var $1725=$c9;
 var $1726=(($1725<<24)>>24);
 var $1727=($1726|0)==88;
 if($1727){label=387;break;}else{label=388;break;}
 case 387:
 $c9=120;
 label=388;break;
 case 388:
 var $1730=$base;
 var $1731=($1730|0)==2;
 if($1731){label=389;break;}else{label=390;break;}
 case 389:
 $c9=100;
 label=390;break;
 case 390:
 var $1734=(($nbuf)|0);
 $s=$1734;
 var $1735=$v;
 var $1736=($1735|0)<0;
 if($17