[Mono] Optimize MSBuild environment initialization

TryFromVisualStudioProcess only looks for Windows specific paths. It seems to incur a 1.77s penalty, mostly in Process.GetModules inside Mono.
Thus skip this probe path on Mono.

Found via profiling VSMac.

I vaguely remember this surfacing before, but i thought we patched mono to make that codepath faster. Maybe we didn't...

➜  bin git:(static-registrar-support) ✗ mono --version
Mono JIT compiler version <IP_ADDRESS> (master/71ad99f7206 Fri Feb  9 00:29:55 EST 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com

Probably this is happening once and it's taking that long for it to run once, or I don't know. But this is problematic, as it delays project model evaluation by 2 full seconds.

ah, i'm thinking of this: https://github.com/mono/mono/pull/5843/files

Still, that code is useless to run on mono.
https://github.com/Microsoft/msbuild/pull/2983/files#diff-32568b659f3471e9ecdeb620a363af3cR25

Yeah, true. Out of preference i'd do a runtime platform check if (OnWindows) instead of a compile time ifdef, but that's just me :p

Okay, I can do that

Looks good! Please do make a runtime check though. Eventually we need to get to a single binary for net46/mono so in cases like this where we can gate at runtime will help with that goal.

Done!

Ubuntu failure doesn't seem related:
<test name="Microsoft.Build.UnitTests.BackEnd.BuildManager_Tests.OutOfProcProjectInstanceBasedBuildDoesNotReloadFromDisk(shouldSerializeEntireState: True)" type="Microsoft.Build.UnitTests.BackEnd.BuildManager_Tests" method="OutOfProcProjectInstanceBasedBuildDoesNotReloadFromDisk" time="0.5212874" result="Fail"><output>Build started.
Project "tmpHja11c.tmp" (Foo target(s)):
Building with tools version "15.0".
Target "Foo" in file "/mnt/j/w/Microsoft_msbuild/master/innerloop_Ubuntu14.04_CoreCLR_prtest/artifacts/2Debug/bin/Microsoft.Build.Engine.UnitTests/netcoreapp2.1/TestTemp/Temporary020d84b219bb45938105b706bfdb2512/import" from project "/mnt/j/w/Microsoft_msbuild/master/innerloop_Ubuntu14.04_CoreCLR_prtest/artifacts/2Debug/bin/Microsoft.Build.Engine.UnitTests/netcoreapp2.1/TestTemp/tmpHja11c.tmp" (entry point):
Using "Message" task from assembly "Microsoft.Build.Tasks.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "Message"
Bar
Done executing task "Message".
Done building target "Foo" in project "tmpHja11c.tmp".
Done building project "tmpHja11c.tmp".
Build succeeded.
Build started.
(0,0):  error MSB4223: A node of the required type OutOfProc could not be created.
Build succeeded.
</output>
<traits>
 <trait name="Category" value="mono-osx-failing"/>
</traits>
<failure exception-type="Xunit.Sdk.EqualException">
 <message>Assert.Equal() Failure
Expected: Success
Actual:   Failure</message>
<stack-trace>   at Microsoft.Build.UnitTests.BackEnd.BuildManager_Tests.OutOfProcProjectInstanceBasedBuildDoesNotReloadFromDisk(Boolean shouldSerializeEntireState) in /_/src/Build.UnitTests/BackEnd/BuildManager_Tests.cs:line 3646</stack-trace></failure></test>

Neither does the macOS failure
/Users/dotnet-bot/j/w/Microsoft_msbuild/master/innerloop_OSX10.13_CoreCLR_prtest/artifacts/Debug/bootstrap/netcoreapp2.1/MSBuild/NuGet.targets(104,5): error : The file '/Users/dotnet-bot/j/w/Microsoft_msbuild/master/innerloop_OSX10.13_CoreCLR_prtest/artifacts/2Debug/obj/MSBuild/MSBuild.csproj.nuget.g.props' already exists. [/Users/dotnet-bot/j/w/Microsoft_msbuild/master/innerloop_OSX10.13_CoreCLR_prtest/src/Tasks.UnitTests/Microsoft.Build.Tasks.UnitTests.csproj]

@dotnet-bot test this please


chore(main): release 0.1.0-0

:robot: I have created a release beep boop
0.1.0-0 (2024-03-18)
Features

add I18N support (#9) (c6d07b6)
ngx-formcontrol-errors-msgs: allow HTML tags in error messages (#15) (ffa65fb)

Bug Fixes

hide validation errors on disabled controls (#7) (dc74945)
ngx-formcontrol-msgs-translate-parser: wrong import ngx-formcontrol-errros (c6b5196)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/dgonzalez870/ngx-formcontrol-errors/releases/tag/v0.1.0-0 :sunflower:


Don't use curl for assets

Continuing from https://github.com/makeworld-the-better-one/amfora/issues/63#issuecomment-692913871
the solution of your problem is something along the lines:
if not build.head?
	system "curl", "-sSL", "https://github.com/makeworld-the-better-one/amfora/raw/b2b8e30/Makefile", "-o", "Makefile"
end

But I suggest you taking a look at the resource block here: https://rubydoc.brew.sh/Formula#resource-class_method
Among the many benefits there is validation and caching.
Using the curl hack (downloading a potentially untrusted extra file in the install block) would never be accepted by the core homebrew.
You could also resort the path block as an alternative.

This is only a temporary hack until the next version comes out. But I will use this code sample, thank you.

Added in 588d378.


Support for adding classifiers for not yet final Python version without Tox

From the docs:

if you’re adding support for a not yet final Python version the tool offers a functionality that it will invoke tox for you and inspect the test environments and use the latest python version tested against.

This is currently the only way to force the tool to add the prerelease PROGRAMMING LANGUAGE :: PYTHON :: 3.13 classifier.
For projects that don't use Tox, there's the simple workaround of adding a tox.ini file or a tool.tox table in pyproject.toml.
I propose a new CLI flag --max-supported-python-is-prerelease (terrible and maybe too long, open to ideas 😅) and the following priority order:

Check for the max version in requires-python
If no value was passed, try to use Tox
If that failes, check the proposed flag. If true, use a new constant _PY_PRERELEASE_VERSION
Fall back to latest stable release, i.e. _PY_MAX_VERSION

PR welcome.


Change invite with restricted to read from env.

This will allow free user can send email. restricted is just a paid user option.

I could reproduce the problem even with channel not present ?

@rauchg If you create a new slack group without pay anything and use its web api token will get {error=paid_only, ok=false} this error. Without restricted property it will send the email out.

This works for me last few days. And i have a test now , it doesn't work anymore.


Suppress In Queue Call Recording

Since the release of Call recording suppression during IVR and queue wait the api has been updated to include a parameter to toggle this state:
"suppressInQueueCallRecording": boolean
This is not yet supported in the terraform provider, can this be included?

No, this parameter hasn't been added yet. We'll get a dev working on this as soon as we can.
Thanks for bringing it to our attention.
(Tracking with DEVENGAGE-2045)

Fix went out with version 1.24.0


upstream declared as down with monit

Hi,
I built a docker image based on alpine and installed monit. It runs via supervisor in foreground-mode and is configured to listen on port 80.
The container was started with -e VIRTUAL_HOST=monit.mydomain.com
I can curl -I <IP_ADDRESS> and get the monit basic auth reply.
HTTP/1.0 401 Unauthorized
Server: monit 5.15
WWW-Authenticate: Basic realm="monit"

But anyhow, the docker-nginx-proxy generated default.conf upstream stanza is stated down:
upstream monit.mydomain.com {
				## Can be connect with "bridge" network
		# monit
		server <IP_ADDRESS> down;
}

I don't know how to solve that cleanly without hacking in manual .. any ideas?
I think everybody can reproduce that.
If I manually delete the word "down" and nginx -s reload, it's working fine.
After the next docker restart jwilder/nginx-proxy the upstream is marked down again.
Maybe it just has something to do with the basic auth itself so that nginx-proxy recons it as down because of the HTTP Error 401?

I think this happens when nginx-proxy knows about the container but it does not expose any port. Try to add EXPOSE 80/tcp to your Dockerfile or run with --expose 80.


POC: Allow OpenAI to execute arbitrary external actions + no-code implementation with N8N

Closes #
Description

See https://hub.mattermost.com/private-core/pl/4187hrmagiykxct438ksh6uzoa for context

See Confluence for demos and resources around this POC.
https://mattermost.atlassian.net/wiki/spaces/FF/pages/2810019862/Toolkits

This latest merge to master to incorporate #208 needs a revisit. Currently this branch isn't properly supplying the list of available tools in the base prompt, so it's not doing any function calling. I think I messed up the merge somewhere in ai/openai/openai.goin thetoolsToOpenAITools` function.
{
  "caller": "app/plugin_api.go:1004",
  "level": "info",
  "msg": "LLM Call",
  "plugin_id": "mattermost-ai",
  "prompt": "\n--- Conversation ---\n--- System ---\nYou are a helpful assistant called \"Copilot\" that responds on a Mattermost chat server called Mattermost owned by .\n\nCurrent time and date in the user's location is Wed, 26 Jun 2024 15:29:06 PDT\n\nThe following is the personal information of the user. This information is given with every request to you. You can use this information to taylor the request to the specific user however most of the time it will not be relavent. Only acknowledge the information when the request is directly related to the information provided. Never repeat it as written.\nThe user making the request username is 'admin'.\n\n\n\n\nThe channel you are responding in has the name 'town-square' and display name 'Town Square'. The channel is on a team called 'test' with display name 'test'.\n--- User ---\n@ai What tools can you use?\n--- Tools ---\n\n--- Context ---\nTime: Wed, 26 Jun 2024 15:29:06 PDT\nServerName: Mattermost\nCompanyName: \nRequestingUser: admin\nChannel: town-square\nTeam: test\nPost: 61funp1ry7y67jcgbp6qigjyoy\nPromptParameters:\n",
  "timestamp": "2024-06-26 22:29:06.269 Z"
}


DirectX Tool Kit for Audio fix for failing Resume

The Resume method threw a C++ exception if the XAudio2 StartEngine failed. It should switch to silent mode if it fails.
In addition, I added handling for the required audio device being 'locked' by exclusive mode ownership.

Fix from DX11 per this issue.


'Cracked Skills List' not appearing

Since the latest update I am not seeing cracked skills listed at the top of my tree for French From English.  When I scroll down my tree I can see that I do have cracked skills.  If I switch to my English from French tree or my Esperanto From English tree the cracked skills list appears correctly, so I am pretty sure this isn't an issue with my settings.
(I have French to English trees on three different Duolingo accounts but am only seeing this bug on two of them)

Thanks for letting me know, I'll try have a see what could be going on. Strange that it is inconsistent across tree and accounts.

Unfortunately I haven not been able to reproduce this myself.
I have just released v2.0.1 which has a lot of fixes of small and one large bug. There is a change that this behaviour was the result of one of those.
Please let me know if it persists after the update. You can check your version number in the top right of the Duo Strength options popup window.

I must apologise for the misleading title I originally gave this report.
I am now using v2.0.1
When I loaded my tree I could still only see the "skills that needed strengthening" list at the top of the page and not the "skills that are cracked" list. Turning 'Display Cracked Skills List' off and on again made no difference.  However when I turned 'Display Needs Strengthening List' off and back on the cracked skills list appeared as well as the needs strengthening list.  However the cracked skills list displays first, above the needs strengthening list!

No problem. Thanks for the extra information. I'll see if I can find out what is causing it not to be added.
The chaning ordering of the lists is a know thing that I will also try to fix.

This issue has been fixed in 2ff5050 as described in #156 which this turns out to be a the same as.
The French from English tree has one skill which has a url with an accented character, namely the grammar skill "Le gérondif". The é in this was not being handled properly when the skill was in your needs strengthening list. The resulting error was stopping execution and preventing the cracked skills list from displaying.
This is why it did display when you removed the needs strengthening list and re added it, as the error was then happening after the list was added.
The fix will be released shortly as part of v2.0.2.


using "rio run" instead of "rio stage" puts workload in production when weight is 0%

Describe the bug
When creating a new version, if I use rio run without --stage-only instead of rio stage, it will put the new service into rotation with the old one, but it will report that it has a weight of 0% in the output of rio ps.
To Reproduce
Steps to reproduce the behavior:

rio run -n rancher-demo -p 8080:80 monachus/rancher-demo
visit the endpoint and keep it open
rio run -p 8080:80 -n rancher-demo@v1 -e COW_COLOR=yellow monachus/rancher-demo
the yellow cow will show up in the browser next to the black cow
rio ps will show 0% weight for @v1

Expected behavior
According to the help, the default for rio run is --weight 0, but if there is no existing service, it actually goes in with weight of 100%. I'd propose that if there is already a running service, a second use of rio run will act like rio stage.
Kubernetes version & type (GKE, on-prem): kubectl version
EC2/K3s
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-19T13:57:45Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.3-k3s.2", GitCommit:"e7e6a3c4e9a7d80b87793612730d10a863a25980", GitTreeState:"clean", BuildDate:"2019-11-18T18:31:23Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"}

Type:
Rio version: rio info
Rio Version: v0.6.0 (c1bff129)
Rio CLI Version: v0.6.0 (c1bff129)
Cluster Domain: awoawm.on-rio.io
Cluster Domain IPs: <IP_ADDRESS>
System Namespace: rio-system
Wildcard certificates: true

Additional context
rio systemlogs
output:
rio-controller | time="2019-12-03T16:16:25Z" level=info msg="Starting rio-controller, version: v0.6.0, git commit: c1bff129"
rio-controller | time="2019-12-03T16:16:25Z" level=info msg="Updating CRD services.rio.cattle.io"
rio-controller | time="2019-12-03T16:16:25Z" level=info msg="Updating CRD stacks.rio.cattle.io"
rio-controller | I1203 16:16:25.837172       1 leaderelection.go:241] attempting to acquire leader lease  rio-system/rio...
rio-controller | time="2019-12-03T16:16:25Z" level=info msg="listening at :443"
rio-controller | I1203 16:16:25.848246       1 leaderelection.go:251] successfully acquired lease rio-system/rio
rio-controller | time="2019-12-03T16:16:28Z" level=info msg="Starting /v1, Kind=ConfigMap controller"
rio-controller | time="2019-12-03T16:16:31Z" level=info msg="Starting apps/v1, Kind=Deployment controller"
rio-controller | time="2019-12-03T16:16:31Z" level=info msg="Starting apps/v1, Kind=DaemonSet controller"
rio-controller | time="2019-12-03T16:16:31Z" level=info msg="Starting apps/v1, Kind=StatefulSet controller"
rio-controller | time="2019-12-03T16:16:31Z" level=info msg="Starting tekton.dev/v1alpha1, Kind=TaskRun controller"
rio-controller | time="2019-12-03T16:16:31Z" level=info msg="Starting cert-manager.io/v1alpha2, Kind=Certificate controller"
rio-controller | time="2019-12-03T16:16:31Z" level=info msg="Starting /v1, Kind=Endpoints controller"
rio-controller | time="2019-12-03T16:16:31Z" level=info msg="Starting extensions/v1beta1, Kind=Ingress controller"
rio-controller | time="2019-12-03T16:16:31Z" level=info msg="Starting /v1, Kind=Secret controller"
rio-controller | time="2019-12-03T16:16:31Z" level=info msg="Starting /v1, Kind=Service controller"
rio-controller | time="2019-12-03T16:16:31Z" level=info msg="Starting admin.rio.cattle.io/v1, Kind=ClusterDomain controller"
rio-controller | time="2019-12-03T16:16:31Z" level=info msg="Starting admin.rio.cattle.io/v1, Kind=PublicDomain controller"
rio-controller | time="2019-12-03T16:16:31Z" level=info msg="Starting rbac.authorization.k8s.io/v1, Kind=ClusterRoleBinding controller"
rio-controller | time="2019-12-03T16:16:31Z" level=info msg="Starting rbac.authorization.k8s.io/v1, Kind=ClusterRole controller"
rio-controller | time="2019-12-03T16:16:31Z" level=info msg="Starting rio.cattle.io/v1, Kind=Service controller"
rio-controller | time="2019-12-03T16:16:31Z" level=info msg="Starting rio.cattle.io/v1, Kind=Router controller"
rio-controller | time="2019-12-03T16:16:31Z" level=info msg="Starting rio.cattle.io/v1, Kind=Stack controller"
rio-controller | time="2019-12-03T16:16:31Z" level=info msg="Starting rio.cattle.io/v1, Kind=ExternalService controller"
rio-controller | time="2019-12-03T16:16:31Z" level=info msg="Starting gitwatcher.cattle.io/v1, Kind=GitCommit controller"
rio-controller | time="2019-12-03T16:16:31Z" level=info msg="Starting gloo.solo.io/v1, Kind=Settings controller"
rio-controller | time="2019-12-03T22:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-04T04:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-04T10:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-04T16:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-04T22:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-05T04:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-05T10:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-05T16:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-05T22:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-06T04:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-06T10:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-06T16:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-06T22:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-07T04:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-07T10:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-07T16:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-07T22:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-08T04:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-08T10:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-08T16:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-08T18:26:47Z" level=info msg="injecting acme http-01 path for domain supahfly.channel.monach.us"
rio-controller | time="2019-12-08T18:26:47Z" level=info msg="injecting acme http-01 path for domain supahfly.channel.monach.us"
rio-controller | time="2019-12-08T18:26:47Z" level=info msg="injecting acme http-01 path for domain supahfly.channel.monach.us"
rio-controller | time="2019-12-08T18:26:47Z" level=info msg="injecting acme http-01 path for domain supahfly.channel.monach.us"
rio-controller | time="2019-12-08T18:26:48Z" level=info msg="injecting acme http-01 path for domain supahfly.channel.monach.us"
rio-controller | time="2019-12-08T22:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-09T04:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-09T10:16:32Z" level=info msg="Renewing rdns domain"
rio-controller | time="2019-12-09T16:16:32Z" level=info msg="Renewing rdns domain"

This appears to also happen with rio up if weight is not specified in the Riofile.  I ran the Riofile below with only yellow in it, then ran it again after adding pink and again after adding blue. All three services ended up in rotation, despite only yellow showing a weight of 100 in rio ps.
services:
  yellow:
    app: rancher-demo
    image: monachus/rancher-demo:v1.4.1
    ports:
    - 80:8080/http
    env:
    - COW_COLOR=yellow
  pink:
    app: rancher-demo
    image: monachus/rancher-demo:v1.4.1
    ports:
    - 80:8080/http
    env:
    - COW_COLOR=pink
  blue:
    app: rancher-demo
    image: monachus/rancher-demo:v1.4.1
    ports:
    - 80:8080/http
    env:
    - COW_COLOR=blue

Also, hit during a demo of v0.6.0:
rio ps
NAME                  IMAGE                                            ENDPOINT                                               PORTS     SCALE     WEIGHT    CREATED          DETAIL
rio-meetup@958e5536   default-rio-meetup-v0k458c-e9f660c-8b53e:a1584   https://rio-meetup-958e5536-default.vpa5vd.on-rio.io   80:8080   10        50%       47 minutes ago
rio-meetup@5e97edfb   default-rio-meetup-v0k458c-e9f660c-3bdda:72cf7   https://rio-meetup-5e97edfb-default.vpa5vd.on-rio.io   80:8080   1         50%       50 minutes ago

Name:         rio-meetup-5e97edfb
Namespace:    default
Labels:       objectset.rio.cattle.io/hash=a1eaa58a7aa4f526620d54ba5a3bb95734927534
Annotations:  objectset.rio.cattle.io/applied:
                {"apiVersion":"","kind":"","metadata":{"name":"rio-meetup-5e97edfb","namespace":"default","creationTimestamp":null,"labels":{"objectset.ri...
              objectset.rio.cattle.io/id: gloo-service
              objectset.rio.cattle.io/owner-gvk: rio.cattle.io/v1, Kind=Service
              objectset.rio.cattle.io/owner-name: rio-meetup-v0k458c-e9f660c-3bdda
              objectset.rio.cattle.io/owner-namespace: default
API Version:  gateway.solo.io/v1
Kind:         VirtualService
Metadata:
  Creation Timestamp:  2019-12-11T19:08:08Z
  Generation:          2
  Owner References:
    API Version:           rio.cattle.io/v1
    Block Owner Deletion:  false
    Controller:            true
    Kind:                  Service
    Name:                  rio-meetup-v0k458c-e9f660c-3bdda
    UID:                   5e97edfb-bef7-43f4-8653-b4bae93e0d63
  Resource Version:        34909
  Self Link:               /apis/gateway.solo.io/v1/namespaces/default/virtualservices/rio-meetup-5e97edfb
  UID:                     4451a4d6-5bd8-4bb4-aa3f-77a48fe85045
Spec:
  Virtual Host:
    Domains:
      rio-meetup-5e97edfb-default.vpa5vd.on-rio.io
    Routes:
      Matcher:
        Prefix:  /
      Route Action:
        Single:
          Kube:
            Port:  80
            Ref:
              Name:       rio-meetup-5e97edfb
              Namespace:  default
Status:
  reported_by:  gateway
  State:        1
  subresource_statuses:
    *v1.Proxy rio-system gateway-proxy-v2:
      reported_by:  gloo
      State:        1

This virtual service should say multiple.
Steps taken:
1 . rio run -p 80:8080 --name rio-meetup2 --scale 1-10 --stage-only  --template https://github.com/daxmc99/rancher-demo
2. Git commit and push
3. Wait for new service to come up
3. rio weight --duration 1m rio-meetup@958e5536=50%

Somewhat related to this... I have two services (d-test@v1 and d-test@v3) which produce Hello World and Hello World v3 when curled. There is a brief lag time in the gloo virtual service when promoting these to 100% weight (separated command outputs with ---):
$ rio promote d-test@v3 && kubectl get virtualservices.gateway.solo.io d-test -o yaml && curl https://d-test-default.x8nx8f.on-rio.io:30738

---

d-test@v3 promoted

---

apiVersion: gateway.solo.io/v1
kind: VirtualService
metadata:
  annotations:
    objectset.rio.cattle.io/applied: '{"apiVersion":"","kind":"","metadata":{"name":"d-test","namespace":"default","creationTimestamp":null,"labels":{"objectset.rio.cattle.io/hash":"88c9e88f8042fd99ab7aecc76593ee98124918a0"},"annotations":{"objectset.rio.cattle.io/id":"gloo-app","objectset.rio.cattle.io/owner-gvk":"/v1,
      Kind=Service","objectset.rio.cattle.io/owner-name":"d-test","objectset.rio.cattle.io/owner-namespace":"default"},"ownerReferences":[{"apiVersion":"v1","kind":"Service","name":"d-test","uid":"470455f1-d11f-481a-a178-0d155f9ec594","controller":true,"blockOwnerDeletion":false}]},"spec":{"virtualHost":{"domains":["d-test-default.x8nx8f.on-rio.io:30738","d-test-default.x8nx8f.on-rio.io:32133"],"routes":[{"matchers":[{"prefix":"/"}],"routeAction":{"multi":{"destinations":[{"destination":{"kube":{"port":80,"ref":{"name":"d-test-v1","namespace":"default"}}}},{"destination":{"kube":{"port":80,"ref":{"name":"d-test-v3","namespace":"default"}}},"weight":10000}]}}}]}},"status":{}}'
    objectset.rio.cattle.io/id: gloo-app
    objectset.rio.cattle.io/owner-gvk: /v1, Kind=Service
    objectset.rio.cattle.io/owner-name: d-test
    objectset.rio.cattle.io/owner-namespace: default
  creationTimestamp: "2019-12-12T16:37:57Z"
  generation: 14
  labels:
    objectset.rio.cattle.io/hash: 88c9e88f8042fd99ab7aecc76593ee98124918a0
  name: d-test
  namespace: default
  ownerReferences:
  - apiVersion: v1
    blockOwnerDeletion: false
    controller: true
    kind: Service
    name: d-test
    uid: 470455f1-d11f-481a-a178-0d155f9ec594
  resourceVersion: "363898"
  selfLink: /apis/gateway.solo.io/v1/namespaces/default/virtualservices/d-test
  uid: 2af540fa-30fe-47e1-8cac-ca6294bcdf18
spec:
  virtualHost:
    domains:
    - d-test-default.x8nx8f.on-rio.io:30738
    - d-test-default.x8nx8f.on-rio.io:32133
    routes:
    - matchers:
      - prefix: /
      routeAction:
        multi:
          destinations:
          - destination:
              kube:
                port: 80
                ref:
                  name: d-test-v1
                  namespace: default
          - destination:
              kube:
                port: 80
                ref:
                  name: d-test-v3
                  namespace: default
            weight: 10000
status:
  reported_by: gateway
  state: 1
  subresource_statuses:
    '*v1.Proxy.rio-system.gateway-proxy':
      reported_by: gloo
      state: 1

---

Hello World


reconstruction of Shepp Logan phantom

Hi,
I am currently working on reconstructing cone beam projections made from the shepp logan phantom. I am using Simple RTK on PyCharm. I am able to reconstruct it but the results are not what I expected.
My shepp logan data consists of 500 projections of 256 x 256 (19 464 444.72 um x 19 464 444.72 um x 38 016 493.60 um)
Here is my code used to the reconstruction, it is basically the FirstReconstruction code (kind of but a little modified).
ndaData  # contains my projection data as a ndarray
Generate a geometry
numberOfProjections = 500
self.geometry = srtk.ThreeDCircularProjectionGeometry()
self.sdd = 20000 # source to detector distance in mm
self.sid = 10000 # source to isocenter distance in mm
anglemin = 0  # first angle
anglemax = 360  # last angle
isox = 0
isoy = 0
outangle =0
inangle = 0
srcx = 0
srcy = 0
for noProj in range(0, numberOfProjections):
angle = anglemin + noProj * anglemax / numberOfProjections
self.geometry.AddProjection(self.sid, self.sdd, angle, isox, isoy, outangle, inangle, srcx, srcy)
Convert to a SimpleRTK image
srtkData = srtk.GetImageFromArray(ndaData)
uvSize = srtkData.GetSize()
spacing = (76.032, 76.032, 76.032)  # projection spacing in mm
origin = [-0.5spacing[0](uvSize[0]-1), -0.5spacing[1](uvSize[1]-1), 0]  # centered
srtkData.SetSpacing(spacing)
srtkData.SetOrigin(origin)
constantImageRecons = srtk.ConstantImageSource()
sizeX = 256
sizeY = 256
sizeZ = 256
sizeOutput = [sizeX, sizeY, sizeZ]
sizeX = 38.016
sizeY = 38.016
sizeZ = 38.016
spacing = [sizeX, sizeY, sizeZ]
sizeX = -4863.5
sizeY = -4863.5
sizeZ = = -4863.5
origin = [sizeX, sizeY, sizeZ]
constantImageRecons.SetOrigin(origin)
constantImageRecons.SetSpacing(spacing)
constantImageRecons.SetSize(sizeOutput)
constantImageRecons.SetConstant(0.0)
imageRecons = constantImageRecons.Execute()
feldkamp = srtk.CudaFDKConeBeamReconstructionFilter()
feldkamp.SetGeometry(self.geometry)
srtkImage = feldkamp.Execute(imageRecons, srtkData)
reconstructData = srtk.GetArrayFromImage(srtkImage)
I then transform my reconstructData so to publish it. When I visualize it, I have this:

I am pretty sure that my error is not in the way I visualize my image. I was wondering if anybody had encountered the same mistake as me? Or if anybody had an idea as to why it is not working for me. I should obtain something looking like this:

Thank you,
Emmanuelle Richer

Hi Emmanuelle,
It would be a lot easier to help you if you added the code to generate the
projections data. Did you use SimpleRTK for this too?
It is clearly a geometry problem, either due to a different geometry when
generating the projection images or a problem in the conversion from numpy
array. From the images, I notice that we guess the typical axial slice of
the Shepp Logan but the cone-beam artifacts (top / bottom chinese hat) are
on the same slice which is really not expected.
My advice: do a full script which includes the simulations and if you get
that working, compare the simulated projections and the one you are using
here.
I hope this helps,
Simon
On Wed, Jun 20, 2018 at 7:57 PM, EmmanuelleRicher<EMAIL_ADDRESS>wrote:

Hi,
I am currently working on reconstructing cone beam projections made from
the shepp logan phantom. I am using Simple RTK on PyCharm. I am able to
reconstruct it but the results are not what I expected.
My shepp logan data consists of 500 projections of 256 x 256 (19 464
444.72 um x 19 464 444.72 um x 38 016 493.60 um)
Here is my code used to the reconstruction, it is basically the
FirstReconstruction code (kind of but a little modified).
ndaData # contains my projection data as a ndarray
Generate a geometry
numberOfProjections = 500
self.geometry = srtk.ThreeDCircularProjectionGeometry()
self.sdd = 20000 # source to detector distance in mm
self.sid = 10000 # source to isocenter distance in mm
anglemin = 0 # first angle
anglemax = 360 # last angle
isox = 0
isoy = 0
outangle =0
inangle = 0
srcx = 0
srcy = 0
for noProj in range(0, numberOfProjections):
angle = anglemin + noProj * anglemax / numberOfProjections
self.geometry.AddProjection(self.sid, self.sdd, angle, isox, isoy,
outangle, inangle, srcx, srcy)
Convert to a SimpleRTK image
srtkData = srtk.GetImageFromArray(ndaData)
uvSize = srtkData.GetSize()
spacing = (76.032, 76.032, 76.032) # projection spacing in mm
origin = [-0.5spacing[0](uvSize[0]-1), -0.5spacing[1](uvSize[1]-1),
0] # centered
srtkData.SetSpacing(spacing)
srtkData.SetOrigin(origin)
constantImageRecons = srtk.ConstantImageSource()
sizeX = 256
sizeY = 256
sizeZ = 256
sizeOutput = [sizeX, sizeY, sizeZ]
sizeX = 38.016
sizeY = 38.016
sizeZ = 38.016
spacing = [sizeX, sizeY, sizeZ]
sizeX = -4863.5
sizeY = -4863.5
sizeZ = = -4863.5
origin = [sizeX, sizeY, sizeZ]
constantImageRecons.SetOrigin(origin)
constantImageRecons.SetSpacing(spacing)
constantImageRecons.SetSize(sizeOutput)
constantImageRecons.SetConstant(0.0)
imageRecons = constantImageRecons.Execute()
feldkamp = srtk.CudaFDKConeBeamReconstructionFilter()
feldkamp.SetGeometry(self.geometry)
srtkImage = feldkamp.Execute(imageRecons, srtkData)
reconstructData = srtk.GetArrayFromImage(srtkImage)
I then transform my reconstructData so to publish it. When I visualize it,
I have this:
[image: image]
https://user-images.githubusercontent.com/37636828/41675077-b39b9532-748f-11e8-8885-a9b8e74f8b23.png
[image: image]
https://user-images.githubusercontent.com/37636828/41675109-cd9b93a6-748f-11e8-91ab-0c845f7f6dc0.png
I am pretty sure that my error is not in the way I visualize my image. I
was wondering if anybody had encountered the same mistake as me? Or if
anybody had an idea as to why it is not working for me. I should obtain
something looking like this:
[image: image]
https://user-images.githubusercontent.com/37636828/41675441-b4131200-7490-11e8-89de-62040d59de1c.png
Thank you,
Emmanuelle Richer
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/SimonRit/RTK/issues/192, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAT_cNi4HDYHWG2XJxPnnVhbrOHkXi_yks5t-oz5gaJpZM4UvuaJ
.

Hi,
Thank you so much for your quick answer!
I didn't use SimpleRTK to generate my projections. I have attached them here as a tiff stack so you can look at them. I load them as a stack of files through another software that switches them into a ndarray.
I have 500 tif files of 256 x 256 and after the numpy conversion I have a ndarray (ndaData) of 500, 256, 256 (Z, Y, X convention). Maybe the axes convention causes problems?
I will still try your advice, to generate my projections with SimpleRTK methods and to compare the projections. I tried to reconstruct with the same code as I have now with another set of Cone Beam projections generated from a real CT machine and I still have unexpected results...
Thank you so much,
Emmanuelle
SheppLoganConeBeam.zip

Hi,
Just wanted to give an update: I generated projections with RTK (with the command line options in the built applications : http://wiki.openrtk.org/index.php/RTK/Scripts/FDK) and I obtain very similar results. And when I test the reconstruction on the projections made by the command line methods, I obtain basically the same reconstruction output with lots of weird artefacts.
But, when I input either negative values to my sad and sid distances (-20000 and -10000) or when I put my max angle negative (-360), I obtain pretty good results (see image below). I suppose there is a flaw in the way I create my geometry but I don't have any idea what it is!

Please tell me if you have an idea about what it is that's causing this!
Have a good day and thank you,
Emmanuelle

Thanks for the update. That's weird indeed. Are you writing it to disk in mhd format and reading with SimpleRTK? I don't understand how this is possible to be honest. Please give the command line and the Python code to read it.

Hi,
So I'm getting closer to an answer. I was able to create projections with these command line options:
C:\Users\admin\Desktop\RTK-BuildExamples>rtksimulatedgeometry -n 256 -o C:\Users\admin\Desktop\RTK-BuildExamples\ExternalData\testing\Data\Baseline\XRad\geometry.xml
C:\Users\admin\Desktop\RTK-BuildExamples>rtkprojectgeometricphantom -g C:\Users\admin\Desktop\RTK-BuildExamples\ExternalData\testing\Data\Baseline\XRad\geometry.xml -o projections.tif --spacing 2 --dimension 256 --phantomfile C:\Users\admin\Desktop\RTK-BuildExamples\ExternalData\testing\Data\Input\GeometricPhantom\SheppLogan.txt
and then reconstruct them with my simpleRTK code:
I am working with Dragonfly, I import the files in the software than with this code transform the channel containing my projections to a ndarray.
Needs a channel
channelGUIDList = (
WorkingContext.getEntitiesOfClass(self.getImplementation(), OrsSelectedObjects, Channel.getClassNameStatic()))
if len(channelGUIDList) == 0:
return
self.channel = orsObj(channelGUIDList[0])  # Take the first one
numberOfProjections = self.channel.getZSize()
sdd = 1536
sid = 1000
anglemin = 0  # first angle
anglemax = 360  # last angle
isox = 0
isoy = 0
outangle = 0
inangle = 0
srcx = 0
srcy = 0
for noProj in range(0, numberOfProjections):
angle = anglemin + noProj * anglemax / numberOfProjections
self.geometry.AddProjection(self.sid, self.sdd, angle, isox, isoy, outangle, inangle, srcx, srcy)
Convert from intensity to attenuation
ndaData = self.channel.getNDArray(0)  # working with Dragonly, that’s how I a transform my projections images in ndarray
I0 = 2 ** 16 - 1
if ndaData.min() > 0:
intensityOffset = 0
else:
intensityOffset = 0.01*(ndaData.max()-ndaData.min())-ndaData.min()  # offset to non negative numbers
ndaData = np.log(float(I0)/(ndaData+intensityOffset))  # Convert intensity to line integral
print("Attenuation range =", ndaData.min(), ndaData.max())
ndaData = ndaData.astype(np.float32)
must have the same dtype as the reconstructed image i.e. float32
Convert to a SimpleRTK image
srtkData = srtk.GetImageFromArray(ndaData)
uvSize = srtkData.GetSize()
convert to mm
spacing = [1000 * self.channel.getXSpacing(), 1000 * self.channel.getYSpacing(), 1000 * self.channel.getZSpacing()]
origin = [-0.5spacing[0](uvSize[0]-1), -0.5spacing[1](uvSize[1]-1), 0]  # centered
srtkData.SetSpacing(spacing)
srtkData.SetOrigin(origin)
Create an empty output
constantImageRecons = srtk.ConstantImageSource()
sizeX = 256
sizeY = 256
sizeZ = 256
sizeOutput = [sizeX, sizeY, sizeZ]
sizeX = 1
sizeY = 1
sizeZ = 1
spacing = [sizeX, sizeY, sizeZ]
sizeX = -127.5
sizeY = -127.5
sizeZ = -127.5
origin = [sizeX, sizeY, sizeZ]
constantImageRecons.SetOrigin(origin)
constantImageRecons.SetSpacing(spacing)
constantImageRecons.SetSize(sizeOutput)
constantImageRecons.SetConstant(0.0)
imageRecons = constantImageRecons.Execute()
print("Performing reconstruction")
feldkamp = srtk.CudaFDKConeBeamReconstructionFilter()
feldkamp.SetGeometry(self.geometry)
feldkamp.SetTruncationCorrection(0.0)
feldkamp.SetHannCutFrequency(0.0)
srtkImage = feldkamp.Execute(imageRecons, srtkData)
Convert to ndarray
reconstructData = srtk.GetArrayFromImage(srtkImage)
Put it on a new channel
newChannel = Channel()
newChannel.resize(reconstructData.shape, dtype=reconstructData.dtype)
origin = Vector3() ; origin.setXYZ(float(self.ui.outputOriginX.text()), float(self.ui.outputOriginY.text()),
float(self.ui.outputOriginZ.text()))
newChannel.setOrigin(origin)
scale = srtkImage.GetSpacing()
newChannel.setXSpacing(scale[0] / 1000)  # convert into meters
newChannel.setYSpacing(scale[1] / 1000)
newChannel.setZSpacing(scale[2] / 1000)
newChannel = createChannelFromNumpyArray(reconstructData, newChannel.getGUID())
save to files in directory
file = self.directory + r'\file.tif'
orsimagesaver.OrsImageSaver.exportDatasetToTiffFile(newChannel.getGUID(),
fileName=file,
useLZWCompression=False,
exportMultiFrameFile=False,
showProgress=False)
if self.ui.loadChannel.isChecked():
newChannel.setTitle('Reconstructions')
newChannel.publish()
print('Reconstruction complete.')
else:
print('Reconstruction files are now in the chosen directory.')
and obtain good results. When I was trying the same reconstruction code on the projections that I posted earlier in the tif stack, I was obtaining the weird artefacts on the reconstructed images. But when I inverted the signs of sad and sid, it worked. I figured out that when I inverted the Z axis in my projections and then applied the reconstruction code, it was all working out as well. I suppose there was a difference in the way I had created my projections. I will try to understand why I need to invert an axis to make my reconstruction code work with my own projections but I will close this issue since I found out the way to obtain good reconstructed images.
I'm sorry for not posting my code earlier but I wasn't sure if I was at liberty to do so.
Thank you for your help!
Emmanuelle

Hi,
I don't understand why you go through this path. I suggest that you do everything in Python with SimpleRTK following, e.g., the example here
http://wiki.openrtk.org/index.php/FanBeam
Then, you can try to understand what's wrong when you do your conversion via Dragon fly. My guess is that it is not using a C convention for arrays as ITK does but, maybe, a Fortran convention as numpy does. So, from ITK to numpy, the order [x,y,z] becomes [z,y,x] and it's possible that you can compensate that with some minus signs in your geometry.
Simon

Also, this is not an RTK issue but this is a user question, I would prefer to have that conversation on the mailing list<EMAIL_ADDRESS>dedicated to this. I'm therefore closing the issue.


How to notifyDataSetChanged when delete a group?

Hi, @h6ah4i
I'm trying to remove a group in a ExpandableDraggableItemAdapter. But after remove, the items belows the removed item won't refresh.
Here's my code
public Object removeItem(int groupPos) {
	mExpandManager.notifyGroupItemRemoved(groupPos);
	Object obj = mDataList.remove(groupPos);
	return obj;
}

And there's another implementation. I try to refresh all the item below the deleted item.
Obviously, The code is ugly. And I want to know how to make it better.
public Object removeItem2(int groupPos) {
	long packedPos = RecyclerViewExpandableItemManager
			.getPackedPositionForGroup(groupPos);
	int realPos = mExpandManager.getFlatPosition(packedPos);

	notifyItemRemoved(realPos);
	notifyItemRangeChanged(realPos, 999);  // 999 because I don't know how to getItemCount();

	Object obj = mDataList.remove(groupPos);
	return obj;
}

Hi,
Try notifying after the remove call:
public Object removeItem(int groupPos) {
    Object obj = mDataList.remove(groupPos);
    mExpandManager.notifyGroupItemRemoved(groupPos);
    return obj;
}

@fabiendem
Sorry for reply so late. Thanks for your solution and I have tried it, but it seems not working.
The problem like this:
Before remove (4 items in list):
Item A - 0
Item B - 1
Item C - 2
Item D - 3
--
After remove item B (3 items in list. the animation is normal, but the index doesn't refresh):
Item A - 0
Item C - 2
Item D - crash

You need to make sure the getItemCount method returns a valid value. should be equal to: mDataList.size()

I'm using ExpandableDraggableItemAdapter so I use getGroupCount() instead of getItemCount(), and it's still not working. Here's some more code:
public TheAdapter(Activity activity, ArrayList dataList) {
    mActivity = activity;
    mDataList = dataList;
    setHasStableIds(true);
}

@Override
public int getGroupCount() {
    return mDataList.size();
}

@Override
public long getGroupId(int groupPosition) {
    return mDataList.get(groupPosition).getId() * 10000;
}

@Override
public int getGroupItemViewType(int groupPosition) {
    return groupPosition == 0 ? 1 : 0; // first item should be larger.
}

public Object removeItem(int groupPos) {
    Object obj = mDataList.remove(groupPos);
    mExpandManager.notifyGroupItemRemoved(groupPos);
    return obj;
}

Sorry can't see anything wrong.
Can you grab the exception stack trace and error message via logcat when the error occurs?

Index Exception.
After remove:
Item A - 0
Item C - 2
Item D - crash  [This index is 3, But after remove, there's only 3 items, not 4. So here occurs exception. ]

Crash Log:
W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41b2fce0)
W/System.err﹕ java.lang.IndexOutOfBoundsException: Invalid index 18, size is 18
W/System.err﹕ at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
W/System.err﹕ at java.util.ArrayList.get(ArrayList.java:308)
W/System.err﹕ at com.bar.foo.TheAdapter.getItem(TheAdapter.java:329)
W/System.err﹕ at com.bar.foo.TheFragment$3.onMoreBtnClick(TheFragment.java:177)
W/System.err﹕ at com.bar.foo.TheAdapter$2.onClick(TheAdapter.java:183)
W/System.err﹕ at android.view.View.performClick(View.java:4445)
W/System.err﹕ at android.view.View$PerformClick.run(View.java:18446)
W/System.err﹕ at android.os.Handler.handleCallback(Handler.java:733)
W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:95)
W/System.err﹕ at android.os.Looper.loop(Looper.java:136)
W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:5146)
W/System.err﹕ at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:515)
W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:732)
W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
W/System.err﹕ at dalvik.system.NativeStart.main(Native Method)

I can't provide the original code, so I write a demo for this issue, Here's the link:
https://github.com/wliu6v/RecyclerDemo/blob/master/app/src/main/java/demo/liuwei/recyclerexpanddemo/TheAdapter.java
In this file, the removeItem() method will crash after remove a item and click the last item. but the removeItem2() will be ok.

@wliu6v Thanks, I'll take a look your demo code.

You cannot reuse the groupPosition in callback. Position will be changed.
	public void removeItem3(View v, int groupPos) {
		RecyclerView.ViewHolder vh = RecyclerViewAdapterUtils.getViewHolder(v);

		int flatPosition = vh.getAdapterPosition();
		long expandablePosition = mExpandableManager.getExpandablePosition(flatPosition);
		int groupPos2 = RecyclerViewExpandableItemManager.getPackedPositionGroup(expandablePosition);

		if (groupPos != groupPos2) {
			String msg = "groupPos: " + groupPos + " / groupPos2: " + groupPos2;
			Toast.makeText(v.getContext().getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
		}

		mData.remove(groupPos2);
		mExpandableManager.notifyGroupItemRemoved(groupPos2);
	}

@h6ah4i Thanks for your reply but it seems not work. I update my code. Now the removeItem() method is your code. But it has the same problem with my original code.

@wliu6v Try the following code. My old implementations can cause a crash when you click the list items frequently.
	public void removeItem3(View v, int groupPos) {
		RecyclerView.ViewHolder vh = RecyclerViewAdapterUtils.getViewHolder(v);

		int flatPosition = vh.getAdapterPosition();

		if (flatPosition == RecyclerView.NO_POSITION) {
			return;
		}

		long expandablePosition = mExpandableManager.getExpandablePosition(flatPosition);
		int groupPos2 = RecyclerViewExpandableItemManager.getPackedPositionGroup(expandablePosition);

		if (groupPos != groupPos2) {
			String msg = "groupPos: " + groupPos + " / groupPos2: " + groupPos2;
			Toast.makeText(v.getContext().getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
		}

		mData.remove(groupPos2);
		mExpandableManager.notifyGroupItemRemoved(groupPos2);
	}

@h6ah4i Your new solution will prevent crash when click the last item. But when I click the items between the removed one and the last one, the position still not right.
You can see the images below:

The original state.
I remove the Item E.
I click on Item G. The Item G should be , but because the position not right, so the expanded item is H, not G.

The following code is my onBindGroupViewHolder() method. If the groupPosition in onClick() is wrong?
@Override
public void onBindGroupViewHolder(GroupViewHolder groupViewHolder,
		final int groupPosition, int viewType) {
	groupViewHolder.tv.setText(mData.get(groupPosition).first);

	groupViewHolder.tv.setOnClickListener(new View.OnClickListener() {
		@Override
		public void onClick(View v) {

			if (mExpandableManager.isGroupExpanded(groupPosition)) {
				mExpandableManager.collapseGroup(groupPosition);
			} else {
				mExpandableManager.expandGroup(groupPosition);
			}
		}
	});

	groupViewHolder.mRemover.setOnClickListener(new View.OnClickListener() {
		@Override
		public void onClick(View v) {
			removeItem3(groupPosition, v);
		}
	});

}

That is the same problem. Have to re-calculate the item position from the view instance.
Code snippet:
RecyclerView.ViewHolder vh = RecyclerViewAdapterUtils.getViewHolder(v);
int flatPosition = vh.getAdapterPosition();
long expandablePosition = mExpandableManager.getExpandablePosition(flatPosition);
int groupPos = RecyclerViewExpandableItemManager.getPackedPositionGroup(expandablePosition);
int childPos = RecyclerViewExpandableItemManager.getPackedPositionChild(expandablePosition);

FYI: This is not an Advanced RecyclerView specific issue, but rather a common practice for touch event handling of RecyclerView.

Thank you for your patiently reply! I had already know where the problem is.
The recyclerView won't refresh all item's positions after remove a item, so what I should do is get the real position by the view.


[Bug]: No sound

What happened?
A bug happened!
Device Type
Indoor Camera (Supported)
Plugin Version
v1.0.x (Supported)
HomeBridge Version
v1.3.x (Supported)
NodeJS Version
v14 (Supported)
Operating System
Docker
Relevant log output
everything works fast. but now i have no sound :( i tried everything...
and still snapshot unavaliable but i know this is in progres...

Common issues checked

Did you check this Common Issues pages ?

Common issues checked


creation of service information page for ARGO

Summary

creation of service information page for ARGO Monitoring

Related issue :

I thought I created that in the right level: was it wrong?
On Thu, 4 Nov 2021 at 10:24, Enol Fernández @.***>
wrote:

@.**** commented on this pull request.
For GOCDB we have this identity card as a subpage:
https://docs.egi.eu/internal/configuration-database/service-information/
Should we have the same structure everywhere?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/EGI-Federation/documentation/pull/355#pullrequestreview-797506203,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEE67DTTF7SPC5RJCNLQZNDUKJGLPANCNFSM5HJLFDFQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

--
Dr. Alessandro Paolini | Senior Service Delivery Officer | EGI Foundation
(Amsterdam, The Netherlands)
W: www.egi.eu | M: +31 (0)630372845 | E: @.*** | skype:
alessandro.paolini.egi
EGI: Advanced Computing for Research
The EGI Foundation is ISO 9001:2015 and ISO/IEC 20000-1:2018 certified

"I believe in the power of laughter and tears"
"as an antidote to hatred and terror"
"A day without laughter"
"is a wasted day" >>> Charlie Chaplin

I thought I created that in the right level: was it wrong?

Check:
https://docs.egi.eu/documentation/355/internal/monitoring/change-me/
it should be probably called service-information.md instead of change-me.md and the format is quite broken

I will fix it. I was sure to have used the same format of the other pages I
created on the same day for other services.
On Wed, 10 Nov 2021 at 12:37, Enol Fernández @.***>
wrote:

I thought I created that in the right level: was it wrong?
Check:
https://docs.egi.eu/documentation/355/internal/monitoring/change-me/
it should be probably called service-information.md instead of
change-me.md and the format is quite broken
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/EGI-Federation/documentation/pull/355#issuecomment-965046970,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEE67DXYZSUMSHQVZFZTGBDULJKOPANCNFSM5HJLFDFQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

--
Dr. Alessandro Paolini | Senior Service Delivery Officer | EGI Foundation
(Amsterdam, The Netherlands)
W: www.egi.eu | M: +31 (0)630372845 | E: @.*** | skype:
alessandro.paolini.egi
EGI: Advanced Computing for Research
The EGI Foundation is ISO 9001:2015 and ISO/IEC 20000-1:2018 certified

"I believe in the power of laughter and tears"
"as an antidote to hatred and terror"
"A day without laughter"
"is a wasted day" >>> Charlie Chaplin

For GOCDB we have this identity card as a subpage: https://docs.egi.eu/internal/configuration-database/service-information/
Should we have the same structure everywhere?

I added similar pages for the other services too, but they are marked as draft in the header.

@paolini78 thanks!
It was in the correct folder, but you should use the proper naming for the folders as it's used to construct the path in the URL.
It's good to get inspiration from existing pages in production like the one for Configuration Database.
If a page is marked as draft it won't be published shown.
I've made some cleaning, if it looks ok to you at https://docs.egi.eu/documentation/355/internal/monitoring/ we can validate it and merge it.

The type: "docs" in the front matter is also responsible for selecting how a page has to be rendered, what rendering template it should follow, that's why the look and feel was broken, see https://www.docsy.dev/docs/adding-content/content/#content-sections-and-templates


"Error occurred while loading image" when trying to open Full Colored pages

Type of installation
Setup (.exe)
Type of reader (if reader related)
None
Steps to reproduce
Reader works fine on normal grayscale mangas but getting an error whenever I try to open a manga with Full Colored pages. It doesn't load the images and just displays "Error occurred while loading image". Already tried enabling "Canvas Based Rendering" but it didn't help.
✔ Expected Behavior
No response
❌ Actual Behavior
No response

Is there any error when "Canvas Based Rendering" is disabled?  "Error occurred while loading image" is only showed when its enabled.
If possible, please send the average image resolution and size under.

Getting the error with "Canvas Based Rendering" enabled or disabled

That would be weird because there is no error defied when "Canvas Based rendering" is disabled.
Can you show some screenshots, or screen recording if possible?
Also make sure the images are not corrupted by opening them inside an image viewer.

Not the same error, reader won't load the images if they're full colored for some reason
"Canvas Based Rendering" enabled:

"Canvas Based Rendering" disabled:

Try to recreate it with any full colored manga/comics .cbz file with .png pages with at least 1400px horizontal resolution

These errors only occur with .cbz files - I cant recreate it with the folder extracted then dragged to the reader

I will add option to use raw image data instead of filename to bypass this issue.
But not that it will greatly increase RAM and CPU usage.

@zeoint Thats because most of the official cbz I encountered are designed like that, each page has whole manga name followed by page number, and if the manga name is too large then everything breaks.

I will add option to use raw image data instead of filename to bypass this issue. But not that it will greatly increase RAM and CPU usage.

The user above states that this error only occurs with archive and not with folders. So wouldn't just using the folder as chapters solve the issue. My thoughts.

Extracting all my cbz archives to folders just to use the reader would be hassle - also lose cover thumbnails, higher file size etc.

Any updates with the fix @mienaiyami ?

Thanks


Update Readme.md file

Description:
Currently, the readme file consists of an old picture of the website

Since we have new features in the navbar, we must update the readme with the latest screenshot from the website.

This contribution is under GSSOC'24.

Please assign it to me
Thanks.

can you please assign this issue to me
I can fix it

please assign this issue to me
I can fix it

i am working as a contributor in GSSOC'24, i resolve your issued please assign it to me. and please label it for GSSOC'24


Release v2<IP_ADDRESS>

feature: Generate metrics relationship graph

It seems this commit doesn't exist in the master branch, should we cherry-pick it back to master?

@baurine Yes, it is a subtask of the diagnose refinement stage 2. When we start doing it, the code here can be reused.


lk86/remove-snapps-protocol-merge-check

Remove feature/snapps-protocol merge check

running CI on it to make sure I didn't introduce a syntax error, then i'll merge it to compatible and develop


Update vrtek.c

Updated settings for the WVR3 using Oculus CV1 settings looks much better now. Might not be exactly correct but it is a lot closer.

Closing this pull request as it has been merged upstream.


Extract superclass from CDM Hierarchy

Hi, I'm trying to understand CDM. I need to create a python function that takes in a word ("account"), runs it through the CDM schema and returns a superclass (financial Services) of that input word.
E.g.
def get_superclass(word='account'):
superclass = #Get superclass of 'account', which is 'financial Services' from CDM schema
return superclass
I'll like to know how to work with CDM to achieve this.
Thank you.

Hello, the CDM sdk will not be able to help you achieve that. You will need to take the schema files (mainly the manifest files) and create the functionality yourself.
In order to do what you are looking for, you would need to create a mapping of all of the manifests and the entities that are contained in them. Manifest objects point to other manifests called "submanifests" and mean you will have a hierarchy of manifests and a path to follow to find the "superclass". Then when you are looking for "account" you would look through that manifest hierarchy until you find the superclass that you are looking for.

Thank you. Is there a document that has a list of the manifestName and the related entityNames or do I need to go through all the files to pick them out?

We have a documentation on entity references, https://docs.microsoft.com/en-us/common-data-model/schema/core/overview, is it what you are looking for?

Hi @Green-Cherub, are you looking for additional information? If so, could you please respond to the previous query? If you have all the information you'd requested, then please feel free to close the issue.


Update pt-BR translation

I was going to add the pt-BR translation but couldn't find the time to do it these past few weeks. I started reviewing the current version of the portuguese translation and there's stuff that's straight up wrong and not considering the proper word order in portuguese. Some text seems like it was generated by a GPT or another AI tool, or even Google Translate, instead of a proper translation. I'll try to finish this as soon as I can.
The worst offender so far was this:
#: src/view/com/util/forms/PostDropdownBtn.tsx:236
msgid "Appeal content warning"
msgstr "Aviso de conteúdo de apelação"

It translates back to "Warning about appealing content", the correct translation would be "Contestar aviso de conteúdo". There's many others but this is definitely not a good translation and I believe a review by another language speaker should be required before merging such translation PRs.
Another offender:
#: src/view/com/profile/ProfileHeader.tsx:369
msgid "Unmute Account"
msgstr "Não silenciar conta"

Translates back to "Don't silence account", correct translation would be "Desmutar conta"

I believe I'm done, I used POEditor to edit this and it formatted the .po file in a weird way, please let me know if you would like to see this reverted.

Hi @gildaswise, how are you? You need to maintain the same file structure, because when new variables are processed this will break the translation because when processing several tsx are changed!
I believe you saw that as soon as you sent the translation, new tsx were added and changed!
You commented on the translation "Desmutar conta" but the correct translation would be "Desativar silencio da conta"
GTP Chat was not used but Crowdin.
Regarding words with some incorrect translations, they are still being adjusted with the mobile and web application based on the number of characters that can be displayed, if possible, correct them in my open pull.
For example, the translation "Comentários" broke the application and in the new version I sent I kept "Feedback" so that when developers adjust the number of characters it is easier to resolve!
https://github.com/bluesky-social/social-app/pull/2528
If you could review this link I would appreciate it, because as you changed the file structure the language may break on the next version!
You can edit directly from Github in this case!
Thanks

Hey, @maisondasilva
Did you use the Crowdin AI feature? That's unfortunately the same as using ChatGPT to translate. Bluesky recently had an issue with a third party translation company also just using AI tools and calling it a day, so it's really unfair to do the same again here
I'm not sure "length of characters" is a valid excuse for having translated text that doesn't match what it should mean; the first impression that I had by reviewing the first translation and now your new PR is that you didn't proofread the translation, as you can see in the fact that you keep using "Publicação" in some random places instead of "Post" which I believe is the better usage since Threads also doesn't translate that (same with "story" on Instagram)
There's a few places where plural is being used instead of possession for "their" translations too
The translation done in this PR was entirely by hand by checking what other apps were using; I opted for "desmutar" instead of "desativar silêncio" due to the length of that but maybe "dessilenciar" is the best option between the available ones

@gildaswise An observation that the initial translation was to Portuguese (PT) after it was sent it was changed to Brazilian Portuguese (PT-BR), and as a result it was redone more than once because once I sent the file it was updated several times and with that the IDs changed and as it was the end of the year, some people revised it (few actually), but the idea was to send the translation to receive new variations and then do the necessary polishing, the initial idea being Portuguese. As there were few people to review and I did it alone, it is normal that some things may be wrong.
I believe it's a good idea for them to accept my pull and then you make a new pull and request a review so that other people can help. Since you have changed the structure of the translation, it is important that you maintain the same line quality of the translation.
https://github.com/bluesky-social/social-app/pull/2287
Your contributions are welcome, as this is a community and it is important that translations are reviewed by more than one person!
But the translation is still being polished, as several translations are being changed.
As for Discord, it is a voice over IP and textual communication application where it is not a social network.
First pull
https://github.com/bluesky-social/social-app/pull/2407
add tag for BR Portuguese
https://github.com/bluesky-social/social-app/pull/2407/commits/c9e069950d09bd4bc7a5ecca3994f67dd89c4d8a

@gildaswise The translation has just received new variables, if you wish, you can cancel your pull and I will cancel my pull as it will overwrite yours, and you send a new pull maintaining the structure of the original file and with the new variables.
I used Crowdin as an Editor not IA because I have a repository with this translation there! I even suggested that programmers use Crowdin and an integration with GIthub, so people could help there and the files would be updated automatically.

An observation that the initial translation was to Portuguese (PT) after it was sent it was changed to Brazilian Portuguese (PT-BR)

This makes things even worse and explains some changes that I had to make. I unfortunately wasn't following the PRs for the pt-BR translation and couldn't give my input on this back then.

Since you have changed the structure of the translation, it is important that you maintain the same line quality of the translation.

Not sure what you mean by this, the quality of the current translation is not to be followed since it has grammar and syntax issues. If it's just the formatting of the file, I'll fix this tomorrow.

As for Discord, it is a voice over IP and textual communication application where it is not a social network.

Discord is also a social network, and they're using the same word for muting profiles, channels and servers, it's not the same as muting audio in this case.

The translation has just received new variables, if you wish, you can cancel your pull and I will cancel my pull as it will overwrite yours, and you send a new pull maintaining the structure of the original file and with the new variables.

I'll update this PR with the file formatted properly tomorrow.

@gildaswise Just one detail you told me "The worst offender so far was this:"
Another offender:
#: src/view/com/profile/ProfileHeader.tsx:369
msgid "Unmute Account"
msgstr "Não silenciar conta"
But in your translation you used the word
msgid "Dessilenciar conta"
In short, the word "Dessilenciar" this word is not recognized by the official dictionary of the Portuguese language. However, I understand that it would mean similar "Unmute"
In conclusion, the word "desilencing" does not currently exist in the Portuguese language. And you used it in several places in the translation!
I believe that using a word that is not yet recognized is a much worse offender!
I believe that this PR he must reviewed by other speakers of the language to ensure that the translation is more correct, the intention here is to help and unfortunately you arrived with ignorance when you arrived!

@ansh

@gleydson

Excellent work here, amigo! Here are some typos I found and suggestions.

Thank you for the review! Sorry about those.

@gildaswise I don't know which editor you used but this made 10 translation variables stay on the same line, I left it in the comments above!
Example

Could you use the structure and add back the tsx and comments that you removed from the translations, so that the file maintains the same number of lines as the original file?
Example on line 4120, but I noticed that there are other lines like this!

I used the POEditor, I can fix this later today

Are you referring to the En file or the pt-BR?
Because the line #: src/view/screens/Moderation.tsx: 205, which is not a comment, I don't see in your file at the end!

I've reordered the file already, there's only two in the end of the file that don't have a file/line linked. The string at Moderation.tsx 205 changed to 206, it's on line 320.

@gildaswise In the En file there is still 205, but if you notice the translation comments are different, that's why I'm informing you! I believe that now it may be clearer what I am talking about!
Image below are from the En file

Got it, not sure where POEdit placed those. That's done now, though from what I understood, these strings are not used anymore. Their content isn't there in the source file and line.

Sounds like we're ready to merge?

@pfrazee I'm finishing up a last review through a friend that works with translations, it'll be up soon and then it'll be ready!

@pfrazee translation has been reviewed and should be ready to go!

Excellent! Thank you so much everybody!

@pfrazee Updated with 1.66 strings


Using intersection type for inheritance doesn't refine nullability.

Let's say I have a base type:
type A = {
foo?: number,
bar: number,
};
I'd like to inherit from this type to extend it and refine the types.  With TypeScript I could extend the type and refine the foo member to be required.  Flow doesn't offer extending, but my understanding is that intersection types are supposed to be used for this pattern.  For example, to add the baz member and refine the foo member:
type B = A & {
foo: number,
baz: number,
};
Based on the definition of union types, this doesn't work because nullable and non-nullable foo aren't compatible.  This makes sense.  However, given that, is there a supported mechanism to "extend" types and refine members to be required in Flow?

See: https://github.com/facebook/flow/issues/1326
Intersection only work properly when there are no properties with the same name on both branches


Replace Travis with GitHub actions

Codecov Report

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

@@            Coverage Diff             @@
##             master       #32   +/-   ##
==========================================
  Coverage          ?   100.00%
==========================================
  Files             ?         1
  Lines             ?        20
  Branches          ?         6
==========================================
  Hits              ?        20
  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 2200802...f102224. Read the comment docs.


Add support for OMPT

Is your feature request related to a problem? Please describe.
The lomp runtime does not support the OMPT performance tool interface.
Describe the solution you'd like
The OMPT interface should be supported.
Describe alternatives you've considered
Ignore this for now, since there are other missing features which are higher priority :-) which would make the runtime more usable.

Tag as enhacnement.


Move Lists examples from Typography to Components

As Software Developer
I want to have a list examples in Components section rather than in Typography
So that I can easily find the examples of Lists
Description
Currently all the examples of the list we have under Foundations => Typography.
Users would like to have all the examples of Lists moved to the Components section.
We need to add the following examples of the Lists:

Bulleted list
Numbered list
Bare list
Dashed list
Prefixed list
Suffixed list
Inline list
Lists with icons
List with icon prefix
List with icon suffix
Inline list with social media icon prefix

All above Lists need to be removed from Typography section.
Acceptance Criteria

User can find the link to Lists in Component tab
User can select the Lists Component by clicking on it
User can see different examples of the Lists
User can use any example
User no longer can find Lists examples in Typography

Visualisation/Input from UCD
Current location of the Lists examples Typography => Lists
Expected location of the Lists examples Components
Linked User stories/epics
#3158
Technical details (optional)
MVP (optional)

Having spoken to Joe, the view is that this is a style over component consideration. There isn't a reported reason, based on user need, to move lists out of the Foundations section; the suggestion came out of a Tech Session.
We now have the ticket to add the nunjucks macro to components in the Foundations section of the Design System.
Therefore closing this ticket. If this becomes a user need in future, it can be re-assessed at that stage.


Fix error panels being focusable and tabbable

What is the context of this PR?
DAC issue: make error summary panels be focusable but not tabbable
How to review
Check that error summary panels are focused on page load but not tabbable

 Focus Order (A)

 Focus Order (A)


Remove deprecated option

2.0.0 is a good tyming for removing deprecated options.

Released in 2.0.0.


category in conversation class and ThreadById

What and why?
How to test?
Trello

/deploy manna

/deploy manna

/deploy manna

/deploy manna

/deploy manna


[CLARITY] ucode

Maybe either define what "ucode" means, or take it out? The term is not defined elsewhere in the source base.
https://github.com/black-parrot/pre-alpha-release/blob/3e97c60fe6b7129871d98436f8cfb147c8695dc0/bp_be/src/include/bp_be_ucode_defines.vh#L1

Is there a better name for pipeline control signals than microcode?

bp_be_ctl_defines ?
microcode usually means that you have a sequencer (i.e. like the CCE), so at least in my frame of reference this is not really microcode

Fixed in latest dev


Enhancement: Add Makefile with cs and test targets

This PR

[x] adds a Makefile with cs and test targets
[x] updates CONTRIBUTING.md
[x] updates README.md

:information_desk_person: Since we're lazy, both targets depend on a composer target, which validates composer.json and composer.lock, as well as installs dependencies.

@localheinz Since I'm not so much into makefile and all what is the big advantage of this over what I did with the composer script when I just need to type
$ composer test

on the root directory of the package ?

@nyamsprod
Ha, cool, wasn't aware it was in there!

I've documented it in the README.md to be more obvious :+1:

:+1: Great job, @nyamsprod!


License

I couldn't find any license information for this library in the repository.
What is the license for this code?

Thanks for the quick update!
For info, I'm using your library for Logswan, and it works really well for this use case. Just updated the dependency to add the LICENSE file.


--lint / --check mode

This is a great tool, I'm really glad that I've found it! 🙌
As a maintainer of a monorepo, I would like to use sort-package-json in PR pipelines to prevent unsorted package.json files from landing the master branch. Basically I'd like the tool to become a part of the linting task alongside eslint,  tsc and prettier. Would it be possible to add a new option called --lint or --check, which instead of writing the files would make sort-package-json just return a non-zero exit code if there is a diff?
I know that I can already set a pre-commit hook, but it can be skipped by a contributor. It is also possible to run sort-package-json in CI ‘normally’ and then check the git diff, but that's a bit laborious. Here's what looks to me as an decent solution (note lint:package-json):
{
  "scripts": {
    "fix": "yarn fix:package-json && yarn fix:prettier",
    "fix:package-json": "sort-package-json package.json packages/*/package.json",
    "fix:prettier": "prettier --write \"**/*.*\"",
    "lint": "yarn lint:package-json && yarn lint:prettier && lint:tsc",
    "lint:package-json": "sort-package-json --check package.json packages/*/package.json",
    "lint:prettier": "prettier --check \"**/*.*\"",
    "lint:tsc": "yarn workspaces run lint:tsc",
  }
}

See Prettier's --check as an inspiration.

If you are up for it, you can just use the API.
It only overwrites files if you run it on the CLI.
From reading the code, you can pass either a string or object to sortPackageJson() and it will return back the same type as you gave it. On the CLI, the code depends on string comparison to check if sorting was done.
If you pass sortPackageJson() an object, it will return a new object, so you can't really use that to check if sorting was done, since they are different references.
First thing, a note. You may be wondering how an object can have sorted keys. Isn't order not guaranteed in a javascript object? Shouldn't the code be using Map()? If you look sort-object-keys, a package that this depends on, you can see that it just returns a new object with keys inserted in a sorted order. Well in ES6, objects keys are actually sorted by insertion order. Most major browsers already sorted before ES6. Relevant spec. In general, I wouldn't rely on it everywhere.
So if you get back an object, you would have to write your own logic to check if sorting was done.
Or you can just do the lazy way, and rely on the sorted keys thing I mentioned above:
JSON.stringify(sortedObj) === JSON.stringify(originalObj)

Or you can just pass in a string into sortPackageJson() instead of an object.

I think I found a perfect solution by using prettier-plugin-packagejson, which works on top of sort-package-json.
yarn add --dev prettier prettier-plugin-packagejson

yarn prettier --check package.json
yarn prettier --write package.json

Of course, with Prettier's API it is possible to do much more than just checking or formatting package.json. All my source files are always handled by it. sort-package-json was a great discovery for me and I'm glad I could leverage it without making my package.json more complicated! 🎉

I was going to open a feature request, but found this issue, I think we should support this, we already has cli, why relay on prettier.
solutions:

default to lint, requires flag to fix, --fix(eslint use this flag)  or --write(prettier use this flag)

sort-package-json package.json

sort-package-json package.json --fix

default to fix, requires flag to check --check(prettier use this flag) or --lint(@kachkaev proposed)

sort-package-json package.json --check

sort-package-json package.json

I can accept any these solutions, also I can help implement.
@keithamus

I'd be happy to add a --check option 👍
I'd like to avoid serious breaking changes if we can. Making --fix opt in is a substantial breaking change.

:tada: This issue has been resolved in version 1.30.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Would this work for preventing navigation if a form has unsaved changes?

Hi! Your package like a great solution to a bothersome problem in the new App router.
I'm specifically trying to intercept events before navigation to prevent users from navigating away from a form if the user has unsaved changes.
Would this work?

Wondering this as well.

Hi @simon-marcus (cc: @spacecat)
Thank you for your interest in use-router-with-events. Yes, you can absolutely use it to intercept navigation events and prevent users from leaving a page with unsaved changes. This functionality can help you show a confirmation modal or prompt the user before they navigate away, which is especially useful in cases like unsaved forms.
Here’s an example of how to handle this:
"use client";
import useRouterWithEvents from "use-router-with-events";
import { useState, useEffect } from "react";

const ContactPage = () => {
  const [isFormDirty, setIsFormDirty] = useState(false);
  const router = useRouterWithEvents();

  useEffect(() => {
    // Define the function to intercept the route start event
    const handleRouteStart = () => {
      if (isFormDirty) {
        return confirm("You have unsaved changes. Are you sure you want to leave?");
      }
      return true;
    };

    // Register the event handler when the component mounts
    router.events.onRouteStart = handleRouteStart;

    // Cleanup the event handler when the component unmounts
    return () => {
      router.events.onRouteStart = null;
    };
  }, [isFormDirty, router.events]); // Dependencies to update the listener when form state changes

  const handleInputChange = () => {
    setIsFormDirty(true); // Mark form as dirty when input changes
  };

  const handleSave = () => {
    // Logic to save form data
    setIsFormDirty(false); // Reset dirty state after saving
    alert("Form saved!");
  };

  const handleClick = () => {
    // Navigate to the home page
    router.push("/");
  };

  return (

Contact Form

      <form>

          Name:
          <input type="text" onChange={handleInputChange} />

          Email:
          <input type="email" onChange={handleInputChange} />

      </form>
      <button onClick={handleSave}>Save</button>
      <button onClick={handleClick}>Return to Home</button>

  );
};

export default ContactPage;

Explanation

Form State Tracking: The isFormDirty state tracks whether the form has unsaved changes.
Route Interception: router.events.onRouteStart checks if the form has unsaved changes and prompts the user to confirm before leaving.
Saving Changes: Once the form is saved, isFormDirty is reset, allowing navigation without prompts.

This should allow you to intercept navigation events and prompt the user if they attempt to leave with unsaved changes.
Let us know if you have any questions or need further customization!
Best regards:
Nour

Thanks for the info.
Just wanted to add that in my case I have links in my layouts and this means regular Link components will not work unless you wrap them in your own component with additional functionality.


Some images cannot be fetched from any source and it crashes the bot

I think maybe if we fix the scryfall http version not supported issue it would work? Not clear.
Trying to get first choice image for 1996 World Champion, Proposal
Storing http://magic.bluebones.net/proxies/?c=1996+world+champion|proposal in /Users/bakert/.Penny-Dreadful-Discord-Bot/-----world-champion_proposal.jpg
Trying to get second choice image for 1996 World Champion, Proposal
Storing http://magic.bluebones.net/proxies/index2.php?c=1996+world+champion|proposal in /Users/bakert/.Penny-Dreadful-Discord-Bot/-----world-champion_proposal.jpg
Error: HTTP Error 404: Not Found
Storing http://api.scryfall.com/cards/named?exact=1996 World Champion&format=image in /Users/bakert/.Penny-Dreadful-Discord-Bot/-----world-champion_proposal.jpg
Error: HTTP Error 505: HTTP Version Not Supported
Trying to get MCI image for -----world-champion_proposal
Storing http://magiccards.info/scans/en/pcel/1.jpg in /Users/bakert/.Penny-Dreadful-Discord-Bot/-----world-champion_proposal.jpg
Error: HTTP Error 404: Not Found
Trying to get fallback image for -----world-champion_proposal
Storing None in /Users/bakert/.Penny-Dreadful-Discord-Bot/-----world-champion_proposal.jpg

Ah, the cards that aren't on Gatherer...

scryfall actually has (some of? all of?) them but I get Error: HTTP Error 505: HTTP Version Not Supported using http OR https. I also get it when using curl. But not when using a browser. I'll try setting User-Agent.

Ok, it's not user-agent and explicitly using http1.0 or http1.1 with curl fails with the same message.

Ok, this curl command works from the commandline:
curl -L -v 'https://api.scryfall.com/cards/named?exact=1996%20World%20Champion&format=image'
Now to reproduce in the code. (The two crucial things were (1) replacing spaces with %20 and (2) -L to follow the resulting 302.

OK we were not calling fetcher_internal.escape on the scryfall
It's true that scryfall fallback will only produce a single image when we want a group so for the full fix we should add compositing on the bot side. But this fixes the crash.
30c0ade.


Add threadpool to Python global optimization

Hi, I am trying to make the global optimization work with a thread pool in Python. I thought it was going to be easy.
However, I think I am hitting one of the limitations of Python and the GIL. With the proposed modification, I can't make concurrent calls to the function. Is there a way around this, or it's just the wait it is, and that's why dlib didn't have the bindings for those overloads in the first place?
Note: adding a lock makes it work (but it defeats the purpose, haha):
std::mutex mutex;
auto func = [&](const matrix<double,0,1>& x)
{
    std::lock_guard<std::mutex> lock(mutex);
    return call_func(f, x);
};

Here's the Python code I am trying to run:
from dlib import find_min_global
from math import sin, cos, exp, sqrt, pi
from time import sleep

def holder_table(x0, x1):
    sleep(0.1)
    return -abs(sin(x0) * cos(x1) * exp(abs(1 - sqrt(x0 * x0 + x1 * x1) / pi)))

x, y = find_min_global(holder_table, [-10, -10], [10, 10], 80, num_threads=4)

print(x, y)

Thanks in advance.

That's what I thought... thank you so much for confirming it. :)


Hotspot and exit nodes

Based on the splendid work by @fleskesvor on #124 and it's predecessor, I cooked this up.
I believe it ticks every box

[X] Areas that react when the player walks on them
[X] Exit to another room (Also TextureRect support)
[X] Double-click for quick move to enable a modern feel
[X] Showcase the scenarios in the test room
[X] exit.gd is so simple that it's a good foundation if anyone comes up with a new use case
[X] Documentation

It also enforces the player character to be a  KinematicBody2D, which was discussed on IRC to be an acceptable change, because certain external documentation is for 2.1 anyway.
Thoughts?
PS.
In the spirit of full disclosure, my https://github.com/mjtorn/escoria/tree/devel does not really work with this, but this may be due to overlapping Control (in this case TextureRect) nodes and these should be deprecated as soon as #121 is closed. When it is closed, I propose we deprecate support for non-Area2D hotspots and exits because only one good way to do things is better than implicitly tons of ways.

This looks very good. :smile: The only thing I'm not sure about, which I'm not able to test now, is whether the new hotspots make sense within the demo scene. Maybe the hotspots offer enough context as it is or maybe they should have some simple textures. What do you think?

@fleskesvor pretty much nothing makes sense in the demo scene :D So my opinion is that it shouldn't block the merge, because there's a lot to polish and do there, which should all be post-jam anyway.
The relevant parts are clearly visible in the editor and they have tooltips that work even with tighter settings for translation, so maybe that's enough for now.

@fleskesvor pretty much nothing makes sense in the demo scene :D

Haha, good point. :smile:

Merged. Thanks for your contribution !


Left shift of the control's position on the fly

Godot version:
3.0.5
OS/device including version:
Linux Mint 19 x64
Issue description:
Label goes beyond the right border
Original label:

Changed at runtime:

Layout: Bottom Right.
How to shift Label's position to the left automatically?
Thanks.

You can align a label to the right by setting the Align property to Right. (The same can be achieved with RichTextLabel by enclosing the text in [right]…[/right.)

@Calinou well, as I understand, I should use fixed width of label and also set Align to Right?


Remove null relationships in loadMorph before grouped by class name.

Relationship model may be null when using with() to eager load them, which will cause error in loadMorph() because of the usage of get_class().
So, remove null relationships before group them by class name seems reasonable.

could you please provide a more thorough description and use case of what this fixes?
also, probably needs to go to 5.7

@tillkruss Thanks for your review. Use filter() without a callback is just much more concise.

@browner12 Here is a example:
$notifications = Auth::user()->notifications()
            ->with('subject')
            ->get()
            ->loadMorph('subject', [
                EventInvite::class => 'event',
                GroupPhotoUpload::class => 'group',
                GroupPost::class => 'group',
                PostLike::class => 'post',
            ]);

In this case, subject relationship of notifications are eager-loaded. But some notifications may have no subject relationship and subject model will be null in this case, which will cause error in loadMorph because it passes null to get_class().


When your are employee with other permissions you see not the order mollie info when view order in backoffice

Expected behavior
Other rights as employee account in backoffice can also see MOLLIE information.
Actual behavior
When your are employee with other permissions you see not the order mollie info when view order in backoffice

Hello there, @tajriba!
We have received your request, we will investigate and come back to you with an update!
Best Regards,
Invertus Support team.

Hi! Thank you, it works!

Hey there, @tajriba!
Glad to hear that it is working fine!
We will mark this issue as resolved, but if you have any additional questions, don't hesitate to contact us!
Best Regards,
Invertus Support Team.


HPA configuration not included in base

Hi!
#18 did not update k8s/base/kustomization.yml to include k8s/base/5_hpa.yaml in the list of resources, and as a result the HPA configuration is not included by default; is that intentional or an oversight?
Many thanks,
Ole

Thanks for finding and reporting this!  It is definitely an oversight.


Revisit the error message content

Describe the issue:

The overall section is connection and in the error message it has abbreviation IDP which doesn't make sense.
How to reproduce:
Try to create a custom connector with the name of existing one.
Expected behavior:

Environment information (Please complete the following information; remove  any unnecessary fields) :

Product Version: [e.g., IS 5.10.0, IS 5.9.0]
OS: [e.g., Windows, Linux, Mac]
Database: [e.g., MySQL, H2]
Userstore: [e.g., LDAP, JDBC]

Optional Fields
Related issues:

Suggested labels:

This error description is being taken from the BE.

Tested in the latest distribution.
While the original issue is no longer there, still the error message is wrong. I cannot see any error response sent from the BE as well. Hence this is a FE issue.

Verified in https://wso2.org/jenkins/job/products/job/product-is/4983/


Review excluded tests for long running times

Problem
We currently are excluding poseidon and sha2_byte in our tests because they were taking a long time to run.
The poseidon rationale can be seen here: https://github.com/noir-lang/noir/pull/768#issuecomment-1423108006
This is non optimal because these tests are never ran.
Proposed solution
Review the CI times of these functions when no longer excluded. The poseidon test seems to add an extra 30 minutes to CI times which is not feasible, though as noted in the issue, it was contigent on a certain PR, so this seems to be a compiler problem.
The sha2_byte issue has a lot more unknowns and will require further investigation.
Alternatives considered
No response
Additional context
No response
Submission Checklist

[X] Once I hit submit, I will assign this issue to the Project Board with the appropriate tags.

Outside of these functions living in the standard library is there any reason to include them in the integration tests for the noir language themselves? One benefit of #1258 is that we can offload these tests into external repositories to run separately.

Outside of these functions living in the standard library is there any reason to include them in the integration tests for the noir language itself? One benefit of #1258 is that we can offload these tests into external repositories to run separately.
Granted we had a bug which surfaced in the poseidon integration test however we have multiple versions of more minimal circuits which would work as regression tests.

Good point -- for Poseidon I don't think there is any reason if we go with a thin stdlib, if we remove black box functions too, we also can remove the sha2 tests

We should put in some time to figure out why they are so long running though -- as adoption increases we want folks to run CI on large/complicated programs

@guipublic can you check if we are exlcuding these tests in the case of the new ssa and whether they are still long running?

Closing this because we no longer exclude any tests


what do this <|endoftext|> use for？

I found fine-tune data which ouputs all have <|endoftext|> in the end。Is it use for end flag？

I face the same question. Any smart guys knows the reason?


Wireframes for the first alerting workflow

Develop the UX perspective on how a user can find an area and obtain statistics on DIST alerts for that area.

Hello, I tried to solve the issue.
This is what I did:
Implement location search functionality and display GLAD alerts statistics for the selected area in the frontend.
You can review changes in this commit: https://github.com/jjyutm4532/wri-project-zeno-25/commit/5599ae66c9a85f79d15650d13c561ae633deb705.

[!CAUTION]
Disclaimer: The concept of solution was created by AI and you should never copy paste this code before you check the correctness of generated code. Solution might not be complete, you should use this code as an inspiration only.

If you no longer want Latta AI to attempt solving issues on your repository, you can block this account.

The wireframes are available as a clickable prototype here: https://www.figma.com/proto/N20cpSWt9kWZWILQOcsdIT/WRI_LCL_ProjectZeno?page-id=8%3A3&node-id=53-385&node-type=frame&viewport=-2225%2C-2828%2C0.46&t=xzUHx92Qk2Zx6Gu4-1&scaling=min-zoom&content-scaling=fixed&starting-point-node-id=53%3A385&show-proto-sidebar=1
@yellowcap @01painadam I'll share these in our session tomorrow, and welcome any comments or feedback directly in the figma prior to our discussion or after.


DTMF Support

Congratulations on this amazing demo! It's truly inspiring. I have been wondering on how this could be improved and thought that in case that the Google Speech Recognition does not work properly because I have a speech impediment or it's just too noisy, it would be useful to use the keyboard to state how many Asterisk replicas I want.
What would be the best approach to handle this? Maybe some logic should be pushed to Asterisk in order to determine when it should send the audio to the audiosocket or when to wait for DTMF. Looking forward to know your opinion on this.

The original app is still in the repo, and it uses DTMF instead of AudioSocket.  You can find it here.
audiosocket is really something of a proof of concept right now.  We built it for a specific purpose and customer, with an eye toward the more general need to getting streaming audio into and out of Asterisk.  I am working on a Görtzel implementation in Go for another project, which is the algorithm Asterisk (and most telephony systems) uses for DTMF detection, but ultimately, I want to implement audiosocket in a channel interface or similar, which will allow us to use it fairly seamlessly with ARI, among other things (like getting DTMF detection).

Amazing! If there is any way that I can contribute to that please let me
know.
On Mon, 12 Nov 2018 at 19:48, Seán C. McCord<EMAIL_ADDRESS>wrote:

The original app is still in the repo, and it uses DTMF instead of
AudioSocket. You can find it here
https://github.com/CyCoreSystems/asterisk-k8s-demo/tree/master/live-demo/app
.
audiosocket is really something of a proof of concept right now. We built
it for a specific purpose and customer, with an eye toward the more general
need to getting streaming audio into and out of Asterisk. I am working on a
Görtzel https://en.wikipedia.org/wiki/Goertzel_algorithm implementation
in Go for another project, which is the algorithm Asterisk (and most
telephony systems) uses for DTMF detection, but ultimately, I want to
implement audiosocket in a channel interface or similar, which will allow
us to use it fairly seamlessly with ARI, among other things (like getting
DTMF detection).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/CyCoreSystems/asterisk-k8s-demo/issues/4#issuecomment-437988958,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AELLA5egQPsTY9PU6ExzfvT6vfhBgmiyks5uucJpgaJpZM4YZQPX
.

Thanks; I'll update this issue when I have more information on either.

I added DTMF signalling. I just started using GITHUB, please come and see it. By Google Translate. :D
https://github.com/rainbow-cnay/audiosocket

Thanks @rainbow-cnay
Would you mind submitting it as a Pull Request?


Add backtrace definitions and support for statvfs

Replaces https://github.com/rust-lang/libc/pull/3359
This allows successful build and use of file deletion, a.k.a. move to trash
Tested with a source build of simp with the trash feature enabled.
Without this commit, simp fails to build on NetBSD when the trash feature is enabled.
Also, I've added the new symbols to semver and made sure these functions are available on a minimal NetBSD environment.

@JohnTitor Single commit now. No other changes were done.

Thank you so much! @bors r+

:pushpin: Commit db2eabdfd6037fe39bd3816a74ef0669dcfc91ce has been approved by JohnTitor
It is now in the queue for this repository.

:hourglass: Testing commit db2eabdfd6037fe39bd3816a74ef0669dcfc91ce with merge b1e465830bf29baa1922339eb9b552e471bab69a...

Thank you so much!

You're welcome. On my TODO list, learn how to squash non-consequent commits (if it's even possible?).
Thanks

:broken_heart: Test failed - checks-actions

@JohnTitor Hmm ... this failure seems unrelated.

Nah, it's different. The cause is that rustc removed an apple target and the fix is here: https://github.com/rust-lang/libc/pull/3362
I'll retry once the above is merged :)

Thanks!

Hmm ... is the CI being run on NetBSD?
If so, there's no /usr/bin/bash. This is third party package so, it's /usr/pkg/bin/bash
There's /usr/bin/sh, though.
Just for laughs
Or, you could be weird (as me 😄) and use /usr/bin/pkg/elvish as login/default shell.

We have to retry by calling bors:
@bors retry

:hourglass: Testing commit db2eabdfd6037fe39bd3816a74ef0669dcfc91ce with merge 087aa3bb8e8da4943be52a771d2bae6a21cd0505...

:broken_heart: Test failed - checks-actions

😴 still?

@JohnTitor I had a closer look at this locally but, I'm getting only a warning not an error using Rust-1.72
~> cargo build --release
    Updating crates.io index
   Compiling libc v0.2.148 (/home/pin/Downloads/libc)
warning: function `statvfs` is never used
    --> src/unix/bsd/netbsdlike/netbsd/mod.rs:3188:20
     |
3188 |             pub fn statvfs(path: *const ::c_char, buf: *mut statvfs) -> ::c_int;
     |                    ^^^^^^^
     |
     = note: `#[warn(dead_code)]` on by default

warning: function `fstatvfs` is never used
    --> src/unix/bsd/netbsdlike/netbsd/mod.rs:3189:20
     |
3189 |             pub fn fstatvfs(fd: ::c_int, buf: *mut statvfs) -> ::c_int;
     |                    ^^^^^^^^

warning: `libc` (lib) generated 2 warnings
    Finished release [optimized] target(s) in 7.51s

What am I missing? Thanks!

@JohnTitor Can you please retry?
~> cargo build --release
    Updating crates.io index
   Compiling libc v0.2.148 (/home/pin/Downloads/libc)
    Finished release [optimized] target(s) in 5.88s

@bors retry

@JohnTitor So no, I can not call bors myself.

I see I need one last correction. Closing this once more and will open a new one.
Might take a day or two, want to run tests on it.


oath-toolkit: remove update script

nix-update supports GNU Savannah
see https://github.com/Mic92/nix-update/releases/tag/0.5.0
Description of changes

Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] 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/)
22.11 Release Notes (or backporting 22.05 Release notes)

[x] (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
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

But does nixpkgs-update? :thinking:

Good question. I thought nixpkgs-update uses nix-update under the hood, but I cannot verify that, because I cannot get it to run myself.
CallStack (from HasCallStack):
  error, called at libraries/base/Data/Maybe.hs:148:21 in base:Data.Maybe
  fromJust, called at src/Utils.hs:306:12 in nixpkgs-update-0.4.0-1LZpx5N2l6q8e22qNSkACg:Utils```

@r-ryantm runs nixpkgs-update (haskell), not nix-update (python).

I'm torn on if a message like use nix-update or something like that would be more clear. The diff is so small though that it probably doesn't matter, so I guess I'm fine with either.
What do you think, am I looking too much into it? :-)

Remove is clearly the wrong word now. Replace would be better.

@mweinelt What do you think of the one just pushed, or would replace update script with nix-update be better? I think either work, not sure if any particular one is better, though.

Ideally it wouldn't say Remove update script, because that could be interpreted as removing passthru.updateScript.

Yeah, that was also my concern, but I didn't want to be too nitpicky.