		; Einen abziehen
	lsr.l	#1,d6				; um einen rotieren
	addx	d1,d1				; d1 = d1 << 1 + Bit
	cmp	(a4)+,d1			; Kleiner als Wert ???
	bmi.w	.lzhLab_18			; Ja -> Springen

.lzhLab_05
	subq	#1,d7				; Einen abziehen
	lsr.l	#1,d6				; um einen rotieren
	addx	d1,d1				; d1 = d1 << 1 + Bit
	cmp	(a4)+,d1			; Kleiner als Wert ???
	bmi.b	.lzhLab_18			; Ja -> Springen

.lzhLab_06
	subq	#1,d7				; Einen abziehen
	lsr.l	#1,d6				; um einen rotieren
	addx	d1,d1				; d1 = d1 << 1 + Bit
	cmp	(a4)+,d1			; Kleiner als Wert ???
	bmi.b	.lzhLab_18			; Ja -> Springen

.lzhLab_07
	subq	#1,d7				; Einen abziehen
	lsr.l	#1,d6				; um einen rotieren
	addx	d1,d1				; d1 = d1 << 1 + Bit
	cmp	(a4)+,d1			; Kleiner als Wert ???
	bmi.b	.lzhLab_18			; Ja -> Springen

.lzhLab_08
	subq	#1,d7				; Einen abziehen
	lsr.l	#1,d6				; um einen rotieren
	addx	d1,d1				; d1 = d1 << 1 + Bit
	cmp	(a4)+,d1			; Kleiner als Wert ???
	bmi.b	.lzhLab_18			; Ja -> Springen

.lzhLab_09
	subq	#1,d7				; Einen abziehen
	lsr.l	#1,d6				; um einen rotieren
	addx	d1,d1				; d1 = d1 << 1 + Bit
	cmp	(a4)+,d1			; Kleiner als Wert ???
	bmi.b	.lzhLab_18			; Ja -> Springen

.lzhLab_10
	subq	#1,d7				; Einen abziehen
	lsr.l	#1,d6				; um einen rotieren
	addx	d1,d1				; d1 = d1 << 1 + Bit
	cmp	(a4)+,d1			; Kleiner als Wert ???
	bmi.b	.lzhLab_18			; Ja -> Springen

.lzhLab_11
	subq	#1,d7				; Einen abziehen
	lsr.l	#1,d6				; um einen rotieren
	addx	d1,d1				; d1 = d1 << 1 + Bit
	cmp	(a4)+,d1			; Kleiner als Wert ???
	bmi.b	.lzhLab_18			; Ja -> Springen

.lzhLab_12
	subq	#1,d7				; Einen abziehen
	lsr.l	#1,d6				; um einen rotieren
	addx	d1,d1				; d1 = d1 << 1 + Bit
	cmp	(a4)+,d1			; Kleiner als Wert ???
	bmi.b	.lzhLab_18			; Ja -> Springen

.lzhLab_13
	subq	#1,d7				; Einen abziehen
	lsr.l	#1,d6				; um einen rotieren
	addx	d1,d1				; d1 = d1 << 1 + Bit
	cmp	(a4)+,d1


 function(data) {
        callback.data = data;
        callback.called = true;
      };
      callback.id = callbackId;
      return callback;
    }

    return {
      /**
       * @ngdoc method
       * @name $jsonpCallbacks#createCallback
       * @param {string} url the url of the JSONP request
       * @returns {string} the callback path to send to the server as part of the JSONP request
       * @description
       * {@link $httpBackend} calls this method to create a callback and get hold of the path to the callback
       * to pass to the server, which will be used to call the callback with its payload in the JSONP response.
       */
      createCallback: function(url) {
        var callbackId = '_' + (callbacks.$$counter++).toString(36);
        var callbackPath = 'angular.callbacks.' + callbackId;
        var callback = createCallback(callbackId);
        callbackMap[callbackPath] = callbacks[callbackId] = callback;
        return callbackPath;
      },
      /**
       * @ngdoc method
       * @name $jsonpCallbacks#wasCalled
       * @param {string} callbackPath the path to the callback that was sent in the JSONP request
       * @returns {boolean} whether the callback has been called, as a result of the JSONP response
       * @description
       * {@link $httpBackend} calls this method to find out whether the JSONP response actually called the
       * callback that was passed in the request.
       */
      wasCalled: function(callbackPath) {
        return callbackMap[callbackPath].called;
      },
      /**
       * @ngdoc method
       * @name $jsonpCallbacks#getResponse
       * @param {string} callbackPath the path to the callback that was sent in the JSONP request
       * @returns {*} the data received from the response via the registered callback
       * @description
       * {@link $httpBackend} calls this method to get hold of the data that was provided to the callback
       * in the JSONP response.
       */
      getResponse: function(callbackPath) {
        return callbackMap[callbackPath].data;
      },
      /**
       * @ngdoc method
       * @name $jsonpCallbacks#removeCallback
       * @param {string} callbackPath the path to the callback that was sent in the JSONP request
       * @description
       * {@link $httpBackend} calls this method to remove the callback after the JSONP request has
       * completed or timed-out.
       */
      removeCallback: function(callbackPath) {
        var callback = callbackMap[callbackPath];
        delete callbacks[callback.id];
        delete callbackMap[callbackPath];
      }
    };
  }];
};

/**
 * @ngdoc service
 * @name $locale
 *
 * @description
 * $locale service provides localization rules for various Angular components. As of right now the
 * only public api is:
 *
 * * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`)
 */

var PATH_MATCH = /^([^\?#]*)(\?([^#]*))?(#(.*))?$/,
    DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};
var $locationMinErr = minErr('$location');

/**
 * Encode path using encodeUriSegment, ignoring forward slashes
 *
 * @param {string} path Path to encode
 * @returns {string}
 */
function encodePath(path) {
  var segments = path.split('/'),
      i = segments.length;

  while (i--) {
    segments[i] = encodeUriSegment(segments[i]);
  }

  return segments.join('/');
}

function parseAbsoluteUrl(absoluteUrl, locationObj) {
  var parsedUrl = urlResolve(absoluteUrl);

  locationObj.$$protocol = parsedUrl.protocol;
  locationObj.$$host = parsedUrl.hostname;
  locationObj.$$port = toInt(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null;
}


    this.size_ = size;

    // Stolen from DevTools TimelineJSProfileProcessor._buildCallFrame
    // Code states:
    // (empty) -> compiled
    //    ~    -> optimizable
    //    *    -> optimized
    var rePrefix = /^(\w*:)?([*~]?)(.*)$/m;
    var tokens = rePrefix.exec(name);
    var prefix = tokens[1];
    var state = tokens[2];
    var body = tokens[3];

    if (state === '*') {
      state = tr.model.source_info.JSSourceState.OPTIMIZED;
    } else if (state === '~') {
      state = tr.model.source_info.JSSourceState.OPTIMIZABLE;
    } else if (state === '') {
      state = tr.model.source_info.JSSourceState.COMPILED;
    } else {
      console.warning('Unknown v8 code state ' + state);
      state = tr.model.source_info.JSSourceState.UNKNOWN;
    }

    var rawName;
    var rawUrl;
    if (prefix === 'Script:') {
        rawName = '';
        rawUrl = body;
    } else {
        var spacePos = body.lastIndexOf(' ');
        rawName = spacePos !== -1 ? body.substr(0, spacePos) : body;
        rawUrl = spacePos !== -1 ? body.substr(spacePos + 1) : '';
    }

    function splitLineAndColumn(url) {
      var lineColumnRegEx = /(?::(\d+))?(?::(\d+))?$/;
      var lineColumnMatch = lineColumnRegEx.exec(url);
      var lineNumber;
      var columnNumber;

      if (typeof(lineColumnMatch[1]) === 'string') {
        lineNumber = parseInt(lineColumnMatch[1], 10);
        // Immediately convert line and column to 0-based numbers.
        lineNumber = isNaN(lineNumber) ? undefined : lineNumber - 1;
      }
      if (typeof(lineColumnMatch[2]) === 'string') {
        columnNumber = parseInt(lineColumnMatch[2], 10);
        columnNumber = isNaN(columnNumber) ? undefined : columnNumber - 1;
      }

      return {
        url: url.substring(0, url.length - lineColumnMatch[0].length),
        lineNumber: lineNumber,
        columnNumber: columnNumber
      };
    }

    var nativeSuffix = ' native';
    var isNative = rawName.endsWith(nativeSuffix);
    this.name_ =
        isNative ? rawName.slice(0, -nativeSuffix.length) : rawName;

    var urlData = splitLineAndColumn(rawUrl);
    var url = urlData.url || '';
    var line = urlData.lineNumber || 0;
    var column = urlData.columnNumber || 0;

    this.sourceInfo_ = new tr.model.source_info.JSSourceInfo(
        url, line, column, isNative, scriptId, state);
  };

  TraceCodeEntry.prototype = {
    get id() {
      return this.id_;
    },

    get sourceInfo() {
      return this.sourceInfo_;
    },

    get name() {
      return this.name_;
    },

    set address(address) {
      this.address_ = address;
    },

    get address() {
      return this.address_;
    },

    set size(size) {
      this.size_ = size;
    },

    get size() {
      return this.size_;
    }
  };

  return {
    TraceCodeEntry: TraceCodeEntry
  };
});
/**
Copyright (c) 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
**/

require("../../../base/color_scheme.js");
require("./codemap.js");
require("./log_reader.js");
require("../../../importer/importer.js");
require("../../../model/model.js");
require("../../../


R * L;                    // vertical length
            int delta = M / R;                 // time shift step between cosets
            const float eps = 1e-8f;

            // 1) Build G (RL x N) by circular shifts with step Δ = M/R
            var G = new Complex32[RL, N];
            for (int i = 0; i < RL; i++)
            {
                int shift = delta * i % N;
                for (int j = 0; j < N; j++)
                {
                    G[i, j] = input[Maths.Mod(j + shift, N)];
                }
            }

            // 2) Vertical Zak-DFT (length = RL)
            var Z = DFT.Forward(G); // Z has shape (RL x N)

            // 3) Block-wise normalization over R rows: i, i+L, i+2L, ...
            float w = R / Maths.Sqrt(M); // -> sum_r |Z|^2 becomes w^2 (matches R=2 case)
            for (int i = 0; i < L; i++)
            {
                for (int j = 0; j < N; j++)
                {


rScheme.outline.withValues(alpha: 0.3),
                    width: 1,
                  ),
                ),
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: [
                    Icon(
                      hasVisiblePanels
                        ? Icons.keyboard_arrow_right
                        : Icons.keyboard_arrow_left,
                      size: 18,
                      color: colorScheme.onSurfaceVariant,
                    ),
                    const SizedBox(height: 2),
                    Container(
                      width: 12,
                      height: 2,
                      decoration: BoxDecoration(
                        color: colorScheme.onSurfaceVariant.withValues(alpha: 0.6),
                        borderRadius: BorderRadius.circular(1),
                      ),
                    ),
                  ],
                ),
              ),
            ),
          ),
        ),
      ),
    );
  }

  /// 隐藏所有面板
  void _hideAllPanels() {
    widget.layoutManager.hideAllAIPanels();
  }

  /// 恢复所有面板（显示之前保存的面板配置）
  void _showAllPanels() {
    widget.layoutManager.restoreHiddenAIPanels();
  }

  Widget _buildDraggableDivider(String panelId) {
    return DraggableDivider(
      onDragUpdate: (details) {
        final delta = details.delta.dx;
        widget.layoutManager.updatePanelWidth(panelId, delta);
      },
      onDragEnd: (_) {
        widget.layoutManager.savePanelWidths();
      },
    );
  }

  Widget _buildPanelContent(String panelId, int index, {required bool isNarrow, required bool isVeryNarrow, required bool isMobile}) {
    final screenWidth = MediaQuery.of(context).size.width;

    // 优化响应式宽度计算：根据屏幕大小动态调整
    double responsiveWidthRatio;
    if (isMobile) {
      responsiveWidthRatio = 0.9; // 移动设备使用90%宽度
    } else if (isVeryNarrow) {
      responsiveWidthRatio = 0.6; // 小屏幕使用60%宽度（适合1080p）
    } else if (isNarrow) {
      responsiveWidthRatio = 0.4; // 中等屏幕使用40%宽度
    } else {
      responsiveWidthRatio = 0.35; // 大屏幕保持原有35%
    }

    final double maxResponsiveWidth = (screenWidth * responsiveWidthRatio).clamp(
      EditorLayoutManager.minPanelWidth,
      EditorLayoutManager.maxPanelWidth,
    );

    double width = widget.layoutManager.panelWidths[panelId] ?? EditorLayoutManager.minPanelWidth;
    if (isNarrow) {
      width = width.clamp(EditorLayoutManager.minPanelWidth, maxResponsiveWidth);
    }

    // 计算拖拽时的偏移量
    double xOffset = 0.0;
    if (_isDragging && _draggedPanelId == panelId) {
      xOffset = _draggedPanelOffset.clamp(-50.0, 50.0); // 限制偏移量，避免布局问题
    }

    // 使用Material和Card为面板添加卡片风格
    return SizedBox(
      width: width,
      child: Transform.translate(
        offset: Offset(xOffset, 0),
        child: Card(
          elevation: _isDragging && _draggedPanelId == panelId ? 8 : 1,
          margin: EdgeInsets.zero, // 紧�


})
      test('null', () => {
        const result = isOfObjectType(null)
        expect(result).toEqual(false)
      })
      test('undefined', () => {
        const result = isOfObjectType(undefined)
        expect(result).toEqual(false)
      })
    })

    describe('isObject', () => {
      test('false', () => {
        const result = isObject(['test', 'test'])
        expect(result).toEqual(false)
      })
      test('true', () => {
        const result = isObject({ foo: 'test' })
        expect(result).toEqual(true)
      })
    })

    describe('isArray', () => {
      test('true', () => {
        const result = isArray(['test', 'test'])
        expect(result).toEqual(true)
      })
      test('false', () => {
        const result = isArray({ foo: 'test' })
        expect(result).toEqual(false)
      })
    })
  })
})
import { CacheLock } from './CacheLock';
export abstract class CacheDriver {
    abstract get(key: string, def?: any): Promise<any>;
    abstract has(key: string): Promise<Boolean>;
    abstract increment(key: string, amount?: Number): Promise<void>;
    abstract decrement(key: string, amount?: Number): Promise<void>;
    abstract remeber(key: string, duration: Number, callback: CallableFunction): Promise<any>;
    abstract remeberForever(key: string, callback: CallableFunction): Promise<any>;
    abstract pull(key: string): Promise<any>;
    abstract put(key: string, value: any, duration?: Number): Promise<any>;
    abstract forever(key: string, value: any): Promise<void>;
    abstract forget(key: string): Promise<void>;
    abstract flush(): Promise<void>;
    abstract lock(key: string, duration: Number): Promise<CacheLock>;
}// this class represents the human managment. It prompts user choice and validates it (error input & available cell) then write it to the board.

