al RigidBodyBasics hand2;
      private final RigidBodyBasics shoulderDifferentialYaw;
      private final SideDependentList<RigidBodyBasics> hands = new SideDependentList<>();
      private final List<JointBasics> joints = new ArrayList<>();

      private ExternalForcePoint externalForcePoint1;
      private ExternalForcePoint externalForcePoint2;

      private final OneDoFJointBasics[] oneDoFJoints;

      ForkedRobotArm()
      {
         elevator = new RigidBody("elevator", worldFrame);
         centerOfMassFrame = new CenterOfMassReferenceFrame("centerOfMass", ReferenceFrame.getWorldFrame(), elevator);

         shoulderDifferentialYaw = createDifferential("shoulderDifferential", elevator, new Vector3D(), Z);

         RigidBodyBasics upperArm = createUpperArm(shoulderDifferentialYaw);
         joints.add(upperArm.getParentJoint());

         RigidBodyBasics elbowDifferentialYaw1 = createDifferential("elbowDifferentialYaw1", upperArm, new Vector3D(0.0, 0.0, THIGH_LENGTH), Z);
         RigidBodyBasics elbowDifferentialYaw2 = createDifferential("elbowDifferentialYaw2", upperArm, new Vector3D(0.0, 0.0, THIGH_LENGTH), Z);
         RevoluteJoint differential1 = (RevoluteJoint) elbowDifferentialYaw1.getParentJoint();
         RevoluteJoint differential2 = (RevoluteJoint) elbowDifferentialYaw2.getParentJoint();
         differential1.setQ(2.5 * random.nextDouble());
         differential2.setQ(-2.5 * random.nextDouble());
         joints.add(differential1);
         joints.add(differential2);

         RigidBodyBasics lowerArm1 = createLowerArm("1", elbowDifferentialYaw1);
         RigidBodyBasics lowerArm2 = createLowerArm("2", elbowDifferentialYaw2);
         joints.add(lowerArm1.getParentJoint());
         joints.add(lowerArm2.getParentJoint());

         RigidBodyBasics wristDifferentialRoll1 = createDifferential("wristDifferential1", lowerArm1, new Vector3D(0.0, 0.0, SHIN_LENGTH), X);
         RigidBodyBasics wristDifferentialRoll2 = createDifferential("wristDifferential2", lowerArm2, new Vector3D(0.0, 0.0, SHIN_LENGTH), X);
         joints.add(wristDifferentialRoll1.getParentJoint());
         joints.add(wristDifferentialRoll2.getParentJoint());

         hand1 = createHand("1", wristDifferentialRoll1);
         hand2 = createHand("2", wristDifferentialRoll2);
         hands.put(RobotSide.LEFT, hand1);
         hands.put(RobotSide.RIGHT, hand2);
         joints.add(hand1.getParentJoint());
         joints.add(hand2.getParentJoint());

         JointBasics[] jointArray = new JointBasics[joints.size()];
         joints.toArray(jointArray);
         oneDoFJoints = MultiBodySystemTools.filterJoints(jointArray, OneDoFJointBasics.class);
         elevator.updateFramesRecursively();

         scsRobotArm = new SCSRobotFromInverseDynamicsRobotModel("robotArm", elevator.getChildrenJoints().get(0));
         scsRobotArm.setGravity(0);
         scsRobotArm.updateJointPositions_ID_to_SCS();
         scsRobotArm.update();

         addLinkGraphics();
         addForcePoint();
      }

      private void addLinkGraphics()
      {
         AppearanceDefinition upperArmAppearance = YoAppearance.Red();
         AppearanceDefinition lowerArmAppearance = YoAppearance.Red();
         AppearanceDefinition handAppearance = YoAppearance.Red();

         Link upperArmLink = scsRobotArm.getLink("upperArm");
         Link lowerArmLink1


  const UppercaseBuilder();

  @override
  Future<void> build(BuildStep buildStep) async {
    final content = await buildStep.readAsString(buildStep.inputId);
    await buildStep.writeAsString(
      buildStep.inputId.changeExtension('.g.txt'),
      content.toUpperCase(),
    );
  }

  @override
  final buildExtensions = const {
    'txt': ['g.txt'],
  };
}
// Copyright (c) 2025, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:args/command_runner.dart';
import 'package:build_daemon/constants.dart';

import '../build_runner_command_line.dart';

class DaemonOptions {
  final bool logRequests;
  final BuildMode buildMode;

  DaemonOptions({required this.buildMode, required this.logRequests});

  static DaemonOptions parse(BuildRunnerCommandLine commandLine) {
    final buildModeValue = commandLine.buildMode;
    BuildMode buildMode;
    if (buildModeValue == BuildMode.Auto.toString()) {
      buildMode = BuildMode.Auto;
    } else if (buildModeValue == BuildMode.Manual.toString()) {
      buildMode = BuildMode.Manual;
    } else {
      throw UsageException(
        'Unexpected value for $buildModeFlag: $buildModeValue',
        commandLine.usage,
      );
    }
    return DaemonOptions(
      logRequests: commandLine.logRequests!,
      buildMode: buildMode,
    );
  }
}
// Copyright (c) 2025, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:io';

import 'package:args/command_runner.dart';
import 'package:built_collection/built_collection.dart';
import 'package:path/path.dart' as p;

import '../build_runner_command_line.dart';

class ServeOptions {
  final String hostname;
  final bool liveReload;
  final bool logRequests;
  final BuiltList<ServeTarget> serveTargets;

  ServeOptions({
    required this.hostname,
    required this.liveReload,
    required this.logRequests,
    required this.serveTargets,
  });

  static ServeOptions parse(BuildRunnerCommandLine commandLine) {
    final serveTargets = <ServeTarget>[];
    var nextDefaultPort = 8080;
    for (final arg in commandLine.rest) {
      final parts = arg.split(':');
      if (parts.length > 2) {
        throw UsageException(
          'Invalid format for positional argument to serve `$arg`'
          ', expected <directory>:<port>.',
          commandLine.usage,
        );
      }

      final port =
          parts.length == 2 ? int.tryParse(parts[1]) : nextDefaultPort++;
      if (port == null) {
        throw UsageException(
          'Unable to parse port number in `$arg`',
          commandLine.usage,
        );
      }

      final path = parts.first;
      final pathParts = p.split(path);
      if (pathParts.length > 1 || path == '.') {
        throw UsageException(
          'Only top level directories such as `web` or `test` are allowed as '
          'positional args, but got `$path`',
          commandLine.usage,
        );
      }

      serveTargets.add(ServeTarget(path, port));
    }
    if (serveTargets.isEmpty) {
      for (final dir in _defaultWebDirs) {
        if (Directory(dir).existsSync()) {
          serveTargets.add(ServeTarget(dir, nextDefaultPort++));
        }
      }
    }

    return ServeOptions(
      hostname: commandLine.hostname!,
      liveReload: commandLine.liv


{json_project_name}")

            for form in new_json_2["forms"]:
                if form["name"] not in [
                    "local-plans-local-authority-details-signed-off",
                    "local-plans-local-authority-details",
                ]:
                    continue

                for question in form["questions"]:
                    for field in question["fields"]:
                        if field["key"] not in ["RoLhhf", "OlCBjB"]:
                            continue

                        if field["answer"] in CODE_TO_NAME_MAP:
                            print(
                                f"Form.answer: {field['answer']} ->",
                                f"replacing with: {CODE_TO_NAME_MAP[field['answer']]}",
                            )
                            field["answer"] = CODE_TO_NAME_MAP[field["answer"]]
                        else:
                            print(f"From answer not found: {field['key']}, {field['answer']}")

            # update the json
            assessment_record.jsonb_blob = new_json_2

    if commit:
        db.session.commit()

def main():
    update_local_authority_name(commit=False)

    # ask for confirmation
    if input("Commit changes? (y/n): ").lower() == "y":
        update_local_authority_name(commit=True)

if __name__ == "__main__":
    from app import create_app

    app = create_app()

    with app.app_context():
        main()


>想了解笔者整理的腾讯开源前端监控方案[bad.js源码解析](https://github.com/RicardoCao-Biker/Front-End-Monitoring/blob/master/badjs-sourcedoce-explain.md)可以点击查阅。

### 我们的目标是什么？
将用户在使用网页服务时产生的影响用户体验的异常通过网络请求传回服务器，并进行可视化的展现，整个过程要求我们回传的错误信息包含错误类型、调用堆栈等错误信息以便开发人员定位错误。

### 需上报的错误类型有几种？
1. 静态资源加载失败
2. AJAX请求失败
3. JavaScript异常
    - 运行时报错
      - 同步错误
      - 异步错误
    - 语法错误
4. promise异常

### 捕获错误有几种方式？
这里我总结了几种，分别是：

- onerror全局监听
- addEventListener全局监听
- try...catch主动捕获
- promise...catch主动捕获
- 重写`XMLHttpRequest`对象方法
- MVVM框架例如VUE和React中的官方错误处理方法

下面分别介绍：

#### try catch

使用方法大家应该都知道，使用try...catch可以主动的处理异常，养成在关键操作处写try…catch的习惯可以非常好的帮助后续判断线上遇到的各种异常。

这里需要指出try catch需要注意的几点：

1. try-catch 只能捕获到同步的运行时错误，其他类型无法捕获

   **解决方案：** onerror都可以捕获到运行时的同步/异步错误

#### onerror
>当JavaScript运行时错误（包括语法错误）发生时，window会触发一个ErrorEvent接口的error事件，并执行window.onerror()。

window.error可以用于全局捕获JavaScript产生的错误，使用方式如下：

```javascript
window.onerror = function(message, source, lineno, colno, error) {
   // message：错误信息（字符串）。
   // source：发生错误的脚本URL（字符串）
   // lineno：发生错误的行号（数字）
   // colno：发生错误的列号（数字）
   // error：Error对象（对象）
}
```

但是使用时需要注意几点：

1. **Script Error**

   在单页面应用中，当我们使用script标签引入了JS文件，当该JS文件的来源域名和网页的域名不同时，这时如果该JS文件内部报错，则我们只能捕获到Script Error，而不是详细的错误信息，这是由于浏览器的跨域限制。

   **解决方案：**

    - 需要在跨域的script标签中加入`crossorigin`属性，例如`<script type="text/javascript" src="example.js" crossorigin></script>`
    - 需要给跨域资源的服务器的response header设置允许跨域：`Access-Control-Allow-Origin:*`

2. 不能全局捕获到资源（如图片或脚本）的加载失败

   **解决方案：** 使用`window.addEventListener`捕获。

3. onerror无法捕获语法错误

4. onerror最好写在所有 JS 脚本的前面，


 Laya.Label) {
        uilab.dataSource = null;
        uilab.removeSelf();
        if (!this._uiPool) {
            this._uiPool = [];
        }
        this._uiPool.push(uilab);
        let idx = this._uiUsePool.indexOf(uilab);
        if (idx != -1) {
            this._uiUsePool.splice(idx, 1);
        }
    }
}

class BarrageVo {
    public barrageText: string;
    public parentBox: any;//UI容器
}

export function partial<V0, V1, T>(
  fn: (x0: V0, x1: V1) => T,
  ...args: [V0]
): (x1: V1) => T
export function partial<V0, V1, V2, T>(
  fn: (x0: V0, x1: V1, x2: V2) => T,
  ...args: [V0, V1]
): (x2: V2) => T
export function partial<V0, V1, V2, T>(
  fn: (x0: V0, x1: V1, x2: V2) => T,
  ...args: [V0]
): (x1: V1, x2: V2) => T
export function partial<V0, V1, V2, V3, T>(
  fn: (x0: V0, x1: V1, x2: V2, x3: V3) => T,
  ...args: [V0, V1, V2]
): (x2: V3) => T
export function partial<V0, V1, V2, V3, T>(
  fn: (x0: V0, x1: V1, x2: V2, x3: V3) => T,
  ...args: [V0, V1]
): (x2: V2, x3: V3) => T
export function partial<V0, V1, V2, V3, T>(
  fn: (x0: V0, x1: V1, x2: V2, x3: V3) => T,
  ...args: [V0]
): (x1: V1, x2: V2, x3: V3) => T
export function partial<T>(
  fn: (...a: unknown[]) => T,
  ...args: unknown[]
): (...a: unknown[]) => T
export function partial<T>(
  fn: (...a: unknown[]) => T,
  ...pargs: unknown[]
): (...args: unknown[]) => T {
  return (...args) => fn(...pargs, ...args)
}

export const pa = partial

export function partialRight<V0, V1, T>(
  fn: (x0: V0, x1: V1) => T,
  ...args: [V1]
): (x0: V0) => T
export function partialRight<V0, V1, V2, T>(
  fn: (x0: V0, x1: V1, x2: V2) => T,
  ...args: [V1, V2]
): (x0: V0) => T
export function partialRight<V0, V1, V2, T>(
  fn: (x0: V0, x1: V1, x2: V2) => T,
  ...args: [V2]
): (x0: V0, x1: V1) => T
export function partialRight<V0, V1, V2, V3, T>(
  fn: (x0: V0, x1: V1, x2: V2, x3: V3) => T,
  ...args: [V1, V2, V3]
): (x0: V0) => T
export function partialRight<V0, V1, V2, V3, T>(
  fn: (x0: V0, x1: V1, x2: V2, x3: V3) => T,
  ...args: [V2, V3]
): (x0: V0, x1: V1) => T
export function partialRight<V0, V1, V2, V3, T>(
  fn: (x0: V0, x1: V1, x2: V2, x3: V3) => T,
  ...args: [V3]
): (x0: V0, x1: V1, x2: V2) => T
export function partialRight<T>(
  fn: (...a: unknown[]) => T,
  ...args: unknown[]
): (...a: unknown[]) => T
export function partialRight<T>(
  fn: (...a: unknown[]) => T,
  ...pargs: unknown[]
): (...args: unknown[]) => T {
  return (...args) => fn(...args, ...pargs)
}

export const paR = partialRight
import {Entity, Pri


    return BluetoothState.UNKNOWN;
  }

  void select(Peripheral peripheral) async {
    bool _check = await selectedPeripheral?.isConnected();
    if(_check == true){
      await selectedPeripheral?.disconnectOrCancelConnection();
    }
    selectedPeripheral = peripheral;
    log.v('selectedPeripheral = $selectedPeripheral');
  }

  Future<bool> stop() async {
    if (!_isPowerOn) {
      return true;
    }
    _isPowerOn = false;
    stopScanBle();
    await _stateSubscription?.cancel();
    bool _check = await selectedPeripheral?.isConnected();
    if(_check == true){
      await selectedPeripheral?.disconnectOrCancelConnection();
    }

    if (Platform.isAndroid) {
      await _bleManager.disableRadio();
    }
    await _bleManager.destroyClient();
    return true;
  }

  Stream<ScanResult> scanBle() {
    stopScanBle();
    return _bleManager.startPeripheralScan(
        uuids: [TransportBLE.PROV_BLE_SERVICE],
        scanMode: ScanMode.balanced,
        allowDuplicates: true);
  }

  Future<void> stopScanBle() {
    return _bleManager.stopPeripheralScan();
  }

  Future<EspProv> startProvisioning({Peripheral peripheral, String pop = 'abcd1234'}) async {
    if (!_isPowerOn) {
      await _waitForBluetoothPoweredOn();
    }
    Peripheral p = peripheral ?? selectedPeripheral;
    log.v('peripheral $p');
    await _bleManager.stopPeripheralScan();
    EspProv prov = EspProv(
        transport: TransportBLE(p), security: Security1(pop: pop));
    await prov.establishSession();
    return prov;
  }

  Future<BluetoothState> _waitForBluetoothPoweredOn() async {
    Completer completer = Completer<BluetoothState>();
    _stateSubscription?.cancel();
    _stateSubscription = _bleManager
        .observeBluetoothState(emitCurrentValue: true)
        .listen((bluetoothState) async {
      log.v('bluetoothState = $bluetoothState');

      if ((bluetoothState == BluetoothState.POWERED_ON ||
              bluetoothState == BluetoothState.UNAUTHORIZED) &&
          !completer.isCompleted) {
        completer.complete(bluetoothState);
      }
    });
    return completer.future.timeout(Duration(seconds: 5),
        onTimeout: () {});
        // => throw Exception('Wait for Bluetooth PowerOn timeout'));
  }

  Future<bool> requestBlePermissions() async {
    location.Location _location = new location.Location();
    bool _serviceEnabled;

    _serviceEnabled = await _location.serviceEnabled();
    if (!_serviceEnabled) {
      _serviceEnabled = await _location.requestService();
      if (!_serviceEnabled) {
        return false;
      }
    }
    var isLocationGranted = await Permission.locationWhenInUse.request();
    log.v('checkBlePermissions, isLocationGranted=$isLocationGranted');
    return isLocationGranted == PermissionStatus.granted;
  }
}
import 'dart:convert';
import 'dart:typed_data';

import 'package:esp_provisioning/src/connection_models.dart';

import 'proto/dart/constants.pbenum.dart';
import 'proto/dart/session.pb.dart';
import 'proto/dart/wifi_config.pb.dart';
import 'proto/dart/wifi_scan.pb.dart';
import 'security.dart';
import 'transport.dart';

class EspProv {
  ProvTransport transport;
  ProvSecurity security;

