Major update to ASA tutorial 1 (mrlearning-asa-ch1)

Make compatible with Azure Spatial Anchors v2.0.0
Cleanup formatting and images
Implement feedback from 'Dev Journey Study - Day 1'

This fixes #1421, fixes #1425, fixes #1426, fixes #1427, fixes #1433, and fixes #1510.

Docs Build status updates of commit 6533cc4:
:warning: Validation status: warnings

File
Status
Preview URL
Details

mixed-reality-docs/mrlearning-asa-ch1.md
:warning:Warning
View
Details

mixed-reality-docs/images/module2chapter1step10aim.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step10bim.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step10fim.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step11im.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step12im.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step13im.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step1im.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step3im.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step4im.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step5bim.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step5cim.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step7im.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step8im.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/mrlearning-asa-ch1-2-1.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-2-1.2.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-2-2.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-2-2.2.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-3-2.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-3-2.2.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-3-2.3.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-3-2.4.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-3-step11.jpg
:white_check_mark:Succeeded

mixed-reality-docs/images/mrlearning-asa-ch1-3-step12.jpg
:white_check_mark:Succeeded

mixed-reality-docs/images/mrlearning-asa-ch1-3-step7.jpg
:white_check_mark:Succeeded

mixed-reality-docs/images/mrlearning-asa-ch1-3-step7B.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/mrlearning-asa-ch1-3-step8.jpg
:white_check_mark:Succeeded

mixed-reality-docs/images/mrlearning-asa-ch1-4-1.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-4-1.2.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-4-1.3.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-4-2.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-4-2.2.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-4-2.3.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-4-3.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-4-3.2.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-4-3.3.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-5-1.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-5-1.2.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-5-1.3.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-5-1.4.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-5-2.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-5-4.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-6-1.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-6-1.2.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-6-1.3.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-6-3.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-7-1.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-7-1.2.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-7-2.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/mrlearning-asa-ch1.md

Line 43: [Warning] Invalid file link: 'mrlearning-base-ch1'.
Line 43: [Warning] Invalid file link: 'mrlearning-base-ch1'.
Line 207: [Warning] Invalid file link: 'mrlearning-asa-ch1'.
Line 235: [Warning] Invalid file link: 'mrlearning-base-ch1'.
Line 235: [Warning] Invalid file link: 'mrlearning-base-ch1'.

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Docs Build status updates of commit 5c42966:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

mixed-reality-docs/images/module2chapter1step10aim.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step10bim.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step10fim.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step11im.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step12im.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step13im.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step1im.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step3im.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step4im.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step5bim.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step5cim.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step7im.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/module2chapter1step8im.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/mrlearning-asa-ch1-2-1.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-2-1.2.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-2-2.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-2-2.2.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-3-2.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-3-2.2.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-3-2.3.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-3-2.4.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-3-step11.jpg
:white_check_mark:Succeeded

mixed-reality-docs/images/mrlearning-asa-ch1-3-step12.jpg
:white_check_mark:Succeeded

mixed-reality-docs/images/mrlearning-asa-ch1-3-step7.jpg
:white_check_mark:Succeeded

mixed-reality-docs/images/mrlearning-asa-ch1-3-step7B.PNG
:white_check_mark:Succeeded

mixed-reality-docs/images/mrlearning-asa-ch1-3-step8.jpg
:white_check_mark:Succeeded

mixed-reality-docs/images/mrlearning-asa-ch1-4-1.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-4-1.2.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-4-1.3.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-4-2.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-4-2.2.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-4-2.3.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-4-3.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-4-3.2.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-4-3.3.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-5-1.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-5-1.2.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-5-1.3.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-5-1.4.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-5-2.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-5-4.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-6-1.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-6-1.2.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-6-1.3.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-6-3.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-7-1.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-7-1.2.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/mrlearning-asa-ch1-7-2.1.png
:white_check_mark:Succeeded
View

mixed-reality-docs/mrlearning-asa-ch1.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


False Status of mod installation

So i want to install mod called BDarmory but it tells me it was already installed, even tho I never even had that mod on my PC, so I open the file directory it gave me, but it doesnt exist

Try clicking on the mod and going over to versions on the right side, then select the latest version, this should install it with no issues. If a team member would like to confirm or correct me on this process you're welcome to 😀

that is not possible since I never even had the BDArmory mod at the first place, I only went in gamedata to clarify that it was indeed not there or delete the DLL if it was there
yes I was trying to install the BDarmoryContinued but it was too long to type out so i just said BDarmory

1. that is not possible since I never even had the BDArmory mod at the first place, I only went in gamedata to clarify that it was indeed not there or delete the DLL if it was there

CKAN doesn't make up imaginary folders in your GameData. At some point the was a SourceCode  folder in your GameData, which contained a BDArmory.dll (or similarly named). Judging from the path, you probably tried to install NextStarIndustries manually, although the image is missing half the error message. All I can say is that whatever mod you tried to install there, but accidentally downloaded the source code instead of the release zip.
Did clicking "Refresh" fix it? If not, you might be looking at the wrong KSP installation (Go to "File > Open game directory") to make sure you open the correct one.

2. yes I was trying to install the BDarmoryContinued but it was too long to type out so i just said BDarmory

Doesn't look like it, you screenshot shows https://spacedock.info/mod/79/BDArmory/download/<IP_ADDRESS> as download source, which is the original outdated BDArmory. YOu can tell that both from the SpaceDock mod id 79, and the version number <IP_ADDRESS>.
If you download BDArmoryContinued, you'd probably see https://github.com/PapaJoesSoup/BDArmory/releases/download/v1.3.4/BDArmory.<IP_ADDRESS>_04092020.zip as download source.

I dont think I tried downloading any mods manually but I can always check that directory (update yes it leads to KSP folder, just not the gamedata but that should be alright)

yes in that screenshot I was trying to install outdated BD as I didnt realise there was a continued version, also the full error message is below

Did you click "Refresh" yet?

Yes

Okay. Does BDArmory still show up as "AD"?

Yes

Okay. Then please click on "File > Open game directory", and inside the new explorer window, double-click on GameData. It is important you do this from the window that CKAN opened, and not a separate one you might have already open.
Do you see any folder called SourceCode there?

and in it is this
should I delete it?

Best is you delete the entire SourceCode folder, whatever mod this is is from it most likely doesn't belong into GameData.

alr got it

Case solved, this appears to be working


Give admin-console signerVerify

This is required for signing the "hello world" string.
Fixes https://github.com/google/exposure-notifications-server/issues/1394
Release Note

Give admin-console signerVerify permissions to sign "hello world" string during new export configuration

/assign @mikehelmick


Allow handling temporarily down redis nodes

Problem
When using redis as a caching solution on a remote server we don't always want to retry a connection, and wait for it to fail again, and would rather the cache call failed quickly.  The current option of reconnect_attempts is not useful here as we would have to wait for the connection to fail/timeout for every query which can quickly increase page load times.
Proposed Solution
An option, retry_connecting_delay, that can be set to prevent the redis client from attempting a connection until the time limit is reached. This would enable the service using redis as a cache to quickly get back a cache miss greatly reducing the page load time. This attempts to acheive the same effect as the Dalli gems down_retry_delay^1
Background
After making the transition from ActiveSupport::Cache::MemcacheStore to ActiveSupport::Cache::RedisCacheStore as a caching solution we noticed that the redis-client doesn't seem to handle dead nodes particularly well and will keep on attempting to connect to a node even if it gets back connection refused or other errors from it. When a server running a cache instance became unavailable (reboot, connection issue) it caused a significant drop in page load speeds as the cache would try to fetch from redis and eventually fail. Adding a reconnect_attempts only excerbates the problem as then we're waiting for the reconnect attempt and the eventual query to fail again.
To solve this we introduced a patch to the redis client that rescues any connection error and places the connection in a 'waiting loop' so that each hit can quickly fail up to the time limt. Without the patch, every single attempt to read from redis was blocking for, say, 200ms, before raising a network error and causing a cache miss.

What you are asking for is known as "circuit breakers".
You can currently get that with semian, but I agree that it's a very specialized solution, and it would make sense to have them natively in redis-client.
I probably won't have time to work on this in the near future, but it is indeed desirable, and will ultimately look at it.

To solve this we introduced a patch to the redis client that rescues any connection error and places the connection in a 'waiting loop' so that each hit can quickly fail up to the time limt.

You could do this without a patch using the middleware API.

Ah I just realized this was a PR and not an issue.
I think retry_connecting_delay is too simple, and I'd rather go with an actual circuit breaker implementation.

Okay, shall I close this and open an it as an issue instead?

No it's all good. You can leave this open, I'll close it when I implement circuit breakers.


Laravel 5.3 Not Compatible

Upon installing laravel caffeine, laravel fails to find the package/service provider.
Composer.json has the correct entry -- "genealabs/laravel-caffeine": "^0.4.1"
Application service provider in config/app has been added - GeneaLabs\LaravelCaffeine\LaravelCaffeineServiceProvider::class,
Yet artisan throws the following error..
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'GeneaLabs\LaravelCaffeine\LaravelCaffeineServiceProvider' not found

The issue is the service provider. It has been renamed (I'm guessing you're upgrading from a previous version?):
GeneaLabs\LaravelCaffeine\providers\LaravelCaffeineService::class,

@mikebronner Thanks for the quick reply. Looks like it works now! The readme still lists the previous service provider so I was unaware that was changed. Thanks!