class Human extends Player {

    public constructor(x: number = null, y: number = null, choice: number = null, sign: Cell = Cell.X) {
        super(x, y, choice);
    }

    public hPlay(LogicGame: logic, Board1: Board, Gui1: Gui, machine1:Machine,machineSign:Cell): void {

        do {  // this loop prompts choice from user and validates it.

            this.choice = Number(prompt(`Enter Your move`));  // prompts data
            if (isNaN(this.choice)) {   // NaN check
                Gui1.nanMsg();   // case true: error message
            }
            else if (this.choice < 1 || this.choice > 9) {   // number bounderies check
                Gui1.outOfRangeMsg();  // case true: error message
            }
            else if (LogicGame.isClrCellInMatrix(Board1, this.choice, machineSign)) {   // checks if choice is to empty cell.
                break;  // case true
            }
            else {
                Gui1.occupiedCellMsg();  // false: error occupied cell msg...
            }

        }

        while (true)

        this.x = LogicGame.num2X(this.choice);  // number to X Axis.
        this.y = LogicGame.num2Y(this.choice);   // number to Y Axis.
        Board1.insert2Cell(Board1, Cell.X, this.y, this.x); //writes  x,y to board

    }

}

controller.up.onEvent(ControllerButtonEvent.Pressed, function () {
    Cursor.y += -6
    if (Cursor.top < Keyboard.top) {
        Cursor.bottom = Keyboard.bottom - 1


        Log.d(TAG, "setCameraMoveListener")
        cameraMoveListener = listener
        it.setOnCameraMoveListener {
            try {
                Log.d(TAG, "Listener: onCameraMove: ")
                if (SDK_INT >= 26) {
                    mapView?.let { it.parent?.onDescendantInvalidated(it, it) }
                }
                map?.let {
                    val cameraPosition = it.cameraPosition
                    val tilt = cameraPosition.tilt
                    val bearing = cameraPosition.bearing
                    val useFast = tilt < 1f && (bearing % 360f < 1f || bearing % 360f > 359f)
                    projectionImpl?.updateProjectionState(it.projection, useFast)
                }
                cameraMoveListener?.onCameraMove()
                cameraChangeListener?.onCameraChange(map?.cameraPosition?.toGms())
            } catch (e: Exception) {
                Log.w(TAG, e)
            }
        }
    }

    override fun setCameraMoveCanceledListener(listener: IOnCameraMoveCanceledListener?) = afterInitialize {
        Log.d(TAG, "setCameraMoveCanceledListener")
        cameraMoveCanceledListener = listener
        it.setOnCameraMoveCanceledListener {
            try {
                Log.d(TAG, "setOnCameraMoveCanceledListener: ")
                cameraMoveCanceledListener?.onCameraMoveCanceled()
            } catch (e: Exception) {
                Log.w(TAG, e)
            }
        }
    }

    override fun setCameraIdleListener(listener: IOnCameraIdleListener?) = afterInitialize {
        Log.d(TAG, "setCameraIdleListener")
        cameraIdleListener = listener
    }

    override fun getTestingHelper(): IObjectWrapper? {
        Log.d(TAG, "unimplemented Method: getTestingHelper")
        return null
    }

    override fun setWatermarkEnabled(watermark: Boolean) {
        Log.d(TAG, "unimplemented Method: setWatermarkEnabled")
    }

    override fun useViewLifecycleWhenInFragment(): Boolean {
        Log.d(TAG, "unimplemented Method: useViewLifecycleWhenInFragment")
        return false
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        if (!created) {
            Log.d(TAG_LOGO, "create: ${context.packageName},\n$options")
            MapsInitializer.initialize(mapContext)
            val mapView = runCatching {
                TextureMapView(mapContext, options.toHms())
            }.onFailure {
                Log.w(TAG, "onCreate: init TextureMapView error ", it)
            }.getOrDefault(MapView(mapContext, options.toHms())).apply { visibility = View.INVISIBLE }
            this.mapView = mapView
            view.addView(mapView)
            mapView.onCreate(savedInstanceState?.toHms())
            mapView.getMapAsync(this::initMap)

            created = true
            runOnMainLooper(forceQueue = true) { tryRunUserInitializedCallbacks("onCreate") }
        }
    }

    private fun fakeWatermark(method: () -> Unit) {
        Log.d(TAG_LOGO, "start -> $view")
        val view1 = view.getChildAt(0) as? ViewGroup
        val view2 = view1?.getChildAt(0) as? ViewGroup
        val view4 = view2?.getChildAt(1)
        Log.d(TAG_LOGO, view4?.toString() ?: "view4 is null")
        if (view4 is LinearLayout) {
            view4.visibility = View.GONE
            method()
        } else {
            Log.d(TAG_LOGO, "LinearLayout not found")
        }
    }

    private fun getAllChildViews(view: View, index: Int): List<View>? {
        Log.d(TAG_LOGO, "getAllChildViews: $index, $view")
        if (view is LinearLayout) {
            Log.d(TAG_LOGO, "legal: $index")
            view.visibility = View.GONE
        }
        val allChildren: MutableList<View> = ArrayList()
        if (view is ViewGroup) {
            val vp = view
            for (


 nodeInitialPos: cc.Vec2;
    //定时器绑定回调
    private bindCallback: null;
    private isBegin = false;

    constructor(shakeNode, duration, shakeStrengthX, shakeStrengthY) {
        this.shakeNode = shakeNode;
        this.nodeInitialPos = shakeNode.getposition;
        this.shakeStrengthX = shakeStrengthX;
        this.shakeStrengthY = shakeStrengthY;
        this.duration = duration;
        this.isBegin = false;
    }

    // private isBegin = false;
    public shakeForever() {
        if (!!window["ActiveXObject"] || "ActiveXObject" in window){
            return;
        }
        if(this.isBegin){
            return;
        }
        this.isBegin = true;
        let action =
            cc.repeatForever(
                cc.sequence(
                    cc.moveTo(this.duration, cc.v2(-this.shakeStrengthX, -this.shakeStrengthY)),
                    cc.moveTo(this.duration, cc.v2(-this.shakeStrengthX * 2, -this.shakeStrengthY * 2)),
                    cc.moveTo(this.duration, cc.v2(-this.shakeStrengthX, -this.shakeStrengthY * 2)),
                    cc.moveTo(this.duration, cc.v2(0, -this.shakeStrengthY * 2)),
                    cc.moveTo(this.duration, cc.v2(this.shakeStrengthX, -this.shakeStrengthY)),
                    cc.moveTo(this.duration, cc.v2(this.shakeStrengthX * 2, -this.shakeStrengthY * 2)),
                    cc.moveTo(this.duration, cc.v2(this.shakeStrengthX * 2, -this.shakeStrengthY)),
                    cc.moveTo(this.duration, cc.v2(this.shakeStrengthX * 2, 0)),
                    cc.moveTo(this.duration, cc.v2(this.shakeStrengthX, this.shakeStrengthY)),
                    cc.moveTo(this.duration, cc.v2(this.shakeStrengthX * 2, this.shakeStrengthY * 2)),
                    cc.moveTo(this.duration, cc.v2(this.shakeStrengthX, this.shakeStrengthY * 2)),
                    cc.moveTo(this.duration, cc.v2(0, this.shakeStrengthY * 2)),
                    cc.moveTo(this.duration, cc.v2(-this.shakeStrengthX, this.shakeStrengthY * 2)),
                    cc.moveTo(this.duration, cc.v2(-this.shakeStrengthX * 2, this.shakeStrengthY * 2)),
                    cc.moveTo(this.duration, cc.v2(-this.shakeStrengthX, this.shakeStrengthY)),
                    cc.moveTo(this.duration, cc.v2(0, 0)),
                ));
        this.nodeInitialPos = this.shakeNode.position ;
        this.shakeNode.runAction(action);
    }

    public stopShake(){
        this.isBegin = false;
        if(this.nodeInitialPos){
            this.shakeNode.position = this.nodeInitialPos;
        }
        this.shakeNode.stopAllActions();
    }
}
import {Injectable, PipeTransform} from '@angular/core';
import {NgbDate} from '@ng-bootstrap/ng-bootstrap';
import {HospitalNotification} from '../models/hospital/notification.model';
import {HospitalAppointment} from '../models/hospital/hospital-appointment.model';

@Injectable({
  providedIn: 'root'
})
export class UtilsService {

  constructor() { }

  // GET num of days have passed
  public numDaysBetween(d1): number {
    const d2 = Date.now();


textarea class="javascript">
let layout = new w2layout({
    name    : 'layout',
    panels  : [
        { type: 'top', size: 40 },
        { type: 'main', content: 'This is main panel',
            tabs: {
                active: 'tab2',
                tabs: [
                    { id: 'tab1', text: 'Tab 1' },
                    { id: 'tab2', text: 'Tab 2' },
                    { id: 'tab3', text: 'Tab 3' }
                ],
                onClick(event) {
                    console.log('event');
                }
            }
        },
        { type: 'preview', size: 200 }
    ]
});
</textarea>

You can toggle tabs
<textarea class="javascript">
w2ui.layout.toggleTabs('main');
</textarea>URL of the form HTML template.

    String, default = ''

There are four ways you can define form HTML template (in order of preference):

.formURL - load from server

.formHTML - define in JavaScript

innerHTML of.box

auto generated (see .generateHTML)

The following example shows how to load HTML template from a URL

<textarea class="javascript">
let form = new w2form({
    name     : 'form',
    style    : 'border: 0px; background-color: transparent;',
    formURL  : '/server/path',
    fields: [
        { field: 'first_name', type: 'text', required: true },
        { field: 'last_name', type: 'text', required: true },
        { field: 'email', type: 'email' }
    ],
    record: {
        first_name : 'John',
        last_name  : 'Doe',
        email      : 'jdoe@email.com'
    },
    actions: {
        "save": function () { this.validate(); },
        "reset": function () { this.clear(); }
    }
});
</textarea>

You will still need a container #form to render the form.Returns HTML of grid columns.

    getColumnsHTML()

Returns HTML text.

Description

The method is used internally to generate HTML for all columns. If a column is hidden, it will not be in final HTML.
It is possible to overwrite this method with a custom one.

If you have grid defined in the following way:
<textarea class="javascript">
let grid = new w2grid({
    name    : 'grid',
    columns: [
        { field: 'recid', text: 'ID', size: '50px' },
        { field: 'lname', text: 'Last Name', size: '30%' },
        { field: 'fname', text: 'First Name', size: '30%' },
        { field: 'email', text: 'Email', size: '40%' },
        { field: 'sdate', text: 'Start Date', size: '120px' },
        { field: 'sdate', text: 'End Date', size: '120px' }
    ],
    records: [
        { recid: 1, fname: 'John', lname: 'doe', email: 'vitali@gmail.com', sdate: '1/3/2012' },
        { recid: 2, fname: 'Stuart', lname: 'Motzart', email: 'jdoe@gmail.com', sdate: '2/4/2012' },
        { recid: 3, fname: 'Jin', lname: 'Franson', email: '


0 22.5 15'%3e%3cpath fill='white' d='M.8 0h21v15H.8V0z'/%3e%3cpath fill='%23eb000e' d='M9.8 6H0v3h9.8v6h3V9h9.8V6h-9.8V0h-3v6z'/%3e%3cpath fill='%23eb000e' d='M17.3 2.7l-.2-1.2h1l-.2 1.2 1.2-.2v1l-1.2-.2.2 1.2h-1l.2-1.2-1.2.2v-1l1.2.2zm-12.7 0l-.2-1.2h1l-.2 1.2 1.2-.2v1l-1.2-.2.2 1.2h-1l.2-1.2-1.2.2v-1l1.2.2zm0 9l-.2-1.2h1l-.2 1.2 1.2-.2v1l-1.2-.2.2 1.2h-1l.2-1.2-1.2.2v-1l1.2.2zm12.7 0l-.2-1.2h1l-.2 1.2 1.2-.2v1l-1.2-.2.2 1.2h-1l.2-1.2-1.2.2v-1l1.2.2z'/%3e%3c/svg%3e")}.flag\:GF{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 60'%3e%3cpath fill='%23FDEB01' d='M0 0l90 60H0z'/%3e%3cpath fill='%2358A846' d='M90 0v60L0 0z'/%3e%3cpath fill='%23ED3D24' d='M50.7 33.3l9.3-6.7H48.5L45 15.7l-3.5 10.9H30l9.3 6.7-3.6 11 9.3-6.7 9.3 6.7z'/%3e%3c/svg%3e")}.flag\:GG{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 513 342'%3e%3cpath fill='white' d='M0 0h513v342H0z'/%3e%3cpath fill='%23D80027' d='M308 0H204v118.7H0v104h204V342h104V222.7h205v-104H308z'/%3e%3cpath fill='%23FFDA44' d='M368.6 188l26 17.3V136l-26 17.3h-95.3V58.1l17.3-26h-69.2l17.3 26v95.2h-95.3l-26-17.3v69.3l26-17.3h95.3v95.2l-17.3 26h69.2l-17.3-26V188z'/%3e%3c/svg%3e")}.flag\:GH{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 85.333 512 341.333'%3e%3cpath fill='%23FFDA44' d='M0 85.337h512v341.326H0z'/%3e%3cpath fill='%23D80027' d='M0 85.337h512v113.775H0z'/%3e%3cpath fill='%23496E2D' d='M0 312.888h512v113.775H0z'/%3e%3cpath d='M255.883 199.111l14.119 43.458 40.366 3.


   }
    #[doc = "Bit 14 - ADC prescaler"]
    #[inline(always)]
    pub fn adcpre(&mut self) -> ADCPRE_W {
        ADCPRE_W { w: self }
    }
    #[doc = "Bits 15:16 - PLL input clock source"]
    #[inline(always)]
    pub fn pllsrc(&mut self) -> PLLSRC_W {
        PLLSRC_W { w: self }
    }
    #[doc = "Bit 17 - HSE divider for PLL entry"]
    #[inline(always)]
    pub fn pllxtpre(&mut self) -> PLLXTPRE_W {
        PLLXTPRE_W { w: self }
    }
    #[doc = "Bits 18:21 - PLL Multiplication Factor"]
    #[inline(always)]
    pub fn pllmul(&mut self) -> PLLMUL_W {
        PLLMUL_W { w: self }
    }
    #[doc = "Bits 24:26 - Microcontroller clock output"]
    #[inline(always)]
    pub fn mco(&mut self) -> MCO_W {
        MCO_W { w: self }
    }
    #[doc = "Bits 28:30 - Microcontroller Clock Output Prescaler"]
    #[inline(always)]
    pub fn mcopre(&mut self) -> MCOPRE_W {
        MCOPRE_W { w: self }
    }
    #[doc = "Bit 31 - PLL clock not divided for MCO"]
    #[inline(always)]
    pub fn pllnodiv(&mut self) -> PLLNODIV_W {
        PLLNODIV_W { w: self }
    }
}
//! Implements filtering for events originating from legacy browsers.

use std::collections::{BTreeSet, HashMap};

use lazy_static::lazy_static;

use relay_general::protocol::Event;
use relay_general::user_agent::{self, UserAgent};

use crate::{FilterStatKey, LegacyBrowser, LegacyBrowsersFilterConfig};

/// Checks if the event originates from legacy browsers.
pub fn matches(event: &Event, browsers: &BTreeSet<LegacyBrowser>) -> bool {
    if let Some(user_agent_string) = user_agent::get_user_agent(event) {
        let user_agent = user_agent::parse_user_agent(user_agent_string);

        // remap IE Mobile to IE (sentry python, filter compatibility)
        let family = match user_agent.family.as_str() {
            "IE Mobile" => "IE",
            other => other,
        };

        if browsers.contains(&LegacyBrowser::Default) {
            return default_filter(family, &user_agent);
        }

        for browser_type in browsers {
            let should_filter = match browser_type {
                LegacyBrowser::IePre9 => filter_browser(family, &user_agent, "IE", |x| x <= 8),
                LegacyBrowser::Ie9 => filter_browser(family, &user_agent, "IE", |x| x == 9),
                LegacyBrowser::Ie10 => filter_browser(family, &user_agent, "IE", |x| x == 10),
                LegacyBrowser::Ie11 => filter_browser(family, &user_agent, "IE", |x| x == 11),
                LegacyBrowser::OperaMiniPre8 => {
                    filter_browser(family, &user_agent, "Opera Mini", |x| x < 8)
                }
                LegacyBrowser::OperaPre15 => {
                    filter_browser(family, &user_agent, "Opera", |x| x < 15


			}

			if raftStatus == nil {
				raftStatus = sr.getRaftStatusFn(replWithStats.repl)
			}
			if replicaIsBehind(raftStatus, candidate.ReplicaID) {
				log.VEventf(ctx, 3, "%v is behind or this store isn't the raft leader for r%d; raftStatus: %v",
					candidate, desc.RangeID, raftStatus)
				continue
			}

			if len(preferred) > 0 && !storeHasReplica(candidate.StoreID, preferred) {
				log.VEventf(ctx, 3, "s%d not a preferred leaseholder for r%d; preferred: %v",
					candidate.StoreID, desc.RangeID, preferred)
				continue
			}

			filteredStoreList := storeList.filter(zone.Constraints)
			if sr.rq.allocator.followTheWorkloadPrefersLocal(
				ctx,
				filteredStoreList,
				*localDesc,
				candidate.StoreID,
				candidates,
				replWithStats.repl.leaseholderStats,
			) {
				log.VEventf(ctx, 3, "r%d is on s%d due to follow-the-workload; skipping",
					desc.RangeID, localDesc.StoreID)
				continue
			}

			return replWithStats, candidate, considerForRebalance
		}

		// If none of the other replicas are valid lease transfer targets, consider
		// this range for replica rebalancing.
		considerForRebalance = append(considerForRebalance, replWithStats)
	}
}

func (sr *StoreRebalancer) chooseReplicaToRebalance(
	ctx context.Context,
	hottestRanges *[]replicaWithStats,
	localDesc *roachpb.StoreDescriptor,
	storeList StoreList,
	storeMap map[roachpb.StoreID]*roachpb.StoreDescriptor,
	minQPS float64,
	maxQPS float64,
) (replicaWithStats, []roachpb.ReplicationTarget) {
	now := sr.rq.store.Clock().Now()
	for {
		if len(*hottestRanges) == 0 {
			return replicaWithStats{}, nil
		}
		replWithStats := (*hottestRanges)[0]
		*hottestRanges = (*hottestRanges)[1:]

		if replWithStats.repl == nil {
			return replicaWithStats{}, nil
		}

		if shouldNotMoveAway(ctx, replWithStats, localDesc, now, minQPS) {
			continue
		}

		// Don't bother moving ranges whose QPS is below some small fraction of the
		// store's QPS (unless the store has extra ranges to spare anyway). It's
		// just unnecessary churn with no benefit to move ranges responsible for,
		// for example, 1 qps on a store with 5000 qps.
		const minQPSFraction = .001
		if replWithStats.qps < localDesc.Capacity.QueriesPerSecond*minQPSFraction &&
			float64(localDesc.Capacity.RangeCount) <= storeList.candidateRanges.mean {
			log.VEventf(ctx, 5, "r%d's %.2f qps is too little to matter relative to s%d's %.2f total qps",
				replWithStats.repl.RangeID, replWithStats.qps, localDesc.StoreID, localDesc.Capacity.QueriesPerSecond)
			continue
		}

		desc, zone := replWithStats.repl.DescAndZone()
		log.VEventf(ctx, 3, "considering replica rebalance for r%d with %.2f qps",
			desc.RangeID, replWithStats.qps)

		clusterNodes := sr.rq.allocator.storePool.ClusterNodeCount()
		desiredReplicas := GetNeededReplicas(*zone.NumReplicas, clusterNodes)
		targets := make([]roachpb.ReplicationTarget, 0, desiredReplicas)
		targetReplicas := make([]roachpb.ReplicaDescriptor, 0, desiredReplicas)
		currentReplicas := desc.Replicas().All()

		//


/* fuzzy.h
 *
 * Copyright (C) 2015 Christian Hergert <christian@hergert.me>
 *
 * This program 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.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef DZL_FUZZY_MUTABLE_INDEX_H
#define DZL_FUZZY_MUTABLE_INDEX_H

#include <glib-object.h>

G_BEGIN_DECLS

#define DZL_TYPE_FUZZY_MUTABLE_INDEX (dzl_fuzzy_mutable_index_get_type())

typedef struct _DzlFuzzyMutableIndex DzlFuzzyMutableIndex;

typedef struct
{
   const gchar *key;
   gpointer     value;
   gfloat       score;
   guint        id;
} DzlFuzzyMutableIndexMatch;

GType                     dzl_fuzzy_mutable_index_get_type           (void);
DzlFuzzyMutableIndex     *dzl_fuzzy_mutable_index_new                (gboolean              case_sensitive);
DzlFuzzyMutableIndex     *dzl_fuzzy_mutable_index_new_with_free_func (gboolean              case_sensitive,
                                                                      GDestroyNotify        free_func);
void                      dzl_fuzzy_mutable_index_set_free_func      (DzlFuzzyMutableIndex *fuzzy,
                                                                      GDestroyNotify        free_func);
void                      dzl_fuzzy_mutable_index_begin_bulk_insert  (DzlFuzzyMutableIndex *fuzzy);
void                      dzl_fuzzy_mutable_index_end_bulk_insert    (DzlFuzzyMutableIndex *fuzzy);
gboolean                  dzl_fuzzy_mutable_index_contains           (DzlFuzzyMutableIndex *fuzzy,
                                                                      const gchar          *key);
void                      dzl_fuzzy_mutable_index_insert             (DzlFuzzyMutableIndex *fuzzy,
                                                                      const gchar          *key,
                                                                      gpointer              value);
GArray                   *dzl_fuzzy_mutable_index_match              (DzlFuzzyMutableIndex *fuzzy,
                                                                      const gchar          *needle,
                                                                      gsize                 max_matches);
void                      dzl_fuzzy_mutable_index_remove             (DzlFuzzyMutableIndex *fuzzy,
                                                                      const gchar          *key);
DzlFuzzyMutableIndex     *dzl_fuzzy_mutable_index_ref                (DzlFuzzyMutableIndex *fuzzy);
void                      dzl_fuzzy_mutable_index_unref              (DzlFuzzyMutableIndex *fuzzy);
gchar                    *dzl_fuzzy_highlight                        (const gchar          *str,
                                                                      const gchar          *query,
                                                                      gboolean              case_sensitive);

G_DEFINE_AUTOPTR_CLEANUP_FUNC (DzlFuzzyMutableIndex, dzl_fuzzy_mutable_index_unref)

G_END_DECLS

#endif /* DZL_FUZZY_MUTABLE_INDEX_H */


--- media/base/media_switches.h.orig	2024-06-18 21:43:35 UTC
+++ media/base/media_switches.h
@@ -43,6 +43,10 @@ MEDIA_EXPORT extern const char kReportVp9AsAnUnsupport

 MEDIA_EXPORT extern const char kReportVp9AsAnUnsupportedMimeType[];

+#if BUILDFLAG(IS_BSD)
+MEDIA_EXPORT extern const char kAudioBackend[];
+#endif
+
 #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD) || \
     BUILDFLAG(IS_SOLARIS)
 MEDIA_EXPORT extern const char kAlsaInputDevice[];
@@ -324,13 +328,13 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMetadataSusp
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlaybackSpeedButton);
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMediaEngagementData);
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMetadataSuspend);
-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForCast);
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForScreenShare);
 #endif  // BUILDFLAG(IS_LINUX)
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kRecordMediaEngagementScores);
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kRecordWebAudioEngagement);
-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kReduceHardwareVideoDecoderBuffers);
 #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kResumeBackgroundVideo);
@@ -345,7 +349,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseFakeDeviceForMed
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseAndroidOverlayForSecureOnly);
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseDecoderStreamForWebRTC);
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseFakeDeviceForMediaStream);
-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinux);
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinuxGL);
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoEncodeLinux);
@@ -364,7 +368,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9SModeHWEnco
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLayerHWEncoding);
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9SModeHWEncoding);
 #endif  // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS)
