: string) {
    return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
}

// deepFind({result: {data: 1}}, 'result.data', 2); // returns 1
export function deepFind(o: Object, path: string) {
    path = path.replace(/\[(\w+)\]/g, '.$1'); // convert indexes to properties
    path = path.replace(/^\./, '');           // strip a leading dot
    var a = path.split('.');
    for (var i = 0, n = a.length; i < n; ++i) {
        var k = a[i];
        if (k in o) {
            o = o[k];
        } else {
            return;
        }
    }
    return o;
}

/**
 * Deep merge two objects.
 * @param target
 * @param ...sources
 */
export function deepMerge(target: any, ...sources: any[]): any {
    if (!sources.length) return target;
    const source = sources.shift();

    if (isObject(target) && isObject(source)) {
        for (const key in source) {
            if (isObject(source[key])) {
                if (!target[key]) Object.assign(target, {[key]: {}});
                deepMerge(target[key], source[key]);
            } else {
                Object.assign(target, {[key]: source[key]});
            }
        }
    }

    return deepMerge(target, ...sources);
}
import { IWidgetModuleDownloadConfig } from "code/utils/interfaces";
import { RequestWithTimeout } from "./request-utils";

const ROOT_MODULE_PATH = "widget-loader";

export const widgetModuleDownloadConfig: IWidgetModuleDownloadConfig = {
    moduleName: "__moduleName__",
    rootUrl: "__rootUrl__",
    defaultWidgetParameter: "__defaultWidgetParameter__",
    downloadQueryString: "__downloadQueryString__",
}

async function getOrCreateWidgetModule(
    { moduleName, rootUrl, downloadQueryString }: IWidgetModuleDownloadConfig,
    forceDownload = false
) {
    const fm = FileManager.local()

    const rootModuleDir = fm.joinPath(fm.libraryDirectory(), ROOT_MODULE_PATH)
    enforceDir(fm, rootModuleDir);

    const widgetModuleDir = fm.joinPath(rootModuleDir, moduleName)
    enforceDir(fm, widgetModuleDir);

    const widgetModuleFilename = `${moduleName}.js`
    const widgetModuleEtag = `${moduleName}.etag`
    const widgetModulePath = fm.joinPath(widgetModuleDir, widgetModuleFilename)
    const widgetModuleEtagPath = fm.joinPath(widgetModuleDir, widgetModuleEtag)
    const widgetModuleDownloadUrl = rootUrl + widgetModuleFilename + (downloadQueryString.startsWith("?") ? downloadQueryString : "")

    try {
        // Check if an etag was saved for this file
        if (fm.fileExists(widgetModuleEtagPath) && !forceDownload) {
            const lastEtag = fm.readString(widgetModuleEtagPath)
            const headerReq = RequestWithTimeout(widgetModuleDownloadUrl);
            headerReq.method = "HEAD";
            await headerReq.load()
            const etag = getResponseHeader(headerReq, "Etag");
            if (lastEtag && etag && lastEtag === etag) {
                console.log(`ETag is same, return cached file for ${widgetModuleDownloadUrl}`)
                return widgetModulePath;
            }
        }

        console.log("Downloading library file '" + widgetModuleDownloadUrl + "' to '" + widgetModulePath + "'")
        const req = RequestWithTimeout(widgetModuleDownloadUrl)
        const libraryFile = await req.load()
        const etag = getResponseHeader(req, "Etag");
        if (etag) {
            fm.writeString(widgetModuleEtagPath, etag


     px = x;
        for (; i !== -1; ) {
          px = px.times(x2);
          t = r.minus(px.div(n += 2));
          px = px.times(x2);
          r = t.plus(px.div(n += 2));
          if (r.d[j] !== void 0) for (i = j; r.d[i] === t.d[i] && i--; ) ;
        }
        if (k) r = r.times(2 << k - 1);
        external = true;
        return finalise(r, Ctor.precision = pr, Ctor.rounding = rm, true);
      };
      P.isFinite = function() {
        return !!this.d;
      };
      P.isInteger = P.isInt = function() {
        return !!this.d && mathfloor(this.e / LOG_BASE) > this.d.length - 2;
      };
      P.isNaN = function() {
        return !this.s;
      };
      P.isNegative = P.isNeg = function() {
        return this.s < 0;
      };
      P.isPositive = P.isPos = function() {
        return this.s > 0;
      };
      P.isZero = function() {
        return !!this.d && this.d[0] === 0;
      };
      P.lessThan = P.lt = function(y) {
        return this.cmp(y) < 0;
      };
      P.lessThanOrEqualTo = P.lte = function(y) {
        return this.cmp(y) < 1;
      };
      P.logarithm = P.log = function(base) {
        var isBase10, d, denominator, k, inf, num, sd, r, arg = this, Ctor = arg.constructor, pr = Ctor.precision, rm = Ctor.rounding, guard = 5;
        if (base == null) {
          base = new Ctor(10);
          isBase10 = true;
        } else {
          base = new Ctor(base);
          d = base.d;
          if (base.s < 0 || !d || !d[0] || base.eq(1)) return new Ctor(NaN);
          isBase10 = base.eq(10);
        }
        d = arg.d;
        if (arg.s < 0 || !d || !d[0] || arg.eq(1)) {
          return new Ctor(d && !d[0] ? -1 / 0 : arg.s != 1 ? NaN : d ? 0 : 1 / 0);
        }
        if (isBase10) {
          if (d.length > 1) {
            inf = true;
          } else {
            for (k = d[0]; k % 10 === 0; ) k /= 10;
            inf = k !== 1;
          }
        }
        external = false;
        sd = pr + guard;
        num = naturalLogarithm(arg, sd);
        denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd);
        r = divide(num, denominator, sd, 1);
        if (checkRoundingDigits(r.d, k = pr, rm)) {
          do {
            sd += 10;
            num = naturalLogarithm(arg, sd);
            denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd);
            r = divide(num, denominator, sd, 1);
            if (!inf) {
              if (+digitsToString(r.d).slice(k + 1, k + 15) + 1 == 1e14) {
                r = finalise(r, pr + 1, 0);
              }
              break;
            }
          } while (checkRoundingDigits(r.d, k += 10, rm));
        }
        external = true;
        return finalise(r, pr, rm);


#ifndef  BASE_EXTENSION_ENCRYPT_H_
#define  BASE_EXTENSION_ENCRYPT_H_

#include "extension/config/build_config.h"
#include <string>
#include <list>
#include <map>
#include <memory>

EXTENSION_BEGIN_DECLS

// enum the encrypt algorithm
enum EncryptMethod
{
    ENC_NO            =     0,
    /*    stream */
    ENC_ARC4          =     1,
    //    block
    ENC_RC2           =     10,
    ENC_RC5           =     11,    // TODO
    ENC_IDEA          =     12,    // TODO
    ENC_CAST          =     13,
    ENC_AES128        =     14,
    ENC_AES192        =     15,
    ENC_AES256        =     16,
    ENC_DES64         =     17,
	ENC_DES128        =     18,    // TODO
	ENC_AES128_CBC = 19,
	ENC_AES256_CBC = 20,
	ENC_SM4_ECB = 21,

    //    hash
    ENC_MD2           =     100,
    ENC_MD4           =     101,
    ENC_MD5           =     102,
    ENC_SHA           =     103,
    ENC_SHA1          =     104,
    ENC_DSS           =     105,
    ENC_DSS1          =     106,

    //    keyless

    //    Asymmetric algorithm
    ENC_RSA           =     300,
	ENC_SM2			 =		 301,
	ENC_SM3			 =		 302,
    //    custom
    ENC_USR           =     1000
};

// interface of encrypt algorithm
class EncryptMethodInterface
{
public:
	virtual bool SetEncryptKey(const std::string &key) = 0;
	virtual bool SetDecryptKey(const std::string &key) = 0;
	virtual bool SetEncryptIvParameterSpec(const std::string &iv) = 0;
	virtual bool SetDecryptIvParameterSpec(const std::string &iv) = 0;
	virtual bool EnableEncryptPadding(bool enable,int value) = 0;
	virtual bool EnableDecryptPadding(bool enable, int value) = 0;
	virtual NS_EXTENSION::EncryptMethod Type() const = 0;
	virtual bool Encrypt(std::string &data) = 0;
	virtual bool Decrypt(std::string &data) = 0;
	virtual bool Encrypt(const std::string &sdata, std::string &ddata) = 0;
	virtual bool Decrypt(const std::string &sdata, std::string &ddata) = 0;
	virtual bool Encrypt(const void *sdata, size_t ssize, std::string &ddata) = 0;
	virtual bool Decrypt(const void *sdata, size_t ssize, std::string &ddata) = 0;
	virtual bool CreateKey(std::string &key1, std::string &key2) = 0 ;
    virtual bool SetPaddingMode(int padding_mode) = 0;
};
typedef std::shared_ptr<EncryptMethodInterface>  EncryptMethodInterface_var;
typedef EncryptMethodInterface*                       EncryptMethodInterface_ptr;

//
class EncryptInterface : public NS_EXTENSION::EncryptMethodInterface
{
public:
	virtual bool SetMethod(NS_EXTENSION::EncryptMethod type) = 0;
	virtual void ListSupportMethods(std::list<NS_EXTENSION::EncryptMethod> &types) = 0;
	virtual bool AddMethod(NS_EXTENSION::EncryptMethodInterface_var method) = 0;
	virtual bool RemoveMethod(NS_EXTENSION::EncryptMethod type) = 0;
	virtual NS_EXTENSION::EncryptMethodInterface* CreateMethod(NS_EXTENSION::EncryptMethod type) = 0;
};
typedef std::shared_ptr<EncryptInterface>        EncryptInterface_var;
typedef EncryptInterface*                             EncryptInterface_ptr;

////////////////////////////////////////////////////////////////
//    simple encrypt instead of cleartext
inline NS_EXTENSION::EncryptMethod cm()
{
    return NS_EXTENSION::ENC_NO;  // test
}
inline const std::string& cek()
{
	// 32 bytes block
    static std::string k;
    // static std::string k = "581afc6ecc2e692539ad70893c9cb991";
    return k;
}
inline const std::string & cdk()
{
	// 32 bytes block
    static std::string k;
    //static std::string k = "581afc6ecc2e692539ad70893c9cb991";
    return k;
}
EXTENSION_END_DECLS

#endif  // BASE_EXTENSION_ENCRYPT_H_


et mut s = String::with_capacity(v.len());

    for &ch in v.iter() {
        s.push(if is_symbol(ch) {ch} else {b'_'} as char);
    }

    s
}

fn hex_to_u8(a: u8) -> u8 {
    match a {
        b'0'...b'9' => a - b'0',
        b'a'...b'h' => a - b'a' + 10,
        _           => 0
    }
}

fn vec_u8_from_hex_string(s: &String) -> Vec<u8> {
    s.as_bytes().chunks(2).map(|a| hex_to_u8(a[0]) * 16 + hex_to_u8(a[1])).collect()
}

fn vec_xor(v1: &Vec<u8>, v2: &Vec<u8>) -> Vec<u8> {
    let mut v = Vec::with_capacity(cmp::min(v1.len(), v2.len()));

    for (a, b) in v1.iter().zip(v2.iter()) {
        v.push(a ^ b);
    }

    v
}

fn main() {
    let input_file = File::open("in.txt").unwrap();
    let input = BufReader::new(input_file);
    let input: Vec<_> = input.lines().filter_map(|res| res.ok()).take(11).map(|s| vec_u8_from_hex_string(&s)).collect();
    let mut key: Vec<u8> = vec![0; 200];
    let mut ws: Vec<u8> = vec![0; 200];

    for i in 0..11 {
        let c_i = &input[i];
        println!("c_{}:", i);
        let c_xor: Vec<_> = input.iter().map(|v| to_ascii(&vec_xor(c_i, &v))).collect();

        for x_j in c_xor.iter() {
            println!("{}", x_j);
        }

        for k in 0..c_i.len() {
            let mut w = 0;

            for x_j in c_xor.iter() {
                if k < x_j.len() && is_alpha(x_j.as_bytes()[k]) {
                    w += 1;
                }
            }

            if w > ws[k] {
                key[k] = c_i[k] ^ b' ';
                ws[k] = w;
            }
        }

        println!("key: {:?}\n", key);
    }

    for i in 0..11 {
        println!("msg {}:\t{}\n", i, to_ascii(&vec_xor(&input[i], &key)));
    }
}

#[derive(Debug, Clone)]
pub enum Currency {
    Bitcoin(f32),
    Etherium(f32),
    USD(f32),
    Invalid,
}

#[derive(Debug)]
pub struct NotFound;

pub trait CurrencyPrinter {
    fn new() -> Self
    where
        Self: Sized;
    fn print(&self, currency: Currency) -> Result<(), NotFound>;
}

pub struct PrinterWrapper<T>
where
    T: CurrencyPrinter,
{
    this: T,
    next: Option<Box<CurrencyPrinter>>,
}

impl<T> PrinterWrapper<T>
where
    T: CurrencyPrinter,
{
    pub fn new(next: Option<Box<CurrencyPrinter>>) -> Self {
        PrinterWrapper::<T> {
            this: T::new(),
            next,
        }
    }
}

impl<T> CurrencyPrinter for PrinterWrapper<T>
where
    T: CurrencyPrinter,
{
    fn new() -> Self {
        PrinterWrapper::<T> {
            this: T::new(),
            next: None,
        }
    }

    fn print(&self, currency: Currency) -> Result<(), NotFound> {
        match self.this.print(currency.clone()) {
            Ok(_) => Ok(()),
            Err(_) => {


 = envelope ? envelope.decay : 0;
    const sustain = envelope ? envelope.sustain : 100;

    const now = ctx.currentTime;
    const gain = ctx.createGain();

    velocity = limitNumber(velocity, VELOCITY.MIN, VELOCITY.MAX);
    velocity = velocity / VELOCITY.MAX;

    const volume = limitNumber(velocity * (data.gain / 100), VOLUME_MIN, VOLUME_MAX, true);

    const attackTime = now + attack;
    const decayTime = attackTime + decay;
    const sustainValue = volume * sustain / 100;

    gain.gain.setValueAtTime(VOLUME_MIN, now);
    gain.gain.linearRampToValueAtTime(volume, attackTime);
    gain.gain.linearRampToValueAtTime(sustainValue, decayTime);

    return gain;
};
import {isDefined} from "../../utils/common";

export interface INumberOfProcessesHelper {
    setNumber(value:number):void;
    getNumber():number;
}

export class NumberOfProcessesHelper implements INumberOfProcessesHelper {

    private _number:number = 1;

    constructor(value?:number) {
        if (isDefined(value)) {
            this.setNumber(value);
        }
    }

    public setNumber(value:number):void {
        this._number = value;
    }

    public getNumber():number {
        return this._number;
    }

}export class Utility {
  constructor() { }
  generateArray(obj) {
    if (obj && Object.keys(obj).length > 0) {
      return Object.keys(obj).map((key) => { return obj[key] });
    }
    return [];
  }

  /**
   * index of the array in which the object was found.
   * if index = -1, then the object was not found
   * Returns {
   *  index: index, bool: true|false
   * }
   * @param obj Object to be searched in the list
   * @param list List of type array in which the object is to be searched
   */
  containsObject(obj, list) {
    for (let index = 0; index < list.length; index++) {
      if (this.objectEquals(list[index].config, obj)) {
        return {
          "index": index,
          "bool": true
        }
      }
    }
    return {
      "index": -1,
      "bool": false
    };
  }

  objectEquals(x, y) {

    if (x === null || x === undefined || y === null || y === undefined) { return x === y; }
    // after this just checking type of one would be enough
    if (x.constructor !== y.constructor) { return false; }
    // if they are functions, they should exactly refer to same one (because of closures)
    if (x instanceof Function) { return x === y; }
    // if they are regexps, they should exactly refer to same one (it is hard to better equality check on current ES)
    if (x instanceof RegExp) { return x === y; }
    if (x === y || x.valueOf() === y.valueOf()) { return true; }
    if (Array.isArray(x) && x.length !== y.length) { return false; }

    // if they are dates, they must had equal valueOf
    if (x instanceof Date) { return false; }

    // if they are strictly equal, they both need to be object at least
    if (!(x instanceof Object)) { return false; }
    if (!(y instanceof Object)) { return false; }

    // recursive object equality check
    var p = Object.keys(x);
    return Object.keys(y).every(function (i) { return p.indexOf(i) !== -1; }) &&
      p.every((i) => { return this.objectEquals(x[i], y[i]); });
  }

  generateUUID() {
    return this.__s4() + this.__s4() + '-' + this.__s4() + '-' + this.__s4() + '-' + th


v("SCSI_MODES")) == NULL)
			pagedb_path = DEFAULT_SCSI_MODE_DB;

		if (load_format(pagedb_path, page) != 0 && (edit || verbose)) {
			if (errno == ENOENT) {
				/* Modepage database file not found. */
				warn("cannot open modepage database \"%s\"",
				    pagedb_path);
			} else if (errno == ESRCH) {
				/* Modepage entry not found in database. */
				warnx("modepage %d not found in database"
				    "\"%s\"", page, pagedb_path);
			}
			/* We can recover in display mode, otherwise we exit. */
			if (!edit) {
				warnx("reverting to binary display only");
				binary = 1;
			} else
				exit(EX_OSFILE);
		}

		editlist_populate(device, page, page_control, dbd, retry_count,
			timeout);
	}

	if (edit) {
		if (page_control << PAGE_CTRL_SHIFT != SMS_PAGE_CTRL_CURRENT &&
		    page_control << PAGE_CTRL_SHIFT != SMS_PAGE_CTRL_SAVED)
			errx(EX_USAGE, "it only makes sense to edit page 0 "
			    "(current) or page 3 (saved values)");
		modepage_edit();
		editlist_save(device, page, page_control, dbd, retry_count,
			timeout);
	} else if (binary || STAILQ_EMPTY(&editlist)) {
		/* Display without formatting information. */
		modepage_dump(device, page, page_control, dbd, retry_count,
		    timeout);
	} else {
		/* Display with format. */
		modepage_write(stdout, 0);
	}
}

void
mode_list(struct cam_device *device, int page_control, int dbd,
	  int retry_count, int timeout)
{
	u_int8_t data[MAX_COMMAND_SIZE];/* Buffer to hold sense data. */
	struct scsi_mode_header_6 *mh;	/* Location of mode header. */
	struct scsi_mode_page_header *mph;
	struct pagename *nameentry;
	const char *pagedb_path;
	int len;

	if ((pagedb_path = getenv("SCSI_MODES")) == NULL)
		pagedb_path = DEFAULT_SCSI_MODE_DB;

	if (load_format(pagedb_path, 0) != 0 && verbose && errno == ENOENT) {
		/* Modepage database file not found. */
		warn("cannot open modepage database \"%s\"", pagedb_path);
	}

	/* Build the list of all mode pages by querying the "all pages" page. */
	mode_sense(device, SMS_ALL_PAGES_PAGE, page_control, dbd, retry_count,
	    timeout, data, sizeof(data));

	mh = (struct scsi_mode_header_6 *)data;
	len = mh->blk_desc_len;		/* Skip block descriptors. */
	/* Iterate through the pages in the reply. */
	while (len < mh->data_length) {
		/* Locate the next mode page header. */
		mph = (struct scsi_mode_page_header *)
		    ((intptr_t)mh + sizeof(*mh) + len);

		mph->page_code &= SMS_PAGE_CODE;
		nameentry = nameentry_lookup(mph->page_code);

		if (nameentry == NULL || nameentry->name == NULL)
			printf("0x%02x\n", mph->page_code);
		else
			printf("0x%02x\t%s\n", mph->page_code,
			    nameentry->name);
		len += mph->page_length + sizeof(*mph);
	}
}


())"
	default:
		return fmt.Sprintf("fn test() -> int = %s 42\nfn main() -> int = test()", keyword)
	}
}

