�(Code)과 데이터 영역(Data)은 선언 시 크기가 결정되는 정적 영역이다.

## 스레드의 자원 공유

동일한 프로세스에 속하는 스레드끼리는 프로세스의 자원을 공유하기 때문에 프로세스의 실행 흐름의 일부가 될 수 있다.

![1](https://github.com/user-attachments/assets/9ae8baf5-9a2b-4e07-abb9-fc4ec41cb937)

스레드는 Code/Data/Heap 형식으로 할당된 메모리 영역을 공유하고 독립적으로 Stack 영역을 할당 받아  공유하지 않는다.

- heap 메모리를 공유하기 때문에 서로 다른 스레드의 힙 메모리의 내용을 서로 읽고 쓸 수 있다.
- 독립적인 Stack을 가졌다는 것은 독립적인 함수 호출이 가능하다는 의미로 독립적인 실행 흐름으로 추가된다는 말이다.

**즉, 고유한 Stack을 가짐으로써 스레드는 독립적인 실행 흐름을 가질 수 있게 되는 것**이다.

- 스레드의 정의인 “**프로세스가 할당받은 자원을 이용하는 실행 흐름의 단위”가 이해 될것이다.**

**앞 서 말했던 예시처럼 스레드는 여러개가 있다면**  파일을 다운 받으면서 동시에 웹 서핑을 하는 등 동시 작업이 가능해진다.

참조

https://zangzangs.tistory.com/109

https://fastcampus.co.kr/media_branding_cs

https://inpa.tistory.com/entry/👩💻-프로세스-⚔-쓰레드-차이#프로그램_과_프로세스

https://zangzangs.tistory.com/107
---
title: "Setting CORS headers using rs/cors for gqlgen"
description: Use the best of breed rs/cors library to set CORS headers when working with gqlgen
linkTitle: CORS
menu: { main: { parent: "recipes" } }
---

Cross-Origin Resource Sharing (CORS) headers are required when your graphql server lives on a different domain to the one your client code is served. You can read more about CORS in the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS).

## rs/cors

gqlgen doesn't include a CORS implementation, but it is built to work with all standard http middleware. Here we are going to use the fantastic `chi` and `rs/cors` to build our server.

```go
package main

import (
	"net/http"

	"github.com/99designs/gqlgen/graphql/handler/transport"
	"github.com/99designs/gqlgen/_examples/starwars"
	"github.com/99designs/gqlgen/graphql/handler"
	"github.com/go-chi/chi"
	"github.com/rs/cors"
	"github.com/gorilla/websocket"
	"github.com/99designs/gqlgen/graphql/playground"
)

func main() {
	router := chi.NewRouter()

	// Add CORS middleware around every request
	// See https://github.com/rs/cors for full option listing
	router.Use(cors.New(cors.Options{
		AllowedOrigins:   []string{"http://localhost:8080"},
		AllowCredentials: true,
		Debug:            true,
	}).Handler)

	srv := handler.New(starwars.NewExecutableSchema(


            SMTO_NORMAL = 0x0000,

            SMTO_BLOCK = 0x0001,

            SMTO_ABORTIFHUNG = 0x0002,

            SMTO_NOTIMEOUTIFNOTHUNG = 0x0008

        }

        public SHDocVw.InternetExplorer GetIEFromAutomationelement(UIAuto.AutomationElement element) //***************
        {

            IntPtr HWND = element.Current.NativeWindowHandle;

            int hInst = 0;
            IntPtr lres = IntPtr.Zero;
            SHDocVw.InternetExplorer browser = null;
            //System.Windows.Forms.WebBrowser br;
            IHTMLDocument2 htmlDoc = null;
            hInst = LoadLibrary("Oleacc.dll");
            int? addr = GetProcAddress(HWND, "ObjectFromLresult");
            if (addr != null)
            {
                try
                {
                    uint msg = RegisterWindowMessage("WM_HTML_GETOBJECT");
                    SendMessageTimeout(HWND, msg, IntPtr.Zero, IntPtr.Zero, (uint)SendMessageTimeoutFlags.SMTO_ABORTIFHUNG, 1000, out lres);
                    ObjectFromLresult((int)lres, ref IID_IHTMLDocument, 0, ref htmlDoc);
                    Object o;

                    ((IServiceProvider)htmlDoc).QueryService(ref
SID_SWebBrowserApp, ref IID_IWebBrowser, out o);

                    browser = (SHDocVw.InternetExplorer)o;
                    // br = (System.Windows.Forms.WebBrowser)o;
                }
                catch (Exception e)
                {
                    Reporter.ToLog(eLogLevel.ERROR, $"Method - {MethodBase.GetCurrentMethod().Name}, Error - {e.Message}");
                }

                finally
                {
                    FreeLibrary(hInst);
                }
                return browser;
            }
            else
            {
                return null;
            }
        }
    }
}


a	rcx, [rcx + 8*rax]
	lea	rax, [rdx + 8*rax]
	xor	edx, edx
	movsd	xmm0, qword ptr [rip + .LCPI0_0] # xmm0 = mem[0],zero
.LBB0_555:                              # =>This Inner Loop Header: Depth=1
	movsd	xmm1, qword ptr [rax + 8*rdx]   # xmm1 = mem[0],zero
	movapd	xmm2, xmm1
	subsd	xmm2, xmm0
	cvttsd2si	rsi, xmm2
	xor	rsi, r10
	cvttsd2si	rdi, xmm1
	ucomisd	xmm0, xmm1
	cmovbe	rdi, rsi
	mov	qword ptr [rcx + 8*rdx], rdi
	add	rdx, 1
	cmp	r8, rdx
	jne	.LBB0_555
	jmp	.LBB0_1526
.LBB0_562:
	mov	esi, r9d
	and	esi, -4
	lea	rax, [rsi - 4]
	mov	rdi, rax
	shr	rdi, 2
	add	rdi, 1
	mov	r8d, edi
	and	r8d, 3
	cmp	rax, 12
	jae	.LBB0_812
# %bb.563:
	xor	eax, eax
	jmp	.LBB0_814
.LBB0_564:
	mov	esi, r9d
	and	esi, -4
	lea	rax, [rsi - 4]
	mov	rdi, rax
	shr	rdi, 2
	add	rdi, 1
	mov	r8d, edi
	and	r8d, 3
	cmp	rax, 12
	jae	.LBB0_819
# %bb.565:
	xor	eax, eax
	jmp	.LBB0_821
.LBB0_569:
	and	r9d, -4
	xor	edi, edi
	movss	xmm0, dword ptr [rip + .LCPI0_2] # xmm0 = mem[0],zero,zero,zero
	movabs	r10, -9223372036854775808
.LBB0_570:                              # =>This Inner Loop Header: Depth=1
	movss	xmm1, dword ptr [rdx + 4*rdi]   # xmm1 = mem[0],zero,zero,zero
	movaps	xmm2, xmm1
	subss	xmm2, xmm0
	cvttss2si	rsi, xmm2
	xor	rsi, r10
	cvttss2si	rax, xmm1
	ucomiss	xmm0, xmm1
	cmovbe	rax, rsi
	mov	qword ptr [rcx + 8*rdi], rax
	movss	xmm1, dword ptr [rdx + 4*rdi + 4] # xmm1 = mem[0],zero,zero,zero
	movaps	xmm2, xmm1
	subss	xmm2, xmm0
	cvttss2si	rax, xmm2
	xor	rax, r10
	cvttss2si	rsi, xmm1
	ucomiss	xmm0, xmm1
	cmovbe	rsi, rax
	mov	qword ptr [rcx + 8*rdi + 8], rsi
	movss	xmm1, dword ptr [rdx + 4*rdi + 8] # xmm1 = mem[0],zero,zero,zero
	movaps	xmm2, xmm1
	subss	xmm2, xmm0
	cvttss2si	rax, xmm2
	xor	rax, r10
	cvttss2si	rsi, xmm1
	ucomiss	xmm0, xmm1
	cmovbe


ace: '{{ .Value | ToUpper }}'
```

And the log line:

```
11.11.11.11 - frank [25/Jan/2000:14:00:01 -0500] "GET /1986.js HTTP/1.1" 200 932 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 GTB6"
```

The replace stage parses the log line and replaces the value of all named captured groups to upper case. The
named captured groups will be extracted to. Observe here that `user` is not extracted since it was just `(\\S+)` and not a named captured group like this `(?P<user>\\S+)`

- `ip`: `11.11.11.11`
- `identd`: `-`
- `timestamp`: `25/JAN/2000:14:00:01 -0500`
- `action`: `GET`
- `path`: `/1986.JS`
- `protocol`: `HTTP/1.1`
- `status`: `200`
- `size`: `932`
- `referer`:  `-`
- `useragent`: `MOZILLA/5.0 (WINDOWS; U; WINDOWS NT 5.1; DE; RV:1.9.1.7) GECKO/20091221 FIREFOX/3.5.7 GTB6"`

The log line would become

```
11.11.11.11 - FRANK [25/JAN/2000:14:00:01 -0500] "GET /1986.JS HTTP/1.1" 200 932 "-" "MOZILLA/5.0 (WINDOWS; U; WINDOWS NT 5.1; DE; RV:1.9.1.7) GECKO/20091221 FIREFOX/3.5.7 GTB6"
```

### With empty `replace`

Given the pipeline:

```yaml
- replace:
    expression: "11.11.11.11 - (\\S+\\s)"
    replace: ""
```

And the log line:

```
11.11.11.11 - frank [25/Jan/2000:14:00:01 -0500] "GET /1986.js HTTP/1.1" 200 932 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 GTB6"
```

The log line becomes

```
11.11.11.11 - [25/Jan/2000:14:00:01 -0500] "GET /1986.js HTTP/1.1" 200 932 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 GTB6"
```
---
title: match
menuTitle:
description: The 'match' Promtail pipeline stage.
aliases:
- ../../../clients/promtail/stages/match/
weight:
---

# match

{{< docs/shared source="loki" lookup="promtail-deprecation.md" version="<LOKI_VERSION>" >}}

