How to transform a point from depth camera space to world space?

Thanks for this project! It is great and I got this work on HoloLens2 ( through Unity2021.3.8f1c1) successfully!
Now I want to implement a function that receive a (u,v) point on the image coordinate system and transform it to a (X,Y,Z) point on the Unity/HoloLens coordinate system with the long throw depth information, to put it simply, its a coordinate transformation. I'm new to C++ so I tried to imitate petergu's code, my code which added to the HL2ReasearchMode.cpp are:
// "OpenStream" and "GetNextBuffer" calls are blocking, each sensor frame loop should be run on its own thread,
// This allows sensors to be processed on their own frame rate
com_array<float> HL2ResearchMode::StartuvToWorld(array_view<float const> const& UV)
{
     float xyz[3] = { 0,0,0 };
     float uv[2] = { UV[0], UV[1] };

     if (m_refFrame == nullptr)
     {
         m_refFrame = m_locator.GetDefault().CreateStationaryFrameOfReferenceAtCurrentLocation().CoordinateSystem();
     }

     std::thread m_puvToWorldThread(HL2ResearchMode::uvToWorld, this, std::ref(uv), std::ref(xyz));
     m_puvToWorldThread.join();

     com_array<float> XYZ = { xyz[0], xyz[1], xyz[2] };
     return XYZ;
}

//input: pHL2ResearchMode uv[2] output: XYZ[3]
void HL2ResearchMode::uvToWorld(HL2ResearchMode* pHL2ResearchMode, float(&uv)[2], float(&XYZ)[3])
{
    //open
    pHL2ResearchMode->m_longDepthSensor->OpenStream();

    //access to the interface "IResearchModeSensorFrame"
    IResearchModeSensorFrame* pDepthSensorFrame = nullptr;
    pHL2ResearchMode->m_longDepthSensor->GetNextBuffer(&pDepthSensorFrame);

    //get resolution
    ResearchModeSensorResolution resolution;
    pDepthSensorFrame->GetResolution(&resolution);
    pHL2ResearchMode->m_longDepthResolution = resolution;

    //access to the depth camera interface "IResearchModeSensorDepthFrame"
    IResearchModeSensorDepthFrame* pDepthFrame = nullptr;
    winrt::check_hresult(pDepthSensorFrame->QueryInterface(IID_PPV_ARGS(&pDepthFrame)));

    //resolution trans , not sure 1920x1080
    float uv_d[2] = { 0, 0 };
    if (!(resolution.Width == 1920 && resolution.Height == 1080))
    {
        uv_d[0] = uv[0] * (resolution.Width / 1920);
        uv_d[1] = uv[1] * (resolution.Height / 1080);
    }
    else
    {
        std::copy(std::begin(uv), std::end(uv), std::begin(uv_d));
    }

    //get buffer
    size_t outBufferCount = 0;
    const UINT16* pDepth = nullptr;
    const BYTE* pSigma = nullptr;
    pDepthFrame->GetSigmaBuffer(&pSigma, &outBufferCount);
    pDepthFrame->GetBuffer(&pDepth, &outBufferCount);
    pHL2ResearchMode->m_longDepthBufferSize = outBufferCount;

    //timestamp
    UINT64 lastTs = 0;
    ResearchModeSensorTimestamp timestamp;
    pDepthSensorFrame->GetTimeStamp(&timestamp);
    lastTs = timestamp.HostTicks;

    //coordinate transformation
    Windows::Perception::Spatial::SpatialLocation transToWorld = nullptr;
    auto ts = PerceptionTimestampHelper::FromSystemRelativeTargetTime(HundredsOfNanoseconds(checkAndConvertUnsigned(timestamp.HostTicks)));
    transToWorld = pHL2ResearchMode->m_locator.TryLocateAtTimestamp(ts, pHL2ResearchMode->m_refFrame);
    XMMATRIX depthToWorld = XMMatrixIdentity();
    depthToWorld = pHL2ResearchMode->m_longDepthCameraPoseInvMatrix * SpatialLocationToDxMatrix(transToWorld);

    auto idx = (UINT16)uv_d[0] + (UINT16)uv_d[1] * resolution.Width;          // the xth pixel
    UINT16 depth = pDepth[idx];
    depth = (pSigma[idx] & 0x80) ? 0 : depth - pHL2ResearchMode->m_depthOffset;

    float xy[2] = { 0, 0 };
    pHL2ResearchMode->m_pLongDepthCameraSensor->MapImagePointToCameraUnitPlane(uv_d, xy);
    auto pointOnUnitPlane = XMFLOAT3(xy[0], xy[1], 1);
    auto tempPoint = (float)depth / 1000 * XMVector3Normalize(XMLoadFloat3(&pointOnUnitPlane));

    //get the target point coordinate
    auto pointInWorld = XMVector3Transform(tempPoint, depthToWorld);
    XYZ[0] = XMVectorGetX(pointInWorld);
    XYZ[1] = XMVectorGetY(pointInWorld);
    XYZ[2] = -XMVectorGetZ(pointInWorld);

    //Release and Close
    if (pDepthFrame)
    {
        pDepthFrame->Release();
    }
    if (pDepthSensorFrame)
    {
        pDepthSensorFrame->Release();
    }
    pHL2ResearchMode->m_longDepthSensor->CloseStream();
    pHL2ResearchMode->m_longDepthSensor->Release();
    pHL2ResearchMode->m_longDepthSensor = nullptr;

}

The StartuvToWorld func above worked for the first call but got an error indicator on the  pHL2ResearchMode->m_longDepthSensor->OpenStream() for the second call and the HoloLens2 app crashed, and Visual Studio output were
Exception thrown at 0x00007FFE74686888 (HL2UnityPlugin.dll) in My_Project.exe: 0xC0000005: Access violation reading location 0x0000000000000000
Can anyone help to solve this? Thanks a lot!