// testFiberNesting tests fiber expression nesting.
func testFiberNesting(t *testing.T) {
	t.Run("fiber_nesting", func(t *testing.T) {
		nestedFiberTests := []string{
			"await (spawn 42)",
			"spawn (await (spawn 42))",
			"yield (spawn 42)",
			"spawn (yield 42)",
		}

		for i, expr := range nestedFiberTests {
			var source string

			switch i {
			case 0: // "await (spawn 42)" - returns int
				source = fmt.Sprintf("fn test() -> int = %s\nfn main() -> int = test()", expr)
			case 1: // "spawn (await (spawn 42))" - returns Fiber
				source = fmt.Sprintf("fn test() -> Fiber = %s\nfn main() -> int = await(test())", expr)
			case 2: // "yield (spawn 42)" - returns Fiber
				source = fmt.Sprintf("fn test() -> Fiber = %s\nfn main() -> int = await(test())", expr)
			case 3: // "spawn (yield 42)" - returns Fiber
				source = fmt.Sprintf("fn test() -> Fiber = %s\nfn main() -> int = await(test())", expr)
			default:
				source = fmt.Sprintf("fn test() -> int = %s\nfn main() -> int = test()", expr)
			}

			_, err := codegen.CompileToLLVM(source)
			if err != nil {
				t.Errorf("Nested fiber expression %d should compile: %v", i, err)
			} else {
				t.Logf("✅ Nested fiber expression %d compiled successfully", i)
			}
		}
	})
}

// testChannelOperations tests channel operations.
func testChannelOperations(t *testing.T) {
	t.Run("channel_operations", func(t *testing.T) {
		channelTests := map[string]string{
			"channel_creation": "Channel<int> { capacity: 10 }",
			"channel_send":     "send(Channel<int> { capacity: 1 }, 42)",
			"channel_recv":     "recv(Channel<int> { capacity: 1 })",
			"typed_channel":    "Channel<string> { capacity: 5 }",
		}

		for name, expr := range channelTests {
			var source string

			switch name {
			case "channel_creation", "typed_channel":
				source = fmt.Sprintf("fn test() -> Channel = %s\nfn main() -> int = recv(test())", expr)
			case "channel_send":
				source = fmt.Sprintf("fn test() -> int = %s\nfn main() -> int = test()", expr)
			case "channel_recv":
				source = fmt.Sprintf("fn test() -> int = %s\nfn main() -> int = test()", expr)
			default:
				source = fmt.Sprintf("fn test() -> int = %s\nfn main() -> int = test()", expr)
			}

			_, err := codegen.CompileToLLVM(source)
			if err != nil {
				t.Errorf("Channel operation %s should compile: %v", name, err)
			} else {
				t.Logf("✅ Channel operation %s compiled successfully", name)
			}
		}
	})
}

// testFiberLambdas tests lambda expressions with fibers.
func testFiberLambdas(t *testing.T) {
	t.Run("fiber_lambdas", func(t *testing.T) {
		// Skip lambda call tests for now due to parser/type inference issues
		// TODO: Fix lambda call parsing and type inference
		lambdaTests := []string{
			"spawn 42",
			"await (spawn 42)",
			"yield 42",
			"42",
		}

		for i, expr := range lambdaTests {
			var source string

			switch i {
			case 0: // "spawn 42" - returns Fiber
				source = fmt.Sprintf("


检查Google API发送的状态码是否为200 OK来作为判断依据。下图中，我们作为答案发送的值是“InvalidAnswerOfCAPTCHA”

你可以在Github上下载到该利用代码：https://github.com/securelayer7/Captch-Bypass-Vulnerable-Script/tree/master/CaptchaExploits

执行问题＃2：

验证码存在于web页面，在用户提交后将被验证，但问题却出在了if和else一个简单的子句中。这个错误是由于开发人员将响应码写在了其它部分形成的。所以这里即使验证码答案是错误的，应用程序仍将给予用户积极的响应。

你可以在Github上下载到该验证码的源码：https://github.com/securelayer7/Captch-Bypass-Vulnerable-Script/blob/master/GooglereCAPTCHA/weakcaptcha2.php

如何破解？

攻击者只需要制作一个脚本，即可向验证码发送任意值。在下图中，我们作为答案发送的值是“InvalidAnswerOfCAPTCHA”

<img alt="weak-captcha-2-crack


?}\n\
                      framed::decode: recv_checksum = {:?}",
                     calc_checksum, recv_checksum);
        }

        if &*calc_checksum != recv_checksum {
            return Err(Error::ChecksumError);
        }

        Ok(payload.len())
    }

    /// Decode the supplied encoded frame, returning the payload on the heap.
    #[cfg(feature = "use_std")]
    pub fn decode_to_box(&mut self, e: &Encoded) -> Result<BoxPayload> {
        if e.len() == 0 {
            return Err(Error::EofBeforeFrame);
        }
        let mut buf = vec![0; max_decoded_len(e.len())];
        let len = self.decode_to_slice(e, &mut buf)?;
        buf.truncate(len);
        Ok(BoxPayload::from(buf))
    }

    /// Reads bytes from the supplied `Read` until it has a complete
    /// encoded frame, then decodes the frame, returning the payload on the heap.
    #[cfg(feature = "use_std")]
    pub fn decode_from_reader<R: Read>(&mut self, r: &mut dyn Read)
    -> Result<BoxPayload> {
        // Read until FRAME_END_SYMBOL
        let mut next_frame = Vec::new();
        let mut b = 0u8;
        loop {
            let res = r.read(ref_slice_mut(&mut b));
            #[cfg(feature = "trace")] {
                println!("framed: Read result = {:?}", res);
            }
            match res {
                // In the 2 EOF cases defer to decode_to_box to return the
                // correct error (EofBeforeFrame or EofDuringFrame).
                Err(ref e) if e.kind() == io::ErrorKind::UnexpectedEof =>
                    return self.decode_to_box(&*next_frame),
                Ok(0) =>
                    return self.decode_to_box(&*next_frame),

                Err(e) => return Err(Error::from(e)),
                Ok(1) => (),
                Ok(_) => unreachable!(),
            };

            #[cfg(feature = "trace")] {
                println!("framed: Read byte = {}", b);
            }
            next_frame.push(b);
            if b == FRAME_END_SYMBOL {
                break;
            }
        }
        assert_eq!(next_frame[next_frame.len()-1], FRAME_END_SYMBOL);

        self.decode_to_box(&*next_frame)
    }
} // End of impl Codec.

const_fn! {
    /// Returns an upper bound for the decoded length of the payload
    /// within a frame with the encoded length supplied.
    ///
    /// Useful for calculating an appropriate buffer length.
    pub fn max_decoded_len(code_len: usize) -> usize {
        // This is an over-estimate of the required decoded buffer, but
        // wasting MAX_HEADER_LEN + MAX_FOOTER_LEN bytes should be acceptable and
        // we can calculate this trivially in a const fn.
        code_len
    }
}

const_fn! {
    /// Returns an upper bound for the encoded length of a frame with
    /// the payload length supplied.
    ///
    /// Useful for calculating an appropriate buffer length.
    pub fn max_encoded_len(payload_len: usize) -> usize {
        MAX_FRAMING_LEN
            + cobs_max_encoded_len(payload_len)
    }
}