The match stage is a filtering stage that conditionally applies a set of stages
or drop entries when a log entry matches a configurable LogQL
[stream selector](../../../../query/log_queries/#log-stream-selector) and
[filter expressions](../../../../query/log_queries/#line-filter-expression).

{{< admonition type="note" >}}
The filters do not include label filter expressions such as `| label == "foobar"`.
{{< /admonition >}}

## Schema

```yaml
match:
  # LogQL stream selector and line filter expressions.
  selector:


scope_struct_4_rehearse[__pyx_freecount_5spacy_8pipeline_6tagger___pyx_scope_struct_4_rehearse++] = ((struct __pyx_obj_5spacy_8pipeline_6tagger___pyx_scope_struct_4_rehearse *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5spacy_8pipeline_6tagger___pyx_scope_struct_4_rehearse(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5spacy_8pipeline_6tagger___pyx_scope_struct_4_rehearse *p = (struct __pyx_obj_5spacy_8pipeline_6tagger___pyx_scope_struct_4_rehearse *)o;
  if (p->__pyx_v_docs) {
    e = (*v)(p->__pyx_v_docs, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5spacy_8pipeline_6tagger___pyx_scope_struct_4_rehearse(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5spacy_8pipeline_6tagger___pyx_scope_struct_4_rehearse *p = (struct __pyx_obj_5spacy_8pipeline_6tagger___pyx_scope_struct_4_rehearse *)o;
  tmp = ((PyObject*)p->__pyx_v_docs);
  p->__pyx_v_docs = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5spacy_8pipeline_6tagger___pyx_scope_struct_4_rehearse = {
  PyVarObject_HEAD_INIT(0, 0)
  "spacy.pipeline.tagger.__pyx_scope_struct_4_rehearse", /*tp_name*/
  sizeof(struct __pyx_obj_5spacy_8pipeline_6tagger___pyx_scope_struct_4_rehearse), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5spacy_8pipeline_6tagger___pyx_scope_struct_4_rehearse, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5spacy_8pipeline_6tagger___pyx_scope_struct_4_rehearse, /*tp_traverse*/
  __pyx_tp_clear_5sp


model.tags["my-tag-key2"] shouldBe null
        propertiesModelStore.model.tags["my-tag-key3"] shouldBe null
    }

    test("getTags returns a copy of tags") {
        // Given
        val mockSubscriptionManager = mockk<ISubscriptionManager>()
        val propertiesModelStore =
            MockHelper.propertiesModelStore {
                it.tags["my-tag-key1"] = "my-tag-value1"
            }

        val userManager = UserManager(mockSubscriptionManager, MockHelper.identityModelStore(), propertiesModelStore, MockHelper.languageContext())

        // When
        val tagSnapshot1 = userManager.getTags()

        // Then
        tagSnapshot1.size shouldBe propertiesModelStore.model.tags.size
        tagSnapshot1["my-tag-key1"] shouldBe propertiesModelStore.model.tags["my-tag-key1"]

        // Modify
        userManager.addTag("my-tag-key2", "my-tag-value2")
        userManager.getTags().size shouldBe 2

        // Then
        tagSnapshot1.size shouldNotBe userManager.getTags().size
    }

    test("subscriptions are backed by the subscriptions manager") {
        // Given
        val subscriptionList = SubscriptionList(listOf(), UninitializedPushSubscription())
        val mockSubscriptionManager = mockk<ISubscriptionManager>()
        every { mockSubscriptionManager.subscriptions } returns subscriptionList
        every { mockSubscriptionManager.addEmailSubscription(any()) } just runs
        every { mockSubscriptionManager.removeEmailSubscription(any()) } just runs
        every { mockSubscriptionManager.addSmsSubscription(any()) } just runs
        every { mockSubscriptionManager.removeSmsSubscription(any()) } just runs

        val userManager =
            UserManager(
                mockSubscriptionManager,
                MockHelper.identityModelStore(),
                MockHelper.propertiesModelStore(),
                MockHelper.languageContext(),
            )

        // When
        val subscriptions = userManager.subscriptions
        userManager.addEmail("email@co.com")
        userManager.removeEmail("email@co.com")

        userManager.addSms("+15558675309")
        userManager.removeSms("+15558675309")

        // Then
        subscriptions shouldBe subscriptionList
        verify(exactly = 1) { mockSubscriptionManager.addEmailSubscription("email@co.com") }
        verify(exactly = 1) { mockSubscriptionManager.removeEmailSubscription("email@co.com") }
        verify(exactly = 1) { mockSubscriptionManager.addSmsSubscription("+15558675309") }
        verify(exactly = 1) { mockSubscriptionManager.removeSmsSubscription("+15558675309") }
    }
})
package com.onesignal.core.internal.database

import android.content.Context
import android.database.sqlite.SQLiteDatabase
import android.database.sqlite.SQLiteOpenHelper
import android.provider.BaseColumns
import com.onesignal.core.internal.database.impl.OneSignalDbContract

/**
 * This class setups up the database in it's initial form to test database upgrade paths.
 */
internal class InitialOSDatabase(context: Context?) : SQLiteOpenHelper(context, "OneSignal.db", null, 1) {
    private val textType = " TEXT"
    private val intType = " INTEGER"
    private val commaSep = ","

    private val sqlCreateEntries =
        "CREATE TABLE " + OneSignalDbContract.NotificationTable.TABLE_NAME.toString() + " (" +
            BaseColumns._ID.toString() + " INTEGER PRIMARY KEY," +
            OneSignalDbContract.NotificationTable.COLUMN_NAME_NOTIFICATION_ID + textType + commaSep +
            OneSignalDbContract.NotificationTable.COLUMN_NAME_ANDROID_NOTIFICATION_ID + intType + commaSep +
            OneSignalDbContract.NotificationTable.COLUMN_NAME_GROUP_ID + textType + commaSep +


 Security settings to apply to this service.

–

subsets

List of [tetrateio.api.tsb.security.v2.ServiceSecuritySetting.Subset](../../../tsb/security/v2/service_security_setting#tetrateio-api-tsb-security-v2-servicesecuritysetting-subset)
 Subset specific settings that will replace the service wide settings for the specified service
subsets.

–

configGenerationMetadata

[tetrateio.api.tsb.types.v2.ConfigGenerationMetadata](../../../tsb/types/v2/types#tetrateio-api-tsb-types-v2-configgenerationmetadata)
 Metadata values that will be add into the Istio generated configurations.
When using YAML APIs like`tctl` or `gitops`, put them into the `metadata.labels` or
`metadata.annotations` instead.
This field is only necessary when using gRPC APIs directly.

–

### Subset {#tetrateio-api-tsb-security-v2-servicesecuritysetting-subset}

Subset allows replacing the settings for a specific version of a service.

Field
Description
Validation Rule

name

[string](https://developers.google.com/protocol-buffers/docs/proto3#scalar)
 _REQUIRED_
 Name used to refer to the subset.
This must match a subset defined in the ServiceRoute for this service, else it will be omitted.

string = {
  min_len: `1`
}

settings

[tetrateio.api.tsb.security.v2.SecuritySetting](../../../tsb/security/v2/security_setting#tetrateio-api-tsb-security-v2-securitysetting)
 _REQUIRED_
 Security settings to apply to this service subset.

message = {
  required: `true`
}

---
title: Security Setting
description: Security settings for proxy workloads in a security group.
---

`SecuritySetting` allows configuring security related properties
such as TLS authentication and access control for traffic arriving
at a proxy workload in a security group.

Security settings can be propagated along any defined security settings in the configuration hierarchy.
How security settings are propagated can be configured by specifying a *PropagationStrategy*.

The following example creates a security group for the proxy workloads in
`ns1`, `ns2` and `ns3` namespaces owned by its parent workspace
`w1` under tenant `mycompany` and defines a security setting that
only allows mutual TLS authenticated traffic from other proxy workloads in
the same group.

```yaml
apiVersion: security.tsb.tetrate.io/v2
kind: Group
metadata:
  name: t1
  workspace: w1
  tenant: mycompany
  organization: myorg
spec:
  namespaceSelector:
    names:
    - "*/ns1"
    - "*/ns2"
    - "*/ns3"
  configMode: BRIDGED
```

And the associated secur


ools.util.globalParameters;

import us.ihmc.yoVariables.variable.YoEnum;

public class EnumGlobalParameter extends GlobalParameter
{
   public <T extends Enum<T>> EnumGlobalParameter(String name, String description, T value, GlobalParameterChangedListener listener)
   {
      super(null, listener);

      YoEnum<T> yoEnum = new YoEnum<T>(name, description, registry, value.getDeclaringClass(), false);
      yoEnum.set(value);
      this.yoVariable = yoEnum;

      if (changedListener != null)
         changedListener.globalParameterCreated(this);
   }

   public <T extends Enum<T>> EnumGlobalParameter(String name, String description, Class<T> enumType, GlobalParameter[] parents, GlobalParameterChangedListener listener)
   {
      super(parents, listener);

      yoVariable = new YoEnum<>(name, description, registry, enumType, false);

      if (changedListener != null)
         changedListener.globalParameterCreated(this);
   }

   public Enum<?> getValue()
   {
      return ((YoEnum<?>)yoVariable).getEnumValue();
   }

   protected int getNumberOfCharactersForDisplay()
   {
      Enum<?>[] enumValues = ((Enum<?>) ((YoEnum<?>)yoVariable).getEnumValue()).getDeclaringClass().getEnumConstants();
      int maxNumberOfCharacters = Integer.MIN_VALUE;

      for (Enum<?> enumValue : enumValues)
      {
         if (enumValue.toString().length() > maxNumberOfCharacters)
            maxNumberOfCharacters = enumValue.toString().length();
      }

      return maxNumberOfCharacters;
   }

   public <T extends Enum<T>> void set(T value)
   {
      set(value, "");
   }

   public <T extends Enum<T>> void set(T value, String comment)
   {
      verifyNoParents();
      setEnumValue(value, comment);
   }

   public <T extends Enum<T>> void setOnlyIfChange(T value)
   {
      setOnlyIfChange(value, "");
   }

   public <T extends Enum<T>> void setOnlyIfChange(T value, String comment)
   {
      verifyNoParents();

      // check if the value is the same as the current value
      if (value == ((YoEnum<?>)yoVariable).getEnumValue())
         return;
      else
         setEnumValue(value, comment);
   }

   @Override
   public String getValueInStringFormat()
   {
      String ret = ((YoEnum<?>)yoVariable).getEnumValue().toString();

      return padWithSpaces(ret, numberOfCharactersForDisplay);
   }

   @SuppressWarnings("unchecked")
   private <T extends Enum<T>> void setEnumValue(T newValue, String comment)
   {
      Enum<?> previousValue = ((YoEnum<?>)yoVariable).getEnumValue();
      ((YoEnum<T>)yoVariable).set(newValue);

      if (changedListener != null)
      {
         changedListener.enumValueChanged(this, comment, previousValue, newValue);
      }

      updateChildren(comment);
   }

}
package us.ihmc.simulationConstructionSetTools.util.graphs;

import us.ihmc.simulationconstructionset.gui.BodePlotConstructor;
import us.ihmc.yoVariables.buffer.YoBufferVariableEntry;

public class FrequencyPlot extends JFreePlot
{
   private static final long serialVersionUID = 256604511093215927L;

   public FrequencyPlot(String name, YoBufferVariableEntry time, YoBufferVariableEntry data)
   {
      this(name, time.getBuffer(), data.getBuffer());
   }

   public FrequencyPlot(String name, double[] time, double[] data)
   {
      super(name);

      double avg = 0;
      for(int i = 0; i < data.length; i++)
         avg += data[i];
      avg /= data.length;

      double[] dataDivAvg = new double[data.length];
      for(int i = 0; i < data.length; i++)
         dataDivAvg[i] = data[i] - avg;

      double[][] freqMagnitudePhaseData = BodePlotConstructor.computeFreqMagPhase(time, dataDivAvg);

      double


_key.take().unwrap();
    let sigscheme = sess.handshake_data
        .client_auth_sigscheme
        .unwrap();
    let sig = key.sign(sigscheme, &message)
        .expect("client auth signing failed unexpectedly");
    let body = DigitallySignedStruct::new(sigscheme, sig);

    let m = Message {
        typ: ContentType::Handshake,
        version: ProtocolVersion::TLSv1_2,
        payload: MessagePayload::Handshake(HandshakeMessagePayload {
            typ: HandshakeType::CertificateVerify,
            payload: HandshakePayload::CertificateVerify(body),
        }),
    };

    sess.handshake_data.transcript.add_message(&m);
    sess.common.send_msg(m, false);
}

fn emit_ccs(sess: &mut ClientSessionImpl) {
    let ccs = Message {
        typ: ContentType::ChangeCipherSpec,
        version: ProtocolVersion::TLSv1_2,
        payload: MessagePayload::ChangeCipherSpec(ChangeCipherSpecPayload {}),
    };

    sess.common.send_msg(ccs, false);
    sess.common.we_now_encrypting();
}

fn emit_finished(sess: &mut ClientSessionImpl) {
    let vh = sess.handshake_data.transcript.get_current_hash();
    let verify_data = sess.secrets.as_ref().unwrap().client_verify_data(&vh);
    let verify_data_payload = Payload::new(verify_data);

    let f = Message {
        typ: ContentType::Handshake,
        version: ProtocolVersion::TLSv1_2,
        payload: MessagePayload::Handshake(HandshakeMessagePayload {
            typ: HandshakeType::Finished,
            payload: HandshakePayload::Finished(verify_data_payload),
        }),
    };

    sess.handshake_data.transcript.add_message(&f);
    sess.common.send_msg(f, true);
}

// --- Either a CertificateRequest, or a ServerHelloDone. ---
// Existence of the CertificateRequest tells us the server is asking for
// client auth.  Otherwise we go straight to ServerHelloDone.
fn handle_certificate_req(sess: &mut ClientSessionImpl, m: Message) -> StateResult {
    let certreq = extract_handshake!(m, HandshakePayload::CertificateRequest).unwrap();
    sess.handshake_data.transcript.add_message(&m);
    sess.handshake_data.doing_client_auth = true;
    info!("Got CertificateRequest {:?}", certreq);

    // The RFC jovially describes the design here as 'somewhat complicated'
    // and 'somewhat underspecified'.  So thanks for that.

    // We only support RSA signing at the moment.  If you don't support that,
    // we're not doing client auth.
    if !certreq.certtypes.contains(&ClientCertificateType::RSASign) {
        warn!("Server asked for client auth but without RSASign");
        return Ok(&EXPECT_TLS12_SERVER_HELLO_DONE);
    }

    let canames = certreq.canames
        .iter()
        .map(|p| p.0.as_slice())
        .collect::<Vec<&[u8]>>();
    let maybe_certkey =
        sess.config.client_auth_cert_resolver.resolve(&canames, &certreq.sigschemes);

    let scs = sess.common.get_suite();
    let maybe_sigscheme = scs.resolve_sig_scheme(&certreq.sigschemes);

    if maybe_certkey.is_some() && maybe_sigscheme.is_some() {
        let (cert, key) = maybe_certkey.unwrap();
        info!("Attempting client auth, will use {:?}", maybe_sigscheme.as_ref().unwrap());
        sess.handshake_data.client_auth_cert = Some(cert);
        sess.handshake_data.client_auth_key = Some(key);
        sess.handshake


    int(gf(t).shape[0] * resize(t, duration)))))\
                .set_position(lambda t: translate(t, duration, screen_size))

    screen_size = (clip_width, clip_height)
    # Apply the popping out effect with scaling and centering
    text_clip = text_clip.set_start(start_time + line_start).set_duration(word_duration)
    # text_clip = apply_effects(text_clip, word_duration, screen_size)

    text_clips.append(text_clip)

def get_video_content(text, content, text_clips):
    #Change this up. have getContent() return all 4 pieces of data.
    # For body text, return the body text and num_comments comments in video_content,
    # and for comment text, just return num_comments comments
    # ALSO, just used some delimiter before <break time>. Like have NEWCOMMENT, and just check for that???
    if text == "comment":
        combined_comments = ""
        for comment in content:
            combined_comments += (comment.body + " <break time='1s'/> ")
        video_content = combined_comments
    elif text == "body":
        video_content = content[i]
    else:
        video_content = "Error creating video_content in get_video_content"
        print("Invalid text type, please enter either comment or body")
        exit(1)

    return video_content

if __name__ == "__main__":
    main()


LY_WITH_SIMPLICITY_AND_SPEED,
          subTitleTextFontSize: 14.0,
          titleTextFontSize: 23.0,
          btnTitle: NEXT,
          pathImage: INTRO_LOGO,
          backgroundColor: Colors.black,
          heightImage: 300.0),
    );
    slides.add(
      new Slide(
          title: NO_SIGN_UP,
          description: SEND_AND_RECEIVE_FILES_WITH_NO_NEED_TO_SIGN_UP,
          subTitleTextFontSize: 14.0,
          titleTextFontSize: 23.0,
          pathImage: PRIVACY_IMG,
          backgroundColor: Colors.black,
          btnTitle: NEXT,
          heightImage: 300.0),
    );
    slides.add(
      new Slide(
          title: DEVICE_TO_DEVICE,
          description: SEND_AND_RECEIVE_FROM_AND_TO_YOUR_DEVICE_WITHOUT_STORING,
          subTitleTextFontSize: 14.0,
          titleTextFontSize: 23.0,
          btnTitle: GET_STARTED,
          maxLineTextDescription: 3,
          pathImage: DEVICE_TO_DEVICE_IMG,
          backgroundColor: Colors.black,
          heightImage: 300.0),
    );
  }

  void onDonePress() {
    Navigator.push(
      context,
      MaterialPageRoute(builder: (context) => SendScreen()),
    );
  }

  @override
  Widget build(BuildContext context) {
    return ScreenUtilInit(
      designSize: Size(375, 590),
      minTextAdapt: true,
      splitScreenMode: true,
      builder: () => Scaffold(
        body: new IntroSlider(
          slides: this.slides,
          showSkipBtn: false,
          showNextBtn: false,
          termsLink: termsLink,
          showPrevBtn: false,
          showDoneBtn: false,
          onDonePress: this.onDonePress,
          colorDot: Theme.of(context).scaffoldBackgroundColor,
          colorActiveDot: Theme.of(context).colorScheme.secondary,
          sizeDot: 13.0,
          hideStatusBar: false,
          backgroundColorAllSlides: Colors.grey,
          verticalScrollbarBehavior: scrollbarBehavior.SHOW_ALWAYS,
        ),
      ),
    );
  }
}
import 'dart:io' as io;
import 'dart:io';

import 'package:dart_wormhole_william/client/file.dart';
import 'package:file_picker/file_picker.dart' as file_picker_plugin;
import 'package:flutter/services.dart';
import 'package:path_provider/path_provider.dart';

import '../../constants/app_constants.dart';

abstract class FilePicker {
  Future<File> showSelectFile();
}

extension AsFile on String? {
  static const fileIOChannel = MethodChannel("destiny.android/file_io");

  Future<File> androidUriToReadOnlyFile() async {
    var targetOffset = 0;
    var currentOffset = 0;

    Future<int> readInto(Uint8List buffer) async {
      final readResult = await fileIOChannel
          .invokeMethod<List>("read_bytes", <String, dynamic>{
        "uri": this,
        "max": buffer.length,
      });
      final bytesRead = readResult?.first as int;
      final bytes = readResult?.skip(1).first as Uint8List;
      for (int i = 0; i < bytesRead; i++) {
        buffer[i] = bytes[i];
      }
      currentOffset += bytesRead;
      return bytesRead;
    }

    Future<int> seekAndReadInto(Uint8List buffer) async {
      if (targetOffset > currentOffset) {
        // Discard bytes that should be skipped
        await readInto(Uint8List(targetOffset - currentOffset));
      }

      return readInto(buffer);
    }

    final metadata = await fileIOChannel
        .invokeMethod<List>("get_metadata", <String, dynamic>{"uri": this});

    return File(
        metadata: () async {
          return Metadata(


        goodsExample = new PointsMallGoodsParam();
        goodsExample.setStatus(Quantity.INT_2);
        int onShelfGoodsCount = pointsMallGoodsFeignApi.countByExample(goodsExample).getData();

        goodsExample = new PointsMallGoodsParam();
        goodsExample.setStatus(Quantity.INT_4);
        int sellOutGoodsCount = pointsMallGoodsFeignApi.countByExample(goodsExample).getData();

        goodsExample = new PointsMallGoodsParam();
        int allGoodsCount = pointsMallGoodsFeignApi.countByExample(goodsExample).getData();

        //指数总览：客单价(成交金额/成交订单数)、下单转化率(下单人数/访问人数)、下单-支付转化率(支付人数/下单人数)、支付转化率(支付人数/访问人数)
        Date startDate = new Date("1970/1/1 00:00:00");
        BigDecimal perCustomerTransaction;
        order.setStartTime(startDate);
        order.setEndTime(DateUtilsExtend.getDayEnd());
        BigDecimal sumActualPrice = pointsMallOrderFeignApi.selectSumActualPrice(order).getData();
        int countPaid = pointsMallOrderFeignApi.selectCountCompleted(order).getData();
        if(countPaid == 0){
            perCustomerTransaction = BigDecimal.valueOf(-1);
        }else{
            perCustomerTransaction = sumActualPrice.divide(BigDecimal.valueOf(countPaid), 2, BigDecimal.ROUND_HALF_UP);
        }

        BigDecimal orderConversionRate;
        int countOrderPeoples = pointsMallOrderFeignApi.selectCountOrderPeoples(order).getData();
        int countIntoShop = systemUsageRecordFeignApi.selectCountIntoShop(null, startDate, DateUtilsExtend.getDayEnd()).getData();
        if(countIntoShop == 0){
            orderConversionRate = BigDecimal.valueOf(-1);
        }else{
            orderConversionRate = BigDecimal.valueOf(countOrderPeoples).divide(BigDecimal.valueOf(countIntoShop), 2, BigDecimal.ROUND_HALF_UP);
        }

        BigDecimal orderPaymentConversionRate;
        int countPayers = pointsMallOrderFeignApi.selectCountPayers(order).getData();
        if(countOrderPeoples == 0){
            orderPaymentConversionRate = BigDecimal.valueOf(-1);
        }else{
            orderPaymentConversionRate = BigDecimal.valueOf(countPayers).divide(BigDecimal.valueOf(countOrderPeoples), 2, BigDecimal.ROUND_HALF_UP);
        }

        BigDecimal paymentConversionRate;
        if(countIntoShop == 0){
            paymentConversionRate = BigDecimal.valueOf(-1);
        }else{
            paymentConversionRate = BigDecimal.valueOf(countPayers).divide(BigDecimal.valueOf(countIntoShop), 2, BigDecimal.ROUND_HALF_UP);
        }

        //对百分比做限制，必须控制在0~1之间
        if(orderConversionRate.compareTo(BigDecimal.ONE) > 0){
            orderConversionRate = BigDecimal.ONE;
        }else if(orderConversionRate.compareTo(BigDecimal.ZERO) < 0){
            orderConversionRate = BigDecimal.ZERO;
        }
        if(orderPaymentConversionRate.compareTo(BigDecimal.ONE) > 0){
            orderPaymentConversionRate = BigDecimal.ONE;
        }else if(orderPaymentConversionRate.compareTo(BigDecimal.ZERO) < 0){
            orderPaymentConversionRate = BigDecimal.ZERO;
        }
        if(paymentConversionRate.compareTo(BigDecimal.ONE) > 0){
            paymentConversionRate = BigDecimal.ONE;
        }else if(paymentConversionRate.compareTo(BigDecimal.ZERO) < 0){
            paymentConversionRate = BigDecimal.ZERO;
        }

        resultM


gt_vis_tr{}_val{}.png'.format(num_list[0], num_list[1]))

        # ================== 划分数据集 ==================
        train_data_index, val_data_index, test_data_index, all_data_index = data_load_operate.sampling(ratio_list,
                                                                                num_list,
                                                                                gt_reshape,
                                                                                class_count,
                                                                                flag_list[0])
        print(f"训练集样本数（每类）：{num_list[0]}, 验证集样本数（每类）：{num_list[1]}")
        print(f"实际训练集总样本数：{len(train_data_index)}")

        index = (train_data_index, val_data_index, test_data_index)
        train_label, val_label, test_label = data_load_operate.generate_image_iter(data, height, width, gt_reshape, index)
        train_label = train_label.to(device)

        # 创建模型
        net = MambaHSI(in_channels=channels, num_classes=class_count, hidden_dim=128)
        logger.info(paras_dict)
        logger.info(net)
        net.to(device)
        train_loss_list = []
        train_acc_list = [0]
        optimizer = torch.optim.Adam(net.parameters(), lr=learning_rate)
        logger.info(optimizer)
        best_val_acc = 0
        test_accuracy_list = []
        target_accuracy_list = []
        best_target_acc = 0.0
        target_acc = 0.0

        x = transform(np.array(img))
        x = x.unsqueeze(0).float().to(device)
        for epoch in range(max_epoch):
            y_train = train_label.unsqueeze(0)
            epoch_train_loss = 0.0
            net.train()
            try:
                # 同时输入源域和目标域数据
                source_pred, target_pred = net(x, target_x)

                # 只使用源域损失进行训练
                ls = head_loss(loss_func, source_pred, y_train.long())
                optimizer.zero_grad()
                ls.backward()
                optimizer.step()

                current_loss = ls.detach().cpu().numpy()
                epoch_train_loss += current_loss
                logger.info('Iter:{}|loss:{}'.format(epoch, current_loss))
            except RuntimeError as e:  # 处理内存溢出情况
                optimizer.zero_grad()
                torch.cuda.empty_cache()

                # 将图像分成两部分处理
                x_part1 = x[:, :, :x.shape[2]//2+5, :]
                target_x_part1 = target_x[:, :, :target_x.shape[2]//2+5, :]
                y_part1 = y_train[:, :x.shape[2]//2+5, :]

                x_part2 = x[:, :, x.shape[2]//2-5:, :]
                target_x_part2 = target_x[:, :, target_x.shape[2]//2-5:, :]
                y_part2 = y_train[:, x.shape[2]//2-5:, :]

                # 分别处理两部分
                source_pred_part1, target_pred_part1 = net(x_part1, target_x_part1)
                ls1 = head_loss(loss_func, source_pred_part1, y_part1.long())
                optimizer.zero_grad()
                ls1.backward()
                optimizer.step()

                source_pred_part2, target_pred_part2 = net(x_part2, target_x_part2)
                ls2 = head_loss(loss_func, source_pred_part2, y_part2.long())
                optimizer.zero_grad()
                ls2.backward()
                optimizer.step()

                current_loss = (ls1 + ls2).detach().cpu().numpy()
                epoch_train_loss += current_loss
                logger.info('Iter:{}|loss:{}'.format(epoch, current_loss))

            # 每个epoch都进行评估
            net.eval()
            with torch.no_grad():
                # 一次性获取源域和目标域的预测
                source_pred, target_pred = net(x, target_x)  # 使用训练时相同的输入

                # 评估训练集（源域）
                seg_logits_train = resize(
                    input=source_pred,
                    size=y_train.shape[1:],
                    mode='bilinear',
                    align_corners=True
                )
                predict_train = torch.argmax(seg_logits_train, dim=1)
                valid_mask = y_train != -1
                train_accuracy = (predict_train[valid_mask] == y_train[valid_mask].long()).float().mean().item()

                # 评估目标域数据集
                target_evaluator.reset()
                seg_logits_target = resize(


MockRuntimeError = new MockRuntimeError();

      const spy: SinonSpy = sinon.spy();

      const lost: Heisenberg<number> = Lost.of<number>(error);

      lost.ifLost(() => {
        spy();
      });

      expect(spy.called).toBe(true);
    });
  });

  describe('equals', () => {
    it('returns true if the same instance given', () => {
      expect.assertions(1);

      const heisenberg: Heisenberg<number> = Lost.of<number>(new SyntaxError());

      expect(heisenberg.equals(heisenberg)).toBe(true);
    });

    it('returns false if the different class instance given', () => {
      expect.assertions(1);

      const heisenberg: Heisenberg<number> = Lost.of<number>(undefined);

      expect(heisenberg.equals(new MockValueObject<string>('mock'))).toBe(false);
    });

    it('returns true if the same value Lost given', () => {
      expect.assertions(5);

      const present: Present<number> = Present.of<number>(2);
      const absent: Absent<number> = Absent.of<number>();
      const lost1: Lost<number> = Lost.of<number>(null);
      const lost2: Lost<number> = Lost.of<number>(undefined);
      const uncertain: Uncertain<number> = Uncertain.of<number>();

      const heisenberg: Heisenberg<number> = Lost.of<number>(null);

      expect(heisenberg.equals(present)).toBe(false);
      expect(heisenberg.equals(absent)).toBe(false);
      expect(heisenberg.equals(lost1)).toBe(true);
      expect(heisenberg.equals(lost2)).toBe(false);
      expect(heisenberg.equals(uncertain)).toBe(false);
    });

    it('returns true if the same Equalable instance given', () => {
      expect.assertions(2);

      const lost1: Lost<number> = Lost.of<number>(new MockValueObject<string>('mock 1'));
      const lost2: Lost<number> = Lost.of<number>(new MockValueObject<string>('mock 2'));

      const heisenberg: Heisenberg<number> = Lost.of<number>(new MockValueObject<string>('mock 1'));

      expect(heisenberg.equals(lost1)).toBe(true);
      expect(heisenberg.equals(lost2)).toBe(false);
    });
  });

  describe('toString', () => {
    it('returns Lost and its retaining cause', () => {
      expect.assertions(1);

      expect(Lost.of<number>(null).toString()).toBe('Lost: null');
    });
  });
});
import {Component, OnInit} from '@angular/core';
import {HttpClient} from '@angular/common/http';
enum StatusEnum {
  start = 'start',
  stop = 'stop',
  pause = 'pause',
  unpause = 'unpause',
}

const statusColors = {
  running: 'success',
  exited: 'danger',
  created: 'primary',
  paused: 'warning'
}

@Component({
  selector: 'app-docker-card',
  templateUrl: './docker-card.component.html',
  styleUrls: ['./docker-card.component.scss']
})
export class DockerCardComponent implements OnInit {
  containers: any = [];
  statusEnum = StatusEnum;
  statusColors = statusColors;
  constructor(
    private httpClient: HttpClient,
  ) {
  }

  ngOnInit(): void {
    this.getContainers();
  }

  send(id: string, status: StatusEnum) {
    this.httpClient.put(`http://127.0.0.1:5000/${id}`, {status}).subscribe((res: StatusEnum) => {
     this.getContainers();
    })
  }

  getContainers() {
    this.httpClient.get(`http://127.0.0.1:5000/`).subscribe(res => {
      this.containers = res;
      console.log(res)
    })
  }
}