@petergu684 Thanks for your answer!
I have set a boolean to control OpenStream() just run once and get the buffer every call, and it works! Although the result of the coordinate transformation now has obvious errors, I will manage to solve it next!
( maybe it's caused by that the input point comes from the MixedRealityCapture video stream via WIndowsDevicePortal is 1280x720 , and the LongThrow mode's resolution is 320x288, and my resolution transformation for this is wrong)
Thanks again for this repo and your reply!

@Tolerm how did you get this working? when i try it tells me i overloded "std::invoke'. Was there something special you did with your header file?

@EliasMosco Are you talking about controlling OpenStream() ? I just used a boolean, in the ### HL2ReasearchMode.h

@EliasMosco Are you talking the OpenStream() ? I just used a boolean , in HL2ResearchMode.h,
struct HL2ResearchMode : HL2ResearchModeT<HL2ResearchMode>
 {
   ......
  private:
  ...
  std::atomic_bool m_isDepthSensorStreamOpen = true;   // this boolean
  static void myFunc(HL2ResearchMode* pHL2ResearchMode);
  ...
}

and inHL2ResearchMode.cpp,  it's like below
void HL2ResearchMode::MyFunc(HL2ResearchMode* pHL2ResearchMode)
{
  if(pHL2ResearchMode->m_isDepthSensorStreamOpen)
  {
    pHL2ResearchMode->m_longDepthSensor->OpenStream();
    pHL2ResearchMode->m_isDepthSensorStreamOpen = false;
  }
  ...
}

it's very simple, you can change it according to your demands. If you are looking for a way to control multi-sensors stream control,  the Mirosoft official docs ResearchMode-ApiDoc.pdf and the repo HoloLens2ForCV may help you , they can both be found in https://github.com/microsoft/HoloLens2ForCV

Hello @Tolerm, did you manage to get it to work after all? If so, do you happen to have a repository? I'm trying to achieve the same thing!

Hello @Tolerm, did you manage to get it to work after all? If so, do you happen to have a repository? I'm trying to achieve the same thing!

Well, I'm working in the transformation of PV Camera and Depth Camera, but I'm not sure if the method I'm using now is correct, in principle, same cameras and same mode according the ResearchMode ApiDoc, so the transformation in HoloLens2 should be the same as HoloLen1, and the works in HoloLen1 should be valuable. Finally, I mainly referred to the following:

petergu684 's this repo;
HoloLens2ForCV's sample, StreamRecorder https://github.com/microsoft/HoloLens2ForCV/tree/main/Samples/StreamRecorder#stream-recorder-sample
LisaVelten's code, https://github.com/microsoft/HoloLensForCV/issues/119#issuecomment-553098740

if your work is the same as mine, get a (u,v) in PV Camera and transform it to 3D point in Unity's coord system with the depth of this image point, then my method now like :

get a (u,v) in PV Camera coordinate system;
(u,v) multiply by the inversed intrinsics of PV camera, the intrinsics got from camera calibration , and get a (x,y,z) coordinate;
set a vector as (x,y,-1,1)，and this vector multiply by the PVToWorld matrix to get a world coodinate system point (X,Y,Z,W), the PVToWorld matrix can be found in the StreamRecorder project and understand it there
now transform the (X,Y,Z,W) to the (u',v') in the Depth Camera according pertergu684's method , rigid transformation and perspective projection in Camera Model;
get the depth of (u',v') according petergu684's method, and then get the world point in Unity's coordinate system (or other coordinate system)

if your work is to transform a (u,v) point in Depth Camera image coord system -> (X,Y,Z,W) in a given world coord system, you may do it like this:

