      sphereId = 1000000 + i,
        cnt = 6 * (i - 1),
        quality = i - 1,
        icon = iconPath[i]
      }
      table.insert(sphereDatas, sphereData)
    end
    local qualityInt = C_PlayerPrefsUtility.GetInt(keyString)
    local data = {
      cnt = qualityInt * 6,
      icon = iconPath[qualityInt + 1],
      quality = qualityInt,
      sphereId = 1000001 + qualityInt
    }
    L_BattleDataManager:setCapturePetBallData(data)
    self:refreshSelectedSphere(data)
  else
    local qualityInt = C_PlayerPrefsUtility.GetInt(keyString)
    local quaCnt = 0
    local saveId = 0
    local iconPath = ""
    for i = size, 1, -1 do
      local sphereData = {
        sphereId = data[i].id,
        cnt = data[i].num,
        quality = data[i].quality,
        icon = data[i].icon
      }
      if qualityInt == data[i].quality then
        quaCnt = data[i].num
        saveId = data[i].id
        iconPath = data[i].icon
      end
      table.insert(sphereDatas, sphereData)
    end
    local data = {
      cnt = quaCnt,
      icon = iconPath,
      quality = qualityInt,
      sphereId = saveId
    }
    if saveId ~= 0 then
      L_BattleDataManager:setCapturePetBallData(data)
      self:refreshSelectedSphere(data)
    end
  end
  self.bind.moduleSphereItemList:insert_array(sphereDatas)
end

function this:close()
  L_ShortCutManager:removeShortCut(self.parent.pageName)
end

function this:refreshSelectedSphere(data)
  local cnt = tostring(data.cnt)
  local icon = data.icon
  local quality = data.quality
  self:rotArrow(quality)
  self.bind.selectedQCnt = cnt
  self.bind.selectedQImg = icon
end

function this:rotArrow(quality)
  local rot = (math.abs(quality - 4) + 1) * 45
  self.bind.roulettePointerRot = L_Vector3.new(0, 0, rot)
  self.bind.rouletteSelect = L_Vector3.new(0, 0, rot)
  self.bindComponents.rouletteSelectAnime:Stop()
  self.bindComponents.rouletteSelectAnime:Play()
end

function this:refreshSelectedSphereCnt()
  local data = L_BagManager:getAllCapturePetBall()
  local keyString = string.format("%s_%s", L_PlayerStore:getPlayerId(), "SelectedCapturePetBall")
  local qualityInt = C_PlayerPrefsUtility.GetInt(keyString)
  for i = 1, #self.bind.moduleSphereItemList do
    local cnt = data[6 - i].num
    self.bind.moduleSphereItemList:getItemCls(i):refreshCnt(cnt)
    if qualityInt == data[6 - i].quality then
      self.bind.selectedQCnt = tostring(cnt)
    end
  end
end

function this:setCShortCutEnable(enable)
  self.cShortCutEnable = enable
  if enable == false then
    self.methods.onClick_close(self)
  end
end

return this


oin(f)
        if username in banned[0]:
            c = d = random.choices(a)
            d = random.choices(b)
            f = [c[0], d[0], d[0], d[0], c[0]]
            random.shuffle(f)
            username = ''.join(f)
        else:
            pass
    if choice == "10":
        c = d = random.choices(a)
        d = random.choices(e)
        f = [c[0], c[0], d[0], d[0], d[0]]
        random.shuffle(f)
        username = ''.join(f)
        if username in banned[0]:
            c = d = random.choices(a)
            d = random.choices(b)
            f =  [c[0], c[0], d[0], d[0], d[0]]
            random.shuffle(f)
            username = ''.join(f)
        else:
            pass
    if choice == "11":
        c = d = random.choices(a)
        d = random.choices(e)
        f = [c[0], d[0], d[0], c[0], d[0]]
        random.shuffle(f)
        username = ''.join(f)
        if username in banned[0]:
            c = d = random.choices(a)
            d = random.choices(b)
            f = [c[0], d[0], d[0], c[0],  d[0]]
            random.shuffle(f)
            username = ''.join(f)
        else:
            pass
    if choice == "12":
        c = d = random.choices(a)
        d = random.choices(e)
        f = [c[0], d[0], c[0], c[0], c[0]]
        random.shuffle(f)
        username = ''.join(f)
        if username in banned[0]:
            c = d = random.choices(a)
            d = random.choices(b)
            f = [c[0], d[0], c[0], c[0], c[0]]
            random.shuffle(f)
            username = ''.join(f)
        else:
            pass
    if choice == "13":
        c = d = random.choices(a)
        d = random.choices(e)
        f =  [c[0], c[0], d[0], c[0], c[0]]
        random.shuffle(f)
        username = ''.join(f)
        if username in banned[0]:
            c = d = random.choices(a)
            d = random.choices(b)
            f =  [c[0], c[0], d[0], c[0], c[0]]
            random.shuffle(f)
            username = ''.join(f)
        else:
            pass
    return username

@TheWinG.on(events.NewMessage(outgoing=True, pattern=r"\.تشيكر"))
async def _(event):
    if ispay2[0] == "yes":
        await event.edit(tele_checker)

@TheWinG.on(events.NewMessage(outgoing=True, pattern=r"\.اليوزرات المبندة"))
async def _(event):
    if ispay2[0] == "yes":
        await TheWinG.send_file(event.chat_id, 'banned.txt')

@TheWinG.on(events.NewMessage(outgoing=True, pattern=r"\.الانواع"))
async def _(event):
    if ispay2[0] == "yes":
        await event.edit(tele_checker2)
# صيد عدد نوع قناة