command) =>
      command.commandNames.includes(commandContext.parsedCommandName)
    )

    if (!matchedCommand) {
      console.log('No matched command')
      reactor.failure(message)
      return
    }

    if (!allowedCommands.includes(matchedCommand)) {
      await message.reply(
        `**:x: You aren't allowed to use that command! Try d.help...**`
      )
      await reactor.failure(message)
    } else {
      await matchedCommand
        .run(commandContext)
        .then(() => {
          reactor.success(message)
        })
        .catch((err) => {
          console.error(err)
          reactor.failure(message)
        })
    }
  }

  /**
   * Determines whether or not a message is a user command.
   * @param message Message information
   */
  private isCommand(message: Message): boolean {
    return message.content.startsWith(this.prefix)
  }
}
import { HistoricViewModel } from './view-models/historic-viewmodel';
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { RickAndMortyCardViewModel } from './view-models/rick-and-morty-card';

@Injectable()
export class GridService {

  readonly apiURL: string;

  constructor(private http: HttpClient) {
    this.apiURL = 'https://localhost:5001/v1/historic';
  }

  addTravel(viewModel: HistoricViewModel): Observable<any> {
    return this.http.post<any>(`${this.apiURL}/addtravel`, viewModel);
  }

  getHistoric(id: number): Observable<HistoricViewModel[]> {
    return this.http.get<HistoricViewModel[]>(`${this.apiURL}/getHistoric/${id}`);
  }