  EspProv({this.transport, this.security});

  Future<void> establishSession() async {
    SessionData responseData;

    await transport.disconnect();

    if(await transport.connect()){
      while (await transport.checkConnect()) {
        var request = await


256-208S397.4 32 256 32zM128 272c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 0c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 0c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"; // Comment Dots

        public const string Comment_Dots_Regular =
            "M144 208c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm112 0c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm112 0c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zM256 32C114.6 32 0 125.1 0 240c0 47.6 19.9 91.2 52.9 126.3C38 405.7 7 439.1 6.5 439.5c-6.6 7-8.4 17.2-4.6 26S14.4 480 24 480c61.5 0 110-25.7 139.1-46.3C192 442.8 223.2 448 256 448c141.4 0 256-93.1 256-208S397.4 32 256 32zm0 368c-26.7 0-53.1-4.1-78.4-12.1l-22.7-7.2-19.5 13.8c-14.3 10.1-33.9 21.4-57.5 29 7.3-12.1 14.4-25.7 19.9-40.2l10.6-28.1-20.6-21.8C69.7 314.1 48 282.2 48 240c0-88.2 93.3-160 208-160s208 71.8 208 160-93.3 160-208 160z"; // Comment Dots

        public const string Alternate_Medical_Chat_Solid =
            "M256 32C114.62 32 0 125.12 0 240c0 49.56 21.41 95 57 130.74C44.46 421.05 2.7 466 2.2 466.5A8 8 0 0 0 8 480c66.26 0 116-31.75 140.6-51.38A304.66 304.66 0 0 0 256 448c141.39 0 256-93.12 256-208S397.39 32 256 32zm96 232a8 8 0 0 1-8 8h-56v56a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-56h-56a8 8 0 0 1-8-8v-48a8 8 0 0 1 8-8h56v-56a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8v56h56a8 8 0 0 1 8 8z"; // Alternate Medical Chat

        public const string Comment_Slash_Solid =
            "M64 240c0 49.6 21.4 95 57 130.7-12.6 50.3-54.3 95.2-54.8 95.8-2.2 2.3-2.8 5.7-1.5 8.7 1.3 2.9 4.1 4.8 7.3 4.8 66.3 0 116-31.8 140.6-51.4 32.7 12.3 69 19.4 107.4 19.4 27.4 0 53.7-3.6 78.4-10L72.9 186.4c-5.6 17.1-8.


ys),
          isViewCamera: isViewCamera);
      if (addRes != '') {
        debugPrint(
            'Unreachable, failed to add existed session to $id, $addRes');
        return;
      }
      ffiModel.pi.currentDisplay = display;
    }
    if (isDesktop && connType == ConnType.defaultConn) {
      textureModel.updateCurrentDisplay(display ?? 0);
    }
    // FIXME: separate cameras displays or shift all indices.
    if (isDesktop && connType == ConnType.viewCamera) {
      // FIXME: currently the default 0 is not used.
      textureModel.updateCurrentDisplay(display ?? 0);
    }

    if (isDesktop) {
      inputModel.updateTrackpadSpeed();
    }

    // CAUTION: `sessionStart()` and `sessionStartWithDisplays()` are an async functions.
    // Though the stream is returned immediately, the stream may not be ready.
    // Any operations that depend on the stream should be carefully handled.
    late final Stream<EventToUI> stream;
    if (isNewPeer || display == null || displays == null) {
      stream = bind.sessionStart(sessionId: sessionId, id: id);
    } else {
      // We have to put displays in `sessionStart()` to make sure the stream is ready
      // and then the displays' capturing requests can be sent.
      stream = bind.sessionStartWithDisplays(
          sessionId: sessionId, id: id, displays: Int32List.fromList(displays));
    }

    if (isWeb) {
      platformFFI.setRgbaCallback((int display, Uint8List data) {
        onEvent2UIRgba();
        imageModel.onRgba(display, data);
      });
      this.id = id;
      return;
    }

    final cb = ffiModel.startEventListener(sessionId, id);

    imageModel.updateUserTextureRender();
    final hasGpuTextureRender = bind.mainHasGpuTextureRender();
    final SimpleWrapper<bool> isToNewWindowNotified = SimpleWrapper(false);
    // Preserved for the rgba data.
    stream.listen((message) {
      if (closed) return;
      if (tabWindowId != null && !isToNewWindowNotified.value) {
        // Session is read to be moved to a new window.
        // Get the cached data and handle the cached data.
        Future.delayed(Duration.zero, () async {
          final args = jsonEncode({'id': id, 'close': display == null});
          final cachedData = await DesktopMultiWindow.invokeMethod(
              tabWindowId, kWindowEventGetCachedSessionData, args);
          if (cachedData == null) {
            // unreachable
            debugPrint('Unreachable, the cached data is empty.');
            return;
          }
          final data = CachedPeerData.fromString(cachedData);
          if (data == null) {
            debugPrint('Unreachable, the cached data cannot be decoded.');
            return;
          }
          ffiModel.setPermissions(data.permissions);
          await ffiModel.handleCachedPeerData(data, id);
          await sessionRefreshVideo(sessionId, ffiModel.pi);
          await bind.sessionRequestNewDisplayInitMsgs(
              sessionId: sessionId, display: ffiModel.pi.currentDisplay);
        });
        isToNewWindowNotified.value = true;
      }
      () async {
        if (message is EventToUI_Event) {
          if (message.field0 == "close") {
            closed = true;
            debugPrint('Exit session event loop');
            return;
          }

          Map<String, dynamic>? event;
          try {
            event = json.decode(message.field0);
          } catch (e) {
            debugPrint('json.decode fail1(): $e, ${message.field0}');
          }
          if (event != null) {
            await cb(event


odel=analytics_data.get("model", "unknown"),
                    provider=analytics_data.get("provider", "unknown"),
                    prompt_tokens=analytics_data.get("prompt_tokens"),
                    completion_tokens=analytics_data.get("completion_tokens"),
                    total_tokens=analytics_data.get("total_tokens"),
                    cost_usd=analytics_data.get("cost_usd"),
                    input_cost_per_token=analytics_data.get("input_cost_per_token"),
                    output_cost_per_token=analytics_data.get("output_cost_per_token"),
                    response_time_ms=analytics_data.get("response_time_ms"),
                    time_to_first_token_ms=analytics_data.get("time_to_first_token_ms"),
                    tokens_per_second=analytics_data.get("tokens_per_second"),
                    temperature=analytics_data.get("temperature"),
                    max_tokens=analytics_data.get("max_tokens"),
                    stream=analytics_data.get("stream", False),
                    status=analytics_data.get("status", "success"),
                    error_type=analytics_data.get("error_type"),
                    error_message=analytics_data.get("error_message"),
                    request_start_time=analytics_data.get("request_start_time"),
                    request_end_time=analytics_data.get("request_end_time"),
                    litellm_metadata=analytics_data.get("metadata", {}),
                )

                session.add(analytics_record)
                await session.commit()

                logger.info(
                    f"[DB-WRITE] Wrote LiteLLM analytics: run_id={run_id}, "
                    f"variation_id={variation_id}, model={analytics_data.get('model')}"
                )

            except Exception as e:
                logger.error(f"[DB-WRITE] Failed to write LiteLLM analytics: {e}")
                await session.rollback()
                # Don't raise - agent should continue even if DB write fails


rare1i != rare2i by construction, although there is no hard
    /// requirement that they be different. However, since the case of a single
    /// byte needle is handled specially by memchr itself, rare2i generally
    /// always should be different from rare1i since it would otherwise be
    /// ineffective as a guard.
    rare2i: u8,
}

impl RareNeedleBytes {
    /// Create a new pair of rare needle bytes with the given offsets. This is
    /// only used in tests for generating input data.
    #[cfg(all(test, feature = "std"))]
    pub(crate) fn new(rare1i: u8, rare2i: u8) -> RareNeedleBytes {
        RareNeedleBytes { rare1i, rare2i }
    }

    /// Detect the leftmost offsets of the two rarest bytes in the given
    /// needle.
    pub(crate) fn forward(needle: &[u8]) -> RareNeedleBytes {
        if needle.len() <= 1 || needle.len() > core::u8::MAX as usize {
            // For needles bigger than u8::MAX, our offsets aren't big enough.
            // (We make our offsets small to reduce stack copying.)
            // If you have a use case for it, please file an issue. In that
            // case, we should probably just adjust the routine below to pick
            // some rare bytes from the first 255 bytes of the needle.
            //
            // Also note that for needles of size 0 or 1, they are special
            // cased in Two-Way.
            //
            // TODO: Benchmar this.
            return RareNeedleBytes { rare1i: 0, rare2i: 0 };
        }

        // Find the rarest two bytes. We make them distinct by construction.
        let (mut rare1, mut rare1i) = (needle[0], 0);
        let (mut rare2, mut rare2i) = (needle[1], 1);
        if rank(rare2) < rank(rare1) {
            core::mem::swap(&mut rare1, &mut rare2);
            core::mem::swap(&mut rare1i, &mut rare2i);
        }
        for (i, &b) in needle.iter().enumerate().skip(2) {
            if rank(b) < rank(rare1) {
                rare2 = rare1;
                rare2i = rare1i;
                rare1 = b;
                rare1i = i as u8;
            } else if b != rare1 && rank(b) < rank(rare2) {
                rare2 = b;
                rare2i = i as u8;
            }
        }
        // While not strictly required, we really don't want these to be
        // equivalent. If they were, it would reduce the effectiveness of
        // candidate searching using these rare bytes by increasing the rate of
        // false positives.
        assert_ne!(rare1i, rare2i);
        RareNeedleBytes { rare1i, rare2i }
    }

    /// Return the rare bytes in the given needle in the forward direction.
    /// The needle given must be the same one given to the RareNeedleBytes
    /// constructor.
    pub(crate) fn as_rare_bytes(&self, needle: &[u8]) -> (u8, u8) {
        (needle[self.rare1i as usize], needle[self.rare2i as usize])
    }

    /// Return the rare offsets such that the first offset is always <= to the
    /// second offset. This is useful when the caller doesn't care whether
    /// rare1 is rarer than rare2, but just wants to ensure that they are
    /// ordered with respect to one another.
    #[cfg(memchr_runtime_simd)]
    pub(crate) fn as_rare_ordered_usize(&self) -> (usize, usize) {
        let (rare1i, rare2i) = self.as_rare_ordered_u8();
        (rare1i as usize, rare2i as usize)
    }

    /// Like as_rare_ordered_usize, but returns the


.toUElement() as? UVariable }
                    .filterNotNull().toSet())
        }

        val result = allFieldsWithAutowired + allParametersWithAutowired
        if (uElement is UClass && uElement.javaPsi.isMetaAnnotatedBy(QuarkusCoreClasses.DECORATOR.allFqns)) {
            return result.filter { !it.isMetaAnnotatedBy(QuarkusCoreClasses.DELEGATE.allFqns) }
        }
        return result
    }
}/*
 * Copyright © 2024 Explyt Ltd
 *
 * All rights reserved.
 *
 * This code and software are the property of Explyt Ltd and are protected by copyright and other intellectual property laws.
 *
 * You may use this code under the terms of the Explyt Source License Version 1.0 ("License"), if you accept its terms and conditions.
 *
 * By installing, downloading, accessing, using, or distributing this code, you agree to the terms and conditions of the License.
 * If you do not agree to such terms and conditions, you must cease using this code and immediately delete all copies of it.
 *
 * You may obtain a copy of the License at: https://github.com/explyt/spring-plugin/blob/main/EXPLYT-SOURCE-LICENSE.md
 *
 * Unauthorized use of this code constitutes a violation of intellectual property rights and may result in legal action.
 */

package com.explyt.spring.data.langinjection

import com.explyt.jpa.langinjection.JpqlInjectorBase
import com.explyt.spring.core.runconfiguration.SpringToolRunConfigurationsSettingsState
import com.explyt.spring.core.tracker.ModificationTrackerManager
import com.explyt.spring.data.SpringDataClasses
import com.explyt.util.ExplytDbConstants
import com.intellij.java.library.JavaLibraryUtil
import com.intellij.lang.Language
import com.intellij.openapi.module.Module
import com.intellij.openapi.module.ModuleUtilCore
import com.intellij.psi.PsiElement
import com.intellij.psi.PsiMethod
import com.intellij.psi.util.CachedValueProvider
import com.intellij.psi.util.CachedValuesManager
import org.jetbrains.uast.*

class SqlNativeSpringQueryLanguageInjector : JpqlInjectorBase() {
    override fun isValidPlace(uElement: UElement): Boolean {
        return isNativeQuery(uElement) || isJdbcTemplateLike(uElement)
                || isStringDefinedAsSqlVariable(uElement)
    }

