.Signpost),

    /**
     * 日期范围
     */
    DATE_RANGE_NONE(Icons.Rounded.CalendarToday),

    /**
     * 已选择日期范围
     */
    DATE_RANGE_PICKED(Icons.Rounded.DateRange),

    /**
     * box
     */
    BOX(Icons.Rounded.Archive),

    /**
     * 专用装备
     */
    UNIQUE_EQUIP(Icons.Rounded.Handyman),

    /**
     * 下载
     */
    DOWNLOAD(Icons.Rounded.CloudDownload),

    /**
     * 下载完成
     */
    DOWNLOAD_DONE(Icons.Rounded.DownloadDone),

    /**
     * 动画
     */
    MOVIE(Icons.Rounded.Movie),

    /**
     * 播放
     */
    VIDEO_PLAY(Icons.Rounded.PlayArrow),

    /**
     * 暂停
     */
    VIDEO_PAUSE(Icons.Rounded.Pause),

    /**
     * 列表显示模式（图标）
     */
    VIEW_ICON(Icons.Rounded.ViewCompact),

    /**
     * 列表显示模式（列表）
     */
    VIEW_LIST(Icons.AutoMirrored.Rounded.ViewList),

    /**
     * 列表显示模式（卡片）
     */
    VIEW_CARD(Icons.Rounded.ViewAgenda),

    /**
     * 时区
     */
    TIME_ZONE(Icons.Rounded.MoreTime),

    /**
     * 职能
     */
    ROLE(Icons.Rounded.Workspaces),
}package cn.wthee.pcrtool.data.db.view

import androidx.room.ColumnInfo
import cn.wthee.pcrtool.utils.deleteSpace
import cn.wthee.pcrtool.utils.intArrayList

/**
 *  剧情活动视图
 */
data class StoryEventData(
    @ColumnInfo(name = "event_id") val eventId: Int = -1,
    @ColumnInfo(name = "story_id") val storyId: Int = -1,
    @ColumnInfo(name = "original_event_id") val originalEventId: Int = -1,
    @ColumnInfo(name = "start_time") val startTime: String = "2020/01/01 00:00:00",
    @ColumnInfo(name = "end_time") val endTime: String = "2020/01/07 00:00:00",
    @ColumnInfo(name = "title") val title: String? = "???",
    @ColumnInfo(name = "unit_ids") val unitIds: String = "",
    @ColumnInfo(name = "boss_enemy_id") val bossEnemyId: Int = 0,
    @ColumnInfo(name = "boss_unit_id") val bossUnitId: Int = 0,
) {

    fun getEventTitle() = title?.deleteSpace ?: ""

    fun getUnitIdList(): List<Int> {
        val list = unitIds.intArrayList
        return if (list.size > 3) {
            list.subList(1, 3)
        } else {
            arrayListOf()
        }
    }

}
package cn.wthee.pcrtool.data.db.repository

import cn.wthee.pcrtool.data.db.dao.SkillDao
import cn.wthee.pcrtool.data.db.view.EnemyParameterPro
import cn.wthee.pcrtool.data.db.view.SkillData
import cn.wthee.pcrtool.data.enums.SkillType
import cn.wthee.pcrtool.data.model.SkillDetail
import cn.wthee.pcrtool.utils.Constants
import cn.wthee.pcrtool.utils.LogReportUtil
import javax.inject.Inject

/**
 * 角色技能 Repository
 *
 * @param skillDao
 */
class SkillRepository @Inject constructor(private val skillDao: SkillDao) {

