recrée un nouvelle objet User a partir du json
    const loadedUser = new User(
      userData.email,
      userData.id,
      userData._token,
      new Date(userData._tokenExpirationDate)
      // il faut reconvertir la date en un objet date
    );

    console.log('objet loadedUser: ', loadedUser);

    if (loadedUser.token) {
      // le getter dans le model 'user' s'occupe de verifier si le token est valide

      this.user.next(loadedUser)
      // l'utlisateur devient le "loaderUser", on émet l'evement pour qu'on puisse soucrire dessus après

      const expirationDate = new Date(userData._tokenExpirationDate).getTime() - new Date().getTime();
      // futur tps d'expiration - tps actuelle = tps restant
      console.log('expiration apres auto login: ', expirationDate);

      this.autoLogout(expirationDate);
    }
  }

  private handleAuthentication(
    email: string,
    userId: string,
    token: string,
    expiresIn: number // tps en seconde
  ) {
    console.log('expirnesin quand il arrive:', expiresIn);

    const expirationDate = new Date(new Date().getTime() + expiresIn * 1000);
    //  objet date = la date actuelle en millisecond + (la date d'expiration en s * 1000 (pour mettre en milisecond))

    const user = new User(email, userId, token, expirationDate);
    console.log('user crée: ',user);

    // construction d'un utilisateur avec les données que l'on reçois du back (firebase ici)
    this.user.next(user);
    // on emet notre evenement user

    this.autoLogout(expiresIn * 1000),
    // j'active l'auto logout

    localStorage.setItem("userData", JSON.stringify(user));
    // je stock les données de mon user sous forme de 'string' (du text) avec JSON.stringify
  }

  private handleError(errorRes: HttpErrorResponse) {
    let errorMessage = "An unknow error occured!";

    if (!errorRes.error || !errorRes.error.error) {
      return throwError(errorMessage); //on va "throw" un nouvelle observable avec le message above
    }
    //gestion des error si on a une erreur reseau par exemple, qui ne figure pas dans l'object 'errorRes'

    switch (errorRes.error.error.message) {
      case "EMAIL_EXISTS":
        errorMessage = "The email address is already in use by another account";
        break;
      case "INVALID_PASSWORD":
        errorMessage = "The password is invalid";
        break;
      case "EMAIL_NOT_FOUND":
        errorMessage =
          "There is no user record corresponding to this identifier";
        break;
    }
    return throwError(errorMessage);
  }
  // catchError cette méthode renvoi un observable qui va passé dans la méthode privée handleError
  // cette méthode renvoi 'throwError' ( un autre obersavle) on souscris ensuite a cette observable dans le fichier auth.component.ts
}

// EXEMPLE POUR ILLUSTRER LE FAIT QU'ON EST PAS OBLIGE D'UTILISER LA FONCTION DE CALLBACK EN J.S , JE PEUX PASSER LA REF DE LA FNCTION DIRECT
// const myCustomFunction = callback => callback('foo');
// myCustomFunction(x => console.log(x))       // prints 'foo'
// myCustomFunction(console.log)

// .pipe(catchError(this.handleError))
// --> même chose on peu aussi directement envoyer la référence à la fonction (this.handleError) sans la fonction de callback (errorRes => .... )
import {Injectable} from '@angular/core';

@Injectable()
export class LocalStorageService {

  getItem(key: string) {
    return localStorage.getItem(key);


		functions[i][1]()
			else
				functions[i][1](table.unpack(gx.format_args(functions[i][2], i, bool[i])))
			end
		end
	end
end

function gx.process_single_function(f, ind, bool)
	if bool == nil then
		bool = {}
	end
	if #f > 0 then
		if #f == 1 then
			f[1]()
		else
			f[1](table.unpack(gx.format_args(f[2], ind, bool)))
		end
	end
end

function gx.open_menu(menu_name)
	if gx._menus[menu_name] == nil then
		gg.toast("Menu \""..menu_name.."\" doesn't exist.")
		return
	elseif gx._lang ~= gx._menus[menu_name].lang or gx._menus[menu_name].use_menu_functon then
		gx.set_menu_lang(menu_name)
	end
	local the_menu = {}
	gx.copy_table(gx._menus[menu_name], the_menu)
	local allow_stay = false
	gx.process_a_function(the_menu.pre_f)
	local _title = gx.process_title(the_menu.title)
	if the_menu.type == "back" then
		allow_stay = true
	else
		allow_stay = false
	end
	if gx._nav[#gx._nav].name ~= menu_name then
		gx.add_to_nav({name = the_menu.name, allow_stay = allow_stay})
	end
	if the_menu.use_menu_function == true and type(the_menu.menu[1]) == "function" then
		the_menu.menu = gx.generate_menu(the_menu.menu)
	end

	local ind = nil
	local _ib = nil
	if the_menu.type == "choice" or the_menu.type == "back" or the_menu.type == "xback" then
		if the_menu.type ~= "choice" then
			table.insert(the_menu.menu, gx._back)
		end
		local _m = gx.render_menu(the_menu.menu, the_menu.bools)
		ind = gg.choice(_m, nil, _title)
		if ind == nil then return end
		if the_menu.type ~= "choice" then
			table.remove(_m)

			if ind == #the_menu.menu then
				gx._back_function()
				return
			end
		end
		_ib = gx.make_ib(ind, #_m, gx._menus[menu_name].bools)
	elseif the_menu.type == "multi_choice" or the_menu.type == "multi_choice_s" then
		local _m = gx.render_menu(the_menu.menu, the_menu.bools)
		local _b = nil
		if the_menu.type == "multi_choice_s" then _b = the_menu.bools end
		ind = gg.multiChoice(_m, _b, _title)
		if ind == nil then return end
		_ib = gx.split_index(ind, #_m)
		if the_menu.type == "multi_choice_s" then
			gx._menus[menu_name].old_ind = _ib.index
			_ib.index = gx.index_diff(the_menu.old_ind, _ib.index)
			if #_ib.index == 0 then return end
		elseif the_menu.type == "multi_choice" then
			_ib.bools = gx.switch_bools(_ib.index, the_menu.bools)
		end
	else
		gg.toast("Non existing menu type: "..the_menu.type..". Exiting...")


      env::log(format!("shard{}{}", 3, 1).as_bytes());
            &mut self.sh31
        } else if x / SHARD_SIDE == 3 && y / SHARD_SIDE == 2 {
            env::log(format!("shard{}{}", 3, 2).as_bytes());
            &mut self.sh32
        } else {
            env::log(format!("shard{}{}", 3, 3).as_bytes());
            &mut self.sh33
        }
    }
}<filename>src/polynomial.rs
use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign, Add, Neg, Sub, Mul, Div};
use std::cmp::{Ord, Ordering};
use std::convert::AsRef;
use std::collections::HashSet;

use traits::*;
use monomial::Monomial;

#[derive(Clone, Default, Debug, Eq)]
#[cfg_attr(feature = "serialize", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "repr_c", repr(C))]
/// A symbolic polynomial represented as  `m_1 + m_2 + ... + m_n`.
pub struct Polynomial<I, C, P>
    where I: Id,
          C: Coefficient,
          P: Power {
    /// A vector of the monomials `m_i`.
    pub monomials: Vec<Monomial<I, C, P>>,
}

impl<I, C, P> AsRef<Polynomial<I, C, P>> for Polynomial<I, C, P>
    where I: Id,
          C: Coefficient,
          P: Power {
    fn as_ref(&self) -> &Self {
        self
    }
}

impl<I, C, P> Polynomial<I, C, P>
    where I: Id,
          C: Coefficient,
          P: Power {
    /// `True` only if the polynomial is constant and does not depend on any symbolic variables.
    pub fn is_constant(&self) -> bool {
        match self.monomials.len() {
            0 => true,
            1 => self.monomials[0].is_constant(),
            _ => false,
        }
    }

    /// Evaluates the `Polynomial` given the provided mapping of identifiers to value assignments.
    pub fn eval(&self, values: &::std::collections::HashMap<I, C>) -> Result<C, (I, String)> {
        let mut value = C::zero();
        for m in &self.monomials {
            value += m.eval(values)?;
        }
        Ok(value)
    }

    /// Returns a code equivalent string representation of the `Polynomial`.
    /// The `format` specifies a function how to render the identifiers.
    pub fn to_code<F>(&self, format: &F) -> String
        where F: ::std::ops::Fn(I) -> String {
        match self.monomials.len() {
            0 => "0".into(),
            _ => {
                let mut str: String;
                str = self.monomials[0].to_code(format);
                for m in self.monomials.iter().skip(1) {
                    if m.coefficient > C::zero() {
                        str += " + ";
                        str += &m.to_code(format);
                    } else {
                        str += " ";
                        str += &m.to_code(format);
                    }
                }
                str
            }
        }
    }

    /// Returns the result of the polynomial division with `rhs` as well as the reminder.
    /// Note that this division depends on the ordering of the variable variables type `I`
    /// as explained in [Wikipedia](https://en.wikipedia.org/wiki/Gr%C


edFrom("Unity")]
        Default,
        [RenamedFrom("Unreal")]
        Alternate
    }
}


