'isRadio', true,
					'checked', self:IsLootType("roundrobin")
				);

			elseif value == "MENU_GROUP_THRESHOLD" then
				local mnuGroupThrshldDesc, mnuGroupThrshldThrshld, mnuGroupThrshldHex
				for j=0,6 do

					mnuGroupThrshldDesc = self.data.LootColorTable[j].Desc;
					mnuGroupThrshldThrshld = self.data.LootColorTable[j].Threshold;
					mnuGroupThrshldHex = self.data.LootColorTable[j].Hex;

					dewdrop:AddLine(
						'text', format("%s%s", mnuGroupThrshldHex, mnuGroupThrshldDesc .. "(" .. mnuGroupThrshldThrshld .. ")"),
						'func', function(val) self:SetLootThreshold(val) end,
						'arg1', mnuGroupThrshldThrshld,
						'isRadio', true,
						'checked', self:IsLootThreshold(mnuGroupThrshldThrshld)
					);

				end
			end
		end
	end
end

function GroupFu:UpdateData()
	if (GetNumPartyMembers() > 0) or (GetNumRaidMembers() > 0) then
		self.tmpdata.LootType = GetLootMethod();
		self.tmpdata.Threshold = GetLootThreshold();
	else
		self.tmpdata.LootType, self.tmpdata.Threshold = nil, nil;
	end

	local i, highRoll, rollLink;
	highRoll = 0;
	if(self.tmpdata.RollCount > 0) then

		for i = 1, self.tmpdata.RollCount do

			if ((self.tmpdata.Rolls[i].Roll > highRoll) and ((not self.data.StandardRollsOnly) or ((self.tmpdata.Rolls[i].Min == 1) and (self.tmpdata.Rolls[i].Max == 100))))  then

				highRoll = self.tmpdata.Rolls[i].Roll;
				rollLink = i;

			end
		end

		self.tmpdata.LastWinner = self.tmpdata.Rolls[rollLink].Player .. " [" .. FuBarUtils.Colorize("00FF00", highRoll) .. "]";

		if((self.tmpdata.Rolls[rollLink].Min ~= 1) or (self.tmpdata.Rolls[rollLink].Max ~= 100)) then

			self.tmpdata.LastWinner = self.tmpdata.LastWinner .. " (" .. self.tmpdata.Rolls[rollLink].Min .. "-" .. self.tmpdata.Rolls[rollLink].Max .. ")";

		end

	else

		self.tmpdata.LastWinner = nil;

	end
end

function GroupFu:UpdateText()
	if self.data.TextMode == "ROLLSFU" then

		if self.tmpdata.LastWinner ~= nil then

			if self.data.ShowRollCount then

				if GetNumRaidMembers() > 0 then

					self:SetText( string.format(self.loc.FORMAT_TEXT_ROLLCOUNT, self.tmpdata.LastWinner, self.tmpdata.RollCount, GetNumRaidMembers()) );

				elseif GetNumPartyMembers() > 0 then

					self:SetText( string.format(self.loc.FORMAT_TEXT_ROLLCOUNT, self.tmpdata.LastWinner, self.tmpdata.RollCount, GetNumPartyMembers()+1) );

				else

					self:SetText(self.tmpdata.LastWinner);

				end

			else

				self:SetText(self.tmpdata.LastWinner);

			end

		else

			self:SetText(self.loc.TEXT_NOROLLS);

		end

	elseif self.data.TextMode == "LOOTTYFU" then

			if self.tmpdata.LootType == solo then
				self:SetText(string.format("%s%s", "|cff888888", sel


5 0 000 1Zm2.71-2.813a.7.7 0 11-1.4 0 .7.7 0 011.4 0Zm13.04 11.773c3.287 1.984 5.151 4.918 4.165 6.551-.987 1.634-4.451 1.35-7.738-.634-3.286-1.985-5.15-4.918-4.164-6.552.986-1.634 4.45-1.35 7.737.635Zm1.032 4.048a1 1 0 11-2 0 1 1 0 012 0Zm-2.454-.732a.453.453 0 100-.906.453.453 0 000 .906Zm-2.691-2.127a.447.447 0 11-.894 0 .447.447 0 01.894 0Zm1.042 1.673a.768.768 0 100-1.536.768.768 0 000 1.536Zm4.09-14.71c1.645 3.519 1.562 7.034-.188 7.852-1.749.819-4.5-1.37-6.147-4.889-1.646-3.518-1.562-7.033.187-7.852 1.75-.818 4.502 1.371 6.148 4.89ZM30.3 17.076a1 1 0 11-2 0 1 1 0 012 0Zm-2.5-1.48a.5.5 0 100-1 .5.5 0 000 1Zm3.076 3.954a.7.7 0 11-1.4 0 .7.7 0 011.4 0ZM20.568 30.933c1.784 3.549 1.8 7.145.035 8.032-1.764.887-4.64-1.271-6.425-4.82-1.784-3.55-1.8-7.145-.036-8.032 1.765-.887 4.642 1.27 6.426 4.82Zm-2.11 2.087a1 1 0 11-2 0 1 1 0 012 0Zm-1.085-1.897a.453.453 0 100-.906.453.453 0 000 .906Zm-1.206-1.496a.5.5 0 11-1 0 .5.5 0 011 0Zm2.7 6.209a.7.7 0 100-1.4.7.7 0 000 1.4Z"/><path d="M48 0H0v48h48V0ZM24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Z"/></g></svg>';
  static const String malaria_mixed_microscope_outline =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" preserveAspectRatio="xMidYMid meet" viewBox="0 0 48 48"><path fill="currentColor" fill-rule="evenodd" d="M42 24c0 9.941-8.059 18-18 18S6 33.941 6 24 14.059 6 24 6s18 8.059 18 18Zm2 0c0 11.046-8.954 20-20 20S4 35.046 4 24 12.954 4 24 4s20 8.954 20 20Zm-27.831-4.807c-1.345 1.04-2.696 1.645-3.727 1.85-.694.139-1.02.07-1.144.025-.011-.13.004-.464.312-1.1.459-.946 1.386-2.1 2.73-3.14 1.345-1.04 2.697-1.645 3.727-1.85.695-.139 1.02-.07 1.144-.025.012.13-.003.464-.312 1.1-.459.946-1.386 2.1-2.73 3.14Zm1.222 1.583c-3.071 2.373-6.518 3.06-7.


ile] ??= []).add(
    new Edit.insert(token.offset, expectedComment),
  );
}

Map<Uri, List<Edit>> edits = {};

enum EditType { Insert, Delete }

class Edit implements Comparable<Edit> {
  final int offset;
  final int? length;
  final String? insertData;
  final EditType editType;
  Edit.insert(this.offset, this.insertData)
    : editType = EditType.Insert,
      length = null;
  Edit.delete(this.offset, this.length)
    : editType = EditType.Delete,
      insertData = null;

  @override
  int compareTo(Edit other) {
    if (offset != other.offset) {
      return offset - other.offset;
    }
    throw "Why did this happen?";
  }

  @override
  String toString() {
    return "Edit[$editType @ $offset]";
  }
}

class TestIncrementalCompiler extends IncrementalCompiler {
  TestIncrementalCompiler(CompilerContext context) : super(context);

  @override
  IncrementalKernelTarget createIncrementalKernelTarget(
    api.FileSystem fileSystem,
    bool includeComments,
    DillTarget dillTarget,
    UriTranslator uriTranslator,
  ) {
    return new TestIncrementalKernelTarget(
      context,
      fileSystem,
      /* includeComments = */ true,
      dillTarget,
      uriTranslator,
    );
  }
}

class TestIncrementalKernelTarget extends IncrementalKernelTarget {
  TestIncrementalKernelTarget(
    CompilerContext compilerContext,
    api.FileSystem fileSystem,
    bool includeComments,
    DillTarget dillTarget,
    UriTranslator uriTranslator,
  ) : super(
        compilerContext,
        fileSystem,
        includeComments,
        dillTarget,
        uriTranslator,
      );

  @override
  SourceLoader createLoader() =>
      new TestSourceLoader(fileSystem, includeComments, this);

  @override
  void runBuildTransformations() {
    // Don't do any transformations!
  }
}

class TestSourceLoader extends SourceLoader {
  TestSourceLoader(
    api.FileSystem fileSystem,
    bool includeComments,
    KernelTarget target,
  ) : super(fileSystem, includeComments, target);

  @override
  Future<Token> tokenize(
    SourceCompilationUnit sourceCompilationUnit, {
    bool suppressLexicalErrors = false,
    bool allowLazyStrings = true,
  }) async {
    Token result = await super.tokenize(
      sourceCompilationUnit,
      suppressLexicalErrors: suppressLexicalErrors,
      allowLazyStrings: allowLazyStrings,
    );
    cache[sourceCompilationUnit.fileUri] = result;
    return result;
  }
}
// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:convert';
import 'dart:typed_data' show Uint8List;

import 'package:_fe_analyzer_shared/src/scanner/error_token.dart';
import 'package:_fe_analyzer_shared/src/scanner/errors.dart';
import 'package:_fe_analyzer_shared/src/scanner/scanner.dart'
    as usedForFuzzTesting;
import 'package:_fe_analyzer_shared/src/scanner/scanner.dart';
import 'package:_fe_analyzer_shared/src/scanner/token.dart';
import 'package:_fe_analyzer_shared/src/scanner/token_constants.dart';
import 'package:front_end/src/codes/cfe_codes.dart';
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';

import 'scanner_test.dart';