const_fn! {
    /// Copied from `cobs` crate and modified to make a `const` version.
    ///
    /// Source: https://github.com/awelkie/cobs.rs/blob/f8ff1ad2aa7cd069a924d75170d3def3


ide fun onMidiData(midiData: MidiData) {
        Platform.runLater {
            val note = midiData.note
            val label = if (note.mainNote.isSharp) notes[note.parentNote!!] else notes[note]
            if (label != null) {
                if (midiData.event == MidiEvent.NOTE_ON) {
                    if (note.mainNote.isSharp) {
                        label.style = "-fx-text-fill: blue; -fx-background-color: green;"
                    } else {
                        label.style = "-fx-text-fill: red; -fx-background-color: yellow;"
                    }
                } else {
                    label.style = ""
                }
            }
        }
    }

    override fun onPlayEvent(playEvent: PlayEvent) {
        // Not needed here
    }

    companion object {
        private val logger: Logger = LogManager.getLogger(ScaleStage::class.java.name)
    }
}package be.codewriter.melodymatrix.view.stage.chart.component

import be.codewriter.melodymatrix.view.definition.MainNote
import be.codewriter.melodymatrix.view.definition.Note
import be.codewriter.melodymatrix.view.definition.Octave
import eu.hansolo.fx.charts.ChartType
import eu.hansolo.fx.charts.XYPane
import eu.hansolo.fx.charts.data.XYChartItem
import eu.hansolo.fx.charts.series.XYSeries
import eu.hansolo.fx.charts.series.XYSeriesBuilder
import javafx.application.Platform
import javafx.geometry.Pos
import javafx.scene.control.Label
import javafx.scene.layout.HBox
import javafx.scene.layout.Priority
import javafx.scene.layout.VBox
import javafx.scene.paint.Color
import javafx.scene.paint.CycleMethod
import javafx.scene.paint.LinearGradient
import javafx.scene.paint.Stop

class RidgeLineChartPlayedNotes : ChartBase(), ChartVisualizer {

    private val chartBox: VBox = VBox().apply {
        prefHeight = Double.MAX_VALUE
        prefWidth = Double.MAX_VALUE
        //style = "-fx-border-color: black; -fx-border-width: 2px; -fx-border-style: solid; -fx-border-radius: 5px;"
    }

    private val gradient: LinearGradient = LinearGradient(
        0.0, 0.0, 1.0, 0.0, true, CycleMethod.NO_CYCLE,
        Stop(0.00, Color.rgb(0, 0, 200, 0.5)),
        Stop(0.25, Color.rgb(122, 0, 183, 0.5)),
        Stop(0.50, Color.rgb(255, 0, 0, 0.5)),
        Stop(0.75, Color.rgb(255, 175, 0, 0.5)),
        Stop(1.00, Color.rgb(255, 255, 0, 0.5))
    )

    private var chords: MutableMap<Octave, List<XYChartItem>> =
        mutableMapOf()