    private fun isNativeQuery(uElement: UElement): Boolean {
        val parentAnnotation = uElement.getParentOfType<UAnnotation>()
            ?.takeIf { it.qualifiedName == SpringDataClasses.QUERY }
            ?: return false

        return parentAnnotation
            .findAttributeValue("nativeQuery")
            ?.evaluate() == true
    }

    private fun String.startsOrEndsWith(match: String, ignoreCase: Boolean): Boolean =
        startsWith(match, ignoreCase) || endsWith(match, ignoreCase)

    private fun String.startsOrEndsWithSql(): Boolean =
        startsOrEndsWith("sql", ignoreCase = true)

    private fun isStringDefinedAsSqlVariable(uElement: UElement): Boolean {
        val parent = uElement.uastParent
        // Case 1: direct string initializer
        if (parent is UVariable && parent.name?.startsOrEndsWithSql() ?: false && parent.uastInitializer == uElement) {
            return true
        }

        // Case 2: string literal is receiver of a call expression (e.g., .trimIndent()),
        val variable = parent?.uastParent as? UVariable ?: return false
        return variable.name?.startsOrEndsWithSql() ?: false && variable.uastInitializer == parent
    }

    private fun isJdbcTemplateLike(uElement: UElement): Boolean {
        val uCallExpression = uElement.getParentOfType<UCallExpression>() ?: return false
        val expressionIndex = getExpressionIndex(uCallExpression, uElement) ?: return false

        val method = uCallExpression.tryRes


        "STRUCTURE_TYPE_MEMORY_UNMAP_INFO".."1000271001",
        "STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2".."1000338002",
        "STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2".."1000338003",
        "STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES".."1000388000",
        "STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES".."1000388001",
        "STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES".."1000416000",
        "STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES".."1000466000",
        "STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES".."1000470000",
        "STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES".."1000470001",
        "STRUCTURE_TYPE_RENDERING_AREA_INFO".."1000470003",
        "STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO".."1000470004",
        "STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO".."1000470005",
        "STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO".."1000470006",
        "STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES".."1000525000",
        "STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES".."1000528000",
        "STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES".."1000544000",
        "STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES".."1000545000",
        "STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES".."1000545001",
        "STRUCTURE_TYPE_BIND_MEMORY_STATUS".."1000545002",
        "STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO".."1000545003",
        "STRUCTURE_TYPE_PUSH_CONSTANTS_INFO".."1000545004",
        "STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO".."1000545005",
        "STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO".."1000545006"
    )

    EnumConstant(
        "ERROR_NOT_PERMITTED".."-1000174001"
    )

    EnumConstant(
        "ATTACHMENT_LOAD_OP_NONE".."1000400000"
    )

    EnumConstant(
        "SUBGROUP_FEATURE_ROTATE_BIT".enum(0x00000200),
        "SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT".enum(0x00000400)
    )

    EnumConstant(
        "DYNAMIC_STATE_LINE_STIPPLE".."1000259000"
    )

    EnumConstant(
        "INDEX_TYPE_UINT8".."1000265000"
    )

    EnumConstant(
        "FORMAT_A1B5G5R5_UNORM_PACK16".."1000470000",
        "FORMAT_A8_UNORM".."1000470001"
    )

    EnumConstantLong(
        "BUFFER_USAGE_2_TRANSFER_SRC_BIT".enum(0x00000001L),
        "BUFFER_USAGE_2_TRANSFER_DST_BIT".enum(0x00000002L),
        "BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT".enum(0x00000004L),
        "BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT".enum(0x00000008L),
        "BUFFER_USAGE_2_UNIFORM_BUFFER_BIT".enum(0x00000010


}, 3000); // 3 saniye bekleme süresi
  } else {
      // Eğer path listede yoksa 404 mesajını göster
      messageElement.textContent = "Lanetli bir sayfadasın ziyaretçi!";
  }
</script>
---
layout: simple
title: Bildirim
---

📮Geri Bildirim

Farketmiş olduğunuz; eksiklik, yazım yanlışı ve hatalar için geri bildirimde bulunabilirsiniz.

      <form align="left" id="gform" method="POST" class="pure-form pure-form-stacked" action="https://script.google.com/macros/s/AKfycbz-8qzP-UaLlkIVYGMWANTHSamVy53pgi_sVUMJ0A/exec">

          İsminiz
          <input class="form-control" type="text" name="ad" value="" id="author" required>

          E-mail Adresiniz
          <input class="form-control" type="email" name="email" value="" id="email" required>

          Mesajınız
          <textarea name="mesaj" rows="4" wrap="soft" class="form-control" id="comment" required></textarea>

          <input type="submit" id="submit" class="mavi btn btn-block btn-lg btn-outline-primary" value="Gönder">

      </form>

Geri bildiriminiz için teşekkür ederim 🤗

 Tekrar geri bildirimde bulunmak istiyorsanız sayfayı yenileyebilirsiniz.

  <!DOCTYPE html>

{% include head.html %}

{% include nav-page.html %}
{% include announcement.html %}

  <div style="font-size: 18px;" data-pagefind-filter="Bölü


    take_name = reaper.GetTakeName(reaper.GetActiveTake(reaper.GetSelectedMediaItem(0, i)))

      -- Reset counter variable
      count = x

      -- Loop through all previous items
      for n = 0, i-1 do

        -- Check if take names match
        if take_name == reaper.GetTakeName(reaper.GetActiveTake(reaper.GetSelectedMediaItem(0, n))) then
          count = count + 1
        end

      end

      -- Convert to 00 format
      if (count < 10) then
        str = "0" .. tostring(count)
      else
        str = tostring(count)
      end

      -- Store new name in array
      new_take_name[i] = take_name .. " " .. str
    end

    -- Loop through each item again
    for i = 0, item_count-1 do

      -- Get active take
      active_take = reaper.GetActiveTake(reaper.GetSelectedMediaItem(0, i))

      -- Apply new name
      reaper.GetSetMediaItemTakeInfo_String(active_take, 'P_NAME', new_take_name[i], true)

    end

    -- End undo-block
    reaper.Undo_EndBlock2(0,"Script: Add count from x to selected items active takes names",-1)

  end

end


ܡܠܘܐܐ 23

ܐ. ܟܠ ܚܕ ܐܢܫܐ ܐܝܬܠܗ ܗܩܘܬܐ ܠܦܘܠܚܢܐ ܘܚܐܪܐܝܠܗ ܠܓܒܝܬܐ ܦܘܠܚܢܐ ܓܘ ܚܕ ܐܟܢܝܘܬܐ ܨܦܝ ܘܦܐܫ ܢܛܝܪܐ ܡܢ ܒܛܝܠܘܬܐ.

ܒ. ܟܠ ܚܕ ܕܠܐ ܗܟ̰ ܦܘܪܫܘܢܝܐ ܐܝܬܠܗ ܗܩܘܬܐ ܕܦܐܫ ܦܪܝܐ ܡܐܝܟ ܗܘ ܐܚܪܢܐ.

ܓ. ܟܠ ܚܕ ܐܝܬܠܗ ܗܩܘܬܐ ܩܐ ܐܝܓܪܐ ܟܝܢܐ ܡܫܪܘܪܐ ܩܬܘ ܘܩܐ ܟܘܠܦܬܐ ܩܐ ܚܝܐ ܒܐܝܩܪܐ.

ܕ. ܟܠ ܚܕ ܐܝܬܠܗ ܗܩܘܬܐ ܠܫܬܐܣܬܐ ܘܙܒܓܬܐ ܝܡ ܚܘܝܕܐ ܬܘܓܪܝܐ ܠܚܡܝܬܐ ܝܘܬܪܢܐ.

ܡܠܘܐܐ 24

ܟܠ ܚܕ ܐܝܬܠܗ ܗܩܘܬܐ ܩܐ ܡܢܝܚܬܐ ܘܒܘܣܡܐ ܘܒܚܒܫܐ ܡܬܚܡܬܐ ܣܥܬܐ ܕܦܘܠܚܢܐ ܘܝܘܡܐ ܕܡܢܝܚܬܐ ܒܦܘܪܥܢܐ.

ܡܠܘܐܐ 25

ܐ. ܟܠ ܚܕ ܐܝܬܠܗ ܗܩܘܬܐ ܠܚܕ ܩܕܪܐ ܨܦܝ ܡܢ ܚܘܠܡܢܐ ܒܚܒ݂ܫܐ ܡܟ݂ܘܠܬ


height: 4.0),
      Text(
        show.theaterAndAuditorium,
        style: const TextStyle(
          color: Color(0xFF717DAD),
        ),
      ),
      _PresentationMethodChip(show),
    ];

    return Expanded(
      child: Container(
        decoration: decoration,
        margin: const EdgeInsets.only(left: 12.0),
        padding: const EdgeInsets.only(left: 12.0),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: content,
        ),
      ),
    );
  }
}

