v2-color("gray-light");}.responsive-biz.responsive .layout-stack-small__373c0__37f0u.layout-wrap__373c0__3jhk3.gutter-8__373c0__1iL0a.layout-wrap-bordered__373c0__w534B>.arrange-unit__373c0__3XPkE:before{display:none;}.responsive-biz.responsive .layout-stack-small__373c0__37f0u.layout-wrap__373c0__3jhk3.gutter-9__373c0__hhQK_.layout-wrap-bordered__373c0__w534B>.arrange-unit__373c0__3XPkE+.arrange-unit__373c0__3XPkE{margin-top:72px;padding-top:72px;border-top:1px solid interace-v2-color("gray-light");}.responsive-biz.responsive .layout-stack-small__373c0__37f0u.layout-wrap__373c0__3jhk3.gutter-9__373c0__hhQK_.layout-wrap-bordered__373c0__w534B>.arrange-unit__373c0__3XPkE:before{display:none;}.responsive-biz.responsive .layout-stack-small__373c0__37f0u.layout-wrap__373c0__3jhk3.gutter-10__373c0__3xwFH.layout-wrap-bordered__373c0__w534B>.arrange-unit__373c0__3XPkE+.arrange-unit__373c0__3XPkE{margin-top:80px;padding-top:80px;border-top:1px solid interace-v2-color("gray-light");}.responsive-biz.responsive .layout-stack-small__373c0__37f0u.layout-wrap__373c0__3jhk3.gutter-10__373c0__3xwFH.layout-wrap-bordered__373c0__w534B>.arrange-unit__373c0__3XPkE:before{display:none;}}.layout-equal__373c0__18sxP{display:flex;}.layout-equal__373c0__18sxP>.arrange-unit__373c0__3XPkE{flex:1;min-width:0;min-height:0;display:block;}@media only screen and (max-width:1023px){.responsive .layout-stack-medium__373c0__1CrCy>.arrange-unit-grid-column--1__373c0__2ImZu{width:auto;}}@media only screen and (max-width:1240px){.responsive-biz.responsive .layout-stack-medium__373c0__1CrCy>.arrange-unit-grid-column--1__373c0__2ImZu{width:auto;}}@media only screen and (max-width:599px){.responsive .layout-stack-small__373c0__37f0u>.arrange-unit-grid-column--1__373c0__2ImZu{width:auto;}}@media only screen and (max-width:780px){.responsive-biz.responsive .layout-stack-small__373c0__37f0u>.arrange-unit-grid-column--1__373c0__2ImZu{width:auto;}}@media only screen and (max-width:1023px){.responsive .layout-stack-medium__373c0__1CrCy>.arrange-unit-grid-column--2__373c0__3eJUT{width:auto;}}@media only screen and (max-width:1240px){.responsive-biz.responsive .layout-stack-medium__373c0__1CrCy>.arrange-unit-grid-column--2__373c0__3eJUT{width:auto;}}@media only screen and (max-width:599px){.responsive .layout-stack-small__373c0__37f0u>.arrange-unit-grid-column--2__373c0__3eJUT{width:auto;}}@media only screen and (max-width:780px){.responsive-biz.responsive .layout-stack-small__373c0__37f0u>.arrange-unit-grid-column--2__373c0__3eJUT{wid


ame="T4">实体类型4</typeparam>
    /// <typeparam name="T5">实体类型5</typeparam>
    /// <typeparam name="T6">实体类型6</typeparam>
    /// <typeparam name="T7">实体类型7</typeparam>
    /// <typeparam name="TEntity">返回的实体类型</typeparam>
    /// <param name="procedure">存储过程</param>
    /// <param name="map">映射函数</param>
    /// <param name="timeout">执行超时时间,单位:秒</param>
    /// <param name="buffered">是否缓存,默认值: true</param>
    List<TEntity> ExecuteProcedureQuery<T1, T2, T3, T4, T5, T6, T7, TEntity>( string procedure, Func<T1, T2, T3, T4, T5, T6, T7, TEntity> map, int? timeout = null, bool buffered = true );
    /// <summary>
    /// 执行存储过程获取实体集合
    /// </summary>
    /// <param name="procedure">存储过程</param>
    /// <param name="timeout">执行超时时间,单位:秒</param>
    Task<List<dynamic>> ExecuteProcedureQueryAsync( string procedure, int? timeout = null );
    /// <summary>
    /// 执行存储过程获取实体集合
    /// </summary>
    /// <typeparam name="TEntity">实体类型</typeparam>
    /// <param name="procedure">存储过程</param>
    /// <param name="timeout">执行超时时间,单位:秒</param>
    Task<List<TEntity>> ExecuteProcedureQueryAsync<TEntity>( string procedure, int? timeout = null );
    /// <summary>
    /// 执行存储过程获取实体集合
    /// </summary>
    /// <typeparam name="T1">实体类型1</typeparam>
    /// <typeparam name="T2">实体类型2</typeparam>
    /// <typeparam name="TEntity">返回的实体类型</typeparam>
    /// <param name="procedure">存储过程</param>
    /// <param name="map">映射函数</param>
    /// <param name="timeout">执行超时时间,单位:秒</param>
    /// <param name="buffered">是否缓存,默认值: true</param>
    Task<List<TEntity>> ExecuteProcedureQueryAsync<T1, T2, TEntity>( string procedure, Func<T1, T2, TEntity> map, int? timeout = null, bool buffered = true );
    /// <summary>
    /// 执行存储过程获取实体集合
    /// </summary>
    /// <typeparam name="T1">实体类型1</typeparam>
    /// <typeparam name="T2">实体类型2</typeparam>
    /// <typeparam name="T3">实体类型3</typeparam>
    /// <typeparam name="TEntity">返回的实体类型</typeparam>
    /// <param name="procedure">存储过程</param>
    /// <param name="map">映射函数</param>
    /// <param name="timeout">执行超时时间,单位:秒</param>
    /// <param name="buffered">是否缓存,默认值: true</param>
    Task<List<TEntity>> ExecuteProcedureQueryAsync<T1, T2, T3, TEntity>( string procedure, Func<T1, T2, T3, TEntity> map, int? timeout = null, bool buffered = true );


  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/**
 * Remove the inner padding in Chrome and Safari on macOS.
 */

[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

/**
 * 1. Correct the inability to style clickable types in iOS and Safari.
 * 2. Change font properties to `inherit` in Safari.
 */

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/* Interactive
   ========================================================================== */

/*
 * Add the correct display in Edge, IE 10+, and Firefox.
 */

details {
  display: block;
}

/*
 * Add the correct display in all browsers.
 */

summary {
  display: list-item;
}

/* Misc
   ========================================================================== */

/**
 * Add the correct display in IE 10+.
 */

template {
  display: none;
}

/**
 * Add the correct display in IE 10.
 */

[hidden] {
  display: none;
}
$sb-font-folder: "../fonts"; // relative to the final css file

@font-face {
    font-family: 'socialfont';
    src:url('#{$sb-font-folder}/socialfont.eot?mh1paq');
    src:url('#{$sb-font-folder}/socialfont.eot?#iefixmh1paq') format('embedded-opentype'),
        url('#{$sb-font-folder}/socialfont.woff?mh1paq') format('woff'),
        url('#{$sb-font-folder}/socialfont.ttf?mh1paq') format('truetype'),
        url('#{$sb-font-folder}/socialfont.svg?mh1paq#icomoon') format('svg');
    font-weight: normal;
    font-style: normal;
}

[class*=" icon-"], [class^=icon-] {
    font-family: socialfont;
    speak: none;
    font-style: normal;
    font-weight: 400;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
}

@mixin icon($character, $color) {
    &:before {
        content: $character;
    }

    &.color:hover {
        background-color: $color;
    }

    &.borderless:hover {
        color: $color;
    }
}

.icon-facebook {
    @include icon("\e600", #3b5998);
}

.icon-twitter {
    @include icon("\e601", #4dc8f1);
}

.icon-instagram {
    @include icon("\e602", #3e739d);
}

.icon-behance {
    @include icon("\e603", #0683f1);
}

.icon-vimeo {
   @include icon("\e604", #86c9ef);
}

.icon-youtube {
    @include icon("\e605", #ce332d);
}

.icon-googleplus {
    @include icon("\e606", #d13f2d);
}

.icon-rss {
    @include icon("\e607", #f88b02);
}

.icon-pinterest {
    @include icon("\e608", #cb2028);
}

.icon-tumblr {
    @include icon("\e609", #274152);
}

.icon-linkedin {
    @include icon("\e60a", #0275b5);
}

.icon-skype {
    @include icon("\e60b", #03aceb);
}

.icon-github {
    @include icon("\e60c", #4183C4);
}

.icon-dribbble {
    @include icon("\e60d", #ea4c89);
}

a.social-button {
    font-size: 32px;
    text-decorati


      'EncodeSansSemiExpanded-SemiBold',
    );
    return font.getFont();
  }

  /// @nodoc
  /// Encode Sans Semi Expanded 700
  static Future<Font> encodeSansSemiExpandedBold() {
    const font = PdfGoogleFonts._(
      'https://fonts.gstatic.com/s/encodesanssemiexpanded/v19/ke8yOhAPMEZs-BDuzwftTNJ85JvwMOzE9d9Cca5TMzYQCyDLJX6XCWU.ttf',
      'EncodeSansSemiExpanded-Bold',
    );
    return font.getFont();
  }

  /// @nodoc
  /// Encode Sans Semi Expanded 800
  static Future<Font> encodeSansSemiExpandedExtraBold() {
    const font = PdfGoogleFonts._(
      'https://fonts.gstatic.com/s/encodesanssemiexpanded/v19/ke8yOhAPMEZs-BDuzwftTNJ85JvwMOzE9d9Cca5TMyoTCyDLJX6XCWU.ttf',
      'EncodeSansSemiExpanded-ExtraBold',
    );
    return font.getFont();
  }

  /// @nodoc
  /// Encode Sans Semi Expanded 900
  static Future<Font> encodeSansSemiExpandedBlack() {
    const font = PdfGoogleFonts._(
      'https://fonts.gstatic.com/s/encodesanssemiexpanded/v19/ke8yOhAPMEZs-BDuzwftTNJ85JvwMOzE9d9Cca5TMw4SCyDLJX6XCWU.ttf',
      'EncodeSansSemiExpanded-Black',
    );
    return font.getFont();
  }

  /// @nodoc
  /// Engagement regular
  static Future<Font> engagementRegular() {
    const font = PdfGoogleFonts._(
      'https://fonts.gstatic.com/s/engagement/v26/x3dlckLDZbqa7RUs9MFVXNossybsHQI.ttf',
      'Engagement-Regular',
    );
    return font.getFont();
  }

  /// @nodoc
  /// Englebert regular
  static Future<Font> englebertRegular() {
    const font = PdfGoogleFonts._(
      'https://fonts.gstatic.com/s/englebert/v21/xn7iYH8w2XGrC8AR4HSxT_fYdN-WZw.ttf',
      'Englebert-Regular',
    );
    return font.getFont();
  }

  /// @nodoc
  /// Enriqueta regular
  static Future<Font> enriquetaRegular() {
    const font = PdfGoogleFonts._(
      'https://fonts.gstatic.com/s/enriqueta/v17/goksH6L7AUFrRvV44HVTS0CjkP1Yog.ttf',
      'Enriqueta-Regular',
    );
    return font.getFont();
  }

  /// @nodoc
  /// Enriqueta 500
  static Future<Font> enriquetaMedium() {
    const font = PdfGoogleFonts._(
      'https://fonts.gstatic.com/s/enriqueta/v17/gokpH6L7AUFrRvV44HVrv2mHmNZEq6TTFw.ttf',
      'Enriqueta-Medium',
    );
    return font.getFont();
  }

  /// @nodoc
  /// Enriqueta 600
  static Future<Font> enriquetaSemiBold() {
    const font = PdfGoogleFonts._(
      'https://fonts.gstatic.com/s/enriqueta/v17/gokpH6L7AUFrRvV44HVrk26HmNZEq6TTFw.ttf',
      'Enriqueta-SemiBold',
    );


";
					}
					if(e.getMessage().contains(atteso)) {
						System.out.println("Eccezione attesa: "+e.getMessage());
					}else {
						throw e;
					}
				}
			}
			else {
				decrypt(tipo, "encPublic-decryptPrivate"+suffix, true, jsonDecrypt, attachEncrypt, jsonInput, options);
			}
		}

		System.out.println("\n\n");

		// **** JSON - deflated via properties ***

		encryptProps.put("rs.security.encryption.zip.algorithm","DEF");

		// Encrypt Json
		options = new JWEOptions(JOSESerialization.JSON);
		if(headers==null) {
			jsonEncrypt = new JsonEncrypt(encryptProps, options);
		}
		else {
			jsonEncrypt = new JsonEncrypt(encryptProps, headers, options);
		}
		attachEncrypt = jsonEncrypt.encrypt(jsonInput);
		int lengthDeflated = attachEncrypt.length();
		verifyEncryptBuild(tipo, "encPublic-decryptPrivate-deflateProperties", attachEncrypt, jsonInput, options, encryptProps, headers);
		if(lengthDeflated>=lengthNotDeflated) {
			throw new Exception("Attesa dimensione minore con utilizzo di deflate");
		}

		// Verifica
		optionsDecrypt = new JWTOptions(JOSESerialization.JSON);
		jsonDecrypt = new JsonDecrypt(decryptProps,optionsDecrypt);
		if(crl!=null) {
			jsonDecrypt.setCrlX509(crl.getCertStore());
			jsonDecrypt.setTrustStoreVerificaCertificatiX509(truststoreJKS);
		}
		if(ocspValidator!=null) {
			jsonDecrypt.setOcspValidatorX509(ocspValidator);
			jsonDecrypt.setTrustStoreVerificaCertificatiX509(truststoreJKS);
		}
		if("ExampleClientScaduto".equals(alias) || "ExampleClientRevocato".equals(alias) || "test".equals(alias)) {
			try {
				decrypt(tipo, "encPublic-decryptPrivate-deflateProperties", false, jsonDecrypt, attachEncrypt, jsonInput, options);
				throw new Exception("Attesa eccezione certificato non valido (alias: "+alias+")");
			}catch(Exception e) {
				String atteso = "ExampleClientScaduto".equals(alias) ?
						"Certificato di firma scaduto: NotAfter:"
						:
						"Certificato di firma non valido: Certificate has been revoked, reason: KEY_COMPROMISE, revocation date:";
				if("test".equals(alias)){
					atteso = "Certificato di firma non valido: Certificate revoked in date";
				}
				if(e.getMessage().contains(atteso)) {
					System.out.println("Eccezione attesa: "+e.getMessage());
				}else {
					throw e;
				}
			}
		}
		else {
			decrypt(tipo, "encPublic-decryptPrivate-deflateProperties", false, jsonDecrypt, attachEncrypt, jsonInput, options);
		}

		// Verifica basata sull'header
		if(!TipoTest.JSON_ENCRYPT_PROPERTIES_JCEKS.equals(tipo) &&
				!TipoTest.JSON_ENCRYPT_PROPERTIES_JCEKS_HEADER_CUSTOM.equals(tipo) &&
				!TipoTest.JSON_ENCRYPT_PROPERTIES_JWK_SYMMETRIC.equals(tipo) &&
				!TipoTest.JSON_ENCRYPT_PROPERTIES_JWK_SYMMETRIC_HEADER_CUSTOM.equals(tipo)) {
			String suffix = "";
			if(jsonWebKeys!=null) {
				jsonDecrypt = new JsonDecrypt(jsonWebKeys,optionsDecrypt);
				suffix = "-jsonWebKeysHDR";
			}
			else {


.clear();
    }

    /*▲ 移除 ████████████████████████████████████████████████████████████████████████████████┛ */

    /*▼ 包含查询 ████████████████████████████████████████████████████████████████████████████████┓ */

    /**
     * Returns {@code true} if this set contains the specified element.
     * More formally, returns {@code true} if and only if this set
     * contains an element {@code e} such that
     * {@code Objects.equals(o, e)}.
     *
     * @param o element whose presence in this set is to be tested
     *
     * @return {@code true} if this set contains the specified element
     */
    // 判断当前集合中是否包含元素o
    public boolean contains(Object o) {
        return map.containsKey(o);
    }

    /*▲ 包含查询 ████████████████████████████████████████████████████████████████████████████████┛ */

    /*▼ 迭代 ████████████████████████████████████████████████████████████████████████████████┓ */

    /**
     * Returns an iterator over the elements in this set.  The elements
     * are returned in no particular order.
     *
     * @return an Iterator over the elements in this set
     *
     * @see ConcurrentModificationException
     */
    // 返回当前集合的迭代器
    public Iterator<E> iterator() {
        return map.keySet().iterator();
    }

    /**
     * Creates a late-binding
     * and fail-fast {@link Spliterator} over the elements in this
     * set.
     *
     *
The {@code Spliterator} reports {@link Spliterator#SIZED} and
     * {@link Spliterator#DISTINCT}.  Overriding implementations should document
     * the reporting of additional characteristic values.
     *
     * @return a {@code Spliterator} over the elements in this set
     *
     * @since 1.8
     */
    // 返回描述此集合中元素的Spliterator
    public Spliterator<E> spliterator() {
        return new HashMap.KeySpliterator<>(map, 0, -1, 0, 0);
    }

    /*▲ 迭代 ████████████████████████████████████████████████████████████████████████████████┛ */

    /*▼ 杂项 ████████████████████████████████████████████████████████████████████████████████┓ */

    /**
     * Returns the number of elements in this set (its cardinality).
     *
     * @return the number of elements in this set (its cardinality)
     */
    // 返回当前集合的元素数量
    public int size() {
        return map.size();
    }

    /**
     * Returns {@code true} if this set contains no elements.
     *
     * @return {@code true} if this set contains no elements
     */
    // 判断当前集合是否为空
    public boolean isEmpty() {
        return map.isEmpty();
    }

    /*▲ 杂项 ████████████████████████████████████████████████████████████████████████████████┛ */

    /*▼ 序列化 ████████████████████████████████████████████████████████████████████████████████┓ */

    static final long serialVersionUID = -5024744406713321676L;

    /**
     * Save the state of this {@code HashSet} instance to a stream (that is,
     * serialize it).
     *
     * @serialData The capacity of the backing {@code HashMap} instance
     * (int), and its load


c_a    = reinterpret_cast<const float *>(ina.ptr());
                auto matrix_b = reinterpret_cast<const float *>(inb.ptr()) + x;

#if __arm__
                asm volatile("PLD [%0, #128*4]" ::"r"(reinterpret_cast<const uint8_t *>(vec_a)));
                asm volatile("PLD [%0, #128*4]" ::"r"(reinterpret_cast<const uint8_t *>(matrix_b)));
                asm volatile("PLD [%0, #128*4]" ::"r"(reinterpret_cast<const uint8_t *>(matrix_b + in_b_stride)));
#endif /* __arm__ */

                auto vec_a_end_addr = vec_a + num_elems_vec_a;
                for (; vec_a <= (vec_a_end_addr - 4); vec_a += 4)
                {
                    const float32x4_t a0l = vld1q_f32(vec_a);

                    const float32x4_t b_col = {
                        *(matrix_b + 0 * in_b_stride),
                        *(matrix_b + 1 * in_b_stride),
                        *(matrix_b + 2 * in_b_stride),
                        *(matrix_b + 3 * in_b_stride),
                    };

#if __arm__
                    asm volatile("PLD [%0, #128*4]" ::"r"(reinterpret_cast<const uint8_t *>(vec_a)));
                    asm volatile(
                        "PLD [%0, #128*1]" ::"r"(reinterpret_cast<const uint8_t *>(matrix_b + 1 * in_b_stride)));
                    asm volatile(
                        "PLD [%0, #128*1]" ::"r"(reinterpret_cast<const uint8_t *>(matrix_b + 2 * in_b_stride)));
                    asm volatile(
                        "PLD [%0, #128*1]" ::"r"(reinterpret_cast<const uint8_t *>(matrix_b + 3 * in_b_stride)));
                    asm volatile(
                        "PLD [%0, #128*1]" ::"r"(reinterpret_cast<const uint8_t *>(matrix_b + 4 * in_b_stride)));
#endif /* __arm__ */

                    vacc = vmlaq_f32(vacc, b_col, a0l);

                    matrix_b += 4 * in_b_stride;
                }

                float acc = vgetq_lane_f32(vacc, 0) + vgetq_lane_f32(vacc, 1) + vgetq_lane_f32(vacc, 2) +
                            vgetq_lane_f32(vacc, 3);

                for (; vec_a < vec_a_end_addr; ++vec_a)
                {
                    const float a0 = *vec_a;

                    const float b00 = *matrix_b;

                    acc += b00 * a0;

                    matrix_b += in_b_stride;
                }

                // Multiply by the weight of matrix product (alpha)
                if (multiply_alpha)
                {
                    acc *= alpha;
                }

                const auto vec_out = reinterpret_cast<float *>(out.ptr()) + x;

                *vec_out = acc;
            }
        },
        ina, inb, out);
}

void matrix_matrix_multiply_f32(
    const ITensor *lhs, const ITensor *rhs, ITensor *dst, const Window &window, const ThreadInfo &info, float alpha)
{
    ARM_COMPUTE_UNUSED(info);
    const int    out_width   = static_cast<int>(dst->info()->dimension(0));
    const int    out_height  = static_cast<int>(dst->info()->dimension(1));
    const size_t in


: [usize; 3] = [5, 5, 8];
    const FILTER_DIMS: [usize; 4] = [4, 3, 3, 4];
    test_grouped_f32_convolution(SIGNAL_DIMS, FILTER_DIMS, 2);
}

#[test]
fn f32_grouped_convolution_medium() {
    const SIGNAL_DIMS: [usize; 3] = [28, 28, 32];
    const FILTER_DIMS: [usize; 4] = [32, 3, 3, 8];
    test_grouped_f32_convolution(SIGNAL_DIMS, FILTER_DIMS, 4);
}

fn test_dilated_f32_convolution(signal_dims: [usize; 3], filter_dims: [usize; 4], dilation: u32) {
    compare_f32_convolution(
        signal_dims,
        filter_dims,
        Params {
            dilation: [dilation; 2],
            ..Params::default()
        },
    );
    compare_f32_convolution(
        signal_dims,
        filter_dims,
        Params {
            pads: [1; 4],
            dilation: [dilation; 2],
            ..Params::default()
        },
    );
    compare_f32_convolution(
        signal_dims,
        filter_dims,
        Params {
            pads: [2; 4],
            dilation: [dilation; 2],
            ..Params::default()
        },
    );
}

#[test]
fn f32_dilated_convolution_small() {
    const SIGNAL_DIMS: [usize; 3] = [10, 10, 8];
    const FILTER_DIMS: [usize; 4] = [4, 3, 3, 8];
    test_dilated_f32_convolution(SIGNAL_DIMS, FILTER_DIMS, 2);
}

#[test]
fn f32_dilated_convolution_medium() {
    const SIGNAL_DIMS: [usize; 3] = [28, 28, 32];
    const FILTER_DIMS: [usize; 4] = [10, 3, 3, 32];
    test_dilated_f32_convolution(SIGNAL_DIMS, FILTER_DIMS, 2);
}

fn downscale(x: i32, shift: i32) -> i8 {
    let mask = (1 << shift) - 1;
    let threshold = 1 << (shift - 1);
    let mut downscaled = x >> shift;
    let remainder = x & mask;
    if remainder > threshold || (remainder == threshold && downscaled & 1 == 1) {
        downscaled += 1;
    }
    cmp::max(-128, cmp::min(127, downscaled)) as i8
}

fn compare_i8_convolution(signal_dims: [usize; 3], filter_dims: [usize; 4], params: Params) {
    let mut rng = thread_rng();
    let signal = Array3::from_shape_fn(signal_dims, |_| rng.gen_range(-127_i8..=127));
    let filter = Array4::from_shape_fn(filter_dims, |_| rng.gen_range(-127_i8..=127));
    let cpu_output = slow_compute(
        signal.mapv(i32::from).view(),
        filter.mapv(i32::from).view(),
        None,
        params,
    )
    .mapv(|x| downscale(x, 8));

    let convolution = Convolution::i8(filter_dims[1] as u32)
        .unwrap()
        .build(I8Params {
            common: params,
            bit_shift: 14,
            scale: 1 << 6, // corresponds to 1/256
            output_bias: 0,
            signal_bias: 0,
            filter_bias: 0,
        })
        .unwrap();
    let signal = FeatureM


/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     |
    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
     \\/     M anipulation  |
-------------------------------------------------------------------------------
License
    This file is part of OpenFOAM.

    OpenFOAM is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    for more details.

    You should have received a copy of the GNU General Public License
    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.

Description
    Abstract base class for surface interpolation schemes.

\*---------------------------------------------------------------------------*/

#include "multivariateSurfaceInterpolationScheme.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

namespace Foam
{

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Define the constructor function hash tables

defineTemplateRunTimeSelectionTable
(
    multivariateSurfaceInterpolationScheme<scalar>,
    Istream
);

defineTemplateRunTimeSelectionTable
(
    multivariateSurfaceInterpolationScheme<vector>,
    Istream
);

defineTemplateRunTimeSelectionTable
(
    multivariateSurfaceInterpolationScheme<sphericalTensor>,
    Istream
);

defineTemplateRunTimeSelectionTable
(
    multivariateSurfaceInterpolationScheme<symmTensor>,
    Istream
);

defineTemplateRunTimeSelectionTable
(
    multivariateSurfaceInterpolationScheme<tensor>,
    Istream
);

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

} // End namespace Foam

// ************************************************************************* //


])
            else
                constant_string_pattern = constant_string_pattern
                    .. ("%s = %s,"):format(identifier, opts.values[idx])
            end
        end

        constant_string_pattern = constant_string_pattern .. ";\n"
    else
        if not opts.statement then
            opts.statement = "INSERT_TYPE_HERE %s = %s;"
        end

        constant_string_pattern = (opts.statement .. "\n"):format(
            code_utils.returnify(opts.name, string_pattern),
            opts.value
        )
    end

    return constant_string_pattern
end

---@type refactor.CodeGeneration
local c = {
    comment = cpp.comment,
    default_printf_statement = cpp.default_printf_statement,
    print = cpp.print,
    default_print_var_statement = cpp.default_print_var_statement,
    print_var = cpp.print_var,
    ["return"] = cpp["return"],
    ["function"] = cpp["function"],
    function_return = function(opts)
        return ([[
%s %s(%s) {
%s
}

]]):format(
            opts.return_type,
            opts.name,
            c_func_args(opts),
            code_utils.stringify_code(opts.body)
        )
    end,
    constant = function(opts)
        return c_constant(opts)
    end,
    call_function = cpp.call_function,
    pack = cpp.pack,
    terminate = cpp.terminate,
}

return c


inode->i_mapping = __dax_inode->i_mapping;
	inode->i_mapping->host = __dax_inode;
	inode->i_mapping->a_ops = &dev_dax_aops;
	filp->f_mapping = inode->i_mapping;
	filp->f_wb_err = filemap_sample_wb_err(filp->f_mapping);
	filp->f_sb_err = file_sample_sb_err(filp);
	filp->private_data = dev_dax;
	inode->i_flags = S_DAX;

	return 0;
}

static int dax_release(struct inode *inode, struct file *filp)
{
	struct dev_dax *dev_dax = filp->private_data;

	dev_dbg(&dev_dax->dev, "trace\n");
	return 0;
}

static const struct file_operations dax_fops = {
	.llseek = noop_llseek,
	.owner = THIS_MODULE,
	.open = dax_open,
	.release = dax_release,
	.get_unmapped_area = dax_get_unmapped_area,
	.mmap = dax_mmap,
	.mmap_supported_flags = MAP_SYNC,
};

static void dev_dax_cdev_del(void *cdev)
{
	cdev_del(cdev);
}

static void dev_dax_kill(void *dev_dax)
{
	kill_dev_dax(dev_dax);
}

int dev_dax_probe(struct dev_dax *dev_dax)
{
	struct dax_device *dax_dev = dev_dax->dax_dev;
	struct device *dev = &dev_dax->dev;
	struct dev_pagemap *pgmap;
	struct inode *inode;
	struct cdev *cdev;
	void *addr;
	int rc, i;

	pgmap = dev_dax->pgmap;
	if (dev_WARN_ONCE(dev, pgmap && dev_dax->nr_range > 1,
			"static pgmap / multi-range device conflict\n"))
		return -EINVAL;

	if (!pgmap) {
		pgmap = devm_kzalloc(dev, sizeof(*pgmap) + sizeof(struct range)
				* (dev_dax->nr_range - 1), GFP_KERNEL);
		if (!pgmap)
			return -ENOMEM;
		pgmap->nr_range = dev_dax->nr_range;
	}

	for (i = 0; i < dev_dax->nr_range; i++) {
		struct range *range = &dev_dax->ranges[i].range;

		if (!devm_request_mem_region(dev, range->start,
					range_len(range), dev_name(dev))) {
			dev_warn(dev, "mapping%d: %#llx-%#llx could not reserve range\n",
					i, range->start, range->end);
			return -EBUSY;
		}
		/* don't update the range for static pgmap */
		if (!dev_dax->pgmap)
			pgmap->ranges[i] = *range;
	}

	pgmap->type = MEMORY_DEVICE_GENERIC;
	addr = devm_memremap_pages(dev, pgmap);
	if (IS_ERR(addr))
		return PTR_ERR(addr);

	inode = dax_inode(dax_dev);
	cdev = inode->i_cdev;
	cdev_init(cdev, &dax_fops);
	if (dev->class) {
		/* for the CONFIG_DEV_DAX_PMEM_COMPAT case */
		cdev->owner = dev->parent->driver->owner;
	} else
		cdev->owner = dev->driver->owner;
	cdev_set_parent(cdev, &dev->kobj);
	rc = cdev_add(cdev, dev->devt, 1);
	if (rc)
		return rc;

	rc = devm_add_action_or_reset(dev, dev_dax_cdev_del, cdev);
	if (rc)
		return rc;

	run_dax(dax_dev);
	return devm_add_action_or_reset(dev, dev_dax_kill, dev_dax);
}
EXPORT_SYMBOL_GPL(dev_dax_probe);

static struct dax_device_driver device_dax_driver = {
	.probe = dev_dax_probe,
	/* all probe actions are unwound by devm, so .remove isn't necessary */
	.match_always = 1,
};

static int __init dax_init(void)
{
	return dax_driver_register(&device_dax_driver);
}

static void __exit dax_exit(void)
{
	dax_driver_unregister(&device_dax_driver);
}

MODULE_AUTHOR("Intel Corporation");
MODULE_LICENSE("GPL v2");
module_init(dax_init);
module_exit(dax_exit);
MODULE_ALIAS_DAX_DEVICE(0);


US   (*(RwReg16*)0x42001C1AUL) /**< \brief (SERCOM5) USART Status */
#define REG_SERCOM5_USART_SYNCBUSY (*(RoReg  *)0x42001C1CUL) /**< \brief (SERCOM5) USART Synchronization Busy */
#define REG_SERCOM5_USART_DATA     (*(RwReg16*)0x42001C28UL) /**< \brief (SERCOM5) USART Data */
#define REG_SERCOM5_USART_DBGCTRL  (*(RwReg8 *)0x42001C30UL) /**< \brief (SERCOM5) USART Debug Control */
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */

/* ========== Instance parameters for SERCOM5 peripheral ========== */
#define SERCOM5_DMAC_ID_RX          11       // Index of DMA RX trigger
#define SERCOM5_DMAC_ID_TX          12       // Index of DMA TX trigger
#define SERCOM5_GCLK_ID_CORE        25       // Index of Generic Clock for Core
#define SERCOM5_GCLK_ID_SLOW        19       // Index of Generic Clock for SMbus timeout
#define SERCOM5_INT_MSB             6

#endif /* _SAMDA1_SERCOM5_INSTANCE_ */


tyle="display: block;"{/if}>

                    我的假条

                                短期假条

                                    模板打印


ey, newTheme.index);
    theme = newTheme;
    notifyListeners();
  }

  Future<ThemeMode> readTheme() async {
    final themeIndex = await _asyncPrefs.getInt(_themeKey) ?? ThemeMode.system.index;

    theme = ThemeMode.values[themeIndex];
    notifyListeners();
    return theme;
  }

  Future<void> updateFrequency(int value) async {
    await _asyncPrefs.setInt(_frequencyKey, value);
    frequencyHolder = Frequency.getFrequency(value);
    notifyListeners();
  }

  Future<void> readFrequency() async {
    int frequencyTime = await _asyncPrefs.getInt(_frequencyKey) ?? Frequency.every2Hours.frequency;
    frequencyHolder = Frequency.getFrequency(frequencyTime);
    notifyListeners();
  }

  Future<void> updateTime(Settings key, int hour, int minutes) async {
    await _saveTime(key.value, hour, minutes);
    final time = AppDateUtils.parseTime(AppDateUtils.formatTime(hour, minutes));

    _assignTime(key, time);
    notifyListeners();
  }

  Future<void> readTime(Settings key) async {
    final time = await _asyncPrefs.getString(key.value);
    if (time == null) return;

    final parsedTime = AppDateUtils.parseTime(time);
    _assignTime(key, parsedTime);
    notifyListeners();
  }

  Future<void> _saveTime(String key, int hour, int minutes) async {
    final formattedTime = AppDateUtils.formatTime(hour, minutes);
    await _asyncPrefs.setString(key, formattedTime);
  }

  void _assignTime(Settings key, TimeOfDay time) {
    switch(key) {
      case Settings.wakeUpTime:
        wakeUpTime = time;
        break;
      case Settings.sleepTime:
        sleepTime = time;
        break;
      default:
        throw ArgumentError('Tried to assign time to an unsuported settings key: $key.');
    }
  }
}import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

class FormNumberInputField extends StatelessWidget {
  final String label;
  final bool decimal;
  final int maxLength;
  final TextEditingController controller;
  final String? Function(String?)? validator;

  const FormNumberInputField({
    super.key,
    required this.label,
    this.decimal = false,
    this.maxLength = 3,
    required this.controller,
    required this.validator,
  });

  @override
  Widget build(BuildContext context) {
    TextInputType inputType = decimal
      ? TextInputType.numberWithOptions(decimal: true)
      : TextInputType.number;

    TextInputFormatter inputFormatter = decimal
      ? FilteringTextInputFormatter.allow(RegExp(r'^\d+(\.\d*)?'))
      : FilteringTextInputFormatter.digitsOnly;

    return Column(
      mainAxisAlignment: MainAxisAlignment.start,
      crossAxisAlignment: CrossAxisAlignment.start,
      mainAxisSize: MainAxisSize.min,
      spacing: 8,
      children: [
        Text(
          label,
          style: Theme.of(context).textTheme.labelLarge
        ),
        TextFormField(
          controller: controller,
          maxLength: maxLength,
          keyboardType: inputType,
          inputFormatters: [inputFormatter],
          style: Theme.of(context).textTheme.bodyLarge,
          validator: validator,
        ),
      ],
    );
  }
}import 'package:flutter/material.dart';

class SettingsTextButton extends StatelessWidget {
  final String title;
  final String? description;
  final VoidCallback onPressed;

  const SettingsTextButton({
    super.key,
    required this.title,
    this


	if nextB != nil {
		if nextB.a.leaf == b {
			nextB.a.prev = pair
		} else {
			nextB.b.prev = pair
		}
	}
}

func (subtree *BBTree) PairFromPool() *Pair {
	tree := subtree.GetMasterTree()

	pair := tree.pooledPairs

	if pair != nil {
		tree.pooledPairs = pair.a.next
		return pair
	}

	// Pool is exhausted make more
	for range POOLED_BUFFER_SIZE {
		tree.RecyclePair(&Pair{})
	}

	return &Pair{}
}

func (tree *BBTree) RecyclePair(pair *Pair) {
	master := tree.GetMasterTree()
	pair.a.next = master.pooledPairs
	master.pooledPairs = pair
}

func (tree *BBTree) SubtreeInsert(subtree *Node, leaf *Node) *Node {
	if subtree == nil {
		return leaf
	}
	if subtree.IsLeaf() {
		return tree.NewNode(leaf, subtree)
	}

	cost_a := subtree.b.bb.Area() + subtree.a.bb.MergedArea(leaf.bb)
	cost_b := subtree.a.bb.Area() + subtree.b.bb.MergedArea(leaf.bb)

	if cost_a == cost_b {
		cost_a = subtree.a.bb.Proximity(leaf.bb)
		cost_b = subtree.b.bb.Proximity(leaf.bb)
	}

	if cost_b < cost_a {
		NodeSetB(subtree, tree.SubtreeInsert(subtree.b, leaf))
	} else {
		NodeSetA(subtree, tree.SubtreeInsert(subtree.a, leaf))
	}

	subtree.bb = subtree.bb.Merge(leaf.bb)
	return subtree
}

func (tree *BBTree) SubtreeRemove(subtree *Node, leaf *Node) *Node {
	if leaf == subtree {
		return nil
	}

	parent := leaf.parent
	if parent == subtree {
		other := subtree.Other(leaf)
		other.parent = subtree.parent
		tree.RecycleNode(subtree)
		return other
	}

	tree.ReplaceChild(parent.parent, parent, parent.Other(leaf))
	return subtree
}

func (tree *BBTree) ReplaceChild(parent, child, value *Node) {
	if parent.a == child {
		tree.RecycleNode(parent.a)
		NodeSetA(parent, value)
	} else {
		tree.RecycleNode(parent.b)
		NodeSetB(parent, value)
	}

	for node := parent; node != nil; node = node.parent {
		node.bb = node.a.bb.Merge(node.b.bb)
	}
}

func (node *Node) Other(child *Node) *Node {
	if node.a == child {
		return node.b
	}
	return node.a
}

func (node *Node) IsLeaf() bool {
	return node.obj != nil
}

func (tree *BBTree) Remove(obj *Shape, hashId HashValue) {
	leaf := tree.leaves.Remove(hashId, obj)

	tree.root = tree.SubtreeRemove(tree.root, leaf)
	tree.PairsClear(leaf)
	tree.RecycleNode(leaf)
}

func (tree *BBTree) Reindex() {
	panic("implement me")
}

func (tree *BBTree) ReindexObject(obj *Shape, hashId HashValue) {
	leaf := tree.leaves.Find(hashId, obj)
	if leaf != nil {
		if tree.LeafUpdate(leaf) {
			tree.LeafAddPairs(leaf)
		}
		tree.IncrementStamp()
	}
}

func (tree *BBTree) ReindexQuery(f SpatialIndexQuery, data any) {
	if tree.root == nil {
		return
	}

	// LeafUpdate() may modify tree->root.


     // that represents the concentration left
        let lifespan = self.lifespan.length().unwrap_or(0) as f32;
        let max_concentration =
            self.context.conf.ants.max_phero_concentration as f32;
        let scale = (lifespan / max_concentration).min(0.5);
        let scale = Transform::scale_around(
            [scale, scale],
            [entity_size / 2.0, entity_size / 2.0],
        );

        transform *= translation * scale;

        // the brighter the entity the more concentration it represents, up to
        // completely white (255, 255, 255)
        let val = (lifespan * 0.1) as u8;
        let color = graphics::Color::from_rgb(val, val, val);

        let mesh = self.context.kind_mesh(&self.kind());
        graphics::draw(
            ctx,
            mesh,
            graphics::DrawParam::default()
                .color(color)
                .transform(transform.to_column_matrix4()),
        )
        .map_err(Error::with_message)
    }
}

impl From<u16> for Concentration {
    fn from(strength: u16) -> Self {
        Self(strength)
    }
}

impl From<Concentration> for Span {
    fn from(concentration: Concentration) -> Self {
        Span::with_length(concentration.0 as u64)
    }
}

impl Concentration {
    /// Decreases the concentration value by a single unit and return the new
    /// concentration.
    pub fn decrease_by(&mut self, value: u16) -> Self {
        self.0 = self.0.saturating_sub(value);
        Self(self.0)
    }

    /// Gets the raw value of the Concentration.
    pub fn value(&self) -> u16 {
        self.0
    }
}

/// Constructs a new mesh for an Phero depending on its kind.
pub fn mesh(
    scent: Scent,
    ctx: &mut ggez::Context,
    conf: &game::Conf,
) -> ggez::GameResult<graphics::Mesh> {
    let color = graphics::Color::WHITE;
    let entity_size =
        entity::size(entity::Kind::phero_with(scent), conf.env.tile_side);
    let tolerance = 0.5;
    let radius = entity_size / 2.0;
    let center = [radius, radius];

    let mut mesh = graphics::MeshBuilder::new();
    mesh.circle(graphics::DrawMode::fill(), center, radius, tolerance, color)?;
    mesh.build(ctx)
}
<reponame>selenologist/ghakuf
extern crate ghakuf;

use ghakuf::messages::*;
use ghakuf::reader::*;
use ghakuf::writer::*;
use std::path;

fn main() {
    // sample messages
    let tempo: u32 = 60 * 1000000 / 102; //bpm:102
    let write_messages: Vec<Message> = vec![
        Message::MetaEvent {
            delta_time: 0,
            event: MetaEvent::SetTempo,
            data: [(tempo >> 16) as u8, (tempo >> 8) as u8, tempo as u8].to_vec(),
        },
        Message::MetaEvent {
            delta_time: 0,
            event: MetaEvent::EndOfTrack,
            data: Vec::new(),
        },
        Message::TrackChange,
        Message::MidiEvent {
            delta_time: 0,
            event: MidiEvent::NoteOn {
                ch: 0,
                note: 0x3c,
                velocity: 0x7f,
            },
        },
        Message::MidiEvent {
            delta_time: 192,
            event: MidiEvent::NoteOn {
                ch: 0,
                note: 0x40,
                velocity: 0,
            },
        },
        Message::MetaEvent {
            delta_time: 0,
            event:


tion
 *
 * An equivalent of #sbp_message_send which operates specifically on
 * sbp_msg_ssr_stec_correction_dep_a_t
 *
 * The given message will be encoded to wire representation and passed in to the
 * given write function callback. The write callback will be called several
 * times for each invocation of this function.
 *
 * @param s SBP state
 * @param sender_id SBP sender id
 * @param msg Message to send
 * @param write Write function
 * @return SBP_OK on success, or other libsbp error code
 */
SBP_EXPORT s8 sbp_msg_ssr_stec_correction_dep_a_send(
    sbp_state_t *s, u16 sender_id,
    const sbp_msg_ssr_stec_correction_dep_a_t *msg, sbp_write_fn_t write);

/**
 * Compare two instances of sbp_msg_ssr_stec_correction_dep_a_t
 *
 * The two instances will be compared and a value returned consistent with the
 * return codes of comparison functions from the C standard library
 *
 * 0 will be returned if \p a and \p b are considered equal
 * A value less than 0 will be returned if \p a is considered to be less than \p
 * b A value greater than 0 will be returned if \p b is considered to be greater
 * than \p b
 *
 * @param a sbp_msg_ssr_stec_correction_dep_a_t instance
 * @param b sbp_msg_ssr_stec_correction_dep_a_t instance
 * @return 0, <0, >0
 */
SBP_EXPORT int sbp_msg_ssr_stec_correction_dep_a_cmp(
    const sbp_msg_ssr_stec_correction_dep_a_t *a,
    const sbp_msg_ssr_stec_correction_dep_a_t *b);

#ifdef __cplusplus
}

static inline bool operator==(const sbp_msg_ssr_stec_correction_dep_a_t &lhs,
                              const sbp_msg_ssr_stec_correction_dep_a_t &rhs) {
  return sbp_msg_ssr_stec_correction_dep_a_cmp(&lhs, &rhs) == 0;
}

static inline bool operator!=(const sbp_msg_ssr_stec_correction_dep_a_t &lhs,
                              const sbp_msg_ssr_stec_correction_dep_a_t &rhs) {
  return sbp_msg_ssr_stec_correction_dep_a_cmp(&lhs, &rhs) != 0;
}

static inline bool operator<(const sbp_msg_ssr_stec_correction_dep_a_t &lhs,
                             const sbp_msg_ssr_stec_correction_dep_a_t &rhs) {
  return sbp_msg_ssr_stec_correction_dep_a_cmp(&lhs, &rhs) < 0;
}

static inline bool operator<=(const sbp_msg_ssr_stec_correction_dep_a_t &lhs,
                              const sbp_msg_ssr_stec_correction_dep_a_t &rhs) {
  return sbp_msg_ssr_stec_correction_dep_a_cmp(&lhs, &rhs) <= 0;
}

static inline bool operator>(const sbp_msg_ssr_stec_correction_dep_a_t &lhs,
                             const sbp_msg_ssr_stec_correction_dep_a_t &rhs) {
  return sbp_msg_ssr_stec_correction_dep_a_cmp(&lhs, &rhs) > 0;
}

static inline bool operator>=(const sbp_msg_ssr_stec_correction_dep_a_t &lhs,
                              const sbp_msg_ssr_stec_correction_dep_a_t &rhs) {
  return sbp_msg_ssr_stec_correction_dep_a_cmp(&lhs, &rhs) >= 0;
}

#endif  // ifdef __cplusplus

#endif /* LIBSBP_SSR_MSG_SSR_STEC_CORRECTION_DEP_A_H */


mitive pointer", map[string]interface{}{"field": "Negate", "value": *sdk.Negate})
	}

	diags.Append(d...)

	tflog.Debug(ctx, "Exiting unpack helper for models.HipObjectsCustomChecksCriteriaPlistInner", map[string]interface{}{"has_errors": diags.HasError()})
	return &sdk, diags

}

// --- Packer for HipObjectsCustomChecksCriteriaPlistInner ---
func packHipObjectsCustomChecksCriteriaPlistInnerFromSdk(ctx context.Context, sdk objects.HipObjectsCustomChecksCriteriaPlistInner) (types.Object, diag.Diagnostics) {
	tflog.Debug(ctx, "Entering pack helper for models.HipObjectsCustomChecksCriteriaPlistInner", map[string]interface{}{"sdk_struct": sdk})
	diags := diag.Diagnostics{}
	var model models.HipObjectsCustomChecksCriteriaPlistInner
	var d diag.Diagnostics
	// Handling Lists
	if sdk.Key != nil {
		tflog.Debug(ctx, "Packing list of objects for field Key")
		packed, d := packHipObjectsCustomChecksCriteriaPlistInnerKeyInnerListFromSdk(ctx, sdk.Key)
		diags.Append(d...)
		model.Key = packed
	} else {
		model.Key = basetypes.NewListNull(models.HipObjectsCustomChecksCriteriaPlistInnerKeyInner{}.AttrType())
	}
	// Handling Primitives
	// Standard primitive packing
	model.Name = basetypes.NewStringValue(sdk.Name)
	tflog.Debug(ctx, "Packed primitive value", map[string]interface{}{"field": "Name", "value": sdk.Name})
	// Handling Primitives
	// Standard primitive packing
	if sdk.Negate != nil {
		model.Negate = basetypes.NewBoolValue(*sdk.Negate)
		tflog.Debug(ctx, "Packed primitive pointer", map[string]interface{}{"field": "Negate", "value": *sdk.Negate})
	} else {
		model.Negate = basetypes.NewBoolNull()
	}
	diags.Append(d...)

	obj, d := types.ObjectValueFrom(ctx, models.HipObjectsCustomChecksCriteriaPlistInner{}.AttrTypes(), &model)
	tflog.Debug(ctx, "Final object to be returned from pack helper", map[string]interface{}{"object": obj})
	diags.Append(d...)
	tflog.Debug(ctx, "Exiting pack helper for models.HipObjectsCustomChecksCriteriaPlistInner", map[string]interface{}{"has_errors": diags.HasError()})
	return obj, diags

}

// --- List Unpacker for HipObjectsCustomChecksCriteriaPlistInner ---
func unpackHipObjectsCustomChecksCriteriaPlistInnerListToSdk(ctx context.Context, list types.List) ([]objects.HipObjectsCustomChecksCriteriaPlistInner, diag.Diagnostics) {
	tflog.Debug(ctx, "Entering list unpack helper for models.HipObjectsCustomChecksCriteriaPlistInner")
	diags := diag.Diagnostics{}
	var data []models.HipObjectsCustomChecksCriteriaPlistInner
	diags.Append(list.ElementsAs(ctx, &data, false)...)
	if diags.HasError() {
		tflog.Error(ctx, "Error converting list elements to Go models", map[string]interface{}{"diags": diags})
		return nil, diags
	}

	ans := make([]objects.HipObjectsCustomChecksCriteriaPlistInner, 0, len(data))
	for i, item := range data {
		tflog.Debug(ctx, "Unpacking item from list", map[string]interface{}{"index": i})
		obj, _ := types.ObjectValueFrom(ctx, models.HipObjectsCustomChecksCriteriaPlistInner{}.AttrTypes(), &item)
		unpacked, d := unpackHipObjectsCustomChecksCriteriaPlistInnerToSdk(ctx


position:absolute;z-index:1000;right:0;top:30px;width:176px;padding:10px 20px;border-radius:12px;line-height:30px}.musicBody .createCenterBox .createCenterMain .mainLeft .mainItem .itemInfo .operation .operationBox .operationItem[data-v-0ef28c54]{cursor:pointer;margin-top:10px}.musicBody .createCenterBox .createCenterMain .mainLeft .mainItem .itemInfo .operation .operationBox .operationItem[data-v-0ef28c54]:nth-child(1){margin-top:0}.musicBody .createCenterBox .createCenterMain .mainRight[data-v-0ef28c54]{position:relative;overflow:hidden;width:382px}.musicBody .createCenterBox .createCenterMain .mainRight .videoDown[data-v-0ef28c54]{position:absolute;z-index:999;width:34px;height:34px;background:rgba(255,255,255,.6);border-radius:17px;display:flex;justify-content:center;align-items:center;cursor:pointer}.musicBody .createCenterBox .createCenterMain .mainRight .videoDown img[data-v-0ef28c54]{width:16px;height:14px;-o-object-fit:scale-down;object-fit:scale-down}.musicBody .createCenterBox .createCenterMain .mainRight .videoDown[data-v-0ef28c54]{right:55px;top:120px}.musicBody .createCenterBox .createCenterMain .mainRight .videoDown .operationBoxDown[data-v-0ef28c54]{display:flex;flex-direction:column;position:absolute;bottom:-80px;padding:10px;width:115px;border-radius:10px}.musicBody .createCenterBox .createCenterMain .mainRight .videoDown .operationBoxDown .operationItem[data-v-0ef28c54]{margin-top:5px;display:flex;justify-content:space-between}.musicBody .createCenterBox .createCenterMain .mainRight .musicInfoDialog.hasMusic[data-v-0ef28c54]{padding-bottom:70px}.musicBody .createCenterBox .createCenterMain .mainRight .musicInfoDialog .introList[data-v-0ef28c54]{text-align:left;padding:0 10px;margin-bottom:10px}.musicBody .createCenterBox .createCenterMain .mainRight .musicInfoDialog .introList>div[data-v-0ef28c54]{word-break:break-all}.musicBody .createCenterBox .createCenterMain .mainRight .musicInfoDialog>div[data-v-0ef28c54]{width:100%;text-align:left;padding-left:10px}.musicBody .createCenterBox .createCenterMain .mainRight .musicInfoDialog[data-v-0ef28c54]::-webkit-scrollbar{display:none}.musicBody .createCenterBox .createCenterMain .mainRight .rightMain[data-v-0ef28c54]{width:100%;height:100%;position:absolute;z-index:10;background:rgba(255,255,255,.24);-webkit-backdrop-filter:blur(30px);backdrop-filter:blur(30px);display:flex;flex-direction:column;align-items:center;overflow-y:auto}.musicBody .createCenterBox .createCenterMain .mainRight .rightMain .musicAvatar[data-v-0ef28c54]{width:148px;height:148px;border-radius:8px;margin-to


a.models.transaction.TransactionStatus.AWAITING_EXECUTION
import io.gnosis.data.models.transaction.TransactionStatus.CANCELLED
import io.gnosis.data.models.transaction.TransactionStatus.FAILED
import io.gnosis.data.models.transaction.TransactionStatus.PENDING
import io.gnosis.data.models.transaction.TransactionStatus.SUCCESS
import io.gnosis.data.models.transaction.TransferInfo
import io.gnosis.data.models.transaction.TxListEntry
import io.gnosis.data.repositories.CredentialsRepository
import io.gnosis.data.repositories.SafeRepository
import io.gnosis.data.repositories.SafeRepository.Companion.METHOD_CHANGE_MASTER_COPY
import io.gnosis.data.repositories.SafeRepository.Companion.METHOD_DISABLE_MODULE
import io.gnosis.data.repositories.SafeRepository.Companion.METHOD_ENABLE_MODULE
import io.gnosis.data.repositories.SafeRepository.Companion.METHOD_REMOVE_OWNER
import io.gnosis.data.repositories.SafeRepository.Companion.METHOD_SET_FALLBACK_HANDLER
import io.gnosis.data.repositories.TransactionLocalRepository
import io.gnosis.data.repositories.TransactionRepository
import io.gnosis.safe.R
import io.gnosis.safe.TestLifecycleRule
import io.gnosis.safe.TestLiveDataObserver
import io.gnosis.safe.appDispatchers
import io.gnosis.safe.ui.base.BaseStateViewModel
import io.gnosis.safe.ui.transactions.TransactionListViewModel.Companion.OPACITY_FULL
import io.gnosis.safe.ui.transactions.TransactionListViewModel.Companion.OPACITY_HALF
import io.gnosis.safe.ui.transactions.paging.TransactionPagingProvider
import io.gnosis.safe.ui.transactions.paging.TransactionPagingSource
import io.gnosis.safe.utils.BalanceFormatter
import io.gnosis.safe.utils.formatBackendDateTime
import io.gnosis.safe.utils.formatBackendTimeOfDay
import io.mockk.Called
import io.mockk.coEvery
import io.mockk.coVerify
import io.mockk.coVerifySequence
import io.mockk.mockk
import kotlinx.coroutines.flow.emptyFlow
import kotlinx.coroutines.flow.flow
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Rule
import org.junit.Test
import pm.gnosis.model.Solidity
import pm.gnosis.utils.asEthereumAddress
import pm.gnosis.utils.asEthereumAddressString
import java.math.BigInteger
import java.util.Date

class TransactionListViewModelTest {

    @get:Rule
    val instantExecutorRule = TestLifecycleRule()

    private lateinit var transactionListViewModel: TransactionListViewModel

    private val safeRepository = mockk<SafeRepository>()
    private val transactionRepository = mockk<TransactionRepository>()
    private val transactionLocalRepository = mockk<TransactionLocalRepository>()
    private val credentialsRepository = mockk<CredentialsRepository>()
    private val transactionPagingProvider = mockk<TransactionPagingProvider>()

    private val balanceFormatter = BalanceFormatter()
    private val DS = balanceFormatter.decimalSeparator
    private val GS = balanceFormatter.groupingSeparator

    private val defaultSafeName: String = "Default Name"
    private val defaultSafeAddress: Solidity.Address = "0x1234".asEthereumAddress()!!
    private val defaultToAddress: Solidity.Address = "0x12345678".asEthereumAddress()!!
    private val defaultFactoryAddress: Solidity.Address = "0x12345678DeadBeef".asEthereumAddress()!!
    private val defaultFromAddress: Solidity.Address = "0x1234567890".asEthereumAddress()!!
    private val defaultModuleAddress: Solidity.Address = "0x25F73b24B866963B0e560fFF9bbA7908be0263E8".asEthereumAddress()!!
    private val defaultFallbackHandler: Solidity.Address = "0xd5D82


        }
        [DispId(4)]
        bool SmpAffinitized
        {
            get;
        }
        [DispId(5)]
        uint SmpProcessorAffinityMask
        {
            get;
        }
        [DispId(6)]
        uint SmpProcessorAffinityMask2
        {
            get;
        }
        [DispId(7)]
        int ProcessorGroup
        {
            get;
        }
        [DispId(8)]
        uint NumaNodeAssignment
        {
            get;
        }
        [DispId(9)]
        uint NumaNodeAffinityMode
        {
            get;
        }
    }
}


, the browser's
 * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)
 * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)
 * policy may further restrict whether the template is successfully loaded.
 * For example, `ngInclude` won't work for cross-domain requests on all browsers and for `file://`
 * access on some browsers.
 *
 * @animations
 * enter - animation is used to bring new content into the browser.
 * leave - animation is used to animate existing content away.
 *
 * The enter and leave animation occur concurrently.
 *
 * @scope
 * @priority 400
 *
 * @param {string} ngInclude|src angular expression evaluating to URL. If the source is a string constant,
 *                 make sure you wrap it in **single** quotes, e.g. `src="'myPartialTemplate.html'"`.
 * @param {string=} onload Expression to evaluate when a new partial is loaded.
 *

 *                  **Note:** When using onload on SVG elements in IE11, the browser will try to call
 *                  a function with the name on the window element, which will usually throw a
 *                  "function is undefined" error. To fix this, you can instead use `data-onload` or a
 *                  different form that {@link guide/directive#normalization matches} `onload`.
 *

   *
 * @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll
 *                  $anchorScroll} to scroll the viewport after the content is loaded.
 *
 *                  - If the attribute is not set, disable scrolling.
 *                  - If the attribute is set without value, enable scrolling.
 *                  - Otherwise enable scrolling only if the expression evaluates to truthy value.
 *
 * @example
  <example module="includeExample" deps="angular-animate.js" animations="true">
    <file name="index.html">

       <select ng-model="template" ng-options="t.name for t in templates">
        <option value="">(blank)</option>
       </select>
       url of the template: {{template.url}}

    </file>
    <file name="script.js">
      angular.module('includeExample', ['ngAnimate'])
        .controller('ExampleController', ['$scope', function($scope) {
          $scope.templates =
            [ { name: 'template1.html', url: 'template1.html'},
              { name: 'template2.html', url: 'template2.html'} ];
          $scope.template = $scope.templates[0];
        }]);
     </file>
    <file name="template1.html">
      Content of template1.html
    </file>
    <file name="template2.html">
      Content of template2.html
    </file>
    <file name="animations.css">
      .slide-animate-container {
        position:relative;
        background:white;
        border:1px solid black;
        height:40px;
        overflow:hidden;
      }

      .slide-animate {
        padding:10px;
      }

      .slide-animate.ng-enter, .slide-animate.ng-leave {
        transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;

        position:absolute;
        top:0;
        left:0;
        right:0;
        bottom:0;
        display:block;
        padding:10px;
      }

      .slide-animate.ng-enter {
        top:-50px;
      }
      .slide-animate.ng-enter.ng-enter-active {
        top:0;
      }

      .slide-animate.ng-leave {
        top:0;
      }
      .slide-animate.ng-leave.ng-leave-active {
        top:50px;
      }
    </file>
    <file


send(WsMessage("hello"))
        assertThat(client.received().take(1).toList(), equalTo(listOf(WsMessage("foo"))))
    }

    @Test
    fun `can connect with non-blocking client`() {
        val client = WebsocketClient.nonBlocking(Uri.of("ws://localhost:$port/hello/bob"))
        val latch = CountDownLatch(1)
        client.onMessage {
            latch.countDown()
        }

        latch.await()
    }

    @Test
    fun `should fail on invalid url`() {
        assertThat({
            val client = WebsocketClient.blocking(
                Uri.of("ws://localhost:$port/aaa"),
                timeout = Duration.ZERO
            )

            client.send(WsMessage("hello"))
        }, throws<WebsocketNotConnectedException>())
    }

    @Test
    fun `can send and receive multi-frame messages from socket`() {
        val client = WebsocketClient.blocking(Uri.of("ws://localhost:$port/echo"))

        val longMessage = WsMessage((1..10000).joinToString("") { "a" })
        client.send(longMessage)

        val anotherMessage = WsMessage("another message")
        client.send(anotherMessage)

        assertThat(client.received().take(2).toList(), equalTo(listOf(longMessage, anotherMessage)))
    }

    @Test
    open fun `can receive headers from upgrade request`() {
        val client = WebsocketClient.blocking(
            Uri.of("ws://localhost:$port/headers"),
            listOf("Foo" to "bar")
        )

        assertThat(
            client.received().take(1).first().bodyString(),
            containsSubstring("Foo=bar")
        )
    }
}
package org.http4k.bridge

import com.natpryce.hamkrest.assertion.assertThat
import com.natpryce.hamkrest.equalTo
import io.micronaut.http.HttpRequestFactory
import io.micronaut.http.annotation.Controller
import org.http4k.core.HttpHandler
import org.http4k.core.Request
import org.http4k.core.Response
import org.http4k.core.Status
import org.junit.jupiter.api.Test
import java.io.InputStream

class MicronautToHttp4kFallbackControllerTest {

    @Controller("/")
    class TestController(override val http4k: HttpHandler) : MicronautToHttp4kFallbackController

    @Test
    fun `passes requests through and adapts to servlet`() {
        val controller = TestController { req: Request -> Response(Status.OK).body(req.body).headers(req.headers) }

        val mn = HttpRequestFactory.INSTANCE.get<InputStream>("/bob").header("foo", "bar")
            .body("helloworld".byteInputStream() as InputStream)

        val output = controller.post(mn)

        assertThat(output.status.code, equalTo(200))
        assertThat(output.headers["foo"], equalTo("bar"))
        assertThat(output.body().reader().readText(), equalTo("helloworld"))
    }
}
package org.http4k.multipart

import org.junit.jupiter.api.Test
import java.nio.charset.Charset
import java.nio.charset.StandardCharsets

class StreamingMultipartFormEncodingTest {

    @Test
    fun uploadUTF8() {
        testForm(constructForm(StandardCharsets.UTF_8), "\u00E9", "\uD83D\uDCA9", StandardCharsets.UTF_8)
    }

    @Test
    fun uploadISO_8859_1() {
        testForm(constructForm(StandardCharsets.ISO_8859_1), "\u00E9", "?", StandardCharsets.ISO_8859_1)
    }

    @Test
    fun uploadUTF_16BE() {
        testForm(constructForm(StandardCharsets.UTF_16BE), "\u00E9", "\uD83D\uDCA9", StandardCharsets.UTF_16BE)
    }

    @Test
    fun uploadUTF_16LE() {
        testForm(constructForm(StandardCharsets.UTF_16LE), "\u00E9", "\u


_version(lua_State *L)
{
	lua_createtable(L, 0, 3);
	int table = lua_gettop(L);

	lua_pushstring(L, PROJECT_NAME_C);
	lua_setfield(L, table, "project");

	lua_pushstring(L, g_version_string);
	lua_setfield(L, table, "string");

	lua_pushnumber(L, SERVER_PROTOCOL_VERSION_MIN);
	lua_setfield(L, table, "proto_min");

	lua_pushnumber(L, LATEST_PROTOCOL_VERSION);
	lua_setfield(L, table, "proto_max");

	if (strcmp(g_version_string, g_version_hash) != 0) {
		lua_pushstring(L, g_version_hash);
		lua_setfield(L, table, "hash");
	}

	lua_pushboolean(L, DEVELOPMENT_BUILD);
	lua_setfield(L, table, "is_dev");
	return 1;
}

int ModApiUtil::l_sha1(lua_State *L)
{
	NO_MAP_LOCK_REQUIRED;

	auto data = readParam<std::string_view>(L, 1);
	bool hex = !lua_isboolean(L, 2) || !readParam<bool>(L, 2);

	// Compute actual checksum of data
	std::string data_sha1 = hashing::sha1(data);

	if (hex) {
		std::string sha1_hex = hex_encode(data_sha1);
		lua_pushstring(L, sha1_hex.c_str());
	} else {
		lua_pushlstring(L, data_sha1.data(), data_sha1.size());
	}

	return 1;
}

int ModApiUtil::l_sha256(lua_State *L)
{
	NO_MAP_LOCK_REQUIRED;

	auto data = readParam<std::string_view>(L, 1);
	bool hex = !lua_isboolean(L, 2) || !readParam<bool>(L, 2);

	std::string data_sha256 = hashing::sha256(data);

	if (hex) {
		lua_pushstring(L, hex_encode(data_sha256).c_str());
	} else {
		lua_pushlstring(L, data_sha256.data(), data_sha256.size());
	}

	return 1;
}

// colorspec_to_colorstring(colorspec)
int ModApiUtil::l_colorspec_to_colorstring(lua_State *L)
{
	NO_MAP_LOCK_REQUIRED;

	video::SColor color(0);
	if (read_color(L, 1, &color)) {
		char colorstring[10];
		snprintf(colorstring, 10, "#%02X%02X%02X%02X",
			color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha());
		lua_pushstring(L, colorstring);
		return 1;
	}

	return 0;
}

// colorspec_to_bytes(colorspec)
int ModApiUtil::l_colorspec_to_bytes(lua_State *L)
{
	NO_MAP_LOCK_REQUIRED;

	video::SColor color(0);
	if (read_color(L, 1, &color)) {
		u8 colorbytes[4] = {
			(u8) color.getRed(),
			(u8) color.getGreen(),
			(u8) color.getBlue(),
			(u8) color.getAlpha(),
		};
		lua_pushlstring(L, (const char*) colorbytes, 4);
		return 1;
	}

	return 0;
}

// colorspec_to_table(colorspec)
int ModApiUtil::l_colorspec_to_table(lua_State *L)
{
	NO_MAP_LOCK_REQUIRED;

	video::SColor color(0);
	if (read_color(L, 1, &color)) {
		push_ARGB8(L, color);
		return 1;
	}

	return 0;
}

// time_to


X_OpRsh8x32(v *Value) bool {
	v_1 := v.Args[1]
	v_0 := v.Args[0]
	b := v.Block
	typ := &b.Func.Config.Types
	// match: (Rsh8x32 x y)
	// cond: shiftIsBounded(v)
	// result: (SRAW (MOVBreg x) y)
	for {
		x := v_0
		y := v_1
		if !(shiftIsBounded(v)) {
			break
		}
		v.reset(OpS390XSRAW)
		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
		v0.AddArg(x)
		v.AddArg2(v0, y)
		return true
	}
	// match: (Rsh8x32 x y)
	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
	for {
		x := v_0
		y := v_1
		v.reset(OpS390XSRAW)
		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
		v0.AddArg(x)
		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
		v2.AuxInt = int64ToAuxInt(63)
		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
		v3.AuxInt = int32ToAuxInt(64)
		v3.AddArg(y)
		v1.AddArg3(y, v2, v3)
		v.AddArg2(v0, v1)
		return true
	}
}
func rewriteValueS390X_OpRsh8x64(v *Value) bool {
	v_1 := v.Args[1]
	v_0 := v.Args[0]
	b := v.Block
	typ := &b.Func.Config.Types
	// match: (Rsh8x64 x y)
	// cond: shiftIsBounded(v)
	// result: (SRAW (MOVBreg x) y)
	for {
		x := v_0
		y := v_1
		if !(shiftIsBounded(v)) {
			break
		}
		v.reset(OpS390XSRAW)
		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
		v0.AddArg(x)
		v.AddArg2(v0, y)
		return true
	}
	// match: (Rsh8x64 x y)
	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
	for {
		x := v_0
		y := v_1
		v.reset(OpS390XSRAW)
		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
		v0.AddArg(x)
		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
		v2.AuxInt = int64ToAuxInt(63)
		v3 := b.NewValue0(v.Pos, O


_SMI 		50
#define MV_SEMA_RTC 		51
#define MV_SEMA_NOR_FLASH 	0
#define MV_SEMA_BOOT 		1
#define MV_SEMA_PEX0 		2
#define MV_SEMA_BRIDGE 		3
#define MV_SEMA_IRQ 		4
#define MV_SEMA_CLOCK		5
#define MV_SEMA_L2		6
#define MV_SEMA_TWSI		7
#define MV_SEMA_ADR_WIN		8
#define MV_SEMA_GIC		9
#define MV_SEMA_CLOCK_INIT	10

#define MV_SEMA_BARRIER(cpu)	(50 + cpu)

#endif /* CONFIG_ALP_HW_SEMAPHORE_WA */

#define MV_LOCK_SEMA		0x10C

MV_BOOL mvSemaLock(MV_32 num);
MV_BOOL mvSemaTryLock(MV_32 num);
MV_BOOL mvSemaUnlock(MV_32 num);
MV_32   mvReadAmpReg(int regId);
MV_32 	mvWriteAmpReg(int regId, MV_32 value);

/* Turn on HW semapores only if AMP is enabled */
#ifndef CONFIG_MV_AMP_ENABLE
#define mvSemaLock
#define mvSemaTryLock
#define mvSemaUnlock
#define mvHwBarrier
#endif /* CONFIG_MV_AMP_ENABLE */

#endif /* mvsemaphore_h */


Completed, jobID)
	}

	ps2 := mustInsertPipelineSpec(t, db)

	jobID2 := ps2.ID
	// ps2 has:
	// - 12 completed runs
	// - 3 errored runs
	// - 3 running runs
	// - 3 suspended run
	for i := 0; i < 12; i++ {
		mustInsertPipelineRunWithStatus(t, db, ps2.ID, pipeline.RunStatusCompleted, jobID2)
	}
	for i := 0; i < 3; i++ {
		mustInsertPipelineRunWithStatus(t, db, ps2.ID, pipeline.RunStatusErrored, jobID2)
	}
	for i := 0; i < 3; i++ {
		mustInsertPipelineRunWithStatus(t, db, ps2.ID, pipeline.RunStatusRunning, jobID2)
	}
	for i := 0; i < 3; i++ {
		mustInsertPipelineRunWithStatus(t, db, ps2.ID, pipeline.RunStatusSuspended, jobID2)
	}

	porm.Prune(t.Context(), jobID2)

	cnt := pgtest.MustCount(t, db, "SELECT count(*) FROM pipeline_runs WHERE pipeline_spec_id = $1 AND state = $2", ps1.ID, pipeline.RunStatusCompleted)
	assert.Equal(t, 20, cnt)

	cnt = pgtest.MustCount(t, db, "SELECT count(*) FROM pipeline_runs WHERE pipeline_spec_id = $1 AND state = $2", ps2.ID, pipeline.RunStatusCompleted)
	assert.Equal(t, 2, cnt)
	cnt = pgtest.MustCount(t, db, "SELECT count(*) FROM pipeline_runs WHERE pipeline_spec_id = $1 AND state = $2", ps2.ID, pipeline.RunStatusErrored)
	assert.Equal(t, 3, cnt)
	cnt = pgtest.MustCount(t, db, "SELECT count(*) FROM pipeline_runs WHERE pipeline_spec_id = $1 AND state = $2", ps2.ID, pipeline.RunStatusRunning)
	assert.Equal(t, 3, cnt)
	cnt = pgtest.MustCount(t, db, "SELECT count(*) FROM pipeline_runs WHERE pipeline_spec_id = $1 AND state = $2", ps2.ID, pipeline.RunStatusSuspended)
	assert.Equal(t, 3, cnt)
}

func mustInsertPipelineRunWithStatus(t *testing.T, db *sqlx.DB, pipelineSpecID int32, status pipeline.RunStatus, jobID int32) (runID int64) {
	var finishedAt *time.Time
	var outputs jsonserializable.JSONSerializable
	var allErrors pipeline.RunErrors
	var fatalErrors pipeline.RunErrors
	now := time.Now()
	switch status {
	case pipeline.RunStatusCompleted:
		finishedAt = &now
		outputs = jsonserializable.JSONSerializable{
			Val:   "foo",
			Valid: true,
		}
	case pipeline.RunStatusErrored:
		finishedAt = &now
		allErrors = []null.String{null.StringFrom("oh no!")}
		fatalErrors = []null.String{null.StringFrom("oh no!")}
	case pipeline.RunStatusRunning, pipeline.RunStatusSuspended:
		// leave empty
	default:
		t.Fatalf("unknown status: %s", status)
	}
	require.NoError(t, db.Get(&runID, `INSERT INTO pipeline_runs (state,pipeline_spec_id,pruning_key,finished_at,outputs,all_errors,fatal_errors,created_at) VALUES ($1, $2, $3, $4, $5, $6, $7, NOW()) RETURNING id`, status, pipelineSpecID, jobID, finishedAt, outputs, allErrors, fatalErrors))
	return runID
}

func mustInsertPipelineSpec(t *testing.T, db *sqlx.DB) (spec pipeline.Spec) {
	err := db.Get(&spec, `INSERT INTO pipeline_specs (dot_dag_source


" [人名] 塔巴顿",
"tarc":"abbr. Tactical Air Reconnaissance Center <美>战术空军侦察中心",
"Tarchanoff phenomenon":"[网络] 塔奇诺夫现象",
"tarcher":" [人名] 塔彻",
"tard":"n. (Tard)人名；(法)塔尔",
"tarda":" [医]迟",
"tardamente":"<意> adv.[音]徐缓地",
"tardan":"[化] 泰尔登",
"Tardenoisian":"[考古]n.塔登努阿文化(欧洲中石器时代文化)",
"tardier":"a. 行动缓慢的( tardy的比较级 ); 缓缓移动的; 晚的; 迟的",
"tardiest":"a. 行动缓慢的( tardy的最高级 ); 缓缓移动的; 晚的; 迟的",
"Tardieu's eccbymoses":"[医] 塔迪厄氏瘀斑, 巴雅耳氏瘀斑",
"Tardieu's spots":"[医] 塔迪厄氏点(瘀斑)",
"Tardieu's test":"[医] 塔迪厄氏试验(检杀婴)",
"tardif":" [人名] [英格兰人姓氏] 塔迪夫绰号，懒汉，来源于中世纪英语及古法语，含义是“慢的”(slow)",
"tardigrada":" 缓步类",
"tardigrade":"a. 缓步的, 缓步类的\\nn. 缓步类动物, 节肢动物",
"tardigrades":"(tardigrade 的第三人称 -s形式) a. 缓步的, 缓步类的\\nn. 缓步类动物, 节肢动物",
"tardily":"adv. 缓慢地, 迟, 迟延地",
"tardin":"缓青霉素",
"tardiness":"n. 慢, 缓慢, 迟延",
"tardis":"abbr. Traffic and Roads Drive Integrated Systems 交通和道路驾驶综合系统",
"tardive":"a. 迟缓的",
"tardive cyanosis":"[医] 迟发性发绀",
"tardive dyskinesia":" 迟发性运动障碍",
"tardivel":" [人名] 塔迪韦尔",
"tardo":"a. 缓慢的\\nadv. 缓慢地",
"tardocillin":"[化] 苄星青霉素; 长效西林",
"tardus tremor":"[医] 慢震颤, 粗大震颤",
"tardy":"a. 慢的, 迟到的, 勉强的, 拖拉的, 迟的",
"tardy epilepsy":"[医] 迟发性癫痫",
"tardy infantilism":"[医] 迟发性幼稚型(成年期发育停顿)",
"tardy rickets":"[医] 迟发佝偻病",
"tardyon":"n. [核]慢


\x02AD\x02AD\x04Ngat\x03Taa\x03Iwo" +
	"\x03Mam\x03Paa\x03Nge\x03Roo\x03Bur\x03Epe\x03Kpt\x03Kpa\x02AD\x06н.е." +
	"\x03Jtt\x03Jnn\x03Jtn\x03Alh\x03Iju\x03Jmo\x03Ati\x03Ata\x03Ala\x03Alm" +
	"\x03Alz\x03Asi\x02AD\x10джайстха\x0eшравана\x0cбхадра\x0cасвіна\x0eкарті" +
	"ка\x12аграхаяна\x0aпауса\x10фальгуна"

var bucket10 string = "" + // Size: 24060 bytes
	"\x03zan\x03feb\x03mar\x03awi\x03mɛ\x03zuw\x03zul\x03uti\x04sɛt\x04ɔku" +
	"\x03now\x03des\x07zanwuye\x08feburuye\x06marisi\x07awirili\x06zuwɛn\x06z" +
	"uluye\x0asɛtanburu\x0bɔkutɔburu\x09nowanburu\x09desanburu\x01Z\x01F\x01M" +
	"\x01A\x01U\x01S\x02Ɔ\x01N\x01D\x03kar\x04ntɛ\x03tar\x03ara\x03ala\x03jum" +
	"\x03sib\x04kari\x07ntɛnɛ\x06tarata\x05araba\x07alamisa\x04juma\x06sibiri" +
	"\x03KS1\x03KS2\x03KS3\x03KS4\x10kalo saba fɔlɔ\x11kalo saba filanan\x11k" +
	"alo saba sabanan\x12kalo saba naaninan\x11jezu krisiti ɲɛ\x13jezu krisit" +
	"i minkɛ\x0aJ.-C. ɲɛ\x08ni J.-C.\x04tile\x03san\x04kalo\x09dɔgɔkun\x03don" +
	"\x04kunu\x02bi\x04sini\x15sɔgɔma/tile/wula/su\x06lɛrɛ\x06miniti\x07sekon" +


String].
///
/// The characters of a string are encoded in UTF-16. Decoding UTF-16, which
/// combines surrogate pairs, yields Unicode code points. Following a similar
/// terminology to Go, Dart uses the name 'rune' for an integer representing a
/// Unicode code point. Use the `runes` property to get the runes of a string.
///
/// Example:
/// ```dart
/// const string = 'Dart';
/// final runes = string.runes.toList();
/// print(runes); // [68, 97, 114, 116]
/// ```
///
/// For a character outside the Basic Multilingual Plane (plane 0) that is
/// composed of a surrogate pair, runes combines the pair and returns a
/// single integer.
///
/// For example, the Unicode character for "Man" emoji ('👨', `U+1F468`) is
/// combined from the surrogates `U+d83d` and `U+dc68`.
///
/// Example:
/// ```dart
/// const emojiMan = '👨';
/// print(emojiMan.runes); // (128104)
///
/// // Surrogate pairs:
/// for (final item in emojiMan.codeUnits) {
///   print(item.toRadixString(16));
///   // d83d
///   // dc68
/// }
/// ```
///
/// **See also:**
/// * [Runes and grapheme clusters](
/// https://dart.dev/guides/language/language-tour#runes-and-grapheme-clusters)
/// in
/// [A tour of the Dart language](https://dart.dev/guides/language/language-tour).
class Runes extends Iterable<int> {
  /// The string that this is the runes of.
  final String string;

  /// Creates a [Runes] iterator for [string].
  Runes(this.string);

  RuneIterator get iterator => RuneIterator(string);

  int get last {
    if (string.length == 0) {
      throw StateError('No elements.');
    }
    int length = string.length;
    int code = string.codeUnitAt(length - 1);
    if (_isTrailSurrogate(code) && string.length > 1) {
      int previousCode = string.codeUnitAt(length - 2);
      if (_isLeadSurrogate(previousCode)) {
        return _combineSurrogatePair(previousCode, code);
      }
    }
    return code;
  }
}

// Is then code (a 16-bit unsigned integer) a UTF-16 lead surrogate.
bool _isLeadSurrogate(int code) => (code & 0xFC00) == 0xD800;

// Is then code (a 16-bit unsigned integer) a UTF-16 trail surrogate.
bool _isTrailSurrogate(int code) => (code & 0xFC00) == 0xDC00;

// Combine a lead and a trail surrogate value into a single code point.
int _combineSurrogatePair(int start, int end) {
  return 0x10000 + ((start & 0x3FF) << 10) + (end & 0x3FF);
}

/// [Iterator] for reading runes (integer Unicode code points) of a Dart string.
class RuneIterator implements BidirectionalIterator<int> {
  /// String being iterated.
  final String string;

  /// Position before the current code point.
  int _position;

  /// Position after the current code point.
  int _nextPosition;

  /// Current code point.
  ///
  /// If the iterator has hit either end, the [_currentCodePoint] is -1
  /// and `_position == _nextPosition`.
  int _currentCodePoint = -1;

  /// Create an iterator positioned at the beginning of the string.
  RuneIterator(String string)
      : this.string = string,
        _position = 0,
        _nextPosition = 0;

  /// Create an iterator positioned before the [index]th code unit of the string.
  ///
  /// When created, there is no [current] value.
  /// A [moveNext] will use the rune starting at [index] the current value,
  /// and a [movePrevious] will use the rune ending just before [index] as
  /// the current value.
  ///
  /// The [index] p


| currentAnim->frameNum + minRemainingTrapReQueueFrames > currentAnim->touchFrame || reQueueDelayFrames > 0)) return false;

    // too similar to what we are already trying to accomplish
    if (currentAnim->originatingCommand.desiredFunctionType == command.desiredFunctionType &&
        ((currentAnim->originatingCommand.desiredDirection * currentAnim->originatingCommand.desiredVelocityFloat) - (command.desiredDirection * command.desiredVelocityFloat)).GetLength() < 1.5f) {
      return false;
    }

    // requeue not needed?
    if ((currentAnim->functionType == e_FunctionType_Movement && command.desiredFunctionType == e_FunctionType_Movement) ||
        (currentAnim->functionType == e_FunctionType_BallControl && command.desiredFunctionType == e_FunctionType_BallControl) ||
        (currentAnim->functionType == e_FunctionType_Trap && command.desiredFunctionType == e_FunctionType_BallControl) ||
        (currentAnim->functionType == e_FunctionType_Trap && command.desiredFunctionType == e_FunctionType_Trap)) {

      // current change in momentum
      Vector3 plannedMomentumChange = currentAnim->outgoingMovement - currentAnim->incomingMovement;
      Vector3 desiredMomentumChange = (command.desiredDirection * command.desiredVelocityFloat) - spatialState.movement;

      if ((desiredMomentumChange.GetDotProduct(plannedMomentumChange) > 0.0f && desiredMomentumChange.GetDistance(plannedMomentumChange) < 4.0f) ||
          desiredMomentumChange.GetDotProduct(plannedMomentumChange) > 0.8f || desiredMomentumChange.GetDistance(plannedMomentumChange) < 2.0f) {
        return false;
      }

    }

    // don't requeue movement to ballcontrol halfway movement anims, unless there's a serious change of movement desired
    if ((currentAnim->functionType == e_FunctionType_Movement) && command.desiredFunctionType == e_FunctionType_BallControl && (match->GetActualTime_ms() - CastPlayer()->GetLastTouchTime_ms() < 600 && CastPlayer()->GetLastTouchType() == e_TouchType_Intentional_Kicked) && CastPlayer()->HasPossession()) {// && !CastPlayer()->AllowLastDitch()) {
      float desiredMovementChange = (spatialState.movement - (command.desiredDirection * command.desiredVelocityFloat)).GetLength();
      if (desiredMovementChange < 1.0f) return false;
    }

  }

  if (localInterruptAnim != e_InterruptAnim_ReQueue || currentAnim->frameNum > 12) CalculateFactualSpatialState();
  //if (player->GetDebug()) printf("time: %lu\n", match->GetActualTime_ms());

  assert(command.desiredLookAt.coords[2] == 0.0f);

  // CREATE A CRUDE SET OF POTENTIAL ANIMATIONS

  CrudeSelectionQuery query;

  query.byFunctionType = true;
  query.functionType = command.desiredFunctionType;

  query.byFoot = false;
  query.foot = spatialState.foot == e_Foot_Left ? e_Foot_Right : e_Foot_Left;

  // query.heedForcedFoot = true;
  // query.strongFoot = e_Foot_Right; // todo: take from player data

  // hax: long pass uses same anims as short pass
  if (query.functionType == e_FunctionType_LongPass) query.functionType = e_FunctionType_ShortPass;

  if (command.touchInfo.desiredPower != 0.0f) {
    query.byOutgoingBallDirection = true;
    query.outgoingBallDirection = command.touchInfo.desiredDirection.GetRotated2D(-spatialState.angle);
  }

  query.byIncomingVelocity = true;
  query.incomingVelocity = spatialState.enumVelocity;

  if (query.functionType != e_FunctionType_Movement && query.incomingVelocity == e_Velocity_Dribble) query.incomingVelocity = e_Velocity_Walk;

  query.incomingVelocity_St


�时长。
     */
    /**
     * Reports the render duration.
     * @param renderDuration The render duration.
     */
    (renderDuration: number)=>void;

    onPPTLoadProgress:
    /**
     * PPT 文件转网页时，加载 PPT 文件的进度回调。
     *
     * @param uuid 转换任务的 UUID。
     * @param progress 加载进度，取值范围为 [0.0, 1.0]。
     */
    /**
     * Reports the progress of loading the PPT file when converting it to web pages.
     *
     * @param uuid The unique identifier of the conversion task (Task UUID).
     * @param progress The loading progress. The value range is [0.0, 1.0].
     */
    (uuid: string, progress: number)=>void;

    onPPTMediaPlay:
    /**
     * 播放动态 PPT 中媒体文件的回调。
     * @param shapeId 插入媒体文件的 shape 对象的 ID。
     * @param type 媒体文件的类型。
     */
    /**
     * Occurs when a media file in the dynamic PPT starts playing.
     * @param shapeId The ID of the shape where the media file is inserted.
     * @param type The type of the media file.
     */
    (shapeId: string, type: MediaType)=>void;

    onPPTMediaPause:
    /**
     * 暂停播放动态 PPT 中媒体文件的回调。
     * @param shapeId 插入媒体文件的 shape 对象的 ID。
     * @param type 媒体文件的类型。
     */
    /**
     * Occurs when a media file in the dynamic PPT stops playing.
     * @param shapeId The ID of the shape where the media file is inserted.
     * @param type The type of the media file.
     */
    (shapeId: string, type: MediaType)=>void;
};

/**
 * The `Room` interface contains methods to operate a live Interactive Whiteboard room.
 */
export declare interface Room extends Displayer {

    /**
     * 房间当前 session 的 UUID。如果开启了自动日志上报功能，日志中会上报该参数。如果上报时尚未与服务器建立连接，则为 `undefined`。
     */
    /**
     * The unique identifier (UUID) of the current session in the room. If you enable the SDK to report logs all the time, this parameter is reported in the logs.
     * If the SDK has not connected to the server when reporting logs, this parameter is shown as `undefined`.
     */
    readonly session: string;

    /**
     * 是否禁止用户通过鼠标、键盘、触摸屏幕操作白板工具。
     * - `true`： 禁止。
     * - `false`：不禁止。
     *
     * 该方法与 `isWritable` 的区别详见[《禁止设备操作｜禁止操作》](/javascript-zh/home/disable#禁止设备操作)。
     */
    /**
     * Whether to disable the user from operating the whiteboard tools through the mouse, keyboard, or touchscreen:
     * - `true`：Disable the user from operating the whiteboard tools.
     * - `false`：Enable the user to operate the whiteboard tools.
     *
     * This method is different from `isWritable`. See [Prohibited operation](https://developer.netless.link/javascript-en/home/disable#Prohibit-device-operation).
     */
    disableDeviceInputs: boolean;

    /**
     * 远端白板画面的同步延时，单位为毫秒，默认值为


0 0042A8B0  4E 80 04 21 */	bctrl
.L_8042D974:
/* 8042D974 0042A8B4  7F 83 E3 78 */	mr r3, r28
/* 8042D978 0042A8B8  38 80 00 01 */	li r4, 1
/* 8042D97C 0042A8BC  38 A0 00 00 */	li r5, 0
/* 8042D980 0042A8C0  48 00 0A 09 */	bl unsuspend__Q24Game11MoviePlayerFlb
.L_8042D984:
/* 8042D984 0042A8C4  57 60 06 3F */	clrlwi. r0, r27, 0x18
/* 8042D988 0042A8C8  41 82 FF 98 */	beq .L_8042D920
.L_8042D98C:
/* 8042D98C 0042A8CC  38 00 00 01 */	li r0, 1
/* 8042D990 0042A8D0  7F 83 E3 78 */	mr r3, r28
/* 8042D994 0042A8D4  98 1C 00 A4 */	stb r0, 0xa4(r28)
/* 8042D998 0042A8D8  83 7C 00 B0 */	lwz r27, 0xb0(r28)
/* 8042D99C 0042A8DC  48 00 05 A9 */	bl stop__Q24Game11MoviePlayerFv
/* 8042D9A0 0042A8E0  80 6D 9A A0 */	lwz r3, gGame2DMgr__6Screen@sda21(r13)
/* 8042D9A4 0042A8E4  38 00 00 00 */	li r0, 0
/* 8042D9A8 0042A8E8  38 80 00 02 */	li r4, 2
/* 8042D9AC 0042A8EC  80 63 00 18 */	lwz r3, 0x18(r3)
/* 8042D9B0 0042A8F0  98 03 00 92 */	stb r0, 0x92(r3)
/* 8042D9B4 0042A8F4  80 6D 96 A0 */	lwz r3, cameraMgr__4Game@sda21(r13)
/* 8042D9B8 0042A8F8  4B E2 4B 25 */	bl controllerUnLock__Q24Game9CameraMgrFi
/* 8042D9BC 0042A8FC  80 6D 93 E8 */	lwz r3, gameSystem__4Game@sda21(r13)
/* 8042D9C0 0042A900  38 BF 01 A0 */	addi r5, r31, 0x1a0
/* 8042D9C4 0042A904  38 80 00 00 */	li r4, 0
/* 8042D9C8 0042A908  38 C0 00 03 */	li r6, 3
/* 8042D9CC 0042A90C  4B D8 75 C9 */	bl setPause__Q24Game10GameSystemFbPci
/* 8042D9D0 0042A910  80 6D 9A A0 */	lwz r3, gGame2DMgr__6Screen@sda21(r13)
/* 8042D9D4 0042A914  28 03 00 00 */	cmplwi r3, 0
/* 8042D9D8 0042A918  41 82 00 08 */	beq .L_8042D9E0
/* 8042D9DC 0042A91C  4B FD 0F 2D */	bl restartFinalFloorSound__Q26Screen9Game2DMgrFv
.L_8042D9E0:
/* 8042D9E0 0042A920  80 7C 00 B4 */	lwz r3, 0xb4(r28)
/* 8042D9E4 0042A924  28 03 00 00 */	cmplwi r3, 0
/* 8042D9E8 0042A928  41 82 00 20


-button.btn-warning, paper-icon-button[warning] { color: #ffb74d; }
paper-icon-button.warning:hover, paper-icon-button.btn-warning:hover, paper-icon-button[warning]:hover { background-color: #f6efe4; background-color: rgba(255, 183, 77, 0.2); border-radius: 50%; }
paper-icon-button.error, paper-icon-button.btn-error, paper-icon-button[error] { color: #f44336; }
paper-icon-button.error:hover, paper-icon-button.btn-error:hover, paper-icon-button[error]:hover { background-color: #f5e3e2; background-color: rgba(244, 67, 54, 0.2); border-radius: 50%; }

paper-checkbox #checkmark.paper-checkbox, paper-checkbox /deep/, paper-checkbox::shadow #checkmark.paper-checkbox { border-color: #fff !important; }

paper-dialog { color: #424242; background-color: #f5f5f5; font-family: 'Roboto', sans-serif; font-weight: 400; }
paper-dialog h1, paper-dialog h2, paper-dialog h3, paper-dialog h4, paper-dialog h5, paper-dialog h6 { overflow: visible; padding: 0 1em; text-align: center; }

paper-fab { --text-primary-color: white; }

paper-fab { background-color: #cc6633; color: #fff; --paper-fab-keyboard-focus-background: #663319; }
paper-fab.primary, paper-fab.btn-primary, paper-fab[primary] { background-color: #cc6633; color: #fff; --paper-fab-keyboard-focus-background: #663319; }
paper-fab.secondary, paper-fab.btn-secondary, paper-fab[secondary] { background-color: #424242; color: #fff; --paper-fab-keyboard-focus-background: #828282; }
paper-fab.success, paper-fab.btn-success, paper-fab[success] { background-color: #8bc34a; color: #fff; --paper-fab-keyboard-focus-background: #496a23; }
paper-fab.info, paper-fab.btn-info, paper-fab[info] { background-color: #fadd60; color: #4b421d; --paper-fab-keyboard-focus-background: #d4ad07; }
paper-fab.warning, paper-fab.btn-warning, paper-fab[warning] { background-color: #ffb74d; color: #4d3717; --paper-fab-keyboard-focus-background: #cd7a00; }
paper-fab.error, paper-fab.btn-error, paper-fab[error] { background-color: #f44336; color: #fff; --paper-fab-keyboard-focus-background: #a21309; }
paper-fab[disabled] { color: #656565 !important; background: #e4e4e4 !important; }

section.hero paper-menu, section[hero] paper-menu { --paper-menu-background-color: #fafafa; }

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

body {
  /* font-family: Arial, sans-serif;
  font-size: 10pt;
  background-color: #CCC; */
}

.invisible {


>
1955
None

Assumption !Church of the Assumption
Woodbridge
West Shore Line
New Haven
1924
None

Augustine !St. Augustine
Hartford
Hartford
Hartford
1902
None

Augustine !St. Augustine
North Branford
East Shore Line
New Haven
1941
None

Augustine !St. Augustine
Seymour
Ansonia-Derby
Waterbury
1866
None

Augustine !St. Augustine
<a class="mw-redirect" href="//en.wikipedia.org/wiki/South_Glastonbury"


                      |
| -                                        | {A0ADD4EC-5BD3-4f70-A47B-07797A45C635} | {A0ADD4EC-5BD3-4f70-A47B-07797A45C635} | -                          |
| -                                        | {990F07C7-78DC-4BD2-B145-5F791410BDDE} | {990F07C7-78DC-4BD2-B145-5F791410BDDE} | -                          |
| -                                        | {09C5C2B5-1D32-4598-B87E-203F32BB08E3} | {031EE060-67BC-460d-8847-E4A7C5E45A27} | -                          |
| -                                        | {8A9AE632-CB07-4A11-8872-358A2A271A24} | {6C3EE638-B588-4D7D-B30A-E7E36759305D} | -                          |
| -                                        | {2C941FD1-975B-59BE-A960-9A2A262853A5} | {2C941FCE-975B-59BE-A960-9A2A262853A5} | -                          |
| -                                        | {b0316d0c-da2f-40e0-9f91-f600caf042dc} | {69B1A7D7-C09E-40e9-A1DF-688007A2D9E4} | -                          |
| -                                        | {C49F2185-50A7-11D3-9144-00104BA11C5E} | {8A03567A-63CB-4BA8-BAF6-52119816D1EF} | -                          |
| -                                        | {E15FBAC2-C276-4523-92CA-561456EBCF3E} | {A6787DB4-F958-4938-855B-594534865351} | -                          |
| -                                        | {63CE6D27-426A-41F9-8E51-549C1132DAE2} | {967696C6-354C-4B5C-9CC8-BD9E1C480C77} | -                          |
| -                                        | {C49F2185-50A7-11D3-9144-00104BA11C5E} | {520CCA63-51A5-11D3-9144-00104BA11C5E} | -                          |
| -                                        | {F72671A9-012C-4725-9D2F-2A4D32D65169} | {8D8F4F83-3594-4F07-8369-FC3C3CAE4919} | -                          |
| -                                        | {01419581-4d63-4d43-ac26-6e2fc976c1f3} | {be472f80-fa9a-46d8-a158-f888836d8e0b} | -                          |
| -                                        | {69F9CB25-25E2-4BE1-AB8F-07AA7CB535E8} | {69F9CB25-25E2-4BE1-AB8F-07AA7CB535E8} | -                          |
---
title: Slurm
menu:
  main:
    parent: Compute
    weight: 20
---
# Slurm

Funnel can be configured to submit workers to [Slurm][slurm] by making calls
to `sbatch`.

The Funnel server needs to run on a submission node.
Configure Funnel to use Slurm by including the following config:

It is recommended to update the submit file template so that the
`funnel worker run` command takes a config file as an argument
(e.g. `funnel worker run --config /opt/fun


         readableStream.push(object);
                readableStream.push(null);
            }

            readableStreamLength = (<Buffer>object).length;
        }

        blobOptions["contentType"] = options.contentType;

        if (options && options.compress) {
            // todo
        }

        this.m_blobServer.createContainerIfNotExists(this.m_blobStorageContainerName, {publicAccessLevel: "blob"}, () => {
        });
        this.m_blobServer.createBlockBlobFromStream(this.m_blobStorageContainerName, blobName, readableStream, readableStreamLength, blobOptions, () => {
        });
    }

    async readBolb(blobName: string, writableStrem: Writable): Promise<any> {
        const blobStream = this.m_blobServer.getBlobToStream(this.m_blobStorageContainerName, blobName, writableStrem);
        blobStream.pipe(writableStrem);
    }

    async delete(blobName: string): Promise<boolean> {
        return new Promise<boolean>((resolve, reject) => {
            this.m_blobServer.deleteBlobIfExists(this.m_blobStorageContainerName, blobName, (err: any, result: boolean) => {
                if (err)
                    return reject(err);
                resolve(result);
            });
        });
    }
}import { Controller, Get, HttpStatus, NotFoundException, Param, Query } from '@nestjs/common';
import { ApiResponse, ApiUseTags } from '@nestjs/swagger';
import { shuffle, slice } from 'lodash';

import { RentalService } from './rental.service';
import { Rental, RentalsQuery } from './rental.models';

@Controller('api/rentals')
@ApiUseTags('Rentals')
export class RentalController {
  constructor(private rentalService: RentalService) {}

  @Get()
  @ApiResponse({ status: HttpStatus.OK, type: Rental, isArray: true })
  get(@Query() query: RentalsQuery): Rental[] {
    const rentals = this.rentalService.getAvailableRentals(query);
    return shuffle(rentals);
  }

  @Get(':id')
  @ApiResponse({ status: HttpStatus.OK, type: Rental})
  getOne(@Param('id') id: string): Rental {
    const rental = this.rentalService.findRentalById(+id);
    if (!rental) {
      throw new NotFoundException(`Rental id ${id} not found`);
    }
    return rental;
  }
}
import moment from "moment";
import { Schema } from "mongoose";
import Reminder from "../../reminders/Reminder";
import Task from "../../tasks/TASK/Task";
import { ITaskList } from "./ITaskList";

export const list_schema = new Schema(
    {
        name: {
            type:String,
            min:3,
            max:45,
            trim:true,
            required:[true, "The lists´s title is needed"]
        },
        tasks:[{
            type:String,
            ref:"Task",
            validate:{
                validator:
                    function(v:any[]){
                        return v.length>30?false:true
                    },
                message:"Only 5 task per list"
            }

        }],
        createdAt: {
            type:Date,
            default: moment().toDate()
        },
        createdBy:{
            type:String,
            ref:"User",
            required:true
        }
    }
);

list_schema.pre<ITaskList>("remove",async function(next){

    let deletedTasks = await Task.deleteMany({_id: { $in: this.tasks } })
    let deletedtReminders = await Reminder.deleteMany({idTask: { $in: this.tasks } });
    console.log(deletedtReminders);
    if(deletedTasks && deletedTasks.ok  &&  deletedtReminders && deletedTasks.ok){
        next();
    }else{
        throw new


 5)), "line 1:23: token recognition error at: 'Å'");

        if (EsqlCapabilities.Cap.DOUBLE_PARAMETER_MARKERS_FOR_IDENTIFIERS.isEnabled()) {
            expectError(
                "from test | where x < ???",
                List.of(paramAsConstant("n_1", 5), paramAsConstant("n_2", 5)),
                "extraneous input '?' expecting <EOF>"
            );
        } else {
            expectError(
                "from test | where x < ??",
                List.of(paramAsConstant("n_1", 5), paramAsConstant("n_2", 5)),
                "extraneous input '?' expecting <EOF>"
            );
        }
    }

    public void testPositionalParams() {
        LogicalPlan stm = statement("row x=?1, y=?1", new QueryParams(List.of(paramAsConstant(null, 1))));
        assertThat(stm, instanceOf(Row.class));
        Row row = (Row) stm;
        assertThat(row.fields().size(), is(2));

        NamedExpression field = row.fields().get(0);
        assertThat(field.name(), is("x"));
        assertThat(field, instanceOf(Alias.class));
        Alias alias = (Alias) field;
        assertThat(alias.child().fold(FoldContext.small()), is(1));

        field = row.fields().get(1);
        assertThat(field.name(), is("y"));
        assertThat(field, instanceOf(Alias.class));
        alias = (Alias) field;
        assertThat(alias.child().fold(FoldContext.small()), is(1));
    }

    public void testInvalidPositionalParams() {
        expectError(
            "from test | where x < ?0",
            List.of(paramAsConstant(null, 5)),
            "No parameter is defined for position 0, did you mean position 1"
        );

        expectError(
            "from test | where x < ?2",
            List.of(paramAsConstant(null, 5)),
            "No parameter is defined for position 2, did you mean position 1"
        );

        expectError(
            "from test | where x < ?0 and y < ?2",
            List.of(paramAsConstant(null, 5)),
            "line 1:23: No parameter is defined for position 0, did you mean position 1?; "
                + "line 1:34: No parameter is defined for position 2, did you mean position 1?"
        );

        expectError(
            "from test | where x < ?0",
            List.of(paramAsConstant(null, 5), paramAsConstant(null, 10)),
            "No parameter is defined for position 0, did you mean any position between 1 and 2?"
        );
    }

    public void testParamInWhere() {
        LogicalPlan plan = statement("from test | where x < ? |  limit 10", new QueryParams(List.of(paramAsConstant(null, 5))));
        assertThat(plan, instanceOf(Limit.class));
        Limit limit = (Limit) plan;
        assertThat(limit.limit(), instanceOf(Literal.class));
        assertThat(((Literal) limit.limit()).value(), equalTo(10));
        assertThat(limit.children().size(), equalTo(1));
        assertThat(limit.children().get(0), instanceOf(Filter.class));
        Filter w = (Filter) limit.children().get(0);
        assertThat(((Literal) w.condition().children().get(1)).value(), equalTo(5));
        assertThat(limit.children().get(0).children().size(), equalTo(1));
        assertThat(limit.children().get(0).children().get(0), instanceOf(UnresolvedRelation.class));

        plan = statement("from test | where x < ?n1 |  limit 10", new QueryParams(List.of(paramAsConstant("n1", 5))));
        assertThat(plan, instanceOf(Limit.class));
        limit = (Limit) plan;
        assertThat(limit.limit(), instanceOf(Literal.class));
        assertThat(((Liter


  {"zva", ZVA, {}},
  {"ivac", IVAC, {}},
  {"isw", ISW, {}},
  {"cvac", CVAC, {}},
  {"csw", CSW, {}},
  {"cvau", CVAU, {}},
  {"civac", CIVAC, {}},
  {"cisw", CISW, {}}
};

AArch64DC::DCMapper::DCMapper()
  : AArch64NamedImmMapper(DCMappings, 0) {}

const AArch64NamedImmMapper::Mapping AArch64IC::ICMapper::ICMappings[] = {
  {"ialluis",  IALLUIS, {}},
  {"iallu", IALLU, {}},
  {"ivau", IVAU, {}}
};

AArch64IC::ICMapper::ICMapper()
  : AArch64NamedImmMapper(ICMappings, 0) {}

const AArch64NamedImmMapper::Mapping AArch64ISB::ISBMapper::ISBMappings[] = {
  {"sy",  SY, {}},
};

AArch64ISB::ISBMapper::ISBMapper()
  : AArch64NamedImmMapper(ISBMappings, 16) {}

const AArch64NamedImmMapper::Mapping AArch64PRFM::PRFMMapper::PRFMMappings[] = {
  {"pldl1keep", PLDL1KEEP, {}},
  {"pldl1strm", PLDL1STRM, {}},
  {"pldl2keep", PLDL2KEEP, {}},
  {"pldl2strm", PLDL2STRM, {}},
  {"pldl3keep", PLDL3KEEP, {}},
  {"pldl3strm", PLDL3STRM, {}},
  {"plil1keep", PLIL1KEEP, {}},
  {"plil1strm", PLIL1STRM, {}},
  {"plil2keep", PLIL2KEEP, {}},
  {"plil2strm", PLIL2STRM, {}},
  {"plil3keep", PLIL3KEEP, {}},
  {"plil3strm", PLIL3STRM, {}},
  {"pstl1keep", PSTL1KEEP, {}},
  {"pstl1strm", PSTL1STRM, {}},
  {"pstl2keep", PSTL2KEEP, {}},
  {"pstl2strm", PSTL2STRM, {}},
  {"pstl3keep", PSTL3KEEP, {}},
  {"pstl3strm", PSTL3STRM, {}}
};

AArch64PRFM::PRFMMapper::PRFMMapper()
  : AArch64NamedImmMapper(PRFMMappings, 32) {}

const AArch64NamedImmMapper::Mapping AArch64PState::PStateMapper::PStateMappings[] = {
  {"spsel", SPSel, {}},
  {"daifset", DAIFSet, {}},
  {"daifclr", DAIFClr, {}},

  // v8.1a "Privileged Access Never" extension-specific PStates
  {"pan", PAN, {AArch64::HasV8_1aOps}},

  // v8.2a
  {"uao", UAO, {AArch64::HasV8_2aOps}},
};

AArch64PState::PStateMapper::PStateMapper()
  : AArch64NamedImmMapper(PStateMappings, 0) {}

const AArch64NamedImmMapper::Mapping AArch64PSBHint::PSBHintMapper::PSBHintMappings[] = {
  // v8.2a "Statistical Profilin


  }

  void test_typeConstraint_default() {
    parseTestLibrary("");
    checkConstraintLowerBound(constraint: "", bound: "UNKNOWN");
    checkConstraintUpperBound(constraint: "", bound: "UNKNOWN");
  }

  void test_typeSatisfiesConstraint() {
    parseTestLibrary("""
      class A;
      class B extends A;
      class C extends B;
      class D extends C;
      class E extends D;
    """);

    checkTypeDoesntSatisfyConstraint("A", ":> D <: B");
    checkTypeSatisfiesConstraint("B", ":> D <: B");
    checkTypeSatisfiesConstraint("C", ":> D <: B");
    checkTypeSatisfiesConstraint("D", ":> D <: B");
    checkTypeDoesntSatisfyConstraint("E", ":> D <: B");
  }

  void test_unknown_at_bottom() {
    parseTestLibrary("class A;");

    // TODO(cstefantsova): Test for various nullabilities.
    checkIsSubtype("UNKNOWN", "A");
  }

  void test_unknown_at_top() {
    parseTestLibrary("""
      class A;
      class Pair<X, Y>;
    """);

    checkIsSubtype("A", "UNKNOWN");
    checkIsSubtype("Pair<A, Null>", "Pair<UNKNOWN, UNKNOWN>");
  }

  void test_upper_bound_extension_type() {
    parseTestLibrary(
      "extension type E1(Object? it); "
      "extension type E2(Object it);"
      "extension type E3<X>(X it); "
      "extension type E4(Object it) implements Object; "
      "extension type E5<X extends Object>(X it) implements Object;",
    );
    checkUpperBound(type1: "E1", type2: "E1", upperBound: "E1");
    checkUpperBound(type1: "E2", type2: "E2", upperBound: "E2");
    checkUpperBound(type1: "E1", type2: "E2", upperBound: "Object?");
    checkUpperBound(type1: "E1", type2: "E3<Object?>", upperBound: "Object?");
    checkUpperBound(type1: "E1", type2: "E3<num?>", upperBound: "Object?");
    checkUpperBound(type1: "E2", type2: "E3<Object?>", upperBound: "Object?");
    checkUpperBound(type1: "E2", type2: "E3<num?>", upperBound: "Object?");
    checkUpperBound(type1: "E2", type2: "E3<Object>", upperBound: "Object?");
    checkUpperBound(type1: "E4", type2: "E5<Object>", upperBound: "Object");
  }

  void test_upper_bound_extension_type_implements() {
    parseTestLibrary(
      "extension type E1(int it) implements num; "
      "extension type E2(double it) implements double; "
      "extension type E3<X extends num>(X it) implements num; "
      "extension type E4<X extends num>(X it) implements E3<X>; "
      "extension type E5(num? it); "
      "extension type E6(num? it) implements E5; "
      "extension type E7(String it) implements String; "
      "extension type E8(bool it); "
      "extension type E9(int it) implements E6; "
      "extension type E10(double it) implements E5; "
      "extension type E11<X>(X it); "
      "extension type E12(bool it) implements Object;",
    );
    checkUpperBound(type1: "E1", type2: "E2", upperBound: "num");
    checkUpperBou


/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

/*!
 * \file ravel_unravel.h
 * \brief Index ravel and unraval operations
 */
#ifndef TVM_TOPI_DETAIL_RAVEL_UNRAVEL_H_
#define TVM_TOPI_DETAIL_RAVEL_UNRAVEL_H_

#include <tvm/te/operation.h>

#include <vector>

namespace tvm {
namespace topi {
namespace detail {

using namespace tvm::te;

/*!
 * \brief Flatten the indices to 1D
 *
 * \param indices The input coordinates
 * \param shape Shape of the tensor
 *
 * \return The index after flattening
 */
inline PrimExpr RavelIndex(ffi::Array<PrimExpr> indices, ffi::Array<PrimExpr> shape) {
  ICHECK_EQ(indices.size(), shape.size()) << "indices and shape must have equal size";
  if (indices.size() == 0U) {
    return 0;
  }
  PrimExpr idx;
  for (size_t i = 0; i < indices.size(); ++i) {
    if (i == 0) {
      idx = indices[i];
    } else {
      idx = idx * shape[i] + indices[i];
    }
  }
  return idx;
}

/*!
 * \brief Convert flattened index to coordinate array
 *
 * \param idx The 1D index
 * \param shape Shape of the tensor
 *
 * \return The coordinate corresponding to the 1D index
 */
inline ffi::Array<PrimExpr> UnravelIndex(PrimExpr idx, ffi::Array<PrimExpr> shape) {
  std::vector<PrimExpr> indices;

  for (int i = static_cast<int>(shape.size()) - 1; i >= 0; --i) {
    indices.push_back(indexmod(idx, shape[i]));
    idx = indexdiv(idx, shape[i]);
  }
  std::reverse(indices.begin(), indices.end());
  return indices;
}

}  // namespace detail
}  // namespace topi
}  // namespace tvm
#endif  // TVM_TOPI_DETAIL_RAVEL_UNRAVEL_H_