 Object.entries(canvas.selected_nodes)) {
        switch (direction) {
          case "right":
            node22.pos[0] = boundaryNodes["right"].pos[0] + boundaryNodes["right"].size[0] - node22.size[0];
            break;
          case "left":
            node22.pos[0] = boundaryNodes["left"].pos[0];
            break;
          case "top":
            node22.pos[1] = boundaryNodes["top"].pos[1];
            break;
          case "bottom":
            node22.pos[1] = boundaryNodes["bottom"].pos[1] + boundaryNodes["bottom"].size[1] - node22.size[1];
            break;
        }
      }
      canvas.dirty_canvas = true;
      canvas.dirty_bgcanvas = true;
    }
    static onNodeAlign(value3, options3, event2, prev_menu, node22) {
      new LiteGraph.ContextMenu(["Top", "Bottom", "Left", "Right"], {
        event: event2,
        callback: inner_clicked,
        parentMenu: prev_menu
      });
      function inner_clicked(value22) {
        __LGraphCanvas.alignNodes(__LGraphCanvas.active_canvas.selected_nodes, value22.toLowerCase(), node22);
      }
      __name(inner_clicked, "inner_clicked");
    }
    static onGroupAlign(value3, options3, event2, prev_menu) {
      new LiteGraph.ContextMenu(["Top", "Bottom", "Left", "Right"], {
        event: event2,
        callback: inner_clicked,
        parentMenu: prev_menu
      });
      function inner_clicked(value22) {
        __LGraphCanvas.alignNodes(__LGraphCanvas.active_canvas.selected_nodes, value22.toLowerCase());
      }
      __name(inner_clicked, "inner_clicked");
    }
    static onMenuAdd(node22, options3, e, prev_menu, callback) {
      var canvas = __LGraphCanvas.active_canvas;
      var ref_window2 = canvas.getCanvasWindow();
      var graph = canvas.graph;
      if (!graph)
        return;
      function inner_onMenuAdded(base_category, prev_menu2) {
        var categories = LiteGraph.getNodeTypesCategories(canvas.filter || graph.filter).filter(function(category) {
          return category.startsWith(base_category);
        });
        var entries = [];
        categories.map(function(category) {
          if (!category)
            return;
          var base_category_regex = new RegExp("^(" + base_category + ")");
          var category_name = category.replace(base_category_regex, "").split("/")[0];
          var category_path = base_category === "" ? category_name + "/" : base_category + category_name + "/";
          var name = category_name;
          if (name.indexOf("::") != -1)
            name = name.split("::")[1];
          var index2 = entries.findIndex(function(entry) {
            return entry.value === category_path;
          });
          if (index2 === -1) {
            entries.push({
              value: category_path,
              content: name,
              has_submenu: true,
              callback: /* @__PURE__ */ __name(function(value3, event2, mouseEvent, contextMenu) {
                inner_onMenuAdded(value3.value, contextMenu);
              }, "callback")
            });
          }
        });
        var nodes = LiteGraph.getNodeTypesInCategory(base_category.slice(0, -1), canvas.filter || graph.filter);
        nodes.map(function(node3) {
          if (node3.skip_list)
            return;
          var entry = {
            value: node3.type,
            content: node3.title,
            has_submenu: false,


Kind::Other => write!(f, "other")?,
            ConnectErrorKind::Aborted => write!(f, "connect aborted")?,
            ConnectErrorKind::Conflict => write!(f, "conflict")?,
            ConnectErrorKind::NakadiError => write!(f, "nakadi error")?,
            ConnectErrorKind::Unavailable => write!(f, "nakadi unavailable")?,
        }
        Ok(())
    }
}

/// Metadata on the currently received batch
#[derive(Debug, Clone)]
pub struct StreamedBatchMeta {
    pub cursor: SubscriptionCursor,
    pub frame_started_at: Instant,
    pub frame_completed_at: Instant,
    pub frame_id: usize,
}

/// Sequence of backoffs after failed connect attempts
const CONNECT_RETRY_BACKOFF_SECS: &[u64] = &[
    0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 10, 10, 10, 10, 10, 20, 20, 20, 20,
    20, 30, 30, 30, 30, 30, 45, 45, 45, 45, 45, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
    60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
    60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 90,
    90, 90, 90, 90, 90, 90, 90, 90, 90, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 180, 180,
    180, 180, 180, 180, 180, 180, 180, 180, 240, 240, 240, 240, 240, 240, 240, 240, 240, 300, 300,
    300, 300, 300, 300, 300, 300, 300, 300, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 960,
    960, 960, 960, 960, 960, 960, 960, 960, 960, 960, 1920, 1920, 1920, 1920, 1920, 1920, 1920,
    1920, 1920, 1920, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 3000, 3000, 3000,
    3000, 3000, 3000, 3000, 3000, 3000, 3000, 3600,
];

struct Backoff {
    max: u64,
    iter: Box<dyn Iterator<Item = u64> + Send + 'static>,
}

impl Backoff {
    pub fn new(max: u64) -> Self {
        let iter = Box::new(CONNECT_RETRY_BACKOFF_SECS.iter().copied());
        Backoff { max, iter }
    }

    pub fn next(&mut self) -> Duration {
        let d = if let Some(next) = self.iter.next() {
            next
        } else {
            self.max
        };

        let d = std::cmp::min(d, self.max);

        Duration::from_secs(d)
    }
}
use crate::{
    io::{self, Read, Seek, SeekFrom},
    BinRead, BinResult, Endian, Error, ReadOptions,
};
use core::any::Any;
use core::convert::TryInto;

#[cfg(not(feature = "std"))]
use alloc::{boxed::Box, vec::Vec};

macro_rules! binread_impl {
    ($($type_name:ty),*$(,)?) => {
        $(
            impl BinRead for $type_name {
                type Args = ();

                fn read_options<R: Read + Seek>(reader: &mut R, options: &ReadOptions, _: Self::Args) -> BinResult<Self> {
                    let mut val = [0; core::mem::size_of::<$type_name>()];
                    let pos = reader.seek(SeekFrom::Current(0))?;

                    reader.read_exact(&mut val).or_else(|e| {
                        reader.seek(SeekFrom::Start(pos))?;
                        Err(e)
                    })?;
                    Ok(match options.endian {
                        Endian::Big => {


 field_list):
    '''获取字段的中文名称'''
    cn_name_dic = {}
    for field_name in field_list:
        obj = getattr(admin_class, field_name)
        if hasattr(obj, "field"):
            name = obj.field.verbose_name
            cn_name_dic[field_name] = name
        else:
            for field_obj in admin_class._meta.fields:
                if hasattr(field_obj, 'verbose_name'):
                    cn_name_dic[field_obj.name] = field_obj.verbose_name
    return cn_name_dic

def disk_chart(request):
    data = {
        "xm_name":[],
        "disk_all":[],
        "disk_use":[]
    }

    # 从这里开始 是 三期平台的 特殊试图
    ajax_data = request.GET.get("data")
    if ajax_data == "sanqi":
        data = {
            "xm_name": [],
            "all": [],
            "use": []
        }
        disk_all = 0
        disk_use = 0
        group_id = models.Group.objects.filter(name="监管平台三期").values("id", "name")
        b1 = models.Group.objects.get(id=group_id[0]['id'])
        disk_list_data = b1.host_set.filter(status=1, type__in=[1, 2]).values("disk_use", "disk_capacity")
        for obj in disk_list_data:
            if obj["disk_capacity"] != None and obj["disk_use"] != None:
                print(obj["disk_use"],obj)
                disk_all += float(obj["disk_capacity"].strip("g"))
                disk_use += float(obj["disk_use"].strip("g"))
        data["all"].append(round(disk_all, 2))
        data["use"].append(round(disk_use, 2))
        return HttpResponse(json.dumps(data))
    # 从这里开始 是 三期平台的 特殊试图    结束！ 如果不需要了 可以删除

    group_id = models.Group.objects.all().values("id","name")
    for id in group_id:
        disk_all = 0
        disk_use = 0
        data["xm_name"].append(id["name"])
        if id['name'] == "监管平台三期":
            continue
        b1 = models.Group.objects.get(id=id['id'])
        disk_list_data = b1.host_set.filter(status=1,type__in=[1,2]).values("disk_use","disk_capacity")
        for obj in disk_list_data:
            if obj["disk_capacity"] != None and obj["disk_use"] != None:
                disk_all += float(obj["disk_capacity"].strip("g"))
                disk_use += float(obj["disk_use"].strip("g"))
        data["disk_all"].append(round(disk_all,2))
        data["disk_use"].append(round(disk_use,2))

    # data = {"list":[1,2,3,4,5,6,7,8]}
    return HttpResponse(json.dumps(data))

def mem_chart(request):
    data = {
        "xm_name" : [],
        "mem_all" : [],
        "mem_use" : []
    }

    # 三期内存使用情况
    ajax_data = request.GET.get("data")
    if ajax_data == "sanqi":
        data = {
            "xm_name": [],
            "all": [],
            "use": []
        }
        disk_all = 0
        disk_use = 0
        group_id = models.Group.objects.filter(name="监管平台三期").values("id", "name")
        b1 = models.Group.objects.get(id=group_id[0]['id'])
        disk_list_data = b1.host_set.filter(status=1, type__in=[1, 2]).values("mem", "mem_use")
        for obj in disk_list_data:
            if obj["mem"] != None and obj["mem_use"] != None:
                disk_all += float(obj["mem"].strip("g"))
                disk_use += float(obj["mem_use"].strip("g"))
        data["all"].append(round(disk_all,2))
        data["use"].append(round(disk_use,2))
        print(data)
        return HttpResponse(json.dumps(data))
    # 三期内存使用情况  结束 不用的时候可以删除

    group_id = models.Group.objects.all().values("id","name")
    for id in group_id:
        disk_all = 0
        disk_use = 0
        data["xm_name"].append(id["name"])
        if id['name'] == "监管平台三期":
            continue
        b1 = models.Group.objects.get(id=id['id'])
        disk_list_data = b1.host_set.filter(status=1,type__in=[1,2]).values("mem","mem_use")
        for obj in disk_list_data:
            if obj["mem"] != None and obj["mem_use"] != None:
                disk_all += float(obj["mem"].strip("g"))
                disk_use += float(obj["mem_use"].strip("g"))
        data["mem_all"].append(round(disk_all,2))
        data["mem_use"].append(round(disk_use,2))

    # data = {"list":[1,2,3,4,5,6,7,8]}
    return HttpResponse(json.dumps(data))

def car_num_chart(request):
    # [['volvo', '0'], ['北汽常州', '4'], ['丹东黄海', '0'], ['河北廊坊', '0']] result的数据格式
    from filing import zabbix_api
    zabbix_obj = zabbix_api.Item_update('car_num')
    result = zabbix_obj.get_group_name()
    data = {"data_list":result}
    return HttpResponse(json.dumps(data))

def app_chart(request):
    data = {
        "group_list":[],
        "host_list":[],


from django.apps import AppConfig

class MallusersConfig(AppConfig):
    default_auto_field = 'django.db.models.BigAutoField'
    name = 'mallusers'


09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/>`,
	"shapes":                             `<path d="M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z"/><rect x="3" y="14" width="7" height="7" rx="1"/><circle cx="17.5" cy="17.5" r="3.5"/>`,
	"share-2":                            `<circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><line x1="8.59" x2="15.42" y1="13.51" y2="17.49"/><line x1="15.41" x2="8.59" y1="6.51" y2="10.49"/>`,
	"share":                              `<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"/><polyline points="16 6 12 2 8 6"/><line x1="12" x2="12" y1="2" y2="15"/>`,
	"sheet":                              `<rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><line x1="3" x2="21" y1="9" y2="9"/><line x1="3" x2="21" y1="15" y2="15"/><line x1="9" x2="9" y1="9" y2="21"/><line x1="15" x2="15" y1="9" y2="21"/>`,
	"shell":                              `<path d="M14 11a2 2 0 1 1-4 0 4 4 0 0 1 8 0 6 6 0 0 1-12 0 8 8 0 0 1 16 0 10 10 0 1 1-20 0 11.93 11.93 0 0 1 2.42-7.22 2 2 0 1 1 3.16 2.44"/>`,
	"shield-alert":                       `<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="M12 8v4"/><path d="M12 16h.01"/>`,
	"shield-ban":                         `<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C


ent_photo']) >= 5
    ):
        print("\|")
        await call.message.delete()
        await call.message.answer_photo(get_event['event_photo'],
                                        send_msg, reply_markup=event_open_finl(event_id, 0, place_id, city_id))
    else:
        print("\||")
        await call.message.edit_text(send_msg,
                                     reply_markup=event_open_finl(event_id, 0, place_id, city_id))

# Открытие пополнения счета
@dp.message_handler(text="💰 Пополнить", state="*")
async def user_refill_b(message: Message, state: FSMContext):
    await state.finish()
    await message.answer(user_refill_my(message.from_user.id), reply_markup=refill_open_inl)

#refiil_way(message.from_user.id)

# Открытие профиля
@dp.message_handler(text="👤 Профиль", state="*")
async def user_profile(message: Message, state: FSMContext):
    get_user = get_userx(user_id=message.from_user.id)
    if get_user['user_role'] in ["ShopAdmin", "Admin"]:
        await state.finish()
        await message.answer(open_profile_my(message.from_user.id), reply_markup=profile_seller_open_inl)
    else:
        await state.finish()
        await message.answer(open_profile_my(message.from_user.id), reply_markup=profile_open_inl)

# Открытие профиля
@dp.message_handler(text="Партнеры", state="*")
async def open_partners_list(message: Message, state: FSMContext):
    await state.finish()
    await message.answer("Наши славные партнеры:", reply_markup=partners_list_inl)

# Открытие корзины
@dp.message_handler(text=['🧮 Корзина', '🚛 Заказы'], state="*")
async def user_cart(message: Message, state: FSMContext):
    await state.finish()
    orderdata = []
    if message.text == '🧮 Корзина': #заказы покупателя
        user_id = message.from_user.id
        orderdata = get_params_orderx(user_id=user_id)
        if len(orderdata) == 0:
            await message.answer("В Вашей корзине пока нет товаров. Посмотрите категории[кнопка Купить] или товары Магазинов.")

    if message.text == '🚛 Заказы': #заказы продавца | представление от заказа к строке
        user_id = message.from_user.id
        if user_id in get_userx(user_role='ShopAdmin'):
            orderdata = get_params_orderxx(owner_uid=user_id)
            #orderdata = get_seller_orderx(owner_uid=adminuser_id)
        elif user_id in get_admins():
            orderdata = get_alladmin_orderx()
        else:
            await message.answer("Недостаточно доступа для просмотра заказов!")

    if message.text == '🚛 Заказы А': #заказы админа площадки
        user_id = message.from_user.id
        orderdata = get_params_orderxx(owner_uid=user_id)

    print(orderdata)

    for order in orderdata:
        print(order['order_state'])
        if order['order_state'] == 'delivery':
            await message.answer(open_cart_orders(order['order_id'], user_id), reply_markup=cart_open_delivery_finl(order_id=order['order_id']))
        if order['order_state'] == 'created':
            await message.answer(open_cart_orders(order['order_id'], user_id), reply_markup=cart_open_created_finl(order_id=order['order_id']))
        if order['order_state'] == 'submited':
            await message.answer(f"<b>Активных заказов нет.</b>\n")

# Открытие FAQ
@dp.message_handler(text=["ℹ FAQ", "/faq"], state="*")
async def user_faq(message: Message, state: FSMContext):
    await state.finish()

    send_message = get_settingsx()['misc_faq']
    if send_message == "None":
        send_message = f"ℹ Информация. Измените её в настройках бота.\n➖➖➖➖➖➖➖➖➖➖➖➖➖\n{BOT_DESCRIPTION}"

    await message.answer(get_faq(message.from_user.id, send_message), disable_web_page_preview=True)

###############################################################################################
##### ***** ###### *****         СОЗДАНИЕ АРТИСТА
###############################################################################################
# -----------------------------------------------------------------------------------------------------------
# Создание нового магазина
@dp.message_handler(IsAdminorShopAdmin(), text="🏪 Создать артиста ➕", state="*")
async def product_shop_create(message: Message, state: FSMContext):
    await state.finish()
    print("user_menu - создание артиста")
    print("-")
    user_id = message.from_user.id
    print(user_id)
    my_artist = check_user_artist_exist(user_id)
    print(my_artist)
    if my_artist == True:
        print("|")
        await message.answer(f"<b>🏪 Артист уже существует 🏷 Выбира


ent pressure of the specified touch-press.
---
---
---[Open in Browser](https://love2d.org/wiki/love.touch.getPressure)
---
---@param id lightuserdata # The identifier of the touch-press. Use love.touch.getTouches, love.touchpressed, or love.touchmoved to obtain touch id values.
---@return number pressure # The pressure of the touch-press. Most touch screens aren't pressure sensitive, in which case the pressure will be 1.
function love.touch.getPressure(id) end

---
---Gets a list of all active touch-presses.
---
---
---[Open in Browser](https://love2d.org/wiki/love.touch.getTouches)
---
---@return table touches # A list of active touch-press id values, which can be used with love.touch.getPosition.
function love.touch.getTouches() end


 usize = 351;
pub const FALLOCATE              : usize = 352;
pub const TIMERFD_SETTIME        : usize = 353;
pub const TIMERFD_GETTIME        : usize = 354;
pub const SIGNALFD4              : usize = 355;
pub const EVENTFD2               : usize = 356;
pub const EPOLL_CREATE1          : usize = 357;
pub const DUP3                   : usize = 358;
pub const PIPE2                  : usize = 359;
pub const INOTIFY_INIT1          : usize = 360;
pub const PREADV                 : usize = 361;
pub const PWRITEV                : usize = 362;
pub const RT_TGSIGQUEUEINFO      : usize = 363;
pub const PERF_EVENT_OPEN        : usize = 364;
pub const RECVMMSG               : usize = 365;
pub const ACCEPT4                : usize = 366;
pub const FANOTIFY_INIT          : usize = 367;
pub const FANOTIFY_MARK          : usize = 368;
pub const PRLIMIT64              : usize = 369;
pub const NAME_TO_HANDLE_AT      : usize = 370;
pub const OPEN_BY_HANDLE_AT      : usize = 371;
pub const CLOCK_ADJTIME          : usize = 372;
pub const SYNCFS                 : usize = 373;
pub const SENDMMSG               : usize = 374;
pub const SETNS                  : usize = 375;
pub const PROCESS_VM_READV       : usize = 376;
pub const PROCESS_VM_WRITEV      : usize = 377;
pub const KCMP                   : usize = 378;
pub const FINIT_MODULE           : usize = 379;
pub const SCHED_SETATTR          : usize = 380;
pub const SCHED_GETATTR          : usize = 381;
pub const RENAMEAT2              : usize = 382;
pub const SECCOMP                : usize = 383;
pub const GETRANDOM              : usize = 384;
pub const MEMFD_CREATE           : usize = 385;
pub const BPF                    : usize = 386;
pub const EXECVEAT               : usize = 387;
<reponame>stana-ethernal/Gravity-Bridge
use crate::args::CosmosToEthOpts;
use crate::utils::TIMEOUT;
use cosmos_gravity::query::get_denom_to_erc20;
use cosmos_gravity::send::send_to_eth;
use gravity_proto::gravity::QueryDenomToErc20Request;
use gravity_utils::{
    connection_prep::{check_for_fee, create_rpc_connections},
    num_conversion::{print_atom, print_eth},
};
use std::process::exit;

pub async fn cosmos_to_eth(args: CosmosToEthOpts, address_prefix: String) {
    let cosmos_key = args.cosmos_phrase;
    let gravity_coin = args.amount;
    let fee = args.fee;
    let cosmos_grpc = args.cosmos_grpc;
    let eth_dest = args.eth_destination;
    let bridge_fee = args.bridge_fee;

    let cosmos_address = cosmos_key.to_address(&address_prefix).unwrap();

    info!("Sending from Cosmos address {}", cosmos_address);
    let connections =
        create_rpc_connections(address_prefix, Some(cosmos_grpc), None, TIMEOUT).await;
    let contact = connections.contact.unwrap();
    let mut grpc = connections.grpc.unwrap();

    let res = get_denom_to_erc20(&mut grpc, gravity_coin.denom.clone()).await;
    let is_cosmos_originated = match res {
        Ok(v) => v.cosmos_originated,
        Err(e) => {
            error!("Could not lookup denom is it valid? {:?}", e);
            exit(1);
        }
    };

    let res = grpc
        .denom_to_erc20(QueryDenomToErc20Request {
            denom: gravity_coin.denom.clone(),
        })
        .await;
    match res {
        Ok(val) => info!(


\
			continue;                                     \
		}                                                     \
		ret = -ERESTARTSYS;                                   \
		break;                                                \
	}                                                             \
	waitq_finish_wait(&waitq, &__entry);                          \
} while (0)

/**
 * wait_event_interruptible - sleep until a condition becomes true
 * @waitq: the waitqueue to wait on
 * @condition: a C expression for the event to wait for
 *
 * The process is put to sleep (TASK_INTERRUPTIBLE) until the
 * @condition evaluates to true or a signal is received. The
 * @condition is checked each time the waitqueue @waitq is woken up.
 *
 * wake_up() has to be called after changing any variable that could
 * change the result of the wait condition.
 *
 * The function will return -ERESTARTSYS if it was interrupted by a
 * signal and 0 if @condition evaluated to true.
 */
#define wait_event_interruptible(waitq, condition)                   \
({                                                                   \
	int __ret = 0;                                               \
	if (!(condition))                                            \
		__wait_event_interruptible(waitq, condition, __ret); \
	__ret;                                                       \
})

#endif


    this.indexDB.getByKey(url,comp.keyId).then((data:any)=>{
            console.log(data);
            comp.formData = data;
            if(data.categoryLv2){
                this.getCategoryById(2,data.categoryLv1,comp);
            }
            if(data.categoryLv3){
                this.getCategoryById(3,data.categoryLv2,comp);
            }
            if(data.categoryLv4){
                this.getCategoryById(4,data.categoryLv3,comp);
            }
        }).catch(function(error){

        });
    }

    onUpdate(comp){
        let url:string = "product-management";

        this.indexDB.update(url,comp.keyId,comp.formData).then(()=>{
            this.layer.msg({type:"msg_succ",text:comp.globalLabel['tips']['succUpdate']},()=>{
                this.getProductList(comp);
                this.getDetail(comp);
            });
        }).catch(function(error){

        });
    }
}*/
import { getRepository } from "typeorm";
import { Customer } from "../models";

export interface ICustomerPayload {
    firstName: string;
    lastName: string;
    email: string;
}

/**
 * It finds all of the customer records from database.
 * @returns customer records
 */
export const getCustomers = async (): Promise<Array<Customer>> => {
    const customerRepository = getRepository(Customer);
    return customerRepository.find();
};

/**
 * It creates new customer.
 * @param payload
 * @returns
 */
export const createCustomer = async(payload: ICustomerPayload): Promise<Customer> => {
    const customerRepository = getRepository(Customer);
    const customer = new Customer();
    return customerRepository.save({
        ...customer,
        ...payload,
    });
};// Type definitions for html 1.0
// Project: https://github.com/maxogden/commonjs-html-prettyprinter
// Definitions by: Florian Keller <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

export interface PrintOptions {
    /**
     * Put braces on the same line as control statements (`collapse`),
     * or put braces on own line (Allman / ANSI style, `expand`),
     * or just put end braces on own line (`end-expand`). Default: `collapse`.
     */
    brace_style?: 'collapse' | 'expand' | 'end-expand' | undefined;
    /** Default: `normal`. */
    indent_scripts?: 'keep' | 'separate' | 'normal' | undefined;
    /** indentation size. Default: 4. */
    indent_size?: number | undefined;
    /** character to indent with. Default: " " (space). */
    indent_char?: string | undefined;
    /** Maximum amount of characters per line. Default: 70. */
    max_char?: number | undefined;
    /** list of tags, that shouldn't be reformatted. Defaults to inline tags. */
    unformatted?: string[] | undefined;
}

export function prettyPrint(htmlSource: string, options?: PrintOptions): string;
import { Component, ElementRef, QueryList, ViewChildren } from '@angular/core';
import 'chance';

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
})
export class AppComponent {

    data: ReorderableTableData[] = [];

    @ViewChildren('row') rows: QueryList<ElementRef>;

    constructor() {

        for (let idx = 0; idx < 10; idx++) {
            this.data.push({
                document: `Document ${idx}`,
                author: chance.name(),
                date: chance.date({ year: 2018 }) as Date,
                completed: chance.integer({ min: 10, max: 100 }),
                active: chance.bool()
            });
        }
    }

    movedown(data: ReorderableTableData, index: number, event: KeyboardEvent): void {


ty_MemberClass {
    @_decorator.property
    parent!: ReadOrWriteMultiReferenceProperty;

    [serializeTag](serializationOutput: SerializationOutput, context: SerializationContext) {
        serializationOutput.writeProperty('parent', this.parent);
    }
}

const readOrWriteMultiReferenceProperty = new ReadOrWriteMultiReferenceProperty();
const readOrWriteMultiReferenceProperty_MemberClass =
    readOrWriteMultiReferenceProperty.child = new ReadOrWriteMultiReferenceProperty_MemberClass();
readOrWriteMultiReferenceProperty_MemberClass.parent = readOrWriteMultiReferenceProperty;

export const value = {
    serializationOutputProperty: new SerializationOutputProperty(),
    contextSerializeSuper: new ContextSerializeSuper(),
    contextSerializeSuper1: new ContextSerializeSuper1(),
    contextSerializeSuper2: new ContextSerializeSuper2(),
    contextSerializeThis: new ContextSerializeThis(),
    contextSerializeThis1: new ContextSerializeThis1(),
    contextSerializeThis2: new ContextSerializeThis2(),
    readOrWriteMultiReferenceProperty,
};

testEachPort(PORTS_BOTH_DYNAMIC_COMPILED, async (port) => {
    await runTest(
        __filename,
        port,
        value,
        (serialized: typeof value) => {
            expect(serialized.serializationOutputProperty).toStrictEqual(value.serializationOutputProperty);
            expect(serialized.contextSerializeSuper).toStrictEqual(value.contextSerializeSuper);
            expect(serialized.contextSerializeSuper1.baseProperty).toStrictEqual('CustomOverrideSuper');
            expect(serialized.contextSerializeSuper2).toStrictEqual(value.contextSerializeSuper2);
            expect(serialized.contextSerializeThis).toStrictEqual(value.contextSerializeThis);
            expect(serialized.contextSerializeThis1).toStrictEqual(value.contextSerializeThis1);
            expect(serialized.contextSerializeThis2.foo).toStrictEqual('CustomOverride');

            expect(serialized.readOrWriteMultiReferenceProperty.child.parent).toBe(serialized.readOrWriteMultiReferenceProperty);
        }
    );
});
import React from 'react';
import { BaseTypeProps } from '../utils';

export interface SwitchProps extends BaseTypeProps {
  /** 开关尺寸，默认单位为px	 */
  size?: number | string;
  /** 是否为加载状态	 */
  loading?: boolean;
  /** 是否为禁用状态	 */
  disabled?: boolean;
  /** 开关选中状态	 */
  checked?: boolean;
  /** 开关默认选中状态	 */
  defaultChecked?: boolean;
  /** 打开时的背景色	 */
  activeColor?: string;
  /** 关闭时的背景色	 */
  inactiveColor?: string;
  /** 打开时对应的值	 */
  activeValue?: any;
  /** 关闭时对应的值	 */
  inactiveValue?: any;
  /** 开关状态切换时触发	 */
  onChange?: (val: any) => void;
  onClick?: (e: React.MouseEvent) => void;
}
import { helpers } from '../../__data__';
import { DiagnosticCode } from '../../DiagnosticCode';

const properties = `
public readonly properties = {
  trusts: '*',
  permissions: [],
  groups: [],
};
`;

describe('ContractInfoProcessor', () => {
  test('allowed types', async () => {
    const node = await helpers.startNode();
    await node.addContract(`
      import { SmartContract } from '@neo-one/smart-contract';

      export class TestSmartContract extends SmartContract {
        ${properties}
      }
    `);
  });

  test('no symbol properties', async () => {
    await helpers.compileString(
      `
      import { SmartContract } from '@neo-one/smart-contract';

      export class TestSmartContract extends SmartContract {
        ${properties}
        public readonly [Symbol.iterator]: string = 'foo';
      }
    `,
      { type: 'error' },
    );
  });

  test('


import 'rxjs/add/operator/takeUntil';

@Directive({
  selector: '[appMoveMe]'
})
export class MoveMeDirective implements OnDestroy, AfterContentInit {
  @Output('coordinates') private coordinates: EventEmitter<{ x: number, y: number }> = new EventEmitter<{ x: number, y: number }>();
  @Output('status') private status: EventEmitter<any> = new EventEmitter<any>();
  @Input('allowControlToBeMoved') public allowControlToBeMoved = true;

  private subscription: Subscription;
  private initialX: number;
  private initialY: number;
  private initialWindowX: number;
  private initialWindowY: number;
  private dragNDropGrabArea: HTMLElement;

  constructor(private el: ElementRef) {}

  ngAfterContentInit() {
    // if an element having a custom class .window-header is found than that element will allow by dragging it to drag the entire window
    // otherwise you can move the window by grabbing anywhere on it
    const windowHeader = this.el.nativeElement.querySelector('.window-header');
    this.dragNDropGrabArea = windowHeader ? windowHeader : this.el.nativeElement;

    this.setInitialStylingForMovement(this.el);

    const mouseDown$ = Observable.fromEvent(this.dragNDropGrabArea, 'mousedown');
    const mouseUp$ = Observable.fromEvent(document, 'mouseup');
    const mouseMove$ = Observable.fromEvent(document, 'mousemove');

    const dragNDrop$ = mouseDown$
      .mergeMap((event: MouseEvent) => {
        this.saveWindowCornerToMouseOffsets(this.el, event);
        this.saveWindowOffsets(this.el);
        this.status.emit('mousedown');

        return mouseMove$
          .throttleTime(10)
          .takeWhile(() => this.allowControlToBeMoved === true)
          .map((ev: MouseEvent) => {
            ev.preventDefault();
            return ev;
          })
          .do(() => this.styleMovingWindow(this.el, this.status))
          .takeUntil(mouseUp$
            .do(() => {
                this.status.emit('mouseup');
                this.emitValues(this.el);
                this.unStyleAfterMovingWindow(this.el);
              }
            ));
      });

    this.subscription = dragNDrop$
      .subscribe(
        // next
        (event: MouseEvent) => this.moveElement(this.el, event.clientX + this.initialX, event.clientY + this.initialY),
        // error
        console.log,
        // completion
        () => console.log('completed')
      );
  }

  /**
   * Sets the initial requirements for the Element to be movable to a new position
   * @param {ElementRef} el
   */
  setInitialStylingForMovement(el: ElementRef): void {
    el.nativeElement.style.position = 'absolute';
    el.nativeElement.style.userSelect = 'none';
    el.nativeElement.style.margin = 0;
    el.nativeElement.style.padding = 0;
  }

  /**
   * Retain initial window-corner-to-click offsets
   * @param {ElementRef} el
   * @param {MouseEvent} event
   */
  saveWindowCornerToMouseOffsets(el: ElementRef, event: MouseEvent): void {
    // retain initial click-to-window-corner-coordinates offsets
    this.initialX = el.nativeElement.offsetLeft - event.clientX;
    this.initialY = el.nativeElement.offsetTop - event.clientY;
  }

  /**
   * Retains initial window coordinates, will be used to optimize the event emitting  (will not emit if coordinates are the same)
   * @param {ElementRef} el
   */
  saveWindowOffsets(el: E


monster = Game.createMonster("Aftershock", Position(32208, 31248, 14), false, true)
		if monster then
			local aftershockHealth = Game.getStorageValue(GlobalStorage.HeartOfDestruction.AftershockHealth) > 0 and Game.getStorageValue(GlobalStorage.HeartOfDestruction.AftershockHealth) or 0
			monster:addHealth(-monster:getHealth() + aftershockHealth, COMBAT_PHYSICALDAMAGE)
			createSparksOfDestruction()
		end
	elseif creatureName == "aftershock" then
		local monster = Game.createMonster("Realityquake", creature:getPosition(), false, true)
		if monster then
			createSparksOfDestruction()
		end
	end
	return true
end

shocksDeath:register()


(message.Npc == _lastBossMeterUser)
            {
                _lastBossMeterUser = null;
                _lastBossHpMeterUser = 0;
            }
            if (!_lastBosses.Any(x => x.Value > 0))
                if (BasicTeraData.Instance.EventsData.MissingAbnormalities?.Keys != null) {
                    foreach (var e in BasicTeraData.Instance.EventsData.MissingAbnormalities.Keys) e.NextChecks = new Dictionary<EntityId, DateTime>();
                }
        }

        internal void S_BEGIN_THROUGH_ARBITER_CONTRACT(S_BEGIN_THROUGH_ARBITER_CONTRACT message)
        {
            if (message.PlayerName.StartsWith("Error")) { BasicTeraData.LogError(message.PlayerName); }
        }

        internal void UpdateCredits(S_UPDATE_NPCGUILD.NpcGuildType type, int credits)
        {
            if (type == S_UPDATE_NPCGUILD.NpcGuildType.Vanguard && credits >= (PacketProcessor.Instance.MessageFactory.Version == 351828 ? 8500 : 19500))// hope there wouldn


}function LAe(n){var e,t,i;switch(e=u(v(n,(cn(),Ev)),8),U(n,Ev,new V(e.b,e.a)),u(v(n,Th),255).g){case 1:U(n,Th,(Rh(),eO));break;case 2:U(n,Th,(Rh(),ZI));break;case 3:U(n,Th,(Rh(),qj));break;case 4:U(n,Th,(Rh(),Uj))}(n.q?n.q:(Dn(),Dn(),Wh))._b(Hw)&&(t=u(v(n,Hw),8),i=t.a,t.a=t.b,t.b=i)}function Kqn(n,e,t,i,r,c){if(this.b=t,this.d=r,n>=e.length)throw M(new Ir("Greedy SwitchDecider: Free layer not in graph."));this.c=e[n],this.e=new N7(i),T$(this.e,this.c,(en(),Wn)),this.i=new N7(i),T$(this.i,this.c,Zn),this.f=new rPn(this.c),this.a=!c&&r.i&&!r.s&&this.c[0].k==(Vn(),Zt),this.a&&zje(this,n,e.length)}function _qn(n,e){var t,i,r,c,s,f;c=!n.B.Hc((io(),cE)),s=n.B.Hc(bU),n.a=new ABn(s,c,n.c),n.n&&WW(n.a.n,n.n),mD(n.g,(wf(),Wc),n.a),e||(i=new C5(1,c,n.c),i.n.a=n.k,Pp(n.p,(en(),Xn),i),r=new C5(1,c,n.c),r.n.d=n.k,Pp(n.p,ae,r),f=new C5(0,c,n.c),f.n.c=n.k,Pp(n.p,Wn,f),t=new C5(0,c,n.c),t.n.b=n.k,Pp(n.p,Zn,t))}function NAe(n){var e,t,i;switch(e=u(v(n.d,(cn(),$l)),223),e.g){case 2:t=jLe(n);break;case 3:t=(i=new Z,qt(ct(_r(rc(rc(new Tn(null,new In(n.d.b,16)),new ipn),new rpn),new cpn),new U2n),new E7n(i)),i);break;default:throw M(new Or("Compaction not supported for "+e+" edges."))}UIe(n,t),qi(new qa(n.g),new y7n(n))}function $Ae(n,e){var t,i,r,c,s,f,h;if(e.Ug("Process directions",1),t=u(v(n,(lc(),vb)),88),t!=(ci(),Wf))for(r=ge(n.b,0);r.b!=r.d.c;){switch(i=u(be(r),40),f=u(v(i,(pt(),$j)),17).a,h=u(v(i,xj),17).a,t.g){case 4:h*=-1;break;case 1:c=f,f=h,h=c;break;case 2:s=f,f=-h,h=s}U(i,$j,Y(f)),U(i,xj,Y(h))}e.Vg()}function xAe(n,e){var t;return t=new xO,e&&Ur(t,u(ee(n.a,oE),96)),D(e,422)&&Ur(t,u(ee(n.a,sE),96)),D(e


fr-form input{right:0;top:0;bottom:0;margin:0}.gray-theme.fr-popup .fr-image-progress-bar-layer>h3{margin:10px 0}.gray-theme.fr-popup .fr-image-progress-bar-layer>div.fr-loader{background:#b3e0e5}.gray-theme.fr-popup .fr-image-progress-bar-layer>div.fr-loader span{background:#0097A7;-webkit-transition:width 0.2s ease 0s;-moz-transition:width 0.2s ease 0s;-ms-transition:width 0.2s ease 0s;-o-transition:width 0.2s ease 0s}.gray-theme.fr-popup .fr-image-progress-bar-layer>div.fr-loader.fr-indeterminate span{top:0;-webkit-animation:loading 2s linear infinite;-moz-animation:loading 2s linear infinite;-o-animation:loading 2s linear infinite;animation:loading 2s linear infinite}.gray-theme .fr-uploading{-webkit-opacity:0.4;-moz-opacity:0.4;opacity:0.4;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"}.gray-theme.fr-modal .fr-modal-head .fr-modal-head-line::after{clear:both;display:block;content:"";height:0}.gray-theme.fr-modal .fr-modal-head .fr-modal-head-line .fr-modal-more{margin-top:10px}.gray-theme.fr-modal .fr-modal-head .fr-modal-head-line .fr-modal-more.fr-not-available{opacity:0;width:0;padding:12px 0}.gray-theme.fr-modal .fr-modal-head .fr-modal-tags{padding:0 20px}.gray-theme.fr-modal .fr-modal-head .fr-modal-tags a{opacity:0;padding:6px 12px;margin:8px 0 8px 8px;border-radius:32px;-moz-border-radius:32px;-webkit-border-radius:32px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-transition:opacity 0.2s ease 0s, background 0.2s ease 0s;-moz-transition:opacity 0.2s ease 0s, background 0.2s ease 0s;-ms-transition:opacity 0.2s ease 0s, background 0.2s ease 0s;-o-transition:opacity 0.2s ease 0s, background 0.2s ease 0s;background-color:#f5f5f5}.gray-theme.fr-modal .fr-modal-head .fr-modal-tags a:focus{background-color:#e8e8e8}.gray-theme.fr-modal .fr-modal-head .fr-modal-tags a:hover{background-color:#e8e8e8}.gray-theme.fr-modal .fr-modal-head .fr-modal-tags a:active{background-color:gainsboro}.gray-theme.fr-modal .fr-modal-head .fr-modal-tags a.fr-selected-tag{background-color:#EcF5Ff;color:#0097A7}.gray-theme.fr-modal .fr-modal-head .fr-modal-tags a.fr-selected-tag:focus{background-color:#e8e8e8}.gray-theme.fr-modal .fr-modal-head .fr-modal-tags a.fr-selected-tag:hover{background-color:#e8e8e8}.gray-theme.fr-modal .fr-modal-head .fr-modal-tags a.fr-selected-tag:active{background-color:gainsboro}.gray-theme.fr-show-tags .fr-modal-more svg path{fill:#0097A7}.gray-themediv.fr-modal-body{-webkit-transition:background 0.2s ease 0s;-moz-transition:background 0.2s ease 0s;-ms-transition:background 0.2s ease 0s;-o-transition:background 0.2s ease


p, []gopacket.LayerType{LayerTypeEthernet, LayerTypeIPv6, LayerTypeOSPF}, t)
	if got, ok := p.Layer(LayerTypeOSPF).(*OSPFv3); ok {
		want := &OSPFv3{
			OSPF: OSPF{
				Version:      3,
				Type:         OSPFLinkStateRequest,
				PacketLength: 100,
				RouterID:     0x2020202,
				AreaID:       1,
				Checksum:     0x2c9a,
				Content: []LSReq{
					LSReq{
						LSType:    0x2001,
						LSID:      0x00000000,
						AdvRouter: 0x01010101,
					},
					LSReq{
						LSType:    0x2003,
						LSID:      0x00000003,
						AdvRouter: 0x01010101,
					},
					LSReq{
						LSType:    0x2003,
						LSID:      0x00000002,
						AdvRouter: 0x01010101,
					},
					LSReq{
						LSType:    0x2003,
						LSID:      0x00000001,
						AdvRouter: 0x01010101,
					},
					LSReq{
						LSType:    0x2003,
						LSID:      0x00000000,
						AdvRouter: 0x01010101,
					},
					LSReq{
						LSType:    0x0008,
						LSID:      0x00000005,
						AdvRouter: 0x01010101,
					},
					LSReq{
						LSType:    0x2009,
						LSID:      0x00000000,
						AdvRouter: 0x01010101,
					},
				},
			},
			Instance: 0,
			Reserved: 0,
		}
		if !reflect.DeepEqual(got, want) {
			t.Errorf("OSPF packet processing failed:\ngot  :\n%#v\n\nwant :\n%#v\n\n", got, want)
		}
	} else {
		t.Error("No OSPF layer type found in packet")
	}
}
func BenchmarkDecodePacketPacket2(b *testing.B) {
	for i := 0; i < b.N; i++ {
		gopacket.NewPacket(testPacketOSPF3LSRequest, LinkTypeEthernet, gopacket.NoCopy)
	}
}

// testPacketOSPF2LSUpdate is the packet:
// 13:20:14.420459 IP 192.168.170.2 > 224.0.0.6: OSPFv2, LS-Update, length 292
//	0x0000:  0100 5e00 0006 0060 0881 7a70 0800 45c0  ..^....`..zp..E.
//	0x0010:  0138 3025 0000 0159 3cd7 c0a8 aa02 e000  .80%...Y<.......
//	0x0020:  0006 0204 0124 c0a8 aa03 0000 0001 366b  .....$........6k
//	0x0030:  0000 0000 0000 0000 0000 0000 0007 0002  ................
//	0x0040:  0201 c0a8 aa03 c0a8 aa03 8000 0001 3a9c  ..............:.
//	0x0050:  0030 0200 0002 c0a8 aa00 ffff ff00 0300  .0..............
//	0x0060:  000a c0a8 aa00 ffff ff00 0300 000a 0003  ................
//	0x0


(./img%27%28%29%20img.png);
	a115: url(./img%27img.png);
	a116: url(./img%28img.png);
	a117: url(./img%29img.png);
	a118: url(./img%20img.png);
}

div {
	a119: url('img.png');
}

div {
	a120: url("./img\'\'\'img.png");
	a121: url("./img\'\(\)\ img.png");
	a122: url("./img\'img.png");
	a123: url("./img\(img.png");
	a124: url("./img\)img.png");
	a125: url("./img\ img.png");
	a126: url("./\69\6D\67.png");
	a127: url(./\69\6D\67.png);
	a128: url("./img\27img.png");
	a129: url("./img\'\28%29 img.png");
	a130: url(./img\'\28%29\ img.png);
}

div {
	a131: url('./img.png');
	a132: url('./img.png');

	a133: url('./img.png?foo=bar');
	a134: url('./img.png?foo=bar');

	a135: url('./img.png?foo=bar#hash');
	a136: url('./img.png?foo=bar#hash');

	a137: url('./img.png?foo=bar');
	a138: url('./img.png?bar=foo');

	a139: url('./img.png?foo=bar#foo');
	a140: url('./img.png?bar=foo#bar');

	a141: url('./img.png?foo=1&bar=2');
	a142: url('./img.png?foo=2&bar=1');
}

div {
	a143: url("data:image/svg+xml;charset=UTF-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%0A%09%20width%3D%22191px%22%20heig


err = crypto_register_skcipher(&tdes_algs[i]);
		if (err)
			goto err_tdes_algs;
	}

	return 0;

err_tdes_algs:
	for (j = 0; j < i; j++)
		crypto_unregister_skcipher(&tdes_algs[j]);

	return err;
}

static void atmel_tdes_get_cap(struct atmel_tdes_dev *dd)
{

	dd->caps.has_dma = 0;
	dd->caps.has_cfb_3keys = 0;

	/* keep only major version number */
	switch (dd->hw_version & 0xf00) {
	case 0x800:
	case 0x700:
		dd->caps.has_dma = 1;
		dd->caps.has_cfb_3keys = 1;
		break;
	case 0x600:
		break;
	default:
		dev_warn(dd->dev,
				"Unmanaged tdes version, set minimum capabilities\n");
		break;
	}
}

#if defined(CONFIG_OF)
static const struct of_device_id atmel_tdes_dt_ids[] = {
	{ .compatible = "atmel,at91sam9g46-tdes" },
	{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, atmel_tdes_dt_ids);
#endif

static int atmel_tdes_probe(struct platform_device *pdev)
{
	struct atmel_tdes_dev *tdes_dd;
	struct device *dev = &pdev->dev;
	struct resource *tdes_res;
	int err;

	tdes_dd = devm_kmalloc(&pdev->dev, sizeof(*tdes_dd), GFP_KERNEL);
	if (!tdes_dd)
		return -ENOMEM;

	tdes_dd->dev = dev;

	platform_set_drvdata(pdev, tdes_dd);

	INIT_LIST_HEAD(&tdes_dd->list);
	spin_lock_init(&tdes_dd->lock);

	tasklet_init(&tdes_dd->done_task, atmel_tdes_done_task,
					(unsigned long)tdes_dd);
	tasklet_init(&tdes_dd->queue_task, atmel_tdes_queue_task,
					(unsigned long)tdes_dd);

	crypto_init_queue(&tdes_dd->queue, ATMEL_TDES_QUEUE_LENGTH);

	/* Get the base address */
	tdes_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	if (!tdes_res) {
		dev_err(dev, "no MEM resource info\n");
		err = -ENODEV;
		goto err_tasklet_kill;
	}
	tdes_dd->phys_base = tdes_res->start;

	/* Get the IRQ */
	tdes_dd->irq = platform_get_irq(pdev,  0);
	if (tdes_dd->irq < 0) {
		err = tdes_dd->irq;
		goto err_tasklet_kill;
	}

	err = devm_request_irq(&pdev->dev, tdes_dd->irq, atmel_tdes_irq,
			       IRQF_SHARED, "atmel-tdes", tdes_dd);
	if (err) {
		dev_err(dev, "unable to request tdes irq.\n");
		goto err_tasklet_kill;
	}

	/* Initializing the clock */
	tdes_dd->iclk = devm_clk_get(&pdev->dev, "tdes_clk");
	if (IS_ERR(tdes_dd->iclk)) {
		dev_err(dev, "clock initialization failed.\n");
		err = PTR_ERR(tdes_dd->iclk);
		goto err_tasklet_kill;
	}

	tdes_dd->io_base = devm_ioremap_resource(&pdev->dev, tdes_res);
	if (IS_ERR(tdes_dd->io_base)) {
		err = PTR_ERR(tdes_dd->io_base);
		goto err_tasklet_kill;
	}

	err = atmel_tdes_hw_version_init(tdes_dd);
	if (err)
		goto err_tasklet_kill;

	atmel_tdes_get_cap(tdes_dd);

	err = atmel_tdes_buff_init(tdes_dd);
	if (err)
		goto err_tasklet_kill;

	if (tdes_dd->caps.has_dma) {
		err = atmel_tdes_dma_init(tdes_dd);
		if (err)
			goto err_buff_cleanup;

		dev_info(dev, "using %s, %s for DMA transfers\n",
				dma_chan_name(tdes_dd->dma_lch_in.chan),
				dma_chan_name(tdes_dd->dma_lch_out.chan));
	}

	spin_lock(&atmel_tdes.lock);
	list_add_tail(&tdes_dd->list, &atmel_tdes.dev_list);
	spin_unlock(&atmel_tdes.lock);

	err = atmel_tdes_register_algs(tdes_dd);
	if (err)
		goto err_algs;

	dev_info(dev, "Atmel DES/TDES\n");

	return 0;

err_algs:
	spin_lock(&atmel_tdes.lock);
	list_del(&tdes_dd->list);
	spin_unlock(&atmel_tdes.lock);
	if (tdes_dd->caps.has_dma)
		atmel_tdes_dma_cleanup(tdes_dd);
err_buff_cleanup:
	atmel_tdes_buff_cleanup(tdes_dd);
err_tasklet_kill:
	tasklet_kill(&tdes_dd->done_task);
	tasklet_kill(&tdes_dd->queue_task);

	return err;
}

static int atmel_tdes_remove(struct platform_device *pdev)
{
	struct atmel_tdes_dev *tdes_dd = platform_get_drvdata(pdev);

	spin_lock(&atmel_tdes.lock);
	list_del(&tdes_dd->list);
	spin_unlock(&atmel_tdes.lock);

	atmel_tdes_unregister_algs(tdes_dd);

	tasklet_kill(&tdes_dd->done_task);
	tasklet_kill(&tdes_dd->queue_task);

	if (tdes_dd->caps.has_dma)
		atmel_tdes_dma_cleanup(tdes_dd);

	atmel_tdes_buff_cleanup(tdes_dd);

	return 0;
}

static struct platform_driver atmel_tdes_driver = {
	.probe		= atmel_tdes_probe,
	.remove		= atmel_tdes_remove,
	.driver		= {
		.name	= "atmel_tdes",
		.of_match_table = of_match_ptr(atmel_tdes_dt_ids),
	},
};

module_platform_driver(atmel_tdes_driver);

MODULE_DESCRIPTION("Atmel DES/TDES hw acceleration support.");
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Nicolas Royer - Eukréa Electromatique");


�� 게임의 워크플로를 프로그래밍하는 방법을 보여준다. 늑대인간 게임은 사회공제 게임으로 6명의 선수가 상대팀인 늑대인간과 마을사람으로 나뉘어 진행된다. 모든 늑대인간이 제거되거나(마을의 승리) 늑대인간 수가 마을사람과 같거나(늑대인간 승리) 숫자보다 많을 때 게임이 끝난다.\n' +
      '\n' +
      '게임 설정에는 역할 할당 및 에이전트 초기화가 포함됩니다. 에이전트 스코프는 에이전트 개체를 인스턴스화하는 데 필요한 매개 변수가 포함된 미리 설정된 에이전트 구성으로 빠른 시작을 지원합니다.\n' +
      '\n' +
      '예제 11은 구성으로부터 에이전트를 로드하고 역할을 할당하는 방법을 보여줍니다.\n' +
      '\n' +
      '늑대인간 게임에서 가장 눈에 띄는 특징 중 하나는 야간 단계 및 주간 토론에서 늑대인간 토론을 포함하여 그룹 대화이며, 이는 여러 다른 플레이어가 참여해야 한다. 이러한 요구사항을 해결하기 위해 에이전트스코프의 메시지 허브를 활용하여 그룹 대화를 쉽게 생성할 수 있다. 예시 12는 에이전트스코프에서 구현된 늑대인간 토론을 제시한다. 이 토론에서 메시지 허브는 진행자의 안내 멘트로 시작합니다. 그 후, 늑대인간은 최대 MAX_WEREWOLF_DISCUSSION_ROUND 라운드에 대해 논의하고 합의에 도달하면 결론을 내린다. 늑대인간 게임에서 사용되는 에이전트 클래스는 Python 사전에서 응답하는 DictDialogAgen


/*
 *   File: coupling.c
 *   Author: Vincent Gramoli <vincent.gramoli@sydney.edu.au>,
 *  	     Vasileios Trigonakis <vasileios.trigonakis@epfl.ch>
 *   Description: hand-over-hand locking list
 *   (Details: Maurice Herlihy and Nir Shavit. The Art of
 *    Multiprocessor Programming, Revised First Edition. 2012.)
 *   coupling.c is part of ASCYLIB
 *
 * Copyright (c) 2014 Vasileios Trigonakis <vasileios.trigonakis@epfl.ch>,
 * 	     	      Tudor David <tudor.david@epfl.ch>
 *	      	      Distributed Programming Lab (LPD), EPFL
 *
 * ASCYLIB 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, version 2
 * of the License.
 *
 * 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.
 *
 */

#include "coupling.h"

RETRY_STATS_VARS;
LOCK_LOCAL_DATA;

/*
 * Similar algorithm for the delete, find, and insert:
 * Lock the first two elements (locking each before getting the copy of the element)
 * then unlock previous, keep ownership of the current, and lock next in a loop.
 */
sval_t
lockc_delete(intset_l_t *set, skey_t key)
{
  PARSE_TRY();
  UPDATE_TRY();

  node_l_t *curr, *next;
  sval_t res = 0;

  LOCK_A(set->lock);		/* when GL_[UN]LOCK is defined the [UN]LOCK is not ;-) */
  curr = set->head;
  next = curr->next;

  while (next->key < key)
    {
      curr = next;
      next = next->next;
    }

  if (key == next->key)
    {
      res = next->val;
      curr->next = next->next;
#if GC == 1
      ssmem_free(alloc, (void*) next);
#endif
    }

  UNLOCK_A(set->lock);

  return res;
}

sval_t
lockc_find(intset_l_t *set, skey_t key)
{
  PARSE_TRY();

  node_l_t *curr, *next;
  sval_t res = 0;

  curr = set->head;
  next = curr->next;

  while (next->key < key)
    {
      curr = next;
      next = curr->next;
    }
  if (key == next->key)
    {
      res = next->val;
    }

  return res;
}

int
lockc_insert(intset_l_t *set, skey_t key, sval_t val)
{
  PARSE_TRY();
  UPDATE_TRY();

  node_l_t *curr, *next, *newnode;
  int found;

  LOCK_A(set->lock);
  curr = set->head;
  next = curr->next;

  while (next->key < key)
    {
      curr = next;
      next = curr->next;
    }
  found = (key == next->key);
  if (!found)
    {
      newnode = new_node_l(key, val, next, 1);
#ifdef __tile__
  MEM_BARRIER;
#endif
      curr->next = newnode;
    }
  UNLOCK_A(set->lock);
  return !found;
}


as u32);

		let mut games = Vec::new();
		//---- Play out the round and get an array of the winners
		create_and_play_games_parallel(&mut games, number_of_games as usize, &mut nn, false);

		//---- Round Finished
		println!("Finished round {0} in {1}", NUMBER_OF_ROUNDS - i, sec_from_time(round_started));

		//---- Collect winners
		let winners = games.par_iter().map(|game| game.get_winning_nn())
		.collect();

		// Reset the neural networks we are using to just use the winners.
		nn = winners;
	}
	//---- Complete!
	println!("The winner is {0} total time was {1}", nn[0].nn.get_id(), sec_from_time(competition_started));

	println!("The winner is {0} total time was {1}", nn[0].nn.get_id(), sec_from_time(competition_started));

	let s = format!("winner_of_{0}_competition_{1}", NUMBER_OF_ROUNDS, nn[0].nn.get_id());

	nn[0].nn.save_nn_to_file(s);
}<filename>src/base/util.rs<gh_stars>100-1000
use pulldown_cmark::Parser;
use pulldown_cmark::html;
use crypto::md5;
use crypto::digest::Digest;
use std::collections::HashSet;
use ammonia::Ammonia;
use rustc_serialize::json::{Object, Json, Array, ToJson};
use base::constant;
use regex::Regex;

pub fn render_html(text: &str) -> String {
    let mut s = String::with_capacity(text.len() * 3 / 2);
    let p = Parser::new(&text);
    html::push_html(&mut s, p);
    let mut cleaner = Ammonia::default();
    let mut code_attributes = HashSet::new();
    code_attributes.insert("class");
    cleaner.tag_attributes.insert("code", code_attributes);
    cleaner.clean(&*s).to_owned()
}

pub fn gen_gravatar_url(email: &str) -> String {
    let mut sh = md5::Md5::new();
    sh.input_str(&email.trim().to_lowercase());
    "https://cdn.v2ex.com/gravatar/".to_owned() + &sh.result_str()
}

pub fn gen_categories_json(raw_active_value: Option<i8>) -> Json {
    let mut categories = Array::new();

    for value in constant::CATEGORY::ALL.iter() {
        let mut object = Object::new();
        object.insert("value".to_owned(), value.to_json());
        object.insert("title".to_owned(),
                      constant::CATEGORY::TITLES.get(&value)
                      .unwrap().to_owned().to_json());
        if let Some(active_value) = raw_active_value {
            object.insert("active".to_owned(),
                          (if *value == active_value {1} else {0}).to_json());
        }
        categories.push(object.to_json());
    }

    categories.to_json()
}

pub fn safe_xml(s: &str) -> String {
    // http://www.w3.org/TR/REC-xml/#charsets

    lazy_static! {
        static ref RE: Regex = Regex::new(
            r"[^\x{0009}\x{000a}\x{000d}\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}]+")
            .unwrap();
    }

    RE.replace_all(s, "")
}
<filename>bitmanipulation/src/solution/s0260_single_number_iii.rs
#![allow(unused)]
pub struct Solution {}

impl Solution {
    // Time O(N) Space O(1)
    pub fn single_number(nums: Vec<i32>) -> Vec<i32> {
        // difference between two numbers (x and y) which were seen only once
        let mut bitmask = 0;
        for num in nums.iter() {
            bit


ings

  //ENERGIES per Rank
  std::cout << "ACT Cmd Energy: " << test.getEnergy().act_energy << " pJ" << endl;
  std::cout << "PRE Cmd Energy: " << test.getEnergy().pre_energy << " pJ" << endl;
  std::cout << "RD Cmd Energy: " << test.getEnergy().read_energy << " pJ" << endl;
  std::cout << "WR Cmd Energy: "  << test.getEnergy().write_energy << " pJ" << endl << endl;
  //Standby Energy for 1 rank
  //In total energy calculated for both ranks= test.memSpec.memArchSpec *
  //test.getEnergy().act_stdby_energy
  std::cout << "ACT Stdby Energy: "  << test.getEnergy().act_stdby_energy << " pJ" << endl;
  //total active standby energy for both ranks
  std::cout << "ACT Stdby Energy total ranks: "  << static_cast<double>(memSpec.memArchSpec.nbrOfRanks) *
    test.getEnergy().act_stdby_energy << " pJ" << endl ;
  std::cout << "PRE Stdby Energy: " << test.getEnergy().pre_stdby_energy << " pJ" << endl << endl;
  std::cout << "Total Trace Energy: " <<  test.getEnergy().total_energy << " pJ" <<  endl;
  //many other energies in test.mpm.energy

  //Powers per Rank
  std::cout << "Average Power: " << test.getPower().average_power <<  " mW" <<  endl;
  //many other powers in test.getPower()

  cout.flags(flags);
  cout.precision(precision);

  return 0;
}
/* Copyright (c) 2012 Massachusetts Institute of Technology
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

#include "util/Result.h"

#include <iostream>

#include "libutil/Log.h"
#include "libutil/Assert.h"

namespace DSENT
{
    using std::ostream;
    using std::endl;

    Result::SubResult::SubResult(const Result* sub_result_, const String& producer_, double num_results_)
        : m_result_(sub_result_), m_producer_(producer_), m_num_results_(num_results_)
    {
        // Check if the result is not a null pointer
        ASSERT((sub_result_ != NULL), "Internal error: sub_result_ is null");

        // Check if the number of results greater than 0
        ASSERT((num_results_ >= 0), "Internal error: num_results_ (" + String(num_results_) + ") is less than 0");
    }

    Result::SubResult::~SubResult()
    {}

    const Result* Result::SubResult::getResult() const
    {


{{ _('logged_in_as', username=g.user.name) }}
        {% else %}
            {{ _('not_logged_in') }}
        {% endif %}

<!DOCTYPE html>

    <title>Welcome to Holberton</title>

Hello world

<!DOCTYPE html>

    <title>Welcome to Holberton</title>

Hello world

<!DOCTYPE html>

    <title>{{ _('home_title') }}</title>

{{ _('home_header') }}

<!DOCTYPE html>

    <title>{{ _('home_title') }}</title>

{{ _('home_header') }}

        {% if g.user %}
            {{ _('logged_in_as', username=g.user.name) }}
        {% else %}
            {{ _('not_logged_in') }}
        {% endif %}

Hello {{name}}
<!DOCTYPE html>

    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/src/assets/logoAB.png" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta
      name="google-site-verification"
      content="doYXKfFOnX2JBtv2ere2pCnGIxc8oS3M3K9Jp9VskFA"
    />

    <meta
      name="description"
      content="Ashish Bhoure's portfolio showcases innovative software solutions crafted with precision and creativity."
    />
    <meta name="google-adsense-account" content="ca-pub-1210200290803283"/>
    <title>Ashish Bhoure | Portfolio</title>

<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Twitter Trends Scraper</title>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">


.起基.定磉.安门.纳畜.安葬.开生坟.立碑.谢土.斋醮.",
		"j": "入宅.动土.开仓.出货财.",
		"c": "生肖冲虎",
		"s": "煞南",
		"ch": "定",
		"zc": "正冲正冲戊寅",
		"ts": "占门炉外西北"
	},
	"d0410": {
		"y": "祭祀.祈福.开光.求嗣.斋醮.纳采.订盟.求医.治病.起基.定磉.造船.取渔.解除.安葬.启攒.谢土.入殓.",
		"j": "开市.动土.掘井.开池.",
		"c": "生肖冲兔",
		"s": "煞东",
		"ch": "执",
		"zc": "正冲正冲己卯",
		"ts": "占门炉外西北"
	},
	"d0411": {
		"y": "祭祀.沐浴.破屋.坏垣.求医.治病.解除.余事勿取.",
		"j": "嫁娶.开市.交易.入宅.安葬.",
		"c": "生肖冲龙",
		"s": "煞北",
		"ch": "破",
		"zc": "正冲正冲庚辰",
		"ts": "厨灶栖外西北"
	},
	"d0412": {
		"y": "诸事不宜.",
		"j": "诸事不宜.",
		"c": "生肖冲蛇",
		"s": "煞西",
		"ch": "危",
		"zc": "正冲正冲辛巳",
		"ts": "仓库床外西北"
	},
	"d0413": {
		"y": "祭祀.塑绘.开光.订盟.纳采.冠笄.裁衣.安机械.拆卸.修造.动土.安床.经络.开市.",
		"j": "出火.入宅.安葬.伐木.",
		"c": "生肖冲马",
		"s": "煞南",
		"ch": "成",
		"zc": "正冲正冲壬午",
		"ts": "房床碓外正北"
	},
	"d0414": {
		"y": "祭祀.余事勿取.",
		"j": "造庙.嫁娶.安床.余事勿取.",
		"c": "生肖冲羊",
		"s": "煞东",
		"ch": "收",
		"zc": "正冲正冲癸未",
		"ts": "占门厕外正北"
	},
	"d0415": {
		"y": "订盟.纳采.嫁娶.进人口.会亲友.交易.立券.动土.除服.谢土.移柩.破土.启攒.赴任.出行.开市.纳财.栽种.",
		"j": "入殓.安葬.入宅.安床.


    } else {
        None
    }
}

const HELP: &'static str = r"drill: quiz yourself from the command line.

Usage:
  drill <quiz>
  drill --results <quiz>
  drill --help

If <quiz> is not provided, it defaults to 'main' as long as the subcommand
requires no other positional argments.

take subcommand:
  --exclude <tag>    Exclude all questions with given tag.
  --flip             Flip all flashcards in the quiz.
  --in-order         Ask questions in the order they appear in the quiz file.
  -n <N>             Number of questions to ask. Defaults to 20.
  --no-save          Don't save results for this session.
  --tag <tag>        Include only questions with given tag.

results subcommand:
  <no special options>
";
<reponame>DIN-Foundation/bcs-ntnu-2021<gh_stars>0

pub async fn run(config: Config) -> Result<String, std::io::Error> {
    match config.cmd {
        CMD::Help => help(),

        // DID
        CMD::Init => init(),
        CMD::Doc => doc(),
        CMD::Connect{ didname, did } => connect(&didname, &did),
        CMD::Dids => dids(),
        CMD::Did{ didname } => did(&didname),

        // DIDComm v2
        CMD::Write{ didname, message } => write(&didname, &message),
        CMD::Read{ dcem } => read(&dcem),
        CMD::Hold{ dcem } => hold(&dcem),
        CMD::Messages => messages(),
        CMD::Message{ message_id } => message(&message_id),

        // Verifiable Credentials
        CMD::IssuePassport{ didname } => issue("Passport", &didname).await,
        CMD::IssueLawEnforcer{ didname } => issue("LawEnforcer", &didname).await,
        CMD::IssueTrafficAuthority{ didname } => issue("TrafficAuthority", &didname).await,
        CMD::IssueDriversLicense{ didname } => issue("DriversLicense", &didname).await,
        CMD::Present{ didname, dcem } => present(&didname, &dcem).await,
        CMD::Verify{ issuer_didname, subject_didname, dcem } => verify(&issuer_didname, &subject_didname, &dcem).await,
    }
}

fn help() -> Result<String, std::io::Error> {
    Ok(String::from("
    DID:
        did init
        did doc
        did connect <didname> <did>
        did dids
        did did <didname>

    DIDComm v2:
        did write  <subject didname> <message>  -->  <dcem>
        did hold   <dcem>                       -->  <dcem>
        did read   <dcem>                       -->  <plaintext message>
        did messages
        did message <message id>

    Verifiable Credentials over DIDComm v2:
        did issue   Passport         <subject didname>      -->  <dcem>
        did issue   DriversLicense   <subject didname>      -->  <dcem>
        did issue   TrafficAuthority <subject didname>      -->  <dcem>
        did issue   LawEnforcer      <subject didname>      -->  <dcem>

        did present <verifier didname>                 <dcem>  -->  <dcem>
        did verify  <issuer didname> <subject didname> <dcem>  -->  <dcem>
"))
}

//
// Commands: DID
//
fn init() -> Result<String, std::io::E


28 03 00 10 */	cmplwi r3, 0x10
/* 803C6234 003C3034  90 01 00 04 */	stw r0, 4(r1)
/* 803C6238 003C3038  94 21 FF E8 */	stwu r1, -0x18(r1)
/* 803C623C 003C303C  93 E1 00 14 */	stw r31, 0x14(r1)
/* 803C6240 003C3040  40 82 00 2C */	bne lbl_803C626C
/* 803C6244 003C3044  80 8D 0C C8 */	lwz r4, executing@sda21(r13)
/* 803C6248 003C3048  38 00 FF FF */	li r0, -1
/* 803C624C 003C304C  3C 60 01 23 */	lis r3, 0x01234568@ha
/* 803C6250 003C3050  90 04 00 0C */	stw r0, 0xc(r4)
/* 803C6254 003C3054  38 63 45 68 */	addi r3, r3, 0x01234568@l
/* 803C6258 003C3058  48 00 1F 31 */	bl __DVDStoreErrorCode
/* 803C625C 003C305C  48 00 15 15 */	bl DVDReset
/* 803C6260 003C3060  38 60 00 00 */	li r3, 0
/* 803C6264 003C3064  4B FF F7 05 */	bl cbForStateError
/* 803C6268 003C3068  48 00 00 C4 */	b lbl_803C632C
lbl_803C626C:
/* 803C626C 003C306C  54 60 07 BD */	rlwinm. r0, r3, 0, 0x1e, 0x1e
/* 803C6270 003C3070  41 82 00 2C */	beq lbl_803C629C
/* 803C6274 003C3074  80 8D 0C C8 */	lwz r4, executing@sda21(r13)
/* 803C6278 003C3078  38 00 FF FF */	li r0, -1
/* 803C627C 003C307C  3C 60 01 23 */	lis r3, 0x01234567@ha
/* 803C6280 003C3080  90 04 00 0C */	stw r0, 0xc(r4)
/* 803C6284 003C3084  38 63 45 67 */	addi r3, r3, 0x01234567@l
/* 803C6288 003C3088  48 00 1F 01 */	bl __DVDStoreErrorCode
/* 803C628C 003C308C  3C 60 80 3C */	lis r3, cbForStateError@ha
/* 803C6290 003C3090  38 63 59 68 */	addi r3, r3, cbForStateError@l
/* 803C6294 003C3094  4B FF E7 69 */	bl func_803C49FC
/* 803C6298 003C3098  48 00 00 94 */	b lbl_803C632C
lbl_803C629C:
/* 803C629C 003C309C  38 80 00 00 */	li r4, 0
/* 803C62A0 003C30A0  90 8D 0C FC */	stw r4, lbl_805DDDDC@sda21(r13)
/* 803C62A4 003C30A4  80 0D 0C E8 */	lwz r0, lbl_805DDDC8@sda21(r13)
/* 803C62A8 003C30A8  28 00 00 00 */	cmplwi r0, 0
/* 803C62AC 003C30AC  41 82 00 68 */


em}.workSpace-content .chat_card .topBox .row .inputOut .inputBginput[data-v-b75062f2]::-moz-placeholder{color:#d8d8d8}.workSpace-content .chat_card .topBox .row .inputOut .inputBginput[data-v-b75062f2]::placeholder{color:#d8d8d8}.workSpace-content .chat_card .hotFlex[data-v-b75062f2]{width:100%;display:flex;justify-content:space-between;flex-wrap:wrap;margin-top:32px;margin-bottom:28px;padding:0 50px 40px;box-sizing:border-box;height:-moz-max-content;height:max-content;max-height:830px;overflow-y:auto}.workSpace-content .chat_card .hotFlex>.item[data-v-b75062f2]{width:340px;height:267px;border-radius:20px;background:#fff;position:relative;margin-bottom:40px}.workSpace-content .chat_card .hotFlex>.item[data-v-b75062f2]:hover{box-shadow:0 6px 10px #0000001a}.workSpace-content .chat_card .hotFlex>.item:hover .btnBox[data-v-b75062f2]{display:flex!important}.workSpace-content .chat_card .hotFlex>.item:hover .infoBox>span[data-v-b75062f2]{margin-left:0}.workSpace-content .chat_card .hotFlex>.item.zero[data-v-b75062f2]{height:0}.workSpace-content .chat_card .hotFlex>.item .headImg[data-v-b75062f2]{width:80px;height:80px;border-radius:40px;margin:12px auto 16px;display:block}.workSpace-content .chat_card .hotFlex>.item .name[data-v-b75062f2]{font-size:18px;font-weight:500;line-height:normal;letter-spacing:0em;color:#3d3d3d;text-align:center;margin-bottom:9px;display:flex;align-items:center;justify-content:center}.workSpace-content .chat_card .hotFlex>.item .name>img[data-v-b75062f2]{width:18px;height:18px;margin-left:10px}.workSpace-content .chat_card .hotFlex>.item .info[data-v-b75062f2]{width:280px;font-size:14px;font-weight:400;line-height:normal;color:#3d3d3d;text-align:center;margin:0 auto 14px}.workSpace-content .chat_card .hotFlex>.item .labelBox[data-v-b75062f2]{display:flex;justify-content:center;margin:0 auto 14px}.workSpace-content .chat_card .hotFlex>.item .label[data-v-b75062f2]{width:-moz-max-content;width:max-content;height:33px;line-height:33px;border-radius:8px;background:rgba(216,216,216,.3);padding:0 12px;font-size:14px;font-weight:400;letter-spacing:0em;color:#3d3d3d;text-align:center;margin-right:19px;cursor:pointer}.workSpace-content .chat_card .hotFlex>.item .label[data-v-b75062f2]:last-child{margin-right:0}.workSpace-content .chat_card .hotFlex>.item .label[data-v-b75062f2]:hover{background-color:#e3e1ff;font-weight:700;box-shadow:0 6px 10px #0000001a}.workSpace-content .chat_card .hotFlex>.item .infoBox[data-v-b75062f2]{width:100%;display:flex;justify-content:space-between;align-items:center;margin:0 auto;font-size:12px;letter-spacing:0em;color:#3d3d3d;box-sizing:border-box;padding:0 17px}.workS


 "CCC", "CCC").offsetFunction((i, int3) -> new int3(int3.getX(), int3.getY() + i, int3.getZ())).build()
                .atElement('C', ofChain(StructureUtility.<BlockEntityDistillationTower>ofBlock(GregTechBlocks.CASING_FROST_PROOF), ofHatch(HATCH_FLUID_O, (distillationTower, world, pos, machine, handler) -> {
                    int currentY = pos.getY() - distillationTower.getBlockPos().getY();
                    if (distillationTower.HATCH_LAYERS.contains(currentY)) return false;
                    distillationTower.HATCH_LAYERS.add(currentY);
                    distillationTower.FO_HATCHES.add(handler);
                    return true;
                })))
                .at('H', GregTechBlocks.CASING_FROST_PROOF, HATCH_FLUID_I, HATCH_ENERGY)
                .offset(1, 0, 0).min(1, HATCH_ENERGY, HATCH_FLUID_O).exact(1, HATCH_FLUID_I)
                .setStructurePartCheckCallback((structureDefinition, tile, part, i, newOffset) -> {
                    tile.FO_HATCHES.clear();
                    boolean check = structureDefinition.check(tile, part, tile.getLevel(), tile.getExtendedFacing(), tile.getBlockPos().getX(), tile.getBlockPos().getY(), tile.getBlockPos().getZ(), newOffset.getX(), newOffset.getY(), newOffset.getZ(), !tile.isStructureValid());
                    if (!part.equals("bottom")){
                        if (check){
                            tile.FO_HATCHES.forEach(h -> tile.addComponent(HATCH_FLUID_O.getId(), h));
                            tile.LAYERS.add(i);
                        } else {
                            tile.HATCH_LAYERS.remove(i);
                        }
                    }
                    return check && tile.LAYERS.size() == tile.HATCH_LAYERS.size();
                }).build());
        LARGE_HEAT_EXCHANGER.setStructure(BlockEntityLargeHeatExchanger.class, b -> b.part("main")
                .of("DDD", "DOD", "DDD").of("CCC", "CPC", "CCC").of(1).of("D~D", "DID", "DDD").build()
                .at('D', GregTechBlocks.CASING_TITANIUM)
                .at('C', GregTechBlocks.CASING_TITANIUM, HATCH_FLUID_O, HATCH_FLUID_I).at('P', GregTechBlocks.CASING_PIPE_TITANIUM)
                .at('I', HATCH_FLUID_I).at('O', HATCH_FLUID_O)
                .offset(1, 3, 0).min(2, HATCH_FLUID_O, HATCH_FLUID_I).build());
        IMPLOSION_COMPRESSOR.setStructure(BlockEntityImplosionCompressor.class, b -> b.part("main")
                .of("CCC", "CCC", "CCC").of("C~C", "C-C", "CCC").of("CCC", "CCC", "CCC").build()
                .at('C', GregTechBlocks.CASING_SOLID_STEEL, HATCH_ITEM_I, HATCH_ITEM_O, HATCH_ENERGY, HATCH_MUFFLER)
                .min(1, HATCH_ITEM_I, HATCH_ITEM_O, HATCH_ENERGY).exact(1, HATCH_MUFFLER).offset(1, 1, 0).build()
        );
        LARGE_AUTOCLAVE.setStructure(BlockEntityLargeAutoclave.class, b -> b.part("main")
                .of("CCC", "CCC", "CCC


y>
        /// Task states.
        /// </summary>
        private enum TaskState
        {
            /// <summary>
            /// Idle state.
            /// </summary>
            Idle,

            /// <summary>
            /// Waiting-for-execution state.
            /// </summary>
            Enqueued,

            /// <summary>
            /// Executing state.
            /// </summary>
            Executing,

            /// <summary>
            /// Executed state.
            /// </summary>
            Executed
        }

        /// <summary>
        /// Lock.
        /// </summary>
        private object Lock { get; set; }

        /// <summary>
        /// Internal state.
        /// </summary>
        private TaskState State { get; set; }

        #endregion
    }
}


hQxCsOKlJn17EHOAQ== e=found 127 iterations",
            "pub=MCowBQYDK2VwAyEAYdHTU+z+QY9yPjN+5AL1GQueMSCy1rx3M1d806OLX30= priv=MC4CAQAwBQYDK2VwBCIEIDrZHcmldayL2KAfqJbBoNH5bUiU2V/LQZac6W/q8LKu msg=bjfcDqqNdm3usjrZHcmldayL2KAfqJbBoNH5bUiU2V/LQZac6W/q8LKu27+Lp9HyICeAqccrC8CwhFWgmJcEYA== sig=OCPtS11eq67EU+Y2ZicrzgqTovsqq5Lb5uG7Tk7mpAQbAxyb02Cm8vFIJ4cnSfMdC0PsgdhPORgf9irGdS7/AQ== e=found 128 iterations",
            "pub=MCowBQYDK2VwAyEAUyRbp4YiA0rm50jzBL33lwnOjARoaHdEXNn40NK0P/o= priv=MC4CAQAwBQYDK2VwBCIEIHyDIlRjqb+Sb6qLHx2L3Hy5suUruXKJ+tNB4gnnZBTB msg=fIMiVGOpv5JvqosfHYvcfLmy5Su5con600HiCedkFMF37opZtphHd9PZKZD8BKu8dBoCxA5QvuASqYFeAI1heg== sig=uGHxzBRY5tN2as7RjVjRQEq1iEs0wB7Vqhb4hdj40T065HA2rh6ce2atRq5pUi1cMXEmVkIszxozWcMfHUIsCQ== e=found 129 iterations",
            "pub=MCowBQYDK2VwAyEANKGfP0zeLPFc6hEt1VvkjxTJchfDMXRzU2YKz3P4zBg= priv=MC4CAQAwBQYDK2VwBCIEIAepORePNseu2WAOKT27U51DbmCfCNm/uUAOAvPUHcjv msg=ovhoXmGlzVfukw0cFSDcFjyyH3wusPP63+MHqTkXjzbHrtlgDik9u1OdQ25gnwjZv7lADgLz1B3I7wSr9+aY6Q== sig=XSeK/GK7VjgXQaEAJZMQxhLho/Vk6GrqhNzjlNGRoA3n90TESPaB7jgETupaMPc/7tW3ajHMes0brN/gowmkAg== e=found 130 iterations",
            "pub=MCowBQYDK2VwAyEAEQzJXljPO6he8KgNb3GstmtJf2KAt5rvSS/pg8s/+18= priv=MC4CAQAwBQYDK2VwBCIEIDauwah1wGBxy4j86YjZa69dfNrzpAy1tH4xFx3PszT4 msg=wGBxy4j86YjZa69dfNrzpAy1tH4xFx3PszT4w7BFTMFYjJ9js0kgcNW8txOfCHatw9dtMNKHpxwUqkLI45l+iA== sig=HnIqSJ8Kec5S9ByX4VJfpeDJpToLJ6Q4kHns/2ClxL6gG7eN6wyXueIgMIIcEKccToIsJNTcbJ+qkSyEk+0VBQ== e=found 131 iterations",
            "pub=MCowBQYDK2VwAyEALusS6fp6


l(215 27.9% 16.9%);
  --muted-foreground: hsl(217.9 10.6% 64.9%);

  --popover: hsl(224 71.4% 4.1%);
  --popover-foreground: hsl(210 20% 98%);

  --card: hsl(224 71.4% 4.1%);
  --card-foreground: hsl(210 20% 98%);

  --border: hsl(215 27.9% 16.9%);
  --input: hsl(215 27.9% 16.9%);

  --primary: hsl(263.4 70% 50.4%);
  --primary-foreground: hsl(210 20% 98%);

  --secondary: hsl(215 27.9% 16.9%);
  --secondary-foreground: hsl(210 20% 98%);

  --accent: hsl(215 27.9% 16.9%);
  --accent-foreground: hsl(210 20% 98%);

  --destructive: hsl(0deg 65.6% 50.98%);
  --destructive-foreground: hsl(0deg 0.37% 97.38%);

  --ring: hsl(263.4 70% 50.4%);
}/**
 * xterm.js: xterm, in the browser
 * Copyright (c) 2014-2016, SourceLair Private Company (www.sourcelair.com (MIT License)
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * https://github.com/chjj/term.js
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 *   The original design remains. The terminal itself
 *   has been extended to include xterm CSI codes, among
 *   other features.
 */

/*
 *  Default style for xterm.js
 */

.terminal {
    background-color: #000;
    color: #fff;
    font-family: courier-new, courier, monospace;
    font-feature-settings: "liga" 0;
    position: relative;
}

.terminal.focus,
.terminal:focus {
    outline: none;
}


"""empty message

Revision ID: 798ca1a46228
Revises: 5787fe29a248
Create Date: 2025-03-04 17:33:56.119312

"""
from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision = '798ca1a46228'
down_revision = '5787fe29a248'
branch_labels = None
depends_on = None

def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('user__report', schema=None) as batch_op:
        batch_op.alter_column('latitude',
               existing_type=sa.REAL(),
               type_=sa.Float(),
               existing_nullable=False,
               existing_server_default=sa.text("'0'::real"))
        batch_op.alter_column('longitude',
               existing_type=sa.REAL(),
               type_=sa.Float(),
               existing_nullable=False,
               existing_server_default=sa.text("'0'::real"))

    with op.batch_alter_table('users', schema=None) as batch_op:
        batch_op.drop_column('longitude')
        batch_op.drop_column('latitude')

    # ### end Alembic commands ###

def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('users', schema=None) as batch_op:
        batch_op.add_column(sa.Column('latitude', sa.DOUBLE_PRECISION(precision=53), autoincrement=False, nullable=True))
        batch_op.add_column(sa.Column('longitude', sa.DOUBLE_PRECISION(precision=53), autoincrement=False, nullable=True))

    with op.batch_alter_table('user__report', schema=None) as batch_op:
        batch_op.alter_column('longitude',
               existing_type=sa.Float(),
               type_=sa.REAL(),
               existing_nullable=False,
               existing_server_default=sa.text("'0'::real"))
        batch_op.alter_column('latitude',
               existing_type=sa.Float(),
               type_=sa.REAL(),
               existing_nullable=False,
               existing_server_default=sa.text("'0'::real"))

    # ### end Alembic commands ###


'{'
    '&quot;'
T_ENCAPSED_AND_WHITESPACE
314 'x'
T_DOLLAR_OPEN_CURLY_BRACES
374 '${'
    '$'
    '{'
    '&quot;'
T_ENCAPSED_AND_WHITESPACE
314 'x'
T_VARIABLE
309 '$x'
T_ENCAPSED_AND_WHITESPACE
314 '-&gt;$$'
T_VARIABLE
309 '$x0xx'
    '&quot;'
    '}'
    '}'
T_ENCAPSED_AND_WHITESPACE
314 'x'
    '&quot;'
    '}'
T_WHITESPACE
371 ' '
    '='
T_WHITESPACE
371 ' '
T_LNUMBER
305 '1'
    ';'
T_WHITESPACE
371 '\r\n  '
    '}'
T_WHITESPACE
371 ' \r\n'
    '}'
T_WHITESPACE
371 '\r\n\r\n'
T_CLOSE_TAG
370 '?&gt;'

'
'
    '&lt;?'
    '

'
    'final'
    ' '
    'class'
    ' '
    'A'
    '
'
    '{'
    '
  '
    'function'
    ' '
259
259 '__get'
    '('
    '$x'
    ')'
    '
  '
    '{'
    '
    '
    '$x'
    ' '
    '='
    ' '
    '&lt;&lt;&lt;EOOOOOOOOOOOOOOT
'
    '         &lt;&lt;&lt;'
    'hello'
    '
'
    'EOOOOOOOOOOOOOOt;
'
    'EOOOOOOOOOOOOOT;
'
    'EOOOOOOOOOOOOOOT'
    ';'
    '

    '
    '$'
    '$y'
    ' '
    '='
    ' '
    'array'
    ' '
    '('
    '1'
    ','
    '100000000000000'
    ','
    '999999999999999999999999999999999'
    ','
256
256 'true'
    ','
257
257 'false'
    ')'
    ';'
    '
    '
    '$'
    '{'
    '&quot;'
    '


arn', args: [\`Timer '\${label}' does not exist\`] }, '*');
					}
					timers.delete(label);
				};

				const original_assert = console.assert;
				console.assert = (condition, ...args) => {
					if (condition) {
						const stack = new Error().stack;
						parent.postMessage({ action: 'console', level: 'assert', args, stack }, '*');
					}
					original_assert(condition, ...args);
				};

				const counter = new Map();
				const original_count = console.count;
				const original_countreset = console.countReset;

				console.count = (label = 'default') => {
					counter.set(label, (counter.get(label) || 0) + 1);
					parent.postMessage({ action: 'console', level: 'system-log', args: \`\${label}: \${counter.get(label)}\` }, '*');
					original_count(label);
				};

				console.countReset = (label = 'default') => {
					if (counter.has(label)) {
						counter.set(label, 0);
					} else {
						parent.postMessage({ action: 'console', level: 'system-warn', args: \`Count for '\${label}' does not exist\` }, '*');
					}
					original_countreset(label);
				};

				const original_trace = console.trace;

				console.trace = (...args) => {
					const stack = new Error().stack;
					parent.postMessage({ action: 'console', level: 'trace', args, stack }, '*');
					original_trace(...args);
				};

				function stringify(args) {
					try {
						return JSON.stringify(args);
					} catch (error) {
						return null;
					}
				}
			})()
		<\/script>

		<!-- ES Module Shims: Import maps polyfill for modules browsers without import maps support (all except Chrome 89+) -->
		<script async src="https://unpkg.com/es-module-shims@1.5.18/dist/es-module-shims.wasm.js"><\/script>
		<script type="importmap"><!--IMPORT_MAP--><\/script>
	</head>
	<body></body>
</html>
`;let sm=1;class om{constructor(o,l){this.iframe=o,this.handlers=l,this.pending_cmds=new Map,this.handle_event=c=>this.handle_repl_message(c),window.addEventListener("message",this.handle_event,!1)}destroy(){window.removeEventListener("message",this.handle_event)}iframe_command(o,l){return new Promise((c,h)=>{const k=sm++;this.pending_cmds.set(k,{resolve:c,reject:h}),this.iframe.contentWindow.postMessage({action:o,cmd_id:k,args:l},"*")})}handle_command_message(o){let l=o.action,c=o.cmd_id,h=this.pending_cmds.get(c);if(h){if(this.pending_cmds.delete(c),l==="cmd_error"){let{message:k,stack:I}=o,S=new Error(k);S.stack=I,h.reject(S)}l==="cmd_ok"&&h.resolve(o.args)}else l!=="cmd_error"&&l!=="cmd_ok"&&console.error("command not found",c,o,[...this.pending_cmds.keys()])}handle_repl_message(o){if(o.source!==this.iframe.contentWindow)return;const{action:l,args:c}=o.data;switch(l){case"cmd_error":case"cmd_ok":return this.handle_command_message(o.data);case"fetch_progress":return this.handlers.on_fetch_progress(c.remaining);case"error":return this.handlers.on_error(o.data);case"unhandledrejection":return this.handlers.on_unhandled_rejection(o.data);case"console":return this.handlers.on_console(o.data);case"console_group":return this.handlers.on_console_group(o.data);case"console_group_collapsed":return this.handlers.on_console_group_collapsed


#include "super.h"

void
mklogdir (char *logdir)
{
  struct stat d;
  mode_t logdir_mode;

  logdir_mode = S_IRUSR | S_IWUSR | S_IXUSR | S_IWGRP | S_IXGRP |
    S_IWOTH | S_IXOTH | S_IFDIR;

  /* Make the log dir if it doesn't exist */
  if (stat (logdir, &d) == -1)
    {
      if (mkdir (logdir, logdir_mode) == -1)
	{
	  char str[BUFSIZ];

	  snprintf (str, BUFSIZ - 1, "mkdir(%s)", logdir);
	  perror (str);
	  fprintf (stderr,
		   "Directory %s needs to exist and be created by root with the permissions of 0733\n",
		   logdir);
	  exit (EXIT_FAILURE);
	}
      fprintf (stderr, "[info]: created directory %s\r\n", logdir);
    }

  /* Set perms if they're not what we require */
  if (d.st_mode != logdir_mode)
    {
      if (chmod (logdir, logdir_mode) == -1)
	{
	  char str[BUFSIZ];

	  snprintf (str, BUFSIZ - 1, "chmod(%s)", logdir);
	  perror (str);
	  fprintf (stderr,
		   "Directory %s needs to to have its permissions set to 0733.\n",
		   logdir);
	  exit (EXIT_FAILURE);
	}
      fprintf (stderr, "[info]: chmod 0733 directory %s\n", logdir);
    }
}

void validateLogdir(char *logdir)
{
	struct stat logdir_stat;

	/* check everything at once, attempt to fix if incorrect, die if it cannot be fixed */
	if (((stat(logdir, &logdir_stat)) == -1) || !(logdir_stat.st_mode & S_IFDIR))
		mklogdir(logdir);

	if ((stat(logdir, &logdir_stat)) == -1)
	{
		fprintf(stderr, "Fatal error - logdir %s invalid: %s\n", logdir,
				strerror(errno));
		exit(EXIT_FAILURE);
	}

	if (!(logdir_stat.st_mode & S_IFDIR))
	{
		fprintf(stderr, "logdir '%s' is not a directory.\n", logdir);
		exit(EXIT_FAILURE);
	}

}


}
  };

  // Add local constructors
  for (const stmt of statements) {
    if (stmt.kind === NK.TypeDecl) {
      if (stmt.def.kind === NK.RecordType) {
        locallyBound.add(stmt.name.nid);
      } else if (stmt.def.kind === NK.ChoiceType) {
        addConstructors(stmt.def);
      }
    } else if (stmt.kind === NK.Binding) {
      // TODO: Recurse into pattern
      locallyBound.add(stmt.pattern.nid);
    } else if (stmt.kind === NK.FnDecl) {
      locallyBound.add(stmt.name.nid);
    }
  }

  for (const stmt of statements) {
    if (stmt.kind === NK.Binding) {
      subOrefs.push(findInValueExpr(stmt.expr, outerRefsMap));
    } else if (stmt.kind === NK.FnDecl) {
      subOrefs.push(findInFnDef(stmt.def, outerRefsMap));
    } else if (isValueExprNode(stmt)) {
      subOrefs.push(findInValueExpr(stmt, outerRefsMap));
    } else if (stmt.kind === NK.Return) {
      subOrefs.push(findInValueExpr(stmt.expr, outerRefsMap));
    }
  };

  return subOrefs.flat().filter(ref => !locallyBound.has(ref));
}

// Returns the free (not bound) value-ref ids that appear within.
export function findInProgram(program: ProgramNode, outerRefsMap: OuterRefsMap): ReadonlySet<UID> {
  return new Set(findInStatements(program.stmts, outerRefsMap));
}
export class actionButton {
  format?: buttonFormat;
  type?: buttonType;
  disabled?: boolean;
  onClick?($event?: any): void;

  constructor(object: actionButton) {
    this.disabled = object.disabled || false;
    this.onClick = object.onClick;
    this.format = object.format || buttonFormat.primary;
    this.type = object.type || buttonType.button;
  }
}

export enum buttonFormat {
  primary = 'primary',
  secondary = 'secondary',
  tertiory = 'tertiory',
  link = 'link',
}

export enum buttonType {
  submit = 'submit',
  reset = 'reset',
  button = 'button',
}
import glob from "globby"

// Regex created with: https://spec.graphql.org/draft/#sec-Names
// First char only letter, underscore; rest letter, underscore, digit
const extractModelRegex = /\{([a-zA-Z_][\w]*)\./

// Given a absolutePath that has a collection marker it will extract the Model.
// /foo/bar/{Model.bar} => Model
export function extractModel(absolutePath: string): string {
  const model = extractModelRegex.exec(absolutePath)

  // This shouldn't happen - but TS requires us to validate
  // Don't throw an error here as otherwise it would be captured in the onPreInit hook and not by isValidCollectionPathImplementation()
  if (!model) {
    return ``
  }

  return model[1]
}

// Remove the file extension from the end of a path
export function removeFileExtension(absolutePath: string): string {
  return absolutePath.replace(/\.[a-z]+$/, ``)
}

// Remove trailing slash
export function stripTrailingSlash(str: string): string {
  return str.endsWith(`/`) ? str.slice(0, -1) : str
}

const curlyBracesContentsRegex = /\{.*?\}/g

// This extracts all information in an absolute path to an array of each collection part
// /foo/{Model.bar}/{Model.baz} => ['Model.bar', 'Model.baz']
export function extractAllCollectionSegments(
  absolutePath: string
): Array<string> {
  const slugParts = absolutePath.match(curlyBracesContentsRegex)

  // This shouldn't happen - but TS requires us to validate
  if (!


codecSelferValueTypeMap1234   = 9
	// ----- containerStateValues ----
	codecSelfer_containerMapKey1234    = 2
	codecSelfer_containerMapValue1234  = 3
	codecSelfer_containerMapEnd1234    = 4
	codecSelfer_containerArrayElem1234 = 6
	codecSelfer_containerArrayEnd1234  = 7
)

var (
	codecSelferBitsize1234                         = uint8(reflect.TypeOf(uint(0)).Bits())
	codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
)

type codecSelfer1234 struct{}

func init() {
	if codec1978.GenVersion != 5 {
		_, file, _, _ := runtime.Caller(0)
		err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
			5, codec1978.GenVersion, file)
		panic(err)
	}
	if false { // reference the types, but skip this branch at build/run time
		var v0 pkg2_api.ObjectMeta
		var v1 pkg4_resource.Quantity
		var v2 pkg1_unversioned.TypeMeta
		var v3 pkg3_types.UID
		var v4 pkg6_intstr.IntOrString
		var v5 pkg5_inf.Dec
		var v6 time.Time
		_, _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5, v6
	}
}

func (x *ScaleSpec) CodecEncodeSelf(e *codec1978.Encoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperEncoder(e)
	_, _, _ = h, z, r
	if x == nil {
		r.EncodeNil()
	} else {
		yym1 := z.EncBinary()
		_ = yym1
		if false {
		} else if z.HasExtensions() && z.EncExt(x) {
		} else {
			yysep2 := !z.EncBinary()
			yy2arr2 := z.EncBasicHandle().StructToArray
			var yyq2 [1]bool
			_, _, _ = yysep2, yyq2, yy2arr2
			const yyr2 bool = false
			yyq2[0] = x.Replicas != 0
			var yynn2 int
			if yyr2 || yy2arr2 {
				r.EncodeArrayStart(1)
			} else {
				yynn2 = 0
				for _, b := range yyq2 {
					if b {
						yynn2++
					}
				}
				r.EncodeMapStart(yynn2)
				yynn2 = 0
			}
			if yyr2 || yy2arr2 {
				z.EncSendContainerState(codecSelfer_containerArrayElem1234)
				if yyq2[0] {
					yym4 := z.EncBinary()
					_ = yym4
					if false {
					} else {
						r.EncodeInt(int64(x.Replicas))
					}
				} else {
					r.EncodeInt(0)
				}
			} else {
				if yyq2[0] {
					z.EncSendContainerState(codecSelfer_containerMapKey1234)
					r.EncodeString(codecSelferC_UTF81234, string("replicas"))
					z.EncSendContainerState(codecSelfer_containerMapValue1234)
					yym5 := z.EncBinary()
					_ = yym5
					if false {
					} else {
						r.EncodeInt(int64(x.Replicas))
					}
				}
			}
			if yyr2 || yy2arr2 {
				z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
			} else {
				z.EncSendContainerState(codecSelfer_containerMapEnd1234)
			}
		}
	}
}

func (x *ScaleSpec) CodecDecodeSelf(d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	yym6 := z.DecBinary()
	_ = yym6
	if false {
	} else if z.HasExtensions() && z.DecExt(x)


@debug-pane-toolbar-bottom-divider-height: 18px;

@debugger-icon-play: "@{icon-path}/play.png";
@debugger-icon-play-width: 21px;
@debugger-icon-play-height: 57px;
@debugger-icon-pause: "@{icon-path}/pause.png";
@debugger-icon-pause-width: 21px;
@debugger-icon-pause-height: 57px;
@debugger-icon-step: "@{icon-path}/step.png";
@debugger-icon-step-width: 21px;
@debugger-icon-step-height: 57px;
@debugger-icon-stepinto: "@{icon-path}/stepinto.png";
@debugger-icon-stepinto-width: 21px;
@debugger-icon-stepinto-height: 57px;
@debugger-icon-stepback: "@{icon-path}/stepback.png";
@debugger-icon-stepback-width: 21px;
@debugger-icon-stepback-height: 57px;
@debugger-icon-exception_break: "@{icon-path}/exception_break.png";
@debugger-icon-exception_break-width: 21px;
@debugger-icon-exception_break-height: 57px;
@debugger-icon-scripts: "@{icon-path}/scripts.png";
@debugger-icon-scripts-width: 21px;
@debugger-icon-scripts-height: 57px;
@debugger-icon-toggle_breakpoints1: "@{icon-path}/toggle_breakpoints1.png";
@debugger-icon-toggle_breakpoints1-width: 21px;
@debugger-icon-toggle_breakpoints1-height: 76px;
@debugger-icon-toggle_breakpoints2: "@{icon-path}/toggle_breakpoints2.png";
@debugger-icon-toggle_breakpoints2-width: 21px;
@debugger-icon-toggle_breakpoints2-height: 76px;
@debugger-icon-remove_breakpoints: "@{icon-path}/remove_breakpoints.png";
@debugger-icon-remove_breakpoints-width: 21px;
@debugger-icon-remove_breakpoints-height: 76px;
@debugger-icon-generic-variable: "@{icon-path}/debugger/genericvariable_obj.gif";
@debugger-icon-generic-variable-width: 16px;
@debugger-icon-generic-variable-height: 16px;

// Upload
@upload-win-flat: false;
@upload-win-width: 354px;
@upload-win-target-margin: 0;
@upload-win-target-font-size: 11px;
@upload-win-target-color: lighten(#838383, @lighten-chrome);
@upload-win-buttons-height: 60px;
@upload-win-buttons-margin: 0;

@upload-frame-box-shadow: 0 -1px 0 rgba(0,0,0,0.3), 0 -1px 8px rgba(0,0,0,0.4);
@upload-frame-border-top: 0;
@upload-frame-item-color: #e1e1e1;

// Mount
@mount-container-padding: 8px 0px 2px 0px;
@mount-loading-background: rgba(0,0,0,0.5);
@mount-loading-color: #f1f1f1;

// Installer
@installer-font-smoothing: true;
@installer-background: transparent;
@installer-border-top: 0;
@installer-box-shadow: none;
@installer-color: #333;
@installer-text-shadow: none;
@installer-font-family: Arial;

@installer-log-color: #333;
@installer-log-gradient: linear-gradient(to bottom, #DFEFF9 0%, #DFEFF9 100%);
@installer-log-border: 1px solid white;
@installer-log-border-color: rgba(255,255,255,0.06) rgba(0,0


	'',	'拍完这个动作，马上就结束了？哈，那就来个完美的收尾特写吧!',	'1',	'',	'1',	'1',	''},
{'30050409',	'Acheron_skin106_09',	'cv/cv_skin/Acheron_skin106.acb',	'Acheron_skin106_09',	'3005004',	'300504',	'',	'',	'接触6（别样启程）',	'',	'喂，看呆了？切~不过是换套衣服，你就变成这样了啊。',	'',	'喂，看呆了？切~不过是换套衣服，你就变成这样了啊。',	'1',	'',	'1',	'1',	''},
{'30050410',	'Acheron_skin106_10',	'cv/cv_skin/Acheron_skin106.acb',	'Acheron_skin106_10',	'3005004',	'300504',	'',	'',	'接触7（别样启程）',	'',	'把束带拆下来的样子也要拍摄？……事后可要给我加工资！',	'',	'把束带拆下来的样子也要拍摄？……事后可要给我加工资！',	'1',	'',	'1',	'1',	''},
{'30050411',	'Acheron_skin106_11',	'cv/cv_skin/Acheron_skin106.acb',	'Acheron_skin106_11',	'3005004',	'300504',	'',	'',	'接触8（别样启程）',	'',	'据说这是什么最新时尚设计，感觉也没什么特别嘛。',	'',	'据说这是什么最新时尚设计，感觉也没什么特别嘛。',	'1',	'',	'1',	'1',	''},
{'30050412',	'Acheron_skin106_12',	'cv/cv_skin/Acheron_skin106.acb',	'Acheron_skin106_12',	'3005004',	'300504',	'',	'',	'接触9（别样启程）',	'',	'没有束带的话，这衣服会不会松开……咳，我什么都没说，你什么都没听到！',	'',	'没有束带的话，这衣服会不会松开……咳，我什么都没说，你什么都没听到！',	'1',	'',	'1',	'1',	''},
{'30050413',	'Acheron_skin106_13',	'cv/cv_skin/Acheron_skin106.acb',	'Acheron_skin106_13',	'3005004',	'300504',	'',	'',	'战斗不能（别样启程）',	'',	'怎么会……变成这样……',	'',	'怎么会……变成这样……',	'1',	'',	'1',	'1',	''},
{'30050414',	'Acheron_skin106_14',	'cv/cv_skin/Acheron_skin106.acb',	'Acheron_skin106_14',	'3005004',	'300504',	'8',	'',	'胜利（别样启程）',	'',	'小看我，可是要付出代�


        .map((e) => e.key)
        .fold(0, (int len, String key) => max(len, key.length));
    _printGroupHeader('Request/Response', keyLen);
    var totalCount = 0;
    var totalErrorCount = 0;
    var totalUnexpectedResultCount = 0;
    for (var entry in sortedEntries) {
      var m = entry.value;
      if (!m.notification) {
        m.printSummary(keyLen);
        totalCount += m.count;
        totalErrorCount += m.errorCount;
        totalUnexpectedResultCount += m.unexpectedResultCount;
      }
    }
    _printTotals(
      keyLen,
      totalCount,
      totalErrorCount,
      totalUnexpectedResultCount,
    );
    print('');
    _printGroupHeader('Notifications', keyLen);
    for (var entry in sortedEntries) {
      var m = entry.value;
      if (m.notification) {
        m.printSummary(keyLen);
      }
    }

    // TODO(danrubel): print warnings if driver caches are not empty.
    print('''

(1) uxr = UneXpected Results or responses received from the server
          that do not match the recorded response for that request.
(2) all times in milliseconds''');
  }

  /// Record the elapsed time for the given operation.
  void record(
    String tag,
    Duration elapsed, {
    bool notification = false,
    bool success = true,
  }) {
    var measurement = measurements[tag];
    if (measurement == null) {
      measurement = Measurement(tag, notification);
      measurements[tag] = measurement;
    }
    measurement.record(success, elapsed);
  }

  void recordUnexpectedResults(String tag) {
    measurements[tag]!.recordUnexpectedResults();
  }

  static void _printGroupHeader(String groupName, int keyLength) {
    var buffer = StringBuffer();
    buffer.writePadRight(groupName, keyLength);
    buffer.writePadLeft('count', 6);
    buffer.writePadLeft('error', 6);
    buffer.writePadLeft('uxr(1)', 6);
    buffer.write('  ');
    buffer.writePadRight('mean(2)', 15);
    buffer.writePadRight('90th', 15);
    buffer.writePadRight('99th', 15);
    buffer.writePadRight('std-dev', 15);
    buffer.writePadRight('minimum', 15);
    buffer.writePadRight('maximum', 15);
    buffer.writePadRight('total', 15);
    print(buffer.toString());
  }

  static void _printTotals(
    int keyLength,
    int totalCount,
    int totalErrorCount,
    int totalUnexpectedResultCount,
  ) {
    var buffer = StringBuffer();
    buffer.writePadRight('Totals', keyLength);
    buffer.writePadLeft(totalCount.toString(), 6);
    buffer.writePadLeft(totalErrorCount.toString(), 6);
    buffer.writePadLeft(totalUnexpectedResultCount.toString(), 6);
    print(buffer.toString());
  }
}

extension on StringBuffer {
  void writeDuration(Duration duration) {
    writePadLeft(duration.inMilliseconds.toString(), 15);
  }

  void writePadLeft(String text, int keyLength) {
    write(text.padLeft(keyLength));
    write(' ');
  }

  void writePadRight(String text, int keyLength) {
    write(text.padRight(keyLength));
    write(' ');
  }
}
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:analyzer_plugin/protocol/protocol_common.dart';
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';

import '../support/integration_tests.dart';

void main() {
  defineReflectiveSuite(() {
    defineReflectiveTests(GetFixesTest);
  });
}

@reflect


     "param_match": param_match,         # matches get_info()?
                    "param_mismatch": mismatch,
                    "param_diff_summary": mismatch.get("summary", [])   # <-- add this
                })
                seen_keys.add((iface_name, api))

    # tools_info entries not in YAML
    extra_apis_in_tools_info = sorted(
        [{"interface": i, "api_name": a} for (i, a) in tools_all_keys if (i, a) not in seen_keys],
        key=lambda x: (x["interface"], x["api_name"])
    )

    report = {
        "base_folder": base_dir,
        "timestamp": datetime.utcnow().isoformat() + "Z",
        "interfaces": sorted(list(set(list(yaml_map.keys()) + [os.path.basename(p) for p in interface_dirs]))),
        "ignored_files": sorted(list(IGNORED_FILES)),
        "yaml_path": yaml_path,
        "tools_info_path": tools_info_path,
        "summary": {
            "interfaces": per_interface_counts,
            "overall": overall_summary
        },
        "duplicates": duplicates,
        "interface_file_yaml_comparison": interface_comparisons,
        "extra_apis_in_tools_info": extra_apis_in_tools_info,
        "apis": api_records
    }

    # Write the report OUTSIDE the base folder (next to it)
    out_path = os.path.join(os.path.dirname(base_dir), "sanity_report.json")
    with open(out_path, "w", encoding="utf-8") as f:
        json.dump(report, f, indent=2, ensure_ascii=False)

    # ------- Console output -------
    print("\n=== Per-Interface Summary (from YAML) ===")
    for iface in sorted(per_interface_counts.keys()):
        s = per_interface_counts[iface]
        print(f"- {iface}: total={s['total_apis']} | "
              f"GET {s['get']['count']} ({s['get']['percent']}%), "
              f"SET {s['set']['count']} ({s['set']['percent']}%)")

    if duplicates:
        print("\n=== Duplicate API Names Across Interfaces (YAML) ===")
        for d in duplicates:
            print(f"- {d['api_name']}: {', '.join(d['interfaces_involved'])}")
    else:
        print("\n=== Duplicate API Names Across Interfaces (YAML) ===\n- None")

    print("\n=== Folder vs YAML Checks ===")
    for iface in sorted(interface_comparisons.keys()):
        comp = interface_comparisons[iface]
        print(f"\n  {iface}: files={comp['files_count']} | yaml={comp['yaml_count']}")
        print("    Files not in YAML:", ", ".join(comp["missing_in_yaml"]) or "None")
        print("    YAML entries missing files:", ", ".join(comp["extra_in_yaml"]) or "None")

    print(f"\n📝 Wrote tools_info.json to: {tools_info_path}")
    print(f"📝 Wrote sanity report to: {out_path}")
    print(f"📊 Overall — total: {overall_summary['total_apis']}, "
          f"get: {overall_summary['get']['count']} ({overall_summary['get']['percent']}%), "
          f"set: {overall_summary['set']['count']} ({overall_summary['set']['percent']}%)")

    # Serve the dashboard and open in browser
    web_dir = os.path.dirname(OUTPUT_FILE)
    os.chdir(web_dir)
    handler = http.server.SimpleHTTPRequestHandler
    with socketserver.TCPServer(("", SERVER_PORT), handler) as httpd:
        url = f"http://localhost:{SERVER_PORT}/"
        print(f"[INFO] Serving at {url}")
        webbrowser.open(url)
        httpd.serve_forever()

if __name__ == "__main__":
    main()