    suspend fun getUnitSkill(unitId: Int) = try {
        skillDao.getUnitSkill(unitId)
    } catch (e: Exception) {
        LogReportUt


(%rdx){1to16}, %zmm20, %zmm24 {%k3} {z}
// CHECK: encoding: [0x62,0x62,0x5d,0xd3,0xb8,0x82,0xf8,0xfb,0xff,0xff]
          vfmadd231ps -1032(%rdx){1to16}, %zmm20, %zmm24 {%k3} {z}

// CHECK: vfmadd231pd 8192(%rdx), %zmm28, %zmm27 {%k3} {z}
// CHECK: encoding: [0x62,0x62,0x9d,0xc3,0xb8,0x9a,0x00,0x20,0x00,0x00]
          vfmadd231pd 8192(%rdx), %zmm28, %zmm27 {%k3} {z}

// CHECK: vfmadd231pd {rn-sae}, %zmm25, %zmm28, %zmm27 {%k3} {z}
// CHECK: encoding: [0x62,0x02,0x9d,0x93,0xb8,0xd9]
          vfmadd231pd {rn-sae}, %zmm25, %zmm28, %zmm27 {%k3} {z}

// CHECK: vfmadd231pd -1032(%rdx){1to8}, %zmm20, %zmm24 {%k3} {z}
// CHECK: encoding: [0x62,0x62,0xdd,0xd3,0xb8,0x82,0xf8,0xfb,0xff,0xff]
          vfmadd231pd -1032(%rdx){1to8}, %zmm20, %zmm24 {%k3} {z}

// CHECK: vfmadd213ps 8192(%rdx), %zmm28, %zmm27 {%k3} {z}
// CHECK: encoding: [0x62,0x62,0x1d,0xc3,0xa8,0x9a,0x00,0x20,0x00,0x00]
          vfmadd213ps 8192(%rdx), %zmm28, %zmm27 {%k3} {z}

// CHECK: vfmadd213ps {rn-sae}, %zmm25, %zmm28, %zmm27 {%k3} {z}
// CHECK: encoding: [0x62,0x02,0x1d,0x93,0xa8,0xd9]
          vfmadd213ps {rn-sae}, %zmm25, %zmm28, %zmm27 {%k3} {z}

// CHECK: vfmadd213ps -1032(%rdx){1to16}, %zmm20, %zmm24 {%k3} {z}
// CHECK: encoding: [0x62,0x62,0x5d,0xd3,0xa8,0x82,0xf8,0xfb,0xff,0xff]
          vfmadd213ps -1032(%rdx){1to16}, %zmm20, %zmm24 {%k3} {z}

// CHECK: vfmadd213pd 8192(%rdx), %zmm28, %zmm27 {%k3} {z}
// CHECK: encoding: [0x62,0x62,0x9d,0xc3,0xa8,0x9a,0x00,0x20,0x00,0x00]
          vfmadd213pd 8192(%rdx), %zmm28, %zmm27 {%k3} {z}

// CHECK: vfmadd213pd {rn-sae}, %zmm25, %zmm28, %zmm27 {%k3} {z}
// CHECK: encoding: [0x62,0x02,0x9d,0x93,0xa8,0xd9]
          vfmadd213pd {rn-sae}, %zmm25, %zmm28, %zmm27 {%k3} {z}

// CHECK: vfmadd213pd -1032(%rdx){1to8}, %zmm20, %zmm24 {%k3}


ux';
import { Patient } from '../../model/patient';

export const ASSIGN_PATIENTS: string = "ASSIGN_PATIENTS";
export interface AssignPatientsAction extends Action {
  patients: Array<Patient>;
}

export const assignPatients: ActionCreator<AssignPatientsAction> =
(patients: Array<Patient>) => ({
    type: ASSIGN_PATIENTS,
    patients
  });
import * as trace from 'owa-trace';

/**
 * Parses ews id, perform required operations and return the mailbox guid
 * @param idBytes - The EWS Id byte array.
 */
export function extractMailboxGuidFromEwsIdBytes(idBytes: Uint8Array) {
    if (!idBytes) {
        return null;
    }
    let ewsIdBytes = idBytes;
    let ewsIdPosition = 0;
    // Ews id is RLE compressed (bytes that do not repeat are written
    // directly, bytes that repeat are written twice, followed by the
    // number of times to write the byte). Need to decompress
    if (ewsIdBytes[0] == 1) {
        ewsIdBytes = rleDecompress(ewsIdBytes);
        if (!ewsIdBytes) {
            return null;
        }
    } else {
        ewsIdPosition = 1;
    }
    // This is required to skip over the idType byte
    ewsIdPosition++;
    // Get the moniker length (stored as int16)
    const nextBytesCount = ewsIdBytes[ewsIdPosition] + (ewsIdBytes[ewsIdPosition + 1] >> 8);
    ewsIdPosition += 2;

    return convertByteArrayToString(ewsIdBytes, ewsIdPosition, nextBytesCount);
}

/**
 * returns true if it is a public folder
 * @param folderId
 */
export function isPublicFolder(folderId: string): boolean {
    if (!folderId) {
        return false;
    }

    try {
        let decodedFolderId = atob(folderId);
        let folderIdBytes = new Uint8Array(decodedFolderId.length);

        for (let i = 0; i < decodedFolderId.length; i++) {
            folderIdBytes[i] = decodedFolderId.charCodeAt(i);
        }

        let folderIdPosition = 0;
        if (folderIdBytes[0] === 1) {
            folderIdBytes = rleDecompress(folderIdBytes);
        } else {
            folderIdPosition = 1;
        }

        return folderIdBytes && folderIdBytes[folderIdPosition] === 1;
    } catch (error) {
        return false;
    }
}

/**
 * Implement RLE decompression
 * @param ewsIdBytes - The compressed EWS Id
 * @returns The decompressed EWS Id
 */
function rleDecompress(ewsIdBytes: Uint8Array) {
    // If decompressedEwsIdBytes is null, the method will just calculate the decompressed size
    // Calculate the required memory needed for the decompressions
    const decompressedLength = decompressEx(ewsIdBytes, null);
    if (decompressedLength == 0) {
        trace.errorThatWillCauseAlert('rleDecompress : Invalid id');
        return null;
    }

    // Allocate the memory and run again
    let decompressedEwsIdBytes = new Uint8Array(decompressedLength);
    decompressEx(ewsIdBytes, decompressedEwsIdBytes);

    return decompressedEwsIdBytes;
}

/**
 * Decompress the ews id
 * @param ewsIdBytes - The compressed EWS Id
 * @param decompressedEwsIdBytes - The output array to fill with the uncompressed EWS Id.
 * @returns The size of the decompressed EWS Id
 */
function decompressEx(ewsIdBytes: Uint8Array, decompressedEwsIdBytes: Uint8Array) {
    let position = 0;

    for (let i = 1; i < ewsIdBytes.length; ++i) {
        if (i == ewsIdBytes.length - 1 || ewsIdBytes[i] != ews


any;

@Component({
  selector: 'g-page-num',
  templateUrl: './pageNum.component.html',
  styleUrls: ['./pageNum.component.less']
})
export class PageNumComponent implements OnInit, OnChanges {
  @Input() class: object; // Class 类
  @Input() total: number; // 总页数
  @Input() process: Function; // 分页处理函数
  @Input() num = 3; // 页码显示数量

  main: number[] = []; // 遍历页码 DOM 用的
  isRun: boolean | string; // 有个输入属性叫 current(当前页码) 告诉它的 set 函数在组件 ngOnInit 之后再生效

  _current: number; // current 设置为 set 所必须的一个实体
  tempCurrent: number; // 临时 current 组件 ngOnInit 之前如果传入了有效的 current 值 先保存到这里
  @Input() // current 属性的 set get
  set current(v: number) {
    if (!this.isRun) {
      this.tempCurrent = v;

      return;
    }

    if (v === this._current || !v || v > this.total) {
      return;
    }

    // 执行处理程序 进行翻页请求
    this.process(v, () => {
      // 以下是回调函数的内容
      this._current = v;

      this.currentChange.emit(this._current);

      if (!this.total) {

        return;
      }

      this.build(); // 构建页码
    });
  }
  get current() {
    return this._current;
  }
  @Output() currentChange = new EventEmitter();

  ngOnInit() {
    // current 的值在 Init 里取不到 可能是 Angular Bug 这里利用队列延后去取
    Promise.resolve().then(() => {
      setTimeout(() => {
        // 以下为主体代码
        this.isRun = true;

        // 传入了 current
        if (this.tempCurrent) {
          this.current = this.tempCurrent;

          return;
        }

        // current 传入了 0 (传 0 代表分页组件不自动执行 默认自动执行并用页码 1 去调用处理程序 请求第一页数据)
        if (this.current === 0 || this.tempCurrent === 0) {
          return;
        }

        this.current = 1; // 默认自动执行并用页码 1 去调用处理程序 请求第一页数据
      });
    });
  }

  ngOnChanges(changes: SimpleChanges) {
    if (!changes.hasOwnProperty('total')) {

      return;
    }

    const curVal = changes.total.currentValue; // 当前值

    // 以下情况退出
    if (!curVal || curVal === changes.total.previousValue) {
      return;
    }

    if (this.num > curVal) {
      this.num = curVal;
    }

    // 更新了总页数 且目前的页数超过了总页数的范围了 那么重定向当前页为最大页数(也就是总页数)
    if (this.current > curVal) {
      this.current = curVal;

      return;
    }

    this.build();

    this.isRun = 'run';
  }

  // 构建页码
  build() {
    this.main = [];

    const displayNum = this.num; // 缓存显示数量
      // 前 / 后页码预留算法对照值 算法: 预留一些 前 / 后 页码 保证当前页码处所有页码中居中状态
      // 如果显示页码( displayNum : num )为奇数 前 / 后预留相同数量页码 如果为偶数 优先预留 后 页码
    const sild = Math.ceil(displayNum / 2);
    let startNum =


using BetaFastAPI.Exceptions;
using BetaFastAPI.Utilities;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;

namespace BetaFastAPI.Security
{
    public class EncryptionDataManagement
    {
        private readonly string _saltTableName = "salts";
        private string _connectionString;

        public EncryptionDataManagement(string connectionString)
        {
            _connectionString = connectionString;
        }

        // Salt is stored as Base64 string
        public string GetSalt(string username)
        {
            if (string.IsNullOrEmpty(username))
                throw new ArgumentNullException("Username");

            string commandText = "SELECT * from " + _saltTableName + " where username = @username";
            List<SqlParameter> parameters = new List<SqlParameter>()
            {
                 new SqlParameter("@username", SqlDbType.VarChar) {Value = username},
            };

            try
            {
                using (DataTable contents = DatabaseUtility.QueryDatabase(_connectionString, commandText, parameters))
                {
                    if (contents != null && contents.Rows.Count > 0)
                    {
                        string salt = contents.Rows[0]["Salt"].ToString();

                        return salt;
                    }
                    else
                    {
                        throw new UserDoesNotExistException("User " + username + " does not exist");
                    }
                }
            }
            catch (ServerUnavailableException)
            {
                throw new ServerUnavailableException();
            }
        }

        private bool UserExists(string username)
        {
            string commandText = "SELECT 1 FROM " + _saltTableName + " WHERE Username = @username";
            SqlParameter param = new SqlParameter
            {
                ParameterName = "@username",
                Value = username
            };

            try
            {
                using (DataTable contents = DatabaseUtility.QueryDatabase(_connectionString, commandText, param))
                {
                    if (contents.R


', '...')` would return the array
 * `['rock', 'paper', 'scissors']` because there are three periods `...`
 * between each word.
 *
 * @method split
 * @param  {String} value the String to be split
 * @param  {String} delim the String used to separate the data
 * @return {String[]}  Array of Strings
 *
 * @example
 *

 *
 * function setup() {
 *   createCanvas(100, 100);
 *
 *   background(200);
 *
 *   // Create a string variable.
 *   let string = 'rock...paper...scissors';
 *
 *   // Split the string at each ...
 *   let words = split(string, '...');
 *
 *   // Print the array to the console:
 *   // ["rock", "paper", "scissors"]
 *   print(words);
 *
 *   // Style the text.
 *   textAlign(CENTER, CENTER);
 *   textFont('Courier New');
 *   textSize(16);
 *
 *   // Iterate over the words array.
 *   for (let i = 0; i < words.length; i += 1) {
 *
 *     // Calculate the y-coordinate.
 *     let y = (i + 1) * 25;
 *
 *     // Display the word.
 *     text(words[i], 50, y);
 *   }
 *
 *   describe(
 *     'The words "rock", "paper", and "scissors" written on separate lines. The text is black on a gray background.'
 *   );
 * }
 *
 *

 */
p5.prototype.split = function(str, delim) {
  p5._validateParameters('split', arguments);
  return str.split(delim);
};

/**
 * Splits a `String` into pieces and returns an array containing the pieces.
 *
 * `splitTokens()` is an enhanced version of
 * split(). It can split a string when any characters
 * from a list are detected.
 *
 * The first parameter, `value`, is the string to split.
 *
 * The second parameter, `delim`, is optional. It sets the character(s) that
 * should be used to split the string. `delim` can be a single string, as in
 * `splitTokens('rock...paper...scissors...shoot', '...')`, or an array of
 * strings, as in
 * `splitTokens('rock;paper,scissors...shoot, [';', ',', '...'])`. By default,
 * if no `delim` characters are specified, then any whitespace character is
 * used to split. Whitespace characters include tab (`\t`), line feed (`\n`),
 * carriage return (`\r`), form feed (`\f`), and space.
 *
 * @method splitTokens
 * @param  {String} value string to split.
 * @param  {String} [delim] character(s) to use for splitting the string.
 * @return {String[]} separated strings.
 *
 * @example
 *

 *
 * function setup() {
 *   createCanvas(100, 100);
 *
 *   background(200);
 *
 *   // Create a string variable.
 *   let string = 'rock paper scissors shoot';
 *
 *   // Split the string at each space.
 *   let words = splitTokens(string);
 *
 *   // Print the array to the console.
 *   print(words);
 *
 *   // Style the text.
 *   textAlign(CENTER, CENTER);
 *   textFont('Courier New');
 *   textSize(12);
 *
 *   // Iterate over the words array.
 *   for (let i = 0; i < words.length; i += 1) {
 *
 *     // Calculate the y-coordinate.
 *     let y = (i + 1) * 20;
 *
 *     // Display the word.
 *     text(words[i], 50, y);
 *   }
 *
 *   describe(
 *     'The words "rock", "paper", "scissors", and "shoot" written on separate lines. The text is black on a gray background.'
 *   );
 * }


dogEnemy.y_axis = e.y;
      dogEnemy.signal = e.signal;
      dogEnemy.direction = e.direction;
      dogEnemy.staticEntities = staticEntities;
      dogEnemy.enemyType = enemyType.dogEnemy;
      dogEnemy.damage = damage;
      enemies.push(dogEnemy);
    });

    return enemies;
  }
}

export default DogEnemyFactory;
///<reference types="node"/>
import * as assert from "assert";
import "mocha";
import Uri from "../../../../dist/commonjs/System/Uri/Uri";
import Scheme from "../../../../dist/commonjs/System/Uri/Scheme";
import Functions from "../../../../dist/commonjs/System/Functions";

const pathAfterRoot = 'one/two/three.html';
const path = '/' + pathAfterRoot;
const params = [['four', 'five'], ['six', 'seven']];
const query = '?' + params[0].join('=') + '&' + params[1].join('=');

const u = Uri.from(path + query);

describe('.scheme', ()=>
{
	it('should equal', ()=>
	{
		assert.equal((new Uri(null, '', '', null, '')).scheme, null);
		assert.equal((new Uri("http", '', '', null, '')).scheme, "http");
		assert.equal((new Uri(Scheme.HTTP, '', '', null, '')).scheme, "http");
	});

	it('should throw', ()=>
	{
		assert.throws(()=> {new Uri(<any>64, '', '', null, '', <any>null);});
	});
});

describe('.port', ()=>
{
	it('should equal', ()=>
	{
		const d = 'x.com', port = 80;
		assert.equal((new Uri(null, '', d, 0, '')).port, 0);
		assert.equal((new Uri(null, '', d, null, '')).port, null);
		assert.equal((new Uri(null, '', d, <any>'', '')).port, null);
		assert.equal((new Uri(null, '', d, NaN, '')).port, null);
		assert.equal((new Uri(null, '', d, port, '')).port, port);
		assert.equal((new Uri(null, '', d, <any>(port + ''), '')).port, port);
	});
	it('should throw', ()=>
	{
		assert.throws(()=> {new Uri(null, '', '', <any>'foo', '');});
		assert.throws(()=> {new Uri(null, '', '', <any>{}, '');});
		assert.throws(()=> {new Uri(null, '', '', -1, '');});
		assert.throws(()=> {new Uri(null, '', '', Infinity, '');});
	});

});

describe('.path', ()=>
{
	it('should equal ' + path, ()=>
	{
		assert.equal(u.path, path);
		assert.equal((new Uri(null, null, null, null, pathAfterRoot)).path, pathAfterRoot);
		assert.equal(Uri.toString({
			path: pathAfterRoot,
			fragment: '#x'
		}), pathAfterRoot + "#x");
	});

	it('should allow null', ()=>
	{
		assert.equal((new Uri(null, '', '', null, '')).path, null);
		assert.equal((new Uri(Scheme.HTTP, '', '', null, '')).path, null);
		assert.equal((new Uri('http', '', '', null, '')).path, null);
	});
});

describe('.fragment', ()=>
{
	it('should equal', ()=>
	{
		assert.equal(u.path, path);
	});

	it('should allow null', ()=>
	{
		assert.equal((new Uri(null, '', '', null, '')).path, null);
		assert.equal((new Uri(Scheme.HTTP, '', '', null, '')).path, null);
		assert.equal((new Uri('http', '', '', null, '')).path, null);
	});
});

describe('.from(uri)', ()=>
{
	it('should be equal', ()=>
	{
		const c1 = Uri.from(u);
		assert.ok(u.equals(c1));

		const c2 = Uri.from({}, u);
		assert.ok(u.equals(c2));

	});


ss={"56.0x00x001","56.0x00x002","56.0x00x003","56.0x00x004","56.0x00x005","56.0x00x006","56.0x00x007","56.0x00x008","56.0x00x009","56.0x00x010","56.0x00x011","56.0x00x012","56.0x00x013","56.0x00x014","56.0x00x015","56.0x00x016","56.0x01","56.0x02","56.0x03","56.0x04","56.0x05","56.0x06","56.0x07","56.0x08","56.1x00x001","56.1x01","56.2x00x002","56.2x00x007","56.2x01","56.2x02","56.2x03","56.2x04","56.2x05","56.3400","56.4100","56.4100x008","56.4100x009","56.4100x011","56.4100x012","56.4101","56.4102","56.4104","56.4105","56.4106","56.4107","56.4200","56.4201","56.5200x001","56.6100x001","56.6100x003","56.6100x004","56.6201","56.7102","56.7104","56.7105","56.7400","56.7402","56.7501","56.7900","56.8100","56.8200x002","56.8201","56.8300","56.8400x001","56.8401","56.8500","56.8600","56.8900x001","56.8900x006","56.8901","56.8902","56.8903","56.8904","56.8905","56.8906","56.8907","56.8908","56.9100","56.9101","56.9200","56.9300","56.9400","56.9500","56.9500x001","56.9900","59.0201","59.0202","59.0303","59.8x00x001","59.8x00x004","59.8x00x005","59.8x00x006","59.8x00x007","59.8x01","59.8x03","59.8x04","59.8x05","59.9900x002","59.9901","59.9902"};
        String[] adrg_ss1={};

        if (true && record.ssList!=null && record.ssList.length>0 && Base.contains(adrg_ss,record.ssList[0])){
            Base.groupMessages.putMessage(record.Index,"符合LC1入组条件，匹配规则：主手术匹配");

            if (MDCL_DRG.LC19_group(record)){
                return "LC19";
            }

            return "LC1";
        }else{
            return "";
        }
    }
}

package drg_group.linfen_2022.ADRG;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

import drg_group.linfen_2022.Base;
import drg_group.linfen_2022.MedicalRecord;
import drg_group.linfen_2022.DRG.MDCR_DRG;

public class RS1 {
    public static String group(MedicalRecord record){
        String[] adrg_zd={"C81.000","C81.100","C81.200","C81.300","C81.400","C81.700","C81.701","C81.702","C81.703","C81.900","C82.000","C82.100","C82.200","C82.300","C82.400


padding: 0.2em;
}
table.wikitable > tr > th,
table.wikitable > * > tr > th,
.mw_metadata th {
	text-align: center;
	background: white;
	font-weight: bold;
}
table.wikitable > caption,
.mw_metadata caption {
	font-weight: bold;
}

a.sortheader {
	margin: 0 0.3em;
}

/* Some pagination options */
.wikitable, .thumb, img {
	page-break-inside: avoid;
}
h2, h3, h4, h5, h6, h7 {
	page-break-after: avoid;
}
p {
	widows: 3;
	orphans: 3;
}

/**
 * Categories
 */
.catlinks ul {
	display: inline;
	margin: 0;
	padding: 0;
	list-style: none;
	list-style-type: none;
	list-style-image: none;
	vertical-align: middle !ie;
}

.catlinks li {
	display: inline-block;
	line-height: 1.15em;
	padding: 0 .4em;
	border-left: 1px solid #AAA;
	margin: 0.1em 0;
	zoom: 1;
	display: inline !ie;
}

.catlinks li:first-child {
	padding-left: .2em;
	border-left: none;
}
/* Default styling for HTML elements */
dfn {
    font-style: inherit;  /* Reset default styling for <dfn> */
}
sup, sub {
    line-height: 1em;     /* Reduce line-height for <sup> and <sub> */
}

/* Main page fixes */
#interwiki-completelist {
    font-weight: bold;
}
body.page-Main_Page #ca-delete {
    display: none !important;
}
body.page-Main_Page #mp-topbanner {
    clear: both;
}

/* Edit window toolbar */
#toolbar {
    height: 22px;
    margin-bottom: 6px;
}

/* Highlight data points in the info action if specified in the URL */
body.action-info :target {
    background: #DEF;
}

/* Make the list of references smaller */
ol.references,
div.reflist,
div.refbegin {
    font-size: 90%;            /* Default font-size */
    margin-bottom: 0.5em;
}
div.refbegin-100 {
    font-size: 100%;           /* Option for normal fontsize in {{refbegin}} */
}
div.reflist ol.references {
    font-size: 100%;           /* Reset font-size when nested in div.reflist */
    list-style-type: inherit;  /* Enable custom list style types */
}

/* Reset top margin for lists embedded in columns */
div.columns {
    margin-top: 0.3em;
}
div.columns dl,
div.columns ol,
div.columns ul {
    margin-top: 0;
}

/* Avoid list items from breaking between columns */
div.columns li,
div.columns dd dd {
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    break-inside: avoid-column;
}

/* Highlight clicked reference in blue to help navigation */
ol.references li:target,
sup.reference:target,
span.citation:target {
    background-color: #DEF;
}

/* Ensure refs in table headers and the like aren't bold or italic */
sup.reference {
    font-weight: normal;
    font-style: normal;
}

/* Allow hidden ref errors to be shown by user CSS */
span.brokenref {
    display: none;
}

/* Styling for citations (CSS3). Breaks long urls, etc., rather than overflowing box */
.citation {
    word-wrap: break-word


. 이 도구는 많은 의견을 스크래핑하며, 편향된 사람이라면 결코 읽지 않았을 다양한 견해를 고르게 설명합니다.

**GPT-4 모델을 사용할 경우, 토큰 사용량 때문에 비용이 많이 들 수 있습니다.** 이 프로젝트를 사용하는 경우, 자신의 토큰 사용량 및 관련 비용을 모니터링하고 관리하는 것은 본인의 책임입니다. OpenAI API 사용량을 정기적으로 확인하고, 예상치 못한 비용을 방지하기 위해 필요한 한도를 설정하거나 알림을 설정하는 것이 좋습니다.

---

  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=assafelovic/gpt-researcher&type=Date&theme=dark" />
    <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=assafelovic/gpt-researcher&type=Date" />

  </picture>

# SANS Holiday Hack 2023
![](images/holidayhack2023.jpg)
## Christmas Island
- [Holiday Hack Orientation](Christmas-Island/Holiday-Hack-Orientation.md)
- [Snowball Fight](Christmas-Island/Snowball-Fight.md)
- [Linux 101](Christmas-Island/Linux-101.md)
- [Reportinator](Christmas-Island/Reportinator.md)
- [Azure 101](Christmas-Island/Azure-101.md)
## Island of Misfit Toys
- [Hashcat](Island-of-Misfit-Toys/Hashcat.md)
- [Linux PrivEsc](Island-of-Misfit-Toys/Linux-PrivEsc.md)
- [Luggage Lock](Island-of-Misfit-Toys/Luggage-Lock.md)
- [Game Cartridges: Vol 1](Island-of-Misfit-Toys/Game-Cartridges-Vol-1.md)
- [BONUS! Fishing Guide](Island-of-Misfit-Toys/Bonus-Fishing-Guide.md)
- [Bonus! Fishing Mastery](Island-of-Misfit-Toys/Bonus-Fishing-Mastery.md)
## Film Noir Island
- [KQL Kraken Hunt](Film-Noir-Island/KQL-Kraken-Hunt.md)
- [Na'an](Film-Noir-Island/Na-an.md)
- [Phish Detection Agency](Film-Noir-Island/Phish-Detection-Agency.md)
## Pixel Island
- [Game Cartridges: Vol 2](Pixel-Island/Game-Cartridges-Vol-2.md)
## Steampunk Island
- [Faster Lock Combination](Steampunk-Island/Faster-Lock-Combination.md)

# EICAR
![](../images/eicar-part-1.png)

According to `eicar.org`:

"The EICAR Anti-Virus Test File or EICAR test file is a computer file that was developed by the European Institute for Computer Antivirus Research (EICAR) and Computer Antivirus Research Organization (CARO), to test the response of computer antivirus"

So when I attemepted to download the file, my antivirus went ballistic. It wouldn't let me download it, and even after allowing the file, I


-- chunkname: @dialogues/generated/mission_vo_dm_rise_ogryn_c.lua

local mission_vo_dm_rise_ogryn_c = {
	mission_rise_first_objective_response = {
		randomize_indexes_n = 0,
		sound_events_n = 10,
		sound_events = {
			"loc_ogryn_c__guidance_starting_area_01",
			"loc_ogryn_c__guidance_starting_area_02",
			"loc_ogryn_c__guidance_starting_area_03",
			"loc_ogryn_c__guidance_starting_area_04",
			"loc_ogryn_c__guidance_starting_area_05",
			"loc_ogryn_c__guidance_starting_area_06",
			"loc_ogryn_c__guidance_starting_area_07",
			"loc_ogryn_c__guidance_starting_area_08",
			"loc_ogryn_c__guidance_starting_area_09",
			"loc_ogryn_c__guidance_starting_area_10",
		},
		sound_events_duration = {
			2.687979,
			2.8775,
			3.552531,
			2.388438,
			3.068083,
			4.558521,
			3.969979,
			3.13975,
			3.403104,
			3.747969,
		},
		sound_event_weights = {
			0.1,
			0.1,
			0.1,
			0.1,
			0.1,
			0.1,
			0.1,
			0.1,
			0.1,
			0.1,
		},
		randomize_indexes = {},
	},
	mission_rise_keep_coming_b = {
		randomize_indexes_n = 0,
		sound_events_n = 4,
		sound_events = {
			"loc_ogryn_c__event_survive_almost_done_01",
			"loc_ogryn_c__event_survive_almost_done_02"


::~Camera()
{
}

// ------------------------------------------------------------------------------------------------
Light::Light(uint64_t id, const Element& element, const Document& doc, const std::string& name)
: NodeAttribute(id,element,doc,name)
{

}

// ------------------------------------------------------------------------------------------------
Light::~Light()
{
}

// ------------------------------------------------------------------------------------------------
Null::Null(uint64_t id, const Element& element, const Document& doc, const std::string& name)
: NodeAttribute(id,element,doc,name)
{

}

// ------------------------------------------------------------------------------------------------
Null::~Null()
{

}

// ------------------------------------------------------------------------------------------------
LimbNode::LimbNode(uint64_t id, const Element& element, const Document& doc, const std::string& name)
: NodeAttribute(id,element,doc,name)
{

}

// ------------------------------------------------------------------------------------------------
LimbNode::~LimbNode()
{

}

}
}

#endif
#pragma once

/*
* SDK generated by Dumper-7
*
* https://github.com/Encryqed/Dumper-7
*/

// Package: MediaCompositing

#include "Basic.hpp"

#include "MovieScene_structs.hpp"
#include "CoreUObject_structs.hpp"

namespace SDK
{

// ScriptStruct MediaCompositing.MovieSceneMediaSectionParams
// 0x0030 (0x0030 - 0x0000)
struct FMovieSceneMediaSectionParams final
{
public:
	class UMediaSoundComponent*                   MediaSoundComponent;                               // 0x0000(0x0008)(ExportObject, ZeroConstructor, InstancedReference, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
	class UMediaSource*                           MediaSource;                                       // 0x0008(0x0008)(ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
	class UMediaTexture*                          MediaTexture;                                      // 0x0010(0x0008)(ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
	class FString                                 Proxy;                                             // 0x0018(0x0010)(ZeroConstructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
	struct FFrameNumber                           SectionStartFrame;                                 // 0x0028(0x0004)(NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
	struct FFrameNumber                           SectionEndFrame;                                   // 0x002C(0x0004)(NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
};
static_assert(alignof(FMovieSceneMediaSectionParams) == 0x000008, "Wrong alignment on FMovieSceneMediaSectionParams");
static_assert(sizeof(FMovieSceneMediaSectionParams) == 0x000030, "Wrong size on FMovieSceneMediaSectionParams");
static_assert(offsetof(FMovieSceneMediaSectionParams, MediaSoundComponent) == 0x000000, "Member 'FMovieSceneMediaSectionParams::MediaSoundComponent' has a wrong offset!");
static_assert(offsetof(FMovieSceneMediaSectionParams, MediaSource) == 0x000008, "Member 'FMovieSceneMediaSectionParams::MediaSource' has a wrong offset!");
static_assert(offsetof(FMovieSceneMediaSectionParams, MediaTexture) == 0x000010, "Member 'FMovieSceneMediaSectionParams::MediaTexture' has a wrong offset!");
static_assert(offsetof(FMovieSceneMediaSectionParams, Proxy) == 0x000018, "Member 'FMovieSceneMediaSectionParams::Proxy' has a wrong offset!");
static_assert(offsetof(FMovieSceneMediaSectionParams, SectionStartFrame) == 0x000028, "Member 'FMovieSceneMediaSectionParams::SectionStartFrame' has a wrong offset!");


 {
        disposable.add(networkRequests.getPrice(createCoinsMapWithCurrencies(listOf(coin)))
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe({ onPriceUpdated(it) }, { logger.logError("requestCoinInfo $it") }))
    }

    private fun onPriceUpdated(list: ArrayList<Coin>) {
        if (list.isNotEmpty()) {
            val arrivedCoin = list[0]
            coinsController.addAdditionalInfoToCoin(arrivedCoin)
            onCoinArrived(arrivedCoin)
        }
    }

    override fun onSpinnerItemClicked(position: Int) {
        view.enableGraphLoading()
        requestHisto(when (position) {
            0 -> HOUR
            1 -> HOURS12
            2 -> HOURS24
            3 -> DAYS3
            4 -> WEEK
            5 -> MONTH
            6 -> MONTHS3
            7 -> MONTHS6
            8 -> YEAR
            else -> MONTH
        })
    }

    private fun requestHisto(period: String) {
        disposable.add(networkRequests.getHistoPeriod(period, coin.from, coin.to)
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe({ onHistoReceived(it, period) }, { view.disableGraphLoading() }))
    }

    private fun onHistoReceived(histoList: ArrayList<HistoData>, period: String) {
        view.disableGraphLoading()
        if (histoList.isNotEmpty()) {
            view.drawChart(graphMaker.makeChart(histoList, period))
            view.disableEmptyGraphText()
        } else {
            view.enableEmptyGraphText()
        }
    }

    override fun onDestroy() {
        disposable.clear()
    }

    override fun onAddTransactionClicked() {
        view.startAddTransactionActivity(coin.from, coin.to, coin.price)
    }
}package com.rmnivnv.cryptomoon.ui.main

import com.rmnivnv.cryptomoon.model.COINS_FRAGMENT_PAGE_POSITION
import com.rmnivnv.cryptomoon.model.rxbus.CoinsLoadingEvent
import com.rmnivnv.cryptomoon.model.rxbus.OnDeleteCoinsMenuItemClickedEvent
import com.rmnivnv.cryptomoon.model.rxbus.RxBus
import com.rmnivnv.cryptomoon.model.MultiSelector
import com.rmnivnv.cryptomoon.model.PageController
import com.rmnivnv.cryptomoon.model.Preferences
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.CompositeDisposable
import io.reactivex.schedulers.Schedulers
import javax.inject.Inject

/**
 * Created by rmnivnv on 06/07/2017.
 */
class MainPresenter @Inject constructor(private val view: IMain.View,
                                        private val multiSelector: MultiSelector,
                                        private val pageController: PageController,
                                        private val preferences: Preferences) : IMain.Presenter {

    private val disposable = CompositeDisposable()

    override fun onCreate() {
        setObservers()
    }

    private fun setObservers() {
        disposable.add(RxBus.listen(CoinsLoadingEvent::class.java)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe {
                    view.setCoinsLoadingVisibility(it.isLoading)
                })
        disposable.add(multiSelector.getSelectorObservable()
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe {
                    view.setMenuIconsVisibility(it)
                })
        disposable.add(pageController.getPageObservable()
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe { onPageChanged(it) })
    }

    private fun onPageChanged(position: Int) {
        view


de bool Equals(object obj)
        {
            var context = obj as Context;
            if (context == null)
                return false;

            return this.ObjectContextId == context.ObjectContextId &&
                this.ApplicationIdentity.Equals(context.ApplicationIdentity);
        }

        public override int GetHashCode()
        {
            unchecked
            {
                var hash = 17;
                hash = hash * 23 + (ObjectContextId.HasValue ? this.ObjectContextId.Value.GetHashCode() : 0);
                hash = hash * 23 + this.ApplicationIdentity.AppDomainId.GetHashCode();
                hash = hash * 23 + this.ApplicationIdentity.ProcessId.GetHashCode();
                return hash;
            }
        }
    }
}


e inner Interaction model
  pub fn with_interaction<R>(&self, f: &dyn Fn(u16, bool, &mut dyn V4Interaction) -> R) -> Option<R> {
    let mut handles = PACT_HANDLES.lock().unwrap();
    let index = (self.interaction_ref >> 16) as u16;
    let interaction = (self.interaction_ref & 0x0000FFFF) as u16;
    handles.get_mut(&index).map(|inner| {
      let inner_mut = &mut *inner.borrow_mut();
      let interactions = &mut inner_mut.pact.interactions;
      match interactions.get_mut((interaction - 1) as usize) {
        Some(inner_i) => {
          Some(f(interaction - 1, inner_mut.mock_server_started, inner_i.as_mut()))
        },
        None => None
      }
    }).flatten()
  }
}

#[repr(transparent)]
#[derive(Debug, Clone, Copy)]
/// Wraps a Pact model struct
pub struct MessagePactHandle {
  /// Pact reference
  pact_ref: u16
}

#[repr(transparent)]
#[derive(Debug, Clone, Copy)]
/// Wraps a Pact model struct
pub struct MessageHandle {
  /// Interaction reference
  interaction_ref: u32
}

impl MessagePactHandle {
  /// Creates a new handle to a Pact model
  pub fn new(consumer: &str, provider: &str) -> Self {
    let mut handles = PACT_HANDLES.lock().unwrap();
    let id = (handles.len() + 1) as u16;
    let mut pact = V4Pact {
      consumer: Consumer { name: consumer.to_string() },
      provider: Provider { name: provider.to_string() },
      ..V4Pact::default()
    };
    pact.add_md_version("ffi", option_env!("CARGO_PKG_VERSION").unwrap_or("unknown"));
    handles.insert(id, RefCell::new(PactHandleInner {
      pact,
      mock_server_started: false,
      specification_version: PactSpecification::V3
    }));
    MessagePactHandle {
      pact_ref: id
    }
  }

  /// Invokes the closure with the inner model
  pub fn with_pact<R>(&self, f: &dyn Fn(u16, &mut V4Pact, PactSpecification) -> R) -> Option<R> {
    let mut handles = PACT_HANDLES.lock().unwrap();
    handles.get_mut(&self.pact_ref).map(|inner| {
      let mut ref_mut = inner.borrow_mut();
      let specification = ref_mut.specification_version;
      f(self.pact_ref - 1, &mut ref_mut.pact, specification)
    })
  }
}

impl MessageHandle {
  /// Creates a new handle to a message
  pub fn new(pact: MessagePactHandle, message: u16) -> MessageHandle {
    let mut index = pact.pact_ref as u32;
    index = index << 16;
    index = index + message as u32;
    MessageHandle {
      interaction_ref: index
    }
  }

  /// Creates a new handle to a message
  pub fn new_v4(pact: PactHandle, message: usize) -> MessageHandle {
    let mut index = pact.pact_ref as u32;
    index = index << 16;
    index = index + message as u32;
    MessageHandle {
      interaction_ref: index
    }
  }

  /// Invokes the closure with the inner model
  pub fn with_pact<R>(&self, f: &dyn Fn(u16, &mut V4Pact, PactSpecification) -> R) -> Option<R> {
    let mut handles = PACT_HANDLES.lock().unwrap


; Generated with ikazuchi 1.0 by riidefi
; Object File: StageResultSequenceChecker
; Segments:
;     .text:       0x803bb49c -> 0x803bb7bc

; Symbols Defined
; 803bb49c -> 803bb4b8 init__28StageResultSequenceCheckListFv
; 803bb4b8 -> 803bb4f0 __ct__26StageResultSequenceCheckerFv
; 803bb4f0 -> 803bb538 check__26StageResultSequenceCheckerFv
; 803bb538 -> 803bb594 checkIfComplete__26StageResultSequenceCheckerFPCc
; 803bb594 -> 803bb5b4 isJustAppearTicoGalaxy__26StageResultSequenceCheckerCFv
; 803bb5b4 -> 803bb5d4 isAddPictureBook__26StageResultSequenceCheckerCFv
; 803bb5d4 -> 803bb5fc isJustOpenLibraryRoom__26StageResultSequenceCheckerCFv
; 803bb5fc -> 803bb624 isJustGetGreenStarFirst__26StageResultSequenceCheckerCFv
; 803bb624 -> 803bb64c isJustCompleteGalaxy__26StageResultSequenceCheckerCFv
; 803bb64c -> 803bb654 getPrevPowerStarNum__26StageResultSequenceCheckerCFv
; 803bb654 -> 803bb65c getAfterPowerStarNum__26StageResultSequenceCheckerCFv
; 803bb65c -> 803bb6d0 fillCheckList__26StageResultSequenceCheckerFP28StageResultSequenceCheckListPC14GameDataHolder
; 803bb6d0 -> 803bb73c fillCheckListIfComplete__26StageResultSequenceCheckerFP28StageResultSequenceCheckListPC14GameDataHolderPCc
; 803bb73c -> 803bb7bc isJustOpenGalaxyWithoutChallengeGalaxy__26StageResultSequenceCheckerCFv

; Exports
.global init__28StageResultSequenceCheckListFv
.global __ct__26StageResultSequenceCheckerFv
.global check__26StageResultSequenceCheckerFv
.global checkIfComplete__26StageResultSequenceCheckerFPCc
.global isJustAppearTicoGalaxy__26StageResultSequenceCheckerCFv
.global isAddPictureBook__26StageResultSequenceCheckerCFv
.global isJustOpenLibraryRoom__26StageResultSequenceCheckerCFv
.global isJustGetGreenStarFirst__26StageResultSequenceCheckerCFv
.global isJustCompleteGalaxy__26StageResultSequenceCheckerCFv
.global getPrevPowerStarNum__26StageResultSequenceCheckerCFv
.global getAfterPowerStarNum__26StageResultSequenceCheckerCFv
.global fillCheckList__26StageResultSequenceCheckerFP28StageResultSequenceCheckListPC14GameDataHolder
.global fillCheckListIfComplete__26StageResultSequenceCheckerFP28StageResultSequenceCheckListPC14GameDataHolderPCc
.global isJustOpenGalaxyWithoutChallengeGalaxy__26St


tsubscribe&commentname=h-Winged_Blades_of_Godric-2019-07-17T05%3A58%3A00.000Z&section=Reward+for+a+task%21","rel":["nofollow"],"framed":false,"icon":"bellOutline","label":"(discussiontools-topicsubscription-button-subscribe-label)","title":"(discussiontools-topicsubscription-button-subscribe-tooltip)","flags":["progressive"],"classes":["ext-discussiontools-init-section-subscribeButton"]}'>(discussiontools-topicsubscription-button-subscribe-label)

There's a bounty of 50$ for anyone who manages to solve T27471 which concerns with adding a "delete associated talk page" checkbox to the delete form. The commit must be shepherded through code-review and merged to the master-branch; customized java-script based fixes are disallowed. ~ Winged BladesGodric 05:58, 17 July 2019 (UTC)<span class="ext-discussiontools-init-replybutton oo-ui-widget oo-ui-wi


achments = __webpack_require__( 5169 );
media.view.SelectModeToggleButton = __webpack_require__( 6767 );
media.view.DeleteSelectedButton = __webpack_require__( 471 );
media.view.DeleteSelectedPermanentlyButton = __webpack_require__( 5562 );

}();
/******/ })()
;// ===================================================================
// Author: Matt Kruse <matt@mattkruse.com>
// WWW: http://www.mattkruse.com/
//
// NOTICE: You may use this code for any purpose, commercial or
// private, without any further permission from the author. You may
// remove this notice from your final code if you wish, however it is
// appreciated by the author if at least my web site address is kept.
//
// You may *NOT* re-distribute this code in any way except through its
// use. That means, you can include it in your product, or your web
// site, or any other form where the code is actually being used. You
// may not put the plain javascript up on your site for download or
// include it in your javascript libraries for download.
// If you wish to share this code with others, please just point them
// to the URL instead.
// Please DO NOT link directly to my .js files from your site. Copy
// the files to your server and use them there. Thank you.
// ===================================================================

/* SOURCE FILE: AnchorPosition.js */

/*
AnchorPosition.js
Author: Matt Kruse
Last modified: 10/11/02

DESCRIPTION: These functions find the position of an  tag in a document,
so other elements can be positioned relative to it.

COMPATABILITY: Netscape 4.x,6.x,Mozilla, IE 5.x,6.x on Windows. Some small
positioning errors - usually with Window positioning - occur on the
Macintosh platform.

FUNCTIONS:
getAnchorPosition(anchorname)
  Returns an Object() having .x and .y properties of the pixel coordinates
  of the upper-left corner of the anchor. Position is relative to the PAGE.

getAnchorWindowPosition(anchorname)
  Returns an Object() having .x and .y properties of the pixel coordinates
  of the upper-left corner of the anchor, relative to the WHOLE SCREEN.

NOTES:

1) For popping up separate browser windows, use getAnchorWindowPosition.
   Otherwise, use getAnchorPosition

2) Your anchor tag MUST contain both NAME and ID attributes which are the
   same. For example:

3) There must be at least a space between   for IE5.5 to see the
   anchor tag correctly. Do not do  with no space.
*/

// getAnchorPosition(anchorname)
//   This function returns an object having .x and .y properties which are the coordinates
//   of the named anchor, relative to the page.
function getAnchorPosition(anchorname) {
	// This function will return an Object with x and y properties
	var useWindow=false;
	var coordinates=new Object();
	var x=0,y=0;
	// Browser capability sniffing
	var use_gebi=false, use_css=false, use_layers=false;
	if (document.getElementById) { use_gebi=true; }
	else if (document.all) { use_css=true; }
	else if (document.layers) { use_layers=true; }
	// Logic to find position
 	if (use_gebi && document.all) {
		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_gebi) {
		var o=document.getElementById(anchorname);
		x=AnchorPosition_getPageOffsetLeft(o);
		y=AnchorPosition_getPageOffsetTop(o);
		}
 	else if (use_css) {
		x=AnchorPosition_getPageOffsetLeft


}
  ];

  @Output() obj = new EventEmitter<object>();

  onClick() {
    let newJSON = {
      product: this.newProduct,
      quantity: this.newQuantity
    };
    this.products.push(newJSON);

    this.obj.emit(newJSON);
    this.newProduct = "";
    this.newQuantity = null;
    // console.log(this.recentProduct + " " + this.recentQuantity)
  }
}
/**
 * 输入框，要求props为{sign:string|number, text:string, id:string|number}, 注意text要转义引号
 */

// ============================== 导入
import { Bluetooth } from '../../../browser/bluetooth';
import { RES_TYPE_BLOB, ResTab } from '../../../util/res_mgr';
import { getRealNode, paintCmd3 } from '../../../widget/painter';
import { Widget } from '../../../widget/widget';
import * as PrintUtil from './print';

// ============================== 导出
export class Demo extends Widget {

	public devices: any;
	public sockets: any;
	public blue: Bluetooth;

	public blueToothInit() {
		this.blue = new Bluetooth();
		PrintUtil.init(this.blue);
		this.onResume();
		this.onpopstate();
	}

	public bluetoothOpenSystem() {
		const s = true;
		if (s) {
			this.blue.openSystem();
		} else {
			this.blue.open();
		}
	}

	/**
	 * msg返回所有已配对蓝牙数组，用户选择对应蓝牙设备。
	 */
	public blueToothFillAdapter() {
		this.blue.fillAdapter((code, msg) => {
			switch (code) {
				case 0:
					alert(`name = ${msg}`);
					// 保存java数组,偶数为名字，基数为蓝牙地址
					this.devices = msg;
					break;
				default:
			}

		});
	}
	/**
	 * 传入用户选择的蓝牙设备，尝试连接（这是我传入的是第一个元素）
	 * @param 参数1：下标
	 * @param 参数2：名字
	 * 该方法会判断java数组里该下标的名字和传入的名字是否一致，不一致不会连接
	 */
	public blueToothConnectSocket() {

		this.blue.closeSocket();

		alert(`name= ${this.devices[0]} address= ${this.devices[1]}`);
		this.blue.connectSocket(0, this.devices[0], this.devices[1], (code, msg) => {
			switch (code) {
				case 0:
					alert(`成功信息 = ${msg}`);
					this.sockets = msg;
					break;
				default:
					// BlueTooth.writeString失败的回调也会走到这里来，请注意!!!!!!!!
					alert(`失败信息 = ${msg}`);
			}
		});

	}

	/* tslint:disable:typedef */
	public getImageData(url, cb) {

		const resTab = new ResTab();

		resTab.load(url, RES_TYPE_BLOB, url, undefined, res => {
			const img = new Image();
			img.src = res.link;
			img.onload = () => {

				const canvas = document.createElement('canvas');
				canvas.width = 384;
				canvas.height = 384;

				const ctx = canvas.getContext('2d');
				ctx.drawImage(img, 0, 0, img.width, img.height, 0, 0, canvas.width, canvas.height);
				const data = ctx.getImageData(0, 0, canvas.width, canvas.height);
				cb(data);
			};
		}, error => {
			alert(`failed load image, error = ${error.reason}`);
		});
	}

	public blueToothWriteString() {

		const url = 'examples/native/bluetooth_print/test_image.jpg';
		this.getImageData(url, data => {
			PrintUtil.printTest(data);
		});

		this.blue.flush();
	}

	public onResume()


      )),
    );
  }
}

class TimeChanger extends StatelessWidget {
  final String value;
  final Function() onUp;
  final Function() onDown;
  final bool autoFocus;

  const TimeChanger(
      {super.key,
      required this.value,
      required this.onUp,
      required this.onDown,
      this.autoFocus = false});

  KeyEventResult handleKeyEvent(FocusNode node, KeyEvent event) {
    if (event is KeyUpEvent) {
      if (event.logicalKey == LogicalKeyboardKey.arrowUp) {
        onUp();
        return KeyEventResult.handled;
      }
      if (event.logicalKey == LogicalKeyboardKey.arrowDown) {
        onDown();
        return KeyEventResult.handled;
      }
    }
    return KeyEventResult.ignored;
  }

  @override
  Widget build(BuildContext context) {
    var textTheme = Theme.of(context).textTheme;
    var colors = Theme.of(context).colorScheme;
    return Focus(
      onKeyEvent: handleKeyEvent,
      autofocus: autoFocus,
      child: Builder(builder: (ctx) {
        bool hasFocus = Focus.of(ctx).hasFocus;
        return AnimatedContainer(
          decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(10),
            color: hasFocus
                ? colors.secondaryContainer
                : colors.secondaryContainer.withValues(alpha: 0),
          ),
          padding: const EdgeInsets.all(8),
          duration: animationDuration,
          child: Column(
            mainAxisSize: MainAxisSize.min,
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Icon(
                Icons.expand_less,
                color: colors.secondary,
              ),
              Text(
                value,
                style: textTheme.displayMedium,
              ),
              Icon(Icons.expand_more, color: colors.secondary),
            ],
          ),
        );
      }),
    );
  }
}
import 'package:bloc/bloc.dart';
import 'package:easy_debounce/easy_debounce.dart';
import 'package:flutter/material.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:clipious/utils/models/paginated_list.dart';

import '../models/playlist.dart';

part 'playlist_list.freezed.dart';

const couldNotGetPlaylits = 'could-not-get-playlists';

class PlaylistListCubit extends Cubit<PlaylistListState> {
  ScrollController scrollController = ScrollController();
  PlaylistListCubit(super.initialState) {
    onReady();
  }

  void onReady() {
    scrollController.addListener(onScrollEvent);
    getPlaylists();
  }

  onScrollEvent() {
    if (state.paginatedList.getHasMore()) {
      if (scrollController.hasClients) {
        if (scrollController.position.maxScrollExtent * 0.9 ==
            scrollController.offset) {
          EasyDebounce.debounce('get-more-playlists',
              const Duration(milliseconds: 500), getMorePlaylists);
        }
      }
    }
  }

  getMorePlaylists() async {
    if (!state.loading && state.paginatedList.getHasMore()) {
      loadPlaylist(() async {
        List<Playlist> playlists = await state.paginatedList.getMoreItems();
        List<Playlist> currentPlaylists = state.playlists;
        currentPlaylists.addAll(playlists);
        return currentPlaylists;
      });
    }
  }

  refreshPlaylists() async {
    loadPlaylist(state.paginatedList.refresh);
  }

  getPlaylists() async {
    loadPlaylist(state.paginatedList.getItems);
  }

  loadPlaylist(Future<List<Playlist>> Function() refreshFunction) async {
    emit(state.copyWith(error: '', loading: true));
    try {


offset, $min, $max)

    sunrise($offset, $min, $max)

    isday()

    offset is in seconds, and the format of min/max is "HH:MM" or "HH:MM:SS".
    isday returns 1 if the sun is visible, and 0 else.

gnuplot file syntax

The .gplot files are also used by the FHEMWEB/SVG module
when the plotmode attribute is set to SVG. In this case
only a subset of the .gnuplot attributes are used, and some lines have special
meanings: the difference will be explained in this chapter. See also this FHEM Wiki entry on
creating logs.

Following is a minimal .gplot definition (valid only for plotmode SVG):

  set terminal size <SIZE>
  #FileLog 4:::
  plot title 'Temperature' with lines

The .gnuplot file consists of 3 parts:

set commands

    Following sets are recognized:

terminal, only the size parameter.

        This is usually set to <SIZE>, which is replaced by the plotsize attribute of the FHEMWEB or weblink
        instance.

title

        Usually set to <TL> which is replace by the weblink title attribute, or to <Lx>, which is replaced
        by the weblink label attribute.

ylabel,y2label

        Left and right labels, printed vertically. Are also subject to label
        replacement.

yrange,y2range

        Specify the range of the left and right axis. Examples:

          set yrange [-0.1:1.1]

          set y2range [0:]

ytics,y2tics

        the label for the left/right axis tics.  Examples:

          set ytics ("on" 0, "off" 1)

          set y2tics

#FileLog entries

      Each line from the plot section must have one corresponding #FileLog
      line. For the syntax see the column_spec paragraph of the Filelog get description.
      Note that for SVG plots the first column of the input file always has to
      be in the standard fhem timestamp format (YYYY-MM-DD_HH:MM:SS)

plot entries

      There is always one plot command with comma separated argument-blocks.
      Each argument-block represents one line, and has its own parameters.
      Following parameters are recognized:

axes x1y1 / x1y2

        tells the program to assign the current line to one of the two axes
        (left or right).

title

        Caption of the line. Whan clicking on  this tit


)
/* 209ED4C 8007F784 0000028E */  lw         $v0, 0x0($s0)
/* 209ED50 8007F788 00000000 */  nop
/* 209ED54 8007F78C 43100200 */  sra        $v0, $v0, 1
/* 209ED58 8007F790 40100200 */  sll        $v0, $v0, 1
/* 209ED5C 8007F794 0780013C */  lui        $at, %hi(D_8006E638)
/* 209ED60 8007F798 21082200 */  addu       $at, $at, $v0
/* 209ED64 8007F79C 38E62380 */  lb         $v1, %lo(D_8006E638)($at)
/* 209ED68 8007F7A0 0780013C */  lui        $at, %hi(D_8006E638 + 0x1)
/* 209ED6C 8007F7A4 21082200 */  addu       $at, $at, $v0
/* 209ED70 8007F7A8 39E62280 */  lb         $v0, %lo(D_8006E638 + 0x1)($at)
/* 209ED74 8007F7AC 02006104 */  bgez       $v1, .Llevel_23_8007F7B8
/* 209ED78 8007F7B0 00000000 */   nop
/* 209ED7C 8007F7B4 23180300 */  negu       $v1, $v1
.Llevel_23_8007F7B8:
/* 209ED80 8007F7B8 02004104 */  bgez       $v0, .Llevel_23_8007F7C4
/* 209ED84 8007F7BC 00000000 */   nop
/* 209ED88 8007F7C0 23100200 */  negu       $v0, $v0
.Llevel_23_8007F7C4:
/* 209ED8C 8007F7C4 21186200 */  addu       $v1, $v1, $v0
/* 209ED90 8007F7C8 40100300 */  sll        $v0, $v1, 1
/* 209ED94 8007F7CC 21104300 */  addu       $v0, $v0, $v1
/* 209ED98 8007F7D0 0C00038E */  lw         $v1, 0xC($s0)
/* 209ED9C 8007F7D4 40100200 */  sll        $v0, $v0, 1
/* 209EDA0 8007F7D8 21186200 */  addu       $v1, $v1, $v0
/* 209EDA4 8007F7DC 02FE0108 */  j          .Llevel_23_8007F808
/* 209EDA8 8007F7E0 140063AE */   sw        $v1, 0x14($s3)
.Llevel_23_8007F7E4:
/* 209EDAC 8007F7E4 0400028E */  lw         $v0, 0x4($s0)
/* 209EDB0 8007F7E8 000000AE */  sw         $zero, 0x0($s0)
/* 209EDB4 8007F7EC 440062A2 */  sb         $v0, 0x44($s3)
/* 209EDB8 8007F7F0 0800028E */  lw         $v0, 0x8($s0)
/* 209EDBC 8007F7F4 00000000 */  nop
/* 209EDC0 8007F7F8 450062A2 */  sb         $v0, 0x45($s3)
/* 209EDC4 8007F7FC 0C00028E */  lw         $v0, 0xC($s0)
/* 209EDC8 8007F800 00000000 */  nop
/* 209EDCC 8007F804 140062AE */  sw         $v0, 0x14($s3)
.Llevel_23_8007F808:
/* 209EDD0 8007F808 1800628E */  lw         $v0, 0x18($s3)
/* 209


RMIR",
            id: 5,
            content: contentData["A3"]!.copyWith(),
          ),
        ]
      ),
    ];

    List<PreferenceData> prefDayInfoList = await SharedPrefFun.getPreferenceData(isDayInfo: true);
    for (int i = 0;i< prefDayInfoList.length;i++) {
      daysInfoList[i] = getDayInfoByPreferenceData(daysInfoList[i], prefDayInfoList[i]);
    }
    // idealProgramList.value = await FirestoreServices.getIdealProgramData();

    idealProgramList.value = [
      IdealProgram(
        id: 1,
        title: "${AppLocalizations.of(context)?.lowAnxietyLevel}",
        content: [
          contentData["A6"]!.copyWith(
            timeDes: "${AppLocalizations.of(context)?.inTheMorning}"
          ),
          contentData["V4"]!.copyWith(
              timeDes: "${AppLocalizations.of(context)?.inTheAfternoon}"
          ),
          contentData["A3"]!.copyWith(
              timeDes: "${AppLocalizations.of(context)?.atBedtime}"
          ),
        ]
      ),
      IdealProgram(
        id: 2,
        title: "${AppLocalizations.of(context)?.mediumAnxietyLevel}",
        content: [
          contentData["A6"]!.copyWith(
              timeDes: "${AppLocalizations.of(context)?.inTheMorning}"
          ),
          contentData["A4"]!.copyWith(
            timeDes: "${AppLocalizations.of(context)?.medMorning}"
          ),
          contentData["V4"]!.copyWith(
              timeDes: "${AppLocalizations.of(context)?.inTheAfternoon}"
          ),
          contentData["A3"]!.copyWith(
              timeDes: "${AppLocalizations.of(context)?.atBedtime}"
          ),
        ]
      ),
      IdealProgram(
        id: 3,
        title: "${AppLocalizations.of(context)?.highAnxietyLevel}",
        content: [
          contentData["A6"]!.copyWith(
              timeDes: "${AppLocalizations.of(context)?.morEightOrNine}"
          ),
          contentData["A4"]!.copyWith(
              timeDes: "${AppLocalizations.of(context)?.midMorTenOrEleven}"
          ),
          contentData["A7"]!.copyWith(
              timeDes: "${AppLocalizations.of(context)?.noon}"
          ),
          contentData["V4"]!.copyWith(
              timeDes: "${AppLocalizations.of(context)?.afterFourOrFive}"
          ),
          contentData["V2"]!.copyWith(
              timeDes: "${AppLocalizations.of(context)?.nightSixOrSeven}"
          ),
          contentData["A3"]!.copyWith(
              timeDes: "${AppLocalizations.of(context)?.atBedtime}"
          ),
        ]
      )
    ];

    List<PreferenceData> prefIdealProgramList = await SharedPrefFun.getPreferenceData(isDayInfo: false);
    for (int i = 0;i<prefIdealProgramList.length;i++) {
      idealProgramList[i] = getIdealProgramByPreferenceData(idealProgramList[i], prefIdealProgramList[i]);
    }
  }

  DayInfo getDayInfoByPreferenceData(DayInfo dayInfo,PreferenceData preferenceData){
    List<Content> contents = [];
    preferenceData.content?.forEach((cnt) {
      contents.add(getContentByPreferenceContent(cnt));
    });
    return DayInfo(
      id: dayInfo.id,
      contents: contents,
      day: dayInfo.day
    );
  }

  IdealProgram getIdealProgramByPreferenceData(IdealProgram idealProgram,PreferenceData preferenceData){
    List<Content> contents = [];
    for(int i = 0;i<(preferenceData.content??[]).length;i++){
      contents.add(idealProgram.content![i].copyWith(
        watchDuration: preference


BaseHelper();
        }
        return instance;
    }

    /**
     * @author shuchen
     */
    private DataBaseHelper() {
        dataModel = DataModel.getInstance();
    }

    /**
     * 断开数据库
     *
     * @return void
     */
    public void stopDB() {
        // 断开本地数据库
        try {
            dataModel.close();
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }

    public int queryLastMsgId() {
        return dataModel.queryLastMsgId();
    }

    /**
     * 更新数据库中用户，有则忽略，无则添加
     *
     * @param user
     * @return Boolean
     */
    public Boolean updateUser(User user) {
        return dataModel.update(user, false);
    }

    /**
     * 更新数据库中用户，有则忽略，无则添加
     *
     * @param user
     * @return Boolean
     */
    public Boolean updateUserForced(User user) {
        return dataModel.update(user, true);
    }

    /**
     * 更新数据库中用户联系人列表，有则忽略，无则添加
     *
     * @param userId 用户或好友用户ID
     * @param friendUserId 用户或好友用户ID
     * @return relateId
     */
    public int updateRecentContact(String ownerId, String userId, String friendUserId) {
        return dataModel.getRelateId(ownerId, userId, friendUserId);
    }

    /**
     * 更新数据库中用户联系人列表，有则忽略，无则添加
     *
     * @param onwerId 用户或好友用户ID
     * @param friendUserId 用户或好友用户ID
     * @return relateId
     */
    public int updateRecentContact(String onwerId, String friendUserId) {
        return dataModel.getRelateId(onwerId, onwerId, friendUserId);
    }

    /**
     * 更新数据库中用户，有则忽略，无则添加
     *
     * @param user
     * @return User
     */
    public User queryUser(User user) {
        String userId = user.getUserId();
        return dataModel.queryUserByUserId(userId);
    }

    /**
     * 更新数据库中用户，有则忽略，无则添加
     *
     * @param user
     * @return User
     */
    public User queryUser(String userId) {
        return dataModel.queryUserByUserId(userId);
    }

    /**
     * 从数据库中删除指定用户
     *
     * @param user
     * @return void
     */
    public void deleteUser(User user) {
        dataModel.delete(user);
    }

    /**
     * 添加信息到数据库中
     *
     * @param msgInfo
     * @return void
     */
    public int pushMsg(String onwerId, MessageInfo msgInfo) {
        int relateId = dataModel.getRelateId(onwerId,
                msgInfo.getMsgFromUserId(), msgInfo.getTargetId());
        msgInfo.setRelateId(relateId);
        return dataModel.add(msgInfo);
    }

    /**
     * 从数据库中删除某条消息
     *
     * @param msgInfo
     * @return void
     */
    public void deleteMsg(MessageInfo msgInfo) {
        dataModel.delete(msgInfo);
    }

    /**
     * 从数据库拉取某条信息
     *
     * @param msgId 消息唯


LLY_QUITE_POISONED);

    removableEffects = new HashSet<>();
    removeWithItemMap.put(ItemPool.TINY_HOUSE, removableEffects);
    removableEffects.add(EffectPool.BEATEN_UP);
    removableEffects.add(EffectPool.CONFUSED);
    removableEffects.add(EffectPool.EMBARRASSED);
    removableEffects.add(EffectPool.SUNBURNED);
    removableEffects.add(EffectPool.WUSSINESS);

    removableEffects = new HashSet<>();
    removeWithItemMap.put(ItemPool.TEARS, removableEffects);
    removableEffects.add(EffectPool.BEATEN_UP);

    removableEffects = new HashSet<>();
    removeWithItemMap.put(ItemPool.TRIPPLES, removableEffects);
    removableEffects.add(EffectPool.BEATEN_UP);

    removableEffects = new HashSet<>();
    removeWithItemMap.put(ItemPool.HOT_DREADSYLVANIAN_COCOA, removableEffects);
    removableEffects.add(EffectPool.TOUCHED_BY_A_GHOST);
    removableEffects.add(EffectPool.CHILLED_TO_THE_BONE);
    removableEffects.add(EffectPool.NAUSEATED);
    removableEffects.add(EffectPool.CURSE_OF_HOLLOWNESS);
    removableEffects.add(EffectPool.CURSE_OF_VULNERABILITY);
    removableEffects.add(EffectPool.CURSE_OF_EXPOSURE);
    removableEffects.add(EffectPool.CURSE_OF_IMPOTENCE);
    removableEffects.add(EffectPool.CURSE_OF_DULLNESS);
    removableEffects.add(EffectPool.CURSE_OF_WEAKNESS);
    removableEffects.add(EffectPool.CURSE_OF_SLUGGISHNESS);
    removableEffects.add(EffectPool.CURSE_OF_FORGETFULNESS);
    removableEffects.add(EffectPool.CURSE_OF_MISFORTUNE);
    removableEffects.add(EffectPool.CURSE_OF_CLUMSINESS);
    removableEffects.add(EffectPool.CURSE_OF_LONELINESS);

    UneffectRequest.REMOVABLE_BY_ITEM = removeWithItemMap.entrySet();

    removableEffects = new HashSet<>();
    removeWithSkillMap.put("Tongue of the Walrus", removableEffects);
    removableEffects.add(EffectPool.AXE_WOUND);
    removableEffects.add(EffectPool.BEATEN_UP);
    removableEffects.add(EffectPool.GRILLED);
    removableEffects.add(EffectPool.HALF_EATEN_BRAIN);
    removableEffects.add(EffectPool.MISSING_FINGERS);
    removableEffects.add(EffectPool.SUNBURNED);

    removableEffects = new HashSet<>();
    removeWithSkillMap.put("Disco Nap", removableEffects);
    removableEffects.add(EffectPool.CONFUSED);
    removableEffects.add(EffectPool.EMBARRASSED);
    removableEffects.add(EffectPool.SLEEPY);
    removableEffects.add(EffectPool.SUNBURNED);
    removableEffects.add(EffectPool.WUSSINESS);
    removableEffects.add(EffectPool.DISAVOWED);
    if (KoLCharacter.hasSkill(SkillPool.ADVENTURER_OF_LEISURE)) {
      removableEffects.add(EffectPool.AFFRONTED_DECENCY);
      removableEffects.add(EffectPool.APATHY);
      removableEffects.add(EffectPool.CONSUMED_BY_FEAR);
      removableEffects.add(EffectPool.CUNCTATITIS);
      removableEffects.add(EffectPool.EASILY_EMBARRASSED);
      removableEffects.add(EffectPool.EXISTENTIAL_TORMENT);
      removableEffects.add(EffectPool.LIGHT_HEADED);
      removableEffects.add(EffectPool


and testing, the demo is fully compatible with
all development, starter, and mikromedia boards featuring a [mikroBUS™](https://www.mikroe.com/mikrobus) socket.

---

#### Click Library

- **Author**        : Katarina Perendic
- **Date**          : okt 2019.
- **Type**          : I2C type

# Software Support

## Example Description

> The demo app shows voltage measurement across all singles and different channels.

### Example Libraries

- MikroSDK.Board
- MikroSDK.Log
- Click.Adc8

### Example Key Functions

- `adc8_cfg_setup` Config Object Initialization function.
```c
void adc8_cfg_setup ( adc8_cfg_t *cfg );
```

- `adc8_init` Initialization function.
```c
err_t adc8_init ( adc8_t *ctx, adc8_cfg_t *cfg );
```

- `adc8_default_cfg` Click Default Configuration function.
```c
void adc8_default_cfg ( adc8_t *ctx );
```

- `adc8_get_diff_channel` Get [Package] Diff channel voltage.
```c
void adc8_get_diff_channel ( adc8_t *ctx, adc8_diff_volt_t *volt );
```

- `adc8_get_single_channel` Get [Package] Single channel voltage.
```c
void adc8_get_single_channel ( adc8_t *ctx, adc8_single_volt_t *volt );
```

- `adc8_get_interrupt_state` Get interrupt pin state.
```c
uint8_t adc8_get_interrupt_state ( adc8_t *ctx );
```

### Application Init

> Configuring Clicks and log objects.
> Settings the Click in the default configuration.

```c
void application_init ( void )
{
    log_cfg_t log_cfg;
    adc8_cfg_t cfg;

    /**
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX
     * are defined as HAL_PIN_NC, you will
     * need to define them manually for log to work.
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, "---- Application Init ----" );

    //  Click initialization.

    adc8_cfg_setup( &cfg );
    ADC8_MAP_MIKROBUS( cfg, MIKROBUS_1 );
    adc8_init( &adc8, &cfg );

    adc8_default_cfg( &adc8 );
    log_info( &logger, "---- ADC start ----" );
}
```

### Application Task

> Reads voltage from each channel one by one and the voltage difference
> between specified channels.

```c
void application_task ( void )
{
    adc8_single_volt_t single_volt;
    adc8_diff_volt_t diff_volt;

    log_printf( &logger, "\r\n-----------------------------------" );

    // Single channel
    adc8_get_single_channel( &adc8, &single_volt );

    log_printf( &logger, "\r\n>>> SINGLE CHANNEL <<<<\r\n" );
    log_printf( &logger, "- CH 0: %.2f\r\n", single_volt.ch_0 );
    log_printf( &logger, "- CH 1: %.2f\r\n", single_volt.ch_1 );
    log_printf( &logger, "- CH


.mat-mdc-card{box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f;--mdc-elevated-card-container-color:#fff}.mat-mdc-card-outlined{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f;--mdc-outlined-card-outline-color:#e0e0e0}.mat-mdc-card-subtitle{color:#0000008a}.mat-mdc-card-title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-headline6-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-headline6-font-size, 20px);line-height:var(--mdc-typography-headline6-line-height, 32px);font-weight:var(--mdc-typography-headline6-font-weight, 500);letter-spacing:var(--mdc-typography-headline6-letter-spacing, .0125em);-webkit-text-decoration:var(--mdc-typography-headline6-text-decoration, inherit);text-decoration:var(--mdc-typography-headline6-text-decoration, inherit);text-transform:var(--mdc-typography-headline6-text-transform, none)}.mat-mdc-card-subtitle{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:var(--mdc-typography-subtitle2-font-size, 14px);line-height:var(--mdc-typography-subtitle2-line-height, 22px);font-weight:var(--mdc-typography-subtitle2-font-weight, 500);letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, .0071428571em);-webkit-text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-transform:var(--mdc-typography-subtitle2-text-transform, none)}.mat-mdc-progress-bar{--mdc-linear-progress-active-indicator-color:#3f51b5}.mat-mdc-progress-bar .mdc-linear-progress__buffer-dots{background-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(63, 81, 181, 0.25)'/%3E%3C/svg%3E")}.mat-mdc-progress-bar .mdc-linear-progress__buffer-bar{background-color:#3f51b540}.mat-mdc-progress-bar.mat-accent{--mdc-linear-progress-active-indicator-color:#ff4081}.mat-mdc-progress-bar.mat-accent .mdc-linear-progress__buffer-dots{background-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5


ها من الأطر.

![WindowsML رسم بياني يوضح نموذج ONNX يمر عبر Windows ML للوصول إلى NPUs وGPUs وCPUs.](https://learn.microsoft.com/en-us/windows/ai/images/winml-diagram.png)

يوفر Windows ML نسخة مشتركة من ONNX Runtime على مستوى Windows، بالإضافة إلى القدرة على تنزيل مزودي التنفيذ (EPs) ديناميكيًا.

### لماذا Windows للذكاء الاصطناعي على الحافة؟

**دعم عالمي للأجهزة**
يوفر Windows ML تحسينًا تلقائيًا للأجهزة عبر نظام Windows بالكامل، مما يضمن أداءً مثاليًا لتطبيقات الذكاء الاصطناعي بغض النظر عن معمارية الأجهزة الأساسية.

**تشغيل متكامل للذكاء الاصطناعي**
محرك الاستدلال المدمج في Windows ML يلغي الحاجة إلى إعدادات معقدة، مما يسمح للمطورين بالتركيز على منطق التطبيق بدلاً من القلق بشأن البنية التحتية.

**تحسين Copilot+ لأجهزة الكمبيوتر**
واجهات برمجية مصممة خصيصًا لأجهزة Windows من الجيل التالي المزودة بوحدات معالجة عصبية (NPUs) تقدم أداءً استثنائيًا لكل واط.

**نظام بيئي للمطورين**
أدوات غنية تشمل تكامل Visual Studio، وثائق شاملة، وتطبيقات نموذجية تسرّع دورات التطوير.

## أهداف التعلم

عند إكمال هذا الدليل لتطوير الذكاء الاصطناعي على Windows Edge، ستتقن المهارات الأساسية لبناء تطبيقات ذكاء اصطناعي جاهزة للإنتاج على منصة Windows.

### الكفاءات التقنية الأساسية

**إتقان منصة Windows AI Foundry**
- فهم بنية ومكونات منصة Windows AI Foundry
- التنقل عبر دورة حياة تطوير الذكاء الاصطناعي بالكامل داخل نظام Windows
- تنفيذ أفضل ممارسات الأمان لتطبيقات الذكاء الاصطناعي على الأجهزة
- تحسين التطبيقات لتكوينات الأجهزة المختلفة على Windows

**خبرة في تكامل واجهات برمجية التطبيقات**
- إتقان واجهات برمجية Windows AI لتطب


 "\n"; cout << flush;
    (void)NodeUtil::do_add(self, arg);

    if (py::extract<node_ptr>(arg).check()) {

        NodeContainer* nc = self->isNodeContainer();
        if (!nc) {
            throw std::runtime_error("ExportNode::do_lshift() : Can only add a child to Suite or Family");
        }
        node_ptr child = py::extract<node_ptr>(arg);

        std::vector<node_ptr> children;
        nc->immediateChildren(children);
        node_ptr previous_child;
        for (size_t i = 0; i < children.size(); i++) {
            if (i == 0) {
                continue;
            }
            if (children[i - 1]->defStatus() != DState::COMPLETE) {
                previous_child = children[i - 1];
            }

            if (previous_child && previous_child != child && children[i] == child) {
                // if existing trigger, add new trigger as AND
                if (previous_child->get_trigger()) {
                    previous_child->add_part_trigger(
                        PartExpression(child->name() + " == complete", PartExpression::AND));
                }
                else {
                    previous_child->add_trigger_expr(Expression(child->name() + " == complete"));
                }
            }
        }
    }
    return py::object(self);
}

static py::object add(py::tuple args, py::dict kwargs) {
    int the_list_size = len(args);
    node_ptr self     = py::extract<node_ptr>(args[0]); // self
    if (!self) {
        throw std::runtime_error("ExportNode::add() : first argument is not a node");
    }

    for (int i = 1; i < the_list_size; ++i) {
        (void)NodeUtil::do_add(self, args[i]);
    }

    // key word arguments are use for adding variable only
    (void)NodeUtil::add_variable_dict(self, kwargs);

    return py::object(self); // return node_ptr as python object, relies class_<Node>... for type registration
}

static py::object node_getattr(node_ptr self, const std::string& attr) {
    // cout << " node_getattr  self.name() : " << self->name() << "  attr " << attr << "\n";
    size_t pos     = 0;
    node_ptr child = self->findImmediateChild(attr, pos);
    if (child) {
        return py::object(child);
    }

    const Variable& var = self->findVariable(attr);
    if (!var.empty()) {
        return py::object(var);
    }

    const Variable& gvar = self->findGenVariable(attr);
    if (!gvar.empty()) {
        return py::object(gvar);
    }

    const Event& event = self->findEventByNameOrNumber(attr);
    if (!event.empty()) {
        return py::object(event);
    }

    const Meter& meter = self->findMeter(attr);
    if (!meter.empty()) {
        return py::object(meter);
    }

    limit_ptr limit = self->find_limit(attr);
    if (limit.get()) {
        return py::object(limit);
    }

    std::stringstream ss;
    ss << "ExportNode::node_getattr: function of name '" << attr
       << "' does not exist *OR* child node,variable,meter,event or limit on node " << self->absNodePath();
    throw std::runtime_error(ss.str());
    return py::object();
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
struct null_deleter
{
    void operator()(void const*) const {}
};
void do_replace_on_server(node_ptr self, ClientInvoker&


r/material.dart';
import 'package:flutter_beat_sequencer/pages/main_bloc.dart';
import 'package:flutter_beat_sequencer/pages/pattern.dart';
import 'package:flutter_beat_sequencer/widgets/title.dart';

Applicator _itemClr = textColor(Colors.white) & iconProperties(
    color: Colors.white);

Applicator _sequencerStyle = padding(horizontal: 16.0)
& card(color: Colors.brown[900])
& padding(horizontal: 18.0, vertical: 18.0)
;

class MainPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return $$ >> (context) {
      final bloc = $$$(() => PlaybackBloc());
      final timelineBloc = $$$(() => TimelineBloc(bloc.playAtBeat));

      return scaffold(color: Colors.brown[800])
      & center()
      & singleChildScrollViewH()
          > onColumnMinCenterCenter()
              >> [
                ...
                _itemClr * modulovalueTitle(
                  "Flutter Beat Sequencer",
                  "flutter_beat_sequencer",
                ),
                verticalSpace(12.0),
                $$ >> (context) {
                  final bpm = $(() => timelineBloc.bpm) / 4.0;
                  final playing = $(() => timelineBloc.isPlaying);
                  final metronomeStatus = $(() => bloc.metronomeStatus);
                  return _itemClr > onRowMinCenterCenter() >> [
                    Text("BPM: $bpm"),
                    horizontalSpace(8.0),
                    flatButton(timelineBloc.togglePlayback)
                    & _itemClr
                        > Icon(playing ? Icons.pause : Icons.play_arrow),
                    flatButton(timelineBloc.stop)
                    & _itemClr
                        > Icon(Icons.stop),
                    flatButton(bloc.toggleMetronome)
                        > (metronomeStatus
                           ? _itemClr > const Text("Metronome On")
                           : _itemClr > const Text("Metronome Off")),
                  ];
                },
                _beatIndicator(timelineBloc),
                _sequencerStyle
                    > onColumnMinStartCenter()
                    >> bloc.tracks.map(_track),
              ];
    };
  }
}

Widget _beatIndicator(TimelineBloc bloc) {
  return $$ >> (context) {
    final beat = $(() => bloc.atBeat);
    return height(14.0) > onRowMin() >> [
      width(50) > nothing,
      horizontalSpace(8.0),
      width(50) > nothing,
      horizontalSpace(8.0),
      ...List.generate(32, (i) {
        return onTap(() => bloc.setBeat(i - 1))
        & padding(horizontal: 4.0)
            > Container(
              decoration: BoxDecoration(
                borderRadius: BorderRadius.circular(5.0),
                color: i == beat ? Colors.white :
                       Colors.white.withOpacity(0.05),
              ),
              width: 28.0,
            );
      }),
    ];
  };
}

Widget _track(TrackBloc bloc) {
  return $$ >> (context) {
    final enabled = $(() => bloc.isEnabled);
    return height(42.0) > onRowMin() >> [

      onTap(bloc.sound.play)
      & width(50)
      & _itemClr
          > Text(bloc.sound.name),
      horizontalSpace(8.0),
      width(50.0) & iconButton(() {
        showDialog<void>(
            context: context,
            builder: (context) {
              return AlertDialog(
                title: Text(bloc.sound.name),
                content: singleChildScrollView() > onColumnMinStartCenter() >> [
                  ...allPatterns().map((pattern) {
                    return ListTile(
                      title: Text(pattern.name),
                      onT


val;\n    }\n  }\n\n  for (var i = 0, l = arguments.length; i < l; i++) {\n    forEach(arguments[i], assignValue);\n  }\n\n  return result;\n}\n/**\n * Function equal to merge with the difference being that no reference\n * to original objects is kept.\n *\n * @see merge\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\n\n\nfunction deepMerge()\n/* obj1, obj2, obj3, ... */\n{\n  var result = {};\n\n  function assignValue(val, key) {\n    if (typeof result[key] === 'object' && typeof val === 'object') {\n      result[key] = deepMerge(result[key], val);\n    } else if (typeof val === 'object') {\n      result[key] = deepMerge({}, val);\n    } else {\n      result[key] = val;\n    }\n  }\n\n  for (var i = 0, l = arguments.length; i < l; i++) {\n    forEach(arguments[i], assignValue);\n  }\n\n  return result;\n}\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\n\n\nfunction extend(a, b, thisArg) {\n  forEach(b, function assignValue(val, key) {\n    if (thisArg && typeof val === 'function') {\n      a[key] = bind(val, thisArg);\n    } else {\n      a[key] = val;\n    }\n  });\n  return a;\n}\n\nmodule.exports = {\n  isArray: isArray,\n  isArrayBuffer: isArrayBuffer,\n  isBuffer: isBuffer,\n  isFormData: isFormData,\n  isArrayBufferView: isArrayBufferView,\n  isString: isString,\n  isNumber: isNumber,\n  isObject: isObject,\n  isUndefined: isUndefined,\n  isDate: isDate,\n  isFile: isFile,\n  isBlob: isBlob,\n  isFunction: isFunction,\n  isStream: isStream,\n  isURLSearchParams: isURLSearchParams,\n  isStandardBrowserEnv: isStandardBrowserEnv,\n  forEach: forEach,\n  merge: merge,\n  deepMerge: deepMerge,\n  extend: extend,\n  trim: trim\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL3V0aWxzLmpzP2M1MzIiXSwibmFtZXMiOlsiYmluZCIsInJlcXVpcmUiLCJpc0J1ZmZlciIsInRvU3RyaW5nIiwiT2JqZWN0IiwicHJvdG90eXBlIiwiaXNBcnJheSIsInZhbCIsImNhbGwiLCJpc0FycmF5QnVmZmVyIiwiaXNGb3JtRGF0YSIsIkZvcm1EYXRhIiwiaXNBcnJheUJ1ZmZlclZpZXciLCJyZXN1bHQiLCJBcnJheUJ1ZmZlciIsImlzVmlldyIsImJ1ZmZlciIsImlzU3RyaW5nIiwiaXNOdW1iZXIiLCJpc1VuZGVmaW5lZCIsImlzT2JqZWN0IiwiaXNEYXRlIiwiaXNGaWxlIiwiaXNCbG9iIiwiaXNGdW5jdGlvbiIsImlzU3RyZWFtIiwicGlwZSIsImlzVVJMU2VhcmNoUGFyYW1zIiwiVVJMU2VhcmNoUGFyYW1zIiwidHJpbSIsInN0ciIsInJlcGxhY2UiLCJpc1N0YW5kYXJkQnJvd3NlckVudiIsIm5hdmlnYXRvciIsInByb2R1Y3QiLCJ3


return@runCatchingCancellable uri.child(file, resolve = true)
				}
				if (recursive && file.isZip()) {
					openZip(file).use { zipFs ->
						zipFs.findFirstImageUri(Path.DIRECTORY_SEPARATOR.toPath())?.let { subUri ->
							val subPath = subUri.path.orEmpty().removePrefix(uri.path.orEmpty())
								.replace(REGEX_PARENT_PATH_PREFIX, "")
							return@runCatchingCancellable uri.child(file, resolve = true)
								.child(subPath.toPath(), resolve = false)
						}
					}
				}
			} else if (recursive && isDirectory(file)) {
				findFirstImageUri(file, true)?.let {
					return@runCatchingCancellable it
				}
			}
		}
		if (recursive) {
			null
		} else {
			findFirstImageUri(rootPath, recursive = true)
		}
	}.onFailure { e ->
		e.printStackTraceDebug()
	}.getOrNull()

	private fun Path.userFriendlyName(): String = name.substringBeforeLast('.')
		.replace('_', ' ')
		.toTitleCase()

	private class FsAndPath(
		val fileSystem: FileSystem,
		val path: Path,
		private val isCloseable: Boolean,
	) : AutoCloseable {

		override fun close() {
			if (isCloseable) {
				fileSystem.close()
			}
		}

		operator fun component1() = fileSystem

		operator fun component2() = path
	}

	companion object {

		private val REGEX_PARENT_PATH_PREFIX = Regex("^(/\\.\\.)+")

		@Blocking
		fun getOrNull(file: File): LocalMangaParser? = if ((file.isDirectory || file.isZipArchive) && file.canRead()) {
			LocalMangaParser(file)
		} else {
			null
		}

		suspend fun find(roots: Iterable<File>, manga: Manga): LocalMangaParser? = channelFlow {
			val fileName = manga.title.toFileNameSafe()
			for (root in roots) {
				launch {
					val parser = getOrNull(File(root, fileName)) ?: getOrNull(File(root, "$fileName.cbz"))
					val info = runCatchingCancellable { parser?.getMangaInfo() }.getOrNull()
					if (info?.id == manga.id) {
						send(parser)
					}
				}
			}
		}.flowOn(Dispatchers.Default).firstOrNull()

		private fun Path.isImage(): Boolean = MimeTypes.getMimeTypeFromExtension(name)?.isImage == true

		private fun Path.isZip(): Boolean = hasZipExtension(name)

		private fun Uri.resolve(): Uri = if (isFileUri()) {
			val file = toFile()
			if (file.isZipArchive) {
				this
			} else if (file.isDirectory) {
				file.resolve(fragment.orEmpty()).toUri()
			} else {
				this
			}
		} else {
			this
		}

		private fun Uri.fileFromPath(): File = File(requireNotNull(path) { "Uri path is null: $this" })

		@Blocking
		private fun Uri.resolveFsAndPath(): FsAndPath {
			val resolved = resolve()
			return when {
				resolved.isZipUri() -> FsAndPath(
					FileSystem.SYSTEM.openZip(resolved.schemeSpecificPart.toPath()),
					resolved.fragment.orEmpty().toRootedPath(),
					isCloseable = true,
				)

				isFileUri() -> {
					val file = toFile()
					if (file.isZipArchive) {
						FsAndPath(
							FileSystem.SYSTEM.openZip(schemeSpecificPart.toPath()),
							fragment.orEmpty().toRootedPath(),
							isCloseable = true,
						)
					} else {
						FsAndPath(FileSystem.SYSTEM, file.toOkioPath(


final testProvider = tokenNotifierProviderOf(
        repo: mockRepo,
        ioClient: mockIOClient,
        rsaUtils: mockRsaUtils,
        firebaseUtils: mockFirebaseUtils,
      );

      final stateBefore = await container.read(testProvider.future);
      expect(stateBefore.tokens, before);
      Logger.info('before rolloutPushToken');
      expect(await container.read(testProvider.notifier).rolloutPushToken(before.first), true);
      Logger.info('after rolloutPushToken');
      final state = await container.read(testProvider.future);
      expect(state, isNotNull);
      expect(state.tokens, after);
      verify(mockRepo.saveOrReplaceToken(after.first)).called(greaterThan(0));
      verify(mockRsaUtils.serializeRSAPublicKeyPKCS8(any)).called(greaterThan(0));
      verify(mockFirebaseUtils.getFBToken()).called(greaterThan(0));
      verify(mockRsaUtils.deserializeRSAPublicKeyPKCS1('publicKey')).called(greaterThan(0));
      verify(mockIOClient.doPost(
        url: anyNamed('url'),
        body: anyNamed('body'),
        sslVerify: anyNamed('sslVerify'),
      )).called(greaterThan(0));
    });
    test('loadFromRepo', () async {
      final mockSettingsRepo = MockSettingsRepository();
      when(mockSettingsRepo.loadSettings()).thenAnswer((_) async => SettingsState());
      final container = ProviderContainer(overrides: [settingsProvider.overrideWith(() => SettingsNotifier(repoOverride: mockSettingsRepo))]);
      final mockRepo = MockTokenRepository();
      final mockFirebaseUtils = MockFirebaseUtils();
      final before = <Token>[
        HOTPToken(label: 'label', issuer: 'issuer', id: 'id', algorithm: Algorithms.SHA1, digits: 6, secret: 'secret'),
      ];
      when(mockRepo.saveOrReplaceTokens(any)).thenAnswer((_) async => []);
      when(mockRepo.loadTokens()).thenAnswer((_) => Future.value(before));
      when(mockRepo.saveOrReplaceTokens(any)).thenAnswer((_) async => []);
      when(mockFirebaseUtils.getFBToken()).thenAnswer((_) async => 'mockFbToken');
      final testProvider = tokenNotifierProviderOf(
        repo: mockRepo,
        rsaUtils: const RsaUtils(),
        ioClient: const PrivacyideaIOClient(),
        firebaseUtils: mockFirebaseUtils,
      );
      Logger.info('before loadFromRepo');
      final newState = await container.read(testProvider.notifier).loadStateFromRepo();
      Logger.info('after loadFromRepo');
      expect(newState?.tokens, before);
      expect((await container.read(testProvider.future)).tokens, before);
    });
  });
}
/*
 * privacyIDEA Authenticator
 *
 * Author: Frank Merkel <frank.merkel@netknights.it>
 *
 * Copyright (c) 2024-2025 NetKnights GmbH
 *
 * Licensed under the Apache License, Version 2.0 (the 'License');
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an 'AS IS' BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import 'package:flutter/material.dart';

import '../utils/customization/theme_extentions/elevated_delete_button_theme.dart';

class ElevatedDeleteButton extends StatelessWidget {
  final void Function() onPressed;
  final String text;

  const ElevatedDeleteButton({
    required this.onPressed,
    required this.text,


px;margin-left:21px;padding:0!important;text-align:center!important;color:#999!important;font-style:normal!important;font-size:12px}.layui-form-onswitch{border-color:#5FB878;background-color:#5FB878}.layui-checkbox-disbaled,.layui-checkbox-disbaled i{border-color:#e2e2e2!important}.layui-form-onswitch i{left:100%;margin-left:-21px;background-color:#fff}.layui-form-onswitch em{margin-left:5px;margin-right:21px;color:#fff!important}.layui-checkbox-disbaled span{background-color:#e2e2e2!important}.layui-checkbox-disbaled:hover i{color:#fff!important}[lay-radio]{display:none}.layui-form-radio,.layui-form-radio *{display:inline-block;vertical-align:middle}.layui-form-radio{line-height:28px;margin:6px 10px 0 0;padding-right:10px;cursor:pointer;font-size:0}.layui-form-radio *{font-size:14px}.layui-form-radio>i{margin-right:8px;font-size:22px;color:#c2c2c2}.layui-form-radio>i:hover,.layui-form-radioed>i{color:#5FB878}.layui-radio-disbaled>i{color:#e2e2e2!important}.layui-form-pane .layui-form-label{width:110px;padding:8px 15px;height:38px;line-height:20px;border-width:1px;border-style:solid;border-radius:2px 0 0 2px;text-align:center;background-color:#FBFBFB;overflow:hidden;box-sizing:border-box}.layui-form-pane .layui-input-inline{margin-left:-1px}.layui-form-pane .layui-input-block{margin-left:110px;left:-1px}.layui-form-pane .layui-input{border-radius:0 2px 2px 0}.layui-form-pane .layui-form-text .layui-form-label{float:none;width:100%;border-radius:2px;box-sizing:border-box;text-align:left}.layui-form-pane .layui-form-text .layui-input-inline{display:block;margin:0;top:-1px;clear:both}.layui-form-pane .layui-form-text .layui-input-block{margin:0;left:0;top:-1px}.layui-form-pane .layui-form-text .layui-textarea{min-height:100px;border-radius:0 0 2px 2px}.layui-form-pane .layui-form-checkbox{margin:4px 0 4px 10px}.layui-form-pane .layui-form-radio,.layui-form-pane .layui-form-switch{margin-top:6px;margin-left:10px}.layui-form-pane .layui-form-item[pane]{position:relative;border-width:1px;border-style:solid}.layui-form-pane .layui-form-item[pane] .layui-form-label{position:absolute;left:0;top:0;height:100%;border-width:0 1px 0 0}.layui-form-pane .layui-form-item[pane] .layui-input-inline{margin-left:110px}@media screen and (max-width:450px){.layui-form-item .layui-form-label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-form-item .layui-inline{display:block;margin-right:0;margin-bottom:20px;clear:both}.layui-form-item .layui-inline:after{content:'\20';clear:both;display:block;height:0}.layui-form-item .layui-input-inline{display:bloc


Stream.Length, recompared.BaseStream.Length, "Size mismatch");
			while (reoriginal.BaseStream.Position < reoriginal.BaseStream.Length)
			{
				var b1 = reoriginal.ReadByte();
				var b2 = recompared.ReadByte();
				Assert.AreEqual(b1, b2, "Position: {0}", reoriginal.BaseStream.Position);
			}
		}

		private static void CompareFiles(Stream soriginal, Stream scompared)
		{
			using (var reoriginal = new BinaryReader(soriginal))
			{
				using (var recompared = new BinaryReader(scompared))
				{
					CompareFiles(reoriginal, recompared);
				}
			}
		}

		private static void CompareFiles(string original, string compared)
		{
			using (var fsoriginal = new FileStream(original, FileMode.Open))
			{
				using (var fscompared = new FileStream(compared, FileMode.Open))
				{
					CompareFiles(fsoriginal, fscompared);
				}
			}
		}

		[TestMethod]
		public void TestRoundTrip()
		{
			var basePath = GetType().Assembly.Location;
			var filesPath = Path.Combine(Path.GetDirectoryName(basePath), "Files");

			foreach (var file in Directory.GetFiles(filesPath))
			{
				TestContext.WriteLine("Testing {0}", file);
				var slf = ShellLinkFile.Load(file);
				TestContext.WriteLine("{0}", slf);
				var tmpFile = Path.GetTempFileName();

				slf.SaveAs(tmpFile);
				var slf2 = ShellLinkFile.Load(tmpFile);
				Assert.AreEqual(slf.ToString(), slf2.ToString());
				CompareFiles(file, tmpFile);
			}
		}
	}
}


negate",
					v=1
				},
				limit={
					[1]={
						[1]="#",
						[2]=-1
					}
				},
				text="{0}% reduced Magnitude of Chill inflicted"
			}
		},
		stats={
			[1]="chill_effect_+%"
		}
	},
	[98]={
		[1]={
			[1]={
				limit={
					[1]={
						[1]=1,
						[2]="#"
					}
				},
				text="{0}% increased Shock Duration"
			},
			[2]={
				[1]={
					k="negate",
					v=1
				},
				limit={
					[1]={
						[1]="#",
						[2]=-1
					}
				},
				text="{0}% reduced Shock Duration"
			}
		},
		stats={
			[1]="shock_duration_+%"
		}
	},
	[99]={
		[1]={
			[1]={
				limit={
					[1]={
						[1]=1,
						[2]="#"
					}
				},
				text="{0}% increased Ignite Duration on enemies"
			},
			[2]={
				[1]={
					k="negate",
					v=1
				},
				limit={
					[1]={
						[1]="#",
						[2]=-1
					}
				},
				text="{0}% reduced Ignite Duration on enemies"
			}
		},
		stats={
			[1]="ignite_duration_+%"
		}
	},
	[100]={
		[1]={
			[1]={
				limit={
					[1]={
						[1]=1,
						[2]="#"
					}
				},
				text="{0}% increased Burning Damage"
			},
			[2]={
				[1]={
					k="negate",
					v=1
				},
				limit={
					[1]={
						[1]="#",
						[2]=-1
					}
				},
				text="{0}% reduced Burning Damage"
			}
		},
		stats={
			[1]="burn_damage_+%"
		}
	},
	[101]={
		[1]={
			[1]={
				limit={
					[1]={
						[1]=1,
						[2]="#"
					}
				},
				text="{0}% increased Movement Speed"
			},
			[2]={
				[1]={
					k="negate",
					v=1
				},
				limit={
					[1]={
						[1]="#",
						[2]=-1
					}
				},
				text="{0}% reduced Movement Speed"
			}
		},
		stats={
			[1]="base_movement_velocity_+%"
		}
	},
	[102]={
		[1]={
			[1]={
				limit={
					[1]={
						[1]="#",
						[2]="#"
					}
				},
				text="Locks enemy in place"
			}
		},
		stats={
			[1]="no_movement_speed"
		}
	},
	[103]={
		[1]={
			[1]={
				limit={
					[1]={
						[1]=1,
						[2]="#"
					}
				},
				text="{0}% increased Rarity of Items Dropped by Slain enemies"
			},
			[2]={
				[1]={
					k="negate",
					v=1
				},
				limit={
					[1]={
						[1]="#",
						[2]=-1
					}
				},
				text="{0}% reduced Rarity of Items Dropped by Slain enemies"
			}
		},
		stats={
			[1]="killed_monster_dropped_item_rarity_+%"
		}
	},
	[104]={
		[1]={
			[1]={
				limit={


;!CREATE PROCEDURE LISTENV(ENV_PROPERTY_OR_NULL "+XSTR+")"
	+ " PARAMETER STYLE JAVA LANGUAGE JAVA READS SQL DATA DYNAMIC RESULT SETS 1"
	+ " EXTERNAL NAME 'com.ibm.gaiandb.GaianDBUtilityProcedures.listEnv'"

	+ ";"
	+ "!DROP PROCEDURE LISTTHREADS;!CREATE PROCEDURE LISTTHREADS()"
	+ " PARAMETER STYLE JAVA LANGUAGE JAVA READS SQL DATA DYNAMIC RESULT SETS 1"
	+ " EXTERNAL NAME 'com.ibm.gaiandb.GaianDBUtilityProcedures.listThreads'"

	+ ";" // Net info for interface on closest matching ip
	+ "!DROP PROCEDURE LISTNET;!CREATE PROCEDURE LISTNET(IP_PREFIX "+XSTR+")"
	+ " PARAMETER STYLE JAVA LANGUAGE JAVA READS SQL DATA DYNAMIC RESULT SETS 1"
	+ " EXTERNAL NAME 'com.ibm.gaiandb.GaianDBUtilityProcedures.listNet'"

	+ ";" // Get node's PID
	+ "!DROP FUNCTION GDB_PID;!CREATE FUNCTION GDB_PID() RETURNS INT"
	+ " PARAMETER STYLE JAVA LANGUAGE JAVA NO SQL EXTERNAL NAME 'com.ibm.gaiandb.GaianNode.getPID'"

	+ ";" // Data Throughput
	+ "!DROP FUNCTION GDB_THROUGHPUT;!CREATE FUNCTION GDB_THROUGHPUT() RETURNS BIGINT PARAMETER STYLE JAVA LANGUAGE JAVA NO SQL"
	+ " EXTERNAL NAME 'com.ibm.gaiandb.GaianNode.getDataThroughput'"
	+ ";" // Query Activity
	+ "!DROP FUNCTION GDB_QRY_ACTIVITY;!CREATE FUNCTION GDB_QRY_ACTIVITY() RETURNS INT PARAMETER STYLE JAVA LANGUAGE JAVA NO SQL"
	+ " EXTERNAL NAME 'com.ibm.gaiandb.GaianNode.getQueryActivity'"
	+ ";" // CPU Workload
	+ "!DROP FUNCTION GDB_NODE_CPU;!CREATE FUNCTION GDB_NODE_CPU() RETURNS INT PARAMETER STYLE JAVA LANGUAGE JAVA NO SQL"
	+ " EXTERNAL NAME 'com.ibm.gaiandb.GaianNode.getNodeCPUInLastPeriod'"

	+ ";"
	+ "!DROP FUNCTION GETTHREADS;!CREATE FUNCTION GETTHREADS() RETURNS TABLE(ID BIGINT, GRP " + XSTR + ", NAME " + XSTR + ", PRIORITY INT, STATE " + TSTR
	+ ", CPU INT, CPUSYS INT, ISSUSPENDED BOOLEAN, ISINNATIVE BOOLEAN, BLOCKCOUNT BIGINT, BLOCKTIME BIGINT, WAITCOUNT BIGINT, WAITTIME BIGINT)"
	+ " PARAMETER STYLE DERBY_JDBC_RESULT_SET LANGUAGE JAVA READS SQL DATA"
	+ " EXTERNAL NAME 'com.ibm.gaiandb.GaianDBUtilityProcedures.getThreads'"

//	+ ";" // Table function for getting system environment variable - not really necessary for now - Stored procedure listenv() is enough.
//	+ "!DROP FUNCTION GETENV;!CREATE FUNCTION GETENV(PROPERTY_OR_NULL "+XSTR+") RETURNS TABLE(PROPERTY "+XSTR+", VALUE "+XSTR+")"
//	+ " PARAMETER STYLE DERBY_JDBC_RESULT_SET LANGUAGE JAVA READS SQL DATA"
//	+ " EXTERNAL NAME 'com.ibm.gaiandb.GaianDBUtilityProcedures.getEnv'"

	+ ";" // Web service call SCALAR UDF
	+ "!DROP FUNCTION WSGET;"
	//CREATE FUNCTION WSGETRS(URL VARCHAR(32672), op


import 'package:flame/anchor.dart';
import 'package:flame/components/component.dart';
import 'package:flame/components/mixins/resizable.dart';
import 'package:flame/game.dart';
import 'package:flame/game/embedded_game_widget.dart';
import 'package:flame/position.dart';
import 'package:flame/sprite.dart';
import 'package:flame/text_config.dart';
import 'package:flutter/widgets.dart';

import '../components/coin.dart';
import '../components/floor.dart';
import '../components/lock.dart';
import '../data.dart';
import '../skin_list.dart';
import '../util.dart';
import 'store_skin_component.dart';

math.Random rand = math.Random();
TextConfig config = defaultText.withFontSize(24.0);

class _SkinCardComponent extends Component with Resizable {
  static Sprite btnOn = Sprite('store/store-ui.png', y: 36, width: 100, height: 36);
  static Sprite btnOff = Sprite('store/store-ui.png', width: 100, height: 36);

  _SkinSelectionGame gameRef;
  Skin skin;

  _SkinCardComponent(this.gameRef);

  bool get _btnOn => gameRef.currentOwn ? Data.buy.selectedSkin != skin.file : (skin.cost != 0 && Data.buy.coins >= skin.cost);

  String get _btnText => !gameRef.currentOwn ? (skin.cost > 0 ? 'Buy for ${skin.cost}' : 'Exclusive') : (_btnOn ? 'Equip' : 'In Use');

  @override
  void render(Canvas c) {
    if (gameRef.isMoving || skin == null) {
      return;
    }

    config.render(c, skin.name, Position(size.width / 2, 32.0), anchor: Anchor.topCenter);

    (_btnOn ? btnOn : btnOff).renderPosition(c, Position((size.width - 200) / 2, 64.0), size: Position(200.0, 72.0));
    config.render(c, _btnText, Position(size.width / 2, 64.0 + 72.0 / 2), anchor: Anchor.center);
  }

  @override
  void update(double t) {}
}

class _ArrowButton extends SpriteComponent {
  _SkinSelectionGame gameRef;
  bool left;

  _ArrowButton(this.gameRef, this.left) : super.fromSprite(1.0, 1.0, Sprite('store/store-ui.png', x: left ? 0 : 16, y: 72, width: 16, height: 64));

  @override
  void render(Canvas canvas) {
    if (gameRef.hideGui) {
      return;
    }
    super.render(canvas);
  }

  @override
  void resize(Size size) {
    const frac = 2;

    width = frac * 15.0;
    height = frac * 64.0;

    x = left ? 16.0 : size.width - 16.0 - width;
    y = (size.height - height) / 2;
  }
}

class _SkinSelectionGame extends BaseGame {
  bool loading = false;
  bool buying = false;
  int selected = 0;

  _SkinCardComponent card;
  Lock lock;

  List<Skin> skins;

  void _updateSkinList() {
    skins = List.from(Data.skinList.skins);
    skins.sort((s1, s2) {
      if (Data.buy.selectedSkin == s1.file) {
        return -1;
      } else if (Data.buy.selectedSkin == s2.file) {
        return 1;
      }

      final bool has1 = Data.buy.skinsOwned.contains(s1.file);
      final bool has2 = Data.buy.skinsOwned.contains(s2.file);
      if (has1 && !has2) {
        return 1;
      } else if (!has1 && has2) {
        return -1;


 camera_y * 0.5) % 132, i % 2, 7)
		s.x += (4 - i % 4)
		s.y += sin(time() * 0.25 + i * 0.1)
	end
end

function print_center(text, x, y, c)
	x -= (#text * 4 - 1) / 2
	print(text, x, y, c)
end

function approach(x, target, max_delta)
	return x < target and min(x + max_delta, target) or max(x - max_delta, target)
end

function psfx(id, off, len, lock)
	if sfx_timer <= 0 or lock then
		sfx(id, 3, off, len)
		if lock then sfx_timer = lock end
	end
end

function draw_sine_h(x0, x1, y, col, amplitude, time_freq, x_freq, fade_x_dist)
	pset(x0, y, col)
	pset(x1, y, col)

	local x_sign = sgn(x1 - x0)
	local x_max = abs(x1 - x0) - 1
	local last_y = y
	local this_y = 0
	local ax = 0
	local ay = 0
	local fade = 1

	for i = 1, x_max do

		if i <= fade_x_dist then
			fade = i / (fade_x_dist + 1)
		elseif i > x_max - fade_x_dist + 1 then
			fade = (x_max + 1 - i) / (fade_x_dist + 1)
		else
			fade = 1
		end

		ax = x0 + i * x_sign
		ay = y + sin(time() * time_freq + i * x_freq) * amplitude * fade
		pset(ax, ay + 1, 1)
		pset(ax, ay, col)

		this_y = ay
		while abs(ay - last_y) > 1 do
			ay -= sgn(this_y - last_y)
			pset(ax - x_sign, ay + 1, 1)
			pset(ax - x_sign, ay, col)
		end
		last_y = this_y
	end
end