 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
package ru.inforion.lab403.kopycat.modules.cortexm0

import ru.inforion.lab403.common.extensions.MHz
import ru.inforion.lab403.common.extensions.hex8
import ru.inforion.lab403.kopycat.cores.base.common.Module
import ru.inforion.lab403.kopycat.cores.base.common.ModuleBuses
import ru.inforion.lab403.kopycat.cores.base.common.ModulePorts
import ru.inforion.lab403.kopycat.modules.cores.ARMv6MCore
import ru.inforion.lab403.kopycat.interfaces.*

class CORTEXM0(parent: Module, name: String) : Module(parent, name) {

    inner class Buses : ModuleBuses(this) {
        val mem = Bus("mem")
        val exc = Bus("exc")
    }

    inner class Ports : ModulePorts(this) {
        val mem = Proxy("mem")
        val irq = Proxy("irq")
    }

    override val ports = Ports()
    override val buses = Buses()

    private val arm  = ARMv6MCore(this, "arm", 48.MHz, 0.9)
    private val nvic = NVIC(this, "nvic")
    private val stk  = STK(this, "stk")
    private val scb  = SCB(this, "scb")

    override fun reset() {
        super.reset()
        val sp = core.inl(0x0000_0000u)
        val pc = core.inl(0x0000_0004u)
        log.info { "Setup CORTEX-M0 core PC=0x${pc.hex8} MSP=0x${sp.hex8}" }
        arm.cpu.BXWritePC(pc, false)
        arm.cpu.regs.sp.value = sp
    }

    init {
        ports.mem.connect(buses.mem)

        arm.ports.mem.connect(buses.mem)
        nvic.ports.mem.connect(buses.mem, 0xE000_E100u)
        stk.ports.mem.connect(buses.mem, 0xE000_E010u)
        scb.ports.mem.connect(buses.mem, 0xE000_ED00u)

        buses.connect(nvic.ports.irq, ports.irq)

        nvic.ports.exc.connect(buses.exc)
        scb.ports.irq.connect(buses.exc,  0u)
        stk.ports.irq.connect(buses.exc, 15u)
    }
}/*
 *
 * This file is part of Kopycat emulator software.
 *
 * Copyright (C) 2023 INFORION, LLC
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Non-free licenses may also be purchased from INFORION, LLC,
 * for users who do not want their programs protected by the GPL.
 * Contact us for details kopycat@inforion.ru
 *
 * 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., 51 Franklin Stree


::c_void,
                 buf: *mut raw::c_char, len: libc::socklen_t) -> *const raw::c_char;
}

/*
 * Parse IPv4 address list.
 */

named!(parse_spaces<nom::types::CompleteStr, ()>,
    do_parse!(many1!(one_of!(&" \t\n\r\x0c\x0b")) >> (()) )
);

named!(parse_opt_spaces<nom::types::CompleteStr, ()>,
    do_parse!(opt!(parse_spaces) >> (()))
);

named!(parse_ipv4_range<nom::types::CompleteStr, (String, Option<String>)>,
    do_parse!(addr1: many_till!(complete!(nom::anychar), alt!(do_parse!(eof!() >> (nom::types::CompleteStr(""))) | peek!(tag!("..")) | tag!(" ") )) >>
              parse_opt_spaces >>
              addr2: opt!(do_parse!(tag!("..") >>
                                    parse_opt_spaces >>
                                    addr2: many_till!(complete!(nom::anychar), alt!(do_parse!(eof!() >> (' ')) | char!(' ')) ) >>
                                    (addr2) )) >>
              parse_opt_spaces >>
              (addr1.0.into_iter().collect(), addr2.map(|x|x.0.into_iter().collect())) )
);

named!(parse_ipv4_address_list<nom::types::CompleteStr, Vec<(String, Option<String>)>>,
    do_parse!(parse_opt_spaces >>
              ranges: many0!(parse_ipv4_range) >>
              (ranges)));

pub fn parse_ip_list(ips: &String) -> ddlog_std::Either<String, ddlog_std::Vec<ddlog_std::tuple2<in_addr, ddlog_std::Option<in_addr>>>>
{
    match parse_ipv4_address_list(nom::types::CompleteStr(ips.as_str())) {
        Err(e) => {
            ddlog_std::Either::Left{l: format!("invalid IP list format: \"{}\"", ips.as_str())}
        },
        Ok((nom::types::CompleteStr(""), ranges)) => {
            let mut res = vec![];
            for (ip1, ip2) in ranges.iter() {
                let start = match ip_parse(&ip1) {
                    ddlog_std::Option::None => return ddlog_std::Either::Left{l: format!("invalid IP address: \"{}\"", *ip1)},
                    ddlog_std::Option::Some{x: ip} => ip
                };
                let end = match ip2 {
                    None => ddlog_std::Option::None,
                    Some(ip_str) => match ip_parse(&ip_str.clone()) {
                        ddlog_std::Option::None => return ddlog_std::Either::Left{l: format!("invalid IP address: \"{}\"", *ip_str)},
                        x => x
                    }
                };
                res.push(ddlog_std::tuple2(start, end));
            };
            ddlog_std::Either::Right{r: ddlog_std::Vec::from(res)}
        },
        Ok((suffix, _)) => {
            ddlog_std::Either::Left{l: format!("IP address list contains trailing characters: \"{}\"", suffix)}
        }
    }
}
<filename>src/main.rs
fn main() {
    let path = match std::env::args_os().nth(1) {
        Some(path) => path,
        None => {
            eprintln!("\x1b[91merror\x1b[0m: please specify an obj file");
            return;
        }
    };
    let obj = match obj::Obj::load(path) {
        Ok(obj) => obj,
        Err(e) => {
            eprintln!("\x1b[91merror\x1b[0m: {}", e);
            eprintln!("\x1b[97m note\x1b[0m: invalid obj file");
            return;
        }
    };
    let


/*
objectif : Fonction qui prend en entree une frequence issue du fichier VEMGSA
et la convertit en une frequence au format bds
ex : 135930 devient 135.930
freq : une frequence de transfert
*/
public conversionFreq(freq: string): string {
  console.log("Classe Frequences Fonction conversionFreq");

  let motifFreq = /(\d\d\d)(\d+)/;
  let frequence = freq.replace(motifFreq, "$1.$2");
  return frequence;
}

/*
this.GbdiToFreq(fichierGbdi);

var result = this.freqToSecteur(fichierDest,"134.260");
if (result !== null){
  console.log("secteur  : "+result[0]);
}
else {
  console.log("pas de secteur associe a cette frequence");
}
*/

}import Browser, { Tabs } from "webextension-polyfill";

export const checkFavIcon = (url: string): boolean => {
  return containsWords(url, ["favicon", "favicons"]);
};

export const checkMedia = (url: string): boolean => {
  return containsWords(url, [
    "blob",
    "mp4",
    "webm",
    "googlevideo",
    "data:image",
    "m3u8",
    "mp3",
    "stream",
  ]);
};

const containsWords = (str: string, words: string[]): boolean => {
  return new RegExp(words.join("|")).test(str);
};

export const getActiveTab = async (): Promise<Tabs.Tab> => {
  const tabs = await Browser.tabs.query({ active: true });
  return tabs[0];
};

export const getUrlFromActiveTab = async (): Promise<URL> => {
  const activeTab = await getActiveTab();
  return new URL(activeTab.url);
};
import { ChimeSdkWrapper } from "./ChimeProvider";
import { MeetingSessionVideoAvailability, MeetingSessionStatus, MeetingSessionStatusCode, AudioVideoFacade, AudioVideoObserver } from "amazon-chime-sdk-js";

export interface ObserverOptions {
  joinMuted: boolean;
  joinWithVideo: boolean;
  onEnded: () => void;
  reselectAudio: () => Promise<void>;
  reselectVideo: () => Promise<void>;
};

export function makeAVObserver(av: AudioVideoFacade, options: ObserverOptions): AudioVideoObserver {
  let shouldTryToStart = options.joinWithVideo;
  let started = false;
  let videoAvailable = false;

  const startVideoWhenReady = async () => {
    if (shouldTryToStart && !started && videoAvailable) {
      console.debug('Starting video.');
      await options.reselectVideo();
      av.startLocalVideoTile();
    }
  };

  return {
    audioVideoDidStop: (sessionStatus: MeetingSessionStatus): void => {
      if (sessionStatus.statusCode() === MeetingSessionStatusCode.AudioCallEnded) {
        options.onEnded();
      }
    },

    // This fires *before* audioVideoDidStart.
    videoAvailabilityDidChange: (availability: MeetingSessionVideoAvailability): void => {
      console.log('Video availability changed to', availability);
      videoAvailable = availability.canStartLocalVideo;
      startVideoWhenReady();
    },

    audioVideoDidStart: (): void => {
      console.log('AV did start.');
      started = true;
      startVideoWhenReady();

      options.reselectAudio().then(() => {
        if (options.joinMuted) {
          console.log('Automatically muting self on join.');
          av.realtimeMuteLocalAudio();
        } else {
          console.log('Automatically unmuting self on join.');
          av.realtimeUnmuteLocalAudio();
        }
      });
    },
  };
}

export function makeReselects(chime: ChimeSdkWrapper): {
  reselectVideo: () => Promise<void>,
  reselectAudio: () => Promise<void>
} {
  con


length;
			for (let y = 1; y < columns - 1; ++y) {
				for (let x = 1; x < rows - 1; ++x) {
					if (tileMap[y][x].id == waterTileNumber) {
						surroundingTiles = getSurroundingTiles(x, y);
						checkTileCombinations(x, y, surroundingTiles);
					}
				}
			}
		}

		let loopCount: number = 0;
		const repeatingChecks = function(){
			checkTiles();
			if (loopCount < 50) {
				repeat = true;
			}
			if (loopCount < 500 && repeat) {
				repeat = false;
				loopCount ++;
				repeatingChecks();
			}
		}
		repeatingChecks();

		const checkWaterTileCombinations = function (x: number, y: number, surroundingTiles: any){
			const N: boolean = surroundingTiles.N;
			const NE: boolean = surroundingTiles.NE;
			const E: boolean = surroundingTiles.E;
			const SE: boolean = surroundingTiles.SE;
			const S: boolean = surroundingTiles.S;
			const SW: boolean = surroundingTiles.SW;
			const W: boolean = surroundingTiles.W;
			const NW: boolean = surroundingTiles.NW;

			if (NE && SE) {
				tileMap[y][x] = Tiles[20];
			} else if (SE && SW) {
				tileMap[y][x] = Tiles[21];
			} else if (SW && NW) {
				tileMap[y][x] = Tiles[22];
			} else if (NW && NE) {
				tileMap[y][x] = Tiles[19];
			} else if (N && SE) {
				tileMap[y][x] = Tiles[23];
			} else if (N && SW) {
				tileMap[y][x] = Tiles[24];
			} else if (E && SW) {
				tileMap[y][x] = Tiles[25];
			} else if (E && NW) {
				tileMap[y][x] = Tiles[26];
			} else if (S && NE) {
				tileMap[y][x] = Tiles[27];
			} else if (S && NW) {
				tileMap[y][x] = Tiles[28];
			} else if (W && SE) {
				tileMap[y][x] = Tiles[29];
			} else if (W && NE) {
				tileMap[y][x] = Tiles[30];
			} else if (NE) {
				tileMap[y][x] = Tiles[12];
			} else if (SE) {
				tileMap[y][x] = Tiles[14];
			} else if (SW) {
				tileMap[y][x] = Tiles[16];
			} else if (NW) {
				tileMap[y][x] = Tiles[18];
			} else if (N) {
				tileMap[y][x] = Tiles[11];
			} else if (E) {
				tileMap[y][x] = Tiles[13];
			} else if (S) {
				tileMap[y][x] = Tiles[15];
			} else if (W) {
				tileMap[y][x] = Tiles[17];
			}
		}

		const getWaterTiles = function() {
			const columns: number = tileMap.length;
			const rows: number = tileMap[0].length;
			for (let y = 0; y < columns; ++y) {
				for (let x = 0; x < rows; ++x) {
					if (tileMap[y][x].id == waterTileNumber) {
						surroundingTiles = getSurroundingTiles(x, y);
						checkWaterTileCombinations(x, y, surroundingTiles);
					}
				}
			}
		}
		getWaterTiles();

		tileArray = [];
		for (let i = 0; i < tileMap.length; ++i) {
			for (let


sLeague(int type)
    {
      return type == 93;
    }

    public static bool isMoney(int type)
    {
      return type == 1;
    }

    public static bool isOffer(int type)
    {
      return (uint) (type - 11) <= 4U;
    }

    public static bool isGiftToken(int type)
    {
      return type == 3;
    }
    public static bool isMedal(int type)
    {
      return type == 4;
    }
    public static bool isPetScrore(int type)
    {
      return type == 92;
    }

    public static bool isSearchGoods(int type)
    {
      return type == 99;
    }

    public static bool isWorldBoss(int type)
    {
      return type == 91;
    }
  }
}


