x_fte);
	params->ft_attr.max_fte = MLX5_TTC_TABLE_SIZE;
	ttc->t = mlx5_create_flow_table(params->ns, &params->ft_attr);
	if (IS_ERR(ttc->t)) {
		err = PTR_ERR(ttc->t);
		kvfree(ttc);
		return ERR_PTR(err);
	}

	err = mlx5_create_ttc_table_groups(ttc, match_ipv_outer);
	if (err)
		goto destroy_ft;

	err = mlx5_generate_ttc_table_rules(dev, params, ttc);
	if (err)
		goto destroy_ft;

	return ttc;

destroy_ft:
	mlx5_destroy_ttc_table(ttc);
	return ERR_PTR(err);
}

int mlx5_ttc_fwd_dest(struct mlx5_ttc_table *ttc, enum mlx5_traffic_types type,
		      struct mlx5_flow_destination *new_dest)
{
	return mlx5_modify_rule_destination(ttc->rules[type].rule, new_dest,
					    NULL);
}

struct mlx5_flow_destination
mlx5_ttc_get_default_dest(struct mlx5_ttc_table *ttc,
			  enum mlx5_traffic_types type)
{
	struct mlx5_flow_destination *dest = &ttc->rules[type].default_dest;

	WARN_ONCE(dest->type != MLX5_FLOW_DESTINATION_TYPE_TIR,
		  "TTC[%d] default dest is not setup yet", type);

	return *dest;
}

int mlx5_ttc_fwd_default_dest(struct mlx5_ttc_table *ttc,
			      enum mlx5_traffic_types type)
{
	struct mlx5_flow_destination dest = mlx5_ttc_get_default_dest(ttc, type);

	return mlx5_ttc_fwd_dest(ttc, type, &dest);
}


操作
start_time = time.time()
result = np.dot(data, data.T)
elapsed = time.time() - start_time

print(f"⏱ 矩阵运算耗时: {elapsed:.4f}秒")
print(f"📊 结果矩阵形状: {result.shape}")

