rcle,
    DoubleOctagon,
    TripleOctagon,
    InvTriangle,
    InvTrapezium,
    InvHouse,
    MDiamond,
    MSquare,
    MCircle,
    Rect,
    Rectangle,
    Square,
    Star,
    None,
    Underline,
    Cylinder,
    Note,
    Tab,
    Folder,
    Box3d,
    Component,
    Promoter,
    Cds,
    Terminator,
    Utr,
    PrimerSite,
    RestrictionSite,
    FivePOverhang,
    ThreePOverhang,
    NoOverhang,
    Assembly,
    Signature,
    Insulator,
    Ribosite,
    RnaStab,
    ProteaseSite,
    ProteinStab,
    RPromoter,
    RArrow,
    LArrow,
    LPromoter,
}

fn shape_parser(input: &str) -> ParseResult<&str, Shape> {
    ws(alt((
        tag("box").map(|_| Shape::Box),
        tag("polygon").map(|_| Shape::Polygon),
        tag("ellipse").map(|_| Shape::Ellipse),
        tag("oval").map(|_| Shape::Oval),
        tag("circle").map(|_| Shape::Circle),
        tag("point").map(|_| Shape::Point),
    )))(input)
}

#[derive(Debug)]
pub enum EdgeRespresentation {
    Spline,
    LineSegment,
    Off,
    Polyline,
    Ortho,
    Curved,
}

#[derive(Debug)]
pub enum Style {
    Dashed,
    Dotted,
    Solid,
    Invis,
    Bold,
    Tapered,
    Filled,
    Striped,
    Wedged,
    Diagonals,
    Rounded,
}

fn style_parser(input: &str) -> ParseResult<&str, Style> {
    ws(alt((
        tag("dashed").map(|_| Style::Dashed),
        tag("dotted").map(|_| Style::Dotted),
        tag("solid").map(|_| Style::Solid),
        tag("invis").map(|_| Style::Invis),
        tag("bold").map(|_| Style::Bold),
        tag("tapered").map(|_| Style::Tapered),
        tag("filled").map(|_| Style::Filled),
        tag("striped").map(|_| Style::Striped),
        tag("wedged").map(|_| Style::Wedged),
        tag("diagonals").map(|_| Style::Diagonals),
        tag("rounded").map(|_| Style::Rounded),
    )))(input)
}

fn styles_parser(input: &str) -> ParseResult<&str, Vec<Style>> {
    separated_list1(char(','), style_parser)(input)
}

#[derive(Debug)]
pub struct ViewPort {
    width: Double,
    height: Double,
    zoom: Double,
    center: ViewPortCenter,
}

#[derive(Debug)]
pub enum ViewPortCenter {
    Position(Point),
    NodeName(String),
}

pub enum AttributeParseError {
    AttributeNameNotFound,
    InvalidAttribueValue,
}