@TheWinG.on(events.NewMessage(outgoing=True, pattern=r"\.صيد (.*)"))
async def _(event):
    if ispay2[0] == "yes":
        isclaim.clear()
        isclaim.append("on")
        msg = ("".join(event.text.split(maxsplit=1)[1:])).split(" ", 2)
        ch = str(msg[2])
        choice = str(msg[1])
        trys = 0
        await event.edit(f"حسناً سأفحص نوع `{choice}` من اليوزرات على `{ch}` , بعدد `{msg[0]}` من المحاولات !")

        @TheWinG.on(events.NewMessage(outgoing=True, pattern=r"\.حالة الصيد"))
        async def _(event):
            if ispay2[0] == "yes":
                if "on" in isclaim:
                    await event.edit(f"الصيد وصل لـ({trys}) من المحاولات")
                elif "off" in isclaim:
                    await event.edit("لايوجد صيد شغال !")
                else:
                    await event.edit("خطأ")
            else:
                pass
        for i in range(int(msg[0])):
            if ispay2[0] == 'no':
                break
            username = ""

            username = gen_user(choice)
            t = Thread(target=lambda q, arg1: q.put(
                check_user(arg1)), args=(que, username))
            t.start()
            t.join()
            isav = que.get()
            if "Available" in isav:
                await asyncio.sleep(1)
                try:
                    await TheWinG(functions.channels.UpdateUsernameRequest(
                        channel=ch, username=username))
                    await event.client.send_message(event.chat_id, f'''
𝚂𝙾𝚄𝚁ᑕ𝙴𝚂 𝙾f 𝙿𝚁𝙸𝙽ᑕ𝙴𝚂
ꪊ𝘴ꫀ𝘳  : @{username}
ᥴꫝ  / @DevEviI & @VebThon
    ''')
                    break
                except telethon.errors.rpcerrorlist.UsernameInvalidError:
                    with open("banned.txt", "a") as f:
                        f.write(f"\n{username}")
                except Exception as eee:
                    await TheWinG.send_message(event.chat_id, f'''خطأ مع {username}
    الخطأ :
    {str(eee)}'


ir('b', [libPubspec('b', '1.1.1', resolutionWorkspace: true)]),
        ]),
      ]).create();
      // Directories outside the workspace should not be affected.
      final outideWorkpace = sandbox;
      // Directories of worksace packages should be cleaned.
      final aDir = p.join(sandbox, appPath, 'pkgs', 'a');
      // Directories between workspace root and workspace packages should
      // be cleaned.
      final pkgsDir = p.join(sandbox, appPath, 'pkgs');
      // Directories inside a workspace package should not be cleaned.
      final inside = p.join(aDir, 'test_data');

      void createLockFileAndPackageConfig(String dir) {
        File(p.join(dir, 'pubspec.lock')).createSync(recursive: true);
        File(
          p.join(dir, '.dart_tool', 'package_config.json'),
        ).createSync(recursive: true);
      }

      void validateLockFileAndPackageConfig(
        String dir,
        FileSystemEntityType state,
      ) {
        expect(File(p.join(dir, 'pubspec.lock')).statSync().type, state);
        expect(
          File(
            p.join(dir, '.dart_tool', 'package_config.json'),
          ).statSync().type,
          state,
        );
      }

      createLockFileAndPackageConfig(sandbox);
      createLockFileAndPackageConfig(aDir);
      createLockFileAndPackageConfig(pkgsDir);
      createLockFileAndPackageConfig(inside);

      await pubGet(
        environment: {'_PUB_TEST_SDK_VERSION': '3.5.0'},
        warning: allOf(
          contains('Deleting old lock-file: `.${s}pkgs${s}a${s}pubspec.lock'),
          isNot(contains('.${s}pkgs${s}b${s}pubspec.lock')),
          contains(
            'Deleting old package config: '
            '`.${s}pkgs${s}a$s.dart_tool${s}package_config.json`',
          ),
          contains('Deleting old lock-file: `.${s}pkgs${s}pubspec.lock'),
          contains(
            'Deleting old package config: '
            '`.${s}pkgs$s.dart_tool${s}package_config.json`',
          ),
          contains(
            'See https://dart.dev/go/workspaces-stray-files for details.',
          ),
        ),
      );

      validateLockFileAndPackageConfig(
        outideWorkpace,
        FileSystemEntityType.file,
      );
      validateLockFileAndPackageConfig(aDir, FileSystemEntityType.notFound);
      validateLockFileAndPackageConfig(pkgsDir, FileSystemEntityType.notFound);
      validateLockFileAndPackageConfig(inside, FileSystemEntityType.file);
    },
  );

  test('Reports error if workspace doesn\'t form a tree.', () async {
    await dir(appPath, [
      libPubspec(
        'myapp',
        '1.2.3',
        sdk: '^3.5.0',
        extras: {
          'workspace': ['pkgs/a', 'pkgs'],
        },
      ),
      dir('pkgs', [
        libPubspec(
          'a',
          '1.1.1',
          resolutionWorkspace: true,
          extras: {
            'workspace': ['a'],
          },
        ),
        dir('a', [libPubspec('a', '1.1.1', resolutionWorkspace: true)]),
      ]),
    ]).create();
    final s = p.separator;
    await pubGet(
      error: '''
Packages can only be included in the workspace once.

`.


# Generated by Django 3.2.16 on 2022-11-01 10:51

from django.db import migrations, models

class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="TitoEvent",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("title", models.CharField(max_length=255)),
                (
                    "event_id",
                    models.CharField(help_text='The ID of the event, e.g. "ultimateconf/2013"', max_length=512),
                ),
                (
                    "security_token",
                    models.CharField(help_text="Token used to sign webhooks for this event", max_length=255),
                ),
                (
                    "newsletter_question_id",
                    models.CharField(
                        help_text="ID of the question in the Tito form that asks whether a user has opted in to receive newsletters",
                        max_length=255,
                    ),
                ),
            ],
        ),
    ]


-- Algeth'ar Academy
		[208061]=true,[208063]=true,[208065]=true,
		-- Brackenhide Hollow
		[203481]=true,[203482]=true,[203483]=true,[203484]=true,[203457]=true,[203453]=true,[203452]=true,
		-- Ruby Life Pools
		[204740]=true,[204739]=true,[204738]=true,[204737]=true,[204736]=true,
		-- The Nokhud Offensive
		[205509]=true,[205547]=true,[205502]=true,[205503]=true,[205768]=true,[205769]=true,
		[205770]=true,[205555]=true,[205554]=true,[205838]=true,[205839]=true,[205840]=true,
		[205831]=true,[205832]=true,[205833]=true,[205841]=true,[205851]=true,[205856]=true,
		[205504]=true,[205505]=true,[205506]=true,[205507]=true,[205842]=true,[205508]=true,
		[205814]=true,[205815]=true,[205567]=true,[205852]=true,
		-- Uldaman: Legacy of Tyr
		[203125]=true,[203126]=true,[203127]=true,

		-- Ara-Kara
		[247684]=true,[250798]=true,
		-- Cinderbrew Meadery
		[251845]=true,[251846]=true,
		-- City of Threads
		[250773]=true,[250774]=true,[250775]=true,[250776]=true,[250777]=true,[250778]=true,[250779]=true,[250780]=true,
		[250781]=true,[250782]=true,[250790]=true,[250791]=true,[250795]=true,
		-- Priory of the Sacred Flame
		[251154]=true,[251155]=true,[251156]=true,[251157]=true,[251162]=true,[251163]=true,[251169]=true,[251170]=true,
		[251171]=true,[251176]=true,[251177]=true,
		-- The Dawnbreaker
		[251195]=true,[251196]=true,[251197]=true,[251198]=true,[247638]=true,[251199]=true,[251200]=true,[251201]=true,
		[251202]=true,[251203]=true,[251204]=true,[251205]=true,[251206]=true,[251207]=true,[251208]=true,[251184]=true,
		[251209]=true,[251210]=true,[251211]=true,[251189]=true,[251212]=true,[251213]=true,[251214]=true,
		-- The Stonevault
		[250849]=true,[250850]=true,[250845]=true,[250851]=true,[250852]=true,[250853]=true,[250854]=true,[250855]=true,
		[250856]=true,[250857]=true,[250858]=true,[250860]=true,[250861]=true,[250862]=true,[250863]=true,
		-- Operation: Floodgate
		[269139]=true,[269140]=true,[269141]=true,[269142]=true,[269143]=true,[269144]=true,[269145]=true,[269146]=true,
		[269150]=true,[269152]=true,
	}

	local lookup = {
		[1] = 1, -- Normal Dungeon
		[2] = 1, -- Heroic Dungeon
		[8] = 2, -- Mythic+ Keystone Dungeon
		[14] = 3, -- Normal Raid
		[15] = 3, -- Heroic Raid
		[16] = 3, -- Mythic Raid
		[17] = 3, -- LFR
		[23] = 2, -- Mythic Dungeon
		[24] = 4, -- Timewalking Dungeon
		[152] = 5, -- Visions of N'Zoth
		[205] = 1, -- Follower Dungeon
	}
	function plugin:TALKINGHEAD_REQUESTED()
		local _, _, diff = GetInstanceInfo()
		local entry = lookup[diff]
		if entry and self.db.profile.blockTalkingHeads[entry] then
			local _, _, soundKitId = TalkingHeadLineInfo()
			if known[so


1, 0.3, 1) f-classicOutNext;z-index:1}.f-classicOut.to-prev{animation:var(--f-transition-duration, 0.85s) cubic-bezier(0.16, 1, 0.3, 1) f-classicOutPrev;z-index:1}@keyframes f-classicInNext{0%{transform:translateX(-75px);opacity:0}100%{transform:translate3d(0, 0, 0);opacity:1}}@keyframes f-classicInPrev{0%{transform:translateX(75px);opacity:0}100%{transform:translate3d(0, 0, 0);opacity:1}}@keyframes f-classicOutNext{100%{transform:translateX(-75px);opacity:0}}@keyframes f-classicOutPrev{100%{transform:translateX(75px);opacity:0}}:root{--f-button-width: 40px;--f-button-height: 40px;--f-button-border: 0;--f-button-border-radius: 0;--f-button-color: #374151;--f-button-bg: #f8f8f8;--f-button-hover-bg: #e0e0e0;--f-button-active-bg: #d0d0d0;--f-button-shadow: none;--f-button-transition: all 0.15s ease;--f-button-transform: none;--f-button-svg-width: 20px;--f-button-svg-height: 20px;--f-button-svg-stroke-width: 1.5;--f-button-svg-fill: none;--f-button-svg-filter: none;--f-button-svg-disabled-opacity: 0.65}.f-button{display:flex;justify-content:center;align-items:center;box-sizing:content-box;position:relative;margin:0;padding:0;width:var(--f-button-width);height:var(--f-button-height);border:var(--f-button-border);border-radius:var(--f-button-border-radius);color:var(--f-button-color);background:var(--f-button-bg);box-shadow:var(--f-button-shadow);pointer-events:all;cursor:pointer;transition:var(--f-button-transition)}@media(hover: hover){.f-button:hover:not([disabled]){color:var(--f-button-hover-color);background-color:var(--f-button-hover-bg)}}.f-button:active:not([disabled]){background-color:var(--f-button-active-bg)}.f-button:focus:not(:focus-visible){outline:none}.f-button:focus-visible{outline:none;box-shadow:inset 0 0 0 var(--f-button-outline, 2px) var(--f-button-outline-color, var(--f-button-color))}.f-button svg{width:var(--f-button-svg-width);height:var(--f-button-svg-height);fill:var(--f-button-svg-fill);stroke:currentColor;stroke-width:var(--f-button-svg-stroke-width);stroke-linecap:round;stroke-linejoin:round;transition:opacity .15s ease;transform:var(--f-button-transform);filter:var(--f-button-svg-filter);pointer-events:none}.f-button[disabled]{cursor:default}.f-button[disabled] svg{opacity:var(--f-button-svg-disabled-opacity)}.f-carousel__nav .f-button.is-prev,.f-carousel__nav .f-button.is-next,.fancybox__nav .f-button.is-prev,.fancybox__nav .f-button.is-next{position:absolute;z-index:1}.is-horizontal .f-carousel__nav .f-button.is-prev,.is-horizontal .f-carousel__nav .f-button.is-next,.is-horizontal .fancybox__n


      assert_eq!(format!{"{}", TaskStatus::Scheduled} , "<");
        assert_eq!(format!{"{}", TaskStatus::InProgress} , "/");
        assert_eq!(format!{"{}", TaskStatus::Canceled} , "-");
    }
}<filename>2015/day01/day1-2.rs
use std::io;
use std::io::prelude::*;

fn main() -> io::Result<()> {
	let stdin = io::stdin();
	let (mut pos, mut floor) = (1, 0);
	'outer: for l in stdin.lock().lines() {
		let line = l.unwrap();
		for (i, c) in line.char_indices() {
			floor += if c == '(' { 1 } else { -1 };
			if floor == -1 {
				println!("{}", pos+i);
				break 'outer;
			}
		}
		pos += line.len();
	}
	Ok(())
}
<filename>build/classes/visao/jasperreports-6.15.0/src/net/sf/jasperreports/engine/export/ooxml/DocxFontTableRelsHelper.rs
net.sf.jasperreports.engine.export.ooxml.DocxFontTableRelsHelper
<reponame>vtleonardo/epic-miner
use config::MinerConfig;
use errors::MinerError;
use types::{Solution, Stats};

pub trait Miner: Send + Sync {
	/// Creates a new instance of a CuckooMiner with the given configuration.
	/// One PluginConfig per device
	fn new(configs: &MinerConfig) -> Self;

	/// An asynchronous -esque version of the plugin miner, which takes
	/// parts of the header and the target difficulty as input, and begins
	/// asyncronous processing to find a solution. The loaded plugin is
	/// responsible
	/// for how it wishes to manage processing or distribute the load. Once
	/// called
	/// this function will continue to find solutions over the target difficulty
	/// for the given inputs and place them into its output queue until
	/// instructed to stop.
	fn notify(
		&mut self,
		job_id: u32,      // Job id
		height: u64,      // Job height
		pre_nonce: &str,  // Pre-nonce portion of header
		post_nonce: &str, // Post-nonce portion of header
		difficulty: u64,
	) -> Result<(), MinerError>;

	/// Starts solvers, ready for jobs via job control
	fn start_solvers(&mut self) -> Result<(), MinerError>;

	/// get stats for all running solvers
	fn get_stats(&self) -> Result<Vec<Stats>, MinerError>;

	/// Returns solutions if currently waiting.
	fn get_solutions(&self) -> Option<Vec<Solution>>;

	/// #Description
	///
	/// Stops the current job, and signals for the loaded plugin to stop
	/// processing and perform any cleanup it needs to do.
	///
	/// #Returns
	///
	/// Nothing
	fn stop_solvers(&self);

	/// Tells current solvers to stop and wait
	fn pause_solvers(&self);

	/// Tells current solvers to stop and wait
	fn resume_solvers(&self);

	/// block until solvers have all exited
	fn wait_for_solver_shutdown(&self);

	fn add_epoch(&mut self, start_height: u64, end_height: u64, seed: [u8; 32]) {}
}
<reponame>pop-os/debrepbuild<filename>src/repo/build/rsync.rs
use crate::command::Command;
use std::path::Path;
use std::{io, fs};

pub fn rsync(src: &Path, dst: &Path) -> io::Result<()> {
    info!("rsyncing {} to {}", src.display(), dst.display());

    if src.is_dir() && ! dst.exists() {
        fs::create_dir_all(dst).map_err(|why| io::Error::new(
            io::ErrorKind::Other,
            format!("failed to create destination directory


f input_repr.get_bit(i * Self::K + j) {
                    word |= 1 << j;
                }
            }
            if word > 0 {
                res.mul_assign(&self.table[i][word - 1]);
            }
        }
        res
    }
}

#[cfg(test)]
mod tests {
    use super::*;
    use ark_bn254::{Fr, G1Projective, G2Projective};
    use ark_ff::Field;
    use core::ops::MulAssign;
    use rand::Rng;

    #[test]
    fn test_pow_g1() {
        let g1p = FixedBaseCurvePow::build(&G1Projective::prime_subgroup_generator());
        let mut rng = rand::thread_rng();
        let num: Fr = rng.gen();
        let mut expect = G1Projective::prime_subgroup_generator();
        expect.mul_assign(num);
        assert_eq!(g1p.apply(&num), expect);
    }

    #[test]
    fn test_pow_g2() {
        let g2p = FixedBaseCurvePow::build(&G2Projective::prime_subgroup_generator());
        let mut rng = rand::thread_rng();
        let num: Fr = rng.gen();
        let mut expect = G2Projective::prime_subgroup_generator();
        expect.mul_assign(num);
        assert_eq!(g2p.apply(&num), expect);
    }

    #[test]
    fn test_pow_fr() {
        let mut rng = rand::thread_rng();
        let base: Fr = rng.gen();
        let num: Fr = rng.gen();
        let frp = FixedBaseScalarPow::build(&base);
        let expect = base.pow(num.into_repr());
        assert_eq!(frp.apply(&num), expect);
    }
}
bitflags! {
/// a `b` c
}
pub trait Indent {
    fn indent(&self, level: u32) -> String;
}

impl<T> Indent for T
where
    T: ToString,
{
    fn indent(&self, level: u32) -> String {
        let mut indent = String::new();
        for _ in 0..level {
            indent.push(' ');
        }

        self.to_string()
            .lines()
            .map(|line| format!("{}{}", indent, line))
            .collect::<Vec<_>>()
            .join("\n")
    }
}

pub trait Indexes {
    fn indexes(&self) -> Vec<usize>;
}

impl<T> Indexes for Vec<T> {
    fn indexes(&self) -> Vec<usize> {
        if self.is_empty() {
            vec![]
        } else {
            (0..=self.len() - 1).collect()
        }
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_indent() {
        assert_eq!("  foo", "foo".indent(2));
        assert_eq!("  foo\n  bar", "foo\nbar".indent(2));
    }

    #[test]
    fn test_indexes() {
        let empty: Vec<i32> = vec![];
        let empty_indexes: Vec<usize> = vec![];
        assert_eq!(empty.indexes(), empty_indexes);

        assert_eq!(vec!['a', 'b'].indexes(), vec![0, 1]);
    }
}
<filename>hardware/examples/accel_gyro_cli_viewer.rs
use hardware::i2c::connect;
use hardware::i2c::mpu6050::{ADDRESS_LOW, MPU6050};
use hardware::i2c::register_io::I2cWithAddr;
use linux_embedded_hal::Delay;
use std::io::{stdout, Result};

use crossterm::*;
use ctrlc;

fn main() {
    run_loop().unwrap();
}

fn run_loop() -> Result<()> {
    let dev = connect(1)?;
    let mut mpu = MPU6050::new(I2cWithAddr::new(dev, ADDRESS_LOW)).unwrap();
    mpu.normal_setup(&mut Delay).unwrap();

    ctrlc::set_handler(|| {
        execute!(


Args, specific considerations below:
//       m_type_p: set with class type of receiver on entry and changed to result type on exit.
//       m_result: Result_ok, Result_err_context_non_method, or pretty much any other warning or error.
//   receiver_pp:
//     receiver expression of the method
//
// #Notes
//   method-call      = [scope] method-name invocation-args
//   scope            = class-name '@'
//   method-name      = name-predicate | constructor-name | destructor-name | convert-name
//   name-predicate   = instance-name ['?']
//   instance-name    = lowercase {alphanumeric}
//   constructor-name = '!' [instance-name]
//   destructor-name  = '!!'
//
// #See: parse_method()
  SkMethodCallBase * SkParser::parse_invoke_method(
  //
  Args &              args,
  SkExpressionBase ** receiver_pp // = nullptr
  ) const
  {
  SkMethodCallBase * mcall_p          = nullptr;
  SkClass *          qual_scope_p     = nullptr;  // Optional qualified class scope
  uint32_t           pos              = args.m_start_pos;
  bool               infer_receiver_b = args.m_result == Result__implicit_this;

  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  // Get the optional qualified class scope if it is present
  args.m_result = parse_class_scope(pos, &pos, &qual_scope_p, args.m_expr_type);

  if (!args.is_ok())
    {
    args.m_end_pos = pos;

    return nullptr;
    }

  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  // Parse method name
  ASymbol method_name;

  args.m_result = parse_name_method(pos, &pos, args.is_struct_wanted() ? &method_name : nullptr);

  if (!args.is_ok())
    {
    args.m_end_pos = pos;

    return nullptr;
    }

  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  // Ensure method is available
  SkParameters *    params_p         = nullptr;
  SkMethodBase *    method_p         = nullptr;
  bool              is_class_method  = false;
  SkClassDescBase * result_type_p    = nullptr;
  SkClassDescBase * receiver_type_p  = args.m_expr_type;
  SkClassDescBase * qual_recv_type_p = receiver_type_p->qualify(qual_scope_p);

  if (m_flags.is_set_any(Flag_type_check))
    {
    method_p = find_method_inherited(qual_recv_type_p, method_name, &is_class_method);

    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    // If method not found and inferred receiver and desired type know, then infer
    // desired type class and try to match class methods from it.
    SkClass * infer_class_p = nullptr;

    if ((method_p == nullptr)
      && infer_receiver_b
      && args.m_desired_type_p
      && (args.m_desired_type_p->get_class_type() != SkClassType_class_union))
      {
      infer_class_p = args.m_desired_type_p->get_key_class();

      method_p = infer_class_p->find_class_method_inherited(method_name, &is_class_method);

      if (method_p)
        {
        receiver_type_p  = &infer_class_p->get_metaclass();
        qual_recv_type_p = receiver_type_p;

        if (receiver_pp && args.is_struct_wanted())
          {
          // receiver_pp will be nullptr prior to setting class as receiver.
          *receiver_pp = SK_NEW(SkLiteral)(infer_class_p->get_metaclass());
          SKDEBUG_SET_CHAR_POS(*receiver


--大革命
--Huge Revolution
local s,id=GetID()
function s.initial_effect(c)
	--Activate
	local e1=Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id,0))
	e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOGRAVE)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetCondition(s.condition)
	e1:SetTarget(s.target)
	e1:SetOperation(s.activate)
	c:RegisterEffect(e1)
end
s.listed_names={12143771,58538870,85936485} --"People Running About", "Oppressed People", "United Resistance"
function s.condition(e,tp,eg,ep,ev,re,r,rp)
	return Duel.IsTurnPlayer(tp) and Duel.IsMainPhase()
		and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,12143771),tp,LOCATION_ONFIELD,0,1,nil)
		and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,58538870),tp,LOCATION_ONFIELD,0,1,nil)
		a


 s;
	    out[4] = a10 * c - a00 * s;
	    out[5] = a11 * c - a01 * s;
	    out[6] = a12 * c - a02 * s;
	    out[7] = a13 * c - a03 * s;
	    return out;
	}

	static rotate(out, rad, axis){
		var x = axis[0], y = axis[1], z = axis[2],
			len = Math.sqrt(x * x + y * y + z * z),
			s, c, t,
			a00, a01, a02, a03,
			a10, a11, a12, a13,
			a20, a21, a22, a23,
			b00, b01, b02,
			b10, b11, b12,
			b20, b21, b22;

		if (Math.abs(len) < 0.000001) { return null; }

		len = 1 / len;
		x *= len;
		y *= len;
		z *= len;

		s = Math.sin(rad);
		c = Math.cos(rad);
		t = 1 - c;

		a00 = out[0]; a01 = out[1]; a02 = out[2]; a03 = out[3];
		a10 = out[4]; a11 = out[5]; a12 = out[6]; a13 = out[7];
		a20 = out[8]; a21 = out[9]; a22 = out[10]; a23 = out[11];

		// Construct the elements of the rotation matrix
		b00 = x * x * t + c; b01 = y * x * t + z * s; b02 = z * x * t - y * s;
		b10 = x * y * t - z * s; b11 = y * y * t + c; b12 = z * y * t + x * s;
		b20 = x * z * t + y * s; b21 = y * z * t - x * s; b22 = z * z * t + c;

		// Perform rotation-specific matrix multiplication
		out[0] = a00 * b00 + a10 * b01 + a20 * b02;
		out[1] = a01 * b00 + a11 * b01 + a21 * b02;
		out[2] = a02 * b00 + a12 * b01 + a22 * b02;
		out[3] = a03 * b00 + a13 * b01 + a23 * b02;
		out[4] = a00 * b10 + a10 * b11 + a20 * b12;
		out[5] = a01 * b10 + a11 * b11 + a21 * b12;
		out[6] = a02 * b10 + a12 * b11 + a22 * b12;
		out[7] = a03 * b10 + a13 * b11 + a23 * b12;
		out[8] = a00 * b20 + a10 * b21 + a20 * b22;
		out[9] = a01 * b20 + a11 * b21 + a21 * b22;
		out[10] = a02 * b20 + a12 * b21 + a22 * b22;
		out[11] = a03 * b20 + a13 * b21 + a23 * b22;
	}

	static invert(out,mat) {
		if(mat === undefined) mat = out; //If input isn't sent, then output is also input

	    var a00 = mat[0], a01 = mat[1], a02 = mat[2], a03 = mat[3],
	        a10 = mat[4], a11 = mat[5], a12 = mat[6], a13 = mat[7],
	        a20 = mat[8], a21 = mat[9], a22 = mat[10], a23 = mat[11],
	        a30 = mat[12], a31 = mat[13], a32 = mat[14], a33 = mat[15],

	        b00 = a00 * a11 - a01 * a10,
	        b01 = a00 * a12 - a02 * a10,
	        b02 = a00 * a13 - a


S_12", "./test_code/Parser_AtomicsBadParenthesisEOS_failure.a");
    return cached_AtomicsBadParenthesisEOS_12;
  }

  @Test
  public void testAtomicsBadParenthesisEOSFailure() {
    assertLiveFail(get_AtomicsBadParenthesisEOS_12());
  }

  @Test
  public void testAtomicsBadParenthesisEOSNotTerribleLineNumbers() {
    assertNotTerribleLineNumbers(get_AtomicsBadParenthesisEOS_12());
  }

  @Test
  public void testAtomicsBadParenthesisEOSExceptionFree() {
    assertExceptionFree(get_AtomicsBadParenthesisEOS_12());
  }

  @Test
  public void testAtomicsBadParenthesisEOSTODOFree() {
    assertTODOFree(get_AtomicsBadParenthesisEOS_12());
  }

  @Test
  public void stable_AtomicsBadParenthesisEOS_12() {
    String live = get_AtomicsBadParenthesisEOS_12();
    StringBuilder gold = new StringBuilder();
    gold.append("Path:Parser_AtomicsBadParenthesisEOS_failure.a");
    gold.append("\n--ISSUES-------------------------------------------");
    gold.append("\n[{\"range\":{\"start\":{\"line\":2,\"character\":10,\"byte\":24},\"end\":{\"line\":2,\"character\":11,\"byte\":25}},\"severity\":1,\"source\":\"error\",\"message\":\"File './test_code/Parser_AtomicsBadParenthesisEOS_failure.a' failed to parse: Parser was expecting an atomic expression, but got end of stream instead. {Token: `(` @ (2,10) -> (2,11): Symbol}\",\"file\":\"./test_code/Parser_AtomicsBadParenthesisEOS_failure.a\"},{\"range\":{\"start\":{\"line\":0,\"character\":0,\"byte\":0},\"end\":{\"line\":0,\"character\":0,\"byte\":0}},\"severity\":1,\"source\":\"error\",\"message\":\"Import failed (Parse): Parser was expecting an atomic expression, but got end of stream instead. {Token: `(` @ (2,10) -> (2,11): Symbol}\"}]\"--JAVA---------------------------------------------");
    gold.append("\n");
    gold.append("\nFailedValidation");
    assertStable(live, gold);
  }
  private String cached_AtomicsBadParenthesisUnmatched_13 = null;
  private String get_AtomicsBadParenthesisUnmatched_13() {
    if (cached_AtomicsBadParenthesisUnmatched_13 != null) {
      return cached_AtomicsBadParenthesisUnmatched_13;
    }
    cached_AtomicsBadParenthesisUnmatched_13 = generateTestOutput(false, "AtomicsBadParenthesisUnmatched_13", "./test_code/Parser_AtomicsBadParenthesisUnmatched_failure.a");
    return cached_AtomicsBadParenthesisUnmatched_13;
  }

  @Test
  public void testAtomicsBadParenthesisUnmatchedFailure() {
    assertLiveFail(get_AtomicsBadParenthesisUnmatched_13());
  }

  @Test
  public void testAtomicsBadParenthesisUnmatchedNotTerribleLineNumbers() {
    assertNotTerribleLineNumbers(get_AtomicsBadParenthesisUnmatched_13());
  }

  @Test
  public void testAtomicsBadParenthesisUnmatchedExceptionFree() {
    assertExceptionFree(get_AtomicsBadParenthesisUnmatched_13());
  }

  @Test
  public void testAtomicsBadParenthesisUnmatchedTODOFree() {
    assertTODOFree(get_AtomicsBadParenthesisUnmatched_13());
  }

  @Test
  public void stable_AtomicsBadParenthesisUnmatched_13() {
    String live = get_AtomicsBadParenthesisUnmatched_13();
    StringBuilder gold = new StringBuilder();
    gold.append("Path:Parser_AtomicsBadParenthesisUnmatched_failure.a");
    gold.append("\n--ISSUES-------------------------------------------");
    gold.append("\n[{\"range


rror_threshold = 0.1
)
```

In the experiment of nn-Meter, we set default `init_sample_num` as 1000, `finegrained_sample_num` as 10, `iteration` as 5, and `error_threshold` as 0.1.

nn-Meter also provided a end-to-end method for users to build a series of general latency predictors, named `nn_meter.builder.build_latency_predictor`. This method will build predictors for all kernels in `<workspace-path>/configs/predictorbuild_config.yaml` according to their corresponding parameters. The parameters includes `INIT_SAMPLE_NUM`, `FINEGRAINED_SAMPLE_NUM`, `ITERATION`, and `ERROR_THRESHOLD`. Here is an example:

``` python
# initialize builder config with workspace
from nn_meter.builder import builder_config
workspace = "/path/to/workspace/"
builder_config.init(workspace)

# build latency predictor for kernel
from nn_meter.builder import build_latency_predictor
build_latency_predictor(backend="tflite_cpu")
```

# Kernel Data Format

## Structure of Kernel Data

In the process to build kernel latency predictor, a series of kernel data will be sampled, generated, and profiled to build the training dataset. One piece of complete kernel data consists of two parts, the configuration information and the profiled results (in default is the latency value). The configuration information and profiled results are dumped in json file to `<workspace-path>/predictor_build/results/<kernel_type>_<mark>.json` and `<workspace-path>/predictor_build/results/profiled_<kernel_type>.json`， respectively. In each data piece, `"model"` points to its directory to the path of this kernels' `Keras` model, `"shapes"` indicates the input shape of the tensor to test, and `"latency"` reports the profiled results after running `profile_models`. The ids of kernel data are randomly generated and consists of 6 capital letters.

This is a json dump of the configuration information of generated kernels, which we call it config json file:

```json
"conv-bn-relu": {
    "YB2F4N": {
        "model": "<workspace-path>/predictor_build/kernels/conv-bn-relu_prior_YB2F4N",
        "shapes": [
            [
                13,
                13,
                212
            ]
        ],
        "config": {
            "HW": 13,
            "CIN": 212,
            "COUT": 176,
            "KERNEL_SIZE": 1,
            "STRIDES": 1
        }
    }
}
```

After running and profiling the kernels, the `"latency"` attribute appears in `<workspace-path>/predictor_build/results/profiled_<kernel_type>.json`, which we call it latency json file:

```json
"conv-bn-relu": {
    "YB2F4N": {
        "latency": "37.53 +- 0.314"
    }
}
```
Note: If the parameter `DETAIL` is `TRUE` in `<workspace-path>/configs/predictorbuild_config.yaml`, the configuration information will also be dumped in `<workspace-path>/predictor_build/results/profiled_<kernel_type>.json`.

Config json file and latency json file formed the training data of kernel latency predictor. The kernel data should be defined as follows:

```python
config_json_file = [
    f'{workspace}/predictor_build/results/{kernel_type}_prior.json',
    f'{workspace}/predictor_build/results/{kernel_type}_finegrained1.json',
    f'{workspace}/predictor_build/results/{kernel_type}_finegrained2.json'
]
latency_json_file = [
    f'{workspace}/predictor_build/results/profiled_{kernel_type}.json'
]
kernel_data = (config_json_file, latency_json_file)
```

and called as follows:
```python
# build initial latency predictor by kernel_data
predictor, acc10, error_configs = build_predictor_by_data(
    kernel_type, kernel


# app/services/smolvlm_inference.py
import os
import torch
from PIL import Image
from transformers import AutoProcessor, AutoModelForVision2Seq, LlavaOnevisionForConditionalGeneration
from transformers.image_utils import load_image
from io import BytesIO
import base64
import logging

logging.basicConfig(
    level=logging.INFO,
    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
    datefmt='%Y-%m-%d %H:%M:%S'
)

gpu_index = os.environ.get("GPU_INDEX", "0")
DEVICE = f"cuda:{gpu_index}" if torch.cuda.is_available() else "cpu"
print(f"Using device: {DEVICE}")

# Load model and processor only once
model_id = "llava-hf/llava-onevision-qwen2-0.5b-ov-hf"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForVision2Seq.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16
).to(DEVICE)

def run_inference(image_data: bytes, user_prompt: str) -> str:
    """
    image_data (bytes): raw bytes of the image (e.g., from base64 decode).
    user_prompt (str): the text prompt/question.
    Return: the model's generated text.
    """
    # Load image from memory
    try:
        pil_image = Image.open(BytesIO(image_data)).convert("RGB")
    except Exception as e:
        raise ValueError(f"Invalid image data: {str(e)}")

    # Construct the messages
    messages = [
        {
            "role": "user",
            "content": [
                {"type": "image"},
                {"type": "text", "text": user_prompt}
            ]
        },
    ]

    # Prepare input
    prompt = processor.apply_chat_template(messages, add_generation_prompt=True)
    inputs = processor(text=prompt, images=[pil_image], return_tensors="pt").to(DEVICE)

    # Generate outputs
    with torch.no_grad(), torch.amp.autocast('cuda'):
        generated_ids = model.generate(**inputs, max_new_tokens=200)
    generated_text = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]

    gpu_memory = torch.cuda.memory_allocated(DEVICE) / (1024 ** 2)  # Convert to MiB
    logging.info(f"GPU Memory Allocated: {gpu_memory} MiB")

    torch.cuda.empty_cache()

    return generated_text


dioMan.addOnModeChangedListener(Executors.newSingleThreadExecutor(), audioModeListener)
		}
		val filter = IntentFilter().apply {
			addAction(Intent.ACTION_HEADSET_PLUG)
			addAction(BluetoothDevice.ACTION_ACL_CONNECTED)
			addAction(BluetoothDevice.ACTION_ACL_CONNECTED)
			addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED)
			addAction(Intent.ACTION_SCREEN_ON)
			addAction(Intent.ACTION_SCREEN_OFF)
		}
		registerReceiver(stateReceiver, filter)
		shake.onShake = {
			Log.i(TAG, "TTS silenced by shake")
			ioScope.launch {
				ttsQueueMutex.withLock {
					ttsQueue.values.forEach { info ->
						info.addIgnoreReasons(IgnoreReason.SHAKE)
						NotifyList.updateInfo(info)
					}
				}
				tts?.stop()
			}
		}
		setInitialized(true)
	}

	override fun onListenerDisconnected() {
		Log.i(TAG, "Notification listener disconnected")
		if (isRunning.value) {
			if (usePhoneState) {
				@Suppress("DEPRECATION")
				telephonyMan.listen(phoneStateListener, PhoneStateListener.LISTEN_NONE)
			} else {
				audioMan.removeOnModeChangedListener(audioModeListener)
			}
			unregisterReceiver(stateReceiver)
			setInitialized(false)
		}
	}

	private fun setInitialized(initialized: Boolean) {
		isInitialized.value = initialized
	}

	private fun isScreenOn() =
		(appContext.getSystemService(POWER_SERVICE) as PowerManager).isInteractive &&
			(appContext.getSystemService(DISPLAY_SERVICE) as DisplayManager)
				.getDisplay(Display.DEFAULT_DISPLAY).state == Display.STATE_ON

	@get:RequiresApi(Build.VERSION_CODES.M)
	@delegate:RequiresApi(Build.VERSION_CODES.M)
	private val audioDeviceTypes by lazy {
		mutableListOf(
			AudioDeviceInfo.TYPE_BLUETOOTH_A2DP,
			AudioDeviceInfo.TYPE_WIRED_HEADSET,
			AudioDeviceInfo.TYPE_WIRED_HEADPHONES
		).apply {
			if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) return@apply
			add(AudioDeviceInfo.TYPE_USB_HEADSET)
			if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) return@apply
			add(AudioDeviceInfo.TYPE_BLE_HEADSET)
		}.toTypedArray()
	}

	private fun isHeadsetOn(): Boolean {
		return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
			audioMan.getDevices(AudioManager.GET_DEVICES_OUTPUTS).any {
				it.type.isAny(*audioDeviceTypes)
			}
		} else {
			@Suppress("DEPRECATION")
			audioMan.isBluetoothA2dpOn || audioMan.isWiredHeadsetOn
		}
	}

	/**
	 * @param mode The audio mode to check. Defaults to `mode` from [audioMan].
	 * @return `true` if [mode] is in call or in communication.
	 */
	private fun isAudioModeInCall(mode: Int = audioMan.mode) = mode.isAny(
		AudioManager.MODE_IN_CALL,
		AudioManager.MODE_IN_COMMUNICATION
	) || (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU && mode.isAny(
		AudioManager.MODE_CALL_REDIRECT,
		AudioManager.MODE_COMMUNICATION_REDIRECT
	))

	/**
	 * @param state The phone state to check.
	 * Defaults to `callState` from [telephonyMan] if `READ_PHONE_STATE` permission is granted, otherwise -1.
	 * @return `true` if [state] is off-hook


ic": "人工智能"}'
```

2. **使用自定义参数**
```bash
curl -X POST http://localhost:4000/api/generate/card \
  -H "Content-Type: application/json" \
  -d '{
    "topic": "人工智能",
    "style": "科技风",
    "language": "中文"
  }'
```

3. **指定用户目录**
```bash
curl -X POST http://localhost:4000/api/generate/card \
  -H "Content-Type: application/json" \
  -d '{
    "topic": "人工智能",
    "token": "user_token_123"
  }'
```

4. **异步生成**
```bash
# 提交任务
curl -X POST http://localhost:4000/api/generate/card/async \
  -H "Content-Type: application/json" \
  -d '{"topic": "人工智能"}'

# 查询结果
curl http://localhost:4000/api/generate/card/query/人工智能
```

### 最佳实践

1. **性能优化**
   - 提供完整参数可跳过AI生成，节省30-60秒
   - 使用异步接口处理批量任务

2. **用户体验**
   - 流式接口提供实时反馈
   - 异步接口避免长时间等待

3. **错误处理**
   - 检查返回的 `code` 字段
   - 记录 `taskId` 或 `apiId` 用于问题追踪

### 支持与反馈

如有问题或建议，请提交到项目 Issues：
https://github.com/your-repo/ai-terminal/issues# 命令行转API开发指南 (v3.32及以下版本 - 已废弃)

> ⚠ **重要提示**: 此文档适用于 v3.32 及以下版本，已被新的简化架构替代。
>
> **请查看最新文档**: [Claude API 简化指南](../api/claude-api-simplified.md)
>
> 从 v3.33 开始，Claude API 使用简化的 `claude -p` 架构，无需复杂的初始化流程。

## 目录
- [概述](#概述)
- [核心架构](#核心架构)
- [快速开始](#快速开始)
- [详细实现](#详细实现)
- [代码示例](#代码示例)
- [最佳实践](#最佳实践)
- [故障排除](#故障排除)
- [扩展开发](#扩展开发)

## 概述

本指南基于AI Terminal项目的成功实践，详细说明如何将命令行工具转换为稳定的REST API服务。通过复用现有terminal基础设施，实现了高可靠性和环境一致性的API服务。

### 适用场景
- 将Claude、Git、NPM等命令


   * @ngdoc method
   * @name $ionicListDelegate#closeOptionButtons
   * @description Closes any option buttons on the list that are swiped open.
   */
  'closeOptionButtons',
  /**
   * @ngdoc method
   * @name $ionicListDelegate#$getByHandle
   * @param {string} handle
   * @returns `delegateInstance` A delegate instance that controls only the
   * {@link ionic.directive:ionList} directives with `delegate-handle` matching
   * the given handle.
   *
   * Example: `$ionicListDelegate.$getByHandle('my-handle').showReorder(true);`
   */
]))

.controller('$ionicList', [
  '$scope',
  '$attrs',
  '$ionicListDelegate',
  '$ionicHistory',
function($scope, $attrs, $ionicListDelegate, $ionicHistory) {
  var self = this;
  var isSwipeable = true;
  var isReorderShown = false;
  var isDeleteShown = false;

  var deregisterInstance = $ionicListDelegate._registerInstance(
    self, $attrs.delegateHandle, function() {
      return $ionicHistory.isActiveScope($scope);
    }
  );
  $scope.$on('$destroy', deregisterInstance);

  self.showReorder = function(show) {
    if (arguments.length) {
      isReorderShown = !!show;
    }
    return isReorderShown;
  };

  self.showDelete = function(show) {
    if (arguments.length) {
      isDeleteShown = !!show;
    }
    return isDeleteShown;
  };

  self.canSwipeItems = function(can) {
    if (arguments.length) {
      isSwipeable = !!can;
    }
    return isSwipeable;
  };

  self.closeOptionButtons = function() {
    self.listView && self.listView.clearDragEffects();
  };
}]);

IonicModule

.controller('$ionicNavBar', [
  '$scope',
  '$element',
  '$attrs',
  '$compile',
  '$timeout',
  '$ionicNavBarDelegate',
  '$ionicConfig',
  '$ionicHistory',
function($scope, $element, $attrs, $compile, $timeout, $ionicNavBarDelegate, $ionicConfig, $ionicHistory) {

  var CSS_HIDE = 'hide';
  var DATA_NAV_BAR_CTRL = '$ionNavBarController';
  var PRIMARY_BUTTONS = 'primaryButtons';
  var SECONDARY_BUTTONS = 'secondaryButtons';
  var BACK_BUTTON = 'backButton';
  var ITEM_TYPES = 'primaryButtons secondaryButtons leftButtons rightButtons title'.split(' ');

  var self = this;
  var headerBars = [];
  var navElementHtml = {};
  var isVisible = true;
  var queuedTransitionStart, queuedTransitionEnd, latestTransitionId;

  $element.parent().data(DATA_NAV_BAR_CTRL, self);

  var delegateHandle = $attrs.delegateHandle || 'navBar' + ionic.Utils.nextUid();

  var deregisterInstance = $ionicNavBarDelegate._registerInstance(self, delegateHandle);

  self.init = function() {
    $element.addClass('nav-bar-container');
    ionic.DomUtil.cachedAttr($element, 'nav-bar-transition', $ionicConfig.views.transition());

    // create two nav bar blocks which will trade out which one is shown
    self.createHeaderBar(false);
    self.createHeaderBar(true);

    $scope.$emit('ionNavBar.init', delegateHandle);
  };

  self.createHeaderBar = function(isActive, navBarClass) {
    var containerEle = jqLite('<div class="nav-bar-block">');
    ionic.DomUtil.cachedAttr(containerEle, 'nav-bar', isActive ? 'active' : 'cached');

    var alignTitle = $attrs.alignTitle || $ionicConfig.navBar.alignTitle();
    var headerBarEle = jqLite('<ion-header-bar>').addClass($attrs.class).attr('align-title', alignTitle);
    if (isDefined($attrs.noTapScroll)) headerBarEle.attr('no-tap-scroll', $attrs.noTapScroll);
    var titleEle = jqLite


75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path></svg>History

<svg aria-hidden="true" focusable="false" role="img" class="octicon octicon-history" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path></svg>

22 lines (18 loc) · 1.08 KB

<button type="button" id="branch-picker-repos-header-ref-selector" aria-haspopup="true" tabindex="0" aria-label="master branch" data-testid="anchor-button" class="types__StyledButton-


 4.76678,3.97421 v 0 l -0.17566,-4.73929 z m -11.30215,22.9526 v 0 q -6.3245,0 -10.11921,4.35675 -3.79466,4.36737 -3.79466,11.63569 v 0 q 0,6.19508 2.91628,9.68047 2.90459,3.47477 7.96419,3.47477 v 0 q 4.13434,0 7.42544,-2.22087 3.29107,-2.21026 5.14157,-6.1207 1.8505,-3.89981 1.8505,-8.94726 v 0 q 0,-5.50438 -3.0334,-8.68161 -3.03344,-3.17724 -8.35071,-3.17724 z m 49.00317,34.28014 v 0 q -9.69753,0 -15.22562,-5.05807 -5.52809,-5.04745 -5.52809,-14.0691 v 0 q 0,-5.89754 2.6235,-10.48806 2.61177,-4.59052 7.12093,-7.15144 4.50911,-2.56091 10.24802,-2.56091 v 0 q 8.59664,0 13.28146,5.42999 4.67309,5.42999 3.32622,16.21559 v 0 h -30.27562 q 0.25766,6.12069 4.09922,9.34043 3.82981,3.20911 10.75161,3.20911 v 0 q 3.37307,0 6.48848,-1.3389 3.1154,-1.3389 5.31727,-4.16547 v 0 l 3.87671,3.20911 q -5.65694,7.42772 -16.10409,7.42772 z m -0.6793,-34.81145 v 0 q -3.87667,0 -6.79294,1.67894 -2.90459,1.67894 -4.67313,4.54802 -1.7685,2.86907 -2.19013,6.39697 v 0 h 24.78265 q 0.33967,-6.66263 -2.85774,-9.64859 -3.2091,-2.97534 -8.26871,-2.97534 z m 51.60328,-3.98482 -0.92527,5.42999 q -0.84327,-0.22315 -1.68653,-0.29754 -0.84327,-0.085 -1.85051,-0.085 v 0 q -7.34343,0 -10.7165,7.84214 -3.37307,7.84214 -3.37307,25.29037 v 0 h -6.06684 v -24.40839 l -0.082,-13.61217 h 6.1488 l -0.42163,13.53778 q 2.02616,-7.72525 6.07853,-10.97687 4.04068,-3.25161 8.67865,-3.25161 v 0 q 1.35859,0 2.41268,0.11688 1.05408,0.10627 1.80365,0.41443 z"
                    fill="#0f172a"
                    id="path8"
                    style="fill:#06172a;fill-opacity:1;stroke:none;stroke-width:0.400572;stroke-opacity:1" />
                </g>
            </g>
            </svg>
            </a>
        </div>
    </div>
</header><!doctype html>
<html>
<head>


00                                  	jmpq   404fe5 <SYSTEM_$$_FPOWER10$EXTENDED$LONGINT$$EXTENDED+0x145>
  404f5a:	89 c2                                           	mov    %eax,%edx
  404f5c:	83 e2 1f                                        	and    $0x1f,%edx
  404f5f:	48 6b d2 0a                                     	imul   $0xa,%rdx,%rdx
  404f63:	db 6d 10                                        	fldt   0x10(%rbp)
  404f66:	48 8d 0d 03 ee 21 00                            	lea    0x21ee03(%rip),%rcx        # 623d70 <TC_$SYSTEM$_$FPOWER10$EXTENDED$LONGINT$$EXTENDED_$$_POW32>
  404f6d:	db 2c 11                                        	fldt   (%rcx,%rdx,1)
  404f70:	de c9                                           	fmulp  %st,%st(1)
  404f72:	db 7d f0                                        	fstpt  -0x10(%rbp)
  404f75:	89 c2                                           	mov    %eax,%edx
  404f77:	c1 ea 05                                        	shr    $0x5,%edx
  404f7a:	89 d0                                           	mov    %edx,%eax
  404f7c:	85 c0                                           	test   %eax,%eax
  404f7e:	74 65                                           	je     404fe5 <SYSTEM_$$_FPOWER10$EXTENDED$LONGINT$$EXTENDED+0x145>
  404f80:	89 c2                                           	mov    %eax,%edx
  404f82:	83 e2 0f                                        	and    $0xf,%edx
  404f85:	48 6b d2 0a                                     	imul   $0xa,%rdx,%rdx
  404f89:	db 6d f0                                        	fldt   -0x10(%rbp)
  404f8c:	48 8d 0d 1d ef 21 00                            	lea    0x21ef1d(%rip),%rcx        # 623eb0 <TC_$SYSTEM$_$FPOWER10$EXTENDED$LONGINT$$EXTENDED_$$_POW512>
  404f93:	db 2c 11                                        	fldt   (%rcx,%rdx,1)
  404f96:	de c9                                           	fmulp  %st,%st(1)
  404f98:	db 7d f0                                        	fstpt  -0x10(%rbp)
  404f9b:	89 c2                                           	mov    %eax,%edx
  404f9d:	c1 ea 04                                        	shr    $0x4,%edx
  404fa0:	89 d0                                           	mov    %edx,%eax
  404fa2:	85 c0                                           	test   %eax,%eax
  404fa4:	74 3f                                           	je     404fe5 <SYSTEM_$$_FPOWER10$EXTENDED$LONGINT$$EXTENDED+0x145>
  404fa6:	83 f8 09                                        	cmp    $0x9,%eax
  404fa9:	7f 1d                                           	jg     404fc8 <SYSTEM_$$_FPOWER10$EXTENDED$LONGINT$$EXTENDED+0x128>
  404fab:	25 ff ff ff ff                                  	and    $0xffffffff,%eax
  404fb0:	48 6b c0 0a                                     	imul   $0xa,%rax,%rax
  404fb4:	db 6d f0                                        	fldt   -0x10(%rbp)
  404fb7:	48 8d 15 92 ef 21 00                            	lea    0x21ef92(%rip),%rdx        # 623f50 <TC_$SYSTEM$_$FPOWER10$EXTENDED$LONGINT$$EXTENDED_$$


// Copyright 2024 Kelvin Nishikawa
//
// 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.

using System;
using Wacs.Core.OpCodes;
using Wacs.Core.Runtime;
using Wacs.Core.Types.Defs;

namespace Wacs.Core.Instructions.Numeric
{
    public partial class NumericInst
    {
        public static readonly NumericInst I8x16Abs     = new (SimdCode.I8x16Abs     , ExecuteI8x16Abs    , ValidateOperands(pop: ValType.V128, push: ValType.V128), 0);
        public static readonly NumericInst I16x8Abs     = new (SimdCode.I16x8Abs     , ExecuteI16x8Abs    , ValidateOperands(pop: ValType.V128, push: ValType.V128), 0);
        public static readonly NumericInst I32x4Abs     = new (SimdCode.I32x4Abs     , ExecuteI32x4Abs    , ValidateOperands(pop: ValType.V128, push: ValType.V128), 0);
        public static readonly NumericInst I64x2Abs     = new (SimdCode.I64x2Abs     , ExecuteI64x2Abs    , ValidateOperands(pop: ValType.V128, push: ValType.V128), 0);

        public static readonly NumericInst I8x16Neg     = new (SimdCode.I8x16Neg     , ExecuteI8x16Neg    , ValidateOperands(pop: ValType.V128, push: ValType.V128), 0);
        public static readonly NumericInst I16x8Neg     = new (SimdCode.I16x8Neg     , ExecuteI16x8Neg    , ValidateOperands(pop: ValType.V128, push: ValType.V128), 0);
        public static readonly NumericInst I32x4Neg     = new (SimdCode.I32x4Neg     , ExecuteI32x4Neg    , ValidateOperands(pop: ValType.V128, push: ValType.V128), 0);
        public static readonly NumericInst I64x2Neg     = new (SimdCode.I64x2Neg     , ExecuteI64x2Neg    , ValidateOperands(pop: ValType.V128, push: ValType.V128), 0);

        public static readonly NumericInst I8x16Popcnt  = new (SimdCode.I8x16Popcnt  , ExecuteI8x16Popcnt , ValidateOperands(pop: ValType.V128, push: ValType.V128), 0);

        private static void ExecuteI8x16Abs(ExecContext context)
        {
            V128 val = context.OpStack.PopV128();
            V128 result = new V128(
                val.I8x16_0 == sbyte.MinValue ? sbyte.MinValue : Math.Abs(val.I8x16_0),
                val.I8x16_1 == sbyte.MinValue ? sbyte.MinValue : Math.Abs(val.I8x16_1),
                val.I8x16_2 == sbyte.MinValue ? sbyte.MinValue : Math.Abs(val.I8x16_2),
                val.I8x16_3 == sbyte.MinValue ? sbyte.MinValue : Math.Abs(val.I8x16_3),
                val.I8x16_4 ==


mov r0, #6
	str r0, [sp]
	mov r0, #2
	mov r2, #0
	str r0, [sp, #4]
	add r0, sp, #0x1c
	mov r1, #8
	add r3, r2, #0
	bl sub_02001B8C
	mov r1, #0x56
	lsl r1, r1, #2
	str r0, [r5, r1]
	add r0, r5, #0
	add r0, #0xc4
	ldr r2, [r0]
	mov r3, #0xc
	add r0, r2, #0
	add r0, #0x64
	ldrb r0, [r0]
	add r1, r0, #0
	mul r1, r3
	add r0, r2, r1
	ldrb r0, [r0, #0xc]
	cmp r0, #3
	bne _021EB298
	add r0, r5, #0
	add r0, #0x14
	mov r1, #0
	bl FillWindowPixelBuffer
	add r1, r5, #0
	add r1, #0xc4
	ldr r1, [r1]
	add r0, r5, #0
	add r1, #0x66
	ldrh r1, [r1]
	bl ov75_021EAB44
	add r0, r5, #0
	add r0, #0x14
	bl ScheduleWindowCopyToVram
	add r1, r5, #0
	add r1, #0xc4
	ldr r1, [r1]
	add r0, r5, #0
	add r1, #0x66
	ldrh r1, [r1]
	mov r2, #1
	bl ov75_021EC2B8
	b _021EB31E
_021EB298:
	ldr r0, [sp, #0x14]
	add r4, r5, #4
	lsl r6, r0, #4
	ldr r2, _021EB33C ; =0x000003D9
	add r0, r4, r6
	mov r1, #1
	bl DrawFrameAndWindow2
	add r0, r4, r6
	mov r1, #0xf
	bl FillWindowPixelBuffer
	mov r0, #0x45
	lsl r0, r0, #2
	ldr r0, [r5, r0]
	mov r1, #0x2a
	bl NewString_ReadMsgData
	str r0, [sp, #0x18]
	mov r0, #0x38
	mov r1, #6
	bl String_New
	add r7, r0, #0
	add r0, r5, #0
	add r0, #0xc4
	ldr r1, [r0]
	add r0, r1, #4
	add r1, #0x64
	ldrb r2, [r1]
	mov r1, #0xc
	mul r1, r2
	add r1, r0, r1
	ldrh r2, [r1, #6]
	ldrh r1, [r1, #4]
	add r0, r5, #0
	add r1, r2, r1
	sub r1, r1, #1
	mov r2, #0
	bl ov75_021EAAA8
	mov r0, #0x46
	lsl r0, r0, #2
	ldr r0, [r5, r0]
	ldr r2, [sp, #0x18]
	add r1, r7, #0
	bl StringExpandPlaceholders
	mov r3, #0
	str r3, [sp]
	mov r0, #0xff
	str r0, [sp, #4]
	add r0, r4, r6
	mov r1, #1
	add r2, r7, #0
	str r3, [sp, #8]
	bl AddTextPrinterParameterized
	add r0, r7, #0
	bl String_Delet


box-shadow:0 0px 0px 0 rgba(0,0,0,0),0 0 0 0rem rgba(130,138,145,0.5);box-shadow:0 0px 0px 0 rgba(0,0,0,0),0 0 0 0rem rgba(130,138,145,0.5)}.btn-check:checked+.btn-secondary,.btn-check:active+.btn-secondary,.btn-secondary:active,.btn-secondary.active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#565e64;border-color:#51585e}.btn-check:checked+.btn-secondary:focus,.btn-check:active+.btn-secondary:focus,.btn-secondary:active:focus,.btn-secondary.active:focus,.show>.btn-secondary.dropdown-toggle:focus{-webkit-box-shadow:0 0px 0px rgba(0,0,0,0),0 0 0 0rem rgba(130,138,145,0.5);box-shadow:0 0px 0px rgba(0,0,0,0),0 0 0 0rem rgba(130,138,145,0.5)}.btn-secondary:disabled,.btn-secondary.disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:hover{-webkit-box-shadow:rgba(108,117,125,0.3),0 0.125rem 0.5rem rgba(108,117,125,0.35);box-shadow:rgba(108,117,125,0.3),0 0.125rem 0.5rem rgba(108,117,125,0.35)}.btn-success{color:#fff;background-color:#1AA053;border-color:#1AA053;-webkit-box-shadow:0 0px 0px 0 rgba(0,0,0,0);box-shadow:0 0px 0px 0 rgba(0,0,0,0);-webkit-box-shadow:rgba(26,160,83,0.3);box-shadow:rgba(26,160,83,0.3)}.btn-success:hover{color:#fff;background-color:#168847;border-color:#158042}.btn-check:focus+.btn-success,.btn-success:focus{color:#fff;background-color:#168847;border-color:#158042;-webkit-box-shadow:0 0px 0px 0 rgba(0,0,0,0),0 0 0 0rem rgba(60,174,109,0.5);box-shadow:0 0px 0px 0 rgba(0,0,0,0),0 0 0 0rem rgba(60,174,109,0.5)}.btn-check:checked+.btn-success,.btn-check:active+.btn-success,.btn-success:active,.btn-success.active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#158042;border-color:#14783e}.btn-check:checked+.btn-success:focus,.btn-check:active+.btn-success:focus,.btn-success:active:focus,.btn-success.active:focus,.show>.btn-success.dropdown-toggle:focus{-webkit-box-shadow:0 0px 0px rgba(0,0,0,0),0 0 0 0rem rgba(60,174,109,0.5);box-shadow:0 0px 0px rgba(0,0,0,0),0 0 0 0rem rgba(60,174,109,0.5)}.btn-success:disabled,.btn-success.disabled{color:#fff;background-color:#1AA053;border-color:#1AA053}.btn-success:hover{-webkit-box-shadow:rgba(26,160,83,0.3),0 0.125rem 0.5rem rgba(26,160,83,0.35);box-shadow:rgba(26,160,83,0.3),0 0.125rem 0.5rem rgba(26,160,83,0.35)}.btn-info{color:#000;background-color:#08B1BA;border-color:#08B1BA;-webkit-box-shadow:0 0px 0px 0 rgba(0,0


/*
*  Program: uci-analyser: a UCI-based Chess Game Analyser
*  Copyright (C) 1994-2015 David Barnes
*  This program is free software; you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation; either version 1, or (at your option)
*  any later version.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software
*  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*  David Barnes may be contacted as D.J.Barnes@kent.ac.uk
*  http://www.cs.kent.ac.uk/people/staff/djb/
*
*  This software has been modified for compatibility with PGN Spy.  The original may be found at:
*  https://www.cs.kent.ac.uk/people/staff/djb/chessplag/
*
*/

#ifndef ENGINE_H
#define ENGINE_H

#include <iostream>
#ifdef __unix__
#include <stdio.h>
#include <unistd.h>
#else
#include "stdafx.h"
#include <atlstr.h>
#include <windows.h>
#endif

#include <string>
#include <map>

using namespace std;

class Engine {
public:

    Engine(const string& engineName) {
        if (!startEngine(engineName)) {
            throw -1;
        }
    }

    virtual ~Engine() {
    }

    bool checkIsReady(void);
    string getResponse(bool& eof);
    void clearHash(void);
    void go(void);
    void stop(void);
    bool initEngine(int variations, int searchDepth, int searchMaxTime, int searchMinTime,
            map<string, string>& options);
    void quitEngine(void);
    void searchMoves(const string& moves);
    void send(const string& str);
    void send(const char *str);
    void setPosition(const string& moves, const string& fenstring);
    void setFENPosition(const string& fenstring, const string& moves);
    void setOption(const string& name, const string& value);
    void setOption(const string& name, int value);
    void setOptions(map<string, string>& options);

    inline void startNewGame(void) {
        send("ucinewgame");
        checkIsReady();
    }
    bool waitForResponse(const char *str);

private:
#ifdef __unix__
    // The PID of the engine process.
    pid_t enginePID;
    // Communication to and from the engine.
    FILE *toEngine, *fromEngine;
#else
	HANDLE writeToEngine;
	HANDLE readFromEngine;
#endif

#ifdef _DEBUG
    string communications;
#endif
    // The number of variations to analyse.
    int variations;
    // The depth to analyse.
    int searchDepth;
    int searchMaxTime;
    int searchMinTime;
    HANDLE hEngineMonitor;

    bool startEngine(const string&);
};

#endif


/* bnx2fc_debug.h: QLogic Linux FCoE offload driver.
 * Handles operations such as session offload/upload etc, and manages
 * session resources such as connection id and qp resources.
 *
 * Copyright (c) 2008-2013 Broadcom Corporation
 * Copyright (c) 2014-2016 QLogic Corporation
 * Copyright (c) 2016-2017 Cavium Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation.
 *
 */

#ifndef __BNX2FC_DEBUG__
#define __BNX2FC_DEBUG__

/* Log level bit mask */
#define LOG_IO		0x01	/* scsi cmd error, cleanup */
#define LOG_TGT		0x02	/* Session setup, cleanup, etc' */
#define LOG_HBA		0x04	/* lport events, link, mtu, etc' */
#define LOG_ELS		0x08	/* ELS logs */
#define LOG_MISC	0x10	/* fcoe L2 frame related logs*/
#define LOG_ALL		0xff	/* LOG all messages */

extern unsigned int bnx2fc_debug_level;

#define BNX2FC_ELS_DBG(fmt, ...)				\
do {								\
	if (unlikely(bnx2fc_debug_level & LOG_ELS))		\
		pr_info(fmt, ##__VA_ARGS__);			\
} while (0)

#define BNX2FC_MISC_DBG(fmt, ...)				\
do {								\
	if (unlikely(bnx2fc_debug_level & LOG_MISC))		\
		pr_info(fmt, ##__VA_ARGS__);			\
} while (0)

__printf(2, 3)
void BNX2FC_IO_DBG(const struct bnx2fc_cmd *io_req, const char *fmt, ...);
__printf(2, 3)
void BNX2FC_TGT_DBG(const struct bnx2fc_rport *tgt, const char *fmt, ...);
__printf(2, 3)
void BNX2FC_HBA_DBG(const struct fc_lport *lport, const char *fmt, ...);

#endif


 the object graph cannot be encoded, returns \c nil and sets the \c error out parameter.
  static NSData? archivedDataWithRootObject_requiringSecureCoding_error_(
    PedometerBindings _lib,
    NSObject object,
    bool requiresSecureCoding,
    ffi.Pointer<ffi.Pointer<ObjCObject>> error,
  ) {
    final _ret = _lib._objc_msgSend_471(
      _lib._class_NSKeyedArchiver1,
      _lib._sel_archivedDataWithRootObject_requiringSecureCoding_error_1,
      object._id,
      requiresSecureCoding,
      error,
    );
    return _ret.address == 0
        ? null
        : NSData._(_ret, _lib, retain: true, release: true);
  }

  /// Initialize the archiver with empty data, ready for writing.
  @override
  NSKeyedArchiver init() {
    final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1);
    return NSKeyedArchiver._(_ret, _lib, retain: true, release: true);
  }

  NSKeyedArchiver initForWritingWithMutableData_(NSMutableData data) {
    final _ret = _lib._objc_msgSend_477(
      _id,
      _lib._sel_initForWritingWithMutableData_1,
      data._id,
    );
    return NSKeyedArchiver._(_ret, _lib, retain: true, release: true);
  }

  static NSData archivedDataWithRootObject_(
    PedometerBindings _lib,
    NSObject rootObject,
  ) {
    final _ret = _lib._objc_msgSend_478(
      _lib._class_NSKeyedArchiver1,
      _lib._sel_archivedDataWithRootObject_1,
      rootObject._id,
    );
    return NSData._(_ret, _lib, retain: true, release: true);
  }

  static bool archiveRootObject_toFile_(
    PedometerBindings _lib,
    NSObject rootObject,
    NSString path,
  ) {
    return _lib._objc_msgSend_213(
      _lib._class_NSKeyedArchiver1,
      _lib._sel_archiveRootObject_toFile_1,
      rootObject._id,
      path._id,
    );
  }

  NSObject? get delegate {
    final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1);
    return _ret.address == 0
        ? null
        : NSObject._(_ret, _lib, retain: true, release: true);
  }

  set delegate(NSObject? value) {
    return _lib._objc_msgSend_372(
      _id,
      _lib._sel_setDelegate_1,
      value?._id ?? ffi.nullptr,
    );
  }

  int get outputFormat {
    return _lib._objc_msgSend_479(_id, _lib._sel_outputFormat1);
  }

  set outputFormat(int value) {
    return _lib._objc_msgSend_480(_id, _lib._sel_setOutputFormat_1, value);
  }

  /// If encoding has not yet finished, then invoking this property will call finishEncoding and return the data. If you initialized the keyed archiver with a specific mutable data instance, then it will be returned from this property after finishEncoding is called.
  NSData get encodedData {
    final _ret = _lib._objc_msgSend_43(_id, _lib._sel_encodedData1);
    return NSData._(_ret, _lib, retain: true, release: true);
  }

  void finishEncoding() {
    _lib._objc_msgSend_1(_id, _lib._sel_finishEncoding1);
  }

  stati


provider.JDKAlgorithmParameters$IVAlgorithmParameters");
        // BEGIN android-removed
        // put("AlgorithmParameters.RC2", "org.bouncycastle.jce.provider.JDKAlgorithmParameters$RC2AlgorithmParameters");
        // put("AlgorithmParameters.1.2.840.113549.3.2", "org.bouncycastle.jce.provider.JDKAlgorithmParameters$RC2AlgorithmParameters");
        // put("AlgorithmParameters.RC5", "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IVAlgorithmParameters");
        // put("AlgorithmParameters.RC6", "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IVAlgorithmParameters");
        // put("AlgorithmParameters.IDEA", "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IDEAAlgorithmParameters");
        // put("AlgorithmParameters.BLOWFISH", "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IVAlgorithmParameters");
        // put("AlgorithmParameters.TWOFISH", "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IVAlgorithmParameters");
        // put("AlgorithmParameters.SKIPJACK", "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IVAlgorithmParameters");
        // put("AlgorithmParameters.RIJNDAEL", "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IVAlgorithmParameters");
        // END android-removed
        put("AlgorithmParameters.AES", "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IVAlgorithmParameters");
        put("Alg.Alias.AlgorithmParameters.2.16.840.1.101.3.4.2", "AES");
        put("Alg.Alias.AlgorithmParameters.2.16.840.1.101.3.4.22", "AES");
        put("Alg.Alias.AlgorithmParameters.2.16.840.1.101.3.4.42", "AES");
        put("Alg.Alias.AlgorithmParameters.2.16.840.1.101.3.4.1.2", "AES");
        put("Alg.Alias.AlgorithmParameters.2.16.840.1.101.3.4.1.22", "AES");
        put("Alg.Alias.AlgorithmParameters.2.16.840.1.101.3.4.1.42", "AES");

        //
        // secret key factories.
        //
        put("SecretKeyFactory.DES", "org.bouncycastle.jce.provider.JCESecretKeyFactory$DES");
        put("SecretKeyFactory.DESEDE", "org.bouncycastle.jce.provider.JCESecretKeyFactory$DESede");
        put("SecretKeyFactory.DESEDE", "org.bouncycastle.jce.provider.JCESecretKeyFactory$DESede");
        put("SecretKeyFactory.PBEWITHMD5ANDDES", "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithMD5AndDES");
        put("SecretKeyFactory.PBEWITHMD5ANDRC2", "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithMD5AndRC2");
        put("SecretKeyFactory.PBEWITHSHA1ANDDES", "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHA1AndDES");
        put("SecretKeyFactory.PBEWITHSHA1ANDRC2", "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHA1AndRC2");
        put("SecretKeyFactory.PBEWITHSHAAND3-KEYTRIPLEDES-CBC", "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHAAndDES3Key");
        put("SecretKeyFactory.PBEWITHSHAAND2-KEYTRIPLEDES-CBC", "org.bouncycastle.jce.provider.JCES


st(operator_const &&) = default;
    operator PyObject *() const { return Py_None; } // NOLINT(google-explicit-constructor)
};

bool from_ncnst() {
    operator_ncnst obj;
    auto h = py::handle(obj);  // Critical part of test: does this compile?
    return h.ptr() == Py_None; // Just something.
}

bool from_const() {
    operator_const obj;
    auto h = py::handle(obj);  // Critical part of test: does this compile?
    return h.ptr() == Py_None; // Just something.
}

void m_defs(py::module_ &m) {
    m.def("handle_from_move_only_type_with_operator_PyObject_ncnst", from_ncnst);
    m.def("handle_from_move_only_type_with_operator_PyObject_const", from_const);
}

} // namespace handle_from_move_only_type_with_operator_PyObject

TEST_SUBMODULE(pytypes, m) {
    m.def("obj_class_name", [](py::handle obj) { return py::detail::obj_class_name(obj.ptr()); });

    handle_from_move_only_type_with_operator_PyObject::m_defs(m);

    // test_bool
    m.def("get_bool", [] { return py::bool_(false); });
    // test_int
    m.def("get_int", [] { return py::int_(0); });
    // test_iterator
    m.def("get_iterator", [] { return py::iterator(); });
    // test_iterable
    m.def("get_iterable", [] { return py::iterable(); });
    m.def("get_frozenset_from_iterable",
          [](const py::iterable &iter) { return py::frozenset(iter); });
    m.def("get_list_from_iterable", [](const py::iterable &iter) { return py::list(iter); });
    m.def("get_set_from_iterable", [](const py::iterable &iter) { return py::set(iter); });
    m.def("get_tuple_from_iterable", [](const py::iterable &iter) { return py::tuple(iter); });
    // test_float
    m.def("get_float", [] { return py::float_(0.0f); });
    // test_list
    m.def("list_no_args", []() { return py::list{}; });
    m.def("list_ssize_t", []() { return py::list{(py::ssize_t) 0}; });
    m.def("list_size_t", []() { return py::list{(py::size_t) 0}; });
    m.def("list_insert_ssize_t", [](py::list *l) { return l->insert((py::ssize_t) 1, 83); });
    m.def("list_insert_size_t", [](py::list *l) { return l->insert((py::size_t) 3, 57); });
    m.def("get_list", []() {
        py::list list;
        list.append("value");
        py::print("Entry at position 0:", list[0]);
        list[0] = py::str("overwritten");
        list.insert(0, "inserted-0");
        list.insert(2, "inserted-2");
        return list;
    });
    m.def("print_list", [](const py::list &list) {
        int index = 0;
        for (auto item : list) {
            py::print("list item {}: {}"_s.format(index++, item));
        }
    });
    // test_none
    m.def("get_none", [] { return py::none(); });
    m.def("print_none", [](const py::none &none) { py::print("none: {}"_s.format(none)); });

    // test_set, test_frozenset
    m.def("get_set", []() {
        py::set set;
        set.add(py::str("key1"));
        set.add("key2");
        set.add(


elegate* unmanaged[Thiscall]<ref CPlayerSystem, Double, UInt32, Double, UInt32, Byte>)0x0055E550)(ref this, dist_a, id_a, dist_b, id_b); // .text:0055D830 ; bool __thiscall CPlayerSystem::Farther(CPlayerSystem *this, long double dist_a, unsigned int id_a, long double dist_b, unsigned int id_b) .text:0055D830 ?Farther@CPlayerSystem@@QAE_NNKNK@Z

        // CPlayerSystem.GetCharGenState:
        public ClientCharGenState* GetCharGenState() => ((delegate* unmanaged[Thiscall]<ref CPlayerSystem, ClientCharGenState*>)0x0055E1E0)(ref this); // .text:0055D4C0 ; ClientCharGenState *__thiscall CPlayerSystem::GetCharGenState(CPlayerSystem *this) .text:0055D4C0 ?GetCharGenState@CPlayerSystem@@QAEAAVClientCharGenState@@XZ

        // CPlayerSystem.GetComponentTracker:
        public ComponentTracker* GetComponentTracker() => ((delegate* unmanaged[Thiscall]<ref CPlayerSystem, ComponentTracker*>)0x0055E220)(ref this); // .text:0055D500 ; ComponentTracker *__thiscall CPlayerSystem::GetComponentTracker(CPlayerSystem *this) .text:0055D500 ?GetComponentTracker@CPlayerSystem@@QAEPAVComponentTracker@@XZ

        // CPlayerSystem.GetPlayerSystem:
        public static CPlayerSystem* GetPlayerSystem() => ((delegate* unmanaged[Cdecl]<CPlayerSystem*>)0x0055E1D0)(); // .text:0055D4B0 ; CPlayerSystem *__cdecl CPlayerSystem::GetPlayerSystem() .text:0055D4B0 ?GetPlayerSystem@CPlayerSystem@@SAPAV1@XZ

        // CPlayerSystem.GetRadarRadius:
        public Single GetRadarRadius() => ((delegate* unmanaged[Thiscall]<ref CPlayerSystem, Single>)0x0055E5A0)(ref this); // .text:0055D880 ; float __thiscall CPlayerSystem::GetRadarRadius(CPlayerSystem *this) .text:0055D880 ?GetRadarRadius@CPlayerSystem@@QAEMXZ

        // CPlayerSystem.Handle_AccountBanned:
        public void Handle_AccountBanned(void* buff, UInt32 size) => ((delegate* unmanaged[Thiscall]<ref CPlayerSystem, void*, UInt32, void>)0x00563970)(ref this, buff, size); // .text:00562BD0 ; void __thiscall CPlayerSystem::Handle_AccountBanned(CPlayerSystem *this, void *buff, unsigned int size) .text:00562BD0 ?Handle_AccountBanned@CPlayerSystem@@QAEXPAXI@Z

        // CPlayerSystem.Handle_AccountBooted:
        public void Handle_AccountBooted(void* buff, UInt32 size) => ((delegate* unmanaged[Thiscall]<ref CPlayerSystem, void*, UInt32, void>)0x00563810)(ref this, buff, size); // .text:00562A70 ; void __thiscall CPlayerSystem::Handle_AccountBooted(CPlayerSystem *this, void *buff, unsigned int size) .text:00562A70 ?Handle_AccountBooted@CPlayerSystem@@QAEXPAXI@Z

        // CPlayerSystem.Handle_Admin__Environs:
        public UInt32 Handle_Admin__Environs(int environs_option) => ((delegate* unmanaged[Thiscall]<ref CPlayerSystem, int, UInt32>)0x0055EB40)(ref this, environs_option); // .text:0055DE20 ; unsigned int __thiscall CPlayerSystem::Handle_Admin__Environs(CPlayerSystem *this, const int environs_option) .text:0055DE20 ?Handle_Admin__Environs@CPlayerSystem@@QAEKJ@Z

        // CPlayerSystem.Handle_AwaitingSubscriptionExpiration:
        public void Handle_AwaitingSubscriptionExpiration(UInt32 secondsRemaining) => ((delegate* un


8i& a, const __m128i&) const
        {
            return a;
        }
    };

    template <int imm>
    class v_sse_palignr_u8_class<imm, false, false, true, false, false>
    {
    public:
        inline __m128i operator()(const __m128i& a, const __m128i& b) const
        {
            return _mm_unpacklo_epi64(_mm_unpackhi_epi64(a, a), b);
        }
    };

    template <int imm>
    class v_sse_palignr_u8_class<imm, false, false, false, true, false>
    {
    public:
        inline __m128i operator()(const __m128i&, const __m128i& b) const
        {
            return b;
        }
    };

    template <int imm>
    class v_sse_palignr_u8_class<imm, false, false, false, false, true>
    {
#if CV_SSSE3
    public:
        inline __m128i operator()(const __m128i& a, const __m128i& b) const
        {
            return _mm_alignr_epi8(b, a, imm);
        }
#else
    public:
        inline __m128i operator()(const __m128i& a, const __m128i& b) const
        {
            enum { imm2 = (sizeof(__m128i) - imm) };
            return _mm_or_si128(_mm_srli_si128(a, imm), _mm_slli_si128(b, imm2));
        }
#endif
    };

    template <int imm>
    inline __m128i v_sse_palignr_u8(const __m128i& a, const __m128i& b)
    {
        CV_StaticAssert((imm >= 0) && (imm <= 16), "Invalid imm for v_sse_palignr_u8.");
        return v_sse_palignr_u8_class<imm>()(a, b);
    }
}

template<int imm, typename _Tpvec>
inline _Tpvec v_rotate_right(const _Tpvec &a)
{
    using namespace hal_sse_internal;
    enum { imm2 = (imm * sizeof(typename _Tpvec::lane_type)) };
    return _Tpvec(v_sse_reinterpret_as<typename _Tpvec::vector_type>(
        _mm_srli_si128(
            v_sse_reinterpret_as<__m128i>(a.val), imm2)));
}

template<int imm, typename _Tpvec>
inline _Tpvec v_rotate_left(const _Tpvec &a)
{
    using namespace hal_sse_internal;
    enum { imm2 = (imm * sizeof(typename _Tpvec::lane_type)) };
    return _Tpvec(v_sse_reinterpret_as<typename _Tpvec::vector_type>(
        _mm_slli_si128(
            v_sse_reinterpret_as<__m128i>(a.val), imm2)));
}

template<int imm, typename _Tpvec>
inline _Tpvec v_rotate_right(const _Tpvec &a, const _Tpvec &b)
{
    using namespace hal_sse_internal;
    enum { imm2 = (imm * sizeof(typename _Tpvec::lane_type)) };
    return _Tpvec(v_sse_reinterpret_as<typename _Tpvec::vector_type>(
        v_sse_palignr_u8<imm2>(
            v_sse_reinterpret_as<__m128i>(


unction_21d9968
	cmp     r0, #0x0
	beq     branch_21d14f2
	mov     r0, #0x0
	pop     {r4-r6,pc}
@ 0x21d14f2

.thumb
branch_21d14f2: @ 21d14f2 :thumb
	ldr     r0, [pc, #0x8c] @ 0x21d1580, (=0x221a400)
	ldr     r1, [r0, #0x0]
	ldr     r0, [pc, #0x8c] @ 0x21d1584, (=0x1078)
	ldr     r0, [r1, r0]
	cmp     r0, #0x0
	bne     branch_21d1506
	bl      Function_21d1c5c
	cmp     r0, #0x0
	bne     branch_21d150a
.thumb
branch_21d1506: @ 21d1506 :thumb
	mov     r0, #0x0
	pop     {r4-r6,pc}
@ 0x21d150a

.thumb
branch_21d150a: @ 21d150a :thumb
	ldr     r1, [pc, #0x74] @ 0x21d1580, (=0x221a400)
	ldr     r0, [pc, #0x78] @ 0x21d1588, (=0x10d4)
	ldr     r2, [r1, #0x0]
	ldrh    r3, [r2, r0]
	lsl     r6, r3, #8
	mov     r3, #0x1
	orr     r3, r6
	str     r3, [r2, #0x0]
	mov     r3, r0
	ldr     r2, [r1, #0x0]
	add     r3, #0x8
	ldrb    r3, [r2, r3]
	add     r6, r3, #0x1
	mov     r3, r0
	add     r3, #0x8
	strb    r6, [r2, r3]
	ldr     r2, [r1, #0x0]
	add     r0, #0x8
	ldrb    r0, [r2, r0]
	strb    r0, [r2, #0x2]
	ldr     r1, [r1, #0x0]
	mov     r0, r5
	.hword  0x1d09 @ add r1, r1, #0x4
	mov     r2, r4
	blx     MI_CpuCopy8
	ldr     r0, [pc, #0x40] @ 0x21d1580, (=0x221a400)
	mov     r2, #0x1
	ldr     r1, [r0, #0x0]
	ldr     r0, [pc, #0x3c] @ 0x21d1584, (=0x1078)
	str     r2, [r1, r0]
	blx     Function_4_21d99d4
	ldr     r1, [pc, #0x30] @ 0x21d1580, (=0x221a400)
	add     r2, r4, #0x4
	ldr     r1, [r1, #0x0]
	blx     Function_21e4c28
	cmp     r0, #0x0
	bne     branch_21d1566
	ldr     r1, [pc, #0x24] @ 0x21d1580, (=0x221a400)
	mov     r0, #0x0
	ldr     r2, [r1, #0x0]
	ldr     r1, [pc, #0x20] @ 0x21d1584, (=0x1078)
	str     r0, [r2, r1]
	pop     {r4-


urn 0;
}
/*+
________________________________________________________________________

 Copyright:	(C) 1995-2022 dGB Beheer B.V.
 License:	https://dgbes.com/licensing
________________________________________________________________________

-*/

#include "sorting.h"

#include "arrayndalgo.h"
#include "file.h"
#include "filepath.h"
#include "sorting.h"
#include "statrand.h"
#include "statparallelcalc.h"
#include "testprog.h"
#include "timefun.h"
#include "threadwork.h"
#include "varlenarray.h"

#include <limits>

static bool secondpass_ = false;
static BufferString logfilenm_;

#define mTic() \
{ \
    if ( dotime ) \
	counter.start(); \
}
# define mTac() \
{\
    if ( dotime ) \
    { \
	elapsed = counter.elapsed(); \
	ostrm << "Drawn in: " << elapsed << "ms\n"; \
    } \
}

#define mTestValD( expval, res, useeps, msg ) \
{ \
    if ( dodiff ) \
    { \
	ostrm << msg << "; Absolute difference: " ; \
	ostrm << toStringPrecise(Math::Abs(expval-res)) << od_newline;\
	if ( !mIsZero(expval,1e-6f) ) \
	{ \
	    ostrm << msg << "; Relative difference: " ; \
	    ostrm << toStringPrecise(Math::Abs((expval-res)/expval)); \
	    ostrm << od_newline; \
	} \
    } \
    else \
    {  \
	const bool isok = mIsEqual(res,expval,useeps); \
	if ( isok ) \
	    ostrm << "[OK] " << msg << od_newline; \
	else \
	{ \
	    ostrm << msg << ": Expected: " << toStringPrecise(expval); \
	    ostrm << " - got: " << toStringPrecise(res) << od_newline; \
	    if ( !secondpass_ ) \
		return false; \
	} \
    } \
}
#define mTestValI( expval, res, useeps, msg ) \
{ \
    if ( dodiff ) \
    { \
	ostrm << msg << "; Absolute difference: " ; \
	ostrm << toStringPrecise(Math::Abs(expval-res)) << od_newline;\
    } \
    else \
    {  \
	const bool isok = mIsEqual(res,expval,useeps); \
	if ( isok ) \
	    ostrm << "[OK] " << msg << od_newline; \
	else \
	{ \
	    ostrm << msg << ": Expected: " << expval; \
	    ostrm << " - got: " << res << od_newline; \
	    if ( !secondpass_ ) \
		return false; \
	} \
    } \
}

//Check that all values are ascending
template <class T>
bool checkSorting( T* vals, int sz )
{
    for ( int idx=1; idx<sz; idx++ )
    {
	if ( vals[idx-1]>vals[idx] )
	{
	    return false;
	}
    }

    return true;
}

//Sort 1M values using quicksort, and make sure results are correct
static bool test_quicksort()
{
    const int sz = 1024*1024;
    mAllocVarLenArr( int, vals, sz );

    Stats::RandGen gen;
    for ( int idx=0; idx<sz; idx++ )
    {
	vals[idx] = gen.getInt();
    }

    quickSort( mVarLenArr(vals), sz );
    return checkSorting( mVarLenArr(vals), sz );
}

#define mNrTesters 100

//Since quicksort uses static seeds, it can be sensitive to
//parallel loads, hence this check

static bool testParallelQuickSort()
{
    TypeSet<Threads::Work> workload;


       this.ID = (int)row["id"];
            this.Name = row["name"].ToString();
        }

        private string name;

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        private int iD;

        public int ID
        {
            get { return iD; }
            set { iD = value; }
        }
    }
}


 == 'BAR'");
        settings.setParameters(new HashSet<>());
        settings.setId(UUID.randomUUID());
        settings.setDnList(Arrays.asList(principal.getUserDN().subjectDN()));

        CompositeQueryLogic c = new CompositeQueryLogic();
        // max.results.override is set to -1 when it is not passed in as it is an optional parameter
        logic1.setMaxResults(2); // it can return 4, so this will cap it at 3 (1 more than max)
        logic2.setMaxResults(1); // it cat return 4, so this will cap it at 2 (1 more than max)

        // setting up DNResultLimits for the composite query logic
        // c.setDnResultLimits(Map.of(principal.getUserDN().toString(), 3L));

        logic1.setDnResultLimits(Map.of(principal.getUserDN().subjectDN() + "foo", 2L));
        logic2.setDnResultLimits(Map.of(principal.getUserDN().subjectDN() + "bar", 3L));
        /**
         * RunningQuery.setupConnection()
         */
        c.setQueryLogics(logics);
        c.setCurrentUser(principal);
        c.initialize(null, settings, Collections.singleton(auths));
        c.setupQuery(null);
        TransformIterator iter = c.getTransformIterator(settings);

        /**
         * RunningQuery.next() - iterate over results coming from tablet server through the TransformIterator to turn them into the objects.
         */
        List<Object> results = new ArrayList<>();
        while (iter.hasNext()) {
            Object o = iter.next();
            if (null == o)
                break;
            Assert.assertTrue(o instanceof TestQueryResponse);
            results.add(o);
        }
        Assert.assertEquals(5, results.size());
        ResultsPage page = new ResultsPage(results, Status.COMPLETE);

        /**
         * QueryExecutorBean.next() - transform list of objects into JAXB response
         */
        TestQueryResponseList response = (TestQueryResponseList) c.getEnrichedTransformer((Query) settings).createResponse(page);
        Assert.assertEquals(5, response.getResponses().size());
        for (TestQueryResponse r : response.getResponses()) {
            Assert.assertNotNull(r);
        }

        c.close();

    }

    @Test
    public void testQueryLogicNoDataLogic1() throws Exception {
        Map<String,QueryLogic<?>> logics = new HashMap<>();
        TestQueryLogic logic1 = new TestQueryLogic();
        TestQueryLogic2 logic2 = new TestQueryLogic2();
        logics.put("TestQueryLogic", logic1);
        logics.put("TestQueryLogic2", logic2);

        logic2.getData().put(key1, value1);
        logic2.getData().put(key2, value2);
        logic2.getData().put(key3, value3);
        logic2.getData().put(key4, value4);
        logic2.getData().put(key5, value5);
        logic2.getData().put(key6, value6);
        logic2.getData().put(key7, value7);
        logic2.getData().put(key8, value8);

        QueryImpl settings = new QueryImpl();
        settings.setPagesize(100);
        settings.setQueryAuthorizations(auths.serialize());
        settings.setQuery("FOO == 'BAR'");
        settings.setParameters(new HashSet<>());
        settings.setId(UUID.randomUUID());

        CompositeQueryLogic c = new CompositeQueryLogic();
        // max.results.override is set to -1 when it is not passed in as it is an optional paramter
        logic2.setMaxResults(-1);
        logic1.setMaxResults(-1);
        /**
         * RunningQuery.setupConnection()
         */
        c.setQueryLogics(logics);
        c.setCurrentUser(principal);
        c.initialize(null, settings, Collections.singleton(auths));
        c.setupQuery(null);
        TransformIterator iter = c.getTransformIterator(settin


303, 50, 14,
			WS_VISIBLE | WS_TABSTOP, 0),
		CT_BUTTON(Id_CloseButton, ID_STR_CLOSE,
			453, 303, 50, 14,
			WS_VISIBLE | WS_TABSTOP | BS_DEFPUSHBUTTON, 0),
		CT_TAB(Id_Tab, 0,
			6, 6, 498, 293,
			WS_VISIBLE | WS_TABSTOP | TCS_FIXEDWIDTH, 0)  // Last for correct tab order.
	};

	CreateControls(s_Controls, _countof(s_Controls), m_Font, GetString);

	HWND item = GetControl(Id_Tab);
	m_TabSkins.Create(m_Window);
	m_TabLayouts.Create(m_Window);
	m_TabGameMode.Create(m_Window);
	m_TabSettings.Create(m_Window);

	TCITEM tci = { 0 };
	tci.mask = TCIF_TEXT;
	tci.pszText = GetString(ID_STR_SKINS);
	TabCtrl_InsertItem(item, 0, &tci);
	tci.pszText = GetString(ID_STR_THEMES);
	TabCtrl_InsertItem(item, 1, &tci);
	tci.pszText = GetString(ID_STR_GAMEMODE);
	TabCtrl_InsertItem(item, 2, &tci);
	tci.pszText = GetString(ID_STR_SETTINGS);
	TabCtrl_InsertItem(item, 3, &tci);

	HICON hIcon = GetIcon(IDI_RAINMETER, true);
	SendMessage(m_Window, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);  // Titlebar icon: 16x16
	SendMessage(m_Window, WM_SETICON, ICON_BIG, (LPARAM)hIcon);    // Taskbar icon:  32x32

	item = GetControl(Id_CloseButton);
	SendMessage(m_Window, WM_NEXTDLGCTL, (WPARAM)item, TRUE);

	item = m_TabSkins.GetControl(TabSkins::Id_FileLabel);
	SendMessage(item, WM_SETFONT, (WPARAM)m_FontBold, 0);

	// Use arrows instead of plus/minus in the tree for Vista+
	item = m_TabSkins.GetControl(TabSkins::Id_SkinsTreeView);
	SetWindowTheme(item, L"explorer", nullptr);

	if (c_WindowPlacement.length == 0)
	{
		c_WindowPlacement.length = sizeof(WINDOWPLACEMENT);
		GetWindowPlacement(m_Window, &c_WindowPlacement);
	}

	SetWindowPlacement(m_Window, &c_WindowPlacement);

	return FALSE;
}

INT_PTR DialogManage::OnCommand(WPARAM wParam, LPARAM lParam)
{
	switch (LOWORD(wParam))
	{
	case Id_RefreshAllButton:
		GetRainmeter().RefreshAll();
		break;

	case Id_EditSettingsButton:
		GetRainmeter().EditSettings();
		break;

	case Id_OpenLogButton:
		DialogAbout::Open();
		break;

	case Id_CloseButton:
		HandleMessage(WM_CLOSE, 0, 0);
		break;

	case Id_HelpButton:
		{
			std::wstring url = L"https://docs.rainmeter.net/manual/user-interface/manage#";

			Tab& tab = GetActiveTab();
			if (&tab == &m_TabSkins)
			{
				url += L"Skins";
			}
			else if (&tab == &m_TabLayouts)
			{
				url += L"Layouts";
			}
			else if (&tab == &m_TabGameMode)
			{
				url += L"GameMode";
			}
			else // if (&tab == &m_TabSettings)
			{
				url += L"Settings";
			}

			url += L"Tab";
			ShellExecute(m_Window, L"open


/* Optimized memrchr with sse2
   Copyright (C) 2011-2019 Free Software Foundation, Inc.
   Contributed by Intel Corporation.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, see
   <http://www.gnu.org/licenses/>.  */

#if IS_IN (libc)

# include <sysdep.h>

# define CFI_PUSH(REG)	\
	cfi_adjust_cfa_offset (4);	\
	cfi_rel_offset (REG, 0)

# define CFI_POP(REG)	\
	cfi_adjust_cfa_offset (-4);	\
	cfi_restore (REG)

# define PUSH(REG) pushl REG; CFI_PUSH (REG)
# define POP(REG) popl REG; CFI_POP (REG)

# define PARMS  4
# define STR1  PARMS
# define STR2  STR1+4
# define LEN   STR2+4

# define MEMCHR __memrchr_sse2_bsf

	.text
ENTRY (MEMCHR)
	mov	STR1(%esp), %ecx
	movd	STR2(%esp), %xmm1
	mov	LEN(%esp), %edx

	sub	$16, %edx
	jbe	L(length_less16)

	punpcklbw %xmm1, %xmm1
	add	%edx, %ecx
	punpcklbw %xmm1, %xmm1

	movdqu	(%ecx), %xmm0
	pshufd	$0, %xmm1, %xmm1
	pcmpeqb	%xmm1, %xmm0

/* Check if there is a match.  */
	pmovmskb %xmm0, %eax
	test	%eax, %eax
	jnz	L(matches0)

	sub	$64, %ecx
	mov	%ecx, %eax
	and	$15, %eax
	jz	L(loop_prolog)

	add	$16, %ecx
	add	$16, %edx
	sub	%eax, %ecx
	sub	%eax, %edx

	.p2align 4
/* Loop start on aligned string.  */
L(loop_prolog):
	sub	$64, %edx
	jbe	L(exit_loop)

	movdqa	48(%ecx), %xmm0
	pcmpeqb	%xmm1, %xmm0
	pmovmskb %xmm0, %eax
	test	%eax, %eax
	jnz	L(matches48)

	movdqa	32(%ecx), %xmm2
	pcmpeqb	%xmm1, %xmm2
	pmovmskb %xmm2, %eax
	test	%ea


ong("otak", -1, 61),
    new Among("utak", -1, 62),
    new Among("a\u010Dak", -1, 54),
    new Among("u\u0161ak", -1, 56),
    new Among("izam", -1, 87),
    new Among("tican", -1, 65),
    new Among("cajan", -1, 7),
    new Among("\u010Dajan", -1, 6),
    new Among("voljan", -1, 77),
    new Among("eskan", -1, 63),
    new Among("alan", -1, 40),
    new Among("bilan", -1, 33),
    new Among("gilan", -1, 37),
    new Among("nilan", -1, 39),
    new Among("rilan", -1, 38),
    new Among("silan", -1, 36),
    new Among("tilan", -1, 34),
    new Among("avilan", -1, 35),
    new Among("laran", -1, 9),
    new Among("eran", -1, 8),
    new Among("asan", -1, 91),
    new Among("esan", -1, 10),
    new Among("dusan", -1, 31),
    new Among("kusan", -1, 28),
    new Among("atan", -1, 47),
    new Among("pletan", -1, 50),
    new Among("tetan", -1, 49),
    new Among("antan", -1, 32),
    new Among("pravan", -1, 44),
    new Among("stavan", -1, 43),
    new Among("sivan", -1, 46),
    new Among("tivan", -1, 45),
    new Among("ozan", -1, 41),
    new Among("ti\u010Dan", -1, 64),
    new Among("a\u0161an", -1, 90),
    new Among("du\u0161an", -1, 30),
    new Among("metar", -1, 68),
    new Among("centar", -1, 69),
    new Among("istar", -1, 70),
    new Among("ekat", -1, 86),
    new Among("enat", -1, 48),
    new Among("oscu", -1, 72),
    new Among("o\u0161\u0107u", -1, 71)
};

private final static Among a_2[] = {
    new Among("aca", -1, 124),
    new Among("eca", -1, 125),
    new Among("uca", -1, 126),
    new Among("ga", -1, 20),
    new Among("acega", 3, 124),
    new Among("ecega", 3, 125),
    new Among("ucega", 3, 126),
    new Among("anjijega", 3, 84),
    new Among("enjijega", 3, 85),
    new Among("snjijega", 3, 122),
    new Among("\u0161njijega", 3, 86),
    new Among("kijega", 3, 95),
    new Among("skijega", 11, 1),
    new Among("\u0161kijega", 11, 2),
    new Among("elijega", 3, 83),
    new Among("nijega", 3, 13),
    new Among("osijega", 3, 123),
    new Among("atijega", 3, 120),
    new Among("evitijega", 3, 92),
    new Among("ovitijega", 3, 93),
    new Among("astijega", 3, 94),
    new Among("avijega", 3, 77),
    new Among("evijega", 3, 78),
    new Among("ivijega", 3, 79),
    new Among("ovijega", 3, 80),
    new Among("o\u0161ijega", 3, 91),
    new Among("anjega", 3, 84),
    new Among("enjega", 3, 85),
    new Among("snjega", 3, 122),
    new Among("\u0161njega",


--------------===//

#include "PPCRegisterInfo.h"
#include "PPCFrameLowering.h"
#include "PPCInstrBuilder.h"
#include "PPCMachineFunctionInfo.h"
#include "PPCSubtarget.h"
#include "PPCTargetMachine.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/RegisterScavenging.h"
#include "llvm/CodeGen/TargetFrameLowering.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
#include <cstdlib>

using namespace llvm;

#define DEBUG_TYPE "reginfo"

#define GET_REGINFO_TARGET_DESC
#include "PPCGenRegisterInfo.inc"

STATISTIC(InflateGPRC, "Number of gprc inputs for getLargestLegalClass");
STATISTIC(InflateGP8RC, "Number of g8rc inputs for getLargestLegalClass");

static cl::opt<bool>
EnableBasePointer("ppc-use-base-pointer", cl::Hidden, cl::init(true),
         cl::desc("Enable use of a base pointer for complex stack frames"));

static cl::opt<bool>
AlwaysBasePointer("ppc-always-use-base-pointer", cl::Hidden, cl::init(false),
         cl::desc("Force the use of a base pointer in every function"));

static cl::opt<bool>
EnableGPRToVecSpills("ppc-enable-gpr-to-vsr-spills", cl::Hidden, cl::init(false),
         cl::desc("Enable spills from gpr to vsr rather than stack"));

static cl::opt<bool>
StackPtrConst("ppc-stack-ptr-caller-preserved",
                cl::desc("Consider R1 caller preserved so stack saves of "
                         "caller preserved registers can be LICM candidates"),
                cl::init(true), cl::Hidden);

static cl::opt<unsigned>
MaxCRBitSpillDist("ppc-max-crbit-spill-dist",
                  cl::desc("Maximum search distance for definition of CR bit "
                           "spill on ppc"),
                  cl::Hidden, cl::init(100));

static unsigned offsetMinAlignForOpcode(unsigned OpC);

PPCRegisterInfo::PPCRegisterInfo(const PPCTargetMachine &TM)
  : PPCGenRegisterInfo(TM.isPPC64() ? PPC::LR8 : PPC::LR,
                       TM.isPPC64() ? 0 : 1,
                       TM.isPPC64() ? 0 : 1),
    TM(TM) {
  ImmToIdxMap[PPC::LD]   = PPC::LDX;    ImmToIdxMap[PPC::STD]  = PPC::STDX;
  ImmToIdxMap[PPC::LBZ]  = PPC::LBZX;   ImmToIdxMap[PPC::STB]  = PPC::STBX;
  ImmToIdxMap[PPC::LHZ]  = PPC::LHZX;   ImmToIdxMap[PPC::LHA]  = PPC::LHAX;
  ImmToIdxMap[PPC::LWZ]  = PPC::LWZX;   ImmToIdxMap[PPC::LWA]  = PPC::LWAX;
  ImmToIdxMap[PPC::LFS]  = PPC::LFSX;   ImmToIdxMap[PPC::LFD]  = PPC::LFDX;
  ImmToIdxMap[PPC::STH]  = PPC::STHX;   ImmToIdxMap[PPC::STW]  = PPC::STWX;
  ImmToIdxMap[PPC::STFS


CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

----------------------------------------------------------------------
*/
#ifndef ASSIMP_BUILD_NO_EXPORT
#ifndef ASSIMP_BUILD_NO_3MF_EXPORTER

#include "D3MFExporter.h"

#include <assimp/scene.h>
#include <assimp/IOSystem.hpp>
#include <assimp/IOStream.hpp>
#include <assimp/Exporter.hpp>
#include <assimp/DefaultLogger.hpp>
#include <assimp/StringUtils.h>
#include <assimp/Exceptional.h>

#include "3MFXmlTags.h"
#include "D3MFOpcPackage.h"

#ifdef ASSIMP_USE_HUNTER
#  include <zip/zip.h>
#else
#  include <contrib/zip/src/zip.h>
#endif

namespace Assimp {

void ExportScene3MF( const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* /*pProperties*/ ) {
    if ( nullptr == pIOSystem ) {
        throw DeadlyExportError( "Could not export 3MP archive: " + std::string( pFile ) );
    }
    D3MF::D3MFExporter myExporter( pFile, pScene );
    if ( myExporter.validate() ) {
        if ( pIOSystem->Exists( pFile ) ) {
            if ( !pIOSystem->DeleteFile( pFile ) ) {
                throw DeadlyExportError( "File exists, cannot override : " + std::string( pFile ) );
            }
        }
        bool ok = myExporter.exportArchive(pFile);
        if ( !ok ) {
            throw DeadlyExportError( "Could not export 3MP archive: " + std::string( pFile ) );
        }
    }
}

namespace D3MF {

D3MFExporter::D3MFExporter( const char* pFile, const aiScene* pScene )
: mArchiveName( pFile )
, m_zipArchive( nullptr )
, mScene( pScene )
, mModelOutput()
, mRelOutput()
, mContentOutput()
, mBuildItems()
, mRelations() {
    // empty
}

D3MFExporter::~D3MFExporter() {
    for ( size_t i = 0; i < mRelations.size(); ++i ) {
        delete mRelations[ i ];
    }
    mRelations.clear();
}

bool D3MFExporter::validate() {
    if ( mArchiveName.empty() ) {
        return false;
    }

    if ( nullptr == mScene ) {
        return false;
    }

    return true;
}

bool D3MFExporter::exportArchive( const char *file ) {
    bool ok( true );

    m_zipArchive = zip_open( file, ZIP_DEFAULT_COMPRESSION_LEVEL, 'w' );
    if ( nullptr == m_zipArchive ) {
        return false;
    }

    ok |= exportContentTypes();
    ok |= export3DModel();
    ok |= exportRelations();

    zip_close( m_zipArchive );
    m_zipArchive = nullptr;

    return ok;
}

bool D3MFExporter::exportContentTypes() {
    mContentOutput.clear();

    mContentOutput << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
    mContentOutput << std::endl;
    mContentOutput << "<Types xmlns = \"http://schemas.openxmlformats.org/package/2006/content-types\">";
    mContentOutput << std::endl;
    mContentOutput << "<Default Extension = \"rels\" ContentType = \"application/vnd.openxmlformats-package.relationships+xml\" />";
    mContentOutput << std::endl;
    mContentOutput << "<Default Extension = \"model\" ContentType = \"application/vnd.ms-package.3dmanufacturing-3dmodel+xml\" />";
    mContentOutput << std::endl;
    mContentOutput << "</Types>";
    mContentOutput << std::endl;
    exportContentTyp( XmlTag::CONTENT_