void main() {
  defineReflectiveSuite(() {
    defineReflectiveTests(ScannerTest_Cfe);
    defineReflective


bd'2bcd8b3b_u128},
        {Sign::POS, -150, 0x900000a2'0000f300'019a1002'e21cd235_u128},
        {Sign::POS, -150, 0x940000ab'200107d1'571ee468'a3d1394e_u128},
        {Sign::POS, -150, 0x980000b4'80011dca'aca7bbae'71e4988b_u128},
        {Sign::POS, -150, 0x9c0000be'200134f4'0234ce14'4d5ea7f0_u128},
        {Sign::POS, -150, 0xa00000c8'00014d55'57c6555a'37555f82_u128},
        {Sign::POS, -150, 0xa40000d2'200166f6'ad5c8cc0'30ed5744_u128},
        {Sign::POS, -150, 0xa80000dc'800181e0'02f7b106'3b5a273b_u128},
        {Sign::POS, -150, 0xac0000e7'20019e19'5898006c'57dec76f_u128},
        {Sign::POS, -150, 0xb00000f2'0001bbaa'ae3dbab2'87cdefe3_u128},
        {Sign::POS, -150, 0xb40000fd'2001da9c'03e92118'cc8a789f_u128},
        {Sign::POS, -150, 0xb8000108'8001faf5'599a765f'2787b9aa_u128},
        {Sign::POS, -150, 0xbc000114'20021cbe'af51fec5'9a49eb0a_u128},
        {Sign::POS, -150, 0xc0000120'00024000'0510000c'266684c6_u128},
        {Sign::POS, -150, 0xc400012c'200264c1'5ad4c172'cd849ee9_u128},
        {Sign::POS, -150, 0xc8000138'80028b0a'b0a08bb9'915d5179_u128},
        {Sign::POS, -150, 0xcc000145'2002b2e4'0673a920'73bc1480_u128},
        {Sign::POS, -150, 0xd0000152'0002dc55'5c4e6567'767f2009_u128},
        {Sign::POS, -150, 0xd400015f'20030766'b2310dce'9b97cc1d_u128},
        {Sign::POS, -150, 0xd800016c'80033420'081bf115'e50af0c7_u128},
        {Sign::POS, -150, 0xdc00017a'20036289'5e0f5f7d'54f14614_u128},
        {Sign::POS, -150, 0xe0000188'000392aa'b40baac4'ed77c410_u128},
        {Sign::POS, -150, 0xe4000196'2003c48c'0a11262c'b0e002c7_u128},
        {Sign::POS, -150, 0xe80001a4'8003f835'60202674'a1809a47_u128},
        {Sign::POS, -150, 0xec0001b3'20042dae'b63901dc'c1c582a0_u128},
        {Sign::POS, -150, 0xf00001c2'00046500'0c5c1025'143073df_u128},
        {Sign::POS, -150, 0xf40001d1'20049e31'6289aa8d'9b594616_u128},
        {Sign::POS, -150, 0xf80001e0'8004d94a'b8c22bd6'59ee5155_u128},
        {Sign::POS, -150, 0xfc0001f0'20051654'0f05f03f'52b4cdae_u128},
        {Sign::POS, -149, 0x80000100'0002aaaa'b2aaaac4'4444999a_u128},

    }};
// > P = fpminimax((log(1 + x) - x)/x^2,


       owner.baseAttrs.PAtk -= pAtkAmount;
                owner.baseAttrs.MAtk -= mAtkAmount;
                pMoveSpeedAmount += owner.baseAttrs.MoveSpeed * p.param[0];
                pAtkAmount += owner.baseAttrs.PAtk * p.param[0];
                mAtkAmount += owner.baseAttrs.MAtk * p.param[1];
                owner.baseAttrs.MoveSpeed += pMoveSpeedAmount;
                owner.baseAttrs.PAtk += pAtkAmount;
                owner.baseAttrs.MAtk += mAtkAmount;
                owner.ApplyBaseAttrs();
                pCount++;
            }
            else
            {
                pDuration = p.duration;
            }
        }
        else if (e == NTGBattlePassive.Event.PassiveRemove)
        {
            owner.baseAttrs.MoveSpeed -= pMoveSpeedAmount;
            owner.baseAttrs.PAtk -= pAtkAmount;
            owner.baseAttrs.MAtk -= mAtkAmount;
            owner.ApplyBaseAttrs();
            Release();
        }

    }

    private IEnumerator doCount()
    {
        while(pDuration > 0)
        {
            yield return new WaitForSeconds(0.1f);
            pDuration -= 0.1f;
        }

        owner.baseAttrs.MoveSpeed -= pMoveSpeedAmount;
        owner.baseAttrs.PAtk -= pAtkAmount;
        owner.baseAttrs.MAtk -= mAtkAmount;
        owner.ApplyBaseAttrs();

        Release();
    }
}


= TW_KEY_RETURN;
                    break;
                case GLFW_KEY_KP_DIVIDE:
                    if( testkp )
                        k = '/';
                    break;
                case GLFW_KEY_KP_MULTIPLY:
                    if( testkp )
                        k = '*';
                    break;
                case GLFW_KEY_KP_SUBTRACT:
                    if( testkp )
                        k = '-';
                    break;
                case GLFW_KEY_KP_ADD:
                    if( testkp )
                        k = '+';
                    break;
                case GLFW_KEY_KP_DECIMAL:
                    if( testkp )
                        k = '.';
                    break;
                case GLFW_KEY_KP_EQUAL:
                    if( testkp )
                        k = '=';
                    break;
                }
            }

            if( k>0 )
                handled = TwKeyPressed(k, mod);
        }
    }

    return handled;
}

int TW_CALL TwEventCharGLFW(int glfwChar, int glfwAction)
{
    if( glfwAction==GLFW_PRESS && (glfwChar & 0xff00)==0 )
        return TwKeyPressed(glfwChar, g_KMod);

    return 0;
}

// functions with __cdecl calling convension
TW_API int TW_CDECL_CALL TwEventMouseButtonGLFWcdecl(int glfwButton, int glfwAction)
{
    return TwEventMouseButtonGLFW(glfwButton, glfwAction);
}
TW_API int TW_CDECL_CALL TwEventKeyGLFWcdecl(int glfwKey, int glfwAction)
{
    return TwEventKeyGLFW(glfwKey, glfwAction);
}
TW_API int TW_CDECL_CALL TwEventCharGLFWcdecl(int glfwChar, int glfwAction)
{
    return TwEventCharGLFW(glfwChar, glfwAction);
}
TW_API int TW_CDECL_CALL TwEventMousePosGLFWcdecl(int mouseX, int mouseY)
{
    return TwMouseMotion(mouseX, mouseY);
}
TW_API int TW_CDECL_CALL TwEventMouseWheelGLFWcdecl(int wheelPos)
{
    return TwMouseWheel(wheelPos);
}


px;height:64px;border:1px solid #dcdfe6;border-radius:8px;margin:0 auto;padding-left:24px;box-sizing:border-box;padding-right:16px;margin-bottom:16px;cursor:pointer}.update-info-item .update-icon[data-v-4bfcc036]{width:32px;height:32px;font-size:32px;color:#53c41a}.update-info-item .update-right[data-v-4bfcc036]{width:18px;height:64px;line-height:64px;color:#bfbfbf;font-size:18px;float:right}.update-info-item .update-span[data-v-4bfcc036]{cursor:pointer;font-size:16px;font-weight:400;color:#262626;line-height:22px;height:64px;line-height:64px;padding-left:16px}.le-body[data-v-4bfcc036]{height:calc(100vh - 64px);background-color:#f3f5f7;overflow:hidden}.le-body[data-v-4bfcc036] .el-scrollbar__wrap{overflow-x:hidden}.le-body .le-card[data-v-4bfcc036]{margin:24px 120px 74px 120px;height:calc(100% - 98px);background:#fff;border-radius:16px;padding-left:200px;padding-top:64px;padding-right:80px;overflow:hidden}.le-body .le-card .le-pagination[data-v-4bfcc036]{margin-bottom:64px}.le-body .le-card .le-time-item[data-v-4bfcc036]{position:relative}.le-body .le-card .le-time-item .le-dot[data-v-4bfcc036]{width:16px;height:16px;border-radius:50%;position:absolute;left:-8px}.le-body .le-card .le-time-item .le-dot-default[data-v-4bfcc036]{background:#dcdfe6}.le-body .le-card .le-time-item .le-dot-last[data-v-4bfcc036]{background:#623ceb}.le-body .le-card .le-time-item .le-left[data-v-4bfcc036]{position:absolute;left:-135px;text-align:right;width:115px}.le-body .le-card .le-time-item .le-left .le-version[data-v-4bfcc036]{font-size:20px;font-family:Microsoft YaHei;font-weight:400;color:#222;text-align:right}.le-body .le-card .le-time-item .le-left .le-version .le-version-new[data-v-4bfcc036]{display:inline-block;text-align:center;width:42px;height:20px;line-height:20px;background:#623ceb;border-radius:10px 10px 0 10px;font-size:14px;font-family:Microsoft YaHei;font-weight:400;color:#fff}.le-body .le-card .le-time-item .le-left .le-time[data-v-4bfcc036]{font-size:14px;font-family:Microsoft YaHei;font-weight:400;color:#999;text-align:right}.le-body .le-card .le-time-item .le-content[data-v-4bfcc036]{padding-left:28px;padding-bottom:48px}.le-body .le-card .le-time-item .le-content .le-content-header[data-v-4bfcc036]{margin-bottom:10px}.le-body .le-card .le-time-item .le-content .le-host-version span[data-v-4bfcc036]{font-size:14px;font-family:Microsoft YaHei;font-weight:400;color:#623ceb}.le-body .


 this);
			dojo.forEach(oldStyleSheets, this.unloadStyleSheet, this);
		}

		this.setStyle(header ? header.style : undefined);

		this._header = header;
	},

	getStyle: function(){
		return this._header ? this._header.style : undefined;
	},

	setStyle: function(style){
		var values = (Widget.parseStyleValues(style));
		if(this._header){
			var oldValues = Widget.parseStyleValues(this._header.style);
			if(oldValues){
				for(var name in oldValues){
					if(!values[name]){
						values[name] = undefined; // to remove
					}
				}
			}
			this._header.style = style;
		}else{
			this._header = {style: style};
		}
/* TODO: implement Context::setStyle */
//		Widget.setStyleValues(this.container, values); //TODO
	},

	/**
	 * Load the style sheet into the page's DOM.
	 * @param url {string}
	 */
	loadStyleSheet: function(url) {
		var doc = this.getDocument(),
			query = this.getGlobal()["require"]("dojo/query"),
			links = query('link');

		if (links.some(function(val) {
			return val.getAttribute('href') === url;
		})) {
	        // don't add if stylesheet is already loaded in the page
			return;
		}

		dojo.withDoc(doc, function() {
	        var newLink = domConstruct.create('link', {
	            rel: 'stylesheet',
	            type: 'text/css',
	            href: url
	        });
	        // Make sure app.css is the after library CSS files, and content.css is after app.css
	        // FIXME: Shouldn't hardcode this sort of thing
	        var headElem = doc.getElementsByTagName('head')[0],
				isAppCss = url.indexOf('app.css') > -1,
				isContentCss = url.indexOf('content.css') > -1,
				appCssLink, contentCssLink;

			links.forEach(function(link) {
				if(link.href.indexOf('app.css') > -1){
					appCssLink = link;
				}else if(link.href.indexOf('content.css') > -1){
					contentCssLink = link;
				}
			});

			var beforeChild;
			if(!isContentCss){
				if(isAppCss && contentCssLink){
					beforeChild = contentCssLink;
				}else{
					beforeChild = appCssLink;
				}
			}
			if(beforeChild){
				headElem.insertBefore(newLink, beforeChild);
			}else{
		        headElem.appendChild(newLink);
			}
		});
	},

	/**
	 * Remove style sheet from page's DOM.
	 * @param url {string}
	 */
    unloadStyleSheet: function(url) {
    	var userWin = this.getGlobal();
    	if(userWin && userWin["require"]){
    		var query = userWin["require"]("dojo/query");
    		query('link').filter(function(node) {
                return node.getAttribute('href') == url;
    		}).forEach(domConstruct.destroy);
    	}
    },

	addModeledStyleSheet: function(url, skipDomUpdate) {
		if (!skipDomUpdate) {
			this.loadStyleSheet(url);
		}
		if (!this.model.hasStyleSheet(url)) {
			// Make sure app.css is the last CSS file within the list of @import statements
	        // FIXME: Shouldn't hardcode this sort of thing
			var isAppCss = url.indexOf('app.css') > -1;
			var appCssImport;
			var styleElem = this.model.find({elementType: "HTMLElement", tag: 'style'}, true);
			if(styleElem){
				var kids = styleElem.children;
				for(var i=0; i<kids.length; i++){
					if(kids[i].url.indexOf('app.css') > -1){
						appCssImport


eReporter
                .nowhere()
                .warning(
                    "No PICO_SDK_PATH environment variable and no pico-sdk directory "
                        + "at the package root directory. Pico SDK will not be found.");
          }
        }
        cMakeCode.pr("include(pico_sdk_import.cmake)");
        cMakeCode.pr("project(" + executableName + " LANGUAGES C CXX ASM)");
        cMakeCode.newLine();
        // board type for rp2040 based boards
        if (platformOptions.board().setByUser()) {
          if (boardProperties.length < 1 || boardProperties[0].equals("")) {
            cMakeCode.pr("set(PICO_BOARD pico)");
          } else {
            cMakeCode.pr("set(PICO_BOARD \"" + boardProperties[0] + "\")");
          }
        }
        // remove warnings for rp2040 only to make debug easier
        cMakeCode.pr("set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} -w\")");
        break;
      case FLEXPRET:
        if (System.getenv("FP_PATH") == null) {
          messageReporter.nowhere().warning("No FP_PATH environment variable found");
        }
        if (System.getenv("FP_SDK_PATH") == null) {
          messageReporter.nowhere().warning("No FP_SDK_PATH environment variable found");
        }
        cMakeCode.newLine();
        cMakeCode.pr("# Include toolchain file and set project");
        cMakeCode.pr("include($ENV{FP_SDK_PATH}/cmake/riscv-toolchain.cmake)");
        cMakeCode.pr("Project(" + executableName + " LANGUAGES C ASM)");
        cMakeCode.newLine();

        Option<String> selectedBoard = platformOptions.board();
        if (selectedBoard.setByUser()) {
          cMakeCode.pr("# Board selected from target property");
          cMakeCode.pr("set(TARGET " + selectedBoard.value() + ")");
          cMakeCode.newLine();
        } // No TARGET will automatically become emulator

        Option<String> selectedFlashDevice = platformOptions.port();
        if (selectedFlashDevice.setByUser()) {
          cMakeCode.pr("# Flash device selected from target property");
          cMakeCode.pr("set(FP_FLASH_DEVICE " + selectedFlashDevice.value() + ")");
          cMakeCode.newLine();
        } // No FP_FLASH_DEVICE will automatically become /dev/ttyUSB0
        break;
      case PATMOS:
        cMakeCode.newLine();
        cMakeCode.pr("# Include toolchain file and set project");
        cMakeCode.pr(
            "find_program(CLANG_EXECUTABLE NAMES patmos-clang REQUIRED DOC \"Path to the clang"
                + " front-end.\")");

        cMakeCode.pr("set(CMAKE_C_COMPILER ${CLANG_EXECUTABLE})");
        cMakeCode.pr(
            "set(CMAKE_C_FLAGS_RELEASE \"-O2 -DNDEBUG\")"); // patmos-clang cannot compile -O3
        cMakeCode.pr("project(" + executableName + " LANGUAGES C)");
        cMakeCode.newLine();
        break;
      default:
        cMakeCode.pr("project(" + executableName + " LANGUAGES C)");
        cMakeCode.newLine();
    }

    // The Test build type is the Debug type plus coverage generation
    cMakeCode.pr("if(CMAKE_BUILD_TYPE STREQUAL \"Test\")");
    cMakeCode.pr("  set(CMAKE_BUILD_TYPE \"Debug\")");
    cMakeCode.pr("  if(CMAKE_C_COMPILER_ID STREQUAL \"GNU\")");
    cMakeCode.pr("    find_program(LCOV_BIN lcov)");
    cMakeCode.pr("    if(LCOV_BIN MATCHES \"lcov$\")");
    cMakeCode.pr(
        "      set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} --coverage -fprofile-arcs -ftest-coverage\")");


         emailTask.SendEmail(email);
            }
        }

        public static void SendSampleEmail(this IEmailTask emailTask, bool sendAsHtml)
        {
            var email = BuildSampleEmail(sendAsHtml).Build();
            emailTask.SendSampleEmail(email);
        }

        public static void SendSampleSms(this ISmsTask smsTask)
        {
            if (smsTask.CanSendSms)
            {
                smsTask.SendSms("+27219330000", "Well hello there from Xam.Messaging.Plugin.  Some special characters. ÇÇẪ");
            }
        }

        public static void SendSampleBackgroundSms(this ISmsTask smsTask)
        {
            if (smsTask.CanSendSmsInBackground)
            {
                smsTask.SendSmsInBackground("+27219330000", "Well hello there from Xam.Messaging.Plugin. Some special characters. ÇÇẪ");
            }
        }

        public static void SendSampleMultipleSms(this ISmsTask smsTask)
        {
            if (smsTask.CanSendSms)
            {
                smsTask.SendSms("+27219330000;+27219330001", "Well hello there from Xam.Messaging.Plugin");
            }
        }

        #endregion
    }
}


were expected, found 0."));
    let sy = ws.next().unwrap_or_else(|| error(l, "3 components were expected, found 1."));
    let sz = ws.next().unwrap_or_else(|| error(l, "3 components were expected, found 2."));

    let x: Result<f32, _> = FromStr::from_str(sx);
    let y: Result<f32, _> = FromStr::from_str(sy);
    let z: Result<f32, _> = FromStr::from_str(sz);

    let x = x.unwrap_or_else(|e| error(l, &format!("failed to parse `{}' as a f32: {}", sx, e)[..]));
    let y = y.unwrap_or_else(|e| error(l, &format!("failed to parse `{}' as a f32: {}", sy, e)[..]));
    let z = z.unwrap_or_else(|e| error(l, &format!("failed to parse `{}' as a f32: {}", sz, e)[..]));

    Vec3::new(x, y, z)
}

fn parse_f<'a>(l:              usize,
               ws:             Words<'a>,
               coords:         &[Pnt3<f32>],
               uvs:            &[Pnt2<f32>],
               normals:        &[Vec3<f32>],
               ignore_uvs:     &mut bool,
               ignore_normals: &mut bool,
               groups_ids:     &mut Vec<Vec<Pnt3<u32>>>,
               curr_group:     usize) {
    // Four formats possible: v   v/t   v//n   v/t/n
    let mut i = 0;
    for word in ws {
        let mut curr_ids: Vec3<i32> = Bounded::max_value();

        for (i, w) in word.split('/').enumerate() {
            if i == 0 || w.len() != 0 {
                let idx: Result<i32, _> = FromStr::from_str(w);
                match idx {
                    Ok(id) => curr_ids[i] = id - 1,
                    Err(e) => error(l, &format!("failed to parse `{}' as a i32: {}", w, e)[..])
                }
            }
        }

        if i > 2 {
            // on the fly triangulation as trangle fan
            let g = &mut groups_ids[curr_group];
            let p1 = (*g)[g.len() - i];
            let p2 = (*g)[g.len() - 1];
            g.push(p1);
            g.push(p2);
        }

        if curr_ids.y == Bounded::max_value() {
            *ignore_uvs = true;
        }

        if curr_ids.z == Bounded::max_value() {
            *ignore_normals = true;
        }

        // Handle relatives indice
        let x;
        let y;
        let z;

        if curr_ids.x < 0 {
            x = (coords.len() as i32 + curr_ids.x + 1) as u32;
        }
        else {
            x = curr_ids.x as u32;
        }

        if curr_ids.y < 0 {
            y = (uvs.len() as i32 + curr_ids.y + 1) as u32;
        }
        else {
            y = curr_ids.y as u32;
        }

        if curr_ids.z < 0 {
            z = (normals.len() as i32 + curr_ids.z + 1) as u32;
        }
        else {
            z = curr_ids.z as u32;
        }

        groups_ids[curr_group].push(Pnt3::new(x, y, z));

        i = i + 1;
    }

    // there is not enough vertex to form a triangle. Complete it.
    if i < 2 {
        for _ in 0usize .. 3 - i {
            let last = (*groups_ids)[curr_group].last().unwrap().clone();
            groups_ids[curr_group].push(last);
        }
    }
}

fn parse_vt<'a>(l: usize, mut ws: Words<'a>) -> UV {


':'ss",t:"HH:mm",T:"HH:mm:ss",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM yyyy",Y:"MMMM yyyy"},"/":".",":":":",firstDay:1}}}}(this)});
//# sourceMappingURL=kendo.culture.lb-LU.min.js.map
/* @flow */
/* eslint-disable */
//  This file was automatically generated and should not be edited.

export type PostsOrderTypes = 'chronological' | 'popularity' | 'reverse_chronological' | 'score';

export type PublicationStates =
  | 'DELETED_BY_ADMIN'
  | 'DELETED_BY_USER'
  | 'DRAFT'
  | 'MODERATED_TEXT_NEVER_AVAILABLE'
  | 'MODERATED_TEXT_ON_DEMAND'
  | 'PUBLISHED'
  | 'SUBMITTED_AWAITING_MODERATION'
  | 'SUBMITTED_IN_EDIT_GRACE_PERIOD'
  | 'WIDGET_SCOPED';

export type CookieTypes =
  | 'ACCEPT_CGU'
  | 'ACCEPT_LOCALE'
  | 'ACCEPT_PRIVACY_POLICY_ON_DISCUSSION'
  | 'ACCEPT_SESSION_ON_DISCUSSION'
  | 'ACCEPT_TRACKING_ON_DISCUSSION'
  | 'ACCEPT_USER_GUIDELINE_ON_DISCUSSION'
  | 'REJECT_CGU'
  | 'REJECT_LOCALE'
  | 'REJECT_PRIVACY_POLICY_ON_DISCUSSION'
  | 'REJECT_SESSION_ON_DISCUSSION'
  | 'REJECT_TRACKING_ON_DISCUSSION'
  | 'REJECT_USER_GUIDELINE_ON_DISCUSSION';

export type SentimentTypes = 'DISAGREE' | 'DONT_UNDERSTAND' | 'LIKE' | 'MORE_INFO';

export type ExtractStates = 'PUBLISHED' | 'SUBMITTED';

export type SynthesisTypes = 'fulltext_synthesis' | 'synthesis';

export type LangStringEntryInput = {|
  // The unicode encoded string representation of the content.
  value?: ?string,
  // The ISO 639-1 locale code of the language the content represents.
  localeCode: string
|};

export type GaugeChoiceSpecificationInput = {|
  id?: ?string,
  labelEntries: Array<?LangStringEntryInput>,
  value: number
|};

export type SectionTypesEnum =
  | 'ADMINISTRATION'
  | 'CUSTOM'
  | 'DEBATE'
  | 'HOMEPAGE'
  | 'RESOURCES_CENTER'
  | 'SEMANTIC_ANALYSIS'
  | 'SYNTHESES';

export type SelectFieldOptionInput = {|
  // The Relay.Node ID type of the SelectFieldOption object.
  id?: ?string,
  // A list of possible languages of the entity as LangStringEntry objects. The label in multiple languaes.
  labelEntries: Array<?LangStringEntryInput>,
  // The position (order) of the field.
  order: number
|};

export type QuestionInput = {|
  // Id of the question input.
  id?: ?string,
  // A list of possible languages of the entity as LangStringEntry objects. Title of the question in various languages.
  titleEntries: Array<?LangStringEntryInput>
|};

export type IdeaAnnouncementInput = {|
  // A list of possible languages of the entity as LangStringEntry objects. This is the title of announcement in multiple languages.
  titleEntries: Array<?LangStringEntryInput>,
  // A Attachments for the body of announcement in multiple languages. in a given language.
  bodyAttachments?: ?Array<?string>,
  // A list of possible languages of the entity as LangStringEntry objects. This is the body of announcement in multiple languages.
  bodyEntries: Array<?LangStringEntryInput>,
  // A list of possible languages of the entity as LangStringEntry objects. This is the quote of the announcement in multiple languages.
  quoteEntries?: ?Array<?LangStringEntryInput>,
  // A list of possible languages of the entity as LangStringEntry objects. This is the summry of the announcement in multiple languages.
  summaryEntries?: ?Array<?LangStringEntryInput>
|};

export type TokenCategorySpecificationInput = {|
  id?: ?string,
  // A list of possible langu


g[] splitType = _message.Type.Split('|');
                string target = splitType[0];
                _message.Type = splitType[1];
                if (LocalNetCoreRouter.hasEndpoint(target))
                {
                    if (synced)
                    {
                        if (((NetCoreAdvancedMessage)_message).requestGuid == null)
                        {
                            ((NetCoreAdvancedMessage)_message).requestGuid = Guid.NewGuid();
                        }
                    }

                    return LocalNetCoreRouter.Route(target, new NetCoreEventArgs() { message = _message });
                }
            }

            return hub?.SendMessage(_message, synced);
        }

        public void Stop(bool force = false)
        {
            Disposed = true;

            if (!force)
            {
                try
                {
                    tcp?.StopNetworking(!force);
                    DateTime startDT = DateTime.Now;

                    while (tcp?.client != null && ((DateTime.Now - startDT).TotalMilliseconds) < 1500) // wait timeout
                    {
                        Thread.Sleep(50);
                    }
                }
                catch (Exception ex)
                {
                    logger.Error(ex, "Something went terribly wrong when stopping tcp networking");
                }
            }

            try
            {
                tcp?.Kill();
            }
            catch (Exception ex)
            {
                logger.Error(ex, "Something went terribly wrong when killing tcp");
            }
            try
            {
                udp?.Kill();
            }
            catch (Exception ex)
            {
                logger.Error(ex, "Something went terribly wrong when killing udp");
            }
            try
            {
                hub?.Kill();
            }
            catch (Exception ex)
            {
                logger.Error(ex, "Something went terribly wrong when killing hub");
            }
            try
            {
                watch?.Kill();
            }
            catch (Exception ex)
            {
                logger.Error(ex, "Something went terribly wrong when killing watch");
            }

            logger.Debug($"NetCore {(force ? "Killed" : "Stopped")}");
        }

        public void Kill() => Stop(true);

        public void Restart()
        {
            Kill();
            Initialize();
        }

        public void Dispose()
        {
            Stop(true);
            Spec?.Dispose();
            udp?.Dispose();
            tcp?.Dispose();
            hub?.Dispose();
            watch?.Dispose();
        }
    }
}


0447zM512.054275 959.996034h-63.961966V832.073103h63.961966v127.922931z m127.921931 0h-63.960965V832.073103h63.960965z m127.922932 0h-63.960966V832.073103h63.960966z m127.922931 0H831.860103V832.073103h63.961966z m0-255.844862h-639.869656a60.464968 60.464968 0 0 1-63.959966-63.960966V256.422412a60.464968 60.464968 0 0 1 63.959966-63.961965h640.039656a60.464968 60.464968 0 0 1 63.960965 63.961965V640.190206a60.464968 60.464968 0 0 1-63.959965 63.832966z m127.921931 255.844862h-63.960966V832.073103h63.960966z" p-id="25309" fill={globalUtil.getPublicColor()}>
                          </path>
                        </svg>

{formatMessage({ id: 'appOverview.cpu' })}

                        {(resources.cpu && resources.cpu / 1000) || 0}
                        Core

                        <svg t="1743403966601" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="22400" width="50" height="50">
                          <path d="M1024 339.2V256h-83.2V172.8c0-44.8-38.4-83.2-83.2-83.2H768V0h-83.2v83.2h-128V0H467.2v83.2h-128V0H256v83.2H172.8c-44.8 0-83.2 38.4-83.2 83.2V256H0v83.2h83.2v128H0v83.2h83.2v128H0V768h83.2v83.2c0 44.8 38.4 83.2 83.2 83.2H256V1024h83.2v-83.2h128V1024h83.2v-83.2h128V1024H768v-83.2h83.2c44.8 0 83.2-38.4 83.2-83.2V768H1024v-83.2h-83.2v-128H1024V467.2h-83.2v-128H1024z m-172.8 512H172.8V172.8h684.8v678.4h-6.4zM300.8 768h428.8c25.6 0 44.8-19.2 44.8-44.8V300.8c-6.4-25.6-25.6-44.8-51.2-44.8H300.8c-25.6 0-44.8 19.2-44.8 44.8v428.8c0 19.2 19.2 38.4 44.8 38.4z" fill={globalUtil.getPublicColor()} p-id="22401">
                          </path>
                        </svg>

{formatMessage({ id: 'appOverview.disk' })}

                        {showStorageUsed ? `${storageUsed?


{
    ClearChildren();
//    if (model)
//    {
//        model->GetMesh()->Enable(false); // causes crash when game closing
//        delete model;
//    }
}
/**
**  @file tcGoalTracker.cpp
*/
/*
**  Copyright (c) 2014, GCBLUE PROJECT
**  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.
*/

//#include "stdwx.h" // precompiled header file

#ifndef WX_PRECOMP
////#include "wx/wx.h"
#endif

#include <sstream>
#include <fstream>
#include "tcGoalTracker.h"
#include "tcGoal.h"
#include "tcSimState.h"
#include "tcUserInfo.h"
#include "common/tcStream.h"
#include "common/tcObjStream.h"
#include "tcGameStream.h"
#include "tcAllianceInfo.h"
#include "tcGameObject.h"
//#include "wx/xml/xml.h"
#include "tcSensorTrackIterator.h"
#include <sstream>
#include <iomanip>
#include <tinyxml2.h>
#include <cassert>
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// using namespace tinyxml2;
/**
* Singleton accessor
*/
tcGoalTracker* tcGoalTracker::Get()
{
	static tcGoalTracker instance;

	return &instance;
}

/**
* Loads state from update stream
*/
tcUpdateStream& tcGoalTracker::operator<<(tcUpdateStream& stream)
{
	bool allianceFailedPrev = allianceFailed;
	bool allianceSucceededPrev = allianceSucceeded;

	stream >> allianceFailed;
	stream >> allianceSucceeded;
	stream >> goalStatusDescription;

	statusChanged = (allianceFailed != allianceFailedPrev) ||
		            (allianceSucceeded != allianceSucceededPrev);

    return stream;
}

/**
* Saves state to update stream
* alliance value must be stored with stream.SetDetailLevel
*/
tcUpdateStream& tcGoalTracker::operator>>(tcUpdateStream& stream)
{
	int alliance = stream.GetDetailLevel(); // a hack, really should not do


eate_readiness_file()

parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers(dest='mode')

readiness_parser = subparsers.add_parser('readiness')
readiness_parser.add_argument('process_identifier', metavar='PROCESS_IDENTIFIER', type=str,
                              choices=probe_dict.keys())
readiness_parser.add_argument('timeout', metavar='TIMEOUT', type=int)

prep_parser = subparsers.add_parser('prep')

def main():
    args = parser.parse_args()

    if args.mode == 'readiness':
        probe_dict[args.process_identifier].wait_for_ready(DEPLOYMENT_TAK_ROOT, args.timeout)

    elif args.mode == 'prep':
        HelmModifier.enable_integration_testing()

    else:
        parser.print_help()

if __name__ == '__main__':
    main()


";
import { Card } from ".";
import deckMachine, { DeckContext, DeckEvent, DeckSettings } from "./deck-machine";

export default class Deck {
	shuffle(): Deck {
		if (this.service.state.done) throw new Error("Cannot discard from empty deck");
		this.service.send("SHUFFLE");
		return this;
	}

	get cards(): ReadonlyArray<Card> {
		return this.service.state.context.cards;
	}

	discard(): Card {
		if (this.service.state.done) throw new Error("Cannot discard from empty deck");
		const result = this.service.send("DISCARD").context.discarded as Card;
		return result;
	}

	private service: Interpreter<
		DeckContext,
		any,
		DeckEvent,
		{
			value: any;
			context: DeckContext;
		}
	>;

	constructor(settings: DeckSettings = { deckCount: 1 }) {
		this.service = interpret(deckMachine.withContext({ ...deckMachine.context, ...{ settings } })).start();
	}
}
import { Model } from 'mongoose';

const findOrCreate = require('mongoose-findorcreate');

import { Car } from './car';
import { Gender, Genders } from '../enums/genders';
import { Job } from './job';
import { Role } from '../enums/role';
import {
  createModelForClass, mongooseDocument,
  plugin,
  prop,
  Ref,
} from '../../src/typegoose';

export interface FindOrCreateResult<T> {
  created: boolean;
  doc: mongooseDocument<T>;
}

@plugin(findOrCreate)
export class User extends Model {
  @prop({ required: true })
  firstName: string;

  @prop({ required: true })
  lastName: string;

  get fullName() {
    return `${this.firstName} ${this.lastName}`;
  }

  set fullName(full) {
    const split = full.split(' ');
    this.firstName = split[0];
    this.lastName = split[1];
  }

  @prop({ default: 'Nothing' })
  nick?: string;

  @prop({ index: true, unique: true })
  uniqueId?: string;

  @prop({ unique: true, sparse: true })
  username?: string;

  @prop({ expires: '24h' })
  expireAt?: Date;

  @prop({ min: 10, max: 21 })
  age?: number;

  @prop({ enum: Object.values(Genders), required: true })
  gender: Gender;

  @prop({ enum: Role })
  role: Role;

  @prop({ type: () => String, default: Role.Guest })
  roles: Role[];

  @prop()
  job?: Job;

  @prop({ ref: () => Car })
  car?: Ref<Car>;

  @prop({ type: () => String, required: true })
  languages: string[];

  @prop({ type: () => Job })
  previousJobs?: Job[];

  @prop({ ref: () => Car })
  previousCars?: Ref<Car>[];

  static findByAge(age: number) {
    return this.findOne({ age });
  }

  incrementAge() {
    const age = this.age || 1;
    this.age = age + 1;
    return this.save();
  }

  addLanguage() {
    this.languages.push('Hungarian');

    return this.save();
  }

  addJob(job: Job = {}) {
    this.previousJobs.push(job);

    return this.save();
  }

  static findOrCreate: (condition: any) => Promise<FindOrCreateResult<User>>;

}

export const UserModel = createModelForClass(User);

import { toIncludeComparison } from "./toIncludeComparison";
import { Actual } from "../report/Actual";
import { Expected } from "../report/Expected";
import { assert } from "./assert";

/**
 * This method perfoms a memory compare on all relevant items in an array, asserting that a
 * reference that has the same shape as the expected value exists within the array.
 *
 * @param T - The expectation type.
 *


-form-horizontal .uk-form-controls {
    margin-left: 215px;
  }
  /* Better vertical alignment if controls are checkboxes and radio buttons with text */
  .uk-form-horizontal .uk-form-controls-text {
    padding-top: 5px;
  }
}
/* Sub-object: `uk-form-icon`
 ========================================================================== */
.uk-form-icon {
  position: relative;
  display: inline-block;
  max-width: 100%;
}
/*
 * 1. Make form element clickable through icon
 */
.uk-form-icon > [class*='uk-icon-'] {
  position: absolute;
  top: 50%;
  width: 30px;
  margin-top: -7px;
  font-size: 14px;
  color: #999999;
  text-align: center;
  /* 1 */
  pointer-events: none;
}
.uk-form-icon:not(.uk-form-icon-flip) > input {
  padding-left: 30px !important;
}
/*
 * Sub-modifier: `uk-form-icon-flip`
 */
.uk-form-icon-flip > [class*='uk-icon-'] {
  right: 0;
}
.uk-form-icon-flip > input {
  padding-right: 30px !important;
}
/* ========================================================================
   Component: Button
 ========================================================================== */
/*
 * 1. Required for `a` elements
 * 2. Required for `button` and `input` elements
 * 3. `line-height` is used to create a height
 * 4. `min-height` is necessary for `input` elements in Firefox and Opera because `line-height` is not working.
 * 5. Reset button group whitespace hack
 * 6. Style
 */
.uk-button {
  /* 1 */
  display: inline-block;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  vertical-align: middle;
  text-decoration: none;
  text-align: center;
  /* 2 */
  border: none;
  /* 3 */
  line-height: 28px;
  /* 4 */
  min-height: 30px;
  /* 5 */
  font-size: 1rem;
  /* 6 */
  padding: 0 12px;
  background: #f5f5f5;
  color: #444444;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 4px;
  text-shadow: 0 1px 0 #ffffff;
}
/*
 * Hover
 * 1. Apply hover style also to focus state
 * 2. Remove default focus style
 * 3. Required for `a` elements
 */
.uk-button:hover,
.uk-button:focus {
  background-color: #fafafa;
  color: #444444;
  /* 2 */
  outline: none;
  /* 3 */
  text-decoration: none;
  border-color: rgba(0, 0, 0, 0.16);
}
/* Active */
.uk-button:active,
.uk-button.uk-active {
  background-color: #eeeeee;
  color: #444444;
}
/* Color modifiers
 ========================================================================== */
/*
 * Modifier: `uk-button-primary`
 */
.uk-button-primary {
  background-color: #00a8e6;
  color: #ffffff;
}
/* Hover */
.uk-button-primary:hover,
.uk-button-primary:focus {
  background-color: #35b3ee;
  color: #ffffff;
}
/* Active */
.uk-button-primary:active,
.uk-button-primary.uk-active {
  background-color: #0091ca;
  color: #ffffff;
}
/*
 * Modifier: `uk-button-success`
 */
.uk-button-success {
  background-color: #8cc14c;
  color: #ffffff;
}
/* Hover */
.uk-button-success:hover,
.uk-button-success:focus {
  background-color: #8ec73b;
  color: #ffffff;
}
/* Active *


=>{e.exports={en:["Show Hidden Tools"],fr:["Montrer les Outils Cachés"]}},85786:e=>{e.exports={en:["Show Object Tree"],fr:["Afficher l'arborescence des objets"]}},62518:e=>{e.exports={en:["Stay in Drawing Mode"],fr:["Rester en Mode Dessin"]}},50428:e=>{e.exports={en:["Stickers"],fr:["Stickers"]}},94593:e=>{e.exports={en:["Strong Magnet"],fr:["Aimant puissant"]}},46417:e=>{e.exports={en:["Patterns"],fr:["Motifs"]}},36167:e=>{e.exports={en:["Pitchforks"],fr:["Fourches"]}},57118:e=>{e.exports={en:["Remove Drawings"],fr:["Supprimer les dessins"]}},25852:e=>{e.exports={en:["Remove objects"],fr:["Supprimer les objets"]}},2671:e=>{e.exports={en:["Remove options"],fr:["Supprimer les options"]}},85106:e=>{e.exports={en:["Remove from favorites"],fr:["Retirer des favoris"]}},86285:e=>{e.exports={en:["Remove {drawings}"],fr:["Supprimer {drawings}"]}},87796:e=>{e.exports={en:["Remove {drawings} & {indicators}"],fr:["Supprimer {drawings} & {indicators}"]}},87797:e=>{e.exports={en:["Remove {indicators}"],fr:["Supprimer {indicators}"]}},3519:e=>{e.exports={en:["Weak Magnet"],fr:["Aimant faible"]}},65831:e=>{e.exports={en:["Text & Notes"],fr:["Texte & Notes"]}},48773:e=>{e.exports={en:["Trend line tools"],fr:["Outils de lignes de tendances"]}},69260:e=>{e.exports={en:["Volume-based"],fr:["Basé sur le volume"]}},55774:e=>{e.exports={en:["Zoom In"],fr:["Grossissement"]}},37310:e=>{e.exports={en:["Zoom Out"],fr:["Réduction"]}},92949:e=>{e.exports={en:["{hotKey_0} + Click on the chart"],fr:["{hotKey_0} + cliquer sur le graphique"]}},13798:e=>{e.exports={en:["{hotKey_0} — circle"],fr:["{hotKey_0} - cercle"]}},23369:e=>{e.exports={en:["{hotKey_0} — drawing a straight line at angles of 45"],fr:["{hotKey_0} - dessiner une ligne droite à des angles de 45"]}},83042:e=>{e.exports={en:["{hotKey_0} — fixed increments"],fr:["{hotKey_0} - Incréments fixes"]}},10539:e=>{e.exports={en:["{hotKey_0} — square"],fr:["{hotKey_0} - carré"]}},22299:e=>{e.exports={en:["{amount} drawing","{amount} drawings"],fr:["{amount} dessin","{amount} dessins"]}},68984:e=>{e.exports={en:["{amount} indicator","{amount} indicators"],fr:["{amount} indicateur","{amount} indicateurs"]}}}]);"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1754],{89324:(e,o,t)=>{t.r(o),t.d(o,{Components:()=>h,showDefaultSearchDialog:()=>c,showSymbolSearchItemsDialog:()=>s.showSymbolSearchItemsDialog});var a=t(82992),l=(t(32563),t(79652)),n=t(94664),s=t(1861),r=t(64147),i=t(84015);t(56570),t(49483);!(0,i.isOnMobileAppPage)("any")&&window.matchMedia("(min-width: 602px) and (min-height: 445px)"


]=category

        if "Accelerometer" in f:
            df["set"]=acc_set
            acc_set+=1
            acc_df=pd.concat([acc_df, df])
        if "Gyroscope" in f:
            df["set"]=gyr_set
            gyr_set+=1
            gyr_df=pd.concat([gyr_df,df])

    acc_df.index=pd.to_datetime(acc_df["epoch (ms)"], unit="ms")
    gyr_df.index=pd.to_datetime(gyr_df["epoch (ms)"], unit="ms")

    del acc_df["epoch (ms)"]
    del acc_df["time (01:00)"]
    del acc_df["elapsed (s)"]

    del gyr_df["epoch (ms)"]
    del gyr_df["time (01:00)"]
    del gyr_df["elapsed (s)"]

    return acc_df, gyr_df
acc_df, gyr_df=read_data_from_file(file)

# --------------------------------------------------------------
# Merging datasets
# --------------------------------------------------------------
data_merged=pd.concat([acc_df.iloc[:,:3], gyr_df], axis=1)

#---------------------------------------------------------------
# Rename columns
#---------------------------------------------------------------

data_merged.columns = [
    "acc_x",
    "acc_y",
    "acc_z",
    "gyr_x",
    "gyr_y",
    "gyr_z",
    "participants",
    "label",
    "category",
    "set",
]
# --------------------------------------------------------------
# Resample data (frequency conversion)
# --------------------------------------------------------------

# Accelerometer:    12.500HZ
# Gyroscope:        25.000Hz
sampling= {
    "acc_x": "mean",
    "acc_y": "mean",
    "acc_z": "mean",
    "gyr_x": "mean",
    "gyr_y": "mean",
    "gyr_z": "mean",
    "participants": "last",
    "label": "last",
    "category": "last",
    "set": "last"
}

data_merged[:1000].resample(rule="200ms").apply(sampling)

#split by day

days=[g for n, g in data_merged.groupby(pd.Grouper(freq="D"))]

data_resampled= pd.concat([df.resample(rule="200ms").apply(sampling).dropna() for df in days])

data_resampled["set"]=data_resampled["set"].astype("int")
# --------------------------------------------------------------
# Export dataset
# --------------------------------------------------------------
# data_resampled.to_pickle("../../data/interim/01_data_processed.pkl")
#%%

#%%


ch exactly
            // (i.e., invariant if mut):
            self.infcx().eq_tys(a.ty, b.ty).then(|| ok(a) )
          }
          m_imm | m_const {
            // Otherwise we can be covariant:
            self.tys(a.ty, b.ty).chain(|_t| ok(a) )
          }
        }
    }

    fn protos(a: ast::proto, b: ast::proto) -> cres<ast::proto> {
        self.lub().protos(a, b).compare(b, || {
            ty::terr_proto_mismatch(b, a)
        })
    }

    fn purities(f1: purity, f2: purity) -> cres<purity> {
        self.lub().purities(f1, f2).compare(f2, || {
            ty::terr_purity_mismatch(f2, f1)
        })
    }

    fn ret_styles(a: ret_style, b: ret_style) -> cres<ret_style> {
        self.lub().ret_styles(a, b).compare(b, || {
            ty::terr_ret_style_mismatch(b, a)
        })
    }

    fn tys(a: ty::t, b: ty::t) -> cres<ty::t> {
        #debug("%s.tys(%s, %s)", self.tag(),
               a.to_str(*self), b.to_str(*self));
        if a == b { ret ok(a); }
        do indent {
            alt (ty::get(a).struct, ty::get(b).struct) {
              (ty::ty_bot, _) {
                ok(a)
              }
              (ty::ty_var(a_id), ty::ty_var(b_id)) {
                self.infcx().vars(self.tvb, a_id, b_id).then(|| ok(a) )
              }
              (ty::ty_var(a_id), _) {
                self.infcx().vart(self.tvb, a_id, b).then(|| ok(a) )
              }
              (_, ty::ty_var(b_id)) {
                self.infcx().tvar(self.tvb, a, b_id).then(|| ok(a) )
              }
              (_, ty::ty_bot) {
                err(ty::terr_sorts(b, a))
              }
              _ {
                super_tys(self, a, b)
              }
            }
        }
    }

    fn fns(a: ty::fn_ty, b: ty::fn_ty) -> cres<ty::fn_ty> {
        // Rather than checking the subtype relationship between `a` and `b`
        // as-is, we need to do some extra work here in order to make sure
        // that function subtyping works correctly with respect to regions
        // (issue #2263).

        // First, we instantiate each bound region in the subtype with a fresh
        // region variable.
        let {fn_ty: a_fn_ty, _} = {
            do replace_bound_regions_in_fn_ty(self.tcx, @nil, none, a) |br| {
                // N.B.: The name of the bound region doesn't have
                // anything to do with the region variable that's created
                // for it.  The only thing we're doing with `br` here is
                // using it in the debug message.
                let rvar = self.infcx().next_region_var_nb();
                #debug["Bound region %s maps to %s",
                       bound_region_to_str(self.tcx, br),
                       region_to_str(self.tcx, rvar)];
                rvar
            }


me="Addition" file="test.cpp" line="1" status="run" time="0.007" classname="">
      <failure message="Value of: add(1, 1)
  Actual: 3
Expected: 2" type="">...</failure>
      <failure message="Value of: add(1, -1)
  Actual: 1
Expected: 0" type="">...</failure>
    </testcase>
    <testcase name="Subtraction" file="test.cpp" line="2" status="run" time="0.005" classname="">
    </testcase>
  </testsuite>
  <testsuite name="LogicTest" tests="1" failures="0" errors="0" time="0.005">
    <testcase name="NonContradiction" file="test.cpp" line="3" status="run" time="0.005" classname="">
    </testcase>
  </testsuite>
</testsuites>
```

Things to note:

*   The `tests` attribute of a `<testsuites>` or `<testsuite>` element tells how
    many test functions the GoogleTest program or test suite contains, while the
    `failures` attribute tells how many of them failed.

*   The `time` attribute expresses the duration of the test, test suite, or
    entire test program in seconds.

*   The `timestamp` attribute records the local date and time of the test
    execution.

*   The `file` and `line` attributes record the source file location, where the
    test was defined.

*   Each `<failure>` element corresponds to a single failed GoogleTest
    assertion.

#### Generating a JSON Report

GoogleTest can also emit a JSON report as an alternative format to XML. To
generate the JSON report, set the `GTEST_OUTPUT` environment variable or the
`--gtest_output` flag to the string `"json:path_to_output_file"`, which will
create the file at the given location. You can also just use the string
`"json"`, in which case the output can be found in the `test_detail.json` file
in the current directory.

The report format conforms to the following JSON Schema:

```json
{
  "$schema": "https://json-schema.org/schema#",
  "type": "object",
  "definitions": {
    "TestCase": {
      "type": "object",
      "properties": {
        "name": { "type": "string" },
        "tests": { "type": "integer" },
        "failures": { "type": "integer" },
        "disabled": { "type": "integer" },
        "time": { "type": "string" },
        "testsuite": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/TestInfo"
          }
        }
      }
    },
    "TestInfo": {
      "type": "object",
      "properties": {
        "name": { "type": "string" },
        "file": { "type": "string" },
        "line": { "type": "integer" },
        "status": {
          "type": "string",
          "enum": ["RUN", "NOTRUN"]
        },
        "time": { "type": "string" },
        "classname": { "type": "string" },
        "failures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Failure"
          }
        }
      }
    },
    "Failure": {
      "type": "object",
      "properties": {
        "failures": { "type": "string" },
        "type": { "type": "string" }
      }
    }
  },
  "properties": {
    "tests": { "type": "integer" },
    "failures": { "type": "integer" },
    "disabled": { "type": "integer" },
    "errors": { "type": "integer" },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "time": { "type": "string" },
    "name": { "type": "string" },
    "testsuites": {
      "type": "array",


 mont->n0, words, 13);
    }
  }
}
#endif  // OPENSSL_BN_ASM_MONT5 && SUPPORTS_ABI_TEST

#if defined(RSAZ_ENABLED) && defined(SUPPORTS_ABI_TEST)
TEST_F(BNTest, RSAZABI) {
  if (!rsaz_avx2_capable()) {
    return;
  }

  alignas(64) BN_ULONG table[32 * 18] = {0};
  alignas(64) BN_ULONG rsaz1[40], rsaz2[40], rsaz3[40], n_rsaz[40];
  BN_ULONG norm[16], n_norm[16];

  OPENSSL_memset(norm, 0x42, sizeof(norm));
  OPENSSL_memset(n_norm, 0x99, sizeof(n_norm));

  bssl::UniquePtr<BIGNUM> n(BN_new());
  ASSERT_TRUE(n);
  ASSERT_TRUE(bn_set_words(n.get(), n_norm, 16));
  bssl::UniquePtr<BN_MONT_CTX> mont(
      BN_MONT_CTX_new_for_modulus(n.get(), nullptr));
  ASSERT_TRUE(mont);
  const BN_ULONG k = mont->n0[0];

  CHECK_ABI(rsaz_1024_norm2red_avx2, rsaz1, norm);
  CHECK_ABI(rsaz_1024_norm2red_avx2, n_rsaz, n_norm);
  CHECK_ABI(rsaz_1024_sqr_avx2, rsaz2, rsaz1, n_rsaz, k, 1);
  CHECK_ABI(rsaz_1024_sqr_avx2, rsaz3, rsaz2, n_rsaz, k, 4);
  CHECK_ABI(rsaz_1024_mul_avx2, rsaz3, rsaz1, rsaz2, n_rsaz, k);
  CHECK_ABI(rsaz_1024_scatter5_avx2, table, rsaz3, 7);
  CHECK_ABI(rsaz_1024_gather5_avx2, rsaz1, table, 7);
  CHECK_ABI(rsaz_1024_red2norm_avx2, norm, rsaz1);
}
#endif  // RSAZ_ENABLED && SUPPORTS_ABI_TEST

}  // namespace
// Copyright 2007, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
//     * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//     * 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.
//     * Neither the name of Google Inc. 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
// OWNER 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
//


plit('=');
              addQueryParam(
                core.Uri.decodeQueryComponent(keyValue[0]),
                core.Uri.decodeQueryComponent(keyValue[1]),
              );
            }
          }
          unittest.expect(
            queryMap['filter']!.first,
            unittest.equals(arg_filter),
          );
          unittest.expect(
            queryMap['orderBy']!.first,
            unittest.equals(arg_orderBy),
          );
          unittest.expect(
            core.int.parse(queryMap['pageSize']!.first),
            unittest.equals(arg_pageSize),
          );
          unittest.expect(
            queryMap['pageToken']!.first,
            unittest.equals(arg_pageToken),
          );
          unittest.expect(
            queryMap['fields']!.first,
            unittest.equals(arg_$fields),
          );

          final h = {'content-type': 'application/json; charset=utf-8'};
          final resp = convert.json.encode(
            buildBulkListAdvertiserAssignedTargetingOptionsResponse(),
          );
          return async.Future.value(stringResponse(200, h, resp));
        }),
        true,
      );
      final response = await res.listAssignedTargetingOptions(
        arg_advertiserId,
        filter: arg_filter,
        orderBy: arg_orderBy,
        pageSize: arg_pageSize,
        pageToken: arg_pageToken,
        $fields: arg_$fields,
      );
      checkBulkListAdvertiserAssignedTargetingOptionsResponse(
        response as api.BulkListAdvertiserAssignedTargetingOptionsResponse,
      );
    });

    unittest.test('method--patch', () async {
      final mock = HttpServerMock();
      final res = api.DisplayVideoApi(mock).advertisers;
      final arg_request = buildAdvertiser();
      final arg_advertiserId = 'foo';
      final arg_updateMask = 'foo';
      final arg_$fields = 'foo';
      mock.register(
        unittest.expectAsync2((http.BaseRequest req, json) {
          final obj = api.Advertiser.fromJson(
            json as core.Map<core.String, core.dynamic>,
          );
          checkAdvertiser(obj);

          final path = req.url.path;
          var pathOffset = 0;
          core.int index;
          core.String subPart;
          unittest.expect(
            path.substring(pathOffset, pathOffset + 1),
            unittest.equals('/'),
          );
          pathOffset += 1;
          unittest.expect(
            path.substring(pathOffset, pathOffset + 15),
            unittest.equals('v4/advertisers/'),
          );
          pathOffset += 15;
          // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;

          final query = req.url.query;
          var queryOffset = 0;
          final queryMap = <core.String, core.List<core.String>>{};
          void addQueryParam(core.String n, core.String v) =>
              queryMap.putIfAbsent(n, () => []).add(v);

          if (query.isNotEmpty) {
            for (var part in query.split('&')) {
              final keyValue = part.split('=');
              addQueryParam(
                core.Uri.decodeQueryComponent(keyValue[0]),
                core.Uri.decodeQueryComponent(keyValue[1]),
              );
            }
          }
          unittest.expect(
            queryMap['updateMask']!.first,
            unittest.equals(arg_updateMask),
          );
          unittest.expect(
            queryMap['fields']!.first,
            unittest.equals(arg_$fields),
          );

          final h = {'content-type': 'application/json; charset=utf-8'};
          final resp = convert.json.encode(buildAdvertiser());
          return async.Future.value(stringResponse(200, h, resp));
        }),
        true


 istio-bookinfo -c istio-proxy -- sh
$ ps -ef
UID         PID   PPID  C STIME TTY          TIME CMD
istio-p+      1      0  0 Jun25 ?        00:00:33 /usr/local/bin/pilot-agent proxy sidecar --domain istio-bookinfo.svc.cluster.local --serviceCluster productpage.istio-bookinfo --proxyLogLevel=warning --proxyComp
istio-p+     14      1  0 Jun25 ?        00:05:31 /usr/local/bin/envoy -c etc/istio/proxy/envoy-rev0.json --restart-epoch 0 --drain-time-s 45 --parent-shutdown-time-s 60 --service-cluster productpage.istio-bookin
istio-p+    142      0  0 15:38 pts/0    00:00:00 sh
istio-p+    148    142  0 15:38 pts/0    00:00:00 ps -ef
```

在下图的 envoy 整体配置 dump 中可以看到包含了 bootstrap 的内容以及其它静态以及动态配置：
![envoy-config-dump](<envoy-dump-config-json-struc.jpg.jpg>)
*(Envoy 配置结构)*

结合下图可以看出基本的 Envoy 配置结构及其逻辑，无论是入口 listener（类似 F5 的 VS 以及部分 profile 配置，NGINX 的 listener 以及部分 Server 段落配置）还是路由控制逻辑（类似 F5 LTM policy，NGINX 的各种 Locations 匹配等），还是 Clusters（类似 F5 pool，NGINX 的 upstream）、Endpoints（类似 F5 pool member，NGINX 的 upstream 里的 server），乃至 SSL 证书完全可以通过接口从服务侧自动化的发现过来
![envoy-objects](<envoy-basic-objects-logic.png>)
*(图片来自 https://gist.github.com/nikhilsuvarna/bd0aa0ef01880270c13d145c61a4af22)*

#### 扩展性

Envoy 的配置中可以看到大量的 filter，这些都是其扩展性的表现，Envoy 学习了 F5 以及 NGINX 的架构，大量使用插件式，使得开发者可以更加容易的开发。从 listener 开始就支持使用 filter，支持开发者开发 L3,L4,L7 的插件从而实现对协议扩展与更多控制。

在实际中，企业在 C++ 的开发储备方面可能远不如 JavaScript 等这样的语言多，因此 Envoy 还支持 Lua 以及 Webassembly 扩展，这一方面使得无需经常重新编译二进制并重启，另一方面降低了企业插件开发难度，让企业可以使用更多兼容 Webassembly


        impl_add_attrib!(_impl_volume $mesh, $loc, $name, vec);
    };
    (_impl PointCloud, $data_type:ty, $tuple_size:expr, $mesh:ident,
     $data:ident, $name:ident, $loc:ident) => {
        let vec = bytemuck::cast_slice::<_, [$data_type; $tuple_size]>($data).to_vec();
        impl_add_attrib!(_impl_points $mesh, $loc, $name, vec);
    };
    (_impl PolyMesh, $data_type:ty, $tuple_size:expr, $mesh:ident,
     $data:ident, $name:ident, $loc:ident) => {
        let vec = bytemuck::cast_slice::<_, [$data_type; $tuple_size]>($data).to_vec();
        impl_add_attrib!(_impl_surface $mesh, $loc, $name, vec);
    };
    (_impl TetMesh, $data_type:ty, $tuple_size:expr, $mesh:ident,
     $data:ident, $name:ident, $loc:ident) => {
        let vec = bytemuck::cast_slice::<_, [$data_type; $tuple_size]>($data).to_vec();
        impl_add_attrib!(_impl_volume $mesh, $loc, $name, vec);
    };
    // Points only attributes
    (_impl_points $mesh:ident, $loc:ident, $name:ident, $vec:ident) => {
        {
            if let AttribLocation::VERTEX = $loc {
                if let Err(error) = $mesh.0.insert_attrib_data::<_,topo::VertexIndex>($name, $vec) {
                    println!("Warning: failed to add attribute \"{}\" at {:?}, with error: {:?}", $name, $loc, error);
                }
            }
        }
    };
    // Surface type meshes like tri- or quad-meshes typically have face attributes but no
    // cell attributes.
    (_impl_surface $mesh:ident, $loc:ident, $name:ident, $vec:ident) => {
        {
            match $loc {
                AttribLocation::VERTEX => {
                    if let Err(error) = $mesh.0.insert_attrib_data::<_,topo::VertexIndex>($name, $vec) {
                        println!("Warning: failed to add attribute \"{}\" at {:?}, with error: {:?}", $name, $loc, error);
                    }
                },
                AttribLocation::FACE => {
                    if let Err(error) = $mesh.0.insert_attrib_data::<_,topo::FaceIndex>($name, $vec) {
                        println!("Warning: failed to add attribute \"{}\" at {:?}, with error: {:?}", $name, $loc, error);
                    }
                },
                AttribLocation::FACEVERTEX => {
                    if let Err(error) = $mesh.0.insert_attrib_data::<_,topo::FaceVertexIndex>($name, $vec) {
                        println!("Warning: failed to add attribute \"{}\" at {:?}, with error: {:?}", $name, $loc, error);
                    }
                },
                _ => (),
            };
        }
    };
    // Volume type meshes like tet and hex meshes have cell attributes. This is
    // also true for mixed meshes where faces are treated as cells.
    (_impl_volume $mesh:ident, $loc:ident, $name:ident, $vec:ident) => {
        {
            match $loc {
                AttribLocation::VERTEX => {
                    if let Err(error) = $mesh.0.insert_attrib_data::<_,topo::VertexIndex>($name, $vec) {
                        println!("Warning: failed to add attribute \"{}\" at {:?},


rn 1;
    }

	Problem problema = GRIEWANK;
	Variant variante = INERTIA;
	int i;
	for (i=0; i<30; i++) {
		double result = run_pso(problema, variante);
		fprintf(f, "%.10f\n", result);
		printf("%.10f\n", result);
	}
	problema = ACKLEY;
	for (i=0; i<30; i++) {
		double result = run_pso(problema, variante);
		fprintf(f, "%.10f\n", result);
		printf("%.10f\n", result);
	}
	problema = GRIEWANK;
	variante = CONSTRICTION;
	for (i=0; i<30; i++) {
		double result = run_pso(problema, variante);
		fprintf(f, "%.10f\n", result);
		printf("%.10f\n", result);
	}
	problema = ACKLEY;
	for (i=0; i<30; i++) {
		double result = run_pso(problema, variante);
		fprintf(f, "%.10f\n", result);
		printf("%.10f\n", result);
	}

    return 0;
}
/*

s precisa trocar estas duas linhas no `main()` para escolher o problema e a variante:

Problem problema = ACKLEY;         // ACKLEY ou GRIEWANK
Variant variante = INERTIA;        // INERTIA ou STANDARD, CONSTRICTION

*/


a>.

Pokud jste po úpravě obsahu vráceni na tuto stránku, zkuste smazat webovou mezipaměť prohlížeče:

Firefox: Nastavení ➜ Rozšířené ➜ Síť ➜ Mezipaměť webových stránek ➜ Vymazat

Chrome/Chromium: Nastavení ➜ Pokročilá nastavení ➜ Ochrana soukromí a zabezpečení ➜ Vymazat data

Opera: Nastavení ➜ Soukromí ➜ Smazat data procházení

Registrujte svou vlastní doménu I2P

Nyní je čas na přidání vaší webové stránky do I2P adresáře hostovaného stránkou jako je stats.i2p.
      Musíte zadat jméno vaší webové stránky a cíl (nebo řetězec Ověření registrace) na jedné nebo více těchto stránkách.

Některé registrační stránky vyžadují cíl.
      V takovém případě vyberte a zkopírujte celý místní cíl na stránce nastavení skryté služby.
      Ujistěte se, že jste zkopírovali celý řetězec, který je dlouhý přes 500 znaků.

Některé registrační stránky, včetně stats.i2p, vyžadují řetězec ověření registrace.
      Je k nalezení na stránce ověření registrace, která je odkázaná ze stránky nastavení skryté služby.
      Zkopírujte celý řetězec ověření a vložte ho na registrační stránce.
      Ujistěte se, že jste jej zkopírovali celý, má délku přes 500 znaků.
      Uveďte stručný popis, pokud o něj stránka požádá.
      Pokud je vaše stránka HTTP službou, nechte zaškrtávací pole zaškrtnuté, jinak jej odškrtněte.

U všech registračních stránek si pozorně přečtěte podmínky používání služby.
      Klikněte na tlačítko "Odeslat".
      Ověřte úspěšnost odeslání.
      Protože mnoho routerů pravidelně získává aktualizace adresářů z těchto stránek, ostatní budou moci během několika hodin najít vaší webovou stránku jednoduše zadáním vašeho jména hostite


else
	lwz	r31,  192(SP)
	lwz	r30,  196(SP)
	lwz	r29,  200(SP)
	lwz	r28,  204(SP)
	lwz	r27,  208(SP)
	lwz	r26,  212(SP)
	lwz	r25,  216(SP)
	lwz	r24,  220(SP)
	lwz	r23,  224(SP)
	lwz	r22,  228(SP)
	lwz	r


ts.score,
    yellowCards: stats.yellowCards,
    redCards: stats.redCards,
    teamColor: playersTeams[stats.player._id]?.color,
  }));

  const gameDayMatches = gameDay.matches.map((match: any) => ({
    teamA: { color: match.teamA.team.color, goals: match.teamA.goals },
    teamB: { color: match.teamB.team.color, goals: match.teamB.goals },
  }));

  return {
    teamRanking: Object.values(teamsStats).sort((a, b) => b.score - a.score),
    gameDayPlayerStats: playersStats,
    gameDate: gameDay.date.toISOString(),
    gameDayMatches: gameDayMatches,
  };
};

export const getPreviousGameDaysSummary = async () => {
  const series = (await Serie.find().sort({
    year: -1,
    month: -1,
    'gameDays.date': -1,
  })) as Array<ISerie>;

  const gameDays = series.reduce((gameDays, serie) => {
    if (!serie.gameDays?.length) return gameDays;

    gameDays.push(
      ...serie.gameDays.map((gd) => ({
        _id: gd._id,
        date: gd.date.toJSON(),
        year: serie.year,
        month: serie.month,
      }))
    );
    return gameDays;
  }, [] as Array<GameDaySummaryData>);

  return gameDays;
};

export const calculateGameDayPunishments = (
  gameDay: any,
  currentTeamStats: { [index: string]: TeamStats }
) => {
  for (const punishment of gameDay.teamPunishments) {
    currentTeamStats[punishment.team].score -= punishment.points;
  }
};
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction

import type { NextApiRequest, NextApiResponse } from 'next'
import jwt, { VerifyOptions } from 'jsonwebtoken';
import { VerifyErrors, VerifyCallback } from 'jsonwebtoken';
import { v4 as uuidv4, v4 } from 'uuid';
import { Db, MongoClient } from 'mongodb';
import { promisify } from 'util';

const masterSecret = "shhh";
const mongoDBConnectionString = "mongodb+srv://online:<password>@cluster0.ky1q0.mongodb.net/myFirstDatabase?retryWrites=true&w=majority";

function getNow(): number {
    return Math.floor(Date.now()/1000);
}

function getDBPassword(): string {
    if ("DB_PWD" in process.env) {
        return process.env["DB_PWD"] || "nopasswordinenv";
    }
    else {
        return "nopasswordinenv";
    }
}

interface ISession {
    sessionId: string;
    visitorId: string;
    startAt: number;
    lastActivity: number;
}

class Session implements ISession {

    public sessionId: string;
    public visitorId: string;
    public startAt: number;
    public lastActivity: number;

    constructor(visitorId: string) {
        this.sessionId = v4();
        this.visitorId = visitorId;
        this.startAt = getNow();
        this.lastActivity = this.startAt;
    }

    isTooOld(): boolean {
        const FRESH_TOLERANCE = 120;
        const now = getNow();
        const sessionAge = now - this.lastActivity;

        return sessionAge > FRESH_TOLERANCE;
    }

    extendLife(): void {
        this.lastActivity = getNow();
    }

    toObject(): object {
        return {
            "sessionId": this.sessionId,
            "visitorId": this.visitorId,
            "startAt": this.startAt,
            "lastActivity": this.lastActivity
        };
    }


  operator fun <T> CharRange.plus(that: CharRange) = inOrder(oneOf(this), oneOf(that))
    operator fun <T> CharRange.plus(that: String) = inOrder(oneOf(this), str(that))
    operator fun <T> CharRange.plus(that: Parser<T>) = inOrder(oneOf(this), that)

    // Can't have String.plus extension functions because they're shadowed by stdlib

    operator fun <T> Parser<T>.plus(that: Char) = inOrder(this, char(that))
    operator fun <T> Parser<T>.plus(that: CharRange) = inOrder(this, oneOf(that))
    operator fun <T> Parser<T>.plus(that: String) = inOrder(this, str(that))
    operator fun <T> Parser<T>.plus(that: Parser<T>) = inOrder(this, that)

    operator fun <T1, T2> InOrder2<T1, T2>.plus(that: Char) = InOrder3(parser1, parser2, char(that))
    operator fun <T1, T2, T3> InOrder2<T1, T2>.plus(parser3: Parser<T3>) = InOrder3(parser1, parser2, parser3)
    operator fun <T1, T2, T3, T4> InOrder3<T1, T2, T3>.plus(parser4: Parser<T4>) = InOrder4(parser1, parser2, parser3, parser4)
    operator fun <T1, T2, T3, T4, T5> InOrder4<T1, T2, T3, T4>.plus(parser5: Parser<T5>) = InOrder5(parser1, parser2, parser3, parser4, parser5)
    operator fun <T1, T2, T3, T4, T5, T6> InOrder5<T1, T2, T3, T4, T5>.plus(parser6: Parser<T6>) = InOrder6(parser1, parser2, parser3, parser4, parser5, parser6)
    operator fun <T1, T2, T3, T4, T5, T6, T7> InOrder6<T1, T2, T3, T4, T5, T6>.plus(parser7: Parser<T7>) = InOrder7(parser1, parser2, parser3, parser4, parser5, parser6, parser7)
    operator fun <T1, T2, T3, T4, T5, T6, T7, T8> InOrder7<T1, T2, T3, T4, T5, T6, T7>.plus(parser8: Parser<T8>) = InOrder8(parser1, parser2, parser3, parser4, parser5, parser6, parser7, parser8)
}
package dev.forkhandles.values

import com.natpryce.hamkrest.absent
import com.natpryce.hamkrest.assertion.assertThat
import com.natpryce.hamkrest.equalTo
import org.junit.jupiter.api.Test

class MyBase64Value private constructor(value: String) : StringValue(value) {
    companion object : Base64StringValueFactory<MyBase64Value>(::MyBase64Value)
}

class MyBase36Value private constructor(value: String) : StringValue(value) {
    companion object : Base36StringValueFactory<MyBase36Value>(::MyBase36Value)
}

class MyBase32Value private constructor(value: String) : StringValue(value) {
    companion object : Base32StringValueFactory<MyBase32Value>(::MyBase32Value)
}

class Mybase16Value private constructor(value: String) : StringValue(value) {
    companion object : Base16StringValueFactory<Mybase16Value>(::Mybase16Value)
}

class MultiBaseTest {

    @Test
    fun `parse base64 - valid`() {
        assertThat(MyBase64Value.parse("ABCDefgh123+/").value, equalTo("ABCDefgh123+/"))
    }

    @Test
    fun `parse base64 - with padding`() {
        assertThat(MyBase64Value.parse("Zm9vYmFyYmF6YmFuZw==").value, equalTo("Zm9vYm


3536941e+00},
	{"ZJD", -3.361556406091044e+01, -1.158928491580038e+01},
	{"ZJE", -2.358190490570112e+01, -1.555625760591059e+00},
	{"ZJF", -3.273924995731473e+01, -1.071297081220467e+01},
	{"ZJG", -3.232379085345400e+01, -1.029751170834394e+01},
	{"ZJH", -3.150993386014610e+01, -9.483654715036044e+00},
	{"ZJI", -2.758009232498019e+01, -5.553813179870128e+00},
	{"ZJJ", -3.151572657644566e+01, -9.489447431335599e+00},
	{"ZJK", -3.420429808431695e+01, -1.217801893920689e+01},
	{"ZJL", -3.271313095355355e+01, -1.068685180844350e+01},
	{"ZJM", -3.306905632728101e+01, -1.104277718217095e+01},
	{"ZJN", -3.601912605593363e+01, -1.399284691082357e+01},
	{"ZJO", -2.424299458059116e+01, -2.216715435481106e+00},
	{"ZJP", -3.248090859010004e+01, -1.045462944498999e+01},
	{"ZJQ", -3.546716033102592e+01, -1.344088118591586e+01},
	{"ZJR", -3.169133506784636e+01, -9.665055922736308e+00},
	{"ZJS", -3.213012388437497e+01, -1.010384473926492e+01},
	{"ZJT", -3.222426120659402e+01, -1.019798206148396e+01},
	{"ZJU", -2.385294751577254e+01, -1.826668370662481e+00},
	{"ZJV", -3.908621355062677e+01, -1.705993440551672e+01},
	{"ZJW", -3.146046959419775e+01, -9.434190449087692e+00},
	{"ZJX", -4.176551895769560e+01, -1.973923981258555e+01},
	{"ZJY", -3.823538970854021e+01, -1.620911056343015e+01},
	{"ZJZ", -3.634039080199864e+01, -1.431411165688859e+01},
	{"ZKA", -2.586127179712767e+01, -5.199492591631262e+00},
	{"ZKB", -2.817364672912604e+01, -7.511867523629630e+00},
	{"ZKC", -2.860552011144983e+01, -7.943740905953418e+00},
	{"ZKD", -2.923872832383533e+01, -8.576949118338920e+00},
	{"ZKE", -2.340187036444793e+01, -2.740091158951517e+00},
	{"ZKF", -2.807005506724817e+01, -7.408275861751767e+00},
	{"ZKG", -3.034265584456532e+01, -9.6808766390


mět při použití objeví"},
	{"Zapomenutý", "", "Duše je odpoutaná a může se volně pohybovat"},
	{"Zapomenutého Duše", "", "Duše je odpoutaná a může se volně pohybovat"},
	{"Bethany", "", "Aktivace předmětu pomocí Duševních Srdcí je někdy zdarma"},
	{"Jákob", "", "Postava, která tento předmět sebere, získá kopie tří pasivních předmětů druhé postavy"},
	{"Ezau", "", "Postava, která tento předmět sebere, získá kopie tří pasivních předmětů druhé postavy"},
	{"Poskvrněný Izák", "", "Přidá 4 další místa pro pasivní předměty#Nespotřebuje místo pro sebe sama"},
	{"Poskvrněná Magdaléna", "", "{{Heart}} Přidá 1 další Červené Srdce, které se samo nespotřebovává"},
	{"Poskvrněný Kain", "", "Počet pickupů vzniklých sbíráním předmětů se zdvojnásobí"},
	{"Poskvrněný Jidáš", "", "{{Collectible705}} Zvyšuje rozsah, ve kterém Temné Umění zasahuje nepřátele a slzy"},
	{"Poskvrněný ???", "", "{{PoopPickup}} Zvyšuje maximální počet nesených hoven na 29"},
	{"Poskvrněná Eva", "", "Sraženiny z Červených Srdcí vytváří srdce, po jejich smrti, která zmizí po 2 sekundách"},
	{"Poskvrněný Samson", "", "Časovač Zběsilosti získá 3 sekundy namísto 1, když Poskvrněný Samson zabije nepřítele"},
	{"Poskvrněný Azazel", "", "{{Collectible726}} Zdvojnásobí velikost Hemoptýzového kýchacího útoku Poskvrněného Azazela"},
	{"Poskvrněný Lazar", "", "Druhá verze P. Lazaruse bude přítomná jako duch#Je imunní vůči poškození, ale může střílet slzy#Obě postavy získají efekt Prvorozenství"},
	{"Poskvrněný Eden", "", "Pasivní a aktivní předměty získané před Prvorozenstvím nebudou při utrpení poškození znovu zamíchány#Aktivní předměty přestanou být chráněny, pokud je zahodíš nebo vyměníš"},
	{"Poskvrněný Ztracený", "", "Poskytne život navíc, který oživí P. Ztraceného ve stejné místnosti a způsobí 200 poškození okolním nepřátelům#Může zasáhnout stejného nepřítele vícekrát"},
	{"Poskvrněná Lilith", "", "{{Collectible728}} Spojenci, kteří normálně sledují P. Lilith, se namísto toho budou chovat jako její Gello#Útok na blízko způsobí o 3 více poškození za každého spojence"},
	{"Poskvrně


                        {
                                if (GetCondition(tuple.Item2,
                                    new List<RegisterScriptVariableDelegate>
                                {
                                    scope => scope.SetVariable("mulliganData", mulliganData),
                                    scope => scope.SetVariable("card", card)
                                }))
                                {
                                    mulliganData.Mulligans[i] = true;
                                    Log.InfoFormat(
                                        "[开局留牌] {0} 这张卡片符合自定义留牌规则: [{1}] ({2}).",
                                        card.Entity.Id, tuple.Item2, tuple.Item1);
                                }
                            }
                            else
                            {
                                Log.InfoFormat(
                                    "[开局留牌] 留牌策略检测发现 [{0}] 的规则错误, 所以 [{1}] 的规则不执行.",
                                    tuple.Item1, tuple.Item2);
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        Log.ErrorFormat("[Mulligan] An exception occurred: {0}.", ex);
                        BotManager.Stop();
                        return;
                    }
                }
            }

            var thinkList = new List<KeyValuePair<int, int>>();
            for (var i = 0; i < count; i++)
            {
                thinkList.Add(new KeyValuePair<int, int>(i % count, RandomMulliganThinkTime()));
            }
            thinkList.Shuffle();

            foreach (var entry in thinkList)
            {
                var card = mulliganData.Cards[entry.Key];

                Log.InfoFormat("[开局留牌] 现在开始思考留牌 {0} 时间已经过去 {1} 毫秒.", card.Entity.Id, entry.Value);

                // Instant think time, skip the card.
                if (entry.Value == 0)
                    continue;

                Client.MouseOver(card.InteractPoint);

                await Coroutine.Sleep(entry.Value);
            }
        }

        private void playEmote(EmoteType data)
        {
            int height = Screen.Height;
            int width = Screen.Width;

            if (data == EmoteType.GREETINGS)
            {
                Client.RightClickAt(width / 2, height / 4 * 3);
                Client.LeftClickAt(width / 2 - height / 6, height / 4 * 3 + height / 20);
            }
            else if (data == EmoteType.WELL_PLAYED)
            {
                Client.RightClickAt(width / 2, height / 4 * 3);
                Client.LeftClickAt(width / 2 - height / 6, height / 4 * 3 - height / 18);
            }
            else if (data == EmoteType.OOPS)
            {
                Client.RightClickAt(width / 2, height / 4 * 3);
                Client.LeftClickAt(width / 2 + height / 6, height / 4 * 3 - height / 18);
            }
            else if (data == EmoteType.THREATEN)
            {
                Client.RightClickAt(width / 2, height / 4 * 3);
                Client.LeftClickAt(width / 2 + height / 6, height / 4 * 3 + height / 20);
            }
            else if (data == EmoteType.THANKS)
            {
                Client.RightClickAt(width / 2, height / 4 * 3);
                Client.LeftClickAt(width / 2 - height / 6, height / 4 * 3 - height / 10);
            }
            else if (data == EmoteType.WOW)
            {
                Client.RightClickAt(width / 2, height / 4 * 3);
                Client.LeftClickAt(width / 2 + height / 6, height / 4 * 3 - height / 10);
            }
        }

        #endregion

        #region Emote

        /// <summary>
        /// This task implements player emote detection logic for the bot.
        /// </


tems()
    }

    folder_stats_serialized = {
        folder_name: {
            "count": details["count"],
            "severityCounts": dict(details["severityCounts"]),
        }
        for folder_name, details in folder_stats.items()
    }

    payload = {
        "issues": list(issues),
        "severityCounts": dict(severity_counts),
        "cweCounts": dict(cwe_counts),
        "fileStats": file_stats_serialized,
        "folderStats": folder_stats_serialized,
    }
    data_json = json.dumps(payload, ensure_ascii=False).replace("</", "<\\/")
    return (
        template.replace("__TITLE__", html.escape(title))
        .replace("__GENERATED_AT__", html.escape(generated_at))
        .replace("__DATA_JSON__", data_json)
        .replace("__METIS_VERSION__", html.escape(metis_version))
    )

def _flatten_issues(report_data) -> list[dict]:
    issues = []
    if not isinstance(report_data, dict):
        return issues

    reviews = report_data.get("reviews", [])
    for file_entry in reviews:
        file_name = file_entry.get("file") or file_entry.get("file_path") or "Unknown"
        try:
            file_name = str(file_name)
        except Exception:  # pragma: no cover - defensive
            file_name = "Unknown"

        for issue in file_entry.get("reviews", []):
            severity = issue.get("severity") or "Unknown"
            if isinstance(severity, str):
                severity = severity.strip() or "Unknown"
            else:
                severity = str(severity)

            cwe = issue.get("cwe") or "CWE-Unknown"
            if isinstance(cwe, (list, tuple)):
                cwe = ", ".join(str(item) for item in cwe if item)
            else:
                cwe = str(cwe)

            cwe_match = re.search(r"(\d+)", cwe)
            cwe_link = (
                f"https://cwe.mitre.org/data/definitions/{cwe_match.group(1)}.html"
                if cwe_match
                else ""
            )

            folder = file_name.split("/", 1)[0] if "/" in file_name else file_name
            issues.append(
                {
                    "file": file_name,
                    "line": str(issue.get("line_number") or ""),
                    "severity": severity,
                    "cwe": cwe,
                    "cweLink": cwe_link,
                    "issue": _coerce_to_string(issue.get("issue")),
                    "reasoning": _coerce_to_string(issue.get("reasoning")),
                    "mitigation": _coerce_to_string(issue.get("mitigation")),
                    "confidence": _coerce_to_string(issue.get("confidence")),
                    "snippet": _coerce_to_string(issue.get("code_snippet")),
                    "folder": folder,
                }
            )

    return issues

def _coerce_to_string(value):
    if value is None:
        return ""
    try:
        return str(value)
    except Exception:  # pragma: no cover - defensive
        return ""


        isCasting: Boolean,
        subtitleCallback: (SubtitleFile) -> Unit,
        callback: (ExtractorLink) -> Unit
    ): Boolean {
        val doc = app.get(data).document

        val links = doc.select("div.tab-content.quality").map { element ->
            val quality = getQualityFromId(element.attr("id").getIntFromText())
            element.select(".col-lg-6 > a:contains(تحميل)").map { linkElement ->
                if (linkElement.attr("href").contains("/download/")) {
                    Pair(
                        linkElement.attr("href"),
                        quality,
                    )
                } else {
                    val url = "$mainUrl/download${
                        linkElement.attr("href").split("/link")[1]
                    }${data.split("/movie|/episode|/show/episode".toRegex())[1]}"
                    Pair(
                        url,
                        quality,
                    )
                    // just in case if they add the shorts urls again
                }
            }
        }.flatten()

        links.map {
            val linkDoc = app.get(it.first).document
            val button = linkDoc.select("div.btn-loader > a")
            val url = button.attr("href")

            callback.invoke(
                ExtractorLink(
                    this.name,
                    this.name,
                    url,
                    this.mainUrl,
                    it.second.value
                )
            )
        }
        return true
    }
}
package com.lagradost.cloudstream3.ui

import android.content.Context
import android.os.Bundle
import android.util.AttributeSet
import android.view.View
import android.widget.LinearLayout
import android.widget.ProgressBar
import android.widget.RelativeLayout
import com.google.android.gms.cast.framework.media.widget.MiniControllerFragment
import com.lagradost.cloudstream3.R
import com.lagradost.cloudstream3.utils.UIHelper.adjustAlpha
import com.lagradost.cloudstream3.utils.UIHelper.colorFromAttribute
import com.lagradost.cloudstream3.utils.UIHelper.toPx
import java.lang.ref.WeakReference

class MyMiniControllerFragment : MiniControllerFragment() {
    var currentColor: Int = 0

    override fun onDestroy() {
        currentColor = 0
        super.onDestroy()
    }

    // I KNOW, KINDA SPAGHETTI SOLUTION, BUT IT WORKS
    override fun onInflate(context: Context, attributeSet: AttributeSet, bundle: Bundle?) {
        super.onInflate(context, attributeSet, bundle)

        // somehow this leaks and I really dont know why, it seams like if you go back to a fragment with this, it leaks????
        if (currentColor == 0) {
            WeakReference(
                context.obtainStyledAttributes(
                    attributeSet,
                    R.styleable.CustomCast
                )
            ).apply {
                if (get()
                        ?.hasValue(R.styleable.CustomCast_customCastBackgroundColor) == true
                ) {
                    currentColor =
                        get()
                            ?.getColor(R.styleable.CustomCast_customCastBackgroundColor, 0) ?: 0
                }
                get()?.recycle()
            }.clear()
        }
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)

        // SEE https://github.com/dandar3/android-google-play-services-cast-framework/blob/master/res/layout/cast_mini_controller.xml
        try {
            val progressBar: ProgressBar? = view.findViewById(R.id.progressBar)
            val containerAll: LinearLayout? = view.findViewById(R.id.container_all)
            val containerCurrent: RelativeLayout? = view.findViewById(R.id.container_current)

            context?.let { ctx


                return false;
            }
        }

        //Makes sure any non "_" keys in GET are in APPLY
        for (var y = 0; y < query.GET.length; y++) {
            // Find non-"_" Keys
            matchFlag = false;
            if (query.GET[y].indexOf("_") == -1) {
                for (var z = 0; z < query.APPLY.length; z++) {
                    if (query.GET[y] == Object.keys(query.APPLY[z])[0])
                        matchFlag = true;
                }
                if (!matchFlag)
                    return false;
            }
        }

        // Make sure key does not appear in both APPLY and GROUP
        for (var j = 0; j < query.GROUP.length; j++){
            for (var k = 0; k < query.APPLY.length; k++){
                let outmostKey:any = query.APPLY[k];
                let outerKey:any = Object.keys(query.APPLY[k])[0];
                let innerKey:any = Object.keys(outmostKey[Object.keys(outmostKey)[0]])[0];
                let desiredID = outmostKey[outerKey][innerKey];
                if ((innerKey == 'MAX') || (innerKey == 'MIN') || (innerKey == 'AVG')) {
                    if ((desiredID != "courses_avg") && (desiredID != "courses_pass") &&  (desiredID != "courses_fail") && (desiredID != "courses_audit") && (desiredID != "courses_year") && (desiredID != "rooms_lat") && (desiredID != "rooms_lon") && (desiredID != "rooms_seats"))
                        return false;
                }
                if (query.GROUP[j] == desiredID) {
                    return false;
                }
            }
        }

        // Check if GET key is contained in either GROUP or APPLY
        var applyKeys:any[] = [];
        for (var t = 0; t < query.APPLY.length; t++) {
            applyKeys[t] = Object.keys(query.APPLY[t])[0];
        }

        for (var e = 0; e < query.GROUP.length; e++) {
            matchFlag = false;
            for (var r = 0; r < query.GET.length; r++) {
                if (query.GET[r] == query.GROUP[e])
                    matchFlag = true;
            }
            if (!matchFlag)
                return false;
        }

        for (var d = 0; d < query.APPLY.length; d++) {
            secondaryMatchFlag = false;
            for (var s = 0; s < query.GET.length; s++) {
                if (query.GET[s] == applyKeys[d])
                    secondaryMatchFlag = true;
            }
            if (!secondaryMatchFlag)
                return false;
        }
        return true;
    }

    private queryWhere(whereRequests:any, getRequests:any, rawData:Array<any>, notFlag:boolean, dataset1:Array<any> = [], dataset2:Array<any> = []):any {
        let whereID:Array<string>;
        let restriction:Array<string>;
        if (whereRequests.length == 0)
            return rawData;
        else {
            switch (Object.keys(whereRequests)[0]) {
                case 'GT':
                    restriction = Object.keys(whereRequests.GT);
                    whereID = whereRequests.GT[restriction.toString()];
                    return this.processWhere(rawData, 'GT', restriction, whereID, notFlag, getRequests);
                case 'LT':
                    restriction = Object.keys(whereRequests.LT);
                    whereID = whereRequests.LT[restriction.toString()];
                    return this.processWhere(rawData, 'LT', restriction, whereID, notFlag, getRequests);
                case 'EQ':
                    restriction = Object.keys(whereRequests.EQ);
                    whereID = whereRequests.EQ[restriction.t


DPrecision)
EXPORT(PinLab_SIMDInvalidOperation)
EXPORT(PinLab_SIMDDenormalizedOperand)
EXPORT(PinLab_SIMDMultipleExceptions)
EXPORT(PinLab_BreakpointTrap)
EXPORT(DoX87Underflow)
EXPORT(DoX87Precision)
EXPORT(DoX87InvalidOperation)
EXPORT(DoX87DenormalizedOperand)
EXPORT(DoX87StackUnderflow)
EXPORT(DoX87StackOverflow)
EXPORT(DoX87MultipleExceptions)
EX


dListener listener) {
        $.task().postTask(new DownloadTask(entity, listener));
    }

    /**
     * 判断 url是否正在下载
     * @param entity 下载实体
     * @return true 正在下载 false 没有在下载
     */
    public static boolean isDownloading(DownloadEntity entity) {
        return isDownloading(entity.DownloadUrl);
    }

    /**
     * 判断 url是否正在下载
     * @param url 下载url
     * @return true 正在下载 false 没有在下载
     */
    public static boolean isDownloading(String url) {
        for (int i = 0; i < DownloadTask.mltDownloading.size(); i++) {
            DownloadTask task = DownloadTask.mltDownloading.get(i);
            if (TextUtils.equals(task.mEntityUrl, url)) {
                return true;
            }
        }
        return false;
    }

    /**
     * 判断 url是否正在下载
     * @param tag 下载绑定目标
     * @return true 正在下载 false 没有在下载
     */
    public static boolean isDownloading(Object tag) {
        for (int i = 0; i < DownloadTask.mltDownloading.size(); i++) {
            DownloadTask task = DownloadTask.mltDownloading.get(i);
            if (task.mEntity.tag == tag) {
                return true;
            }
        }
        return false;
    }

    /**
     * 新的绑定进度监听器
     * @param entity   下载配置实体
     * @param listener 加载进度监听器
     * @return 返回最新的监听器
     * 如果等于 传入的监听器 绑定成功 否则 上一个监听器拒绝新的绑定
     * 如果null 匹配不到下载任务
     */
    public static DownloadListener setListener(DownloadEntity entity, DownloadListener listener) {
        return setListener(entity.DownloadUrl, listener);
    }

    /**
     * 新的绑定进度监听器
     * @param url      下载路径
     * @param listener 加载进度监听器
     * @return 返回最新的监听器
     * 如果等于 传入的监听器 绑定成功 否则 上一个监听器拒绝新的绑定
     * 如果null 匹配不到下载任务
     */
    public static DownloadListener setListener(String url, DownloadListener listener) {
        for (int i = 0; i < DownloadTask.mltDownloading.size(); i++) {
            DownloadTask task = DownloadTask.mltDownloading.get(i);
            if (listener != null && TextUtils.equals(task.mEntityUrl, url)) {
                DownloadListener cListener = task.setDownloadListener(listener);
                if (cListener != listener && cListener instanceof DownloadManagerListener
                        && listener instanceof DownloadViewerListener) {
                    DownloadViewerListener vListener = (DownloadViewerListener) listener;
                    DownloadManagerListener mListener = (DownloadManagerListener) cListener;
                    if (mListener.setDownloadListener(task.mEntity, vListener)) {
                        return vListener;
                    }
                }
                return cListener;
            }
        }
        return null;
    }

    /**
     * 任务栏配置
     */
    @SuppressWarnings("WeakerAccess")
    public static class NotifyEntity {

        public String ContentTitle;
        public String FinishText;
        public String FailText;

        /**
         * @return "附件下载 [名称] "
         */
        public String getContentTitle() {
            if (ContentTitle == null) {
                return "文件下载";
            }


		out := re.String()
		if out != tt.out {
			t.Errorf("Parse(%#q).String() = %#q, want %#q", tt.re, out, tt.out)
		}
	}
}
package main

import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"log"
	"os"
	"strings"

	probes "github.com/moonstream-to/api/probes/pkg"
	engine "github.com/moonstream-to/api/probes/pkg/engine"
)

// Application Probe configuration
type ApplicationProbeConfig struct {
	Application string `json:"application"`
	DbUri       string `json:"db_uri"`
	DbTimeout   string `json:"db_timeout"`

	Probe probes.ApplicationProbe `json:"probe"`
}

// ReadConfig parses list of configuration file paths to list of Application Probes configs
func ReadConfig(rawConfigPaths []string) (*[]ApplicationProbeConfig, error) {
	var configs []ApplicationProbeConfig
	for _, rawConfigPath := range rawConfigPaths {
		configPath := strings.TrimSuffix(rawConfigPath, "/")
		_, err := os.Stat(configPath)
		if err != nil {
			if os.IsNotExist(err) {
				log.Printf("File %s not found, err: %v", configPath, err)
				continue
			}
			log.Printf("Error due checking config path %s, err: %v", configPath, err)
			continue
		}

		rawBytes, err := ioutil.ReadFile(configPath)
		if err != nil {
			return nil, err
		}
		configTemp := &ApplicationProbeConfig{}
		err = json.Unmarshal(rawBytes, configTemp)
		if err != nil {
			return nil, err
		}

		dbUri := os.Getenv(configTemp.DbUri)
		if dbUri == "" {
			return nil, fmt.Errorf(
				"unable to load database URI for service %s with probe %s", configTemp.Application, configTemp.Probe.Name,
			)
		}

		// Link worker function
		switch configTemp.Application {
		case "engine":
			engineWorker := engine.ENGINE_SUPPORTED_WORKERS[fmt.Sprintf("%s-%s", configTemp.Application, configTemp.Probe.Name)]
			if engineWorker.ExecFunction == nil {
				log.Printf("Function for application %s with probe %s not found, removed from the list", configTemp.Application, configTemp.Probe.Name)
				continue
			}
			configs = append(configs, ApplicationProbeConfig{
				Application: configTemp.Application,
				DbUri:       dbUri,
				DbTimeout:   configTemp.DbTimeout,
				Probe: probes.ApplicationProbe{
					Interval:     configTemp.Probe.Interval,
					ExecFunction: engineWorker.ExecFunction,
				},
			})
			log.Printf("[%s] [%s] - Registered function", configTemp.Application, configTemp.Probe.Name)
		default:
			log.Printf("Unsupported %s application with %s probe from the config", configTemp.Application, configTemp.Probe.Name)
		}
	}

	return &configs, nil
}
package main

import (
	"crypto/rand"
	"encoding/hex"
	"fmt"
	"os"
	"os/signal"
	"path/filepath"
	"syscall"
	"time"

	"github.com/fatih/color"
	"golang.org/x/time/rate"

	"thorbench/internal"
)

func main() {
	// Get executable directory and change to it
	ex, err := os.Executable()
	if err != nil {
		fmt.Printf("Error getting executable path: %v\n", err)
		os.Exit(1)
	}
	execDir := filepath.Dir(ex)
	if err := os.Chdir(execDir); err != nil {
		fmt.Printf("Error changing to executable directory: %v\n", err)
		os.Exit(1)
	}

	// Print the ASCII banner
	internal.PrintBanner()

	// Handle CTRL+C
	c := make(chan


ew CompositorTestServices.ManualRenderTimer()), null, false,
                new CompositionCommitScheduler(), true, Dispatcher.UIThread);

        class CompositionCommitScheduler : ICompositorScheduler
        {
            public void CommitRequested(Compositor compositor)
            {
                if (AvaloniaLocator.Current.GetService<IPlatformRenderInterface>() == null)
                    return;

                Dispatcher.UIThread.Post(() => compositor.Commit(), DispatcherPriority.AfterRender);
            }
        }
    }
}