pub fn attribute_parser(input: &str) -> ParseResult<&str, Attribute> {
    let (rest, (attr, _)) = pair(
        alt((
            map(
                separated_pair(ws(tag("style")), char('='), ws(styles_parser)),
                |(_, style)| Attribute::Style(style),
            ),
            map(
                separated_pair(ws(tag("shape")), char('='), ws(shape_parser)),
                |(_, shape)| Attribute::Shape(shape),
            ),
        )),
        opt(ws(alt((char(','


 ?? d).compareTo(ta?.time ?? d);
		});
	}
	else if (Persistence.settings.watchedThreadsSortingMethod == ThreadSortingMethod.savedTime) {
		mergeSort<ImageboardScoped<ThreadWatch>>(watches, compare: (a, b) {
			return b.item.watchTime.compareTo(a.item.watchTime);
		});
	}
	if (Persistence.settings.reverseWatchedThreadsSorting) {
		final list = watches.toList();
		watches.clear();
		watches.addAll(list.reversed);
	}
	if (Persistence.settings.showActiveWatchesAboveZombieWatches) {
		mergeSort<ImageboardScoped<ThreadWatch>>(watches, compare: (a, b) {
			if (a.item.zombie == b.item.zombie) {
				return 0;
			}
			else if (a.item.zombie) {
				return 1;
			}
			else {
				return -1;
			}
		});
	}
}

void sortUnscopedWatchedThreads(Imageboard imageboard, List<ThreadWatch> watches) {
	final d = DateTime(2000);
	if (Persistence.settings.watchedThreadsSortingMethod == ThreadSortingMethod.lastReplyByYouTime) {
		mergeSort<ThreadWatch>(watches, compare: (a, b) {
			final ta = imageboard.persistence.getThreadStateIfExists(a.threadIdentifier);
			final tb = imageboard.persistence.getThreadStateIfExists(b.threadIdentifier);
			Post? pa;
			Post? pb;
			if (ta?.youIds.isNotEmpty == true) {
				pa = ta!.thread?.posts_.tryFirstWhere((p) => p.id == ta.youIds.last);
			}
			if (tb?.youIds.isNotEmpty == true) {
				pb = tb!.thread?.posts_.tryFirstWhere((p) => p.id == tb.youIds.last);
			}
			return (pb?.time ?? d).compareTo(pa?.time ?? d);
		});
	}
	else if (Persistence.settings.watchedThreadsSortingMethod == ThreadSortingMethod.lastPostTime) {
		mergeSort<ThreadWatch>(watches, compare: (a, b) {
			return (imageboard.persistence.getThreadStateIfExists(b.threadIdentifier)?.thread?.posts_.last.time.toLocal() ?? d).compareTo(imageboard.persistence.getThreadStateIfExists(a.threadIdentifier)?.thread?.posts_.last.time.toLocal() ?? d);
		});
	}
	else if (Persistence.settings.watchedThreadsSortingMethod == ThreadSortingMethod.alphabeticByTitle) {
		mergeSort<ThreadWatch>(watches, compare: (a, b) {
			final ta = imageboard.persistence.getThreadStateIfExists(a.threadIdentifier)?.thread;
			final tb = imageboard.persistence.getThreadStateIfExists(b.threadIdentifier)?.thread;
			return ta.compareTo(tb);
		});
	}
	else if (Persistence.settings.watchedThreadsSortingMethod == ThreadSortingMethod.threadPostTime) {
		mergeSort<ThreadWatch>(watches, compare: (a, b) {
			final ta = imageboard.persistence.getThreadStateIfExists(a.threadIdentifier)?.thread;
			final tb = imageboard.persistence.getThreadStateIfExists(b.threadIdentifier)?.thread;
			return (tb?.time ?? d).compareTo(ta?.time ?? d);
		});
	}
	else if (Persistence.settings.watchedThreadsSortingMethod == ThreadSortingMethod.savedTime) {
		mergeSort<ThreadWatch>(watches, compare: (a, b) {
			return b.watchTime.compareTo(a.watchTime);
		});
	}
	if (Persistence.settings.reverseWatchedThreadsSorting) {
		final list = watches.toList();
		watches.clear();
		watches.addAll(list.reversed);
	}
	if (Persistence.settings.showActiveWatchesAboveZombieWatches) {
		mergeSort


glCore_glUniform4uiv]
	ldr	x16, [x16]
	br	x16
	.size	bluegl_glUniform4uiv, .-bluegl_glUniform4uiv

	.align	2
	.global	bluegl_glTexParameterIiv
	.type	bluegl_glTexParameterIiv, %function
bluegl_glTexParameterIiv:
	adrp	x16, :got:__blue_glCore_glTexParameterIiv
	ldr	x16, [x16, #:got_lo12:__blue_glCore_glTexParameterIiv]
	ldr	x16, [x16]
	br	x16
	.size	bluegl_glTexParameterIiv, .-bluegl_glTexParameterIiv

	.align	2
	.global	bluegl_glTexParameterIuiv
	.type	bluegl_glTexParameterIuiv, %function
bluegl_glTexParameterIuiv:
	adrp	x16, :got:__blue_glCore_glTexParameterIuiv
	ldr	x16, [x16, #:got_lo12:__blue_glCore_glTexParameterIuiv]
	ldr	x16, [x16]
	br	x16
	.size	bluegl_glTexParameterIuiv, .-bluegl_glTexParameterIuiv

	.align	2
	.global	bluegl_glGetTexParameterIiv
	.type	bluegl_glGetTexParameterIiv, %function
bluegl_glGetTexParameterIiv:
	adrp	x16, :got:__blue_glCore_glGetTexParameterIiv
	ldr	x16, [x16, #:got_lo12:__blue_glCore_glGetTexParameterIiv]
	ldr	x16, [x16]
	br	x16
	.size	bluegl_glGetTexParameterIiv, .-bluegl_glGetTexParameterIiv

	.align	2
	.global	bluegl_glGetTexParameterIuiv
	.type	bluegl_glGetTexParameterIuiv, %function
bluegl_glGetTexParameterIuiv:
	adrp	x16, :got:__blue_glCore_glGetTexParameterIuiv
	ldr	x16, [x16, #:got_lo12:__blue_glCore_glGetTexParameterIuiv]
	ldr	x16, [x16]
	br	x16
	.size	bluegl_glGetTexParameterIuiv, .-bluegl_glGetTexParameterIuiv

	.align	2
	.global	bluegl_glClearBufferiv
	.type	bluegl_glClearBufferiv, %function
bluegl_glClearBufferiv:
	adrp	x16, :got:__blue_glCore_glClearBufferiv
	ldr	x16, [x16, #:got_lo12:__blue_glCore_glClearBufferiv]
	ldr	x16, [x16]
	br	x16
	.size	bluegl_glClearBufferiv, .-bluegl_glClearBufferiv

	.align	2
	.global	bluegl_glClearBufferuiv
	.type	bluegl_glClearBufferuiv, %function
bluegl_glClearBufferuiv:
	adrp	x16, :got:__blue_glCore_glClearBufferuiv
	ldr	x16, [x16, #:got_lo12:__blue_glCore_glClearBufferuiv]
	ldr	x16, [x16]
	br	x16
	.size	bluegl_glClearBufferuiv, .-bluegl_glClearBufferuiv

	.align	2
	.global	bluegl_glClearBufferfv
	.type	bluegl_glClearBufferfv, %function
bluegl_glClearBufferfv:
	adrp	x16, :


"""
Multiple Marks
==============
This example demonstrates creating a single chart with multiple markers
representing the same data.
"""
# category: other charts
import altair as alt
from vega_datasets import data

source = data.stocks()

alt.Chart(source).mark_line(point=True).encode(
    x='date:T',
    y='price:Q',
    color='symbol:N'
)


.include "srcNG/defines.inc"
	#include <configNG.h>
	.align	2

;*******************************************************************************
;*				colorStreamInit
;*******************************************************************************
;*void colorStreamInit(colorStream *cs, colorStreamInfo *csi, u16 basePalette, u16 config) {

.globl colorStreamInit
colorStreamInit:
	.set	_ARGS, 4
	.set	_cs, _ARGS		;* long
	.set	_csInfo, _ARGS+4	;* long
	.set	_basePal, _ARGS+8+2	;* word
	.set	_config, _ARGS+12+2	;* word

		move.l	_cs(sp), a0					;* a0=cs			16
		move.l	_csInfo(sp), a1					;* a1=csi			16
	#if	BANKING_ENABLE
		move.b	_csInfo(sp), REG_BANKING			;* bankswitch			24
	#endif
		move.l	a1, CS_INFO(a0)					;* cs->info=csi

		move.w	_basePal(sp), d0				;* d0=basePalette
		lsl.w	#5, d0						;* d0<<=5
		move.w	d0, CS_PALMOD(a0)				;* cs->palMod=basePalette<<5

		tst.w	_config(sp)					;* config==0?
		beq.s	0f						;* ==0?
		;* ENDCONFIG
		move.w	#0xffff, CS_POSITION(a0)			;* cs->position=0xffff
		move.l	CSI_FWDATAEND(a1), CS_FWJOB(a0)			;* cs->fwJob=csi->fwDataEnd
		move.l	CSI_BWDATA(a1), CS_BWJOB(a0)			;* cs->bwJob=csi->bwData
		move.l	CSI_ENDCONFIG(a1), a0				;* a0=endConfig
		bra.s	5f
0:		;* STARTCONFIG
		move.w	#0, CS_POSITION(a0)				;* cs->position=0
		move.l	CSI_FWDATA(a1), CS_FWJOB(a0)			;* cs->fwJob=csi->fwData
		move.l	CSI_BWDATAEND(a1), CS_BWJOB(a0)			;* cs->bwJob=csi->bwDataEnd
		move.l	CSI_STARTCONFIG(a1), a0				;* a0=startConfig

5:		;* write config (in a0)
		movea.l	palJobsPtr, a1					;* a1=palJobsPtr
		moveq	#0, d1						;* clear d1

6:		move.w	(a0)+, d1					;* d1=slot
		bmi.s	9f						;* 0xffff? end
		add.w	d0, d1						;* add palmod
		move.l	d1, (a1)+					;* write palJob palette info
		move.l	(a0)+, (a1)+					;* write palJob palette address
		bra.s	6b

9:		move.l	a1, palJobsPtr					;* save palJobsPtr
		rts

;*******************************************************************************
;*				colorStreamSetPos
;****************************************************************************


 *   You may obtain a copy of the License at
 *
 *   https://github.com/FgForrest/evitaDB/blob/master/LICENSE
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 */

package io.evitadb.store.catalog.task;

import io.evitadb.api.file.FileForFetch;
import io.evitadb.api.task.TaskStatus.TaskTrait;
import io.evitadb.core.executor.ClientCallableTask;
import io.evitadb.core.executor.Interruptible;
import io.evitadb.core.file.ExportFileService;
import io.evitadb.core.file.ExportFileService.ExportFileHandle;
import io.evitadb.exception.GenericEvitaInternalError;
import io.evitadb.exception.UnexpectedIOException;
import io.evitadb.store.catalog.DefaultCatalogPersistenceService;
import io.evitadb.store.catalog.task.FullBackupTask.BackupSettings;
import io.evitadb.store.spi.CatalogPersistenceService;
import io.evitadb.utils.Assert;
import lombok.extern.slf4j.Slf4j;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.Serializable;
import java.nio.file.Files;
import java.nio.file.Path;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Comparator;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.LongConsumer;
import java.util.stream.Stream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

import static io.evitadb.store.spi.CatalogPersistenceService.BOOT_FILE_SUFFIX;
import static io.evitadb.store.spi.CatalogPersistenceService.WAL_FILE_SUFFIX;
import static java.util.Optional.ofNullable;

/**
 * Task responsible for backing up the catalog data folder with all the data files and WAL files.
 *
 * @author Jan Novotný (novotny@fg.cz), FG Forrest a.s. (c) 2024
 */
@Slf4j
public class FullBackupTask extends ClientCallableTask<BackupSettings, FileForFetch> {
	private final String catalogName;
	private final AtomicReference<ExportFileService> exportFileService;
	private final AtomicReference<LongConsumer> onComplete;
	private final AtomicReference<DefaultCatalogPersistenceService> catalogPersistenceService;
	private final long lastCatalogVersion;

	public FullBackupTask(
		@Nonnull String catalogName,
		@Nonnull ExportFileService exportFileService, @Nonnull DefaultCatalogPersistenceService catalogPersistenceService,
		@Nullable LongConsumer onStart,
		@Nullable LongConsumer onComplete
	) {
		super(
			catalogName,
			FullBackupTask.class.getSimpleName(),
			"Catalog " + catalogName + " full backup",
			new BackupSettings(),
			(task) -> ((FullBackupTask) task).doBackup(),
			TaskTrait.CAN_BE_STARTED, TaskTrait.CAN_BE_CANCELLED
		);
		this.catalogName = catalogName;
		this.catalogPersistenceService = new AtomicReference<>(catalogPersistenceService);
		this.exportFileService = new AtomicReference<>(exportFileService);
		this.onComplete = new AtomicReference<>(onComplete);
		this.lastCatalogVersion = catalogPersistenceService.getLastCatalogVersion();
		if (onStart != null) {
			onStart.accept(this.lastCatalogVersion);
		}
	}

	@Override
	public boolean cancel() {
		final boolean cancel = super.cancel();
		if (cancel) {
			tearDown();
		}
		return cancel;
	}

	/**
	 * Method executes the


6225).isArray);

function typeName(bold, italics) {
	var type = 'normal';
	if (bold && italics) {
		type = 'bolditalics';
	} else if (bold) {
		type = 'bold';
	} else if (italics) {
		type = 'italics';
	}
	return type;
}

function FontProvider(fontDescriptors, pdfKitDoc) {
	this.fonts = {};
	this.pdfKitDoc = pdfKitDoc;
	this.fontCache = {};

	for (var font in fontDescriptors) {
		if (fontDescriptors.hasOwnProperty(font)) {
			var fontDef = fontDescriptors[font];

			this.fonts[font] = {
				normal: fontDef.normal,
				bold: fontDef.bold,
				italics: fontDef.italics,
				bolditalics: fontDef.bolditalics
			};
		}
	}
}

FontProvider.prototype.getFontType = function (bold, italics) {
	return typeName(bold, italics);
}

FontProvider.prototype.getFontFile = function (familyName, bold, italics) {
	var type = this.getFontType(bold, italics);
	if (!this.fonts[familyName] || !this.fonts[familyName][type]) {
		return null;
	}

	return this.fonts[familyName][type];
}

FontProvider.prototype.provideFont = function (familyName, bold, italics) {
	var type = this.getFontType(bold, italics);
	if (this.getFontFile(familyName, bold, italics) === null) {
		throw new Error('Font \'' + familyName + '\' in style \'' + type + '\' is not defined in the font section of the document definition.');
	}

	this.fontCache[familyName] = this.fontCache[familyName] || {};

	if (!this.fontCache[familyName][type]) {
		var def = this.fonts[familyName][type];
		if (!isArray(def)) {
			def = [def];
		}
		this.fontCache[familyName][type] = this.pdfKitDoc.font.apply(this.pdfKitDoc, def)._font;
	}

	return this.fontCache[familyName][type];
};

module.exports = FontProvider;

/***/ }),

/***/ 6225:
/***/ (function(module) {

"use strict";

function isString(variable) {
	return typeof variable === 'string' || variable instanceof String;
}

function isNumber(variable) {
	return typeof variable === 'number' || variable instanceof Number;
}

function isBoolean(variable) {
	return typeof variable === 'boolean';
}

function isArray(variable) {
	return Array.isArray(variable);
}

function isFunction(variable) {
	return typeof variable === 'function';
}

function isObject(variable) {
	return variable !== null && typeof variable === 'object';
}

function isNull(variable) {
	return variable === null;
}

function isUndefined(variable) {
	return variable === undefined;
}

function pack() {
	var result = {};

	for (var i = 0, l = arguments.length; i < l; i++) {
		var obj = arguments[i];

		if (obj) {
			for (var key in obj) {
				if (obj.hasOwnProperty(key)) {
					result[key] = obj[key];
				}
			}
		}
	}

	return result;
}

function offsetVector(vector, x, y) {
	switch (vector.type) {
		case 'ellipse':
		case 'rect':
			vector.x += x;
			vector.y += y;
			break;
		case 'line':
			vector.x1 += x;
			vector.x2 += x;
			vector.y1 += y;
			vector.y2 += y;
			break;
		case 'polyline':
			for (var i =


self:T2(self.lid..string.format("Group %s: Dead MOOSE unit DOES exist! Unit name %s.", GroupNameIni, IniUnitName))
    else
      self:T2(self.lid..string.format("Group %s: Dead MOOSE unit DOES NOT not exist! Unit name %s.", GroupNameIni, IniUnitName))
    end

    if EventData.IniDCSUnit then
      self:T2(self.lid..string.format("Group %s: Dead DCS unit DOES exist! Unit name %s.", GroupNameIni, IniUnitName))
    else
      self:T2(self.lid..string.format("Group %s: Dead DCS unit DOES NOT exist! Unit name %s.", GroupNameIni, IniUnitName))
    end

    -- Flare unit that died.
    if IniUnit and (self.flare or self.Debug) then
      IniUnit:FlareWhite()
      self:T(self.lid..string.format("Flare Dead MOOSE unit."))
    end

    -- Flare unit that died.
    if EventData.IniDCSUnit and (self.flare or self.Debug) then
      local p=EventData.IniDCSUnit:getPosition().p
      trigger.action.signalFlare(p, trigger.flareColor.Yellow , 0)
      self:T(self.lid..string.format("Flare Dead DCS unit."))
    end

    -- Get status.
    self:Status()

    -- FSM Dead event.
    self:__Dead(0.1)

  end

end

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--- Suppress fire of a unit by setting its ROE to "Weapon Hold".
-- @param #SUPPRESSION self
function SUPPRESSION:_Suppress()

  -- Current time.
  local Tnow=timer.getTime()

  -- Controllable
  local Controllable=self.Controllable --Wrapper.Controllable#CONTROLLABLE

  -- Group will hold their weapons.
  self:_SetROE(SUPPRESSION.ROE.Hold)

  -- Get randomized time the unit is suppressed.
  local sigma=(self.Tsuppress_max-self.Tsuppress_min)/4
  local Tsuppress=self:_Random_Gaussian(self.Tsuppress_ave,sigma,self.Tsuppress_min, self.Tsuppress_max)

  -- Time at which the suppression is over.
  local renew=true
  if self.TsuppressionOver ~= nil then
    if Tsuppress+Tnow > self.TsuppressionOver then
      self.TsuppressionOver=Tnow+Tsuppress
    else
      renew=false
    end
  else
    self.TsuppressionOver=Tnow+Tsuppress
  end

  -- Recovery event will be called in Tsuppress seconds.
  if renew then
    self:__Recovered(self.TsuppressionOver-Tnow)
  end

  -- Debug message.
  local text=string.format("Group %s is suppressed for %d seconds. Suppression ends at %d:%02d.", Controllable:GetName(), Tsuppress, self.TsuppressionOver/60, self.TsuppressionOver%60)
  MESSAGE:New(text, 10):ToAllIf(self.Debug)
  self:T(self.lid..text)

end

--- Make group run/drive to a certain point. We put in several intermediate waypoints because sometimes the group stops before it arrived at the desired point.
--@param #SUPPRESSION self
--@param Core.Point#COORDINATE fin Coordinate where we want to go.
--@param #number speed Speed of group. Default is 20.
--@param #string formation Formation of group. Defau


a = this._input.LA(1);
	        if(!(_la===12 || _la===54)) {
	        this._errHandler.recoverInline(this);
	        }
	        else {
	        	this._errHandler.reportMatch(this);
	            this.consume();
	        }
	    } catch (re) {
	    	if(re instanceof antlr4.error.RecognitionException) {
		        localctx.exception = re;
		        this._errHandler.reportError(this, re);
		        this._errHandler.recover(this, re);
		    } else {
		    	throw re;
		    }
	    } finally {
	        this.exitRule();
	    }
	    return localctx;
	}

	selectItem() {
	    let localctx = new SelectItemContext(this, this._ctx, this.state);
	    this.enterRule(localctx, 66, SqlBaseParser.RULE_selectItem);
	    var _la = 0;
	    try {
	        this.state = 1144;
	        this._errHandler.sync(this);
	        var la_ = this._interp.adaptivePredict(this._input,146,this._ctx);
	        switch(la_) {
	        case 1:
	            localctx = new SelectSingleContext(this, localctx);
	            this.enterOuterAlt(localctx, 1);
	            this.state = 1132;
	            this.expression();
	            this.state = 1137;
	            this._errHandler.sync(this);
	            var la_ = this._interp.adaptivePredict(this._input,145,this._ctx);
	            if(la_===1) {
	                this.state = 1134;
	                this._errHandler.sync(this);
	                _la = this._input.LA(1);
	                if(_la===18) {
	                    this.state = 1133;
	                    this.match(SqlBaseParser.AS);
	                }

	                this.state = 1136;
	                this.identifier();

	            }
	            break;

	        case 2:
	            localctx = new SelectAllContext(this, localctx);
	            this.enterOuterAlt(localctx, 2);
	            this.state = 1139;
	            this.qualifiedName();
	            this.state = 1140;
	            this.match(SqlBaseParser.T__0);
	            this.state = 1141;
	            this.match(SqlBaseParser.ASTERISK);
	            break;

	        case 3:
	            localctx = new SelectAllContext(this, localctx);
	            this.enterOuterAlt(localctx, 3);
	            this.state = 1143;
	            this.match(SqlBaseParser.ASTERISK);
	            break;

	        }
	    } catch (re) {
	    	if(re instanceof antlr4.error.RecognitionException) {
		        localctx.exception = re;
		        this._errHandler.reportError(this, re);
		        this._errHandler.recover(this, re);
		    } else {
		    	throw re;
		    }
	    } finally {
	        this.exitRule();
	    }
	    return localctx;
	}

	relation(_p) {
		if(_p===undefined) {
		    _p = 0;
		}
	    const _parentctx = this._ctx;
	    const _parentState = this.state;
	    let localctx = new RelationContext(this, this._ctx, _parentState);
	    let _prevctx = localctx;
	    const _startState = 68;
	    this.enterRecursionRule(localctx, 68, SqlBaseParser.RULE_relation, _p);
	    try {
	        this.enterOuterAlt(localctx, 1);
	        localctx = new RelationDefaultContext(this, localctx);
	        this._ctx = localctx;
	        _prevctx = localctx;

	        this.state = 1147;
	        this.sampledRelation();
	        this._ctx.stop = this._input.LT(-1);
	        this.state = 1167;
	        this


# ifndef EC_H
# define EC_H

# ifndef CORD_H
#  include "cord.h"
# endif

/* Extensible cords are strings that may be destructively appended to.	*/
/* They allow fast construction of cords from characters that are	*/
/* being read from a stream.						*/
/*
 * A client might look like:
 *
 *	{
 *	    CORD_ec x;
 *	    CORD result;
 *	    char c;
 *	    FILE *f;
 *
 *	    ...
 *	    CORD_ec_init(x);
 *	    while(...) {
 *		c = getc(f);
 *		...
 *		CORD_ec_append(x, c);
 *	    }
 *	    result = CORD_balance(CORD_ec_to_cord(x));
 *
 * If a C string is desired as the final result, the call to CORD_balance
 * may be replaced by a call to CORD_to_char_star.
 */

# ifndef CORD_BUFSZ
#   define CORD_BUFSZ 128
# endif

typedef struct CORD_ec_struct {
    CORD ec_cord;
    char * ec_bufptr;
    char ec_buf[CORD_BUFSZ+1];
} CORD_ec[1];

/* This structure represents the concatenation of ec_cord with		*/
/* ec_buf[0 ... (ec_bufptr-ec_buf-1)]					*/

/* Flush the buffer part of the extended chord into ec_cord.	*/
/* Note that this is almost the only real function, and it is	*/
/* implemented in 6 lines in cordxtra.c				*/
void CORD_ec_flush_buf(CORD_ec x);

/* Convert an extensible cord to a cord. */
# define CORD_ec_to_cord(x) (CORD_ec_flush_buf(x), (x)[0].ec_cord)

/* Initialize an extensible cord. */
# define CORD_ec_init(x) ((x)[0].ec_cord = 0, (x)[0].ec_bufptr = (x)[0].ec_buf)

/* Append a character to an extensible cord.	*/
# define CORD_ec_append(x, c) \
    {  \
	if ((x)[0].ec_bufptr == (x)[0].ec_buf + CORD_BUFSZ) { \
	  	CORD_ec_flush_buf(x); \
	} \
	*((x)[0].ec_bufptr)++ = (c); \
    }

/* Append a cord to an extensible cord.  Structure remains shared with 	*/
/* original.								*/
void CORD_ec_append_cord(CORD_ec x, CORD s);

# endif /* EC_H */


HEMATICAL BOLD SCRIPT SMALL C'>𝓬 𝔠 𝕔 𝖈 𝖼 𝗰 𝘤 𝙘 𝚌 ⓒ Ⅽ ℂ ℭ 𝐂 𝐶 𝑪 𝒞 𝓒 𝕮 𝖢 𝗖 𝘊 𝘾 𝙲 Ⓒ ℅ ℆ ㏆ ㎈ ㏄ ㏅ ㎝ ㎠ ㎤ ⅾ ⅆ 𝐝 𝑑 𝒅 <span title='U+1D4B9 MATHEMATICAL S


<uint32_t>(debugCuIndex);
  if (version != 2 && version != (5 << (kIsLittleEndian ? 0 : 16))) {
    return false;
  }
  auto numColumns = read<uint32_t>(debugCuIndex);
  read<uint32_t>(debugCuIndex);
  auto numBuckets = read<uint32_t>(debugCuIndex);

  // Get index of the CU matches the given dwo id.
  folly::StringPiece signatureSection = debugCuIndex;
  folly::StringPiece indexesSection = debugCuIndex;
  indexesSection.advance(numBuckets * sizeof(uint64_t));
  ssize_t idx = -1;
  for (unsigned i = 0; i < numBuckets; i++) {
    uint64_t hash = read<uint64_t>(signatureSection);
    uint32_t index = read<uint32_t>(indexesSection);
    if (hash == dwoId) {
      idx = index;
      break;
    }
  }
  if (idx <= 0) {
    return false;
  }

  // Skip signature and parallel table of indexes
  debugCuIndex.advance(numBuckets * sizeof(uint64_t));
  debugCuIndex.advance(numBuckets * sizeof(uint32_t));

  // column headers
  ssize_t infoSectionIndex = -1;
  ssize_t abbrevSectionIndex = -1;
  ssize_t strOffsetsSectionIndex = -1;
  ssize_t rnglistsSectionIndex = -1;
  for (unsigned i = 0; i != numColumns; ++i) {
    auto index = read<uint32_t>(debugCuIndex);
    if (index == DW_SECT_INFO) {
      infoSectionIndex = i;
    } else if (index == DW_SECT_ABBREV) {
      abbrevSectionIndex = i;
    } else if (index == DW_SECT_STR_OFFSETS) {
      strOffsetsSectionIndex = i;
    } else if (index == DW_SECT_RNGLISTS) {
      rnglistsSectionIndex = i;
    }
  }

  // DW_SECT_RNGLISTS/rnglistsSectionIndex only appears in DWARF5 .dwp, not in
  // DWARF4 .dwp
  if (infoSectionIndex == -1 || abbrevSectionIndex == -1 ||
      strOffsetsSectionIndex == -1) {
    return false;
  }

  // debugCuIndex offsets
  debugCuIndex.advance((idx - 1) * numColumns * sizeof(uint32_t));
  for (unsigned i = 0; i != numColumns; ++i) {
    auto offset = read<uint32_t>(debugCuIndex);
    if (i == infoSectionIndex) {
      cu.offset = offset;
    }
    if (i == abbrevSectionIndex) {
      cu.abbrevOffset = offset;
    }
    if (i == strOffsetsSectionIndex) {
      cu.strOffsetsBase = offset;
    }
    if (i == rnglistsSectionIndex) {
      cu.rnglistsBase = offset;
    }
  }
  return true;
}

bool parseCompilationUnitMetadata(CompilationUnit& cu, size_t offset) {
  auto debugInfo = cu.debugSections.debugInfo;
  folly::StringPiece chunk(debugInfo);
  cu.offset = offset;
  chunk.advance(offset);
  // 1) unit_length
  auto initialLength = read<uint32_t>(chunk);
  cu.is64Bit = (initialLength == uint32_t(-1));
  cu.size = cu.is64Bit ? read<uint64_t>(chunk) : initialLength;
  if (cu.size > chunk.size()) {
    FOLLY_SAFE_DFATAL(
        "invalid size: ", cu.size, " chunk.size(): ", chunk.size());
    return false;
  }
  cu.size += cu.is64Bit ? 12 : 4;

  // 2) version
  cu.version = read<uint16_t>(chunk)


        }
        )
    }
}
<gh_stars>0
use std::fmt;
use std::marker;

use crate::assert_send;
use crate::assert_sync;
use crate::AsyncSocket;
use crate::AsyncSocketBox;
use crate::BoxFuture;
use crate::ImplInfo;
use crate::TlsAcceptor;
use crate::TlsAcceptorBuilder;
use crate::TlsStream;

// Type

/// Similar to [`TlsAcceptor`], but it is dynamic, does not require type parameter.
///
/// This can be obtained with [`TlsAcceptor::TYPE_DYN`].
pub trait TlsAcceptorType: fmt::Debug + fmt::Display + Sync + 'static {
    /// Whether this acceptor type is implemented.
    ///
    /// For example, `tls-api-security-framework` is available on Linux,
    /// but all operations result in error, so `implemented()` returns `false`
    /// for that implementation.
    fn implemented(&self) -> bool;
    /// Whether this implementation supports ALPN negotiation.
    fn supports_alpn(&self) -> bool;
    /// Whether this implementation supports construction of acceptor using
    /// a pair of a DER certificate and file pair.
    fn supports_der_keys(&self) -> bool;
    /// Whether this implementation supports construction of acceptor using
    /// PKCS #12 file.
    fn supports_pkcs12_keys(&self) -> bool;
    /// Unspecified version information about this implementation.
    fn info(&self) -> ImplInfo;

    /// New builder from given server key.
    ///
    /// This operation is guaranteed to fail if not [`TlsAcceptorType::supports_der_keys`].
    fn builder_from_der_key(&self, cert: &[u8], key: &[u8])
        -> crate::Result<TlsAcceptorBuilderBox>;

    /// New builder from given server key.
    ///
    /// This operation is guaranteed to fail if not [`TlsAcceptorType::supports_pkcs12_keys`].
    fn builder_from_pkcs12(
        &self,
        pkcs12: &[u8],
        passphrase: &str,
    ) -> crate::Result<TlsAcceptorBuilderBox>;
}

pub(crate) struct TlsAcceptorTypeImpl<A: TlsAcceptor>(pub marker::PhantomData<A>);

impl<A: TlsAcceptor> fmt::Debug for TlsAcceptorTypeImpl<A> {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        fmt::Debug::fmt(&A::info(), f)
    }
}

impl<A: TlsAcceptor> fmt::Display for TlsAcceptorTypeImpl<A> {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        fmt::Debug::fmt(&A::info(), f)
    }
}

impl<A: TlsAcceptor> TlsAcceptorType for TlsAcceptorTypeImpl<A> {
    fn implemented(&self) -> bool {
        A::IMPLEMENTED
    }

    fn supports_alpn(&self) -> bool {
        A::SUPPORTS_ALPN
    }

    fn supports_der_keys(&self) -> bool {
        A::SUPPORTS_DER_KEYS
    }

    fn supports_pkcs12_keys(&self) -> bool {
        A::SUPPORTS_PKCS12_KEYS
    }

    fn info(&self) -> ImplInfo {
        A::info()
    }

    fn builder_from_der_key(
        &self,
        cert: &[u8],
        key: &[u8],
    ) -> crate::Result<TlsAcceptorBuilderBox> {
        let builder = A::builder_from_der_key(cert, key)?;
        Ok(TlsAcceptorBuilderBox(Box::new(builder)))
    }

    fn builder_from_pkcs12(
        &self,
        pkcs12: &[u8],
        passphrase: &str,
    ) -> crate::Result<TlsAcceptorBuilderBox> {
        let builder = A::builder_from_pkcs12(pkcs12, passphrase)?;
        Ok(TlsAcceptorBuilderBox(Box::new(builder)))
    }
}

//


require("nvim-treesitter.configs").setup({
	ensure_installed = { "go", "html", "json", "typescript", "lua", "python", "regex", "bash" },
	highlight = {
		enable = true,
	},
	incremental_selection = {
		enable = true,
		keymaps = {
			init_selection = "<S-Tab>", --normal mode
			node_incremental = "<Tab>", --visual mode
			node_decremental = "<S-Tab>", --visual mode
		},
	},
	textobjects = {
		select = {
			enable = true,
			keymaps = {
				["af"] = "@function.outer",
				["if"] = "@function.inner",
			},
		},
	},
	playground = {
		enable = true,
		disable = {},
		updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
		persist_queries = false, -- Whether the query persists across vim sessions
	},
	refactor = {
		highlight_definitions = {
			enable = true,
			clear_on_cursor_move = true,
		},
		smart_rename = {
			enable = true,
			keymaps = {
				smart_rename = "grr",
			},
		},
	},
	indent = {
		enable = true,
	},
	autotag = {
		enable = true,
	},
	context_commentstring = {
		enable = true,


a_indices
        'temporal_moments',
        'temporal_median',
        'temporal_entropy',
        'acoustic_richness_index',
        "temporal_activity",
        "temporal_events",
        "acoustic_complexity_index",
        "frequency_entropy",
        "number_of_peaks",
        "spectral_entropy",
        "spectral_moments",
        "spectral_activity",
        "spectral_events",
        'spectral_cover',
        "soundscape_index",
        'bioacoustics_index',
        "acoustic_diversity_index",
        "acoustic_eveness_index",
        "roughness",
        'temporal_leq',
        'spectral_leq',
        "surface_roughness",
        "tfsd",
        "more_entropy",
        "acoustic_gradient_index",
        "frequency_raoq",
        "region_of_interest_index_deprecated",
        "region_of_interest_index",
        'all_temporal_alpha_indices',
        'all_spectral_alpha_indices',

        # composite features
        'graphical_soundscape',
        'plot_graph',
        ]


n tag, an inline syntax object needs to be
defined for the Markdown parser and an element builder which is deligated the
task of building the appropriate Flutter widgets for the resulting Markdown
output. Instances of these objects need to be provided to the Markdown widget.

```
  Markdown(
    data: _data,
    builders: {
      'sub': SubscriptBuilder(),
    },
    extensionSet: md.ExtensionSet([], [SubscriptSyntax()]),
  );
```

### Inline Syntax Class

```
class SubscriptSyntax extends md.InlineSyntax {
  static final _pattern = r'_([0-9]+)';

  SubscriptSyntax() : super(_pattern);

  @override
  bool onMatch(md.InlineParser parser, Match match) {
    parser.addNode(md.Element.text('sub', match[1]));
    return true;
  }
```

### Markdown Element Builder

```
class SubscriptBuilder extends MarkdownElementBuilder {
  static const List<String> _subscripts = [
    '₀', '₁', '₂', '₃', '₄', '₅', '₆', '₇', '₈', '₉'
  ];

  @override
  Widget visitElementAfter(md.Element element, TextStyle preferredStyle) {
    String textContent = element.textContent;
    String text = '';
    for (int i = 0; i < textContent.length; i++) {
      text += _subscripts[int.parse(textContent[i])];
    }
    return SelectableText.rich(TextSpan(text: text));
  }
}
```
""";

/// The subscript syntax demo provides an example of creating an inline syntax
/// object which defines the syntax for the Markdown inline parser and an
/// accompanying Markdown element builder object to handle subscript tags.
class SubscriptSyntaxDemo extends StatelessWidget implements MarkdownDemoWidget {
  const SubscriptSyntaxDemo({super.key});

  static const String _title = 'Subscript Syntax Demo';

  @override
  String get title => SubscriptSyntaxDemo._title;

  @override
  String get description => 'An example of how to create a custom inline '
      'syntax parser and element builder for numerical subscripts.';

  @override
  Future<String> get data => Future<String>.value(_data);

  @override
  Future<String> get notes => Future<String>.value(_notes);

  @override
  Widget build(BuildContext context) {
    return FutureBuilder<String>(
      future: data,
      builder: (BuildContext context, AsyncSnapshot<String> snapshot) {
        if (snapshot.connectionState == ConnectionState.done) {
          return Markdown(
            data: snapshot.data!,
            builders: <String, MarkdownElementBuilder>{
              'sub': SubscriptBuilder(),
            },
            extensionSet: md.ExtensionSet(<md.BlockSyntax>[], <md.InlineSyntax>[SubscriptSyntax()]),
          );
        } else {
          return const CircularProgressIndicator();
        }
      },
    );
  }
}

class SubscriptBuilder extends MarkdownElementBuilder {
  static const List<String> _subscripts = <String>['₀', '₁', '₂', '₃', '₄', '₅', '₆', '₇', '₈', '₉'];

  @override
  Widget visitElementAfter(md.Element element, TextStyle? preferredStyle) {
    // We don't currently have a way to control the vertical alignment of text spans.
    // See https://github.com/flutter/flutter/issues/10906#issuecomment-385723664
    final String textContent = element.textContent;
    String text = '';
    for (int i = 0; i < textContent.length; i++) {
      text += _subscripts[int.parse(textContent[i])];
    }
    return SelectableText.rich(TextSpan(text: text));
  }
}

class SubscriptSyntax extends md.InlineSyntax {
  SubscriptSyntax() : super(_pattern);

  static const String _pattern = r'_([0-9]+)';

  @override
  bool on


//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package tarball_test

import (
	"errors"
	"fmt"
	"io"
	"os"

	v1 "github.com/google/go-containerregistry/pkg/v1"
	"github.com/google/go-containerregistry/pkg/v1/tarball"
)

func ExampleWithProgress() {
	// buffered channel to make the example test easier
	c := make(chan v1.Update, 200)
	// Make a tempfile for tarball writes.
	fp, err := os.CreateTemp("", "")
	if err != nil {
		fmt.Printf("error creating temp file: %v\n", err)
		return
	}
	defer fp.Close()
	defer os.Remove(fp.Name())

	img, err := tarball.ImageFromPath("testdata/test_image_1.tar", nil)
	go func() {
		_ = tarball.WriteToFile(fp.Name(), nil, img, tarball.WithProgress(c))
	}()
	for update := range c {
		switch {
		case update.Error != nil && errors.Is(update.Error, io.EOF):
			fmt.Fprintf(os.Stderr, "receive error message: %v\n", err)
			fmt.Printf("%d/%d", update.Complete, update.Total)
			// Output: 4096/4096
			return
		case update.Error != nil:
			fmt.Printf("error writing tarball: %v\n", update.Error)
			return
		default:
			fmt.Fprintf(os.Stderr, "receive update: %#v\n", update)
		}
	}
}
// Copyright 2018 Google LLC All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package tarball

import (
	"bytes"
	"compress/gzip"
	"io"
	"os"
	"testing"

	"github.com/containerd/stargz-snapshotter/estargz"
	"github.com/google/go-containerregistry/pkg/compression"
	v1 "github.com/google/go-containerregistry/pkg/v1"
	"github.com/google/go-containerregistry/pkg/v1/compare"
	"github.com/google/go-containerregistry/pkg/v1/types"
	"github.com/google/go-containerregistry/pkg/v1/validate"
)

func TestLayerFromFile(t *testing.T) {
	setupFixtures(t)
	defer teardownFixtures(t)

	tarLayer, err := LayerFromFile("testdata/content.tar")
	if err != nil {
		t.Fatalf("Unable to create layer from tar file: %v", err)
	}

	tarGzLayer, err := LayerFromFile("gzip_content.tgz")
	if err != nil {
		t.Fatalf("Unable to create layer from compressed tar file: %v", err)
	}

	tarZstdLayer, err := LayerFromFile("zstd_content.tar.zst")
	if err != nil {
		t.Fatalf("Unable to create layer from compressed tar file: %v", err)
	}

	if err := compare.Layers(tarLayer, tarG


id_2_0_6.operatingSystem);

    MockVersionApi getMockGetUiBundleSuccess01() {
      var api = MockVersionApi();
      when(api.getUiBundle(
              operatingSystem: Platform.operatingSystem,
              versionNumber: versionNumber01,
              flutterVersion: id_2_0_6.version,
              flutterChannel: id_2_0_6.channel))
          .thenAnswer((_) async => uiBundle01);
      return api;
    }

    MockDownloader getMockDownloaderSuccess() {
      var downloader = MockDownloader();
      when(downloader.start()).thenAnswer((_) => Future.value());
      when(downloader.done()).thenAnswer((_) {
        test_stdout.writeln('[Downloader output would go here]');
        return Future.value();
      });
      return downloader;
    }

    MockUnzipper getMockUnzipperSuccess() {
      var unzipper = MockUnzipper();
      when(unzipper.start()).thenAnswer((_) => Future.value());
      when(unzipper.done()).thenAnswer((_) => Future.value());
      return unzipper;
    }

    TestFetcher getTestFetcher01() {
      return TestFetcher(
          stdout_: StandardOutput(test_stdout),
          monarchBinaries: monarchBinaries,
          binariesVersionNumber: versionNumber01,
          id: id_2_0_6,
          userDeviceId: userDeviceId01);
    }

    TestFetcher getTestFetcher01_unknownChannel() {
      return TestFetcher(
          stdout_: StandardOutput(test_stdout),
          monarchBinaries: monarchBinaries,
          binariesVersionNumber: versionNumber01,
          id: id_2_0_6_unknownChannel,
          userDeviceId: userDeviceId01);
    }

    Future<void> verifyFetcherExit(
        {required CliExitCode exitCode,
        bool? shouldUiDirExist,
        bool? isZipFileDeleted,
        required String output}) async {
      var exitCode_ = await fetcher.exit;
      expect(exitCode_.code, exitCode.code);
      if (shouldUiDirExist != null) {
        expect(await monarchBinaries.monarchUiDirectory.exists(),
            shouldUiDirExist);
      }
      if (isZipFileDeleted != null) {
        expect(fetcher.zipFileDeleted, isZipFileDeleted);
      }
      expect(test_stdout.buffer.toString(), output);
    }

    setUp(() {
      monarchBinaries = createTempMonarchBinaries();
      test_stdout = TestStdout();
    });

    const successDoneOutput = '''

Downloading the Monarch UI for this project's flutter version...

[Downloader output would go here]

Extracting Monarch UI zip... Done.
''';

    group('success scenarios', () {
      setUp(() {
        fetcher = getTestFetcher01();

        fetcher.mockVersionApi = getMockGetUiBundleSuccess01();
        fetcher.mockDownloader = getMockDownloaderSuccess();
        fetcher.mockUnzipper = getMockUnzipperSuccess();
      });

      test('success output when monarch ui dir does not exist', () async {
        expect(await monarchBinaries.monarchUiDirectory.exists(), isFalse);

        fetcher.run();

        await verifyFetcherExit(
            exitCode: MonarchUiFetchExitCodes.success,
            shouldUiDirExist: true,
            isZipFileDeleted: true,
            output: successDoneOutput);
      });

      test('success output when monarch ui dir exists', () async {
        await monarchBinaries.monarchUiDirectory.create(recursive: true);
        expect(


 "amount": "100"}]}`, fromAddr),
			&bank.MsgSend{FromAddress: s.TestAccAddress[0].String(), ToAddress: "to", Amount: sdk.NewCoins(sdk.NewInt64Coin("foo", 100))},
			true,
			true,
		},

		{"bank send. amount as mix string number but bad",
			fmt.Sprintf(`{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"%s","to_address":"to", "amount": [{"denom": "foo", "amount": "50"}]}`, fromAddr),
			&bank.MsgSend{FromAddress: s.TestAccAddress[0].String(), ToAddress: "to", Amount: sdk.NewCoins(sdk.NewInt64Coin("foo", 100))},
			true,
			false,
		},

		{"bank send. just denom",
			fmt.Sprintf(`{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"%s","to_address":"to", "amount": [{"denom": "foo"}]}`, fromAddr),
			&bank.MsgSend{FromAddress: s.TestAccAddress[0].String(), ToAddress: "to", Amount: sdk.NewCoins(sdk.NewInt64Coin("foo", 100))},
			true,
			true,
		},

		{"bank send. just denom",
			fmt.Sprintf(`{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"%s","to_address":"to", "amount": [{"denom": "foo"}]}`, fromAddr),
			&bank.MsgSend{FromAddress: s.TestAccAddress[0].String(), ToAddress: "to", Amount: sdk.NewCoins(sdk.NewInt64Coin("foo", 1))},
			true,
			true,
		},

		{"bank send. bad denom",
			fmt.Sprintf(`{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"%s","to_address":"to", "amount": [{"denom": "foo"}]}`, fromAddr),
			&bank.MsgSend{FromAddress: s.TestAccAddress[0].String(), ToAddress: "to", Amount: sdk.NewCoins(sdk.NewInt64Coin("bar", 100))},
			true,
			false,
		},

		{"bank send. any match",
			`{"@type":"/cosmos.bank.v1beta1.MsgSend"}`,
			&bank.MsgSend{FromAddress: s.TestAccAddress[0].String(), ToAddress: "to", Amount: sdk.NewCoins(sdk.NewInt64Coin("bar", 100))},
			true,
			true,
		},

		{"bank send. using map as generic",
			`{"@type":"/cosmos.bank.v1beta1.MsgSend"}`,
			&bank.MsgSend{FromAddress: s.TestAccAddress[0].String(), ToAddress: "to", Amount: sdk.NewCoins(sdk.NewInt64Coin("bar", 100))},
			true,
			true,
		},

		{"bank send. empty array as generic for arrays",
			fmt.Sprintf(`{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"%s","to_address":"to", "amount": []}`, fromAddr),
			&bank.MsgSend{FromAddress: s.TestAccAddress[0].String(), ToAddress: "to", Amount: sdk.NewCoins(sdk.NewInt64Coin("foo", 1))},
			true,
			true,
		},
		{"bank send. fail on different message type",
			fmt.Sprintf(`{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"%s","to_address":"to", "amount": []}`, fromAddr),
			&poolmanagertypes.MsgSwapExactAmountIn{
				Sender:            fromAddr,
				TokenIn:           sdk.NewCoin("inputDenom", osmomath.NewInt(500)),
				TokenOutMinAmount: osmomath.NewInt(100),
			},
			true,
			false,
		},
	}

	for _, tt := range tests {
		s.Run(tt.name, func(


.wp || {};
		window.wp.editor = window.wp.editor || {};
		window.wp.editor.dfw = {
			activate: activate,
			deactivate: deactivate,
			isActive: isActive,
			on: on,
			off: off,
			toggle: toggle,
			isOn: isOn
		};
	} );
} )( window, window.jQuery );
window.wp=window.wp||{},wp.svgPainter=function(a,b,c,d){"use strict";var e,f,g,h={},i=[];return a(c).ready(function(){c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")&&(a(c.body).removeClass("no-svg").addClass("svg"),wp.svgPainter.init())}),f=function(){function a(){for(;j<256;)e=String.fromCharCode(j),g+=e,i[j]=j,h[j]=f.indexOf(e),++j}function b(a,b,c,d,f,g){var h,i,j=0,k=0,l="",m=0;for(a=String(a),i=a.length;k<i;){for(e=a.charCodeAt(k),e=e<256?c[e]:-1,j=(j<<f)+e,m+=f;m>=g;)m-=g,h=j>>m,l+=d.charAt(h),j^=h<<m;++k}return!b&&m>0&&(l+=d.charAt(j<<g-m)),l}function c(c){return e||a(),c=b(c,!1,i,f,8,6),c+"====".slice(c.length%4||4)}function d(c){var d;e||a(),c=c.replace(/[^A-Za-z0-9\+\/\=]/g,""),c=String(c).split("="),d=c.length;do--d,c[d]=b(c[d],!0,h,g,6,8);while(d>0);return c=c.join("")}var e,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g="",h=[256],i=[256],j=0;return{atob:d,btoa:c}}(),{init:function(){g=this,e=a("#adminmenu .wp-menu-image, #wpadminbar .ab-item"),this.setColors(),this.findElements(),this.paint()},setColors:function(a){"undefined"==typeof a&&"undefined"!=typeof b._wpColorScheme&&(a=b._wpColorScheme),a&&a.icons&&a.icons.base&&a.icons.current&&a.icons.focus&&(h=a.icons)},findElements:function(){e.each(function(){var b=a(this),c=b.css("background-image");c&&c.indexOf("data:image/svg+xml;base64")!=-1&&i.push(b)})},paint:function(){a.each(i,function(a,c){var d=c.parent().parent();d.hasClass("current")||d.hasClass("wp-has-current-submenu")?g.paintElement(c,"current"):(g.paintElement(c,"base"),d.hover(function(){g.paintElement(c,"focus")},function(){b.setTimeout(function(){g.paintElement(c,"base")},100)}))})},paintElement:function(a,c){var d,e,g;if(c&&h.hasOwnProperty(c)&&(g=h[c],g.match(/^(#[0-9a-f]{3}|#[0-9a-f]{6})$/i)&&(d=a.data("wp-ui-svg-"+g),"none"!==d))){if(!d){if(e=a.css("background-image").match(/.+data:image\/svg\+xml;base64,([A-Za-z0-9\+\/\=]+)/),!e||!e[1])return void a.data("wp-ui-svg-"+g,"none");try{d="atob"in b?b.atob(e[1]):f.atob(e[1])}catch(i){}if(!d)return void a.data("wp-ui-svg-"+g,"none");d=d.replace(/fill="(.+?)"/g,'fill="'+g+'"'),d=d.replace(/style="(.+?)"/g,'style="fill:'+g+'"'),d=d.replace(/fill:.*?;/g,"fill: "+g+";"),d="b


In the future, we'll be able to deal
	 * with 1T segments too by getting the encoding from the PGD instead
	 */
	ld	r9,PACAPGDIR(r13)
	cmpldi	cr0,r9,0
	beqlr
	rlwinm	r11,r10,8,25,28
	ldx	r9,r9,r11		/* get pgd_t */
	cmpldi	cr0,r9,0
	beqlr
	rlwinm	r11,r10,3,17,28
	ldx	r9,r9,r11		/* get pmd_t */
	cmpldi	cr0,r9,0
	beqlr

	/* build vsid flags */
	andi.	r11,r9,SLB_VSID_LLP
	ori	r11,r11,SLB_VSID_USER

	/* get context to calculate proto-VSID */
	ld	r9,PACACONTEXTID(r13)
	rldimi	r10,r9,USER_ESID_BITS,0

	/* fall through slb_finish_load */

#endif /* __DISABLED__ */

/*
 * Finish loading of an SLB entry and return
 *
 * r3 = EA, r10 = proto-VSID, r11 = flags, clobbers r9, cr7 = <> PAGE_OFFSET
 */
slb_finish_load:
	ASM_VSID_SCRAMBLE(r10,r9,256M)
	rldimi	r11,r10,SLB_VSID_SHIFT,16	/* combine VSID and flags */

	/* r3 = EA, r11 = VSID data */
	/*
	 * Find a slot, round robin. Previously we tried to find a
	 * free slot first but that took too long. Unfortunately we
 	 * dont have any LRU information to help us choose a slot.
 	 */
#ifdef CONFIG_PPC_ISERIES
BEGIN_FW_FTR_SECTION
	/*
	 * On iSeries, the "bolted" stack segment can be cast out on
	 * shared processor switch so we need to check for a miss on
	 * it and restore it to the right slot.
	 */
	ld	r9,PACAKSAVE(r13)
	clrrdi	r9,r9,28
	clrrdi	r3,r3,28
	li	r10,SLB_NUM_BOLTED-1	/* Stack goes in last bolted slot */
	cmpld	r9,r3
	beq	3f
END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
#endif /* CONFIG_PPC_ISERIES */

7:	ld	r10,PACASTABRR(r13)
	addi	r10,r10,1
	/* This gets soft patched on boot. */
_GLOBAL(slb_compare_rr_to_size)
	cmpldi	r10,0

	blt+	4f


/fa-solid-900.ttf) format("truetype"),url(../fonts/fa-solid-900.html#fontawesome) format("svg")}.fa,.fas{font-family:"Font Awesome 5 Pro";font-weight:900}/*
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
.cke_dialog{visibility:visible}.cke_dialog_body{z-index:1;background:#fff}.cke_dialog strong{font-weight:bold}.cke_dialog_title{font-weight:bold;font-size:12px;cursor:move;position:relative;color:#484848;border-bottom:1px solid #d1d1d1;padding:12px 19px 12px 12px;background:#f8f8f8;letter-spacing:.3px}.cke_dialog_spinner{border-radius:50%;width:12px;height:12px;overflow:hidden;text-indent:-9999em;border:2px solid rgba(102,102,102,0.2);border-left-color:rgba(102,102,102,1);-webkit-animation:dialog_spinner 1s infinite linear;animation:dialog_spinner 1s infinite linear}.cke_browser_ie8 .cke_dialog_spinner,.cke_browser_ie9 .cke_dialog_spinner{background:url(images/spinner.gif) center top no-repeat;width:16px;height:16px;border:0}@-webkit-keyframes dialog_spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes dialog_spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.cke_dialog_contents{background-color:#fff;overflow:auto;padding:15px 10px 5px 10px;margin-top:43px;border-top:1px solid #d1d1d1}.cke_dialog_contents_body{overflow:auto;padding:9px 10px 5px 10px;margin-top:22px}.cke_dialog_footer{text-align:right;position:relative;border-top:1px solid #d1d1d1;background:#f8f8f8}.cke_rtl .cke_dialog_footer{text-align:left}.cke_hc .cke_dialog_footer{outline:0;border-top:1px solid #fff}.cke_dialog .cke_resizer{margin-top:22px}.cke_dialog .cke_resizer_rtl{margin-left:5px}.cke_dialog .cke_resizer_ltr{margin-right:5px}.cke_dialog_tabs{height:33px;display:inline-block;margin:9px 0 0;position:absolute;z-index:2;left:11px}.cke_rtl .cke_dialog_tabs{left:auto;right:11px}a.cke_dialog_tab{height:25px;padding:4px 8px;display:inline-block;cursor:pointer;line-height:26px;outline:0;color:#484848;border:1px solid #d1d1d1;border-radius:3px 3px 0 0;background:#f8f8f8;min-width:90px;text-align:center;margin-left:-1px;letter-spacing:.3px}a.cke_dialog_tab:hover{background-color:#fff}a.cke_dialog_tab:focus{border:2px solid #139ff7;border-bottom-color:#d1d1d1;padding:3px 7px;position:relative;z-index:1}a.cke_dialog_tab_selected{background:#fff;border-bottom-color:#fff;cursor:default;filter:none}a.cke_dialog_tab_selected:hover,a.cke_dialog_tab_selected:focus{border-bottom-color:#fff}.cke_hc a.cke_dialog_tab:hover,.cke_hc a.cke_dialog_tab:foc


Pos);
    }
}
import { Router } from "express";
import { Logger } from "../../modules/logger/logger";
import { ControllerUtility } from "src/server/utils/controllers/controllers";
import { IController } from "src/types/api/IController";
import { IVideoScraper } from "src/server/modules/videoScraper/types";

/**
 * The dependencies for StatusController class
 */
export type StatusControllerDependencies = {
    controllerUtility: ControllerUtility,
    logger: Logger,
    videoScraperModule: IVideoScraper
}

export class StatusController implements IController {
    private _router: Router;

    /**
     * Sets dependencies as a private variable of the class
     * @param dependencies Dependencies
     */
    constructor(
        private dependencies: StatusControllerDependencies
    ) {}

    public async handler(app: Router): Promise<void> {
        try {
            this._router = Router();

            app.use("/status", this._router);

            this.dependencies.controllerUtility.setUpController({
                router: this._router,
                dirname: __dirname,
                parentDependencies: this.dependencies,
            });
        } catch (e) {
            this.dependencies.logger.error(e);
        }
    }
}
import { DataSource } from '@angular/cdk/collections';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { map } from 'rxjs/operators';
import { Observable, of as observableOf, merge } from 'rxjs';

export interface BirthdayTableItem {
  date:string;
  name: string;
}

const EXAMPLE_DATA: BirthdayTableItem[] = [
  {date:'26 August', name: 'Aiden'},
  {date:'26 August', name:'Benjamin'},
  {date:'26 August', name: 'Deniel'},
  {date:'26 August', name: 'Hanry'},
  {date:'28 August',  name: 'Jack'},
  {date:'28 August',  name: 'Peter'},
  {date:'28 August',  name: 'John'},
  {date:'28 August',  name: 'Harry'},
  {date:'29 August',  name: 'Evan'},
  {date:'29 August',  name: 'Robert'},
  {date:'29 August',  name: 'Chris'},
  {date:'30 August',  name: 'Robin'},
  {date:'30 August',  name: 'Anie'},
  {date:'30 August',  name: 'Moriss'},
  {date:'30 August',  name: 'Ron'},
  {date:'31 August',  name: 'Noah'},
  {date:'31 August',  name: 'Sam'},
  {date:'31 August',  name: 'Curran'},
  {date:'1 September', name: 'Kevin'},
  {date:'1 September', name: 'Smith'},

];

/**
 * Data source for the BirthdayTable view. This class should
 * encapsulate all logic for fetching and manipulating the displayed data
 * (including sorting, pagination, and filtering).
 */
export class BirthdayTableDataSource extends DataSource<BirthdayTableItem> {
  data: BirthdayTableItem[] = EXAMPLE_DATA;
  paginator: MatPaginator | undefined;
  sort: MatSort | undefined;

  constructor() {
    super();
  }

  /**
   * Connect this data source to the table. The table will only update when
   * the returned stream emits new items.
   * @returns A stream of the items to be rendered.
   */
  connect(): Observable<BirthdayTableItem[]> {
    if (this.paginator && this.sort) {
      // Combine everything that affects the rendered data into one update
      // stream for the data-table to consume.
      return merge(observableOf(this.data), this.paginator.pa


7, 50,
60, 53, 19,  2, 37, 69, 66, 53,  2, 24, 49, 61, 50, 66, 57, 52, 55, 53,
2, 26, 52, 57, 68, 57, 63, 62,  2,  7,  2, 41, 53, 72, 68,  2, 51, 63,
69, 66, 68, 53, 67, 73,  2, 63, 54,  2, 71, 71, 71,  8, 23, 57, 50, 60,
53, 37, 66, 63, 68, 53, 51, 68, 63, 66,  8, 51, 63, 61,  1, 28, 53, 62,
53, 67, 57, 67,  2, 10, 19, 10,  0, 30])

학습용 배치만들기.

지금까지 쉬운 설명을 위해 batch size를 1로 두었습니다.

학습용 데이터셋이 있다면, 이 중 에서 랜덤으로 학습시킬 데이터를 텍스트의 길이만큼 잘라서 사용합니다.

여기서의 사이즈라 함은 트랜스포머가 소화할 수 있는 개수를 말함.

파라미터의 Block의 사이즈를 16으로 두었기 때문에 16개씩 배치를 통해 글자를 뽑아내면 됨.

![image.png](/assets/transformer/11_char_level_GPT(_Self_Attention_Masked_Multi_Head_Attention)/image_4.png)

예를 들어, bacth size가 4라고 아래에서 가정했습니다. 이것이  neural network에 input으로 들어갈 데이터이고, 여기서 loss 계산을 위한 target를 뽑아야 합니다.

character level 레벨의 생성형 neural network는 주어진 character의 다음 글자를 예측하는 것인데, 그 말은 학습용으로 사용할 label은 input의 그 다음 글자면 충분하다는 것입니다.

예를 들어 character a,b,c,d,e순서가 있다고 가정.

![image.png](/assets/transformer/11_char_level_GPT(_Self_Attention_Masked_Multi_Head_Attention)/image_5.png)

a 다음에 대한 글자, a b 다음에 대한 글자, a b c다음에 대한 글자를 예측 해야하는데,
우리는 a 다음에 올 글자, a b 다음에 올 글자, a b c 다음에 올 글자에 대해서 알고 있습니다.

(a _ / a b _ / a b c _ )에서 ‘_’ 를 예측 해야 하는데, 우리는 예측 해야 할 ‘_’에 대해서 알고 있습니다.

![image.png](/assets/transformer/11_char_level_GPT(_Self_Attention_Masked_Multi_Head_Attention)/image_6.png)

![image.png](/assets/transformer/11_char_level_GPT(_Self_Attention_Masked_Multi_Head_Attention)/image_7.png)

- prevailed upon the earth에 맞는 레이블의 각각의 input에 다음 글자를 우측의 예시처럼 뽑아사용 할 수 있는데 이것이 ground truth가 됨

![image.png](/assets/transformer/11_char_level_GPT(_Self_Attention_Masked_Multi_Head_Attention)/image_8.png)

- 이를 code로 나타내면.

```python
torch.manual_seed(1337)
batch_size = 4 # how many independent sequences will we process in parallel?
block_length = 16

def get_batch(data, batch_size, block_length):
    # generate a small batch of data of inputs x and


background-image: url("../dijit/geoenrichment/themes/common/images/CloseIconforSelectedVariables.png"); background-position: center; background-repeat: no-repeat; width:15px; height:15px; position:absolute; top:8px; right:5px; display:inline-block;}.dj_rtl .ShoppingCart .ShoppingCartRowCloser {right:auto; left:5px;}.VariableInfo_Header {font-weight:bold;}.VariableInfo_Header, .VariableInfo_Value {color:#666666;}.dj_rtl .VariableInfo_Header, .dj_rtl .VariableInfo_Value {text-align:right;} .VariableInfo_Spacer {height:0.5em;}.SearchTextBox {white-space: nowrap;}.SearchTextBox .dijitInputContainer {display: inline-block; width: 100%; box-sizing: border-box; -moz-box-sizing: border-box; vertical-align: middle;}.SearchTextBox_PromptMode {color: #b6b6b6 !important; font-style: italic;}.SearchTextBox_SearchBox {display: inline-block; position: relative; background: url("../dijit/geoenrichment/themes/common/images/dataSearchIcon.png") no-repeat center center; width: 16px; height: 16px; margin-left: -22px; vertical-align: middle; cursor: pointer;}.dj_rtl .SearchTextBox_SearchBox {margin-left: auto; margin-right: -22px;}.Pagination {}.Pagination_PageAndArrows {position: absolute; top: 0; bottom: 45px; left: 0; right: 0;}.Pagination_Triangle {position: absolute; top: 50%; width: 20px; height: 60px; margin-top: -30px; cursor: pointer; background-position: center center; background-repeat: no-repeat;}.Pagination_TriangleBack {background: url("../dijit/geoenrichment/themes/common/images/leftArrow_Normal.png") no-repeat right center; left:0; float:left; margin-left:20px;}.dj_rtl .Pagination_TriangleBack {background-image: url("../dijit/geoenrichment/themes/common/images/rightArrow_Normal.png"); float:right; right:0; margin-left:auto; margin-right:20px;}.Pagination_TriangleBack:hover {background-image: url("../dijit/geoenrichment/themes/common/images/leftArrow_hover.png");}.dj_rtl .Pagination_TriangleBack:hover {background-image: url("../dijit/geoenrichment/themes/common/images/rightArrow_hover.png");}.Pagination_TriangleForward {background: url("../dijit/geoenrichment/themes/common/images/rightArrow_Normal.png") no-repeat left center; float:right; right:0; margin-right:20px;}.dj_rtl .Pagination_TriangleForward {background-image: url("../dijit/geoenrichment/themes/common/images/leftArrow_Normal.png"); left:0; float:left; margin-left:20px; margin-right:auto;}.Pagination_TriangleForward:hover {background-image: url("../dijit/geoenrichment/themes/common/images/rightArrow_hover.png");}.dj_rtl .Pagination_TriangleForward:hover {background-image: url("../dijit/geoenrichment/themes/common/images/leftArrow_hover.png");}.Pagination_Items {overflow: hidden; position: absolute; top: 0; bottom: 0; left: 50px; right: 50px;}.Pagination_Bullets {position: absolute; bottom: 0px; left: 80px; right: 80px; height: 45px; overflow: hidden; white-space: nowrap; text-align: center; color:#d1d1d1;}.Pagination_Bullet {font-size: 30px; font-weight: bold; margin: 0 3px; cursor: pointer;}.Pagination_BulletCurrent {color: #898989;}.Pagination_SlideAnim {positi


lês cost function ou ainda ordinary least squares é uma função utilizada para medir o quão errado o modelo está, os chamados resíduos. Isto é, consiste no cálculo da distância de cada ponto (distância essa entre as variáveis x e y) em relação a reta de regressão, esse valor é elevado ao quadrado e somado, o total é a quantidade média de erro do modelo.

![](https://i.imgur.com/mVRWWbg.png)

A [MSE](https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMean_squared_error) (Mean squared error) é uma função frequentemente usada para efetuar esse cálculo.
O objetivo da função de custo é medir o desempenho do modelo, pois o custo é maior quando o modelo está com desempenho ruim, dessa forma mede-se os parâmetros que dão o mínimo custo possível.

# Gradient Descent
Com a função de custo tem-se o cálculo da média do erro, para minimizar esse erro e ajustar o modelo, usamos a operação Gradient Descent.

A operação Gradient Descent é utilizada para otimizar os valores coeficientes, assim, minimizando iterativamente o erro do modelo em seus dados de treinamento (training data).
Na prática, a operação Gradient Descent é útil em uma larga quantidade de dados, principalmente em Regressão Linear Multivariável onde se tem uma grande quantidade tanto de linhas, como colunas de dados e que podem não caber na memória.

# Conclusão
Foi dado um conceito mais teórico sobre Regressão Linear Simples, e não entrando muito em suas funções matemáticas. Essa é uma parte inicial, como um “Hello World”, no campo de Machine Learning, pertencente a Supervised Learning , muitas nomenclaturas foram mantidas em inglês devido a sua facilidade em buscas por materiais de estudos e por algumas palavras não terem sido encontradas uma tradução oficial em português.
As referências são materiais que não só foram utilizados como forma de pesquisa nesse post, mas também para melhor aprofundamento sobre o conteúdo, todos são em inglês.

# Fontes de pesquisas:
- [https://youtu.be/nk2CQITm_eo](https://youtu.be/nk2CQITm_eo)
- [https://dzone.com/asset/download/259](https://dzone.com/asset/download/259)
- [https://www.coursera.org/learn/machine-learning](https://www.coursera.org/learn/machine-learning)
- [http://onlinestatbook.com/2/regression/intro.html](http://onlinestatbook.com/2/regression/intro.html)
- [https://www.amazon.com/gp/product/B07335JNW1](https://www.amazon.com/gp/product/B07335JNW1)
- [http://www.stat.yale.edu/Courses/1997-98/101/linreg.htm](http://www.stat.yale.edu/Courses/1997-98/101/linreg.htm)
- [https://www.statisticssolutions.com/what-is-linear-regression](https://www.statisticssolutions.com/what-is-linear-regression)
- [https://ml-cheatsheet.readthedocs.io/en/latest/linear_regression.html](https://ml-cheatsheet.readthedocs.io/en/latest/linear_regression.html)
- [htt


eq id="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.1.3.1.cmml" xref="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.1.3.1"></eq><ci id="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.1.3.2.cmml" xref="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.1.3.2">𝑗</ci><cn id="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.1.3.3.cmml" type="integer" xref="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.1.3.3">1</cn></apply></apply><apply id="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.2.cmml" xref="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.2"><times id="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.2.1.cmml" xref="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.2.1"></times><apply id="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.2.2.cmml" xref="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.2.2"><csymbol cd="ambiguous" id="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.2.2.1.cmml" xref="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.2.2">subscript</csymbol><ci id="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.2.2.2.cmml" xref="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.2.2.2">𝑃</ci><ci id="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.2.2.3.cmml" xref="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.2.2.3">𝑗</ci></apply><apply id="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.2.3.cmml" xref="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.2.3"><csymbol cd="ambiguous" id="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.2.3.1.cmml" xref="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.2.3">subscript</csymbol><ci id="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.2.3.2.cmml" xref="S3.E9.m1.4.4.1.1.2.2.2.2.1.7.2.3.2">𝑞</ci><apply id="S3


"", report.Filename)),
	}, func(opts *s3.PresignOptions) {
		opts.Expires = expiresIn
	})
	if err != nil {
		return nil, fmt.Errorf("cannot presign GetObject request: %w", err)
	}

	return &presignedReq.URL, nil
}
// Copyright (c) 2025 Probo Inc <hello@getprobo.com>.
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.

package probo

import (
	"context"
	"fmt"
	"time"

	"github.com/getprobo/probo/pkg/coredata"
	"github.com/getprobo/probo/pkg/gid"
	"github.com/getprobo/probo/pkg/page"
	"go.gearno.de/kit/pg"
)

type DatumService struct {
	svc *TenantService
}

type CreateDatumRequest struct {
	OrganizationID     gid.GID
	Name               string
	DataClassification coredata.DataClassification
	OwnerID            gid.GID
	VendorIDs          []gid.GID
}

type UpdateDatumRequest struct {
	ID                 gid.GID
	Name               *string
	DataClassification *coredata.DataClassification
	OwnerID            *gid.GID
	VendorIDs          []gid.GID
}

func (s DatumService) Get(
	ctx context.Context,
	datumID gid.GID,
) (*coredata.Datum, error) {
	datum := &coredata.Datum{}

	err := s.svc.pg.WithConn(
		ctx,
		func(conn pg.Conn) error {
			return datum.LoadByID(ctx, conn, s.svc.scope, datumID)
		},
	)

	if err != nil {
		return nil, err
	}

	return datum, nil
}

func (s DatumService) GetByOwnerID(
	ctx context.Context,
	ownerID gid.GID,
) (*coredata.Datum, error) {
	datum := &coredata.Datum{OwnerID: ownerID}

	err := s.svc.pg.WithConn(
		ctx,
		func(conn pg.Conn) error {
			return datum.LoadByOwnerID(ctx, conn, s.svc.scope)
		},
	)

	if err != nil {
		return nil, err
	}

	return datum, nil
}

func (s DatumService) CountForOrganizationID(
	ctx context.Context,
	organizationID gid.GID,
	filter *coredata.DatumFilter,
) (int, error) {
	var count int

	err := s.svc.pg.WithConn(
		ctx,
		func(conn pg.Conn) (err error) {
			data := coredata.Data{}
			count, err = data.CountByOrganizationID(ctx, conn, s.svc.scope, organizationID, filter)
			if err != nil {
				return fmt.Errorf("cannot count data: %w", err)
			}

			return nil
		},
	)

	if err != nil {
		return 0, err
	}

	return count, nil
}

func (s DatumService) ListForOrganizationID(
	ctx context.Context,
	organizationID gid.GID,
	cursor *page.Cursor[coredata.DatumOrderField],


rEach { (container, info) ->
            if (container.startsWith(lowerPrefix)) {
                items.add(PriorityCompletionItem(
                    container,
                    "${info.signature} - ${info.description}",
                    prefix.length,
                    container,
                    CompletionConstants.PRIORITY_STL_CONTAINER,
                    CompletionItemKind.Class
                ))
            }
        }

        return items
    }

    /**
     * 获取算法函数补全
     */
    fun getAlgorithmCompletions(prefix: String): List<CompletionItem> {
        val items = mutableListOf<CompletionItem>()
        val lowerPrefix = prefix.lowercase()

        STL_ALGORITHMS.forEach { (algorithm, func) ->
            if (algorithm.startsWith(lowerPrefix)) {
                items.add(PriorityCompletionItem(
                    algorithm,
                    "${func.signature} - ${func.description}",
                    prefix.length,
                    algorithm,
                    CompletionConstants.PRIORITY_STL_ALGORITHM,
                    CompletionItemKind.Function
                ))
            }
        }

        return items
    }

    /**
     * 获取数学函数补全
     */
    fun getMathCompletions(prefix: String): List<CompletionItem> {
        val items = mutableListOf<CompletionItem>()
        val lowerPrefix = prefix.lowercase()

        MATH_FUNCTIONS.forEach { (function, func) ->
            if (function.startsWith(lowerPrefix)) {
                items.add(PriorityCompletionItem(
                    function,
                    "${func.signature} - ${func.description}",
                    prefix.length,
                    function,
                    CompletionConstants.PRIORITY_FUNCTION,
                    CompletionItemKind.Function
                ))
            }
        }

        return items
    }

    /**
     * 获取IO函数补全
     */
    fun getIOCompletions(prefix: String): List<CompletionItem> {
        val items = mutableListOf<CompletionItem>()
        val lowerPrefix = prefix.lowercase()

        IO_FUNCTIONS.forEach { (function, func) ->
            if (function.startsWith(lowerPrefix)) {
                items.add(PriorityCompletionItem(
                    function,
                    "${func.signature} - ${func.description}",
                    prefix.length,
                    function,
                    CompletionConstants.PRIORITY_FUNCTION,
                    CompletionItemKind.Function
                ))
            }
        }

        return items
    }

    /**
     * 获取宏和常量补全
     */
    fun getMacroCompletions(prefix: String): List<CompletionItem> {
        val items = mutableListOf<CompletionItem>()
        val lowerPrefix = prefix.lowercase()

        COMPETITIVE_MACROS.forEach { (macro, desc) ->
            if (macro.lowercase().startsWith(lowerPrefix)) {
                items.add(PriorityCompletionItem(
                    macro,
                    desc,
                    prefix.length,
                    macro,
                    CompletionConstants.PRIORITY_CONSTANT,
                    CompletionItemKind.Constant
                ))
            }
        }

        return items
    }

    /**
     * 获取容器成员函数补全
     */
    fun getContainerMemberCompletions(containerType: String, prefix: String): List<CompletionItem> {
        val items = mutableListOf<CompletionItem>()
        val lowerPrefix = prefix.lowercase()

        // 清理容器类型名（移除模板参数）
        val cleanType = cleanContainerType(containerType)
        val members = STL_MEMBER_


vmField val RECIPE_TYPES = PylonRegistry(PylonRegistryKey.RECIPE_TYPES).also(::addRegistry)
        @JvmField val RESEARCHES = PylonRegistry(PylonRegistryKey.RESEARCHES).also(::addRegistry)
        @JvmField val ITEM_TAGS = PylonRegistry(PylonRegistryKey.ITEM_TAGS).also(::addRegistry)
        // @formatter:on

        @JvmStatic
        fun <T : Keyed> getRegistry(key: PylonRegistryKey<T>): PylonRegistry<T> {
            return getRegistryOrNull(key) ?: throw IllegalArgumentException("Registry $key not found")
        }

        @JvmStatic
        fun <T : Keyed> getRegistryOrNull(key: PylonRegistryKey<T>): PylonRegistry<T>? {
            @Suppress("UNCHECKED_CAST")
            return registries[key] as? PylonRegistry<T>
        }

        @JvmStatic
        fun addRegistry(registry: PylonRegistry<*>) {
            val key = registry.key
            check(key !in registries) { "Registry $key is already registered" }
            registries[key] = registry
        }
    }
}package io.github.pylonmc.pylon.core.recipe

import io.github.pylonmc.pylon.core.fluid.PylonFluid
import io.github.pylonmc.pylon.core.item.PylonItem
import io.github.pylonmc.pylon.core.recipe.IngredientCalculator.calculateBase
import io.github.pylonmc.pylon.core.recipe.IngredientCalculator.calculateFinal
import io.github.pylonmc.pylon.core.recipe.IngredientCalculator.checkRecursiveDepth
import io.github.pylonmc.pylon.core.registry.PylonRegistry
import io.github.pylonmc.pylon.core.util.isPylonSimilar
import net.kyori.adventure.key.Key
import org.bukkit.inventory.ItemStack
import org.bukkit.inventory.RecipeChoice
import kotlin.math.ceil

/**
 * Used to recursively calculate raw material requirements and
 * along products of items/fluids, supporting amount scaling
 *
 * The two `calculateFinal` methods are the main entry points,
 * It's supposed to only call them from here.
 *
 * How it works:
 *
 *                    Vanilla items (Not support yet)
 *  [calculateFinal] ----------------> [IngredientCalculation.asIngredient]
 *        |
 *        | PylonItems/PylonFluid
 *        ↓
 *  [calculateBase] ---------------------------------------> [Find recipe] <----------------------╮
 *  (calculate out all the inputs, along products)                |                               |
 *  (and the final main product's amount)                         |                               |
 *  (see `baseCalculation`)                                       ↓                               |
 *        |   ←------------------------------------------╮   [Filter inputs and along products]   |
 *        | Finally calculate the actual inputs' amount  |        |                               |
 *        | For example:                                 |        |                               |
 *        | ```                                          |        ↓                               |
 *        | stack.amount = 11 (the arg)                  |   [Try to find ingredients' recipe] ---╯
 *        | baseCalculation = {                          |        |
 *        |     inputs        = [Ax1, Bx13, Cx19]        |        |
 *        |     intermediates = [Mx16, Nx9]              |        ↓
 *        |     outputAmount  = 3                        ╰-- [Merge ingredients and return value]
 *        | }
 *        | ```
 *        | After scaling (×4), it will be:
 *        | baseCalculation = {
 *        |     inputs        = [Ax4, Bx52, Cx76]
 *        |     intermedi


-darkest .coral-Divider--L {
    background-color: rgb(200, 200, 200);
  }
  .coral--darkest .coral-Divider--M,.coral--darkest .coral-Divider--S {
    background-color: rgb(57, 57, 57);
  }

  /**
   * Copyright 2019 Adobe. All rights reserved.
   * This file is licensed to you under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License. You may obtain a copy
   * of the License at http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software distributed under
   * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
   * OF ANY KIND, either express or implied. See the License for the specific language
   * governing permissions and limitations under the License.
   */
  .coral-FixedColumn {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  .coral-FixedColumn-column {
    box-sizing: border-box;
    margin: 0 8px;
    width: 512px;
  }

  /**
   * Copyright 2019 Adobe. All rights reserved.
   * This file is licensed to you under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License. You may obtain a copy
   * of the License at http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software distributed under
   * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
   * OF ANY KIND, either express or implied. See the License for the specific language
   * governing permissions and limitations under the License.
   */
  ._coral-Textfield {
    box-sizing: border-box;
    border: 1px solid;
    border-radius: 4px;
    padding: 5px 11px 7px 11px;
    text-indent: 0;

    min-width: 48px;
    height: 32px;
    width: 192px;

    vertical-align: top;
    margin: 0;
    overflow: visible;
    font-family: adobe-clean, 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Trebuchet MS', 'Lucida Grande', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    text-overflow: ellipsis;

    transition: border-color 130ms ease-in-out, box-shadow 130ms ease-in-out;

    outline: none;

    -webkit-appearance: none;
    -moz-appearance: textfield;
  }
  ._coral-Textfield::placeholder {
      font-weight: 400;
      font-style: italic;
      transition: color 130ms ease-in-out;
      opacity: 1;
    }
  ._coral-Textfield::-ms-input-placeholder {
      font-weight: 400;
      font-style: italic;
      transition: color 130ms ease-in-out;
      opacity: 1;
    }
  ._coral-Textfield:lang(ja)::placeholder, ._coral-Textfield:lang(zh)::placeholder, ._coral-Textfield:lang(ko)::placeholder {
         font-style: normal;
      }
  ._coral-Textfield:lang(ja)::-ms-input-placeholder, ._coral-Text


6.10",
          refinementSolver = "mathsat:5.6.10",
          refinement = Refinement.SEQ_ITP,
          timeoutMs = 0,
        ),
        checker,
      )
    edges.add(
      Edge(
        config_BITWISE_EXPL_NWT_IT_WP_cvc5,
        config_BITWISE_PRED_CART_SEQ_ITP_mathsat,
        if (inProcess) timeoutOrNotSolvableError else anyError,
      )
    )
    edges.add(
      Edge(
        config_BITWISE_EXPL_NWT_IT_WP_Z3,
        config_BITWISE_PRED_CART_SEQ_ITP_mathsat,
        if (inProcess) timeoutOrNotSolvableError else anyError,
      )
    )
    edges.add(
      Edge(
        config_BITWISE_EXPL_NWT_IT_WP_mathsat,
        config_BITWISE_PRED_CART_SEQ_ITP_mathsat,
        if (inProcess) timeoutOrSolverError else anyError,
      )
    )
    val config_BITWISE_PRED_CART_SEQ_ITP_cvc5 =
      ConfigNode(
        "BITWISE_PRED_CART_SEQ_ITP_cvc5:1.0.8-$inProcess",
        baseConfig.adaptConfig(
          inProcess = inProcess,
          domain = Domain.PRED_CART,
          abstractionSolver = "cvc5:1.0.8",
          refinementSolver = "cvc5:1.0.8",
          refinement = Refinement.SEQ_ITP,
          timeoutMs = 0,
        ),
        checker,
      )
    edges.add(
      Edge(
        config_BITWISE_PRED_CART_SEQ_ITP_mathsat,
        config_BITWISE_PRED_CART_SEQ_ITP_cvc5,
        solverError,
      )
    )
    val config_BITWISE_EXPL_SEQ_ITP_mathsat =
      ConfigNode(
        "BITWISE_EXPL_SEQ_ITP_mathsat:5.6.10-$inProcess",
        baseConfig.adaptConfig(
          inProcess = inProcess,
          domain = Domain.EXPL,
          abstractionSolver = "mathsat:5.6.10",
          refinementSolver = "mathsat:5.6.10",
          refinement = Refinement.SEQ_ITP,
          timeoutMs = 0,
        ),
        checker,
      )
    edges.add(
      Edge(
        config_BITWISE_PRED_CART_SEQ_ITP_mathsat,
        config_BITWISE_EXPL_SEQ_ITP_mathsat,
        if (inProcess) timeoutOrNotSolvableError else anyError,
      )
    )
    edges.add(
      Edge(
        config_BITWISE_PRED_CART_SEQ_ITP_cvc5,
        config_BITWISE_EXPL_SEQ_ITP_mathsat,
        if (inProcess) timeoutOrSolverError else anyError,
      )
    )
    val config_BITWISE_EXPL_SEQ_ITP_cvc5 =
      ConfigNode(
        "BITWISE_EXPL_SEQ_ITP_cvc5:1.0.8-$inProcess",
        baseConfig.adaptConfig(
          inProcess = inProcess,
          domain = Domain.EXPL,
          abstractionSolver = "cvc5:1.0.8",
          refinementSolver = "cvc5:1.0.8",
          refinement = Refinement.SEQ_ITP,
          timeoutMs = 0,
        ),
        checker,
      )
    edges.add(
      Edge(config_BITWISE_EXPL_SEQ_ITP_mathsat, config_BITWISE_EXPL_SEQ_ITP_cvc5, solverError)
    )
    val config_FLOAT_EXPL_NWT_IT_WP_cvc5 =
      ConfigNode(
        "FLOAT_EXPL_NWT_IT_WP_cvc5:1


 File upload widget ends */

/* Tasks starts */

.task{
	list-style-type: none;
	margin: 0px;
	padding:0px;
}

.task li{
	padding:10px 10px;
  background-color: #fafafa;
  background: -webkit-gradient(linear, left top, left bottom, from(#fafafa), to(#f6f6f6));
  background: -webkit-linear-gradient(top, #fafafa, #f6f6f6);
  background: -moz-linear-gradient(top, #fafafa, #f6f6f6);
  background: -ms-linear-gradient(top, #fafafa, #f6f6f6);
  background: -o-linear-gradient(top, #fafafa, #f6f6f6);
  background: linear-gradient(top, #fafafa, #f6f6f6);
  border-top: 1px solid #ccc;
}

.task li:first-child{
	border-top: 0px;
}

.task li:hover{
	background: #f0f0f0;
}

.task i{
	width: 17px;
	height: 17px;
	background: #ccc;
	text-align: center;
	border-radius: 50px;
	font-size: 10px;
	line-height: 17px;
}

.task .label{
	margin-left: 5px;
}

.task a{
	color: #999;
}

/* Tasks ends */

/* Referrer - OS and Browser */

.referrer img{
	max-width: 20px;
	width: 20px;
	display: block;
	margin: 0 auto;
}

/* Referrer ends */

/* Latest news */

.latest-news{
	margin: 0px;
	padding: 0px;
	list-style-type: none;
}

.latest-news li{
	border-bottom: 1px solid #ddd;
	padding-bottom: 5px;
	margin-bottom: 5px;
}

.latest-news li:last-child{
	border-bottom: 0px;
	margin-bottom: 0px;
	padding-bottom: 0px;
}

.latest-news h6{
	line-height: 13px;
}

.latest-news h6 span{
	font-weight: normal;
	font-size: 11px;
	color: #666;
}

/* Quick post */

.quick-post{
	margin-top: 20px;
}

/* Project starts */

.project{
	list-style-type: none;
	margin: 0px;
	padding:0px;
}

.project li{
	padding:10px 10px;
  background-color: #fafafa;
  background: -webkit-gradient(linear, left top, left bottom, from(#fafafa), to(#f6f6f6));
  background: -webkit-linear-gradient(top, #fafafa, #f6f6f6);
  background: -moz-linear-gradient(top, #fafafa, #f6f6f6);
  background: -ms-linear-gradient(top, #fafafa, #f6f6f6);
  background: -o-linear-gradient(top, #fafafa, #f6f6f6);
  background: linear-gradient(top, #fafafa, #f6f6f6);
  border-top: 1px solid #ccc;
}

.project li:first-child{
	border-top: 0px;
}

.project li:hover{
	background: #f0f0f0;
}

.project p{
	font-weight: bold;
	margin: 0px !important;
	padding: 0px !important
}

.project .p-meta{
	font-size: 11px;
	font-weight: normal;
	margin-left: 26px !important;
	margin-bottom: 5px !important;
}


KeyGenerator$Skipjack");
        // put("KeyGenerator.BLOWFISH", "org.bouncycastle.jce.provider.JCEKeyGenerator$Blowfish");
        // put("KeyGenerator.TWOFISH", "org.bouncycastle.jce.provider.JCEKeyGenerator$Twofish");
        // put("KeyGenerator.RC2", "org.bouncycastle.jce.provider.JCEKeyGenerator$RC2");
        // put("KeyGenerator.1.2.840.113549.3.2", "org.bouncycastle.jce.provider.JCEKeyGenerator$RC2");
        // put("KeyGenerator.RC4", "org.bouncycastle.jce.provider.JCEKeyGenerator$RC4");
        // put("Alg.Alias.KeyGenerator.ARC4", "RC4");
        // put("Alg.Alias.KeyGenerator.1.2.840.113549.3.4", "RC4");
        // put("KeyGenerator.RC5", "org.bouncycastle.jce.provider.JCEKeyGenerator$RC5");
        // put("Alg.Alias.KeyGenerator.RC5-32", "RC5");
        // put("KeyGenerator.RC5-64", "org.bouncycastle.jce.provider.JCEKeyGenerator$RC564");
        // put("KeyGenerator.RC6", "org.bouncycastle.jce.provider.JCEKeyGenerator$RC6");
        // put("KeyGenerator.RIJNDAEL", "org.bouncycastle.jce.provider.JCEKeyGenerator$Rijndael");
        // END android-removed
        put("KeyGenerator.AES", "org.bouncycastle.jce.provider.JCEKeyGenerator$AES");
        put("KeyGenerator.2.16.840.1.101.3.4.2", "org.bouncycastle.jce.provider.JCEKeyGenerator$AES128");
        put("KeyGenerator.2.16.840.1.101.3.4.22", "org.bouncycastle.jce.provider.JCEKeyGenerator$AES192");
        put("KeyGenerator.2.16.840.1.101.3.4.42", "org.bouncycastle.jce.provider.JCEKeyGenerator$AES256");
        put("KeyGenerator." + NISTObjectIdentifiers.id_aes128_ECB, "org.bouncycastle.jce.provider.JCEKeyGenerator$AES128");
        put("KeyGenerator." + NISTObjectIdentifiers.id_aes128_CBC, "org.bouncycastle.jce.provider.JCEKeyGenerator$AES128");
        put("KeyGenerator." + NISTObjectIdentifiers.id_aes128_OFB, "org.bouncycastle.jce.provider.JCEKeyGenerator$AES128");
        put("KeyGenerator." + NISTObjectIdentifiers.id_aes128_CFB, "org.bouncycastle.jce.provider.JCEKeyGenerator$AES128");
        put("KeyGenerator." + NISTObjectIdentifiers.id_aes192_ECB, "org.bouncycastle.jce.provider.JCEKeyGenerator$AES192");
        put("KeyGenerator." + NISTObjectIdentifiers.id_aes192_CBC, "org.bouncycastle.jce.provider.JCEKeyGenerator$AES192");
        put("KeyGenerator." + NISTObjectIdentifiers.id_aes192_OFB, "org.bouncycastle.jce.provider.JCEKeyGenerator$AES192");
        put("KeyGenerator." + NISTObjectIdentifiers.id_aes192_CFB, "org.bouncycastle.jce.provider.JCEKeyGenerator$AES192");
        put("KeyGenerator." + NISTObjectIdentifiers.id_aes256_ECB, "org.bouncycastle.jce.provider.JCEKeyGenerator$AES256");
        put("KeyGenerator." + NISTObjectIdentifiers.id_aes256_CBC, "org.bouncycastle.jce.provider.JCEKeyGenerator$AES256");
        put("KeyGenerator." + NISTObjectIdentifiers.id_aes256_OFB, "org.bouncycastle.jce.pr


      if( good ){
        ui->label_goodbin->setPixmap(QPixmap(":/icons/good.png"));
      }else{
        ui->label_goodbin->setPixmap(QPixmap(":/icons/bad.png"));
      }
    }
  }
  else if(ui->radio_rec->isChecked()){
    good = true; //a valid app is always selected on this page if it is available
  }
  else if(ui->combo_apps->count() > 0 && !ui->combo_apps->currentData().toString().isEmpty() ){
      good=true;
  }
  ui->tool_ok->setEnabled(good);
}

void LFileDialog::generateAppList(bool shownetwork){
  //Now load the preferred applications
  XDGDesktopList applist;
    applist.updateList();
  PREFAPPS = getPreferredApplications();
  qDebug() << "Preferred Apps:" << PREFAPPS;
  ui->combo_rec->clear();
  //Now get the application mimetype for the file extension (if available)
  QStringList mimetypes = LXDG::findAppMimeForFile(filePath, true).split("::::"); //use all mimetypes
    mimetypes.removeDuplicates();
  QString defapp = getDefaultApp(mimetypes.first()); //default application
  if(!defapp.isEmpty() && !PREFAPPS.contains(defapp) ){ PREFAPPS << defapp; } //ensure this is listed in the preferred apps list
  //Now add all the detected applications
  QHash< QString, QList<XDGDesktop*> > hash = LXDG::sortDesktopCats( applist.apps(false,true) );
  QStringList cat = hash.keys();
  cat.sort(); //sort alphabetically
  ui->combo_apps->clear();
  for(int c=0; c<cat.length(); c++){
    QList<XDGDesktop*> app = hash[cat[c]];
    if(app.length()<1){ continue; }
    if(ui->combo_apps->count() >1){ ui->combo_apps->insertSeparator(ui->combo_apps->count()); }
    ui->combo_apps->addItem(translateCat(cat[c]));
    ui->combo_apps->insertSeparator(ui->combo_apps->count());
    for(int a=0; a<app.length(); a++){
      if(shownetwork && (cat[c].toLower()=="network" || cat[c].toLower()=="utility") ){
	//Need to show preferred internet applications - look for ones that handle URL's
	if(app[a]->exec.contains("%u") || app[a]->exec.contains("%U")){
          //qDebug() << "Add to Preferred Apps:" << app[a]->filePath;
          PREFAPPS << app[a]->filePath;
	}
      }
      ui->combo_apps->addItem(LXDG::findIcon(app[a]->icon, "application-x-desktop"), app[a]->name, app[a]->filePath);
      //Check to see if this app matches the mime type
      if(!mimetypes.isEmpty()){
        QStringList tmp = mimetypes; tmp << app[a]->mimeList;
        if(tmp.removeDuplicates() > 0 ){
          // also put this app in the preferred list
          //qDebug() << "Mimetype match:" << mimetypes << app[a]->mimeList;
	  PREFAPPS.append(app[a]->filePath);
	  //If this is the first preferred app found - select this app initially
	  if(ui->combo_apps->currentIndex()<=0){ ui->combo_apps->setCurrentIndex(ui->combo_apps->count()-1); }
        }
      }
    }
  }
  if(ui->combo_apps->currentIndex()<=0){ ui->combo_apps->setCurrentIndex(2); } //Start on the first "real" app - not the first category header
  //Now add all the preferred applications
  PREFAPPS.removeDuplicate


"links":[
  	{
  		"rel":"self",
  		"href":"{id}"
  	}
  ]
}

And a resource was requested from somesite.com:

GET /foo/

With a response of:

Content-Type: application/json; describedby=/schema-for-this-data
[
  {"id":"bar", "name":"This representation can be safely treated \
        as authoritative "},
  {"id":"/baz", "name":"This representation should not be treated as \
        authoritative the user agent should make request the resource\
        from "/baz" to ensure it has the authoritative representation"},
  {"id":"http://othersite.com/something", "name":"This representation\
        should also not be treated as authoritative and the target\
        resource representation should be retrieved for the\
        authoritative representation"}
]

 TOC

8.
IANA Considerations

   The proposed MIME media type for JSON Schema is application/schema+json

   Type name: application

   Subtype name: schema+json

   Required parameters: describedby

   	The value of the describedby parameter should be a URI (relative or absolute) that
   	refers to the schema used to define the structure of this structure (the
   	meta-schema). Normally the value would be http://json-schema.org/hyper-schema,
   	but it is allowable to use other schemas that extend the hyper schema's meta-
   	schema.

   Optional parameters: pretty

   	The value of the pretty parameter may be true or false to indicate if additional
   	whitespace has been included to make the JSON representation easier to read.

 TOC

8.1.
Registry of Link Relations

This registry is maintained by IANA per RFC 4287 and this specification adds
three values: "full", "create", "instances".  New
   assignments are subject to IESG Approval, as outlined in [RFC5226].
   Requests should be made by email to IANA, which will then forward the
   request to the IESG, requesting approval.

<table summary="layout" cellpadding="0" ce


		value, err = snapshot.Get(reg.Key)
		require.NoError(t, err)
		require.Equal(t, reg.Value, value)

		// test get non existing register
		unknownReg := unittest.MakeOwnerReg("unknown", "unknown")
		store.On("GetRegister", header.Height, header.ID(), unknownReg.Key).
			Return(nil, fmt.Errorf("fail: %w", storage.ErrNotFound)).Once()

		value, err = snapshot.Get(unknownReg.Key)
		require.NoError(t, err)
		require.Nil(t, value)

		// test get non existing register from cache
		_, err = snapshot.Get(unknownReg.Key)
		require.NoError(t, err)
		require.Nil(t, value)

		// test getting storage.ErrHeightNotIndexed error
		heightNotIndexed := unittest.MakeOwnerReg("height not index", "height not index")
		store.On("GetRegister", header.Height, header.ID(), heightNotIndexed.Key).
			Return(nil, fmt.Errorf("fail: %w", storage.ErrHeightNotIndexed)).
			Twice() // to verify the result is not cached

		// verify getting the correct error
		_, err = snapshot.Get(heightNotIndexed.Key)
		require.ErrorIs(t, err, storage.ErrHeightNotIndexed)

		// verify result is not cached
		_, err = snapshot.Get(heightNotIndexed.Key)
		require.ErrorIs(t, err, storage.ErrHeightNotIndexed)

		// test getting storage.ErrNotExecuted error
		heightNotExecuted := unittest.MakeOwnerReg("height not executed", "height not executed")
		counter := atomic.NewInt32(0)
		store.
			On("GetRegister", header.Height, header.ID(), heightNotExecuted.Key).
			Return(func(uint64, flow.Identifier, flow.RegisterID) (flow.RegisterValue, error) {
				counter.Inc()
				// the first call should return error
				if counter.Load() == 1 {
					return nil, fmt.Errorf("fail: %w", storehouse.ErrNotExecuted)
				}
				// the second call, it returns value
				return heightNotExecuted.Value, nil
			}).
			Times(2)

		// first time should return error
		_, err = snapshot.Get(heightNotExecuted.Key)
		require.ErrorIs(t, err, storehouse.ErrNotExecuted)

		// second time should return value
		value, err = snapshot.Get(heightNotExecuted.Key)
		require.NoError(t, err)
		require.Equal(t, heightNotExecuted.Value, value)

		// third time should be cached
		value, err = snapshot.Get(heightNotExecuted.Key)
		require.NoError(t, err)
		require.Equal(t, heightNotExecuted.Value, value)

		store.AssertExpectations(t)
	})

}
package storehouse

import (
	"fmt"
	"math/rand"
	"sync"
	"testing"

	"github.com/stretchr/testify/require"

	"github.com/onflow/flow-go/model/flow"
	"github.com/onflow/flow-go/utils/unittest"
)

// 1. SaveRegisters should fail if height is below or equal to pruned height
func TestInMemoryRegisterStore(t *testing.T) {
	t.Run("FailBelowOrEqualPrunedHeight", func(t *testing.T) {
		t.Parallel()
		// 1.
		pruned := uint64(10)
		lastID := unittest.IdentifierFixture()
		store := NewInMemoryRegisterStore(pruned, lastID)
		err := store.SaveRegisters(
			pruned-1, // below pruned pruned, will fail
			unittest.IdentifierFixture(),
			unittest.IdentifierFixture(),
			flow.RegisterEntries{},
		)
		require.Error(t, err)
		require.Contains(t, err.Error(), "<= pruned height")

		err = store.SaveRegist


/****************************************************************************
* Copyright (c) 2022, CEA
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/

#ifndef Champ_val_tot_sur_vol_VEF_included
#define Champ_val_tot_sur_vol_VEF_included

#include <Champ_val_tot_sur_vol_base.h>

/*! @brief classe Champ_val_tot_sur_vol_VEF derivee de Champ_val_tot_sur_vol_base Evaluation Somme_vol_poro_loc :
 *
 *      sommation de vol_entrelaces*poro_surface pour les faces contenues dans la localisation loc
 *
 *
 *
 */
class Champ_val_tot_sur_vol_VEF : public Champ_val_tot_sur_vol_base
{

  Declare_instanciable(Champ_val_tot_sur_vol_VEF);

public:

  DoubleVect& eval_contrib_loc(const Domaine_dis_base& zdis,const Domaine_Cl_dis_base& zcldis,DoubleVect& vol) override;
};

#endif


iFilters.addAll(ABIS.keys)
        externalNativeBuild.cmake.arguments(
            "-DPYTHON_CROSS_DIR=$PYTHON_CROSS_DIR",
            "-DPYTHON_VERSION=$PYTHON_VERSION")
    }

    externalNativeBuild.cmake {
        path("src/main/c/CMakeLists.txt")
    }

    // Set this property to something non-empty, otherwise it'll use the default
    // list, which ignores asset directories beginning with an underscore.
    aaptOptions.ignoreAssetsPattern = ".git"

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = "1.8"
    }
}

dependencies {
    implementation("androidx.appcompat:appcompat:1.6.1")
    implementation("com.google.android.material:material:1.11.0")
    implementation("androidx.constraintlayout:constraintlayout:2.1.4")
}

// Create some custom tasks to copy Python and its standard library from
// elsewhere in the repository.
androidComponents.onVariants { variant ->
    generateTask(variant, variant.sources.assets!!) {
        into("python") {
            for (triplet in ABIS.values) {
                for (subDir in listOf("include", "lib")) {
                    into(subDir) {
                        from("$PYTHON_CROSS_DIR/$triplet/prefix/$subDir")
                        include("python$PYTHON_VERSION/**")
                        duplicatesStrategy = DuplicatesStrategy.EXCLUDE
                    }
                }
            }
            into("lib/python$PYTHON_VERSION") {
                // Uncomment this to pick up edits from the source directory
                // without having to rerun `make install`.
                // from("$PYTHON_DIR/Lib")
                // duplicatesStrategy = DuplicatesStrategy.INCLUDE

                into("site-packages") {
                    from("$projectDir/src/main/python")
                }
            }
        }
        exclude("**/__pycache__")
    }

    generateTask(variant, variant.sources.jniLibs!!) {
        for ((abi, triplet) in ABIS.entries) {
            into(abi) {
                from("$PYTHON_CROSS_DIR/$triplet/prefix/lib")
                include("libpython*.*.so")
                include("lib*_python.so")
            }
        }
    }
}

fun generateTask(
    variant: ApplicationVariant, directories: SourceDirectories,
    configure: GenerateTask.() -> Unit
) {
    val taskName = "generate" +
        listOf(variant.name, "Python", directories.name)
            .map { it.replaceFirstChar(Char::uppercase) }
            .joinToString("")

    directories.addGeneratedSourceDirectory(
        tasks.register<GenerateTask>(taskName) {
            into(outputDir)
            configure()
        },
        GenerateTask::outputDir)
}

// addGeneratedSourceDirectory requires the task to have a DirectoryProperty.
abstract class GenerateTask: Sync() {
    @get:OutputDirectory
    abstract val outputDir: DirectoryProperty
}
package com.carriez.flutter_hbb

import android.Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
import android.Manifest.permission.SYSTEM_ALERT_WINDOW
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.os.Build
import android.util.Log
import android.widget.Toast
import