  private _ricksAndMorts: RickAndMortyCardViewModel[] = [
    {
      id: 1,
      rick: 'Rick Sanchez',
      morty: 'Morty Smith',
      dimension: 'Earth (C-137)',
      rickImage: 'https://rickandmortyapi.com/api/character/avatar/1.jpeg',
      mortyImage: 'https://rickandmortyapi.com/api/character/avatar/2.jpeg',
      status: 'Alive',
      species: 'Human',
      type: '',
      gender: 'Male',
    },
    {
      id: 2,
      rick: 'Rick K-22',
      morty: 'Morty K-22',
      dimension: 'Earth (K-22)',
      rickImage: 'https://rickandmortyapi.com/api/character/avatar/292.jpeg',
      mortyImage: 'https://rickandmortyapi.com/api/character/avatar/233.jpeg',
      status: 'Alive',
      species: 'Human',
      type: '',
      gender: 'Male',
    },
    {
      id: 3,
      rick: 'Fascist Shrimp Rick',
      morty: 'Fascist Shrimp Morty',
      dimension: 'Earth (Fascist Shrimp Dimension)',
      rickImage: 'https://rickandmortyapi.com/api/character/avatar/503.jpeg',
      mortyImage: 'https://rickandmortyapi.com/api/character/avatar/505.jpeg',
      status: 'Alive',
      species: 'Animal',
      type: 'Shrimp',
      gender: 'Male',

    },
    {
      id: 4,
      rick: 'Wasp Rick',
      morty: 'Wasp Morty',
      dimension: 'Earth (Wasp Dimension)',
      rickImage: 'https://rickandmortyapi.com/api/character/avatar/516.jpeg',
      mortyImage: 'https://rickandmortyapi.com/api/character/avatar/518.jpeg',
      status: 'Alive',
      species: 'Animal',
      type: 'Wasp',
      gender: 'Male',
    },
    {
      id: 5,
      rick: 'Rick Sanchez',
      morty: 'Morty Smith',
      dimension: 'Story Train',
      rickImage: 'https://rickandmortyapi.com/api/character/


h, center_point)){
        return true;
    }
    PlaneType plane[6];
    plane[0].p[0] = vertex[0];
    plane[0].p[1] = vertex[2];
    plane[0].p[2] = vertex[1];
    plane[0].p[3] = vertex[3];

    plane[1].p[0] = vertex[0];
    plane[1].p[1] = vertex[4];
    plane[1].p[2] = vertex[2];
    plane[1].p[3] = vertex[6];

    plane[2].p[0] = vertex[0];
    plane[2].p[1] = vertex[4];
    plane[2].p[2] = vertex[1];
    plane[2].p[3] = vertex[5];

    plane[3].p[0] = vertex[4];
    plane[3].p[1] = vertex[6];
    plane[3].p[2] = vertex[5];
    plane[3].p[3] = vertex[7];

    plane[4].p[0] = vertex[2];
    plane[4].p[1] = vertex[6];
    plane[4].p[2] = vertex[3];
    plane[4].p[3] = vertex[7];

    plane[5].p[0] = vertex[1];
    plane[5].p[1] = vertex[5];
    plane[5].p[2] = vertex[3];
    plane[5].p[3] = vertex[7];
    if (check_surface(cur_pose, axis, theta, depth, plane[0]) || check_surface(cur_pose, axis, theta, depth, plane[1]) || check_surface(cur_pose, axis, theta, depth, plane[2]) || check_surface(cur_pose, axis, theta, depth, plane[3]) || check_surface(cur_pose, axis, theta, depth, plane[4]) || check_surface(cur_pose, axis, theta, depth, plane[5]))
        s = 1;
    else
        s = 0;
    return s;
}

bool FOV_Checker::check_surface(Eigen::Vector3d cur_pose, Eigen::Vector3d axis,  double theta, double depth, PlaneType plane){
    Eigen::Vector3d plane_p, plane_u, plane_v, plane_w, pc, p, vec;
    bool s;
    double t, vec_dot_u, vec_dot_v;
    plane_p = plane.p[0];
    plane_u = plane.p[1] - plane_p;
    plane_v = plane.p[2] - plane_p;
    if (check_line(cur_pose, axis, theta, depth, plane_p, plane_u) || check_line(cur_pose, axis, theta, depth, plane_p, plane_v) || check_line(cur_pose, axis, theta, depth, plane_p + plane_u, plane_v) || check_line(cur_pose, axis, theta, depth, plane_p + plane_v, plane_u)){
        s = 1;
        return s;
    }
    pc = plane_p + (plane.p[3]-plane.p[0])/2;
    if (check_point(cur_pose, axis, theta, depth, pc)){
        s = 1;
        return s;
    }
    plane_w = plane_u.cross(plane_v);
    p = plane_p - cur_pose;
    t = (p.dot(plane_w))/(axis.dot(plane_w));
    vec = cur_pose + t * axis - plane_p;
    vec_dot_u = vec.dot(plane_u)/plane_u.norm();
    vec_dot_v = vec.dot(plane_v)/plane_v.norm();
    if (t>=-eps_value && t<=depth && vec_dot_u>=-eps_value && vec_dot_u<=plane_u.norm() && vec_dot_v>=-eps_value && vec_dot_v <= plane_v.norm())
        s = 1;
    else
        s = 0;
    return s;
}

bool FOV_Checker::check_line


