问:
Error: Requires permission android.permission.BIND_VPN_SERVICE with Error: Package has not requested permission android.permission.BIND_VPN_SERVICE

Context

While trying to launch a tor service in Orbot, on a rooted phone, I am encountering some difficulties.

When I try to launch the tor connection with:

```<code>adb shell am startservice -n org.torproject.android/.service.OrbotService
</code>```

I get error:

```<code>Starting service: Intent { cmp=org.torproject.android/.service.OrbotService }
Error: Requires permission android.permission.BIND_VPN_SERVICE
</code>```

Yet when I try to set that permission with:

```<code>adb shell pm grant org.torproject.android android.permission.BIND_VPN_SERVICE
</code>```

It throws error:

```<code>Security exception: Package org.torproject.android has not requested permission android.permission.BIND_VPN_SERVICE

java.lang.SecurityException: Package org.torproject.android has not requested permission android.permission.BIND_VPN_SERVICE
    at com.android.server.pm.permission.BasePermission.enforceDeclaredUsedAndRuntimeOrDevelopment(BasePermission.java:444)
    at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:2238)
    at com.android.server.pm.permission.PermissionManagerService.access$1100(PermissionManagerService.java:122)
    at com.android.server.pm.permission.PermissionManagerService$PermissionManagerServiceInternalImpl.grantRuntimePermission(PermissionManagerService.java:3239)
    at com.android.server.pm.PackageManagerService.grantRuntimePermission(PackageManagerService.java:5788)
    at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:1955)
    at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:230)
    at android.os.ShellCommand.exec(ShellCommand.java:104)
    at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21952)
    at android.os.Binder.shellCommand(Binder.java:881)
    at android.os.Binder.onTransact(Binder.java:765)
    at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4876)
    at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4049)
    at android.os.Binder.execTransactInternal(Binder.java:1021)
    at android.os.Binder.execTransact(Binder.java:994)
</code>```

Based on this answer I should create the request in the AndroidManifest.xml of the Orbot .apk file, however, I am not compiling the apk, the apk is already pre-installed from a store, and I would expect the request for the permission to be stored when I try to launch the service. (Such that it recongises the previous request for permmission when I try to set it).

Question

How can I start the service and set the required permission successfully using adb?

Body:
Context

While trying to launch a tor service in Orbot, on a rooted phone, I am encountering some difficulties.

When I try to launch the tor connection with:

adb shell am startservice -n org.torproject.android/.service.OrbotService

I get error:

Starting service: Intent { cmp=org.torproject.android/.service.OrbotService }
Error: Requires permission android.permission.BIND_VPN_SERVICE

Yet when I try to set that permission with:

adb shell pm grant org.torproject.android android.permission.BIND_VPN_SERVICE

It throws error:

Security exception: Package org.torproject.android has not requested permission android.permission.BIND_VPN_SERVICE

java.lang.SecurityException: Package org.torproject.android has not requested permission android.permission.BIND_VPN_SERVICE
    at com.android.server.pm.permission.BasePermission.enforceDeclaredUsedAndRuntimeOrDevelopment(BasePermission.java:444)
    at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:2238)
    at com.android.server.pm.permission.PermissionManagerService.access$1100(PermissionManagerService.java:122)
    at com.android.server.pm.permission.PermissionManagerService$PermissionManagerServiceInternalImpl.grantRuntimePermission(PermissionManagerService.java:3239)
    at com.android.server.pm.PackageManagerService.grantRuntimePermission(PackageManagerService.java:5788)
    at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:1955)
    at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:230)
    at android.os.ShellCommand.exec(ShellCommand.java:104)
    at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21952)
    at android.os.Binder.shellCommand(Binder.java:881)
    at android.os.Binder.onTransact(Binder.java:765)
    at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4876)
    at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4049)
    at android.os.Binder.execTransactInternal(Binder.java:1021)
    at android.os.Binder.execTransact(Binder.java:994)

Based on this answer I should create the request in the AndroidManifest.xml of the Orbot .apk file, however, I am not compiling the apk, the apk is already pre-installed from a store, and I would expect the request for the permission to be stored when I try to launch the service. (Such that it recongises the previous request for permmission when I try to set it).

Question

How can I start the service and set the required permission successfully using adb?


来源: stackexchange

问:
how to insert text or table to google doc in python?
i have this code

```<code>def google_doc_simple_example():
    from oauth2client import service_account
    from googleapiclient import discovery
    scopes = ['https://www.googleapis.com/auth/documents']
    credentials  = {'my sa credendtials'}
    credentials = service_account.ServiceAccountCredentials.from_json_keyfile_dict(credentials, scopes=scopes)
    service = discovery.build('docs', 'v1', credentials=credentials)
    document_id = "valid_document_id"
    text = 'This is the new text I want to insert.'

    # Insert the text at the end of the document.
    request = service.documents().batchUpdate(documentId=document_id, body={
        'requests': [{
            'insertText': {
                'location': {
                    'index': len(text)
                },
                'text': text
            }
        }]
    })
    response = request.execute()
</code>```

which suppose to write to the file i uploaded to drive (odt file, i tried with docx file too) but i get this exception :

```<code>  File "..python3.9/site-packages/googleapiclient/http.py", line 938, in execute
    raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 400 when requesting https://docs.googleapis.com/v1/documents/1vYtRvKNCu5Bcr-z2JDgV9FFlEPWa1vE-:batchUpdate?alt=json returned "Request contains an invalid argument.". Details: "Request contains an invalid argument.">
</code>```

does someone know what it means ? is there is something not correct i am doing i am suppose to be able to edit doc file on drive? or maybe its credentials issue ?

ContentLicense: CC BY-SA 4.0

Body:
i have this code

def google_doc_simple_example():
    from oauth2client import service_account
    from googleapiclient import discovery
    scopes = ['https://www.googleapis.com/auth/documents']
    credentials  = {'my sa credendtials'}
    credentials = service_account.ServiceAccountCredentials.from_json_keyfile_dict(credentials, scopes=scopes)
    service = discovery.build('docs', 'v1', credentials=credentials)
    document_id = "valid_document_id"
    text = 'This is the new text I want to insert.'

    # Insert the text at the end of the document.
    request = service.documents().batchUpdate(documentId=document_id, body={
        'requests': [{
            'insertText': {
                'location': {
                    'index': len(text)
                },
                'text': text
            }
        }]
    })
    response = request.execute()

which suppose to write to the file i uploaded to drive (odt file, i tried with docx file too) but i get this exception :

  File "..python3.9/site-packages/googleapiclient/http.py", line 938, in execute
    raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 400 when requesting https://docs.googleapis.com/v1/documents/1vYtRvKNCu5Bcr-z2JDgV9FFlEPWa1vE-:batchUpdate?alt=json returned "Request contains an invalid argument.". Details: "Request contains an invalid argument.">

does someone know what it means ? is there is something not correct i am doing i am suppose to be able to edit doc file on drive? or maybe its credentials issue ?


问:
Person detection with counter display using OpenCV, and YOLOv5
I'm new to computer vision and I wanted to create something that detects people and at the same time displays the counter of the people detected from a live feed camera source or a webcam for example.

This is my code.

```<code>import cv2
import torch
import torchvision

model = torch.hub.load('ultralytics/yolov5', 'yolov5s')

camera = cv2.VideoCapture(0)

font = cv2.FONT_HERSHEY_SIMPLEX

person_count = 0

while True:

    _, frame = camera.read()

    frame = cv2.resize(frame, (640, 640))
    frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
    frame = torch.tensor(frame).permute(2, 0, 1)
    frame = frame.unsqueeze(0)

    output = model(frame)[0]

    boxes = output[0]['boxes']
    labels = output[0]['labels']

    for box, label in zip(boxes, labels):

        if label == 0:
            person_count += 1

        cv2.rectangle(frame, (box[0], box[1]), (box[2], box[3]), (255, 0, 0), 2)

    cv2.putText(frame, f"Person count: {person_count}", (10, 50), font, 1, (255, 255, 255), 2, cv2.LINE_AA)

    cv2.imshow("Camera", frame)

    key = cv2.waitKey(1)
    if key == 27:
        break

camera.release()
cv2.destroyAllWindows()
</code>```

However I encountered some problem in this code "boxes = output[0]['boxes']"
the error is this     boxes = output['boxes']
IndexError: too many indices for tensor of dimension 1.

I need help figuring out how to make this work. I would appreciate any ideas thanks!

I have not tried anything however i'm stuck at this for hours and I just wanted to make this program work.

Body:
I'm new to computer vision and I wanted to create something that detects people and at the same time displays the counter of the people detected from a live feed camera source or a webcam for example.

This is my code.

import cv2
import torch
import torchvision

model = torch.hub.load('ultralytics/yolov5', 'yolov5s')

camera = cv2.VideoCapture(0)

font = cv2.FONT_HERSHEY_SIMPLEX

person_count = 0

while True:

    _, frame = camera.read()

    frame = cv2.resize(frame, (640, 640))
    frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
    frame = torch.tensor(frame).permute(2, 0, 1)
    frame = frame.unsqueeze(0)

    output = model(frame)[0]

    boxes = output[0]['boxes']
    labels = output[0]['labels']

    for box, label in zip(boxes, labels):

        if label == 0:
            person_count += 1

        cv2.rectangle(frame, (box[0], box[1]), (box[2], box[3]), (255, 0, 0), 2)

    cv2.putText(frame, f"Person count: {person_count}", (10, 50), font, 1, (255, 255, 255), 2, cv2.LINE_AA)

    cv2.imshow("Camera", frame)

    key = cv2.waitKey(1)
    if key == 27:
        break

camera.release()
cv2.destroyAllWindows()

However I encountered some problem in this code "boxes = output[0]['boxes']"
the error is this     boxes = output['boxes']
IndexError: too many indices for tensor of dimension 1.

I need help figuring out how to make this work. I would appreciate any ideas thanks!

I have not tried anything however i'm stuck at this for hours and I just wanted to make this program work.


问:
Django - Pass Form data in URL
I want to pass the forms data to another view (if possibleby GET params)

