nline float outElastic(float p) { return sinf(-13.f * TWOPI * (p + 1.f)) * powf(2.f, -10.f * p) + 1.f; }

// Modeled after the piecewise exponentially-damped sine wave:
// y = (1/2)*sinf(13pi/2*(2*x))*powf(2, 10 * ((2*x) - 1))      ; [0,0.5)
// y = (1/2)*(sinf(-13pi/2*((2x-1)+1))*powf(2,-10(2*x-1)) + 2) ; [0.5, 1]
inline float inOutElastic(float p)
{
  if (p < 0.5f)
  {
    return 0.5f * sinf(13.f * TWOPI * (2.f * p)) * powf(2.f, 10.f * ((2.f * p) - 1.f));
  }
  else
  {
    return 0.5f * (sinf(-13.f * TWOPI * ((2.f * p - 1.f) + 1.f)) * powf(2.f, -10.f * (2.f * p - 1.f)) + 2.f);
  }
}

// Overshooting cubic easing;

// Modeled after the overshooting cubic y = x^3-x*sinf(x*pi)
inline float inBack(float p) { return p * p * p - p * sinf(p * PI); }

// Modeled after overshooting cubic y = 1-((1-x)^3-(1-x)*sinf((1-x)*pi))
inline float outBack(float p)
{
  float f = (1.f - p);
  return 1.f - (f * f * f - f * sinf(f * PI));
}

// Modeled after the piecewise overshooting cubic function:
// y = (1/2)*((2x)^3-(2x)*sinf(2*x*pi))           ; [0, 0.5)
// y = (1/2)*(1-((1-x)^3-(1-x)*sinf((1-x)*pi))+1) ; [0.5, 1]
inline float inOutBack(float p)
{
  if (p < 0.5f)
  {
    float f = 2.f * p;
    return 0.5f * (f * f * f - f * sinf(f * PI));
  }
  else
  {
    float f = (1.f - (2.f * p - 1.f));
    return 0.5f * (1.f - (f * f * f - f * sinf(f * PI))) + 0.5f;
  }
}

// Exponentially-decaying bounce easing

inline float outBounce(float p)
{
  if (p < 4.f / 11.f)
  {
    return (121.f * p * p) / 16.f;
  }
  else if (p < 8.f / 11.f)
  {
    return (363.f / 40.f * p * p) - (99.f / 10.f * p) + 17.f / 5.f;
  }
  else if (p < 9.f / 10.f)
  {
    return (4356.f / 361.f * p * p) - (35442.f / 1805.f * p) + 16061.f / 1805.f;
  }
  else
  {
    return (54.f / 5.f * p * p) - (513.f / 25.f * p) + 268.f / 25.f;
  }
}

inline float inBounce(float p) { return 1.f - outBounce(1.f - p); }

inline float inOutBounce(float p)
{
  if (p < 0.5f)
  {
    return 0.5f * inBounce(p * 2.f);
  }
  else
  {
    return 0.5f * outBounce(p * 2.f - 1.f) + 0.5f;
  }
}

// our own internal and shiny

inline float inOutBezier(float p) { return p * p * (3.f - 2.f * p); }

inline float cosineFull(float p) { return 0.5f - cosf(p * TWOPI) * 0.5f; }

inline float inStep(float p) { return p > 0.5f ? 1.f : 0.f; }

inline float outStep(float p) { return p < 0.5f ? 1.f : 0.f; }

inline float blink(float p) { return (p < 0.1) ? 10.0 * p : 1.0 - (p - 0.1) / 0.9; }
inline float doubleBlink(float p) { return 0.5 - 0.5 * cosf(4 * PI * p); }

inline float blinkSin(float p)
{
  float val = (p < 0.1) ? 10.0 * p : 1.0 - (p - 0.1) / 0.9;
  if (p < 0.5)
    val *= 0.75 + 0.25 * sin((p * 80.0 - 0.5) * PI);
  return val;
}

inline float blinkCos(float p)
{
  float val = (p < 0.1) ? 10.0 * p : 1.0 - (p - 0.1) / 0.9;
  if (p < 0.5)
    val *= 0.75 + 0.25 * cosf((p * 40.0 - 0.5) * PI);
  return val;
}