# 检查CPU使用情况提示
import os
cpu_count = os.cpu_count()
print(f"�� 系统CPU核心数: {cpu_count}")
print("💡 如果使用OpenMP，应该能看到多核利用")
"""

        exec(test_code)
        return True

    except Exception as e:
        print(f"❌ 运行时测试失败: {e}")
        return False

def provide_windows_instructions():
    """提供Windows下启用OpenMP的指导"""
    print("\n" + "="*60)
    print("📋 Windows下启用OpenMP的完整步骤")
    print("="*60)

    print("\n🔧 方法1: 使用Visual Studio Native Tools（推荐）")
    print("在 'x64 Native Tools Command Prompt for VS 2022' 中运行:")
    print("```")
    print("set SEQUENZO_ENABLE_OPENMP=1")
    print("set CL=/openmp")
    print("pip uninstall sequenzo -y")
    print("pip install -e . -v")
    print("")
    print("REM 权威验证")
    print("python -c \"import sequenzo.clustering.clustering_c_code as cc, subprocess; subprocess.run(['dumpbin', '/dependents', cc.__file__])\"")
    print("```")

    print("\n🔧 方法2: PowerShell/CMD（备选）")
    print("```")
    print("# PowerShell")
    print("$env:SEQUENZO_ENABLE_OPENMP=1")
    print("pip uninstall sequenzo -y")
    print("pip install -e .")
    print("")
    print("# CMD")
    print("set SEQUENZO_ENABLE_OPENMP=1")
    print("pip uninstall sequenzo -y")
    print("pip install -e .")
    print("```")

    print("\n🔧 方法3: 安装Visual Studio Build Tools")
    print("1. 下载: https://visualstudio.microsoft.com/visual-cpp-build-tools/")
    print("2. 安装时选择 'Desktop development with C++'")
    print("3. 重新运行方法1")

    print("\n🧪 验证步骤:")
    print("使用权威验证方法（dumpbin）确认OpenMP状态")
    print("检测脚本可能误报，以dumpbin结果为准！")

def main():
    """主函数"""
    print("🪟 Windows OpenMP支持检测工具")
    print("=" * 50)

    # 检查环境
    check_windows_environment()

    # 检查编译器
    compiler_ok = check_visual_studio()

    # 检查sequenzo
    sequenzo_ok = check_sequenzo_installation()

    # 权威验证（最重要）
    authoritative_result = authoritative_openmp_check()

    # 运行时测试
    runtime_ok = check_openmp_runtime_test()

    # 总结和建议
    print("\n" + "="*50)
    print("📊 检测结果总结")
    print("="*50)

    # 优先以权威验证结果为准
    if authoritative_result is True:
        print("🎉 权威确认: OpenMP已启用! (VCOMP*.DLL检测通过)")
        print("✅ 当前使用并行版本")
        print("💡 如果之前测试显示'串行版本'，那是误报")
    elif authoritative_result is False:
        print("⚠ 权威确认: 当前为串行版本 (未检测到VCOMP*.DLL)")
        print("💡 需要重新编译启用OpenMP")
    else:
        # 权威验证失败，回退到传统检测
        print("⚠ 权威验证失败，使用传统检测结果:")
        if compiler_ok and sequenzo_ok and runtime_ok:
            print("🎉 传统检测: 很可能已启用OpenMP支持！")
            print("✅ 编译器支持: 是")
            print("✅ Sequenzo安装: 正常")
            print("✅ 运行测试: 通过")
        else:
            print("⚠ 传统检测: 可能使用的是串行版本")
            print(f"{'✅' if compiler_ok else '❌'} 编译器支持: {'是' if compiler_ok else '否'}")
            print(f"{'✅' if sequenzo_ok else '❌'} Sequenzo安装: {'正常' if sequenzo_ok else '异常'}")
            print(f"{'✅' if runtime_ok else '❌'} 运行测试: {'通过' if runtime_ok else '失败'}")

            print("\n�� 建议:")
            if not compiler_ok:
                print("- 安装Visual Studio Build Tools")
            if not sequenzo_ok:
                print("- 重新安装sequenzo")

            print("- 使用SEQUENZO_ENABLE_OPENMP=1环境变量强制启用")

    print("\n🔔 重要提醒:")
    print("- 检测脚本可能在某些Windows环境下误报")
    print("- 请优先使用权威验证方法 (dumpbin /dependents)")
    print("- 在Visual Studio Native Tools Command Prompt中运行效果最佳")

    # 提供详细指导
    provide_windows_instructions()

    # 返回权威验证结果，如果失败则回退到传统检测
    if authoritative_result is not None:
        return authoritative_result
    else:
        return compiler_ok and sequenzo_ok

if __name__ == "__main__":
    success = main()
    sys.exit(0 if success else 1)


: throw IllegalArgumentException("Want to updateContainerLayout, but gxScrollConfig is null")

                // 当容器节点不是flexGrow时，且容器节点的高度设置，或者是默认，或者是未定义，需要主动计算高度
                var isComputeContainerHeight = gxScrollConfig.isHorizontal && flexGrow == null && (height == null || height == Dimension.Auto || height == Dimension.Undefined)

                // 对计算结果进行处理
                val gxParams = GXRegisterCenter.GXIExtensionDynamicProperty.GXParams(
                    GXTemplateKey.GAIAX_CUSTOM_PROPERTY_SCROLL_COMPUTE_CONTAINER_HEIGHT,
                    isComputeContainerHeight
                ).apply {
                    this.flexBox = gxFlexBox
                }
                GXRegisterCenter.instance.extensionDynamicProperty?.convert(gxParams)?.let {
                    isComputeContainerHeight = it as Boolean
                }

                if (isComputeContainerHeight) {
                    val containerSize = GXNodeUtils.computeScrollSize(gxTemplateContext, gxNode, containerData)
                    containerSize?.height?.let {
                        gxFlexBox.sizeForDimension?.height = it
                        isDirty = true
                    }

                    Log.runE(TAG) { "updateContainerLayout traceId=${gxTemplateContext.traceId} containerSize=${containerSize}" }
                }

            } else if (gxNode.isGridType()) {

                val gxGridConfig = gxNode.templateNode.layer.gridConfig ?: throw IllegalArgumentException("Want to updateContainerLayout, but gxGridConfig is null")

                // 当容器节点不是flexGrow时，且容器节点的高度设置，或者是默认，或者是未定义，需要主动计算高度
                var isComputeContainerHeight = gxGridConfig.isVertical && flexGrow == null && (height == null || height == Dimension.Auto || height == Dimension.Undefined)

                // 对计算结果进行处理
                val gxParams = GXRegisterCenter.GXIExtensionDynamicProperty.GXParams(GXTemplateKey.GAIAX_CUSTOM_PROPERTY_GRID_COMPUTE_CONTAINER_HEIGHT, isComputeContainerHeight).apply {
                    this.gridConfig = gxGridConfig
                    this.flexBox = gxFlexBox
                }
                GXRegisterCenter.instance.extensionDynamicProperty?.convert(gxParams)?.let {
                    isComputeContainerHeight = it as Boolean
                }

                // 当容器节点不是flexGrow时，且容器节点的高度设置，或者是默认，或者是未定义，需要主动计算高度
                if (isComputeContainerHeight) {
                    val containerSize = GXNodeUtils.computeGridSize(gxTemplateContext, gxNode, templateData, containerData)
                    containerSize?.height?.let {
                        gxFlexBox.sizeForDimension?.height = it
                        isDirty = true
                    }
                }
            } else if (gxNode.isSliderType()) {
                val isComputeContainerHeight = height == null || height == Dimension.Auto || height == Dimension.Undefined

                // 容器节点没有设置高度
                if (isComputeContainerHeight) {
                    val containerSize = GXNodeUtils.computeSliderSize(gxTemplateContext, gxNode, containerData)
                    containerSize?.height?.let {
                        gxFlexBox.sizeForDimension?.height = it
                        isDirty = true
                    }
                }
            }

            updateLayoutByFlexBox(gxTemplateContext, gxNode)?.let {
                isDirty = it
            }

            if (isDirty) {
                stretchStyle.safeFree()
                stretchStyle.safeInit()
                stretchNode.safeSetStyle(stretchStyle)
                stretchNode.safeMarkDirty()
                return true
            }

            return false
        }

        private fun updateNormalLayout(gxTemplateContext: GXTemplateContext, gxNode: GXNode, templateData: JSON


 this handle was inherited from the parent process and initialized
        // already, make sure it has the FTEXT flag and continue:
        if (pio->osfhnd != reinterpret_cast<intptr_t>(INVALID_HANDLE_VALUE) &&
            pio->osfhnd != _NO_CONSOLE_FILENO)
        {
            pio->osfile |= FTEXT;
            continue;
        }

        // Regardless what happens next, the file will be treated as if it is
        // open in text mode:
        pio->osfile = FOPEN | FTEXT;

        // This handle has not yet been initialized, so  let's see if we can get
        // the handle from the OS:
        intptr_t const os_handle = reinterpret_cast<intptr_t>(GetStdHandle(get_std_handle_id(fh)));

        bool const is_valid_handle =
            os_handle != reinterpret_cast<intptr_t>(INVALID_HANDLE_VALUE) &&
            os_handle != reinterpret_cast<intptr_t>(nullptr);

        DWORD const handle_type = is_valid_handle
            ? GetFileType(reinterpret_cast<HANDLE>(os_handle))
            : FILE_TYPE_UNKNOWN;

        if (handle_type != FILE_TYPE_UNKNOWN)
        {
            // The file type is known, so we obtained a valid handle from the
            // OS.  Finish initializing the lowio file object for this handle,
            // including the flag specifying whether this is a character device
            // or a pipe:
            pio->osfhnd = os_handle;

            if ((handle_type & 0xff) == FILE_TYPE_CHAR)
                pio->osfile |= FDEV;

            else if ((handle_type & 0xff) == FILE_TYPE_PIPE)
                pio->osfile |= FPIPE;
        }
        else
        {
            // We were unable to get the handles from the OS.  For stdin, stdout,
            // and stderr, if there is no valid OS handle, treat the CRT handle
            // as being open in text mode on a device with _NO_CONSOLE_FILENO
            // underlying it.  We use this value instead of INVALID_HANDLE_VALUE
            // to distinguish between a failure in opening a file and a program
            // run without a console:
            pio->osfile |= FDEV;
            pio->osfhnd = _NO_CONSOLE_FILENO;

            // Also update the corresponding stdio stream, unless stdio was
            // already terminated:
            if (__piob)
                __piob[fh]->_file = _NO_CONSOLE_FILENO;
        }
    }
}

// Initializes the lowio library.  This initialization comprises several steps:
//
// [1] An initial array of __crt_lowio_handle_data structures is allocated.
//
// [2] Inherited file handles are initialized.  To do this, sthe startup info
//     is obtained from the OS, via the lpReserved2 member.  The format of the
//     information is as follows:
//
//     [Bytes 0 - 3]       Integer value N, which is the number of handles that
//                         are provided by the parent process.
//
//     [Bytes 4 - N+3]     The N osfile values.
//
//     [Bytes N+4 - 5*N+3] The N OS HANDLE values, as DWORDs
//
// [3] Next, the first three lowio files (corresponding to stdin, stdout, and
//     stderr) are initialized as follows:  If the value in osfhnd is
//     INVALID_HANDLE_VALUE, then we try to obtain a HANDLE from the OS.  These
//     handles are forced to text mode, as standard input, output, and error
//     always start out in text mode.
//
// Notes:
//
// [1] In general, not all of the pased info from the parent process will
//     describe open handles.  If, for example, only C handle 1 (stdout) and
//


essageType
import com.squareup.wire.schema.ProtoType
import com.squareup.wire.schema.Schema
import kotlin.jvm.JvmName
import okio.Buffer
import okio.ByteString

fun printProto(bytes: ByteString, schema: Schema? = null, type: ProtoType? = null): String {
  return bytes.readProtoTree(schema, type).render()
}

internal fun ByteString.readProtoTree(schema: Schema? = null, type: ProtoType? = null): Tree {
  return ProtoReader(Buffer().write(this)).readTree(schema, type)
}

private fun ProtoReader.readTree(schema: Schema?, type: ProtoType?): Tree {
  return generateFieldSequence()
      .flatMap { (tag, encoding) ->
        var fieldType: ProtoType? = null
        var fieldName = tag.toString()
        if (schema != null && type != null) {
          when (val schemaType = schema.getType(type)) {
            is MessageType -> {
              val field = schemaType.field(tag)
              if (field != null) {
                fieldType = field.type
                fieldName = field.name
              }
            }
            is EnumType -> {
              val constant = schemaType.constant(tag)
              if (constant != null) {
                fieldName = constant.name
              }
            }
          }
        }

        // TODO use fieldType (if present) to aid in parsing and display of value.
        val nodeValues = when (encoding) {
          VARINT -> listOf(readVarint64().toString())
          FIXED64 -> {
            val long = readFixed64()
            val double = Double.fromBits(long)

            listOf("$long ($double)")
          }
          FIXED32 -> listOf(readFixed32().toString())
          LENGTH_DELIMITED -> {
            val bytes = readBytes()

            if (bytes.size == 0) {
              listOf("(empty)")
            } else {
              try {
                val nestedTree = bytes.readProtoTree(schema, fieldType)
                return@flatMap listOf(Branch(fieldName, nestedTree.nodes)).asSequence()
              } catch (_: Exception) {
                if (bytes.isProbablyUtf8()) {
                  listOf("\"${bytes.utf8().escape()}\"")
                } else {
                  bytes.readPackedVarint64().map { it.toString() }
                }
              }
            }
          }
        }

        return@flatMap nodeValues.map { Leaf(fieldName, it) }.asSequence()
      }
      .toList()
      .let { Tree(it) }
}

private fun ByteString.readPackedVarint64(): List<Long> {
  val values = mutableListOf<Long>()

  var bytePos = 0

  // Adapted from ProtoReader#readVarint64().
  infix fun Byte.and(other: Int): Int = toInt() and other
  fun readNextPackedValue(): Long? {
    var shift = 0
    var result: Long = 0
    while (shift < 64 && bytePos < size) {
      val b = this[bytePos++]
      result = result or ((b and 0x7F).toLong() shl shift)
      if (b and 0x80 == 0) {
        return result
      }
      shift += 7
    }

    return null
  }

  while (true) {
    values += readNextPackedValue() ?: break
  }

  return values
}

private fun ByteString.isProbablyUtf8(): Boolean {
  val byteBuffer = Buffer().write(this)
  while (!byteBuffer.exhausted()) {
    val codePoint = byteBuffer.readUtf8CodePoint()
    if (codePoint.isLikelyBinary()) {
      return false
    }
  }

  return true
}

private fun Int.isLikelyBinary(): Boolean {
  return when (this) {


oke(
                width = 2.dp.toPx(),
            )
        )
    }

    Column(modifier = Modifier.padding(horizontal = 20.dp)) {

        Text(text = "Progress Start ${progressStart.roundToInt()}%")
        Slider(
            value = progressStart,
            onValueChange = { progressStart = it },
            valueRange = 0f..100f,
        )

        Text(text = "Progress End ${progressEnd.roundToInt()}%")
        Slider(
            value = progressEnd,
            onValueChange = { progressEnd = it },
            valueRange = 0f..100f,
        )
    }
}

/**
 * 绘制多边形
 */
@Composable
private fun DrawPolygonPath() {

    Title_Desc_Text(desc = "绘制多边形，动态修改边角点数，以及是否圆角")
    var sides by remember { mutableFloatStateOf(3f) }
    var cornerRadius by remember { mutableFloatStateOf(1f) }

    Canvas(modifier = canvasModifier) {
        val canvasWidth = size.width
        val canvasHeight = size.height
        val cx = canvasWidth / 2
        val cy = canvasHeight / 2
        val radius = (canvasHeight - 20.dp.toPx()) / 2
        val path = createPolygonPath(cx, cy, sides.roundToInt(), radius)

        drawPath(
            color = Color.Red,
            path = path,
            style = Stroke(
                width = 4.dp.toPx(),
                pathEffect = PathEffect.cornerPathEffect(cornerRadius)
            )
        )
    }

    Column(modifier = Modifier.padding(horizontal = 20.dp)) {
        Text(text = "Sides ${sides.roundToInt()}")
        Slider(
            value = sides,
            onValueChange = { sides = it },
            valueRange = 3f..12f,
            steps = 10
        )

        Text(text = "CornerRadius ${cornerRadius.roundToInt()}")

        Slider(
            value = cornerRadius,
            onValueChange = { cornerRadius = it },
            valueRange = 0f..50f,
        )
    }
}

/**
 * [PathMeasure.getSegment] returns a new path segment from original path it's set with.
 * Start and stop distances determine which sections are set to new path.
 */
@Composable
private fun DrawPolygonPathWithProgress() {
    Title_Desc_Text(desc = "在多边形的边上，绘制片段")
    var sides by remember { mutableFloatStateOf(3f) }
    var cornerRadius by remember { mutableFloatStateOf(1f) }
    val pathMeasure by remember { mutableStateOf(PathMeasure()) }
    var progress by remember { mutableFloatStateOf(50f) }

    val pathWithProgress by remember { mutableStateOf(Path()) }

    Canvas(modifier = canvasModifier) {
        val canvasWidth = size.width
        val canvasHeight = size.height
        val cx = canvasWidth / 2
        val cy = canvasHeight / 2
        val radius = (canvasHeight - 20.dp.toPx()) / 2

        val fullPath = createPolygonPath(cx, cy, sides.roundToInt(), radius)
        pathWithProgress.reset()
        if (progress >= 100f) {
            pathWithProgress.addPath(fullPath)
        } else {
            pathMeasure.setPath(fullPath, forceClosed = false)
            pathMeasure.getSegment(
                startDistance = 0f,
                stopDistance = pathMeasure.length * progress / 100f,
                pathWithProgress,
                startWithMoveTo = true
            )
        }

        drawPath(
            color = Color.Red,
            path = pathWithProgress,
            style = Stroke(
                width = 4.dp.toPx(),
                pathEffect = PathEffect.cornerPath


value" id="val-top">val top : t

<!DOCTYPE html>
<title>Semiring (bastet.Bastet.Verify.Compare.Semiring)</title><link rel="stylesheet" href="../../../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/>
Up – bastet » Bastet » Verify » Compare » Semiring
Module Compare.Semiring

Parameters

S : Interface.SEMIRING

E : Interface.EQ with type t = S.t

Signature

module I : sig ... end

val additive_associativity : S.t -> S.t -> S.t -> bool

val additive_identity : S.t -> bool

val commutativity : S.t -> S.t -> bool

val multi


eturn whether the value of the 'User Defined Target View' attribute is set.
	 * @see #unsetUserDefinedTargetView()
	 * @see #getUserDefinedTargetView()
	 * @see #setUserDefinedTargetView(String)
	 * @generated
	 */
	boolean isSetUserDefinedTargetView();

} // IfcGeometricRepresentationSubContext
/**
 * Copyright (C) 2009-2014 BIMserver.org
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program 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 Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.bimserver.models.store.impl;

/******************************************************************************
 * Copyright (C) 2009-2019  BIMserver.org
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program 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 Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see {@literal<http://www.gnu.org/licenses/>}.
 *****************************************************************************/

import org.bimserver.models.store.PercentageChange;
import org.bimserver.models.store.StorePackage;
import org.eclipse.emf.ecore.EClass;

/**
 *
 * An implementation of the model object 'Percentage Change'.
 *
 *

 * The following features are implemented:
 *

 *

 *
{@link org.bimserver.models.store.impl.PercentageChangeImpl#getPercentage Percentage}

 *

 *
 * @generated
 */
public class PercentageChangeImpl extends RemoteServiceUpdateImpl implements PercentageChange {
	/**
	 *
	 *
	 * @generated
	 */
	protected PercentageChangeImpl() {
		super();
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return StorePackage.Literals.PERCENTAGE_CHANGE;
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public int getPercentage() {
		return (Integer) eGet(StorePackage.Literals.PERCENTAGE_CHANGE__PERCENTAGE, true);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void setPercentage(int newPercentage) {
		eSet(StorePackage.Literals.PERCENTAGE_CHANGE__PERCENTAGE, newPercentage);
	}

} //PercentageChangeImpl
/**
 * Copyright (C) 2009-2014 BIMserver.org
 *
 * This program is free software


.type === 8) && getConstantType(value, context) > 0) {
        return;
      }
      if (name === "ref") {
        hasRef = true;
      } else if (name === "class") {
        hasClassBinding = true;
      } else if (name === "style") {
        hasStyleBinding = true;
      } else if (name !== "key" && !dynamicPropNames.includes(name)) {
        dynamicPropNames.push(name);
      }
      if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) {
        dynamicPropNames.push(name);
      }
    } else {
      hasDynamicKeys = true;
    }
  };
  for (let i = 0; i < props.length; i++) {
    const prop = props[i];
    if (prop.type === 6) {
      const { loc, name, nameLoc, value } = prop;
      let isStatic = true;
      if (name === "ref") {
        hasRef = true;
        pushRefVForMarker();
      }
      if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || false)) {
        continue;
      }
      properties.push(
        createObjectProperty(
          createSimpleExpression(name, true, nameLoc),
          createSimpleExpression(
            value ? value.content : "",
            isStatic,
            value ? value.loc : loc
          )
        )
      );
    } else {
      const { name, arg, exp, loc, modifiers } = prop;
      const isVBind = name === "bind";
      const isVOn = name === "on";
      if (name === "slot") {
        if (!isComponent) {
          context.onError(
            createCompilerError(40, loc)
          );
        }
        continue;
      }
      if (name === "once" || name === "memo") {
        continue;
      }
      if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || false)) {
        continue;
      }
      if (isVOn && ssr) {
        continue;
      }
      if (
        // #938: elements with dynamic keys should be forced into blocks
        isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked
        // before children
        isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update")
      ) {
        shouldUseBlock = true;
      }
      if (isVBind && isStaticArgOf(arg, "ref")) {
        pushRefVForMarker();
      }
      if (!arg && (isVBind || isVOn)) {
        hasDynamicKeys = true;
        if (exp) {
          if (isVBind) {
            pushRefVForMarker();
            pushMergeArg();
            mergeArgs.push(exp);
          } else {
            pushMergeArg({
              type: 14,
              loc,
              callee: context.helper(TO_HANDLERS),
              arguments: isComponent ? [exp] : [exp, `true`]
            });
          }
        } else {
          context.onError(
            createCompilerError(
              isVBind ? 34 : 35,
              loc
            )
          );
        }
        continue;
      }
      if (isVBind && modifiers.some((mod) => mod.content === "prop")) {
        patchFlag |= 32;
      }
      const directiveTransform = context.directiveTransforms[name];
      if (directiveTransform) {
        const { props: props2, needRuntime } = directiveTransform(prop, node, context);
        !ssr && props2.forEach(analyzePatchFlag);
        if (isVOn && arg && !isStaticExp(arg)) {
          pushMergeArg(createObjectExpression(props2, elementLoc));
        } else {
          properties.push(...props2);
        }
        if (needRuntime) {
          runtimeDirectives.push(prop);
          if (isSymbol(


(), delta_time);
    }
    fn handle_event(&mut self, event: geng::Event) {
        self.ui_controller.handle_event(&mut self.data.ui(), event);
    }
    fn draw(&mut self, framebuffer: &mut ugli::Framebuffer) {
        ugli::clear(framebuffer, Some(Color::BLACK), None);
        self.ui_controller.draw(&mut self.data.ui(), framebuffer);
    }
    fn transition(&mut self) -> Option<geng::Transition> {
        if let Some(transition) = self.data.game_options_config.transition() {
            return Some(geng::Transition::Push(transition));
        }
        self.data.transition()
    }
}
//! Request logging middleware
use actix_service::{Service, Transform};
use actix_web::dev::{BodySize, MessageBody, ResponseBody, ServiceRequest, ServiceResponse};
use actix_web::error::Error;
use actix_web::http::StatusCode;
use bytes::Bytes;
use futures::future::{ok, FutureResult};
use futures::{Async, Future, Poll};
use std::marker::PhantomData;
use std::rc::Rc;

use crate::tokens::ClaimsValidator;

pub struct Logger(Rc<Inner>);

struct RequestData {
    time: time::Tm,
    remote_ip: String,
    request_line: String,
    user_agent: String,
}

struct ResponseData {
    status: StatusCode,
    token_name: String,
    size: usize,
}

pub struct Inner {}

impl Inner {
    fn log(&self, req: &RequestData, resp: &ResponseData) {
        let rt = ((time::now() - req.time).num_nanoseconds().unwrap_or(0) as f64) / 1_000_000_000.0;

        log::info!(
            "{} \"{}\" {} {} {} {} {:.6}",
            req.remote_ip,
            req.request_line,
            resp.token_name,
            resp.status.as_u16(),
            resp.size,
            req.user_agent,
            rt
        );
    }
}

impl Logger {
    pub fn default() -> Logger {
        Logger(Rc::new(Inner {}))
    }
}

impl<S, B> Transform<S> for Logger
where
    S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
    B: MessageBody,
{
    type Request = ServiceRequest;
    type Response = ServiceResponse<StreamLog<B>>;
    type Error = Error;
    type InitError = ();
    type Transform = LoggerMiddleware<S>;
    type Future = FutureResult<Self::Transform, Self::InitError>;

    fn new_transform(&self, service: S) -> Self::Future {
        ok(LoggerMiddleware {
            service,
            inner: self.0.clone(),
        })
    }
}

/// Logger middleware
pub struct LoggerMiddleware<S> {
    inner: Rc<Inner>,
    service: S,
}

impl<S, B> Service for LoggerMiddleware<S>
where
    S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
    B: MessageBody,
{
    type Request = ServiceRequest;
    type Response = ServiceResponse<StreamLog<B>>;
    type Error = Error;
    type Future = LoggerResponse<S, B>;

    fn poll_ready(&mut self) -> Poll<(), Self::Error> {
        self.service.poll_ready()
    }

    fn call(&mut self, req: ServiceRequest) -> Self::Future {
        let now = time::now();

        let remote_ip = req.connection_info().remote().unwrap_or("-").to_string();

        let request_line = if req.query_string().is_empty() {
            format!("{} {} {:?}", req.method(), req.path(), req.version())
        } else {
            format!(
                "{} {}?{} {:?}",
                req.method(),


    if (d->db) {
	if (w)
	    setTabOrder(w, d->db);
	w = d->db;
    }
    if (d->ab) {
	if (w)
	    setTabOrder(w, d->ab);
	w = d->ab;
    }
    if (d->cb) {
	if (w)
	    setTabOrder(w, d->cb);
	w = d->cb;
    }
    setTabOrder(w, d->tw);
}

/*!\reimp
*/
void Q3TabDialog::resizeEvent(QResizeEvent * e)
{
    QDialog::resizeEvent(e);
}

/*!\reimp
*/
void Q3TabDialog::paintEvent(QPaintEvent *)
{
}

/*!\reimp
*/
void Q3TabDialog::showEvent(QShowEvent *e)
{
    if (!e->spontaneous())
        show();
    QDialog::showEvent(e);
}

/*!
  Adds an OK button to the dialog and sets the button's text to \a text.

  When the OK button is clicked, the applyButtonPressed() signal is emitted,
  and the current settings in the dialog box should be applied to
  the application. The dialog then closes.

  If \a text is an empty string, no button is shown.

  \sa setCancelButton() setDefaultButton() applyButtonPressed()
*/

void Q3TabDialog::setOkButton(const QString &text)
{
    if (text.isEmpty()) {
	delete d->ok;
	d->ok = 0;
	setSizes();
    } else {
	if (!d->ok) {
	    d->ok = new QPushButton(this, "ok");
	    connect(d->ok, SIGNAL(clicked()),
		     this, SIGNAL(applyButtonPressed()));
	    setUpLayout();
	}
	d->ok->setText(text);
	setSizes();
	//d->ok->show();
    }
}
/*!
  \overload

  Adds an OK button to the dialog. The button's text is set to
  a localizable "OK".
 */

void Q3TabDialog::setOkButton()
{
    setOkButton(tr("OK"));
}

/*
    \overload
  Old version of setOkButton(), provided for backward compatibility.
*/
void Q3TabDialog::setOKButton(const QString &text)
{
    // Ugly workaround for original "OK" default argument
    QString newText(text);
    if (text.isNull())
	newText = QString::fromLatin1("OK");
    setOkButton(newText);
}

/*!  Returns the text in the tab for page \a w.
*/

QString Q3TabDialog::tabLabel(QWidget * w)
{
    return d->tw->tabLabel(w);
}

/*!  \internal
*/
void Q3TabDialog::styleChange(QStyle& s)
{
    QDialog::styleChange(s);
    setSizes();
}

/*!  Returns a pointer to the page currently being displayed by the
tab dialog. The tab dialog does its best to make sure that this value
is never 0 (but if you try hard enough, it can be).
*/

QWidget * Q3TabDialog::currentPage() const
{
    return d->tw->currentPage();
}

/*!
 \overload
  Defines a new \a label for the tab of page \a w
 */
void Q3TabDialog::changeTab(QWidget *w, const QString &label)
{
    d->tw->changeTab(w, label);
}

/*!
    Changes tab page \a w's iconset to \a iconset and label to \a label.

 */
void Q3TabDialog::changeTab(QWidget *w, const QIcon& iconset, const QString &label)
{
    d->tw->changeTab(w, iconset, label);
}

/*! Removes page \a w from this stack of widgets. Does not
  delete \a w.
  \sa showPage(), QTabWidget::rem


package com.zenyte.api.model

enum class IronmanMode(val id: Int) {
    REGULAR(0),
    IRONMAN(1),
    ULTIMATE_IRONMAN(2),
    HARDCORE_IRONMAN(3),
    DEAD_HARDCORE_IRONMAN(4);

    companion object {
        @JvmField
        val VALUES = values().asList()
    }
}

enum class ExpMode(val index: Int) {
    FIFTY(0),
    TEN(1),
    FIVE(2);

    companion object {
        @JvmField
        val VALUES = values().asList()
    }
}

enum class Role(val forumGroupId: Int = -1, val discordRoleId: Long = -1) {

    QUEEN(12, 374174447730556928),
    ADMINISTRATOR(4, 374174266960379905),
    DEVELOPER(11, 378218219326013443),

    REGISTERED_MEMBER(forumGroupId = 3),

    WEB_DEVELOPER(19, 573618268724658226),
    FORUM_MODERATOR(7, 581282007389306880),
    MODERATOR(6, 402904089886851082),
    SENIOR_MODERATOR(20, 584558360955977779),
    SUPPORT(8, 402904374873161730),

    STAFF(discordRoleId = 378650181165514752),

    YOUTUBER(18, 572801385155002386),

    SAPPHIRE_MEMBER(14, 582400825352257566),
    EMERALD_MEMBER(15, 582401068592529448),
    RUBY_MEMBER(16, 582401279285002240),
    DIAMOND_MEMBER(17, 582401511548780564),
    DRAGONSTONE_MEMBER(21, 583010349385777152),
    ONYX_MEMBER(22, 583010520441815041),
    ZENYTE_MEMBER(23, 583010557075128320),

    VERIFIED(discordRoleId = 582579215199895553),
    BETA_CREW(discordRoleId = 426449738108370944),
    BETA_MEDAL(discordRoleId = 449849891779379200),

    ZENYTE_BOT(discordRoleId = 503995939783180288),

    ;

    fun isDiscordRole() = discordRoleId != -1L
    fun isForumRole() = forumGroupId != -1

    companion object {
        @JvmField
        val VALUES = values().asList()

        @JvmField
        val FORUM_GROUPS = VALUES.filter { it.isForumRole() }.map { Pair(it.forumGroupId, it) }.toMap()

        @JvmField
        val DISCORD_ROLES = VALUES.filter { it.isDiscordRole() }.map { Pair(it.discordRoleId, it) }.toMap()

        @JvmField
        val DONATOR_ROLES = listOf(SAPPHIRE_MEMBER, EMERALD_MEMBER, RUBY_MEMBER, DIAMOND_MEMBER, DRAGONSTONE_MEMBER, ONYX_MEMBER, ZENYTE_MEMBER)
    }

}
plugins {
    `kotlin-dsl`
}

gradlePlugin {
    plugins {
        create("pluginsForCoolKids") {
            id = "rust"
            implementationClass = "RustPlugin"
        }
    }
}

repositories {
    google()
    mavenCentral()
}

dependencies {
    compileOnly(gradleApi())
    implementation("com.android.tools.build:gradle:8.11.0")
}

import java.io.File
import org.apache.tools.ant.taskdefs.condition.Os
import org.gradle.api.DefaultTask
import org.gradle.api.GradleException
import org.gradle.api.logging.LogLevel
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.TaskAction

open class BuildTask : DefaultTask() {
    @Input
    var rootDirRel: String? = null
    @Input
    var target: String? = null
    @Input
    var release: Boolean? = null

    @TaskAction
    fun assemble() {
        val executable = """pnpm""";
        try {
            runTauriCli(exec


IAsyncDisposable objLocker = await LockObject.EnterReadLockAsync(token).ConfigureAwait(false);
            try
            {
                token.ThrowIfCancellationRequested();
                return _lstData.TrueForAll(await match.ConfigureAwait(false));
            }
            finally
            {
                await objLocker.DisposeAsync().ConfigureAwait(false);
            }
        }

        private int _intIsDisposed;

        public bool IsDisposed => _intIsDisposed > 0;

        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (Interlocked.CompareExchange(ref _intIsDisposed, 1, 0) > 0)
                    return;
                LockObject.Dispose();
            }
        }


Helper.resolveVal(s)
    }
}
package org.javamaster.invocationlab.admin.service.maven

import org.apache.maven.cli.MavenCli
import org.javamaster.invocationlab.admin.io.RedirectConsoleOutputStream
import org.javamaster.invocationlab.admin.service.GAV
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import java.io.*
import java.net.HttpURLConnection
import java.net.URI
import java.nio.charset.StandardCharsets
import java.util.*

/**
 * @author yudong
 * 处理从nexus下载api.jar
 * 然后通过embededmaven下载这个api.jar的依赖
 */
class Maven(private val nexusUrl: String, private val nexusPathReleases: String, private val fileBasePath: String) {
    fun dependency(serviceName: String, gav: GAV) {
        val versionDirName = gav.version!!.replace("\\.".toRegex(), "_")
        val serviceDirName = versionDirName + "_" + serviceName
        RedirectConsoleOutputStream(ByteArrayOutputStream()).use {
            val pomPath = downPomAndJar(serviceDirName, gav.groupID, gav.artifactID, gav.version, it)
            logger.info("构建完成10%...")
            mavenCopyDependencies(pomPath, it)
        }
    }

    private fun downPomAndJar(
        serviceName: String, groupId: String?, artifactId: String?, version: String?,
        resultPrintStream: RedirectConsoleOutputStream
    ): String {
        resultPrintStream.println("准备下载api.jar文件...")
        resultPrintStream.println("groupId:$groupId")
        resultPrintStream.println("artifactId:$artifactId")
        resultPrintStream.println("version:$version")

        val jarUrl = buildNexusUrl(groupId, artifactId, version, "jar")
        resultPrintStream.println("api.jar的url:$jarUrl")

        val pomUrl = buildNexusUrl(groupId, artifactId, version, "pom")
        resultPrintStream.println("构建api.jar的pom.xml文件的url:$pomUrl")

        val basePath = "$fileBasePath/$serviceName"

        val file = File(basePath)
        if (file.exists()) {
            file.delete()
        }
        file.mkdirs()
        val jarPath = "$fileBasePath/$serviceName/lib"
        val libfile = File(jarPath)
        if (libfile.exists()) {
            file.delete()
        }
        libfile.mkdirs()

        resultPrintStream.println("api.jar下载路径:$jarPath")
        resultPrintStream.println("pom.xml的下载路径:$basePath")
        resultPrintStream.println("开始下载:$artifactId.jar文件")
        doDownLoadFile(jarUrl, jarPath, "$artifactId.jar")

        resultPrintStream.println("下载:$artifactId.jar文件成功")
        resultPrintStream.println("开始下载:" + artifactId + "的pom.xml文件")
        doDownLoadFile(pomUrl, basePath, "pom.xml")

        resultPrintStream.println("下载:" + artifactId + "的pom.xml文件成功")

        return basePath
    }

    private fun mavenCopyDependencies(pomPath: String, resultPrintStream: RedirectConsoleOutputStream) {
        val cli = MavenCli()
        resultPrintStream.println(
            "处理api.jar的所有依赖,通过执行maven命令: 'mvn dependency:copy-dependencies"
                    + " -DoutputDirectory=./lib -DexcludeScope=provided -U'"
        )
        resultPrintStream.println("开始执行maven命令")
        System.setProperty("maven.multiModuleProjectDirectory", "./")
        val result = cli.doMain(
            arrayOf(
                "dependency:copy-dependencies",
                "-DoutputDirectory=./lib",
                "-DexcludeScope=provided ",
                "-U"


R4 \n\
/* 080403ce */ MOVS R0, 0x0 @ Set R0 to 0x0 \n\
/* 080403d0 */ MOV R9, R0 @ Set R9 to R0 \n\
/* 080403d2 */ MOVS R0, 0x5 @ Set R0 to 0x5 \n\
/* 080403d4 */ STRB R0, [R1, 0x15] \n\
/* 080403d6 */ LDR R1, =gSpriteHandler \n\
/* 080403d8 */ MOV R8, R1 @ Set R8 to R1 \n\
/* 080403da */ LDR R0, [R1] \n\
/* 080403dc */ LDR R2, [R7] \n\
/* 080403de */ ADDS R5, R2, R4 @ Set R5 to R2 + R4 \n\
/* 080403e0 */ MOVS R3, 0x4 @ Set R3 to 0x4 \n\
/* 080403e2 */ LDRSH R1, [R5, R3] \n\
/* 080403e4 */ LDR R6, =tram_pauline_anim_table \n\
/* 080403e6 */ LDRB R3, [R2] \n\
/* 080403e8 */ LSLS R2, R3, 0x1 \n\
/* 080403ea */ ADDS R2, R2, R3 @ Set R2 to R2 + R3 \n\
/* 080403ec */ LSLS R2, R2, 0x3 \n\
/* 080403ee */ ADDS R2, 0x12 @ Add 0x12 to R2 \n\
/* 080403f0 */ LDRB R5, [R5, 0x15] \n\
/* 080403f2 */ ADDS R2, R2, R5 @ Set R2 to R2 + R5 \n\
/* 080403f4 */ LSLS R2, R2, 0x2 \n\
/* 080403f6 */ ADDS R2, R2, R6 @ Set R2 to R2 + R6 \n\
/* 080403f8 */ LDR R2, [R2] \n\
/* 080403fa */ M


    public Response<List<AIChatRecord>> getLatestChatHistoryList(String username,
                                                                 AppResourceScope appResourceScope,
                                                                 String scopeType,
                                                                 String scopeId,
                                                                 Integer start,
                                                                 Integer length) {
        if (!aiChatHistoryService.existsChatHistory(username)) {
            AIChatHistoryDTO greetingChatHistory = getGreetingChatHistory(username, appResourceScope.getAppId());
            Long id = aiChatHistoryService.insertChatHistory(greetingChatHistory);
            log.debug("Greeting chat history created, username={}, id={}", username, id);
        }
        List<AIChatHistoryDTO> chatRecordList = chatService.getLatestChatHistoryList(username, start, length);
        List<AIChatRecord> aiChatRecordList = chatRecordList.stream()
            .map(AIChatHistoryDTO::toAIChatRecord)
            .collect(Collectors.toList());
        return Response.buildSuccessResp(aiChatRecordList);
    }

    /**
     * 获取开场白对话记录
     *
     * @param username 用户名
     * @param appId    Job业务ID
     * @return 开场白对话记录
     */
    private AIChatHistoryDTO getGreetingChatHistory(String username, Long appId) {
        AIChatHistoryDTO greetingChatHistory = new AIChatHistoryDTO();
        greetingChatHistory.setUsername(username);
        greetingChatHistory.setAppId(appId);
        greetingChatHistory.setUserInput("");
        greetingChatHistory.setStartTime(System.currentTimeMillis());
        greetingChatHistory.setPromptTemplateId(null);
        greetingChatHistory.setAiInput("");
        greetingChatHistory.setStatus(AIChatStatusEnum.FINISHED.getStatus());
        greetingChatHistory.setAiAnswer(aiMessageI18nService.getAIGreetingMessage());
        greetingChatHistory.setAnswerTime(System.currentTimeMillis());
        greetingChatHistory.updateTotalTime();
        greetingChatHistory.setErrorCode(AIConsts.AI_ANSWER_ERROR_CODE_OK);
        greetingChatHistory.setErrorMessage(null);
        greetingChatHistory.setIsDeleted(false);
        return greetingChatHistory;
    }

    /**
     * 与AI进行通用对话
     *
     * @param username         用户名
     * @param appResourceScope 资源范围（业务/业务集）
     * @param scopeType        资源范围类型
     * @param scopeId          资源范围ID
     * @param req              请求体
     * @return AI对话记录响应
     */
    @Override
    public Response<AIChatRecord> generalChat(String username,
                                              AppResourceScope appResourceScope,
                                              String scopeType,
                                              String scopeId,
                                              AIGeneralChatReq req) {
        AIChatRecord aiChatRecord = chatService.chatWithAI(username, appResourceScope.getAppId(), req.getContent());
        return Response.buildSuccessResp(aiChatRecord);
    }

    /**
     * 使用AI检查脚本内容
     *
     * @param username         用户名
     * @param appResourceScope 资源范围（业务/业务集）
     * @param scopeType        资源范围类型
     * @param scopeId          资源范围ID
     * @param req              请求体
     * @return AI对话记录响应
     */
    @Override
    public Response<AIChatRecord> checkScript(String username,
                                              AppResourceScope appResourceScope,
                                              String scopeType,
                                              String scope


the output file.

      SANDIA_SGMG_UNIQUE_INDEX_PRB tests SANDIA_SGMG_UNIQUE_INDEX.

          sandia_sgmg_unique_index_prb.cpp,
          the test program.

          sandia_sgmg_unique_index_prb.sh,
          commands to compile and run the sample program.

                     sandia_sgmg_unique_index_prb_output.txt,
          the output file.

      SANDIA_SGMG_WEIGHT_PRB tests SANDIA_SGMG_WEIGHT.

          sandia_sgmg_weight_prb.cpp,
          the test program.

          sandia_sgmg_weight_prb.sh,
          commands to compile and run the sample program.

                     sandia_sgmg_weight_prb_output.txt,
          the output file.

      List of Routines:

          PRODUCT_MIXED_GROWTH_WEIGHT computes the weights of a mixed product rule.

          SANDIA_SGMG_INDEX indexes a sparse grid of mixed 1D rules.

          SANDIA_SGMG_POINT computes the points of a sparse grid rule.

          SANDIA_SGMG_SIZE sizes a sparse grid, discounting duplicates.

          SANDIA_SGMG_SIZE_TOTAL sizes a sparse grid, counting duplicates.

          SANDIA_SGMG_UNIQUE_INDEX maps nonunique to unique points.

          SANDIA_SGMG_WEIGHT: sparse grid weights for a mix of 1D rules.

      You can go up one level to
      the C++ source codes.

      Last revised on 01 January 2012.

    <title>
      MULTITASK_OPENMP - Carrying Out Multiple "Tasks" in OpenMP
    </title>

      MULTITASK_OPENMP
 Carrying Out Multiple "Tasks" in OpenMP

      MULTIT


me string
}

// Fired when the client receives a message from either a friend or a chat room
type ChatMsgEvent struct {
	ChatRoomId steamid.SteamId `json:",string"` // not set for friend messages
	ChatterId  steamid.SteamId `json:",string"`
	Message    string
	EntryType  steamlang.EChatEntryType
	Timestamp  time.Time
	Offline    bool
}

// Whether the type is ChatMsg
func (c *ChatMsgEvent) IsMessage() bool {
	return c.EntryType == steamlang.EChatEntryType_ChatMsg
}

// Fired in response to joining a chat
type ChatEnterEvent struct {
	ChatRoomId    steamid.SteamId `json:",string"`
	FriendId      steamid.SteamId `json:",string"`
	ChatRoomType  steamlang.EChatRoomType
	OwnerId       steamid.SteamId `json:",string"`
	ClanId        steamid.SteamId `json:",string"`
	ChatFlags     byte
	EnterResponse steamlang.EChatRoomEnterResponse
	Name          string
}

// Fired in response to a chat member's info being received
type ChatMemberInfoEvent struct {
	ChatRoomId      steamid.SteamId `json:",string"`
	Type            steamlang.EChatInfoType
	StateChangeInfo StateChangeDetails
}

type StateChangeDetails struct {
	ChatterActedOn steamid.SteamId `json:",string"`
	StateChange    steamlang.EChatMemberStateChange
	ChatterActedBy steamid.SteamId `json:",string"`
}

// Fired when a chat action has completed
type ChatActionResultEvent struct {
	ChatRoomId steamid.SteamId `json:",string"`
	ChatterId  steamid.SteamId `json:",string"`
	Action     steamlang.EChatAction
	Result     steamlang.EChatActionResult
}

// Fired when a chat invite is received
type ChatInviteEvent struct {
	InvitedId    steamid.SteamId `json:",string"`
	ChatRoomId   steamid.SteamId `json:",string"`
	PatronId     steamid.SteamId `json:",string"`
	ChatRoomType steamlang.EChatRoomType
	FriendChatId steamid.SteamId `json:",string"`
	ChatRoomName string
	GameId       uint64 `json:",string"`
}

// Fired in response to ignoring a friend
type IgnoreFriendEvent struct {
	Result steamlang.EResult
}

// Fired in response to requesting profile info for a user
type ProfileInfoEvent struct {
	Result      steamlang.EResult
	SteamId     steamid.SteamId `json:",string"`
	TimeCreated uint32
	RealName    string
	CityName    string
	StateName   string
	CountryName string
	Headline    string
	Summary     string
}
package tradeoffer

import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
	"strconv"
	"time"

	"github.com/Philipp15b/go-steam/v3/community"
	"github.com/Philipp15b/go-steam/v3/economy/inventory"
	"github.com/Philipp15b/go-steam/v3/netutil"
	"github.com/Philipp15b/go-steam/v3/steamid"
)

type APIKey string

const apiUrl = "https://api.steampowered.com/IEconService/%s/v%d"

type Client struct {
	client    *http.Client
	key       APIKey
	sessionId string
}

func NewClient(key APIKey, sessionId, steamLogin, steamLoginSecure string) *Client {
	c := &Client{
		new(http.Client),
		key,
		sessionId,
	}
	community.SetCookies(c.client, sessionId, steamLogin, steamLoginSecure)
	return c
}

func (c *Client) GetOffer(offerId uint64) (*TradeOfferResult, error) {
	resp, err := c


ateOptionsMenu();
    if (wasHideToolbar != isHideToolbar) {
      wasHideToolbar = isHideToolbar;

      List<KiwixWebView> newWebViews = new ArrayList<>();
      for (int i = 0; i < mWebViews.size(); i++) {
        KiwixWebView newView = getWebView(mWebViews.get(i).getUrl());
        newWebViews.add(i, newView);
      }
      mWebViews = newWebViews;
      selectTab(currentWebViewIndex);
    }
    if (refresh) {
      refresh = false;
      recreate();
    }
    if (menu != null) {
      refreshBookmarkSymbol(menu);
    }
    if (getResources().getConfiguration().orientation == ORIENTATION_LANDSCAPE) {
      if (menu != null) {
        menu.getItem(4).setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
      }
    } else {
      if (menu != null) {
        menu.getItem(4).setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
      }
    }

    Intent intent = getIntent();
    if (intent.getAction() != null) {

      if (intent.getAction().equals(Intent.ACTION_PROCESS_TEXT)) {
        final String zimFile = ZimContentProvider.getZimFile();
        saveTabStates();
        Intent i = new Intent(KiwixMobileActivity.this, SearchActivity.class);
        i.putExtra("zimFile", zimFile);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
          i.putExtra(Intent.EXTRA_PROCESS_TEXT, intent.getStringExtra(Intent.EXTRA_PROCESS_TEXT));
        }
        intent.setAction("");
        startActivityForResult(i, REQUEST_FILE_SEARCH);
      } else if (intent.getAction().equals(KiwixSearchWidget.TEXT_CLICKED)){
        intent.setAction("");
        goToSearch(false);
      } else if (intent.getAction().equals(KiwixSearchWidget.STAR_CLICKED)) {
        intent.setAction("");
        goToBookmarks();
      } else if (intent.getAction().equals(KiwixSearchWidget.MIC_CLICKED)) {
        intent.setAction("");
        goToSearch(true);
      }

    }
    updateWidgets(this);
  }

  @Override
  protected void onNewIntent(Intent intent) {
    super.onNewIntent(intent);
    boolean isWidgetSearch = intent.getBooleanExtra("isWidgetSearch", false);
    boolean isWidgetVoiceSearch = intent.getBooleanExtra("isWidgetVoice", false);
    boolean isWidgetStar = intent.getBooleanExtra("isWidgetStar", false);

    if (isWidgetStar && ZimContentProvider.getId() != null) {
      goToBookmarks();
    } else if (isWidgetSearch && ZimContentProvider.getId() != null) {
      goToSearch(false);
    } else if (isWidgetVoiceSearch && ZimContentProvider.getId() != null) {
      goToSearch(true);
    } else if (isWidgetStar || isWidgetSearch || isWidgetVoiceSearch) {
      manageZimFiles(0);
    }
  }

  private void refreshBookmarks() {
    if (bookmarks != null) {
      bookmarks.clear();
    }
    if (bookmarksDao != null) {
      bookmarks = bookmarksDao.getBookmarks(ZimContentProvider.getId(), ZimContentProvider.getName());
    }
  }

  // TODO: change saving bookbark by zim name not id
  private void saveBookmark(String articleUrl, String articleTitle) {
    bookmarksDao.saveBookmark(articleUrl, articleTitle, ZimContentProvider.getId(), ZimContentProvider.getName());
    refreshBookmarks();
  }

  private void deleteBookmark(String article) {
    bookmarksDao.deleteBookmark(article, ZimContentProvider.getId(), ZimContentProvider.getName());
    refreshBookmarks();
  }

  public boolean openArticleFromBookmarkTitle(String bookmarkTitle) {
    return openArticle(ZimContent


ocal hashed = argon2.hash_encoded(password, salt, { m_cost = 65536 })

  local ok, err = db.createUser(username, hashed, salt)
  if err then
    LogError(f'Could not register user: {username}')
    LogError(err)
    return moon.serveRedirect(303, f'/register?error={user_exists}')
  end

  setSessionCookie(r, username)
  return moon.serveRedirect(302, f'/{username}')
end)

moon.get('/logout', function(r)
  local token = r.cookies[constant.SESSION_TOKEN_NAME]

  if token then
    r.cookies[constant.SESSION_TOKEN_NAME] = false
    session.delete(token)
  end

  return moon.serveRedirect(302, '/')
end)

moon.get('/:_username(/)', function(r)
  local username = _.trim(r.params._username)
  local user, err = db.getUser(username)
  local new_post_id = ''
  local nonce = nil

  if err then
    LogError(err)
    moon.setStatus(404)
    return 'User does not exist'
  end

  local user_session = checkSession(r, username)
  local has_user_access = user_session.is_valid and user_session.user_access
  local posts, err = db.getPosts(username, user.max_display_posts + 1)
  local show_archive_link = #posts > user.max_display_posts

  if err then
    LogError(err)
    moon.setStatus(500)
    return 'Error retrieving user posts'
  end

  if has_user_access then
    local post_id, err = db.getPostId()

    if err then
      LogError(err)
      moon.setStatus(500)
      return 'An error occurred'
    end

    new_post_id = post_id
  end

  local parsed_md = djot.parse(user.intro)
  local intro_html = djot.render_html(parsed_md)

  if has_user_access then
    r.headers.CacheControl = 'private, no-store'
    nonce = util.generateNonce()
    setNonce(r, nonce)
  else
    r.headers.CacheControl = 'public, max-age=3600, must-revalidate'
  end

  return moon.serveContent('user', {
    nonce = nonce,
    username = user.username,
    new_post_id = new_post_id,
    has_user_access = has_user_access,
    posts = posts,
    intro = intro_html,
    intro_raw = user.intro,
    custom_css = user.custom_css,
    custom_css_raw = util.escapeCSS(user.custom_css),
    custom_title = user.custom_title,
    max_display_posts = user.max_display_posts,
    enable_toc = user.enable_toc,
    theme = user.theme,
    themes = constant.THEME,
    show_archive_link = show_archive_link
  })
end)

moon.get('/:_username/archive(/)', function(r)
  local username = _.trim(r.params._username)
  local user, err = db.getUser(username)

  if err then
    LogError(err)
    moon.setStatus(500)
    return 'Could not find user: ' .. username
  end

  local posts, err = db.getPosts(username, 10000)

  if err then
    LogError(err)
    moon.setStatus(500)
    return 'An error occurred. Could not retrieve archive'
  end

  r.headers.CacheControl = 'public, max-age=3600, must-revalidate'
  return moon.serveContent('archive', {
    username = username,
    custom_css_raw = util.escapeCSS(user.custom_css),
    posts = posts,
    theme = user.theme,
    themes = constant.THEME
  })
end)

moon.get('/:_username/feed(/)', function(r)
  local username = _.trim(r.params._username)
  local user, err = db


 time_len = inputs_shape[0].value
    if time_len is None:
      time_len = array_ops.shape(inputs)[0]
    input_size = inputs_shape[2].value
    w = vs.get_variable(
        "W_0", [input_size + self._num_units, self._num_units * 4], dtype=dtype)
    b = vs.get_variable(
        "B", [w.get_shape().with_rank(2)[1]],
        initializer=init_ops.constant_initializer(0.0),
        dtype=dtype)
    if self._use_peephole:
      wci = vs.get_variable("W_I_diag", [self._num_units], dtype=dtype)
      wco = vs.get_variable("W_O_diag", [self._num_units], dtype=dtype)
      wcf = vs.get_variable("W_F_diag", [self._num_units], dtype=dtype)
    else:
      wci = wco = wcf = array_ops.zeros([self._num_units], dtype=dtype)

    if sequence_length is None:
      max_seq_len = time_len
    else:
      max_seq_len = math_ops.to_int64(math_ops.reduce_max(sequence_length))

    _, cs, _, _, _, _, h = _lstm_ops_so.block_lstm(
        seq_len_max=max_seq_len,
        x=inputs,
        cs_prev=initial_cell_state,
        h_prev=initial_output,
        w=w,
        wci=wci,
        wco=wco,
        wcf=wcf,
        b=b,
        forget_bias=self._forget_bias,
        cell_clip=self._cell_clip,
        use_peephole=self._use_peephole)
    return cs, h


 font sizes.
// These are extremely useful for other elements such as paddings. Sizes like up5
// have very little usage for font sizes but can be used in paddings relative to
// the
$s-scale-up1raw: $s-scale-ratio;
$s-scale-up2raw: $s-scale-ratio
        * $s-scale-ratio;
$s-scale-up3raw: $s-scale-ratio
        * $s-scale-ratio
        * $s-scale-ratio;
$s-scale-up4raw: $s-scale-ratio
        * $s-scale-ratio
        * $s-scale-ratio
        * $s-scale-ratio;
$s-scale-up5raw: $s-scale-ratio
        * $s-scale-ratio
        * $s-scale-ratio
        * $s-scale-ratio
        * $s-scale-ratio;
$s-scale-down1raw: 1
        / $s-scale-ratio;
$s-scale-down2raw: 1
        / $s-scale-ratio
        / $s-scale-ratio;
$s-scale-down3raw: 1
        / $s-scale-ratio
        / $s-scale-ratio
        / $s-scale-ratio;
$s-scale-down4raw: 1
        / $s-scale-ratio
        / $s-scale-ratio
        / $s-scale-ratio
        / $s-scale-ratio;
$s-scale-down5raw: 1
        / $s-scale-ratio
        / $s-scale-ratio
        / $s-scale-ratio
        / $s-scale-ratio
        / $s-scale-ratio;

$s-scale-up1: $s-scale-up1raw + em;
$s-scale-up2: $s-scale-up2raw + em;
$s-scale-up3: $s-scale-up3raw + em;
$s-scale-up4: $s-scale-up4raw + em;
$s-scale-up5: $s-scale-up5raw + em;
$s-scale-down1: $s-scale-down1raw + em;
$s-scale-down2: $s-scale-down2raw + em;
$s-scale-down3: $s-scale-down3raw + em;
$s-scale-down4: $s-scale-down4raw + em;
$s-scale-down5: $s-scale-down5raw + em;

// // tests:
// .s-scale-debug-absolute {
//   s-scale-d: $s-scale-d;
//   s-scale-c: $s-scale-c;
//   s-scale-b: $s-scale-b;
//   s-scale-a: $s-scale-a;
//   s-scale-1: $s-scale-1;
//   s-scale-2: $s-scale-2;
//   s-scale-3: $s-scale-3;
//   s-scale-4: $s-scale-4;
//   s-scale-5: $s-scale-5;
//   s-scale-6: $s-scale-6;
//   s-scale-7: $s-scale-7;
//   s-scale-8: $s-scale-8;
// }
// .s-scale-debug-relative {
//   s-scale-up5: $s-scale-up5;
//   s-scale-up4: $s-scale-up4;
//   s-scale-up3: $s-scale-up3;
//   s-scale-up2: $s-scale-up2;
//   s-scale-up1: $s-scale-up1;
//   s-scale-down1: $s-scale-down1;
//   s-scale-down2: $s-scale-down2;
//   s-scale-down3: $s-scale-down3;
//   s-scale-down4: $s-scale-down4;
//   s-scale-down5: $s-scale-down5;
// }
// flex containers (all of them have display: flex)
.S-flex-row     { @inc


f(args[0]) : TypeChecker.optionalDbRef(args[0], 'category'));
  }
}

const p: any = ThingType.prototype;
p.create_jel_mapping = true;

BaseTypeRegistry.register('ThingType', ThingType);

import { NowRequest, NowResponse } from '@now/node'
import { random, merge } from 'lodash';
import { PersonResponse, PeopleListResponse } from '../../types/nationbuilder';
import * as nb from '../../lib/nationbuilder'
import { someFirstName, somePerson } from '../../utils';

export default async (req: NowRequest, res: NowResponse) => {
  switch (req.method) {
    case 'POST': return createPerson(req, res)
    case 'GET': return getPeople(req, res)
    case 'PUT': return updatePerson(req, res)
    case 'DELETE': return deletePerson(req, res)
    default: {
      res.statusCode = 400
      res.json({ error: "No such method" })
    }
  }
}

export const getPeople = async (req: NowRequest, res: NowResponse) => {
  const people: PeopleListResponse = {
    results: [
      somePerson(),
      somePerson(),
      somePerson()
    ]
  } // Dummy
  // const people = await nb.getPeople()
  res.json(people as PeopleListResponse)
}

export const createPerson = async (req: NowRequest, res: NowResponse) => {
  const { person } = JSON.parse(req.body)
  if (!person) return res.json({ error: 'No person data provided' })
  // const newPerson = await nb.createPerson({ person })
  res.json({ person } as PersonResponse)
}

export const updatePerson = async (req: NowRequest, res: NowResponse) => {
  const { id, person } = JSON.parse(req.body)
  if (!id || !person) return res.json({ error: 'No person data / ID provided' })
  const updatedPerson: PersonResponse = person // Dummy response
  // const updatedPerson = await nb.updatePerson({ id, person })
  res.json({ person: updatedPerson })
}

export const deletePerson = async (req: NowRequest, res: NowResponse) => {
  const { id } = JSON.parse(req.body)
  if (!id) return res.json({ error: 'No ID provided' })
  const success = true // Dummy response
  // const success = await nb.deletePerson({ id })
  res.json({ success })
}namespace AppStorage {

    const perceptronStorageKey = 'perceptrons';

    interface PerceptronStorage {
        perceptrons: PerceptronData[];
    }

    export function getPerceptronData() {
        const json = localStorage.getItem(perceptronStorageKey);
        return json === null ? null : (JSON.parse(json) as PerceptronStorage).perceptrons;
    }

    export function savePerceptronData(perceptrons: PerceptronData[]) {
        localStorage.setItem(perceptronStorageKey,
            JSON.stringify({ perceptrons } as PerceptronStorage));
    }

}
/* Generated from Java with JSweet 1.2.0 - http://www.jsweet.org */
namespace com.jme3.cinematic {
    import CinematicEvent = com.jme3.cinematic.events.CinematicEvent;

    import IOException = java.io.IOException;

    import ArrayList = java.util.ArrayList;

    import List = java.util.List;

    /**
     *
     * @author Nehon
     */
    export class KeyFrame implements Savable {
        cinematicEvents : List<CinematicEvent> = <any>(new ArrayList<CinematicEvent>());

        private index : number;

        public getCinematicEvents() : List<CinematicEvent> {
            return this.cinematicEvents;
        }

        public setCinematicEvents(cinematicEvents : List<CinematicEvent>) {
            this.cinematic


UL=1, .LX=1, .TC=1,  .raw={0x42, 0xe6, 0x86, 0x39, 0x00, 0x20, 0x34, 0x81, 0x80, 0x00, 0x00, 0x00}}, // 0bbd
  { .type=IO,  .ZP=44, .ZF=13, .ZN=3, .TR=15, .SF=7, .MG=3, .UL=1, .UR=1, .CE=2, .LX=3, .TC=1, .RY=1, .AB=49,  .raw={0x02, 0xcd, 0x6f, 0x0f, 0x00, 0x00, 0x35, 0x93, 0x90, 0xc4, 0x00, 0x00}}, // 0bbe
  { .type=IO,  .LU=4, .ZP=46, .ZF=6, .ZN=4, .TR=6, .SA=3, .SF=4, .WL=1, .MG=3, .UL=1, .LX=1, .TC=1, .AB=1,  .raw={0x42, 0xe6, 0x86, 0x39, 0x00, 0x20, 0x34, 0x01, 0x80, 0x04, 0x00, 0x00}}, // 0bbf
  { .type=IO,  .ZP=47, .ZN=4, .TR=4, .CS=1, .SA=3, .SF=6, .MG=3, .UL=1, .UR=1, .LX=1, .TC=1, .BB=1,  .raw={0x82, 0xf0, 0x84, 0x7d, 0x00, 0x00, 0x35, 0x01, 0x80, 0x00, 0x20, 0x00}}, // 0bc0
  { .type=IO,  .ZP=47, .ZN=4, .TR=1, .CG=2, .MG=3, .UL=1, .UR=1, .CE=2, .TC=1, .AB=1, .SS=8,  .raw={0x02, 0xf0, 0x81, 0x00, 0x00, 0x01, 0x35, 0x90, 0x80, 0x04, 0x02, 0x00}}, // 0bc1
  { .type=IO,  .ZF=15, .ZN=4, .TR=30, .SF=7, .CG=3, .MG=3, .UL=1, .UR=1, .TC=1, .SS=52,  .raw={0x80, 0x0f, 0x9e, 0x0f, 0x00, 0x01, 0xb5, 0x80, 0x80, 0x00, 0x0d, 0x00}}, // 0bc2
  { .type=IO,  .LU=5, .MV=2, .ZP=45, .ZN=4, .SF=7, .WL=2, .CG=2, .UL=3, .UR=3, .CE=2, .TC=1, .AB=1, .SS=8,  .raw={0x5a, 0xd0, 0x80, 0x0f, 0x00, 0x41, 0x0f, 0x90, 0x80, 0x04, 0x02, 0x00}}, // 0bc3
  { .type=IO,  .ZP=44, .ZF=13, .ZN=4, .SF=7, .CT=2, .MS=4, .CG=2, .MG=3, .UL=1, .TC=1, .BB=1,  .raw={0x82, 0xcd, 0x80, 0x0f, 0x40, 0x09, 0x34, 0x80, 0x80, 0x00, 0x20, 0x00}}, // 0bc4
  { .type=IO,  .ZP=44, .ZF=13, .ZN


// Copyright (c) 2013 Craig Henderson
// https://github.com/cdmh/sorting_algorithms

#include "sort.h"

namespace cdmh {

// MinMax Sort

template<typename It, typename Pred=std::less<typename std::iterator_traits<It>::value_type>>
inline void minmax_sort(It begin, It end, Pred pred=Pred())
{
    auto count = std::distance(begin, end);
    for (auto it=begin, ite=end; count > 1; ++it, count-=2)
    {
        auto minmax = std::minmax_element(it, ite, pred);
        std::advance(ite,-1);

        if (minmax.second == it  &&  minmax.first == ite)
            std::swap(*it, *ite);
        else if (minmax.second == it)
        {
            std::swap(*minmax.second, *ite);
            std::swap(*minmax.first, *it);
        }
        else
        {
            std::swap(*minmax.first, *it);
            std::swap(*minmax.second, *ite);
        }
    }
}

}   // namespace cdmh

// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.


alla de Gladiador implacable",
[72447] = "Bufas de malla de Gladiador implacable",
[72448] = "Distintivo de dominancia de Gladiador implacable",
[72449] = "Insignia de dominancia de Gladiador implacable",
[72450] = "Distintivo de victoria de Gladiador implacable",
[72451] = "Capa de prontitud de Gladiador implacable",
[72452] = "Capa de destreza de Gladiador implacable",
[72453] = "Gargantilla de competencia de Gladiador implacable",
[72454] = "Gargantilla de precisión de Gladiador implacable",
[72455] = "Insignia de victoria de Gladiador implacable",
[72456] = "Reliquia de conquista de Gladiador implacable",
[72457] = "Sello de crueldad de Gladiador implacable",
[72458] = "Sello de precisión de Gladiador implacable",
[72459] = "Manoplas de tejido vil de Gladiador implacable",
[72460] = "Capucha de tejido vil de Gladiador implacable",
[72461] = "Calzas de tejido vil de Gladiador implacable",
[72462] = "Vestiduras de tejido vil de Gladiador implacable",
[72463] = "Amito de tejido vil de Gladiador implacable",
[72464] = "Pechera de placas de Gladiador implacable",
[72465] = "Guanteletes de placas de Gladiador implacable",
[72466] = "Yelmo de placas de Gladiador implacable",
[72467] = "Musleras de placas de Gladiador implacable",
[72468] = "Sobrehombros de placas de Gladiador implacable",
[72469] = "Monster - Wand, PVPCataclysmS3_C_02 White",
[72470] = "Monster - Offhand, 1H PVPCataclysmS3 C 01 - Blue",
[72471] = "Monster - Offhand, 1H PVPCataclysmS3 C 01 - Red",
[72472] = "Monster - Offhand, 1H PVPCataclysmS3 C 01 - Purple",
[72473] = "Monster - Offhand, 1H PVPCataclysmS3 C 01 - Orange",
[72474] = "Monster - Offhand, 1H PVPCataclysmS3 C 01 - Glow",
[72475] = "Filete de acechador",
[72476] = "Monster - Shield, PVPCataclysmS3 C 02 - Red",
[72477] = "Monster - Shield, PVPCataclysmS3 C 02 - Blue",
[72478] = "Monster - Shield, PVPCataclysmS3 C 02 - Black",
[72479] = "Monster - Shield, PVPCataclysmS3 C 02 - Green",
[72480] = "Ojo de cobalto",
[72481] = "Monster - Staff, 2H PVPCataclysmS3 C 03 - Green",
[72482] = "Monster - Staff, 2H PVPCataclysmS3 C 03 - Grey",
[72483] = "Monster - Staff, 2H PVPCataclysmS3 C 03 - Purple",
[72484] = "Monster - Staff, 2H PVPCataclysmS3 C 03 - White",
[72485] = "Monster - Sword, 1H PVPCataclysmS3 C 02 - Default",
[72486] = "Monster - Sword, 1H PVPCataclysmS3 C 02 - Blue",
[72487] = "Monster - Sword, 1H PVPCataclysmS3 C 02 - Dark",
[72488] = "Monster - Sword, 1H PVPCataclysmS


aredFields[fieldtype.FieldNdir]
	return ok
}

// ResetNdir resets all changes to the "ndir" field.
func (m *FieldTypeMutation) ResetNdir() {
	m.ndir = nil
	delete(m.clearedFields, fieldtype.FieldNdir)
}

// SetStr sets the "str" field.
func (m *FieldTypeMutation) SetStr(ss sql.NullString) {
	m.str = &ss
}

// Str returns the value of the "str" field in the mutation.
func (m *FieldTypeMutation) Str() (r sql.NullString, exists bool) {
	v := m.str
	if v == nil {
		return
	}
	return *v, true
}

// OldStr returns the old "str" field's value of the FieldType entity.
// If the FieldType object wasn't provided to the builder, the object is fetched from the database.
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *FieldTypeMutation) OldStr(ctx context.Context) (v sql.NullString, err error) {
	if !m.op.Is(OpUpdateOne) {
		return v, errors.New("OldStr is only allowed on UpdateOne operations")
	}
	if m.id == nil || m.oldValue == nil {
		return v, errors.New("OldStr requires an ID field in the mutation")
	}
	oldValue, err := m.oldValue(ctx)
	if err != nil {
		return v, fmt.Errorf("querying old value for OldStr: %w", err)
	}
	return oldValue.Str, nil
}

// ClearStr clears the value of the "str" field.
func (m *FieldTypeMutation) ClearStr() {
	m.str = nil
	m.clearedFields[fieldtype.FieldStr] = struct{}{}
}

// StrCleared returns if the "str" field was cleared in this mutation.
func (m *FieldTypeMutation) StrCleared() bool {
	_, ok := m.clearedFields[fieldtype.FieldStr]
	return ok
}

// ResetStr resets all changes to the "str" field.
func (m *FieldTypeMutation) ResetStr() {
	m.str = nil
	delete(m.clearedFields, fieldtype.FieldStr)
}

// SetNullStr sets the "null_str" field.
func (m *FieldTypeMutation) SetNullStr(ss *sql.NullString) {
	m.null_str = &ss
}

// NullStr returns the value of the "null_str" field in the mutation.
func (m *FieldTypeMutation) NullStr() (r *sql.NullString, exists bool) {
	v := m.null_str
	if v == nil {
		return
	}
	return *v, true
}

// OldNullStr returns the old "null_str" field's value of the FieldType entity.
// If the FieldType object wasn't provided to the builder, the object is fetched from the database.
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (m *FieldTypeMutation) OldNullStr(ctx context.Context) (v *sql.NullString, err error) {
	if !m.op.Is(OpUpdateOne) {
		return v, errors.New("OldNullStr is only allowed on UpdateOne operations")
	}
	if m.id == nil || m.oldValue == nil {
		return v, errors.New("OldNullStr requires an ID field in the mutation")
	}
	oldValue, err := m.oldValue(ctx)
	if err != nil {
		return v, fmt.Errorf("querying old value for OldNullStr: %w", err)
	}
	return oldValue.NullStr, nil
}

// ClearNullStr clears the value of the "null_str" field.
func (m *FieldTypeMutation) ClearNullStr() {
	m.null_str = nil
	m.clearedFields[fieldtype.FieldNullStr] =


/*
 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
 *           (C) 1999 Antti Koivisto (koivisto@kde.org)
 * Copyright (C) 2010 Apple Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 *
 */

#ifndef HTMLHeadingElement_h
#define HTMLHeadingElement_h

#include "HTMLElement.h"

namespace WebCore {

class HTMLHeadingElement : public HTMLElement {
public:
    static PassRefPtr<HTMLHeadingElement> create(const QualifiedName&, Document*);

private:
    HTMLHeadingElement(const QualifiedName&, Document*);
};

} // namespace WebCore

#endif // HTMLHeadingElement_h


rts++
		}
	}

	var streamed bool
	switch strings.ToLower(info.Method) {
	case "streamed":
		streamed = true
	case "threaded":
		streamed = false
	default:
		return nil, fmt.Errorf("can't use method %q with newLargeUpload", info.Method)
	}

	threads := min(f.ci.Transfers, info.MaxNumberOfThreads)

	// unwrap the accounting from the input, we use wrap to put it
	// back on after the buffering
	in, wrap := accounting.UnWrap(in)
	up = &largeUpload{
		ctx:      ctx,
		f:        f,
		o:        o,
		in:       in,
		wrap:     wrap,
		size:     size,
		threads:  threads,
		info:     info,
		parts:    parts,
		streamed: streamed,
	}
	return up, nil
}

// parse the api.UploadFinishResponse in respBody
func (up *largeUpload) parseUploadFinishResponse(respBody []byte) (err error) {
	var finish api.UploadFinishResponse
	err = json.Unmarshal(respBody, &finish)
	if err != nil {
		// Sometimes the unmarshal fails in which case return the body
		return fmt.Errorf("upload: bad response: %q", bytes.TrimSpace(respBody))
	}
	return up.o.checkUploadResponse(up.ctx, &finish)
}

// Transfer a chunk
func (up *largeUpload) transferChunk(ctx context.Context, part int64, offset int64, body []byte, fileHash string) error {
	md5sumRaw := md5.Sum(body)
	md5sum := hex.EncodeToString(md5sumRaw[:])
	size := int64(len(body))

	// Add some more parameters to the ChunkURI
	u := up.info.ChunkURI
	u += fmt.Sprintf("&index=%d&byteOffset=%d&hash=%s&fmt=json",
		part, offset, md5sum,
	)
	if fileHash != "" {
		u += fmt.Sprintf("&finish=true&fileSize=%d&fileHash=%s",
			offset+int64(len(body)),
			fileHash,
		)
	}
	opts := rest.Opts{
		Method:        "POST",
		RootURL:       u,
		ContentLength: &size,
	}
	var respBody []byte
	err := up.f.pacer.Call(func() (bool, error) {
		fs.Debugf(up.o, "Sending chunk %d length %d", part, len(body))
		opts.Body = up.wrap(bytes.NewReader(body))
		resp, err := up.f.srv.Call(ctx, &opts)
		if err != nil {
			fs.Debugf(up.o, "Error sending chunk %d: %v", part, err)
		} else {
			respBody, err = rest.ReadBody(resp)
		}
		// retry all errors now that the multipart upload has started
		return err != nil, err
	})
	if err != nil {
		fs.Debugf(up.o, "Error sending chunk %d: %v", part, err)
		return err
	}
	// If last chunk and using "streamed" transfer, get the response back now
	if up.streamed && fileHash != "" {
		return up.parseUploadFinishResponse(respBody)
	}
	fs.Debugf(up.o, "Done sending chunk %d", part)
	return nil
}

// finish closes off the large upload and reads the metadata
func (up *largeUpload) finish(ctx context.Context) error {
	fs.Debugf(up.o, "Finishing large file upload")
	// For a streamed transfer we will already have read the info
	if up.streamed {
		return nil
	}

	opts := rest.Opts{
		Method:  "POST",
		RootURL: up.info.FinishURI,
	}
	var respBody []byte
	err := up.f.pacer.Call(func() (bool, error) {
		resp,


10-1.414z\'/%3e%3c/svg%3e') center/.75rem auto no-repeat;color:#7367F0!important}.bg-light-primary{background:rgba(115,103,240,.12)!important;color:#7367F0!important}.bg-light-primary.fc-h-event,.bg-light-primary.fc-v-event{border-color:rgba(115,103,240,.1)}.bg-light-primary .fc-list-event-dot,.btn-primary{border-color:#7367F0!important}.bg-light-primary.fc-list-event:hover td{background:rgba(115,103,240,.1)!important}.bg-light-primary.fc-list-event .fc-list-event-title{color:#6E6B7B}.avatar.bg-light-primary{color:#7367F0!important}.border-primary{border:1px solid #7367F0!important}.border-top-primary{border-top:1px solid #7367F0}.border-bottom-primary{border-bottom:1px solid #7367F0}.border-start-primary{border-left:1px solid #7367F0}.border-end-primary{border-right:1px solid #7367F0}.bg-primary.badge-glow,.border-primary.badge-glow{box-shadow:0 0 10px #7367F0}.badge.badge-light-primary{background-color:rgba(115,103,240,.12);color:#7367F0!important}.overlay-primary{background:#7367F0;background:rgba(115,103,240,.6)}.btn-flat-primary.dropdown-toggle::after,.btn-outline-primary.dropdown-toggle::after{background-image:url('data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 24 24\' fill=\'none\' stroke=\'%237367f0\' stroke-width=\'2\' stroke-linecap=\'round\' stroke-linejoin=\'round\' class=\'feather feather-chevron-down\'%3E%3Cpolyline points=\'6 9 12 15 18 9\'%3E%3C/polyline%3E%3C/svg%3E')}.btn-primary{background-color:#7367F0!important;color:#FFF!important}.btn-check:active+.btn-primary,.btn-check:checked+.btn-primary,.btn-primary.active,.btn-primary:active,.btn-primary:focus{color:#FFF;background-color:#5E50EE!important}.btn-primary:hover:not(.disabled):not(:disabled){box-shadow:0 8px 25px -8px #7367F0}.btn-primary:not(:disabled):not(.disabled):active:focus{box-shadow:none}.btn-flat-primary{background-color:transparent;color:#7367F0}.btn-flat-primary:hover{color:#7367F0}.btn-flat-primary:hover:not(.disabled):not(:disabled){background-color:rgba(115,103,240,.12)}.btn-flat-primary.active,.btn-flat-primary:active,.btn-flat-primary:focus{background-color:rgba(115,103,240,.2);color:#7367F0}.btn-relief-primary{background-color:#7367F0;box-shadow:inset 0 -3px 0 0 rgba(34,41,47,.2);color:#FFF;-webkit-transition:all .2s ease;transition:all .2s ease}.btn-relief-primary:hover:not(.disabled):not(:disabled){background-color:#887EF2}.btn-relief-primary.active,.btn-relief-primary:active,.btn-relief-primary:focus{background-color:#5E50EE}.btn-relief-primary:hover{color:#FFF}.btn-relief-primary.active,.btn-relief-primary:active{outline:0;box-shadow:none;-webkit-transform:translateY(3px);-ms-transform:translateY(3px);


IES_EXT".."1000259002"
    )

    EnumConstant(
        "DYNAMIC_STATE_LINE_STIPPLE_EXT".."1000259000"
    )

    EnumConstant(
        "LINE_RASTERIZATION_MODE_DEFAULT_EXT".."0",
        "LINE_RASTERIZATION_MODE_RECTANGULAR_EXT".."1",
        "LINE_RASTERIZATION_MODE_BRESENHAM_EXT".."2",
        "LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT".."3"
    )

    void(
        "CmdSetLineStippleEXT",

        VkCommandBuffer("commandBuffer"),
        uint32_t("lineStippleFactor"),
        uint16_t("lineStipplePattern")
    )
}/*
 * Copyright LWJGL. All rights reserved.
 * License terms: https://www.lwjgl.org/license
 * MACHINE GENERATED FILE, DO NOT EDIT
 */
package vulkan.templates

import org.lwjgl.generator.*
import vulkan.*

val KHR_surface = "KHRSurface".nativeClassVK("KHR_surface", type = "instance", postfix = "KHR") {
    IntConstant(
        "KHR_SURFACE_SPEC_VERSION".."25"
    )

    StringConstant(
        "KHR_SURFACE_EXTENSION_NAME".."VK_KHR_surface"
    )

    EnumConstant(
        "ERROR_SURFACE_LOST_KHR".."-1000000000",
        "ERROR_NATIVE_WINDOW_IN_USE_KHR".."-1000000001"
    )

    EnumConstant(
        "OBJECT_TYPE_SURFACE_KHR".."1000000000"
    )

    EnumConstant(
        "SURFACE_TRANSFORM_IDENTITY_BIT_KHR".enum(0x00000001),
        "SURFACE_TRANSFORM_ROTATE_90_BIT_KHR".enum(0x00000002),
        "SURFACE_TRANSFORM_ROTATE_180_BIT_KHR".enum(0x00000004),
        "SURFACE_TRANSFORM_ROTATE_270_BIT_KHR".enum(0x00000008),
        "SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR".enum(0x00000010),
        "SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR".enum(0x00000020),
        "SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR".enum(0x00000040),
        "SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR".enum(0x00000080),
        "SURFACE_TRANSFORM_INHERIT_BIT_KHR".enum(0x00000100)
    )

    EnumConstant(
        "PRESENT_MODE_IMMEDIATE_KHR".."0",
        "PRESENT_MODE_MAILBOX_KHR".."1",
        "PRESENT_MODE_FIFO_KHR".."2",
        "PRESENT_MODE_FIFO_RELAXED_KHR".."3"
    )

    EnumConstant(
        "COLOR_SPACE_SRGB_NONLINEAR_KHR".."0",
        "COLORSPACE_SRGB_NONLINEAR_KHR".."0"
    )

    EnumConstant(
        "COMPOSITE_ALPHA_OPAQUE_BIT_KHR".enum(0x00000001),
        "COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR".enum(0x00000002),
        "COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR".enum(0x00000004),
        "COMPOSITE_ALPHA_INHERIT_BIT_KHR".enum(0x00000008)
    )

    void(
        "DestroySurfaceKHR",

        VkInstance("instance"),
        VkSurfaceKHR("surface"),
        nullable..VkAllocationCallbacks.const.p("pAllocator")
    )

    VkResult(
        "GetPhysicalDeviceSurfaceSupportKHR",

        VkPhysicalDevice("physicalDevice"),
        uint


moz-box-shadow: none;
  -webkit-box-shadow: none;
  box-shadow: none;
}@charset "UTF-8";.swagger-ui html{box-sizing:border-box}.swagger-ui *,.swagger-ui :after,.swagger-ui :before{box-sizing:inherit}.swagger-ui body{margin:0;background:#fafafa}.swagger-ui .wrapper{width:100%;max-width:1460px;margin:0 auto;padding:0 20px}.swagger-ui .opblock-tag-section{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.swagger-ui .opblock-tag{display:-webkit-box;display:-ms-flexbox;display:flex;padding:10px 20px 10px 10px;cursor:pointer;transition:all .2s;border-bottom:1px solid rgba(59,65,81,.3);-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .opblock-tag:hover{background:rgba(0,0,0,.02)}.swagger-ui .opblock-tag{font-size:24px;margin:0 0 5px;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .opblock-tag.no-desc span{-webkit-box-flex:1;-ms-flex:1;flex:1}.swagger-ui .opblock-tag svg{transition:all .4s}.swagger-ui .opblock-tag small{font-size:14px;font-weight:400;padding:0 10px;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .parаmeter__type{font-size:12px;padding:5px 0;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .view-line-link{position:relative;top:3px;width:20px;margin:0 5px;cursor:pointer;transition:all .5s}.swagger-ui .opblock{margin:0 0 15px;border:1px solid #000;border-radius:4px;box-shadow:0 0 3px rgba(0,0,0,.19)}.swagger-ui .opblock.is-open .opblock-summary{border-bottom:1px solid #000}.swagger-ui .opblock .opblock-section-header{padding:8px 20px;background:hsla(0,0%,100%,.8);box-shadow:0 1px 2px rgba(0,0,0,.1)}.swagger-ui .opblock .opblock-section-header,.swagger-ui .opblock .opblock-section-header label{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .opblock .opblock-section-header label{font-size:12px;font-weight:700;margin:0;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .opblock .opblock-section-header label span{padding:0 10px 0 0}.swagger-ui .opblock .opblock-section-header h4{font-size:14px;margin:0;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .opblock .opblock-summary-method{font-size:14px;font-weight:700;min-width:80px;padding:6px 15px;text-align:center;border-radius:3px;background:#000;text-shadow:0 1px 0 rgba(0,0,0,.1);font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .opblock .opblock-summary-path,.swagger-ui .opblock .opblock-summary-path__deprecated{font-size:16px;display:-webkit-box;display


3B8 24070000 */  addiu   $a3, $zero, 0x0000         ## $a3 = 00000000
/* 00E6C 80AF33BC 8FA40020 */  lw      $a0, 0x0020($sp)
/* 00E70 80AF33C0 240E000A */  addiu   $t6, $zero, 0x000A         ## $t6 = 0000000A
/* 00E74 80AF33C4 AC8E02A8 */  sw      $t6, 0x02A8($a0)           ## 000002A8
/* 00E78 80AF33C8 AC8002AC */  sw      $zero, 0x02AC($a0)         ## 000002AC
/* 00E7C 80AF33CC A08000C8 */  sb      $zero, 0x00C8($a0)         ## 000000C8
/* 00E80 80AF33D0 8FBF001C */  lw      $ra, 0x001C($sp)
/* 00E84 80AF33D4 27BD0020 */  addiu   $sp, $sp, 0x0020           ## $sp = 00000000
/* 00E88 80AF33D8 03E00008 */  jr      $ra
/* 00E8C 80AF33DC 00000000 */  nop


#ifndef SIMSU_H
#define SIMSU_H

#include <QWidget>
#include "onyx/base/base.h"
#include "onyx/screen/screen_proxy.h"
#include "onyx/ui/ui.h"
#include "sudokuactions.h"
#include "mdialog.h"
class QBoxLayout;
class QButtonGroup;
class QToolButton;
class QGridLayout;

using namespace ui;

namespace onyx {
namespace simsu {
class Board;
class Cell;

class Simsu : public QWidget {
        Q_OBJECT
    public:
        Simsu ( QWidget *parent = 0, Qt::WindowFlags f = 0 );
        ~Simsu();
    protected:
        void closeEvent ( QCloseEvent *event );
        bool event ( QEvent *event );
        void keyPressEvent (QKeyEvent * event);
        void keyReleaseEvent (QKeyEvent * event);

    private slots:
        void showBoard();
        void showMenu();
        void newGame();
        void checkGame();
        void about();
        void onWin();
    private:
        Board *m_board;
        QBoxLayout *m_layout;
        QBoxLayout *n_layout;
        MDialog *dialog_;
        StatusBar status_bar_;
        SystemActions system_actions_;
        SudokuActions sudoku_actions_;
        bool enable_flush_flag_;
};
}
}
#endif // SIMSU_H


:sub(3);
            end

            local expressionWithReturn = "return " .. expression;
            local f = debugger_loadString(expressionWithReturn) or debugger_loadString(expression);
            --判断结果，如果表达式错误会返回nil
            if type(f) == "function" then
                if _VERSION == "Lua 5.1" then
                    setfenv(f , env);
                else
                    debug.setupvalue(f, 1, env);
                end
                --表达式要有错误处理
                xpcall(function() retString = f() end , function() retString = "输入错误指令。\n + 请检查指令是否正确\n + 指令仅能在[暂停在断点时]输入, 请不要在程序持续运行时输入"; var.isSuccess = false; end)
            else
                retString = "指令执行错误。\n + 请检查指令是否正确\n + 可以直接输入表达式，执行函数或变量名，并观察执行结果";
                var.isSuccess = false;
            end
        end
    end

    var.name = "Exp";
    var.type = tostring(type(retString));
    xpcall(function() var.value = tostring(retString) end , function(e) var.value = tostring(type(retString))  .. " [value can't trans to string] ".. e; var.isSuccess = false; end);
    var.variablesReference = "0";
    if var.type == "table" or var.type == "function" or var.type == "userdata" then
        variableRefTab[variableRefIdx] = retString;
        var.variablesReference = variableRefIdx;
        variableRefIdx = variableRefIdx + 1;
        if var.type == "table" then
            local memberNum = this.getTableMemberNum(retString);
            var.value = memberNum .." Members ".. var.value;
        end
    elseif var.type == "string" then
        var.value = '"' ..retString.. '"';
    end
    --string执行完毕后清空env环境
    this.clearEnv();
    local retTab = {}
    table.insert(retTab ,var);
    return retTab;
end

--执行变量观察表达式
function this.processWatchedExp(msgTable)
    local retString;
    local expression = "return ".. tostring(msgTable.varName)
    this.printToConsole("processWatchedExp | expression: " .. expression);
    local f = debugger_loadString(expression);
    local var = {};
    var.isSuccess = "true";
    --判断结果，如果表达式错误会返回nil
    if type(f) == "function" then
        --表达式正确
        if _VERSION == "Lua 5.1" then
            setfenv(f , env);
        else
            debug.setupvalue(f, 1, env);
        end
        xpcall(function() retString = f() end , function() retString = "输入了错误的变量信息"; var.isSuccess = "false"; end)
    else
        retString = "未能找到变量的值";
        var.isSuccess = "false";
    end

    var.name = msgTable.varName;
    var.type = tostring(type(retString));
    xpcall(function() var.value = tostring(retString) end , function() var.value = tostring(type(retString)) .. " [value can't trans to string]"; var.isSuccess = "false"; end );
    var.variablesReference = "0";

    if var.type == "table" or var.type == "function" or var.type == "userdata" then
        variableRefTab[variableRefIdx] = retString;
        var.variablesReference = variableRefIdx;
        variableRefIdx = variableRefIdx + 1;
        if var.type == "table" then
            local memberNum = this.getTableMemberNum(retString);
            var.value = memberNum .." Members ".. var.value;
        end
    elseif var.type == "string" then
        var.value = '"' .


POWER_CTRL, TCPC_POWER_CTRL_AUTO_DISCHARGE,
					 0);
		if (ret < 0)
			logbuffer_log(chip->log, "[%s]: Disabling auto discharge failed", __func__);
	}

	ret = max77759_write8(regmap, TCPC_ROLE_CTRL, TCPC_ROLE_CTRL_DRP |
			      (TCPC_ROLE_CTRL_CC_RD <<
			       TCPC_ROLE_CTRL_CC1_SHIFT) |
			      (TCPC_ROLE_CTRL_CC_RD <<
			       TCPC_ROLE_CTRL_CC2_SHIFT));
	if (ret < 0) {
		logbuffer_log(chip->log, "[%s]: Enabling DRP failed ret:%d", __func__,
			      ret);
		return ret;
	}

	/* Enable Look4Connection before sending the command */
	ret = max77759_update_bits8(regmap, TCPC_TCPC_CTRL, TCPC_TCPC_CTRL_EN_LK4CONN_ALRT,
				    TCPC_TCPC_CTRL_EN_LK4CONN_ALRT);
	if (ret < 0) {
		logbuffer_log(chip->log, "[%s]: Enabling looking for connection failed ret:%d",
			      __func__, ret);
		return ret;
	}

	ret = max77759_write8(regmap, TCPC_COMMAND, TCPC_CMD_LOOK4CONNECTION);
	if (ret < 0)
		return ret;

	/* Reset state before enabling detection */
	if (contaminant->state != NOT_DETECTED && contaminant->state != SINK)
		contaminant->state = NOT_DETECTED;

	logbuffer_log(chip->log, "Contaminant: Contaminant detection enabled");

	return 0;
}
EXPORT_SYMBOL_GPL(enable_contaminant_detection);

bool is_contaminant_detected(struct max77759_plat *chip)
{
	if (chip)
		return chip->contaminant->state == DETECTED;

	return false;
}
EXPORT_SYMBOL_GPL(is_contaminant_detected);

struct max77759_contaminant *max77759_contaminant_init(struct max77759_plat
							 *plat, bool enable)
{
	struct max77759_contaminant *contaminant;
	struct device *dev = plat->dev;

	contaminant = devm_kzalloc(dev, sizeof(*contaminant), GFP_KERNEL);
	if (!contaminant)
		return ERR_PTR(-ENOMEM);

	contaminant->chip = plat;

	/*
	 * Do not enable in *.ATTACHED state as it would cause an unncessary
	 * disconnect.
	 */
	if (enable)
		enable_contaminant_detection(plat, contaminant_detect_maxq);

	return contaminant;
}
EXPORT_SYMBOL_GPL(max77759_contaminant_init);

MODULE_DESCRIPTION("MAX77759_CONTAMINANT Module");
MODULE_AUTHOR("Badhri Jagan Sridharan <badhri@google.com>");
MODULE_LICENSE("GPL");


.js\");\nconst _querystring = __webpack_require__(/*! ./querystring */ \"(rsc)/./node_modules/next/dist/shared/lib/router/utils/querystring.js\");\nfunction parseRelativeUrl(url, base) {\n    const globalBase = new URL( true ? \"http://n\" : 0);\n    const resolvedBase = base ? new URL(base, globalBase) : url.startsWith(\".\") ? new URL( true ? \"http://n\" : 0) : globalBase;\n    const { pathname, searchParams, search, hash, href, origin } = new URL(url, resolvedBase);\n    if (origin !== globalBase.origin) {\n        throw new Error(\"invariant: invalid relative URL, router received \" + url);\n    }\n    return {\n        pathname,\n        query: (0, _querystring.searchParamsToUrlQuery)(searchParams),\n        search,\n        hash,\n        href: href.slice(globalBase.origin.length)\n    };\n} //# sourceMappingURL=parse-relative-url.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKHJzYykvLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L3NoYXJlZC9saWIvcm91dGVyL3V0aWxzL3BhcnNlLXJlbGF0aXZlLXVybC5qcyIsIm1hcHBpbmdzIjoiOzs7O29EQWtCZ0JBOzs7ZUFBQUE7OzttQ0FqQmtCO3lDQUNLO0FBZ0JoQyxTQUFTQSxpQkFDZEMsR0FBVyxFQUNYQyxJQUFhO0lBRWIsTUFBTUMsYUFBYSxJQUFJQyxJQUNyQixLQUFrQixHQUFjLGFBQWFDLENBQWlCO0lBR2hFLE1BQU1DLGVBQWVKLE9BQ2pCLElBQUlFLElBQUlGLE1BQU1DLGNBQ2RGLElBQUlNLFVBQVUsQ0FBQyxPQUNmLElBQUlILElBQUksS0FBa0IsR0FBYyxhQUFhSSxDQUFvQixJQUN6RUw7SUFFSixNQUFNLEVBQUVRLFFBQVEsRUFBRUMsWUFBWSxFQUFFQyxNQUFNLEVBQUVDLElBQUksRUFBRUosSUFBSSxFQUFFSyxNQUFNLEVBQUUsR0FBRyxJQUFJWCxJQUNqRUgsS0FDQUs7SUFFRixJQUFJUyxXQUFXWixXQUFXWSxNQUFNLEVBQUU7UUFDaEMsTUFBTSxJQUFJQyxNQUFNLHNEQUFvRGY7SUFDdEU7SUFDQSxPQUFPO1FBQ0xVO1FBQ0FNLE9BQU9DLENBQUFBLEdBQUFBLGFBQUFBLHNCQUFzQixFQUFDTjtRQUM5QkM7UUFDQUM7UUFDQUosTUFBTUEsS0FBS1MsS0FBSyxDQUFDaEIsV0FBV1ksTUFBTSxDQUFDSyxNQUFNO0lBQzNDO0FBQ0YiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9wcm9keGNvdWQvLi4vLi4vLi4vLi4vLi4vc3JjL3NoYXJlZC9saWIvcm91dGVyL3V0aWxzL3BhcnNlLXJlbGF0aXZlLXVybC50cz9hZjNjIl0sIm5hbWVzIjpbInBhcnNlUmVsYXRpdmVVcmwiLCJ1cmwiLCJiYXNlIiwiZ2xvYmFsQmFzZSIsIlVSTCIsImdldExvY2F0aW9uT3JpZ2luIiwicmVzb2x2ZWRCYXNlIiwic3RhcnRzV2l0aCIsIndpbmRvdyIsImxvY2F0aW9uIiwiaHJlZiIsInBhdGhuYW1lIiwic2VhcmNoU


holds the number of matches.
; Matchfl holds the legal characters.
; JMPFL holds the jump vectors (minus 1).

        MATCHN = JMPFL-MATCHFL

MATCHFL:
        .byte "FPLNEASMDBT?X"

JMPFL:
        .word Invalid-1
        .word FixedToFloat-1
        .word FloatToFixed-1
        .word NaturalLog-1
        .word CommonLog-1
        .word Exponential-1
        .word Add-1
        .word Subtract-1
        .word Multiply-1
        .word Divide-1
        .word StringToFloat-1
        .word FloatToString-1
        .word Help-1
        .word Exit-1

; Strings

IntroString:
        .byte "FLOATING POINT DEMONSTRATION PROGRAM",CR,CR
        .byte "F - FIXED TO FLOATING POINT",CR
        .byte "P - FLOATING TO FIXED POINT",CR
        .byte "L - NATURAL LOG",CR
        .byte "N - COMMON LOG",CR
        .byte "E - EXPONENTIAL",CR
        .byte "A - FLOATING POINT ADD",CR
        .byte "S - FLOATING POINT SUBTRACT",CR
        .byte "M - FLOATING POINT MULTIPLY",CR
        .byte "D - FLOATING POINT DIVIDE",CR
        .byte "B - STRING TO FLOATING POINT",CR
        .byte "T - FLOATING POINT TO STRING",CR
        .byte "? - THIS HELP SCREEN",CR
        .byte "X - EXIT",CR,0

PromptString:
        .byte CR, "SELECT A FUNCTION: ",0

InvalidString:
        .byte "INVALID COMMAND, TYPE '?' FOR HELP",CR,0

FixedToFloatString:
       .byte "FIXED TO FLOATING POINT",CR,0

Enter16BitHexString:
       .byte "ENTER 16-BIT HEX NUMBER: ",0

FloatingPointIsString:
        .byte "FLOATING POINT IS: ",0

FloatToFixedString:
       .byte "FLOATING TO FIXED POINT",CR,0

EnterFloatString:
        .byte "ENTER EXPONENT AND MANTISSA: ",0

EnterFPString:
       .byte "ENTER FP STRING: ",0

FixedPointIsString:
        .byte "FIXED POINT IS: ",0

AddString:
        .byte "FLOATING POINT ADD",CR,0

SubtractString:
        .byte "FLOATING POINT SUBTRACT",CR,0

MultiplyString:
        .byte "FLOATING POINT MULTIPLY",CR,0

DivideString:
        .byte "FLOATING POINT DIVIDE",CR,0

StringToFloatingPointString:
        .byte "STRING TO FLOATING POINT",CR,0

FloatingPointToStringString:
        .byte "FLOATING POINT TO STRING",CR,0

NaturalLogString:
        .byte "NATURAL LOG",CR,0

CommonLogString:
        .byte "COMMON LOG",CR,0

ExponentialString:
        .byte "EXPONENTIAL",CR,0

ResultIsString:
        .byte "RESULT IS: ",0

ErrorString:
        .byte "ERROR OCCURRED AT ADDRESS $",0


)[\\s\\S]*",
        regex_to_reversed_partial_regex(".*?ab"));
    assert_equals<std::string>(
        "((?:(?:b)?.*)?a)[\\s\\S]*",
        regex_to_reversed_partial_regex("a.*?b"));
    assert_equals<std::string>(
        "((?:(?:d)?(?:(?:c)?b))?a)[\\s\\S]*",
        regex_to_reversed_partial_regex("a(bc)d"));
    assert_equals<std::string>(
        "((?:(?:(?:c)?b|(?:e)?d))?a)[\\s\\S]*",
        regex_to_reversed_partial_regex("a(bc|de)"));
    assert_equals<std::string>(
        "((?:(?:(?:(?:(?:c)?b?)?b?)?b)?b)?a)[\\s\\S]*",
        regex_to_reversed_partial_regex("ab{2,4}c"));
}

int main() {
    test_regex_to_reversed_partial_regex();
    test_regex();
    std::cout << "All tests passed.\n";
}
// Unit tests for quantization specific functions - quantize, dequantize and dot product

#include "ggml.h"
#include "ggml-cpu.h"

#undef NDEBUG
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <string>
#include <vector>

#if defined(_MSC_VER)
#pragma warning(disable: 4244 4267) // possible loss of data
#endif

constexpr float MAX_QUANTIZATION_REFERENCE_ERROR = 0.0001f;
constexpr float MAX_QUANTIZATION_TOTAL_ERROR = 0.002f;
constexpr float MAX_QUANTIZATION_TOTAL_ERROR_TERNARY = 0.01f;
constexpr float MAX_QUANTIZATION_TOTAL_ERROR_2BITS = 0.0075f;
constexpr float MAX_QUANTIZATION_TOTAL_ERROR_3BITS = 0.0040f;
constexpr float MAX_QUANTIZATION_TOTAL_ERROR_3BITS_XXS = 0.0050f;
constexpr float MAX_DOT_PRODUCT_ERROR = 0.02f;
constexpr float MAX_DOT_PRODUCT_ERROR_LOWBIT = 0.04f;
constexpr float MAX_DOT_PRODUCT_ERROR_TERNARY = 0.15f;

static const char* RESULT_STR[] = {"ok", "FAILED"};

// Generate synthetic data
static void generate_data(float offset, size_t n, float * dst) {
    for (size_t i = 0; i < n; i++) {
        dst[i] = 0.1 + 2*cosf(i + offset);
    }
}

// Calculate RMSE between two float arrays
static float array_rmse(const float * a1, const float * a2, size_t n) {
    double sum = 0;
    for (size_t i = 0; i < n; i++) {
        double diff = a1[i] - a2[i];
        sum += diff * diff;
    }
    return sqrtf(sum) / n;
}

// Total quantization error on test data
static float total_quantization_error(const ggml_type_traits * qfns, const ggml_type_traits_cpu * qfns_cpu, size_t test_size, const float * test_data) {
    std::vector<uint8_t> tmp_q(2*test_size);
    std::vector<float> tmp_out(test_size);

    qfns_cpu->from_float(test_data, tmp_q.data(), test_size);
    qfns->to_float(tmp_q.data(), tmp_out.data(), test_size);
    return array_rmse(test_data, tmp_out.data(), test_size);
}

// Total quantization error on test data
static float reference_quantization_error(const gg


 -2146893019;

const int SEC_E_ILLEGAL_MESSAGE = -2146893018;

const int SEC_E_CERT_UNKNOWN = -2146893017;

const int SEC_E_CERT_EXPIRED = -2146893016;

const int SEC_E_ENCRYPT_FAILURE = -2146893015;

const int SEC_E_DECRYPT_FAILURE = -2146893008;

const int SEC_E_ALGORITHM_MISMATCH = -2146893007;

const int SEC_E_SECURITY_QOS_FAILED = -2146893006;

const int SEC_E_UNFINISHED_CONTEXT_DELETED = -2146893005;

const int SEC_E_NO_TGT_REPLY = -2146893004;

const int SEC_E_NO_IP_ADDRESSES = -2146893003;

const int SEC_E_WRONG_CREDENTIAL_HANDLE = -2146893002;

const int SEC_E_CRYPTO_SYSTEM_INVALID = -2146893001;

const int SEC_E_MAX_REFERRALS_EXCEEDED = -2146893000;

const int SEC_E_MUST_BE_KDC = -2146892999;

const int SEC_E_STRONG_CRYPTO_NOT_SUPPORTED = -2146892998;

const int SEC_E_TOO_MANY_PRINCIPALS = -2146892997;

const int SEC_E_NO_PA_DATA = -2146892996;

const int SEC_E_PKINIT_NAME_MISMATCH = -2146892995;

const int SEC_E_SMARTCARD_LOGON_REQUIRED = -2146892994;

const int SEC_E_SHUTDOWN_IN_PROGRESS = -2146892993;

const int SEC_E_KDC_INVALID_REQUEST = -2146892992;

const int SEC_E_KDC_UNABLE_TO_REFER = -2146892991;

const int SEC_E_KDC_UNKNOWN_ETYPE = -2146892990;

const int SEC_E_UNSUPPORTED_PREAUTH = -2146892989;

const int SEC_E_DELEGATION_REQUIRED = -2146892987;

const int SEC_E_BAD_BINDINGS = -2146892986;

const int SEC_E_MULTIPLE_ACCOUNTS = -2146892985;

const int SEC_E_NO_KERB_KEY = -2146892984;

const int SEC_E_CERT_WRONG_USAGE = -2146892983;

const int SEC_E_DOWNGRADE_DETECTED = -2146892976;

const int SEC_E_SMARTCARD_CERT_REVOKED = -2146892975;

const int SEC_E_ISSUING_CA_UNTRUSTED = -2146892974;

const int SEC_E_REVOCATION_OFFLINE_C = -2146892973;

const int SEC_E_PKINIT_CLIENT_FAILURE = -2146892972;

const int SEC_E_SMARTCARD_CERT_EXPIRED = -2146892971;

const int SEC_E_NO_S4U_PROT_SUPPORT = -2146892970;

const int SEC_E_CROSSREALM_DELEGATION_FAILURE = -2146892969;

const int SEC_E_REVOCATION_OFFLINE_KDC = -2146892968;

const int SEC_E_ISSUING_CA_UNTRUSTED_KDC = -2146892967;

const int SEC_E_KDC_CERT_EXPIRED = -2146892966;

const int SEC_E_KDC_CERT_REVOKED = -2146892965;

const int SEC_I_SIGNATURE_NEEDED = 590684;

const int SEC_E_INVALID_PARAMETER = -2146892963;

c