use the method MapImagePointToCameraUnitPlane(uv,xy)
give a world coord system Windows::Perception::Spatial::SpatialCoordinateSystem (please refer to petergu684's repo) , and get the extrinsic matrix
(x,y,1) * the extrinsic matrix, it's the reverse process of petergu684's work

@Tolerm Thanks a lot for your answer! Could you provide more details about how you computed the inrtrinsics of the PV camera?

@Tolerm Thanks a lot for your answer! Could you provide more details about how you computed the inrtrinsics of the PV camera?

I first tried the UndistortedProjectionTransform here, but the matrix I got was like this :
[ 992.376     0          0    0;
0      -993.519     0    0;
0           0          1    0;
628.272 378.181     0    1] .
I don't understand the meaning of minus sign '-' before 993.519 , and my PV camera always runs under one  setting (1280x720, 30fps) , so I think the intrinsics of my PV camera won't change, I finally used the APP 'Camera Calibrator' of Matlab with a calibration checkerboard and get the intrinsic parameters.
BTW, run the Stream Recorder app will get some files of PV camera and Depth camera, and there will be extrinsics of PV camera, extrinsics of Long Throw mode Depth Camera ( this extrinsic matrix may be relative to the Rig Coordinate system)


Search/replace with regex does not work properly on LibreOffice

A macro working on OpenOffice 3/4 fails on LibreOffice 5.2
v0.0.7
Regular expression is applied to search string, but not to replacement string when search/replace is executed by a macro recorded on OpenOffice 4.
example
Search string: (\"\<)([^\"]*[\.\?!,]?)(\")
Replacement string: »$2«
Test text before:
"Wohin gehen wir?"
Test text after:
»$2«

Replace recorded macro code by hand-written one.
Use Replace.SearchRegularExpression = True

Tested extension on LibreOffice 6.1. Issue persists no longer.

This problem does not apply to LibreOffice 6.x


No IPv6-address on the status page

Network > Interfaces > WAN6 > IPv6 - Correct address here
Status > Overview > Network > IPv6 Upstream > Address - No address, ::

Packages version: luci - git-18.247.71242-9541751-1

Please provide the output of ifstatus wan6

# ifstatus wan6
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 963200,
        "l3_device": "eth0",
        "proto": "dhcpv6",
        "device": "eth0",
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [

        ],
        "ipv6-address": [
                {
                        "address": "2a01:7e00::f03c:91ff:fe92:bfb9",
                        "mask": 64,
                        "preferred": 3597,
                        "valid": 14397
                }
        ],
        "ipv6-prefix": [

        ],
        "ipv6-prefix-assignment": [

        ],
        "route": [
                {
                        "target": "::",
                        "mask": 0,
                        "nexthop": "fe80::1",
                        "source": "2a01:7e00:e000:26e::\/64"
                },
                {
                        "target": "2a01:7e00::",
                        "mask": 64,
                        "nexthop": "::",
                        "metric": 256,
                        "valid": 14397,
                        "source": "::\/0"
                },
                {
                        "target": "::",
                        "mask": 0,
                        "nexthop": "fe80::1",
                        "metric": 512,
                        "valid": 297,
                        "source": "2a01:7e00::f03c:91ff:fe92:bfb9\/64"
                }
        ],
        "dns-server": [
                "2001:4860:4860::8888",
                "2001:4860:4860::8844"
        ],
        "dns-search": [

        ],
        "inactive": {
                "ipv4-address": [

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ]
        },
        "data": {

        }
}

Thanks, please provide also the JSON output of http://<IP_ADDRESS>/cgi-bin/luci/admin/status/overview?status=1

{"swap":{"free":0,"total":0},"conncount":61,"wan6":{"mac":"F2:3C:91:92:BF:B9","proto":"dhcpv6","dns":["2001:4860:4860::8888","2001:4860:4860::8844"],"link":"/cgi-bin/luci/admin/network/network/wan6","i18n":"DHCPv6 client","ether":true,"uptime":966692,"ip6addr":"2a01:7e00::f03c:91ff:fe92:bfb9/64","name":"Ethernet Adapter: "eth0"","type":"ethernet","gw6addr":"fe80::1","ifname":"eth0"},"memory":{"buffered":25931776,"total":1043705856,"shared":1183744,"free":962822144},"uptime":966710,"wifinets":[],"wan":{"mac":"F2:3C:91:92:BF:B9","proto":"dhcp","ipaddr":"<IP_ADDRESS>","link":"/cgi-bin/luci/admin/network/network/wan","netmask":"<IP_ADDRESS>","ether":true,"gwaddr":"<IP_ADDRESS>","expires":70098,"uptime":966702,"name":"Ethernet Adapter: "eth0"","type":"ethernet","ifname":"eth0","i18n":"DHCP client","dns":["<IP_ADDRESS>","<IP_ADDRESS>"]},"localtime":"Tue Sep 18 19:45:25 2018","connmax":16384,"loadavg":[0,0,0]}

Fixed through #2166 / 99265f3f5984bac7f0ba6f2254ee5492581dcaae

@jow- could you apply the fix to 18.06 branch?
It would be nice to see in the upcoming 18.06.2 release.
Thanks.


shim/docker: handle SIGTERM & SIGINT?

Normally, SIGTERM & SIGINT signals terminate a receiving process, unless overriden. However, the PID 1 process is special cased and doesn't have this behavior. So those signals are ignored.
In Docker, a container's entrypoint is spawned as PID 1 and thus is not killable by default.
One workaround for that is to use tini or alike. We could also just override the default signal handlers. We should ensure however no surprises when running under docker.

IMO the correct approach to this is not to handle it within the binary itself, but just to package docker containers which use tini or a base image which packages a proper init handler: https://github.com/phusion/baseimage-docker

Init process are now part of recent docker versions (based on tini).
For compose: https://docs.docker.com/compose/compose-file/compose-file-v3/#init
For docker run: https://docs.docker.com/engine/reference/run/#specify-an-init-process

I'm fairly inexperienced with docker, but the docker run --init needs to be invoked by the end-user, correct? In that case, it's still quite easy to forget. In the docker-compose case it seems to work well.

Still w.r.t. the initial issue scope, I suggest we close this and decide not to explicitly handle signals in any special way within the shim. The docker containers we provide, docker compose, or docker run user can handle the PID 1 problem correctly.

Agree. FWIW, in my containers, I manually included tini which works great.


Support for non-standard SSH ports

Management cert deployment fails due to custom SSH port (non-22)

Actually does work, simply append :PORT to host in inventory


Upload / Download not happening

When I choose the upload or download command the log shows Upload/Download Complete but no files get transferred. However when I select DIFF it downloads the files to the temp directory.
I am using
Atom 1.8 on Windows 10
Remote-sync 4.1.2
FTP connection to server

I have the same issue as well.
Atom 1.8 <> Windows 10
remote-sync 4.1.2
SFTP connection
is there any log file I can attach?

Experiencing the same problem as well.
Atom 1.10.1 on Win 10
remote sync 4.1.2
FTP connection

Same here, when I want to download a folder that does not exists on my local drive, it does nothing. However, when updating (re-downloading existing files), everything seems to be OK

Same here, console log says it's fine but in fact, no files got transfered.
Atom 1.17.0 x64 Windows 7
Remote-sync v4.1.5
FTP connection

Same here!


PeoplePicker property selectedItems not implemented?

Category
[ ] Enhancement
[ x] Bug
[x ] Question
Version
Please specify what version of the library you are using: [   1.5      ]
Expected / Desired Behavior / Question
Just tested the new PeoplePicker, and there is a property for:

Method to check value of People Picker text

https://github.com/SharePoint/sp-dev-fx-controls-react/blob/23af35a5a35e4fe37951f65d961419c435290788/src/controls/peoplepicker/IPeoplePicker.ts#L40
But it does not look like its in use, or did I miss something?

Hi,
You are right. This was not implemented correctly. I needed it as well today :)
@estruyf I committed a change for this bug as well.
Cheers,
Octavie