-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatVideoDecoder);
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatefulVideoDecoder);
 #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
@@ -506,7 +510,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseGTFOOutOfProcess
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseGTFOOutOfProcessVideoDecoding);
 #endif  // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER)

-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoEncoding);
 #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)


Log3('test');

let drawPoint = (point) => {
    //...
    console.log(point.x, point.y);
}

drawPoint({
    x: 1,
    y: 2
});

// in-line annotation for simpler cases. not good for many. ==> interfaces are used
let drawPointInLine = (point : {x : number, y : number}) => {
    //...
    console.log(point.x, point.y);
}

drawPointInLine({
    x: 5,
    y: 4
});

// with interface, shape of an object is defined
interface Point{
    x: number,
    y: number
}

let drawPointWithInterface = (point : Point) => {
    //...
    console.log(point.x, point.y);
}

// here we violates cohesion concept. That is related contents
// should go together ==> concept of class came into the
// picture
// A class groups variables (properties) and functions (methods)
// that are highly related
let getDistance = (pointA : Point, pointB : Point) => {
    //...
    console.log(pointA, pointB);
}

drawPointWithInterface({
    x: 6,
    y: 8
});

interface PointInterfaceForClass
{
    x: number,
    y: number,

    draw: () => void
}

class PointClass
{
    private x: number;
    private y: number;