ange);
if (added != removed.length) {
this.notifyPath(path + '.length', array.length);
}
change.keySplices = null;
change.indexSplices = null;
},
push: function (path) {
var array = this.get(path);
var args = Array.prototype.slice.call(arguments, 1);
var len = array.length;
var ret = array.push.apply(array, args);
this._notifySplice(array, path, len, args.length, []);
return ret;
},
pop: function (path) {
var array = this.get(path);
var args = Array.prototype.slice.call(arguments, 1);
var rem = array.slice(-1);
var ret = array.pop.apply(array, args);
this._notifySplice(array, path, array.length, 0, rem);
return ret;
},
splice: function (path, start, deleteCount) {
var array = this.get(path);
var args = Array.prototype.slice.call(arguments, 1);
var ret = array.splice.apply(array, args);
this._notifySplice(array, path, start, args.length - 2, ret);
return ret;
},
shift: function (path) {
var array = this.get(path);
var args = Array.prototype.slice.call(arguments, 1);
var ret = array.shift.apply(array, args);
this._notifySplice(array, path, 0, 0, [ret]);
return ret;
},
unshift: function (path) {
var array = this.get(path);
var args = Array.prototype.slice.call(arguments, 1);
var ret = array.unshift.apply(array, args);
this._notifySplice(array, path, 0, args.length, []);
return ret;
}
});
}());
Polymer.Base._addFeature({
resolveUrl: function (url) {
var module = Polymer.DomModule.import(this.is);
var root = '';
if (module) {
var assetPath = module.getAttribute('assetpath') || '';
root = Polymer.ResolveUrl.resolveUrl(assetPath, module.ownerDocument.baseURI);
}
return Polymer.ResolveUrl.resolveUrl(url, root);
}
});
Polymer.CssParse = function () {
var api = {
parse: function (text) {
text = this._clean(text);
return this._parseCss(this._lex(text), text);
},
_clean: function (cssText) {
return cssText.replace(rx.comments, '').replace(rx.port, '');
},
_lex: function (text) {
var root = {
start: 0,
end: text.length
};
var n = root;
for (var i = 0, s = 0, l = text.length; i < l; i++) {
switch (text[i]) {
case this.OPEN_BRACE:
if (!n.rules) {
n.rules = [];
}
var p = n;
var previous = p.rules[p.rules.length - 1];
n = {
start: i + 1,
parent: p,
previous: previous
};
p.rules.push(n);
break;
case this.CLOSE_BRACE:
n.end = i + 1;
n = n.parent || root;
break;
}
}
return root;
},
_parseCss: function (node, text) {
var t = text.substring(node.start, node.end - 1);
node.parsedCssText = node.cssText = t.trim();
if (node.parent) {
var ss = node.previous ? node.previous.end : node.parent.start;
t = text.substring(ss, node.start - 1);
t = t.substring(t.lastIndexOf(';') + 1);
var s = node.parsedSelector = node.selector = t.trim();
node.atRule = s.indexOf(AT_START) === 0;
if (node.atRule) {
if (s.indexOf(MEDIA_START) === 0) {
node.type = this.types.MEDIA_RULE;
} else if (s.match(rx.


�图片地址中含有锚点内容，如 `xxx.png#icon` ，URL Query 参数须在锚点前添加。

> **图片地址锚点**
>
> - 图片地址支持添加锚点「#魔法」实现快速图片排版，目前支持通过锚点排版的特性详见：[°图片](guide.md#°图片)
> - 当需要同时应用以上多个排版，可添加多个锚点，如： `#card#fixmax`

## ~~基于色轮的配色方案~~

| 配色示例                                          | 说明                                                         |
| ------------------------------------------------- | ------------------------------------------------------------ |
| ![单色方案](pic/单色.png?srcset=@2x#logo)         | ==单色方案==
由一个颜色的暗/中/明色调组成（如：暗绿、绿、粉绿）

单色搭配上并没有形成颜色的层次，但形成了明暗的层次。
这种搭配在设计中应用时，出来的效果永远不错，其重要性也可见一斑。 |
| ![类比色方案](pic/类比色.png?srcset=@2x#logo)     | ==类比色方案==
色轮上某个颜色的相邻的颜色（如：橙黄色、黄色、橙色）

类比色都拥有共同的三原色颜色（在上图中，是黄色及红色）。
这种颜色搭配产生了一种令人悦目、低对比度的和谐美感。
类比色非常丰富，在设计时应用这种搭配同样让你轻易产生不错的视觉效果。 |
| ![补色方案](pic/补色.png?srcset=@2x#logo)         | ==补色方案==
色轮上直线相对的两种颜色（如：红、绿）

补色形成强列的对比效果，传达出活力、能量、兴奋等意义。
补色要达到最佳的效果，最好是其中一种面积比较小，另一种比较大。
比如在一个蓝色的区域里搭配橙色的小圆点。 |
| ![分裂补色方案](pic/分裂补色.png?srcset=@2x#logo) | ==分裂补色方案==
色轮上某颜色（如：红色）及其补色的类比色（如：绿、青）

这种颜色搭配既具有类比色的低对比度的美感，又具有补色的力量感。
形成了一种既和谐又有重点的颜色关系。
如在上面三种颜色中，红色就显得更加突出。 |
| ![二次色方案](pic/二次色.png?srcset=@2x#logo)     | ==二次色方案==
二次色容易构成协调的搭配（如：绿、橙、紫）

任意两个二次色之间都拥有一种共同的颜色，所以它们轻易能够形成协调的搭配。
如果三种二次色同时使用，则显得很舒适、吸引，具有丰富的色调，以及深度和广度。 |
| ![原色方案](pic/原色.png?srcset=@2x#logo)         | ==原色方案==
三原色同时使用是比较少

红黄搭配较受欢迎。从快餐店到加油站，我们都可以看见这两种颜色同时在一起。
蓝红搭配也很常见，但只有当两者的区域是分离时，才会显得吸引人。
注意：如果是紧邻在一起，则会产生冲突感，需进行分离。 |
# breeze-historical-options

## Introduction
breeze-historical-options provides historic options data(starting from seconds) using the ICICI Breeze API. Data can be used for backtesting, analysis and simulation purposes. All you need is a free ICICI direct account to access Breeze API.

Referral Link - https://secure.icicidirect.com/accountopening?rfrlcode=8510403004&utm_source=referral&utm_mediu


,176.66c-3.732,39.215-19.881,134.378-28.1,178.3-3.476,18.584-10.322,24.816-16.948,25.425-14.4,1.326-25.338-9.517-39.287-18.661-21.827-14.308-34.158-23.215-55.346-37.177-24.485-16.135-8.612-25,5.342-39.5,3.652-3.793,67.107-61.51,68.335-66.746.153-.655.3-3.1-1.154-4.384s-3.59-.849-5.135-.5q-3.283.746-104.608,69.142-14.845,10.194-26.894,9.934c-8.855-.191-25.888-5.006-38.551-9.123-15.531-5.048-27.875-7.717-26.8-16.291q.84-6.7,18.45-13.7,108.446-47.248,144.628-62.3c68.872-28.647,83.183-33.623,92.511-33.789,2.052-.034,6.639.474,9.61,2.885a10.452,10.452,0,0,1,3.53,6.716A43.765,43.765,0,0,1,362.952,176.66Z"],
    "old-republic": [496, 512, [], "f510", "M235.76 10.23c7.5-.31 15-.28 22.5-.09 3.61.14 7.2.4 10.79.73 4.92.27 9.79 1.03 14.67 1.62 2.93.43 5.83.98 8.75 1.46 7.9 1.33 15.67 3.28 23.39 5.4 12.24 3.47 24.19 7.92 35.76 13.21 26.56 12.24 50.94 29.21 71.63 49.88 20.03 20.09 36.72 43.55 48.89 69.19 1.13 2.59 2.44 5.1 3.47 7.74 2.81 6.43 5.39 12.97 7.58 19.63 4.14 12.33 7.34 24.99 9.42 37.83.57 3.14 1.04 6.3 1.4 9.47.55 3.83.94 7.69 1.18 11.56.83 8.34.84 16.73.77 25.1-.07 4.97-.26 9.94-.75 14.89-.24 3.38-.51 6.76-.98 10.12-.39 2.72-.63 5.46-1.11 8.17-.9 5.15-1.7 10.31-2.87 15.41-4.1 18.5-10.3 36.55-18.51 53.63-15.77 32.83-38.83 62.17-67.12 85.12a246.503 246.503 0 0 1-56.91 34.86c-6.21 2.68-12.46 5.25-18.87 7.41-3.51 1.16-7.01 2.38-10.57 3.39-6.62 1.88-13.29 3.64-20.04 5-4.66.91-9.34 1.73-14.03 2.48-5.25.66-10.5 1.44-15.79 1.74-6.69.66-13.41.84-20.12.81-6.82.03-13.65-.12-20.45-.79-3.29-.23-6.57-.5-9.83-.95-2.72-.39-5.46-.63-8.17-1.11-4.12-.72-8.25-1.37-12.35-2.22-4.


.TH read() "" "" "System Call (libc)"
.PC "Read from a file"
.B "#include <unistd.h>"
\fBint read(\fIfd\^\fB, \fIbuffer\^\fB, \fIn\^\fB)\fR
\fBint \fIfd\^\fB; char *\fIbuffer\^\fB; int \fIn\^\fB;\fR
.PP
.B read()
reads up to
.I n
bytes of data from the file descriptor
.I fd
and writes them into
.IR buffer .
The amount of data actually read may be less than that requested if
.B read()
detects
.BR EOF .
The data are read beginning at the current seek position in the file,
which was set by the most recently executed
.B read()
or
.B lseek()
routine.
.B read()
advances the seek pointer by the number


HOW_SILENT, true)
            putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI, Settings.System.DEFAULT_NOTIFICATION_URI)
        }

        val existingValue = Utils.getRingtonePreference(activity)
        if (existingValue != null) {
            if (existingValue.isEmpty()) {
                // Select "Silent"
                val empty: Uri? = null
                intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, empty)
            } else {
                intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, Uri.parse(existingValue))
            }
        } else {
            // No ringtone has been selected, set to the default
            intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, Settings.System.DEFAULT_NOTIFICATION_URI)
        }

        startActivityForResult(intent, REQUEST_CODE_ALERT_RINGTONE)
    }

    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
        if (requestCode == REQUEST_CODE_ALERT_RINGTONE && data != null) {
            val ringtone = data.getParcelableExtra<Uri>(RingtoneManager.EXTRA_RINGTONE_PICKED_URI)
            // ringtone is null when "Silent" was selected
            val ringtoneString = ringtone?.toString() ?: ""

            Utils.setRingtonePreference(activity, ringtoneString)
            val ringtoneDisplayString = getRingtoneTitleFromUri(requireActivity(), ringtoneString)
            ringtonePref.summary = ringtoneDisplayString ?: ""
        } else {
            super.onActivityResult(requestCode, resultCode, data)
        }
    }

    override fun onTimeZoneSet(tzi: TimeZoneInfo) {
        val timeZoneDisplayName = tzPickerUtils.getGmtDisplayName(
                activity, tzi.mTzId, System.currentTimeMillis(), false)
        homeTzPref.summary = timeZoneDisplayName
        Utils.setTimeZone(activity, tzi.mTzId)
    }

    companion object {
        // Preference keys
        const val KEY_THEME_PREF = "pref_theme"
        const val KEY_REAL_EVENT_COLORS = "pref_real_event_colors"
        const val KEY_DO_NOT_CHECK_BATTERY_OPTIMIZATION = "pref_do_not_check_battery_optimization"
        const val KEY_PURE_BLACK_NIGHT_MODE = "pref_pure_black_night_mode"
        const val KEY_DEFAULT_START = "preferences_default_start"
        const val KEY_HIDE_DECLINED = "preferences_hide_declined"
        const val KEY_WEEK_START_DAY = "preferences_week_start_day"
        const val KEY_SHOW_WEEK_NUM = "preferences_show_week_num"
        const val KEY_DAYS_PER_WEEK = "preferences_days_per_week"
        const val KEY_MDAYS_PER_WEEK = "preferences_mdays_per_week"
        const val KEY_CLEAR_SEARCH_HISTORY = "preferences_clear_search_history"
        const val KEY_ALERTS_CATEGORY = "preferences_alerts_category"
        const val KEY_ALERTS = "preferences_alerts"
        const val KEY_NOTIFICATION = "preferences_notification"
        const val KEY_ALERTS_VIBRATE = "preferences_alerts_vibrate"
        const val KEY_ALERTS_RINGTONE = "preferences_alerts_ringtone"
        const val KEY_ALERTS_POPUP = "preferences_alerts_popup"
        const val KEY_SHOW_CONTROLS = "preferences_show_controls"
        const val KEY_DEFAULT_REMINDER = "preferences_default_reminder"
        const val NO_REMINDER = -2147483648
        const val NO_REMINDER_STRING = "-2147483648"
        const val REMINDER_DEFAULT_TIME = 10 // in minutes
        const val KEY_USE_CUSTOM_SNOOZE_DELAY = "preferences_custom_snooze_delay"
        const val KEY_DEFAULT_SNOOZE_DELAY = "preferences_default_s


wait send_group_msg_by_bot(bot, group_id, group_msg.strip())
                    except:
                        logger.print_exc(f"发送新APPEND上线提醒: {region} {music['id']} 到群 {group_id} 失败")
                        continue

            # 从无APPEND列表中移除
            if region in no_apd_musics:
                no_apd_musics[region].remove(mid)
            # 添加到已通知列表中
            if region not in notified_new_apd:
                notified_new_apd[region] = []
            notified_new_apd[region].append(mid)
            updated = True

    if updated:
        file_db.set("no_apd_musics", no_apd_musics)
        file_db.set("notified_new_apd", notified_new_apd)

# 自动同步歌曲别名
for hour, minute, second in SyncMusicAliasConfig.get().sync_times:
    @scheduler.scheduled_job("cron", hour=hour, minute=minute, second=second)
    async def cron_statistic():
        logger.info("触发歌曲别名自动同步")
        await sync_music_alias()


 LimitStack,
}

impl CognitiveComplexity {
    #[must_use]
    pub fn new(limit: u64) -> Self {
        Self {
            limit: LimitStack::new(limit),
        }
    }
}

impl_lint_pass!(CognitiveComplexity => [COGNITIVE_COMPLEXITY]);

impl CognitiveComplexity {
    #[allow(clippy::cast_possible_truncation)]
    fn check<'a, 'tcx>(
        &mut self,
        cx: &'a LateContext<'a, 'tcx>,
        kind: FnKind<'tcx>,
        decl: &'tcx FnDecl<'_>,
        body: &'tcx Body<'_>,
        body_span: Span,
    ) {
        if body_span.from_expansion() {
            return;
        }

        let expr = &body.value;

        let mut helper = CCHelper { cc: 1, returns: 0 };
        helper.visit_expr(expr);
        let CCHelper { cc, returns } = helper;
        let ret_ty = cx.tables.node_type(expr.hir_id);
        let ret_adjust = if is_type_diagnostic_item(cx, ret_ty, sym!(result_type)) {
            returns
        } else {
            #[allow(clippy::integer_division)]
            (returns / 2)
        };

        let mut rust_cc = cc;
        // prevent degenerate cases where unreachable code contains `return` statements
        if rust_cc >= ret_adjust {
            rust_cc -= ret_adjust;
        }

        if rust_cc > self.limit.limit() {
            let fn_span = match kind {
                FnKind::ItemFn(ident, _, _, _, _) | FnKind::Method(ident, _, _, _) => ident.span,
                FnKind::Closure(_) => {
                    let header_span = body_span.with_hi(decl.output.span().lo());
                    let pos = snippet_opt(cx, header_span).and_then(|snip| {
                        let low_offset = snip.find('|')?;
                        let high_offset = 1 + snip.get(low_offset + 1..)?.find('|')?;
                        let low = header_span.lo() + BytePos(low_offset as u32);
                        let high = low + BytePos(high_offset as u32 + 1);

                        Some((low, high))
                    });

                    if let Some((low, high)) = pos {
                        Span::new(low, high, header_span.ctxt())
                    } else {
                        return;
                    }
                },
            };

            span_lint_and_help(
                cx,
                COGNITIVE_COMPLEXITY,
                fn_span,
                &format!(
                    "the function has a cognitive complexity of ({}/{})",
                    rust_cc,
                    self.limit.limit()
                ),
                None,
                "you could split it up into multiple smaller functions",
            );
        }
    }
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CognitiveComplexity {
    fn check_fn(
        &mut self,
        cx: &LateContext<'a, 'tcx>,
        kind: FnKind<'tcx>,
        decl: &'tcx FnDecl<'_>,
        body: &'tcx Body<'_>,
        span: Span,
        hir_id: HirId,
    ) {
        let def_id = cx.tcx.hir().local_def_id(hir_id);
        if !cx.tcx.has_attr(def_id.to_def_id(), sym!(test)) {
            self.check(cx, kind, decl, body, span);
        }
    }

    fn en


* @since 5.0.2
     */
    public class PdfVisibilityExpression : PdfArray {

        /** A boolean operator. */
        public const int OR = 0;
        /** A boolean operator. */
        public const int AND = 1;
        /** A boolean operator. */
        public const int NOT = -1;

        /**
         * Creates a visibility expression.
         * @param type should be AND, OR, or NOT
         */
        public PdfVisibilityExpression(int type) : base() {
            switch(type) {
            case OR:
                base.Add(PdfName.OR);
                break;
            case AND:
                base.Add(PdfName.AND);
                break;
            case NOT:
                base.Add(PdfName.NOT);
                break;
            default:
                throw new ArgumentException(MessageLocalization.GetComposedMessage("illegal.ve.value"));
            }
        }

        /**
         * @see com.itextpdf.text.pdf.PdfArray#add(int, com.itextpdf.text.pdf.PdfObject)
         */
        public override void Add(int index, PdfObject element) {
            throw new ArgumentException(MessageLocalization.GetComposedMessage("illegal.ve.value"));
        }

        /**
         * @see com.itextpdf.text.pdf.PdfArray#add(com.itextpdf.text.pdf.PdfObject)
         */
        public override bool Add(PdfObject obj) {
            if (obj is PdfLayer)
                return base.Add(((PdfLayer)obj).Ref);
            if (obj is PdfVisibilityExpression)
                return base.Add(obj);
            throw new ArgumentException(MessageLocalization.GetComposedMessage("illegal.ve.value"));
        }

        /**
         * @see com.itextpdf.text.pdf.PdfArray#addFirst(com.itextpdf.text.pdf.PdfObject)
         */
        public override void AddFirst(PdfObject obj) {
            throw new ArgumentException(MessageLocalization.GetComposedMessage("illegal.ve.value"));
        }

        /**
         * @see com.itextpdf.text.pdf.PdfArray#add(float[])
         */
        public override bool Add(float[] values) {
            throw new ArgumentException(MessageLocalization.GetComposedMessage("illegal.ve.value"));
        }

        /**
         * @see com.itextpdf.text.pdf.PdfArray#add(int[])
         */
        public override bool Add(int[] values) {
            throw new ArgumentException(MessageLocalization.GetComposedMessage("illegal.ve.value"));
        }

    }
}


29,29,28

	mr	6,27
	mr	7,28
	li	8,0
	addi	31,3,56
	bl	__poly1305_splat

	bl	__poly1305_mul
	addi	31,3,48
	bl	__poly1305_splat

	bl	__poly1305_mul
	addi	31,3,60
	bl	__poly1305_splat

	bl	__poly1305_mul
	addi	31,3,52
	bl	__poly1305_splat

	ld	6,0(3)
	ld	7,8(3)
	ld	8,16(3)

	rldicl	9,6,0,38
	rldicl	10,6,38,38
	rldicl	11,6,12,52
	.long	0x7C0901E7
	insrdi	11,7,14,38
	.long	0x7C2A01E7
	rldicl	10,7,50,38
	.long	0x7C4B01E7
	rldicl	11,7,24,40
	.long	0x7C6A01E7
	insrdi	11,8,3,37
	.long	0x7C8B01E7
	li	0,1
	stw	0,24(3)
	b	.Loaded_vsx

.align	4
.Lskip_init_vsx:
	li	27,4
	li	28,8
	li	29,12
	li	30,16
	.long	0x7C001819
	.long	0x7C3B1819
	.long	0x7C5C1819
	.long	0x7C7D1819
	.long	0x7C9E1819

.Loaded_vsx:
	li	27,0x10
	li	28,0x20
	li	29,0x30
	li	30,0x40
	li	31,0x50
	li	7,0x60
	li	8,0x70
	addi	10,3,64
	addi	11,1,63

	vxor	20,20,20
	.long	0xF000A057
	.long	0xF021A057
	.long	0xF042A057
	.long	0xF063A057
	.long	0xF084A057

	.long	0x7F5F6699
	.long	0x7EA02699
	.long	0x7EDB2699
	.long	0x7EFC2699
	.long	0x7F1D2699
	vperm	21,21,21,26
	vperm	22,22,22,26
	vperm	23,23,23,26
	vperm	24,24,24,26

	.long	0xF0B5B057
	vspltisb	26,4
	vperm	7,21,22,31
	vspltisb	28,14
	.long	0xF115B357

	.long	0x10C5CEC4
	.long	0x10E7D6C4
	.long	0x1128DEC4
	.long	0x1108E6C4
	vand	5,5,29
	vand	6,6,29
	vand	7,7,29
	vand	8,8,29

	.long	0xF2B7C057
	vperm	22,23,24,31
	.long	0xF2F7C357

	.long	0x1295CEC4
	.long	0x12D6D6C4
	.long	0x1317DEC4
	.long	0x12F7E6C4
	vand	21,21,29
	vand	20,20,29
	vand	22,22,29
	vand	23,23,29

	.long	0x11384E8C
	.long


/*
 * Copyright (c) 2003, 2007-14 Matteo Frigo
 * Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */

/* This file was automatically generated --- DO NOT EDIT */
/* Generated on Fri Jan 27 16:10:04 EST 2017 */

#include "codelet-dft.h"

#ifdef HAVE_FMA

/* Generated by: ../../../genfft/gen_notw_c.native -fma -reorder-insns -schedule-for-pipeline -simd -compact -variables 4 -pipeline-latency 8 -n 2 -name n1fv_2 -include n1f.h */

/*
 * This function contains 2 FP additions, 0 FP multiplications,
 * (or, 2 additions, 0 multiplications, 0 fused multiply/add),
 * 5 stack variables, 0 constants, and 4 memory accesses
 */
#include "n1f.h"

static void n1fv_2(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs)
{
     {
	  INT i;
	  const R *xi;
	  R *xo;
	  xi = ri;
	  xo = ro;
	  for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(4, is), MAKE_VOLATILE_STRIDE(4, os)) {
	       V T1, T2;
	       T1 = LD(&(xi[0]), ivs, &(xi[0]));
	       T2 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)]));
	       ST(&(xo[0]), VADD(T1, T2), ovs, &(xo[0]));
	       ST(&(xo[WS(os, 1)]), VSUB(T1, T2), ovs, &(xo[WS(os, 1)]));
	  }
     }
     VLEAVE();
}

static const kdft_desc desc = { 2, XSIMD_STRING("n1fv_2"), {2, 0, 0, 0}, &GENUS, 0, 0, 0, 0 };

void XSIMD(codelet_n1fv_2) (planner *p) {
     X(kdft_register) (p, n1fv_2, &desc);
}

#else				/* HAVE_FMA */

/* Generated by: ../../../genfft/gen_notw_c.native -simd -compact -variables 4 -pipeline-latency 8 -n 2 -name n1fv_2 -include n1f.h */

/*
 * This function contains 2 FP additions, 0 FP multiplications,
 * (or, 2 additions, 0 multiplications, 0 fused multiply/add),
 * 5 stack variables, 0 constants, and 4 memory accesses
 */
#include "n1f.h"

static void n1fv_2(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs)
{
     {
	  INT i;
	  const R *xi;
	  R *xo;
	  xi = ri;
	  xo = ro;
	  for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(4, is), MAKE_VOLATILE_STRIDE(4, os)) {
	       V T1, T2;
	       T1 = LD(&(xi[0]), ivs, &(xi[0]));
	       T2 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)]));
	       ST(&(xo[WS(os, 1)]), VSUB(T1, T2), ovs, &(xo[WS(os, 1)]));
	       ST(&(xo[0]), VADD(T1, T2), ovs, &(xo[0]));
	  }
     }
     VLEAVE();
}