Closing this issue as it is released in v1.6.0.


pandoc-mermaid hangs indefinitely without error messages if mermaid.cli not installed

Hi there.
Running MERMAID_BIN=venv/python3/bin/pandoc-mermaid pandoc --filter pandoc-mermaid input.md -o output.docx hangs indefinitely with no output. Running on Ubuntu 18.
Solution seems to be:
npm install mermaid.cli
sudo apt install libgtk-3.0 libatk-bridge2.0-0 # deps for Chromium

Not a bug exactly, but some debugging info would be useful if dependencies are missing.
Thanks for creating this anyway, very much appreciated!

up


Documents parsed with .pipe() sometimes serialize into invalid byte strings

Not sure what's going on here. Maybe a subtle race condition, although I thought the pipe method should really be lock-free.

Aaah dammit. Some code I wrote ages ago in the thinc library isn't thread-safe. Easily fixed, patch soon.


Place conjecture nodes outside application topology

Make application topology layout in high priority, then place the conjecture nodes around the topology.

After we provided new filter mechanism for topology map, do we still implement this? even in the future?

With more variable filters are going to be added, this feature seems more and more unimportant. So I just close it.


Minor patch <IP_ADDRESS>

Added anaconda installation
Minor speed improvements in backend

Coverage increased (+1.03%) to 98.879% when pulling f67e7e70762fe52771b2a65ca14adfe8a44a0e91 on dev into 8f17ca5cebd8b817c16f6f97fde621043cc9d6b9 on master.


feat(clerk-js): Scroll to connected account after success in mounted UserProfile

Type of change

[ ] 🐛 Bug fix
[x] 🌟 New feature
[ ] 🔨 Breaking change
[ ] 📖 Refactoring / dependency upgrade / documentation
[ ] other:

Packages affected

[x] @clerk/clerk-js
[ ] @clerk/clerk-react
[ ] @clerk/nextjs
[ ] @clerk/remix
[ ] @clerk/types
[ ] @clerk/themes
[ ] @clerk/localizations
[ ] @clerk/clerk-expo
[ ] @clerk/backend
[ ] @clerk/clerk-sdk-node
[ ] @clerk/shared
[ ] @clerk/fastify
[ ] gatsby-plugin-clerk
[ ] build/tooling/chore

Description

[x] npm test runs as expected.
[x] npm run build runs as expected.

This PR refactors and re-uses the mechanism used to reopen the modal and scroll to the newly added external account for mounted components. A new router property has been added called routing and it refers to the routing strategy.
Essentially, we pass a base64 encoded object as a query parameter along with the redirectUrl for the oauth attempt. This will give us back information about the state the user was in before the attempt, so we can either scroll to the appropriate connected account in the mounted component, or open the modal and scroll there.

Let's close this and go with the more generic approach we discussed @nikosdouvlis


Fix FixturelinkFactory for new github url generation

per discussion on https://github.com/rectorphp/rector-src/pull/3542#discussion_r1154556206 , the Github new url generation seems no longer directory prefix for append file.
@yguedidi @TomasVotruba this PR try to resolve it.

All checks have passed :tada: @TomasVotruba I think it is ready.

@TomasVotruba I am merging it ;)


Removed the usage of zend-servicemanager

This PR removes the usage of zend-servicemanager in favor of the general interface Interop\Container\ContainerInterface for the usage of Zend\Crypt\SymmetricPluginManager and Zend\Crypt\Symmetric\PaddingPluginManager.

I think this approach makes a lot of sense; there's not likely to be many, if any, userland extensions of these plugins/adapters, and if somebody does have such a use case, they can extend the plugin managers in order to register their custom variants.
As noted in inline comments, my only critique is the presence of the getOptions() method, as getters exist for each individual option already (and those can be used for assertions). Thoughts?

@weierophinney I removed the getOptions() as suggested.

:+1: Thanks!! :)


[New Hub] [Phase 2] Cluster Setup - Queens University

What is the 'ready to work' status of this phase?
Depends on

https://github.com/2i2c-org/infrastructure/issues/4822

Required information for setting up a cluster for a new community or a set of communities.
Due date for hub deployment: Sep 30, 2024
This phase assumes all engineers have access to the relevant account,
and will be able to set up the cluster + support without issue. No hubs
are to be deployed during this phase. The following table lists the
information that must be provided before this phase can be marked as
READY and begin. Use the Notes column to provide any other contextual
information.

Question
Answer
Notes

Region/Zone of the cluster
e.g. us-east-1

Name of the cluster

Are GPUs required?
Yes/No

Available runbooks:

https://infrastructure.2i2c.org/hub-deployment-guide/runbooks/phase2/
https://infrastructure.2i2c.org/hub-deployment-guide/deploy-support/

### Tasks
- [ ] Deploy AKS
- [ ] Refine https://github.com/2i2c-org/infrastructure/issues/4824 (Hub Turnup Phase 3)

There is higher risk since we are deploying in their cloud

I am down to only one error, but I have no idea how to solve it


[stable/external-dns] Update README

Changes

[x] Update README to list proper arguments
[x] Remove duplicated arguments from README
[x] Fix --aws-zone-type command line arg

FYI: Part of this is already in #2841.

@unguiculus okay, now it is just a README fix then :D

Thanks, excellent.

/lgtm


Incorrect trailing comma?