    /*
    // mandatory parameters
    constructor(x : number, y : number)
    {
        this.x = x;
        this.y = y;
    }
    */

    // optional parameters
    constructor(x? : number, y? : number)
    {
        this.x = x;
        this.y = y;
    }

    /*
    // if constructor is written in this manner, TypeScript knows
    // to generate private optional fields and it will initialize
    // those values inside this
    constructor(private x? : number, private y? : number)
    {
    }*/

    draw(){// adding public modifier here is redundant: public draw() : since by default, it's public
        // ...
        console.log(this.x, this.y);
    }

    getDistance(another: Point)
    {
        // ...
    }

    setX(x : number)
    {
        this.x = x;
    }

    getX()
    {
        return this.x;
    }

    setY(y : number)
    {
        if(y < 0)
        {
            throw new Error('y cannot be less than zero');
        }
        else
        {
            this.y = y;
        }
    }

    getY()
    {
        return this.y;
    }
}

// field : property of a class
// method : function of a class
// field & method are known as members
// constructors are not members
// pointClass is an object - an instance of the class PointClass
let pointClass : PointClass;
// when dealing with custom type, need to explicitly allocate memory.
// otherwise runtime error.
pointClass = new PointClass(7, 3);
// or let point: Point = new Point(7, 3); also work
pointClass.draw();

// we can't have multiple constructors in TypeScript
// ==> make constructor parameters optional
let pointClassWithoutParameter = new PointClass();
pointClassWithoutParameter.setX(7);
pointClassWithoutParameter.setY(2);
pointClassWithoutParameter.draw();

// three access modifiers : public, private, protected
// by default all members are public

// when fields are associated with getters and setters
// they can use the feature of property

class PointClassWithProperty
{
    constructor(private _x? : number, private _y? : number)
    {
    }

    draw(){// adding public modifier here is redundant: public draw() : since by default, it's public
        // ...
        console.log(this._x, this._y);
    }