static const kdft_desc desc = { 2, XSIMD_STRING("n1fv_2"), {2, 0, 0, 0}, &GENUS, 0, 0, 0, 0 };

void XSIMD(codelet_n1fv_2) (planner *p) {
     X(kdft_register) (p, n1fv_2, &desc);
}

#endif				/* HAVE_FMA */


        defineCommonLocaleTests(name, -1, -1);
    }

    localeModule('vi');

    test('parse', function (assert) {
        var i,
            tests = 'tháng 1,Th01_tháng 2,Th02_tháng 3,Th03_tháng 4,Th04_tháng 5,Th05_tháng 6,Th06_tháng 7,Th07_tháng 8,Th08_tháng 9,Th09_tháng 10,Th10_tháng 11,Th11_tháng 12,Th12'.split('_');

        function equalTest(input, mmm, i) {
            assert.equal(moment(input, mmm).month(), i, input + ' should be month ' + i);
        }

        for (i = 0; i < 12; i++) {
            tests[i] = tests[i].split(',');
            equalTest(tests[i][0], '[tháng] M', i);
            equalTest(tests[i][1], '[Th]M', i);
            equalTest(tests[i][0], '[tháng] MM', i);
            equalTest(tests[i][1], '[Th]MM', i);
            equalTest(tests[i][0].toLocaleLowerCase(), '[THÁNG] M', i);
            equalTest(tests[i][1].toLocaleLowerCase(), '[TH]M', i);
            equalTest(tests[i][0].toLocaleUpperCase(), '[THÁNG] MM', i);
            equalTest(tests[i][1].toLocaleUpperCase(), '[TH]MM', i);
        }
    });

    test('format', function (assert) {
        var a = [
                ['dddd, MMMM Do YYYY, h:mm:ss a',      'chủ nhật, tháng 2 14 2010, 3:25:50 ch'],
                ['ddd, hA',                            'CN, 3CH'],
                ['M Mo MM MMMM MMM',                   '2 2 02 tháng 2 Th02'],
                ['YYYY YY',                            '2010 10'],
                ['D Do DD',                            '14 14 14'],
                ['d do dddd ddd dd',                   '0 0 chủ nhật CN CN'],
                ['DDD DDDo DDDD',                      '45 45 045'],
                ['w wo ww',                            '6 6 06'],
                ['h hh',                               '3 03'],
                ['H HH',                               '15 15'],
                ['m mm',                               '25 25'],
                ['s ss',                               '50 50'],
                ['a A',                                'ch CH'],
                ['[ngày thứ] DDDo [của năm]',          'ngày thứ 45 của năm'],
                ['LTS',                                '15:25:50'],
                ['L',                                  '14/02/2010'],
                ['LL',                                 '14 tháng 2 năm 2010'],
                ['LLL',                                '14 tháng 2 năm 2010 15:25'],
                ['LLLL',                               'chủ nhật, 14 tháng 2 năm 2010 15:25'],
                ['l',                                  '14/2/2010'],
                ['ll',                                 '14 Th02 2010'],
                ['lll',                                '14 Th02 2010 15:25'],
                ['llll',                               'CN, 14 Th02 2010 15:25']
            ],
            b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
            i;

        for (i = 0; i < a.length; i++) {


 to units.
 * @param decimals The number of decimal places the unit amount has.
 */
export function toUnitAmount(
  baseUnits: BigNumber | string | number,
  decimals: number,
): BigNumber {
  return new BigNumber(baseUnits).div(new BigNumber(10).pow(decimals));
}

/**
 * Get the on-chain ticker for the provided market
 * @param market The market
 */
export function getOnchainTicker(market: Market) {
  if (!validator.isValidMarket(market)) {
    throw new Error(ApiError.INVALID_MARKET);
  }
  return OnChainTicker[market.split('_')[0]];
}

/**
 * Get the network and subnet for the passed on-chain asset.
 * Extract the on-chain asset from the market if necessary.
 * @param value The on-chain ticker or market
 */
export function getNetworkDetails(
  value: OnChainTicker | Market,
): { network: Network; subnet: Subnet } | undefined {
  let ticker = value;
  try {
    // Get the on-chain asset from the market if necessary
    ticker = getOnchainTicker(value as Market);
  } catch (error) {}

  switch (ticker) {
    case OnChainTicker.SBTC:
      return {
        network: Network.BITCOIN,
        subnet: Subnet.SIMNET,
      };
    case OnChainTicker.TBTC:
      return {
        network: Network.BITCOIN,
        subnet: Subnet.TESTNET,
      };
    case OnChainTicker.BTC:
      return {
        network: Network.BITCOIN,
        subnet: Subnet.MAINNET,
      };
    case OnChainTicker.SLTC:
      return {
        network: Network.LITECOIN,
        subnet: Subnet.SIMNET,
      };
    case OnChainTicker.TLTC:
      return {
        network: Network.LITECOIN,
        subnet: Subnet.TESTNET,
      };
    case OnChainTicker.LTC:
      return {
        network: Network.LITECOIN,
        subnet: Subnet.MAINNET,
      };
    case OnChainTicker.SXLM:
      return {
        network: Network.STELLAR,
        subnet: Subnet.SIMNET,
      };
    case OnChainTicker.TXLM:
      return {
        network: Network.STELLAR,
        subnet: Subnet.TESTNET,
      };
    case OnChainTicker.XLM:
      return {
        network: Network.STELLAR,
        subnet: Subnet.MAINNET,
      };
    case OnChainTicker.SETH:
    case OnChainTicker.SDAI:
      return {
        network: Network.ETHEREUM,
        subnet: Subnet.GANACHE_SIMNET,
      };
    case OnChainTicker.KETH:
    case OnChainTicker.KDAI:
      return {
        network: Network.ETHEREUM,
        subnet: Subnet.KOVAN_TESTNET,
      };
    case OnChainTicker.ETH:
    case OnChainTicker.DAI:
      return {
        network: Network.ETHEREUM,
        subnet: Subnet.MAINNET,
      };
  }
}
import {AnyExtendedMapper} from "../extended-mapper";
import {ExtraParamsOfImpl} from "./extra-params-of-impl";
import {UnionToIntersection} from "../../type-util";

/**
    Derives a sane type for what a `Mapper<>`
    has for extra parameters.
*/
export type ExtraParamsOf<F extends AnyExtendedMapper> = (
    Extract<
        UnionToIntersection<ExtraParamsOfImpl<F>>,
        [any]
    >[0]
);import {apiUrl} from '../cy-utils';

beforeEach(() => {
	cy.request('DELETE', `${apiUrl}/everything`);
	// This is important to go to the webpage but also to register spy to fail on console errors
	cy.visit('/');
});

functi


defbindings("WGroupCW", {
    bdoc("Toggle client window group full-screen mode", "fullscr"),
    kpress_wait(META.."Q", "WGroup.set_fullscreen(_, 'toggle')"),
})

-- WMPlex context bindings
--
-- These bindings work in frames and on screens. The innermost of such
-- contexts/objects always gets to handle the key press.

defbindings("WMPlex", {
    bdoc("Close current object.", "close"),
    kpress_wait(META.."C", "WRegion.rqclose_propagate(_, _sub)"),

    bdoc("Detach (float) or reattach an object to its previous location.", "detach"),
    -- By using _chld instead of _sub, we can detach/reattach queries
    -- attached to a group. The detach code checks if the parameter
    -- (_chld) is a group 'bottom' and detaches the whole group in that
    -- case.
    kpress(ALTMETA.."D", "ioncore.detach(_chld, 'toggle')", "_chld:non-nil"),
})

-- Frames for transient windows ignore this bindmap

defbindings("WMPlex.toplevel", {
    bdoc("Toggle tag of current object.", "tag"),
    kpress(META.."T", "WRegion.set_tagged(_sub, 'toggle')", "_sub:non-nil"),

    bdoc("Clear all tags.", "-tags"),
    kpress(ALTMETA.."T", "ioncore.clear_tags()"),

    bdoc("Lock screen", "lock"),
    kpress(META.."L", "notioncore.exec_on(_, notioncore.lookup_script('notion-lock'))"),

    bdoc("Run a terminal emulator.", "xterm"),
    kpress(META.."Return", "mod_query.exec_on_merr(_, XTERM or 'xterm')"),
    kpress("F2", "mod_query.exec_on_merr(_, XTERM or 'xterm')"),

    bdoc("Query for command line to execute.", "run"),
    kpress(META.."J", "mod_query.query_exec(_)"),

    bdoc("Query for Lua code to execute.", "lua"),
    kpress(ALTMETA.."J", "mod_query.query_lua(_)"),

    bdoc("Query for host to connect to with SSH.", "ssh"),
    kpress(META.."F4", "mod_query.query_ssh(_, ':ssh')"),

    bdoc("Query for file to edit.", "edit"),
    kpress(META.."F5",
           "mod_query.query_editfile(_, EDIT_COMMAND or 'run-mailcap --action=edit')"),

    bdoc("Query for file to view.", "view"),
    kpress(META.."F6",
           "mod_query.query_runfile(_, VIEW_COMMAND or 'xdg-open')"),

    bdoc("Query for keybinding.", "qkb"),
    kpress(META.."F7",
           "mod_query.query_binding(_, _sub)"),

    bdoc("Query for workspace to go to or create a new one.", "+ws"),
    kpress(ALTMETA.."F9", "mod_query.query_workspace(_)"),

    bdoc("Query for a client window to go to.", "go"),
    kpress(META.."G", "mod_query.query_gotoclient(_)"),

    bdoc("Display context menu.", "ctx"),
    kpress(META.."M", "mod_menu.menu(_, _sub, 'ctxmenu')"),
    bdoc("Query for context menu.", "qctx"),
    kpress(ALTMETA.."M", "mod_query.query_menu(_, _sub, 'ctxmenu', 'Context menu:')"),

    bdoc("Show Notion 'live docs'.", "help"),
    kpress(META.."slash", "notioncore.show_live_docs(_)"),

    bdoc("Query for manual page to be displayed.", "man"),
    kpress(ALTMETA.."slash", "mod_quer


419,538,435" href="#obterPessoasTeste(br.gov.jfrj.siga.dp.CpOrgaoUsuario)" alt=""><area shape="rect" coords="178,435,540,452" href="#ordenarConfiguracoes(java.util.ArrayList)" alt=""><area shape="rect" coords="178,452,323,469" href="#printDate(java.util.Date)" alt=""><area shape="rect" coords="178,469,430,485" href="#printOrigem(br.gov.jfrj.siga.relatorio.AlteracaoDireitosItem)" alt=""><area shape="rect" coords="178,485,363,502" href="#processarDados()" alt=""><area shape="rect" coords="178,502,507,519" href="#processarItem(br.gov.jfrj.siga.relatorio.AlteracaoDireitosItem, java.util.List)" alt=""><area shape="rect" coords="178,519,510,536" href="#setCpOrgaosUsuario(java.util.ArrayList)" alt=""><area shape="rect" coords="178,536,366,552" href="#setCpServico(br.gov.jfrj.siga.cp.CpServico)" alt=""><area shape="rect" coords="178,552,598,569" href="#setCpSituacoesConfiguracao(java.util.ArrayList)" alt=""><area shape="rect" coords="170,111,306,129" href="package-summary.html" alt=""><area shape="rect" coords="461,29,587,53" href="../../../../../br/gov/jfrj/relatorio/dinamico/RelatorioTemplate.html" alt=""><area shape="rect" coords="440,2,603,20" href="../../../../../br/gov/jfrj/relatorio/dinamico/package-summary.html" alt=""><area shape="rect" coords="11,138,84,161" href="../../../../../br/gov/jfrj/siga/cp/CpServico.html" alt=""><area shape="rect" coords="2,111,106,129" href="../../../../../br/gov/jfrj/siga/cp/package-summary.html" alt=""></map>
<map name="umlmap205W1H0"><area shape="rect" coords="-145,138,46,165" href="#" alt=""><area shape="rect" coords="-396,166,-114,183" href="#cpOrgaosUsuario" alt=""><area shape="rect" coords="-396,183,-258,200" href="#cpServico" alt=""><area shape="rect" coords="-396,200,-26,216" href="#cpSituacoesConfiguracao" alt=""><area shape="rect" coords="-396,217,-214,234" href="#AcessoServicoRelatorio(java.util.Map)" alt=""><area shape="rect" coords="-396,235,-92,252" href="#configurarRelatorio()" alt=""><area shape="rect" coords="-396,252,-299,268" href="#dao()" alt=""><area shape="rect" coords="-396,268,277,285" href="#gerar(br.gov.jfrj.siga.cp.CpTipoConfiguracao, br.gov.jfrj.siga.cp.CpPerfil, br.gov.jfrj.siga.dp.DpPessoa, br.gov.jfrj.siga.dp.DpLotacao, br.gov.jfrj.siga.dp.CpOrgaoUsuario, br.gov.jfrj.siga.cp.CpServico, java.util.Date)" alt=""><area shape="rect" coords="-396,285,-86,302" href="#getCpOrgaosUsuario()" alt=""><area shape="rect" coords="-396,302,-230,318" href="#getCpServico()" alt=""><area shape="rect" coords="-396,318,2,335" href="#getCpSituacoesConfig


 */  swc1    $f10, 0x0018($sp)
/* 007F8 80A9F7D8 861800B6 */  lh      $t8, 0x00B6($s0)           ## 000000B6
/* 007FC 80A9F7DC AFA00024 */  sw      $zero, 0x0024($sp)
/* 00800 80A9F7E0 AFB80020 */  sw      $t8, 0x0020($sp)
/* 00804 80A9F7E4 921901C7 */  lbu     $t9, 0x01C7($s0)           ## 000001C7
/* 00808 80A9F7E8 AFA3004C */  sw      $v1, 0x004C($sp)
/* 0080C 80A9F7EC 27290002 */  addiu   $t1, $t9, 0x0002           ## $t1 = 00000002
/* 00810 80A9F7F0 0C00C916 */  jal     Actor_SpawnAttached

/* 00814 80A9F7F4 AFA90028 */  sw      $t1, 0x0028($sp)
/* 00818 80A9F7F8 3C0180AA */  lui     $at, %hi(D_80AA04F8)       ## $at = 80AA0000
/* 0081C 80A9F7FC C42C04F8 */  lwc1    $f12, %lo(D_80AA04F8)($at)
/* 00820 80A9F800 8FA3004C */  lw      $v1, 0x004C($sp)
/* 00824 80A9F804 C4700858 */  lwc1    $f16, 0x0858($v1)          ## 00000858
.L80A9F808:
/* 00828 80A9F808 3C013FC0 */  lui     $at, 0x3FC0                ## $at = 3FC00000
/* 0082C 80A9F80C 44812000 */  mtc1    $at, $f4                   ## $f4 = 1.50
/* 00830 80A9F810 460C8481 */  sub.s   $f18, $f16, $f12
/* 00834 80A9F814 C60001BC */  lwc1    $f0, 0x01BC($s0)           ## 000001BC
/* 00838 80A9F818 3C013F00 */  lui     $at, 0x3F00                ## $at = 3F000000
/* 0083C 80A9F81C 44815000 */  mtc1    $at, $f10                  ## $f10 = 0.50
/* 00840 80A9F820 46049182 */  mul.s   $f6, $f18, $f4
/* 00844 80A9F824 46003201 */  sub.s   $f8, $f6, $f0
/* 00848 80A9F828 460A4402 */  mul.s   $f16, $f8, $f10
/* 0084C 80A9F82C 46100480 */  add.s   $f18, $f0, $f16
/* 00850 80A9F830 10000019 */  beq     $zero, $zero, .L80A9F898
/* 00854 80A9F834 E61201BC */  swc1    $f18, 0x01BC($s0)          ## 000001BC
.L80A9F838:
/* 00858 80A9F838 C42204FC */  lwc1    $f2, %lo(D_80AA04FC)($at)
/* 0085C 80A9F83C 3C01437F */  lui     $at, 0x437F                ## $at = 437F0000
/* 00860 80A9F840 4600103C */  c.lt.s  $f2, $f0
/* 00864 80A9F844 00000000 */  nop


	Name types.NamespacedName
	Kind v1.Kind
}

// Certificate houses the real certificate data that is sent to the configurator.
type Certificate struct {
	// TLSCert is the SSL certificate used to send to CA.
	TLSCert []byte
	// TLSPrivateKey is the cryptographic key for encrpyting traffic during secure TLS.
	TLSPrivateKey []byte
	// CACert is the root certificate authority.
	CACert []byte
}

// NewCertificateBundle generates a kubernetes aware certificate that is used during the configurator for nginx.
func NewCertificateBundle(name types.NamespacedName, kind string, cert *Certificate) *CertificateBundle {
	return &CertificateBundle{
		Name: name,
		Kind: v1.Kind(kind),
		Cert: cert,
	}
}

// validateTLS checks to make sure a ssl certificate key pair is valid.
func validateTLS(tlsCert, tlsPrivateKey []byte) error {
	_, err := tls.X509KeyPair(tlsCert, tlsPrivateKey)
	if err != nil {
		return fmt.Errorf("tls secret is invalid: %w", err)
	}

	return nil
}

// validateCA validates the ca.crt entry in the Certificate. If it is valid, the function returns nil.
func validateCA(caData []byte) error {
	data := make([]byte, base64.StdEncoding.DecodedLen(len(caData)))
	_, err := base64.StdEncoding.Decode(data, caData)
	if err != nil {
		data = caData
	}
	block, _ := pem.Decode(data)
	if block == nil {
		return fmt.Errorf("the data field %q must hold a valid CERTIFICATE PEM block", CAKey)
	}
	if block.Type != "CERTIFICATE" {
		return fmt.Errorf("the data field %q must hold a valid CERTIFICATE PEM block, but got %q", CAKey, block.Type)
	}

	_, err = x509.ParseCertificate(block.Bytes)
	if err != nil {
		return fmt.Errorf("failed to validate certificate: %w", err)
	}

	return nil
}
package graph

import (
	"fmt"
	"testing"

	. "github.com/onsi/gomega"
	apiv1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/types"
	"sigs.k8s.io/controller-runtime/pkg/client"
)

v


/******************************************************************************
 * Spine Runtimes Software License
 * Version 2.3
 *
 * Copyright (c) 2013-2015, Esoteric Software
 * All rights reserved.
 *
 * You are granted a perpetual, non-exclusive, non-sublicensable and
 * non-transferable license to use, install, execute and perform the Spine
 * Runtimes Software (the "Software") and derivative works solely for personal
 * or internal use. Without the written permission of Esoteric Software (see
 * Section 2 of the Spine Software License Agreement), you may not (a) modify,
 * translate, adapt or otherwise create derivative works, improvements of the
 * Software or develop new applications using the Software or (b) remove,
 * delete, alter or obscure any trademarks or any copyright, trademark, patent
 * or other intellectual property or proprietary rights notices on or in the
 * Software, including any copy thereof. Redistributions in binary or source
 * form must include this license and terms.
 *
 * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
 * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *****************************************************************************/

using System;
using System.IO;
using System.Collections.Generic;

#if WINDOWS_STOREAPP
using System.Threading.Tasks;
using Windows.Storage;
#endif

namespace Spine {
	public class SkeletonJson {
		private AttachmentLoader attachmentLoader;
		public float Scale { get; set; }

		public SkeletonJson (params Atlas[] atlasArray)
			: this(new AtlasAttachmentLoader(atlasArray)) {
		}

		public SkeletonJson (AttachmentLoader attachmentLoader) {
			if (attachmentLoader == null) throw new ArgumentNullException("attachmentLoader cannot be null.");
			this.attachmentLoader = attachmentLoader;
			Scale = 1;
		}

#if WINDOWS_STOREAPP
		private async Task<SkeletonData> ReadFile(string path) {
			var folder = Windows.ApplicationModel.Package.Current.InstalledLocation;
			var file = await folder.GetFileAsync(path).AsTask().ConfigureAwait(false);
			using (var reader = new StreamReader(await file.OpenStreamForReadAsync().ConfigureAwait(false))) {
				SkeletonData skeletonData = ReadSkeletonData(reader);
				skeletonData.Name = Path.GetFileNameWithoutExtension(path);
				return skeletonData;
			}
		}

		public SkeletonData ReadSkeletonData (String path) {
			return this.ReadFile(path).Result;
		}
#else
		public SkeletonData ReadSkeletonData (String path) {
#if WINDOWS_PHONE
			Stream stream = Microsoft.Xna.Framework.TitleContainer.OpenStream(path);
			using (StreamReader reader = new StreamReader(stream)) {
#else
			using (StreamReader reader = new StreamReader(path)) {
#endif
				SkeletonData skeletonData = ReadSkeletonData(reader);
				skeletonData.name = Path.GetFileNameWithoutExtension(path);
				return skeletonData;
			}
		}
#endif

		public SkeletonData ReadSkeletonData (TextReader reader) {
			if (reader ==


for network slice from time  19 to 20
## Calculating layout for network slice from time  20 to 21
## Calculating layout for network slice from time  21 to 22
## Calculating layout for network slice from time  22 to 23
## Calculating layout for network slice from time  23 to 24
## Calculating layout for network slice from time  24 to 25
## Calculating layout for network slice from time  25 to 26
## caching 10 properties for slice 0
## caching 10 properties for slice 1
## caching 10 properties for slice 2
## caching 10 properties for slice 3
## caching 10 properties for slice 4
## caching 10 properties for slice 5
## caching 10 properties for slice 6
## caching 10 properties for slice 7
## caching 10 properties for slice 8
## caching 10 properties for slice 9
## caching 10 properties for slice 10
## caching 10 properties for slice 11
## caching 10 properties for slice 12
## caching 10 properties for slice 13
## caching 10 properties for slice 14
## caching 10 properties for slice 15
## caching 10 properties for slice 16
## caching 10 properties for slice 17
## caching 10 properties for slice 18
## caching 10 properties for slice 19
## caching 10 properties for slice 20
## caching 10 properties for slice 21
## caching 10 properties for slice 22
## caching 10 properties for slice 23
## caching 10 properties for slice 24
## caching 10 properties for slice 25

## Warning in is.na(vertex.col): is.na() applied to non-(list or vector) of
## type 'NULL'

## loading ndtv-d3 animation widget...


        }
    }

    /**
     * @internal Writes the deletion update to XML.
     * ICustomUpdateSerializer.WriteDeleteUpdateToXml
     *
     * @param   {EwsServiceXmlWriter}   writer      The writer.
     * @param   {ServiceObject}         ewsObject   The ews object.
     * @return  {boolean}               True if property generated serialization.
     */
    WriteDeleteUpdateToXml(writer: EwsServiceXmlWriter, ewsObject: ServiceObject): boolean {
        // Use the default XML serializer.
        return false;
    }
}import * as input from './input'

function readPaths() {
  const paths = input.readFile(3).split('\n')
  return [readPath(paths[0]), readPath(paths[1])]
}

type Point = undefined | number
type Points = {
  [key: number]: Point
}

type Path = {
  data: Points[]
}

const size = 20000
const originX = size / 2
const originY = originX

function readPath(path: string): Path {
  const data: Points[] = new Array(size).fill(0).map((_, i) => ({}))
  const instructions = path.split(',')
  let x = originX, y = originY
  let travel = 0

  const write = () => {
    if (data[y][x] === undefined) {
      data[y][x] = travel
    }
    travel++
  }

  for (const instruction of instructions) {
    const command = instruction[0]
    const distance = parseInt(instruction.slice(1))
    const ensure = (target: number) => {
      if (target < 0 || target > size) { throw new TypeError('target is out of range: ' + target + JSON.stringify({command, distance, x, y})) }
    }

    switch (command) {
      case 'R': {
        const target = x + distance
        ensure(target)
        while (x < target) {
          write()
          x++
        }
        break
      }

      case 'U': {
        const target = y + distance
        ensure(target)
        while (y < target) {
          write()
          y++
        }
        break
      }

      case 'L': {
        const target = x - distance
        ensure(target)
        while (x > target) {
          write()
          x--
        }
        break
      }

      case 'D': {
        const target = y - distance
        ensure(target)
        while (y > target) {
          write()
          y--
        }
        break
      }

      default: throw new TypeError
    }
  }
  return {data}
}

type Intersection = {x: number, y: number, travel: number}
function findIntersections({data: one}: Path, {data: two}: Path) {
  const intersections: Intersection[] = []
  for (let y = 0; y < size; y++) {
    for (let x = 0; x < size; x++) {
      if (one[y][x] !== undefined && two[y][x] !== undefined && (x !== originX || y !== originY)) {
        intersections.push({x, y, travel: one[y][x]! + two[y][x]!})
      }
    }
  }
  return intersections
}

function manhattanDistanceOfIntersection(intersection: Intersection) {
  return Math.abs(intersection.x - originX) + Math.abs(intersection.y - originY)
}

function partOne() {
  const [one, two] = readPaths()
  const intersections = findIntersections(one, two)
  return Math.min(...intersections.map(manhattanDistanceOfIntersection))
}

function partTwo() {
  const [one, two] = readPaths()
  const intersections = findIntersections(one, two)
  return Math.min(...intersections.map(i => i.travel))
}

export default partTwo//*


q->qh.altnext_qtd) == 0)) {
    q->qtdaddr = q->qh.altnext_qtd;
    BX_EHCI_THIS set_state(q->async, EST_FETCHQTD);

  /*
   *  next qTD is valid
   */
  } else if (NLPTR_TBIT(q->qh.next_qtd) == 0) {
    q->qtdaddr = q->qh.next_qtd;
    BX_EHCI_THIS set_state(q->async, EST_FETCHQTD);

  /*
   *  no valid qTD, try next QH
   */
  } else {
    BX_EHCI_THIS set_state(q->async, EST_HORIZONTALQH);
  }

  return 1;
}

int bx_usb_ehci_c::state_fetchqtd(EHCIQueue *q)
{
  EHCIqtd qtd;
  EHCIPacket *p;
  int again = 0;

  get_dwords(NLPTR_GET(q->qtdaddr), (Bit32u*) &qtd, sizeof(EHCIqtd) >> 2);

  p = QTAILQ_FIRST(&q->packets);
  if (p != NULL) {
    if (p->qtdaddr != q->qtdaddr ||
        (!NLPTR_TBIT(p->qtd.next) && (p->qtd.next != qtd.next)) ||
        (!NLPTR_TBIT(p->qtd.altnext) && (p->qtd.altnext != qtd.altnext)) ||
        p->qtd.bufptr[0] != qtd.bufptr[0]) {
      BX_EHCI_THIS cancel_queue(q);
      BX_ERROR(("guest updated active QH or qTD"));
      p = NULL;
    } else {
      p->qtd = qtd;
      BX_EHCI_THIS qh_do_overlay(q);
    }
  }

  if (!(qtd.token & QTD_TOKEN_ACTIVE)) {
    if (p != NULL) {
      /* transfer canceled by guest (clear active) */
      BX_EHCI_THIS cancel_queue(q);
      p = NULL;
    }
    BX_EHCI_THIS set_state(q->async, EST_HORIZONTALQH);
    again = 1;
  } else if (p != NULL) {
    switch (p->async) {
      case EHCI_ASYNC_NONE:
        /* Should never happen packet should at least be initialized */
        BX_PANIC(("Should never happen"));
        break;
      case EHCI_ASYNC_INITIALIZED:
        /* Previously nacked packet (likely interrupt ep) */
        BX_EHCI_THIS set_state(q->async, EST_EXECUTE);
        break;
      case EHCI_ASYNC_INFLIGHT:
        /* Unfinished async handled packet, go horizontal */
        BX_EHCI_THIS set_state(q->async, EST_HORIZONTALQH);
        break;
      case EHCI_ASYNC_FINISHED:
        /*
         * We get here when advqueue moves to a packet which is already
         * finished, which can happen with packets queued up by fill_queue
         */
        BX_EHCI_THIS set_state(q->async, EST_EXECUTING);
        break;
    }
    again = 1;
  } else {
    p = BX_EHCI_THIS alloc_packet(q);
    p->qtdaddr = q->qtdaddr;
    p->qtd = qtd;
    BX_EHCI_THIS set_state(q->async, EST_EXECUTE);
    again = 1;
  }

  return again;
}

int bx_usb_ehci_c:


A-Z_\\-!.?+*=<>&'",n="[#]?["+t+"]["+t+"0-9/;:$#]*",a="def defonce defprotocol defstruct defmulti defmethod defn- defn defmacro deftype defrecord",r={$pattern:n,built_in:a+" cond apply if-not if-let if not not= =|0 <|0 >|0 <=|0 >=|0 ==|0 +|0 /|0 *|0 -|0 rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy first rest cons cast coll last butlast sigs reify second ffirst fnext nfirst nnext meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},s={begin:n,relevance:0},o={scope:"number",relevance:0,variants:[{match:/[-+]?0[xX][0-9a-fA-F]+N?/},{match:/[-+]?0[0-7]+N?/},{match:/[-+]?[1-9][0-9]?[rR][0-9a-zA-Z]+N?/},{match:/[-+]?[0-9]+\/[0-9]+N?/},{match:/[-+]?[0-9]+((\.[0-9]*([eE][+-]?[0


9978  83 C1 00 10 */	lwz r30, 0x10(r1)
/* 802BCA3C 002B997C  7C 08 03 A6 */	mtlr r0
/* 802BCA40 002B9980  38 21 00 20 */	addi r1, r1, 0x20
/* 802BCA44 002B9984  4E 80 00 20 */	blr
.endfn earthquakeCallBack__Q34Game8Imomushi3ObjFPQ24Game8Creaturef

.fn dropCallBack__Q34Game8Imomushi3ObjFPQ24Game8Creature, global
/* 802BCA48 002B9988  94 21 FF F0 */	stwu r1, -0x10(r1)
/* 802BCA4C 002B998C  7C 08 02 A6 */	mflr r0
/* 802BCA50 002B9990  90 01 00 14 */	stw r0, 0x14(r1)
/* 802BCA54 002B9994  93 E1 00 0C */	stw r31, 0xc(r1)
/* 802BCA58 002B9998  7C 7F 1B 78 */	mr r31, r3
/* 802BCA5C 002B999C  80 03 00 F4 */	lwz r0, 0xf4(r3)
/* 802BCA60 002B99A0  28 00 00 00 */	cmplwi r0, 0
/* 802BCA64 002B99A4  41 82 00 4C */	beq .L_802BCAB0
/* 802BCA68 002B99A8  80 1F 01 E0 */	lwz r0, 0x1e0(r31)
/* 802BCA6C 002B99AC  54 00 05 AD */	rlwinm. r0, r0, 0, 0x16, 0x16
/* 802BCA70 002B99B0  40 82 00 40 */	bne .L_802BCAB0
/* 802BCA74 002B99B4  4B E4 A9 81 */	bl getStateID__Q24Game9EnemyBaseFv
/* 802BCA78 002B99B8  2C 03 00 01 */	cmpwi r3, 1
/* 802BCA7C 002B99BC  41 82 00 0C */	beq .L_802BCA88
/* 802BCA80 002B99C0  2C 03 00 09 */	cmpwi r3, 9
/* 802BCA84 002B99C4  40 82 00 2C */	bne .L_802BCAB0
.L_802BCA88:
/* 802BCA88 002B99C8  80 7F 02 BC */	lwz r3, 0x2bc(r31)
/* 802BCA8C 002B99CC  7F E4 FB 78 */	mr r4, r31
/* 802BCA90 002B99D0  38 A0 00 02 */	li r5, 2
/* 802BCA94 002B99D4  38 C0 00 00 */	li r6, 0
/* 802BCA98 002B99D8  81 83 00 00 */	lwz r12, 0(r3)
/* 802BCA9C 002B99DC  81 8C 00 14 */	lwz r12, 0x14(r12)
/* 802BCAA0 002B99E0  7D 89 03 A6 */	mtctr r12
/* 802BCAA4 002B99E4  4E 80 04 21 */	bctrl
/* 802BCAA8 002B99E8  38 60 00 01 */	li r3, 1
/* 802BCAAC 002B99EC  48 00 00 08 */	b .L_802BCAB4
.L_802BCAB0:
/* 802BCAB0 002B99F0  38 60 00 00 */	li r3, 0
.L_802BCAB4:
/* 802BCAB4 002B99F4  80 01 00 14 */	lwz r0, 0x14(r1)
/* 802BCAB8 002B99F


острого сыра",
[193965] = "Круг даларанского сыра",
[193966] = "Свежий даларанский хлеб",
[193967] = "Дар Алекстразы",
[193968] = "Бутылка даларанского красного",
[193969] = "Бутылка даларанского белого",
[193970] = "Бутылка старого даларанского красного",
[193971] = "Бочонок даларанского белого",
[193972] = "Почтовый ящик",
[193973] = "Бочонок даларанского красного",
[193975] = "Бочонок старого даларанского красного",
[193980] = "Окровавленный камень",
[193981] = "Словарь Силы",
[193982] = "Cloak Dome (Aura Generator 2)",
[193983] = "Знамя Орды",
[193984] = "Знамя Альянса",
[193985] = "Молот",
[193986] = "Могильный камень",
[193987] = "Неопознанные останки",
[193988] = "Сумеречный портал",
[193989] = "Обычный портал",
[193990] = "Внутривенное лечебное зелье",
[193991] = "Алтарь черных глубин",
[193993] = "Труп павшего ворга - фокус заклинания",
[193995] = "Дверь драконьей клетки",
[193996] = "Сундук Трибунала",
[193997] = "Частичка Вечного льда",
[194002] = "Знамя Орды",
[194004] = "Знамя Орды",
[194005] = "Факел Совета Теней",
[194006] = "Капкан на медведя",
[194008] = "Знамя Волдруна",
[194009] = "Большой костер",
[194010] = "Пламень",
[194011] = "Портал в Лиловую гостиную",
[194012] = "Портал в Аметистовую цитадель",
[194013] = "Пламень",
[194016] = "Почтовый ящик",
[194017] = "Костер",
[194018] = "Стул",
[194019] = "Стул",
[194020] = "Стул",
[194021] = "Стул",
[194022] = "Дверь",
[194023] = "Окровавленный камень",
[194024] = "Окровавленный камень",
[194025] = "Лиловый телепорт",
[194026] = "Желтый телепорт",
[194027] = "Почтовый ящик",
[194029] = "Даларанский колодец",
[194032] = "Большой костер Альянса",
[194033] = "Большой костер Орды",
[194034] = "Большой костер Орды",
[194035] = "Большой костер Альянса",
[194036] = "Большой костер Альянса",
[194037] = "Большой ко


iscoveryServices, IDomainTrustProvider domainTrustProvider, IDirectory directory, ILocalSam localsam, IObjectSelectionProvider objectSelectionProvider, Func<IModelValidator<SecurityDescriptorTargetViewModel>> validator, ScriptTemplateProvider scriptTemplateProvider, IAmsLicenseManager licenseManager, IShellExecuteProvider shellExecuteProvider)
        {
            this.dialogCoordinator = dialogCoordinator;
            this.appPathProvider = appPathProvider;
            this.channelSelectionViewModelFactory = channelSelectionViewModelFactory;
            this.fileSelectionViewModelFactory = fileSelectionViewModelFactory;
            this.logger = logger;
            this.directory = directory;
            this.discoveryServices = discoveryServices;
            this.domainTrustProvider = domainTrustProvider;
            this.localSam = localsam;
            this.objectSelectionProvider = objectSelectionProvider;
            this.validator = validator;
            this.scriptTemplateProvider = scriptTemplateProvider;
            this.licenseManager = licenseManager;
            this.shellExecuteProvider = shellExecuteProvider;
        }

        public async Task<SecurityDescriptorTargetViewModel> CreateViewModelAsync(SecurityDescriptorTarget model, SecurityDescriptorTargetViewModelDisplaySettings settings)
        {

            var item = new SecurityDescriptorTargetViewModel(model, settings, channelSelectionViewModelFactory, fileSelectionViewModelFactory, appPathProvider, logger, dialogCoordinator, validator.Invoke(), directory, domainTrustProvider, discoveryServices, localSam, objectSelectionProvider, scriptTemplateProvider, licenseManager, shellExecuteProvider);

            await item.Initialization;

            return item;
        }
    }
}


 падеж",
            Acc2 => "второй винительный падеж",
            Loc1 => "первый предложный падеж",
            Loc2 => "второй предложный (местный) падеж",
        }
    }
}
pub use self::active_peer::ActivePeer;
pub use self::event::Event;
pub use self::overlay_connect::OverlayConnect;

use common::event_loop::{spawn_event_loop, CoreMsg, El};
use common::read_config;
use common::types::PlainTextMsg;
use maidsafe_utilities::serialisation::serialise;
use maidsafe_utilities::thread::{self, Joiner};
use mio::Token;
use p2p::{Config, Handle, RendezvousInfo};
use std::io;
use std::net::SocketAddr;
use std::sync::{mpsc, Arc, Mutex};
use std::time::Duration;
use std::time::Instant;

mod active_peer;
mod event;
mod overlay_connect;

#[derive(Serialize, Deserialize)]
pub struct FullConfig {
    pub peer_cfg: PeerConfig,
    pub p2p_cfg: Config,
}

#[derive(Serialize, Deserialize)]
pub struct PeerConfig {
    overlay_addr: SocketAddr,
}

#[derive(Debug)]
pub enum PeerState {
    Discovered,
    CreatingRendezvousInfo {
        mediator_token: Token,
        peer_info: Option<RendezvousInfo>,
    },
    AwaitingPeerRendezvous {
        since: Instant,
        p2p_handle: Handle,
    },
    AwaitingHolePunchResult,
    Connected(Token),
}

impl Default for PeerState {
    fn default() -> Self {
        PeerState::Discovered
    }
}

const MENU: &str = "
 -------------------------------------------
|  ======
| | Menu |
|  ======
| 1) Show Online & Connected (*) Peers
| 2) Refresh Online Peers List
| 3) Connect to
| 4) Chat with
| 5) Information about inputs to (2) and (3)
| 0) Quit/Exit
 -------------------------------------------
";

pub fn entry_point() {
    let cfg: FullConfig = read_config("./peer-config");

    let el = spawn_event_loop(cfg.p2p_cfg);
    let peer_cfg = cfg.peer_cfg;

    println!("Enter Name [Name must be unique (preferably) and cannot contain spaces]:");

    let mut name = String::new();
    loop {
        unwrap!(io::stdin().read_line(&mut name));
        name = name.trim().to_string();
        if name.is_empty() || name.contains(" ") {
            println!("Invalid Name. Choose a valid Name:");
            name.clear();
        } else {
            break;
        }
    }

    let (event_tx, event_rx) = mpsc::channel();
    let peers = Arc::new(Mutex::new(Default::default()));

    {
        let tx = event_tx.clone();
        let name = name.clone();
        let peers = peers.clone();
        let overlay = peer_cfg.overlay_addr;
        unwrap!(el.core_tx.send(CoreMsg::new(move |core, poll| {
            OverlayConnect::start(core, poll, &overlay, name, peers, tx);
        })));
    }

    let event = unwrap!(event_rx.recv_timeout(Duration::from_secs(5)));
    println!("{}", event);
    let overlay_token = match event {
        Event::OverlayConnected(t) => t,
        x => panic!("Unexpected event: {:?}", x),
    };

    let _j = print_events(event


/* This file was generated by upb_generator from the input file:
 *
 *     envoy/extensions/load_balancing_policies/common/v3/common.proto
 *
 * Do not edit -- your changes will be discarded when the file is
 * regenerated.
 * NO CHECKED-IN PROTOBUF GENCODE */

#ifndef ENVOY_EXTENSIONS_LOAD_BALANCING_POLICIES_COMMON_V3_COMMON_PROTO_UPB_MINITABLE_H_
#define ENVOY_EXTENSIONS_LOAD_BALANCING_POLICIES_COMMON_V3_COMMON_PROTO_UPB_MINITABLE_H_

#include "upb/generated_code_support.h"

// Must be last.
#include "upb/port/def.inc"

#ifdef __cplusplus
extern "C" {
#endif

extern const upb_MiniTable envoy__extensions__load_0balancing_0policies__common__v3__LocalityLbConfig_msg_init;
extern const upb_MiniTable* envoy__extensions__load_0balancing_0policies__common__v3__LocalityLbConfig_msg_init_ptr;
extern const upb_MiniTable envoy__extensions__load_0balancing_0policies__common__v3__LocalityLbConfig__ZoneAwareLbConfig_msg_init;
extern const upb_MiniTable* envoy__extensions__load_0balancing_0policies__common__v3__LocalityLbConfig__ZoneAwareLbConfig_msg_init_ptr;
extern const upb_MiniTable envoy__extensions__load_0balancing_0policies__common__v3__LocalityLbConfig__LocalityWeightedLbConfig_msg_init;
extern const upb_MiniTable* envoy__extensions__load_0balancing_0policies__common__v3__LocalityLbConfig__LocalityWeightedLbConfig_msg_init_ptr;
extern const upb_MiniTable envoy__extensions__load_0balancing_0policies__common__v3__SlowStartConfig_msg_init;
extern const upb_MiniTable* envoy__extensions__load_0balancing_0policies__common__v3__SlowStartConfig_msg_init_ptr;
extern const upb_MiniTable envoy__extensions__load_0balancing_0policies__common__v3__ConsistentHashingLbConfig_msg_init;
extern const upb_MiniTable* envoy__extensions__load_0balancing_0policies__common__v3__ConsistentHashingLbConfig_msg_init_ptr;

extern const upb_MiniTableFile envoy_extensions_load_balancing_policies_common_v3_common_proto_upb_file_layout;

#ifdef __cplusplus
}  /* extern "C" */
#endif

#include "upb/port/undef.inc"

#endif  /* ENVOY_EXTENSIONS_LOAD_BALANCING_POLICIES_COMMON_V3_COMMON_PROTO_UPB_MINITABLE_H_ */


 sizeof(read_data));
  ASIO_CHECK(s.check_buffers(sb.data(), sizeof(read_data)));
#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
}

ASIO_TEST_SUITE
(
  "read",
  ASIO_TEST_CASE(test_2_arg_zero_buffers_read)
  ASIO_TEST_CASE(test_2_arg_mutable_buffer_read)
  ASIO_TEST_CASE(test_2_arg_vector_buffers_read)
  ASIO_TEST_CASE(test_2_arg_dynamic_string_read)
  ASIO_TEST_CASE(test_2_arg_streambuf_read)
  ASIO_TEST_CASE(test_3_arg_nothrow_zero_buffers_read)
  ASIO_TEST_CASE(test_3_arg_nothrow_mutable_buffer_read)
  ASIO_TEST_CASE(test_3_arg_nothrow_vector_buffers_read)
  ASIO_TEST_CASE(test_3_arg_nothrow_dynamic_string_read)
  ASIO_TEST_CASE(test_3_arg_nothrow_streambuf_read)
  ASIO_TEST_CASE(test_3_arg_mutable_buffer_read)
  ASIO_TEST_CASE(test_3_arg_vector_buffers_read)
  ASIO_TEST_CASE(test_3_arg_dynamic_string_read)
  ASIO_TEST_CASE(test_3_arg_streambuf_read)
  ASIO_TEST_CASE(test_4_arg_mutable_buffer_read)
  ASIO_TEST_CASE(test_4_arg_vector_buffers_read)
  ASIO_TEST_CASE(test_4_arg_dynamic_string_read)
  ASIO_TEST_CASE(test_4_arg_streambuf_read)
  ASIO_TEST_CASE(test_3_arg_mutable_buffer_async_read)
  ASIO_TEST_CASE(test_3_arg_boost_array_buffers_async_read)
  ASIO_TEST_CASE(test_3_arg_std_array_buffers_async_read)
  ASIO_TEST_CASE(test_3_arg_vector_buffers_async_read)
  ASIO_TEST_CASE(test_3_arg_dynamic_string_async_read)
  ASIO_TEST_CASE(test_3_arg_streambuf_async_read)
  ASIO_TEST_CASE(test_4_arg_mutable_buffer_async_read)
  ASIO_TEST_CASE(test_4_arg_vector_buffers_async_read)
  ASIO_TEST_CASE(test_4_arg_boost_array_buffers_async_read)
  ASIO_TEST_CASE(test_4_arg_std_array_buffers_async_read)
  ASIO_TEST_CASE(test_4_arg_dynamic_string_async_read)
  ASIO_TEST_CASE(test_4_arg_streambuf_async_read)
)
//
// gettable_socket_option.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef ARCHETYPES_GETTABLE_SOCKET_OPTION_HPP
#define ARCHETYPES_GETTABLE_SOCKET_OPTION_HPP

#include <cstddef>

namespace archetypes {

template <typename PointerType>
class gettable_socket_option
{
public:
  template <typename Protocol>
  int level(const Protocol&) const
  {
    return 0;
  }

  template <typename Protocol>
  int name(const Protocol&) const
  {
    return 0;
  }

  template <typename Protocol>
  PointerType* data(const Protocol&)
  {
    return 0;
  }

  template <typename Protocol>
  std::size_t size(const Protocol&) const
  {
    return 0;
  }

  template <typename Protocol>
  void resize(const Protocol&, std::size_t)
  {
  }
};

} // namespace archetypes

#endif // ARCHETYPES_GETTABLE_SOCKET_OPTION_HPP
//
// async_result.


  local extmarks, lines = opts2extmark(self.opts, row, col)

    for i, extmark in ipairs(extmarks) do
        local id = nvim.buf_set_extmark(self.bufnr, ns, extmark.row, extmark.col, extmark.data)
        table.insert(self.extmark_ids, id)
    end
end

function Mark:flush(hidden)
    local visible = not hidden and self.visible
    if visible ~= self.render_visible then
        local ok, err = pcall(self._draw, self, visible)
        if not ok then
            vim.schedule(function()
                self:remove()
                nvim.err_writeln('mdmath: failed to draw mark: ' .. err)
            end)
        end
        self.render_visible = visible
        return true
    end
    return false
end

local M = {}

function M.show(bufnr, show)
    show = show == nil and true or show
    buffers[bufnr]:show(show)
end

function M.add(bufnr, row, col, opts)
    bufnr = bufnr == 0 and nvim.get_current_buf() or bufnr

    if type(opts.color) == 'number' then
        opts.color = hl[opts.color]
    end
    opts.text_pos = opts.text_pos or 'overlay'

    local mark = Mark.new(bufnr, row, col, opts)
    return buffers[bufnr]:add(mark)
end

function M.remove(bufnr, id)
    buffers[bufnr]:remove(id)
end

function M.clear(bufnr)
    bufnr = bufnr or nvim.get_current_buf()
    buffers[bufnr]:clear()
end

do
    nvim.set_decoration_provider(ns, {
        on_start = function()
            if num_buffers == 0 then
                return false
            end
        end,
        on_win = function(_, _, bufnr, top, bot)
            buffer = rawget(buffers, bufnr)
            if not buffer then
                return false
            end
            top = top - 1

            for _, self in pairs(buffer.marks) do
                local frow = self.pos[1]
                local lrow = self.pos[1] + self.num_lines - 1

                if top <= lrow and frow <= bot then
                    self:flush(not buffer._show)
                end
            end
            return false
        end,
    })
end

return M


important}.bg-pink.bg-accent-2.bg-glow{-webkit-box-shadow:0 1px 20px 1px rgba(255,64,129,.6);box-shadow:0 1px 20px 1px rgba(255,64,129,.6)}.btn-pink.btn-accent-2:hover{background-color:#AD1457!important}.btn-pink.btn-accent-2:active,.btn-pink.btn-accent-2:focus{border-color:#AD1457!important;background-color:#880E4F!important}.btn-outline-pink.btn-outline-accent-2{border-color:#FF4081!important;color:#FF4081!important}.btn-outline-pink.btn-outline-accent-2:hover{background-color:#FF4081!important}.border-pink.border-accent-2{border:1px solid #FF4081!important}.border-top-pink.border-top-accent-2{border-top:1px solid #FF4081!important}.border-bottom-pink.border-bottom-accent-2{border-bottom:1px solid #FF4081!important}.border-left-pink.border-left-accent-2{border-left:1px solid #FF4081!important}.border-right-pink.border-right-accent-2{border-right:1px solid #FF4081!important}.btn-pink.btn-accent-3,.btn-pink.btn-accent-3:hover{border-color:#C2185B!important}.overlay-pink.overlay-accent-2{background:#FF4081;background:rgba(255,64,129,.8)}.bg-pink.bg-accent-3,.btn-pink.btn-accent-3{background-color:#F50057!important}.pink.accent-3{color:#F50057!important}.bg-pink.bg-accent-3.bg-glow{-webkit-box-shadow:0 1px 20px 1px rgba(245,0,87,.6);box-shadow:0 1px 20px 1px rgba(245,0,87,.6)}.btn-pink.btn-accent-3:hover{background-color:#AD1457!important}.btn-pink.btn-accent-3:active,.btn-pink.btn-accent-3:focus{border-color:#AD1457!important;background-color:#880E4F!important}.btn-outline-pink.btn-outline-accent-3{border-color:#F50057!important;color:#F50057!important}.btn-outline-pink.btn-outline-accent-3:hover{background-color:#F50057!important}.border-pink.border-accent-3{border:1px solid #F50057!important}.border-top-pink.border-top-accent-3{border-top:1px solid #F50057!important}.border-bottom-pink.border-bottom-accent-3{border-bottom:1px solid #F50057!important}.border-left-pink.border-left-accent-3{border-left:1px solid #F50057!important}.border-right-pink.border-right-accent-3{border-right:1px solid #F50057!important}.btn-pink.btn-accent-4,.btn-pink.btn-accent-4:hover{border-color:#C2185B!important}.overlay-pink.overlay-accent-3{background:#F50057;background:rgba(245,0,87,.8)}.bg-pink.bg-accent-4,.btn-pink.btn-accent-4{background-color:#C51162!important}.pink.accent-4{color:#C51162!important}.bg-pink.bg-accent-4.bg-glow{-webkit-box-shadow:0 1px 20px 1px rgba(197,17,98,.6);box-shadow:0 1px 20px 1px rgba(197,17,98,.6)}.btn-pink.btn-accent-4:hover{background-color:#AD1457!important}.btn-pink


                      requestCallBack: exportLogToFile(context),
                    );
                  });
              setState(() {});
            },
          ),
        ],
      );

  @override
  String get emptyText => '暂无日志';

  @override
  void onErrorRetry() {
    setState(() {
      state = loading_state.LoadState.loading;
    });
    getAlllog();
  }

  @override
  Widget buildSuccess() {
    return Column(
      children: [
        Padding(
          padding: const EdgeInsets.all(8.0),
          child: TextField(
            controller: searchController,
            decoration: InputDecoration(
              hintText: '搜索日志...',
              prefixIcon: const Icon(Icons.search),
              border: OutlineInputBorder(
                borderRadius: BorderRadius.circular(12),
                borderSide: const BorderSide(color: Colors.blue),
              ),
              contentPadding: const EdgeInsets.symmetric(vertical: 8),
              suffixIcon: searchQuery.isNotEmpty
                  ? IconButton(
                      icon: const Icon(Icons.clear),
                      onPressed: () {
                        searchController.clear();
                        setState(() {
                          searchQuery = '';
                        });
                      },
                    )
                  : null,
            ),
            onChanged: (value) {
              setState(() {
                searchQuery = value;
              });
            },
          ),
        ),
        Expanded(
          child: showedLogMap.isEmpty ? buildEmpty() : buildLogList(),
        ),
      ],
    );
  }
}
import 'package:flutter/material.dart';