class _PresentationMethodChip extends StatelessWidget {
  _PresentationMethodChip(this.show);
  final Show show;

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
        color: const Color(0xFF21316B),
        borderRadius: BorderRadius.circular(10.0),
      ),
      margin: const EdgeInsets.only(top: 4.0),
      padding: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 2.0),
      child: Text(
        show.presentationMethod,
        style: const TextStyle(
          fontWeight: FontWeight.bold,
          fontSize: 12.0,
          color: Color(0xFFFEFEFE),
        ),
      ),
    );
  }
}
import 'package:core/src/networking/image_url_rewriter.dart';
import 'package:test/test.dart';

void main() {
  group('ImgixUrlRewriter', () {
    test('url rewriting tests', () {
      expect(
        rewriteImageUrl(
          'http://media.finnkino.fi/1012/Event_11960/gallery/THUMB_AntManAndTheWasp_1200d.jpg',
        ),
        'https://inkino.imgix.net/1012/Event_11960/gallery/THUMB_AntManAndTheWasp_1200d.jpg?auto=format,compress',
      );

      expect(
        rewriteImageUrl(
          'https://media.finnkino.fi/1012/Event_11960/gallery/THUMB_AntManAndTheWasp_1200d.jpg',
        ),
        'https://inkino.imgix.net/1012/Event_11960/gallery/THUMB_AntManAndTheWasp_1200d.jpg?auto=format,compress',
      );

      expect(rewriteImageUrl(null), null);
      expect(
        rewriteImageUrl('Not yet rated'),
        'https://inkino.imgix.net/images/rating_large_Tulossa.png?auto=format,compress',
      );
      expect(
        rewriteImageUrl('https://media.finnkino.fi/images/rating_large_Not%20yet%20rated.png'),
        'https://inkino.imgix.net/images/rating_large_Tulossa.png?auto=format,compress',
      );
    });
  });
}
import 'package:core/src/models/show.dart';
import 'package:core/src/parsers/show_parser.dart';
import 'package:kt_dart/collection.dart';
import 'package:test/test.dart';

import 'show_test_seeds.ignore.dart';