    set x(value : number)
    {
        this._x = value;


fine _fv3_float_t long double
#define _FV3_(name) name ## _l
#include "freeverb/scomp_t.hpp"
#undef _FV3_
#undef _fv3_float_t

};

#endif
/**
 *  Impulse Response Processor model implementation
 *  Low Latency Version
 *
 *  Copyright (C) 2006-2018 Teru Kamogashira
 *
 *  This program 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 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#include "freeverb/irmodel2zl.hpp"
#include "freeverb/fv3_type_float.h"
#include "freeverb/fv3_ns_start.h"

// irmodel2zlm

FV3_(irmodel2zlm)::FV3_(irmodel2zlm)()
{
  ZLstart = 0;
}

FV3_(irmodel2zlm)::FV3_(~irmodel2zlm)()
{
  ;
}

void FV3_(irmodel2zlm)::loadImpulse(const fv3_float_t * inputL, long size)
  throw(std::bad_alloc)
{
  if(size <= 0) return;
  unloadImpulse();
  try
    {
	  FV3_(irmodel2m)::loadImpulse(inputL, size);
	  zlFrameSlot.alloc(fragmentSize, 1);
	  zlOnlySlot.alloc(fragmentSize, 1);
      latency = 0;
      mute();
	}
  catch(std::bad_alloc&)
    {
      std::fprintf(stderr, "irmodel2zlm::loadImpulse(%ld) bad_alloc\n", size);
      unloadImpulse();
      throw;
    }
}

void FV3_(irmodel2zlm)::unloadImpulse()
{
  if(impulseSize == 0) return;
  FV3_(irmodel2m)::unloadImpulse();
  zlFrameSlot.free();
  zlOnlySlot.free();
}

void FV3_(irmodel2zlm)::processreplace(fv3_float_t *inputL, long numsamples)
{
  if(numsamples <= 0||fragmentSize <= 0) return;
  if(numsamples > fragmentSize) // divide into fragmentSize pieces
    {
      long div = numsamples/fragmentSize;
      for(long i = 0;i < div;i ++){ processreplace(inputL+i*fragmentSize, fragmentSize); }
      processreplace(inputL+div*fragmentSize, numsamples%fragmentSize);
      return;
    }

  long cursor = fragmentSize - ZLstart;
  // numsamples <= fragmentSize
  // numsamples-cursor <= fragmentSize-cursor = ZLstart <= fragmentSize
  if(cursor >= numsamples)
    {
      processZL(inputL,        fifoSlot.L,        numsamples);
    }
  else
    {
      processZL(inputL,        fifoSlot.L,        cursor);
      processZL(inputL+cursor, fifoSlot.L+cursor, numsamples-cursor);
    }
  std::memcpy(inputL, fifoSlot.L, sizeof(fv3_float_t)*numsamples);
}

void FV3_(irmodel2zlm)


//
//  HKVideoPlayerThemeView.h
//  iOS Video Player
//
//  Created by Hai Kieu on 11/22/14.
//  Copyright (c) 2014 haikieu2907@gmail.com. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "HKVideoPlayerEvent.h"
#import "UIView+MHNibLoading.h"

@class HKVideoPlayerViewController;
@class HKVideoPlayerThemeView;
@protocol HKVideoPlayerThemeView <HKVideoPlayerThemeViewRequirementDelegate,HKVideoPlayerPreEventDelegate,HKVideoPlayerPostEventDelegate>

@property(nonatomic,weak,readonly)HKVideoPlayerViewController *playerVC;

-(void)renderThemeOnPlayerVC:(HKVideoPlayerViewController*)playerVC;
-(void)renderLoadingOnPlayerVC:(HKVideoPlayerViewController*)playerVC;
-(void)renderThemeAssetOnPlayerVC:(HKVideoPlayerViewController*)playerVC;
-(void)setEventHandler __deprecated_msg("This is deprecated now");
-(void)showThemeView:(BOOL)animated;
-(void)hideThemeView:(BOOL)animated;
-(void)showLoadingAnimation;
-(void)hideLoadingAnimation;
-(void)changeToDisableState;
-(void)changeToNormalState;

+(instancetype) theme;

@end

@interface HKVideoPlayerThemeView : UIView <HKVideoPlayerThemeView>

@property(nonatomic,strong)NSString * playerTitle;
@property(nonatomic,strong)NSString * playerSubTitle;

@end

@interface HKVideoPlayerThemeView(Assets)

+(NSString*)specifyDefaultBundle;
+(UIImage*)getAssetImageWithName:(NSString*)fileName;
+(UIImage*)getAssetImageWithName:(NSString*)fileName bundle:(NSString*)bundleName;

+(NSString *)timeStringFromSeconds:(float)secondsValue;

+(UIImage *)imageFromText:(NSString *)text;

@end

@interface HKVideoPlayerThemeView(NibLoading)

+(BOOL)isNibBasedTheme;
+(NSString*)nibName;
+(NSBundle*)nibBundle;
+(UIView*)nibView;

@end


28',
      '#9467bd',
      '#8c564b'
    ];

    for (int i = 0; i < colorValues.length; i++) {
      colorMap[colorValues[i].toString()] =
          defaultColors[i % defaultColors.length];
    }

    return colorMap;
  }

  Map<String, double> _setupSizeScale(_ChartData chartData) {
    final sizeMap = <String, double>{};
    if (chartData.sizeColumn == null) {
      return sizeMap;
    }

    final sizeValues = chartData.data
        .map((d) => d[chartData.sizeColumn])
        .where((v) => v != null)
        .toList();
    if (sizeValues.isEmpty) {
      return sizeMap;
    }

    final numValues = sizeValues.map((v) => (v as num).toDouble()).toList();
    final min = numValues.reduce((a, b) => a < b ? a : b);
    final max = numValues.reduce((a, b) => a > b ? a : b);

    for (final value in sizeValues) {
      final numValue = (value as num).toDouble();
      final normalized = (numValue - min) / (max - min);
      sizeMap[value.toString()] = 2 + normalized * 8; // Scale from 2 to 10
    }

    return sizeMap;
  }

  void _renderBackground(StringBuffer buffer, _Rect plotArea, dynamic theme) {
    // Render plot area background if needed
    buffer.writeln(
        '  <rect x="${plotArea.left}" y="${plotArea.top}" width="${plotArea.width}" height="${plotArea.height}" fill="none"/>');
  }

  void _renderGrid(StringBuffer buffer, _Rect plotArea, _Scale xScale,
      _Scale yScale, dynamic theme) {
    final gridColor = '#e0e0e0';

    // Vertical grid lines
    if (xScale is _LinearScale) {
      final ticks = _getTicks(xScale.domain[0], xScale.domain[1], 5);
      for (final tick in ticks) {
        final x = plotArea.left + xScale.scale(tick);
        buffer.writeln(
            '  <line x1="$x" y1="${plotArea.top}" x2="$x" y2="${plotArea.top + plotArea.height}" stroke="$gridColor" stroke-width="1"/>');
      }
    }

    // Horizontal grid lines
    if (yScale is _LinearScale) {
      final ticks = _getTicks(yScale.domain[0], yScale.domain[1], 5);
      for (final tick in ticks) {
        final y = plotArea.top + yScale.scale(tick);
        buffer.writeln(
            '  <line x1="${plotArea.left}" y1="$y" x2="${plotArea.left + plotArea.width}" y2="$y" stroke="$gridColor" stroke-width="1"/>');
      }
    }
  }

  void _renderGeometries(
    StringBuffer buffer,
    _Rect plotArea,
    _ChartData chartData,
    _Scale xScale,
    _Scale yScale,
    _Scale? y2Scale,
    Map<String, String> colorScale,
    Map<String, double> sizeScale,
  ) {
    for (final geometry in chartData.geometries) {
      if (geometry.toString().contains('Point')) {
        _renderPointGeometry(
            buffer, plotArea, chartData, xScale, yScale, colorScale, sizeScale);
      } else if (geometry.toString().contains('Line')) {
        _renderLineGeometry(
            buffer, plotArea, chartData, xScale, yScale, colorScale);
      } else if (geometry.toString().contains('Bar')) {
        _renderBarGeometry(
            buffer, plotArea, chartData, xScale, yScale, colorScale);
      }
    }
  }

  void _renderPointGeometry(
      StringBuffer


unction()
   						LrHttp.openUrlInBrowser(PSConvert.downloadUrlDcraw)
    				end,
    			},
    		},
    	}
end

-------------------------------------------------------------------------------
-- exiftoolProgView(f, propertyTable)
function PSDialogs.exiftoolProgView(f, propertyTable)
	return
        f:group_box {
   			title	= 'Exiftool',
			fill_horizontal = 1,

    		f:row {
    			f:static_text {
    				title			= LOC "$$$/PSUpload/PluginDialog/exiftoolDesc=Enter the path where 'exiftool' is installed.\nRequired, if you want to use metadata translations (face regions, color labels, ratings).\n"
    			},
    		},

    		f:row {
    			f:static_text {
    				title 			= "exiftool:",
    				alignment 		= 'right',
    				width 			= share 'labelWidth',
    			},

    			f:edit_field {
    				truncation 		= 'middle',
    				immediate 		= true,
    				fill_horizontal = 1,
    				value 			= bind 'exiftoolprog',
    				validate 		= PSDialogs.validateProgram,
    			},
    		},

    		f:row {
    			f:push_button {
    				title 			= LOC "$$$/PSUpload/PluginDialog/ProgDefault=Default",
    				tooltip 		= LOC "$$$/PSUpload/PluginDialog/ProgDefaultTT=Set to Default.",
    				alignment 		= 'right',
    				fill_horizontal = 1,
    				action 			= function()
    					propertyTable.exiftoolprog = PSExiftoolAPI.defaultInstallPath
    				end,
    			},

    			f:push_button {
    				title 			= LOC "$$$/PSUpload/PluginDialog/ProgSearch=Search",
    				tooltip 		= LOC "$$$/PSUpload/PluginDialog/ProgSearchTT=Search in Explorer/Finder.",
    				alignment 		= 'right',
    				fill_horizontal = 1,
    				action 			= function()
    					LrShell.revealInShell(getRootPath())
    				end,
    			},

    			f:push_button {
    				title 			= LOC "$$$/PSUpload/PluginDialog/ProgDownload=Download",
    				tooltip 		= LOC "$$$/PSUpload/PluginDialog/ProgDownloadTT=Download from Web.",
    				alignment 		= 'right',
    				fill_horizontal = 1,
    				action 			= function()
   						LrHttp.openUrlInBrowser(PSExiftoolAPI.downloadUrl)
    				end,
    			},
    		},
    	}
end

-------------------------------------------------------------------------------
-- videoConvSettingsView(f, propertyTable)
function PSDialogs.videoConvSettingsView(f, propertyTable)
	local prefs = LrPrefs.prefsForPlugin()

	return
        f:group_box {
			title	= "FFmpeg",
			fill_horizontal = 1,

    		f:row {
    			f:static_text {
    				title 			= LOC "$$$/PSUpload/PluginDialog/VideoConvSettingsDescription=Enter the path where the 'ffmpeg' program is installed.\nEnter the filename of the video conversion presets file (must be a JSON file in the plugin dir).\n",
    			},
    		},

    		f:row {
    			f:static_text {
    				title 			= "ffmpeg:",
    				alignment 		= 'right',
    				width 			= share 'labelWidth',
    			},


--sidebar-ring: oklch(0.708 0 0);
}

.dark {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.205 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.205 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.922 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.704 0.191 22.216);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.556 0 0);
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: oklch(0.205 0 0);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.269 0 0);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(1 0 0 / 10%);
  --sidebar-ring: oklch(0.556 0 0);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground;
  }
}

@layer base {
  button:not(:disabled),
  [role="button"]:not(:disabled) {
    cursor: pointer;
  }
}
/**
 * Roboto Thin
 */
@font-face {
    font-family: 'Roboto';
    font-weight: 100;
    font-style: normal;
    src: url("./roboto/Roboto-Thin.woff2") format("woff2"),
    url('./roboto/Roboto-Thin.woff') format('woff'),
    url('./roboto/Roboto-Thin.ttf') format('truetype');
}

/**
 * Roboto Light
 */
@font-face {
    font-family: 'Roboto';
    font-weight: 300;
    font-style: normal;
    src: url("./roboto/Roboto-Light.woff2") format("woff2"),
    url('./roboto/Roboto-Light.woff') format('woff'),
    url('./roboto/Roboto-Light.ttf') format('truetype');
}

/**
 * Roboto Regular
 */
@font-face {
    font-family: 'Roboto';
    font-weight: 400;
    font-style: normal;
    src: url("./roboto/Roboto-Regular.woff2") format("woff2"),
    url('./roboto/Roboto-Regular.woff') format('woff'),
    url('./roboto/Roboto-Regular.ttf') format('truetype');
}

/**
 * Roboto Medium
 */
@font-face {
    font-family: 'Roboto';
    font-weight: 500;
    font-style: normal;
    src: url("./roboto/Roboto-Medium.woff2") format("woff2"),
    url('./roboto/Roboto-Medium.


et_cast",
    "return",
    "sizeof",
    "static_assert",
    "static_cast",
    "switch",
    "throw",
    "try",
    "typedef",
    "typeid",
    "using",
    "while",
    "xor",
    "xor_eq",
];

const CPP_ATTRIBUTES: [&str; 25] = [
    "audit",
    "auto",
    "axiom",
    "const",
    "consteval",
    "constexpr",
    "default",
    "explicit",
    "extern",
    "final",
    "friend",
    "inline",
    "mutable",
    "noexcept",
    "override",
    "private",
    "protected",
    "public",
    "register",
    "requires",
    "static",
    "thread_local",
    "typename",
    "virtual",
    "volatile",
];

const CPP_ENTITIES: [&str; 7] = [
    "class",
    "concept",
    "enum",
    "namespace",
    "struct",
    "template",
    "union",
];

const CPP_TYPES: [&str; 19] = [
    "bool",
    "byte",
    "char",
    "char8_t",
    "char16_t",
    "char32_t",
    "double",
    "float",
    "int",
    "long",
    "max_align_t",
    "nullptr_t",
    "ptrdiff_t",
    "short",
    "signed",
    "size_t",
    "unsigned",
    "void",
    "wchar_t",
];

const CPP_VALUES: [&str; 5] = ["NULL", "false", "nullptr", "this", "true"];

const C_CPP_BUILTIN_MACROS: [&str; 7] = [
    "__cplusplus",
    "__STDC_HOSTED__",
    "__FILE__",
    "__LINE__",
    "__DATE__",
    "__TIME__",
    "__STDCPP_DEFAULT_NEW_ALIGNMENT__",
];

const OBJC_KEYWORDS: [&str; 12] = [
    "break", "case", "continue", "default", "do", "else", "for", "goto", "if", "return", "switch",
    "while",
];

const OBJC_ATTRIBUTES: [&str; 20] = [
    "IBAction",
    "IBOutlet",
    "__block",
    "assign",
    "auto",
    "const",
    "copy",
    "enum",
    "extern",
    "inline",
    "nonatomic",
    "readonly",
    "retain",
    "static",
    "strong",
    "struct",
    "typedef",
    "union",
    "volatile",
    "weak",
];

const OBJC_TYPES: [&str; 16] = [
    "BOOL",
    "CGFloat",
    "NSInteger",
    "NSString",
    "NSUInteger",
    "bool",
    "char",
    "float",
    "instancetype",
    "int",
    "long",
    "short",
    "signed",
    "size_t",
    "unsigned",
    "void",
];

const OBJC_VALUES: [&str; 9] = [
    "FALSE", "NO", "NULL", "TRUE", "YES", "id", "nil", "self", "super",
];

const OBJC_DECORATORS: [&str; 12] = [
    "autoreleasepool",
    "catch",
    "class",
    "end",
    "


,size,init,vtab,name,STATUS_PTR))

/* Vtab Initialiser. */
#define astInitSkyAxisVtab(vtab,name) astINVOKE(V,astInitSkyAxisVtab_(vtab,name,STATUS_PTR))
/* Loader. */
#define astLoadSkyAxis(mem,size,vtab,name,channel) \
astINVOKE(O,astLoadSkyAxis_(mem,size,vtab,name,astCheckChannel(channel),STATUS_PTR))
#endif

/* Interfaces to public member functions. */
/* -------------------------------------- */

/* Here we make use of astCheckSkyAxis to validate SkyAxis pointers
   before use. This provides a contextual error report if a pointer to
   the wrong sort of object is supplied. */
#if defined(astCLASS)            /* Protected */

#define astClearAxisAsTime(this) \
astINVOKE(V,astClearAxisAsTime_(astCheckSkyAxis(this),STATUS_PTR))
#define astClearAxisIsLatitude(this) \
astINVOKE(V,astClearAxisIsLatitude_(astCheckSkyAxis(this),STATUS_PTR))
#define astGetAxisAsTime(this) \
astINVOKE(V,astGetAxisAsTime_(astCheckSkyAxis(this),STATUS_PTR))
#define astGetAxisIsLatitude(this) \
astINVOKE(V,astGetAxisIsLatitude_(astCheckSkyAxis(this),STATUS_PTR))
#define astSetAxisAsTime(this,value) \
astINVOKE(V,astSetAxisAsTime_(astCheckSkyAxis(this),value,STATUS_PTR))
#define astSetAxisIsLatitude(this,value) \
astINVOKE(V,astSetAxisIsLatitude_(astCheckSkyAxis(this),value,STATUS_PTR))
#define astTestAxisAsTime(this) \
astINVOKE(V,astTestAxisAsTime_(astCheckSkyAxis(this),STATUS_PTR))
#define astTestAxisIsLatitude(this) \
astINVOKE(V,astTestAxisIsLatitude_(astCheckSkyAxis(this),STATUS_PTR))

#define astClearAxisCentreZero(this) \
astINVOKE(V,astClearAxisCentreZero_(astCheckSkyAxis(this),STATUS_PTR))
#define astGetAxisCentreZero(this) \
astINVOKE(V,astGetAxisCentreZero_(astCheckSkyAxis(this),STATUS_PTR))
#define astSetAxisCentreZero(this,value) \
astINVOKE(V,astSetAxisCentreZero_(astCheckSkyAxis(this),value,STATUS_PTR))
#define astTestAxisCentreZero(this) \
astINVOKE(V,astTestAxisCentreZero_(astCheckSkyAxis(this),STATUS_PTR))

#endif
#endif


重的打击。你在丧钟镇对我们做出了很大的贡献，现在我要你去把这份情报及时交给塞加德，我想他能帮你找到更多能让你大展身手的工作。$b$b沿着这条路向北走出丧钟镇，在进入提瑞斯法林地以后，你很快就会来到一个十字路口，这时向东走，然后一直向前就可以到布瑞尔了，路上有一座炉灰庄园可以帮你确认自己的方向。",
    ["O"] = "把血色十字军文件交给布瑞尔的执行官塞加德。",
    ["T"] = "重要情报",
  },
  [384] = {
    ["D"] = "啤酒烤猪排是我的老主顾们最喜欢的大餐！问题是，为我提供猪排的猎手被国王征募去打仗了。$b$b也许你能帮帮我？如果你可以给我弄六块峭壁野猪肋排，外加一杯酒店里卖的狂想麦酒的话，我就把祖传的啤酒烤猪排的烹饪方法教给你，而且我还可以让你免费品尝我做出来的美食！秘密就在麦酒里！",
    ["O"] = "卡拉诺斯的拉格纳·雷酒需要6块峭壁野猪肋排和1杯狂想麦酒。",
    ["T"] = "啤酒烤猪排",
  },
  [385] = {
    ["D"] = "很多猎人到洛克莫丹来都是为了捕猎这里的鳄鱼。总有一些商人专门寻找这种鳄鱼皮，用它们来制作衣物或是护甲，还有些人则喜欢品尝鳄鱼肉。$b$b我们一直在进行这种贸易，但交易量并不是很大，因为鳄鱼很凶猛，而且它们一般都盘踞在洛克湖中的小岛上。嘿，别被我的话给吓倒了，和鳄鱼较量一番对你来说也是一种历练。$b$b你看能不能……",
    ["O"] = "收集5块鳄鱼肉和6张鳄鱼皮，把它们交给旅行者营地里的马雷克·铁心。",
    ["T"] = "捕猎鳄鱼",
  },
  [386] = {
    ["D"] = "可怕的塔格尔是加塞尔佐格手下的一个高级杀手。他杀人的手法十分残忍，即使以兽人的标准来看也是残暴无比。那些为了保卫国家而奋勇作战的战士们落在他手里都会被他


IsDefault: false,
									},
									{
										Codec: &codecs.MPEG4Audio{
											Config: mpeg4audio.AudioSpecificConfig{
												Type:         2,
												SampleRate:   44100,
												ChannelCount: 2,
											},
										},
										ClockRate: audioClockRate,
										Name:      "German",
										Language:  "de",
										IsDefault: true,
									},
								}, tracks)
							}

							c.OnDataH26x(tracks[0], func(pts int64, dts int64, au [][]byte) {
								switch videoCount {
								case 0:
									require.Equal(t, int64(0), dts)
									require.Equal(t, int64(2*90000), pts)
									require.Equal(t, [][]byte{
										{7, 1, 2, 3},
										{8},
										{5},
									}, au)
									ntp, ok := c.AbsoluteTime(tracks[0])
									require.Equal(t, true, ok)
									require.Equal(t, time.Date(2015, time.February, 5, 1, 2, 2, 0, time.UTC), ntp)

								case 1:
									require.Equal(t, int64(3000), dts)
									require.Equal(t, int64(2*90000+3000), pts)
									require.Equal(t, [][]byte{{1, 4, 5, 6}}, au)
									ntp, ok := c.AbsoluteTime(tracks[0])
									require.Equal(t, true, ok)
									require.Equal(t, time.Date(2015, time.February, 5, 1, 2, 2, 33333333, time.UTC), ntp)

								case 2:
									require.Equal(t, int64(6000), dts)
									require.Equal(t, int64(6000), pts)
									require.Equal(t, [][]byte{{4}}, au)
									ntp, ok := c.AbsoluteTime(tracks[0])
									require.Equal(t, true, ok)
									require.Equal(t, time.Date(2015, time.February, 5, 1, 2, 2, 66666666, time.UTC), ntp)
									close(videoRecv)
								}
								videoCount++
							})

							c.OnDataMPEG4Audio(tracks[1], func(pts int64, aus [][]byte) { //nolint:dupl
								switch audioCount {
								case 0:
									require.Equal(t, int64(0), pts)
									require.Equal(t, [][]byte{{1, 2, 3, 4}}, aus)
									ntp, ok := c.AbsoluteTime(tracks[1])
									require.Equal(t, true, ok)
									require.Equal(t, time.Date(2015, time.February, 5, 1, 2, 2, 0, time.UTC), ntp)

								case 1:
									require.Equal(t, int64(0.0333336*float64(tracks[1].ClockRate)), pts)
									require.Equal(t, [][]byte{{5, 6, 7, 8}}, aus)
									ntp, ok := c.AbsoluteTime(tracks[1])
									require.Equal(t, true, ok)
									require.Equal(t, time.Date(2015, time.February, 5, 1, 2, 2, 33333333, time.UTC), ntp)
									close(audioRecv)
								}
								audioCount++
							})

							if content == "video+multiaudio" {
								c.OnDataMPEG4Audio(tracks[2], func(pts int64, aus [][]byte) { //nolint:dupl
									switch audio2Count {
									case 0:
										require.Equal(t, int64(0), pts)
										require.Equal(t, [][]byte{{4, 3, 2, 1}}, aus)
										ntp, ok := c.AbsoluteTime(tracks[2])
										require.Equal(t, true, ok)
										require.Equal(t, time.Date(2015, time.February, 5, 1, 2, 2, 0, time.UTC), ntp)

									case 1:
										require.Equal(t, int64(0.0333336*float64(tracks[1].ClockRate)), pts)
										require.Equal(t, [][]byte{{8, 7


d) {
                return;
            }
        }
    }

    /* Load the int value from the given index in intArray */

    /* BalloonEnginePlugin>>#loadPointIntAt:from: */
    private static int loadPointIntAtfrom(final int index, final int[] intArray) {
        return intArray[index];
    }

    /* Load the short value from the given index in shortArray */

    /* BalloonEnginePlugin>>#loadPointShortAt:from: */
    private static short loadPointShortAtfrom(final int index, final int[] shortArray) {
        final int value = shortArray[index / 2];
        if (index % 2 == 0) {
            return (short) value;
        } else {
            return (short) (value >> 16);
        }
    }

    /* Load the contents of pointOop into pointArray */

    /* BalloonEngineBase>>#loadPoint:from: */
    private void loadPointfrom(final int pointIndex, final PointersObject pointOop) {
        assert SqueakImageContext.getSlow().isPoint(pointOop) : "Not a point (VMMaker code lets primitive fail)";
        pointSetX(pointIndex, toInt(fetchObjectofObject(0, pointOop)));
        pointSetY(pointIndex, toInt(fetchObjectofObject(1, pointOop)));
    }

    /* BalloonEnginePlugin>>#loadPolygon:nPoints:fill:lineWidth:lineFill:pointsShort: */
    private void loadPolygonnPointsfilllineWidthlineFillpointsShort(final int[] points, final int nPoints, final int fillIndex, final int lineWidth, final int lineFill, final boolean isShort) {
        int x0;
        int x1;
        int y0;
        int y1;

        if (isShort) {
            x0 = loadPointShortAtfrom(0, points);
            y0 = loadPointShortAtfrom(1, points);
        } else {
            x0 = loadPointIntAtfrom(0, points);
            y0 = loadPointIntAtfrom(1, points);
        }
        for (int i = 1; i < nPoints; i++) {
            if (isShort) {
                x1 = loadPointShortAtfrom(i * 2, points);
                y1 = loadPointShortAtfrom(i * 2 + 1, points);
            } else {
                x1 = loadPointIntAtfrom(i * 2, points);
                y1 = loadPointIntAtfrom(i * 2 + 1, points);
            }
            point1SetX(x0);
            point1SetY(y0);
            point2SetX(x1);
            point2SetY(y1);
            transformPoints(2);
            loadWideLinefromtolineFillleftFillrightFill(lineWidth, GW_POINT_1, GW_POINT_2, lineFill, fillIndex, 0);
            if (engineStopped) {
                return;
            }
            x0 = x1;
            y0 = y1;
        }
    }

    /* Load a rectangle currently defined by point1-point4 */

    /* BalloonEnginePlugin>>#loadRectangle:lineFill:leftFill:rightFill: */
    private void loadRectanglelineFillleftFillrightFill(final int lineWidth, final int lineFill, final int leftFill, final int rightFill) {
        loadWideLinefromtolineFillleftFillrightFill(lineWidth, GW_POINT_1, GW_POINT_2, lineFill, leftFill, rightFill);
        loadWideLinefromtolineFillleftFillrightFill(lineWidth, GW_POINT_2, GW_POINT_3, lineFill, leftFill, rightFill);
        loadWideLinefromtolineFillleftFillrightFill(lineWidth, GW_POINT_3, GW_POINT_4, lineFill, leftFill, rightFill);
        loadWideLinefromtolineFillleftFillrightFill(lineWidth, GW_


;
                font-weight: bolder;
                margin-left: 20px;
                margin-top: 10px;
                text-align: left
              }

              ._p13n-desktop-sims-fbt_style_asin-row__3PozI {
                display: block
              }

              ._p13n-desktop-sims-fbt_style_asin-detail-row__T7Jm0 {
                margin-bottom: -12px
              }

              ._p13n-desktop-sims-fbt_style_image__11f2t {
                height: 90px;
                width: 90px
              }

              ._p13n-desktop-sims-fbt_style_feedback-switch__2zE08 {
                cursor: pointer;
                display: inline-block;
                height: 50px;
                margin-top: 5px;
                vertical-align: top;
                width: 50px
              }

              ._p13n-desktop-sims-fbt_maskStyle_maskStyling__1IlBq {
                background-color: #000;
                height: 100%;
                left: 0;
                opacity: .04;
                position: absolute;
                top: 0;
                width: 100%
              }

              ._p13n-desktop-sims-fbt_maskStyle_positionRelativeCss__ZwMqj {
                padding: 6px;
                position: relative
              }

              ._p13n-desktop-sims-fbt_maskStyle_noop__3Xbw5 {
                -webkit-perspective: none;
                perspective: none
              }

              ._p13n-desktop-sims-fbt_price_p13n-sc-price__3mJ9Z {
                word-wrap: normal
              }

              ._p13n-desktop-sims-fbt_prime_p13n-prime-badge__GVM4h {
                position: relative;
                top: 2px
              }

              input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button {
                -webkit-appearance: none;
                margin: 0
              }

              input[type=number] {
                -moz-appearance: textfield
              }

              ._p13n-desktop-sims-fbt_climatePledgeFriendlyBadgeStyles_p13n-sc-cpf-badge__dMVLV {
                color: #168342 !important;
                text-decoration: none !important
              }

                ._p13n-desktop-sims-fbt_climatePledgeFriendlyBadgeStyles_p13n-sc-cpf-badge__dMVLV i {
                  margin-top: 0;
                  vertical-align: middle
                }

              ._p13n-desktop-sims-fbt_climatePledgeFriendlyBadgeStyles_p13n-sc-cpf-cert-row__3PW-5 {
                -webkit-box-align: center;
                -ms-flex-align: center;
                -webkit-box-orient: horizontal;
                -webkit-box-direction: normal;
                align-items: center;
                display: -webkit-box;
                display: -ms-flexbox;
                display: flex;
                -ms-flex-direction: row;
                flex-direction: row
              }

              ._p13n-desktop-sims-fbt_climatePledgeFriendlyBadgeStyles_p13n-sc-cpf-cert-logo__2T8hY {
                margin-right: 18px;
                min-width: 45px
              }

              ._p13n-desktop-sims-fbt_climatePledgeFriendlyBadgeStyles_p13n-sc-cpf-cert-column__1r84G {
                -webkit-box-orient: vertical;
                -webkit-box-direction: normal;
                display: -webkit-


TestExpressionElement2

public TestExpressionElement2()

Method Detail

suite

public static junit.framework.Test suite()

testRealExpressionElement

public void testRealExpressionElement()

testRealSimpleExpressionElement

public void testRealSimpleExpressionElement()

testSignedExpressionExpressionElement

public void testSignedExpressionExpressionElement()

testUnaryOperatorExpressionElement

public void testUnaryOperatorExpressionElement()

testParenthesisExpressionElement

public void testParenthesisExpressionElement()

testSimpleExpressionExpressionElement

public void testSimpleExpressionExpressionElement()

      Overview
      Package
    Class
      <A H


boundary_1_post");

        region = activeRegions.get(genomeLocParser.createGenomeLoc("1", 2000, 2999));
        verifyReadMapping(region, "boundary_equal", "boundary_unequal", "boundary_1_pre", "boundary_1_post");

        region = activeRegions.get(genomeLocParser.createGenomeLoc("1", 10000, 20000));
        verifyReadMapping(region, "shard_boundary_1_pre", "shard_boundary_1_post", "shard_boundary_equal");

        region = activeRegions.get(genomeLocParser.createGenomeLoc("20", 10000, 10100));
        verifyReadMapping(region, "simple20");
    }

    @Test(enabled = true && ! DEBUG, dataProvider = "TraversalEngineProvider")
    public void testExtendedReadMapping(TraverseActiveRegions t) {
        DummyActiveRegionWalker walker = new DummyActiveRegionWalker(new GenomeLocSortedSet(genomeLocParser, intervals),
                EnumSet.of(ActiveRegionReadState.PRIMARY, ActiveRegionReadState.NONPRIMARY, ActiveRegionReadState.EXTENDED),
                true);

        // Contract: Each read has the Primary state in a single region (or none)
        // This is the region of maximum overlap for the read (earlier if tied)

        // Contract: Each read has the Non-Primary state in all other regions it overlaps
        // Contract: Each read has the Extended state in regions where it only overlaps if the region is extended

        // simple: Primary in 1:1-999
        // overlap_equal: Primary in 1:1-999
        // overlap_unequal: Primary in 1:1-999
        // boundary_equal: Non-Primary in 1:1000-1999, Primary in 1:2000-2999
        // boundary_unequal: Primary in 1:1000-1999, Non-Primary in 1:2000-2999
        // boundary_1_pre: Primary in 1:1000-1999, Non-Primary in 1:2000-2999
        // boundary_1_post: Non-Primary in 1:1000-1999, Primary in 1:2000-2999
        // extended_and_np: Non-Primary in 1:1-999, Primary in 1:1000-1999, Extended in 1:2000-2999
        // outside_intervals: none
        // shard_boundary_1_pre: Primary in 1:14908-16384, Non-Primary in 1:16385-16927
        // shard_boundary_1_post: Non-Primary in 1:14908-16384, Primary in 1:16385-16927
        // shard_boundary_equal: Non-Primary in 1:14908-16384, Primary in 1:16385-16927
        // simple20: Primary in 20:10000-10100

        Map<GenomeLoc, ActiveRegion> activeRegions = getActiveRegions(t, walker, intervals);
        ActiveRegion region;

        region = activeRegions.get(genomeLocParser.createGenomeLoc("1", 1, 999));
        verifyReadMapping(region, "simple", "overlap_equal", "overlap_unequal", "extended_and_np");

        region = activeRegions.get(genomeLocParser.createGenomeLoc("1", 1000, 1999));
        verifyReadMapping(region, "boundary_equal", "boundary_unequal", "extended_and_np", "boundary_1_pre", "boundary_1_post");

        region = activeRegions.get(genomeLocParser.createGenomeLoc("1", 2000, 2999));
        verifyReadMapping(region, "boundary_equal", "boundary_unequal", "extended_and_np", "boundary_1_pre", "boundary_1_post");

        region = activeRegions.get(genomeLocParser.createGenomeLoc("1", 10000, 20000));
        verifyReadMapping(region, "shard_boundary_1_pre", "shard_boundary_1_post", "shard_boundary_equal");

        region = activeRegions.get(genomeLocParser.createGenomeLoc("20", 10000, 10100));
        verifyReadMapping(region, "simple20");
    }

    @Test(enabled = true && ! DEBUG, dataProvider = "TraversalEngineProvider")
    public void testUnmappedReads(TraverseActiveRegions t) {
        // TODO
    }

    private void verif


 (16bit)](#hardware-sin-table) |
|   0xD3    |  -  |  o  | [ハードウェア cos テーブル (16bit)](#hardware-cos-table) |
|   0xDA    |  o  |  o  | [データのセーブ・ロード](#save-data) |
|   0xDB    |  o  |  o  | [拡張 RAM のセーブ・ロード](#extra-save-data) |
|   0xDC    |  o  |  o  | [拡張 RAM の入出力](#extra-ram-bank-io) |
|   0xE0    |  -  |  o  | BGM を[再生](#play-bgm) |
|   0xE1    |  -  |  o  | BGM を[中断](#pause-bgm)、[再開](#resume-bgm)、[フェードアウト](#fadeout-bgm) |
|   0xF0    |  -  |  o  | 効果音を再生 |
|   0xF1    |  -  |  o  | 効果音を停止 |
|   0xF2    |  -  |  o  | 効果音が再生中かチェック |

#### (User Definition I/O)

ポート番号 0x00 〜 0x7F は、ネイティブプログラムとの入出力に使用できるユーザ定義 I/O として利用できます。

例えば、Steam で UGC (リプレイデータなど) のダウンロード非同期リクエスト（out）をして結果のポーリング（in）をしたり、アチーブメントのアンロックをリクエストするなど、ネイティブコードで処理を実装しなければならない処理での利用を想定しています。

本機能を利用するには、`VGS0` クラス（エミュレータ）のインスタンスのメンバ変数 `userInCallback` または `userOutCallback` を設定する必要があります。

```c++
VGS0 vgs0;
vgs0.userInCallback = [](VGS0* vgs0, uint8_t port) -> uint8_t {
  return my_input_proc(port);
};

vgs0.userOutCallback = [](VGS0* vgs0, uint8_t port, uint8_t value) {
  my_output_proc(proc, value);
};
```

#### (JoyPad)

```z80
IN A, (0xA0)
```

| Bit-7 | Bit-6 | Bit-5 | Bit-4 | Bit-3 | Bit-2 | Bit-1 | Bit-0 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| `Up`  | `Down` | `Left` | `Right` | `Start` | `Select` | `A` | `B` |

- 0: 入力がある状態
- 1: 入力がない状態

#### (Bank Switch)

```z80
# Read current bank of ROM Bank 0
IN A, (0xB0)

# Switch ROM Bank 1 to No.17
LD A, 0x11
OUT (0xB1), A
```

#### (Extra RAM Bank)

ポート番号 0xB4 を OUT することで、Extra RAM Bank（0xA000〜0xBFFF = [Character Pattern Table](#character-pat


Block &MBB : mf) {
    processBasicBlock(&MBB);
  }

  return false;
}
//===- PreISelIntrinsicLowering.cpp - Pre-ISel intrinsic lowering pass ----===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This pass implements IR lowering for the llvm.load.relative and llvm.objc.*
// intrinsics.
//
//===----------------------------------------------------------------------===//

#include "llvm/CodeGen/PreISelIntrinsicLowering.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/User.h"
#include "llvm/Pass.h"
#include "llvm/Support/Casting.h"

using namespace llvm;

static bool lowerLoadRelative(Function &F) {
  if (F.use_empty())
    return false;

  bool Changed = false;
  Type *Int32Ty = Type::getInt32Ty(F.getContext());
  Type *Int32PtrTy = Int32Ty->getPointerTo();
  Type *Int8Ty = Type::getInt8Ty(F.getContext());

  for (auto I = F.use_begin(), E = F.use_end(); I != E;) {
    auto CI = dyn_cast<CallInst>(I->getUser());
    ++I;
    if (!CI || CI->getCalledValue() != &F)
      continue;

    IRBuilder<> B(CI);
    Value *OffsetPtr =
        B.CreateGEP(Int8Ty, CI->getArgOperand(0), CI->getArgOperand(1));
    Value *OffsetPtrI32 = B.CreateBitCast(OffsetPtr, Int32PtrTy);
    Value *OffsetI32 = B.CreateAlignedLoad(Int32Ty, OffsetPtrI32, 4);

    Value *ResultPtr = B.CreateGEP(Int8Ty, CI->getArgOperand(0), OffsetI32);

    CI->replaceAllUsesWith(ResultPtr);
    CI->eraseFromParent();
    Changed = true;
  }

  return Changed;
}

static bool lowerObjCCall(Function &F, const char *NewFn,
                          bool setNonLazyBind = false) {
  if (F.use_empty())
    return false;

  // If we haven't already looked up this function, check to see if the
  // program already contains a function with this name.
  Module *M = F.getParent();
  FunctionCallee FCache = M->getOrInsertFunction(NewFn, F.getFunctionType());

  if (Function *Fn = dyn_cast<Function>(FCache.getCallee())) {
    Fn->setLinkage(F.getLinkage());
    if (setNonLazyBind && !Fn->isWeakForLinker()) {
      // If we have Native ARC, set nonlazybind attribute for these APIs for
      // performance.
      Fn->addFnAttr(Attribute::NonLazyBind);
    }
  }

  for (auto I = F.use_begin(), E = F.use_end(); I != E;) {
    auto *CI = dyn_cast<CallInst>(I->getUser());
    assert(CI->getCalledFunction() && "Cannot lower an indirect call!");
    ++I;

    IRBuilder<> Builder(CI->getParent(), CI->getIterator());
    SmallVector<Value *, 8> Args(CI->arg_begin(), CI->arg_end());
    CallInst *NewCI = Builder.CreateCall(FCache, Args);
    NewCI->setName(CI->getName());
    NewCI->setTailCallKind(C


//
// SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
//
// SPDX-License-Identifier: Apache-2.0
//
#pragma once

#ifdef __cplusplus
extern "C" {
#endif  // __cplusplus

#include <stddef.h>
#include <stdint.h>

#include "kai/kai_common.h"

/// Gets m step value.
///
/// The starting row index must be divisible by `m_step`.
///
/// @param[in] mr Number of rows to be interleaved.
///
/// @return The m step value.
size_t kai_get_m_step_lhs_quant_pack_bf16p8x4_f32_neon(size_t mr);

/// Gets the offset in bytes to the data element in the LHS buffer.
///
/// @param[in] m_idx Row index.
/// @param[in] lhs_stride Row stride in bytes.
///
/// @return The offset in bytes to the data element.
size_t kai_get_lhs_offset_lhs_quant_pack_bf16p8x4_f32_neon(size_t m_idx, size_t lhs_stride);

/// Gets the offset in bytes to the data element in the packed LHS buffer.
///
/// @param[in] m_idx Row index in the unpacked LHS matrix.
/// @param[in] k Number of columns in the unpacked LHS matrix.
/// @param[in] mr Number of rows to be interleaved.
/// @param[in] kr Number of columns to be interleaved.
/// @param[in] sr Unused. Must be 1.
///
/// @return The offset in bytes to the data element.
size_t kai_get_lhs_packed_offset_lhs_quant_pack_bf16p8x4_f32_neon(
    size_t m_idx, size_t k, size_t mr, size_t kr, size_t sr);

/// Gets the size in bytes of the packed LHS buffer.
///
/// @param[in] m Number of rows in the unpacked LHS matrix.
/// @param[in] k Number of columns in the unpacked LHS matrix.
/// @param[in] mr Number of rows to be interleaved.
/// @param[in] kr Number of columns to be interleaved.
/// @param[in] sr Unused. Must be 1.
///
/// @return The size in bytes of the packed LHS buffer.
size_t kai_get_lhs_packed_size_lhs_quant_pack_bf16p8x4_f32_neon(size_t m, size_t k, size_t mr, size_t kr, size_t sr);

/// Runs the LHS packing function for matrix multiplication.
///
/// The pointer of each buffers (LHS and packed LHS) needs to be added with offset
/// calculated using the following functions:
///
///   * LHS: @ref kai_get_lhs_offset_lhs_quant_pack_bf16p8x4_f32_neon.
///   * Packed LHS: @ref kai_get_lhs_packed_offset_lhs_quant_pack_bf16p8x4_f32_neon.
///
/// @param[in] m Number of rows of the unpacked LHS matrix.
/// @param[in] k Common dimension between the LHS and RHS matrix.
/// @param[in] mr Block size in M dimension. It must be 8.
/// @param[in] kr Block size in K dimension. It must be 4.
/// @param[in] sr Number of kr splits. It must be 1.
/// @param[in] m_idx_start Unused. Must be 0.
/// @param[in] lhs LHS matrix data buffer.
/// @param[in] lhs_stride Row stride in bytes of the LHS matrix.
/// @param[out] lhs_packed Packed LHS matrix.
void kai_run_lhs_quant_pack_bf16p8x4_f32_neon(
    size_t m, size_t k, size_t mr, size_t kr, size_t sr, size_t m_idx_start, const void* lhs, size_t lhs_stride,
    void* lhs_packed);

#ifdef __cplusplus
}  // extern "C"
#endif  // __cplusplus


    }
}

RGBAImage::RGBAImage(const XPM &xpm)
{
#if QT_VERSION >= 0x040000
    qim = new QImage(xpm.Pixmap().toImage());
#else
    qim = new QImage(xpm.Pixmap().convertToImage());
#endif

    width = qim->width();
    height = qim->height();
}

RGBAImage::~RGBAImage()
{
    delete qim;
}

const unsigned char *RGBAImage::Pixels() const
{
    return reinterpret_cast<const unsigned char *>(qim);
}

void RGBAImage::SetPixel(int x, int y, ColourDesired colour, int alpha)
{
    QRgb rgba = qRgba(colour.GetRed(), colour.GetGreen(), colour.GetBlue(),
            alpha);

    uint index_or_rgb;

#if QT_VERSION >= 0x040000
    switch (qim->format())
    {
    case QImage::Format_RGB32:
    case QImage::Format_ARGB32:
        index_or_rgb = rgba;
        break;

    case QImage::Format_ARGB32_Premultiplied:
        {
            uint a = alpha;
#if QT_POINTER_SIZE == 8
            quint64 t = (((quint64(rgba)) | ((quint64(rgba)) << 24)) & 0x00ff00ff00ff00ff) * a;
            t = (t + ((t >> 8) & 0xff00ff00ff00ff) + 0x80008000800080) >> 8;
            t &= 0x000000ff00ff00ff;
            index_or_rgb = (uint(t)) | (uint(t >> 24)) | (a << 24);
#else
            uint t = (rgba & 0xff00ff) * a;
            t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8;
            t &= 0xff00ff;

            rgba = ((rgba >> 8) & 0xff) * a;
            rgba = (rgba + ((rgba >> 8) & 0xff) + 0x80);
            rgba &= 0xff00;
            index_or_rgb = rgba | t | (a << 24);
#endif
            break;
        }

    default:
#if QT_VERSION >= 0x040600
        index_or_rgb = qim->colorCount();
#else
        index_or_rgb = qim->colorTable().count();
#endif

        qim->setColor(index_or_rgb, rgba);
    }
#else
    if (qim->depth() == 32)
    {
        index_or_rgb = rgba;
    }
    else
    {
        index_or_rgb = qim->numColors();
        qim->setNumColors(index_or_rgb + 1);

        qim->setColor(index_or_rgb, rgba);
    }
#endif

    qim->setPixel(x, y, index_or_rgb);
}

#else

namespace {

const char *NextField(const char *s) {
	// In case there are leading spaces in the string
	while (*s == ' ') {
		s++;
	}
	while (*s && *s != ' ') {
		s++;
	}
	while (*s == ' ') {
		s++;
	}
	return s;
}

// Data lines in XPM can be terminated either with NUL or "
size_t MeasureLength(const char *s) {
	size_t i = 0;
	while (s[i] && (s[i] != '\"'))
		i++;
	return i;
}

unsigned int ValueOfHex(const char ch) noexcept {
	if (ch >= '0' && ch <= '9')
		return ch - '0';
	else if (ch >= 'A' && ch <= 'F')
		return ch - 'A' + 10;
	else if (ch >= 'a' && ch <= 'f')
		return ch - 'a' + 10;
	else
		return 0;
}

ColourDesi


 ID
  void cancelNotification(int notificationId) async {
    await _flutterLocalNotificationsPlugin.cancel(notificationId);
  }
}
import 'dart:io';

class PemFilePaths {
  const PemFilePaths({
    this.ca,
    this.certificate,
    this.key,
    this.serverCert,
  });

  factory PemFilePaths.fromTaskrc(Map taskrc) {
    return PemFilePaths(
      ca: taskrc['taskd.ca'],
      certificate: taskrc['taskd.certificate'],
      key: taskrc['taskd.key'],
    );
  }

  final String? ca;
  final String? certificate;
  final String? key;
  final String? serverCert;

  SecurityContext securityContext() {
    var context = (ca != null && File(ca!).existsSync())
        ? (SecurityContext()..setTrustedCertificates(ca!))
        : SecurityContext(withTrustedRoots: true);
    if (certificate != null && File(certificate!).existsSync()) {
      context.useCertificateChain(certificate!);
    }
    if (key != null && File(key!).existsSync()) {
      context.usePrivateKey(key!);
    }
    return context;
  }

  bool savedServerCertificateMatches(X509Certificate badServerCert) {
    if (serverCert != null) {
      if (File(serverCert!).existsSync()) {
        return File(serverCert!).readAsStringSync() == badServerCert.pem;
      }
    }
    return false;
  }

  Map get map => {
        'taskd.ca': ca,
        'taskd.certificate': certificate,
        'taskd.key': key,
        'server.cert': serverCert,
      }..removeWhere((_, value) => value == null);
}
import 'package:flutter/material.dart';

class TaskwarriorColorTheme extends ThemeExtension<TaskwarriorColorTheme>{
	final Color? dialogBackgroundColor;
	final Color? primaryBackgroundColor;
	final Color? secondaryBackgroundColor;
	final Color? primaryTextColor;
	final Color? secondaryTextColor;
	final Color? primaryDisabledTextColor;
	final Color? dividerColor;
	final Color? purpleShade;
	final Color? greyShade;
	final Color? dimCol;
	final IconData? icons;

	const TaskwarriorColorTheme({
		required this.dialogBackgroundColor,
		required this.primaryBackgroundColor,
		required this.primaryDisabledTextColor,
		required this.primaryTextColor,
		required this.secondaryBackgroundColor,
		required this.secondaryTextColor,
		required this.dividerColor,
		required this.purpleShade,
		required this.greyShade,
		required this.icons,
		required this.dimCol
	});

	@override
	ThemeExtension<TaskwarriorColorTheme> copyWith({
		Color? dialogBackgroundColor,
		Color? primaryBackgroundColor,
		Color? secondaryBackgroundColor,
		Color? primaryTextColor,
		Color? secondaryTextColor,
		Color? primaryDisabledTextColor,
		Color? dividerColor,
		Color? greyShade,
		Color? dimCol,
		IconData? icons,
	}) {
		return TaskwarriorColorTheme(
			dialogBackgroundColor: dialogBackgroundColor ?? dialogBackgroundColor,
			primaryBackgroundColor: primaryBackgroundColor ?? primaryBackgroundColor,
			primaryDisabledTextColor: primaryDisabledTextColor ?? primaryDisabledTextColor,
			primaryTextColor: primaryTextColor ?? prim


ecimal(1));
        checkFieldsCommute(BigInteger.ONE, Integer.MAX_VALUE, DECIMAL, decimal(Integer.MAX_VALUE + 1L));
        checkFieldsCommute(BigInteger.ONE.negate(), Integer.MIN_VALUE, DECIMAL, decimal(Integer.MIN_VALUE - 1L));

        checkFieldsCommute(BigInteger.ZERO, 1L, DECIMAL, decimal(1));
        checkFieldsCommute(BigInteger.ONE, Long.MAX_VALUE, DECIMAL, decimal(Long.MAX_VALUE).add(decimal(1)));
        checkFieldsCommute(BigInteger.ONE.negate(), Long.MIN_VALUE, DECIMAL, decimal(Long.MIN_VALUE).add(decimal(-1)));

        checkFieldsCommute(BigInteger.ZERO, BigInteger.ONE, DECIMAL, decimal(1));
        checkFieldsCommute(BigInteger.ZERO, decimal("1.1"), DECIMAL, decimal("1.1"));
        checkFieldsCommute(BigInteger.ZERO, 1f, REAL, 1f);
        checkFieldsCommute(BigInteger.ZERO, 1d, DOUBLE, 1d);

        // Parameters
        putAndCheckFailure(BigInteger.ZERO, sql("this", "?"), DATA_EXCEPTION, parameterError(0, DECIMAL, VARCHAR), CHAR_VAL);
        putAndCheckFailure(BigInteger.ZERO, sql("this", "?"), DATA_EXCEPTION, parameterError(0, DECIMAL, VARCHAR), STRING_VAL);
        putAndCheckFailure(BigInteger.ZERO, sql("this", "?"), DATA_EXCEPTION, parameterError(0, DECIMAL, BOOLEAN), BOOLEAN_VAL);
        putAndCheckValue(BigInteger.ZERO, sql("this", "?"), DECIMAL, decimal(1), (byte) 1);
        putAndCheckValue(BigInteger.ZERO, sql("this", "?"), DECIMAL, decimal(1), (short) 1);
        putAndCheckValue(BigInteger.ZERO, sql("this", "?"), DECIMAL, decimal(1), 1);
        putAndCheckValue(BigInteger.ZERO, sql("this", "?"), DECIMAL, decimal(1), 1L);
        putAndCheckValue(BigInteger.ZERO, sql("this", "?"), DECIMAL, decimal(1), BigInteger.ONE);
        putAndCheckValue(BigInteger.ZERO, sql("this", "?"), DECIMAL, decimal("1.1"), decimal("1.1"));
        putAndCheckFailure(BigInteger.ZERO, sql("this", "?"), DATA_EXCEPTION, parameterError(0, DECIMAL, REAL), FLOAT_VAL);
        putAndCheckFailure(BigInteger.ZERO, sql("this", "?"), DATA_EXCEPTION, parameterError(0, DECIMAL, DOUBLE), DOUBLE_VAL);
        putAndCheckFailure(BigInteger.ZERO, sql("this", "?"), DATA_EXCEPTION, parameterError(0, DECIMAL, DATE), LOCAL_DATE_VAL);
        putAndCheckFailure(BigInteger.ZERO, sql("this", "?"), DATA_EXCEPTION, parameterError(0, DECIMAL, TIME), LOCAL_TIME_VAL);
        putAndCheckFailure(BigInteger.ZERO, sql("this", "?"), DATA_EXCEPTION, parameterError(0, DECIMAL, TIMESTAMP), LOCAL_DATE_TIME_VAL);
        putAndCheckFailure(BigInteger.ZERO, sql("this", "?"), DATA_EXCEPTION, parameterError(0, DECIMAL, TIMESTAMP_WITH_TIME_ZONE), OFFSET_DATE_TIME_VAL);
        putAndCheckFailure(BigInteger.ZERO, sql("this", "?"), DATA_EXCEPTION, parameterError(0, DECIMAL, OBJECT), OBJECT_VAL);
    }

    @Test
    public void testDecimal_BigDecimal() {
        // NULL
        putAndCheckValue(BigDecimal.ZERO, sql("this", "null"), DECIMAL, null);
        putAndCheckValue(BigDecimal.ZERO, sql("null", "this"), DECIMAL, null);


   * 截取字串
   * 类似 Javascript 的 substr
   * @param str
   * @param off 起始, 为负则从后往前算
   * @param len 长度, 非负总是返回空串
   * @return
   */
  public static String substr(String str, int off, int len) {
      if (off < 0) {
          off = off + str.length();
      if (off < 0) {
          off = 0;
      }}
      if (len > 0) {
          len = len + off;
      } else {
          return "";
      }
      return str.substring(off, len);
  }

  /**
   * 截取字串
   * 类似 Javascript 的 substr
   * @param str
   * @param off 起始, 为负则从后往前算
   * @return
   */
  public static String substr(String str, int off) {
      if (off < 0) {
          off = off + str.length();
      if (off < 0) {
          off = 0;
      }}
      return str.substring(off);
  }

  /**
   * 拆分字串
   * @param str 待拆字串
   * @param sep 间隔符号
   * @param len 间隔长度
   * @return
   */
  public static String split(String str, String sep, int len) {
      int l = str.length( );
      int p = l / len;
      int q = p * len;
      int i = 0x0;
      int j = len;
      StringBuilder path = new StringBuilder(l + p);
      for ( ; i < q ; i += len , j += len ) {
          path.append( str.substring(i,j) )
              .append( sep );
      }   path.append( str );
      return path.toString();
  }

  /**
   * 拆分文件名为路径, 按间隔长度拆分
   * 防止单个目录下文件过多而无法存放
   * 分割符总是 /, 规避不同系统的困扰
   * @param str 待拆名称
   * @param len 间隔长度
   * @return
   */
  public static String splitPath(String str, int len) {
      return split(str, "/", len);
  }

  /**
   * 拆分文件名为路径, 按三个三个拆分
   * 防止单个目录下文件过多而无法存放
   * 分割符总是 /, 规避不同系统的困扰
   * @param str 待拆名称
   * @return
   */
  public static String splitPath(String str) {
      // 不用 File.separator, 规避 Windows 下造成困扰
      return split(str, "/", 0x3);
  }

  //** 清理 **/

  /**
   * 清理首尾空白(含全角)
   * @deprecated Java 11 开始内置 strip
   * @param str
   * @return
   */
  public static String strip(String str)
  {
    Pattern pat;
    pat = Pattern.compile("(^[\\s\\h\\v]+|[\\s\\h\\v]+$)");
    str = pat.matcher(str).replaceAll(  ""  );
    return  str;
  }

  /**
   * 统一全部换行(\r\n)
   * @param str
   * @return
   */
  public static String unifyEnds(String str)
  {
    Pattern pat;
    pat = Pattern.compile("(\\r\\n|\\n|\\r)");
    str = pat.matcher(str).replaceAll("\r\n");
    return  str;
  }

  /**
   * 清理全部换行
   * @param str
   * @return
   */
  public static String stripEnds(String str)
  {
    Pattern pat;
    pat = Pattern.compile("(\\r\\n|\\n|\\r)");
    str = pat.matcher(str).replaceAll(  ""  );
    return  str;
  }

  /**
   * 清理全部空行
   * @param str
   * @return
   */
  public static String stripGaps(String str)
  {
    Pattern pat;
    pat = Pattern.compile("(\\r\\n


ty is spawned out of bounds.
        let spawn_event_rid = self
            .spawn_event_rid
            .as_mut()
            .expect("Expected `spawn_event_rid` field to be set.");

        let map_boundary_events = spawn_ec
            .read(spawn_event_rid)
            .filter_map(|ev| {
                let entity = ev.entity_spawned;
                let position = positions.get(entity);

                position
                    .and_then(|position| Self::detect_enter_exit(map_margins, entity, *position))
            })
            .collect::<Vec<MapBoundaryEvent>>();
        map_boundary_ec.iter_write(map_boundary_events);
    }

    fn setup(&mut self, world: &mut World) {
        Self::SystemData::setup(world);

        self.spawn_event_rid = Some(
            world
                .fetch_mut::<EventChannel<SpawnEvent>>()
                .register_reader(),
        );
    }
}
use std::fs::File;
use std::io::{self, BufRead};
use std::path::Path;
use std::convert::TryInto;

static mut line_no : u32 = 0;
static mut total_col : u32 = 0;

fn main() {

     let mut ans = 0;
    // File input must exist in current path before this produces output

    if let Ok(lines) = read_lines("./input") {

    	let tree_vec: Vec<u32> = lines.map(is_tree).collect();
    	ans = tree_vec.iter().sum();

    }

    		println!("Answer: {}",ans);

}

fn read_lines<P>(filename: P) -> io::Result<io::Lines<io::BufReader<File>>>
where P: AsRef<Path>, {
    let file = File::open(filename)?;
    Ok(io::BufReader::new(file).lines())
}

fn is_tree(s: std::result::Result<String,std::io::Error>) -> u32 {

	unsafe {
	if line_no == 0 {
		line_no += 1;
		total_col = s.unwrap().chars().count().try_into().unwrap();
		println!("Total column: {}",total_col);
		0
	}
	else
	{
			let mut temp : u32 = 3*line_no;
			if temp > total_col {
				temp = temp % total_col;
				//Not below we do want the first character in this case
				//if temp == 0 {
					//temp = total_col-1;
				//}
			}

			let idx : usize = (temp).try_into().unwrap();

			//println!("Reading line {} and index {} !",line_no,idx );

			if s.unwrap().chars().nth(idx).unwrap() == '#'
			{
				//println!("Found a # at line {} and index {} !",line_no,idx );
				line_no += 1;
				1
			}
			else {
			line_no += 1;
			0
			}
	}
}
}#![no_std]

pub extern crate embedded_hal as hal;

pub use paste;

#[cfg(feature = "samc21e18a")]
pub use atsamc21e18a as target_device;

#[cfg(feature = "samc21g18a")]
pub use atsamc21g18a as target_device;

#[cfg(feature = "samc21j18a")]
pub use atsamc21j18a as target_device;

#[cfg(feature = "samc21n18a")]
pub use atsamc21n18a as target_device;

#[cfg(feature = "use_rtt")]
pub use jlink_rtt;

#[cfg(feature = "use_rtt")]
#[macro_export]
macro_rules! dbgprint {
    ($($arg:tt)*) => {
        {
            use core::fmt::Write;
            let mut out = $crate::jlink_rtt::NonBlockingOutput::new();
            writeln!(out, $($arg)*


core.MapK.zip<K>().run {
    this@zip.zip<A, B>(arg1) as arrow.core.MapK<K, arrow.core.Tuple2<A, B>>
  }

@JvmName("zipWith")
@Suppress(
  "UNCHECKED_CAST",
  "USELESS_CAST",
  "EXTENSION_SHADOWED_BY_MEMBER",
  "UNUSED_PARAMETER"
)
@Deprecated(
  "@extension kinded projected functions are deprecated",
  ReplaceWith(
    "zip(arg1) { _, a, b -> arg2(a, b) } ",
    "arrow.core.zip"
  ),
  DeprecationLevel.WARNING
)
fun <K, A, B, C> Kind<Kind<ForMapK, K>, A>.zipWith(
  arg1: Kind<Kind<ForMapK, K>, B>,
  arg2: Function2<A, B, C>
): MapK<K, C> = arrow.core.MapK.zip<K>().run {
  this@zipWith.zipWith<A, B, C>(arg1, arg2) as arrow.core.MapK<K, C>
}

@Suppress(
  "UNCHECKED_CAST",
  "NOTHING_TO_INLINE"
)
@Deprecated("Unzip typeclasses is deprecated. Use concrete methods on Map")
inline fun <K> Companion.zip(): MapKZip<K> = zip_singleton as arrow.core.extensions.MapKZip<K>
package arrow.fx.coroutines.stream

import arrow.fx.coroutines.ArrowFxSpec
import arrow.fx.coroutines.suspend
import io.kotest.property.Arb
import io.kotest.property.Shrinker
import io.kotest.property.arbitrary.arb
import io.kotest.property.arbitrary.bind
import io.kotest.property.arbitrary.choice
import io.kotest.property.arbitrary.choose
import io.kotest.property.arbitrary.constant
import io.kotest.property.arbitrary.list
import io.kotest.property.arbitrary.map
import kotlin.math.abs

/**
 * A Spec that allows you to specify depth for all `Arb` used inside the spec.
 *
 * A `Int.Range` of `0..10` is equivalent to `Arb.list` as where it generates `0..100` by default.
 *
 * `Stream` is randomly generated among it's constructors, but it guarantees a depth of maxmimum `10x range.last`.
 * So for `0..10` it will generate at most a `Stream` with `10` `Chunk`s of `10` elements.
 */
abstract class StreamSpec(
  iterations: Int = 350,
  val depth: IntRange = 0..100,
  spec: StreamSpec.() -> Unit = {}
) : ArrowFxSpec(iterations) {

  init {
    spec()
  }

  fun Arb.Companion.long(range: LongRange = Long.MIN_VALUE..Long.MAX_VALUE): Arb<Long> {
    val edgecases = listOf(0L, 1, -1, Long.MAX_VALUE, Long.MIN_VALUE).filter { it in range }
    return arb(LongShrinker(range), edgecases) { it.random.nextLong(range.first, range.last) }
  }

  class LongShrinker(private val range: LongRange) : Shrinker<Long> {
    override fun shrink(value: Long): List<Long> =
      when (value) {
        0L -> emptyList()
        1L, -1L -> listOf(0)
        else -> {
          val a = listOf(abs(value), value / 3, value / 2, value * 2 / 3)
          val b = (1..5L).map { value - it }.reversed().filter { it > 0 }
          (a + b).distinct().filter { it in range && it != value }
        }
      }
  }

  inline fun <reified O, R> Arb.Companion