// Theme color definitions
const int lightPrimaryValue = 0xFF4596EB;
const int darkPrimaryValue = 0xFF111213;
const int greenPrimaryValue = 0xFF4CAF50;
const int purplePrimaryValue = 0xFF673AB7;
const int orangePrimaryValue = 0xFFFF9800;
const int pinkPrimaryValue = 0xFFF8BBD0;
const int cyanPrimaryValue = 0xFF00BCD4;
const int goldPrimaryValue = 0xFFFFC107;

// Theme data class to hold theme information
class AppThemeData {
  final String name;
  final int primaryValue;
  final Brightness brightness;

  const AppThemeData({
    required this.name,
    required this.primaryValue,
    this.brightness = Brightness.light,
  });
}

// Available themes
final List<AppThemeData> availableThemes = [
  const AppThemeData(name: 'Light', primaryValue: lightPrimaryValue),
  const AppThemeData(name: 'Dark', primaryValue: darkPrimaryValue, brightness: Brightness.dark),
  const AppThemeData(name: 'Green', primaryValue: greenPrimaryValue),
  const AppThemeData(name: 'Purple', primaryValue: purplePrimaryValue),
  const AppThemeData(name: 'Orange', primaryValue: orangePrimaryValue),
  const AppThemeData(name: 'Pink', primaryValue: pinkPrimaryValue),
  const AppThemeData(name: 'Cyan', primaryValue: cyanPrimaryValue),
  const AppThemeData(name: 'Gold', primaryValue: goldPrimaryValue),
];