Oi!! Thanks for catching that ... I thought I fixed it, doing that now.


some sections do not show up in arxiv html

Description
https://arxiv.org/html/2405.02487v1
Sections III and IV do not show up in html.
(Optional:) Please add any files, screenshots, or other information here.
No response
(Required) What is this issue most closely related to? Select one.
Choose One
Internal issue ID
4ff5b1c6-5af3-453c-b68f-365c659fddf3
Paper URL
https://arxiv.org/html/2405.02487v1
Browser
Chrome/<IP_ADDRESS>
Device Type
Desktop

I noticed today the issue is solved.


[BUG] - Button: onPress prop not being invoked on Mouse Events when Select Popover is open

NextUI Version
2.1.13
Describe the bug
In this example of the Select component, the onPress prop on the Button component is not acting as expected. Pressing (Key down or mouse click) opens the select popover but then only a Key down action can close the select component, clicking doesn't work.
Using a native button element (btn in my example) with the onClick prop works as expected but the props on the Button component are not able to achieve consistent behavior across Mouse and Keyboard.
I have created a basic demo setup from scratch in the video below.
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue

Setup Next UI with Next.js (No other dependencies except for the defaults)

{
  "name": "new-test",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@nextui-org/react": "^2.1.13",
    "@types/node": "20.6.3",
    "@types/react": "18.2.22",
    "@types/react-dom": "18.2.7",
    "autoprefixer": "10.4.16",
    "eslint": "8.49.0",
    "eslint-config-next": "13.5.2",
    "framer-motion": "^10.16.4",
    "next": "13.5.2",
    "postcss": "8.4.30",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "tailwindcss": "3.3.3",
    "typescript": "5.2.2"
  }
}

Create a Select and Button component as in this example.

"use client";

import { Select, SelectItem, Button } from "@nextui-org/react";
import { useState } from "react";
import { animals } from "@/data";

export default function App() {
  const [isOpen, setIsOpen] = useState(false);

  return (

          <Select
            isOpen={isOpen}
            label="Favorite Animal"
            placeholder="Select an animal"
            defaultSelectedKeys={["cat"]}
            className="max-w-xs"
          >
            {animals.map((animal) => (
              <SelectItem key={animal.value} value={animal.value}>
                {animal.label}
              </SelectItem>
            ))}
          </Select>

        <button
          className="rounded-xl bg-gray-300 py-2 px-4"
          onClick={() => console.log("Btn click")}
        >
          Btn
        </button>
        <Button
          onClick={() => {
            console.log("onClick invoked");
          }}
          onPress={() => {
            console.log("onPress invoked");
            setIsOpen(!isOpen);
          }}
          onPressUp={() => {
            console.log("onPressUp invoked");
          }}
          onPressStart={() => {
            console.log("onPressStart invoked");
          }}
          onPressEnd={() => {
            console.log("onPressEnd invoked");
          }}
        >
          {isOpen ? "Close" : "Open"}
        </Button>

  );
}

Click on the button to open the select popover

Expected behavior
The expected behavior when the select popover is open, and you click on the button again to toggle the open state, is for the popover to close.
What happens is that the select popover doesn't close on clicking the button.
Screenshots or Videos

https://github.com/nextui-org/nextui/assets/108615200/615d3796-5131-4278-98bd-9167afb56277
Operating System Version
Linux (Ubuntu 22)
Browser
Chrome

Following this issue

I have the same issue. When I click on Select it opens, but when I click on Select itself, it doesn't close the popover. Surprisingly this is working fine on the NextUI document page! Any updates on this?

@ahmadbafrani this has been fixed in canary branch. It will be available in the next release, which will be taken place later today.

@wingkwong , @ahmadbafrani  kindly close it as #completed

@abhinandan-verma my comment was only for his case only, not for the original issue posted here.

I have the same problem with the autocomplete. I have a contact list with autocomplete, when the search yields no results through emptyContent I display a button that when clicked opens the modal object and should close the autocomplete list. The modal opens but the list remains open and visible on the layer of the modal.
 <Autocomplete             isRequired             isOpen={isOpenSender}             onOpenChange={(open) => setIsOpenSender(open)}             label="Mittente"             defaultItems={senders || []}             placeholder="Seleziona un mittente"             className="w-full"             listboxProps={{               emptyContent: (                 <>                    setIsOpenSender(false)}                   >                     Not found                                      <Button onClick={() => handleCloseAutocomplete()}>                     Add new contact                   </Button>                 </>               ),             }}             onSelectionChange={(key) =>               handleSelectionChange(key, "DOCUMENTSENDERID")             }             defaultSelectedKey={formData?.DOCUMENTSENDERID?.toString()}           >             {(item) => (               <AutocompleteItem key={item.ID.toString()} value={item.ID}>                 {item.NAME}               </AutocompleteItem>             )}           </Autocomplete>


Sticky on scroll - data for development

Test URLs:

Before: https://main--world-bank--aemsites.hlx.live/
After: https://sticky-on-scroll--world-bank--aemsites.hlx.live/

@mkbansal1 Updated to include scroll effect for empowering section as well.


inheritance aware Value helpers

for use with mixins and subclasses, it seems helpful to have some values that take the values of base classes into account
for example
class Base(Configuration):
    INSTALLED_APPS = values.Backend(...)

class Dev(Base):
  INSTALLED_APPS = values.Appender('debug_toolbar')

class Prod(Base):
   INSTALLED_APPS = values.Appender('myapp.specialerrors')

Hm, not sure, this sounds quite magic, but maybe this is just another level of magic..

I'm trying to deal with a similar use case in #217 (Mixins).

closing to get if off my plate on github


monai import errors

After installing dependencies with MONAIVizLogic.installMONAI() and then importing monai, I am getting the following errors.
>>> import monai
Traceback (most recent call last):
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/monai/utils/module.py", line 210, in load_submodules
    mod = import_module(name)
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/monai/apps/__init__.py", line 15, in <module>
    from .mmars import MODEL_DESC, RemoteMMARKeys, download_mmar, get_model_spec, load_from_mmar
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/monai/apps/mmars/__init__.py", line 14, in <module>
    from .mmars import download_mmar, get_model_spec, load_from_mmar
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/monai/apps/mmars/mmars.py", line 29, in <module>
    import monai.networks.nets as monai_nets
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/monai/networks/nets/__init__.py", line 101, in <module>
    from .swin_unetr import PatchMerging, PatchMergingV2, SwinUNETR
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/monai/networks/nets/swin_unetr.py", line 21, in <module>
    import torch.utils.checkpoint as checkpoint
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/torch/utils/checkpoint.py", line 18, in <module>
    from torch.testing._internal.logging_tensor import LoggingTensorMode, capture_logs
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/torch/testing/_internal/logging_tensor.py", line 2, in <module>
    from torch.utils._pytree import tree_map