This doesn't look right?
https://jlongster.github.io/prettier/#{"content"%3A"let test %3D {\n  callbackUrl%3A `https%3A%2F%2Fexample.com%2Freallylongurl%2Fwithparams%2F%24{id}%2F%24{getSomethingSecret(bookingid)}`%2C\n}"%2C"options"%3A{"printWidth"%3A80%2C"tabWidth"%3A2%2C"singleQuote"%3Atrue%2C"trailingComma"%3Atrue%2C"bracketSpacing"%3Atrue%2C"doc"%3Afalse}}
The trailing comma after the parameter in the function call getSomethingSecret

See: https://github.com/jlongster/prettier/issues/266

Yup #266 seems to be the one, thanks.


Fix README tutorial

There is a missing parameter in one of the client tutorial steps. The miden-client tx new consume-notes command should receive the <input-note-ID>.

We can close this as we ended up making a PR to the base repo


[ie/bilibili] remove playinfo extraction from window.__playinfo__

IMPORTANT: PRs without the template will be CLOSED
Description of your pull request and other information

remove playinfo extraction from window.__playinfo__ and always download it from the API after the is_interactive check(_get_interactive_entries doesn't need playinfo). This also fixes HD formats' extraction because window.__playinfo__ was added back by the site and it doesn't contain HD formats
Fixes #10554
Template

Before submitting a pull request make sure you have:

[x] At least skimmed through contributing guidelines including yt-dlp coding conventions
[x] Searched the bugtracker for similar pull requests

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

[x] I am the original author of this code and I am willing to release it under Unlicense

What is the purpose of your pull request?

[x] Fix or improvement to an extractor (Make sure to add/update tests)

__playinfo__ should contain at least up to 1080p formats when login cookies are provided (premium-only formats not tested).


Update maestro tests to use scroll until visible

Task/Issue URL: https://app.asana.com/0/488551667048375/1203834486466099/f
Description
This PR updates maestro tests to use scroll until visible and bumps ups the cloud version to the latest.
Steps to test this PR

[ ] End to end tests should pass

Current dependencies on/for this PR:

develop

PR #2767   👈

This comment was auto-generated by Graphite.

WebView not supported yet so closing


STYLE: Replace _ELASTIX_BUILD_LIBRARY by BaseComponent::IsElastixLibrary

Replaced _ELASTIX_BUILD_LIBRARY preprocessor definition by static member function, BaseComponent::IsElastixLibrary().
Anticipates sharing the intermediate binary object files between the Elastix executable and the Elastix library, possibly building them within the same project, or the same (Visual Studio) solution.

@mstaring @stefanklein Please check carefully! 😃  I think we need to remove the dependencies on _ELASTIX_BUILD_LIBRARY, in order to be able to build the exe and the lib within one and the same "solution file", sharing the same *.obj" files with Visual C++.

@stefanklein As you suggested this morning @ LUMC, I compared the output directory of the example from "elastix\dox", as generated by the official elastix 5.0.0 release to the output directory generated from this pull request. I think they look quite comparable  😄
I ran:

elastix.exe -f exampleinput/fixed.mhd -m exampleinput/moving.mhd -out exampleoutput\ -p exampleinput/parameters_Rigid.txt -p exampleinput/parameters_BSpline.txt

result.0.mhd, result.0.raw, result.1.mhd, result.1.raw, and TransformParameters.0.txt are exactly the same in both output directories.
elastix.log has the same number of lines. I only observed different current date and time, and slightly different durations.

Glancing through it, it looks good and I see no reason to worry :-)
As indeed before and after looks the same, I trust the PR and you can merge


More torch-scatter issues

I'm running Mac OS without coda. I ran
pip3 install torch torchvision
then
pip install --upgrade torch-scatter
and had this error:
/anaconda3/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include/torch/cuda.h:5:10: fatal error: 'cstddef' file not found
#include
^~~~~~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1

Failed building wheel for torch-scatter

Have you tried this?

you can try export MACOSX_DEPLOYMENT_TARGET=10.9，according to this

Closed due to inactivity. Feel free to reopen.


One or more Projects in the solution were not loaded correctly

Hello peeps!
i tried running the .sln on Virtual Studio 19 and ended up with the error below.
i figured changing to VS17 would solve this (probably due to some linkage/version issues) but it wasnt the case.
Hazel folder was both manually extracted / git cloned / git submoduled and same for all the external vendor dependencies.
the GLFW / Imgui are the unloaded solutions and there is no .sln file inside their repositories
(cherno mentioned stuffs about Glad being added instead of forked and submodeled and its loading properly : maybe thats something there but im missing the hint)
anyhow heres the error message (Cmake?)
Severity	Code	Description	Project	File	Line	Suppression State
Error		CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
VULKAN_LIBRARY (ADVANCED)		C:\dev\Hazel-master\Hazel\vendor\imgui\examples\example_glfw_vulkan\Please set them or make sure they are set and tested correctly in the CMake files

C:\dev\Hazel-master\Hazel\vendor\imgui\ImGui.vcxproj : error  : The project file could not be loaded. Could not find file 'C:\dev\Hazel-master\Hazel\vendor\imgui\ImGui.vcxproj'.  C:\dev\Hazel-master\Hazel\vendor\imgui\ImGui.vcxproj

Solved.
i had some issues configuring the premake file.
followed litterally the instruction on the premake episode.

If this is solved, please close it.


Fixes #145

This is my attempt to address #145

Export initialFromState
Add third parameter to _createFormReducer which could be object or function

If Object given will use icepick.merge with resulted state
If function given will call enhancer(initialState)
If not given or enhancer is not object/function return initialState (old behavior)

This looks good but I was thinking about providing a more general (read: flexible) way of enhancing form reducers, especially with many enhancers. I'll comment on the original ticket around the lines of what I'm thinking.