2
	bl      Function_20238a0
	mov     r0, #0x1
	str     r0, [sp, #0x0]
	mov     r2, #0x2
	ldr     r0, [sp, #0x30]
	ldr     r1, [sp, #0x24]
	mov     r3, r2
	bl      Function_20238a0
	mov     r0, #0x1
	str     r0, [sp, #0x0]
	mov     r1, #0x2
	ldr     r2, [sp, #0x38]
	mov     r0, r4
	mov     r3, #0x0
	str     r1, [sp, #0x4]
	bl      Function_200b48c
	mov     r1, #0x1
	str     r1, [sp, #0x0]
	mov     r0, #0x2
	str     r0, [sp, #0x4]
	ldr     r2, [sp, #0x34]
	mov     r0, r4
	mov     r3, #0x0
	bl      Function_200b48c
	mov     r0, #0x1
	str     r0, [sp, #0x0]
	mov     r0, #0x2
	mov     r1, #0x0
	str     r0, [sp, #0x4]
	ldr     r2, [sp, #0x30]
	mov     r0, r4
	mov     r3, r1
	bl      Function_200b48c
	mov     r0, r4
	mov     r1, r5
	mov     r2, r6
	bl      Function_200c388
	ldr     r0, [sp, #0x14]
	mov     r1, #0x0
	bl      Function_201ada4_ClearTextBox
	ldr     r0, [sp, #0x14]
	mov     r1, r5
	bl      Function_223429c
	mov     r1, #0x0
	mov     r3, r0
	str     r1, [sp, #0x0]
	mov     r0, #0xff
	str     r0, [sp, #0x4]
	ldr     r0, [pc, #0x40] @ 0x2233f70, (=0xf0d00)
	mov     r2, r5
	str     r0, [sp, #0x8]
	ldr     r0, [sp, #0x14]
	str     r1, [sp, #0xc]
	bl      Function_201d78c
	ldr     r0, [sp, #0x14]
	bl      Function_201a9a4
	ldr     r0, [sp, #0x38]
	bl      Function_20237bc_FreeMsg
	ldr     r0, [sp, #0x34]
	bl      Function_20237bc_FreeMsg
	ldr     r0, [sp, #0x30]
	bl      Function_20237bc_FreeMsg
	mov     r0, r6
	bl      Function_20237bc_FreeMsg
	mov     r0, r5
	bl      Function_20237bc_FreeMsg
	mov     r0, r4
	bl      Function_200c41c
	mov     r0, r4
	bl      Function_200b3f0
	add     sp, #0x9c
	pop     {r4-r7,pc}
@ 0x2233f6e

.align 2

.word 0xf0d00 @ 0x2233f70
.thumb
Function_2233f74: @ 2233f74 :thumb
	push    {r3-r5,lr}
	mov     r5, r0
	mov     r4, #0x0
	add     r5, #0x3c
.thumb
branch_2233f7c: @ 2233f7c :thumb
	mov     r0, r5
	bl      Function_201a


Cs"|d tt|j|dS(sInternal function.i(RRIt_Misc__winfo_getint(R3tt((s
Tkinter.pyt__winfo_parseitemcscCs
t|dS(sInternal function.i(RV(R3tx((s
Tkinter.pyt__winfo_getintfscCst|jjdd|jS(sReturn the height of the virtual root window associated with this
        widget in pixels. If there is no virtual root window return the
        height of the screen.Rtvrootheight(RWR+R1Ro(R3((s
Tkinter.pytwinfo_vrootheightiscCst|jjdd|jS(sReturn the width of the virtual root window associated with this
        widget in pixel. If there is no virtual root window return the
        width of the screen.Rt
vrootwidth(RWR+R1Ro(R3((s
Tkinter.pytwinfo_vrootwidthoscCst|jjdd|jS(siReturn the x offset of the virtual root relative to the root
        window of the screen of this widget.Rtvrootx(RWR+R1Ro(R3((s
Tkinter.pytwinfo_vrootxuscCst|jjdd|jS(siReturn the y offset of the virtual root relative to the root
        window of the screen of this widget.Rtvrooty(RWR+R1Ro(R3((s
Tkinter.pytwinfo_vrootyzscCst|jjdd|jS(s Return the width of this widget.Rtwidth(RWR+R1Ro(R3((s
Tkinter.pytwinfo_widthscCst|jjdd|jS(sVReturn the x coordinate of the upper left corner of this widget
        in the parent.RR(RWR+R1Ro(R3((s
Tkinter.pytwinfo_xscCst|jjdd|jS(sVReturn the y coordinate of the upper left corner of this widget
        in the parent.Rty(RWR+R1Ro(R3((s
Tkinter.pytwinfo_yscCs|jjddS(sEEnter event loop until all pending events have been processed by Tcl.R
N(R+R1(R3((s
Tkinter.pyR
scCs|jjdddS(sEnter event loop until all idle callbacks have been called. This
        will update the display of windows but not process events caused by
        the user.R
t	idletasksN(R+R1(R3((s
Tkinter.pytupdate_idletasksscCsK|dkr.|jj|jjd|jS|jjd|j|dS(s,Set or get the list of bindtags for this widget.

        With no argument return the list of all bindtags associated with
        this widget. With a list of strings as argument the bindtags are
        set to this list. The bindtags determine in which order events are
        processed (see bind).tbindtagsN(RR+RKR1Ro(R3ttagList((s
Tkinter.pyR.s	icCst|tkr/|jj|||fn|r|j||j|}d|r\dp_d||jf}|jj|||f|S|r|jj||fS|jj|jj|SdS(sInternal function.s"%sif {"[%s %s]" == "break"} break
t+R&N(RRR+R1R@t_substitutet_subst_format_strRK(R3twhattsequenceRRtneedcleanuptfuncidR((s
Tkinter.pyt_binds	cCs|jd|jf|||S(sOBind to this widget at event SEQUENCE a call to function FUNC.

        SEQUENCE is a string of concatenated event
        patterns. An event pattern is of the form
        <MODIFIER-MODIFIER-TYPE-DETAIL> where MODIFIER is one
        of Control, Mod2, M2, Shift, Mod3, M3, Lock, Mod4, M4,
        Button1, B1, Mod5, M5 Button2, B2, Meta, M, Button3,
        B3, Alt, Button4, B4, Double, Button5, B5 Triple,
        Mod1, M1. TYPE is one of Activate, Enter, Map,
        ButtonPress, Button, Expose, Motion, ButtonRelease
        FocusIn, MouseWheel, Circulate, FocusOut, Property,
        Colormap, Gravity Reparent, Configure, KeyPress, Key,
        Unmap, Deactiv


                 hp_mask[k * num_joints + j] = 1

                        draw_gaussian(hm_hp[j], pt_int, hp_radius)
                        kps_mask[ct_int[1], ct_int[0], j * 2 : j * 2 + 2] = \
                            0.0 if ann['bbox'][2] * ann['bbox'][3] <= 8.0 else 1.0
            draw_gaussian(hm[cls_id], ct_int, radius)
            gt_det.append([ct[0] - w / 2, ct[1] - h / 2,
                           ct[0] + w / 2, ct[1] + h / 2, 1] +
                          pts[:, :2].reshape(num_joints * 2).tolist() + [cls_id])

    return inp, hm, reg_mask, ind, wh, wight_mask, reg, kps_mask, kps


 kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.json.Json
import okhttp3.Interceptor
import okhttp3.MediaType.Companion.toMediaTypeOrNull
import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
import retrofit2.Retrofit
import java.util.concurrent.TimeUnit
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object NetworkModule {
    @OptIn(ExperimentalSerializationApi::class)
    @Provides
    @Singleton
    fun providesJson(): Json =
        Json {
            isLenient = true
            prettyPrint = true
            explicitNulls = false
            ignoreUnknownKeys = true
        }

    @Provides
    @Singleton
    fun providesOkHttpClient(
        loggingInterceptor: HttpLoggingInterceptor,
        @Auth authInterceptor: Interceptor,
        timeoutInterceptor: TimeoutInterceptor
    ): OkHttpClient =
        OkHttpClient.Builder().apply {
            connectTimeout(10, TimeUnit.SECONDS)
            writeTimeout(10, TimeUnit.SECONDS)
            readTimeout(15, TimeUnit.SECONDS)
            addInterceptor(authInterceptor)
            addInterceptor(timeoutInterceptor)
            if (DEBUG) addInterceptor(loggingInterceptor)
        }.build()

    @Provides
    @Singleton
    fun providesLoggingInterceptor(): HttpLoggingInterceptor =
        HttpLoggingInterceptor().apply {
            level = HttpLoggingInterceptor.Level.BODY
        }

    @Provides
    @Singleton
    @Auth
    fun provideAuthInterceptor(interceptor: AuthInterceptor): Interceptor = interceptor

//    @Provides
//    @Singleton
//    fun provideRetryInterceptor(interceptor : TimeoutInterceptor): TimeoutInterceptor = interceptor

    @ExperimentalSerializationApi
    @Provides
    @Team6
    @Singleton
    fun providesRetrofit(
        okHttpClient: OkHttpClient,
        json: Json
    ): Retrofit =
        Retrofit.Builder()
            .baseUrl(BuildConfig.BASE_URL)
            .client(okHttpClient)
            .addConverterFactory(
                json.asConverterFactory(requireNotNull("application/json".toMediaTypeOrNull()))
            )
            .build()
}
package com.depromeet.team6.presentation.type

import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.depromeet.team6.ui.theme.defaultTeam6Colors
import com.depromeet.team6.ui.theme.defaultTeam6Typography

enum class ButtonType(
    val backGroundColor: Color,
    val backgroundAlpha: Float = 1f,
    val textColor: Color,
    val stroke: Dp,
    val strokeColor: Color?
) {
    PRIMARY(
        backGroundColor = defaultTeam6Colors.primaryMain,
        textColor = defaultTeam6Colors.black,
        stroke = 0.dp,
        strokeColor = null
    ),
    WHITE(
        backGroundColor = defaultTeam6Colors.white,
        textColor = defaultTeam6Colors.black,
        stroke = 0.dp,
        strokeColor = null
    ),
    GRAY(
        backGroundColor = defaultTeam6Colors.gray910,
        textColor = defaultTeam6Colors.white,
        stroke = 0.dp,
        strokeColor = null
    ),
    TONAL(
        backGroundColor = defaultTeam6Colors.primaryMain,
        backgroundAlpha = 0.12f,
        textColor = defaultTeam6Colors.primaryMain,
        stroke = 0.dp,
        strokeColor = null
    ),
    DISABLED(
        backGroundColor = Color(0xFF2C2C30),
        backgroundAlpha = 0.4f,
        textColor = defaultTea


e shown when a colorable tool is selected. This toolbar allows you to quickly select a color from a predefined set of colors. Click on the plus icon to select a custom color.

## Color picker overlay

![Color picker overlay](color_picker_overlay.png)

This overlay can be opened by clicking on a property tile that is colorable, for example inside the properties panel of the pen tool. Click on a color to select it. Click on the custom button to open the custom color picker.

If you want to delete a color from the palette, right click on it (or long press on touch devices) and select delete.

### Custom color picker

![Custom color picker](color_picker.png)

Here you can select any color you want. On the left you can see a color wheel. Under it you can select the brightness of the color.
Note: if you choose a darker color on the bottom, the wheel selection gets less precise.

Under the brightness slider you can see a preview of the selected color. You can also enter a hex code to select a color. It is specified as `#RRGGBB`, where `RR` is the red value, `GG` is the green value, and `BB` is the blue value in hexadecimal notation.

On the right you can see the red, green and blue values that make up the color. These values can be changed by dragging the sliders or by entering a value between 0 and 255. Pin the color to add it to the color palette.
---
title: Гарячі клавіші
---

## Keyboard

Є кілька ярликів, які можна використати в редакторі.
Деякі з них пишуть під кнопками.

### Загальні налаштування

- `Ctrl` + `N`: новий файл
- `Ctrl` + `Shift` + `N`: новий файл з шаблону
- `Ctrl` + `E`: Експорт файлу
- `Ctrl` + `P`: Друкувати файл
- `Ctrl` + `Shift` + `E`: експортувати файл як зображення
- `Ctrl` + `Alt` + `E`: Експортувати файл як svg
- `Ctrl` + `Alt` + `Shift` + `E`: Export file as pdf
- `Ctrl` + `Alt` + `P`: Відкриті пакети
- `Ctrl` + `Alt` + `S`: Відкрити налаштування
- `Ctrl` + `Alt` + `S`: Відкрити налаштування

### Проект

- `Ctrl` + `K`: Open search
- `Ctrl` + `Z`: Відмінити
- `Ctrl` + `Y`: Повторити
- `Ctrl` + `Shift` + `P`: Відкривати вікно точок
- `Ctrl` + `B`: Відкрити фонове вікно
- `Ctrl` + `S`: Зберегти
- `Alt` + `S`: Змінити шлях
- `Ctrl` + (`1` - `0`): Перемкнутися на інструмент
- `Ctrl` + `+`: Збільшувати масштаб
- `Ctrl` + `-`: Збільшити

## Ручка

За замовчуванням, ручка налаштована для функції в такому випадку:

- `Пен`: налаштований як ручка.
- `Перший` (основна кнопка, якщо підтримується): Поміняйте на інструмент керування при натисканні кнопки вручну.
- `Second` (Secondary button, if supported): Change to second tool (see [configure](#configure) section below) while pressed.

## Configuring {#configure}

You can customize your controls by changing which tools your inputs map to.

**Note:** Input configurations will be ignored while certain tools are selected, such as the Lasso Select tool, the Rectangle Select tool, the Label tool, and the Area


ceCode {
    overflow: visible !important;
  }
  a.sourceLine::before {
    text-decoration: unset !important;
  }
}
pre.numberSource a.sourceLine {
  left: 0 !important;
  text-indent: -5em
}
pre.numberSource {
  margin-left: 0 !important;
}

/* Footnotes */
.footnotes {
  font-size: 90%;
}
.footnotes hr::before {
  content: "Footnotes:";
}
.footnotes hr {
  border: none;
}
.footnote-break {
  width: 1in;
}
.footnote-area {
  margin-top: 0.33em;
}
.footnote sup {
  color: var(--custom-blue);
  font-weight: 700;
}
.footnote-ref {
  text-decoration: none;
  font-weight: 700;
}

body {
  hyphens: auto;
}
code {
  hyphens: none;
}

/* two pages in a row if possible on screen */
@media screen {
  body {
    background-color: var(--background);
    margin: var(--screen-pages-spacing) auto 0 auto;
  }
  .pagedjs_pages {
    display: flex;
    max-width: calc(var(--pagedjs-width) * 2);
    flex: 0;
    flex-wrap: wrap;
    margin: 0 auto;
  }
  .pagedjs_page {
    background-color: var(--color-paper);
    box-shadow: 0 0 0 1px var(--color-mbox);
    flex-shrink: 0;
    flex-grow: 0;
    margin: auto auto var(--screen-pages-spacing) auto;
  }
}

/* when a row can hold two pages, start first page on the right */
@media screen and (min-width: 12.32in) {
  .pagedjs_page {
    margin: auto 0 var(--screen-pages-spacing) 0;
  }
  .pagedjs_first_page {
    margin-left: var(--pagedjs-width);
  }
}

/* use a fixed width body for mobiles */
@media screen and (max-width:1180px)  {
  body {
    width: calc(var(--pagedjs-width) + 2 * var(--screen-pages-spacing));
  }
}
/*!
 * Bootstrap v4.0.0 (https://getbootstrap.com)
 * Copyright 2011-2018 The Bootstrap Authors
 * Copyright 2011-2018 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */
:root {
  --blue: #007bff;
  --indigo: #6610f2;
  --purple: #6f42c1;
  --pink: #e83e8c;
  --red: #dc3545;
  --orange: #fd7e14;
  --yellow: #ffc107;
  --green: #28a745;
  --teal: #20c997;
  --cyan: #17a2b8;
  --white: #fff;
  --gray: #6c757d;
  --gray-dark: #343a40;
  --primary: #007bff;
  --secondary: #6c757d;
  --success: #28a745;
  --info: #17a2b8;
  --warning: #ffc107;
  --danger: #dc3545;
  --light: #f8f9fa;
  --dark: #343a40;
  --breakpoint-xs: 0;
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color


quat)

    def scale(self, scale: Float) -> "Pose":
        # NOTE: this is useful for gradient updates.
        return Pose(self.pos * scale, self.quat * scale)

    def __mul__(self, scale: Float) -> "Pose":
        return self.scale(scale)

    def __matmul__(self, pose: "Pose") -> "Pose":
        """Compose with other poses."""
        # TODO: Add test, in particular to lock in matmul vs mul.
        return self.compose(pose)

    @staticmethod
    def concatenate_poses(pose_list):
        return Pose(
            jnp.concatenate([pose.pos for pose in pose_list], axis=0),
            jnp.concatenate([pose.quat for pose in pose_list], axis=0),
        )

    def concat(self, poses, axis=0):
        return Pose(
            jnp.concatenate([self.pos, poses.pos], axis=axis),
            jnp.concatenate([self.quat, poses.quat], axis=axis),
        )

    @staticmethod
    def stack_poses(pose_list):
        return Pose(
            jnp.stack([pose.pos for pose in pose_list]),
            jnp.stack([pose.quat for pose in pose_list]),
        )

    def split(self, n):
        return [
            Pose(ps, qs)
            for (ps, qs) in zip(
                jnp.array_split(self.pos, n), jnp.array_split(self.quat, n)
            )
        ]

    def inv(self):
        """
        Inverse of pose.

        Note that for rotation matrix R and
        translation vector x we have
        ```
            [[ R x ]  [[ R' -R'x ]  = [[ I  0 ]
             [ 0 1 ]]  [ 0    1  ]]      0  1 ]]
        ```
        where R' is the transpose of R.
        """
        R_inv = Rot.from_quat(self.xyzw).inv()
        return Pose(-R_inv.apply(self.pos), R_inv.as_quat())

    inverse = inv

    def __str__(self):
        return f"Pose(position={repr(self.pos)}, quaternion={repr(self.xyzw)})"

    def __repr__(self):
        return self.__str__()

    @staticmethod
    def from_matrix(matrix):
        """Create an Pose from a 4x4 matrix."""
        return Pose(matrix[..., :3, 3], Rot.from_matrix(matrix[..., :3, :3]).as_quat())

    @staticmethod
    def from_xyzw(xyzw):
        """Create a pose from a quaternion. With zero translation."""
        return Pose(jnp.zeros((*xyzw.shape[:-1], 1)), xyzw)

    from_quat = from_xyzw

    @staticmethod
    def from_pos(position_vec):
        """Create a pose from a vector. With the identity rotation."""
        return Pose(
            position_vec,
            jnp.tile(jnp.array([0.0, 0.0, 0.0, 1.0]), (*position_vec.shape[:-1], 1)),
        )

    from_translation = from_pos

    @staticmethod
    def from_vec(posxyzw):
        """
        Creates a Pose from a 7-vector [p_x, p_y, p_z, q_x, q_y, q_z, q_w]
        where p is the position and q is the quaternion for the rotation.

        Args:
            posxyzw: Jax array with shape (7,)
        """
        return Pose(posxyzw[:3], posxyzw[3:])

    @staticmethod
    def from_pos_matrix(pos, matrix):
        """Create an Pose from a position and a 3x3 matrix."""
        return Pose(pos[..., :3], Rot.from_matrix(matrix[..., :3, :3]).as_quat())


--- hs.http.encodeForQuery(string) -> string
--- Function
--- Returns a copy of the provided string in which characters that are not valid within an HTTP query key or value are escaped with their %## equivalent.
---
--- Parameters:
---  * originalString - the string to make safe as a key or value for a query
---
--- Returns:
---  * the converted string
---
--- Notes:
---  * The intent of this function is to provide a valid key or a valid value for a query string, not to validate the entire query string.  For this reason, ?, =, +, and & are included in the converted characters.
local encodeForQuery


2:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x",28:"y x",29:"y x",30:"y x",31:"y x",32:"y x",33:"y x",34:"y x",35:"y x",36:"y x",37:"y x",38:"y x",39:"y x",40:"y x",41:"y x",42:"y x",43:"y x",44:"y x"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"y x",7:"y x",7.1:"y x",8:"y x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x",28:"y x",29:"y x"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0-7.1":"y x",8:"y x","8.1-8.3":"y x"},op_mini:{"5.0-8.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y x","4.4.3-4.4.4":"y x",40:"y x"},bb:{7:"n",10:"y x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",24:"y x"},and_chr:{41:"y x"},and_ff:{36:"y x"},ie_mob:{10:"n",11:"n"},and_uc:{9.9:"n"}},notes:'Prefixes are on the values, not the property names (e.g. -webkit-min-content) Firefox currently supports the "-moz-available" property rather than "-moz-fill-available".',notes_by_num:{},usage_perc_y:71.82,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"fill-available,max-content,min-content,fit-content,contain-floats",ie_id:"cssintrinsicsizing",chrome_id:"5901353784180736"},cryptography:{title:"Web Cryptography",description:"JavaScript API for performing basic cryptographic operations in web applications",spec:"http://www.w3.org/TR/WebCryptoAPI/",status:"wd",links:[{url:"http://www.slideshare.net/Channy/the-history-and-status-of-web-crypto-api",title:"The History and Status of Web Crypto API"},{url:"http://research.microsoft.com/en-us/projects/msrjscrypto/",title:"Microsoft Research JavaScript Cryptography Library"},{url:"http://bitwiseshiftleft.github.io/sjcl/",title:"Cross-browser cryptography library"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"p",9:"p",10:"p",11:"a x #1",TP:"y"},firefox:{2:"p",3:"p",3.5:"p",3.6:"p",4:"p",5:"p",6:"p",7:"p",8:"p",9:"p",10:"p",11:"p",12:"p",13:"p",14:"p",15:"p


 { skip() }
            ("L1_loop2" to final) { nop() }
          },
        ),
        PassTestData(
          global = {
            "y" type BvType(32) init "0"
            ("x" type FpType(8, 24) init "0.0f").also {
              fpParseContext.metadata.create(it.ref, "cType", CFloat(null, fpParseContext))
            }
          },
          passes =
            listOf(NormalizePass(), DeterministicPass(), FpFunctionsToExprsPass(fpParseContext)),
          input = {
            (init to final) { "fabs".invoke("x", "x") }
            (init to final) { "floor".invoke("x", "x") }
            (init to final) { "fmax".invoke("x", "x", "x") }
            (init to final) { "fmin".invoke("x", "x", "x") }
            (init to final) { "sqrt".invoke("x", "x") }
            (init to final) { "round".invoke("x", "x") }
            (init to final) { "trunc".invoke("x", "x") }
            (init to final) { "ceil".invoke("x", "x") }
            (init to final) { "isinf".invoke("y", "x") }
            (init to final) { "isfinite".invoke("y", "x") }
          },
          output = {
            (init to final) { "x".assign("(fpabs x)") }
            (init to final) { "x".assign("(fproundtoint[RTN] x)") }
            (init to final) { "x".assign("(fpmax x x)") }
            (init to final) { "x".assign("(fpmin x x)") }
            (init to final) { "x".assign("(fpsqrt x)") }
            (init to final) { "x".assign("(fproundtoint[RNA] x)") }
            (init to final) { "x".assign("(fproundtoint[RTZ] x)") }
            (init to final) { "x".assign("(fproundtoint[RTP] x)") }
            (init to final) {
              "y"
                .assign(
                  "(ite (isinfinite x) #b00000000000000000000000000000001 #b00000000000000000000000000000000)"
                )
            }
            (init to final) {
              "y"
                .assign(
                  "(ite (or (isinfinite x) (fpisnan x)) #b00000000000000000000000000000000 #b00000000000000000000000000000001)"
                )
            }
          },
        ),
        PassTestData(
          global = {
            "x" type Int() init "0"
            "y" type Int() init "0"
          },
          passes =
            listOf(NormalizePass(), DeterministicPass(), HavocPromotionAndRange(parseContext)),
          input = {
            (init to final) {
              havoc("x")
              "y".assign("x")
            }
          },
          output = { (init to final) { havoc("y") } },
        ),
        PassTestData(
          global = {
            "x" type Int() init "0"
            "y" type Int() init "0"
          },
          passes =
            listOf(NormalizePass(), DeterministicPass(), HavocPromotionAndRange(parseContext)),
          input = {
            (init to final) {
              havoc("x")
              "y".assign("x").also {
                parseContext.metadata.create(
                  ((it.labels.last() as StmtLabel).stmt as AssignStmt<*>).varDecl.ref,
                  "cType",
                  CSignedInt(null, parseContext),
                )
              }
            }
          },
          output = {
            (init to final) {
              havoc("y")
              assume("(and (>= y -2147483648)


)
            {
                // Clear clipboard & reset
                _clipboardIndexer = 0;
                _clipboardCursor = 0;
                for (int i = 0; i < _clipboardSize; i++)
                {
                    _clipboard[i] = string.Empty;
                }

                AddStaticMessageToConsole(ClipboardCleared);
            }
        }

        private void AddMessageToConsole(string msg)
        {
            _consoleText.text += msg + "\n";
        }

        //You can add Debug information to the console with this
        public static void AddStaticMessageToConsole(string msg)
        {
            Instance._consoleText.text += msg + "\n";
        }

        private void ParseInput(string input)
        {
            string[] commandSplitInput = input.Split(null);

            if (string.IsNullOrWhiteSpace(input))
            {
                AddMessageToConsole(CommandNotRecognized);
                return;
            }

            if (Commands.ContainsKey(commandSplitInput[0]) == false)
            {
                AddMessageToConsole(CommandNotRecognized);
            }
            else
            {
                Commands[commandSplitInput[0]].RunCommand(commandSplitInput);
            }

            // Force scroll
            StartCoroutine(ScrollDown());
        }
    }
}


SILE = require("core.sile")

describe("The node factory", function ()
   it("should exist", function ()
      assert.is.truthy(SILE.types.node)
   end)

   describe("hboxes", function ()
      local hbox = SILE.types.node.hbox({ width = 20, height = 30, depth = 3 })
      it("should have width", function ()
         assert.is.equal(20, hbox.width:tonumber())
      end)
      it("should have height", function ()
         assert.is.equal(30, hbox.height:tonumber())
      end)
      it("should have depth", function ()
         assert.is.equal(3, hbox.depth:tonumber())
      end)
      it("should have type", function ()
         assert.is.equal("hbox", hbox.type)
      end)
      it("should be a box (not glue)", assert.is.truthy(hbox.is_box) and assert.falsy(hbox.is_glue))
      it("should not be discardable", function ()
         assert.is.falsy(hbox.discardable)
      end)
      it("should stringify", function ()
         assert.is.equal("H<20pt>^30pt-3ptv", tostring(hbox))
      end)
   end)

   describe("vboxes", function ()
      local hbox1 = SILE.types.node.hbox({ width = 10, height = 5, depth = 2 })
      local hbox2 = SILE.types.node.hbox({ width = 11, height = 6, depth = 3 })
      local vbox = SILE.types.node.vbox({ height = 4, depth = 3, nodes = { hbox1, hbox2 } })
      it("should have nodes", function ()
         assert.is.equal(2, #vbox.nodes)
      end)
      it("should have height", function ()
         assert.is.equal(6, vbox.height:tonumber())
      end)
      it("should have depth", function ()
         assert.is.equal(3, vbox.depth:tonumber())
      end)
      it("should have type", function ()
         assert.is.equal("vbox", vbox.type)
      end)
      it("should be a box (not glue)", assert.is.truthy(vbox.is_box) and assert.falsy(vbox.is_glue))
      it("should not be discardable", function ()
         assert.is.falsy(vbox.discardable)
      end)
      it("should stringify", function ()
         assert.is.equal("VB<6pt|VB[hboxhbox]v3pt)", tostring(vbox))
      end)
   end)

   describe("nnodes", function ()
      local hbox1 = SILE.types.node.hbox({ width = 10, height = 5, depth = 3 })
      local hbox2 = SILE.types.node.hbox({ width = 20, height = 10, depth = 5 })
      local nnode = SILE.types.node.nnode({ text = "test", nodes = { hbox1, hbox2 } })
      it("should have width", function ()
         assert.is.equal(30, nnode.width:tonumber())
      end)
      it("should have depth", functio


}.swagger-ui section h3{font-family:sans-serif;color:#3b4151}.swagger-ui a.nostyle{display:inline}.swagger-ui a.nostyle,.swagger-ui a.nostyle:visited{text-decoration:inherit;color:inherit;cursor:pointer}.swagger-ui .version-pragma{height:100%;padding:5em 0}.swagger-ui .version-pragma__message{display:flex;justify-content:center;height:100%;font-size:1.2em;text-align:center;line-height:1.5em;padding:0 .6em}.swagger-ui .version-pragma__message>div{max-width:55ch;flex:1}.swagger-ui .version-pragma__message code{background-color:#dedede;padding:4px 4px 2px;white-space:pre}.swagger-ui .btn{font-size:14px;font-weight:700;padding:5px 23px;transition:all .3s;border:2px solid grey;border-radius:4px;background:transparent;box-shadow:0 1px 2px rgba(0,0,0,.1);font-family:sans-serif;color:#3b4151}.swagger-ui .btn.btn-sm{font-size:12px;padding:4px 23px}.swagger-ui .btn[disabled]{cursor:not-allowed;opacity:.3}.swagger-ui .btn:hover{box-shadow:0 0 5px rgba(0,0,0,.3)}.swagger-ui .btn.cancel{border-color:#ff6060;background-color:transparent;font-family:sans-serif;color:#ff6060}.swagger-ui .btn.authorize{line-height:1;display:inline;color:#49cc90;border-color:#49cc90;background-color:transparent}.swagger-ui .btn.authorize span{float:left;padding:4px 20px 0 0}.swagger-ui .btn.authorize svg{fill:#49cc90}.swagger-ui .btn.execute{background-color:#4990e2;color:#fff;border-color:#4990e2}.swagger-ui .btn-group{display:flex;padding:30px}.swagger-ui .btn-group .btn{flex:1}.swagger-ui .btn-group .btn:first-child{border-radius:4px 0 0 4px}.swagger-ui .btn-group .btn:last-child{border-radius:0 4px 4px 0}.swagger-ui .authorization__btn{padding:0 10px;border:none;background:none}.swagger-ui .authorization__btn.locked{opacity:1}.swagger-ui .authorization__btn.unlocked{opacity:.4}.swagger-ui .expand-methods,.swagger-ui .expand-operation{border:none;background:none}.swagger-ui .expand-methods svg,.swagger-ui .expand-operation svg{width:20px;height:20px}.swagger-ui .expand-methods{padding:0 10px}.swagger-ui .expand-methods:hover svg{fill:#404040}.swagger-ui .expand-methods svg{transition:all .3s;fill:#707070}.swagger-ui button{cursor:pointer;outline:none}.swagger-ui button.invalid{-webkit-animation:shake .4s 1;animation:shake .4s 1;border-color:#f93e3e;background:#feebeb}.swagger-ui select{font-size:14px;font-weight:700;padding:5px 40px 5px 10px;border:2px solid #41444e;border-radius:4px;background:#f7f7f7 url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+PHBhdGggZD0iTTEzLjQxOCA3Ljg1OWEuNjk1LjY5NSAwIDAxLjk3OCAwIC42OC42OCAwIDAxMCAuOTY5bC0zLjkwOCAzLjgzYS42OTcuNjk3IDAgMDEtLjk3OSAwbC0zLjkwOC0zLjgzYS42OC42OCAwIDAxMC0uOTY5LjY5NS42OTUgMCAwMS45


="col"]:before {
    border-top-color: rgba(0, 0, 0, 0.15); }
  .mod-skin-dark:not(.mod-skin-light) .row-grid > .col:after,
  .mod-skin-dark:not(.mod-skin-light) .row-grid > [class^="col-"]:after,
  .mod-skin-dark:not(.mod-skin-light) .row-grid > [class*=" col-"]:after,
  .mod-skin-dark:not(.mod-skin-light) .row-grid > [class^="col "]:after,
  .mod-skin-dark:not(.mod-skin-light) .row-grid > [class*=" col "]:after,
  .mod-skin-dark:not(.mod-skin-light) .row-grid > [class$=" col"]:after,
  .mod-skin-dark:not(.mod-skin-light) .row-grid > [class="col"]:after {
    border-left-color: rgba(0, 0, 0, 0.15); }
  .mod-skin-dark:not(.mod-skin-light) .close {
    color: #fff;
    text-shadow: 0 1px 0 #000; }
  .mod-skin-dark:not(.mod-skin-light) .state-selected {
    background: rgba(33, 150, 243, 0.15) !important;
    background: rgba(var(--theme-rgb-info), 0.15) !important; }
  .mod-skin-dark:not(.mod-skin-light) .notes {
    background: rgba(255, 194, 65, 0.15);
    background: rgba(var(--theme-rgb-warning), 0.15); }
  .mod-skin-dark:not(.mod-skin-light) pre {
    color: #ffffff; }
  .mod-skin-dark:not(.mod-skin-light) .status:before {
    border-color: rgba(0, 0, 0, 0.5); }
  .mod-skin-dark:not(.mod-skin-light) .progress {
    background-color: rgba(0, 0, 0, 0.15); }
  .mod-skin-dark:not(.mod-skin-light) hr {
    border-bottom-color: rgba(var(--theme-rgb-fusion), 0.85); }
  .mod-skin-dark:not(.mod-skin-light) code {
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff; }
  .mod-skin-dark:not(.mod-skin-light) .list-group-item {
    background: transparent; }
  .mod-skin-dark:not(.mod-skin-light) .jumbotron {
    background-color: rgba(0, 0, 0, 0.2); }
  .mod-skin-dark:not(.mod-skin-light).mod-nav-link:not(.nav-function-top):not(.nav-function-minify):not(.mod-hide-nav-icons) ul.nav-menu:not(.nav-menu-compact) > li > ul:before {
    border-left: 1px dashed rgba(255, 255, 255, 0.1); }
  .mod-skin-dark:not(.mod-skin-light) :not(.modal-alert) .modal-dialog:not(.modal-transparent) .modal-content {
    -webkit-box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.25);
            box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.25);
    background-color: #383b40;
    color: #a3acb5; }
  .mod-skin-dark:not(.mod-skin-light) .swal2-popup {
    -webkit-box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.25);
            box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.25);
    background-color: #383b40;
    color: #a3acb5; }
  .mod-skin-dark:not(.mod-skin-light) .swal2-ti


ServerDescriptor = $convert.base64Decode(
    'Cg5DbGllbnRUb1NlcnZlchImCgJWMBgBIAEoCzIULmNsaWVudF90b19zZXJ2ZXIuVjBIAFICVj'
    'BCAwoBdg==');

@$core.Deprecated('Use v0Descriptor instead')
const V0$json = {
  '1': 'V0',
  '2': [
    {'1': 'seq', '3': 1, '4': 1, '5': 4, '10': 'seq'},
    {'1': 'handshake', '3': 2, '4': 1, '5': 11, '6': '.client_to_server.Handshake', '9': 0, '10': 'handshake'},
    {'1': 'applicationdata', '3': 3, '4': 1, '5': 11, '6': '.client_to_server.ApplicationData', '9': 0, '10': 'applicationdata'},
    {'1': 'response', '3': 4, '4': 1, '5': 11, '6': '.client_to_server.Response', '9': 0, '10': 'response'},
  ],
  '8': [
    {'1': 'Kind'},
  ],
};

/// Descriptor for `V0`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List v0Descriptor = $convert.base64Decode(
    'CgJWMBIQCgNzZXEYASABKARSA3NlcRI7CgloYW5kc2hha2UYAiABKAsyGy5jbGllbnRfdG9fc2'
    'VydmVyLkhhbmRzaGFrZUgAUgloYW5kc2hha2USTQoPYXBwbGljYXRpb25kYXRhGAMgASgLMiEu'
    'Y2xpZW50X3RvX3NlcnZlci5BcHBsaWNhdGlvbkRhdGFIAFIPYXBwbGljYXRpb25kYXRhEjgKCH'
    'Jlc3BvbnNlGAQgASgLMhouY2xpZW50X3RvX3NlcnZlci5SZXNwb25zZUgAUghyZXNwb25zZUIG'
    'CgRLaW5k');

@$core.Deprecated('Use handshakeDescriptor instead')
const Handshake$json = {
  '1': 'Handshake',
  '2': [
    {'1': 'register', '3': 1, '4': 1, '5': 11, '6': '.client_to_server.Handshake.Register', '9': 0, '10': 'register'},
    {'1': 'getauthchallenge', '3': 2, '4': 1, '5': 11, '6': '.client_to_server.Handshake.GetAuthChallenge', '9': 0, '10': 'getauthchallenge'},
    {'1': 'getauthtoken', '3': 3, '4': 1, '5': 11, '6': '.client_to_server.Handshake.GetAuthToken', '9': 0, '10': 'getauthtoken'},
    {'1': 'authenticate', '3': 4, '4': 1, '5': 11, '6': '.client_to_server.Handshake.Authenticate', '9': 0, '10': 'authenticate'},
  ],
  '3': [Handshake_Register$json, Handshake_GetAuthChallenge$json, Handshake_GetAuthToken$json, Handshake_Authenticate$json],
  '8': [
    {'1': 'Handshake'},
  ],
};

@$core.Deprecated('Use handshakeDescriptor instead')
const Handshake_Register$json = {
  '1': 'Register',
  '2': [
    {'1': 'username', '3': 1, '4': 1, '5': 9, '10': 'username'


is\x20the\x20parent\x20resource\x20\
    defined\x20in\x20the\x20[Cloud\x20IAM\x20policy\n\x20hierarchy](https://\
    cloud.google.com/iam/docs/overview#policy_hierarchy).\n\x20For\x20exampl\
    e:\n\x20`\"//cloudresourcemanager.googleapis.com/projects/my_project_123\
    \"`.\n\n\x20For\x20third-party\x20assets,\x20it\x20is\x20up\x20to\x20the\
    \x20users\x20to\x20define.\n\n\x0c\n\x05\x04\x03\x02\x04\x05\x12\x03v\
    \x02\x08\n\x0c\n\x05\x04\x03\x02\x04\x01\x12\x03v\t\x0f\n\x0c\n\x05\x04\
    \x03\x02\x04\x03\x12\x03v\x12\x13\nu\n\x04\x04\x03\x02\x05\x12\x03z\x02\
    \"\x1ah\x20The\x20content\x20of\x20the\x20resource,\x20in\x20which\x20so\
    me\x20sensitive\x20fields\x20are\x20scrubbed\n\x20away\x20and\x20may\x20\
    not\x20be\x20present.\n\n\x0c\n\x05\x04\x03\x02\x05\x06\x12\x03z\x02\x18\
    \n\x0c\n\x05\x04\x03\x02\x05\x01\x12\x03z\x19\x1d\n\x0c\n\x05\x04\x03\
    \x02\x05\x03\x12\x03z\x20!b\x06proto3\
";

static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;

fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
    ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}

pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
    file_descriptor_proto_lazy.get(|| {
        parse_descriptor_proto()
    })
}
<reponame>mikelodder7/ssi
use crate::{generate_fr, key::SecretKey, BigArray, SALT};
use ff_zeroize::Field;
use pairings::{
    bls12_381::{Fr, G1},
    serdes::SerDes,
    CurveProjective,
};
use rayon::prelude::*;
use serde::{Deserialize, Serialize};
use std::convert::TryFrom;

struct_impl!(
    /// An element in the accumulator
    #[derive(Copy, Clone, Debug, Eq, PartialEq)]
    Element,
    ElementInner,
    Fr
);
display_impl!(Element);

impl Element {
    pub const BYTES: usize = 32;

    pub fn one() -> Self {
        Self(Fr::one())
    }

    pub fn to_bytes(&self) -> [u8; Self::BYTES] {
        let mut d = [0u8; Self::BYTES];
        self.0.serialize(&mut d.as_mut(), true).unwrap();
        d
    }

    pub fn hash(d: &[u8]) -> Self {
        Self(generate_fr(SALT, Some(d)))
    }

    pub fn random() -> Self {
        Self(generate_fr(SALT, None))
    }
}

struct_impl!(
    /// A coefficent for updating witnesses
    #[derive(Copy, Clone, Debug, Eq, PartialEq)]
    Coefficient,
    CoefficientInner,
    G1
);

impl Coefficient {
    pub const BYTES: usize = 48;

    pub fn to_bytes(&self) -> [u8; Self::BYTES] {
        let mut d = [0u8; Self::BYTES];
        self.0.serialize(&mut d.as_mut(), true).unwrap();
        d
    }
}

display_impl!(Coefficient);

struct_impl!(
    /// Represents a Universal Bilinear Accumulator.
    #[derive(Clone, Co


#undef TRACE_SYSTEM
#define TRACE_SYSTEM swiotlb

#if !defined(_TRACE_SWIOTLB_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_SWIOTLB_H

#include <linux/tracepoint.h>

TRACE_EVENT(swiotlb_bounced,

	TP_PROTO(struct device *dev,
		 dma_addr_t dev_addr,
		 size_t size,
		 int swiotlb_force),

	TP_ARGS(dev, dev_addr, size, swiotlb_force),

	TP_STRUCT__entry(
		__string(	dev_name,	dev_name(dev)	)
		__field(	u64,	dma_mask		)
		__field(	dma_addr_t,	dev_addr	)
		__field(	size_t,	size			)
		__field(	int,	swiotlb_force		)
	),

	TP_fast_assign(
		__assign_str(dev_name, dev_name(dev));
		__entry->dma_mask = (dev->dma_mask ? *dev->dma_mask : 0);
		__entry->dev_addr = dev_addr;
		__entry->size = size;
		__entry->swiotlb_force = swiotlb_force;
	),

	TP_printk("dev_name: %s dma_mask=%llx dev_addr=%llx "
		"size=%zu %s",
		__get_str(dev_name),
		__entry->dma_mask,
		(unsigned long long)__entry->dev_addr,
		__entry->size,
		__entry->swiotlb_force ? "swiotlb_force" : "" )
);

#endif /*  _TRACE_SWIOTLB_H */

/* This part must be outside protection */
#include <trace/define_trace.h>


rectory)
    root_path = Path(__file__).parent.parent

    print(f"Bumping version to {args.version}")
    print("-" * 40)

    # Update all version locations
    success = True
    success &= update_init_version(args.version, root_path)
    success &= update_pyproject_version(args.version, root_path)
    success &= update_changelog_date(args.version, root_path)

    if not success:
        print("\n❌ Some updates failed")
        sys.exit(1)

    print("\n✅ All version updates completed successfully")

    # Git operations
    if not args.no_commit:
        try:
            # Add files
            subprocess.run([
                "git", "add",
                "adalflow/adalflow/__init__.py",
                "adalflow/pyproject.toml",
                "adalflow/CHANGELOG.md"
            ], check=True)

            # Commit
            subprocess.run([
                "git", "commit", "-m", f"chore: bump version to {args.version}"
            ], check=True)

            print(f"✓ Committed version bump to {args.version}")

            if args.tag:
                create_git_tag(args.version)

        except subprocess.CalledProcessError as e:
            print(f"Error during git operations: {e}")
            sys.exit(1)

    print("\n🎉 Version bump complete!")

    if not args.tag:
        print(f"\nTo create a release, run:")
        print(f"  git tag v{args.version}")
        print(f"  git push origin v{args.version}")

if __name__ == "__main__":
    main()


 := 0; i < b.N; i++ {
		x = Cos(.5)
	}
	GlobalF = x
}

func BenchmarkCosh(b *testing.B) {
	x := 0.0
	for i := 0; i < b.N; i++ {
		x = Cosh(2.5)
	}
	GlobalF = x
}

func BenchmarkErf(b *testing.B) {
	x := 0.0
	for i := 0; i < b.N; i++ {
		x = Erf(.5)
	}
	GlobalF = x
}

func BenchmarkErfc(b *testing.B) {
	x := 0.0
	for i := 0; i < b.N; i++ {
		x = Erfc(.5)
	}
	GlobalF = x
}

func BenchmarkErfinv(b *testing.B) {
	x := 0.0
	for i := 0; i < b.N; i++ {
		x = Erfinv(.5)
	}
	GlobalF = x
}

func BenchmarkErfcinv(b *testing.B) {
	x := 0.0
	for i := 0; i < b.N; i++ {
		x = Erfcinv(.5)
	}
	GlobalF = x
}

func BenchmarkExp(b *testing.B) {
	x := 0.0
	for i := 0; i < b.N; i++ {
		x = Exp(.5)
	}
	GlobalF = x
}

func BenchmarkExpGo(b *testing.B) {
	x := 0.0
	for i := 0; i < b.N; i++ {
		x = ExpGo(.5)
	}
	GlobalF = x
}

func BenchmarkExpm1(b *testing.B) {
	x := 0.0
	for i := 0; i < b.N; i++ {
		x = Expm1(.5)
	}
	GlobalF = x
}

func BenchmarkExp2(b *testing.B) {
	x := 0.0
	for i := 0; i < b.N; i++ {
		x = Exp2(.5)
	}
	GlobalF = x
}

func BenchmarkExp2Go(b *testing.B) {
	x := 0.0
	for i := 0; i < b.N; i++ {
		x = Exp2Go(.5)
	}
	GlobalF = x
}

var absPos = .5

func BenchmarkAbs(b *testing.B) {
	x := 0.0
	for i := 0; i < b.N; i++ {
		x = Abs(absPos)
	}
	GlobalF = x

}

func BenchmarkDim(b *testing.B) {
	x := 0.0
	for i := 0; i < b.N; i++ {
		x = Dim(GlobalF, x)
	}
	GlobalF = x
}

func BenchmarkFloor(b *testing.B) {
	x := 0.0
	for i := 0; i < b.N; i++ {
		x = Floor(.5)
	}
	GlobalF = x
}

func BenchmarkMax(b *testing.B) {
	x := 0.0
	for i := 0; i < b.N; i++ {
		x = Max(10, 3)
	}
	GlobalF = x
}

func BenchmarkMin(b *testing.B) {
	x := 0.0
	for i := 0; i < b.N; i++ {
		x = Min(10, 3)
	}
	GlobalF = x
}

func BenchmarkMod(b *testing.B) {
	x := 0.0
	for i := 0; i < b.N; i++ {
		x = Mod(10, 3)
	}
	GlobalF = x
}

func BenchmarkFrexp(b *testing.B) {
	x := 0.0
	y := 0
	for i := 0; i < b.N; i++ {
		x, y = Frexp(8)
	}
	GlobalF = x
	GlobalI = y
}

func BenchmarkGamma(b *testing.B) {
	x := 0.0
	for i := 0;


 now || time <= 0) {
            return "+1d"
        }
        val diff = now - time
        return if (diff < MINUTE_MILLIS) {
            context.getString(
                R.string.seconds_ago,
                diff / SECOND_MILLIS
            )
        } else if (diff < 2 * MINUTE_MILLIS) {
            context.getString(R.string.min_ago, 1)
        } else if (diff < 50 * MINUTE_MILLIS) {
            context.getString(
                R.string.mins_ago,
                diff / MINUTE_MILLIS
            )
        } else if (diff < 90 * MINUTE_MILLIS) {
            context.getString(R.string.hour_ago, 1)
        } else if (diff < 24 * HOUR_MILLIS) {
            if (diff / HOUR_MILLIS == 1L) context.getString(
                R.string.hour_ago,
                1
            ) else context.getString(
                R.string.new_hours_ago,
                diff / HOUR_MILLIS
            )
        } else if (diff < 48 * HOUR_MILLIS) {
            context.getString(R.string.day_ago, 1)
        } else {
            context.getString(
                R.string.new_days_ago,
                diff / DAY_MILLIS
            )
        }
    }

    private val c = charArrayOf('K', 'M', 'B', 'T')

    @JvmStatic
    fun coolFormat(n: Double, iteration: Int): String {
        val d = n.toLong() / 100 / 10.0
        val isRound =
            d * 10 % 10 == 0.0 //true if the decimal part is equal to 0 (then it's trimmed anyway)
        return if (d < 1000) //this determines the class, i.e. 'k', 'm' etc
            (if (d > 99.9 || isRound || !isRound && d > 9.99) //this decides whether to trim the decimals
                d.toInt() * 10 / 10 else d.toString() + "" // (int) d * 10 / 10 drops the decimal
                    ).toString() + "" + c[iteration] else coolFormat(d, iteration + 1)
    }

    fun getTranslateURL(lang: String): String {
        return "https://translate.google.com/m/translate#auto|" +
                lang +
                "|"
    }

    private val currentTime: Long
        private get() = Date().time

    @JvmStatic
    fun getStatusBarHeight(context: Context): Int {
        var result = 0
        val resourceId = context.resources.getIdentifier("status_bar_height", "dimen", "android")
        if (resourceId > 0) {
            result = context.resources.getDimensionPixelSize(resourceId)
        }
        return result
    }

    @JvmStatic
    fun getActionBarHeight(context: Context): Int {
        val tv = TypedValue()
        return if (context.theme.resolveAttribute(android.R.attr.actionBarSize, tv, true)) {
            var value = TypedValue.complexToDimensionPixelSize(
                tv.data,
                context.resources.displayMetrics
            )
            if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) {
                value += toDP(6, context)
            }
            value
        } else {
            toDP(48, context)
        }
    }

    @JvmStatic
    fun getNavBarHeight(context: Context): Int {
        var result = 0
        val resourceId =
            context.resources.getIdentifier("navigation_bar_height", "dimen", "android")
        if (resourceId > 0) {
            result = context.resources.getDimensionPixelSize(resourceId)
        } else if (hasNavBar(context)) {
            toDP(48, context)
        }
        return result
    }

    @JvmStatic
    fun hasNavBar(context: Context): Boolean {
        return when (AppSettings.getInstance(context).navBarOption) {
            AppSettings.NAV_BAR_AUTOMATIC -> {
                val window: Window? = (context as? Activity)?.window
                window?.run {
                    val decorView: View = window.decorView


KEY_MRT2,
            IMyNativeRendererType.SAMPLE_TYPE_KEY_MULTI_THREAD_RENDER,
            IMyNativeRendererType.SAMPLE_TYPE_KEY_SHOCK_WAVE -> {
                val bitmap = loadRGBAImageFromRes(R.mipmap.lye)
                bitmap?.let {
                    mGLSurfaceView?.setAspectRatio(it.width, it.height)
                }
            }

            IMyNativeRendererType.SAMPLE_TYPE_KEY_STAY_COLOR -> {
                loadGrayImageFromAssetsWithIndex("gray/lye_1280x800.Gray", 0, 1280, 800)
                val b5 = loadRGBAImageFromRes(R.mipmap.lye2)
                b5?.let {
                    mGLSurfaceView?.setAspectRatio(it.width, it.height)
                }
                loadRGBAImageFromResWithIndex(R.drawable.ascii_mapping, 1)
            }

            IMyNativeRendererType.SAMPLE_TYPE_KEY_FBO_LEG -> {
                // 从assets目录加载图片
                loadRGBAImageFromAssets("texture/leg.jpg")
            }

            IMyNativeRendererType.SAMPLE_TYPE_KEY_YUV_RENDER -> {
                loadNV21ImageFromAssets("yuv/YUV_Image_840x1074.NV21", 840, 1074)
            }

            IMyNativeRendererType.SAMPLE_TYPE_KEY_BLENDING -> {
                loadRGBAImageFromResWithIndex(R.mipmap.board_texture, 0)
                loadRGBAImageFromResWithIndex(R.mipmap.floor, 1)
                loadRGBAImageFromResWithIndex(R.mipmap.window, 2)
            }

            IMyNativeRendererType.SAMPLE_TYPE_KEY_SHADER_TOY_MAIN_SEQUENCE_STAR -> {
                loadRGBAImageFromResWithIndex(R.mipmap.main_sequence_start_bg0, 0)
                loadRGBAImageFromResWithIndex(R.mipmap.main_sequence_start_bg1, 1)
            }

            IMyNativeRendererType.SAMPLE_TYPE_KEY_PARTICLE_SYSTEM2 -> {
                loadRGBAImageFromRes(R.mipmap.board_texture)
            }

            IMyNativeRendererType.SAMPLE_TYPE_KEY_SKYBOX -> {
                loadRGBAImageFromResWithIndex(R.mipmap.direction_right, 0)
                loadRGBAImageFromResWithIndex(R.mipmap.direction_left, 1)
                loadRGBAImageFromResWithIndex(R.mipmap.direction_top, 2)
                loadRGBAImageFromResWithIndex(R.mipmap.direction_bottom, 3)
                loadRGBAImageFromResWithIndex(R.mipmap.direction_back, 4)
                loadRGBAImageFromResWithIndex(R.mipmap.direction_front, 5)
            }

            IMyNativeRendererType.SAMPLE_TYPE_KEY_TRANSITIONS_1,
            IMyNativeRendererType.SAMPLE_TYPE_KEY_TRANSITIONS_2,
            IMyNativeRendererType.SAMPLE_TYPE_KEY_TRANSITIONS_3,
            IMyNativeRendererType.SAMPLE_TYPE_KEY_TRANSITIONS_4,
            IMyNativeRendererType.SAMPLE_TYPE_KEY_TRANSITIONS_5,
            IMyNativeRendererType.SAMPLE_TYPE_KEY_TRANSITIONS_6,
            IMyNativeRendererType.SAMPLE_TYPE_KEY_TRANSITIONS_7,
            IMyNativeRendererType.SAMPLE_TYPE_KEY_TRANSITIONS_8,
            IMyNativeRendererType


// });

  it('manages press interaction', async () => {
    let pressedCount = 0;
    const el = await fixture<ToggleButton>(
      html`<fmn-toggle-button>Toggle</fmn-toggle-button>`
    );

    el.onPress = () => {
      pressedCount += 1;
    };
    await elementUpdated(el);

    el.dispatchEvent(enterEvent);
    await elementUpdated(el);

    expect(pressedCount).to.equal(1);

    el.dispatchEvent(spaceEvent);
    await elementUpdated(el);

    expect(pressedCount).to.equal(1);

    el.dispatchEvent(spaceDownEvent);
    el.dispatchEvent(spaceUpEvent);
    await elementUpdated(el);

    expect(pressedCount).to.equal(2);

    el.dispatchEvent(spaceDownEvent);
    el.dispatchEvent(gUpEvent);
    await elementUpdated(el);

    expect(pressedCount).to.equal(2);

    el.dispatchEvent(spaceUpEvent);
    await elementUpdated(el);

    expect(pressedCount).to.equal(3);

    el.dispatchEvent(gDownEvent);
    el.dispatchEvent(spaceUpEvent);
    await elementUpdated(el);

    expect(pressedCount).to.equal(3);
  });

  it('manages pointer events', async () => {
    const el = await fixture<ToggleButton>(
      html`<fmn-toggle-button>Toggle</fmn-toggle-button>`
    );

    el.dispatchEvent(mainButtonUpEvent);
    await elementUpdated(el);

    expect(el.pressed).to.be.true;

    el.dispatchEvent(mainButtonUpEvent);
    await elementUpdated(el);

    expect(el.pressed).to.be.false;

    el.dispatchEvent(secondaryButtonUpEvent);
    await elementUpdated(el);

    expect(el.pressed).to.be.false;
  });
});
const config = {
    COMPANY_NAME_MIN_LENGTH: 5,
    COMPANY_NAME_MAX_LENGTH: 80,
    TRADING_NAME_MIN_LENGTH: 5,
    TRADING_NAME_MAX_LENGTH: 80,
    ZIPCODE_MAX_LENGTH: 20,
    REGISTER_NUMBER_MIN_LENGTH: 3,
    REGISTER_NUMBER_MAX_LENGTH: 30
};

const messages = {
    COMPANY_NAME_REQUIRED_MESSAGE: "The company name must be provided.",
    TRADING_NAME_REQUIRED_MESSAGE: "The trading name must be provided.",
    REGISTER_NUMBER_REQUIRED_MESSAGE: "The register number must be provided.",

    COMPANY_NAME_TYPEOF_MESSAGE: "The company name must be a valid string.",
    TRADING_NAME_TYPEOF_MESSAGE: "The trading name must be a valid string.",
    REGISTER_NUMBER_TYPEOF_MESSAGE: "The register number must be a valid string.",
    ZIPCODE_TYPEOF_MESSAGE: "The zipcode must be a valid string.",

    COMPANY_NAME_LENGTH_MESSAGE: `The company name length must be between ${config.COMPANY_NAME_MIN_LENGTH} and ${config.COMPANY_NAME_MAX_LENGTH} characters.`,
    TRADING_NAME_LENGTH_MESSAGE: `The trading name must be between ${config.TRADING_NAME_MIN_LENGTH} and ${config.TRADING_NAME_MAX_LENGTH} characters.`,
    REGISTER_NUMBER_LENGTH_MESSAGE: `The register number must be between ${config.REGISTER_NUMBER_MIN_LENGTH} and ${config.REGISTER_NUMBER_MAX_LENGTH} characters.`,
    ZIPCODE_LENGTH_MESSAGE: `The zipcode must have at the very most ${config.ZIPCODE_MAX_LENGTH} characters.`
}

export const companyConstants = {
    config,
    messages
};import { createStore } from "redux";

interface Action {
    type: string,
    data: any
}

export interface IAppState {
    alertMsg: string
}

export const appStore = createStore(reducer);

const ACT_ALERT = "ACT_ALERT";
export function generateAlertAction(msg: string): Action {
    return {type: ACT_ALERT, data: msg};
}
function alert(state:IAppState, action:Action): IAppState {
    console.log('Enter alert');
    return Object.assign({}, state, {alertMsg:


float d = m01 * m12 - m02 * m11;
        float g = m20 * m31 - m21 * m30;
        float h = m20 * m32 - m22 * m30;
        float j = m21 * m32 - m22 * m31;
        origin.x = -m10 * j + m11 * h - m12 * g;
        origin.y =  m00 * j - m01 * h + m02 * g;
        origin.z = -m30 * d + m31 * b - m32 * a;
        return origin;
    }

    /**
     * Apply a projection transformation to this matrix that projects onto the plane specified via the general plane equation
     * x*a + y*b + z*c + d = 0 as if casting a shadow from a given light position/direction light.
     *

     * If light.w is 0.0 the light is being treated as a directional light; if it is 1.0 it is a point light.
     *

     * If M is this matrix and S the shadow matrix,
     * then the new matrix will be M * S. So when transforming a
     * vector v with the new matrix by using M * S * v, the
     * shadow projection will be applied first!
     *

     * Reference: ftp.sgi.com
     *
     * @param light
     *          the light's vector
     * @param a
     *          the x factor in the plane equation
     * @param b
     *          the y factor in the plane equation
     * @param c
     *          the z factor in the plane equation
     * @param d
     *          the constant in the plane equation
     * @return this
     */
    public Matrix4x3f shadow(Vector4fc light, float a, float b, float c, float d) {
        return shadow(light.x(), light.y(), light.z(), light.w(), a, b, c, d, this);
    }

    public Matrix4x3f shadow(Vector4fc light, float a, float b, float c, float d, Matrix4x3f dest) {
        return shadow(light.x(), light.y(), light.z(), light.w(), a, b, c, d, dest);
    }

    /**
     * Apply a projection transformation to this matrix that projects onto the plane specified via the general plane equation
     * x*a + y*b + z*c + d = 0 as if casting a shadow from a given light position/direction (lightX, lightY, lightZ, lightW).
     *

     * If lightW is 0.0 the light is being treated as a directional light; if it is 1.0 it is a point light.
     *

     * If M is this matrix and S the shadow matrix,
     * then the new matrix will be M * S. So when transforming a
     * vector v with the new matrix by using M * S * v, the
     * shadow projection will be applied first!
     *

     * Reference: ftp.sgi.com
     *
     * @param lightX
     *          the x-component of the light's vector
     * @param lightY
     *          the y-component of the lig


l, index) => new(index, model))
            .HasMap<double>((model, index) => new(index, model))
            .HasMap<decimal>((model, index) => new(index, (double)model))
            .HasMap<short?>((model, index) => new(index, model!.Value))
            .HasMap<int?>((model, index) => new(index, model!.Value))
            .HasMap<long?>((model, index) => new(index, model!.Value))
            .HasMap<float?>((model, index) => new(index, model!.Value))
            .HasMap<double?>((model, index) => new(index, model!.Value))
            .HasMap<decimal?>((model, index) => new(index, (double)model!.Value));
    }

    /// <summary>
    /// Configures the rendering settings for LiveCharts.
    /// </summary>
    /// <param name="builder">The rendering settings builder.</param>
    /// <returns>The current settings.</returns>
    public LiveChartsSettings HasRenderingSettings(Action<RenderingSettings> builder)
    {
        builder(LiveCharts.RenderingSettings);

        return this;
    }
}


测试，验证MaxCompute Spark是否E2E走通，需要以下前提:

* 准备MaxCompute项目以及对应的accessId，accessKey
* 下载MaxCompute Spark客户端
* 环境变量准备
* spark-defaults.conf配置
* 下载工程模版并编译

以 spark-2.x 为例，我们可以提交一个SparkPi来验证功能是否正常，提交命令如下:

```
## /path/to/MaxCompute-Spark 请指向正确的编译出来后的application jar包

## bash环境
cd $SPARK_HOME
bin/spark-submit --master yarn-cluster --class com.aliyun.odps.spark.examples.SparkPi \
/path/to/MaxCompute-Spark/spark-2.x/target/spark-examples_2.11-1.0.0-SNAPSHOT-shaded.jar

## 在windows环境提交
cd $SPARK_HOME/bin
spark-submit.cmd --master yarn-cluster --class com.aliyun.odps.spark.examples.SparkPi
\path\to\MaxCompute-Spark\spark-2.x\target\spark-examples_2.11-1.0.0-SNAPSHOT-shaded.jar

## 当看到以下日志则表明冒烟作业成功
19/06/11 11:57:30 INFO Client:
         client token: N/A
         diagnostics: N/A
         ApplicationMaster host: 11.222.166.90
         ApplicationMaster RPC port: 38965
         queue: queue
         start time: 1560225401092
         final status: SUCCEEDED
```# ContextManager API Reference

The `ContextManager` class provides functionality for managing contexts within a session. It enables you to interact with the contexts that are synchronized to the session, including reading and writing data, and managing file operations.

## 📖 Related Tutorial

- [Data Persistence Guide](../../../docs/guides/common-features/basics/data-persistence.md) - Detailed tutorial on context management and data persistence

## Overview

The `ContextManager` is accessed through a session instance (`session.context`) and provides functionality for managing contexts within that session.

## Properties

```python
session  # The Session instance that this ContextManager belongs to
```

## Data Types

```python
class ContextStatusData:
    context_id: str     # The ID of the context
    path: str           # The path where the context is mounted
    error_message: str  # Error message if the operation failed
    status: str         # Status of the synchronization task
    start_time: int     # Start time of the task (Unix timestamp)
    finish_time: int    # Finish time of the task (Unix timestamp)
    task_type: str      # Type of the task (e.g., "upload", "download")
```

## Result Types

```python


eq!(parsed_config.name, "NFT Title");
        assert_eq!(parsed_config.symbol, "SNFT");
        assert_eq!(parsed_config.description, "Hello, NFT!");
        assert_eq!(parsed_config.external_url, "https://example.com");
        assert_eq!(
            parsed_config.creators[0].address,
            "BPr18DCdtzASf1YVbUVZ4dZ7mA6jpMYZSUP3YuiMgGeD"
        );
        assert_eq!(parsed_config.creators[0].share, 100);
        assert_eq!(parsed_config.royalty_percentage, 10);
        assert_eq!(parsed_config.collection.name, "NFT Collection");
        assert_eq!(parsed_config.collection.family, "NFT Family");
        assert_eq!(parsed_config.attributes.len(), 2);
        assert_eq!(parsed_config.attributes.get("LAYER_NAME").unwrap().len(), 1);
        assert_eq!(
            parsed_config
                .attributes
                .get("LAYER_NAME")
                .unwrap()
                .get("FILE_NAME.png")
                .unwrap(),
            &0.01f32
        );
        assert_eq!(
            parsed_config.attributes.get("LAYER_NAME_2").unwrap().len(),
            1
        );
        assert_eq!(
            parsed_config
                .attributes
                .get("LAYER_NAME_2")
                .unwrap()
                .get("FILE_NAME_2.png")
                .unwrap(),
            &0.01f32
        );
        assert_eq!(parsed_config.layer_order.len(), 2);
        assert_eq!(
            parsed_config.layer_order,
            vec!["LAYER_NAME", "LAYER_NAME_2"]
        );
        assert_eq!(parsed_config.guaranteed_attribute_rolls.len(), 1);
        assert_eq!(parsed_config.guaranteed_attribute_rolls[0].len(), 2);
        assert_eq!(
            parsed_config.guaranteed_attribute_rolls[0],
            vec!["FILE_NAME.png", "FILE_NAME_2.png"]
        );
        assert_eq!(parsed_config.amount, 10);
    }

    #[test]
    fn from_existing() {
        let dir = tempdir().unwrap();
        let dir_path = dir.path();

        let dirs_to_create = vec!["attribute 1", "attribute 2", "attribute 3"];
        for dir in &dirs_to_create {
            create_dir_all(dir_path.join(dir)).unwrap();
        }

        let files_to_create = vec!["file 1.png", "file 2.png", "file 3.png"];
        for file in files_to_create {
            for dir in &dirs_to_create {
                File::create(dir_path.join(dir).join(file)).unwrap();
            }
        }

        let command_input = Init {
            folder: "".to_string(),
            overwrite: false,
            from_existing: dir_path.to_str().map(str::to_string),
        };
        init::handle(command_input);

        let parsed_config = config::parse(dir_path.join("config.json").to_str().unwrap()).unwrap();

        assert_eq!(parsed_config.name, "NFT Title");
        assert_eq!(parsed_config.symbol, "SNFT");
        assert_eq!(parsed_config.description, "Hello, NFT!");
        assert_eq!(parsed_config.external_url, "https://example.com");
        assert_eq!(
            parsed_config.creators[0].address,


Null<T>(IReadOnlyList<T> obj)
            => Check.NoneNull(obj);

        public static void NoneNull<T1, T2>(IReadOnlyList<T1> t1, IReadOnlyList<T2> t2)
            => Check.NoneNull(t1, t2);

        public static void NoneNull<T1, T2, T3>(IReadOnlyList<T1> t1, IReadOnlyList<T2> t2, IReadOnlyList<T3> t3)
            => Check.NoneNull(t1, t2, t3);

        public static void NoneNull<T1, T2, T3, T4>(IReadOnlyList<T1> t1, IReadOnlyList<T2> t2, IReadOnlyList<T3> t3, IReadOnlyList<T4> t4)
            => Check.NoneNull(t1, t2, t3, t4);

        public static void NoneNull<T1, T2, T3, T4, T5>(IReadOnlyList<T1> t1, IReadOnlyList<T2> t2, IReadOnlyList<T3> t3, IReadOnlyList<T4> t4, IReadOnlyList<T5> t5)
            => Check.NoneNull(t1, t2, t3, t4, t5);

        public static void NoneNull<T1, T2, T3, T4, T5, T6>(IReadOnlyList<T1> t1, IReadOnlyList<T2> t2, IReadOnlyList<T3> t3, IReadOnlyList<T4> t4, IReadOnlyList<T5> t5, IReadOnlyList<T6> t6)
            => Check.NoneNull(t1, t2, t3, t4, t5, t6);

        public static void NoneNull<T1, T2, T3, T4, T5, T6, T7>(IReadOnlyList<T1> t1, IReadOnlyList<T2> t2, IReadOnlyList<T3> t3, IReadOnlyList<T4>


// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Runtime.Serialization;

namespace System.Private.Windows.BinaryFormat;

internal sealed class DeserializationOptions
{
    /// <summary>
    ///  How exactly assembly names need to match for deserialization.
    /// </summary>
    /// <remarks>
    ///  <para>
    ///   Aligned with <see href="https://learn.microsoft.com/dotnet/api/system.runtime.serialization.formatters.formatterassemblystyle">
    ///   FormatterAssemblyStyle</see> behavior.
    ///  </para>
    /// </remarks>
    public bool SimpleAssemblyMatching


translate="no">dataNode.flush.insertBufSize

queryCoord.autoHandoff

queryCoord.autoBalance

localStorage.enabled

    데이터 및 메타

common.retentionDuration

rocksmq.retentionTimeInMinutes

dataCoord.enableCompaction

dataCoord.enableGarbageCollection

dataCoord.gc.dropTolerance

    관리

log.level

log.file.rootPath

log.file.maxAge

minio.accessKeyID

minio.secretAccessKey

    할당량 및 제한

quotaAndLimits.ddl.enabled

<a href="/docs/ko/v2.4.x/configure_quotaandlimits.md#qu


tBooleanExtra("key_theme_change_sync_from_main_process", false)
            val sync = intent.getBooleanExtra("key_theme_change_sync_garb", false)
            if (type != 1) return
            cachedGarb = null
            if (garbData.isNullOrEmpty() || syncFromMainProcess) return
            val garb = garbData.runCatchingOrNull { toGarb() } ?: return
            val nightTheme = isNightTheme
            val finalGarb = if (!garb.isPure && !sync && nightTheme) {
                Garb().apply { id = 1; colorName = "black" }
            } else garb
            if (finalGarb.isPrimaryOnly) {
                val fontColor = (if (nightTheme) "#A2A7AE" else "#61666D").toIntColor(0)
                val pageColor = (if (nightTheme) "#17181A" else "#FFFFFF").toIntColor(0)
                finalGarb.fontColor = fontColor
                finalGarb.secondaryPageColor = pageColor
                finalGarb.isDarkMode = !nightTheme
            }
            GarbWatcher.onChanged(finalGarb)
            Logger.debug {
                val name = finalGarb.name.orEmpty().ifEmpty { finalGarb.colorName }
                "Themes, onGarbChanged, id: ${finalGarb.id}, name: $name"
            }
        }
    }

    @JvmStatic
    fun registerGarbChangeObserver() {
        Utils.getContext().registerReceiverCompat(
            GarbChangeReceiver(),
            IntentFilter(garbChangeAction).apply { priority = -100 }
        )
    }

    private fun String.toGarb() = toJSONObject().run {
        Garb().apply {
            id = optLong("id")
            name = optString("name")
            colorName = optString("colorName")
            isPrimaryOnly = optBoolean("primaryOnly")
            fontColor = optInt("fontColor")
            secondaryPageColor = optInt("secondaryPageColor")
            isDarkMode = optBoolean("darkMode")
            mainFontColor = optInt("fontColor")
            isMainDarkMode = optBoolean("mainDarkMode")
            // ignore other not needed fields
        }
    }

    fun currentGarb() = cachedGarb ?: synchronized(this) {
        if (!isNightTheme) {
            garbConf.takeIf { it.isFile }?.runCatchingOrNull {
                readText().toGarb()
            } ?: Garb().apply { id = 8; colorName = "white" }
        } else Garb().apply { id = 1; colorName = "black" }
    }.also { cachedGarb = it }

    fun customThemeId() = Settings.SkinJson().runCatchingOrNull {
        val json = toJSONObject()
        if (json.has("user_equip")) {
            json.getJSONObject("user_equip").optLong("id", -1L)
        } else {
            json.optLong("id", -1L)
        }
    } ?: -1L

    fun applyCustomTheme(activity: Context? = null): Boolean {
        val (userEquip, loadEquip) = Settings.SkinJson().runCatchingOrNull {
            val json = toJSONObject()
            if (json.has("user_equip")) {
                json.getJSONObject("user_equip") to json.optJSONObject("load_equip")
            } else json to null
        } ?: return false
        applyThemeInner(userEquip, loadEquip, activity)
        return true
    }

    fun applyTheme(
        id: Long,
        name: String,
        skin: JSONObject,
        skinProps: JSONObject,
        loading: JSONObject?,
        playIcon: JSONObject?,
        spaceBg: JSONObject?
    ): JSONObject {
        val theme = convertToTheme(skin, skinProps, loading)
        val userEquip = theme.getJSONObject("user_equip")
        val loadEquip = theme.opt


    {
            var ip = UniNettyExampleSupports.GetPrivateIp();
            _examples = UniNettyExampleSupports.CreateDefaultExamples(null, ip);
        }

        // GUI 그리기
        private void OnGUI()
        {
            if (GUILayout.Button("Discard Server"))
            {
                _examples[UniNettyExampleType.Discard].ToggleServer();
            }

            if (GUILayout.Button("Discard Client"))
            {
                _examples[UniNettyExampleType.Discard].ToggleClient();
            }

        }
    }
}


假设您熟悉正在执行的操作。

您可能希望为此页面添加书签以供将来参考。

![Linear Algebra Cheat Sheet for Machine Learning](img/0fdbdc2f5daee66450ef948387f7c772.jpg)

用于机器学习的线性代数备忘单
照片由 [Christoph Landers](https://www.flickr.com/photos/bewegtbildgestalter/1274219020/) 拍摄，保留一些权利。

## 概观

本教程分为 7 个部分;他们是：

1.  数组
2.  向量
3.  矩阵
4.  矩阵的类型
5.  矩阵运算
6.  矩阵分解
7.  统计

## 1.数组

有很多方法可以创建 NumPy 数组。

### 排列

```
from numpy import array
A = array([[1,2,3],[1,2,3],[1,2,3]])
```

### 空

```
from numpy import empty
A = empty([3,3])
```

### 零

```
from numpy import zeros
A = zeros([3,5])
```

### 那些

```
from numpy import ones
A = ones([5, 5])
```

## 2.向量

向量是标量的列表或列。

### 向量加法

```
c = a + b
```

### 向量减法

```
c = a - b
```

### 向量乘法

```
c = a * b
```

### 向量分部

```
c = a / b
```

### 向量点产品

```
c = a.dot(b)
```

### 向量标量乘法

```
c = a * 2.2
```

### 向量规范

```
from numpy.linalg import norm
l2 = norm(v)
```

## 3.矩阵

矩阵是标量的二维数组。

### 矩阵加法

```
C = A + B
```

### 矩阵减法

```
C = A - B
```

### 矩阵乘法（Hadamard 产品）

```
C = A * B
```

### 矩阵分部

```
C = A / B
```

### 矩阵 - 矩阵乘法（点积）

```
C = A.dot(B)
```

### 矩阵向量乘法（点积）

```
C = A.dot(b)
```

### 矩阵 - 标量乘法

```
C = A.dot(2.2)
```

## 4.矩阵的类型

不同类型的矩阵通常用作更广泛计算中的元素。

### 三角矩阵

```
# lower
from numpy import tril
lower = tril(M)
# upper
from numpy import triu
upper = triu(M)
```

### 对角矩阵

```
from numpy import diag
d = diag(M)
```

### 身份矩阵

```
from numpy import identity
I = identity(3)
```

## 5.矩阵运算

矩阵运算通常用作更广泛计算中的元素。

### 矩阵转置

```
B = A.T
```

### 矩阵反演

```
from numpy.linalg import inv
B = inv(A)
```

### 矩阵追踪

```
from numpy import trace
B = trace(A)
```


plements HasIdentifier {

  id: string;
  time: Date;
  symbol: string;
  currency: string;
  amount: number;

  constructor(data: Partial<ExchangeRate> = {}) {
    this.id = data.id;
    this.time = new Date(data.time);
    this.symbol = data.symbol;
    this.currency = data.currency;
    this.amount = Number(data.amount);
  }

}
export class Categoria {

    constructor(_id: string, id: string, description: string) {
        this._id = _id;
        this.id = id;
        this.descripcion = description;
    }
    _id: string;
    id:  string;
    descripcion: string;
}
//https://www.softwarearchitekt.at/post/2016/12/02/sticky-routes-in-angular-2-3-with-routereusestrategy.aspx
//Nice explanation of RouteReuseStrategy: http://stackoverflow.com/a/41515648/5805661

import { RouteReuseStrategy, DetachedRouteHandle, ActivatedRouteSnapshot } from "@angular/router";
import { ComponentRef } from "@angular/core";
import { ProjectComponent } from "../project/projectComponent";
import { SparqlComponent } from "../sparql/sparqlComponent";
import { DataComponent } from "../data/dataComponent";
import { Sheet2RdfComponent } from "../sheet2rdf/sheet2rdfComponent";
import { AlignmentValidationComponent } from "../alignment/alignmentValidation/alignmentValidationComponent";
import { VBContext } from "../utils/VBContext";

// This impl. bases upon one that can be found in the router's test cases.
export class CustomReuseStrategy implements RouteReuseStrategy {

    private pathWithState: string[] = ["Data", "Sparql", "AlignmentValidation", "Sheet2RDF"];

    // private projectChanged: boolean;

    /**
     * map containing key-value pair that chaches routes, where
     * key is the path of the route
     * value is the DetachedRouteHandle of the route
     */
    handlers: { [key: string]: DetachedRouteHandle } = {};

    /**
     * Determines if this route (and its subtree) should be detached to be reused later.
     * Returning true, the route is stored and then, when requested again, the same route is reattached.
     * Returning false, the route is lost/destroyed and then, when requested again, the route (and its subtree) is reinitialized.
     * @param is the route that is going to leave
     */
    shouldDetach(route: ActivatedRouteSnapshot): boolean {
        // console.debug('CustomReuseStrategy:shouldDetach ', route);
        if (this.pathWithState.indexOf(route.routeConfig.path) != -1) {
            return true;
        }
        return false;
    }

    /**
     * Stores the detached route.
     * This method is called only if shouldDetach return true.
     * Add the handle of the route to the handlers map.
     */
    store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle): void {
        // console.debug('CustomReuseStrategy:store', route, handle);
        this.handlers[route.routeConfig.path] = handle;
    }

    /**
     * Determines if this route (and its subtree) should be reattached
     * Returns true if it should reattach a route previously stored.
     */
    shouldAttach(route: ActivatedRouteSnapshot): boolean {
        // console.debug('CustomReuseStrategy:shouldAttach', route);
        // Return false (that means "don't attach the cached route") if it's going to "Data" route and project was changed in the meantime
        if (this.pathWithState.indexOf(route.routeConfig.path) != -1) {
            if (VBContext.isProjectChanged()) {
                VBContext.setProjectChanged(false); //reset projectChanged
                // destroy the previous stored DataComponent and SparqlComponent and remove them from the handlers map
                if (this.handlers["Data


8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)}
/*# sourceMappingURL=bootstrap-theme.min.css.map *//* Credit to https://gist.github.com/wataru420/2048287 */
.highlight {
  /* Comment */
  /* Error */
  /* Keyword */
  /* Operator */
  /* Comment.Multiline */
  /* Comment.Preproc */
  /* Comment.Single */
  /* Comment.Special */
  /* Generic.Deleted */
  /* Generic.Deleted.Specific */
  /* Generic.Emph */
  /* Generic.Error */
  /* Generic.Heading */
  /* Generic.Inserted */
  /* Generic.Inserted.Specific */
  /* Generic.Output */
  /* Generic.Prompt */
  /* Generic.Strong */
  /* Generic.Subheading */
  /* Generic.Traceback */
  /* Keyword.Constant */
  /* Keyword.Declaration */
  /* Keyword.Pseudo */
  /* Keyword.Reserved */
  /* Keyword.Type */
  /* Literal.Number */
  /* Literal.String */
  /* Name.Attribute */
  /* Name.Builtin */
  /* Name.Class */
  /* Name.Constant */
  /* Name.Entity */
  /* Name.Exception */
  /* Name.Function */
  /* Name.Namespace */
  /* Name.Tag */
  /* Name.Variable */
  /* Operator.Word */
  /* Text.Whitespace */
  /* Literal.Number.Float */
  /* Literal.Number.Hex */
  /* Literal.Number.Integer */
  /* Literal.Number.Oct */
  /* Literal.String.Backtick */
  /* Literal.String.Char */
  /* Literal.String.Doc */
  /* Literal.String.Double */
  /* Literal.String.Escape */
  /* Literal.String.Heredoc */
  /* Literal.String.Interpol */
  /* Literal.String.Other */
  /* Literal.String.


 Interface Status Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [flash_if_status](flash_if_status) module"]
pub type FLASH_IF_STATUS = crate::Reg<u32, _FLASH_IF_STATUS>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _FLASH_IF_STATUS;
#[doc = "`read()` method returns [flash_if_status::R](flash_if_status::R) reader structure"]
impl crate::Readable for FLASH_IF_STATUS {}
#[doc = "Flash Interface Status Register"]
pub mod flash_if_status;
#[doc = "Flash Address Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [flash_addr](flash_addr) module"]
pub type FLASH_ADDR = crate::Reg<u32, _FLASH_ADDR>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _FLASH_ADDR;
#[doc = "`read()` method returns [flash_addr::R](flash_addr::R) reader structure"]
impl crate::Readable for FLASH_ADDR {}
#[doc = "`write(|w| ..)` method takes [flash_addr::W](flash_addr::W) writer structure"]
impl crate::Writable for FLASH_ADDR {}
#[doc = "Flash Address Register"]
pub mod flash_addr;
#[doc = "Flash Read/Write Data Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [flash_data](flash_data) module"]
pub type FLASH_DATA = crate::Reg<u32, _FLASH_DATA>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _FLASH_DATA;
#[doc = "`read()` method returns [flash_data::R](flash_data::R) reader structure"]
impl crate::Readable for FLASH_DATA {}
#[doc = "`write(|w| ..)` method takes [flash_data::W](flash_data::W) writer structure"]
impl crate::Writable for FLASH_DATA {}
#[doc = "Flash Read/Write Data Register"]
pub mod flash_data;
#[doc = "Flash NVR Write Unlock Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [flash_nvr_write_unlock](flash_nvr_write_unlock) module"]
pub type FLASH_NVR_WRITE_UNLOCK = crate::Reg<u32, _FLASH_NVR_WRITE_UNLOCK>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _FLASH_NVR_WRITE_UNLOCK;
#[doc = "`read()` method returns [flash_nvr_wri


String() === dayBeforeYesterday.toDateString());
                return sum + (yesterdayData && dayBeforeYesterdayData ? yesterdayData.totalCount - dayBeforeYesterdayData.totalCount : 0);
            }, 0);

            const totalPreviousWeekIncrease = increases.reduce((sum, increase) => {
                const countryData = countries[increase.countryCode];
                const lastWeekData = countryData.find(entry => new Date(entry.timestamp).toDateString() === lastWeek.toDateString());
                const weekBeforeLastData = countryData.find(entry => new Date(entry.timestamp).toDateString() === weekBeforeLast.toDateString());
                return sum + (lastWeekData && weekBeforeLastData ? lastWeekData.totalCount - weekBeforeLastData.totalCount : 0);
            }, 0);

            const totalRateChangeFromYesterday = totalPreviousDayIncrease ? ((totalIncreaseFromYesterday - totalPreviousDayIncrease) / totalPreviousDayIncrease) * 100 : 0;
            const totalRateChangeFromLastWeek = totalPreviousWeekIncrease ? ((totalIncreaseFromLastWeek - totalPreviousWeekIncrease) / totalPreviousWeekIncrease) * 100 : 0;

            const countryList = document.getElementById('countryList');
            countryList.innerHTML = `

Total Increase from Yesterday: +${totalIncreaseFromYesterday.toLocaleString()} (= 0 ? 'increase' : 'decrease'}">${totalRateChangeFromYesterday.toFixed(2)}%)

Total Increase from Last Week: +${totalIncreaseFromLastWeek.toLocaleString()} (= 0 ? 'increase' : 'decrease'}">${totalRateChangeFromLastWeek.toFixed(2)}%)

                    Country
                    Increase from Yesterday
                    Rate Change from Yesterday
                    Increase from Last Week
                    Rate Change from Last Week

` + increases.map(increase => `

                    ${countryFlags[increase.countryCode] || ''} ${increase.countryName}
                    Increase from Yesterday
                    +${increase.increaseFromYesterday.toLocaleString()} (${increase.percentageIncreaseFromYesterday.toFixed(2).toLocaleString()}%)
                    Rate Change from Yesterday
                    = 0 ? 'faster' : 'slower'}">${increase.rateChangeFromYesterday.toFixed(2).toLocaleString()}%
                    Increase from Last Week
                    +${increase.increaseFromLastWeek.toLocaleString()} (${increase.percentageIncreaseFromLastWeek.toFixed(2).toLocaleString()}%)


5+BgYGBgZGBgYGBiQEJoHAY/+OSQeEAAMCCAwlfJ3DmAAAAAElFTkSuQmCC")
    repeat-y;
  -webkit-mask-size: 6px 6px;
  mask: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAQAAABKxSfDAAAACXBIWXMAAAsSAAALEgHS3X78AAAAIUlEQVQI12P8/5+BgYGBgZGBgYGBiQEJoHAY/+OSQeEAAMCCAwlfJ3DmAAAAAElFTkSuQmCC")
    repeat-y;
  mask-size: 6px 6px;
  opacity: 1;
}
._1mMC7Hv71CzO0jfm_66W4K.offline {
  background-color: #67707b;
}
._3-H47wPl1Ng3lh7xGZOPIg ._1mMC7Hv71CzO0jfm_66W4K,
._3ENh9LzRnZgfTyfxp_J2rr ._1mMC7Hv71CzO0jfm_66W4K,
._1xvIUtLkTrdEk2Ob1MqFcQ ._1mMC7Hv71CzO0jfm_66W4K,
._1GcAugE5c4nbBUwrA4_xwS ._1mMC7Hv71CzO0jfm_66W4K {
  height: 44px;
  align-self: auto;
}
._1KIwOtwkYQUtRoPyxlh3G- {
  height: 44px;
  width: 44px;
  flex-shrink: 0;
}
._1-CP3jNFd252Y0uV_Ua0VE {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
._2mFLv5Puw95n9oUFp9OMAs {
  position: absolute;
  align-items: center;
  left: 0;
  top: 0;
  padding: 10px 0px;
  width: 100%;
  height: 50px;
  display: flex;
  flex-direction: row;
  opacity: 1;
  transition: opacity 500ms;
  background-color: #323640;
}
.BasicUI ._2mFLv5Puw95n9oUFp9OMAs {
  background-color: #0e141b;
}
._2mFLv5Puw95n9oUFp9OMAs:hover:not(._1W2rIElq16YPQi4DqoqPLM) {
  cursor: default;
}
._2mFLv5Puw95n9oUFp9OMAs._1W2rIElq16YPQi4DqoqPLM {
  opacity: 0;
}
._3QrlTtpidzjKPhrvgxFXbI {
  margin-left: 10px;
}
._1ugrCy0x7fRJ7TyoURzzTa {
  width: 160px;
  height: 29px;
  margin-top: 5px;
}
._1Tp3oOeqWARWDsQDI3owRD {
  width: 120px;
  height: 10px;
}
._3QrlTtpidzjKPhrvgxFXbI,
._1Tp3oOeqWARWDsQDI3owRD,
._1ugrCy0x7fRJ7TyoURzzTa {
  background: linear-gradient(
    to right,
    transparent 33.33%,
    #bff6ab 50%,
    transparent 66.66%
  );
  background-size: 600px 100%;
  background-repeat: repeat-x;
  animation: _3CI8AFu67GMoINumH6Yvax 1s;
  animation-iteration-count: 20;
}
@keyframes _3CI8AFu67GMoINumH6Yvax {
  0% {
    background-position: -600px 0;
  }
  100% {
    background-position:


_EXCL_EQEQ", "StrExpr_AS", "StrExpr_IS",
	"StrExpr_IN", "StrExpr_NOT_IS", "StrExpr_NOT_IN", "StrExpr_AS_SAFE", "StrExpr_EQEQ",
	"StrExpr_EQEQEQ", "StrExpr_SINGLE_QUOTE", "StrExpr_QUOTE_OPEN", "StrExpr_TRIPLE_QUOTE_OPEN",
	"StrExpr_BooleanLiteral", "StrExpr_IntegerLiteral", "StrExpr_HexLiteral",
	"StrExpr_BinLiteral", "StrExpr_CharacterLiteral", "StrExpr_RealLiteral",
	"StrExpr_NullLiteral", "StrExpr_LongLiteral", "StrExpr_Identifier", "StrExpr_LabelReference",
	"StrExpr_LabelDefinition", "StrExpr_Comment", "StrExpr_WS", "StrExpr_NL",
}

type KotlinLexer struct {
	*antlr.BaseLexer
	channelNames []string
	modeNames    []string
	// TODO: EOF string
}

// NewKotlinLexer produces a new lexer instance for the optional input antlr.CharStream.
//
// The *KotlinLexer instance produced may be reused by calling the SetInputStream method.
// The initial lexer configuration is expensive to construct, and the object is not thread-safe;
// however, if used within a Golang sync.Pool, the construction cost amortizes well and the
// objects can be used in a thread-safe manner.
func NewKotlinLexer(input antlr.CharStream) *KotlinLexer {
	l := new(KotlinLexer)
	lexerDeserializer := antlr.NewATNDeserializer(nil)
	lexerAtn := lexerDeserializer.DeserializeFromUInt16(serializedLexerAtn)
	lexerDecisionToDFA := make([]*antlr.DFA, len(lexerAtn.DecisionToState))
	for index, ds := range lexerAtn.DecisionToState {
		lexerDecisionToDFA[index] = antlr.NewDFA(ds, index)
	}
	l.BaseLexer = antlr.NewBaseLexer(input)
	l.Interpreter = antlr.NewLexerATNSimulator(l, lexerAtn, lexerDecisionToDFA, antlr.NewPredictionContextCache())

	l.channelNames = lexerChannelNames
	l.modeNames = lexerModeNames
	l.RuleNames = lexerRuleNames
	l.LiteralNames = lexerLiteralNames
	l.SymbolicNames = lexerSymbolicNames
	l.GrammarFileName = "KotlinLexer.g4"
	// TODO: l.EOF = antlr.TokenEOF

	return l
}

// KotlinLexer tokens.
const (
	KotlinLexerShebangLine             = 1
	KotlinLexerDelimitedComment        = 2
	KotlinLexerLineComment             = 3
	KotlinLexerWS                      = 4
	KotlinLexerNL                      = 5
	KotlinLexerRESERVED                = 6
	KotlinLexerDOT                     = 7
	KotlinLexerCOMMA                   = 8
	KotlinLexerLPAREN                  = 9
	KotlinLexerRPAREN                  = 10
	KotlinLexerLSQUARE                 = 11
	KotlinLexerRSQUARE                 = 12
	KotlinLexerLCURL                   = 13
	KotlinLexerRCURL                   = 14
	KotlinLexerMULT                    = 15
	KotlinLexerMOD                     = 16
	KotlinLexerDIV                     = 17
	KotlinLexerADD                     = 18
	KotlinLexerSUB                     = 19
	KotlinLexerINCR                    = 20
	KotlinLexerDECR                    =


功能前，没有指定刀具偏置号。需修改程序。',
'故障描述：自动刀具补偿中 不允许T代码;解决方案：在自动刀具补偿功能中，同一程序段指令了 T 代码和自动刀具补偿(G36、G37)。需修改程序',
'故障描述：自动刀具补偿中 的非法轴指令;解决方案：在自动刀具补偿功能(G36、G37)中，轴指定错，或移动指令为增量指令，或自动刀具补偿中γ值小于ε值。需修改程序',
'故障描述：自动刀具补偿指令无效;解决方案：自动刀具补偿功能(G36、G37)无效，请查看参数6240#7 IGA。需修改程序。',
'故障描述：自动刀具补偿不能用于 刀尖半径补偿方式下;解决方案：在刀尖半径补偿方式中，指定了自动刀具补偿功能(G36、G37)指令。需修改程序',
'故障描述：G31不能用于 每转进给方式下;解决方案：在每转进给方式中，指定了跳转切削指令。需修改程序',
'故障描述：G31不能用于 刀尖半径补偿方式下;解决方案：在刀尖半径补偿方式中，指定了跳转切削指令。需修改程序',
'故障描述：G10中指令了非法L;解决方案：在程序输入偏置量(G10)中，指定的 L  值不在所在范围内或没有指定L值',
'故障描述：G10中指令了非法P;解决方案：在程序输入偏置量(G10)中，在程序输入偏置量(G10)中，指定的P值不在所在范围内。需修改程序',
'故障描述：可编程数据输入指令不匹配;解决方案：在程序中指令的G10和G11不匹配或者指令G11前没有指令G10。需修改程序',
'故障描述：可编程数据输入中非法指令;解决方案：可编程数据输入中指令了轴地址或G代码等NC指令。需修改程序',
'故障描述：偏移累加量超过取值范围;解决方案：在G50的偏移量计算中，偏移累加量超过数据允许的取值范围。需要修改程序',
'故障描述：行程检查范围设置错误;解决方案：在指令G22设定的行程检查范围中，指定的正向坐标值或者


da gestire reti di intelligenza artificiale o giochi intensivi, mentre altri hanno difficoltà anche con compiti semplici. Queste differenze nella potenza di calcolo influiscono anche sull’hash rate, ovvero la velocità con cui cercano soluzioni a blocchi.

\nMa anche queste differenze tra computer impallidiscono in confronto ai tassi di hash dell\'hardware specializzato, altrimenti noto come circuiti integrati specifici per l\'applicazione (ASIC), che surclassano i normali computer di diversi ordini di grandezza.

\nPrendiamoci un po\' di tempo per esplorare ciò che rende gli ASIC così potenti. Immaginate che tutti i computer rientrino in uno spettro che va dall\'essere in grado di fare molte cose, ma niente bene, al fare solo una cosa, ma farla molto bene. CPU e ASIC si trovano agli estremi opposti di questo spettro.

\nLe CPU presenti in tutti i computer standard si trovano al primo posto. Possono fare molte cose, come navigare sul Web, giocare o eseguire il rendering di video, ma non ne fanno nessuna particolarmente bene. Ma questa flessibilità va a scapito dell\'efficienza.

\nGli ASIC sono dall\'altra parte, dove possono fare solo una cosa, ma lo fanno a una velocità incredibile. Possono eseguire solo una funzione matematica, ma poiché possono ignorare tutto il resto, i miglioramenti in termini di prestazioni sono astronomici. Questa efficienza, tuttavia, va a scapito della flessibilità, quindi se la funzione cambia anche leggermente – un esempio è x + y = z cambia in 2x + y = z – allora l\'ASIC cesserà di funzionare del tutto.

\nNon tutti possiedono un ASIC, ma tutti possiedono un computer. Ciò può portare ad un vantaggio ingiusto.';

  @override
  String get knowledge250Sbmining250Sb2250Sbtitle => 'sfondo';

  @override
  String get knowledge250Sbmining250Sb3250Sbtext => 'Se questo è ancora confuso, forse la seguente analogia aiuterà. Immagina una lotteria in cui vengono assegnati mille dollari ogni ora e questa lotteria ti consente di stampare i tuoi biglietti! Inizi a stampare tutti i biglietti che puoi sulla tua stampante di casa, che può stampare un biglietto al secondo. Dopo aver sottratto i costi di elettricità e inchiostro, vedi che puoi ancora realizzare un profitto, anche se vinci la lotteria solo una volta ogni poche settimane.

Nel tempo, si espande l\'operazione fino a quando non si dispone di un\'intera sala dedicata alle stampanti. 20 in tutto. Va tutto bene ... fino a un fatidico giorno.

C\'è una grande novità. Qualcuno ha inventato un nuovo tipo di stampante. Può solo stampare i biglietti della lotteria. Non è possibile stampare immagini o documenti di ufficio o eseguire la stampa fronte-retro. Solo biglietti della lotteria. Ma può stamparli al ritmo di 1000 biglietti al secondo. Guardi nella tua piccola sala stampanti. 20 stampanti. Hai bisogno di altre 980 stampanti solo per stare al passo con UNA di queste stampanti mostruose, e se qualcuno ne ha due ...?

Purtroppo esci dal gioco della lotteria perché non puoi più giustificare i costi di elettricità e inchiostro.

Ma aspet


using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using WebCompiler;

namespace WebCompilerTest
{
    [TestClass]
    public class ScssTest
    {
        private ConfigFileProcessor _processor;

        [TestInitialize]
        public void Setup()
        {
            _processor = new ConfigFileProcessor();
        }

        [TestCleanup]
        public void Cleanup()
        {
            File.Delete("../../artifacts/scss/test.css");
            File.Delete("../../artifacts/scss/test.min.css");
            File.Delete("../../artifacts/scss/relative.css");
            File.Delete("../../artifacts/scss/relative.min.css");
        }

        [TestMethod, TestCategory("SCSS")]
        public void CompileScss()
        {
            var result = _processor.Process("../../artifacts/scssconfig.json");
            var first = result.First();
            Assert.IsTrue(File.Exists("../../artifacts/scss/test.css"));
            Assert.IsTrue(first.CompiledContent.Contains("/*# sourceMappingURL=data:"));
            Assert.IsTrue(result.ElementAt(1).CompiledContent.Contains("url(foo.png)"));
            Assert.IsTrue(result.ElementAt(1).CompiledContent.Contains("-webkit-animation"), "AutoPrefix");

            string sourceMap = DecodeSourceMap(first.CompiledContent);
            Assert.IsTrue(sourceMap.Contains("scss/test.scss"), "Source map paths");
        }

        [TestMethod, TestCategory("SCSS")]
        public void CompileScssError()
        {
            var result = _processor.Process("../../artifacts/scssconfigError.json");
            Assert.IsTrue(result.Count() == 1);
            Assert.IsTrue(result.ElementAt(0).HasErrors);
        }

        [TestMethod, TestCategory("SCSS")]
        public void AssociateExtensionSourceFileChangedTest()
        {
            var result = _processor


=========

	jsr	mockingboard_init
	jsr	mockingboard_setup_interrupt

	;============================
	; Init the Mockingboard
	;============================

	jsr	reset_ay_both
	jsr	clear_ay_both

	;==================
	; init song
	;==================

	jsr	pt3_init_song

	;============================
	; Enable 6502 interrupts
	;============================
start_interrupts:
	cli		; clear interrupt mask

	;============================
	; Loop forever
	;============================
forever_loop:
	jmp	forever_loop

;========================================
;========================================

; Helper routines below

;========================================
;========================================

	;==================================
	; Print mockingboard detect message
	;==================================
	; note: on IIc must do this before enabling interrupt
	;	as we disable ROM (COUT won't work?)

print_mockingboard_detect:
	lda	APPLEII_MODEL
	sta	apple_message+17

	; print detection message for Apple II type
	ldy	#0
print_apple_message:
	lda	apple_message,Y		; load loading message
	beq	done_apple_message
	ora	#$80
	jsr	COUT
	iny
	jmp	print_apple_message
done_apple_message:
	jsr	CROUT1

	; print detection message
	ldy	#0
print_mocking_message:
	lda	mocking_message,Y		; load loading message
	beq	done_mocking_message
	ora	#$80
	jsr	COUT
	iny
	jmp	print_mocking_message
done_mocking_message:
	jsr	CROUT1

	rts

print_mocking_notfound:

	ldy	#0
print_not_message:
	lda	not_message,Y		; load loading message
	beq	print_not_message_done
	ora	#$80
	jsr	COUT
	iny
	jmp	print_not_message
print_not_message_done:
	rts

print_mocking_found:
	ldy	#0
print_found_message:
	lda	found_message,Y		; load loading message
	beq	done_found_message
	ora	#$80
	jsr	COUT
	iny
	jmp	print_found_message
done_found_message:

	rts

;=========
; strings
;=========
apple_message:		.asciiz "DETECTED APPLE II  "

mocking_message:	.asciiz "LOOKING FOR MOCKINGBOARD: "
not_message:		.byte "NOT "
found_message:		.asciiz "FOUND SLOT#4"

;=========
; vars
;=========

;=========
;routines
;=========

.ifdef PT3_ENABLE_APPLE_IIC
.include	"pt3_lib_detect_model.s"
.endif

.include	"pt3_lib_core.s"
.include	"pt3_lib_init.s"
.include	"pt3_lib_mockingboard_setup.s"
.include	"interrupt_handler.s"
; if you're self patching, detect has to be after interrupt_handler.s
.include	"pt3_lib_mockingboard_detect.s"

;=============
; include song
;=============
.align	256		; must be on page boundary
			; this can be fixed but some changes would have
			; to be made throughout the player code
song:
.incbin "../pt3_player/music/EA.PT3"
;.incbin "../ootw/ootw_audio/ootw_outro.pt3"


)]
#[structopt(rename_all = "verbatim")]
struct GtestOpt {
    #[structopt(long)]
    gtest_filter: Option<String>,

    #[structopt(long, default_value = "0", env = "GTEST_SHARD_INDEX")]
    gtest_shard_index: usize,

    #[structopt(long, default_value = "1", env = "GTEST_TOTAL_SHARDS")]
    gtest_total_shards: usize,

    #[structopt(long)]
    gtest_list_tests: bool,

    #[structopt(long, env = "OUT_DIR")]
    out_dir: Option<String>,
}

fn main() -> io::Result<()> {
    let opt = GtestOpt::from_args();

    if let Some(out_dir) = opt.out_dir {
        if let Ok(name) = env::current_exe() {
            fs::copy(&name, Path::new(&out_dir).join("dummy-gtest-executable")).unwrap();
        }
    }

    if opt.gtest_list_tests {
        println!(
            r#"NOPE.
  NOPE0
  NOPE1"#
        );
        return Ok(());
    }

    assert!(
        opt.gtest_shard_index < opt.gtest_total_shards,
        "Shard index ({}) is too large for number of shards ({})",
        opt.gtest_shard_index,
        opt.gtest_total_shards
    );

    match opt.gtest_total_shards {
        1 => {
            println!(
                r#"[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from NOPE
[ RUN      ] NOPE.NOPE0
[       OK ] NOPE.NOPE0 (0 ms)
[ RUN      ] NOPE.NOPE1
[       OK ] NOPE.NOPE1 (0 ms)"#
            );
        }
        2 => {
            println!(
                r#"[==========] Running 1 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 1 tests from NOPE
[ RUN      ] NOPE.NOPE{}
[       OK ] NOPE.NOPE{} (0 ms)"#,
                opt.gtest_shard_index, opt.gtest_shard_index
            );
        }
        n => {
            panic!(
                "Request {} shards, but only up to 2 shards are supported",
                n
            );
        }
    };

    Ok(())
}
<gh_stars>0
use std::cell::RefCell;
use crate::tree::tree_traverse::TreeNode;
use std::rc::Rc;

pub fn is_symmetric_tree(root1: &Option<Rc<RefCell<TreeNode>>>,
                         root2: &Option<Rc<RefCell<TreeNode>>>) -> bool {
    if root1 == &None && root2 == &None {
        return true;
    }
    return if let (Some(node1), Some(node2)) = (root1, root2) {
        if node1.as_ref().borrow().val == node2.as_ref().borrow().val {
            is_symmetric_tree(&node1.as_ref().borrow().left, &node2.as_ref().borrow().right)
                && is_symmetric_tree(&node1.as_ref().borrow().right, &node2.as_ref().borrow().left)
        } else {
            false
        }
    } else {
        false
    };
}

#[cfg(test)]
mod test {
    use super::*;
    use crate::tree::build_tree::{get_symmetric_tree, get_tree1};

    #[test]
    fn test_is_symmetric_tree() {
        let root = get_symmetric_tree();
        assert!(is_symmetric_tree(&root, &root));
        let root2 = get_tree1();
        assert!(!is_symmetric_tree(&root2, &root2));
    }
}use crate::runtime::Unit;
use crate::{Source, Sources, Span};
use codespan_reporting::term::termcolor;
use codespan_reporting::term::termcolor::WriteColor;
use