:15px solid #D4DDE1;border-bottom:15px solid transparent}.i-popup-arrl .i-popup-arr-brdr-outer,.i-popup-arrlb .i-popup-arr-brdr-outer,.i-popup-arrlt .i-popup-arr-brdr-outer{top:-15px;left:2px;border-top:15px solid transparent;border-right:15px solid #FFF;border-bottom:15px solid transparent}.i-popup-arrr.i-popup-arr,.i-popup-arrrb.i-popup-arr,.i-popup-arrrt.i-popup-arr{border-top:15px solid transparent;border-bottom:15px solid transparent;border-left:15px solid #D4DDE1}.i-popup-arrr .i-popup-arr-brdr-outer,.i-popup-arrrb .i-popup-arr-brdr-outer,.i-popup-arrrt .i-popup-arr-brdr-outer{top:-15px;right:2px;border-top:15px solid transparent;border-bottom:15px solid transparent;border-left:15px solid #FFF}.i-popup-arrt{top:-15px;left:50%;margin:0 0 0 -6px}.i-popup-arrtl{top:-15px;left:11px}.i-popup-arrtr{top:-15px;right:12px}.i-popup-arrb{bottom:-15px;left:50%;margin:0 0 0 -6px}.i-popup-arrbl{bottom:-15px;left:31px}.i-popup-arrbr{right:12px;bottom:-15px}.i-popup-arrl{top:50%;left:-15px;margin:-6px 0 0}.i-popup-arrlt{top:15px;left:-15px}.i-popup-arrlb{bottom:15px;left:-15px}.i-popup-arrr{top:50%;right:-15px;margin:-6px 0 0}.i-popup-arrrt{top:15px;right:-15px}.i-popup-arrrb{right:-15px;bottom:15px}.b-popup .i-popup-arr-bg,.b-popup .i-popup-arr-brdr-inner{display:none}.i-popup-close,.i-thumb-close{overflow:hidden;position:absolute;top:5px;right:5px;display:block;width:20px;height:20px;background-position:0 0;background-repeat:no-repeat;background-image:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20id%3D%22smallclose-Layer_1%22%20xml%3Aspace%3D%22preserve%22%20height%3D%2220%22%20viewBox%3D%225%205%2020%2020%22%20width%3D%2220%22%20version%3D%221.1%22%20y%3D%220px%22%20x%3D%220px%22%20enable-background%3D%22new%205%205%2020%2020%22%3E%3Cpath%20id%3D%22smallclose-v2_1_%22%20d%3D%22m21.507%209.285l-0.778-0.778-5.722%205.722-5.723-5.723-0.778%200.778%205.721%205.722-5.721%205.722%200.778%200.778%205.722-5.723%205.722%205.723%200.778-0.778-5.723-5.722%205.724-5.721z%22%20fill%3D%22%2399BFCC%22%2F%3E%3C%2Fsvg%3E');font:0/0 serif;cursor:pointer}.b-popup-group,.b-popup-row{position:static;top:auto;right:auto;bottom:auto;left:auto;width:auto;height:auto;padding:0}.i-popup-close,doesnotexist:-o-prefocus{


        "var a,b,x; x=a+b; print(a-b)");
  }

  public void testInlineExpressions4() {
    // Precision is lost due to comma's.
    noInline("var a,b,x; x=a+b, x=a-b; print(x)");
  }

  public void testInlineExpressions5() {
    noInline("var a; var x = a = 1; print(x)");
  }

  public void testInlineExpressions6() {
    noInline("var a, x; a = 1 + (x = 1); print(x)");
  }

  public void testInlineExpression7() {
    // Possible side effects in foo() that might conflict with bar();
    noInline("var x = foo() + 1; bar(); print(x)");

    // This is a possible case but we don't have analysis to prove this yet.
    // TODO(user): It is possible to cover this case with the same algorithm
    //                as the missing return check.
    noInline("var x = foo() + 1; print(x)");
  }

  public void testInlineExpression8() {
    // The same variable inlined twice.
    inline("var x = a + b; print(x);      x = a - b; print(x)",
           "var x;         print(a + b);             print(a - b)");
  }

  public void testInlineExpression9() {
    // Check for actual control flow sensitivity.
    inline("var x; if (g) { x= a + b; print(x)    }  x = a - b; print(x)",
           "var x; if (g) {           print(a + b)}             print(a - b)");
  }

  public void testInlineExpression10() {
    // The DFA is not fine grain enough for this.
    noInline("var x, y; x = ((y = 1), print(y))");
  }

  public void testInlineExpressions11() {
    inline("var x; x = x + 1; print(x)", "var x; print(x + 1)");
    noInline("var x; x = x + 1; print(x); print(x)");
  }

  public void testInlineExpressions12() {
    // ++ is an assignment and considered to modify state so it will not be
    // inlined.
    noInline("var x = 10; x = c++; print(x)");
  }

  public void testInlineExpressions13() {
    inline("var a = 1, b = 2;" +
           "var x = a;" +
           "var y = b;" +
           "var z = x + y;" +
           "var i = z;" +
           "var j = z + y;" +
           "var k = i;",

           "var a, b;" +
           "var x;" +
           "var y = 2;" +
           "var z = 1 + y;" +
           "var i;" +
           "var j = z + y;" +
           "var k = z;");
  }

  public void testNoInlineIfDefinitionMayNotReach() {
    noInline("var x; if (x=1) {} x;");
  }

  public void testNoInlineEscapedToInnerFunction() {
    noInline("var x = 1; function foo() { x = 2 }; print(x)");
  }

  public void testNoInlineLValue() {
    noInline("var x; if (x = 1) { print(x) }");
  }

  public void testSwitchCase() {
    inline("var x = 1; switch(x) { }", "var x; switch(1) { }");
  }

  public void testShadowedVariableInnerFunction() {
    inline("var x = 1; print(x) || (function() {  var x; x = 1; print(x)})


.Health > na.MaxHealth {
		na.Health = na.MaxHealth
	}
}

// TakeDamage 受到伤害
func (na *NPCAttributes) TakeDamage(damage int) {
	na.Health -= damage
	if na.Health < 0 {
		na.Health = 0
	}
}

// IsAlive 检查是否存活
func (na *NPCAttributes) IsAlive() bool {
	return na.Health > 0
}

// GetHealthPercentage 获取生命值百分比
func (na *NPCAttributes) GetHealthPercentage() float64 {
	if na.MaxHealth == 0 {
		return 0
	}
	return float64(na.Health) / float64(na.MaxHealth)
}

// GetManaPercentage 获取法力值百分比
func (na *NPCAttributes) GetManaPercentage() float64 {
	if na.MaxMana == 0 {
		return 0
	}
	return float64(na.Mana) / float64(na.MaxMana)
}

// ToMap 转换为映射
func (na *NPCAttributes) ToMap() map[string]interface{} {
	return map[string]interface{}{
		"level":        na.Level,
		"health":       na.Health,
		"max_health":   na.MaxHealth,
		"mana":         na.Mana,
		"max_mana":     na.MaxMana,
		"strength":     na.Strength,
		"agility":      na.Agility,
		"intelligence": na.Intelligence,
		"charisma":     na.Charisma,
		"luck":         na.Luck,
		"move_speed":   na.MoveSpeed,
		"view_range":   na.ViewRange,
		"hear_range":   na.HearRange,
	}
}

// GetLevel 获取等级
func (na *NPCAttributes) GetLevel() int {
	return na.Level
}

// GetHealth 获取生命值
func (na *NPCAttributes) GetHealth() int {
	return na.Health
}

// GetMaxHealth 获取最大生命值
func (na *NPCAttributes) GetMaxHealth() int {
	return na.MaxHealth
}

// GetAttack 获取攻击力
func (na *NPCAttributes) GetAttack() int {
	return na.Strength
}

// GetDefense 获取防御力
func (na *NPCAttributes) GetDefense() int {
	return na.Agility
}

// GetSpeed 获取速度
func (na *NPCAttributes) GetSpeed() float64 {
	return na.MoveSpeed
}

// GetIntelligence 获取智力
func (na *NPCAttributes) GetIntelligence() int {
	return na.Intelligence
}

// NPCBehavior NPC行为值对象
type NPCBehavior struct {
	Type         BehaviorType
	State        BehaviorState
	PatrolPoints []*Location
	CurrentPoint int
	Target       *Location
	MoveSpeed    float64
	PauseTime    time.Duration
	LastMove     time.Time
	CanMove      bool
	CanTalk      bool
	CanFight     bool
}

// NewNPCBehavior 创建NPC行为
func NewNPCBehavior() *NPCBehavior {
	return &NPCBehavior{
		Type:         BehaviorTypeIdle,
		State:        BehaviorStateIdle,
		PatrolPoints: make([]*Location, 0),
		MoveSpeed:    1.0,
		PauseTime:    time.Second * 3,
		LastMove:     time.Now(),
		CanMove:      true,
		CanTalk:      true,
		CanFight:     false,
	}
}

// SetBehaviorType 设置行为类型
func (nb *N


#ifndef SIGNAL_PROCESSING_H
#define SIGNAL_PROCESSING_H

#include <argos3/core/utility/math/general.h>

namespace argos {

   /****************************************/
   /****************************************/

   /**
    * Calculates the mean, variance, and std deviation of a real-valued signal.
    */
   class CStats {

   public:

      CStats();

      /**
       * Returns the mean of the signal.
       * @return The mean of the signal.
       */
      inline Real GetMean() const {
         return m_fMean;
      }

      /**
       * Returns the variance of the signal.
       * At least two pieces of data must have been inserted for the variance to
       * be different from the default value, which is 0.
       * @return The variance of the signal.
       */
      Real GetVariance() const;

      /**
       * Returns the std deviation of the signal.
       * At least two pieces of data must have been inserted for the std deviation
       * to be different from the default value, which is 0.
       * @return The std deviation of the signal.
       */
      inline Real GetStdDev() const {
         return Sqrt(GetVariance());
      }

      /**
       * Appends a new piece of data and recalculates the statistics.
       * @param f_value The value to append.
       */
      void Append(Real f_value);

   private:

      UInt64 m_unCounter;
      Real m_fMean;
      Real m_fSumOfSquareDiff;
   };

   /****************************************/
   /****************************************/

   /**
    * A simple infinite-impulse response filter for real-valued signals.
    * @see http://en.wikipedia.org/wiki/Low-pass_filter#Simple_infinite_impulse_response_filter
    */
   class CRCLowPassFilter {

   public:

      /**
       * Class constructor.
       * @param f_smoothing_factor The smoothing factor of the RC flter.
       */
      CRCLowPassFilter(Real f_smoothing_factor);

      /**
       * Applies the filter to the given value.
       * @param f_input The new value of the signal to filter.
       * @return The filtered output of the signal to filter.
       */
      Real Filter(Real f_input);

      /**
       * Resets the filter.
       */
      void Reset();

   private:

      Real m_fSmoothingFactor;
      Real m_fPreviousOutput;
      bool m_bInitialized;
   };

   /****************************************/
   /****************************************/

}

#endif


(2021, 2, 0, release = "-eap0.2"), Version(2021, 2, 0, release = "-eap0.3"), -1),
                arrayOf(Version(2021, 2, 0, release = "-eap01"), Version(2018, 2), 1)
        )
    }

    @Test(dataProvider = "compareData")
    fun shouldCompare(version1: Version, version2: Version, expectedResult: Int) {
        // Given

        // When
        val actualResult = version1.compareTo(version2)
        val hash1 = version1.hashCode()
        val hash2 = version2.hashCode()

        // Then
        Assert.assertEquals(actualResult, expectedResult)
        Assert.assertEquals(hash1 == hash2, expectedResult == 0)
    }

    @DataProvider
    fun parseData(): Array<Array<out Any?>> {
        return arrayOf(
                arrayOf("5.0", Version(5, 0)),
                arrayOf("5.1.43", Version(5, 1, 43)),
                arrayOf("5", Version(5)),
                arrayOf("2021.2.0-eap01", Version(2021, 2, 0, release = "-eap01")),
                arrayOf("2021.2.0-eap0.1", Version(2021, 2, 0, release = "-eap0.1")),

                arrayOf("", null),
                arrayOf(" ", null),
                arrayOf("abc", null),
                arrayOf("1,2", null),
                arrayOf(".5.0", null),
                arrayOf("  .5.0", null),
                arrayOf("abc.5.0", null),
                arrayOf("5.0.", null),
                arrayOf("5.0.  ", null),
                arrayOf("5.0.abc", null)
        )
    }

    @Test(dataProvider = "parseData")
    fun shouldParse(versionStr: String, expectedVersion: Version?) {
        // Given

        // When
        val actualVersion = Version.tryParse(versionStr)

        // Then
        Assert.assertEquals(actualVersion, expectedVersion)
    }

    @Test
    fun shouldTrim() {
        // Given
        val version = Version(1, 0, 2, 0, 0)

        // When
        val trimmedVersion = version.trim()

        // Then
        Assert.assertEquals(trimmedVersion.size, 3)
    }

    @DataProvider
    fun toStingData(): Array<Array<out Any?>> {
        return arrayOf(
                arrayOf(Version(5, 0), "5.0"),
                arrayOf(Version(5, 1, 43), "5.1.43"),
                arrayOf(Version(5), "5"),
                arrayOf(Version(2021, 2, 0, release = "-eap01"), "2021.2.0-eap01"),
                arrayOf(Version(2021, 2, 0, release = "-eap0.1"), "2021.2.0-eap0.1")
        )
    }

    @Test(dataProvider = "toStingData")
    fun shouldConvertToString(version: Version, expectedVersionString: String) {
        // Given

        // When
        val actualVersionString = version.toString()

        // Then
        Assert.assertEquals(actualVersionString, expectedVersionString)
    }
}package jetbrains.buildServer.nunit

import jetbrains.buildServer.RequirementsProvider
import jetbrains.buildServer.dotnet.CoverageConstants
import jetbrains.buildServer.dotnet.DotnetConstants
import jetbrains.buildServer.dotnet.MonoConstants
import jetbrains.buildServer.requirements.Requirement
import jetbrains.buildServer.requirements.RequirementQualifier
import jetbrains.buildServer.requirements.RequirementType

class NUnitRequirementsProvider(
    private val _dotCoverRequirementsProvider: RequirementsProvider,
) : RequirementsProvider {
    override fun getRequirements(parameters: Map<String, String>) = sequence {
        // no requirements in a container
        if (!parameters[DotnetConstants.PARAM_DOCKER_IMAGE].isNullOrEmpty()) {
            return@sequence
        }

        // mono or any .NET
        val dotnetFrameworkRegex = DotnetConstants.CONFIG_PREFIX_DOTNET_FRAMEWORK + ".*"
        val monoRegex = MonoConstants.CONFIG_PATH


[1]
                binsum -= sir[2]
                yi++
                x++
            }
            yw += w
            y++
        }
        x = 0
        while (x < w) {
            bsum = 0
            gsum = bsum
            rsum = gsum
            boutsum = rsum
            goutsum = boutsum
            routsum = goutsum
            binsum = routsum
            ginsum = binsum
            rinsum = ginsum
            yp = -radius * w
            i = -radius
            while (i <= radius) {
                yi = Math.max(0, yp) + x
                sir = stack[i + radius]
                sir[0] = r[yi]
                sir[1] = g[yi]
                sir[2] = b[yi]
                rbs = r1 - Math.abs(i)
                rsum += r[yi] * rbs
                gsum += g[yi] * rbs
                bsum += b[yi] * rbs
                if (i > 0) {
                    rinsum += sir[0]
                    ginsum += sir[1]
                    binsum += sir[2]
                } else {
                    routsum += sir[0]
                    goutsum += sir[1]
                    boutsum += sir[2]
                }
                if (i < hm) {
                    yp += w
                }
                i++
            }
            yi = x
            stackpointer = radius
            y = 0
            while (y < h) {

                // Preserve alpha channel: ( 0xff000000 & pix[yi] )
                pix[yi] =
                    -0x1000000 and pix[yi] or (dv[rsum] shl 16) or (dv[gsum] shl 8) or dv[bsum]
                rsum -= routsum
                gsum -= goutsum
                bsum -= boutsum
                stackstart = stackpointer - radius + div
                sir = stack[stackstart % div]
                routsum -= sir[0]
                goutsum -= sir[1]
                boutsum -= sir[2]
                if (x == 0) {
                    vmin[y] = Math.min(y + r1, hm) * w
                }
                p = x + vmin[y]
                sir[0] = r[p]
                sir[1] = g[p]
                sir[2] = b[p]
                rinsum += sir[0]
                ginsum += sir[1]
                binsum += sir[2]
                rsum += rinsum
                gsum += ginsum
                bsum += binsum
                stackpointer = (stackpointer + 1) % div
                sir = stack[stackpointer]
                routsum += sir[0]
                goutsum += sir[1]
                boutsum += sir[2]
                rinsum -= sir[0]
                ginsum -= sir[1]
                binsum -= sir[2]
                yi += w
                y++
            }
            x++
        }
        bitmap.setPixels(pix, 0, w, 0, 0, w, h)
        return bitmap
    }
}package com.knight.kotlin.library_util.image

import android.content.Context
import android.graphics.Bitmap
import android.net.Uri
import android.widget.ImageView
import androidx.annotation.DrawableRes
import androidx.annotation.RawRes
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity

/**
 * Author:Knight
 * Time:2022/2/10 17:47
 * Description:ImageLoaderProxy
 */
interface ImageLoaderProxy


));
					ensure!(current_asset_balance >= *amount, Error::<T>::AssetNotEnough);

					// burn all the assets
					T::FeaturedAssets::burn(*asset_id, &who, *amount)?;

					// calc feature amount
					// let feature = T::FeaturedAssets::feature(*asset_id).unwrap();
					// match feature.elements {
					// 	FeatureElements::One(one) => {
					// 	},
					// 	FeatureElements::Two(one, two) => {
					// 	},
					// 	FeatureElements::Three(one, two, three) => {
					// 	},
					// 	FeatureElements::Four(one, two, three, four) => {
					// 	},
					// };
				}
				// Executed
				Self::deposit_event(Event::FormulaExecuted(id, who.clone()));

				// now
				// let current_block = frame_system::Module::<T>::block_number();

				// FIXME we need better generate algorithm according to feature elements
				let rand_value = T::RandomNumber::generate_in_range(100);
				if formula.rate_of_success > Percent::from_percent(rand_value as u8) {
					// let hash = T::UniqueAssets::mint(&who, UniqueAssetInfo {
					// 	formula_id: id,
					// 	mint_at: current_block,
					// 	name: formula.name.clone(),
					// } as UniqueAssetInfoOf<T>)?;
					// Self::deposit_event(Event::MintUniqueAssetSucceeded(id, who, hash));
				} else {
					Self::deposit_event(Event::MintUniqueAssetFailed(id, who));
				}
				Ok(().into())
			})
		}
	}

	#[pallet::storage]
	#[pallet::getter(fn formulas)]
	/// formula definations
	pub(super) type Formulas<T: Config> = StorageMap<
		_,
		Blake2_128Concat,
		T::FormulaId,
		Formula<T::FormulaId, AssetBalance<T>>
	>;

	#[pallet::event]
	#[pallet::metadata(T::AccountId = "AccountId", T::FormulaId = "FormulaId", UniqueHash<T> = "Hash")]
	#[pallet::generate_deposit(pub(super) fn deposit_event)]
	pub enum Event<T: Config> {
		/// Some formula were created. \[formula_id\]
		FormulaCreated(T::FormulaId),
		/// Some formula were modified. \[formula_id, required_rank\]
		FormulaRequiredRankModified(T::FormulaId, FeatureDestinyRank),
		/// Some formula were modified. \[formula_id\]
		FormulaRequiredElementsModified(T::FormulaId),
		/// Some formula were modified. \[formula_id, percent\]
		FormulaRateOfSuccessModified(T::FormulaId, Percent),
		/// Some formula were executed. \[formula_id, who\]
		FormulaExecuted(T::FormulaId, T::AccountId),
		/// Unique asset were minted. \[formula_id, who, commodity_id\]
		MintUniqueAssetSucceeded(T::FormulaId, T::AccountId, UniqueHash<T>),
		/// Mint asset failed. \[formula_id, who\]
		MintUniqueAssetFailed(T::FormulaId, T::AccountId),
	}

	#[pallet::error]
	pub enum Error<T> {
		NoPermission,
		IdExists,
		Unknown,
		AssetNotUsed,
		AssetNotEnough,
	}
}