use httpx.AsyncClient for async http requests

requests.Session does blocking IO which blocks the event loop! No other requests can be processed concurrently

Happy to drop the use of anyio.run, but having multiple async plugins for pytest installed is overkill

Happy to drop the use of anyio.run, but having multiple async plugins for pytest installed is overkill

To stay consistent across, the implementation should use one async runtime for now. I would think it's best if for now we keep asyncio and create an issue to follow up if we should just switch the whole example, including the implementation itself, to anyio given that it is transient a dependency anyway.

Happy to drop the use of anyio.run, but having multiple async plugins for pytest installed is overkill

To stay consistent across the example, the implementation should use one async runtime for now. I would think it's best if for now we keep asyncio and create an issue to follow up if we should just switch the whole example, including the implementation itself, to anyio given that it is transient a dependency anyway.

Yes I configured it to use asyncio only


Feature request: A CLI option to forcibly delete existing Model comments and write afresh

E.g.
php artisan ide-helper:models --force
Currently I'm manually going to each Eloquent model and deleting the existing doc blocks to make way for ide-helper:models to write doc blocks afresh.
Thanks for the ever so helpful package!

You can use reset switch for that.
php artisan ide-helper:models -R will reset (remove) docblocks before writing.
Combine it with write switch (-W) to make process even more fluent.
See help for more info: php artisan ide-helper -h

Indeed, that should do the trick :)


AndroidStringObfuscator.getString(this, R.string.app_name) does not give decrypted string, it gives me encrypted string

Kindly help me i need this urgent

It means you are using a wrong fingerprint.
Look at gradle code:
if (variant.dirName == "release")       sha1 = "SHA1_fingerprint_RELEASE"
else                                    sha1 = "SHA1_fingerprint_DEBUG"

You must replace sha1 with your app's SHA1 fingerprint. You can get it easyly with:
String SHA1_fingerprint = AndroidStringObfuscator.getCertificateSHA1Fingerprint(context);
Log.e("SHA1", SHA1_fingerprint);

Note the difference between release an debug fingerprint.

i have replace SHA1_fingerprint_DEBUG with my app debug finger print which is 11:8E:42:F3:5C:38:C6:BF:51:1C:55:65:4F:AC:FE:A0:C1:88:BA:4F but still its giving encrypted strings, do i need to replace SHA1_fingerprint_RELEASE as well even in debugging mode?

i am getting this instead of decrypted string: AA209D14633ADDEBF410A1EF9C872FA2246D9D92A4724404989A8919A2F894DDE1B78782DB7D9CB9700E64035DE8EFFF9B8DFDF9278A5F386C698285476CB54E6038C86ECDB7590DC28FEDDC67F310F1B3108914DF0854F898E63E566177D8D1
now i have replace debug finger print with my app's one, any help plz?

Check your Build Variant config on your module, maybe it's on release mode.
I think 11:8E:42:F3:5C:38:C6:BF:51:1C:55:65:4F:AC:FE:A0:C1:88:BA:4F is a release fingerprint

yes that was the issue, now its working fine, thank you very much brother. one last question can someone can get my strings value by decompiling my apk file even after applying this encryption?

Your strings are visible (but encrypted). No one can decrypt it.
Maybe someone could modify and recompile your APK, but in this process a new fingerprint is used.
Now you should change your release fingerprint ;)

ok thank you again, it was really helpful


Swift 5 compatibility

Is there a chance to have the compatibility with Swift 5?

I thought I already it had on swift 5. I will update it as soon as possible.
If it is urgent, you can make a PR or simply modify the source code locally as Xcode suggests in the meantime.

Thanks @Minitour!


Limit max entries shown in MSFS 2020 preset combo box

fixes #1809
This change leads to instant loading. Also it probably does not make sense to scroll a list of more than 1500 entries.
Max number changed to 1500.

I don't expect I will ever use the "list all events" option. However, I think having to scroll 1,500 entries to get to this option is too long for any interested user.

Discussion is continued in discord.


[SPARK-16148] [Scheduler] Allow for underscores in TaskLocation in the Executor ID

What changes were proposed in this pull request?
Previously, the TaskLocation implementation would not allow for executor ids which include underscores.  This tweaks the string split used to get the hostname and executor id, allowing for underscores in the executor id.
This addresses the JIRA found here: https://issues.apache.org/jira/browse/SPARK-16148
This is moved over from a previous PR against branch-1.6: https://github.com/apache/spark/pull/13857
How was this patch tested?
Ran existing unit tests for core and streaming.  Manually ran a simple streaming job with an executor whose id contained underscores and confirmed that the job ran successfully.
This is my original work and I license the work to the project under the project's open source license.

Can one of the admins verify this patch?

Jenkins test this please

Test build #61098 has started for PR 13858 at commit b497dc9.

Test build #61098 has finished for PR 13858 at commit b497dc9.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/61098/
Test PASSed.

CCing some people who were involved in previous commits for this part of the code, @tdas @zsxwing.  Does this look good?

@tmagrino could you add a simple test here: https://github.com/apache/spark/blob/282158914d89b35a3f85388cb20bd62215f4f589/core/src/test/scala/org/apache/spark/scheduler/TaskSetManagerSuite.scala#L804 ?

I had an outstanding comment from the previous PR too: https://github.com/apache/spark/pull/13857#discussion_r68134544

My apologies @srowen, I missed the comment somehow!  I refactored a little bit to make it more obvious what's going on there (using stripPrefix as you suggested).

Ugh, I just saw that I accidentally merged in some other PRs... I'm a bit new to this, apologies.  Any idea how I can amend this?