// Function to generate theme data
ThemeData generateThemeData(AppThemeData themeData) {
  return ThemeData(
    brightness: themeData.brightness,
    useMaterial3: true,
    colorScheme: ColorScheme.fromSeed(
      seedColor: Color(themeData.primaryValue),
      brightness: themeData.brightness,
    ),
    fontFamily: 'SystemFont',
    appBarTheme: AppBarTheme(
      backgroundColor: Color(themeData.primaryValue),
    ),
  );
}

// Generated theme data instances
final ThemeData lightThemeData = generateThemeData(availableThemes[0]);
final ThemeData darkThemeData = generateThemeData(availableThemes[1]);
final ThemeData greenThemeData = generateThemeData(availableThemes[2]);
final ThemeData purpleThemeData = generateThemeData(availableThemes[3]);
final ThemeData orangeThemeData = generateThemeData(availableThemes[4]);
final ThemeData pinkThemeData = generateThemeData


//  Desc:        Framework For Game Develop with Unity3d
//  Copyright:   Copyright (C) 2017 SnowCold. All rights reserved.
//  WebSite:     https://github.com/SnowCold/Qarth
//  Blog:        http://blog.csdn.net/snowcoldgame
//  Author:      SnowCold
//  E-mail:      snowcold.ouyang@gmail.com
using System;
using UnityEngine;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace Qarth
{
    [TMonoSingletonAttribute("[Tools]/ResMgr")]
    public class ResMgr : TMonoSingleton<ResMgr>, IEnumeratorTaskMgr
    {
        private const string INNER_RES_BUILDTIME = "eirv_1988520905";
        private const string INNER_RES_PACKAGE = "eirp_1988520905";

#region 字段
        private Dictionary<string, IRes>    m_ResDictionary = new Dictionary<string, IRes>();
        private List<IRes>                  m_ResList = new List<IRes>();
        [SerializeField]
        private int                         m_CurrentCoroutineCount = 0;
        private int                         m_MaxCoroutineCount = 8;//最快协成大概在6到8之间
        private TimeDebugger                m_TimeDebugger;
        private LinkedList<IEnumeratorTask> m_IEnumeratorTaskStack = new LinkedList<IEnumeratorTask>();

        private bool                        m_IsWorking = true;
        //Res 在ResMgr中 删除的问题，ResMgr定时收集列表中的Res然后删除
        private bool                        m_IsResMapDirty = false;

        #endregion

        public int totalResCount
        {
            get { return m_ResList.Count; }
        }

        public override void OnSingletonInit()
        {
            //ReloadABTable();
        }

        public void Dump()
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("## BEGIN DUMP ALL AssetBundle State");
            builder.AppendLine("# ActiveCount:" + AssetBundleRes.s_ActiveCount);

            for (int i = 0; i < m_ResList.Count; ++i)
            {
                if (m_ResList[i] is AssetBundleRes)
                {
                    builder.AppendLine("    #ABName:" + m_ResList[i].name);
                }
            }

            builder.AppendLine("## END DUMP ALL AssetBundle State");

            Log.i(builder.ToString());
        }

        public void ReloadABTable()
        {
            AssetDataTable.S.Reset();
            List<string> outResult = new List<string>();

            //首先加载Inner的Config
            FileMgr.S.GetFileInInner(ProjectPathConfig.abConfigfileName, outResult);
            for (int i = 0; i < outResult.Count; ++i)
            {
                AssetDataTable.S.LoadPackageFromFile(outResult[i]);
            }

            ProcessNewInstall();

            //然后加载外存中的，如果存在同名Package则直接替换
            outResult.Clear();

            FilePath.GetFileInFolder(FilePath.persistentDataPath4Res, ProjectPathConfig.abConfigfileName, outResult);
            for (int i = 0; i < outResult.Count; ++i)
            {
                AssetDataTable.S.LoadPackageFromFile(outResult[i]);
            }

            AssetDataTable.S.SwitchLanguage("cn");
        }

        private void ProcessNewInstall()
        {
            bool isNewInstall = CheckIsNewInstall();
            Log.i("Check Is New Install:" + isNewInstall);

            if (isNewInstall)
            {
                //对比外部文件
                List<string> outResult = new List<string>();
                FilePath.GetFileInFolder(FilePath.persistentDataPath4Res, ProjectPathConfig.abConfigfileName, outResult);

                AssetDataTable exterTable = new AssetDataTable();
                for (int i = 0; i < outResult.Count; ++


/v1/breach-intel/check-credential
Content-Type: application/json

{
    "credential": "user@example.com",
    "type": "email"
}
```

**Response:**

```json
{
    "success": true,
    "data": {
        "credential_hash_prefix": "a665a4",
        "breach_found": false,
        "k_anonymity_set_size": 1247,
        "privacy_compliant": true,
        "last_checked": "2024-12-19T10:30:00Z"
    },
    "message": "Credential breach check completed (privacy-compliant)"
}
```

#### 📡 Add Monitoring Target

```http
POST /api/v1/breach-intel/add-monitoring
Content-Type: application/json

{
    "credential": "user@example.com",
    "type": "email",
    "alert_email": "alerts@company.com"
}
```

#### 📰 Start Paste Site Monitoring

```http
POST /api/v1/breach-intel/monitor-paste-sites
```

Monitors:

- Pastebin (respects robots.txt)
- GitHub Gists
- Slexy
- Justpaste.it
- Dpaste

#### 🕸 Start Dark Web Monitoring

```http
POST /api/v1/breach-intel/monitor-darkweb
```

Ethical monitoring of:

- Breach disclosure forums
- Security researcher communities
- Public vulnerability databases
- **Note**: Does NOT monitor illegal marketplaces

#### 📈 Get Statistics

```http
GET /api/v1/breach-intel/statistics
```

**Response:**

```json
{
    "success": true,
    "data": {
        "total_breaches": 1247,
        "monitored_credentials": 523,
        "paste_sites_monitored": 5,
        "darkweb_sources": 12,
        "privacy_compliant": true,
        "last_cleanup": "2024-12-19T06:00:00Z"
    }
}
```

#### 🧹 Privacy Compliance Cleanup

```http
POST /api/v1/breach-intel/cleanup-expired
```

Automatically removes:

- Expired breach data (90-day retention)
- Orphaned hash records
- Temporary monitoring data

## 🔧 Technical Architecture

### Database Schema (Privacy-Compliant)

```sql
-- Breach records with minimal data retention
CREATE TABLE breach_records (
    id UUID PRIMARY KEY,
    breach_hash VARCHAR(64) NOT NULL,  -- SHA-256 of breach identifier
    data_types TEXT[],                 -- Types of data exposed
    breach_date TIMESTAMP,
    severity_score INTEGER,
    source_type VARCHAR(50),
    created_at TIMESTAMP DEFAULT NOW(),
    expires_at TIMESTAMP DEFAULT NOW() + INTERVAL '90 days'
);

-- Monitoring targets (hash-based)
CREATE TABLE monitoring_targets (
    id UUID PRIMARY KEY,
    credential_hash_prefix VARCHAR(10),  -- First 10 chars of hash
    credential_type VARCHAR(20),
    alert_config JSONB,
    created_at TIMESTAMP DEFAULT NOW(),
    last_checked TIMESTAMP
);

-- K-Anonymity sets for privacy protection
CREATE TABLE k_anonymity_sets (
    hash_prefix VARCHAR(10) PRIMARY KEY,
    set_size INTEGER NOT NULL,
    last_updated TIMESTAMP DEFAULT NOW()
);
```

### Privacy Protection Mechanisms

#### K-Anonymity Implementation

```python
async def check_credential_breach(self, credential: str, credential_type: str):
    """Check credential using k-anonymity protection"""

    # 1. Hash the credential
    credential_hash = hashlib.sha256(credential.encode()).hexdigest()
    hash_prefix = credential_hash[:10]  # Use 10-char prefix

    # 2. Ensure k-anonymity set size >= 1000
    anonymity_set = await self.get_k_anonymity_set(hash_prefix)
    if anonymity_set['size'] < 1000:
        return {
            'privacy_compliant': False,
            'message': 'Insufficient anonymity set size'
        }

    # 3


                exportProgress[bookUrl] = 0
                waitExportBooks.remove(bookUrl)
                val book = appDb.bookDao.getBook(bookUrl)
                try {
                    book ?: throw NoStackTraceException("获取${bookUrl}书籍出错")
                    refreshChapterList(book)
                    notificationContentText = getString(
                        R.string.export_book_notification_content,
                        book.name,
                        waitExportBooks.size
                    )
                    upExportNotification()
                    if (exportConfig.type == "epub") {
                        if (exportConfig.epubScope.isNullOrBlank()) {
                            exportEpub(exportConfig.path, book)
                        } else {
                            CustomExporter(
                                exportConfig.epubScope,
                                exportConfig.epubSize
                            ).export(exportConfig.path, book)
                        }
                    } else {
                        exportTxt(exportConfig.path, book)
                    }
                    exportMsg[book.bookUrl] = getString(R.string.export_success)
                } catch (e: Throwable) {
                    ensureActive()
                    exportMsg[bookUrl] = e.localizedMessage ?: "ERROR"
                    AppLog.put("导出书籍<${book?.name ?: bookUrl}>出错", e)
                } finally {
                    exportProgress.remove(bookUrl)
                    postEvent(EventBus.EXPORT_BOOK, bookUrl)
                }
            }
        }
    }

    private fun refreshChapterList(book: Book) {
        if (!book.isLocalModified()) {
            return
        }
        kotlin.runCatching {
            LocalBook.getChapterList(book)
        }.onSuccess {
            appDb.bookChapterDao.delByBook(book.bookUrl)
            appDb.bookChapterDao.insert(*it.toTypedArray())
            appDb.bookDao.update(book)
            ReadBook.onChapterListUpdated(book)
        }
    }

    private data class SrcData(
        val chapterTitle: String,
        val index: Int,
        val src: String
    )

    private suspend fun exportTxt(path: String, book: Book) {
        exportMsg.remove(book.bookUrl)
        postEvent(EventBus.EXPORT_BOOK, book.bookUrl)
        val fileDoc = FileDoc.fromDir(path)
        exportTxt(fileDoc, book)
    }

    private suspend fun exportTxt(fileDoc: FileDoc, book: Book) {
        val filename = book.getExportFileName("txt")
        fileDoc.find(filename)?.delete()

        val bookDoc = fileDoc.createFileIfNotExist(filename)
        val charset = Charset.forName(AppConfig.exportCharset)
        bookDoc.openOutputStream().getOrThrow().bufferedWriter(charset).use { bw ->
            getAllContents(book) { text, srcList ->
                bw.write(text)
                srcList?.forEach {
                    val vFile = BookHelp.getImage(book, it.src)
                    if (vFile.exists()) {
                        fileDoc.createFileIfNotExist(
                            "${it.index}-${MD5Utils.md5Encode16(it.src)}.jpg",
                            subDirs = arrayOf(
                                "${book.name}_${book.author}",
                                "images",
                                it.chapterTitle
                            )
                        ).writeFile(vFile)
                    }
                }
            }
        }
        if (AppConfig.exportToWebDav) {
            // 导出到webdav
            AppWebDav.exportWebDav(bookDoc.uri, filename)
        }
    }

    private suspend fun getAllContents(
        book: Book,
        append: (text: String, srcList: ArrayList<SrcData>?) -> Unit
    ) = coroutineSc


#include <arm_sve.h>

#pragma GCC target "+sve2+sme2+fp8"

void
test (svmfloat8_t f8, svfloat32x2_t f32x2, fpm_t fpm0,
      svfloat16x2_t f16x2, svfloat16x4_t f16x4,
      svfloat32x3_t f32x3, svfloat32x4_t f32x4,
      svbool_t pg, float f, svint8_t s8, svint32x2_t s32x2)
  __arm_streaming
{
  svcvtnt_mf8_fpm (f8, f32x2, fpm0);

  svcvtnt_mf8_fpm (); /* { dg-error {too few arguments to function 'svcvtnt_mf8_fpm'} } */

  svcvtnt_mf8_fpm (f8); /* { dg-error {too few arguments to function 'svcvtnt_mf8_fpm'} } */
  svcvtnt_mf8_fpm (f32x2); /* { dg-error {too few arguments to function 'svcvtnt_mf8_fpm'} } */
  svcvtnt_mf8_fpm (fpm0); /* { dg-error {too few arguments to function 'svcvtnt_mf8_fpm'} } */
  svcvtnt_mf8_fpm (f); /* { dg-error {too few arguments to function 'svcvtnt_mf8_fpm'} } */
  svcvtnt_mf8_fpm (f8, f32x2); /* { dg-error {too few arguments to function 'svcvtnt_mf8_fpm'} } */
  svcvtnt_mf8_fpm (f32x2, fpm0); /* { dg-error {too few arguments to function 'svcvtnt_mf8_fpm'} } */
  svcvtnt_mf8_fpm (f8, fpm0); /* { dg-error {too few arguments to function 'svcvtnt_mf8_fpm'} } */
  svcvtnt_mf8_fpm (pg); /* { dg-error {too few arguments to function 'svcvtnt_mf8_fpm'} } */
  svcvtnt_mf8_fpm (s8); /* { dg-error {too few arguments to function 'svcvtnt_mf8_fpm'} } */

  svcvtnt_mf8_fpm (f8, f16x2, fpm0); /* { dg-error {'svcvtnt_mf8_fpm' has no form that takes 'svfloat16x2_t' arguments} } */
  svcvtnt_mf8_fpm (f8, f16x4, fpm0); /* { dg-error {'svcvtnt_mf8_fpm' has no form that takes 'svfloat16x4_t' arguments} } */
  svcvtnt_mf8_fpm (f8, f32x3, fpm0); /* { dg-error {'svcvtnt_mf8_fpm' has no form that takes 'svfloat32x3_t' arguments} } */
  svcvtnt_mf8_fpm (f8, f32x4, fpm0); /* { dg-error {'svcvtnt_mf8_fpm' has no form that takes 'svfloat32x4_t' arguments} } */

  svcvtnt_mf8_fpm (f8, 0, fpm0); /* { dg-error {passing 'int' to argument 2 of 'svcvtnt_mf8_fpm', which expects an SVE type rather than a scalar type} } */
  svcvtnt_mf8_fpm (f8, f, fpm0); /* { dg-error {passing 'float' to argument 2 of 'svcvtnt_mf8_fpm', which expects an SVE type rather than a scalar type} } */
  svcvtnt_mf8_fpm (f8, pg, fpm0); /* { dg-error {'svcvtnt_mf8_fpm' has no form that takes 'svbool_t' arguments} } */
  svcvtnt_mf8_fpm (f8, s8, fpm0); /* { dg-error {'svcvtnt_mf8_fpm' has no form that takes 'svint8_t' arguments} } */
  svcvtnt_mf8_fpm (f8, s32x2, fpm0); /* { dg-error {'svcvtnt_mf8_fpm' has no form that takes 'svint32x2_t' arguments} } */

  svcvtnt_mf8_fpm (f8, f32x2, f32x2); /* { dg-error {passing 'svfloat32x2_t' to argument 3 of 'svcvtnt_mf8_fpm', which expects 'uint64_t'} } */
}


rn shell;
}