// The main implementation block for the module.
impl<T: Config> Pallet<T> {
	// Public immutables
	// TODO
}
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!

#[cfg(any(feature = "all", feature = "android-icu-lang-UCharacter_LineBreak"))]
__jni_


，又积极策动武装叛乱，妄图负隅顽抗。被告人刘殷农及其同伙在云南的犯罪活动，前后达10年之久，使我省社会秩序、生产秩序、工作秩序、教学科研秩序和人民生活秩序，遭到严重破坏，国民经济受到重大的损失，给全省各族人民带来了深重的灾难。

   被告人刘殷农的犯罪事实如下：

   被告人刘殷农在“文化大革命”10年内乱中，积极与其同伙进行反革命宣传煽动，诬陷迫害云南省党政军领导人和广大干部、群众。

   1968年12月14日刘殷农与林敬荣、胡延观在《云南日报》上联名发表《撕破赵健民复辟资本主义的遮羞布》的反动文章，诬陷赵健民是“大叛徒”、“老反革命”，执行了“国民党反动派的计划”。在刘殷农与黄兆其等人的策划煽动下，先后被分别诬陷为“特务”、“叛徒”、“修正主义分子”的还有省委书记刘明辉，省委副书记孙雨亭、高治国，省委常委赵增益等领导干部。特别在康生公开点名制造了“赵健民特务案”的冤案后，刘殷农及其同伙，更是紧密配合，大揪所谓“赵健民之流”，罗织各种罪名，迫害干部和群众。在刘殷农及其同伙的煽动和指挥下，他们在昆明市追“滇挺”，查“左派政府”，挖“地下银行”，打“地下公检法”，制造了大量的冤案。仅昆明地区因蒙受不白之冤被迫害致死的就有1473人，被打伤致残的有9661人。对此严重后果，刘殷农负有直接和间接的责任。1967年12月30日，刘殷农就曾指使陈天寿等人非法拘禁无辜群众袁宝华，致使袁被刑讯逼供而死。

   1976年4月，刘殷农把昆明地区群众悼念周总理的活动，诬陷为“未遂的反革命事件”，布置王海全等人搜集材料，并由马首良等人写成“报告”，经刘交涂晓雷转报江青反革命集团，诬陷省委的某些领导人是此一“事件”的幕后


#include "tommath.h"
#ifdef BN_MP_PRIME_RABIN_MILLER_TRIALS_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
 *
 * LibTomMath is a library that provides multiple-precision
 * integer arithmetic as well as number theoretic functionality.
 *
 * The library was designed directly after the MPI library by
 * Michael Fromberger but has been written from scratch with
 * additional optimizations in place.
 *
 * The library is free for all purposes without any express
 * guarantee it works.
 *
 * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
 */

static const struct {
   int k, t;
} sizes[] = {
{   128,    28 },
{   256,    16 },
{   384,    10 },
{   512,     7 },
{   640,     6 },
{   768,     5 },
{   896,     4 },
{  1024,     4 }
};

/* returns # of RM trials required for a given bit size */
int mp_prime_rabin_miller_trials(int size)
{
   int x;

   for (x = 0; x < (int)(sizeof(sizes)/(sizeof(sizes[0]))); x++) {
       if (sizes[x].k == size) {
          return sizes[x].t;
       } else if (sizes[x].k > size) {
          return (x == 0) ? sizes[0].t : sizes[x - 1].t;
       }
   }
   return sizes[x-1].t + 1;
}

#endif

/* $Source: /cvs/libtom/libtommath/bn_mp_prime_rabin_miller_trials.c,v $ */
/* $Revision: 1.4 $ */
/* $Date: 2006/12/28 01:25:13 $ */


JhbnllcmU= 109977
IOqxtOqwlQ== 109978
INC80LDRgNC60LXRgg== 109979
T0k= 109980
IGlza2E= 109981
xaFuag== 109982
RXN0w6E= 109983
IGxvb2dh 109984
UmlkZQ== 109985
ZXR1cmU= 109986
bmRlcnM= 109987
L2ZvcnVt 109988
IGxha2E= 109989
IFN0YW5kb3J0 109990
LWV5ZWQ= 109991
IGFjdG9yZXM= 109992
IOWkqeWkqeW9qeelqOaYrw== 109993
IHBlcnJvcg== 109994
IOCkpuCksOCljeCktg== 109995
IG90bw== 109996
X0NPTU1FTlQ= 109997
INiq2KjYr9uM2YQ= 109998
X3ByZWY= 109999
IGdldmVzdA== 110000
IOCqquCrjeCqsOCqruCqvuCqow== 110001
IHNlbGVjY2lvbmFy 110002
LkNvbm5lY3Q= 110003
X2ZhaWx1cmU= 110004
INiq24zZhg== 110005
IFdFU1Q= 110006
IEVtYmVy 110007
IGVtaWdy 110008
INWs1bjWgtWu 110009
VEhSRUFE 110010
aWNrZQ== 110011
IGJla2VyamE= 110012
WXU= 110013
xaHDrWNo 110014
5rCR5peP 110015
IFBldHJh 110016
QklO 110017
INW01aXVsg== 110018
IOCkheCkguCklQ== 110019
INCx0YPRhQ== 110020
INCw0L/Qv9Cw0YDQsA== 110021
J2hldXJl 110022
IGxhbGFraQ== 110023
IOCkuOCkpA== 110024
IHN5bXBhdGhldGlj 110025
4K6/4K6f4K+N4K6f4K+B 110026
LmR0eXBl 110027
INiu2KfYt9ix 110028
LWNvbW1lbnQ= 110029
INCx0LvQuNC20LDQuQ== 110030
INC40LDQvQ== 110031
IGVzaW1lcmtpa3Np 110032
IGNvbnZpY3Rpb25z 110033
4LGB4LCk4LGB4LCC4LCm4LC/ 110034
IEJCQg== 110035
IFdvcmM= 110036
Q29kaW5n 110037
IGluY3LDrXZlbA== 110038
X1JFTA== 110039
IGludGVuc28= 110040
IHBq 110041
IFRyZW0= 110042
dXRzaQ== 110043
IGdlbHVr 110044
emlnZW4= 110045
INWw1aHVs9Wh1a0= 110046
IHBlcnVzdA== 110047
IGHFn2HEn8Sx 110048
IEVzdGFibGlzaGVk 110049
Y29ubmVjdG9y 110050
Pi0tfX0K 110051
IOCwleCxh+CwguCwpuCxjeCwsA== 110052
IExhdmE= 110053
INmF2LPYpNmI2YQ= 110054
INCt0YLQuA== 110055
amVybw== 110056
LWVuZXJneQ== 110057
U2VydmluZw== 110058
cmVzYw== 110059
X2RldGVjdA== 110060
I


/*
	Copyright © Carl Emil Carlsen 2020-2021
	http://cec.dk
*/

using UnityEngine;
using static Plot;

[ExecuteInEditMode]
public class PlotCircle : MonoBehaviour
{
	[Header("Shape")]
	public float diameter = 1;

	[Header("Fill")]
	public bool fill = true;
	public Color fillColor = Color.white;
	public Texture fillTexture = null;
	public Rect fillTextureUVRect = new Rect( 0, 0, 1, 1 );
	public Color fillTextureTint = Color.white;
	public FillTextureBlend fillTextureBlend = FillTextureBlend.Overlay;

	[Header("Stroke")]
	public bool stroke = true;
	public float strokeWidth = 0.05f;
	public Color strokeColor = Color.black;
	public StrokeAlignment strokeAlignment = StrokeAlignment.Outside;
	public bool strokeFeatherEnabled = false;
	[Range(0f,1f)] public float strokeFeather = 0.1f;

	[Header("Rendering")]
	public Blend blend = Blend.Transparent;
	public bool antiAliasing = true;
	public Pivot pivot = P


String, ResourcesUlimitsInner>{};
    if (json is Map && json.isNotEmpty) {
      json = json.cast<String, dynamic>(); // ignore: parameter_assignments
      for (final entry in json.entries) {
        final value = ResourcesUlimitsInner.fromJson(entry.value);
        if (value != null) {
          map[entry.key] = value;
        }
      }
    }
    return map;
  }

  // maps a json object with a list of ResourcesUlimitsInner-objects as value to a dart map
  static Map<String, List<ResourcesUlimitsInner>> mapListFromJson(
    dynamic json, {
    bool growable = false,
  }) {
    final map = <String, List<ResourcesUlimitsInner>>{};
    if (json is Map && json.isNotEmpty) {
      // ignore: parameter_assignments
      json = json.cast<String, dynamic>();
      for (final entry in json.entries) {
        map[entry.key] = ResourcesUlimitsInner.listFromJson(
          entry.value,
          growable: growable,
        );
      }
    }
    return map;
  }

  /// The list of required keys that must be present in a JSON.
  static const requiredKeys = <String>{};
}
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:frontend/src/shared/theme/app_colors.dart';
import 'package:frontend/src/shared/theme/theme_data.dart';
import 'package:frontend/src/providers/auth_provider.dart';

class AccountDropdown extends ConsumerWidget {
  const AccountDropdown({super.key});

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    final colorScheme = GlobeTheme.of(context).colorScheme;
    final textTheme = GlobeTheme.of(context).textTheme;
    final authState = ref.watch(authStateProvider);
    final user = authState.value;

    if (user == null) return const SizedBox.shrink();

    final initials =
        '${user.firstName.isNotEmpty ? user.firstName[0] : ''}${user.lastName.isNotEmpty ? user.lastName[0] : ''}'
            .toUpperCase();