ImportError: cannot import name 'tree_map' from 'torch.utils._pytree' (/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/torch/utils/_pytree.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/monai/__init__.py", line 58, in <module>
    load_submodules(sys.modules[__name__], False, exclude_pattern=excludes)
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/monai/utils/module.py", line 220, in load_submodules
    raise type(e)(f"{e}\n{msg}").with_traceback(e.__traceback__) from e  # raise with modified message
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/monai/utils/module.py", line 210, in load_submodules
    mod = import_module(name)
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/monai/apps/__init__.py", line 15, in <module>
    from .mmars import MODEL_DESC, RemoteMMARKeys, download_mmar, get_model_spec, load_from_mmar
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/monai/apps/mmars/__init__.py", line 14, in <module>
    from .mmars import download_mmar, get_model_spec, load_from_mmar
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/monai/apps/mmars/mmars.py", line 29, in <module>
    import monai.networks.nets as monai_nets
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/monai/networks/nets/__init__.py", line 101, in <module>
    from .swin_unetr import PatchMerging, PatchMergingV2, SwinUNETR
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/monai/networks/nets/swin_unetr.py", line 21, in <module>
    import torch.utils.checkpoint as checkpoint
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/torch/utils/checkpoint.py", line 18, in <module>
    from torch.testing._internal.logging_tensor import LoggingTensorMode, capture_logs
  File "/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/torch/testing/_internal/logging_tensor.py", line 2, in <module>
    from torch.utils._pytree import tree_map
ImportError: cannot import name 'tree_map' from 'torch.utils._pytree' (/Applications/Slicer-5.4.0_stable.app/Contents/lib/Python/lib/python3.9/site-packages/torch/utils/_pytree.py)

Multiple versions of MONAI may have been installed?
Please see the installation guide: https://docs.monai.io/en/stable/installation.html

Slicer Version
[DEBUG][Qt] 12.10.2023 11:07:20 [] (unknown:0) - Session start time .......: 2023-10-12 11:07:20
[DEBUG][Qt] 12.10.2023 11:07:20 [] (unknown:0) - Slicer version ...........: 5.4.0 (revision 31938 / 311cb26) macosx-amd64 - installed release
[DEBUG][Qt] 12.10.2023 11:07:21 [] (unknown:0) - Operating system .........: macOS / 13.5 / 22G74 / UTF-8 - 64-bit
[DEBUG][Qt] 12.10.2023 11:07:21 [] (unknown:0) - Memory ...................: 65536 MB physical, 0 MB virtual
[DEBUG][Qt] 12.10.2023 11:07:21 [] (unknown:0) - CPU ......................:  Apple M2 Max, 12 cores, 12 logical processors
[DEBUG][Qt] 12.10.2023 11:07:21 [] (unknown:0) - VTK configuration ........: OpenGL2 rendering, Sequential threading
[DEBUG][Qt] 12.10.2023 11:07:21 [] (unknown:0) - Qt configuration .........: version 5.15.8, with SSL, requested OpenGL 3.2 (core profile)
[DEBUG][Qt] 12.10.2023 11:07:21 [] (unknown:0) - Internationalization .....: disabled, language=
[DEBUG][Qt] 12.10.2023 11:07:21 [] (unknown:0) - Developer mode ...........: enabled
[DEBUG][Qt] 12.10.2023 11:07:21 [] (unknown:0) - Application path .........: /Applications/Slicer-5.4.0_stable.app/Contents/MacOS

Suggests that you have multiple versions of MONAI installed? Try the running the command "pip list" and find out whether this is the case. If so consider uninstalling one version.


i2pd outproxy - how to turn this off??

I do not want my browser to connect to anything that isn't in i2p network!
How do I turn this off? There is no off button in the QT gui?
So how can I turn this off? This is very bad opsec!
Thanks

My config does not have any outproxy defined at all under this section. So why is it still using an outproxy?

It doesn't use httpproxy outproxy in this case, adding a boolean option to turn off the empty outproxy would be redundant.

yet it was still doing outproxy.

It wasn't. How do you make sure that it was doing it?

@nonlin-lin-chaos-order-etc-etal
okay looks like there is a problem with my setup. I am using a modified tor browser, and apparently clicking on a clearnet site from an i2p site will actually route the connection through configured socks proxy in the about:config, even if you're using the 4444 i2p http proxy
for those to whom it might be helpful, this is the fix:
make sure to set network.proxy.socks to empty string and network.proxy.socks_port to 0, where it originally is 9150. If you do not, clicking on clearnet links from i2p sites will connect to the site through the 9150 port tor proxy. Although, this behavior might actually be useful to you, but be aware that your Referrer origin, the i2p site, will be visible to the clearnet site you connect to.

My apologies to everyone in this issue, thank you for being patient with my lack of wisdom and intelligence @nonlin-lin-chaos-order-etc-etal @Vort @orignal


Deserialize issue when calling getItem()

Hi everybody,
I got this error when i call getItem()

It seems to be a problem of deserizalizing a string which is an email adress and I really don't understand why.
Here's a print of my screen :

And the Chrome Inspector crashes when I want to step over next function call.
Any clue about this issue ?
Thanks

Are you using a particular version/release or have you downloaded the latest from GitHub (i.e. master)?

I just tried to run this code and it worked in Chrome:
localforage.setItem('test'<EMAIL_ADDRESS>  .then(function() { return localforage.getItem('test'); })
  .then(function(email) { console.log(email); });

So I'm not sure what's up. Could you let me know the version of localForage and Chrome you're using? A code sample I can test myself would also help :smile:

I've directly downloaded the master version from Github this morning so I guess I'm up to date :) . I'm using Chrome Version 43.0.2357.81, normally the latest version.
Here's the function that I call.

var PREFIX_WORKOUT = 'wk_',
    workoutList = null ;

init: function () {
                $localForage.keys().then(function(keys) {
                    var wkkeys = _.filter(keys,function(k){ return k.indexOf(PREFIX_WORKOUT) === 0});
                    $localForage.getItem(wkkeys).then(function(w) {
                        workoutList = w;
                    }, function(err){console.log(err);});
                });
            }

So the getItem() has wkkeys as argument which is an array of keys.
I use also the localForage for angular, available here https://github.com/ocombe/angular-localForage/
Thanks for your time and your help

Hmm, would it be possible to include an example using JSFiddle or something like that? I can’t run this code directly in Chrome and if I can spend the time examining the bug instead of getting a localforage-angular environment up that’d be great :-)
Thanks!
—
Sent from Mailbox
On Mon, Jun 1, 2015 at 1:02 PM, EnzoHeroguel<EMAIL_ADDRESS>wrote:

I've directly downloaded the master version from Github this morning so I guess I'm up to date :) . I'm using Chrome Version 43.0.2357.81, normally the latest version.
Here's the function that I call.
var PREFIX_WORKOUT = 'wk_',
    workoutList = null ;
init: function () {
                $localForage.keys().then(function(keys) {
                    var wkkeys = _.filter(keys,function(k){ return k.indexOf(PREFIX_WORKOUT) === 0});
                    $localForage.getItem(wkkeys).then(function(w) {
                        workoutList = w;
                    }, function(err){console.log(err);});
                });
            }

So the getItem() has wkkeys as argument which is an array of keys.
I use also the localForage for angular, available here https://github.com/ocombe/angular-localForage/
Thanks for your time and your help
Reply to this email directly or view it on GitHub:
https://github.com/mozilla/localForage/issues/388#issuecomment-107416093

Actually, I think that it matches with this issue : https://github.com/mozilla/localForage/issues/63
The issue comes from here
if (value.substring(0,
            SERIALIZED_MARKER_LENGTH) !== SERIALIZED_MARKER) {
            return JSON.parse(value);
        }

value is equal to<EMAIL_ADDRESS>and it doesn't succeed to pass through the parse function, so that I got that Syntax Error


Support not running group body when subcommand is asked for help

Consider the code below:
import click

@click.group()
def main():
    """ Run code """
    click.echo("Code is running.")

@main.command()
def foo():
    """ Do foo """

if __name__ == '__main__':
    main()

When this script is run with python script.py --help, just the help for the main command is displayed, as expected.  When the script is run with python script.py foo --help, however, the body of the main() function is run before the help text for foo is displayed, and the line "Code is running." is printed out above the help text.  I would like to request some built-in method to prevent the main() function from running when a subcommand is asked for help.
As far as I am aware, the best way to currently get what I want is via this SO answer, which moves the body of main() into a wrapper around Command.invoke().  This strikes me as needlessly complicated, and I expect there should be a better way.

Click is dynamic, there's no generic way for it to know what foo is without executing everything before it. There are other related issues open about this regarding --help and completions.


Connecting kong-gateway to crunchy-postgres fails with ecdsa-with-sha384: invalid digest type

Is there an existing issue for this?

[X] I have searched the existing issues

Kong version ($ kong version)
Kong <IP_ADDRESS>
Current Behavior
When I install the latest crunchy-postgres operator, create a postgres instance and try to connect kong-gateway to the crunchy-postgres instance, I am getting the error Error: x509.cert:digest: ecdsa-with-sha384: invalid digest type
I activated the pg_ssl setting and set pg_ssl_version to tlsv1_2
Expected Behavior
Kong should connect successfully to the crunchy-postgres instance
Steps To Reproduce
1. Install Crunchy-Postgres-Operator
2. Install a Postgres Instance using the operator
3. Create a kong installation pointing the database to the Postgres Instance from the Crunchy Operator

Anything else?
Openshift 4.10
Kong IngressController 2.5.0
Kong Helm Chart 2.11.0

@wombat there seems to be a PR though:
https://github.com/leafo/pgmoon/pull/127

This seems to be hopefully fixed now upstream: https://github.com/leafo/pgmoon/pull/130
Will this be included in one of the next releases?

Hello @wombat,
sorry for the long delay in responding.  Once pgmoon 1.16 is released, we will switch Kong Gateway to use it, hopefully making this issue go away.
Kind regards,
Hans

@hanshuebner leafo was super nice and released a new version yesterday 🎉


Request Access as Prime Admin when operator already exists is broken[8]

Describe the Bug:
When an IO requests access as prime admin for an operator that already exists, we should only show the User Information part of the UserOperator multistep form with the email and phone number of the current user prepopulated. but currently, we are showing all user information which is not what we want. Here is the wireframe: https://www.figma.com/file/LsDmLDCdnJqI8UahyqvOD8/OBPS-App-Designs?type=design&node-id=2401-146&mode=design&t=v9FvQ3xSYYraC3xX-4
Probability (how likely the bug is to happen, scored from 1-5):5
(For example, probability of 5 is something like "it happens to all users every time they log in."
Probability of 1 "only happens to certain users when a really specific and unlikely path is followed.")
Effect (how bad the bug is when it does happen, scored from 1-5):3
(For example, effect of 5 is "the entire app crashes and makes it unusable for all users" or "the bug causes the wrong data to be saved, with critical information (e.g. payment) being affected."
Effect of 1 is "It makes some styling look a little bit weird.")