const u16 cam_correction_steps_num = 10;

void update_current_entity_camera_collision(CPhysicsShellHolder* l_actor)
{
    if (actor_camera_shell && actor_camera_shell->get_ElementByStoreOrder(0)->PhysicsRefObject() != l_actor)
        destroy_physics_shell(actor_camera_shell);

    if (!actor_camera_shell)
        actor_camera_shell = create_camera_shell(l_actor);
}

void get_camera_box(Fvector& box_size, Fmatrix& xform, const CCameraBase& camera, float _viewport_near)
{
    get_viewport_geom(box_size, xform, camera, _viewport_near);
    box_size.add(Fvector().set(camera_collision_sckin_depth, camera_collision_sckin_depth, camera_collision_sckin_depth));
}

void get_old_camera_box(Fvector& old_box_size, Fmatrix& old_form, CPhysicsElement* roote, CBoxGeom* box)
{
    roote->GetGlobalTransformDynamic(&old_form);
    box->get_size(old_box_size);
}

void set_camera_collision(const Fvector& box_size, const Fmatrix& xform, CPhysicsElement* roote, CBoxGeom* box)
{
    ZoneScoped;

    Fvector bs = box_size;
    bs.z = box_size.z * 2.f;
    bs.y = box_size.y * 1.5f;

    box->set_size(bs);
    Fmatrix m = Fidentity;
    m.c.z -= box_size.z;
    m.c.y -= box_size.y * 0.5f;
    box->set_local_form_bt(m);
    // CBoxGeom* character_collision_geom = smart_cast<CBoxGeom*>( roote->geometry( 1 ) );
    CCylinderGeom* character_collision_geom = smart_cast<CCylinderGeom*>(roote->geometry(1));
    VERIFY(character_collision_geom);
    const Fvector character_collision_box_size =
        Fvector().add(box_size, Fvector().set(camera_collision_character_skin_depth, camera_collision_character_skin_depth, camera_collision_character_skin_depth));
    // character_collision_geom->set_size( character_collision_box_size );
    character_collision_geom->set_radius(character_collision_box_size.x);
    VERIFY(_valid(xform));
    Fmatrix character_collision_geom_local_xform(Fmatrix().invert(xform));
    Fvector shift_fv = Fvector().mul(xform.k, camera_collision_character_shift_z);
    shift_fv.y = 0;
    character_collision_geom_local_xform.transform_dir(shift_fv);

    // character_collision_geom_local_xform.c.set( 0, -0.8f, 0 );
    character_collision_geom_local_xform.c.set(Fvector().mul(character_collision_geom_local_xform.j, -camera_collision_character_gl_shift_y).add(Fvector().set(shift_fv)));
    // character_collision_geom_local_xform.c.y =-0.8f;
    character_collision_geom->set_local_form_bt(character_collision_geom_local_xform);
    roote->SetTransform(xform /*, mh_clear*/);
}

bool do_collide_and_move(const Fmatrix& xform, CPhysicsShellHolder* l_actor, CPhysicsShell* shell, CPhysicsElement* roote)
{
    ZoneScoped;

    ///////////////////////////////////////////////////////////////////
    VERIFY(ph_world);
    VERIFY(!ph_world->