void main() {
  group('ShowParser', () {
    test('parsing test', () {
      KtList<Show> deserialized = ShowParser.parse(showsXml);
      expect(deserialized.size, 3);

      final jumanji = deserialized.first();
      expect(jumanji.id, '1155306');
      expect(jumanji.eventId, '302419');
      expect(jumanji.title, 'Jumanji: Welcome to the Jungle');
      expect(jumanji.originalTitle,
          'Jumanji: Welcome to the Jungle (This is the orig


    "HAMSTER_clear_buzzer": "clear buzzer",
    "HAMSTER_play_note_for_1": "Entry.Hamster.playNoteForBeats('",
    "HAMSTER_play_note_for_2": "',",
    "HAMSTER_play_note_for_3": ",",
    "HAMSTER_play_note_for_4": ")",
    "HAMSTER_rest_for_1": "Entry.Hamster.restForBeats(",
    "HAMSTER_rest_for_2": ")",
    "HAMSTER_change_tempo_by_1": "Entry.Hamster.changeTempoBy(",
    "HAMSTER_change_tempo_by_2": ")",
    "HAMSTER_set_tempo_to_1": "Entry.Hamster.setTempoTo(",
    "HAMSTER_set_tempo_to_2": ")",
    "HAMSTER_set_port_to_1": "Entry.Hamster.setPortTo('",
    "HAMSTER_set_port_to_2": "','",
    "HAMSTER_set_port_to_3": "')",
    "HAMSTER_change_output_by_1": "Entry.Hamster.changeOutputBy('",
    "HAMSTER_change_output_by_2": "',",
    "HAMSTER_change_output_by_3": ")",
    "HAMSTER_set_output_to_1": "Entry.Hamster.setOutputTo('",
    "HAMSTER_set_output_to_2": "',",
    "HAMSTER_set_output_to_3": ")",
    "HAMSTER_port_a": "A",
    "HAMSTER_port_b": "B",
    "HAMSTER_port_ab": "AB",
    "HAMSTER_analog_input": "AnalogInput",
    "HAMSTER_digital_input": "DigitalInput",
    "HAMSTER_servo_output": "ServoOutput",
    "HAMSTER_pwm_output": "PwmOutput",
    "HAMSTER_digital_output": "DigitalOutput",
    "ROBOID_acceleration_x": "x축 가속도",
    "ROBOID_acceleration_y": "y축 가속도",
    "ROBOID_acceleration_z": "z축 가속도",
    "ROBOID_back": "뒤쪽",
    "ROBOID_both": "양쪽",
    "ROBOID_button": "버튼",
    "ROBOID_buzzer": "버저",
    "ROBOID_clicked": "클릭했는가",
    "ROBOID_color_any": "아무 색",
    "ROBOID_color_black": "검은색",
    "ROBOID_color_blue": "파란색",
    "ROBOID_color_green": "초록색",
    "ROBOID_color_number": "색깔 번호",
    "ROBOID_color_orange": "주황색",
    "ROBOID_color_pattern": "색깔 패턴",
    "ROBOID_color_purple": "자주색",
    "ROBOID_color_red": "빨간색",
    "ROBOID_color_sky_blue": "하늘색",
    "ROBOID_color_violet": "보라색",
    "ROBOID_color_white": "하얀색",
    "ROBOID_color_yellow": "노란색",
    "ROBOID_double_clicked": "더블클릭했는가",
    "ROBOID_floor": "바닥 센서",
    "ROBOID_head": "머리",
    "ROBOID_head_color": "머리 색깔",
    "ROBOID_left": "왼쪽",
    "ROBOID_left_wheel": "왼쪽 바퀴",


updated_at TIMESTAMP NOT NULL
	);`

	_, err := db.Exec(createTableSQL)
	return err
}

// insertUser inserts a new user into the database
func insertUser(db *sqlx.DB, user User) (int, error) {
	// Build the INSERT query using fluentsql
	query := qb.InsertInstance().
		Insert("users", "username", "email", "created_at", "updated_at").
		Row(user.Username, user.Email, user.CreatedAt, user.UpdatedAt)

	// Get the SQL and arguments
	sql, args, err := query.StringArgs([]any{})
	if err != nil {
		return 0, fmt.Errorf("failed to build insert query: %w", err)
	}

	// Add RETURNING clause for PostgreSQL to get the inserted ID
	sql = sql + " RETURNING id"

	// Execute the query
	var id int
	err = db.QueryRow(sql, args...).Scan(&id)
	if err != nil {
		return 0, fmt.Errorf("failed to execute insert query: %w", err)
	}

	return id, nil
}

// getUserByID retrieves a user by ID
func getUserByID(db *sqlx.DB, id int) (User, error) {
	// Build the SELECT query using fluentsql
	query := qb.QueryInstance().
		Select("id", "username", "email", "created_at", "updated_at").
		From("users").
		Where("id", qb.Eq, id)

	// Get the SQL and arguments
	sql, args, err := query.StringArgs([]any{})
	if err != nil {
		return User{}, fmt.Errorf("failed to build select query: %w", err)
	}

	// Execute the query
	var user User
	err = db.Get(&user, sql, args...)
	if err != nil {
		return User{}, fmt.Errorf("failed to execute select query: %w", err)
	}

	return user, nil
}

// getAllUsers retrieves all users from the database
func getAllUsers(db *sqlx.DB) ([]User, error) {
	// Build the SELECT query using fluentsql
	query := qb.QueryInstance().
		Select("id", "username", "email", "created_at", "updated_at").
		From("users").
		OrderBy("id", qb.Asc)

	// Get the SQL and arguments
	sql, args, err := query.StringArgs([]any{})
	if err != nil {
		return nil, fmt.Errorf("failed to build select all query: %w", err)
	}

	// Execute the query
	var users []User
	err = db.Select(&users, sql, args...)
	if err != nil {
		return nil, fmt.Errorf("failed to execute select all query: %w", err)
	}

	return users, nil
}

// updateUser updates an existing user in the database
func updateUser(db *sqlx.DB, user User) error {
	// Build the UPDATE query using fluentsql
	query := qb.UpdateInstance().
		Update("users").
		Set("username", user.Username).
		Set("email", user.Email).
		Set("updated_at", user.UpdatedAt).
		Where("id", qb.Eq, user.ID)

	// Get the SQL and arguments
	sql, args, err := query.StringArgs()
	if err != nil {
		return fmt.Errorf("failed to build update query: %w", err)
	}

	// Execute the query
	_, err = db.Exec(sql, args...)
	if err != nil {
		return fmt.Errorf("failed to execute update query: %w", err)
	}

	return nil
}

// deleteUser deletes a user from the database
func deleteUser(db *sqlx.DB, id int) error {
	// Build the DELETE query using fluentsql
	query := qb.DeleteInstance().
		Delete("users").


return &a[0]
}

// address taking prevents closure inlining
func n() int {
	foo := func() int { return 1 }
	bar := &foo
	x := (*bar)() + foo()
	return x
}
`

func want(t *testing.T, out string, desired string) {
	// On Windows, Unicode escapes in the JSON output end up "normalized" elsewhere to /u....,
	// so "normalize" what we're looking for to match that.
	s := strings.ReplaceAll(desired, string(os.PathSeparator), "/")
	if !strings.Contains(out, s) {
		t.Errorf("did not see phrase %s in \n%s", s, out)
	}
}

func wantN(t *testing.T, out string, desired string, n int) {
	if strings.Count(out, desired) != n {
		t.Errorf("expected exactly %d occurrences of %s in \n%s", n, desired, out)
	}
}

func TestPathStuff(t *testing.T) {
	sep := string(filepath.Separator)
	if path, whine := parseLogPath("file:///c:foo"); path != "c:foo" || whine != "" { // good path
		t.Errorf("path='%s', whine='%s'", path, whine)
	}
	if path, whine := parseLogPath("file:///foo"); path != sep+"foo" || whine != "" { // good path
		t.Errorf("path='%s', whine='%s'", path, whine)
	}
	if path, whine := parseLogPath("foo"); path != "" || whine == "" { // BAD path
		t.Errorf("path='%s', whine='%s'", path, whine)
	}
	if sep == "\\" { // On WINDOWS ONLY
		if path, whine := parseLogPath("C:/foo"); path != "C:\\foo" || whine != "" { // good path
			t.Errorf("path='%s', whine='%s'", path, whine)
		}
		if path, whine := parseLogPath("c:foo"); path != "" || whine == "" { // BAD path
			t.Errorf("path='%s', whine='%s'", path, whine)
		}
		if path, whine := parseLogPath("/foo"); path != "" || whine == "" { // BAD path
			t.Errorf("path='%s', whine='%s'", path, whine)
		}
	} else { // ON UNIX ONLY
		if path, whine := parseLogPath("/foo"); path != sep+"foo" || whine != "" { // good path
			t.Errorf("path='%s', whine='%s'", path, whine)
		}
	}
}

func TestLogOpt(t *testing.T) {
	t.Parallel()

	testenv.MustHaveGoBuild(t)

	dir := fixSlash(t.TempDir()) // Normalize the directory name as much as possible, for Windows testing
	src := filepath.Join(dir, "file.go")
	if err := os.WriteFile(src, []byte(srcCode), 0644); err != nil {
		t.Fatal(err)
	}

	outfile := filepath.Join(dir, "file.o")

	t.Run("JSON_fails", func(t *testing.T) {
		// Test malformed flag
		out, err := testLogOpt(t, "-json=foo", src, outfile)
		if err == nil {
			t.Error("-json=foo succeeded unexpectedly")
		}
		want(t, out, "option should be")
		want(t, out, "number")

		// Test a version number that is currently unsupported (and should remain unsupported for a while)
		out, err = testLogOpt(t, "-json=9,foo", src, outfile)
		if err == nil {
			t.Error("-json=0,foo succeeded unexpectedly")
		}
		want(t, out, "version


    scale(): number;
    /**
     * The positive or negative sign of this number.
     * - +1 if positive, -1 if negative, 0 if 0.
     * @returns {number}
     */
    sign(): number;
    /**
     * Precision.
     * @returns {number}
     */
    precision(): number;
    /**
     * An integer with the exponent part removed.
     * @returns {_BigInteger_}
     */
    unscaledValue(): _BigInteger_;
    /**
     * The smallest value that can be represented with the set precision.
     * @returns {_BigDecimal_}
     */
    ulp(): _BigDecimal_;
    /**
     * Absolute value.
     * @returns {_BigDecimal_} abs(A)
     */
    abs(): _BigDecimal_;
    /**
     * this * 1
     * @returns {_BigDecimal_} +A
     */
    plus(): _BigDecimal_;
    /**
     * this * -1
     * @returns {_BigDecimal_} -A
     */
    negate(): _BigDecimal_;
    /**
     * Move the decimal point to the left.
     * @param {KBigDecimalInputData} n
     * @returns {_BigDecimal_}
     */
    movePointLeft(n: KBigDecimalInputData): _BigDecimal_;
    /**
     * Move the decimal point to the right.
     * @param {KBigDecimalInputData} n
     * @returns {_BigDecimal_}
     */
    movePointRight(n: KBigDecimalInputData): _BigDecimal_;
    /**
     * Remove the 0 to the right of the numbers and normalize the scale.
     * @returns {_BigDecimal_}
     */
    stripTrailingZeros(): _BigDecimal_;
    /**
     * Set default the _MathContext_.
     * - This is used if you do not specify _MathContext_ when creating a new object.
     * @param {_MathContext_} [context=_MathContext_.DECIMAL128]
     */
    static setDefaultContext(context?: _MathContext_): void;
    /**
     * Return default _MathContext_ class.
     * - Used when _MathContext_ not specified explicitly.
     * @returns {_MathContext_}
     */
    static getDefaultContext(): _MathContext_;
    /**
     * Push default the _MathContext_.
     * - Use with `popDefaultContext` when you want to switch settings temporarily.
     * @param {_MathContext_} [context]
     */
    static pushDefaultContext(context?: _MathContext_): void;
    /**
     * Pop default the _MathContext_.
     * - Use with `pushDefaultContext` when you want to switch settings temporarily.
     */
    static popDefaultContext(): void;
    /**
     * boolean value.
     * @returns {boolean}
     */
    booleanValue: boolean;
    /**
     * 32-bit integer value.
     * @returns {number}
     */
    intValue: number;
    /**
     * 32-bit integer value.
     * An error occurs if conversion fails.
     * @returns {number}
     */
    intValueExact: number;
    /**
     * 32-bit floating point.
     * @returns {number}
     */
    floatValue: number;
    /**
     * 64-bit floating point.
     * @returns {number}
     */
    doubleValue: number;
    /**
     * return _BigInteger_.
     * @returns {_BigInteger_}
     */
    toBigInteger(): _BigInteger_;
    /**
     * return _BigDecimal_.
     * @param {_MathContext_} [mc] - _MathContext_ setting after calculation.
     * @returns {_BigDecimal_}
     */
    toBigDecimal(mc?: _MathContext_): _BigDecimal_;
    /**
     * return _Fraction_.
     * @returns {_Fraction_}
     */
    toFraction(): _Fraction_;
    /**
     * return _Complex_.
     * @returns {_Complex_}
     */
    toComplex(): _Complex_;
    /**
     * return _Matrix_.
     * @returns {_Matrix_}
     */
    toMatrix(): _Matrix_;
    /**
     * Convert to string.


lic interface SPARCTailDelayedLIRInstruction extends SPARCLIRInstructionMixin {
    default void setDelayedControlTransfer(SPARCDelayedControlTransfer holder) {
        getSPARCLIRInstructionStore().delayedControlTransfer = holder;
    }

    default SPARCDelayedControlTransfer getDelayedControlTransfer() {
        return getSPARCLIRInstructionStore().delayedControlTransfer;
    }
}
/*
 * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

package org.graalvm.compiler.lir.sparc;

import static jdk.vm.ci.code.ValueUtil.asRegister;
import static org.graalvm.compiler.lir.LIRInstruction.OperandFlag.REG;

import org.graalvm.compiler.asm.sparc.SPARCAssembler;
import org.graalvm.compiler.asm.sparc.SPARCAssembler.Opfs;
import org.graalvm.compiler.asm.sparc.SPARCMacroAssembler;
import org.graalvm.compiler.core.common.LIRKind;
import org.graalvm.compiler.lir.LIRFrameState;
import org.graalvm.compiler.lir.LIRInstructionClass;
import org.graalvm.compiler.lir.Opcode;
import org.graalvm.compiler.lir.asm.CompilationResultBuilder;

import jdk.vm.ci.meta.AllocatableValue;
import jdk.vm.ci.sparc.SPARC;
import jdk.vm.ci.sparc.SPARCKind;

public final class SPARCOPFOp extends SPARCLIRInstruction implements SPARCTailDelayedLIRInstruction {
    public static final LIRInstructionClass<SPARCOPFOp> TYPE = LIRInstructionClass.create(SPARCOPFOp.class);
    public static final SizeEstimate SIZE = SizeEstimate.create(1);

    @Opcode protected final Opfs opf;
    @Use({REG}) protected AllocatableValue rs1;
    @Use({REG}) protected AllocatableValue rs2;
    @Def({REG}) protected AllocatableValue rd;
    @State protected LIRFrameState state;

    public SPARCOPFOp(Opfs opf, AllocatableValue rs2, AllocatableValue rd) {
        this(opf, SPARC.g0.asValue(LIRKind.value(SPARCKind.SINGLE)), rs2, rd);
    }

    public SPARCOPFOp(Opfs opf, AllocatableValue rs1, AllocatableValue rs2, AllocatableValue rd) {
        this(opf, rs1, rs2, rd, null);
    }

    public SPARCOPFOp(Opfs opf, AllocatableValue rs1, AllocatableValue rs2, AllocatableValue rd, LIRFrameState state) {
        super(TYPE, SIZE);
        this.opf = opf;
        this.rs1 = rs1;
        this.rs2 = rs2;
        this.rd = rd;
        this.state = state;
    }

    @Override
    protected void emitCode(CompilationResultBuilder crb, SPARCMacroAssembler masm) {
        getDelayedControlTransfer().emitControlTransfer(crb, masm);
        if (state != null) {
            cr


    pdf_new_name(name.as_mut_ptr())
}
#[no_mangle]
pub unsafe extern "C" fn parse_pdf_boolean(
    mut pp: *mut *const i8,
    mut endptr: *const i8,
) -> *mut pdf_obj {
    skip_white(pp, endptr);
    if (*pp).offset(4) <= endptr
        && !strstartswith(*pp, b"true\x00" as *const u8 as *const i8).is_null()
    {
        if (*pp).offset(4) == endptr
            || (*(*pp).offset(4) as i32 == ' ' as i32
                || *(*pp).offset(4) as i32 == '\t' as i32
                || *(*pp).offset(4) as i32 == '\u{c}' as i32
                || *(*pp).offset(4) as i32 == '\r' as i32
                || *(*pp).offset(4) as i32 == '\n' as i32
                || *(*pp).offset(4) as i32 == '\u{0}' as i32
                || (*(*pp).offset(4) as i32 == '(' as i32
                    || *(*pp).offset(4) as i32 == ')' as i32
                    || *(*pp).offset(4) as i32 == '/' as i32
                    || *(*pp).offset(4) as i32 == '<' as i32
                    || *(*pp).offset(4) as i32 == '>' as i32
                    || *(*pp).offset(4) as i32 == '[' as i32
                    || *(*pp).offset(4) as i32 == ']' as i32
                    || *(*pp).offset(4) as i32 == '%' as i32))
        {
            *pp = (*pp).offset(4);
            return pdf_new_boolean(1_i8);
        }
    } else if (*pp).offset(5) <= endptr
        && !strstartswith(*pp, b"false\x00" as *const u8 as *const i8).is_null()
    {
        if (*pp).offset(5) == endptr
            || (*(*pp).offset(5) as i32 == ' ' as i32
                || *(*pp).offset(5) as i32 == '\t' as i32
                || *(*pp).offset(5) as i32 == '\u{c}' as i32
                || *(*pp).offset(5) as i32 == '\r' as i32
                || *(*pp).offset(5) as i32 == '\n' as i32
                || *(*pp).offset(5) as i32 == '\u{0}' as i32
                || (*(*pp).offset(5) as i32 == '(' as i32
                    || *(*pp).offset(5) as i32 == ')' as i32
                    || *(*pp).offset(5) as i32 == '/' as i32
                    || *(*pp).offset(5) as i32 == '<' as i32
                    || *(*pp).offset(5) as i32 == '>' as i32
                    || *(*pp).offset(5) as i32 == '[' as i32
                    || *(*pp).offset(5) as i32 == ']' as i32
                    || *(*pp).offset(5) as i32 == '%' as i32))
        {
            *pp = (*pp).offset(5);
            return pdf_new_boolean(0_i8);
        }
    }
    dpx_warning(b"Not a boolean object.\x00" as *const u8 as *const i8);
    0 as *mut pdf_obj
}
#[no_mangle]
pub unsafe extern "C" fn parse_pdf_null(
    mut pp: *mut *const i8,
    mut endptr: *const i8,
) -> *mut pdf_obj {
    skip_white(pp, endptr);
    if (*pp).offset(4) > endptr {
        dpx_warning(b"Not a null object.\x00" as *const u8 as *const i8);
        return 0 as *mut pdf_obj;
    } else {


/* If n >= 64 -> loop64.  */
	j	.Llt64
END(MEMRCHR_Z13)

# if ! HAVE_MEMRCHR_IFUNC
libc_hidden_def (__memrchr)


appendChild(data);
    }
    const logger = document.getElementById('logger');
    if (logger.hasChildNodes()) {
      logger.insertBefore(result, logger.firstChild);
    } else {
      logger.appendChild(result);
    }
  }

  function create({
    global = window.Kloudless.filePicker, name, type = 'chooser',
    pickerOptions, elementId, objId,
  }) {
    const appId = KLOUDLESS_APP_ID || window.appId;
    const options = { app_id: appId, ...pickerOptions };

    function createEvents(picker) {
      EVENTS.forEach(event => picker.on(
        event,
        data => addResultWithData(name, event, data),
      ));
    }

    if (type === 'dropzone') {
      window.pickers[objId] = global.dropzone(options);
      createEvents(window.pickers[objId]);
      return;
    }

    /** For chooser and saver, delay creation until the first click
     * to avoid too many root/contents calls on load when there is a connected
     * account saved.
     */
    const element = document.getElementById(elementId);

    function createPicker() {
      // remove this function so that file picker can bound click event on it
      element.removeEventListener('click', createPicker);

      const obj = global.picker(options);
      createEvents(obj);
      window.pickers[objId] = obj;
      if (type === 'chooser') {
        obj.choosify($(`#${elementId}`));
      } else {
        obj.savify(element);
      }

      // load the file picker
      setTimeout(() => {
        element.click();
      }, 0);
    }

    element.addEventListener('click', createPicker);
  }

  window.pickers = {};

  /**
   * File Chooser
   */
  create(FILE_CHOOSER_OPTIONS);

  document.getElementById('file-chooser-renew').addEventListener(
    'click', () => {
      window.pickers.fileChooser.destroy();
      create(FILE_CHOOSER_OPTIONS);
    },
  );

  /**
   * Folder Chooser
   */
  create(FOLDER_CHOOSER_OPTIONS);

  /**
   * Saver
   */
  create(SAVER_OPTIONS);

  /**
   * Dropzone
   */
  const dropzoneCreateButton = document.getElementById(
    'dropzone-create-button',
  );
  function createDropZone() {
    dropzoneCreateButton.removeEventListener('click', createDropZone);
    create(DROPZONE_OPTIONS);
  }
  dropzoneCreateButton.addEventListener('click', createDropZone);

  document.getElementById('dropzone-renew').addEventListener(
    'click', () => {
      window.pickers.dropzone.destroy();
      create(DROPZONE_OPTIONS);
    },
  );

  // Test close
  const closeButton = document.getElementById('close');
  closeButton.addEventListener('click', () => {
    Object.values(window.pickers).forEach(picker => picker.close());
  });

  // Test setGlobalOptions
  const updatePickerURL = document.getElementById('update-picker-url');
  updatePickerURL.addEventListener('click', () => {
    window.Kloudless.filePicker.setGlobalOptions({
      pickerUrl:
        'https://static-cdn.kloudless.com/p/platform/file-picker/v2/index.html',
    });
  });
}());
/* Webpack config for dev-server */
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const baseWebpackConfig = require('./webpack.base.conf');
const getPickerPlugins = require('./picker-plugins');
const merge = require('./m


            view.withId(R.id.secondFactorInput).checkDisplayed()
        }
    }

    inline fun verify(block: Verify.() -> Unit) = Verify().apply(block)
}
/*
 * Copyright (c) 2021 Proton Technologies AG
 * This file is part of Proton Technologies AG and ProtonCore.
 *
 * ProtonCore is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * ProtonCore is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with ProtonCore.  If not, see <https://www.gnu.org/licenses/>.
 */

package me.proton.core.test.android.instrumented.utils

import android.app.Activity
import android.app.Instrumentation
import android.content.Intent
import android.net.Uri
import android.util.Log
import androidx.test.espresso.IdlingRegistry
import androidx.test.platform.app.InstrumentationRegistry
import me.proton.core.test.android.instrumented.ProtonTest.Companion.getTargetContext
import me.proton.core.test.android.instrumented.ProtonTest.Companion.testTag
import java.io.File
import java.io.FileOutputStream
import java.io.IOException

object FileUtils {

    object MimeTypes {
        val application = Application
        val text = Text
        val image = Image
        val video = Video

        object Application {
            const val pdf = "application/pdf"
            const val zip = "application/zip"
            const val docx = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
        }

        object Text {
            const val plain = "text/plain"
            const val rtf = "text/rtf"
            const val html = "text/html"
            const val json = "text/json"
        }

        object Image {
            const val png = "image/png"
            const val jpeg = "image/jpeg"
            const val gif = "image/gif"
        }

        object Video {
            const val mp4 = "video/mp4"
            const val jp3 = "video/3gp"
        }
    }

    /**
     * Creates or clears directory with provided [path]
     */
    fun prepareArtifactsDir(path: String) {
        val dir = File(path)
        if (!dir.exists()) {
            Log.v(testTag, "Path $path does not exist. Creating directories.")
            dir.mkdirs()
            return
        }

        dir.list()?.forEach {
            val message = if (File(it).delete()) "Deleted $it" else "Could not delete $it"
            Log.v(testTag, message)
        }
    }

    /**
     * Clears all idling resources
     */
    fun clearIdlingResources() {
        for (idlingResource in IdlingRegistry.getInstance().resources) {
            if (idlingResource == null) {
                continue
            }
            Log.d(testTag, "Cleaning idling resource: ${idlingResource.name}")
            IdlingRegistry.getInstance().unregister(idlingResource)
        }
    }

    /**
     * Copies files from test project assets into main app files internal storage.
     * @param fileName - name of the file which exists in androidTests/assets folder.
     */
    fun copyAssetFileToInternalFilesStorage(fileName: String) {
        val testContext = InstrumentationRegistry.getInstrumentation().context
        val file = File("${getTargetContext().filesDir.path}/$fileName")


https://cd.thwiki.cc?lyric=t+pazolite&fromwiki=Sphere_Caliber">

	原曲
幽霊客船の時空を越えた旅

东方星莲船　～ Undefined Fantastic Object.

09	Law Field	04:29

	编曲	REDALiCE

	原曲
法界の火

东方星莲船　～ Undefined Fantastic Object.

10	under the black,over the shine	04:36
<


	C.gl1_4_glCopyConvolutionFilter2D(gl.funcs, C.GLenum(target), C.GLenum(internalFormat), C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height))
}

// https://www.opengl.org/sdk/docs/man2/xhtml/glCopyConvolutionFilter1D.xml
func (gl *GL) CopyConvolutionFilter1D(target, internalFormat glbase.Enum, x, y, width int) {
	C.gl1_4_glCopyConvolutionFilter1D(gl.funcs, C.GLenum(target), C.GLenum(internalFormat), C.GLint(x), C.GLint(y), C.GLsizei(width))
}

// https://www.opengl.org/sdk/docs/man2/xhtml/glConvolutionParameteriv.xml
func (gl *GL) ConvolutionParameteriv(target, pname glbase.Enum, params []int32) {
	C.gl1_4_glConvolutionParameteriv(gl.funcs, C.GLenum(target), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man2/xhtml/glConvolutionParameteri.xml
func (gl *GL) ConvolutionParameteri(target, pname glbase.Enum, params int32) {
	C.gl1_4_glConvolutionParameteri(gl.funcs, C.GLenum(target), C.GLenum(pname), C.GLint(params))
}

// https://www.opengl.org/sdk/docs/man2/xhtml/glConvolutionParameterfv.xml
func (gl *GL) ConvolutionParameterfv(target, pname glbase.Enum, params []float32) {
	C.gl1_4_glConvolutionParameterfv(gl.funcs, C.GLenum(target), C.GLenum(pname), (*C.GLfloat)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man2/xhtml/glConvolutionParameterf.xml
func (gl *GL) ConvolutionParameterf(target, pname glbase.Enum, params float32) {
	C.gl1_4_glConvolutionParameterf(gl.funcs, C.GLenum(target), C.GLenum(pname), C.GLfloat(params))
}

// https://www.opengl.org/sdk/docs/man2/xhtml/glConvolutionFilter2D.xml
func (gl *GL) ConvolutionFilter2D(target, internalFormat glbase.Enum, width, height int, format, gltype glbase.Enum, image interface{}) {
	var image_ptr unsafe.Pointer
	var image_v = reflect.ValueOf(image)
	if image != nil && image_v.Kind() != reflect.Slice {
		panic("parameter image must be a slice")
	}
	if image != nil {
		image_ptr = unsafe.Pointer(image_v.Index(0).Addr().Pointer())
	}
	C.gl1_4_glConvolutionFilter2D(gl.funcs, C.GLenum(target), C.GLenum(internalFormat), C.GLsizei(width), C.GLsizei(height), C.GLenum(format), C.GLenum(gltype), image_ptr)
}

// https://www.opengl.org/sdk/docs/man2/xhtml/glConvolutionFilter1D.xml
func (gl *GL) ConvolutionFilter1D(target, internalFormat glbase.Enum, width int, format, gltype glbase.Enum, image interface{}) {
	var image_ptr unsafe.Pointer
	var image_v = reflect.ValueOf(image)
	if image != nil && image_v.Kind() != reflect.Slice {
		panic("parameter image must be a slice")
	}
	if image != nil {
		image_ptr = unsafe.Pointer(image_v.Index(0).Ad


ket, parent, quote_event_grp_comp_index)
  local index = offset

  -- Implicit Quote Event Grp Comp Index
  if quote_event_grp_comp_index ~= nil then
    local iteration = parent:add(omi_eurex_cash_eti_t7_v8_1.fields.quote_event_grp_comp_index, quote_event_grp_comp_index)
    iteration:set_generated()
  end

  -- Security Id: 8 Byte Signed Fixed Width Integer Nullable
  index, security_id = eurex_cash_eti_t7_v8_1.security_id.dissect(buffer, index, packet, parent)

  -- Quote Event Px: 8 Byte Unsigned Fixed Width Integer Nullable
  index, quote_event_px = eurex_cash_eti_t7_v8_1.quote_event_px.dissect(buffer, index, packet, parent)

  -- Quote Event Qty: 8 Byte Unsigned Fixed Width Integer Nullable
  index, quote_event_qty = eurex_cash_eti_t7_v8_1.quote_event_qty.dissect(buffer, index, packet, parent)

  -- Quote Msg Id: 8 Byte Unsigned Fixed Width Integer Nullable
  index, quote_msg_id = eurex_cash_eti_t7_v8_1.quote_msg_id.dissect(buffer, index, packet, parent)

  -- Quote Event Match Id: 4 Byte Unsigned Fixed Width Integer Nullable
  index, quote_event_match_id = eurex_cash_eti_t7_v8_1.quote_event_match_id.dissect(buffer, index, packet, parent)

  -- Quote Event Exec Id: 4 Byte Signed Fixed Width Integer Nullable
  index, quote_event_exec_id = eurex_cash_eti_t7_v8_1.quote_event_exec_id.dissect(buffer, index, packet, parent)

  -- Quote Event Type: 1 Byte Unsigned Fixed Width Integer Enum with 5 values
  index, quote_event_type = eurex_cash_eti_t7_v8_1.quote_event_type.dissect(buffer, index, packet, parent)

  -- Quote Event Side: 1 Byte Unsigned Fixed Width Integer Enum with 3 values
  index, quote_event_side = eurex_cash_eti_t7_v8_1.quote_event_side.dissect(buffer, index, packet, parent)

  -- Quote Event Liquidity Ind: 1 Byte Unsigned Fixed Width Integer Enum with 4 values
  index, quote_event_liquidity_ind = eurex_cash_eti_t7_v8_1.quote_event_liquidity_ind.dissect(buffer, index, packet, parent)

  -- Quote Event Reason: 1 Byte Unsigned Fixed Width Integer Enum with 8 values
  index, quote_event_reason = eurex_cash_eti_t7_v8_1.quote_event_reason.dissect(buffer, index, packet, parent)

  -- Pad 4: 4 Byte
  index, pad_4 = eurex_cash_eti_t7_v8_1.pad_4.dissect(buffer, index, packet, parent)

  return index
end

-- Dissect: Quote Event Grp Comp
eurex_cash_eti_t7_v8_1.quote_event_grp_comp.dissect = function(buffer, offset, packet, parent, quote_event_grp_comp_index)
  if show.quote_event_grp_comp then
    -- Optionally add element to protocol tree
    parent = parent:add(omi_eurex_cash_eti_t7_v8_1


, 2012", "Week of Oct 8, 2012",
                                        "Week of Oct 15, 2012", "Week of Oct 22, 2012",
                                        "Week of Oct 29, 2012", "Week of Nov 5, 2012"]);
    });

    it("displays the monthly labels", function() {
      draw({timeInterval: 'monthly'});
      columnLabels().should.deep.equal(["October 2012", "November 2012", "December 2012",
                                        "January 2013", "February 2013", "March 2013"]);
    });

    it("displays the yearly labels", function() {
      draw({timeInterval: 'yearly'});
      columnLabels().should.deep.equal(["2012", "2013", "2014", "2015", "2016", "2017"]);
    });

    it("internationalizes the week labels", function() {
      draw({timeInterval: 'weekly', labels: {weekOf: "Semana de"}});
      columnLabels().should.deep.equal(["Semana de Oct 1, 2012", "Semana de Oct 8, 2012",
                                        "Semana de Oct 15, 2012", "Semana de Oct 22, 2012",
                                        "Semana de Oct 29, 2012", "Semana de Nov 5, 2012"]);
    });
  });

  describe("Colours", function() {

    var repeatLevels = {
      low: [0,30],
      medium: [30, 60],
      high: [60, 100]
    };

    it("assigns a class to each cell depending on the percentage value", function() {
      draw({repeatLevels: repeatLevels});

      var classes = $container.find('tr:eq(1) td.cornelius-percentage')
                .map(function() { return this.className.replace(/\s*cornelius-percentage\s*/, ''); })
                .get();

      classes.should.deep.equal(["cornelius-high", "cornelius-high", "cornelius-medium",
                                 "cornelius-medium", "cornelius-low", "cornelius-low"]);
    });
  });

  describe("Percentages", function() {

    var expectedValues = [
      ["70.00", "60.00", "50.00", "40.00", "7.00", "2.00"],
      ["45.75", "28.00", "18.42", "10.17", "9.58"],
      ["98.00", "27.78", "3.56", "2.00"],
      ["75.80", "50.80", "62.80"],
      ["64.00", "30.00"],
      ["56.67"]
    ];

    it("renders the percentage values", function() {
      draw();
      $container.find('tr:not(:first)').each(function(i, el){
        var values = $(el).find('.cornelius-percentage').map(function() { return this.textContent; }).get();
        values.should.deep.equal(expectedValues[i]);
      });
    });
  });

  describe("Absolute numbers", function() {

    var expectedValues = [
      ["700", "600", "500", "400", "70", "20"],
      ["549", "336", "221", "122", "115"],
      ["882", "250", "32", "18"],
      ["379", "254", "314"],
      ["256", "120"],
      ["340"]
    ];

    it("renders the absolute values", function() {
      draw({displayAbsoluteValues: true});
      $container.find('tr:not(:first)').each(function(i, el){
        var values = $(el).find('.cornelius-absolute').map(function() { return this.textContent; }).get();
        values.should.deep.equal(expectedValues[i]);
      });
    });

  });

  describe("Options", function() {

    describe("Slicing", function() {

      it ("draws only the last n rows", function() {
        draw({maxRows: 3});
        columnLabels().should.deep.e


# ply: ygen.py
#
# This is a support program that auto-generates different versions of the YACC parsing
# function with different features removed for the purposes of performance.
#
# Users should edit the method LParser.parsedebug() in yacc.py.   The source code
# for that method is then used to create the other methods.   See the comments in
# yacc.py for further details.

import os.path
import shutil

def get_source_range(lines, tag):
    srclines = enumerate(lines)
    start_tag = '#--! %s-start' % tag
    end_tag = '#--! %s-end' % tag

    for start_index, line in srclines:
        if line.strip().startswith(start_tag):
            break

    for end_index, line in srclines:
        if line.strip().endswith(end_tag):
            break

    return (start_index + 1, end_index)

def filter_section(lines, tag):
    filtered_lines = []
    include = True
    tag_text = '#--! %s' % tag
    for line in lines:
        if line.strip().startswith(tag_text):
            include = not include
        elif include:
            filtered_lines.append(line)
    return filtered_lines

def main():
    dirname = os.path.dirname(__file__)
    shutil.copy2(os.path.join(dirname, 'yacc.py'), os.path.join(dirname, 'yacc.py.bak'))
    with open(os.path.join(dirname, 'yacc.py'), 'r') as f:
        lines = f.readlines()

    parse_start, parse_end = get_source_range(lines, 'parsedebug')
    parseopt_start, parseopt_end = get_source_range(lines, 'parseopt')
    parseopt_notrack_start, parseopt_notrack_end = get_source_range(lines, 'parseopt-notrack')

    # Get the original source
    orig_lines = lines[parse_start:parse_end]

    # Filter the DEBUG sections out
    parseopt_lines = filter_section(orig_lines, 'DEBUG')

    # Filter the TRACKING sections out
    parseopt_notrack_lines = filter_section(parseopt_lines, 'TRACKING')

    # Replace the parser source sections with updated versions
    lines[parseopt_notrack_start:parseopt_notrack_end] = parseopt_notrack_lines
    lines[parseopt_start:parseopt_end] = parseopt_lines

    lines = [line.rstrip()+'\n' for line in lines]
    with open(os.path.join(dirname, 'yacc.py'), 'w') as f:
        f.writelines(lines)

    print('Updated yacc.py')

if __name__ == '__main__':
    main()


0-15.8 20.5-22 29.3-8.9L192 256V116.8c0-15.8 20.5-22 29.3-8.9L320 256V116.8c0-15.8 20.5-22 29.3-8.9L448 256V116.8c0-15.8 20.5-22 29.3-8.9L606.8 302.2c14.2 21.3-1.1 49.7-26.6 49.7H512 448 384 320 256 192 64V116.8zM32 384H608c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32z"],"fire-burner":[640,512,[],"e4f1","M293.5 3.8c19.7 17.8 38.2 37 55.5 57.7c7.9-9.9 16.8-20.7 26.5-29.5c5.6-5.1 14.4-5.1 20 0c24.7 22.7 45.6 52.7 60.4 81.1c14.5 28 24.2 58.8 24.2 79C480 280 408.7 352 320 352c-89.7 0-160-72.1-160-159.8c0-26.4 12.7-60.7 32.4-92.6c20-32.4 48.1-66.1 81.4-95.8c2.8-2.5 6.4-3.8 10-3.7c3.5 0 7 1.3 9.8 3.8zM370 273c30-21 38-63 20-96c-2-4-4-8-7-12l-36 42s-58-74-62-79c-30 37-45 58-45 82c0 49 36 78 81 78c18 0 34-5 49-15zM32 288c0-17.7 14.3-32 32-32H96c17.7 0 32 14.3 32 32s-14.3 32-32 32v64H544V320c-17.7 0-32-14.3-32-32s14.3-32 32-32h32c17.7 0 32 14.3 32 32v96c17.7 0 32 14.3 32 32v64c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32V416c0-17.7 14.3-32 32-32V288zM320 480a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm160-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM192 480a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"],flag:[448,512,[127988,61725],"f024","M64 32C64 14.3 49.7 0 32 0S0 14.3 0 32V64 368 480c0 17.7 14.3 32 32 32s32-14.3 32-32V352l64.3-16.1c41.1-10.3 84.6-5.5 122.5 13.4c44.2 22.1 95.5 24.8 141.7 7.4l34.7-13c12.5-4.7 20.8-16.6 20.8-30V66.1c0-23-24.2-38-44.8-27.7l-9.6 4.8c-46.3 23.2-100.8 23.2-147.1 0c-35.1-17.6-75.4-22-113.5-12.5L64 48V32z"],hanukiah:[640,512,[128334],"f6e6","M314.2 3.3C309.1 12.1 296 36.6 296 56c0 13.3 10.7 24 24 24s


of 12 Flags](https://hackerone.com/reports/1068434) | $0.0 |
| 76 | [Hacky Holidays CTF Writeup](https://hackerone.com/reports/1066801) | $0.0 |
| 77 | [Hackyholidays CTF writeup](https://hackerone.com/reports/1065583) | $0.0 |
| 78 | [First CTF ever!](https://hackerone.com/reports/1069263) | $0.0 |
| 79 | [Successfully took down the Grinch and saved the holidays from being ruined](https://hackerone.com/reports/1067530) | $0.0 |
| 80 | [Invading Grinch Network and Saving Christmas](https://hackerone.com/reports/1065829) | $0.0 |
| 81 | [Complete destruction of the Grinch server](https://hackerone.com/reports/1065885) | $0.0 |
| 82 | [Hacky Holidays Writeup](https://hackerone.com/reports/1067835) | $0.0 |
| 83 | [[H1 hackyholidays] CTF Writeup](https://hackerone.com/reports/1069171) | $0.0 |
| 84 | [[hackyholidays] CTF write-up](https://hackerone.com/reports/1069376) | $0.0 |
| 85 | [[hacky-holidays] Grinch network is down](https://hackerone.com/reports/1066206) | $0.0 |
| 86 | [Hacky Holidays CTF Writeup](https://hackerone.com/reports/1066007) | $0.0 |
| 87 | [Writeup Hackyholiday CTF](https://hackerone.com/reports/1065731) | $0.0 |
| 88 | [Wholesome Hacky Holidays: A Writeup](https://hackerone.com/reports/1066135) | $0.0 |
| 89 | [Mission completed. Grinch Networks is down and Christmas saved.](https://hackerone.com/reports/1067090) | $0.0 |
| 90 | [It's just a man on a mission](https://hackerone.com/reports/1069388) | $0.0 |
| 91 | [Flags for hackyholidays CTF](https://hackerone.com/reports/1065516) | $0.0 |
| 92 | [ctf walkthrough](https://hackerone.com/reports/1065468) | $0.0 |
| 93 | [h1-ctf : 12 days of hack holiday writeup](https://hackerone.com/reports/1069175) | $0.0 |
| 94 | [CTF Writeup](https://hackerone.com/reports/1066233) | $0.0 |
| 95 | [Hackyholidays [ h1-ctf] writeup [mission:- stop the grinch ]](https://hackerone.com/reports/1069396) | $0.0 |
| 96 | [12 Days of Hacky Holidays write-up, but as a text-based RPG?](https://hackerone.com/reports/1066851) | $0.0 |
| 97 | [How The Hackers Saved Christmas](https://hackerone.com/reports/1069335) | $0.0 |
| 98 | [Taking Grinch Down To Save Holidays](https://hackerone.com/reports/1067037) | $0.0 |
| 99 | [hackyholidays CTF Writeup](https://hackerone.com/reports/1069080) | $0.0 |
| 100 | [Grinchs website takendown with various other exploits](https://hackerone.com/reports/1069034) | $0.0 |
| 101 | [[100K-ctf] Multiple vulnerabilities leading to compromise of Pinger instance.](https://hackerone.com/reports/1215867) | $0.0 |
| 102 | [H1-CTF 100k Solution - Congratz on the 100k Rep todayisnew](https://hackerone.com/reports/1216408) | $0.0 |
| 103 | [Adam and the  Deadly  Injections


 ){
			if (trueUpdateCount > falseUpdateCount) {
				// trueファイルとfalseファイルのカウンタによって判定
				asCurrent = true;
			} else if (trueUpdateCount == falseUpdateCount){
				// カウンタの値に差がない場合はタイムスタンプによって判定
				if (rsTrueFile.lastModified() >= rsFalseFile.lastModified()) {
					asCurrent = true;
				}else{
					asCurrent = false;
				}
			} else {
				asCurrent = false;
			}
		} else if (trueFileExists) {
			asCurrent = true;
		}

		// ReadingStatusファイルの破損チェック
		if (!trueFileExists) {
			log.info("organizeRsFlag():" + rsTrueFile.getAbsolutePath() + " is nothing");
		} else {
			// ReadingStatusファイル(true)ファイルが破損しているか(0バイトファイルもしくは無効な内容)どうかの判定し、該当なら削除
			if (rsTrueFile.length() == 0
				|| !(isValidContentFile(rsTrueFile))
				|| trueUpdateCount == Long.MIN_VALUE) {
				log.info("organizeRsFlag():" + rsTrueFile.getAbsolutePath() + " is 0 bytes or invalid file." + " size="
						+ rsTrueFile.length() + " content=" + printFile(rsTrueFile));
				if (!rsTrueFile.delete()) {
					log.info("organizeReadingStatus: Failed to delete.");
				}
				isTrueFileInValid = true;
			}
		}

		if (!falseFileExists) {
			log.info("organizeRsFlag():" + rsFalseFile.getAbsolutePath() + " is nothing");
		} else {
			// ReadingStatusファイル(false)ファイルが破損しているか(0バイトファイルもしくは無効な内容)どうかの判定し、該当なら削除
			if (rsFalseFile.length() == 0
				|| !(isValidContentFile(rsFalseFile))
				|| falseUpdateCount== Long.MIN_VALUE) {
				log.info("organizeRsFlag():" + rsFalseFile.getAbsolutePath() + " is 0 bytes or invalid file." + " size="
						+ rsFalseFile.length() + " content=" + printFile(rsFalseFile));
				//findbugs対応 戻り値をチェックしてログを出力とした。
				boolean ret =rsFalseFile.delete();
				if(!ret){
					log.debug("organizeRsFlag(): rsFalseFile.delete() is false");
				}
				isFalseFileInValid = true;
			}
		}

		if( ( isTrueFileInValid && isFalseFileInValid ) ||
				( isTrueFileInValid && !falseFileExists ) ||
				( !trueFileExists && isFalseFileInValid ) ){
			// 全てのReadingStatusファイル が不正な場合
			// 現時点からの差分を監視する旨を通知
			String[] messageArgs = { filePath.getName() };
			fileMonitorManager.sendMessage(filePath.getAbsolutePath(), PriorityConstant.TYPE_WARNING,
					MessageConstant.AGENT.getMessage(),
					MessageConstant.MESSAGE_LOG_FILE_REBUILD_READING_STATUS.getMessage(messageArgs),
					"rsfile has broken ," + rsTrueFile.getAbsolutePath() + "," + rsFalseFile.getAbsolutePath(),
					monitorId, null);
			// 監視対象ファイルについて、現時点以後の差分を監視するようにフラグを調整
			tail = true;
		} else if ((asCurrent == true && isTrueFileInValid)
					|| (asCurrent == false && isFalseFileInValid)
					|| trueUpdateCount == Long.MIN_VALUE
					|| falseUpdateCount == Long.MIN_VALUE) {
			// 最新のReadingStatusファイル のみ破損の場合、バックアップからの差分を


clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;

static const char *__pyx_f[] = {
  "spacy\\training\\gold_io.pyx",
};

/*--- Type declarations ---*/
struct __pyx_obj_5spacy_8training_7gold_io___pyx_scope_struct__read_json_file;
struct __pyx_obj_5spacy_8training_7gold_io___pyx_scope_struct_1_json_to_annotations;
struct __pyx_obj_5spacy_8training_7gold_io___pyx_scope_struct_2_genexpr;
struct __pyx_obj_5spacy_8training_7gold_io___pyx_scope_struct_3_genexpr;
struct __pyx_obj_5spacy_8training_7gold_io___pyx_scope_struct_4_json_iterate;

/* "spacy/training/gold_io.pyx":74
 *
 *
 * def read_json_file(loc, docs_filter=None, limit=None):             # <<<<<<<<<<<<<<
 *     """Read Example dictionaries from a json file or directory."""
 *     loc = util.ensure_path(loc)
 */
struct __pyx_obj_5spacy_8training_7gold_io___pyx_scope_struct__read_json_file {
  PyObject_HEAD
  PyObject *__pyx_v_docs_filter;
  PyObject *__pyx_v_file_;
  PyObject *__pyx_v_filename;
  PyObject *__pyx_v_json_doc;
  PyObject *__pyx_v_json_paragraph;
  PyObject *__pyx_v_limit;
  PyObject *__pyx_v_loc;
  PyObject *__pyx_v_utf8_str;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
};

/* "spacy/training/gold_io.pyx":90
 *
 *
 * def json_to_annotations(doc):             # <<<<<<<<<<<<<<
 *     """Convert an item in the JSON-formatted training data to the format
 *     used by Example.
 */
struct __pyx_obj_5spacy_8training_7gold_io___pyx_scope_struct_1_json_to_annotations {
  PyObject_HEAD
  PyObject *__pyx_v_brackets;
  PyObject *__pyx_v_cat;
  PyObject *__pyx_v_cats;
  PyObject *__pyx_v_doc;
  PyObject *__pyx_v_example;
  PyObject *__pyx_v_genexpr;
  PyObject *__pyx_v_heads;
  PyObject *__pyx_v_i;
  PyObject *__pyx_v_ids;
  PyObject *__pyx_v_labels;
  PyObject *__pyx_v_lemmas;
  PyObject *__pyx_v_morphs;
  PyObject *__pyx_v_ner_tags;
  PyObject *__pyx_v_paragraph;
  PyObject *__pyx_v_pos;
  PyObject *__pyx_v_sent;
  PyObject *__pyx_v_sent_start_i;
  PyObject *__pyx_v_sent_starts;
  PyObject *__pyx_v_spaces;
  PyObject *__pyx_v_tags;
  PyObject *__pyx_v_token;
  PyObject *__pyx_v_words;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};

/* "spacy/training/gold_io.pyx":140
 *                 brackets.exten


 Meade" },
			name = "Tipton",
		},
		["FMH"] = {
			city = { ru = "Falmouth", en = "Falmouth" },
			name = "Otis Angb",
		},
		["FMI"] = {
			city = { ru = "Калемие", en = "Kalemie" },
			name = "Kalemie",
		},
		["FMM"] = {
			city = { ru = "Мемминген", en = "Memmingen" },
			name = "Allgau",
		},
		["FMN"] = {
			city = { ru = "Фармингтон", en = "Farmington" },
			name = "Four Corners Rgnl",
		},
		["FMO"] = {
			city = { ru = "Мюнстер", en = "Munster" },
			name = "Munster Osnabruck",
		},
		["FMY"] = {
			city = { ru = "North Fort Myers", en = "Fort Myers" },
			name = "Page Fld",
		},
		["FNA"] = {
			city = { ru = "Фритаун", en = "Freetown" },
			name = "Freetown Lungi",
		},
		["FNC"] = {
			city = { ru = "Фуншал", en = "Funchal" },
			name = "Madeira",
		},
		["FNE"] = {
			city = { ru = "Fane", en = "Fane" },
			name = "Fane Airport",
		},
		["FNI"] = {
			city = { ru = "Ним", en = "Nimes" },
			name = "Garons",
		},
		["FNJ"] = {
			city = { ru = "Пхеньян", en = "Pyongyang" },
			name = "Pyongyang Intl",
		},
		["FNL"] = {
			city = { ru = "Форт-Коллинс", en = "Fort Collins" },
			name = "Fort Collins Loveland Muni",
		},
		["FNR"] = {
			city = { ru = "Funter Bay Seaplane Base", en = "Funter Bay" },
			name = "Funter Bay Seaplane Base",
		},
		["FNT"] = {
			city = { ru = "Флинт", en = "Flint" },
			name = "Bishop International",
		},
		["FNU"] = {
			city = { ru = "Ористано", en = "Oristano" },
			name = "Fenosu",
		},
		["FOA"] = {
			city = { ru = "Foula", en = "Foula" },
			name = "Foula Airport",
		},
		["FOC"] = {
			city = { ru = "Фучжоу", en = "Fuzhou" },
			name = "Changle",
		},
		["FOD"] = {
			city = { ru = "Fort Dodge", en = "Fort Dodge" },
			name = "Fort Dodge Rgnl",
		},
		["FOE"] = {
			city = { ru = "Топика", en = "Topeka" },
			name = "Forbes Fld",
		},
		["FOG"] = {
			city = { ru = "Фоджа", en = "Foggia" },
			name = "Gino Lisa",
		},
		["FOK"] = {
			city = { ru = "Hampton Inn West Palm Beach-Fl Turnpike", en = "West Hampton Beach" },
			name = "Francis S Gabreski",
		},
		["FOM"] = {
			city = { ru = "Foumban", en = "Foumban" },
			name = "Foumban Nkounja",
		},
		["FON"] = {
			city = { ru = "La Fortuna/San Carlos", en = "La Fortuna/San Carlos" },
			name = "Arenal Airport",
		},


(R.id.btn_ok);
        btn_cancel = (ImageButton) findViewById(R.id.btn_cancel);
        btn_ok.setOnClickListener(this);
        btn_cancel.setOnClickListener(this);
        add = (Button) findViewById(R.id.addtext);
        color = (Button) findViewById(R.id.color);
        family = (Button) findViewById(R.id.family);
        add.setOnClickListener(this);
        color.setOnClickListener(this);
        family.setOnClickListener(this);

        moren = (Button) findViewById(R.id.moren);
        moren.setTypeface(Typeface.DEFAULT);
        faceby = (Button) findViewById(R.id.faceby);
        faceby.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/"
                + OperateConstants.FACE_BY + ".ttf"));
        facebygf = (Button) findViewById(R.id.facebygf);
        facebygf.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/"
                + OperateConstants.FACE_BYGF + ".ttf"));
        moren.setOnClickListener(this);
        faceby.setOnClickListener(this);
        facebygf.setOnClickListener(this);

    }

    private void fillContent() {
        Bitmap resizeBmp = BitmapFactory.decodeFile(camera_path);
        operateView = new OperateView(AddTextActivity.this, resizeBmp);
        LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(
                resizeBmp.getWidth(), resizeBmp.getHeight());
        operateView.setLayoutParams(layoutParams);
        content_layout.addView(operateView);
        operateView.setMultiAdd(true); //设置此参数，可以添加多个文字
    }

    private void btnSave() {
        operateView.save();
        Bitmap bmp = getBitmapByView(operateView);
        if (bmp != null) {
            mPath = saveBitmap(bmp, "saveTemp");
            Intent okData = new Intent();
            okData.putExtra("camera_path", mPath);
            setResult(RESULT_OK, okData);
            this.finish();
        }
    }

    // 将模板View的图片转化为Bitmap
    public Bitmap getBitmapByView(View v) {
        Bitmap bitmap = Bitmap.createBitmap(v.getWidth(), v.getHeight(),
                Bitmap.Config.ARGB_8888);
        Canvas canvas = new Canvas(bitmap);
        v.draw(canvas);
        return bitmap;
    }

    // 将生成的图片保存到内存中
    public String saveBitmap(Bitmap bitmap, String name) {
        if (Environment.getExternalStorageState().equals(
                Environment.MEDIA_MOUNTED)) {
            File dir = new File(Constants.filePath);
            if (!dir.exists())
                dir.mkdir();
            File file = new File(Constants.filePath + name + ".jpg");
            FileOutputStream out;

            try {
                out = new FileOutputStream(file);
                if (bitmap.compress(Bitmap.CompressFormat.JPEG, 90, out)) {
                    out.flush();
                    out.close();
                }
                return file.getAbsolutePath();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

        return null;
    }

    private void addfont() {
        final EditText editText = new EditText(AddTextActivity.this);
        new AlertDialog.Builder(AddTextActivity.this).setView(editText)
                .setPositiveButton("确定", new DialogInterface.OnClickListener() {
                    @Override
                    @SuppressLint("NewApi")
                    public void onClick(DialogInterface dialog, int which) {
                        String string = editText.getText().toString();
                        // TextObject textObj =
                        // operateUtils.getTextObject(string);
                        // if (textObj != null) {
                        // textObj.setTypeface(OperateConstants.FACE_BY);
                        // textObj.commit();
                        // }

                        TextObject textObj = operateUtils.getTextObject(string,
                                operateView, 5, 150, 100);
                        if (textObj != null) {
                            if (menuWindow != null) {
                                textObj.setColor(menuWindow.getColor());


	void Update () {

        vac.CanBeSucked_SetExternally = true;
        if (falldistance > 0.75f) vac.CanBeSucked_SetExternally = false;

		if (mode == 0) {

            groundpos = transform.position;
            groundpos.x -= offset.x;
            offset.x = amp * Mathf.Sin(6.28f * (t / period));
            t += Time.deltaTime;
            if (t >= period) t -= period;
            groundpos.x += offset.x;

            groundpos.y -= offset.y;

            falldistance -= Time.deltaTime * fallspeed;
            offset.y = falldistance;
            shadow.transform.position = groundpos;
            if (falldistance <= 0) {
                offset.y = 0;
                mode = 1;
            }

            groundpos.y += offset.y;
            transform.position = groundpos;

            if (mode == 1) {
                shadow.transform.position = transform.position;
                shadow.gameObject.SetActive(false);
            }

        } else if (mode == 1) {

        }
	}
}


".
# The value is stored *negated*, as that's useful for the caller.
# On exit, return to "ra2"
upkr_decode_number:
    # Load the address of the upkr_decode_bit address in DMEM. We could
    # instead run it from ROM but then the whole decompression becomes quite slow.
    # Since we have an extre free word here in the header, let's use it this way.
    lax_stage0 upkr_decode_bit_addr, upkr_decode_bit
    li prev_was_literal, 0
    li number_incr, -1
.Lelias_loop:
    jalr upkr_decode_bit_addr
     addiu $fp, upkr_decode_number_addr, (.Lnumber_end - header_start)
    jalr upkr_decode_bit_addr
     addiu $fp, upkr_decode_number_addr, (.Lelias_loop_next - header_start)
    .asciiz "Small64"           # ASCIIZ ROM title (8 bytes, including 0 terminator)
                                # When run, it's a "beql $k1, $t5", plus an invalid opcode
                                # that won't ever be run, since beql will skip it
    addu prev_was_literal, number_incr
.Lelias_loop_next:
    b .Lelias_loop
     addu number_incr, number_incr
.Lnumber_end:
    jr ra2
     addu prev_was_literal, number_incr

    # We respect the last word in the header, so that we can encode the video
    # type. This is just advisory, but it allows emulators to self-configure
    # correctly when running our ROMs.
    .byte 0
    .byte 0
#if VIDEO_TYPE == 0 // PAL
    .byte 'X'
#elif VIDEO_TYPE == 1 // NTSC
    .byte 'E'
#elif VIDEO_TYPE == 2 // MPAL
    .byte 'B'
#endif
    .byte 0

# ============================
# Stage 0
# ============================
# This is the first portion of the ROM that runs. It decompresses stage 1
# (RAM initialization), runs it, then decompresses stage 2 (the demo) and
# runs it.

    .section .stage0, "ax"
    .globl _start

_start:
    # Set output pointer for destination buffer to IMEM. This is a convoluted
    # way to do it as an offset from dmem_base so that we only do that in one opcode.
    addiu outbuf, dmem_base, (0xA4001000 - BOOT_T3_VALUE)

    # Configure the stack pointer in CPU cache. This is also the final value for $sp
    # that will be used when the demo boots, so that we don't need to change it anymore.
    li $sp, 0x80400000

    # Configure the end pointer for decompression, so that the decompression routine
    # exits when it has finished unpacking Stage 1.
    addiu outbuf_end, outbuf, STAGE1_SIZE

    # We put upkr_decode_number function in the header, we need an address to run
    # it from there.
    li upkr_decode_number_addr, 0xB0000000

    # At the end of decompression, run the stage1 from IMEM.
    lax_stage1 decomp_return, rdram_init

    ###################################################
    # upkr decompressor
    ###################################################
    #
    # This decompressor support parity (1, 2, or 4), by changing the UPKR_PARITY
    # value. The support comes at the cost of extra stack space, but requires
    # no extra opcodes.
    ###################################################

#define UPKR_PARITY            4
#define UPKR_PARITY_LOG2       (UPKR_PARITY/2)     // works for 1,2,4
#define UPKR_NUM_CONTEXTS      (256*UPKR_PARITY + 64*2*UPKR_PARITY)

.equ hex.$zr, 0;  .equ hex.$at, 1;  .equ hex.$v0, 2;  .equ hex.$v1, 3
.equ hex.$a0, 4;  .equ hex.$a1, 5;  .equ hex.$a2, 6;  .equ hex


 <T : Number> avg(distinct: Boolean, expr: Expression<T>): Expression<Double> {
        return JpqlAvg(distinct, expr)
    }

    /**
     * Creates an expression that represents the sum of values.
     *
     * If there are no matching rows, or if all expressions are null, it returns null.
     */
    @JvmName("sum1")
    @SinceJdsl("3.0.0")
    fun sum(distinct: Boolean, expr: Expression<Int>): Expression<Long> {
        return JpqlSum.IntSum(distinct, expr)
    }

    /**
     * Creates an expression that represents the sum of values.
     *
     * If there are no matching rows, or if all expressions are null, it returns null.
     */
    @JvmName("sum2")
    @SinceJdsl("3.0.0")
    fun sum(distinct: Boolean, expr: Expression<Long>): Expression<Long> {
        return JpqlSum.LongSum(distinct, expr)
    }

    /**
     * Creates an expression that represents the sum of values.
     *
     * If there are no matching rows, or if all expressions are null, it returns null.
     */
    @JvmName("sum3")
    @SinceJdsl("3.0.0")
    fun sum(distinct: Boolean, expr: Expression<Float>): Expression<Double> {
        return JpqlSum.FloatSum(distinct, expr)
    }

    /**
     * Creates an expression that represents the sum of values.
     *
     * If there are no matching rows, or if all expressions are null, it returns null.
     */
    @JvmName("sum4")
    @SinceJdsl("3.0.0")
    fun sum(distinct: Boolean, expr: Expression<Double>): Expression<Double> {
        return JpqlSum.DoubleSum(distinct, expr)
    }

    /**
     * Creates an expression that represents the sum of values.
     *
     * If there are no matching rows, or if all expressions are null, it returns null.
     */
    @JvmName("sum5")
    @SinceJdsl("3.0.0")
    fun sum(distinct: Boolean, expr: Expression<BigInteger>): Expression<BigInteger> {
        return JpqlSum.BigIntegerSum(distinct, expr)
    }

    /**
     * Creates an expression that represents the sum of values.
     *
     * If there are no matching rows, or if all expressions are null, it returns null.
     */
    @JvmName("sum6")
    @SinceJdsl("3.0.0")
    fun sum(distinct: Boolean, expr: Expression<BigDecimal>): Expression<BigDecimal> {
        return JpqlSum.BigDecimalSum(distinct, expr)
    }

    /**
     * Creates an expression that represents the DTO projection.
     */
    @SinceJdsl("3.0.0")
    fun <T : Any> new(type: KClass<T>, args: Iterable<Expression<*>>): Expression<T> {
        return JpqlNew(type, args)
    }

    /**
     * Creates an expression that represents the result for the first predicate that is true.
     * If no predicate is true, the result after `ELSE` is returned, or null if there is no `ELSE`.
     */
    @SinceJdsl("3.0.0")
    fun <T : Any> caseWhen(
        whens: Map<Predicate, Expression<T>>,
        `else`: Expression<T>? = null,
    ): Expression<T> {
        return JpqlCaseWhen(
            whens = whens,
            `else` = `else`,
        )
    }

    /**
     * Creates an expression that represents the result for the first value = compareValue comparison that is true.
     * If no comparison is true, the result after `ELSE` is returned, or null if there is no `ELSE` part.
     */
    @SinceJdsl("3.0.0")
    fun <T : Any, V : Any> caseValue