```<code>def post(self, request):
        form = SomeForm(request.POST)
        if form.is_valid():
            response = HttpResponse(reverse('page_to_go'))
</code>```

How can I accomplish that?

Title: Django - Pass Form data in URL

Body:
I want to pass the forms data to another view (if possibleby GET params)

def post(self, request):
        form = SomeForm(request.POST)
        if form.is_valid():
            response = HttpResponse(reverse('page_to_go'))

How can I accomplish that?


问:
how to create transparent overlay CSS
I want to create Something like this Special Arc Buttons through css and i have done something like this

HTML

```<code><div class="main-button">
<span class="text-in">GRAPHIC DESIGN</span>

</div>
</code>```

CSS

```<code>
.main-button {
       border-top-right-radius: 50%;
    border-top-left-radius: 50%;
    background-color: transparent;
    border: solid 1px black;
    width: 100px;
    height: 100px;
    margin: 0 auto;
    border-bottom: none;
    position: relative;
}

span.text-in {
      font-family: 'Playfair Display';
    font-weight: 600;
    position: absolute;
    bottom: 0;
    left: -4px;
    /* right: 44px; */
    background: transparent;
    z-index: 5;
}

</code>```

don't know if there's css property to small the height of left border or text come above the border so that it won't  appear like this or https://jsfiddle.net/az30xfkL/

Title: how to create transparent overlay CSS

Body:
I want to create Something like this Special Arc Buttons through css and i have done something like this

HTML

GRAPHIC DESIGN

CSS

.main-button {
       border-top-right-radius: 50%;
    border-top-left-radius: 50%;
    background-color: transparent;
    border: solid 1px black;
    width: 100px;
    height: 100px;
    margin: 0 auto;
    border-bottom: none;
    position: relative;
}

span.text-in {
      font-family: 'Playfair Display';
    font-weight: 600;
    position: absolute;
    bottom: 0;
    left: -4px;
    /* right: 44px; */
    background: transparent;
    z-index: 5;
}

don't know if there's css property to small the height of left border or text come above the border so that it won't  appear like this or https://jsfiddle.net/az30xfkL/


问:
How to have different codebase and assets for different flavor in Flutter?
I have two Android app which uses same code base. In Android native, i can use the different resource folder for each android flavor. Also i can use gradle property of sourceSets to define source and resource folder for flavors. This helps to minimize the apk size.

How can achieve the same in flutter?

I am able to create the different flavor in flutter but the flutter codebase and assests would be common for all flavors.


问:
Incorrect range input state persists after page refresh
I'm working on my range input component, but I don't understand what's wrong (img 4).

After refreshing the page, it does not reset the results, but saves them incorrectly, not displaying the progress, or vice versa filling it all (the second input), what could be the problem?

On local server:

On local server after page refresh:

In production:

❗ In production after page refresh:

Why is he doing this? Nothing is stored in the local storage.

The code (top range input):

```<code>import { useCallback, useEffect, useRef, useState } from "react";

function Slider({ min, max, onChange }) {
  const [value, setValue] = useState(0);
  const minValRef = useRef(min);
  const range = useRef(null);

  // Convert to percentage
  const getPercent = useCallback(
    (value) => Math.round(((value - min) / (max - min)) * 100),
    [value]
  );

  // Set width of the range to decrease from the left side
  useEffect(() => {
    const maxPercent = getPercent(value);
    const minPercent = getPercent(minValRef.current);

    if (range.current) {
      range.current.style.width = `${maxPercent - minPercent}%`;
    }
  }, [value, getPercent]);

  // Get values when their state changes
  useEffect(() => {
    onChange({ min: value });
  }, [value, onChange]);

  //Tooltips
  useEffect(() => {
    const range = document.getElementById("range");
    const tooltip = document.getElementById("tooltip");

    let thumbSize = 10;
    const ratio = (range.value - range.min) / (range.max - range.min);
    let amountToMove =
      ratio * (range.offsetWidth - thumbSize - thumbSize) + thumbSize;
    tooltip.style.left = amountToMove + "px";
  }, [value]);

  return (
    <>
      <div className="relative flex h-[24px] w-full items-center">
        <input
          className="relative flex h-[6px] w-full appearance-none rounded-full bg-blue-100 dark:bg-gray-700"
          aria-valuemin={0}
          type="range"
          min="0"
          max="100"
          value={value}
          id="range"
          onChange={({ target: { value: radius } }) => {
            setValue(radius);
          }}
        />

        <div
          ref={range}
          className="absolute top-[9px] z-10 h-[6px] w-1 rounded-full bg-blue-400"
        />

        <div
          id="tooltip"
          className={`${
            value > 0 ? "visible" : "invisible"
          } absolute top-[-40px] flex h-[32px] w-[32px] -translate-x-1/2 items-center justify-center rounded-full bg-gray-700 align-middle text-body-small text-white`}
        >
          <div className="absolute bottom-[-5px] flex">
            <div className="border-l-[10px] border-t-[8.5px] border-r-[10px] border-l-transparent border-t-gray-700 border-r-transparent"></div>
          </div>
          {value}
        </div>
      </div>
    </>
  );
}

export { Slider };

</code>```

Body:
I'm working on my range input component, but I don't understand what's wrong (img 4).

After refreshing the page, it does not reset the results, but saves them incorrectly, not displaying the progress, or vice versa filling it all (the second input), what could be the problem?

On local server:

On local server after page refresh:

In production:

❗ In production after page refresh:

Why is he doing this? Nothing is stored in the local storage.

The code (top range input):

import { useCallback, useEffect, useRef, useState } from "react";