    init {
        for (octave in Note.usedAndSortedOctaves()) {
            val notes: MutableList<XYChartItem> = mutableListOf()
            var counter = 0.0
            MainNote.entries.stream()
                .forEach { mn ->
                    run {
                        notes.add(XYChartItem(counter, 0.0, mn.name))
                        counter++
                    }
                }
            chords.put(octave, notes)
        }

        for (chord in chords) {
            val xySeries: XYSeries<*> = XYSeriesBuilder.create()
                .items(chord.value)
                .chartType(ChartType.RIDGE_LINE)
                .fill(gradient)
                .stroke(Color.BLACK)
                .strokeWidth(1.0)
                .build()
            val ridgeLineChart = XYPane(xySeries).apply {
                upperBoundX = xySeries.items.size


}

    configuration { "wasm*" }
        defines {
            "WREN_NAN_TAGGING=0",
        }

    configuration { "mingw* or linux or osx or wasm*" }
        buildoptions {
            "-Wno-unused-parameter",
        }

    configuration { "osx or *-clang* or wasm*" }
        buildoptions {
            "-Wno-macro-redefined", -- for __STDC_LIMIT_MACROS, we can't touch the source and don't want to touch the toolchain
        }

    configuration { "vs*", "not wasm*" }
        buildoptions {
            "/wd4100", -- warning C4100: 'vm': unreferenced formal parameter
            "/wd4200", -- warning C4200: nonstandard extension used: zero-sized array in struct/union
            "/wd4709", -- warning C4200: comma operator within array index expression
        }

	configuration {}


42AC5C */  lw    $v0, %lo(sDmaMgrQueueFullLogged)($v0)
/* 002320 80001720 1440001D */  bnez  $v0, .L80001798
/* 002324 80001724 00000000 */   nop
/* 002328 80001728 8CE90008 */  lw    $t1, 8($a3)
/* 00232C 8000172C 8CEB0010 */  lw    $t3, 0x10($a3)
/* 002330 80001730 3C048001 */  lui   $a0, %hi(D_80011BE8) # $a0, 0x8001
/* 002334 80001734 24420001 */  addiu $v0, $v0, 1
/* 002338 80001738 012B082A */  slt   $at, $t1, $t3
/* 00233C 8000173C 14200016 */  bnez  $at, .L80001798
/* 002340 80001740 24841BE8 */   addiu $a0, %lo(D_80011BE8) # addiu $a0, $a0, 0x1be8
/* 002344 80001744 3C018001 */  lui   $at, %hi(sDmaMgrQueueFullLogged) # $at, 0x8001
/* 002348 80001748 AC22AC5C */  sw    $v0, %lo(sDmaMgrQueueFullLogged)($at)
/* 00234C 8000174C 0C00084C */  jal   osSyncPrintf
/* 002350 80001750 24050007 */   li    $a1, 7
/* 002354 80001754 3C048001 */  lui   $a0, %hi(D_80011BEC) # $a0, 0x8001
/* 002358 80001758 0C00084C */  jal   osSyncPrintf
/* 00235C 8000175C 24841BEC */   addiu $a0, %lo(D_80011BEC) # addiu $a0, $a0, 0x1bec
/* 002360 80001760 3C048001 */  lui   $a0, %hi(D_80011BF4) # $a0, 0x8001
/* 002364 80001764 0C00084C */  jal   osSyncPrintf
/* 002368 80001768 24841BF4 */   addiu $a0, %lo(D_80011BF4) # addiu $a0, $a0, 0x1bf4
/* 00236C 8


  birth,
    sex,
    name,
    pedigreeName,
    breed,
    litter,
    breedingName,
    momPkr,
    dadPkr,
  } = dogData;
  await prisma.dog.create({
    data: {
      pkr,
      birth: new Date(birth),
      sex,
      name,
      pedigreeName,
      breed,
      litter,
      breeding: { connect: { name: breedingName } },
      mom: momPkr ? { connect: { pkr: momPkr } } : undefined,
      dad: dadPkr ? { connect: { pkr: dadPkr } } : undefined,
    },
  });
};

export {
  // changePKR,
  getAllDogs,
  getDogWithChildren,
  updateDog,
  addDog,
  addTitle,
};
import FishBasePool from "../FishBasePool";
export default class FishPool extends FishBasePool {
    private static _intance: FishPool = null;
    public static intance() {
        if (!FishPool._intance) {
            FishPool._intance = new FishPool()
        }
        return FishPool._intance;
    }
}module RCustom {

    // 2019/08/25 Note:
    // egret的粒子系統採用 DisplayObject 此Class 只有一個純顯示對象，就類似是顯示一張圖片
    // 但是不可能，因為粒子系統是採用多個粒子
    // 所以推斷 egret粒子系統，採用 根據時間點做 x y 等等顯示物件的屬性位置等計算，並將之存放於 egret.Matrix (此Class為專門計算位置等物件屬性的轉換參數空間) 內
    // 1. 顯示的texure置入 this.$renderNode.addNode(Node[i]) 內
    // 2. Node[i].matrix = 當前粒子的 x y alpha .... 等顯示物件的基本參數 組成的一個matrix
    // 優點：粒子系統本身是 DisplayObject 而不是 DisplayObjectContainer ，兩者不乾淨程度差異很多，一個是顯示物件，一個是具有容器功能的顯示物件
    // 優點：粒子本身 不具有顯示功能，只具有計算這個粒子於這個時間點應該楚瑜哪個位置，等等純數學計算，非常之乾淨，
    // 優點：此方法執行的效能，是超級超級乾淨的，是可以看著看著就笑起來的程式碼，但是無法得知 GIF 是否能接受
    // 缺點：難移植，一切都是依靠 $renderNode 和 matrix ，無法得知其他遊戲引擎是否具有類似數據
    // 缺點：需要一定程度的Codeing能力，還要經過大量測試

    // 現階段，因為美術追殺的很緊迫，沒有時間實現以上功能，所以當前是
    // 粒子系統本身是 顯示容器，粒子本身 是 純顯示物件
    // 優點：容易移植，撰寫時間不需要很久，容易移植其他遊戲引擎
    // 缺點：效能無法最佳化

    export class ParticeSystem extends egret.DisplayObjectContainer {

        public IsVertical: boolean = true;           // 畫面是否為橫版
        private LastStartTime: number = 0;          // 紀錄上次的噴發時間點
        private FreamTime: number = 0;              // 紀錄這一次要噴發多少時間

        public static MaxDisplayTime: number;       // Debug用的變數
        private ParticeID: number;                  // Debug用的 辨別粒子的ID

        private mcFactory: egret.MovieClipDataFactory;  // 粒子需要的GIF素材工廠
        private display: egret.


/************************************************************************/
/*									*/
/*			tzbits.c					*/
/*		C Implementation by: Steve Hwan				*/
/*									*/
/*		Creation Date: 16 October 1993				*/
/*		Last Modified: 22 October 1993				*/
/*									*/
/*	This is a driver program to test the routines zbits.c and	*/
/* zhbits.c.								*/
/* 	This program can be called without any parameters and it	*/
/* should look just like the output of the old bits program.  Option-	*/
/* ally, it can be called with the following parameters in the		*/
/* following order:							*/
/*									*/
/************************************************************************/
#include <stdio.h>
#include <string.h>
#include "vicmain_c"
#include "ftnbridge.h"

#define SUCCESS		1
#define LAST_BIT_SHORT	(8* sizeof(short int) -1)
#define LAST_BIT_LONG	(8* sizeof(long int) -1)

void ztbits()
{
  FTN_NAME(tbits)();
}

/* tzbits_help just prints out the parameters to use the test program */
void tzbits_help(hbit)
int hbit;
{
  char mymessage[80];

  zvmessage("Optional parameters are:","");
  zvmessage("HWORD   half word input(hex)    default: 0x05AF","");
  zvmessage("FWORD   full word input(hex)    default: 0x0055AAFF","");
  zvmessage("LOBIT   low(starting) bit(dec)  default: 0","");
  sprintf(mymessage,"HIBIT  high(ending) bit(dec)   default: %d\n",hbit);
  zvmessage("Or type tzbits help to get this message\n","");
  zvmessage(mymessage,"");

  return;
}

main44()
{
  int i;			/* dummy index */
  short int half_in;		/* half word input */
  long  int word_in;		/* full word input */
  int lbit,hbit;		/* starting and ending of bits to extract */
  long int output_word;		/* return value */
  char card[132];		/* dummy string to pass to zvmessage */
  char temp[132];			/* temporary string to deal with zv routines */
  int count;			/* used in zvp */

  /*** GET PARAMETERS LOBIT,HIBIT ***/
  zvp("LOBIT", &lbit, &count);
  zvp("HIBIT", &hbit, &count);
  if (hbit==-1) hbit=LAST_BIT_LONG;

  /*** GET PARAMETER HWORD ***/
  zvp("HWORD", temp, &count);
  if (count<=0)
    half_in=0x05AF;
  else {
    if (!strcmp(temp,"help")) {
      tzbits_help(hbit);
      return;
    }
    count=sscanf(temp,"%hx",&half_in);
    if (count<=0)
      half_in=0x05AF;
  } /* else */

  /*** GET PARAMETER FWORD ***/
  zvp("FWORD", temp, &count);
  if (count<=0)
    word_in=0x0055AAFF;
  else {
    count=sscanf(temp,"%x",&word_in);
    if (count<=0)
      word_in=0x0055AAFF;
  }

  /* arbitrary part - lets user select which bits to look at in addition */
  /* to normal test. */
  zvmessage("Running user selected lbit and hbit.(Defaults to whole word)","");
  zbits(word_in, lbit,hbit, &output_word);
  sprintf(temp,"\t %x\n",output_word);
  zvmessage(temp,"");

  /* Test the half word routine, looking bit by bit */
  zvmessage("*****Half word tests*****","");
  card[0]=0;
  for(i=LAST_BIT_SHORT; i>=0; i--) {
    zhbits(half_in, i,i,&output_word);
    sprintf(temp,"%x",output_word);
    strcat(card,temp);
  }
  zvmessage(card,"");

  /* Test the full word routine, looking bit by bit */
  zvmessage("*****Full word tests*****","");
  card[0]=0;
  for(i=LAST_BIT_LONG; i>=0; i--) {
    zbits(word_in, i,i,&output_word);
    sprintf(temp,"%x",output_word);
    strcat(card,temp);
  }
  zvmessage(card,"");

  zvmessage("Calling FORTRAN version....","");
  ztbits();

}


v_FromFont.getStrikeout());
            v_ToFont.setTypeOffset(        v_FromFont.getTypeOffset());
            v_ToFont.setUnderline(         v_FromFont.getUnderline());
        }
        else if ( i_FromFont instanceof XSSFFont )
        {
            XSSFFont v_FromFont = (XSSFFont)i_FromFont;
            XSSFFont v_ToFont   = (XSSFFont)i_ToFont;

            v_ToFont.setBold(              v_FromFont.getBold());
            v_ToFont.setCharSet(           v_FromFont.getCharSet());
            v_ToFont.setFamily(            v_FromFont.getFamily());
            v_ToFont.setFontHeight(        v_FromFont.getFontHeight());
            v_ToFont.setFontHeightInPoints(v_FromFont.getFontHeightInPoints());
            v_ToFont.setFontName(          v_FromFont.getFontName());
            v_ToFont.setItalic(            v_FromFont.getItalic());
            v_ToFont.setScheme(            v_FromFont.getScheme());
            v_ToFont.setStrikeout(         v_FromFont.getStrikeout());
            v_ToFont.setTypeOffset(        v_FromFont.getTypeOffset());
            v_ToFont.setUnderline(         v_FromFont.getUnderline());

            /*
             * 注意：不能设置ThemeColor，否则颜色会变成白色。Del 2020-11-11
            v_ToFont.setThemeColor(        v_FromFont.getThemeColor());
            */

            if ( v_FromFont.getXSSFColor() != null && v_FromFont.getXSSFColor().getARGBHex() != null )
            {
                v_ToFont.setColor(new XSSFColor());
                v_ToFont.getXSSFColor().setARGBHex(v_FromFont.getXSSFColor().getARGBHex());
//                v_ToFont.getXSSFColor().setRGB(    v_FromFont.getXSSFColor().getARGB());
//                v_ToFont.getXSSFColor().setAuto(   v_FromFont.getXSSFColor().isAuto());
//                v_ToFont.getXSSFColor().setIndexed(v_FromFont.getXSSFColor().getIndexed());
//                v_ToFont.getXSSFColor().setTheme(  v_FromFont.getXSSFColor().getTheme());
//                v_ToFont.getXSSFColor().setTint(   v_FromFont.getXSSFColor().getTint());
            }
            else
            {
                v_ToFont.setColor(         v_FromFont.getColor());
            }
        }
    }

    /**
     * 查找一模一样的字体对象
     *
     * @author      ZhengWei(HY)
     * @createDate  2017-11-16
     * @version     v1.0
     *
     * @param i_Workbook
     * @param i_Font
     * @return
     */
    public final static XSSFFont findFont(XSSFWorkbook i_Workbook ,XSSFFont i_Font)
    {
        List<XSSFFont> v_FontList = i_Workbook.getStylesSource().getFonts();

        if ( !Help.isNull(v_FontList) )
        {
            for (XSSFFont v_TemplateFont : v_FontList)
            {
                if ( v_TemplateFont.getBold() == i_Font.getBold() )
                {
                    if ( v_TemplateFont.getColor() == i_Font.getColor() )
                    {
                        if ( v_TemplateFont.getXSSFColor() == null && i_Font.getXSSFColor() == null )
                        {
                            // Nothing.
                        }
                        else if ( v_TemplateFont.getXSSFColor() != null && i_Font.getXSSFColor() == null )
                        {
                            continue;
                        }
                        else if ( v_TemplateFont.getXSSFColor() == null && i_Font.getXSSFColor() != null )
                        {
                            continue;
                        }
                        else if ( v_TemplateFont.getXSSFColor().getARGBHex() == null && i_Font.getXSSFColor().getARGBHex()


 b2;
  double d2 = c * c + d * d;

  //
  //   If L is an eigenvalue, then
  //   det(this - L*Identity) == 0
  //   det([ a - L     b   ]
  //       [   c     d - L ]) == 0
  //   (a - L) * (d - L) - bc == 0
  //   ad - aL - dL + L^2 - bc == 0
  //   L^2 + (-a + -d)L + ad - bc == 0
  //
  // Using quadratic equation for (Ax^2 + Bx + C):
  //   A == 1
  //   B == -(a2 + d2)
  //   C == a2d2 - b2c2
  //
  // (We use -B for calculations because the square is the same as B and we
  //  need -B for the final quadratic equation computations anyway.)
  double minus_B = a2 + d2;
  double C = a2 * d2 - b2 * c2;
  double B_squared_minus_4AC = minus_B * minus_B - 4 * 1.0f * C;

  double quadratic_sqrt;
  if (B_squared_minus_4AC <= 0.0f) {
    // This test should never fail, but we might be slightly negative
    FML_DCHECK(B_squared_minus_4AC + kEhCloseEnough >= 0.0f);
    // Uniform scales (possibly rotated) would tend to end up here
    // in which case both eigenvalues are identical
    quadratic_sqrt = 0.0f;
  } else {
    quadratic_sqrt = std::sqrt(B_squared_minus_4AC);
  }

  // Since this is returning the sqrt of the values, we can guarantee that
  // the returned scales are non-negative.
  FML_DCHECK(minus_B - quadratic_sqrt >= 0.0f);
  FML_DCHECK(minus_B + quadratic_sqrt >= 0.0f);
  return {{std::sqrt((minus_B - quadratic_sqrt) / 2.0f),
           std::sqrt((minus_B + quadratic_sqrt) / 2.0f)}};
}

uint64_t MatrixDecomposition::GetComponentsMask() const {
  uint64_t mask = 0;

  Quaternion noRotation(0.0, 0.0, 0.0, 1.0);
  if (rotation != noRotation) {
    mask = mask | static_cast<uint64_t>(Component::kRotation);
  }

  Vector4 defaultPerspective(0.0, 0.0, 0.0, 1.0);
  if (perspective != defaultPerspective) {
    mask = mask | static_cast<uint64_t>(Component::kPerspective);
  }

  Shear noShear(0.0, 0.0, 0.0);
  if (shear != noShear) {
    mask = mask | static_cast<uint64_t>(Component::kShear);
  }

  Vector3 defaultScale(1.0, 1.0, 1.0);
  if (scale != defaultScale) {
    mask = mask | static_cast<uint64_t>(Component::kScale);
  }

  Vector3 defaultTranslation(0.0, 0.0, 0.0);
  if (translation != defaultTranslation) {
    mask = mask | static_cast<uint64_t>(Component::kTranslation);
  }

  return mask;
}

}  // namespace impeller
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "impeller/playground/widgets.h"

#include <format>

namespace impeller {

Point DrawPlaygroundPoint(PlaygroundPoint& point) {
  if (ImGui::GetCurrentContext()) {
    impeller::Point mouse_pos(ImGui::GetMousePos().x, ImGui::GetMousePos().y);
    if (!point.prev_mouse_pos.has_value()) {
      point.prev_mouse_pos = mouse_pos;
    }

    if (ImGui::IsKeyPressed(ImGuiKey_R)) {
      point.position = point.reset_position;
      point.dragging = false;
    }

    bool hovering =
        point.position.GetDis


UTF-8">
    <title>{% block title %}WebSite{% endblock %}</title>
    <link href="{% static 'Css/bootstrap.min.css' %}" rel="stylesheet">
    <link href="{% static 'Css/style.css' %}" rel="stylesheet">
    <link href="{% static 'Css/form.css' %}">

    <link rel="icon" href="">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KyZXEAg3QhqLMpG8r+Knujsl5+z5vIOIpkDkUrOymawXQK+IV5+TN3s6m8w3zaGt" crossorigin="anonymous">

Home

Log In

Team

Start Project

Show Projects

            <form class="d-flex m-3" method="get" action="{% url 'search-result' %}">
              {% csrf_token %}
              <input class="form-control me-2" type="search" name="search" placeholder="Search" aria-label="Search" required>
              <button class="btn btn-dark" type="submit">Search</button>
          </form>

Categories
                {% block Cat %}

                  {% for cat in categories %}

{{ cat.name }}

                  {% endfor %}

                {% endblock %}

        {% block content %}

        {% endblock %}

    {% block 'Section' %}

    {% endblock %}

Crowd-Funding.

                    A108 Adam Street

                    NY 535022, USA

                    Phone: +1 5589 55488 55

                    Email: info@example.com

Useful Links


d2,(a0)+
	addq.w #2,d1
	add.l #SCREEN_WIDTH,d2
	dbf d0,Build_BplPtr

** on arrive  la partie suivante par un COP_SKIP sur un pointeur coplist
	moveq #NB_LIGNES/2-1,d6
Build_All
	move.l #(bplcon3<<16)|($0020),d7	commence  la palette 0
	bsr.s Build_Line
	move.l #(bplcon4<<16),(a0)+		utilise les palettes 0-3

	move.l #(bplcon3<<16)|($8020),d7	commence  la palette 8
	bsr.s Build_Line
	move.l #(bplcon4<<16)|($8000),(a0)+	utilise les palettes 4-7
	dbf d6,Build_All

	move.l #$fffffffe,(a0)+
	rts

Build_Line
	move.l d7,(a0)+				construit la palette 0 / 4
	moveq #32-1,d0				couleurs de 1  31
	move.l #color00<<16,d1
Build_Colors0
	move.l d1,(a0)+
	add.l #2<<16,d1
	dbf d0,Build_Colors0

	add.w #$2000,d7				construit la palette 1 / 5
	move.l d7,(a0)+				couleurs de 0  32
	moveq #32-1,d0
	move.l #color00<<16,d1
Build_Colors1
	move.l d1,(a0)+
	add.l #2<<16,d1
	dbf d0,Build_Colors1

	add.w #$2000,d7				construit la palette 2 / 6
	move.l d7,(a0)+				couleurs de 0  32
	moveq #32-1,d0
	move.l #color00<<16,d1
Build_Colors2
	move.l d1,(a0)+
	add.l #2<<16,d1
	dbf d0,Build_Colors2

	add.w #$2000,d7				construit la palette 3 / 7
	move.l d7,(a0)+				couleurs de 0  14
	moveq #32-1,d0
	move.l #color00<<16,d1
Build_Colors3
	move.l d1,(a0)+
	add.l #2<<16,d1
	dbf d0,Build_Colors3
	rts

*********************************************************************************
* 	                   Prcalcul sur l'image chunky				*
*   -->	a5=_DataBase                                                            *
*********************************************************************************
Modify_Chunky_Picture
	lea Picture_CHK,a0
	lea Chunky_Picture_space,a1
	move.l a1,Chunky_Picture(a5)

	move.w #PICTURE_Y-1,d0
.loop_y
	move.l a1,a2
	move.w #PICTURE_X-1,d1
.loop_x
	moveq #0,d2
	move.b (a0)+,d2
	ror.w #PICTURE_DEPTH+1,d2
	move.w d2,(a2)
	lea PICTURE_Y*2(a2),a2

	dbf d1,.loop_x
	addq.l #2,a1
	dbf d0,.loop_y
	rts

*********************************************************************************
*                    Contruction de la table de blur				*
*   -->	a5=_DataBase                                                            *
********************************************************


} from '../__fixtures__/mixins/objects';

    `);

    expect(actual).toInclude(':hover{padding-top:10px}');
  });

  it('should inline css when destructuring an identifier from another module', () => {
    const actual = transform(`
      import '@compiled/react';
      import { spacingMixin } from '../__fixtures__/mixins/objects';

      const { padding: { top } } = spacingMixin;

    `);

    expect(actual).toInclude(':hover{padding-top:10px}');
  });

  it('should inline css from a function mixin with parameters referencing an identifier from another module', () => {
    const actual = transform(`
      import '@compiled/react';
      import { colorMixin2 } from '../__fixtures__/mixins/objects';

      const color = { blue: 'blue' };

      const Component = (props) => {
        return

      };
    `);

    expect(actual).toIncludeMultiple(['{color:red}', '{background-color:blue}']);
  });

  it('handles template literal with imported selectors from external modules', () => {
    const actual = transform(`
      import { styled } from '@compiled/react';

      import { ID_SELECTOR } from '../__fixtures__/mixins/strings';

      const BackgroundWithSelector = styled.div({
        [\`\${ID_SELECTOR}\`]: {
          backgroundColor: 'green',
        },
      });

      <BackgroundWithSelector>

Green box in selector div

      </BackgroundWithSelector>;
    `);

    expect(actual).toInclude('._tcqlbf54 #id-selector{background-color:green}');
  });

  it('handles template literal with imported selectors from external modules with substitution', () => {
    const actual = transform(`
      import { styled } from '@compiled/react';

      import { JOINED_SELECTOR } from '../__fixtures__/mixins/strings';
      import { primary } from '../__fixtures__/mixins/simple';

      const BackgroundWithSelector = styled.div({
        [\`\${JOINED_SELECTOR}, .\${primary}\`]: {
          backgroundColor: 'green',
        },
      });

      <BackgroundWithSelector>

Green box in selector div

      </BackgroundWithSelector>;
    `);

    expect(actual).toInclude(
      '._15rzbf54 #joined-selector, ._1khrbf54 .red{background-color:green}'
    );
  });

  describe('should call onIncludedFiles with the filepath', () => {
    let onIncludedFiles: Mock;

    beforeEach(() => {
      onIncludedFiles = jest.fn();
    });

    it('when using a CSS object', () => {
      const code = `
        import '@compiled/react';
        import { colorMixin2 } from '../__fixtures__/mixins/objects';

        const color = { blue: 'blue' };

        const Component = (props) => {
          return

        };
      `;

      transform(code, { onIncludedFiles });

      expect(onIncludedFiles).toHaveBeenCalledTimes(1);
      expect(onIncludedFiles).toHaveBeenCalledWith([
        expect.stringContaining(
          'compiled/packages/babel-plugin/src/__fixtures__/mixins/objects.js'
        ),
      ]);
    });

    it('when using a CSS property', () => {
      const code = `
        import '@compiled/react';
        import { primary } from '../__fixtures__/mixins/simple';

        const Component = (props) => {
          return

        };
      `;

      transform(code, { onIncludedFiles });

      expect(


	},
		},
		-- Warlock: Demonic Knowledge (Rank 3) - 2,20
		--          Increases your spell damage by an amount equal to 4/8/12% of the total of your active demon's Stamina plus Intellect.
		["ADD_SPELL_DMG_MOD_PET_INT"] = {
			{
				["tab"] = 2,
				["num"] = 20,
				["rank"] = {
					0.04, 0.08, 0.12,
				},
				["pet"] = true,
			},
		},
		-- Warlock: Fel Stamina (Rank 3) - 2,9
		--          Increases the Stamina of your Imp, Voidwalker, Succubus, Felhunter and Felguard by 5%/10%/15% and increases your maximum health by 1%/2%/3%.
		["MOD_HEALTH"] = {
			{
				["tab"] = 2,
				["num"] = 9,
				["rank"] = {
					0.01, 0.02, 0.03,
				},
			},
		},
		-- Warlock: Fel Intellect (Rank 3) - 2,6
		--          Increases the Intellect of your Imp, Voidwalker, Succubus, Felhunter and Felguard by 5%/10%/15% and increases your maximum mana by 1%/2%/3%.
		["MOD_MANA"] = {
			{
				["tab"] = 2,
				["num"] = 6,
				["rank"] = {
					0.01, 0.02, 0.03,
				},
			},
		},
		-- Warlock: Demonic Embrace (Rank 5) - 2,3
		--          Increases your total Stamina by 3%/6%/9%/12%/15% but reduces your total Spirit by 1%/2%/3%/4%/5%.
		["MOD_STA"] = {
			{
				["tab"] = 2,
				["num"] = 3,
				["rank"] = {
					0.03, 0.06, 0.09, 0.12, 0.15,
				},
			},
		},
		-- Warlock: Demonic Embrace (Rank 5) - 2,3
		--          Increases your total Stamina by 3%/6%/9%/12%/15% but reduces your total Spirit by 1%/2%/3%/4%/5%.
		["MOD_SPI"] = {
			{
				["tab"] = 2,
				["num"] = 3,
				["rank"] = {
					-0.01, -0.02, -0.03, -0.04, -0.05,
				},
			},
		},
	}
elseif addon.class == "WARRIOR" then
	StatLogic.StatModTable["WARRIOR"] = {
		["ADD_AP_MOD_STR"] = {
			-- Base
			{
				["value"] = 2,
			},
		},
		["ADD_RANGED_AP_MOD_AGI"] = {
			-- Base
			{
				["value"] = 1,
			},
		},
		["ADD_DODGE"] = {
			-- Base
			{
				["value"] = 0.7580,
			},
		},
		["ADD_NORMAL_HEALTH_REG_MOD_SPI"] = {
			-- Base
			{
				["value"] = 0.5 * 5,
			},
		},
		["ADD_BLOCK_VALUE_MOD_STR"] = {
			-- Base
			{
				["value"] = BLOCK_PER_STRENGTH,
			},
		},
		["MOD_AP"] = {
			-- Talent: Improved Berserker Stance
			{
				["tab"] = 2,
				["num"] = 20,
				["rank"] = {
					0.02, 0.04, 0.06, 0.08, 0.1,
				},
			},
		},
		-- Warrior: Toughness (Rank 5) - 3,5
		--          Increases your armor value from items by 2%/4%/6%/8%/10%.
		["MOD_ARMOR


(simplex)
    }
}

function makePoints(vertices: R3[], radialSegments: number, thetaSegments: number, data: Simplex[]) {
    for (let i = 0; i <= radialSegments; i++) {
        for (let j = 0; j <= thetaSegments; j++) {
            var simplex = new Simplex(Simplex.POINT)
            simplex.vertices[0].attributes[GraphicsProgramSymbols.ATTRIBUTE_POSITION] = vertices[vertexIndex(i, j, thetaSegments)]
            data.push(simplex)
        }
    }
}

function makeEmpty(vertices: R3[], radialSegments: number, thetaSegments: number, data: Simplex[]) {
    for (let i = 0; i <= radialSegments; i++) {
        for (let j = 0; j <= thetaSegments; j++) {
            var simplex = new Simplex(Simplex.EMPTY)
            data.push(simplex)
        }
    }
}

/**
 * @class RingSimplexGeometry
 * @extends SliceSimplexGeometry
 */
class RingSimplexGeometry extends SliceSimplexGeometry {
    /**
     * The outer radius.
     * @property a
     * @type {number}
     */
    public a: number;
    /**
     * The inner radius.
     * @property b
     * @type {number}
     */
    public b: number;
    /**
     *

     * Creates an annulus with a single hole.
     *

     *

     * Sets the sliceAngle property to 2 * Math.PI
.
     *

     * @class RingSimplexGeometry
     * @constructor
     * @param [a = 1] {number} The outer radius
     * @param [b = 0] {number} The inner radius
     * @param [axis] {VectorE3} The axis property.
     * @param [sliceStart] {VectorE3} The sliceStart property.
     * @param [sliceAngle] {number} The sliceAngle property.
     */
    constructor(a: number = 1, b: number = 0, axis?: VectorE3, sliceStart?: VectorE3, sliceAngle?: number) {
        super(axis, sliceStart, sliceAngle)
        this.a = a
        this.b = b
    }

    /**
     * @method isModified
     * @return {boolean}
     */
    public isModified(): boolean {
        return super.isModified();
    }
    /**
     * @method regenerate
     * @return {void}
     */
    public regenerate(): void {
        this.data = []

        var radialSegments = this.flatSegments
        var thetaSegments = this.curvedSegments
        var generator: SpinorE3 = SpinG3.dual(this.axis)

        var vertices: R3[] = []
        var uvs: R2[] = []

        computeVertices(this.a, this.b, this.axis, this.sliceStart, this.sliceAngle, generator, radialSegments, thetaSegments, vertices, uvs)
        switch (this.k) {
            case Simplex.EMPTY: {
                makeEmpty(vertices, radialSegments, thetaSegments, this.data)
            }
                break
            case Simplex.POINT: {
                makePoints(vertices, radialSegments, thetaSegments, this.data)
            }
                break
            case Simplex.LINE: {
                makeLineSegments(vertices, radialSegments, thetaSegments, this.data)
            }
                break
            case Simplex.TRIANGLE: {
                makeTriangles(vertices, uvs, this.axis, radialSegments, thetaSegments, this)
            }
                break
            default: {
                console.warn(this.k + "-simplex is not supported for geometry generation.")
            }


/**
     * The meta object id for the '{@link org.eclipse.datatools.modelbase.sql.query.impl.TableJoinedImpl Table Joined}' class.
     *
	 *
     * @see org.eclipse.datatools.modelbase.sql.query.impl.TableJoinedImpl
     * @see org.eclipse.datatools.modelbase.sql.query.impl.SQLQueryModelPackageImpl#getTableJoined()
     * @generated
     */
	int TABLE_JOINED = 15;

	/**
     * The feature id for the 'EAnnotations' containment reference list.
     *
	 *
     * @generated
     * @ordered
     */
	int TABLE_JOINED__EANNOTATIONS = TABLE_REFERENCE__EANNOTATIONS;

	/**
     * The feature id for the 'Name' attribute.
     *
	 *
     * @generated
     * @ordered
     */
	int TABLE_JOINED__NAME = TABLE_REFERENCE__NAME;

	/**
     * The feature id for the 'Dependencies' containment reference list.
     *
	 *
     * @generated
     * @ordered
     */
	int TABLE_JOINED__DEPENDENCIES = TABLE_REFERENCE__DEPENDENCIES;

	/**
     * The feature id for the 'Description' attribute.
     *
	 *
     * @generated
     * @ordered
     */
	int TABLE_JOINED__DESCRIPTION = TABLE_REFERENCE__DESCRIPTION;

	/**
     * The feature id for the 'Label' attribute.
     *
	 *
     * @generated
     * @ordered
     */
	int TABLE_JOINED__LABEL = TABLE_REFERENCE__LABEL;

	/**
     * The feature id for the 'Comments' reference list.
     *
	 *
     * @generated
     * @ordered
     */
	int TABLE_JOINED__COMMENTS = TABLE_REFERENCE__COMMENTS;

	/**
     * The feature id for the 'Extensions' containment reference list.
     *
     *
     * @generated
     * @ordered
     */
    int TABLE_JOINED__EXTENSIONS = TABLE_REFERENCE__EXTENSIONS;

    /**
     * The feature id for the 'Privileges' reference list.
     *
	 *
     * @generated
     * @ordered
     */
	int TABLE_JOINED__PRIVILEGES = TABLE_REFERENCE__PRIVILEGES;

	/**
     * The feature id for the 'Table Joined Right' container reference.
     *
	 *
     * @generated
     * @ordered
     */
	int TABLE_JOINED__TABLE_JOINED_RIGHT = TABLE_REFERENCE__TABLE_JOINED_RIGHT;

	/**
     * The feature id for the 'Table Joined Left' container reference.
     *
	 *
     * @generated
     * @ordered
     */
	int TABLE_JOINED__TABLE_JOINED_LEFT = TABLE_REFERENCE__TABLE_JOINED_LEFT;

	/**
     * The feature id for the 'Query Select' container reference.
     *
	 * <


troller_view->notifications, repeat);
                } else if(event->key == InputKeyOk) {
                    model->ok_pressed = true;
                    send_xbox_ir(0x8F70, media_controller_view->notifications, repeat);
                } else if(event->key == InputKeyBack) {
                    model->back_pressed = true;
                    send_xbox_ir(0xF10E, media_controller_view->notifications, repeat);
                }
            } else if(event->type == InputTypeRelease) {
                if(event->key == InputKeyUp) {
                    model->up_pressed = false;
                } else if(event->key == InputKeyDown) {
                    model->down_pressed = false;
                } else if(event->key == InputKeyLeft) {
                    model->left_pressed = false;
                } else if(event->key == InputKeyRight) {
                    model->right_pressed = false;
                } else if(event->key == InputKeyOk) {
                    model->ok_pressed = false;
                } else if(event->key == InputKeyBack) {
                    model->back_pressed = false;
                }
            }
        },
        true);
}

static bool media_controller_view_input_callback(InputEvent* event, void* context) {
    furi_assert(context);
    MediaControllerView* media_controller_view = context;
    bool consumed = false;

    if(event->type == InputTypeLong && event->key == InputKeyBack) {
        // LONG KEY BACK PRESS HANDLER
    } else {
        media_controller_view_process(media_controller_view, event);
        consumed = true;
    }

    return consumed;
}

MediaControllerView* media_controller_view_alloc(NotificationApp* notifications) {
    MediaControllerView* media_controller_view = malloc(sizeof(MediaControllerView));
    media_controller_view->view = view_alloc();
    media_controller_view->notifications = notifications;
    view_set_orientation(media_controller_view->view, ViewOrientationVertical);
    view_set_context(media_controller_view->view, media_controller_view);
    view_allocate_model(
        media_controller_view->view, ViewModelTypeLocking, sizeof(MediaControllerViewModel));
    view_set_draw_callback(media_controller_view->view, media_controller_view_draw_callback);
    view_set_input_callback(media_controller_view->view, media_controller_view_input_callback);

    return media_controller_view;
}

void media_controller_view_free(MediaControllerView* media_controller_view) {
    furi_assert(media_controller_view);
    view_free(media_controller_view->view);
    free(media_controller_view);
}

View* media_controller_view_get_view(MediaControllerView* media_controller_view) {
    furi_assert(media_controller_view);
    return media_controller_view->view;
}

void media_controller_view_set_connected_status(
    MediaControllerView* media_controller_view,
    bool connected) {
    furi_assert(media_controller_view);
    with_view_model(
        media_controller_view->view,
        MediaControllerViewModel * model,
        { model->connected = connected; },
        true);
}


h") @NativeClass/*</annotations>*/
/*<visibility>*/public/*</visibility>*/ class /*<name>*/CBDescriptor/*</name>*/
    extends /*<extends>*/CBAttribute/*</extends>*/
    /*<implements>*//*</implements>*/ {

    /*<ptr>*/public static class CBDescriptorPtr extends Ptr<CBDescriptor, CBDescriptorPtr> {}/*</ptr>*/
    /*<bind>*/static { ObjCRuntime.bind(CBDescriptor.class); }/*</bind>*/
    /*<constants>*//*</constants>*/
    /*<constructors>*/
    protected CBDescriptor() {}
    protected CBDescriptor(Handle h, long handle) { super(h, handle); }
    protected CBDescriptor(SkipInit skipInit) { super(skipInit); }
    /*</constructors>*/
    /*<properties>*/
    @Property(selector = "characteristic")
    public native CBCharacteristic getCharacteristic();
    @Property(selector = "value")
    public native NSObject getValue();
    /*</properties>*/
    /*<members>*//*</members>*/
    /*<methods>*/

    /*</methods>*/
}
/*
 * Copyright (C) 2013-2015 RoboVM AB
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.robovm.apple.corebluetooth;

/*<imports>*/
import java.io.*;
import java.nio.*;
import java.util.*;
import org.robovm.objc.*;
import org.robovm.objc.annotation.*;
import org.robovm.objc.block.*;
import org.robovm.rt.*;
import org.robovm.rt.annotation.*;
import org.robovm.rt.bro.*;
import org.robovm.rt.bro.annotation.*;
import org.robovm.rt.bro.ptr.*;
import org.robovm.apple.foundation.*;
import org.robovm.apple.corefoundation.*;
import org.robovm.apple.dispatch.*;
/*</imports>*/

/*<javadoc>*/
/*</javadoc>*/
/*<annotations>*//*</annotations>*/
/*<visibility>*/public/*</visibility>*/ class /*<name>*/CBPeripheralManagerDelegateAdapter/*</name>*/
    extends /*<extends>*/NSObject/*</extends>*/
    /*<implements>*/implements CBPeripheralManagerDelegate/*</implements>*/ {

    /*<ptr>*/
    /*</ptr>*/
    /*<bind>*/
    /*</bind>*/
    /*<constants>*//*</constants>*/
    /*<constructors>*//*</constructors>*/
    /*<properties>*/

    /*</properties>*/
    /*<members>*//*</members>*/
    /*<methods>*/
    @NotImplemented("peripheralManagerDidUpdateState:")
    public void didUpdateState(CBPeripheralManager peripheral) {}
    @NotImplemented("peripheralManager:willRestoreState:")
    public void willRestoreState(CBPeripheralManager peripheral, CBPeripheralManagerRestoredState dict) {}
    @NotImplemented("peripheralManagerDidStartAdvertising:error:")
    public void didStartAdvertising(CBPeripheralManager peripheral, NSError error) {}
    @NotImplemented("peripheralManager:didAddService:error:")
    public void didAddService(CBPeripheralManager peripheral, CBService service, NSError error) {}
    @NotImplemented("peripheralManager:central:didSubscribeToCharacteristic:")
    public void didSubscribeToCharacteristic(CBPeripheralManager peripheral, CBCentral central, CBCharacteristic characteristic) {}
    @NotIm


n use the "load" instruction. A hook is already defined in d8 for this
// reason.
self.isD8 = !!self.dartDeferredLibraryLoader;

// This test has 3 loadLibrary calls, this array contains how many hunks will be
// loaded by each call.
self.filesPerLoadLibraryCall = null;
// Number of parts for which a download has been "started" keyed by load ID.
self.incrementCounts = {};
// Number of parts for which we have loaded the JS keyed by load ID.
self.loadedCounts = {};
// Success callback for a library load keyed by load ID.
self.successCallbacks = {};
// URIs passed to the deferred load hook. Used to check there aren't duplicates.
self.providedUris = [];
// JS contents per URI.
self.content = {};

function equal(a, b) {
  return a.length === b.length &&
      a.every(function (value, index) {
        return value === b[index];
      });
}

self.initFilesPerLoadLibraryCall = function() {
  // We assume we load d1, then d2, then d3. However, we may have integer load
  // ids instead of the full load id.
  var loadOrder = Object.keys(init.deferredLibraryParts);
  var expectedLoadOrder = equal(loadOrder, ['d1', 'd2', 'd3', 'd4', 'd5']) ||
      equal(loadOrder, ['1', '2', '3', '4', '5']);
  if (!expectedLoadOrder) {
    throw 'Unexpected load order ' + loadOrder;
  }
  var uniques = {};
  self.filesPerLoadLibraryCall = {};
  for (var i = 0; i < loadOrder.length; i++) {
    var filesToLoad = 0;
    var parts = init.deferredLibraryParts[loadOrder[i]];
    for (var j = 0; j < parts.length; j++) {
      if (!uniques.hasOwnProperty(parts[j])) {
        uniques[parts[j]] = true;
        filesToLoad++;
      }
    }
    self.filesPerLoadLibraryCall[loadOrder[i]] = filesToLoad;
  }
};

// Download uri via an XHR
self.download = function(uris, uri, loadId) {
  var req = new XMLHttpRequest();
  req.addEventListener("load", function() {
    self.content[uri] = this.responseText;
    self.increment(uris, loadId);
  });
  req.open("GET", uri);
  req.send();
};

// Note that a new hunk is already available to be loaded, wait until all
// expected hunks are available and then evaluate their contents to actually
// load them.
self.increment = function(uris, loadId) {
  var count = self.incrementCounts[loadId] = self.incrementCounts[loadId] + 1;
  if (count == self.filesPerLoadLibraryCall[loadId]) {
    self.doActualLoads(uris, loadId);
  }
};

// Hook to control how we load hunks in bulk (we force them to be out of order).
self.dartDeferredLibraryMultiLoader = function(uris, success, error, loadId) {
  if (self.filesPerLoadLibraryCall == null) {
    self.initFilesPerLoadLibraryCall();
  }
  self.incrementCounts[loadId] = 0;
  self.loadedCounts[loadId] = 0;
  self.successCallbacks[loadId] = success;
  for (var i = 0; i < uris.length; i++) {
    var uri = uris[i];
    if (providedUris.some((u) => uri === u)) {
      throw 'Requested duplicate uri: ' + uri;
    }
    providedUris.push(uri);
    if (isD8) {
      self.increment(uris, loadId);
    } else {
      self.download(uris, uri, loadId);
    }
  }
};

// Do


);
			exit(0);
		case '?':
		default:
		      bad_option:
			optind--;
		      bad_nonopt:
			if (optind < argc && verbose) {
				fprintf(stderr, "%s: illegal syntax -- ", argv[0]);
				while (optind < argc)
					fprintf(stderr, "%s ", argv[optind++]);
				fprintf(stderr, "\n");
				fflush(stderr);
			}
			goto bad_usage;
		      bad_usage:
			usage(argv);
			exit(2);
		}
	}
	/*
	 * dont' ignore non-option arguments
	 */
	if (optind < argc)
		goto bad_nonopt;
	copying();
	do_tests();
	exit(0);
}


using Newtonsoft.Json;

namespace TwitchLib.Api.Helix.Models.Channels.GetFollowedChannels
{
    public class FollowedChannel
    {
        /// <summary>
        /// An ID that uniquely identifies the broadcaster that this user is following.
        /// </summary>
        [JsonProperty(PropertyName = "broadcaster_id")]
        public string BroadcasterId { get; protected set; }

        /// <summary>
        /// The broadcaster’s login name.
        /// </summary>
        [JsonProperty(PropertyName = "broadcaster_login")


! 1525: STXA_R	stxa	%r27, [%r14 + %r0] 0x20
T1_asi_reg_wr_77:
	mov	0x3c6, %r14
	.word 0xf6f389e0  ! 1526: STXA_R	stxa	%r27, [%r14 + %r0] 0x4f
T1_asi_reg_rd_74:
	mov	0x29, %r14
	.word 0xfcdb8400  ! 1529: LDXA_R	ldxa	[%r14, %r0] 0x20, %r30
cpu_intr_1_111:
	setx	0x280226, %g1, %o0
	ta	T_SEND_THRD_INTR
	.word 0xb3a80820  ! 1532: FMOVRLEZ	fmovs	%fcc1, %f0, %f25
	.word 0xb5354000  ! 1538: SRL_R	srl 	%r21, %r0, %r26
cpu_intr_1_112:
	setx	0x2b0101, %g1, %o0
	ta	T_SEND_THRD_INTR
iob_intr_1_128:
!$EV trig_pc_d(1,expr(@VA(.MAIN.iob_intr_1_128), 16, 16)) -> intp(1, 0, 26)
	.word 0xbbabc820  ! 1544: FMOVVC	fmovs	%fcc1, %f0, %f29
	lda	[%r16 + %g0] 0xf0, %f2
T1_asi_reg_rd_75:
	mov	0x2a, %r14
	.word 0xf2db8e60  ! 1555: LDXA_R	ldxa	[%r14, %r0] 0x73, %r25
T1_asi_reg_rd_76:
	mov	0xe, %r14
	.word 0xfadb8e80  ! 1556: LDXA_R	ldxa	[%r14, %r0] 0x74, %r29
	.word 0xb5aa0820  ! 1557: FMOVA	fmovs	%fcc1, %f0, %f26
	.word 0xb7a81420  ! 1558: FMOVRNZ	dis not found

T1_asi_reg_rd_77:
	mov	0x3c7, %r14
	.word 0xf0db84a0  ! 1566: LDXA_R	ldxa	[%r14, %r0] 0x25, %r24
T1_asi_reg_wr_78:
	mov	0x14, %r14
	.word 0xfef38e40  ! 1567: STXA_R	stxa	%r31, [%r14 + %r0] 0x72
	.word 0xbba00560  ! 1568: FSQRTq	fsqrt
	.word 0xbda50920  ! 1569: FMULs	fmuls	%f20, %f0, %f30
	.word 0xb9a589e0  ! 1572: FDIVq	dis not found

	.word 0xb7a50960  ! 1574: FMULq	dis not found

	.word 0xb5a00560  ! 1577: FSQRTq	fsqrt
iob_intr_1_129:
!$EV trig_pc_d(1,expr(@VA(.MAIN.iob_intr_1_129), 16, 16)) -> intp(1, 0, 11)
	.word 0xb22d8000  ! 1580: ANDN_R	andn 	%r22, %r0, %r25
iob_intr_1_130:
!$EV trig_pc_d(1,expr(@VA(.MAIN.iob_intr_1_130), 16, 16)) -> intp(1, 0, 2c)
cpu_intr_1_113:


ngn0QvHwjR33",
        CarouselArrow: "_3hwYJI_69FHN88lG7yBx68",
        ArrowImage: "_2mc1KBax6kWgpZH5COJkBm",
        Left: "_3tSgY_HPY_od6W03nw8-Bd",
        Right: "_2iTl_NAzz3oTC5A4SdkChp",
        NameAndDesc: "X3Jr4uM4YToxUQokCRo_",
        RiverVialName: "_1HYLKxUtUy0YcMDT1uGHwB",
        RiverVialDesc: "_3rX3jTS5RMRVziyzegPurG",
        CarouselDots: "_2dfAh8zoud25kXS8vHXVjs",
        Dot: "_2XYlVzL4ZJzgqstcm4dkMn",
        RiverVialDot: "_37LKbCNoZH9bZo8iI65tAT",
        RiverVialIcon: "X_5qjxmyHpesBA6yGPoGQ",
        NameAndDescContainer: "_33whah5ECXp1H0mv-DbsiX",
      };
    },
    64710: (e) => {
      e.exports = {
        Tooltip: "_3RpL9N5jTywgAVIOIEtuXl",
        CarouselFade: "qeRrVj58UOJRUSAiO-YJ6",
        StandardButton: "_3Ep64duWff2_nFfARKHgP3",
        ButtonText: "_3L4H5uL2J7VHL_HoYbcFYz",
        Icon: "_38Jn9GbsfMqZ-WUuiJ0YrG",
        Play: "_1b03Q0YX22A5fzKAwfdi1C",
        SteamLogo: "_2zGXCdO-PlocjRZM0rtQjC",
        ToolTip: "_3RzoYrPu0H-EgEoznIEVl5",
        PlayerReportTooltip: "_3s54cb8f-kz--v8FANQ2pv",
        BlogCapsule: "_3OBoG7TZb8gxM8NbILzAan",
        Entry: "_2P4kNfcV-LQM4dxZG64G2y",
        Desc: "_471NMqUJJK-cwlZPr1323",
        Date: "_3kp_OxASIUMKf6oh0nhkFd",
        Title: "_39UGsnaF9LNfYmJDUwUkdr",
      };
    },
    52448: (e) => {
      e.exports = {
        Tooltip: "_2tRvFPkBhxR7vDxTqo4P0a",
        CarouselFade: "_7iR6VaebVOGr3yes_KoOA",
        StandardButton: "_24Nmu8CZlagdPfZba8crr",
        ButtonText: "_21JTKSyd-kDDL5FzbaIBus",
        Icon: "_2uGFhUvjk6rgXucxjGPe_c",
        Play: "_1KMMLZ8hi2Fg3HUGnshmXu",
        SteamLogo: "_23beEy2fvm-W7rMsj7kRjB",
        ToolTip: "_2wzzKspsyxpbDNoj0nvOuN",
        PlayerReportTooltip: "swiSQcWgrAUZPT0C7agj8",
        DPCAboutBanner: "_2QgBEtpkbwciYHD7xv8Eyc",
        Background: "_3O-JkwzNIjSlc9msxayRHG",
        Content: "_25lN3Pbxw9yIP_lLhohbIe",
        Title: "_2Ed2TE3cCjYxCNcKPdyZjI",
        Body: "_11EGACADbXWL33cGBtGn4I",
        BodyCentered: "_2LO-sZsRare-hfe6iAU5nX",
        Button


[Redis Cluster](https://redis.io/topics/cluster-tutorial)的部署模式，在保证高可用的同时，资源利用率。
1. 为了保证高性能，Redis采用异步持久话的方式，分为rdb和aof两种，需要根据实际情况，选择适合的一种甚至混合方案。具体可参见文档（https://redis.io/topics/persistence）
1. 若采用aof方式，积累较多修改后，重启redis会非常慢，可以定期进行[aof rewrite](https://redis.io/commands/bgrewriteaof)压缩aof日志。

[^1]: 若要维持较高性能，建议保留足够的内存以存储全部数据。

# cfg4j及方案简介

实现微服务的配置中心有多种选择方案，常见的方案有:
* 使用Spring Cloud全家桶中的Spring Cloud Config。
* 使用Consul或者Zookeeper作为分布式一致性存储，自己实现配置中心。

但上述方案都有一些不足:
* Sping Cloud Config不支持配置的实时更新，需要额外实现。此外，Spring Cloud的依赖较多，不太干净。
* Consul或者Zookeeper只提供了存取接口，对于配置下发、更新(特别是配置的管理界面)都需要自己开发实现，成本非常高。

我们在此选用了一种成本较低的方案: 使用cfg4j库，存储源选择git。

cfg4j是一款"分布式系统"的配置类库，它不包含服务端存储部分，但实现了从多种数据源读取，更新配置，以及缓存策略。

我们选用git作为数据源，原因有:
* 本书架构本身采用git作为代码管理工具，不需要额外部署成本
* 本书已经采用了gerrit作为git服务器和代码审核工具，它的diff、review功能非常强大，可以不用额外开发配置管理的web界面

## gerrit中的权限配置

截至目前的最新版，cfg4j默认只支持从匿名git仓库拉取配置，我们需要对gerrit进行一些配置以满足这一条件。

使用管理员帐号登录gerrit，然后选择"Projects" -> "All-Projects" -> "Access"，进行如下修改:
* 给"Reference: refs/*" 添加匿名组 "Anonymous Users"　的 "DENY"权限。注意，这只是一个全局的默认配置，可以被项目级别的权限覆盖。
* 新建项目"lmsia-config"，修改项目权限，给"Reference: refs/*"添加匿名组 "Anonymous Users"　的 "ALLOW"权限。

经过上述修改后，我们需要做一下简单验证:
```shell
git clone http://127.0.0.1:9002/lmsia-config
```

如果上述命令可以直接clone项目到本地，且无需输入用户名、密码，说明gerrit的权限配置成功。

## 支持多个微服务的配置

在前面，我们新建了项目lmsia-config，并且给它配置了匿名访问权限。

我们的微服务可能有很多，如何让lmsia-config项目，支持多个微服务的配置呢？

我们通过目录的方式来实现:
```shell
.
├── lmsia-abc
│   └── config.properties
└── lmsia-xyz
    └── config.properties
```

如上所


 no constraints for 1st
//	1.0 = [+region=us,+dc=east,+rack=1,-ssd]  // Extra constraints ignored
//
// Note that constraints need not be specified in any particular order, so all
// constraints are scanned when matching each locality tier. In cases where
// there are multiple replica constraint groups (i.e. where a subset of replicas
// can have different constraints than another subset), the minimum constraint
// score among the groups is used.
//
// While matching leaseholder preferences are considered in the final score,
// leaseholder preferences are not guaranteed, so its score is weighted at half
// of the replica constraint score, in order to reflect the possibility that the
// leaseholder has moved from the preferred location.
func localityMatchScore(zone cat.Zone, locality roachpb.Locality) float64 {
	// Fast path: if there are no constraints or leaseholder preferences, then
	// locality can't match.
	if zone.ReplicaConstraintsCount() == 0 && zone.LeasePreferenceCount() == 0 {
		return 0.0
	}

	// matchTier matches a tier to a set of constraints and returns:
	//
	//    0 = key not present in constraint set or key only matches prohibited
	//        constraints where value doesn't match
	//   +1 = key matches any required constraint key + value
	//   -1 = otherwise
	//
	matchTier := func(tier roachpb.Tier, set cat.ConstraintSet) int {
		foundNoMatch := false
		for j, n := 0, set.ConstraintCount(); j < n; j++ {
			con := set.Constraint(j)
			if con.GetKey() != tier.Key {
				// Ignore constraints that don't have matching key.
				continue
			}

			if con.GetValue() == tier.Value {
				if !con.IsRequired() {
					// Matching prohibited constraint, so result is -1.
					return -1
				}

				// Matching required constraint, so result is +1.
				return +1
			}

			if con.IsRequired() {
				// Remember that non-matching required constraint was found.
				foundNoMatch = true
			}
		}

		if foundNoMatch {
			// At least one non-matching required constraint was found, and no
			// matching constraints.
			return -1
		}

		// Key not present in constraint set, or key only matches prohibited
		// constraints where value doesn't match.
		return 0
	}

	// matchConstraints returns the number of tiers that match the given
	// constraint set ("m" in algorithm described above).
	matchConstraints := func(set cat.ConstraintSet) int {
		matchCount := 0
		for i, tier := range locality.Tiers {
			switch matchTier(tier, set) {
			case +1:
				matchCount = i + 1
			case -1:
				return matchCount
			}
		}
		return matchCount
	}

	// Score any replica constraints.
	var constraintScore float64
	if zone.ReplicaConstraintsCount() != 0 {
		// Iterate over the replica constraints and determine the minimum value
		// returned by matchConstraints for any replica. For example:
		//
		//   3: [+region=us,+dc=east]
		//   2: [+region=us]
		//
		// For the [region=us,dc=east] locality, the result is min(2, 1).
		minCount := intsets.MaxInt
		for i := 0; i < zone.ReplicaConstraintsCount(); i++ {
			matchCount := matchConstraints(zone.ReplicaConstraints(i))
			if matchCount < minCount {
				minCount = matchCount
			}
		}

		constraintScore = float64(minCount) / float64(len(locality.Tiers))
	}

	// If there are no lease preferences, then use replica constraint score.
	if zone.LeasePreferenceCount() == 0


(pp -> {
                pp.child(UItems.CRYSTAL_HEART).criterion("power_up_heart", CustomEventCriterion.create("power_up_heart")).rewards(AdvancementRewards.Builder.experience(105)).build(consumer, "power_up_heart");
            });
            p.child(UItems.ALICORN_AMULET).criterion("has_alicorn_amulet", hasItems(UItems.ALICORN_AMULET)).build(consumer, "tempted")
             .child(Items.CRYING_OBSIDIAN).criterion("light_altar", CustomEventCriterion.create("light_altar")).build(consumer, "hello_darkness_my_old_friend")
             .child(UItems.BROKEN_ALICORN_AMULET).frame(AdvancementFrame.GOAL).criterion("defeat_sombra", CustomEventCriterion.create("defeat_sombra")).rewards(AdvancementRewards.Builder.experience(2000)).build(consumer, "save_the_day").children(pp -> {
                 pp.child(UItems.UNICORN_AMULET).frame(AdvancementFrame.GOAL).criterion("obtain_the_thing", hasItems(UItems.UNICORN_AMULET)).rewards(AdvancementRewards.Builder.experience(1100)).build(consumer, "ascension");
                 pp.child(UItems.BROKEN_ALICORN_AMULET).hidden().frame(AdvancementFrame.CHALLENGE).criterion("defeat_sombra_again", CustomEventCriterion.create("defeat_sombra", 2)).rewards(AdvancementRewards.Builder.experience(2000)).build(consumer, "doctor_sombrero");
             });
            p.child(Items.WATER_BUCKET).criterion("split_sea", CustomEventCriterion.create("split_sea")).rewards(AdvancementRewards.Builder.experience(105)).build(consumer, "split_the_sea");
        });

        parent.child(UItems.DRAGON_BREATH_SCROLL).showToast().announce().criterion("has_scroll", hasItems(UItems.DRAGON_BREATH_SCROLL)).build(consumer, "take_a_note").children(p -> {
            p.child(UItems.DRAGON_BREATH_SCROLL).criterion("send_book", dragonScroll(false, Items.WRITTEN_BOOK)).build(consumer, "dear_princess")
             .child(UItems.DRAGON_BREATH_SCROLL).criterion("send_scroll", dragonScroll(false, UItems.DRAGON_BREATH_SCROLL)).build(consumer, "i_await_your_reply");
            p.child(UItems.IMPORTED_OATS).hidden().frame(AdvancementFrame.CHALLENGE)
                .criterion("send_oats", dragonScroll(false, UItems.OATS, UItems.IMPORTED_OATS))
                .criterion("receieve_oats", dragonScroll(true, UItems.IMPORTED_OATS))
                .criteriaMerger(AdvancementRequirements.CriterionMerger.OR).build(consumer, "imported_oats");
            p.child(Items.CHIPPED_ANVIL).hidden().frame(AdvancementFrame.CHALLENGE).criterion("ding_sun", dingCelestia(Set.of(), Set.of(Race.BAT))).build(consumer, "blasphemy");
            p.child(Items.CHIPPED_ANVIL).hidden().frame(AdvancementFrame.CHALLENGE).criterion("ding_sun", dingCelestia(Set.of(Race.BAT), Set.of())).build(consumer, "sweet_sweet_revenge");
        });

        parent.child(UItems.PEGASUS_AMULET).hidden().frame(AdvancementFrame.CHALLENGE).criterion("teleport_above_world", CustomEventCriterion.create("teleport_above_world")).rewards(AdvancementRewards.Builder.experience(100)).build(consumer, "a_falling_wizard");

    }

    private void generateBatTribeAdvancementsTree(Consumer<AdvancementEn


		// Syntax:     ^[a-zA-Z0-9-_]{1,38}/[a-z]([-a-z0-9]{0,36}[a-z0-9])?$
		TaskQueueID string `json:"taskQueueId"`

		// Unique identifier for a worker-type within a specific
		// provisioner. Deprecation is planned for this property as it will
		// be replaced, together with `provisionerId`, by the new
		// identifier `taskQueueId`.
		//
		// Syntax:     ^[a-z]([-a-z0-9]{0,36}[a-z0-9])?$
		WorkerType string `json:"workerType"`
	}

	// Status of multiple tasks
	TasksStatusesResponse struct {

		// A continuation token is returned if there are more results than listed
		// here. You can optionally provide the token in the request payload to
		// load the additional results.
		ContinuationToken string `json:"continuationToken,omitempty"`

		// Default:    []
		Statuses []Var2 `json:"statuses"`
	}

	// Response to a request for the number of pending and claimed tasks for a given
	// `provisionerId` and `workerType`.
	Var struct {

		// An approximate number of claimed tasks for the given `provisionerId` and
		// `workerType`. Number of reported here may be higher than actual number of
		// claimed tasks.
		//
		// Mininum:    0
		ClaimedTasks int64 `json:"claimedTasks"`

		// An approximate number of pending tasks for the given `provisionerId` and
		// `workerType`. Number of reported here may be higher than actual number of
		// pending tasks.
		//
		// Mininum:    0
		PendingTasks int64 `json:"pendingTasks"`

		// Unique identifier for a provisioner, that can supply specified
		// `workerType`. Deprecation is planned for this property as it
		// will be replaced, together with `workerType`, by the new
		// identifier `taskQueueId`.
		//
		// Syntax:     ^[a-zA-Z0-9-_]{1,38}$
		ProvisionerID string `json:"provisionerId"`

		// Unique identifier for a task queue
		//
		// Syntax:     ^[a-zA-Z0-9-_]{1,38}/[a-z]([-a-z0-9]{0,36}[a-z0-9])?$
		TaskQueueID string `json:"taskQueueId"`

		// Unique identifier for a worker-type within a specific
		// provisioner. Deprecation is planned for this property as it will
		// be replaced, together with `provisionerId`, by the new
		// identifier `taskQueueId`.
		//
		// Syntax:     ^[a-z]([-a-z0-9]{0,36}[a-z0-9])?$
		WorkerType string `json:"workerType"`
	}

	Var1 struct {

		// Definition of a task that can be scheduled
		Task TaskDefinitionResponse `json:"task"`

		TaskID string `json:"taskId"`
	}

	Var2 struct {

		// A representation of **task status** as known by the queue
		Status TaskStatusStructure `json:"status"`

		TaskID string `json:"taskId"`
	}

	Var3 struct {
		Inserted tcclient.Time `json:"inserted"`

		// Unique run identifier, this is a number between 0 and 1000 inclusive.
		//
		// Mininum:    0
		// Maximum:    1000
		RunID int64 `json:"runId"`

		// Definition of a task that can be scheduled
		Task TaskDefinitionResponse `json:"task"`

		// Unique task identifier, this is UUID encoded as
		// [URL-safe base64](http://tools.ietf.org/html/rfc4648#section-5) and
		// stripped of `=` padding.
		//
		// Syntax:     ^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$
		TaskID string `json:"taskId"`
	}

	Var4 struct {
		Claimed tcclient.Time `json:"claimed"`

		// Unique run identifier, this is a number between 0 and 1000 inclusive.
		//
		// Mininum:


.omarea.utils.AppListHelper
import com.omarea.vtools.R
import com.omarea.vtools.dialogs.DialogAppOrientation
import com.omarea.vtools.dialogs.DialogAppPowerConfig
import kotlinx.android.synthetic.main.activity_app_config2.*
import java.util.*
import kotlin.collections.ArrayList

class ActivityAppConfig2 : ActivityBase() {
    private lateinit var processBarDialog: ProgressBarDialog
    private lateinit var spfPowercfg: SharedPreferences
    private lateinit var globalSPF: SharedPreferences
    private lateinit var applistHelper: AppListHelper
    private var installedList: ArrayList<AppInfo>? = null
    private var displayList: ArrayList<AppInfo>? = null
    private lateinit var sceneConfigStore: SceneConfigStore

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_app_config2)

        setBackArrow()
        globalSPF = context!!.getSharedPreferences(SpfConfig.GLOBAL_SPF, Context.MODE_PRIVATE)

        this.onViewCreated()
    }

    private lateinit var modeSwitcher: ModeSwitcher

    override fun onCreateOptionsMenu(menu: Menu): Boolean {
        menuInflater.inflate(R.menu.scene_apps, menu)
        return true
    }

    //右上角菜单
    override fun onOptionsItemSelected(item: MenuItem): Boolean {
        when (item.itemId) {
            R.id.action_reset -> {
                DialogHelper.confirm(this, "确定重置？", "这将清空你对单个应用配置的【性能调节、独立亮度、屏幕旋转、内存(cgroup)、自动加速、性能监视器】选项！", {
                    sceneConfigStore.resetAll()
                    spfPowercfg.all.clear()
                    initDefaultConfig()
                    recreate()
                })
            }
        }
        return true
    }

    private fun onViewCreated() {
        modeSwitcher = ModeSwitcher()
        processBarDialog = ProgressBarDialog(this)
        applistHelper = AppListHelper(this, false)
        spfPowercfg = getSharedPreferences(SpfConfig.POWER_CONFIG_SPF, Context.MODE_PRIVATE)
        globalSPF = getSharedPreferences(SpfConfig.GLOBAL_SPF, Context.MODE_PRIVATE)
        sceneConfigStore = SceneConfigStore(this.context)

        if (spfPowercfg.all.isEmpty()) {
            initDefaultConfig()
        }

        scene_app_list.setOnItemClickListener { parent, view2, position, _ ->
            try {
                val item = (parent.adapter.getItem(position) as AppInfo)
                val intent = Intent(this.context, ActivityAppDetails::class.java)
                intent.putExtra("app", item.packageName)
                startActivityForResult(intent, REQUEST_APP_CONFIG)
                lastClickRow = view2
            } catch (ex: Exception) {
            }
        }

        // 动态响应检测
        val dynamicControl = globalSPF.getBoolean(SpfConfig.GLOBAL_SPF_DYNAMIC_CONTROL, SpfConfig.GLOBAL_SPF_DYNAMIC_CONTROL_DEFAULT)

        if (dynamicControl) {
            scene_app_list.setOnItemLongClickListener { parent, view, position, id ->
                val item = (parent.adapter.getItem(position) as AppInfo)
                val app = item.packageName.toString()
                DialogAppPowerConfig(this,
                        spfPowercfg.getString(app, ""),
                        object : DialogAppPowerConfig.IResultCallback {
                            override fun onChange(mode: String?) {
                                spfPowercfg.edit().run {
                                    if (mode.isNullOrEmpty()) {
                                        remove(app)
                                    } else {
                                        putString(app, mode)
                                    }
                                }.apply()

                                setAppRowDesc(item)


'''
Input: a = 2, b = 4
Output: 4

Input: a = -1, b = -4
Output: -1

'''

class solution():
    def find_max(self, a, b):
        if a > b:
            return a
        elif a < b:
            return b

a = -4
b  = -1
find_max_result = solution()
value  = find_max_result.find_max(a,b)
print(value)


getclicky.com/101396814.js></script>

Telegram频道群组导航

<img src=https://tgnav.github.io/assets/images/logo.png height=40px width=40px class=logo-light alt


('a' , 1)", "SUBSTRING('a' FROM 1)");
  }

  @Test public void testFunction() {
    check("select substring('Eggs and ham', 1, 3 + 2) || ' benedict' from emp",
        "SELECT (SUBSTRING('Eggs and ham' FROM 1 FOR (3 + 2)) || ' benedict')\n"
            + "FROM `EMP`");
    checkExp(
        "log10(1)\r\n+power(2, mod(\r\n3\n\t\t\f\n,ln(4))*log10(5)-6*log10(7/abs(8)+9))*power(10,11)",
        "(LOG10(1) + (POWER(2, (((MOD(3, LN(4))) * LOG10(5)) - (6 * LOG10(((7 / ABS(8)) + 9))))) * POWER(10, 11)))");
  }

  @Test public void testFunctionWithDistinct() {
    checkExp("count(DISTINCT 1)", "COUNT(DISTINCT 1)");
    checkExp("count(ALL 1)", "COUNT(ALL 1)");
    checkExp("count(1)", "COUNT(1)");
    check("select count(1), count(distinct 2) from emp",
        "SELECT COUNT(1), COUNT(DISTINCT 2)\n"
            + "FROM `EMP`");
  }

  @Test public void testFunctionInFunction() {
    checkExp("ln(power(2,2))", "LN(POWER(2, 2))");
  }

  @Test public void testFunctionNamedArgument() {
    checkExp("foo(x => 1)",
        "`FOO`(`X` => 1)");
    checkExp("foo(x => 1, \"y\" => 'a', z => x <= y)",
        "`FOO`(`X` => 1, `y` => 'a', `Z` => (`X` <= `Y`))");
    checkExpFails("foo(x.y ^=>^ 1)",
        "(?s).*Encountered \"=>\" at .*");
    checkExpFails("foo(a => 1, x.y ^=>^ 2, c => 3)",
        "(?s).*Encountered \"=>\" at .*");
  }

  @Test public void testFunctionDefaultArgument() {
    sql("foo(1, DEFAULT, default, 'default', \"default\", 3)").expression()
        .ok("`FOO`(1, DEFAULT, DEFAULT, 'default', `default`, 3)");
    sql("foo(DEFAULT)").expression()
        .ok("`FOO`(DEFAULT)");
    sql("foo(x => 1, DEFAULT)").expression()
        .ok("`FOO`(`X` => 1, DEFAULT)");
    sql("foo(y => DEFAULT, x => 1)").expression()
        .ok("`FOO`(`Y` => DEFAULT, `X` => 1)");
    sql("foo(x => 1, y => DEFAULT)").expression()
        .ok("`FOO`(`X` => 1, `Y` => DEFAULT)");
    sql("select sum(DISTINCT DEFAULT) from t group by x")
        .ok("SELECT SUM(DISTINCT DEFAULT)\n"
            + "FROM `T`\n"
            + "GROUP BY `X`");
    checkExpFails("foo(x ^+^ DEFAULT)",
        "(?s).*Encountered \"\\+ DEFAULT\" at .*");
    checkExpFails("foo(0, x ^+^ DEFAULT + y)",
        "(?s).*Encountered \"\\+ DEFAULT\" at .*");
    checkExpFails("foo(0, DEFAULT ^+^ y)",
        "(?s).*Encountered \"\\+\" at .*");
  }

  @Test public void testDefault() {
    sql("select ^DEFAULT^ from emp")
        .fails("(?s)Encountered \"DEFAULT\" at .*");
    sql("select cast(empno ^+^ DEFAULT as double) from emp")
        .fails("(?s)Encountered \"\\+ DEFAULT\" at .*");
    sql("select empno ^+^ DEFAULT + deptno from emp")
        .fails("(?s)Encountered \"\\+ DEFAULT\" at .*");
    sql("select power(0, DEFAULT ^+^ empno) from emp")
        .fails("(?s)Encountered \"\\+\" at .*");


igned
;
;	The sign of the result is positive if the inputs have the same
;	sign, otherwise negative
;
__div:
	ldy #0			; Count number of sign changes
	bsr absd
	tfr d,x			; Save divisor in X
	ldd 2,s			; Get the argument
	bsr absd
	exg d,x
	lbsr div16x16		; do the maths
				; X = quotient, D = remainder
	tfr x,d
	cmpy #1			; if we inverted one invert the result
	bne pop2
	bsr negd
	bra pop2

absd:
	bita #$80
	beq ispos
	leay 1,y		; count sign changes in Y
negd:
	subd @one		; negate d
	coma
	comb
ispos:
	rts

;
;	Register versions
;

__regdiv:
	pshs u
	lbsr __div
	tfr d,u
	rts

__regmod:
	pshs u
	lbsr __rem
	tfr d,u
	rts


emplateSpec{
								Spec: batchv1.JobSpec{
									Template: validPodTemplateSpec,
								},
							},
						},
					},
					SuccessPolicy: &jobset.SuccessPolicy{
						Operator: jobset.OperatorAll,
					},
				},
			},
			want: errors.Join(
				fmt.Errorf("a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name',  or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')"),
			),
		},
		{
			name: "group name is not DNS 1035 compliant",
			js: &jobset.JobSet{
				TypeMeta: metav1.TypeMeta{
					Kind:       "JobSet",
					APIVersion: "jobset.x-k8s.io/v1alpha2",
				},
				ObjectMeta: validObjectMeta,
				Spec: jobset.JobSetSpec{
					ReplicatedJobs: []jobset.ReplicatedJob{
						{
							Name:      "rj",
							GroupName: strings.Repeat("a", 64),
							Replicas:  1,
							Template: batchv1.JobTemplateSpec{
								Spec: batchv1.JobSpec{
									Template: validPodTemplateSpec,
								},
							},
						},
					},
					SuccessPolicy: &jobset.SuccessPolicy{
						Operator: jobset.OperatorAll,
					},
				},
			},
			want: errors.Join(
				errors.New(groupNameTooLongErrorMsg),
			),
		},
		{
			name: "jobset name will result in job name being too long",
			js: &jobset.JobSet{
				TypeMeta: metav1.TypeMeta{
					Kind:       "JobSet",
					APIVersion: "jobset.x-k8s.io/v1alpha2",
				},
				ObjectMeta: metav1.ObjectMeta{
					Name: strings.Repeat("a", 62),
				},
				Spec: jobset.JobSetSpec{
					ReplicatedJobs: []jobset.ReplicatedJob{
						{
							Name:      "rj",
							GroupName: "default",
							Replicas:  101,
							Template: batchv1.JobTemplateSpec{
								Spec: batchv1.JobSpec{
									Template: validPodTemplateSpec,
								},
							},
						},
					},
					SuccessPolicy: &jobset.SuccessPolicy{
						Operator: jobset.OperatorAll,
					},
				},
			},
			want: errors.Join(
				errors.New(jobNameTooLongErrorMsg),
			),
		},
		{
			name: "jobset name will result in a pod name being too long",
			js: &jobset.JobSet{
				TypeMeta: metav1.TypeMeta{
					Kind:       "JobSet",
					APIVersion: "jobset.x-k8s.io/v1alpha2",
				},
				ObjectMeta: metav1.ObjectMeta{
					Name: strings.Repeat("a", 56),
				},
				Spec: jobset.JobSetSpec{
					ReplicatedJobs: []jobset.ReplicatedJob{
						{
							Name:      "rj",
							GroupName: "default",
							Replicas:  1,
							Template: batchv1.JobTemplateSpec{
								Spec: batchv1.JobSpec{
									CompletionMode: ptr.To(batchv1.IndexedCompletion),
									Completions:    ptr.To(int32(1)),
									Parallelism:    ptr.To(int32(1)),
									Template:       validPodTemplateSpec,
								},
							},
						},
					},
					SuccessPolicy: &jobset.SuccessPolicy{
						Operator: jobset.OperatorAll,
					},
				},
			},
			want: errors.Join(
				errors.New(podNameTooLongErrorMsg),
			),
		},
	}

	jobsetControllerNameTests := []validationTestCase{


 '4': 1, '5': 5, '10': 'totalEp'},
    {
      '1': 'new_ep',
      '3': 15,
      '4': 1,
      '5': 11,
      '6': '.bilibili.app.viewunite.common.NewEp',
      '10': 'newEp'
    },
    {
      '1': 'reserve',
      '3': 16,
      '4': 1,
      '5': 11,
      '6': '.bilibili.app.viewunite.pgcanymodel.Reserve',
      '10': 'reserve'
    },
    {'1': 'status', '3': 17, '4': 1, '5': 5, '10': 'status'},
    {
      '1': 'activity_float_layer',
      '3': 18,
      '4': 3,
      '5': 11,
      '6': '.bilibili.app.viewunite.pgcanymodel.PlayFloatLayerActivity',
      '10': 'activityFloatLayer'
    },
    {
      '1': 'earphone_conf',
      '3': 19,
      '4': 1,
      '5': 11,
      '6': '.bilibili.app.viewunite.pgcanymodel.EarphoneConf',
      '10': 'earphoneConf'
    },
    {'1': 'cover', '3': 20, '4': 1, '5': 9, '10': 'cover'},
    {'1': 'square_cover', '3': 21, '4': 1, '5': 9, '10': 'squareCover'},
    {'1': 'share_url', '3': 22, '4': 1, '5': 9, '10': 'shareUrl'},
    {'1': 'short_link', '3': 23, '4': 1, '5': 9, '10': 'shortLink'},
    {'1': 'title', '3': 24, '4': 1, '5': 9, '10': 'title'},
    {
      '1': 'horizontal_cover169',
      '3': 25,
      '4': 1,
      '5': 9,
      '10': 'horizontalCover169'
    },
    {
      '1': 'horizontal_cover1610',
      '3': 26,
      '4': 1,
      '5': 9,
      '10': 'horizontalCover1610'
    },
    {'1': 'has_can_play_ep', '3': 27, '4': 1, '5': 5, '10': 'hasCanPlayEp'},
    {
      '1': 'skin',
      '3': 28,
      '4': 1,
      '5': 11,
      '6': '.bilibili.app.viewunite.pgcanymodel.Skin',
      '10': 'skin'
    },
  ],
};

/// Descriptor for `OgvData`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List ogvDataDescriptor = $convert.base64Decode(


missions.EasyPermissions

/**
 * @author xuhao
 * created: 2017/10/25
 * desc:BaseActivity基类
 */
abstract class BaseActivity : AppCompatActivity(),EasyPermissions.PermissionCallbacks {
    /**
     * 多种状态的 View 的切换
     */
    protected var mLayoutStatusView: MultipleStatusView? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(layoutId())
        initData()
        initView()
        start()
        initListener()

    }

    private fun initListener() {
        mLayoutStatusView?.setOnClickListener(mRetryClickListener)
    }

    open val mRetryClickListener: View.OnClickListener = View.OnClickListener {
        start()
    }

    /**
     *  加载布局
     */
    abstract fun layoutId(): Int

    /**
     * 初始化数据
     */
    abstract fun initData()

    /**
     * 初始化 View
     */
    abstract fun initView()

    /**
     * 开始请求
     */
    abstract fun start()

    /**
     * 打卡软键盘
     */
    fun openKeyBord(mEditText: EditText, mContext: Context) {
        val imm = mContext.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
        imm.showSoftInput(mEditText, InputMethodManager.RESULT_SHOWN)
        imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY)
    }

    /**
     * 关闭软键盘
     */
    fun closeKeyBord(mEditText: EditText, mContext: Context) {
        val imm = mContext.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
        imm.hideSoftInputFromWindow(mEditText.windowToken, 0)
    }

    override fun onDestroy() {
        super.onDestroy()
        MyApplication.getRefWatcher(this)?.watch(this)
    }

    /**
     * 重写要申请权限的Activity或者Fragment的onRequestPermissionsResult()方法，
     * 在里面调用EasyPermissions.onRequestPermissionsResult()，实现回调。
     *
     * @param requestCode  权限请求的识别码
     * @param permissions  申请的权限
     * @param grantResults 授权结果
     */
    override fun onRequestPermissionsResult(requestCode: Int, @NonNull permissions: Array<String>, @NonNull grantResults: IntArray) {
        super.onRequestPermissionsResult(requestCode, permissions, grantResults)
        EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this)
    }

    /**
     * 当权限被成功申请的时候执行回调
     *
     * @param requestCode 权限请求的识别码
     * @param perms       申请的权限的名字
     */
    override fun onPermissionsGranted(requestCode: Int, perms: List<String>) {
        Log.i("EasyPermissions", "获取成功的权限$perms")
    }

    /**
     * 当权限申请失败的时候执行的回调
     *
     * @param requestCode 权限请求的识别码
     * @param perms       申请的权限的名字
     */
    override fun onPermissionsDenied(requestCode: Int, perms: List<String>) {
        //处理权限名字字符串
        val sb = StringBuffer()
        for (str in perms) {
            sb.append(s