You can always revert the commits in question and push, which become new commits, but that's fine. They're all squashed in the end. You can also manually squash and force-push if you like.

I opted to force push a cleaned up version, thanks!

Jenkins test this please

Test build #61371 has started for PR 13858 at commit ee4708d.

Test build #61371 has finished for PR 13858 at commit ee4708d.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/61371/
Test PASSed.

LGTM. Merging to master and 2.0. Thanks!


[Feature request]Observability of OpenFunction

Description
A clear and concise description of what the feature is.
Hi OpenFunction team, I checked the roadmap and want to know if OpenFunction support basic logging, metric and tracing. If yes, is there any docs for this? If not, is there any plan on this. Thanks. (referring to https://github.com/OpenFunction/OpenFunction/issues/146#issuecomment-967772514)
As a user, I want to know the metrics of the system and the functions (like number of calls etc).
As a user, I want to know the basic tracing of my function calls and time spend, tracing of the event similar to what is showing here.
As a user, I want all these data can be stored and visualized in various open source / commercial product.
Additional context
Add any other context or screenshots about the feature request here.

@lizzzcai Very good user stories! Logging can be handled by container platforms like KubeSphere. And yes, we need to consider how to support function metrics and tracing


Menus don't acknowledge $stateParams

I can't pass the $stateParams into the state of the menu.. I tried injecting it all the way up to where the the addMenuItem function is declared but for some reason it just won't accept the stateparams.  Any ideas?

@mikepc can you provide some code and describe this a little more clearly?

@mikepc Feel free to re-open if you still have this issue, and would like to share more details on what you're experiencing.


Added Hub and Spoke Topology Examples - Fixes #62

Pull Request (PR) description
This PR adds an example of how to create a hub and spoke DFS replication group topology.
This Pull Request (PR) fixes the following issues:
Fixes #62
Task list:

[x] Change details added to Unreleased section of CHANGELOG.md?
[ ] Added/updated documentation, comment-based help and descriptions in .schema.mof files where appropriate?
[x] Examples appropriately updated?
[ ] New/changed code adheres to Style Guidelines?
[ ] Unit and (optional) Integration tests created/updated where possible?

@johlju - I've tested this using a lab I built in LabBuilder: https://github.com/PlagueHO/LabBuilder/blob/dev/LabBuilder/dsclibrary/MEMBER_DFSHUB.DSC.ps1
Would you mind reviewing when you have time?

This change is

Reviewed 5 of 5 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.

Modules/DFSDsc/Examples/Resources/DFSReplicationGroup/4_HubAndSpoke.ps1, line 23 at r1 (raw file):

        $Credential,

        [Parameter(Mandatory = $true)]

This the examples fail in test because this is mandatory instead of having a default value? Throughout the examples.

Modules/DFSDsc/Examples/Resources/DFSReplicationGroup/4_HubAndSpoke.ps1, line 79 at r1 (raw file):

        # Configure the connection and membership for each Spoke
        foreach ($spoke in $SpokeComputerName) {

Open brace on separate row. Throughout the examples.

Comments from Reviewable

Seeing this example (duplicated in each resource) it feels like the auto-document feature should support examples on resource module level too? 🤔

Reviewed 4 of 4 files at r3.
Review status: all files reviewed at latest revision, 2 unresolved discussions.

Modules/DFSDsc/Examples/Resources/DFSReplicationGroup/4_HubAndSpoke.ps1, line 6 at r2 (raw file):

WebSiteFle

WebSiteFiles?

Modules/DFSDsc/Examples/Resources/DFSReplicationGroup/4_HubAndSpoke.ps1, line 10 at r2 (raw file):

SopeComputerName

SpokeComputerName

Modules/DFSDsc/Examples/Resources/DFSReplicationGroup/4_HubAndSpoke.ps1, line 11 at r2 (raw file):

default

defaults ?

Comments from Reviewable

Agreed - something that bothers me too. The problem we ran into was how to tell each wiki page which examples to include if they weren't in their own folder. We could have added meta data to each README.MD but that starts to get less "auto".

Review status: 1 of 5 files reviewed at latest revision, 5 unresolved discussions.

Modules/DFSDsc/Examples/Resources/DFSReplicationGroup/4_HubAndSpoke.ps1, line 23 at r1 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
This the examples fail in test because this is mandatory instead of having a default value? Throughout the examples.

Doh! Fixed.

Modules/DFSDsc/Examples/Resources/DFSReplicationGroup/4_HubAndSpoke.ps1, line 79 at r1 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
Open brace on separate row. Throughout the examples.

Done.

Modules/DFSDsc/Examples/Resources/DFSReplicationGroup/4_HubAndSpoke.ps1, line 6 at r2 (raw file):
Previously, johlju (Johan Ljunggren) wrote…

WebSiteFle

WebSiteFiles?

Done.

Modules/DFSDsc/Examples/Resources/DFSReplicationGroup/4_HubAndSpoke.ps1, line 10 at r2 (raw file):
Previously, johlju (Johan Ljunggren) wrote…

SopeComputerName

SpokeComputerName

Done.

Modules/DFSDsc/Examples/Resources/DFSReplicationGroup/4_HubAndSpoke.ps1, line 11 at r2 (raw file):
Previously, johlju (Johan Ljunggren) wrote…

default

defaults ?

Done.

Comments from Reviewable

I seeing those examples being in the root of the Examples folder, and logic that checks each file (AST?) if that particular resource is present, then adds a link (maybe .SYSNOPSIS as descriptive text) from the resource Wiki page to the "example Wiki page". On Home-page there can be Example section with all the "general" examples that links to each "example Wiki page".

Reviewed 4 of 4 files at r4.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable

Great idea @johlju - that could definitely work! We should definitely make some improvements to the auto-documentation generation. Right now it doesn't actually generate the "home page" README.MD or the _SIDEBAR.MD. I've submitted these as issues to DSCResources.Tests so I can work on them.

Review status: all files reviewed at latest revision, all discussions resolved, all commit checks successful.

Comments from Reviewable


hexadecimal numbers as third operand

version 0.15 doesnt like numbers given in 0x?? as third operand it seems:
AssemblerError: register must be a valid integer, name, or alias: 0xa
slli  a4,a4,0xa

Good catch! There was a bug where non-decimal integers weren't being considered as a valid register.


Problem with request

Hi,
we have communication problem with amazon.
Our client logs in to our service where he clicks button "Log in Amazon". He is then redirected to url https://sellercentral.amazon.pl/apps/authorize/consent?application_id=amzn1.sellerapps.app.xxxx-xxxx-xxx-xxx-xxx&state=here_is_unique_uid. On this page our partner accepts the usage for our application and is redirected back, from that action we get selling_partner_id and spapi_oauth_code. After that we send request on https://api.amazon.com/auth/o2/token  with data:
{'grant_type': "authorization_code",
'code': spapi_oauth_code,
'redirect_uri': redirect_url,
'client_id': AMAZON_CLIENT_ID,
'client_secret': AMAZON_SECRET
}
where AMAZON_CLIENT_ID and AMAZON_SECRET are LWA credentials of app. In response we receive access_token and refresh token. Till this point everything works fine.
Now we try to get orders data:
1.
We request Login with Amazon access token on /auth/o2/token with params: client_id, client_secret (LWA credentials of app) grant_type=refresh_token, refresh_token=refresh token we have from previous step. In response we receive new access_token and refresh_token.

We create assume role request on sts.amazonaws.com  using AWS_ACCESS from AWS for credential and AWS_SECRET from AWS for computing signature. From that response we get SessionToken and accesskeyid.

Final request for orders: GET on sellingpartnerapi-eu.amazon.com/orders/v0/orders in Authorization header for credential we use accesskeyid from assume role request, for X-Amz-Access-Token header we use access token from 1st request, and for X-Amz-Security-Token we send sessiontoken received from assumrole request for that data we receive 403 forbidden error
HTTP/2.0 403 Forbidden
Content-Length: 141
Content-Type: application/json
Date: Wed, 07 Apr 2021 13:33:57 GMT
X-Amz-Apigw-Id: daku6GYXDoEFQPw=
X-Amzn-Errortype: AccessDeniedException
X-Amzn-Requestid: 55ff0680-a7c1-412d-830d-cc3b018ea1b9
{
"errors": [
{
"message": "Access to requested resource is denied.",
"code": "Unauthorized",
"details": ""
}
]
}
We don't have idea what is wrong. Our app have a access  permission to get order.

Same

same here any solution for it?

I'd your application published?

not yet

add version=beta to the params and try again

same problem with me...

Hello,
I'm facing the same problem with self authorization. My app isn't published either, status is draft.

add version=beta to the params and try again

I guess we can't add this parameter into the code. Is there any other solution?
EDIT: According to the document self authorization doesn't require the app to be published, therefore the cause of my problem must be different:
https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/developer-guide/SellingPartnerApiDeveloperGuide.md#self-authorization

Yes, your problem doesn't seem to be remotely related to the thread. Please just follow the documentation on how to self authorize, nothing from this thread applies to your use case.

@sw69 Did you find a solution to this?

@mrmosconi @sw69 @mk-hasan @NephewOfGod Can someone please have a look if the refresh token returned from last commit (https://github.com/saleweaver/python-amazon-sp-api/commit/5d32a0aae123365b656b1375eb2f39f85466ac85) works in subsequent requests:
from sp_api.auth import AccessTokenClient

auth = AccessTokenClient().authorize_auth_code(<auth_code>)

Please use
from sp_api.base import AccessTokenClient

auth = AccessTokenClient().authorize_auth_code(<auth_code>)

to get the refresh token, then pass the obtained refresh_token to one of the clients
from sp_api.api import Sales
res = Sales(refresh_token='At...').<whatever>()

This does not work.
In particular, the code above fails with a similar error:
auth = AccessTokenClient(
           ^^^^^^^^^^^^^^^^^^
  File "/login-with-amazon-wUWU3fmb-py3.12/lib/python3.12/site-packages/sp_api/auth/access_token_client.py", line 25, in __init__
    self.cred = Credentials(refresh_token, credentials)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/login-with-amazon-wUWU3fmb-py3.12/lib/python3.12/site-packages/sp_api/auth/credentials.py", line 6, in __init__
    self.client_id = credentials.lwa_app_id
                     ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'lwa_app_id'

while it is not clear how to pass credentials.
In addition, it is not clear how to use this library with the web app authorization flow, that is the only usable flow when an app is published publicly and there is no way to get the refresh token.
Does this library supports sp-api when the app is public?


[Feature Request] Output differences to a file

Would like to be able to output a list of differences in terms of

Additions
Changes
Removals

For
1.Methods.
2.Classes.
3.Namespaces
Eg. I want a summary.

+1 to html.file

Sadly, nobody is currently working on JustAssembly  on the Telerik side.
On the other hand it does not take much domain knowledge to do this feature so the chances are you guys will be able to add it yourselves should you have the time.

@codemerx where add?

@lurumdare to the product, i.e. implement it.


add llm gateway pii detection v1

What does this PR do?
Adds V1 of the notebook for LLM PII detection Gateway. Not intended to be fully complete, but wanted to gather feedback before v2

Fixes #96
Who can review?
@merveenoyan and @stevhliu

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Just a few more formatting things and then we can merge! 🙂

Should be good 2 go @stevhliu thank you!