function Slider({ min, max, onChange }) {
  const [value, setValue] = useState(0);
  const minValRef = useRef(min);
  const range = useRef(null);

  // Convert to percentage
  const getPercent = useCallback(
    (value) => Math.round(((value - min) / (max - min)) * 100),
    [value]
  );

  // Set width of the range to decrease from the left side
  useEffect(() => {
    const maxPercent = getPercent(value);
    const minPercent = getPercent(minValRef.current);

    if (range.current) {
      range.current.style.width = `${maxPercent - minPercent}%`;
    }
  }, [value, getPercent]);

  // Get values when their state changes
  useEffect(() => {
    onChange({ min: value });
  }, [value, onChange]);

  //Tooltips
  useEffect(() => {
    const range = document.getElementById("range");
    const tooltip = document.getElementById("tooltip");

    let thumbSize = 10;
    const ratio = (range.value - range.min) / (range.max - range.min);
    let amountToMove =
      ratio * (range.offsetWidth - thumbSize - thumbSize) + thumbSize;
    tooltip.style.left = amountToMove + "px";
  }, [value]);

  return (
    <>

        <input
          className="relative flex h-[6px] w-full appearance-none rounded-full bg-blue-100 dark:bg-gray-700"
          aria-valuemin={0}
          type="range"
          min="0"
          max="100"
          value={value}
          id="range"
          onChange={({ target: { value: radius } }) => {
            setValue(radius);
          }}
        />

 0 ? "visible" : "invisible"
          } absolute top-[-40px] flex h-[32px] w-[32px] -translate-x-1/2 items-center justify-center rounded-full bg-gray-700 align-middle text-body-small text-white`}
        >

          {value}

    </>
  );
}

export { Slider };


问:
How to swipe through 3 or more points using ADB?
I'm trying to make a script to play a game called "Words of Wonder" which involves swiping through letters on the screen to fill a crossword.

i tried

```<code>adb shell  "input touchscreen swipe x1 y1 x2 y2 & input command touchscreen swipe x2 y2 x3 y3"
</code>```

but it resulted two swipes instead of one continuous swipe

Body:
I'm trying to make a script to play a game called "Words of Wonder" which involves swiping through letters on the screen to fill a crossword.

i tried

adb shell  "input touchscreen swipe x1 y1 x2 y2 & input command touchscreen swipe x2 y2 x3 y3"

but it resulted two swipes instead of one continuous swipe


问:
Ignite system-critical thread blocked
I have a 2 node Ignite cluster on dev environment. Version 2.9.0
I have enabled persistence in my data region configs. When I start cluster it runs fine. Now when I shutdown node one by one and restart them, to check if persistence is working alright, I see below errors in one of the nodes.

```<code>SEVERE: Blocked system-critical thread has been detected. This can lead to cluster-wide undefined behaviour [workerName=ttl-cleanup-worker, threadName=ttl-cleanup-worker-#44%Gemini.dev%, blockedFor=3079s]

[15:04:59] Possible failure suppressed accordingly to a configured handler [hnd=StopNodeOrHaltFailureHandler [tryStop=false, timeout=0, super=AbstractFailureHandler [ignoredFailureTypes=UnmodifiableSet [SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]], failureCtx=FailureContext [type=SYSTEM_WORKER_BLOCKED, err=class o.a.i.IgniteException: GridWorker [name=ttl-cleanup-worker, igniteInstanceName=Gemini.dev, finished=false, heartbeatTs=1672928019372]]]

Jan 05, 2023 3:05:08 PM org.apache.ignite.logger.java.JavaLogger error
SEVERE: Blocked system-critical thread has been detected. This can lead to cluster-wide undefined behaviour [workerName=sys-stripe-0, threadName=sys-stripe-0-#1%Gemini.dev%, blockedFor=2490s]

[15:05:08] Possible failure suppressed accordingly to a configured handler [hnd=StopNodeOrHaltFailureHandler [tryStop=false, timeout=0, super=AbstractFailureHandler [ignoredFailureTypes=UnmodifiableSet [SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]], failureCtx=FailureContext [type=SYSTEM_WORKER_BLOCKED, err=class o.a.i.IgniteException: GridWorker [name=sys-stripe-0, igniteInstanceName=Gemini.dev, finished=false, heartbeatTs=1672928617333]]]

Jan 05, 2023 3:05:08 PM org.apache.ignite.logger.java.JavaLogger error
SEVERE: Blocked system-critical thread has been detected. This can lead to cluster-wide undefined behaviour [workerName=sys-stripe-6, threadName=sys-stripe-6-#7%Gemini.dev%, blockedFor=2506s]

[15:05:08] Possible failure suppressed accordingly to a configured handler [hnd=StopNodeOrHaltFailureHandler [tryStop=false, timeout=0, super=AbstractFailureHandler [ignoredFailureTypes=UnmodifiableSet [SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]], failureCtx=FailureContext [type=SYSTEM_WORKER_BLOCKED, err=class o.a.i.IgniteException: GridWorker [name=sys-stripe-6, igniteInstanceName=Gemini.dev, finished=false, heartbeatTs=1672928602019]]]

Jan 05, 2023 3:05:17 PM org.apache.ignite.logger.java.JavaLogger error
SEVERE: Blocked system-critical thread has been detected. This can lead to cluster-wide undefined behaviour [workerName=db-checkpoint-thread, threadName=db-checkpoint-thread-#105%Gemini.dev%, blockedFor=3098s]

[15:05:17] Possible failure suppressed accordingly to a configured handler [hnd=StopNodeOrHaltFailureHandler [tryStop=false, timeout=0, super=AbstractFailureHandler [ignoredFailureTypes=UnmodifiableSet [SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]], failureCtx=FailureContext [type=SYSTEM_WORKER_BLOCKED, err=class o.a.i.IgniteException: GridWorker [name=db-checkpoint-thread, igniteInstanceName=Gemini.dev, finished=false, heartbeatTs=1672928018434]]]
</code>```

When these errors are shown some caches of cluster become unresponsive. I am attaching entire Ignite config at the end.

I also tried observing persistence related metrics, but I don't see any in JConsole in "Persistent Storage" section. As you can see in my config I have set metricsEnabled=true in DR configs.

I took a threaddump too. Although I am unable to make out anything from it. There are many threads which are in WAITING(parking) state. Here is one snippet from it.

```<code>"db-checkpoint-thread-#105%Gemini.dev%" #165 prio=5 os_prio=0 cpu=86.94ms elapsed=2085.34s tid=0x00007f9a5c138000 nid=0x3d3b waiting on condition  [0x00007f7eabf7c000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@11.0.17/Native Method)
        - parking to wait for  <0x00000004018cc220> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
        at java.util.concurrent.locks.LockSupport.park(java.base@11.0.17/LockSupport.java:194)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(java.base@11.0.17/AbstractQueuedSynchronizer.java:885)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(java.base@11.0.17/AbstractQueuedSynchronizer.java:917)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(java.base@11.0.17/AbstractQueuedSynchronizer.java:1240)
        at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(java.base@11.0.17/ReentrantReadWriteLock.java:959)
</code>```

Some lines are cut to keep post under size limit

Below is my entire Ignite server config.

```<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util"
       xmlns="http://www.springframework.org/schema/beans"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/util
        http://www.springframework.org/schema/util/spring-util.xsd">

  <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_FALLBACK"/>
    <property name="searchSystemEnvironment" value="true"/>
  </bean>

  <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">

    <property name="sslContextFactory">
      <bean class="org.apache.ignite.ssl.SslContextFactory">
          <property name="keyStoreFilePath" value="/home/sysSvcDevOps/ssl/ignite1.keystore.jks"/>
          <property name="keyStorePassword" value="KeyStore443"/>
          <property name="keyStoreType" value="jks"/>
          <property name="trustStoreFilePath" value="/home/sysSvcDevOps/ssl/cacerts/java.cacerts.jks"/>
          <property name="trustStorePassword" value="changeit"/>
          <property name="trustStoreType" value="jks"/>
      </bean>
    </property>
    <property name="igniteInstanceName" value=".dev"/>
    <property name="consistentId" value="ignite1.dev"/>
    <property name="workDirectory" value="/apps/Svc/dev/Ignite/IgniteData/persistentstore/work"/>

      <property name="rebalanceThreadPoolSize" value="8"/>
      <property name="publicThreadPoolSize" value="32"/>
      <property name="systemThreadPoolSize" value="64"/>
      <property name="queryThreadPoolSize" value="64"/>
      <property name="failureDetectionTimeout" value="30000"/>
      <property name="authenticationEnabled" value="true"/>
      <property name="metricsUpdateFrequency" value="30000"/>
      <property name="peerClassLoadingEnabled" value="false"/>
      <property name="clientMode" value="false"/>

    <property name="includeEventTypes">
      <list>
        <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_STARTED"/>
        <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_STOPPED"/>
        <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_REBALANCE_PART_DATA_LOST"/>
        <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_NODES_LEFT"/>
      </list>
    </property>

    <property name="dataStorageConfiguration">
      <bean class="org.apache.ignite.configuration.DataStorageConfiguration">

        <property name="walSegmentSize" value="1073741824"/>
          <property name="walSegments" value="20"/>
          <property name="maxWalArchiveSize" value="10737418240"/>
          <property name="walCompactionEnabled" value="true"/>
          <property name="walCompactionLevel" value="4"/>
          <property name="checkpointFrequency" value="300000"/>
          <property name="checkpointThreads" value="16"/>
          <property name="checkpointReadLockTimeout" value="60000"/>
          <property name="lockWaitTime" value="45000"/>
          <property name="checkpointWriteOrder" value="RANDOM"/>
          <property name="pageSize" value="4096"/>
          <property name="writeThrottlingEnabled" value="true"/>

        <property name="walPath" value="/apps/Svc/dev/Ignite/IgniteData"/>
        <property name="walArchivePath" value="/apps/Svc/dev/Ignite/IgniteDataArchive"/>
        <property name="storagePath" value="/apps/Svc/dev/Ignite/IgniteData/archive"/>

        <property name="dataRegionConfigurations">
          <list>
                <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
                    <property name="name" value="dr.dev.referencedata"/>
                    <property name="persistenceEnabled" value="true"/>
                    <property name="initialSize" value="1073741824"/>
                    <property name="maxSize" value="4294969673"/>
                    <property name="checkpointPageBufferSize" value="1073741824"/>
                </bean>
                <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
                    <property name="name" value="dr.dev.input"/>
                    <property name="persistenceEnabled" value="true"/>
                    <property name="metricsEnabled" value="true"/>
                    <property name="checkpointPageBufferSize" value="#{4 * 1024 * 1024 * 1024}"/>
                    <property name="initialSize" value="12884901888"/>
                    <property name="maxSize" value="81604378624"/>
                    <property name="pageEvictionMode" value="RANDOM_2_LRU"/>
                </bean>
                <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
                    <property name="name" value="dr.dev.input.exception"/>
                    <property name="persistenceEnabled" value="true"/>
                    <property name="metricsEnabled" value="true"/>
                    <property name="checkpointPageBufferSize" value="#{4 * 1024 * 1024 * 1024}"/>
                    <property name="initialSize" value="4294967296"/>
                    <property name="maxSize" value="21474836480"/>
                    <property name="pageEvictionMode" value="RANDOM_2_LRU"/>
                </bean>
                <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
                    <property name="name" value="dr.dev.output"/>
                    <property name="initialSize" value="1073741824"/>
                    <property name="persistenceEnabled" value="true"/>
                    <property name="metricsEnabled" value="true"/>
                    <property name="checkpointPageBufferSize" value="#{2 * 1024 * 1024 * 1024}"/>
                    <property name="maxSize" value="2147483648"/>
                </bean>
          </list>
        </property>

        <property name="defaultDataRegionConfiguration">
          <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
              <property name="name" value="default_region"/>
              <property name="persistenceEnabled" value="true"/>
              <property name="initialSize" value="268435456"/>
              <property name="maxSize" value="268435456"/>

          </bean>
        </property>
      </bean>
    </property>

    <property name="discoverySpi">
      <bean class="org.apache.ignite.spi.discovery.zk.ZookeeperDiscoverySpi">
        <property name="zkConnectionString" value="zk1.intranet.com:22001,zk2.intranet.com:22001"/>
          <property name="zkRootPath" value="/ignite"/>
          <property name="sessionTimeout" value="120000"/>
          <property name="joinTimeout" value="10000"/>
      </bean>
    </property>

    <property name="communicationSpi">
      <bean class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
          <property name="socketWriteTimeout" value="60000"/>
      </bean>
    </property>

    <property name="cacheConfiguration">
      <list>
          <bean id="cache-template-bean" abstract="true"
                class="org.apache.ignite.configuration.CacheConfiguration">
              <property name="name" value="referenceDataCacheTemplate*"/>
              <property name="cacheMode" value="REPLICATED"/>
              <property name="backups" value="1"/>
              <property name="atomicityMode" value="ATOMIC"/>
              <property name="dataRegionName" value="dr.dev.referencedata"/>
              <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
              <property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
              <property name="statisticsEnabled" value="true"/>
              <property name="sqlIndexMaxInlineSize" value="203"/>
            <property name="affinity">
              <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
                  <property name="partitions" value="256"/>

              </bean>
            </property>
          </bean>
          <bean id="cache-template-bean" abstract="true"
                class="org.apache.ignite.configuration.CacheConfiguration">
              <property name="name" value="inputMetadataCacheTemplate*"/>
              <property name="cacheMode" value="PARTITIONED"/>
              <property name="backups" value="1"/>
              <property name="atomicityMode" value="ATOMIC"/>
              <property name="dataRegionName" value="dr.dev.input"/>
              <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
              <property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
              <property name="statisticsEnabled" value="true"/>
              <property name="readFromBackup" value="false"/>
              <property name="sqlIndexMaxInlineSize" value="211"/>
            <property name="affinity">
              <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
                  <property name="partitions" value="256"/>

                <property name="affinityBackupFilter">
                          <bean class="org.apache.ignite.cache.affinity.rendezvous.ClusterNodeAttributeAffinityBackupFilter">
                            <constructor-arg>
                                                  <array value-type="java.lang.String">
                                                  <value>RACK_ID</value>
                                                     </array>
                             </constructor-arg>
                          </bean>
                </property>

              </bean>
            </property>
              <property name="expiryPolicyFactory">
                <bean class="javax.cache.expiry.ModifiedExpiryPolicy" factory-method="factoryOf">
                  <constructor-arg>
                    <bean class="javax.cache.expiry.Duration">
                      <constructor-arg value="DAYS"/>
                      <constructor-arg value="5"/>
                    </bean>
                  </constructor-arg>
                </bean>
              </property>
          </bean>
          <bean id="cache-template-bean" abstract="true"
                class="org.apache.ignite.configuration.CacheConfiguration">
              <property name="name" value="inputReconCacheTemplate*"/>
              <property name="cacheMode" value="PARTITIONED"/>
              <property name="backups" value="1"/>
              <property name="atomicityMode" value="ATOMIC"/>
              <property name="dataRegionName" value="dr.dev.input"/>
              <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
              <property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
              <property name="statisticsEnabled" value="true"/>
              <property name="readFromBackup" value="false"/>
              <property name="sqlIndexMaxInlineSize" value="211"/>
            <property name="affinity">
              <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
                  <property name="partitions" value="256"/>

                <property name="affinityBackupFilter">
                          <bean class="org.apache.ignite.cache.affinity.rendezvous.ClusterNodeAttributeAffinityBackupFilter">
                            <constructor-arg>
                                                  <array value-type="java.lang.String">
                                                  <value>RACK_ID</value>
                                                     </array>
                             </constructor-arg>
                          </bean>
                </property>

              </bean>
            </property>
              <property name="expiryPolicyFactory">
                <bean class="javax.cache.expiry.CreatedExpiryPolicy" factory-method="factoryOf">
                  <constructor-arg>
                    <bean class="javax.cache.expiry.Duration">
                      <constructor-arg value="DAYS"/>
                      <constructor-arg value="4"/>
                    </bean>
                  </constructor-arg>
                </bean>
              </property>
          </bean>
          <bean id="cache-template-bean" abstract="true"
                class="org.apache.ignite.configuration.CacheConfiguration">
              <property name="name" value="inputExceptionsCacheTemplate*"/>
              <property name="cacheMode" value="PARTITIONED"/>
              <property name="backups" value="1"/>
              <property name="atomicityMode" value="ATOMIC"/>
              <property name="dataRegionName" value="dr.dev.input.exception"/>
              <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
              <property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
              <property name="statisticsEnabled" value="true"/>
              <property name="readFromBackup" value="false"/>
            <property name="affinity">
              <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
                  <property name="partitions" value="256"/>

                <property name="affinityBackupFilter">
                          <bean class="org.apache.ignite.cache.affinity.rendezvous.ClusterNodeAttributeAffinityBackupFilter">
                            <constructor-arg>
                                                  <array value-type="java.lang.String">
                                                  <value>RACK_ID</value>
                                                     </array>
                             </constructor-arg>
                          </bean>
                </property>

              </bean>
            </property>
              <property name="expiryPolicyFactory">
                <bean class="javax.cache.expiry.CreatedExpiryPolicy" factory-method="factoryOf">
                  <constructor-arg>
                    <bean class="javax.cache.expiry.Duration">
                      <constructor-arg value="DAYS"/>
                      <constructor-arg value="15"/>
                    </bean>
                  </constructor-arg>
                </bean>
              </property>
          </bean>
          <bean id="cache-template-bean" abstract="true"
                class="org.apache.ignite.configuration.CacheConfiguration">
              <property name="name" value="outputDataCacheTemplate*"/>
              <property name="cacheMode" value="PARTITIONED"/>
              <property name="backups" value="1"/>
              <property name="atomicityMode" value="ATOMIC"/>
              <property name="dataRegionName" value="dr.dev.output"/>
              <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
              <property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
              <property name="sqlSchema" value=""/>
              <property name="statisticsEnabled" value="true"/>
            <property name="affinity">
              <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
                  <property name="partitions" value="256"/>

                <property name="affinityBackupFilter">
                          <bean class="org.apache.ignite.cache.affinity.rendezvous.ClusterNodeAttributeAffinityBackupFilter">
                            <constructor-arg>
                                                  <array value-type="java.lang.String">
                                                  <value>RACK_ID</value>
                                                     </array>
                             </constructor-arg>
                          </bean>
                </property>

              </bean>
            </property>
              <property name="expiryPolicyFactory">
                <bean class="javax.cache.expiry.CreatedExpiryPolicy" factory-method="factoryOf">
                  <constructor-arg>
                    <bean class="javax.cache.expiry.Duration">
                      <constructor-arg value="DAYS"/>
                      <constructor-arg value="450"/>
                    </bean>
                  </constructor-arg>
                </bean>
              </property>
          </bean>
          <bean id="cache-template-bean" abstract="true"
                class="org.apache.ignite.configuration.CacheConfiguration">
              <property name="name" value="reconAuditDataCacheTemplate*"/>
              <property name="cacheMode" value="PARTITIONED"/>
              <property name="backups" value="1"/>
              <property name="atomicityMode" value="ATOMIC"/>
              <property name="dataRegionName" value="dr.dev.referencedata"/>
              <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
              <property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
              <property name="sqlSchema" value=""/>
              <property name="statisticsEnabled" value="true"/>
            <property name="affinity">
              <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
                  <property name="partitions" value="256"/>

                <property name="affinityBackupFilter">
                          <bean class="org.apache.ignite.cache.affinity.rendezvous.ClusterNodeAttributeAffinityBackupFilter">
                            <constructor-arg>
                                                  <array value-type="java.lang.String">
                                                  <value>RACK_ID</value>
                                                     </array>
                             </constructor-arg>
                          </bean>
                </property>

              </bean>
            </property>
          </bean>
          <bean id="cache-template-bean" abstract="true"
                class="org.apache.ignite.configuration.CacheConfiguration">
              <property name="name" value="fileDataCacheTemplate*"/>
              <property name="cacheMode" value="PARTITIONED"/>
              <property name="backups" value="1"/>
              <property name="atomicityMode" value="ATOMIC"/>
              <property name="dataRegionName" value="dr.dev.input"/>
              <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
              <property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
              <property name="statisticsEnabled" value="true"/>
              <property name="queryParallelism" value="4"/>
              <property name="eagerTtl" value="true"/>
            <property name="affinity">
              <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
                  <property name="partitions" value="256"/>

                <property name="affinityBackupFilter">
                          <bean class="org.apache.ignite.cache.affinity.rendezvous.ClusterNodeAttributeAffinityBackupFilter">
                            <constructor-arg>
                                                  <array value-type="java.lang.String">
                                                  <value>RACK_ID</value>
                                                     </array>
                             </constructor-arg>
                          </bean>
                </property>

              </bean>
            </property>
              <property name="expiryPolicyFactory">
                <bean class="javax.cache.expiry.CreatedExpiryPolicy" factory-method="factoryOf">
                  <constructor-arg>
                    <bean class="javax.cache.expiry.Duration">
                      <constructor-arg value="DAYS"/>
                      <constructor-arg value="5"/>
                    </bean>
                  </constructor-arg>
                </bean>
              </property>
          </bean>
          <bean id="cache-template-bean" abstract="true"
                class="org.apache.ignite.configuration.CacheConfiguration">
              <property name="name" value="shortLivedReferenceDataTemplate*"/>
              <property name="cacheMode" value="PARTITIONED"/>
              <property name="backups" value="1"/>
              <property name="atomicityMode" value="ATOMIC"/>
              <property name="dataRegionName" value="dr.dev.input.exception"/>
              <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
              <property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
              <property name="statisticsEnabled" value="true"/>
              <property name="managementEnabled" value="true"/>
            <property name="affinity">
              <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
                  <property name="partitions" value="64"/>

                <property name="affinityBackupFilter">
                          <bean class="org.apache.ignite.cache.affinity.rendezvous.ClusterNodeAttributeAffinityBackupFilter">
                            <constructor-arg>
                                                  <array value-type="java.lang.String">
                                                  <value>RACK_ID</value>
                                                     </array>
                             </constructor-arg>
                          </bean>
                </property>

              </bean>
            </property>
              <property name="expiryPolicyFactory">
                <bean class="javax.cache.expiry.CreatedExpiryPolicy" factory-method="factoryOf">
                  <constructor-arg>
                    <bean class="javax.cache.expiry.Duration">
                      <constructor-arg value="DAYS"/>
                      <constructor-arg value="2"/>
                    </bean>
                  </constructor-arg>
                </bean>
              </property>
          </bean>

      </list>
    </property>

    <property name="sqlSchemas">
      <list>
        <value>dataInput</value>
      </list>
    </property>

  </bean>
</beans>
```

Title: Ignite system-critical thread blocked

Body:
I have a 2 node Ignite cluster on dev environment. Version 2.9.0
I have enabled persistence in my data region configs. When I start cluster it runs fine. Now when I shutdown node one by one and restart them, to check if persistence is working alright, I see below errors in one of the nodes.

SEVERE: Blocked system-critical thread has been detected. This can lead to cluster-wide undefined behaviour [workerName=ttl-cleanup-worker, threadName=ttl-cleanup-worker-#44%Gemini.dev%, blockedFor=3079s]

[15:04:59] Possible failure suppressed accordingly to a configured handler [hnd=StopNodeOrHaltFailureHandler [tryStop=false, timeout=0, super=AbstractFailureHandler [ignoredFailureTypes=UnmodifiableSet [SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]], failureCtx=FailureContext [type=SYSTEM_WORKER_BLOCKED, err=class o.a.i.IgniteException: GridWorker [name=ttl-cleanup-worker, igniteInstanceName=Gemini.dev, finished=false, heartbeatTs=1672928019372]]]

Jan 05, 2023 3:05:08 PM org.apache.ignite.logger.java.JavaLogger error
SEVERE: Blocked system-critical thread has been detected. This can lead to cluster-wide undefined behaviour [workerName=sys-stripe-0, threadName=sys-stripe-0-#1%Gemini.dev%, blockedFor=2490s]

[15:05:08] Possible failure suppressed accordingly to a configured handler [hnd=StopNodeOrHaltFailureHandler [tryStop=false, timeout=0, super=AbstractFailureHandler [ignoredFailureTypes=UnmodifiableSet [SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]], failureCtx=FailureContext [type=SYSTEM_WORKER_BLOCKED, err=class o.a.i.IgniteException: GridWorker [name=sys-stripe-0, igniteInstanceName=Gemini.dev, finished=false, heartbeatTs=1672928617333]]]

Jan 05, 2023 3:05:08 PM org.apache.ignite.logger.java.JavaLogger error
SEVERE: Blocked system-critical thread has been detected. This can lead to cluster-wide undefined behaviour [workerName=sys-stripe-6, threadName=sys-stripe-6-#7%Gemini.dev%, blockedFor=2506s]

[15:05:08] Possible failure suppressed accordingly to a configured handler [hnd=StopNodeOrHaltFailureHandler [tryStop=false, timeout=0, super=AbstractFailureHandler [ignoredFailureTypes=UnmodifiableSet [SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]], failureCtx=FailureContext [type=SYSTEM_WORKER_BLOCKED, err=class o.a.i.IgniteException: GridWorker [name=sys-stripe-6, igniteInstanceName=Gemini.dev, finished=false, heartbeatTs=1672928602019]]]

Jan 05, 2023 3:05:17 PM org.apache.ignite.logger.java.JavaLogger error
SEVERE: Blocked system-critical thread has been detected. This can lead to cluster-wide undefined behaviour [workerName=db-checkpoint-thread, threadName=db-checkpoint-thread-#105%Gemini.dev%, blockedFor=3098s]

[15:05:17] Possible failure suppressed accordingly to a configured handler [hnd=StopNodeOrHaltFailureHandler [tryStop=false, timeout=0, super=AbstractFailureHandler [ignoredFailureTypes=UnmodifiableSet [SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]], failureCtx=FailureContext [type=SYSTEM_WORKER_BLOCKED, err=class o.a.i.IgniteException: GridWorker [name=db-checkpoint-thread, igniteInstanceName=Gemini.dev, finished=false, heartbeatTs=1672928018434]]]

When these errors are shown some caches of cluster become unresponsive. I am attaching entire Ignite config at the end.

I also tried observing persistence related metrics, but I don't see any in JConsole in "Persistent Storage" section. As you can see in my config I have set metricsEnabled=true in DR configs.

I took a threaddump too. Although I am unable to make out anything from it. There are many threads which are in WAITING(parking) state. Here is one snippet from it.

"db-checkpoint-thread-#105%Gemini.dev%" #165 prio=5 os_prio=0 cpu=86.94ms elapsed=2085.34s tid=0x00007f9a5c138000 nid=0x3d3b waiting on condition  [0x00007f7eabf7c000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@11.0.17/Native Method)
        - parking to wait for  <0x00000004018cc220> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
        at java.util.concurrent.locks.LockSupport.park(java.base@11.0.17/LockSupport.java:194)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(java.base@11.0.17/AbstractQueuedSynchronizer.java:885)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(java.base@11.0.17/AbstractQueuedSynchronizer.java:917)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(java.base@11.0.17/AbstractQueuedSynchronizer.java:1240)
        at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(java.base@11.0.17/ReentrantReadWriteLock.java:959)

Some lines are cut to keep post under size limit

Below is my entire Ignite server config.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util"
       xmlns="http://www.springframework.org/schema/beans"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/util
        http://www.springframework.org/schema/util/spring-util.xsd">

  <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_FALLBACK"/>
    <property name="searchSystemEnvironment" value="true"/>
  </bean>

  <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">

    <property name="sslContextFactory">
      <bean class="org.apache.ignite.ssl.SslContextFactory">
          <property name="keyStoreFilePath" value="/home/sysSvcDevOps/ssl/ignite1.keystore.jks"/>
          <property name="keyStorePassword" value="KeyStore443"/>
          <property name="keyStoreType" value="jks"/>
          <property name="trustStoreFilePath" value="/home/sysSvcDevOps/ssl/cacerts/java.cacerts.jks"/>
          <property name="trustStorePassword" value="changeit"/>
          <property name="trustStoreType" value="jks"/>
      </bean>
    </property>
    <property name="igniteInstanceName" value=".dev"/>
    <property name="consistentId" value="ignite1.dev"/>
    <property name="workDirectory" value="/apps/Svc/dev/Ignite/IgniteData/persistentstore/work"/>

      <property name="rebalanceThreadPoolSize" value="8"/>
      <property name="publicThreadPoolSize" value="32"/>
      <property name="systemThreadPoolSize" value="64"/>
      <property name="queryThreadPoolSize" value="64"/>
      <property name="failureDetectionTimeout" value="30000"/>
      <property name="authenticationEnabled" value="true"/>
      <property name="metricsUpdateFrequency" value="30000"/>
      <property name="peerClassLoadingEnabled" value="false"/>
      <property name="clientMode" value="false"/>

    <property name="includeEventTypes">
      <list>
        <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_STARTED"/>
        <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_STOPPED"/>
        <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_REBALANCE_PART_DATA_LOST"/>
        <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_NODES_LEFT"/>
      </list>
    </property>

    <property name="dataStorageConfiguration">
      <bean class="org.apache.ignite.configuration.DataStorageConfiguration">

        <property name="walSegmentSize" value="1073741824"/>
          <property name="walSegments" value="20"/>
          <property name="maxWalArchiveSize" value="10737418240"/>
          <property name="walCompactionEnabled" value="true"/>
          <property name="walCompactionLevel" value="4"/>
          <property name="checkpointFrequency" value="300000"/>
          <property name="checkpointThreads" value="16"/>
          <property name="checkpointReadLockTimeout" value="60000"/>
          <property name="lockWaitTime" value="45000"/>
          <property name="checkpointWriteOrder" value="RANDOM"/>
          <property name="pageSize" value="4096"/>
          <property name="writeThrottlingEnabled" value="true"/>

        <property name="walPath" value="/apps/Svc/dev/Ignite/IgniteData"/>
        <property name="walArchivePath" value="/apps/Svc/dev/Ignite/IgniteDataArchive"/>
        <property name="storagePath" value="/apps/Svc/dev/Ignite/IgniteData/archive"/>

        <property name="dataRegionConfigurations">
          <list>
                <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
                    <property name="name" value="dr.dev.referencedata"/>
                    <property name="persistenceEnabled" value="true"/>
                    <property name="initialSize" value="1073741824"/>
                    <property name="maxSize" value="4294969673"/>
                    <property name="checkpointPageBufferSize" value="1073741824"/>
                </bean>
                <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
                    <property name="name" value="dr.dev.input"/>
                    <property name="persistenceEnabled" value="true"/>
                    <property name="metricsEnabled" value="true"/>
                    <property name="checkpointPageBufferSize" value="#{4 * 1024 * 1024 * 1024}"/>
                    <property name="initialSize" value="12884901888"/>
                    <property name="maxSize" value="81604378624"/>
                    <property name="pageEvictionMode" value="RANDOM_2_LRU"/>
                </bean>
                <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
                    <property name="name" value="dr.dev.input.exception"/>
                    <property name="persistenceEnabled" value="true"/>
                    <property name="metricsEnabled" value="true"/>
                    <property name="checkpointPageBufferSize" value="#{4 * 1024 * 1024 * 1024}"/>
                    <property name="initialSize" value="4294967296"/>
                    <property name="maxSize" value="21474836480"/>
                    <property name="pageEvictionMode" value="RANDOM_2_LRU"/>
                </bean>
                <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
                    <property name="name" value="dr.dev.output"/>
                    <property name="initialSize" value="1073741824"/>
                    <property name="persistenceEnabled" value="true"/>
                    <property name="metricsEnabled" value="true"/>
                    <property name="checkpointPageBufferSize" value="#{2 * 1024 * 1024 * 1024}"/>
                    <property name="maxSize" value="2147483648"/>
                </bean>
          </list>
        </property>

        <property name="defaultDataRegionConfiguration">
          <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
              <property name="name" value="default_region"/>
              <property name="persistenceEnabled" value="true"/>
              <property name="initialSize" value="268435456"/>
              <property name="maxSize" value="268435456"/>

          </bean>
        </property>
      </bean>
    </property>

    <property name="discoverySpi">
      <bean class="org.apache.ignite.spi.discovery.zk.ZookeeperDiscoverySpi">
        <property name="zkConnectionString" value="zk1.intranet.com:22001,zk2.intranet.com:22001"/>
          <property name="zkRootPath" value="/ignite"/>
          <property name="sessionTimeout" value="120000"/>
          <property name="joinTimeout" value="10000"/>
      </bean>
    </property>

    <property name="communicationSpi">
      <bean class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
          <property name="socketWriteTimeout" value="60000"/>
      </bean>
    </property>

    <property name="cacheConfiguration">
      <list>
          <bean id="cache-template-bean" abstract="true"
                class="org.apache.ignite.configuration.CacheConfiguration">
              <property name="name" value="referenceDataCacheTemplate*"/>
              <property name="cacheMode" value="REPLICATED"/>
              <property name="backups" value="1"/>
              <property name="atomicityMode" value="ATOMIC"/>
              <property name="dataRegionName" value="dr.dev.referencedata"/>
              <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
              <property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
              <property name="statisticsEnabled" value="true"/>
              <property name="sqlIndexMaxInlineSize" value="203"/>
            <property name="affinity">
              <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
                  <property name="partitions" value="256"/>

              </bean>
            </property>
          </bean>
          <bean id="cache-template-bean" abstract="true"
                class="org.apache.ignite.configuration.CacheConfiguration">
              <property name="name" value="inputMetadataCacheTemplate*"/>
              <property name="cacheMode" value="PARTITIONED"/>
              <property name="backups" value="1"/>
              <property name="atomicityMode" value="ATOMIC"/>
              <property name="dataRegionName" value="dr.dev.input"/>
              <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
              <property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
              <property name="statisticsEnabled" value="true"/>
              <property name="readFromBackup" value="false"/>
              <property name="sqlIndexMaxInlineSize" value="211"/>
            <property name="affinity">
              <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
                  <property name="partitions" value="256"/>

                <property name="affinityBackupFilter">
                          <bean class="org.apache.ignite.cache.affinity.rendezvous.ClusterNodeAttributeAffinityBackupFilter">
                            <constructor-arg>
                                                  <array value-type="java.lang.String">
                                                  <value>RACK_ID</value>
                                                     </array>
                             </constructor-arg>
                          </bean>
                </property>

              </bean>
            </property>
              <property name="expiryPolicyFactory">
                <bean class="javax.cache.expiry.ModifiedExpiryPolicy" factory-method="factoryOf">
                  <constructor-arg>
                    <bean class="javax.cache.expiry.Duration">
                      <constructor-arg value="DAYS"/>
                      <constructor-arg value="5"/>
                    </bean>
                  </constructor-arg>
                </bean>
              </property>
          </bean>
          <bean id="cache-template-bean" abstract="true"
                class="org.apache.ignite.configuration.CacheConfiguration">
              <property name="name" value="inputReconCacheTemplate*"/>
              <property name="cacheMode" value="PARTITIONED"/>
              <property name="backups" value="1"/>
              <property name="atomicityMode" value="ATOMIC"/>
              <property name="dataRegionName" value="dr.dev.input"/>
              <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
              <property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
              <property name="statisticsEnabled" value="true"/>
              <property name="readFromBackup" value="false"/>
              <property name="sqlIndexMaxInlineSize" value="211"/>
            <property name="affinity">
              <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
                  <property name="partitions" value="256"/>

                <property name="affinityBackupFilter">
                          <bean class="org.apache.ignite.cache.affinity.rendezvous.ClusterNodeAttributeAffinityBackupFilter">
                            <constructor-arg>
                                                  <array value-type="java.lang.String">
                                                  <value>RACK_ID</value>
                                                     </array>
                             </constructor-arg>
                          </bean>
                </property>

              </bean>
            </property>
              <property name="expiryPolicyFactory">
                <bean class="javax.cache.expiry.CreatedExpiryPolicy" factory-method="factoryOf">
                  <constructor-arg>
                    <bean class="javax.cache.expiry.Duration">
                      <constructor-arg value="DAYS"/>
                      <constructor-arg value="4"/>
                    </bean>
                  </constructor-arg>
                </bean>
              </property>
          </bean>
          <bean id="cache-template-bean" abstract="true"
                class="org.apache.ignite.configuration.CacheConfiguration">
              <property name="name" value="inputExceptionsCacheTemplate*"/>
              <property name="cacheMode" value="PARTITIONED"/>
              <property name="backups" value="1"/>
              <property name="atomicityMode" value="ATOMIC"/>
              <property name="dataRegionName" value="dr.dev.input.exception"/>
              <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
              <property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
              <property name="statisticsEnabled" value="true"/>
              <property name="readFromBackup" value="false"/>
            <property name="affinity">
              <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
                  <property name="partitions" value="256"/>

                <property name="affinityBackupFilter">
                          <bean class="org.apache.ignite.cache.affinity.rendezvous.ClusterNodeAttributeAffinityBackupFilter">
                            <constructor-arg>
                                                  <array value-type="java.lang.String">
                                                  <value>RACK_ID</value>
                                                     </array>
                             </constructor-arg>
                          </bean>
                </property>

              </bean>
            </property>
              <property name="expiryPolicyFactory">
                <bean class="javax.cache.expiry.CreatedExpiryPolicy" factory-method="factoryOf">
                  <constructor-arg>
                    <bean class="javax.cache.expiry.Duration">
                      <constructor-arg value="DAYS"/>
                      <constructor-arg value="15"/>
                    </bean>
                  </constructor-arg>
                </bean>
              </property>
          </bean>
          <bean id="cache-template-bean" abstract="true"
                class="org.apache.ignite.configuration.CacheConfiguration">
              <property name="name" value="outputDataCacheTemplate*"/>
              <property name="cacheMode" value="PARTITIONED"/>
              <property name="backups" value="1"/>
              <property name="atomicityMode" value="ATOMIC"/>
              <property name="dataRegionName" value="dr.dev.output"/>
              <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
              <property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
              <property name="sqlSchema" value=""/>
              <property name="statisticsEnabled" value="true"/>
            <property name="affinity">
              <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
                  <property name="partitions" value="256"/>

                <property name="affinityBackupFilter">
                          <bean class="org.apache.ignite.cache.affinity.rendezvous.ClusterNodeAttributeAffinityBackupFilter">
                            <constructor-arg>
                                                  <array value-type="java.lang.String">
                                                  <value>RACK_ID</value>
                                                     </array>
                             </constructor-arg>
                          </bean>
                </property>

              </bean>
            </property>
              <property name="expiryPolicyFactory">
                <bean class="javax.cache.expiry.CreatedExpiryPolicy" factory-method="factoryOf">
                  <constructor-arg>
                    <bean class="javax.cache.expiry.Duration">
                      <constructor-arg value="DAYS"/>
                      <constructor-arg value="450"/>
                    </bean>
                  </constructor-arg>
                </bean>
              </property>
          </bean>
          <bean id="cache-template-bean" abstract="true"
                class="org.apache.ignite.configuration.CacheConfiguration">
              <property name="name" value="reconAuditDataCacheTemplate*"/>
              <property name="cacheMode" value="PARTITIONED"/>
              <property name="backups" value="1"/>
              <property name="atomicityMode" value="ATOMIC"/>
              <property name="dataRegionName" value="dr.dev.referencedata"/>
              <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
              <property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
              <property name="sqlSchema" value=""/>
              <property name="statisticsEnabled" value="true"/>
            <property name="affinity">
              <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
                  <property name="partitions" value="256"/>

                <property name="affinityBackupFilter">
                          <bean class="org.apache.ignite.cache.affinity.rendezvous.ClusterNodeAttributeAffinityBackupFilter">
                            <constructor-arg>
                                                  <array value-type="java.lang.String">
                                                  <value>RACK_ID</value>
                                                     </array>
                             </constructor-arg>
                          </bean>
                </property>

              </bean>
            </property>
          </bean>
          <bean id="cache-template-bean" abstract="true"
                class="org.apache.ignite.configuration.CacheConfiguration">
              <property name="name" value="fileDataCacheTemplate*"/>
              <property name="cacheMode" value="PARTITIONED"/>
              <property name="backups" value="1"/>
              <property name="atomicityMode" value="ATOMIC"/>
              <property name="dataRegionName" value="dr.dev.input"/>
              <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
              <property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
              <property name="statisticsEnabled" value="true"/>
              <property name="queryParallelism" value="4"/>
              <property name="eagerTtl" value="true"/>
            <property name="affinity">
              <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
                  <property name="partitions" value="256"/>

                <property name="affinityBackupFilter">
                          <bean class="org.apache.ignite.cache.affinity.rendezvous.ClusterNodeAttributeAffinityBackupFilter">
                            <constructor-arg>
                                                  <array value-type="java.lang.String">
                                                  <value>RACK_ID</value>
                                                     </array>
                             </constructor-arg>
                          </bean>
                </property>

              </bean>
            </property>
              <property name="expiryPolicyFactory">
                <bean class="javax.cache.expiry.CreatedExpiryPolicy" factory-method="factoryOf">
                  <constructor-arg>
                    <bean class="javax.cache.expiry.Duration">
                      <constructor-arg value="DAYS"/>
                      <constructor-arg value="5"/>
                    </bean>
                  </constructor-arg>
                </bean>
              </property>
          </bean>
          <bean id="cache-template-bean" abstract="true"
                class="org.apache.ignite.configuration.CacheConfiguration">
              <property name="name" value="shortLivedReferenceDataTemplate*"/>
              <property name="cacheMode" value="PARTITIONED"/>
              <property name="backups" value="1"/>
              <property name="atomicityMode" value="ATOMIC"/>
              <property name="dataRegionName" value="dr.dev.input.exception"/>
              <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
              <property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
              <property name="statisticsEnabled" value="true"/>
              <property name="managementEnabled" value="true"/>
            <property name="affinity">
              <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
                  <property name="partitions" value="64"/>

                <property name="affinityBackupFilter">
                          <bean class="org.apache.ignite.cache.affinity.rendezvous.ClusterNodeAttributeAffinityBackupFilter">
                            <constructor-arg>
                                                  <array value-type="java.lang.String">
                                                  <value>RACK_ID</value>
                                                     </array>
                             </constructor-arg>
                          </bean>
                </property>

              </bean>
            </property>
              <property name="expiryPolicyFactory">
                <bean class="javax.cache.expiry.CreatedExpiryPolicy" factory-method="factoryOf">
                  <constructor-arg>
                    <bean class="javax.cache.expiry.Duration">
                      <constructor-arg value="DAYS"/>
                      <constructor-arg value="2"/>
                    </bean>
                  </constructor-arg>
                </bean>
              </property>
          </bean>

      </list>
    </property>

    <property name="sqlSchemas">
      <list>
        <value>dataInput</value>
      </list>
    </property>

  </bean>
</beans>


问:
stop carousel when video playing Bootstrap 4
Here is my Bootstrap 4 carousel that contains one html5 video and 2 images ,

```<code><div id="demo" class="carousel slide" data-ride="carousel">

                        <!-- Indicators -->
                        <ul class="carousel-indicators">
                            <li data-target="#demo" data-slide-to="0" class="active"></li>
                            <li data-target="#demo" data-slide-to="1"></li>
                            <li data-target="#demo" data-slide-to="2"></li>
                        </ul>

                        <!-- The slideshow -->
                        <div class="carousel-inner">
                            <div class="carousel-item active">
                                <video class="img-fluid" id="video_1" autoplay loop muted>
                                    <source src="{{ asset('img_link/v.mp4')}}" type="video/mp4" />
                                </video>
                            </div>
                            <div class="carousel-item">
                                <img src="{{ asset('img_link/AdminLTELogo.png')}}" alt="Chicago">
                            </div>
                            <div class="carousel-item">
                                <img src="{{ asset('img_link/AdminLTELogo.png')}}" alt="New York">
                            </div>
                        </div>

                        <!-- Left and right controls -->
                        <a class="carousel-control-prev" href="#demo" data-slide="prev">
                            <span class="carousel-control-prev-icon"></span>
                        </a>
                        <a class="carousel-control-next" href="#demo" data-slide="next">
                            <span class="carousel-control-next-icon"></span>
                        </a>

                    </div>
</code>```

i need to stop sliding if video playing and slide to the next slied after video end

thnx

I've tried this but it doesn't seem to work:

```

Body:
Here is my Bootstrap 4 carousel that contains one html5 video and 2 images ,

                                <video class="img-fluid" id="video_1" autoplay loop muted>
                                    <source src="{{ asset('img_link/v.mp4')}}" type="video/mp4" />
                                </video>

i need to stop sliding if video playing and slide to the next slied after video end

thnx

I've tried this but it doesn't seem to work:


问:
Avoid pytest hanging when libpython crashes
I'm using pytest with pytest-xdist to test some C code (via python bindings).

When a C program calls abort() this segfaults libpython.
This is fine for a single process run (it exits with 134), but when I'm using -n[something] then pytest just hangs and never returns.

I was hoping that --max-worker-restart 0 would do the trick, but alas no.

Does anyone have any suggestions on how to (ideally) treat this crash as a failed test or (less ideal but still better than what I currently have) to just exit with an error code and not hang?


问:
How to assign default role automatically for all dashboards in superset
We have DASHBOARD_RBAC enabled in superset, it is showing roles menu but no roles are populated as like below.

I want to assign Gamma Role as default role for every dashboard which is published in superset programatically. When ever new dashboard is published, automatically Gamma role has to be assigned by default. How we can achieve this?

Thanks in advance.!


问:
Matlab function for Polygon Extension based on the Current Outline
I would like to extend a polygon shape object to the bottom of the image.

Is there an existing Matlab function can do it? The anticipated extended polygon is shown below.

It will be great if we can control the polygon extension based on the curvature of its outline. For example, the image below shows another extended polygon based on curvature far from the bottom line of the shape.

Any suggestion will be appreciated.


问:
Line splitting while typing in spyder editor
When I type print in the spyder editor I have opened through anaconda, the line gets split into pr     int

ScreenshotThis happens in almost every line of code. How to fix it?


问:
jump host ssh identification doesn't work
Hi i actually got stuck , i'm trying to connect to a raspi with ssh with a bastion

i use a reverse ssh from the raspi to the bastion with this command

```<code>/usr/bin/autossh -o ServerAliveInterval=60 -NR 20054:localhost:22 ec2-user@ec2-35-172-129-227.compute-1.amazonaws.com
</code>```

and i want to connect with the following command

```<code>ssh -v -i path2keyBastion -J user@bastion:22  -i path2keyPI pi@raspberrypidev:20054
</code>```

the console return me

```<code>user@bastion: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
kex_exchange_identification: Connection closed by remote host
</code>```

but the key i use is the right , i got no message from the rasp

if you can help i would appreciate it

Body:
Hi i actually got stuck , i'm trying to connect to a raspi with ssh with a bastion

i use a reverse ssh from the raspi to the bastion with this command

/usr/bin/autossh -o ServerAliveInterval=60 -NR 20054:localhost:22 ec2-user@ec2-35-172-129-227.compute-1.amazonaws.com

and i want to connect with the following command

ssh -v -i path2keyBastion -J user@bastion:22  -i path2keyPI pi@raspberrypidev:20054

the console return me

user@bastion: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
kex_exchange_identification: Connection closed by remote host

but the key i use is the right , i got no message from the rasp

if you can help i would appreciate it


问:
Not able to Select Image in Google Image Page using UiPath
I am not able to select Image in Google Image Page in UiPath.

Tried all selector and Identifier. But I am not able to select Image in Bigger Mode.
Please help


问:
Why does a permit function take so much gas (~85k)? Is more data being written to the blockchain than for a transfer?
A standard ERC-20 transfer takes around 60-65k gas. I would have thought the permit function (which takes in a signature) would be quite lightweight.

What causes high gas usage? Is it decryption of the signature? Something else?


问:
How to give a sequence number to an Item?
Trying to add a sequence number to each Item in my Core Data for exponential smoothing.

```<code>exp.i=alpha**Yi-1+(1-alpha)*Yexp.i-1
</code>```

The idea is to have a "ids" attribute in the main entity ("Item") and another Entity ("Numb") with "number" attribute. "Number" is growing each time a new Item is added. I'm using this code in "persistence":

```<code>func editNumber(dai: Numb, day: Item, ids: Double, number: Double, context: NSManagedObjectContext) {
        day.ids = number + 1
        dai.number = day.ids
        print(day.ids)
        save(context: context)
    }
</code>```

But it gives an error:

```<code>Thread 1: "-\[BrainLab.Item setIds:\]: unrecognized selector sent to instance 0x6000015ae3c0".
</code>```

So is it a right way to give sequence numbers and how to go throw the error?

Body:
Trying to add a sequence number to each Item in my Core Data for exponential smoothing.

exp.i=alpha**Yi-1+(1-alpha)*Yexp.i-1

The idea is to have a "ids" attribute in the main entity ("Item") and another Entity ("Numb") with "number" attribute. "Number" is growing each time a new Item is added. I'm using this code in "persistence":

func editNumber(dai: Numb, day: Item, ids: Double, number: Double, context: NSManagedObjectContext) {
        day.ids = number + 1
        dai.number = day.ids
        print(day.ids)
        save(context: context)
    }

But it gives an error:

Thread 1: "-\[BrainLab.Item setIds:\]: unrecognized selector sent to instance 0x6000015ae3c0".

So is it a right way to give sequence numbers and how to go throw the error?


问:
What does osmnx reversed mean in an arc?
I am working with osmnx for my research paper. I wondered what the reversed attribute in an arc mean since i have identical arcs:

```<code>        u         v  key    osmid  oneway             name       highway  \
6362  214  45107731    1  7012709   False  Ridderplantsoen  unclassified
6364  214  45107731    0  7012709   False  Ridderplantsoen  unclassified

     maxspeed reversed   length  \
6362       30     True  77.9805
6364       30    False  77.9805

                                               geometry access lanes bridge  \
6362  LINESTRING (5.12597 52.06862, 5.12592 52.06864...    NaN   NaN    NaN
6364  LINESTRING (5.12597 52.06862, 5.12605 52.06863...    NaN   NaN    NaN

     width tunnel  ref est_width junction
6362   NaN    NaN  NaN       NaN      NaN
6364   NaN    NaN  NaN       NaN      NaN
</code>```

and the arcs exist vice versa as well.

```<code>        u         v  key    osmid  oneway             name       highway  \
6001  45107731  214    1  7012709   False  Ridderplantsoen  unclassified
6002  45107731  214    0  7012709   False  Ridderplantsoen  unclassified

     maxspeed reversed   length  \
6362       30     True  77.9805
6364       30    False  77.9805

                                               geometry access lanes bridge  \
6362  LINESTRING (5.12597 52.06862, 5.12592 52.06864...    NaN   NaN    NaN
6364  LINESTRING (5.12597 52.06862, 5.12605 52.06863...    NaN   NaN    NaN

     width tunnel  ref est_width junction
6362   NaN    NaN  NaN       NaN      NaN
6364   NaN    NaN  NaN       NaN      NaN
</code>```

I do not really understand what reversed does since oneway is also an indicator that an edge has been splitted into two arcs and now when i want to detect an arc based on u,v,osmid (which should be unique) i get multiple arcs. Who could help me out?

Body:
I am working with osmnx for my research paper. I wondered what the reversed attribute in an arc mean since i have identical arcs:

        u         v  key    osmid  oneway             name       highway  \
6362  214  45107731    1  7012709   False  Ridderplantsoen  unclassified
6364  214  45107731    0  7012709   False  Ridderplantsoen  unclassified

     maxspeed reversed   length  \
6362       30     True  77.9805
6364       30    False  77.9805

                                               geometry access lanes bridge  \
6362  LINESTRING (5.12597 52.06862, 5.12592 52.06864...    NaN   NaN    NaN
6364  LINESTRING (5.12597 52.06862, 5.12605 52.06863...    NaN   NaN    NaN

     width tunnel  ref est_width junction
6362   NaN    NaN  NaN       NaN      NaN
6364   NaN    NaN  NaN       NaN      NaN

and the arcs exist vice versa as well.

        u         v  key    osmid  oneway             name       highway  \
6001  45107731  214    1  7012709   False  Ridderplantsoen  unclassified
6002  45107731  214    0  7012709   False  Ridderplantsoen  unclassified

     maxspeed reversed   length  \
6362       30     True  77.9805
6364       30    False  77.9805

                                               geometry access lanes bridge  \
6362  LINESTRING (5.12597 52.06862, 5.12592 52.06864...    NaN   NaN    NaN
6364  LINESTRING (5.12597 52.06862, 5.12605 52.06863...    NaN   NaN    NaN

     width tunnel  ref est_width junction
6362   NaN    NaN  NaN       NaN      NaN
6364   NaN    NaN  NaN       NaN      NaN

I do not really understand what reversed does since oneway is also an indicator that an edge has been splitted into two arcs and now when i want to detect an arc based on u,v,osmid (which should be unique) i get multiple arcs. Who could help me out?


问:
using xr.where to get 3D index:(time,lat,lon)
I want to use xr.where to get index: (time, lat, lon) which contain t<22 from let say this xarray dataset:

```<code>import xarray as xr
np.random.seed(0)
t = 15 + 8 * np.random.randn(2, 2, 3)
lon = [[-99.83, -99.32], [-99.79, -99.23]]
lat = [[42.25, 42.21], [42.63, 42.59]]
time = pd.date_range("2014-09-06", periods=3)
reference_time = pd.Timestamp("2014-09-05")
ds = xr.Dataset(
    data_vars=dict(
        t=(["x", "y", "time"], temperature),
    ),
    coords=dict(
        lon=(["x", "y"], lon),
        lat=(["x", "y"], lat),
        time=time,
        reference_time=reference_time,
    ),
    attrs=dict(description="Weather related data."),
)
</code>```

I tried:

```<code>time, lat_i, lon_i = np.nonzero(xr.where(ds.t<22, 1, 0).data)
lats = ds.x.isel(x=lat_i).data
lons = ds.y.isel(y=lon_i).data
time = ds.time.isel(time=time).data
pairs = list(zip(time, lats, lons))
pairs
</code>```

But got an error related to lons,
IndexError: index 2 is out of bounds for axis 0 with size 2

```<code>print(time, lat_i, lon_i)
(array([0, 0, 1, 1, 1, 1], dtype=int64),
 array([0, 1, 0, 0, 1, 1], dtype=int64),
 array([1, 2, 1, 2, 0, 1], dtype=int64))
</code>```

Why there is, not expected, 2 in the lon_i?

Body:
I want to use xr.where to get index: (time, lat, lon) which contain t<22 from let say this xarray dataset:

import xarray as xr
np.random.seed(0)
t = 15 + 8 * np.random.randn(2, 2, 3)
lon = [[-99.83, -99.32], [-99.79, -99.23]]
lat = [[42.25, 42.21], [42.63, 42.59]]
time = pd.date_range("2014-09-06", periods=3)
reference_time = pd.Timestamp("2014-09-05")
ds = xr.Dataset(
    data_vars=dict(
        t=(["x", "y", "time"], temperature),
    ),
    coords=dict(
        lon=(["x", "y"], lon),
        lat=(["x", "y"], lat),
        time=time,
        reference_time=reference_time,
    ),
    attrs=dict(description="Weather related data."),
)

I tried:

time, lat_i, lon_i = np.nonzero(xr.where(ds.t<22, 1, 0).data)
lats = ds.x.isel(x=lat_i).data
lons = ds.y.isel(y=lon_i).data
time = ds.time.isel(time=time).data
pairs = list(zip(time, lats, lons))
pairs

But got an error related to lons,
IndexError: index 2 is out of bounds for axis 0 with size 2

print(time, lat_i, lon_i)
(array([0, 0, 1, 1, 1, 1], dtype=int64),
 array([0, 1, 0, 0, 1, 1], dtype=int64),
 array([1, 2, 1, 2, 0, 1], dtype=int64))

Why there is, not expected, 2 in the lon_i?


问:
getaddrinfo failed when running PHPUnit from PhpStorm in Docker Container
I have a Docker Server image with PHPUnit and a MySQL-Image named somedbimage.mysql for the database. When I go into the container and execute

```<code>php vendor/bin/phpunit
</code>```

everything works as expected.

I have configured PHPUnit in PHPStorm to use the Docker image as PHP Interpreter, which works fine, it connects to somedbimage.mysql, creates the test database and so on.

But when I execute the Unit tests via PHPStorm it says

```<code>php_network_getaddresses: getaddrinfo for *somedbimage.mysql* failed: Name or service not known
</code>```

I checked if PHPStorm really uses the container and it does. So the problem is:
When I execute PHPUnit directly in the container, the MySQL stuff works,
but when I execute PHPUnit via PHPStorm in the same container, it fails to connect to the Database, but why?

Body:
I have a Docker Server image with PHPUnit and a MySQL-Image named somedbimage.mysql for the database. When I go into the container and execute

php vendor/bin/phpunit

everything works as expected.

I have configured PHPUnit in PHPStorm to use the Docker image as PHP Interpreter, which works fine, it connects to somedbimage.mysql, creates the test database and so on.

But when I execute the Unit tests via PHPStorm it says

php_network_getaddresses: getaddrinfo for *somedbimage.mysql* failed: Name or service not known

I checked if PHPStorm really uses the container and it does. So the problem is:
When I execute PHPUnit directly in the container, the MySQL stuff works,
but when I execute PHPUnit via PHPStorm in the same container, it fails to connect to the Database, but why?


问:
Angular ignoring HTML Tags when writing text
So, when i set a variable: test = "test" in angular, and i write it out like this:

```<code><h2>{{test}}</h2>
</code>```

then it will look like this: test, but i want to this: test

is there any way to do this?

Thanks!

Body:
So, when i set a variable: test = "test" in angular, and i write it out like this:

{{test}}

then it will look like this: test, but i want to this: test

is there any way to do this?

Thanks!


问:
Converting SVG created with d3 returns DOMException: The source image cannot be decoded for one chart but not another with exact same code
I am at my wits end. The following works with one type of chart and not with another, yet the code is the same and although the error happens later I suspect it is in the SVG string.

Could that be?

I have this set up:

```<code>    <svg id="Scatter" viewBox={`-20 -20 ${width + margin.left + margin.top } ${height + margin.bottom + margin.top}`} bind:this={vis}>
    </svg>

</div>
<a class = "hidden" id="ScatterLink" download="Mondaystats.png">Click to download</a>
<canvas class = "hidden"  id="ScatterCanvas" width={resFactor*width} height={resFactor*height}></canvas>
<img class = "hidden" id="ScatterImage" width={resFactor*width} height={resFactor*height} alt="Scatter Chart">
</code>```

And this convertSvg function that should return an image of the canvas with the SVG in it.

```<code>function convertSvg(vis) {
    const svgStringPrefix = "data:image/svg+xml;utf8,";

    // A string representation of the SVG
    const svgString = `${svgStringPrefix}${new XMLSerializer().serializeToString(
      document.getElementById("Scatter") //id of svg
    )}`;
    console.log('scatter', svgString);
    // A temporary image
    const svgImage = new Image();
    // console.log(svgImage.decode().then(d => d))
    svgImage.src = svgString;

    // console.log(svgImage.decode().then(d => d))

    // Runs once the temporary image is decoded
    svgImage.decode().then(() => {
      // Draw the temporary image to the canvas
      console.log("Getting this far");
      const canvas = document.getElementById("mScatterCanvas"); // id of canvas
      const context = canvas.getContext("2d");
      context.clearRect(0, 0, canvas.width, canvas.height);
      context.drawImage(svgImage, 0, 0, width*resFactor, height*resFactor);

      // Convert the canvas to a binary image blob
      canvas.toBlob((blob) => {
        // Get a URL for the blob
        const url = URL.createObjectURL(blob);

        // Make the image in the document display the blob
        const newImage = document.getElementById("ScatterImage"); //id of image
        newImage.src = url;

        // Make the link point to the blob
        const myLink = document.getElementById("ScatterLink"); //id of link
        myLink.href = url;
        window.open(url);
      });
    });
}
</code>```

I appreciate any ideas of why or suggestions of what to check next, I think I've tried quite everything.
It works with several bar charts I have but not anymore with scatter charts.
I added a function that hides labels that overlap, could that be it?
I can't say for sure that's what broke it, because when I comment out the function it still doesn't work, but in the very beginning it did work without it.
I'm using svelte.

Edit: Ok this makes no sense at all, when I remove () from const svgImage = new Image(); it works.
But in the bar chart it works with () and I actually copied over the whole code.
I am so confused.

Body:
I am at my wits end. The following works with one type of chart and not with another, yet the code is the same and although the error happens later I suspect it is in the SVG string.

Could that be?

I have this set up:

    <svg id="Scatter" viewBox={`-20 -20 ${width + margin.left + margin.top } ${height + margin.bottom + margin.top}`} bind:this={vis}>
    </svg>

Click to download
<canvas class = "hidden"  id="ScatterCanvas" width={resFactor*width} height={resFactor*height}></canvas>

And this convertSvg function that should return an image of the canvas with the SVG in it.

function convertSvg(vis) {
    const svgStringPrefix = "data:image/svg+xml;utf8,";

    // A string representation of the SVG
    const svgString = `${svgStringPrefix}${new XMLSerializer().serializeToString(
      document.getElementById("Scatter") //id of svg
    )}`;
    console.log('scatter', svgString);
    // A temporary image
    const svgImage = new Image();
    // console.log(svgImage.decode().then(d => d))
    svgImage.src = svgString;

    // console.log(svgImage.decode().then(d => d))

    // Runs once the temporary image is decoded
    svgImage.decode().then(() => {
      // Draw the temporary image to the canvas
      console.log("Getting this far");
      const canvas = document.getElementById("mScatterCanvas"); // id of canvas
      const context = canvas.getContext("2d");
      context.clearRect(0, 0, canvas.width, canvas.height);
      context.drawImage(svgImage, 0, 0, width*resFactor, height*resFactor);

      // Convert the canvas to a binary image blob
      canvas.toBlob((blob) => {
        // Get a URL for the blob
        const url = URL.createObjectURL(blob);

        // Make the image in the document display the blob
        const newImage = document.getElementById("ScatterImage"); //id of image
        newImage.src = url;

        // Make the link point to the blob
        const myLink = document.getElementById("ScatterLink"); //id of link
        myLink.href = url;
        window.open(url);
      });
    });
}

I appreciate any ideas of why or suggestions of what to check next, I think I've tried quite everything.
It works with several bar charts I have but not anymore with scatter charts.
I added a function that hides labels that overlap, could that be it?
I can't say for sure that's what broke it, because when I comment out the function it still doesn't work, but in the very beginning it did work without it.
I'm using svelte.

Edit: Ok this makes no sense at all, when I remove () from const svgImage = new Image(); it works.
But in the bar chart it works with () and I actually copied over the whole code.
I am so confused.


问:
How to change title attribute on WordPress?

What is my problem (What am I trying to achieve)?

So I have
 with title attribute which is visible when that
 element is hovered and I want to change the text of the title attribute, currently it is set to "Details" like this
.

What Have I tried?

I have had function in functions.php, which uses gettext and it works usually on every element; Therefore I tried to do it also here, but it's unsucessfull.

```<code>add_filter('gettext',function($strings)
{
    $text = array(
        'Details' => 'Pregledaj',
        'Ship to'   => 'Dostavite na',
    );
    $strings = str_ireplace( array_keys( $text ), $text, $strings );
    return $strings;
}, 20 );
</code>```

Body:
What is my problem (What am I trying to achieve)?

So I have
 with title attribute which is visible when that
 element is hovered and I want to change the text of the title attribute, currently it is set to "Details" like this
.

What Have I tried?

I have had function in functions.php, which uses gettext and it works usually on every element; Therefore I tried to do it also here, but it's unsucessfull.

add_filter('gettext',function($strings)
{
    $text = array(
        'Details' => 'Pregledaj',
        'Ship to'   => 'Dostavite na',
    );
    $strings = str_ireplace( array_keys( $text ), $text, $strings );
    return $strings;
}, 20 );