    return PopupMenuButton<String>(
      itemBuilder: (BuildContext context) => <PopupMenuEntry<String>>[
        PopupMenuItem<String>(
          height: 24,
          value: 'signOut',
          child: Padding(
            padding: const EdgeInsets.symmetric(vertical: 8),
            child: Row(
              children: [
                Icon(Icons.logout, size: 16),
                SizedBox(width: 16),
                Text(
                  'Sign Out',
                  style: textTheme.body?.copyWith(color: colorScheme.onSurface),
                ),
              ],
            ),
          ),
          onTap: () => ref.read(authStateProvider.notifier).signOut(),
        ),
      ],
      position: PopupMenuPosition.under,
      color: colorScheme.background,
      elevation: 2,
      constraints: const BoxConstraints(maxWidth: 120),
      menuPadding: EdgeInsets.zero,
      child: DecoratedBox(
        decoration: BoxDecoration(
          border: Border.all(color: colorScheme.outline),
          borderRadius: BorderRadius.circular(8),
        ),
        child: Padding(
          padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
          child: Row(
            mainAxisSize: MainAxisSize.min,
            children: [
              Container(
                width: 24,
                height: 24,
                decoration: BoxDecoration(
                  color: AppColors.purple,
                  borderRadius: BorderRadius.circular(12),
                ),
                child: Center(
                  child: Text(


ldcard of a set of namespace URIs.
     */
    interface Union extends XSWildcard {
        /**
         * Short for getNamespaces().iterator()
         */
        Iterator<String> iterateNamespaces();

        /**
         * Read-only list of namespace URIs.
         */
        Collection<String> getNamespaces();
    }
}
/*
 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

package com.sun.xml.internal.xsom;

import com.sun.xml.internal.xsom.parser.SchemaDocument;

import java.util.Iterator;
import java.util.Map;

/**
 * Schema.
 *
 * Container of declarations that belong to the same target namespace.
 *
 * @author
 *  Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
 */
public interface XSSchema extends XSComponent
{
    /**
     * Gets the target namespace of the schema.
     *
     * @return
     *      can be empty, but never be null.
     */
    String getTargetNamespace();

    /**
     * Gets all the {@link XSAttributeDecl}s in this schema
     * keyed by their local names.
     */
    Map<String,XSAttributeDecl> getAttributeDecls();
    Iterator<XSAttributeDecl> iterateAttributeDecls();
    XSAttributeDecl getAttributeDecl(String localName);

    /**
     * Gets all the {@link XSElementDecl}s in this schema.
     */
    Map<String,XSElementDecl> getElementDecls();
    Iterator<XSElementDecl> iterateElementDecls();
    XSElementDecl getElementDecl(String localName);

    /**
     * Gets all the {@link XSAttGroupDecl}s in this schema.
     */
    Map<String,XSAttGroupDecl> getAttGroupDecls();
    Iterator<XSAttGroupDecl> iterateAttGroupDecls();
    XSAttGroupDecl getAttGroupDecl(String localName);

    /**
     * Gets all the {@link XSModelGroupDecl}s in this schema.
     */
    Map<String,XSModelGroupDecl> getModelGroupDecls();
    Iterator<XSModelGroupDecl> iterateModelGroupDecls();
    XSModelGroupDecl getModelGroupDecl(String localName);

    /**
     * Gets all the {@link XSType}s in this schema (union of
     * {@link #getSimpleTypes()} and {@link #getComplexTypes()}
     */
    Map<String,XSType> getTypes();
    Iterator<XSType> iterateTypes();
    XSType getType(String localName);

    /**
     * Gets all the {@link XSSimpleType}s in this schema.
     */
    Map<String,XSSimpleType> getSimpleTypes();
    Iterator<XSSimpleType> iterateSimpleTypes();
    XSSimpleType getSimpleType(String localName);

    /**
     * Gets all the {@link XSComplexType}s in this schema.
     */
    Map<String


 + ", age=" + age + ", address=" + address
				+ ", status=" + status + ", gmtCreate=" + gmtCreate + ", gmtModified=" + gmtModified + ", delFlag="
				+ delFlag + "]";
	}

}
package com.lyu.shopping.recommendate.util;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

import com.lyu.shopping.recommendate.dto.UserActiveDTO;
import com.lyu.shopping.recommendate.dto.UserSimilarityDTO;
import com.lyu.shopping.sysmanage.entity.Product;

/**
 * 类描述：用于商品推荐的工具类
 * 类名称：com.lyu.shopping.recommendate.util.RecommendUtils
 * @author 曲健磊
 * 2018年3月25日.下午8:10:41
 * @version V1.0
 */
public class RecommendUtils {

    /**
     * 更新用户的购买行为，最终插入数据库中
     * @param userId 用户id
     * @param itemId 商品id
     * @return true则更新成功，false则更新失败
     */
    public static boolean updateBuyingBehavior(Long userId, Long itemId) {
        boolean flag = false;
        // TODO
        return flag;
    }

    /**
     * 将用户的购买行为组装成一个map,key为userId，value也是一个map，这个map记录的是二级类目以及它对应的点击量
     * @param userActiveList 用户的购买行为列表
     * @return 组装好的用户的购买行为的map集合
     */
    public static ConcurrentHashMap<Long, ConcurrentHashMap<Long, Long>> assembleUserBehavior(List<UserActiveDTO> userActiveList) {
        ConcurrentHashMap<Long, ConcurrentHashMap<Long, Long>> activeMap = new ConcurrentHashMap<Long, ConcurrentHashMap<Long, Long>>();
        // 遍历查询到的用户点击行为数据
        for (UserActiveDTO userActive : userActiveList) {
            // 1.获取用户id
            Long userId = userActive.getUserId();
            // 2.获取二级类目id
            Long category2Id = userActive.getCategory2Id();
            // 3.获取该二级类目的点击量
            Long hits = userActive.getHits();

            // 判断activeMap中是否已经存在了该userId的信息，如果存在则进行更新
            if (activeMap.containsKey(userId)) {
                ConcurrentHashMap<Long, Long> tempMap = activeMap.get(userId);
                tempMap.put(category2Id, hits);
                activeMap.put(userId, tempMap);
            } else {
                // 不存在则直接put进
                ConcurrentHashMap<Long, Long> category2Map = new ConcurrentHashMap<Long, Long>();
                category2Map.put(category2Id, hits);
                activeMap.put(userId, category2Map);
            }
        }

        return activeMap;
    }

    /**
     * 计算用户与用户之间的相似性，返回计算出的用户与用户之间的相似度对象
     * @param activeMap 用户对各个二级类目的购买行为的一个map集合
     * @return 计算出的用户与用户之间的相似度的对象存储形式
     */
    public static List<UserSimilarityDTO> calcSimilarityBetweenUsers(ConcurrentHashMap<Long, ConcurrentHashMap<Long,


a\u5e74\u62df\u5148\u5728\u4eba\u5458\u8f83\u591a\uff0c\u7ecf\u8425\u5546\u54c1\u590d\u6742\u7684\u68c9\u5e03\u3001\u767e\u8d27\u4e24\u884c\u4e1a\u6210\u7acb\u515a\u7684\u652f\u90e8\u6216\u5206\u515a\u59d4\u3002\u5e76\u786e\u5b9a\u8fd9\u4e9b\u5e72\u90e8\u7684\u7ecf\u8d39\u5e94\u7531\u5404\u5f52\u53e3\u516c\u53f8\u8d1f\u8d23\u3002", "type": "paragraph"}, {"text": "\u6765\u6e90\uff1a", "type": "source"}, {"text": "\u6839\u636e\u6587\u4ef6\u7684\u539f\u4ef6\u6253\u5370", "type": "paragraph"}]}
  </script>

    [返回索引页面]

   中共湖南省委批转省财经党组关于召开九省辖市财经会议的报告

   日期：1955-10-7 作者：[待确定]

   省委同意省财经党组关于召开九省辖市财经会议的报告，并转发各市，望贯彻执行。

   各市粮食统销工作经过一段整顿，虽有较好基础，但是实行“以人定量”供应办法，对群众生活习惯改变更深刻，工作将更细致复杂，困难还是很多的，因此必须抓紧领导，不能松懈。

   对私商安排与改造工作的各项意见是可行的。目前私商当中尚有少数困难行业与困难户，须认真采取措施解决，其中关于采取城乡沟通办法解决当前某些困难行业的作法，有关地、市委应积极协商进行。报告提到的国营商业根据业务需要，适当吸收一些私商从业人员问题，是符合中央


ct(getWords('running rocks slipped over')).toEqual(
            new Map<string, number>([
                ['run', 1],
                ['rock', 1],
                ['slip', 1],
            ])
        )
    })

    it('works with code snippets', () => {
        expect(getWords(targetSnippet)).toEqual(
            new Map<string, number>([
                ['import', 1],
                ['bestjaccardmatch', 1],
                ['getword', 4],
                ['context', 1],
                ['describ', 1],
                ['work', 1],
                ['regular', 1],
                ['text', 1],
                ['expect', 2],
                ['foo', 2],
                ['bar', 2],
                ['baz', 2],
                ['toequal', 2],
                ['new', 2],
                ['map', 2],
                ['string', 2],
                ['number', 2],
                ['1', 6],
                ['run', 2],
                ['rock', 2],
                ['slip', 2],
            ])
        )
    })
})

describe('bestJaccardMatch', () => {
    it('should return the best match in 5 line windows', () => {
        const matchText = [
            'foo',
            'bar',
            'baz',
            'qux',
            'quux',
            'quuz',
            'corge',
            'grault',
            'garply',
            'waldo',
            'fred',
            'plugh',
            'xyzzy',
            'thud',
        ].join('\n')
        expect(bestJaccardMatch('foo\nbar\nbaz', matchText, 3)).toEqual({
            score: 1,
            content: 'foo\nbar\nbaz',
        })
        expect(bestJaccardMatch('bar\nquux', matchText, 4)).toEqual({
            score: 0.5,
            content: 'bar\nbaz\nqux\nquux',
        })
        expect(
            bestJaccardMatch(
                ['grault', 'notexist', 'garply', 'notexist', 'waldo', 'notexist', 'notexist'].join('\n'),
                matchText,
                6
            )
        ).toEqual({
            score: 0.3,
            content: ['corge', 'grault', 'garply', 'waldo', 'fred', 'plugh'].join('\n'),
        })
    })

    it('works with code snippets', () => {
        expect(bestJaccardMatch(targetSnippet, matchSnippet, 5)).toMatchInlineSnapshot(`
            Object {
              "content": "describe('bestJaccardMatch', () => {
                it('should return the best match', () => {
                    const matchText = [
                        'foo',
                        'bar',",
              "score": 0.08695652173913043,
            }
        `)
    })
})
import type { Resolvable } from './types'

export function getLength (iterable: Iterable<Resolvable<any>>): number {
  let result
  if (iterable instanceof Array) {
    result = iterable.length
  } else if (iterable instanceof Map || iterable instanceof Set) {
    result = iterable.size
  } else {
    const iterator = iterable[Symbol.iterator]()
    let count = 0
    let next = iterator.next()
    while (next.done !== true) {
      count++
      next = iterator.next()
    }
    result = count
  }
  return result
}
import React from 'react';
import { ISortieEventInfoDto } from 'gemini-statistics-api/build/dtos/sortie-event-info.dto';
import { SortieEvent } from 'gemini-statistics-api/build/enums/


ffefd5")
        val peachPuff = Color("peachpuff", "#ffdab9")
        val peru = Color("peru", "#cd853f")
        val pink = Color("pink", "#ffc0cb")
        val plum = Color("plum", "#dda0dd")
        val powderBlue = Color("powderblue", "#b0e0e6")
        val purple = Color("purple", "#800080")
        val red = Color("red", "#ff0000")
        val rosyBrown = Color("rosybrown", "#bc8f8f")
        val royalBlue = Color("royalblue", "#4169e1")
        val saddleBrown = Color("saddlebrown", "#8b4513")
        val salmon = Color("salmon", "#fa8072")
        val sandyBrown = Color("sandybrown", "#f4a460")
        val seaGreen = Color("seagreen", "#2e8b57")
        val seaShell = Color("seashell", "#fff5ee")
        val sienna = Color("sienna", "#a0522d")
        val silver = Color("silver", "#c0c0c0")
        val skyBlue = Color("skyblue", "#87ceeb")
        val slateBlue = Color("slateblue", "#6a5acd")
        val slateGray = Color("slategray", "#708090")
        val slateGrey = Color("slategrey", "#708090")
        val snow = Color("snow", "#fffafa")
        val springGreen = Color("springgreen", "#00ff7f")
        val steelBlue = Color("steelblue", "#4682b4")
        val tan = Color("tan", "#d2b48c")
        val teal = Color("teal", "#008080")
        val thistle = Color("thistle", "#d8bfd8")
        val tomato = Color("tomato", "#ff6347")
        val turquoise = Color("turquoise", "#40e0d0")
        val violet = Color("violet", "#ee82ee")
        val wheat = Color("wheat", "#f5deb3")
        val white = Color("white", "#ffffff")
        val whiteSmoke = Color("whitesmoke", "#f5f5f5")
        val yellow = Color("yellow", "#ffff00")
        val yellowGreen = Color("yellowgreen", "#9acd32")

        fun normalizeFractionalPercent(value: Double): Double =
            value.coerceIn(minimumValue = 0.0, maximumValue = 1.0)

        fun normalizePercent(value: Int): Int =
            value.coerceIn(minimumValue = 0, maximumValue = 100)

        fun normalizeRGB(value: Int): Int =
            value.coerceIn(minimumValue = 0, maximumValue = 255)

        // algorithm for capping from W3C
        fun normalizeHue(value: Double): Int =
            (((value % 360) + 360) % 360).roundToInt()

        fun normalizeAlpha(value: Double): Double =
            normalizeFractionalPercent(value)

        // Match for hsl(int, int%, int%) | hsla(int, int%, int%, 0.5) | etc.
        private val HSLA_REGEX by lazy {
            Regex(
                "^hsla?\\((-?[0-9]+\\.?[0-9]*(?:deg|grad|rad|turn)?)\\s*[, ]?\\s*(\\d{1,3})%\\s*[, ]\\s*(\\d{1,3})%\\s*[, ]?\\s*(\\d|(?:\\d?\\.\\d+))?\\)\$",
                RegexOption.IGNORE_CASE
            )
        }

        // Match for rgb(255, 255, 255) | rgba(255, 255, 255, 0.5) | rgb(100% 100% 100%) | etc.
        private val RGBA_REGEX by lazy {
            Regex(
                "^rgba?\\((\\d{1,3}%?)\\s*[, ]\\s*(\\d{1,3}%?)\\s*[, ]\\s*(\\d{1,3}%?)[, ]?\\s*(\\d|(?:\\d?\\.\\d+))?\\)\$",
                RegexOption.IGNO


.model.DateRange
import net.opatry.tasks.app.presentation.model.TaskId
import net.opatry.tasks.app.presentation.model.TaskListUIModel
import net.opatry.tasks.app.presentation.model.TaskUIModel
import net.opatry.tasks.app.ui.component.RemainingTaskRowTestTag.DUE_DATE_CHIP
import net.opatry.tasks.app.ui.component.RemainingTaskRowTestTag.MENU_ICON
import net.opatry.tasks.app.ui.component.RemainingTaskRowTestTag.NOTES
import net.opatry.tasks.app.ui.component.RemainingTaskRowTestTag.RESET_DUE_DATE_CHIP
import net.opatry.tasks.app.ui.component.RemainingTaskRowTestTag.ROW
import net.opatry.tasks.app.ui.component.RemainingTaskRowTestTag.SET_DUE_DATE_CHIP
import net.opatry.tasks.app.ui.component.RemainingTaskRowTestTag.SET_DUE_DATE_TOMORROW_CHIP
import net.opatry.tasks.app.ui.component.RemainingTaskRowTestTag.SET_TASK_DUE_DATE_TODAY_CHIP
import net.opatry.tasks.app.ui.component.RemainingTaskRowTestTag.TOGGLE_ICON
import net.opatry.tasks.app.ui.tooling.TaskfolioThemedPreview
import net.opatry.tasks.resources.Res
import net.opatry.tasks.resources.task_due_date_label_days_ago
import net.opatry.tasks.resources.task_due_date_label_no_date
import net.opatry.tasks.resources.task_due_date_label_past
import net.opatry.tasks.resources.task_due_date_label_today
import net.opatry.tasks.resources.task_due_date_label_tomorrow
import net.opatry.tasks.resources.task_due_date_label_weeks_ago
import net.opatry.tasks.resources.task_due_date_label_yesterday
import net.opatry.tasks.resources.task_due_date_reset
import net.opatry.tasks.resources.task_due_date_set
import net.opatry.tasks.resources.task_list_pane_task_options_icon_content_desc
import org.jetbrains.compose.resources.pluralStringResource
import org.jetbrains.compose.resources.stringResource
import org.jetbrains.compose.ui.tooling.preview.Preview
import org.jetbrains.compose.ui.tooling.preview.PreviewParameter
import org.jetbrains.compose.ui.tooling.preview.PreviewParameterProvider
import kotlin.math.abs
import kotlin.time.Clock

@VisibleForTesting
object RemainingTaskRowTestTag {
    const val ROW = "REMAINING_TASK_ROW"
    const val TOGGLE_ICON = "REMAINING_TASK_TOGGLE_ICON"
    const val MENU_ICON = "REMAINING_TASK_MENU_ICON"
    const val NOTES = "REMAINING_TASK_NOTES"
    const val DUE_DATE_CHIP = "REMAINING_TASK_DUE_DATE_CHIP"
    const val RESET_DUE_DATE_CHIP = "REMAINING_TASK_RESET_DUE_DATE_CHIP"
    const val SET_TASK_DUE_DATE_TODAY_CHIP = "REMAINING_TASK_SET_TASK_DUE_DATE_TODAY_CHIP"
    const val SET_DUE_DATE_TOMORROW_CHIP = "REMAINING_TASK_SET_DUE_DATE_TOMORROW_CHIP"
    const val SET_DUE_DATE_CHIP = "REMAINING_TASK_SET_DUE_DATE_CHIP"
}

@VisibleForTesting
@Composable
internal fun DateRange?.toColor(): Color = when (this) {
    is DateRange.Overdue -> MaterialTheme.colorScheme.error
    is DateRange.Today -> MaterialTheme.colorScheme.primary
    is DateRange.Later,
    DateRange.None,
    null -> MaterialTheme.colorScheme.onSurface.copy(alpha = 0.6f)
}

@VisibleForTesting
@Composable
internal fun DateRange.toLabel(sectionLabel: Boolean = false): String = when (this) {
    is DateRange.Overdue -> {
        val numberO


::Protocol(decl) => decl.source_path.as_ref(),
            CapabilityDecl::Resolver(decl) => decl.source_path.as_ref(),
            CapabilityDecl::Runner(decl) => decl.source_path.as_ref(),
            CapabilityDecl::Service(decl) => decl.source_path.as_ref(),
            CapabilityDecl::Storage(_) => None,
            CapabilityDecl::Event(_) => None,
        }
    }
}

#[derive(FidlDecl, Debug, Clone, PartialEq, Eq)]
#[fidl_decl(fidl_table = "fdecl::Child")]
pub struct ChildDecl {
    pub name: String,
    pub url: String,
    pub startup: fdecl::StartupMode,
    pub on_terminate: Option<fdecl::OnTerminate>,
    pub environment: Option<String>,
}

#[cfg_attr(feature = "serde", derive(Deserialize, Serialize), serde(rename_all = "snake_case"))]
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct ChildRef {
    pub name: String,
    pub collection: Option<String>,
}

impl FidlIntoNative<ChildRef> for fdecl::ChildRef {
    fn fidl_into_native(self) -> ChildRef {
        ChildRef { name: self.name, collection: self.collection }
    }
}

impl NativeIntoFidl<fdecl::ChildRef> for ChildRef {
    fn native_into_fidl(self) -> fdecl::ChildRef {
        fdecl::ChildRef { name: self.name, collection: self.collection }
    }
}

#[derive(FidlDecl, Debug, Clone, PartialEq, Eq)]
#[fidl_decl(fidl_table = "fdecl::Collection")]
pub struct CollectionDecl {
    pub name: String,
    pub durability: fdecl::Durability,

    #[fidl_decl(default)]
    pub allowed_offers: cm_types::AllowedOffers,
    #[fidl_decl(default)]
    pub allow_long_names: bool,
    pub environment: Option<String>,
}

#[derive(FidlDecl, Debug, Clone, PartialEq, Eq)]
#[fidl_decl(fidl_table = "fdecl::Environment")]
pub struct EnvironmentDecl {
    pub name: String,
    pub extends: fdecl::EnvironmentExtends,
    pub runners: Vec<RunnerRegistration>,
    pub resolvers: Vec<ResolverRegistration>,
    pub debug_capabilities: Vec<DebugRegistration>,
    pub stop_timeout_ms: Option<u32>,
}

#[derive(FidlDecl, Debug, Clone, PartialEq, Eq)]
#[fidl_decl(fidl_table = "fdecl::ConfigSchema")]
pub struct ConfigDecl {
    pub fields: Vec<ConfigField>,
    pub checksum: ConfigChecksum,
    pub value_source: ConfigValueSource,
}

#[derive(FidlDecl, Debug, Clone, PartialEq, Eq)]
#[fidl_decl(fidl_union = "fdecl::ConfigChecksum")]
pub enum ConfigChecksum {
    Sha256([u8; 32]),
}

#[derive(FidlDecl, Debug, Clone, PartialEq, Eq)]
#[fidl_decl(fidl_union = "fdecl::ConfigValueSource")]
pub enum ConfigValueSource {
    PackagePath(String),
}

#[derive(FidlDecl, Debug, Clone, PartialEq, Eq)]
#[fidl_decl(fidl_table = "fdecl::ConfigField")]
pub struct ConfigField {
    pub key: String,
    pub type_: ConfigValueType,
}

#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ConfigNestedValueType {
    Bool,
    Uint8,
    Int8,
    Uint16,
    Int16,
    Uint32,
    Int32,
    Uint64,


ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

#endregion

namespace Krypton.Toolkit.Suite.Extended.Software.Updater.Core
{
    /// <summary>
    /// Return value of the signature verification check functions.
    /// </summary>
    public enum ValidationResult
    {
        /// <summary>
        /// The public key and signature both exist and they are valid (the update file
        /// is safe to use).
        /// </summary>
        Valid = 1,

        /// <summary>
        /// Depending on the <see cref="SecurityMode"/> used, either the public key or the
        /// signature doesn't exist -- or they exist but are not valid.
        /// In this case the update file will be rejected.
        /// </summary>
        Invalid = 2,

        /// <summary>
        /// There wasn't any public key or signature available, and this is OK based on the
        /// <see cref="SecurityMode"/> used.
        /// </summary>
        Unchecked = 3,
    }
}


// Copyright (c) 2014-2019 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
// to deal in the Materials without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Materials, and to permit persons to whom the
// Materials are furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Materials.
//
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
//
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
// IN THE MATERIALS.

//
// Print headers for SPIR-V in several languages.
//

#pragma once
#ifndef header
#define header

#include <iostream>

namespace spv {
    // Languages supported
    enum TLanguage {
        ELangC,        // C
        ELangCPP,      // C++03
        ELangCPP11,    // C++11
        ELangJSON,     // JSON
        ELangLua,      // Lua
        ELangPython,   // Python
        ELangCSharp,   // CSharp
        ELangD,        // D

        ELangAll,      // print headers in all languages to files
    };

    // Generate header for requested language
    void PrintHeader(TLanguage, std::ostream&);
} // namespace spv

#endif // header


# -*- coding: utf-8 -*-

from asyncio import run, gather
import ccxt.pro

print('CCXT Version:', ccxt.__version__)

async def exchange_loop(exchange_id, symbols):
    exchange = getattr(ccxt.pro, exchange_id)()
    markets = await exchange.load_markets()
    await gather(*[watch_ticker_loop(exchange, symbol) for symbol in symbols])
    await exchange.close()

async def watch_ticker_loop(exchange, symbol):
    # exchange.verbose = True  # uncomment for debugging purposes if necessary
    while True:
        try:
            ticker = await exchange.watch_ticker(symbol)
            now = exchange.milliseconds()
            print(exchange.iso8601(now), exchange.id, symbol, 'bid:', ticker['bid'], 'ask:', ticker['ask'], 'last:', ticker['last'], 'on', ticker['datetime'])
        except Exception as e:
            print(str(e))
            # raise e  # uncomment to break all loops in case of an error in any one of them
            break  # you can break just this one loop if it fails

async def main():
    exchanges = {
        'binance': [ 'BTC/USDT', 'ETH/USDT' ],
        'ftx': [ 'BTC/USD', 'ETH/USD' ],
    }
    loops = [exchange_loop(exchange_id, symbols) for exchange_id, symbols in exchanges.items()]
    await gather(*loops)

run(main())


 $a0 = 00000000
/* 00444 808B8D54 0C00B55C */  jal     Actor_Kill

/* 00448 808B8D58 02002025 */  or      $a0, $s0, $zero            ## $a0 = 00000000
/* 0044C 808B8D5C 10000008 */  beq     $zero, $zero, .L808B8D80
/* 00450 808B8D60 8FBF001C */  lw      $ra, 0x001C($sp)
.L808B8D64:
/* 00454 808B8D64 0C22E332 */  jal     func_808B8CC8
/* 00458 808B8D68 8FA50024 */  lw      $a1, 0x0024($sp)
/* 0045C 808B8D6C 54400004 */  bnel    $v0, $zero, .L808B8D80
/* 00460 808B8D70 8FBF001C */  lw      $ra, 0x001C($sp)
/* 00464 808B8D74 0C00B55C */  jal     Actor_Kill

/* 00468 808B8D78 02002025 */  or      $a0, $s0, $zero            ## $a0 = 00000000
/* 0046C 808B8D7C 8FBF001C */  lw      $ra, 0x001C($sp)
.L808B8D80:
/* 00470 808B8D80 8FB00018 */  lw      $s0, 0x0018($sp)
/* 00474 808B8D84 27BD0020 */  addiu   $sp, $sp, 0x0020           ## $sp = 00000000
/* 00478 808B8D88 03E00008 */  jr      $ra
/* 0047C 808B8D8C 00000000 */  nop


GCD value by 2
                        freq[x] -= 2;
                    }
                }
            }
        }

        printArr(brr, size);
    }