Adding in my observations:
Currently, when an IO attempts to "Request Access as Prim Admin" when operator exists client/app/components/routes/select-operator/form/UserOperator.tsx` calls function:
export async function getUserOperatorFormData(id: number | undefined) {
  if (!id) return {};
  return actionHandler(
    `registration/select-operator/user-operator/${id}`,
    "GET",
    `/user-operator/${id}`,
  );
}

which returns error:


Unable to install

I 'm installing it on windows machine. I'm facing this issue.
**Building wheels for collected packages: submodlib
Building wheel for submodlib (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for submodlib (pyproject.toml) did not run successfully.
│ exit code: 1**
Sharing the complete logs
error.odt

@bingobhavik @rishabhk108 @prpankajsingh
Is this issue still there?
Or is it resolved?
I'm planning to use this library for my research purpose and i hope the library works


feat: support india in timezone constants

This PR is to add constant to support India time zone

Thank you for your PR, it would be better if translate carbon in Hindi language like en


chore(docs): remove non native token in docs + update portal docs

Poprtal had updates with new deposit and cancel flows so wanted to update the docs
Similarly removed references to non_native_token in docs now that we have the token bridge!

closing this in favour of one of Lasse's docs PR


Assertion numbers in snap files make test diffs noisy

What happened?
@@ -1,6 +1,6 @@
 ---
 source: crates/my_code.rs
-assertion_line: 1773
+assertion_line: 1765
 expression: my_expr

 ---

This happens if the .snap file is rewritten for whatever reason. Fortunately tests don't fail if the line assert is the only thing that changes, but it has the side effect that the assert line is wrong if the source file changed in such a way it doesn't break the tests (since that .snap file was written).
Reproduction steps

Change something that breaks a insta test
The assert line number changes in the snapshot

Insta Version
1.8.0
rustc Version
rustc 1.58.1 (db9d1b20b 2022-01-20)
What did you expect?
I think the above is annoying because it causes noise in the diff, and I can't see why the information is useful.
Suggestion: a feature flags to take those .snap file headers away?

Generally the assertion line is primarily useful for snapshot reviews with cargo-insta. After the review concluded it does not really fulfill a purpose any more. One way to address this would be to only retain the assertion_line in the .new files.


Hello, please release the complete version of the tutorial as soon as possible

I am a beginner and just finished running Hello Word and displayed a teapot model. I think this can achieve the function of displaying robots and point clouds. I have not used OSG before. I need a complete, not necessarily perfect tutorial. I hope you can provide such a tutorial in your spare time. Thank you

Are you willing to pay for the timely completion of vsgTutorial.  It's taken me 100hrs work so far and I'm 1/3rd the way through, so realistically it's another 200hrs work to complete.  I have to pay the bills to keep food on the table and roof over my head so can't just dedicated full time to activities like vsgTutorial, it takes a lower priority than paying work.
As for robots and point clouds, the VSG is already been used in both these capacities.  If you have questions please use the official Discussion forum:
https://github.com/vsg-dev/VulkanSceneGraph/discussions

Thank you very much for your answer. I understand your situation. I will run and analyze other examples to try to understand VSG, and then recommend VSG to a few of my friends. If I encounter problems in the future, I will go to the official discussion forum.


property order feature added

I would like to add a feature for ordering properties of the ViewModel
In order to do this;
First, Order property and GetOrder() function added to ExcelColumnNameAttribute.
Secondly, I added a new DTO ColumnList to hold the columns with their orders.
Then, update the GetColumnList method in ExcelHelper to get the list in order and propertyInfoList is ordered  to arrange rows.
Hope that's make sense.

It looks nice. Thanks


Add navigation

Add navigation for Dashboard and Settings

Add Routes in React and make sures the proxy works.
Dashboard and Settings only Accessible when user is logged in


Why should session_id be a valid UUID?

Why should session_id be a valid UUID? The session_id is used as a unique identifier for the chat session, but why must clients enforce it to be a valid UUID? Is there a specific reason for this? Couldn't it simply be a unique identifier that makes sense to the client?
For example, I'm using LangChain in production, and the customer support platform uses a different type of unique identifier. I would like to use that identifier without the need to create a mapping to a UUID instance. I assume many LangChain users could encounter the same issue when working with systems where they cannot change the session_id creation method.
https://github.com/langchain-ai/langchain-postgres/blob/b72b86a23513f7c9deaebba3a6ab316725585f55/langchain_postgres/chat_message_histories.py#L191-L196

Hey @lgabs,
Great question about the session_id needing to be a UUID. The reason we use UUIDs is mainly for ensuring that each session ID is unique and doesn't clash with others, especially when data is spread across different systems or databases. UUIDs are pretty good at preventing these kinds of conflicts without needing any central setup to keep track of IDs.
For systems like yours that use a different type of ID, this might feel a bit restrictive. Technically, as long as the IDs are unique within your application, it shouldn’t be a problem. The current setup is more about playing it safe on the side of universal uniqueness.
Hope that clears things up!
Cheers!

Thanks for the clarification @shamspias ! I do understand why UUIDs are so useful, but why should this implementation enforce them? As you said, "Technically, as long as the IDs are unique within your application, it shouldn’t be a problem", that's also my point: if you have a system with unique IDs and want to use langchain-postgres for chat_history, it will raise the referenced error. IMHO, the client using the library is responsible for enforcing IDs uniqueness.

Well, they have to follow standards somehow. If you do it differently, you can override the class—it’s actually easy to do!


Documentation Issue

Hi
In step 7 when you update the Logic App you do not say what permissions you need to update the Logic App.
Ordinary accounts and you cannot see the Logic App.  Do you need to Global Admin to update the Logic App.
Regards
Nigel

Hi
It looks like there is a role called Logic App Contributor which allows you update a Logic App.
Sometime it is not possible to be Global Admin.
Regards
Nigel


Changing world error/ Multiverse teleportation plugin (a.k.a random "spawn" )

Found solution to this
I found solution to world problem i tried to convert the world not using the bukkit, so i used minecraft server.jar(newest one) and it worked. i copied the old world folder then started minecraft server 1.2.3 ver. and it started coverting. then i stopped the server and copied the coverted world folder to craft bukkit server folder and tada! all spawn and teleports work again
( bukkit coverting not working properly? maybe. )
sry for missleading topic

Somehow the issue title and description don't match...

Yes sorry bout that i changed it

If the world isn't correctly converted, that's a CraftBukkit-bug and not MV's fault.

This was fixed in https://github.com/Bukkit/CraftBukkit/commit/f9e35f890129b0e0532b3fea7512a6dfb9a3b779


[nrf fromlist] boot: add precise check of the image size

It is possible that image in the slot is so big
that MCUboot swap metadata will interfere with
its content during the swap operation.
This patch introduces additional check to the image
validation procedure.
origin: https://github.com/mcu-tools/mcuboot/pull/1286
ref. NCSDK-11355
Signed-off-by: Andrzej Puzdrowski<EMAIL_ADDRESS>

Fix will comme in next upmerge.


Sidebar colour scheme unreadable on Monospace (light)

It seems to be using a dark background instead of a light one.

If you change--side-bar-bg-color to a light colour there are still issues with the highlight background colour and very light grey text.

should be fixed already


Possible conflict with PlantEverything

The mod "Plant Everything" by Advize allows the user to equip the cultivator and press the middle mouse button in order to remove a pickable item. After installing OCDHeim, this middle mouse button function doesn't work.
I tried checking for alt keybind but there isn't any setting for keybinds in the PlantEverything config.
Any suggestions?

Normally I would say that compatibility with other mods will be a priority a couple of months into the development life-cycle. However, this sounds weird enough (neither does OCDheim use the middle mouse button, nor does Advize's mod use ALT AFAIK) and serious enough for a small inquiry ;)
Thank You once more :)

I have pinpointed this issue, as well. The problem was with the Heightunlimited Mod. This particular mod (Height mod) also introduced memory leaks. I apologize for the length of time to get back to you on these 2 issues. It took awhile for me to debug.

Am I too optimistic to conclude that this issue could be considered closed from your perspective?


connection error doesn't trigger error handler.  Promise not resolved or rejected

If I have a bad url, or bad username / password combo, when I hit connect, I'd expect the .error() handler to get called.  However, client.connect() just hangs forever.  In the code snippet below, I'd expect a connection error to get logged to console by the .error(err= console.log(err));  If I turn on the debug environment variable I see your library generating experiencing errors back from the server, but they are not resolving or rejecting the .connect promise.
Code Snippet:
const AMQPClient = require("amqp10").Client;
const Promise = require("bluebird");
const activeMQPolicy = require("amqp10").Policy;
const client = new AMQPClient(activeMQPolicy.ActiveMQ);
const setUp = () => {
console.log('doing setup');
return Promise.all([
client.createReceiver("USERS.destQueue"),
client.createSender("USERS.sendQueue")
]).catch(err => {
console.log('err');
});
};
console.log('connecting');
client.connect("amqp://user:password@localhost")
.then(setUp).error(err => console.log(err));
DEBUG: LOGS:
amqp10:framing => @sasl-init(65) [mechanism='PLAIN' initialResponse=<Buffer 00 75 73 65 72 00 70 61 73 73 77 6f 72 64> hostname=null] +0ms
amqp10:trace raw: [0000002602010000005341c01903a305504c41494ea00e00757365720070617373776f726440] +0ms
amqp10:trace Rx:<PHONE_NUMBER>010000005344c003015001 +1ms
amqp10:framing <= @sasl-outcome(68) [code=1 additionalData=null] +0ms
amqp10:trace raw: [005344c003015001] +0ms
amqp10:connection Error from socket: AmqpAuthenticationError: SASL Failed: 1: undefined +0ms
amqp10:client connection error:  { AmqpAuthenticationError: SASL Failed: 1: undefined
at Sasl._processFrame (/Users/swilliams/projects/sandbox/active-mq/amqp-client/node_modules/amqp10/lib/sasl.js:102:21)
at Connection._processFrameEH (/Users/swilliams/projects/sandbox/active-mq/amqp-client/node_modules/amqp10/lib/sasl.js:43:49)
at emitOne (events.js:115:13)
at Connection.emit (events.js:210:7)
at Connection._receiveAny (/Users/swilliams/projects/sandbox/active-mq/amqp-
name: 'AmqpAuthenticationError',
message: 'SASL Failed: 1: undefined' } +1ms
amqp10:client disconnected +0ms
amqp10:connection stateChange: IN_SASL => DISCONNECTED , reason: error +0ms

Yeah, in initial tests with turning off the connection, it takes a long time to get any event. I think it is dependent on the remoteTimeout, which we cannot change.  As I wanted to be more proactive on network drops, I just turned off all reconnect, and do a disconnect/connect on a timeout set after the last message received.
It would be nice to be able to hook into heartbeat errors, or something that would warn you earlier of issues.


[IMP] Optimize cugraph storage sampling

Optimize cugraph storage sampling
This PR optimizes cugraph sampling by 22x by removing the below serial loop: https://github.com/rapidsai/dgl/blob/3793623a5b89df2ad9c7462e1b5db742e7ef8666/python/dgl/contrib/cugraph/cugraph_storage.py#L129-L134 .
This PR closes https://github.com/rapidsai/graph_dl/issues/8 .
PR Time: 8.40285 vs 177.343 s (22x Delta) .
The main advantage of the PR is to ensure that the sampling is bottlenecked by libcugraph op and not python host side code.
Mainline
Timer unit: 1e-06 s

Total time: 177.343 s
File: /home/nfs/vjawa/dgl/dgl/python/dgl/contrib/cugraph/cugraph_storage.py
Function: sample_neighbors at line 73

Line #      Hits         Time  Per Hit   % Time  Line Contents
==============================================================
    73                                               def sample_neighbors(self, seed_nodes, fanout, edge_dir='in', prob=None,
    74                                                                    exclude_edges=None, replace=False,
    75                                                                    output_device=None):
    76                                                   """
    77                                                   Return a DGLGraph which is a subgraph induced by sampling neighboring
    78                                                   edges ofthe given nodes.
    79                                                   See ``dgl.sampling.sample_neighbors`` for detailed semantics.
    80                                                   Parameters
    81                                                   ----------
    82                                                   seed_nodes : Tensor or dict[str, Tensor]
    83                                                       Node IDs to sample neighbors from.
    84                                                       This argument can take a single ID tensor or a dictionary of node
    85                                                       types and ID tensors. If a single tensor is given, the graph must
    86                                                       only have one type of nodes.
    87                                                   fanout : int or dict[etype, int]
    88                                                       The number of edges to be sampled for each node on each edge type.
    89                                                       This argument can take a single int or a dictionary of edge types
    90                                                       and ints. If a single int is given, DGL will sample this number of
    91                                                       edges for each node for every edge type.
    92                                                       If -1 is given for a single edge type, all the neighboring edges
    93                                                       with that edge type will be selected.
    94                                                   prob : str, optional
    95                                                       Feature name used as the (unnormalized) probabilities associated
    96                                                       with each neighboring edge of a node.  The feature must have only
    97                                                       one element for each edge.
    98                                                       The features must be non-negative floats, and the sum of the
    99                                                       features of inbound/outbound edges for every node must be positive
   100                                                       (though they don't have to sum up to one).  Otherwise, the result
   101                                                       will be undefined. If :attr:`prob` is not None, GPU sampling is
   102                                                       not supported.
   103                                                   exclude_edges: tensor or dict
   104                                                       Edge IDs to exclude during sampling neighbors for the seed nodes.
   105                                                       This argument can take a single ID tensor or a dictionary of edge
   106                                                       types and ID tensors. If a single tensor is given, the graph must
   107                                                       only have one type of nodes.
   108                                                   replace : bool, optional
   109                                                       If True, sample with replacement.
   110                                                   output_device : Framework-specific device context object, optional
   111                                                       The output device.  Default is the same as the input graph.
   112                                                   Returns
   113                                                   -------
   114                                                   DGLGraph
   115                                                       A sampled subgraph with the same nodes as the original graph, but
   116                                                       only the sampled neighboring edges.  The induced edge IDs will be
   117                                                       in ``edata[dgl.EID]``.
   118                                                   """
   119                                                   # change the seed_nodes from pytorch tensor to cudf series
   120         1         13.0     13.0      0.0          if torch.is_tensor(seed_nodes):
   121                                                       seed_nodes = cupy.asarray(seed_nodes)
   122                                                       seed_nodes = cudf.Series(seed_nodes)
   123
   124         2    6246285.0 3123142.5      3.5          parents_nodes, children_nodes = self.graphstore.sample_neighbors(
   125         1          1.0      1.0      0.0              seed_nodes, fanout, edge_dir='in', prob=None, replace=False)
   126
   127         1          3.0      3.0      0.0          num_edges = len(children_nodes)
   128         1         53.0     53.0      0.0          edge_ID_list = torch.zeros(num_edges)
   129      9778      13596.0      1.4      0.0          for i in range(num_edges):
   130      9777   34114739.0   3489.3     19.2              mask1 = self._edge_prop_df['_SRC_'] == int(parents_nodes[i])
   131      9777   39672566.0   4057.7     22.4              mask2 = self._edge_prop_df['_DST_'] == int(children_nodes[i])
   132     19554   97280880.0   4975.0     54.9              edge_ID_list[i] = torch.tensor(self._edge_prop_df[mask1 & mask2]
   133      9777      13170.0      1.3      0.0                                             ['_EDGE_ID_'].values_host)
   134                                                   # construct dgl graph, want to double check if children and parents
   135                                                   # are in the correct order
   136         1        966.0    966.0      0.0          sampled_graph = dgl.graph((children_nodes, parents_nodes))
   137                                                   # add '_ID'
   138         1          2.0      2.0      0.0          num_edges = len(children_nodes)
   139         1        225.0    225.0      0.0          sampled_graph.edata['_ID'] = edge_ID_list
   140                                                   # to device function move the dgl graph to desired devices
   141         1          1.0      1.0      0.0          if output_device is not None:
   142                                                       sampled_graph.to_device(output_device)
   143
   144         1          0.0      0.0      0.0          return sampled_graph

PR
Total time: 8.40285 s
File: /home/nfs/vjawa/dgl/dgl/python/dgl/contrib/cugraph/cugraph_storage.py
Function: sample_neighbors at line 75

Line #      Hits         Time  Per Hit   % Time  Line Contents
==============================================================
    75                                               def sample_neighbors(
    76                                                   self,
    77                                                   seed_nodes,
    78                                                   fanout,
    79                                                   edge_dir="in",
    80                                                   prob=None,
    81                                                   exclude_edges=None,
    82                                                   replace=False,
    83                                                   output_device=None,
    84                                               ):
    85                                                   """
    86                                                   Return a DGLGraph which is a subgraph induced by sampling neighboring
    87                                                   edges ofthe given nodes.
    88                                                   See ``dgl.sampling.sample_neighbors`` for detailed semantics.
    89                                                   Parameters
    90                                                   ----------
    91                                                   seed_nodes : Tensor or dict[str, Tensor]
    92                                                       Node IDs to sample neighbors from.
    93                                                       This argument can take a single ID tensor or a dictionary of node
    94                                                       types and ID tensors. If a single tensor is given, the graph must
    95                                                       only have one type of nodes.
    96                                                   fanout : int or dict[etype, int]
    97                                                       The number of edges to be sampled for each node on each edge type.
    98                                                       This argument can take a single int or a dictionary of edge types
    99                                                       and ints. If a single int is given, DGL will sample this number of
   100                                                       edges for each node for every edge type.
   101                                                       If -1 is given for a single edge type, all the neighboring edges
   102                                                       with that edge type will be selected.
   103                                                   prob : str, optional
   104                                                       Feature name used as the (unnormalized) probabilities associated
   105                                                       with each neighboring edge of a node.  The feature must have only
   106                                                       one element for each edge.
   107                                                       The features must be non-negative floats, and the sum of the
   108                                                       features of inbound/outbound edges for every node must be positive
   109                                                       (though they don't have to sum up to one).  Otherwise, the result
   110                                                       will be undefined. If :attr:`prob` is not None, GPU sampling is
   111                                                       not supported.
   112                                                   exclude_edges: tensor or dict
   113                                                       Edge IDs to exclude during sampling neighbors for the seed nodes.
   114                                                       This argument can take a single ID tensor or a dictionary of edge
   115                                                       types and ID tensors. If a single tensor is given, the graph must
   116                                                       only have one type of nodes.
   117                                                   replace : bool, optional
   118                                                       If True, sample with replacement.
   119                                                   output_device : Framework-specific device context object, optional
   120                                                       The output device.  Default is the same as the input graph.
   121                                                   Returns
   122                                                   -------
   123                                                   DGLGraph
   124                                                       A sampled subgraph with the same nodes as the original graph, but
   125                                                       only the sampled neighboring edges.  The induced edge IDs will be
   126                                                       in ``edata[dgl.EID]``.
   127                                                   """
   128                                                   # change the seed_nodes from pytorch tensor to cudf series
   129         1         38.0     38.0      0.0          if torch.is_tensor(seed_nodes):
   130                                                       seed_nodes = to_dlpack(seed_nodes)
   131                                                       seed_nodes = cudf.from_dlpack(seed_nodes)
   132
   133         2    8358552.0 4179276.0     99.5          parents_nodes, children_nodes = self.graphstore.sample_neighbors(
   134         1          1.0      1.0      0.0              seed_nodes, fanout, edge_dir="in", prob=None, replace=False
   135                                                   )
   136
   137         1        354.0    354.0      0.0          sample_df = cudf.DataFrame({"_SRC_": parents_nodes, "_DST_": children_nodes})
   138         1          1.0      1.0      0.0          del parents_nodes, children_nodes
   139         2      40361.0  20180.5      0.5          edge_df = sample_df.merge(
   140         1        963.0    963.0      0.0              self._edge_prop_df[["_SRC_", "_DST_", "_EDGE_ID_"]], on=["_SRC_", "_DST_"]
   141                                                   )
   142         1         20.0     20.0      0.0          del sample_df
   143
   144         1        381.0    381.0      0.0          edge_df = edge_df.astype(seed_nodes.dtype)
   145
   146                                                   # construct dgl graph, want to double check if children and parents
   147                                                   # are in the correct order
   148
   149         2        815.0    407.5      0.0          sampled_graph = dgl.graph(
   150         1          1.0      1.0      0.0              (
   151         1        486.0    486.0      0.0                  from_dlpack(edge_df["_DST_"].to_dlpack()),
   152         1        300.0    300.0      0.0                  from_dlpack(edge_df["_SRC_"].to_dlpack()),
   153                                                       )
   154                                                   )
   155
   156         1        577.0    577.0      0.0          sampled_graph.edata["_ID"] = from_dlpack(edge_df["_EDGE_ID_"].to_dlpack())
   157
   158                                                   # to device function move the dgl graph to desired devices
   159         1          1.0      1.0      0.0          if output_device is not None:
   160                                                       sampled_graph.to_device(output_device)
   161
   162         1          0.0      0.0      0.0          return sampled_graph
```