code = (FieldDisplayBarcode)doc.getRange().getFields().get(1);

        TestUtil.verifyField(FieldType.FIELD_DISPLAY_BARCODE,
            "DISPLAYBARCODE \"DEF456\" QR \\q 3 \\s 250 \\h 1000 \\r 0 \\b 0xF8BD69 \\f 0xB5413B", "", barcode);
        Assert.assertEquals("DEF456", barcode.getBarcodeValue());
        Assert.assertEquals("QR", barcode.getBarcodeType());
    }

    @Test
    public void fieldMergeBarcode_EAN13() throws Exception
    {
        //ExStart
        //ExFor:FieldMergeBarcode
        //ExFor:FieldMergeBarcode.BarcodeType
        //ExFor:FieldMergeBarcode.BarcodeValue
        //ExFor:FieldMergeBarcode.DisplayText
        //ExFor:FieldMergeBarcode.FixCheckDigit
        //ExFor:FieldMergeBarcode.PosCodeStyle
        //ExSummary:Shows how to perform a mail merge on EAN13 barcodes.
        Document doc = new Document();
        DocumentBuilder builder = new DocumentBuilder(doc);

        // Insert a MERGEBARCODE field, which will accept values from a data source during a mail merge.
        // This field will convert all values in a merge data source's "MyEAN13Barcode" column into EAN13 barcodes.
        FieldMergeBarcode field = (FieldMergeBarcode)builder.insertField(FieldType.FIELD_MERGE_BARCODE, true);
        field.setBarcodeType("EAN13");
        field.setBarcodeValue("MyEAN13Barcode");

        // Display the numeric value of the barcode underneath the bars.
        field.setDisplayText(true);
        field.setPosCodeStyle("CASE");
        field.setFixCheckDigit(true);

        Assert.assertEquals(FieldType.FIELD_MERGE_BARCODE, field.getType());
        Assert.assertEquals(" MERGEBARCODE  MyEAN13Barcode EAN13 \\t \\p CASE \\x", field.getFieldCode());
        builder.writeln();

        // Create a DataTable with a column with the same name as our MERGEBARCODE field's BarcodeValue.
        // The mail merge will create a new page for each row. Each page will contain a DISPLAYBARCODE field,
        // which will display an EAN13 barcode with the value from the merged row.
        DataTable table = new DataTable("Barcodes");
        table.getColumns().add("MyEAN13Barcode");
        table.getRows().add(new String[] { "501234567890" });
        table.getRows().add(new String[] { "123456789012" });

        doc.getMailMerge().execute(table);

        Assert.assertEquals(FieldType.FIELD_DISPLAY_BARCODE, doc.getRange().getFields().get(0).getType());
        Assert.assertEquals("DISPLAYBARCODE \"501234567890\" EAN13 \\t \\p CASE \\x", doc.getRange().getFields().get(0).getFieldCode());
        Assert.assertEquals(FieldType.FIELD_DISPLAY_BARCODE, doc.getRange().getFields().get(1).getType());
        Assert.assertEquals("DISPLAYBARCODE \"123456789012\" EAN13 \\t \\p CASE \\x", doc.getRange().getFields().get(1).getFieldCode());

        doc.save(getArtifactsDir() + "Field.MERGEBARCODE.EAN13.docx");
        //ExEnd

        doc = new Document(getArtifactsDir() + "Field.MERGEBARCODE.EAN13.docx");

        Assert.That(doc.getRange().getFields().Count(f => f.Type == FieldType.FieldMergeBarcode), assertEquals(0, );

        FieldDisplayBarcode barcode = (FieldDisplayBarcode)doc.getRange().getFields().get(0);

        TestUtil.verifyField(FieldType.FIELD_DISPLAY_BARCODE, "DISPLAYBARCODE \"501234567890\" EAN13 \\t \\p CASE \\x", "", barcode);
        Assert.assertEquals("501234567890", barcode.getBarcodeValue());
        Assert.


"""This file contains code used in "Think DSP",
by Allen B. Downey, available from greenteapress.com

Copyright 2014 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""

from __future__ import print_function, division

import thinkdsp
import thinkplot

FORMATS = ['pdf', 'eps']

def plot_tuning(start=7.0, duration=0.006835):
    """Plots three cycles of a bell playing A4.

    start: start time in seconds
    duration: float
    """
    period = duration/3
    freq = 1/period
    print(period, freq)
    assert abs(freq - 438.917337235) < 1e-7

    wave = thinkdsp.read_wave('18871__zippi1__sound-bell-440hz.wav')

    segment = wave.segment(start, duration)
    segment.normalize()

    thinkplot.preplot(1)
    segment.plot()
    thinkplot.Save(root='sounds1',
                   xlabel='Time (s)',
                   axis=[start, start+duration, -1.05, 1.05],
                   formats=FORMATS,
                   legend=False)

def plot_violin(start=1.30245, duration=0.00683):
    """Plots three cycles of a violin playing A4.

    duration: float
    """
    period = duration/3
    freq = 1/period
    print(period, freq)
    assert abs(freq - 439.238653001) < 1e-7

    wave = thinkdsp.read_wave('92002__jcveliz__violin-origional.wav')

    segment = wave.segment(start, duration)
    segment.normalize()

    thinkplot.preplot(1)
    segment.plot()
    thinkplot.Save(root='sounds2',
                   xlabel='Time (s)',
                   axis=[start, start+duration, -1.05, 1.05],
                   formats=FORMATS,
                   legend=False)

def segment_violin(start=1.2, duration=0.6):
    """Load a violin recording and plot its spectrum.

    start: start time of the segment in seconds
    duration: in seconds
    """
    wave = thinkdsp.read_wave('92002__jcveliz__violin-origional.wav')

    # extract a segment
    segment = wave.segment(start, duration)
    segment.normalize()

    # plot the spectrum
    spectrum = segment.make_spectrum()

    thinkplot.preplot(1)
    spectrum.plot(high=10000)
    thinkplot.Save(root='sounds3',
                   xlabel='Frequency (Hz)',
                   ylabel='Amplitude',
                   formats=FORMATS,
                   legend=False)

    # print the top 5 peaks
    peaks = spectrum.peaks()
    for amp, freq in peaks[:10]:
        print(freq, amp)
    assert abs(peaks[0][0] - 3762.382899) < 1e-7

def mix_cosines():
    """Plots three periods of a mix of cosines.
    """

    # create a SumSignal
    cos_sig = thinkdsp.CosSignal(freq=440, amp=1.0, offset=0)
    sin_sig = thinkdsp.SinSignal(freq=880, amp=0.5, offset=0)

    mix = sin_sig + cos_sig

    # create a wave
    wave = mix.make_wave(duration=1.0, start=0, framerate=11025)
    print('Number of samples', len(wave))
    print('Timestep in ms', 1000 / wave.framerate)
    assert len(wave) == wave.framerate

    # select a segment
    period = mix.period
    segment = wave.segment(start=0, duration=period*3)

    # plot the segment
    thinkplot.preplot(1)
    segment.plot()
    thinkplot.Save(root='sounds4',
                   xlabel='Time (s)',
                   axis=[0, period*3, -1.55, 1.55],
                   formats=FORMATS,
                   legend=False)

def main():
    plot_tuning()
    plot_violin()
    segment_violin()
    mix_cosines()

if __name__ == '__main__':
    main()


Private *si = (SoundIoPrivate *)soundio;
    return si->outstream_open(si, os);
}

void soundio_outstream_destroy(SoundIoOutStream *outstream) {
    if (!outstream)
        return;

    SoundIoOutStreamPrivate *os = (SoundIoOutStreamPrivate *)outstream;
    SoundIo *soundio = outstream->device->soundio;
    SoundIoPrivate *si = (SoundIoPrivate *)soundio;

    if (si->outstream_destroy)
        si->outstream_destroy(si, os);

    soundio_device_unref(outstream->device);
    free(os);
}

int soundio_outstream_start(struct SoundIoOutStream *outstream) {
    SoundIo *soundio = outstream->device->soundio;
    SoundIoPrivate *si = (SoundIoPrivate *)soundio;
    SoundIoOutStreamPrivate *os = (SoundIoOutStreamPrivate *)outstream;
    return si->outstream_start(si, os);
}

int soundio_outstream_pause(struct SoundIoOutStream *outstream, bool pause) {
    SoundIo *soundio = outstream->device->soundio;
    SoundIoPrivate *si = (SoundIoPrivate *)soundio;
    SoundIoOutStreamPrivate *os = (SoundIoOutStreamPrivate *)outstream;
    return si->outstream_pause(si, os, pause);
}

int soundio_outstream_clear_buffer(struct SoundIoOutStream *outstream) {
    SoundIo *soundio = outstream->device->soundio;
    SoundIoPrivate *si = (SoundIoPrivate *)soundio;
    SoundIoOutStreamPrivate *os = (SoundIoOutStreamPrivate *)outstream;
    return si->outstream_clear_buffer(si, os);
}

int soundio_outstream_get_latency(struct SoundIoOutStream *outstream, double *out_latency) {
    SoundIo *soundio = outstream->device->soundio;
    SoundIoPrivate *si = (SoundIoPrivate *)soundio;
    SoundIoOutStreamPrivate *os = (SoundIoOutStreamPrivate *)outstream;
    return si->outstream_get_latency(si, os, out_latency);
}

static void default_instream_error_callback(struct SoundIoInStream *is, int err) {
    soundio_panic("libsoundio: %s", soundio_strerror(err));
}

static void default_overflow_callback(struct SoundIoInStream *instream) { }

struct SoundIoInStream *soundio_instream_create(struct SoundIoDevice *device) {
    SoundIoInStreamPrivate *is = allocate<SoundIoInStreamPrivate>(1);
    SoundIoInStream *instream = &is->pub;

    if (!is)
        return nullptr;
    if (!device)
        return nullptr;

    instream->device = device;
    soundio_device_ref(device);

    instream->error_callback = default_instream_error_callback;
    instream->overflow_callback = default_overflow_callback;

    return instream;
}

int soundio_instream_open(struct SoundIoInStream *instream) {
    SoundIoDevice *device = instream->device;
    if (device->aim != SoundIoDeviceAimInput)
        return SoundIoErrorInvalid;

    if (instream->format <= SoundIoFormatInvalid)
        return SoundIoErrorInvalid;

    if (instream->layout.channel_count > SOUNDIO_MAX_CHANNELS)
        return SoundIoErrorInvalid;

    if (device->probe_error)
        return device->probe_error;

    if (instream->format == SoundIoFormatInvalid) {
        instream->format = soundio_device_supports_format(device, SoundIoFormatFloat32NE) ?
            SoundIoFormatFloat32NE : device->formats[0];
    }

    if (!instream->layout.channel_count) {
        const SoundIoChannelLayout *stereo = soundio_cha


e filter
        bottom_right = (top_left[0] + shrek_width, top_left[1] + shrek_height)

        # Resize the Shrek filter to match the size of the face ROI
        resized_shrek_mask = cv2.resize(shrek_mask, (bottom_right[0] - top_left[0], bottom_right[1] - top_left[1]))

        # Extract the region of interest from the frame
        face_roi = frame[top_left[1]:bottom_right[1], top_left[0]:bottom_right[0]]

        # Apply a mask to the Shrek filter
        if shrek_mask.shape[2] == 4:  # Check if image has an alpha channel
            mask = resized_shrek_mask[:, :, 3] / 255.0
            mask_inv = 1.0 - mask
            resized_shrek_mask = resized_shrek_mask[:, :, :3]  # Remove alpha channel
        else:
            mask = resized_shrek_mask[:, :, 0] / 255.0
            mask_inv = 1.0 - mask

        # Apply the mask to the region of interest
        for c in range(0, 3):
            face_roi[:, :, c] = (
                mask * resized_shrek_mask[:, :, c] + mask_inv * face_roi[:, :, c]
            )

        # Update the frame with the modified region of interest
        frame[top_left[1]:bottom_right[1], top_left[0]:bottom_right[0]] = face_roi

    cv2.imshow("Frame", frame)

    # Breaking the loop if 'ESC' is pressed
    if cv2.waitKey(1) == 27:
        break

# Releasing the VideoCapture Object and closing the windows.
camera_video.release()
cv2.destroyAllWindows()


.io/name":       "myapp",
						"app.kubernetes.io/version":    "v1",
						"app.kubernetes.io/instance":   "myapp-web",
						"tsuru.io/app-name":            "myapp",
						"tsuru.io/app-platform":        "python",
						"tsuru.io/app-team":            "",
						"tsuru.io/app-pool":            "test-default",
						"tsuru.io/app-process":         "web",
						"tsuru.io/app-version":         "1",
						"tsuru.io/is-build":            "false",
						"tsuru.io/is-service":          "true",
						"tsuru.io/is-stopped":          "false",
						"tsuru.io/is-tsuru":            "true",
						"version":                      "v1",
					},
				},
				Spec: vpav1.VerticalPodAutoscalerSpec{
					TargetRef: &autoscalingv1.CrossVersionObjectReference{
						APIVersion: appsv1.SchemeGroupVersion.String(),
						Kind:       "Deployment",
						Name:       "myapp-web",
					},
					UpdatePolicy: &vpav1.PodUpdatePolicy{
						UpdateMode: &vpaUpdateOff,
					},
				},
			},
		},
	}

	for _, tt := range tests {
		c.Log(tt.name)
		if tt.scenario != nil {
			tt.scenario()
		}
		err := ensureVPAIfEnabled(context.TODO(), s.clusterClient, a, "web")
		require.NoError(s.t, err)
		ns, err := s.client.AppNamespace(context.TODO(), a)
		require.NoError(s.t, err)
		vpa, err := s.client.VPAClientset.AutoscalingV1().VerticalPodAutoscalers(ns).Get(context.TODO(), "myapp-web", metav1.GetOptions{})
		if tt.expectedVPA == nil {
			require.True(s.t, k8sErrors.IsNotFound(err))
		} else {
			require.EqualValues(s.t, tt.expectedVPA, vpa)
		}
	}
}

func (s *S) TestGetVerticalAutoScaleRecommendations(c *check.C) {
	a, _, rollback := s.mock.DefaultReactions(c)
	defer rollback()
	ns, err := s.client.AppNamespace(context.TODO(), a)
	require.NoError(s.t, err)

	rec, err := s.p.GetVerticalAutoScaleRecommendations(context.TODO(), a)
	require.NoError(s.t, err)
	require.Nil(s.t, rec)

	vpa := &vpav1.VerticalPodAutoscaler{
		ObjectMeta: metav1.ObjectMeta{
			Name:      "myapp-web",
			Namespace: "default",
			Labels: map[string]string{
				"tsuru.io/is-tsuru":    "true",
				"tsuru.io/app-name":    "myapp",
				"tsuru.io/app-process": "web",
			},
		},
		Status: vpav1.VerticalPodAutoscalerStatus{
			Recommendation: &vpav1.RecommendedPodResources{
				ContainerRecommendations: []vpav1.RecommendedContainerResources{
					{
						ContainerName: "myapp-web",
						Target: corev1.ResourceList{
							corev1.ResourceCPU:    resource.MustParse("100m"),
							corev1.ResourceMemory: resource.MustParse("99Mi"),
						},
						UncappedTarget: corev1.ResourceList{
							corev1.ResourceCPU:    resource.MustParse("101m"),
							corev1.ResourceMemory: resource.MustParse("98Mi"),
						},
						LowerBound: corev1.Resource


ompiler.hotspot.replacements.CRC32CSubstitutions.UPDATE_BYTES_CRC32C;
import static org.graalvm.compiler.hotspot.replacements.CRC32Substitutions.UPDATE_BYTES_CRC32;
import static jdk.internal.vm.compiler.word.LocationIdentity.any;

import org.graalvm.compiler.core.common.LIRKind;
import org.graalvm.compiler.hotspot.GraalHotSpotVMConfig;
import org.graalvm.compiler.hotspot.HotSpotForeignCallLinkageImpl;
import org.graalvm.compiler.hotspot.HotSpotGraalRuntimeProvider;
import org.graalvm.compiler.hotspot.meta.HotSpotHostForeignCallsProvider;
import org.graalvm.compiler.hotspot.meta.HotSpotProviders;
import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.word.WordTypes;

import jdk.vm.ci.code.CallingConvention;
import jdk.vm.ci.code.CodeCacheProvider;
import jdk.vm.ci.code.RegisterValue;
import jdk.vm.ci.code.TargetDescription;
import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime;
import jdk.vm.ci.meta.JavaKind;
import jdk.vm.ci.meta.MetaAccessProvider;
import jdk.vm.ci.meta.PlatformKind;
import jdk.vm.ci.meta.Value;

public class SPARCHotSpotForeignCallsProvider extends HotSpotHostForeignCallsProvider {

    private final Value[] nativeABICallerSaveRegisters;

    public SPARCHotSpotForeignCallsProvider(HotSpotJVMCIRuntime jvmciRuntime, HotSpotGraalRuntimeProvider runtime, MetaAccessProvider metaAccess, CodeCacheProvider codeCache,
                    WordTypes wordTypes, Value[] nativeABICallerSaveRegisters) {
        super(jvmciRuntime, runtime, metaAccess, codeCache, wordTypes);
        this.nativeABICallerSaveRegisters = nativeABICallerSaveRegisters;
    }

    @Override
    public void initialize(HotSpotProviders providers, OptionValues options) {
        GraalHotSpotVMConfig config = runtime.getVMConfig();
        TargetDescription target = providers.getCodeCache().getTarget();
        PlatformKind word = target.arch.getWordKind();

        // The calling convention for the exception handler stub is (only?) defined in
        // TemplateInterpreterGenerator::generate_throw_exception()
        // in templateInterpreter_sparc.cpp around line 1925
        RegisterValue outgoingException = o0.asValue(LIRKind.fromJavaKind(target.arch, JavaKind.Object));
        RegisterValue outgoingExceptionPc = o1.asValue(LIRKind.value(word));
        RegisterValue incomingException = i0.asValue(LIRKind.fromJavaKind(target.arch, JavaKind.Object));
        RegisterValue incomingExceptionPc = i1.asValue(LIRKind.value(word));
        CallingConvention outgoingExceptionCc = new CallingConvention(0, ILLEGAL, outgoingException, outgoingExceptionPc);
        CallingConvention incomingExceptionCc = new CallingConvention(0, ILLEGAL, incomingException, incomingExceptionPc);
        register(new HotSpotForeignCallLinkageImpl(EXCEPTION_HANDLER, 0L, PRESERVES_REGISTERS, LEAF_NOFP, outgoingExceptionCc, incomingExceptionCc, NOT_REEXECUTABLE, any()));
        register(new HotSpotForeignCallLinkageImpl(EXCEPTION_HANDLER_IN_CALLER, JUMP_ADDRESS, PRESERVES_REGISTERS, LEAF_NOFP, outgoingExceptionCc, incomingExceptionCc, NOT_REEXECUTABLE, any()));

        if (config.useCRC32Intrinsics) {
            // This stub does callee saving
            registerForeignCall(UPDATE_BYTES_CRC32, config.updateBytesCRC32Stub, NativeCall, PRESERVES_REGISTERS, LEAF_NOFP, NOT_REEXECUTABLE, any());
        }
        if (config.useCRC32CIntrinsics) {
            registerForeignCall(UPDATE_BYTES_CRC32C, config.updateBytesCRC32C, NativeCall, PRESERVES_REGISTERS, LEAF_NOFP, NOT_REEXEC


  padding-right: 1.25rem;
}
.px-8 {
  padding-left: 2rem;
  padding-right: 2rem;
}
.py-0\.5 {
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
}
.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}
.py-1\.5 {
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}
.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}
.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.pb-2 {
  padding-bottom: 0.5rem;
}
.pb-3 {
  padding-bottom: 0.75rem;
}
.pb-4 {
  padding-bottom: 1rem;
}
.pb-6 {
  padding-bottom: 1.5rem;
}
.pl-10 {
  padding-left: 2.5rem;
}
.pl-2\.5 {
  padding-left: 0.625rem;
}
.pl-3 {
  padding-left: 0.75rem;
}
.pl-4 {
  padding-left: 1rem;
}
.pl-8 {
  padding-left: 2rem;
}
.pr-2 {
  padding-right: 0.5rem;
}
.pr-2\.5 {
  padding-right: 0.625rem;
}
.pr-8 {
  padding-right: 2rem;
}
.pt-0 {
  padding-top: 0px;
}
.pt-1 {
  padding-top: 0.25rem;
}
.pt-16 {
  padding-top: 4rem;
}
.pt-2 {
  padding-top: 0.5rem;
}
.pt-3 {
  padding-top: 0.75rem;
}
.pt-4 {
  padding-top: 1rem;
}
.text-left {
  text-align: left;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.align-middle {
  vertical-align: middle;
}
.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}
.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}
.text-\[0\.8rem\] {
  font-size: 0.8rem;
}
.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}
.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}
.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}
.font-bold {
  font-weight: 700;
}
.font-medium {
  font-weight: 500;
}
.font-normal {
  font-weight: 400;
}
.font-semibold {
  font-weight: 600;
}
.capitalize {
  text-transform: capitalize;
}
.tabular-nums {
  --tw-numeric-spacing: tabular-nums;
  font-variant-numeric: var(--tw-o


eBuf.readNBTCompound(): CompoundBinaryTag {
    return this.readNBT() as CompoundBinaryTag
}

fun ByteBuf.writeNBT(nbt: BinaryTag) {
    this.writeNBT(nbt as CompoundBinaryTag)
}

fun ByteBuf.writeNBT(nbt: CompoundBinaryTag) {

    val outputStream = ByteArrayOutputStream()
    try {
        BinaryTagIO.writer().writeNameless(nbt, outputStream, BinaryTagIO.Compression.NONE)
    } finally {
        this.writeBytes(outputStream.toByteArray())
    }
}

fun ByteBuf.readFixedBitSet(i: Int): BitSet {
    val bs = ByteArray(positiveCeilDiv(i, 8))
    this.readBytes(bs)
    return BitSet.valueOf(bs)
}

fun ByteBuf.readInstant(): kotlinx.datetime.Instant = kotlinx.datetime.Instant.fromEpochMilliseconds(this.readLong())

fun ByteBuf.writeVarLong(long: Long): ByteBuf {
    var modLong = long
    while (true) {
        if (modLong and -0x80L == 0L) {
            this.writeByte(modLong.toInt())
            break
        }
        this.writeByte((modLong and 0x7FL).toInt() or 0x80)
        modLong = modLong ushr 7
    }
    return this
}

fun ByteBuf.readVarLong(): Long {
    var result = 0L
    for (shift in 0 until 56 step 7) {
        val b = this.readByte()
        result = result or ((b.toLong() and 0x7F) shl shift)
        if (b >= 0) return result
    }
    return result or ((this.readByte().toLong() and 0xFF) shl 56)
}

fun hasContinuationBit(byte: Byte): Boolean = byte.toInt() and 0x80 == 128

inline fun <reified T : Enum<T>> ByteBuf.readEnum(): T = T::class.java.enumConstants[readVarInt()]
fun <T : Enum<T>> ByteBuf.readEnumClass(kClass: KClass<out T>): T = kClass.java.enumConstants[readVarInt()]
inline fun <reified T : Enum<T>> ByteBuf.readByteEnum(): T = T::class.java.enumConstants[readByte().toInt()]

inline fun <reified T : Enum<T>> ByteBuf.writeEnum(value: T) {
    this.writeVarInt(value.ordinal)
}

fun <T : Enum<T>> ByteBuf.writeByteEnum(value: T) {
    this.writeByte(value.ordinal)
}

fun ByteBuf.readVarInt(): Int {
    val readable = this.readableBytes()
    if (readable == 0) throw DecoderException("Invalid VarInt")

    // decode only one byte first as this is the most common size of varints
    var current = this.readByte().toInt()
    if ((current and CONTINUE_BIT) != 128) {
        return current
    }

    // no point in while loop that has higher overhead instead of for loop with max size of the varint
    val maxRead = MAXIMUM_VAR_INT_SIZE.coerceAtMost(readable)
    var varInt = current and SEGMENT_BITS
    for (i in 1..<maxRead) {
        current = this.readByte().toInt()
        varInt = varInt or ((current and SEGMENT_BITS) shl i * 7)
        if (current and CONTINUE_BIT != 128) {
            return varInt
        }
    }
    throw DecoderException("Invalid VarInt")
}

fun ByteBuf.writeStringArray(list: Collection<String>) {
    writeVarInt(list.size)
    list.forEach { writeString(it) }
}

// dark magic but its 2.05 nanoseconds per write
// https://steinborn.me/posts/performance/how-fast-can-you-write-a-varint/
// little bit modified to write bytes directly because kotlin fucks up the


or_tryit.asp?color=MediumOrchid
     */
    MEDIUMORCHID(186, 85, 211),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=MediumPurple
     */
    MEDIUMPURPLE(147, 112, 219),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=MediumSeaGreen
     */
    MEDIUMSEAGREEN(60, 179, 113),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=MediumSlateBlue
     */
    MEDIUMSLATEBLUE(123, 104, 238),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=MediumSpringGreen
     */
    MEDIUMSPRINGGREEN(0, 250, 154),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=MediumTurquoise
     */
    MEDIUMTURQUOISE(72, 209, 204),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=MediumVioletRed
     */
    MEDIUMVIOLETRED(199, 21, 133),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=MidnightBlue
     */
    MIDNIGHTBLUE(25, 25, 112),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=MintCream
     */
    MINTCREAM(245, 255, 250),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=MistyRose
     */
    MISTYROSE(255, 228, 225),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=Moccasin
     */
    MOCCASIN(255, 228, 181),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=NavajoWhite
     */
    NAVAJOWHITE(255, 222, 173),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=Navy
     */
    NAVY(0, 0, 128),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=OldLace
     */
    OLDLACE(253, 245, 230),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=Olive
     */
    OLIVE(128, 128, 0),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=OliveDrab
     */
    OLIVEDRAB(107, 142, 35),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=Orange
     */
    ORANGE(255, 165, 0),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=OrangeRed
     */
    ORANGERED(255, 69, 0),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=Orchid
     */
    ORCHID(218, 112, 214),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=PaleGoldenrod
     */
    PALEGOLDENROD(238, 232, 170),

    /**
     * https://www.w3schools.com/colors/color_tryit.asp?color=PaleGreen
     */
    PALEGREEN(152, 251, 152),

    /**
     * https://www.w3schools


9 a 13 hs.CARLOS A. BEZRUK Mat. 3275 CMSICUCICBA  Mat. 5952","descriptionNormalized":"Departamento de 2 ambientes en venta, en Villa Crespo. Ubicado a pocas cuadras de la Estación Malabia del Subte B y a 1 cuadra del Metrobús, excelente zona! La propiedad dispone de amplio living-comedor con puerta ventana con salida al patio, cocina con muebles completos. Dormitorio con placard y ventanal con salida al patio, 1 baño completo. Muy lindo y amplio patio con parrilla y lavadero. - Pisos de cerámica en living-comedor, cocina y baño- Pisos de parquet en dormitorioexcelente oportunidad para visitar contactate con nosotros! ! *Las medidas y superficies expuestas surgen de la información suministrada por el propietario, la empresa no se responsabiliza por la exactitud de las mismas*. El valor consignado de las expensas mensuales (en caso que corresponda pago de expensas) están sujetos a verificación y/o ajustes. En el caso de tratarse de un inmueble en construcción los detalles de terminación y la fecha de entrega están sujetos a revisión. Las unidades publicadas están sujetas a disponibilidad. Casa Central: Av. Fleming 2800, Martínez Sucursal: Av. Del Libertador \u003cspan class='descripcionDatosAnunciante'>\u003cbutton class='btn btn-link js-verDatos' href='#'>Ver datos\u003c/button>\u003c/span>, MartínezSucursal: Eduardo Costa 1804, Martínez Sucursal: Larrea 1381 2° A, cabahorario: Lunes a Viernes de 9 a 18 hs y Sábados 9 a 13 hs. carlos A. Bezruk Mat. 3275 cmsicucicba Mat. 5952","priceOperationTypes":[{"lowPricePercentage":null,"operationType":{"name":"Venta","operationTypeId":"1"},"prices":[{"currencyId":"2","amount":100000,"formattedAmount":"100.000","currency":"USD"}]}],"expenses":{"currencyId":null,"amount":0,"formattedAmount":null,"currency":"$"},"mainFeatures":{"1000019":{"featureId":"1000019","label":"Disposición","measure":null,"value":"Contrafrente","icon":null,"featureCategoryId":"4"},"1000029":{"featureId":"1000029","label":"Orientación","measure":null,"value":"E","icon":null,"featureCategoryId":"4"},"CFT100":{"featureId":"CFT100","label":"Superficie total","measure":"m²","value":"37","icon":null,"featureCategoryId":"CFC2"},"CFT101":{"featureId":"CFT101","label":"Superficie cubierta","measure":"m²","value":"37","icon":null,"featureCategoryId":"CFC2"},"CFT1":{"featureId":"CFT1","label":"Ambientes","measure":null,"value":"2","icon":null,"featureCategoryId":"CFC1"},"CFT2":{"featureId":"CFT2","label":"Dormitorio","measure":null,"value":"1","icon":null,"featureCategoryId":"CFC1"},"CFT3":{"featureId":"CFT3","label":"Baño","measure":null,"value":"1","icon":null,"featureCategoryId":"CFC1"},"CFT5":{"featureId":"CFT5","label":"Antigüedad","measure":null,"value":"60","icon":null,"featureCategoryId":"CFC1"}},"generalFeatures":{"Características generales":{"1000016":{"featureId":"1000016","label":"Cantidad plantas","measure":null,"value":"1","icon":null,"featureCategoryId":"4"},"1000078":{"featureId":"1000078","label":"P


given year and month. Returns a JewishDate {@link Object} set to the date of the molad
   * with the {@link #getMoladHours() hours}, {@link #getMoladMinutes() minutes} and {@link #getMoladChalakim()
     * chalakim} set. In the current implementation, it sets the molad time based on a midnight date rollover. This
   * means that Rosh Chodesh Adar II, 5771 with a molad of 7 chalakim past midnight on Shabbos 29 Adar I / March 5,
   * 2011 12:00 AM and 7 chalakim, will have the following values: hours: 0, minutes: 0, Chalakim: 7.
   *
   * @return a JewishDate {@link Object} set to the date of the molad with the {@link #getMoladHours() hours},
   *         {@link #getMoladMinutes() minutes} and {@link #getMoladChalakim() chalakim} set.
   */
  public getMolad(): JewishDate {
    const moladDate: JewishDate = new JewishDate(this.getChalakimSinceMoladTohu());
    if (moladDate.getMoladHours() >= 6) {
      moladDate.forward(Calendar.DATE, 1);
    }
    moladDate.setMoladHours((moladDate.getMoladHours() + 18) % 24);
    return moladDate;
  }

  /**
   * Returns the number of days from the Jewish epoch from the number of chalakim from the epoch passed in.
   *
   * @param chalakim
   *            the number of chalakim since the beginning of Sunday prior to BaHaRaD
   * @return the number of days from the Jewish epoch
   */
  private static moladToAbsDate(chalakim: number): number {
    return Math.trunc(chalakim / JewishDate.CHALAKIM_PER_DAY) + JewishDate.JEWISH_EPOCH;
  }

  /**
   * Constructor that creates a JewishDate based on a molad passed in. The molad would be the number of chalakim/parts
   * starting at the beginning of Sunday prior to the molad Tohu BeHaRaD (Be = Monday, Ha= 5 hours and Rad =204
   * chalakim/parts) - prior to the start of the Jewish calendar. BeHaRaD is 23:11:20 on Sunday night(5 hours 204/1080
   * chalakim after sunset on Sunday evening).
   *
   * @param molad the number of chalakim since the beginning of Sunday prior to BaHaRaD
   */

  /*
      public JewishDate(molad: number) {
          this.absDateToDate(JewishDate.moladToAbsDate(molad));
          // long chalakimSince = getChalakimSinceMoladTohu(year, JewishDate.TISHREI);// tishrei
          const conjunctionDay: number = Math.trunc(molad / JewishDate.CHALAKIM_PER_DAY);
          const conjunctionParts: number = Math.trunc(molad - conjunctionDay * JewishDate.CHALAKIM_PER_DAY);
          this.setMoladTime(conjunctionParts);
      }
  */

  /**
   * Sets the molad time (hours minutes and chalakim) based on the number of chalakim since the start of the day.
   *
   * @param chalakim
   *            the number of chalakim since the start of the day.
   */
  private setMoladTime(chalakim: number): void {
    let adjustedChalakim: number = chalakim;
    this.setMoladHours(Math.trunc(adjustedChalakim / JewishDate.CHALAKIM_PER_HOUR));
    adjustedChalakim = adjustedChalakim - (this.getMoladHours() * JewishDate.CHALAKIM_PER_HOUR);
    this.setMoladMinutes(Math.trunc(adjustedChalakim / JewishDate.CHALAKIM_PER_MINUTE));
    this.setMoladChalakim(adjustedChalakim - this.moladMinutes * JewishDate.CHALAKIM_PER_MINUTE


BEGIN(this, g_pEEInterface->GetThread()); // toggles to preemptive

    // Actually send the event
    if (CORDebuggerAttached())
    {
        SendRawUpdateModuleSymsEvent(pRuntimeModule);
        TrapAllRuntimeThreads();
    }

    SENDIPCEVENT_END;
}

//
// UnloadModule is called by the Runtime for each module that is being unloaded, when a debugger is attached.
//
void Debugger::UnloadModule(Module* pRuntimeModule)
{
    CONTRACTL
    {
        MAY_DO_HELPER_THREAD_DUTY_THROWS_CONTRACT;
        MAY_DO_HELPER_THREAD_DUTY_GC_TRIGGERS_CONTRACT;
    }
    CONTRACTL_END;

    // @@@@
    // implements DebugInterface.
    // can only called by EE on Module::NotifyDebuggerUnload
    //

    if (CORDBUnrecoverableError(this))
        return;

    LOG((LF_CORDB, LL_INFO100, "D::UM: unload module Mod:%#08x runtimeMod:%#08x modName:%s\n",
         LookupOrCreateModule(pRuntimeModule), pRuntimeModule, pRuntimeModule->GetDebugName()));

    Thread *thread = g_pEEInterface->GetThread();
    SENDIPCEVENT_BEGIN(this, thread);

    if (CORDebuggerAttached())
    {
        DebuggerModule* module = LookupOrCreateModule(pRuntimeModule);
        if (module == NULL)
        {
            LOG((LF_CORDB, LL_INFO100, "D::UM: module already unloaded runtimeMod:%#08x modName:%s\n",
                 pRuntimeModule, pRuntimeModule->GetDebugName()));
            goto LExit;
        }
        _ASSERTE(module != NULL);

        STRESS_LOG6(LF_CORDB, LL_INFO10000,
            "D::UM: Unloading RTMod:%#08x (DomFile: %#08x, IsISStream:%#08x); DMod:%#08x(RTMod:%#08x DomFile: %#08x)\n",
            pRuntimeModule, pRuntimeModule->GetDomainAssembly(), false,
            module, module->GetRuntimeModule(), module->GetDomainAssembly());

        // Send the unload module event to the Right Side.
        DebuggerIPCEvent* ipce = m_pRCThread->GetIPCEventSendBuffer();
        InitIPCEvent(ipce, DB_IPCE_UNLOAD_MODULE, thread);
        ipce->UnloadModuleData.vmDomainAssembly.SetRawPtr((module ? module->GetDomainAssembly() : NULL));
        ipce->UnloadModuleData.debuggerAssemblyToken.Set(pRuntimeModule->GetClassLoader()->GetAssembly());
        m_pRCThread->SendIPCEvent();

        //
        // Cleanup the module (only for resources consumed when a debugger is attached)
        //

        // Remove all patches that apply to this module/AppDomain combination
        AppDomain* domainToRemovePatchesIn = NULL;  // all domains by default

        // Note that we'll explicitly NOT delete DebuggerControllers, so that
        // the Right Side can delete them later.
        DebuggerController::RemovePatchesFromModule(pRuntimeModule, domainToRemovePatchesIn);

        // Deactivate all JMC functions in this module.  We don't do this for shared assemblies
        // because JMC status is not maintained on a per-AppDomain basis and we don't
        // want to change the JMC behavior of the module in other domains.
        LOG((LF_CORDB, LL_EVERYTHING, "Setting all JMC methods to false:\n"));
        DebuggerDataLockHolder debuggerDataLockHolder(this);
        DebuggerMethodInfoTable * pTable = GetMethodInfoTable();
        if (pTable != NULL)
        {
            HASHFIND info;

            for (DebuggerMethodInfo *dmi = pTable->GetFirstMethodInfo(&info);
                dmi != NULL;
                dmi = pTable->GetNextMethodInfo(&info))
            {
                if (dmi->m_module == pRuntimeModule)
                {
                    dmi->SetJMCStatus(false);
                }
            }
        }
        LOG((LF_CORDB, L


`](/ja/docs/Web/HTML/Reference/Elements/input#autocomplete) 属性を `off` または `one-time-code` のどちらかに設定してサジェストが保存されないようにしてください。

```html
<label for="pin">PIN: </label>
<input id="pin" type="password" inputmode="numeric" />
```

{{EmbedLiveSample("Specifying_an_input_mode", 600, 40)}}

### 長さの要件を設定する

普通、[`minlength`](/ja/docs/Web/HTML/Reference/Elements/input#minlength) 属性や [`maxlength`](/ja/docs/Web/HTML/Reference/Elements/input#maxlength) 属性を使って、許容する最小の長さと最大の長さをパスワードに適用することができます。この例では、直前の例を拡張して、ユーザーの PIN が 4 〜 8文字でなければならないことを指定しています。[`size`](/ja/docs/Web/HTML/Reference/Elements/input#size) 属性は、パスワード入力コントロールが 8 文字分の幅であることを保証するために使用されています。

```html
<label for="pin">PIN:</label>
<input
  id="pin"
  type="password"
  inputmode="numeric"
  minlength="4"
  maxlength="8"
  size="8" />
```

{{EmbedLiveSample("Setting_length_requirements", 600, 40)}}

### テキストを選択する

他のテキスト入力コントロールのように、 {{domxref("HTMLInputElement.select", "select()")}} メソッドを使って、パスワード欄のすべてのテキストを選択することができます。

#### HTML

```html
<label for="userPassword">パスワード: </label>
<input id="userPassword" type="password" size="12" />
<button id="selectAll">Select All</button>
```

#### JavaScript

```js
document.getElementById("selectAll").onclick = () => {
  document.getElementById("userPassword").select();
};
```

#### 結果

{{EmbedLiveSample("Selecting_text", 600, 40)}}

また、{{domxref("HTMLInputElement.selectionStart", "selectionStart")}} や {{domxref("HTMLInputElement.selectionEnd", "selectionEnd")}} を使って、コントロールの文字がどの範囲で選択されているかを取得または設定することができ、{{domxref("HTMLInputElement.selectionDirection", "selectionDirection")}} を使って、どの方向に選択が発生したのか（あるいはどの方向に広がるのか。プラットフォームに依存します。詳細は各ドキュメントを参照してください）を知ることができます。ただし、テキストは隠されているため、有用性はやや制限されます。

## 検証


        SELNBAccep_BConn_BIO_RW_4
        SPINNBAccep_BConn_BIO_WR_5
        SPINNBAccep_BConn_BIO_RW_6
        BAccep_NBConn_BIO_WR_7
        BAccep_NBConn_BIO_RW_8
        SELNBAccep_NBConn_BIO_WR_9
        SELNBAccep_NBConn_BIO_RW_10
        SPINNBAccep_NBConn_BIO_WR_11
        SPINNBAccep_NBConn_BIO_RW_12

        BAccep_BConn_NBIO_WR_1a         // Non-Blocking I/O
        BAccep_BConn_NBIO_RW_2a
        SELNBAccep_BConn_NBIO_WR_3a
        SELNBAccep_BConn_NBIO_RW_4a
        SPINNBAccep_BConn_NBIO_WR_5a
        SPINNBAccep_BConn_NBIO_RW_6a
        BAccep_NBConn_NBIO_WR_7a
        BAccep_NBConn_NBIO_RW_8a
        SELNBAccep_NBConn_NBIO_WR_9a
        SELNBAccep_NBConn_NBIO_RW_10a
        SPINBAccep_NBConn_NBIO_WR_11a
        SPINBAccep_NBConn_NBIO_RW_12a
    */

    @DataProvider(name = "family")
    public Object[][] family() {
        return unixDomainSupported ?
                new Object[][] {
                    { UNIX },
                    { INET }}
                : new Object[][] {
                    { INET }
        };
    }

    @Test(dataProvider = "family")
    public void BAccep_BConn_BIO_WR_1(ProtocolFamily family)
            throws Throwable {
        try (ServerSocketChannel ssc = openServerSocketChannel(family)) {
            ssc.bind(null);
            SocketAddress addr = ssc.getLocalAddress();

            TestThread t = TestThread.of("t1", () -> {
                try (SocketChannel sc = openSocketChannel(family)) {
                    assertTrue(sc.connect(addr));
                    ByteBuffer bb = ByteBuffer.allocate(10).put((byte) 0x01).flip();
                    assertEquals(sc.write(bb), 1);
                    out.printf("wrote: 0x%x%n", bb.get(0));
                    assertEquals(sc.read(bb.clear()), -1);
                }
            });
            t.start();

            try (SocketChannel sc = ssc.accept()) {
                ByteBuffer bb = ByteBuffer.allocate(10);
                assertEquals(sc.read(bb), 1);
                out.printf("read:  0x%x%n", bb.get(0));
                assertEquals(bb.get(0), 0x01);
            }
            t.awaitCompletion();
            deleteFile(addr);
        }
    }

    @Test(dataProvider = "family")
    public void BAccep_BConn_BIO_RW_2(ProtocolFamily family)
            throws Throwable {
        try (ServerSocketChannel ssc = openServerSocketChannel(family)) {
            ssc.bind(null);
            SocketAddress addr = ssc.getLocalAddress();

            TestThread t = TestThread.of("t2", () -> {
                try (SocketChannel sc = openSocketChannel(family)) {
                    assertTrue(sc.connect(addr));
                    ByteBuffer bb = ByteBuffer.allocate(10);
                    assertEquals(sc.read(bb), 1);
                    out.printf("read:  0x%x%n", bb.get(0));
                    assertEquals(bb.get(0), 0x02);
                }
            });
            t.start();

            try (SocketChannel sc = ssc.accept()) {
                ByteBuffer bb = ByteBuffer.allocate(10).put((byte) 0x02).flip();
                assertEquals(sc.write(bb), 1);
                out.printf("wrote: 0x%x%n", bb.get(0));
                assertEquals(sc.read(bb.clear()), -1);
            }
            t.awaitCompletion();
            deleteFile(addr);
        }
    }

    @Test(dataProvider = "family")
    public void SELNBAccep_BConn_BIO_WR_3(ProtocolFamily family)
            throws Throwable {
        try (ServerSocketChannel ssc = openServerSocke


/), licensed by the Apache
 * Software Foundation (ASF) under the Apache License, Version 2.0. See the NOTICE file distributed with this work for
 * additional information regarding copyright ownership. */

/** Function to test a field with a literal. */
public abstract class NullFalseLeafBinaryFunction extends LeafFunction {

    private static final long serialVersionUID = 1L;

    public abstract boolean test(DataType type, Object field, Object literal);

    public abstract boolean test(
            DataType type, long rowCount, Object min, Object max, Long nullCount, Object literal);

    @Override
    public boolean test(DataType type, Object field, List<Object> literals) {
        if (field == null || literals.get(0) == null) {
            return false;
        }
        return test(type, field, literals.get(0));
    }

    @Override
    public boolean test(
            DataType type,
            long rowCount,
            Object min,
            Object max,
            Long nullCount,
            List<Object> literals) {
        if (nullCount != null) {
            if (rowCount == nullCount || literals.get(0) == null) {
                return false;
            }
        }
        return test(type, rowCount, min, max, nullCount, literals.get(0));
    }
}
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.camel.component.aws2.bedrock;

public enum BedrockModels {

    // Amazon Titan Models
    TITAN_TEXT_EXPRESS_V1("amazon.titan-text-express-v1"),
    TITAN_TEXT_LITE_V1("amazon.titan-text-lite-v1"),
    TITAN_IMAGE_GENERATOR_V1("amazon.titan-image-generator-v1"),
    TITAN_EMBEDDINGS_G1("amazon.titan-embed-text-v1"),
    TITAN_MULTIMODAL_EMBEDDINGS_G1("amazon.titan-embed-image-v1"),
    TITAN_TEXT_PREMIER_V1("amazon.titan-text-premier-v1:0"),
    TITAN_TEXT_EMBEDDINGS_V2("amazon.titan-embed-text-v2:0"),
    TITAN_IMAGE_GENERATOR_V2("amazon.titan-image-generator-v2:0"),

    // Amazon Nova Models
    NOVA_CANVAS_V1("amazon.nova-canvas-v1:0"),
    NOVA_LITE_V1("amazon.nova-lite-v1:0"),
    NOVA_MICRO_V1("amazon.nova-micro-v1:0"),
    NOVA_PREMIER_V1("amazon.nova-premier-v1:0"),
    NOVA_PRO_V1("amazon.nova-pro-v1:0"),
    NOVA_REEL_V1("amazon.nova-reel-v1:0"),
    NOVA_REEL_V1_1("amazon.nova-reel-v1:1"),
    NOVA_SONIC_V1("amazon.nova-sonic-v1:0"),

    // Amazon Rerank
    RERANK_V1("amazon.rerank-v1:0"),

    // AI21 Labs Models
    /** @deprecated Deprecated October 2024, use JAMBA_1_5_LARGE instead */
    @Deprecated(since = "4.10.0", forRemoval = true)
    JURASSIC2_ULTRA("ai21.j2-ultra-v1"),
    /** @deprecated Deprecated October 2024, use JAMBA_1_5_MINI instead */
    @Deprecated(since = "


tream()
		obs, _ := NewDefaultOutputBitStream(bs, 16384)
		dbgobs, _ := NewDebugOutputBitStream(obs, os.Stdout)
		dbgobs.ShowByte(true)
		dbgobs.Mark(true)
		println()

		for i := range input {
			if test < 5 {
				input[i] = byte(rand.Intn(test*1000 + 100))
			} else {
				input[i] = byte(rand.Intn(1 << 31))
			}

			fmt.Printf("%v ", input[i])

			if i%20 == 19 {
				println()
			}
		}

		count := uint(8 + test*(20+(test&1)) + (test & 3))
		println()
		println()
		dbgobs.WriteArray(input, count)

		// Close first to force flush()
		dbgobs.Close()

		ibs, _ := NewDefaultInputBitStream(bs, 16384)
		dbgibs, _ := NewDebugInputBitStream(ibs, os.Stdout)
		dbgibs.ShowByte(true)
		dbgibs.Mark(true)

		println()
		fmt.Println(_READ)
		r := dbgibs.ReadArray(output, count)
		ok := r == count

		if ok == true {
			for i := 0; i < int(r>>3); i++ {
				fmt.Printf("%v", output[i])

				if output[i] == input[i] {
					fmt.Printf(" ")
				} else {
					fmt.Printf("* ")
					ok = false
				}

				if i%20 == 19 {
					println()
				}
			}
		}

		dbgibs.Close()
		bs.Close()
		println()
		println()
		fmt.Printf("Bits written: %v\n", dbgobs.Written())
		fmt.Printf("Bits read: %v\n", dbgibs.Read())

		if ok {
			fmt.Printf("\nSuccess\n")
		} else {
			fmt.Printf("\nFailure\n")
			return fmt.Errorf("Bits written: %v, bits read: %v", dbgobs.Written(), dbgibs.Read())
		}

		println()
		println()
	}

	return error(nil)
}

func testCorrectnessMisaligned2() error {
	fmt.Printf("Correctness Test - write array - not byte aligned\n")
	input := make([]byte, 100)
	output := make([]byte, 100)

	for test := 1; test <= 10; test++ {
		bs := internal.NewBufferStream()
		obs, _ := NewDefaultOutputBitStream(bs, 16384)
		dbgobs, _ := NewDebugOutputBitStream(obs, os.Stdout)
		dbgobs.ShowByte(true)
		dbgobs.Mark(true)
		println()

		for i := range input {
			if test < 5 {
				input[i] = byte(rand.Intn(test*1000 + 100))
			} else {
				input[i] = byte(rand.Intn(1 << 31))
			}

			fmt.Printf("%v ", input[i])

			if i%20 == 19 {
				println()
			}
		}

		count := uint(8 + test*(20+(test&1)) + (test & 3))
		println()
		println()
		dbgobs.WriteBit(0)
		dbgobs.WriteArray(input[1:], count)

		// Close first to force flush()
		dbgobs.Close()

		ibs, _ := NewDefaultInputBitStream(bs, 16384)
		dbgibs, _ := NewDebugInputBitStream(ibs, os.Stdout)
		dbgibs.ShowByte(true)
		dbgibs.Mark(true)

		println()
		fmt.Println(_READ)
		dbgibs.ReadBit()
		r := dbgibs.ReadArray(output[1:], count)
		ok := r == count

		if ok == true {
			for i := 1; i < 1+int(r>>3


style>

<form id="searchBox" name="searchBox" action="http://search.espn.go.com/results" method="get" accept-charset="utf-8" style="color: #999999;">

<input autocomplete="off" class="text" type="text" placeholder="Search" name="searchString" id="searchString" />
<input type="hidden" name="page" id="page" value="null" />
<input type="hidden" name="fromForm" value="true" />
<input class="submit" type="submit" value="" />

</form>


>

          A snapshot
            of an early McNeil house, on Campbell Drive, circa 1950-54. The area
            was at the edge of town then; it's near the center now.

Fred and
        Irene Tabor bought their custom-built house on Mason Avenue in 1957. There,
        in the McNeil neighborhood, they raised their family. "We moved in just
        before Roger was born," Irene says. "In back of us was the desert, some
        barns and horses. And there was a big gap between us and Downtown." Over
        the years the barren land became rich with vegetation--and lush with friendships.

 Two years
        ago, after 11 years of retirement in California, they wanted to come home
        to their "very friendly, small community." It wasn't easy. Hoping to find
        a place on Mason, they had to settle for Westleigh Avenue, several blocks
        away. "It was as close as we could get," Irene says. In their absence,
        the old neighborhood had become very popular. The Tabors found their children
        and friends of their children moving in. They saw a lot of new faces.

 "The neighborhood
        hasn't changed that much," Irene says. "It is still a friendly, small
        community."

          Bill
            and Heather Coulthard have the ideal picket fence around their nice
            Cape Cod number.

      Bounded by Charleston
      and Oakey, and stretching west from Rancho to about Cashman, McNeil was
      one of the city's first westward suburban "sprawls." Now it's pretty much
      in the heart of town, just a mile or so southwest of the Union Pacific plot
      that city leaders see as the key to Downtown revitalization. And while the
      Tabors are seeing a lot of re-energizing activity in McNeil, it's not the
      high-density infill city officials talk about. These are single-family homes
      on big, quarter-acre lots. The folks moving in aren't exactly yuppies--they're
      a bit older now and raising young kids. But in Vegas, where "new" is de
      rigueur, and where the new-housing market leads the universe, there actually
      are people buying old homes in an old


  display: none;
}
.sphx-glr-thumbcontainer {
  background: transparent;
  -moz-border-radius: 5px;
  -webkit-border-radius: 5px;
  border-radius: 5px;
  box-shadow: 0 0 10px var(--sg-thumb-box-shadow-color);

  /* useful to absolutely position link in div */
  position: relative;

  /* thumbnail width should include padding and borders
  and take all available space */
  box-sizing: border-box;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;

  /* align content in thumbnail */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.sphx-glr-thumbcontainer p {
  position: absolute;
  top: 0;
  left: 0;
}
.sphx-glr-thumbcontainer p,
.sphx-glr-thumbcontainer p a {
  /* link should cover the whole thumbnail div */
  width: 100%;
  height: 100%;
}
.sphx-glr-thumbcontainer p a span {
  /* text within link should be masked
  (we are just interested in the href) */
  display: none;
}
.sphx-glr-thumbcontainer:hover {
  border: 1px solid;
  border-color: var(--sg-thumb-hover-border);
  cursor: pointer;
}
.sphx-glr-thumbcontainer a.internal {
  bottom: 0;
  display: block;
  left: 0;
  box-sizing: border-box;
  padding: 150px 10px 0;
  position: absolute;
  right: 0;
  top: 0;
}
/* Next one is to avoid Sphinx traditional theme to cover all the
thumbnail with its default link Background color */
.sphx-glr-thumbcontainer a.internal:hover {
  background-color: transparent;
}

.sphx-glr-thumbcontainer p {
  margin: 0 0 0.1em 0;
}
.sphx-glr-thumbcontainer .figure {
  margin: 10px;
  width: 160px;
}
.sphx-glr-thumbcontainer img {
  display: inline;
  max-height: 112px;
  max-width: 160px;
}

.sphx-glr-thumbcontainer[tooltip]::before {
  content: "";
  position: absolute;
  pointer-events: none;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 97;
  background-color: var(--sg-tooltip-background);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.3s;
}

.sphx-glr-thumbcontainer[tooltip]:hover::before {
  opacity: 1;
}

.sphx-glr-thumbcontainer[tooltip]:hover::after {
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  color: var(--sg-tooltip-foreground);
  content: attr(tooltip);
  padding: 10px 10px 5px;
  z-index: 98;
  width: 100%;
  max-height: 100%;
  position: absolute;
  pointer-events: none;
  top: 0;
  box-sizing: border-box;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
}

.sphx-glr-script-out {
  color: var(--sg-script-out);
  display: flex;
  gap: 0.5em;
}
.sphx-glr-script-out::before {
  content: "Out:";
  /* These numbers come from the pre style in the pydata sphin


      create: [ROLES.USER, ROLES.SUPER_USER, ROLES.MODERATOR, ROLES.ADMIN],
      update: [ROLES.USER, ROLES.SUPER_USER, ROLES.MODERATOR, ROLES.ADMIN],
      del: [ROLES.USER, ROLES.SUPER_USER, ROLES.MODERATOR, ROLES.ADMIN]
    };

    isTokenExpired(createdAt: Date) {
      var maxTokenLifeTime = new Date();
      maxTokenLifeTime.setDate(maxTokenLifeTime.getDate() - this.maxDays);
      return createdAt < maxTokenLifeTime;
    }

    getRoles(id: string) {
      return this.db.model('User')
        .findById(id)
        .populate('roles')
        .exec();
    }

    hasAuthorizedRole(roles: Array<any>, authorizedRoles: Array<string>) {
      var hasRole = false;
      roles.forEach((role) => {
        authorizedRoles.forEach((authRole: string) => {
          if (role.name === authRole) {
            hasRole = true;
          }
        });
      });
      return hasRole;
    }

    hasAccessRightsDefined(req: Request, authorizedRoles: Array<string>) {
      var promise = new mongoose.Promise();
      var authToken = req.header('Authorization');
      if (authorizedRoles.length === 0) {
        promise.resolve(null, null);
        return promise;
      }
    }

    isAuthorized(req: Request, authorizedRoles: Array<string>) {
      var promise = new mongoose.Promise();
      var authToken = req.header('Authorization');
      if (authorizedRoles.length === 0) {
        promise.resolve(null, null);
        return promise;
      } else if (!authToken) {
        promise.resolve(new Error('no token found'), null);
        return promise;
      }
      var tokenDetails = auth.decryptAuthToken(authToken);
      return this.getRoles(tokenDetails.id)
        .then((user: any) => {
          if (this.isTokenExpired(tokenDetails.createdAt)) {
            throw new Error('token expired');
          }
          return user.roles;
        })
        .then((roles: Array<any>) => {
          if (!this.hasAuthorizedRole(roles, authorizedRoles)) {
            throw new Error('unauthorized');
          }
        });
    }

    sendUnauthorized(error: Error, res: Response) {
      res.status(401).send('unauthorized');
    }

    baseGetAll = super.getAll;
    baseGetById = super.getById;
    baseCreate = super.create;
    baseUpdate = super.update;
    baseDel = super.del;

    getAll(req: Request, res: Response) {
      this.isAuthorized(req, this.permissions.getAll)
        .then(() => super.getAll(req, res),
          (err) => this.sendUnauthorized(err, res));
    }

    getById(req: Request, res: Response) {
      this.isAuthorized(req, this.permissions.getById)
        .then(() => super.getById(req, res),
          (err) => this.sendUnauthorized(err, res));
    }

    create(req: Request, res: Response) {
      this.isAuthorized(req, this.permissions.create)
        .then(() => super.create(req, res),
          (err) => this.sendUnauthorized(err, res));
    }

    update(req: Request, res: Response) {
      this.isAuthorized(req, this.permissions.update)
        .then(() => super.update(req, res),
          (err) => this.sendUnauthorized(err, res));
    }

    del(req: Request, res: Re


 '1iA' // 20955-20978
    'O' // 20979        #14
    'aA' // 2097a-2097b
    'C' // 2097c        #2
    'fA' // 2097d-20983
    'C' // 20984        #2
    'wA' // 20985-2099c
    'C' // 2099d        #2
    '2tA' // 2099e-209e6
    'O' // 209e7        #14
    '1nA' // 209e8-20a10
    'O' // 20a11        #14
    '2iA' // 20a12-20a4f
    'O' // 20a50        #14
    'rA' // 20a51-20a63
    'C' // 20a64        #2
    'iA' // 20a65-20a6e
    'O' // 20a6f        #14
    'yA' // 20a70-20a89
    'O' // 20a8a        #14
    '1nA' // 20a8b-20ab3
    'O' // 20ab4        #14
    'lA' // 20ab5-20ac1
    'O' // 20ac2        #14
    'iA' // 20ac3-20acc
    'O' // 20acd        #14
    'dA' // 20ace-20ad2
    'C' // 20ad3        #2
    '2dA' // 20ad4-20b0c
    'O' // 20b0d        #14
    'nA' // 20b0e-20b1c
    'C' // 20b1d        #2
    '4hA' // 20b1e-20b8e
    'O' // 20b8f        #14
    'nA' // 20b90-20b9e
    '42Z' // 20b9f        #1117
    'gA' // 20ba0-20ba7
    'aO' // 20ba8-20ba9  #14
    'lA' // 20baa-20bb6
    'C' // 20bb7        #2
    'fA' // 20bb8-20bbe
    'O' // 20bbf        #14
    'eA' // 20bc0-20bc5
    'O' // 20bc6        #14
    'cA' // 20bc7-20bca
    'O' // 20bcb        #14
    'uA' // 20bcc-20be1
    'O' // 20be2        #14
    'gA' // 20be3-20bea
    'O' // 20beb        #14
    'nA' // 20bec-20bfa
    'O' // 20bfb        #14
    'bA' // 20bfc-20bfe
    'O' // 20bff        #14
    'jA' // 20c00-20c0a
    'O' // 20c0b        #14
    'A' // 20c0c
    'O' // 20c0d        #14
    'qA' // 20c0e-20c1f
    'O' // 20c20        #14
    'rA' // 20c21-20c33
    'O' // 20c34        #14
    'dA' // 20c35-20c39
    'aO' // 20c3a-20c3b  #14
    'dA' // 20c3c-20c40
    '27S' // 20c41        #720
    'aO' // 20c42-20c43  #14
    'nA' // 20c44-20c52
    'O' // 20c53        #14
    'pA' // 20c54-20c64
    'O' // 20c65        #14
    'pA' // 20c66-20c76
    'O' // 20c77        #14
    '27S' // 20c78        #720
    'bA' // 20c79-20c7b
    'O' // 20c7c        #14
    'oA' // 20c7d-20c8c
    'O' // 20c8


t and panic on failure.
        .expect("Unable to generate bindings");

    // Write the bindings to the $OUT_DIR/bindings.rs file.
    let out_path = std::path::PathBuf::from(env::var("OUT_DIR").unwrap());
    bindings
        .write_to_file(out_path.join("bindings.rs"))
        .expect("Couldn't write bindings!");
}
use std::{error::Error, str::FromStr};

use advent_utils::{parse_raw_data, Part, Solver};

mod movement;
mod ship;

use movement::Movement;
use ship::{BasicShip, Ship, WaypointedShip};

#[derive(Debug)]
pub struct Solution {
    movements: Vec<Movement>,
}

impl FromStr for Solution {
    type Err = Box<dyn Error>;

    fn from_str(input_data: &str) -> Result<Self, Self::Err> {
        let movements = parse_raw_data(input_data)?;

        Ok(Self { movements })
    }
}

impl Solver for Solution {
    fn day_number() -> u32 {
        12
    }

    fn solve(&self, part: Part) -> String {
        let mut basic = BasicShip::new();
        let mut waypointed = WaypointedShip::new();

        let ship: &mut dyn Ship = match part {
            Part::One => &mut basic,
            Part::Two => &mut waypointed,
        };

        for movement in &self.movements {
            ship.process_movement(movement);
        }

        format!("ship distance from zero is: {}", ship.manhattan_distance())
    }
}
<reponame>bdalrhm/rust
use clippy_utils::diagnostics::span_lint;
use rustc_ast::ast;
use rustc_data_structures::fx::FxHashSet;
use rustc_lint::{EarlyContext, EarlyLintPass, Level};
use rustc_session::{declare_tool_lint, impl_lint_pass};
use unicode_script::{Script, UnicodeScript};

declare_clippy_lint! {
    /// **What it does:** Checks for usage of unicode scripts other than those explicitly allowed
    /// by the lint config.
    ///
    /// This lint doesn't take into account non-text scripts such as `Unknown` and `Linear_A`.
    /// It also ignores the `Common` script type.
    /// While configuring, be sure to use official script name [aliases] from
    /// [the list of supported scripts][supported_scripts].
    ///
    /// See also: [`non_ascii_idents`].
    ///
    /// [aliases]: http://www.unicode.org/reports/tr24/tr24-31.html#Script_Value_Aliases
    /// [supported_scripts]: https://www.unicode.org/iso15924/iso15924-codes.html
    ///
    /// **Why is this bad?** It may be not desired to have many different scripts for
    /// identifiers in the codebase.
    ///
    /// Note that if you only want to allow plain English, you might want to use
    /// built-in [`non_ascii_idents`] lint instead.
    ///
    /// [`non_ascii_idents`]: https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#non-ascii-idents
    ///
    /// **Known problems:** None.
    ///
    /// **Example:**
    /// ```rust
    /// // Assuming that `clippy.toml` contains the following line:
    /// // allowed-locales = ["Latin", "Cyrillic"]
    /// let counter = 10; // OK, latin is allowed.
    /// let счётчик = 10; // OK, cyrillic is allowed.
    /// let zähler = 10; // OK, it's still latin.
    /// let カウンタ = 10; // Will spawn the lint.
    /// ```
    pub DISALLOWED_SCRIPT_IDENTS,
    restriction,
    "usage of non-allowed Unicode scripts"
}


768px) and (max-width:1024px){.search-results .code-card-div>.row{margin:auto;min-width:350px;overflow:hidden}.search-results .code-card-img-col{text-align:center}#break{display:none}.search-results .code-card-div{margin-left:10px;margin-right:10px;margin-top:10px;min-width:360px;overflow:hidden;padding:5px 10px 5px 0}}@media(min-width:481px) and (max-width:767px){.search-results .code-card-div>.row{margin:auto;max-width:740px;overflow:hidden}.search-results .code-card-img-col{text-align:center}#break{display:none}.search-results .code-card-div{margin-left:20px;margin-right:20px;margin-top:5px;max-width:760px;overflow:hidden;padding:5px 10px 5px 0}}@media(min-width:320px) and (max-width:480px){.search-results .code-card-div>.row{margin:auto;max-width:450px;overflow:hidden;text-overflow:ellipsis}.search-results .code-card-type-span{border:1px solid #175dc3;color:#175dc3;font-size:13px;margin-top:3px;padding:2px 4px}#code-card-img{max-width:40px}#break{display:inline}.search-results .code-card-img-col{text-align:center}.search-results .card-last-updated-span-col,.search-results .card-repo-stats-col{width:100%}.search-results .code-home-hitswrapper .code-card-div{max-width:unset}.search-results .code-card-div{word-wrap:break-word;margin-left:5px;margin-right:5px;margin-top:5px;max-width:calc(100vw - 50px);min-height:100px;overflow:hidden;padding:5px 0}.search-results .card-repo-stats-col{padding-left:0;text-align:left}.search-results .code-card-desc-p{word-wrap:break-word;padding-right:10px;text-align:left}}/*!* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)*//*!normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css*/html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-tra


encrypt_new_tables` Polardb MySQL 8.0 cluster, after TDE and Automatic Encryption are enabled, all newly created tables are automatically encrypted in the cluster.
     *
     */
    @Export(name="encryptNewTables", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> encryptNewTables;

    /**
     * @return turn on table auto encryption. Valid values are `ON`, `OFF`. Only MySQL 8.0 supports.
     * > **NOTE:** `encrypt_new_tables` Polardb MySQL 8.0 cluster, after TDE and Automatic Encryption are enabled, all newly created tables are automatically encrypted in the cluster.
     *
     */
    public Output<Optional<String>> encryptNewTables() {
        return Codegen.optional(this.encryptNewTables);
    }
    /**
     * The ID of the custom key. `encryption_key` cannot be modified after TDE is opened.
     *
     */
    @Export(name="encryptionKey", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> encryptionKey;

    /**
     * @return The ID of the custom key. `encryption_key` cannot be modified after TDE is opened.
     *
     */
    public Output<Optional<String>> encryptionKey() {
        return Codegen.optional(this.encryptionKey);
    }
    /**
     * Immediate or scheduled kernel version upgrade. Valid values are `true`, `false`. True means immediate execution, False means scheduled execution.
     *
     */
    @Export(name="fromTimeService", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> fromTimeService;

    /**
     * @return Immediate or scheduled kernel version upgrade. Valid values are `true`, `false`. True means immediate execution, False means scheduled execution.
     *
     */
    public Output<Optional<String>> fromTimeService() {
        return Codegen.optional(this.fromTimeService);
    }
    /**
     * The ID of the global database network (GDN).
     * > **NOTE:** This parameter is required if CreationOption is set to CreateGdnStandby.
     *
     */
    @Export(name="gdnId", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> gdnId;

    /**
     * @return The ID of the global database network (GDN).
     * > **NOTE:** This parameter is required if CreationOption is set to CreateGdnStandby.
     *
     */
    public Output<Optional<String>> gdnId() {
        return Codegen.optional(this.gdnId);
    }
    /**
     * Indicates whether the hot standby feature is enabled. Valid values are `ON`, `OFF`. Only MySQL supports.
     *
     */
    @Export(name="hotReplicaMode", refs={String.class}, tree="[0]")
    private Output<String> hotReplicaMode;

    /**
     * @return Indicates whether the hot standby feature is enabled. Valid values are `ON`, `OFF`. Only MySQL supports.
     *
     */
    public Output<String> hotReplicaMode() {
        return this.hotReplicaMode;
    }
    /**
     * Whether to enable the hot standby cluster. Valid values are `ON`, `OFF`, `EQUAL`.
     * > **NOTE:** From version 1.249.0, `hot_standby_cluster` can be set to `EQUAL`, and this value is only valid for MySQL.
     *
     */
    @Export(name="hotStandbyCluster", refs={String.class}, tree="[0]")
    private Output<String> hotStandbyCluster;

    /**
     * @return Whether to enable the hot standby cluster. Valid values are `ON`, `OFF`, `EQUAL`.
     * > **NOTE:** From version 1.249.0, `hot_standby_cluster` can be set to `EQUAL`, and this value is only valid for MySQL.
     *
     */
    public Output<String>


),p=o[u];return-1!==u&&p.defaultUVS&&(u=binarySearch(p.defaultUVS,(function(i){return r<i.startUnicodeValue?-1:r>i.startUnicodeValue+i.additionalCount?1:0}))),-1!==u&&p.nonDefaultUVS&&-1!==(u=binarySearch(p.nonDefaultUVS,(function(i){return r-i.unicodeValue})))?p.nonDefaultUVS[u].glyphID:0},r.getCharacterSet=function getCharacterSet(){var r=this.cmap;switch(r.version){case 0:return range(0,r.codeMap.length);case 4:for(var i=[],o=r.endCode.toArray(),u=0;u<o.length;u++){var p=o[u]+1,g=r.startCode.get(u);i.push.apply(i,range(g,p))}return i;case 8:throw new Error("TODO: cmap format 8");case 6:case 10:return range(r.firstCode,r.firstCode+r.glyphIndices.length);case 12:case 13:for(var y,w=[],_=_createForOfIteratorHelperLoose(r.groups.toArray());!(y=_()).done;){var x=y.value;w.push.apply(w,range(x.startCharCode,x.endCharCode+1))}return w;case 14:throw new Error("TODO: cmap format 14");default:throw new Error("Unknown cmap format ".concat(r.version))}},r.codePointsForGlyph=function codePointsForGlyph(r){var i=this.cmap;switch(i.version){case 0:for(var o=[],u=0;u<256;u++)i.codeMap.get(u)===r&&o.push(u);return o;case 4:for(var p=[],g=0;g<i.segCount;g++)for(var y=i.endCode.get(g),w=i.startCode.get(g),_=i.idRangeOffset.get(g),x=i.idDelta.get(g),k=w;k<=y;k++){var P=0;if(0===_)P=k+x;else{var O=_/2+(k-w)-(i.segCount-g);0!==(P=i.glyphIndexArray.get(O)||0)&&(P+=x)}P===r&&p.push(k)}return p;case 12:for(var I,B=[],R=_createForOfIteratorHelperLoose(i.groups.toArray());!(I=R()).done;){var D=I.value;r>=D.glyphID&&r<=D.glyphID+(D.endCharCode-D.startCharCode)&&B.push(D.startCharCode+(r-D.glyphID))}return B;case 13:for(var N,W=[],U=_createForOfIteratorHelperLoose(i.groups.toArray());!(N=U()).done;){var j=N.value;r===j.glyphID&&W.push.apply(W,range(j.startCharCode,j.endCharCode+1))}return W;default:throw new Error("Unknown cmap format ".concat(i.version))}},CmapProcessor}(),_applyDecoratedDescriptor(ni.prototype,"getCharacterSet",[cache],Object.getOwnPropertyDescriptor(ni.prototype,"getCharacterSet"),ni.prototype),_applyDecoratedDescriptor(ni.prototype,"codePointsForGlyph",[cache],Object.getOwnPropertyDescriptor(ni.prototype,"codePointsForGlyph"),ni.prototype),ni),ci=function(){function KernProcessor(r){this.kern=r.kern}var r=KernProcessor.prototype;return r.process=function process(r,i){for(var o=0;o<r.length-1;o++){var u=r[o].id,p=r[o+1].id;i[o].xAdvance+=this.getKerning(u,p)}},r.getKerning=func


   pcs = array.array(TypeCodeForBits(bits), f.read(size))
    mem_map_pcs = [[] for i in range(0, len(mem_map))]

    for pc in pcs:
      if pc == 0: continue
      map_idx = bisect.bisect(mem_map_keys, pc) - 1
      (start, end, base, module_path) = mem_map[map_idx]
      assert pc >= start
      if pc >= end:
        print >> sys.stderr, "warning: %s: pc %x outside of any known mapping" % (prog_name, pc)
        continue
      mem_map_pcs[map_idx].append(pc - base)

    for ((start, end, base, module_path), pc_list) in zip(mem_map, mem_map_pcs):
      if len(pc_list) == 0: continue
      assert path.endswith('.sancov.raw')
      dst_path = module_path + '.' + os.path.basename(path)[:-4]
      print >> sys.stderr, "%s: writing %d PCs to %s" % (prog_name, len(pc_list), dst_path)
      arr = array.array(TypeCodeForBits(bits))
      arr.fromlist(sorted(pc_list))
      with open(dst_path, 'ab') as f2:
        array.array('I', MagicForBits(bits)).tofile(f2)
        arr.tofile(f2)

def RawUnpack(files):
  for f in files:
    if not f.endswith('.sancov.raw'):
      raise Exception('Unexpected raw file name %s' % f)
    f_map = f[:-3] + 'map'
    UnpackOneRawFile(f, f_map)

def GetInstrumentedPCs(binary):
  # This looks scary, but all it does is extract all offsets where we call:
  # - __sanitizer_cov() or __sanitizer_cov_with_check(),
  # - with call or callq,
  # - directly or via PLT.
  cmd = "objdump -d %s | " \
        "grep '^\s\+[0-9a-f]\+:.*\scall\(q\|\)\s\+[0-9a-f]\+ <__sanitizer_cov\(_with_check\|\)\(@plt\|\)>' | " \
        "grep '^\s\+[0-9a-f]\+' -o" % binary
  proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
                          shell=True)
  proc.stdin.close()
  # The PCs we get from objdump are off by 4 bytes, as they point to the
  # beginning of the callq instruction. Empirically this is true on x86 and
  # x86_64.
  return set(int(line.strip(), 16) + 4 for line in proc.stdout)

def PrintMissing(binary):
  if not os.path.isfile(binary):
    raise Exception('File not found: %s' % binary)
  instrumented = GetInstrumentedPCs(binary)
  print >> sys.stderr, "%s: found %d instrumented PCs in %s" % (prog_name,
                                                                len(instrumented),
                                                                binary)
  covered = set(int(line, 16) for line in sys.stdin)
  print >> sys.stderr, "%s: read %d PCs from stdin" % (prog_name, len(covered))
  missing = instrumented - covered
  print >> sys.stderr, "%s: %d PCs missing from coverage" % (prog_name, len(missing))
  if (len(missing) > len(instrumented) - len(covered)):
    print >> sys.stderr, \
        "%s: WARNING: stdin contains PCs not found in binary" % prog_name
  for pc in sorted(missing):
    print "0x%x" % pc

if __name__ == '__main__':
  prog_name = sys.argv[0]
  if len(sys.argv) <= 2:
    Usage();

  if sys.argv[1] == "missing":
    if len(sys.argv) != 3:
      Usage()
    PrintMissing(sys.argv[2])
    exit(0)

  file_list = []
  for f in sys.argv[2:]:
    file_list += glob.glob(f)
  if not file_list:
    Usage()

  if sys.argv[1] == "print":
    PrintFiles(file_list)
  elif sys.argv[1] == "merge":
    MergeAndPrint(file_list)
  elif sys.argv[1] == "unpack":
    Unpack(file_list)
  elif sys.argv[1] == "rawunpack":
    RawUnpack(file_list)
  else:
    Usage()


using System;
using System.Threading;
using System.Threading.Tasks;

namespace QuickCross
{
    public abstract class ApplicationBase
    {
        private static object _syncRoot = new Object();
        private static volatile ApplicationBase _instance;
        private TaskScheduler _uiTaskScheduler;

        /// <summary>
        /// Initializes the application singleton and the UI thread scheduler
        /// </summary>
        /// <param name="uiTaskScheduler">Optional. If omitted, ensure that the application is always created on the UI thread.</param>
        protected ApplicationBase(TaskScheduler uiTaskScheduler = null)
        {
            lock (_syncRoot)
            {
                if (_instance != null) throw new InvalidOperationException("No more than one instance of ApplicationBase may be created.");
                _instance = this;
            }

            _uiTa


from django.db.models import Model, FloatField, ForeignKey, CASCADE, DateField, CharField, BooleanField, FileField, \
    TextField, IntegerField

from shared.models import BaseModel

class AnalizNatijalar(BaseModel):
    gemoglabin = FloatField()
    trombosit = FloatField()
    leykosit = FloatField()
    eritrosit = FloatField()
    limfosit = FloatField()
    korik = ForeignKey('Korik', CASCADE, related_name='analiz_natijalari')

class Korik(BaseModel):
    bemor = ForeignKey('bemor.Bemor', CASCADE, related_name='seanslar')
    korik_otkazilgan_sana = DateField(auto_now=True)
    murojat_turi = CharField(max_length=255)
    qon_olingan_sana = DateField(auto_now=True)
    qon_analiz_qilingan_sana = DateField(auto_now=True)
    reagent_ishlatildi = BooleanField(db_default=False)
    shifokor = ForeignKey('shifokor.Shifokorlar', CASCADE, related_name='koriklar')
    # biriktirilgan_fayllar = FileField()
    description = TextField()

    def __str__(self):
        return f"{self.id}"

class KorikFile(Model):
    file = FileField()
    korik = ForeignKey('seans.Korik', CASCADE, related_name='files')

class TavsiyaQilinganDorilar(BaseModel):
    dori = ForeignKey('dori.MedicationType', CASCADE)
    korik = ForeignKey('Korik', CASCADE, 'korik_dorilari')
    dozasi = IntegerField()


VBufferSinkParams structure.
 *
 * Must be freed with av_free().
 */
AVBufferSinkParams *av_buffersink_params_alloc(void);

/**
 * Struct to use for initializing an abuffersink context.
 */
typedef struct {
    const enum AVSampleFormat *sample_fmts; ///< list of allowed sample formats, terminated by AV_SAMPLE_FMT_NONE
    const int64_t *channel_layouts;         ///< list of allowed channel layouts, terminated by -1
    const int *channel_counts;              ///< list of allowed channel counts, terminated by -1
    int all_channel_counts;                 ///< if not 0, accept any channel count or layout
    int *sample_rates;                      ///< list of allowed sample rates, terminated by -1
} AVABufferSinkParams;

/**
 * Create an AVABufferSinkParams structure.
 *
 * Must be freed with av_free().
 */
AVABufferSinkParams *av_abuffersink_params_alloc(void);

/**
 * Set the frame size for an audio buffer sink.
 *
 * All calls to av_buffersink_get_buffer_ref will return a buffer with
 * exactly the specified number of samples, or AVERROR(EAGAIN) if there is
 * not enough. The last buffer at EOF will be padded with 0.
 */
void av_buffersink_set_frame_size(AVFilterContext *ctx, unsigned frame_size);

/**
 * Get the frame rate of the input.
 */
AVRational av_buffersink_get_frame_rate(AVFilterContext *ctx);

/**
 * Get a frame with filtered data from sink and put it in frame.
 *
 * @param ctx pointer to a context of a buffersink or abuffersink AVFilter.
 * @param frame pointer to an allocated frame that will be filled with data.
 *              The data must be freed using av_frame_unref() / av_frame_free()
 *
 * @return
 *         - >= 0 if a frame was successfully returned.
 *         - AVERROR(EAGAIN) if no frames are available at this point; more
 *           input frames must be added to the filtergraph to get more output.
 *         - AVERROR_EOF if there will be no more output frames on this sink.
 *         - A different negative AVERROR code in other failure cases.
 */
int av_buffersink_get_frame(AVFilterContext *ctx, AVFrame *frame);

/**
 * Same as av_buffersink_get_frame(), but with the ability to specify the number
 * of samples read. This function is less efficient than
 * av_buffersink_get_frame(), because it copies the data around.
 *
 * @param ctx pointer to a context of the abuffersink AVFilter.
 * @param frame pointer to an allocated frame that will be filled with data.
 *              The data must be freed using av_frame_unref() / av_frame_free()
 *              frame will contain exactly nb_samples audio samples, except at
 *              the end of stream, when it can contain less than nb_samples.
 *
 * @return The return codes have the same meaning as for
 *         av_buffersink_get_samples().
 *
 * @warning do not mix this function with av_buffersink_get_frame(). Use only one or
 * the other with a single sink, not both.
 */
int av_buffersink_get_samples(AVFilterContext *ctx, AVFrame *frame, int nb_samples);

/**
 * @}
 */

#endif /* AVFILTER_BUFFERSINK_H */


) value.toBooleanYesNo() else null

/** 将值解析为整数。如果值类型非 [CwtType.Int] 或解析失败，则返回 `null`。*/
val CwtMemberConfig<*>.intValue: Int? get() = if (valueType == CwtType.Int) value.toIntOrNull() ?: 0 else null

/** 将值解析为浮点数。如果值类型非 [CwtType.Float] 或解析失败，则返回 `0f`）。*/
val CwtMemberConfig<*>.floatValue: Float? get() = if (valueType == CwtType.Float) value.toFloatOrNull() ?: 0f else null

/** 将值解析为字符串。如果值类型非 [CwtType.String]，则返回 `null`。*/
val CwtMemberConfig<*>.stringValue: String? get() = if (valueType == CwtType.String) value else null

/** 过滤并返回当前块下的值规则（[CwtValueConfig]）列表。*/
val CwtMemberConfig<*>.values: List<CwtValueConfig>? get() = configs?.filterIsInstance<CwtValueConfig>()

/** 过滤并返回当前块下的属性规则（[CwtPropertyConfig]）列表。*/
val CwtMemberConfig<*>.properties: List<CwtPropertyConfig>? get() = configs?.filterIsInstance<CwtPropertyConfig>()

/** 通过 [CwtOptionFlags] 获取选项标志。 */
val CwtMemberConfig<*>.optionFlags: CwtOptionFlags get() = CwtOptionFlags.from(this)

/** 通过 [CwtOptionDataAccessor] 获取选项数据。 */
fun <T> CwtMemberConfig<*>.optionData(accessor: CwtOptionDataAccessor<T>): T = accessor.get(this)

/** 通过 [CwtOptionDataAccessor] 获取选项数据。 */
inline fun <T> CwtMemberConfig<*>.optionData(accessorGetter: CwtOptionDataAccessors.() -> CwtOptionDataAccessor<T>): T = optionData(CwtOptionDataAccessors.accessorGetter())

/** 绑定到当前属性规则的单内联规则（解析阶段填充）。*/
var CwtPropertyConfig.singleAliasConfig: CwtSingleAliasConfig? by createKey(CwtMemberConfig.Keys)

/** 绑定到当前属性规则的内联规则（解析阶段填充）。*/
var CwtPropertyConfig.aliasConfig: CwtAliasConfig? by createKey(CwtMemberConfig.Keys)

/** 绑定到当前属性规则的内联扩展规则（解析阶段填充）。*/
var CwtPropertyConfig.inlineConfig: CwtInlineConfig? by createKey(CwtMemberConfig.Keys)

/** 当前值规则的标签类型（解析阶段推断，用于渲染和提示）。*/
var CwtValueConfig.tagType: CwtTagType? by createKey(CwtMemberConfig.Keys)

/** 当前成员规则的被覆写前的原始规则（用于规则覆盖、来源追踪等场景）。*/
var CwtMemberConfig<*>.originalConfig: CwtMemberConfig<CwtMemberElement>? by createKey(CwtMemberConfig.Keys)

/** 当前成员规则对应的覆写提供者（来源于可覆写的规则分组）。*/
var CwtMemberConfig<*>.overriddenProvider: CwtOverriddenConfigProvider? by createKey(CwtMemberConfig.Keys)

/** 当前成员规则（作为声明规则的顶级成员规则时）对应的声明规则的上下文信息（用于声明/定义相关能力）。*/
var CwtMemberConfig<*>.declarationConfigContext: CwtDeclarationConfigContext? by createKey(CwtMemberConfig.Keys)

/** 当前成员规则（作为声明规则的顶级成员规则时）对应的声明规则的上下文缓存键（用于缓存/索引加速）。*/
var CwtMemberConfig<*>.declarationConfigCacheKey: String? by createKey(CwtMemberConfig.Keys)

//


bandoned in the drawers.": "stal\u010diuose palikta \u0161iek tiek vaist\u0173.", "all the work of a previous generation is here.": "\u0161ioje vietoje matosi praeitos kartos darbas.", "A Damp Cave": "Dr\u0117gna Ola", "the wanderer leaves, cart loaded with wood": "keliautoja i\u0161vyksta ve\u017eimu prikrautu medienos", "learned to swing weapons with force": "i\u0161moko galingai sm\u016bgiuoti ginklais", "A Snarling Beast": "R\u016bstusis \u017dv\u0117ris", "builder": "statytojas", "thieves": "vagys", "a battle was fought here, long ago.": "ka\u017ekada seniai \u010dia \u012fvyko kova.", "A Ruined City": "Apgriuv\u0119s Miestas", "not enough iron": "neu\u017etenka gele\u017eies", "A Sniper": "Snaiperis", "stab": "padurti", "Stratosphere": "Stratosfera", "A Shivering Man": "Drebantis \u017dmogus", "the wind howls outside": "lauke girdisi v\u0117jo kaukimas", "alien alloy": "lydinys", "convoy": "karavanas", "sulphur": "siera", "give 100": "duoti 100", "the small settlement has clearly been burning a while.": "\u0161i ma\u017ea gyvenviet\u0117 ai\u0161kiai kur\u012f laik\u0105 deg\u0117.", "the sky is grey and the wind blows relentlessly": "dangus apsiniauk\u0119s, v\u0117jas stiprus ir negailestingas", "rusted chainlink is pulled across an alleyway.": "skersgatvis u\u017etvertas sur\u016bdijusia tvora.", "buy medicine": "pirkti vaist\u0173", "the man expresses his thanks and hobbles off.": "vyras pad\u0117koja ir nu\u0161lub\u010dioja savo keliais.", "water replenished": "vanduo papildytas", "cask": "statinait\u0117", "slash": "prapjauti", "the double doors creak endlessly in the wind.": "didel\u0117s durys li\u016bdnai girg\u017edi v\u0117jyje. ", "a pack of snarling beasts pours out of the trees.": "i\u0161 med\u017ei\u0173 i\u0161\u0161oka gauja urzgian\u010di\u0173 \u017ev\u0117ri\u0173.", "not enough meat": "neu\u017etenka m\u0117sos", "some villagers have died": "mir\u0117 dalis kaimie\u010di\u0173", "this old mine is not abandoned": "\u0161i sena kasykla neapleista", "mild": "gan \u0161ilta", "picking the bones finds some useful trinkets.": "tarp kaul\u0173 matosi keletas nauding\u0173 nieku\u010di\u0173.", "a man charges down the hall, a rusty blade in his hand": "koridoriumi atb\u0117ga \u017emogus, laikydamas sur\u016bdijus\u012f peil\u012f", "deep in the swamp is a moss-covered cabin.": "giliai pelk\u0117je stovi samanota trobel\u0117. ", "ignore them": "juos ignoruoti", "A Dark Room": "Tamsus Kambarys", "the villagers hang the thief high in front of the store room.": "kaimie\u010diai prie


GetSecret())
	out.CloudSQLInstance = CloudSQLInstance_FromProto(mapCtx, in.GetCloudSqlInstance())
	out.EmptyDir = EmptyDirVolumeSource_FromProto(mapCtx, in.GetEmptyDir())
	// MISSING: Nfs
	// MISSING: GCS
	return out
}
func Volume_ToProto(mapCtx *direct.MapContext, in *krm.Volume) *pb.Volume {
	if in == nil {
		return nil
	}
	out := &pb.Volume{}
	out.Name = direct.ValueOf(in.Name)
	if oneof := SecretVolumeSource_ToProto(mapCtx, in.Secret); oneof != nil {
		out.VolumeType = &pb.Volume_Secret{Secret: oneof}
	}
	if oneof := CloudSQLInstance_ToProto(mapCtx, in.CloudSQLInstance); oneof != nil {
		out.VolumeType = &pb.Volume_CloudSqlInstance{CloudSqlInstance: oneof}
	}
	if oneof := EmptyDirVolumeSource_ToProto(mapCtx, in.EmptyDir); oneof != nil {
		out.VolumeType = &pb.Volume_EmptyDir{EmptyDir: oneof}
	}
	// MISSING: Nfs
	// MISSING: GCS
	return out
}
func VolumeMount_FromProto(mapCtx *direct.MapContext, in *pb.VolumeMount) *krm.VolumeMount {
	if in == nil {
		return nil
	}
	out := &krm.VolumeMount{}
	out.Name = direct.LazyPtr(in.GetName())
	out.MountPath = direct.LazyPtr(in.GetMountPath())
	return out
}
func VolumeMount_ToProto(mapCtx *direct.MapContext, in *krm.VolumeMount) *pb.VolumeMount {
	if in == nil {
		return nil
	}
	out := &pb.VolumeMount{}
	out.Name = direct.ValueOf(in.Name)
	out.MountPath = direct.ValueOf(in.MountPath)
	return out
}
// Copyright 2025 Google LLC
//
// 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.

// +generated:mapper
// krm.group: backupdr.cnrm.cloud.google.com
// krm.version: v1beta1
// proto.service: google.cloud.backupdr.v1

package backupdr

import (
	pb "cloud.google.com/go/backupdr/apiv1/backupdrpb"
	krmbackupdrv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/apis/backupdr/v1alpha1"
	krm "github.com/GoogleCloudPlatform/k8s-config-connector/apis/backupdr/v1beta1"
	"github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct"
	dayofweekpb "google.golang.org/genproto/googleapis/type/dayofweek"
	monthpb "google.golang.org/genproto/googleapis/type/month"
)

func BackupDRBackupPlanAssociationObservedState_v1beta1_FromProto(mapCtx *direct.MapContext, in *pb.BackupPlanAssociation) *krm.BackupDRBackupPlanAssociationObservedState {
	if in == nil {
		return nil
	}
	out := &krm.BackupDR