    // reverse array
    public static void reverse(int []input)
    {
        int last = input.Length - 1;
        int middle = input.Length / 2;
        for (int i = 0; i <= middle; i++)
        {
            int temp = input[i];
            input[i] = input[last - i];
            input[last - i] = temp;
        }
    }

    static int __gcd(int a, int b)
    {
        if (b == 0)
        {
            return a;
        }
        return __gcd(b, a % b);

    }

    // Driver code
    public static void Main(String[] args)
    {
        int []arr = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
            1, 1, 1, 5, 5, 5, 7, 10, 12, 2, 2};
        int n = arr.Length;
        findNumbers(arr, n);
    }
}

/* This code contributed by PrinciRaj1992 */
```

## 服务器端编程语言（Professional Hypertext Preprocessor 的缩写）

```
<?php
// PHP implementation of the approach
function gcd($a, $b)
{
    return ($a % $b) ? gcd($b, $a % $b) : $b;
}

// Utility function to print
// the contents of an array
function printArr($arr, $n)
{
    for ($i = 0; $i < $n; $i++)
        echo $arr[$i], " ";
}

// Function to find the required numbers
function findNumbers($arr, $n)
{

    // Sort array in decreasing order
    rsort($arr);

    $freq = array_fill(0, $arr[0] + 1, 0);

    // Count frequency of each element
    for ($i = 0; $i < $n; $i++)
        $freq[$arr[$i]]++;

    // Size of the resultant array
    $size = floor(sqrt($n));
    $brr = array_fill(0, $size, 0);
    $l = 0;

    for ($i = 0; $i < $n; $i++)
    {
        if ($freq[$arr[$i]] > 0)
        {

            // Store the highest element in
            // the resultant array
            $brr[$l] = $arr[$i];

            // Decrement the frequency of that element
            $freq[$brr[$l]]--;
            $l++;
            for ($j = 0; $j < $l; $j++)
            {
                if ($i != $j)
                {

                    // Compute GCD
                    $x = gcd($arr[$i], $brr[$j]);

                    // Decrement GCD value by 2
                    $freq[$x] -= 2;
                }
            }
        }
    }

    printArr($brr, $size);
}

// Driver code
$arr = array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
             1, 1, 1, 1, 5, 5, 5, 7, 10, 12, 2, 2 );
$n = count($arr) ;
findNumbers($arr, $n);

// This code is contributed by Ryuga
?>
```

## java 描述语言

```
<script>

// Javascript implementation for above approach

// Utility function to print
// the contents of an array
function printArr(arr, n)
{
    for(let i = 0; i < n;