@wangxiaoyunNV  , Are we gd to merge this ?


Correct default value for BuildInParallel

According to the MSBuild task documentation (https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-task) the default value for BuildInParallel is false.

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/msbuild/building-multiple-projects-in-parallel-with-msbuild.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Interestingly, the default for the BuildInParallel project property to true (https://docs.microsoft.com/en-us/visualstudio/msbuild/common-msbuild-project-properties), while the default for the BuildInParallel task parameter of the MSBuild task is false. Some confusion might come from that.


feat: v5.0.0

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@ef2638a). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             master      #167   +/-   ##
==========================================
  Coverage          ?   100.00%
==========================================
  Files             ?        10
  Lines             ?       254
  Branches          ?        43
==========================================
  Hits              ?       254
  Misses            ?         0
  Partials          ?         0

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ef2638a...535206a. Read the comment docs.

Closing in favor of #171 (branch change)


cassandra socket exception

{"Exception":"Caught and observed unobserved exception System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond\r\n   at Cassandra.HostConnectionPool.<>c__DisplayClass3.b__1(Task1 t)\r\n   at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()\r\n   at System.Threading.Tasks.Task.Execute()\r\n   --- End of inner exception stack trace ---\r\n---> (Inner Exception #0)

Hi,
Do you have the whole exception?
This would be helpful to investigate.

{"Exception":"Caught and observed unobserved exception System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond\r\n   at Cassandra.HostConnectionPool.<>c__DisplayClass3.b__1(Task1 t)\r\n   at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()\r\n   at System.Threading.Tasks.Task.Execute()\r\n   --- End of inner exception stack trace ---\r\n---> (Inner Exception #0) System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond\r\n   at Cassandra.HostConnectionPool.<>c__DisplayClass3.b__1(Task1 t)\r\n   at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()\r\n   at System.Threading.Tasks.Task.Execute()<---\r\n","weid":"6039","frmt":"Error when event handler gets the unobserved task exception: System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond\r\n   at Cassandra.HostConnectionPool.<>c__DisplayClass3.b__1(Task1 t)\r\n   at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()\r\n   at System.Threading.Tasks.Task.Execute()\r\n   --- End of inner exception stack trace ---\r\n---> (Inner Exception #0) System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond\r\n   at Cassandra.HostConnectionPool.<>c__DisplayClass3.b__1(Task1 t)\r\n   at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()\r\n   at System.Threading.Tasks.Task.Execute()<---\r\n.

Sorry but you have to complain to Datastax instead I guess ;-)
I guess it's what you are looking for:
https://github.com/datastax/csharp-driver/blob/master/src/Cassandra/HostConnectionPool.cs
This repository is for CassandraSharp and is not linked to Datastax.

Thanks and I appreciate your help


GKE v1/v2: Backport to 2.4.16 - privateClusterConfig defaults

Per https://github.com/rancher/rancher/issues/33241, Google is rolling out changes to how cluster provisioning to GKE works whereby the default settings we have for private clusters do not work on all regions.
The UI would show a message like:
Cluster provisioning fails with Googleapi: Error 400: Private cluster config can only be set on private clusters., badRequest
The UI sends the following privateClusterConfig:
enablePrivateEndpoint: false
enablePrivateNodes: false
masterIpv4CidrBlock: null
type: "/v3/schemas/gkePrivateClusterConfig"
}```

The current plan is to have a workaround where we detect whether the region supports private cluster configs or not and then change our defaults. It should be in `master` so we need to backport this fix.

I am still seeing the issue on v2.4-5850-head
Googleapi: Error 400: Private cluster config can only be set on private clusters., badRequest
I tried us-central1-f zonal cluster and all US regional clusters.

was able to create US regional clusters: east1, east4, west2, west1
zonal cluster: us-central1-f
I am getting error from GCP for us-central1 region:
Googleapi: Error 500: Internal error encountered., backendError
This is coming from GCP, so not much can be done.


feat(LinearAlgebra/Matrix/Adjugate): adjugate_fin_three, adjugate_fin_three_of

Add adjugate_fin_three and adjugate_fin_three_of theroems, same style as adjugate_fin_two

If you move this result to after adjugate_fin_succ_eq_det_submatrix, then I think you can give a three-line proof:
  ext i j
  rw [adjugate_fin_succ_eq_det_submatrix, det_fin_two]
  fin_cases i <;> fin_cases j <;> simp [updateRow, Fin.succAbove, Fin.lt_def] <;> ring

Is it worth taking the time to golf adjugate_fin_two while we're at it?

I can loop into it and create a separate PR if i find something

#11051

You'll need to merge master once #11051 is merged.

You should usually wait for green CI before merging, just to be on the safe side.


Added terminology page

Overview
Added the terminology page, with definitions for many terms
Closes #56
Demo

Notes
I added terminology button to the top header, I am not sure what position it should go in, or if it should be there at all
Testing Instructions
go to
/terminology
and see for yourself

I think we should use capitalization and periods for the term definitions that are long enough to be complete sentences.

If possible, could we add a concrete example of what it takes to produce 1 MT
CO2E, like how many car's annual average emissions that is (or something like that)? I like how we have something for MW.


Text message in iOS

Is there a way I can implement SMS Notifications in iOS ?
https://pub.dartlang.org/packages/sms#-readme-tab-
I tried using the sms package but it says that it only supports Android. Is there a way to send text message notifications in iOS apps ?

You can delegate to native code in iOS as well. Just someone would need to implement it, like it was done for Android in the package you linked to.

MissingPluginException(No implementation found for method send on channel Send SMS )- I get this error. I tried Flutter clean as well but it is still there. Is the call for the function right ??
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter/services.dart';
//import 'package:sms/contact.dart';
import 'login_page.dart';
class SendSMS extends StatefulWidget{
_SendSMS createState() => new _SendSMS();
}
class _SendSMS extends State{
@override
static const platform = const MethodChannel('Send SMS ');
Future send()async {
print("SendSMS");
try {
final String result = await platform.invokeMethod('send',<String,dynamic>{"msg":"Hello! I'm sent programatically."});
} on PlatformException catch (e) {
print(e.toString());
}
}
Widget build(BuildContext context) {
// TODO: implement build
return new Material(
child : new Container(
alignment: Alignment.center,
child : new FlatButton(onPressed: send, child: new Text('send SMS '))
),
);
}
}

Okay thanks

I'm going to close this issue because we (the Flutter team) do not plan to write or maintain an SMS package. We would encourage anyone interested in such a package to work together to create one.


mariadb: updates

Description of changes
see commit messages
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

I think some explanation is needed why 10.10 is going but e.g. 10.6 is staying.

Otherwise nixpkgs-review reveals no new failures, macos 10.15 & nixos x86_64 inc. passthru.tests

I think some explanation is needed why 10.10 is going but e.g. 10.6 is staying.

Where would you like me to put such an explanation?
I had hoped the diff was self-explanatory, since I'm deleting code that says "Supported until 2023-11-17. TODO: remove ahead of 23.11 branchoff".
Should I rephrase the alias to say something like "because it is end of life upstream"? I just copied the one from mariadb_104.

Ah yeah I missed that. I would have just put that in the commit message


No allowance for additional CSS styles

I recently had reason to use the status_tag helper for a few columns in an index view, and noticed I couldn't customize the active_admin.css without losing the changes in the next upgrade. I added my custom .status.whatever classes to the active_admin.css file, and when I upgraded from v0.2.1 to v0.2.2 my changes were overridden.
I'm not sure what your plans are with regard to the changes with the asset pipeline in Rails v3.1, but I would like to suggest a way to provide coders a way to override or extend stylesheet classes.
# active_admin.css
@import url('/stylesheets/admin/active_admin_base.css');
@import url('/stylesheets/admin/active_admin_custom.css');

# active_admin_base.css
/* Active Admin CSS */
...

# active_admin_custom.css
/* Custom Active Admin CSS */
.status.yes { background: #8daa92; }
.status.no { background: #d45f53; }

This allows folks to override or extend styles for Active Admin views. @import is compatible with almost every browser. The only exception is Netscape Navigator 4 which is an acceptable loss to me because my target admin audience only use the latest versions of major browsers. And if necessary, a hack could be employed to include it for NN4.
I'm happy to fork and make the changes and tests if you like, but I'm unsure whether this would be tackled a different way with the impending changes to Rails asset pipeline; or whether you had some other way you might want to tackle this.

Yeah, where is this documented? Also how can you customize which actions appear on a Resourece detail page. I don't want the "New" button for some reasons even though I have the REST route available to be used elsewhere in the app..


Scheduler timing is way off

When using scheduler to execute task at specific interval (e.g. 2s), task gets executed late after only few executions. Debug time stamps are exactly at desired interval - 2s, but in reality it is not 2s.

I am sorry, it is my fault :-) Silly mistake :-) You can delete this.

Ok


Squash multiple consent windows

Record the current desired consent window, and squash all others that Chrome tries to helpfully "restore."
I need to file a bug over this Chrome window behavior, it's pretty unfortunate...
Fixes #230

Lgtm


Error downloading Single Shots from Comedians In Cars Getting Coffee

Does youtube-dl support the Single Shots videos put out by Jerry Seinfield's Comedians In Cars Getting Coffee (CICGC)?
I am able to use youtube-dl for the actual videos where Jerry goes out for a coffee.  But, the CICGC web site also includes "out takes" called Single Shots.  When I tried to download one of those I get:
bash.exe"-3.1$ youtube-dl --verbose http://http://comediansincarsgettingcoffee.com/single-shots/tina-fey-brian-regan-sarah-silverman-donuts
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'http://comediansincarsgettingcoffee.com/singl
e-shots/tina-fey-brian-regan-sarah-silverman-donuts']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2015.07.21
[debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-67467-g2b14593, ffprobe N-67467-g2b14593, rtmpdump 2.4
[debug] Proxy map: {}
[ComCarCoff] single-shots: Downloading webpage
ERROR: An extractor error has occured. (caused by KeyError(u'tina-fey-brian-regan-sarah-s
ilverman-donuts',)); please report this issue on https://yt-dl.org/bug . Make sure you ar
e using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl wi
th the --verbose flag and include its complete output.
Traceback (most recent call last):
File "youtube_dl\extractor\common.pyo", line 275, in extract
File "youtube_dl\extractor\comcarcoff.pyo", line 39, in _real_extract
KeyError: u'tina-fey-brian-regan-sarah-silverman-donuts'
Traceback (most recent call last):
File "youtube_dl\YoutubeDL.pyo", line 656, in extract_info
File "youtube_dl\extractor\common.pyo", line 281, in extract
ExtractorError: An extractor error has occured. (caused by KeyError(u'tina-fey-brian-rega
n-sarah-silverman-donuts',)); please report this issue on https://yt-dl.org/bug . Make su
re you are using the latest version; type  youtube-dl -U  to update. Be sure to call yout
ube-dl with the --verbose flag and include its complete output.
Regards,
sjmyst

Singleshots will be supported in the next version. Thanks for the report.


Screenshot update for settings directory

Why:
Closes: https://github.com/github/docs/issues/23967

What's being changed (if available, include any code snippets, screenshots, or gifs):

Check off the following:

[ ] I have reviewed my changes in staging (look for the "Automatically generated comment" and click the links in the "Preview" column to view your latest changes).
[ ] For content changes, I have completed the self-review checklist.

Hi, @cmwilson21! I did some accessibility updates for the setting directory. Please check this out when chanced!✨


Fix HEREDOCs in Style/Multiline*BraceLayout Cops

@jonas054 this relates to a previous Pull Request you made. NOTE: I have not adjusted the comment correction behavior. The tests still exist for that and are not impacted by this change. This only relates to HEREDOC edits that can cause invalid code.
bbatsov/rubocop#2873 introduced some changes to HEREDOC handling. While
these changes fixed some issues with auto-correcting and comments, they
also broke the handling of some HEREDOC use-cases.
For example, this code cannot be corrected in the symmetrical or same
line style because EOM) on the last line would be invalid code.
foo(a,
  b: <<-EOM
    bar
  EOM
)

# invalid
foo(a,
  b: <<-EOM
    bar
  EOM)

Additionally, this code cannot be corrected in the symmetrical or same
line style because <<-EOM).to(<<-EOM2 would not be valid code.
foo(<<-EOM
    bar
  EOM
).to(<<-EOM2
  baz
EOM2
)

# invalid
foo(<<-EOM).to(<<-EOM2
    bar
  EOM
  baz
EOM2
)

This change simply ignores HEREDOCs that cannot be corrected. The
determination is made by checking the HEREDOC's last line.
For example, the following can be corrected because the HEREDOC ends on
a non-conflicting line.
foo(a,
  b: {
    c: <<-EOM
      bar
    EOM
  }
)

# valid
foo(a,
  b: {
    c: <<-EOM
      bar
    EOM
  })

The build is failing.

@bbatsov sorry about that - rebased and fixed


Infinite loop when transpiling to Java html5.js from Closure Compiler contribs.

Hello,
We are working on providing to the GWT community Java bindings (Java source code) to many standard Javascript libraries: see https://github.com/didier-durand/JSClosure2Interop
This work  is based on this JSInterop Generator and Javscript contribs to the Closure Compiler project (replicated wih identical structure in js directory)
So, in the gen directory, you will see that successful transpiling back to Java for various small Javascript is achieved : GeoJson, Async-2.0, es3, etc.
But, our final targets is bigger libraries like Google Maps (prio 1), jQuery, Ace, Angular, etc. For those, the list of dependency is bigger.
For example, you will see that Google Maps requires 27 dependencies (see src/test/java/oss/jsinterop/cl2jsi/test/TestConverterGmaps.java)
As they use many browser features, those large libraries end up (see src/test/java/oss/jsinterop/cl2jsi/test/TestConverterFailure.java) all involving html5.js to solve their dependencies.
html5.js (see /js/google-closure-compiler/externs/browser/html5.js) comes from Google Closure Compiler contribs.
At this point in time, when its isolated transpiling is tried, JSInterop Genarator seems to go into an infinite loop (please, run src/test/java/oss/jsinterop/cl2jsi/test/TestConverterHtml5.java -  The jar of Generator is embarked, so it should run).
Same thing with the transpiling of all large libraries requiring it: when we introduce html5.js to complete the needs, the transpiler loops forever. Its Jar was created from master of March, 21st (commit: https://github.com/google/jsinterop-generator/commit/e68a27e22658ecc806c8be1ae398c9ec9ad876d8)
The debug mode of the Generator doesn't say anything user about this loop.
Is the error on our side?
Thanks!
Didier

How about using Elemental2 bindings?

Hello Thomas, where do I get them (preferably in source code)?  happy to try that.

I have produced some draft copies of google maps v3 and ace editor v1.2.3 through jsinterop-generator, by modifying elemental2 a bit, but the same outcome can probably be achieved through another bazel project which references elemental2. The process requires editing the extern files (or jsinterop-generator itself) to handle cases with externs that are valid for closure-compiler but not for jsinterop-generator.
Source jars (no .gwt.xml, no bytecode, but you could unpack these and build them, try them out) from the projects I've gotten working so far:
https://colinalworth.com/ace-editor-src.jar
https://colinalworth.com/google_maps_api_v3.jar
Some notes:

https://github.com/google/jsinterop-generator/issues/40
https://github.com/google/elemental2/issues/119

I'm running low on free time these days, but will try to get this into a usable shape so that I can put it in a git repo. @stockiNail has been collaborating with me by trying out the jars a bit and finding issues with either the externs or how jsinterop-generator handles them, as time permits we'll see about making some improvements and publishing these.

Hello Thomas, where do I get them (preferably in source code)? happy to try that.

https://github.com/google/elemental2

Hello Thomas, where do I get them (preferably in source code)? happy to try that.

https://github.com/google/elemental2

Thanks, Goktug! I will try those bindings. Didier

https://colinalworth.com/ace-editor-src.jar
https://colinalworth.com/google_maps_api_v3.jar

Colin, I'll try your source code and will let you know. Didier

@didier-durand FYI I'm gonna test ACE because I've already used in GWT (by JSNI).
@niloc132 I've found an error into a method definition. Do you prefer having a complete list of items to fix or item by item when I'll face them?

@stockiNail : Hi, yes, please, let us know : i tried to generate ace-1.2.3.js But, it's in my failling tests due to its dependency on html5.js which triggers the infinite loop of this ticket.
See line 204 of https://github.com/didier-durand/JSClosure2Interop/blob/master/src/test/java/oss/jsinterop/cl2jsi/test/TestConverterFailure.java
Best
Didier

@didier-durand yes, I do my best! Let me say that I'm using the sources provided by @niloc132 and the ace builds from https://github.com/ajaxorg/ace-builds/.

@didier-durand yes, I do my best! Let me say that I'm using the sources provided by @niloc132 and the ace builds from https://github.com/ajaxorg/ace-builds/.

Mine are the closure of ace-1.2.3.js copied from the Closure Compiler project (source all of the js in my trials)

@didier-durand it is better to depend not on closure-compiler's own externs directly, but on the output of elemental2 running. You need elemental2-core and elemental2-dom. Very roughly:
jsinterop_generator(
    name = "ace-editor",
    srcs = ["ace-1.2.3.js"],
    extension_type_prefix = "AceEditor",
    #    integer_entities_files = ["integer_entities.txt"],
    # override auto generated js_deps in order not to provide extern files
    # Common extern file are included by default.
    j2cl_js_deps = [],
    deps = [
        "//java/elemental2/core",
        "//java/elemental2/dom",
    ],
)

and fix
/**
 * The main class required to set up an Ace instance in the browser.
 * @const
 * @see https://ace.c9.io/#nav=api&api=ace
 */
var ace;

to be initialized to an empty object, {}.
If I get a chance today I'll start a github project and link it here.

@didier-durand it is better to depend not on closure-compiler's own externs directly, but on the output of elemental2 running. You need elemental2-core and elemental2-dom. Very roughly:
jsinterop_generator(
    name = "ace-editor",
    srcs = ["ace-1.2.3.js"],
    extension_type_prefix = "AceEditor",
    #    integer_entities_files = ["integer_entities.txt"],
    # override auto generated js_deps in order not to provide extern files
    # Common extern file are included by default.
    j2cl_js_deps = [],
    deps = [
        "//java/elemental2/core",
        "//java/elemental2/dom",
    ],
)

and fix
/**
 * The main class required to set up an Ace instance in the browser.
 * @const
 * @see https://ace.c9.io/#nav=api&api=ace
 */
var ace;

to be initialized to an empty object, {}.
If I get a chance today I'll start a github project and link it here.

@niloc132 : thanks. I'll wait for your github project: I am trying your Gmaps source code in the meantime.

This is NOT directly related to the ticket itself which remains active but some feedback maybe of interest for all.
@tbroyer @gkdn @niloc132 : I have combined your hints and code kindly provided by @niloc132 to get an initial subset  (Map, Marker, InfoWindow, etc.) of Google Maps JSInterop bindings to work properly with GWT 2.8.1 by including Elemental2 & JSInterops modules in GWT. Thanks to all! (Ping me for more details if needed)

Likewise off-topic: https://github.com/Vertispan/gwt-googlemaps-api now hosts a bazel+maven project, and points at coords to use in maven to use this library - Any other followup on that should move to that repo's issues for discussion.


ComponentFactoryResolver and its mocks

Alright! Is it the same thing for ComponentFactoryResolver?
Actually, about the dom sanitizer, I don't want to mock it, but to spy it. If you have better solutions, I would take it!
Originally posted by @GerkinDev in https://github.com/ike18t/ng-mocks/issues/735#issuecomment-865088978

About the component factory resolver mocking, here is my use case:
I have a reusable component (my DynamicComponentHostComponent), who takes as parameter a component factory resolver and a component ctor. This dynamic component host is included in another component, whose job is to lazily and dynamically load a module, eventually compile it, and instanciate  it. Then, it passes the component factory resolver to the dynamic host.
To be isolated, I then check in the dynamic host if it calls correctly the input resolver. That's why I need to mock it.

As a side note, this is worth mentionning the concerned component was written before I migrated to @angular/cdk which provides quite the behavior I'm implementing through component portals, so I might remove this component in a future refactor. If the issue is not fixable or brings too many side effects, well, I'll do with it.

Hi @GerkinDev,
might you give me an example where and how you mock the resolver?

beforeEach( () => MockBuilder( DynamicComponentHostComponent )
	.provide( {
		provide: ComponentFactoryResolver,
		useFactory: () => ({ resolveComponentFactory: jest.fn(), /* and eventually other used methods */ }) ) );

My explanation above was to explain you that even if I totally get that mocking ComponentFactoryResolver is rather uncommon, it can be sometimes useful, so it should be doable IMO

Thanks for the example! Totally agree with you.

I'll do that ASAP, I'm off for a few days. But it seems that the test case you wrote is rather similar to my own... So that's awkward.
I'll double check version ranges too.

Hi @GerkinDev,
I was thinking about a possible solution like that:
  beforeEach(() => MockInstance(ComponentFactoryResolver, 'resolveComponentFactory', jasmine.createSpy()));
  beforeEach( () => MockBuilder( DynamicComponentHostComponent ).mock(ComponentFactoryResolver));

Do you use pure Angular, or a framework like Ionic?

Pure angular.
Well, I've not yet tested the solutions suggested above, but I've stumbled upon very awkward behavior I really can't explain.
	beforeEach( () => MockBuilder( DynamicComponentHostComponent )
		.provide( { provide: ComponentFactoryResolver, useFactory: () => {
            const mock = { resolveComponentFactory: jest.fn(), hello: 'world' };
            console.log(mock);
            return mock;
        } } ) );

Here, mock's resolveComponentFactory is as expected a mock function.
But in my component, I got this if I console.log it in the CTOR:
{ hello: 'world', resolveComponentFactory: [Function (anonymous)] }
So I don't know what happened here but it looks like resolveComponentFactory is unmocked. I suspect this behavior to be jest-specific. Have you a stackblitz template configured for jest ?

I think we might try another solution, I was fighting for the last 2 weeks. Then it covers also platform and root providers. However, I wasn't able to find what ComponentFactoryResolver belongs to.
beforeEach(() => ngMocks.globalMock(ComponentFactoryResolver));
beforeEach(() => ngMocks.defaultMock(ComponentFactoryResolver, () => {
  const mock = { resolveComponentFactory: jest.fn(), hello: 'world' };
  console.log(mock);
  return mock;
}));
afterEach(() => ngMocks.defaultMock(ComponentFactoryResolver));
afterEach(() => ngMocks.globalWipe(ComponentFactoryResolver));

beforeEach(() => MockInstance(ComponentFactoryResolver, 'resolveComponentFactory', jasmine.createSpy())); // Not working
beforeEach(() => MockBuilder(DynamicComponentHostComponent).mock(ComponentFactoryResolver)); // Neither
beforeEach(() => MockBuilder(DynamicComponentHostComponent)..mock( ComponentFactoryResolver, { resolveComponentFactory: jest.fn(), hello: 'world' } )); // Still nope

Maybe let's have a call this week to check it live in your project if it is fine, would it work?

About a template for jest - nope, unfortunately.
But the fact, that you got mock property and the original resolveComponentFactory points that I did a mistake somewhere in code code and the fix for popup overrides the mock resolveComponentFactory with own implementation, however it should respect it.
I'll try to check it deeper today.

For now, I would blame how ng-mocks handles entryComponents, might you check your test with commented entryComponents declarations?

Could you try whether this one works?
ng-mocks.zip

Maybe let's have a call this week to check it live in your project if it is fine, would it work?

Yeah why not, but I admit I'm much more comfortable by messages than orally, I'm pretty bad in English haha
The thing is, https://stackblitz.com/edit/github-qdctmb?file=src%2Ftest.spec.ts have the exact same behavior as I described above, eg. unmocking resolveComponentFactory during injection in my component if I copy/paste it in my test file in my env. And same again when I do not mock the module altogether (which I never do since I prefer explicit dependencies listing). So I highly suspect this is a jest-only behavior.
Footnote: it happened at the same time I updated<EMAIL_ADDRESS>

Could you try whether this one works? ng-mocks.zip

Unfortunatelly, same...

beforeEach(() => ngMocks.globalMock(ComponentFactoryResolver));
beforeEach(() => ngMocks.defaultMock(ComponentFactoryResolver, () => {
  const mock = { resolveComponentFactory: jest.fn(), hello: 'world' };
  console.log(mock);
  return mock;
}));
afterEach(() => ngMocks.defaultMock(ComponentFactoryResolver));
afterEach(() => ngMocks.globalWipe(ComponentFactoryResolver));

Yet again, this does not work either. Just, WTF is going on ??? :astonished:

I can invite you in the repo so you can check if you want.

It would be great, I think this is the best option :)

I think this is the problem: https://take.ms/1toX6
with the repo, it should be straight forward to eliminate the problem.

Got the invitation. Thanks! I'll take a look tonight.

So, I guess you'll understand I'll remove your access once the issue is resolved. The file causing the problem is this one: https://github.com/Scitizen/front-office/blob/wip/ng-mocks-wtf/src/app/content-modules/annotation/public/components/views/dynamic-component-host/dynamic-component-host.component.spec.ts
You won't be able to run it, since it relies on other protected repositories you don't have access to.

I think this is the problem: https://take.ms/1toX6
with the repo, it should be straight forward to eliminate the problem.

Yeah indeed, that's pretty close to be that

Yep, sure, makes sense!
And the last attempt before a deep dive :) Could you check it? ng-mocks.zip

https://media.giphy.com/media/C9iYu7faFZloyZtqgy/giphy.gif
Ok now you're the best ;)
Can you please mention the issue in the related commit, so that I can look what you've done ?

Sure. Tonight I'll prepare a PR. This is the change: https://take.ms/zYNDD.

Yeaaaah obviously haha
But I still don't understand why the issue does not occurs on jasmine :thinking:
Btw, what IDE/extension are you using ? Parameters names are neat

Yep, this is the magic I'll try to cover with UT tonight, and then we know all the dices.
I use IntelliJ IDEA. Also, their Webstorm should have the same feature.

Hi @GerkinDev,
there is the proper error: https://stackblitz.com/edit/github-qdctmb?file=src%2Ftest.spec.ts
instead of asserting on the method of the ComponentFactoryResolver, we were asserting the spy, which of course hasn't been overridden.

v12.2.0 has been released and contains a fix for the issue. Feel free to reopen the issue or to submit a new one if you meet any problems.