Y-Axis stepSize changes on dynamic input

Desired behavior:
Y-axis shows 11 tick labels, showing initial weight at index 5, and ticks above showing initial weight - weight span in 5 even steps, and ticks above showing initial weight + weight span in 5 even steps.  Step size should remain fixed, tick labels should change, and the chart should re-render data.
Observed behavior:
For Weight spans less than 151 lbs tick labels 'bunch up' and will overlap, step size does not remain fixed, more tick labels may be added to y-axis, total tick count mat exceed 11 ticks.
Weight spans above 151 lbs behave as desired.
video of observed behavior
Code of function that applies ticks to y-axis
`private setyAxisLabelsWeightChart(): void {
        this.getLocalStorageClinicianSettings();
        let weightObj = this.PatientProfileService.getPatient(this.hrsid).startingWeight;
        let firstWeight = parseInt(weightObj.weightFirst);
        let span = this.weightSpan === undefined ? 50 : this.weightSpan;
        let step = span / 5;
        let min = firstWeight - span;
        let max = firstWeight + span;
        this.currentCanvas.chart['options'].layout.padding.left = 25;
        this.currentCanvas.chart['options'].scales.yAxes = [{
            ticks: {
                autoSkip: false,
                beginAtZero: true,
                stepSize: step,
                min: min,
                max: max,
                callback: function(value, index, values) {
                    if (index === 5 ) {
                        return [[firstWeight],
                            [weightObj.weightFirstTime.split(' ')[0]],
                            ['1st Reading']];
                    } else {
                        return (step * (5 - index) + firstWeight).toFixed(2);
                    }
                }
            },
            gridlines: {
                lineWidth: [1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1]
            }
        }];
        this.currentCanvas.chart.update();
    }
`

Code of initial chart settings upon chart creation
` this.chart = new ChartJS.Chart(canvasElement.getContext('2d'), {
            type: 'line',
            options: {
                animation: {
                    duration: 10,
                    easing: 'linear'
                },
                maintainAspectRatio: false,
                responsive: true,
                scales: {
                    xAxes: [{
                        ticks: {
                            source: 'labels',
                            autoSkip: false,
                            stepSize: 1,
                            fontFamily: 'Lato',
                            fontSize: 10,
                            fontColor: '#000000',
                            fontStyle: 'normal',
                            maxRotation: 0,
                            callback: (value, index, values) => ticksCallback(value, index, values)
                        }
                    }],
                    gridLines: {
                        display: true,
                        drawBorder: true,
                    },

                },
                tooltips: {
                    mode: 'index'
                },
            },
            data: {
                labels: labels,
                datasets: datasets,
            },
        });`

Any help is appreciated!

@ScottWaring this is kind of a complicated bug report. In order to simplify the issue for us, is it possible to say that there's something wrong without the dynamic behavior? I think you're saying that the stepSize parameter you pass is ignored in some cases? If that's true, could you create an online static example (e.g. https://codepen.io/pen?template=JXVYzq) for us to use that has static data less than 151 lbs for investigation?

@benmccann Thanks for the response. The video illustrates the behavior very well, probably better than I can explain it.
I dont think the stepSize is being ignored per se, it acts like the chart is rendering partially out of view of the canvas and the y-axis ticks try to compensate and end of on top of each other.
I will try to replicate the problem in codepen.

Update code pen
@benmccann hopefully this will give some insight into the behavior. Thanks!

@ScottWaring Here's a pen that's equivalent to pressing "down" one time in your pen: https://codepen.io/anon/pen/gyYvdX
A big part of the problem is that your callback function changes the numbers, which seems buggy to me since the callback is only supposed to do formatting. The first two ticks are 1 and 1.8, but the callback function makes them show up as -0.8 and 1. If you delete the callback function then things become a lot more reasonable
It looks like you essentially want to zoom on the y-axis. Have you seen the zoom plugin?

@benmccann  The zoom plug in doesn't work for our desired behavior.
Yes the callback is only for handling formatting, there should only be 11 ticks, and the callback will label those ticks, and the labels will change as the +/- range changes.
It seems the chart is not respecting the min and max settings, how do I remove any default behavior that is trying to override those?

I'm not sure what you're trying to do in the callback, but it seems broken to me. If you just want to show two decimal places can you change it to:
            callback: function(value, index, values) {
                    return value.toFixed(2);
            }

@benmccann The call back is just for labeling the ticks on the y-axis, if you look at the formatting in the callback in my initial code it formats it to two decimals places.
The tick at index 5 will be labeled as an initial weight reading. The ticks at indices 0-4 are labeled for increments of weight above the initial reading, and the ticks at indices from 6-10 are for increments of weight below the initial reading. The tick at 0 is the max, and the tick at index 10 is the min. But from the behavior I have observed, the chart will add ticks above index 10.
How do I stop the chart from adding any ticks beyond index 10?

@benmccann  Our max is value + span, and our min is value - span. The issue occurs when the span is not 1, 5, or 159+, the behavior is that  chartJS is inserting a 0 as index 6 of the y-axis, so the amount of steps becomes 11 instead of 10.
video of behavior
How do I override/prevent chartJS from adding the unnecessary value?

@ScottWaring this report is still rather complicated to understand and debug. Can you provide a codepen that demonstrates the issue without any "UP" and "Down" buttons? If pressing them leads to some bad state, then you should be able to make a codepen that just reproduces that state. The simpler it is, the more likely someone will be able to look at it and help you. Our time is so constrained and we don't have bandwidth to address all issues. It's more impactful for us to focus on the issues where we can quickly and clearly understand the problem

It's hard to tell exactly what's happening, because the video is a bit hard to follow as the tick callback is potentially rewriting the values.
Fiddle on v3.0.0-beta.4 appears to work just fine https://jsfiddle.net/5mrfcp34/


Add endpoint implementation of Instrument

Hi !
As you've done a great job with the start of this API, I contributed for the part I needed.
If there is anything to change, just ask ;)

Thanks so much for your contribution! Please make the minor changes above and I'll be happy to merge it in 👍

Done ! It should be as you expected it.

Awesome thanks for your contribution!


i18n: Added missing state handling for RTL languages

PR Checklist

Please check all that apply to this PR using "x":

[x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
[x] I have checked that this PR does not introduce a breaking change
[ ] This PR introduces breaking changes and I have provided a detailed explanation below

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting)
[ ] Refactoring (no functional changes)
[ ] Documentation changes
[ ] Other - Please describe:

Fixes
Issue Number: #4430
What is the current behavior?

RTL languages are not rendered correctly in RTL mode but in LTR.
Arabic language is not offered in language switcher.

What is the new behavior?

Arabic language available in language switcher.
Rendering of RTL languages should be fixed and will follow the choice of the current language for Arabic, Urdu and Farsi.

Other information
Some translation updates in Transifex needed for Arabic. Will be done asap.

Hey @marko-lorentz , thanks so much for the PR. Please give us a few days to take a look and review.
Can we show you some appreciation?

Hi @tzarebczan,
The work on issue #4430 (as well as most of the Arabic translations in Transifex) was mainly done by my working student @sanabhass as an exercise. I will ask her so send her data to the given email address for supporters. I think she will be happy when her work is honoured.
(Seems that we didn't run lint properly. I will try to have a look at this later.)

This seems to work great - it looks like we have some issues with our translation service files such as
"Log in to %SITE_NAME% to earn rewards": "سجّل الدخول إلى٪ SITE_NAME٪ لتربح المكافآت",
That break in some places.
We'll take a look at this and see what can be done in the next few days.

Did we break it in Transifex?

I don't think it's your fault at all. Just have to look into it.

After some string inspection:
My student and me will need to fix some translations in Transifex because one of the translators not only included SPACE in the translation tokens but also used the Arabic percent sign ٪ instead of the latin one % so the pattern matching will not work properly.

Ok, just tested, looks great. Sorry how time flies. One rebase and poke me?

Included latest changes from lbryio:master. Anything else I can do?


 Yes/No

This was an unlucky change in the webpack-config-files. Seems like using the same plugins twice fails silently (doesn't do what you think)

New insiders are on the way 🏗

⚡  That was fast. It works now! Thanks.


[SUGGESTION] Add an "Export as script / patch" option to the Modifications window

I was thinking of this for a while, and it would be a pretty cool feature to easily and automatically patch a jar file that, for example, got a minor update with your previous patches.

https://github.com/Col-E/Recaf/commit/817aa24da25565a610479cdcda038a3210bd602b - A more proper patch-like system has been added to the 4.X API - UI pending


DOCS Secure Coding dead-link

Related links in secure coding links to http://www.silverstripe.org/security-releases/ which is a 404.

Same link on this page: https://docs.silverstripe.org/en/3.2/contributing/release_process/#security-releases

@dhensby are you able to check this works now? Just updated the .htaccess redirects on http://silverstripe.org

Yep, looks to be working, thanks


Clarify documentation on implicit grant (not required for SSO)

Navigate to Authentication.
If an app has not been granted IT admin consent, users have to provide consent the first time they use an app.
To enter a redirect URI:
Select Add a platform.
Select web.
Enter the redirect URI for your app. This is the page where a successful implicit grant flow redirects the user. This is the same fully qualified domain name that you entered in step 5 followed by the API route where an authentication response is sent. If you are following any of the Teams samples, this is https://subdomain.example.com/auth-end.
Enable implicit grant by checking the following boxes: ✔ ID Token ✔ Access Token

This section in the documentation could be clearer-- can be be read to mean that implicit grant is required for tab SSO, but it is not. We should rephrase this.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 52221dd3-95ec-96b9-1da8-9478527c2602
Version Independent ID: 32e9c2d8-733d-0865-2ea3-727d8684a10d
Content: Single sign-on support for tabs - Teams
Content Source: msteams-platform/tabs/how-to/authentication/auth-aad-sso.md
Product: msteams
GitHub Login: @surbhigupta
Microsoft Alias: lajanuar

Thanks for the bringing out. Assigning to documentation team.

Issue will get closed once PR is resolved.


Change api.telldus.com to pa-api.telldus.com

Hi, I had to do this fix to be able to connect to Telldus using Home Assistant. It was suggested by @GFBsoul in this thread: https://github.com/home-assistant/home-assistant/issues/21689#issuecomment-549121535
The same change was recommended by Telldus themselves at 2018-02-28: As some of you have noticed, there is a difference between servers regarding what SSL versions they accept. We are only using api.telldus.com for TelldusCenter and that URL is now considered legacy. If you are connecting to our API using SSL, you should use pa-api.telldus.com instead.
https://pa-api.telldus.com/
Cheers

Thanks!

@molobrakos Will you push a new package to pypi?


HDDS-9192. Update Ratis to 3.0.0.

What changes were proposed in this pull request?
This is to update Ratis to the latest 3.0.0 version, although it is currently unreleased. We should start testing it with the 3.0.0 snapshots.
What is the link to the Apache JIRA
HDDS-9192
How was this patch tested?
Using existing tests.

Thanks @szetszwo work on this, there are some unit test failures.
By looking at the CI it looks like the problem is with the Failed to FORMAT directories

@guohao-rosicky , you are right.  The failures are due to RATIS-1677.  I believe that RATIS-1871 has reduced the number of failures.  Let me check the failures tests.

@guohao-rosicky , it seems the Failed to FORMAT problem is fixed.  However, there are still quite a few failures.  See if you have time to help fixing them.  Thank you in advance.

hi, @szetszwo , I'll take a look and try to fix the part.

This is to update Ratis to the latest 3.0.0 version, although it is currently unreleased

If we are just testing, would this be better done on a fork or branch until Ratis 3.0 is released? We are planning the Ozone 1.4.0 release and cannot release that with a snapshot Ratis version. It is probably safer to wait until Ratis 3.0 is officially released rather than bring master into an unreleasable state blocked on the Ratis release. cc @symious

Converting to draft. This looks like it will burn significant CI time and is better debugged on a fork until it is green.

@errose28 Thanks for the information. I will try to test this snapshot version on Ozone first.

If we are just testing, would this be better done on a fork or branch until Ratis 3.0 is released? ...

@errose28 , sure, running the test in https://github.com/szetszwo/ozone/pull/5

... It is probably safer to wait until Ratis 3.0 is officially released  ...

If we are not in a hurry, let's wait for Ratis 3.0.0 before releasing Ozone 1.4.0.  We should start releasing Ratis 3.0.0 once it can pass the Ozone test.

...  I will try to test this snapshot version on Ozone first.

@symious , thanks for helping out.  It can pass almost all the tests; see https://github.com/szetszwo/ozone/pull/5.
A few tests are failing with NullPointerException in GrpcLogAppender.resetClient.  Will fix them in https://issues.apache.org/jira/browse/RATIS-1876 .

Hi @szetszwo,  This pr(https://issues.apache.org/jira/browse/RATIS-1876) has been merged to ratis master, after updating this pr ozone, whether it will pass ci, we also need to test, whether we can HDDS-9192, create a separate branch, we are in the branch, to deal with upgrading ratis-3.0.0 need to deal with things.

Hi @szetszwo, If you find out what parts of upgrading raits-3.0.0 need to be changed, let me know to share some of the work!

@guohao-rosicky , it seems all the tests are passing except for TestOMRatisSnapshots; see https://issues.apache.org/jira/browse/HDDS-8876
Let me sync the branch with master and then run it again.

hi @szetszwo, I observe that you have modified and made compatible ratis 3.0.0, should we go ahead and open this pr.
your branch: https://github.com/szetszwo/ozone/commits/HDDS-9192c

@guohao-rosicky , let me update my branch and then open this pr.

@guohao-rosicky , updated the branch.  On a second thought, we should wait for Ratis 3.0.0 release before reopening this.

Hi @szetszwo, I saw that Ratis 3.0.0 will include RATIS-1569 patch which might introduce incompatibility between client and server with different versions.
May I know whether this is only for client and server that uses DataStream API (write pipeline v2) or will Async API (write pipeline v1) also affected?

@ivandika3 , only DataStream API (write pipeline v2) is affected.  The Async API will not be affected.  A 2.4.1 client can use Async API to communicate to a server running 3.0.0
Thanks for checking it!

@szetszwo Thanks for the clarification.

@ChenSammi please check CI in fork before marking ready for review.  No need to run the same tests for the PR if they are failing.

Hi @szetszwo , thanks for working on this. Looks like it is still in draft state. Do we know how much gap is there to make it ready?

@ChenSammi , @adoroszlai , the tests were passing some time back.  We were just waiting for the official Rats 3.0.0 release.
It seems that some tests are failing now.  Let me take a look.

@szetszwo We'd like to include this PR in the Ozone 1.4.0 release, hope to hear the good news from Ratis side soon.
cc: @ChenSammi @guohao-rosicky

@symious , sure, we should include this for Ozone 1.4.0.  Let me fix the test failures and then start rolling a Ratis 3.0.0 release.

This is the JIRA filed for the test failures: https://issues.apache.org/jira/browse/RATIS-1902

@szetszwo Thanks for the update.
Have tested locally with the changes in RATIS-1902.
org.apache.hadoop.hdds.scm.ha.TestSCMHAManagerImpl
org.apache.hadoop.hdds.upgrade.TestScmHAFinalization
org.apache.hadoop.ozone.om.TestAddRemoveOzoneManager
org.apache.hadoop.ozone.om.TestOzoneManagerHAKeyDeletion

The above 4 cases are passed, but the following one still got some issues. Could you help to confirm?
org.apache.hadoop.ozone.om.TestOMRatisSnapshots

https://github.com/szetszwo/ozone/commits/HDDS-9192c

Thanks @symious  for the test, is this the part of the code used for the test?

is this the part of the code used for the test?

@guohao-rosicky , I tested with HDDS-9192c, seems the results are the same.

@symious , thanks for checking.  Let me sync the branch and check TestOMRatisSnapshots.

TestOMRatisSnapshots was a timing sensitive test.  When we changed a (unlrelated) Ratis timeout in HDDS-9232, it failed.  HDDS-9416 fixed it by resetting the timeout.
I guess updating to Ratis to 3.0.0 also changes the timing behavior so that TestOMRatisSnapshots is failing again.

TestOMRatisSnapshots is failing in current master branch without any changes in my machine.  So it probably is not related to updating to Ratis 3.0.0.

@adoroszlai , yes, It looks like the same as HDDS-8876 -- it also timed out in my machine.

@guohao-rosicky would you like to take a look?

@adoroszlai , @smengcl , thanks a lot for reviewing this!
I will wait for another day before merging this.  See if anyone like to take a look.

@guohao-rosicky , thanks for reviewing this!


Rust shipping service

Fixes #35
Changes
ShippingService is now written in Rust -- providing a demo / reference implementation for rustaceans.
For significant contributions please make sure you have completed the following items:

[ ] Appropriate CHANGELOG.md updated for non-trivial changes
[ ] Design discussion issue #

I have some admin work for Wayfair this week that means I may not make much progress. I plan to write the docker config and OTel integrations now that this is minimally functional, then button up the implementation like the Go implementation to actually make quotes / tracking ID's.

ok I will just let the pr lapse if it's going to worry about it

@reyang can we update the bot to be less aggressive on prs or is this our preferred process?

Keeping a shortlist with the ability to re-open whenever sounds good to me. I’d prefer to just follow normal best practices in general but wanted to check the existing reason

totally reasonable @reyang . Wonder how you might feel about "draft" pr's being treated differently.

If the goal is to allow "draft" PR sitting there forever, I'll need to be convinced 😄

Definitely not the goal to have something sit forever :) It seems like you're looking at the PR queue as something that needs attention immediately when the PR is opened -- I'm keeping this open while I'm working on it so folks can, at their absolute leisure, check in if they're curious, or if they think i'm missing something. It seems to me that it makes more sense to open PR's when they're ready for review here -- and drafts are not necessarily preferred.
I'll open a full PR when it's ready.


How can I create an index with another embedding model?

I went through the docs and tried the following:
from gpt_index import SimpleDirectoryReader
from gpt_index import GPTSimpleVectorIndex
from langchain.embeddings.huggingface import HuggingFaceInstructEmbeddings
from gpt_index import LangchainEmbedding

embed_model = LangchainEmbedding(HuggingFaceInstructEmbeddings())

documents = SimpleDirectoryReader(input_files=['sample.txt']).load_data()

index = GPTSimpleVectorIndex(documents, embed_model=embed_model)

I get an error for not having an OpenAI key:
ValidationError: 1 validation error for OpenAI
__root__
  Did not find openai_api_key, please add an environment variable `OPENAI_API_KEY` which contains it, or pass  `openai_api_key` as a named parameter. (type=value_error)

I feel like there's something basic I'm doing wrong but I can't figure it out 🙁

import os
os.environ["OPENAI_API_KEY"] = 'YOUR_OPENAI_API_KEY'

import os os.environ["OPENAI_API_KEY"] = 'YOUR_OPENAI_API_KEY'

I want to use another model, not OpenAI

The llm_predictor is also specified when building the index, and the default is OpenAI. That is why you still need the API Key, I think.

The llm_predictor is also specified when building the index, and the default is OpenAI. That is why you still need the API Key, I think.

I see, thanks!


[CXF-7657] Reader and Writer interceptors are not sorted by the provi…

…der comparator

hi @andymc12,
I can try but the problem is that the failures are random because the fallback case when the providers come with the same @Priority is Integer.compare(o1.hashCode(), o2.hashCode())

hey @andymc12,
sorry this took so long. I updated the test showing the problem with the ReaderInterceptor and WriterInterceptor and the Comparator. If you revert the fix you will see the test failing. There is a small chance, though, that the test passes because the current behaviour is random, so it might happen that the writers fall in the expected order even though they are not being sorted.


An item with the same key has already been added. Key: idsrv4:tokenvalidation:token

This is my code to secure my api :
 app.UseIdentityServerAuthentication(new IdentityServerAuthenticationOptions
            {
                Authority = "http://localhost:5000",
                ScopeName = "api1",
                RequireHttpsMetadata = false
            });

but when call the api in an angular client  with access token ('Authorization': 'Bearer ' + accesstoken )
I get this error:
An item with the same key has already been added. Key: idsrv4:tokenvalidation:token
What causes to  idsrv4:tokenvalidation:token add more that one?

It doesn't - are you sure you only have 1 instance of the middleware in your pipeline?

The issue raises when ScopeName  value not in client scopes, in the following code the api2 not added to the client scopes in IdentityServer4 server.
  app.UseIdentityServerAuthentication(new IdentityServerAuthenticationOptions
            {
                Authority = "http://localhost:5000",
                ScopeName = "api2",
                RequireHttpsMetadata = false
            });

IMO, wherever developer hard coded values like this case a log record or an exception raising is needs.

I still don't understand why you would get the above exception.

Change ScopeName in this code on your resource server(api) project and call and api in it.
 app.UseIdentityServerAuthentication(new IdentityServerAuthenticationOptions
            {
                Authority = "http://localhost:5000",
                ScopeName = "not_exits_in_client_scopes",
                RequireHttpsMetadata = false
            });

I tried it - got back a 403 as expected...

All set on this issue? Can we close?

I am seeing this issue as well.  Everything works fine locally, but when I deploy it, I get this issue and I'm not sure why.  Only one instance of it in the middleware.  What's more it seems to break [Authorize] attribute on my api, since now its completely open.
I have the "/Identity" test action and its returning claims for a login that I did via the web (/Account/Login), even in incognito mode.  Perhaps there is a conflict between the IdentityServer authentication and the regular ASP.NET authentication.  Weird that it works locally though.

You're deploying to azure? And @mikeandersun, did you only see this when deploying to azure, or did you also see it when it was local?

Yes I am deploying to Azure.
On Dec 2, 2016 11:31 AM, "Brock Allen"<EMAIL_ADDRESS>wrote:

You're deploying to azure? And @mikeandersun
https://github.com/mikeandersun, did you only see this when deploying
to azure, or did you also see it when it was local?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/IdentityServer/IdentityServer4.AccessTokenValidation/issues/32#issuecomment-264541371,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA3wUK68B6qZTRdKl_bTiY56ksKk7_HFks5rEHH6gaJpZM4KyXtE
.

I wonder if they're somehow re-using HttpContext instances. There was a similar issue in the ASP.NET Core to OWIN bridge layer, and this issue reminded me of it. Perhaps @Tratcher might know?

What's the stack trace for the error?

System.ArgumentException
System.ThrowHelper.ThrowAddingDuplicateWithKeyArgumentException(Object key)
[external code]
IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationMiddleware.d__7.
MoveNext()
[external code]
IdentityServer4.Hosting.IdentityServerMiddleware.d__3.MoveNext()
[external code]
IdentityServer4.Hosting.FederatedSignOutMiddleware.d__6.MoveNext()
[external code]
IdentityServer4.Hosting.AuthenticationMiddleware.d__2.MoveNext()
[external code]
IdentityServer4.Hosting.BaseUrlMiddleware.d__2.MoveNext()
[external code]
Microsoft.ApplicationInsights.AspNetCore.ExceptionTrackingMiddleware.d__4.
Move
On Fri, Dec 2, 2016 at 1:18 PM, Chris R<EMAIL_ADDRESS>wrote:

What's the stack trace for the error?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/IdentityServer/IdentityServer4.AccessTokenValidation/issues/32#issuecomment-264565230,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA3wUGJeMS_UkZyaXwlhxoVjS7jmcfRJks5rEIs-gaJpZM4KyXtE
.

Ok, so I fixed this issue.  I have a production site on Azure, and dev /
staging slots as children on this site.  On the staging site (the one which
was breaking), I had forgot to set the "ASPNETCORE_ENVIRONMENT" =
"Staging", so the IdentityServerAuthenticationOptions.Authority url was
using the production url.  Once I remembered to set the
ASPNETCORE_ENVIRONMENT variable, the correct Authority was set on
everythings works ok.
On Fri, Dec 2, 2016 at 2:36 PM, C.I.M<EMAIL_ADDRESS>wrote:

System.ArgumentException
System.ThrowHelper.ThrowAddingDuplicateWithKeyArgumentException(Object
key)
[external code]
IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationMi
ddleware.d__7.MoveNext()
[external code]
IdentityServer4.Hosting.IdentityServerMiddleware.d__3.MoveNext()
[external code]
IdentityServer4.Hosting.FederatedSignOutMiddleware.d__6.MoveNext()
[external code]
IdentityServer4.Hosting.AuthenticationMiddleware.d__2.MoveNext()
[external code]
IdentityServer4.Hosting.BaseUrlMiddleware.d__2.MoveNext()
[external code]
Microsoft.ApplicationInsights.AspNetCore.ExceptionTrackingMiddleware.<
Invoke>d__4.Move
On Fri, Dec 2, 2016 at 1:18 PM, Chris R<EMAIL_ADDRESS>wrote:

What's the stack trace for the error?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/IdentityServer/IdentityServer4.AccessTokenValidation/issues/32#issuecomment-264565230,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA3wUGJeMS_UkZyaXwlhxoVjS7jmcfRJks5rEIs-gaJpZM4KyXtE
.

Why would that environment setting make a difference? @Tratcher do you know?

I dont think its the environment setting per se, its the AUTHORITY setting
in the options.  More specifically, each deployment site must have a unique
url or domain name. Not sure if this is Azure-wide, or limited to sites
within one machine or account.
On Dec 5, 2016 11:40 PM, "Dominick Baier"<EMAIL_ADDRESS>wrote:

Why would that environment setting make a difference? @Tratcher
https://github.com/Tratcher do you know?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/IdentityServer/IdentityServer4.AccessTokenValidation/issues/32#issuecomment-265082052,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA3wUHWdYXiVqeFcxRtktr9jSnSDYp2Gks5rFRFzgaJpZM4KyXtE
.

@brockallen , I am encountering with this error on local development yet.
The new way that i can reproduce this error is using of X-Requested-With header.
without    XMLHttpRequest :
Work fine.
But when the token is invalid (expired) i get a 302 redirect to IdentityServer.
I try to detect Ajax call to apis to return a 401 and add the the header :
$httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
**NOT works. **
And  get a 500 error code. When i see the server error it is :
ArgumentException: An item with the same key has already been added. Key: idsrv4:tokenvalidation:token
Sorry for reopen this issue.

Another way to reproduce the error :

Login with implicit flow form an anuglar client. work fine.
Sleep the computer and go to home :)
Tomorrow turn the computer on. :)
.Refresh your app.
The error appears

Why did you close it? It would be useful to tell us what the problem was...

FYI, when the api route is wrong, i get the error!

I need steps to repro that

Dominick Baier
On Thu, Dec 22, 2016 at 2:39 AM +0100, "mikeandersun"<EMAIL_ADDRESS>wrote:
Reopened #32.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or mute the thread.

With Postman chrome extension :

Call an api  (e.g http://localhost:65000/api/products)  with Authorization:Bearer eyJhbGciOiJSUzI1NiIsI..... header.
The api route exists and token is valid and return the results correctly.

Now change the api to this http://localhost:65000/api/products11111  and get this error:

ArgumentException: An item with the same key has already been added. Key: idsrv4:tokenvalidation:token
System.ThrowHelper.ThrowAddingDuplicateWithKeyArgumentException(object key)
System.Collections.Generic.Dictionary.Insert(TKey key, TValue value, bool add)
IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationMiddleware+<Invoke>d__6.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware+<Invoke>d__18.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware+<Invoke>d__18.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
SaasKit.Multitenancy.Internal.TenantResolutionMiddleware+<Invoke>d__3.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNetCore.Builder.StatusCodePagesExtensions+<>c__DisplayClass6_0+<<UseStatusCodePagesWithReExecute>b__0>d.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware+<Invoke>d__3.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.MigrationsEndPointMiddleware+<Invoke>d__5.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware+<Invoke>d__6.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware+<Invoke>d__6.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+<Invoke>d__7.MoveNext()

We tried and can't repro it. Can you re-test on the latest versions (rc5)? Also, what version of .NET are you hosting the API in?

The test is with rc5.
.NET version: 1.1.*
Yes i have a an asp.net MVC with hosting APIs in it.
What happens if the API not exists with this library? I think not related to the library and ASP.net routing must handle it and return a 404 error.
I don't know when authorization middleware invoke, maybe miss sequence of middleware s causes this error.
I'm developing a proof-of-concept, and will try more focus on this issue when get some results.

It looks like it's caused by UseStatusCodePagesWithReExecute. Your second request results in a 404 so the status code middleware intercepts the response, changes the path, and re-executes the request. This means IdentityServerAuthenticationMiddleware runs twice on the same request and conflicts with itself.
Possible solutions:

Re-order your pipeline so IdentityServerAuthenticationMiddleware is before UseStatusCodePagesWithReExecute and doesn't get executed twice.
Change UseStatusCodePagesWithReExecute to UseStatusCodePagesWithRedirects
Change IdentityServerAuthenticationMiddleware to be idempotent.

Ah, brilliant find!
We also updated our MW to clear the key on the way out, so this should also take care of it. Of course, we shouldn't be encouraging folks to use UI rendering with APIs... but that's what you get with a unified web framework.
Thanks Chris.

@Tratcher Your first solution fixed the problem .

Re-order your pipeline so IdentityServerAuthenticationMiddleware is before UseStatusCodePagesWithReExecute and doesn't get executed twice.

Thanks.

aa


Add Multiple Selectors support for DamageDice rule element.

I'd like to request that the DamageDice rule element have support added for multiple selectors, the same way FlatModifiers does, so that I could do something like:
{   "key": "DamageDice",   "override": {     "damageType": "force",     "dieSize": "d10"   },   "selector": [     "slug1-damage",     "slug2-damage",     "slug3-damage",     "slug4-damage"   ] }
I was stuck for a while trying to figure out why this wasn't working until it was suggested I have only one selector. Being able to condense this into one rules element would make it much tidier than having to make four separate ones.

As an alternative, you can use a selector of "damage" and further filter via predication


The problem of build pytorch extension.

The following error occurs when I build pytorch extension.
Traceback (most recent call last):
File "setup.py", line 69, in
ext_modules=get_extensions(),
File "setup.py", line 47, in get_extensions
raise NotImplementedError('Cuda is not availabel')
NotImplementedError: Cuda is not availabel

Do you have cudatoolkit installed?You can determine if cuda is installed by entering the following command "nvcc -V“


Release failing

Hi,
I'm trying to use this action to compile my AHK script but I am having issues doing it. In particular, it seems that the file is not generated by the action in my case so the release step fails.
Can you help me understand what am I doing wrong?
My action: https://github.com/ajeje93/ahk-italian-shortcuts/blob/master/.github/workflows/release.yml
The action logs:

Hi, @ajeje93!
(Sorry for the late reply.)
I just released a new version (v1.1.0).
I forked your repository and ran the action and it worked until the release.
Could you please try the new version once?
...
      - name: Ahk2Exe
        uses<EMAIL_ADDRESS>        with:
          in: shortcuts.ahk
...

I hope this will be successful.

Hi @nekocodeX,
it worked like a charm! Thank you very much!


Fix GULLogger file structure

Too many internal files were being made privately visible.
Hopefully this will also fix the +[GULLogger loggerSystem:shouldLogMessageOfLevel:]: unrecognized selector sent to class 0x1040e8188 issues showing up in the Firestore cmake builds.

This doesn't fix the cmake build problem. I suspect the cmake builds are missing a -ObjC somewhere and failing to link in the new GULLogger category even though the log shows the category file being compiled. cc: @wilhuff

Even if there is a cmake build config issue, a GoogleUtilities minor update should not expose it.  The latest commit consolidates GULLogger.m and GULLogger+Internal.m to prevent the addition of a category only file that requires -ObjC to link.


ci: add missing bracket to production Jenkinsfile

The production jenkins script had a missing bracket, which prevented it from running. The file now builds on jenkins.

https://coveord.atlassian.net/browse/KIT-1302

didn't you say the coveobot name was also wrong?

Yep, adjusted


jwt.encode shouldn't hardcode header typ as 'JWT'

It took me awhile to finally track down the source of a subtle bug that appeared when I started to use this library to generate and validate dpop proof tokens (a form of jwt).
The token header and claims look something like this
{
	"typ": "dpop+jwt",
	"alg": "ES256",
	"jwk": {
		"keys": [
			{
				"crv": "P-256",
				"x": "d_gYGcjbItA5JZ1yDo8Jrsx05NFZKiWbddM1a7GrqVE",
				"y": "jNHKYu6Lg9e9oxpHxs-0LydXD1XGmTV94g6IH78tMOI",
				"kty": "EC",
				"kid": "rma_Eq5FqSUgKkh8Fkd6uZw8Nv6hirCyH1iNsKet4pQ"
			}
		]
	}
}
.
{
    "htm": "POST",
    "htu": "/v1/auth/device/1234/review",
    "jti": "c618fcc6-a83f-4198-9c83-647e3aef6a00",
    "iat":<PHONE_NUMBER>,
    "exp":<PHONE_NUMBER>
}

When I attempt to encode this token with jwt.encode and then decode it, the header has been altered (in place too, an original reference to the header dict now has the 'typ' key changed to 'JWT').
It would seem this line at the top of encode is the culprit https://github.com/authlib/joserfc/blob/main/src/joserfc/jwt.py#L61
    # add ``typ`` in header
    header["typ"] = "JWT"

I can't tell you how excited I was to learn this library existed not long ago, Python has been sorely lacking a clean, no bs, pythonic jose implementation.  But this hardcoded typ makes it impossible to use for one of my use cases (one of which is dpop validation) because I'm unable to generate test case material at runtime.
I understand not wanting to support a draft spec until its at least more mature, but I think at this point, dpop is here to stay and my ask would only be adding some flexibility in order to make such a use case possible.  So my question is, how best can I scratch my own itch here?  What kind of change would you accept in PR form to open up the typ value a bit?  Initially, I was thinking 'typ' could be something that can be overrided in JWSRegistry kinda like registering custom header claims.  What do you think?
Thanks for the great library and your time btw!

@joeblackwaslike sorry for the trouble, a workaround for now could be:
header = your_header.copy()
jwt.encode(header, ...)

Oh, sorry for the trouble. I'll make a new release in this week.

@joeblackwaslike 0.6.0 is released.


Normal mapping

Two different approaches for forward and deferred rendering mode.
Forward mode now calculates lighting in tangent space. Deferred does not. But the geometry pass has to transform the normals to world space per fragment which might be slower. A different approach would need us to calculate lighting with a different basis.
Not all surfaces in our Sponza have normal maps (check which ones in g_normal_mode!)
I'm happy for now at least!

Well done! The normal mapping in forward mode is giving me 3 (!) fps and I've got 30 in deferred mode now.

That's weird. I have around 60 fps in forward and 30 in deferred on my laptop. Maybe we're hitting some hardware limit?

Giving that Isak has an Intel HD4000 and you"'ve got a HD5000 you've got 40 "EUs" (smallest functional component of an intel GPU) and Isak has 20.
Could be that he is hitting some limit as you said.

15 maj 2016 kl. 02:07 skrev Lage Ragnarsson<EMAIL_ADDRESS>That's weird. I have around 60 fps in forward and 30 in deferred on my laptop. Maybe we're hitting some hardware limit?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub


Translations update from Hosted Weblate

Translations update from Hosted Weblate for microCOVID/microCOVID.
Current translation status:

If someone could do an independent high level check on this PR (are the translations posting obvious spam?  Is there anything else super obviously fishy about them on first glance?), I'd be happy to merge it.  Appreciate the help from volunteer translators!

If someone would be so kind as to do a quick spot check of some type on the translations that were crowd-sourced here, I'd be happy to merge this.
I'm not as concerned about quality as I am making sure someone hasn't used this to insert spam or the like.  I'm not familiar with Weblate and what their procedures would be to prevent this.


[FLINK-13307][tests] Fix SourceStreamTaskTest test instability. (master)

What is the purpose of the change
Fixes test instability that was due to synchronisation on a static variable used by different tests.
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (yes / no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
The serializers: (yes / no / don't know)
The runtime per-record code paths (performance sensitive): (yes / no / don't know)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / no / don't know)
The S3 file system connector: (yes / no / don't know)

Documentation

Does this pull request introduce a new feature? (yes / no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

R @zentol

+1


Fix memory leak

Following change seems to fix memory leak in #64
valgrind -v --log-file=memcheck.log  --tool=memcheck --leak-check=full openresty-valgrind -c /srv/openresty-apigw/conf/nginx.conf -p /srv/openresty-apigw
memcheck.log

Thanks! 👍

@SkyLothar any timeline on when this could be released?

I'll release it later today, sorry for the delay.

No worries! Thanks!

v0.1.11 is now available on github releases, opm, and luarocks.


simplify dynamic callbacks creation in Cop::Commissioner

Simplify dynamic callbacks creation in Rubocop::Cop::Commissioner by using define_method over class_eval and extracting trigger_responding_cops method. I'd say there are three benefits of the suggested approach:

it's easier to understand what's going on (from my point of view, of course);
it's more syntax-highlighting friendly;
it allows us to get rid of . callback_methods method and no_child_callbacks variable.

Also, added an explanation of purpose of this piece of code — very important thing in places where metaprogramming is used.
No new functionality was added, existing test suite is enough.

Before submitting the PR make sure the following are checked:

[x] Wrote good commit messages.
[x] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
[x] The PR relates to only one subject with a clear title
and description in grammatically correct, complete sentences.
[x] Run rake default or rake parallel. It executes all tests and RuboCop for itself, and generates the documentation.

I've just realized that current version of code has a minor advantage over proposed one. Current version doesn't run unless NO_CHILD_NODES.include?(node_type) check on every node as the check is done once during method creation. Take a look at this piece:
#{!no_child_callbacks.include?(callback) && 'super'}

It's evaluated either to super or to an empty string, and the result is pushed directly into the method body. But there are good news!
I've ran profiling and it showed that slowing down is negligible, smth about ≈0.04%. Details: I've launched rubocop on a subset of 42 files. It spent 0.85% of its time in 134 610 calls to Array#each method in master version of code. In proposed version there were 6143 calls more.
Difference is 0.85% * 6143 / 134610 ≈ 0.04%. It makes 0.036s on 1.5 minute of complete run. Not much, I'd say.

Difference is 0.85% * 6143 / 134610 ≈ 0.04%. It makes 0.036s on 1.5 minute of complete run.

This is probably within the margin of error as well. The considerable increase in readability trumps the negligible performance impact. 🙂

Nice! Seems this piece of code remained almost unchanged ever since we introduced it as a performance optimization (in case someone is curious - originally the ast was processed independently by each cop and this made things really slow when the number of cops grew).


Double-clicking a recording recording makes it stuck on 'recording'

I think it gets confused if you click while the recording is turning into a sound

Is this fixed now maybe


choose related article bug

user can choose rejected article as a related article
only approved article should  be allowed to choose as a related article

sepreate aricle table into two table ,     pendingArticle and Article


API for declaring media attrs/vars

Problem
Currently media attributes are exposed on player UI elements via a media store subscription as follows:
class PlayButtonElement extends LitElement {
    constructor() {
      super();
      hostedMediaStoreSubscription(this, 'canPlay', ($canPlay) => {
        setAttribute(this, 'media-can-play', $canPlay);
      });
      hostedMediaStoreSubscription(this, 'waiting', ($waiting) => {
        setAttribute(this, 'media-waiting', $waiting);
      });
      hostedMediaStoreSubscription(this, 'paused', ($paused) => {
        setAttribute(this, 'media-paused', $paused);
      });
  }
}

This is inefficient as we're trying to predict which media attributes should be exposed on a given element, and potentially creating pointless store subscriptions and DOM updates.
Solution
The proposed solution is to expose a media-attrs attribute on all UI elements for determing which media attributes should be made available for styling. All media store props will be available, and can be individually listed using a ; (semicolon) delimitter.
Example
<vds-play-button media-attrs="waiting;canPlay">
  <!-- ... -->
</vds-play-button>

The obvious advantages are that no pointless subscriptions and DOM updates will be made, and it opens the ability for any media attrs to be exposed without us explicity binding it. The other advantage is that in my experience building player UI's so far using @vidstack/player, most UI elements can be simply styled based on the attrs available on the <vds-media-ui> element, such as...
vds-media-ui[media-paused] .play-icon {
 /** ... **/
}

vds-media-ui:not([media-paused]) .pause-icon {
 /** ... **/
}

Thus, in most cases you can simply declare all required media attributes for styling only once on the <vds-media-ui> element, and style all children UI elements based on the attrs exposed on it.
CSS Props
This solution can be replicated for CSS properties as well...
<vds-media-ui media-vars="seekableAmount;duration">
  <!-- ... -->
</vds-media-ui>

This will then subscribe to listed stores and update the corresponding --media-* CSS property. In this example it'd be --media-seekable-amount, and --media-duration.

After some thought it would be strange to expose this option on all UI elements. It makes most sense to expose this on <vds-media-ui> only. We can start there and simply see how we go.

In the end dropped the idea and went something simpler. Extraneous media attributes were removed from UI elements (there was only a few anyway) and everything was shifted to <vds-media-ui>. You can find all sensible media attributes and CSS properties are exposed out of the box on it. You can find it here.


Uploading Multipart Form Data successes with no internet connection

Using 4.0.1.
I completely turned of the phone from any internet connection and tried to upload something via Multipart Form Data. This part of the code becomes relevant:
switch encodingResult {
        case .success(let upload, _, _):
            upload.responseJSON { response in
                debugPrint(response)
            }
        case .failure(let encodingError):
            print(encodingError)
        }
}

I expected the .failure case, but for some reason the .success case gets returned. Also the inner closure of upload.responseJSON never gets called, but still it enters into the .success case.
Why is that? Is that on purpose? With internet connection the method works completely fine and also the inner closure of upload.responseJSON gets called.

Hi @quiKsilverItaly,
The success case is called because that's the success of the multipart form data encoding. It also exposes the actual upload request allowing you to chain onto it. Your responseJSON closure should be called eventually, but it may take a while depending on how much data you're uploading. You could add uploadProgress and downloadProgress closures to the upload to monitor the progress more closely.
Cheers. 🍻


Structured consts not implemented

The implementation (alalpha5) does not appear to support structured consts. For example:
const int[] V = [1, 2, 3];

gives the error:
constant cannot be defined with type 'int[]', expected a simple basic types or a map of a simple basic type

If this cannot be fixed right away, I suggest at least changing the error to "sorry, not implemented: ...".

We've updated the compilation error for unsupported types in constant declarations on the current master.
This sample now results in the following error
constant declaration not yet supported for type 'int[]'

Related issues: https://github.com/ballerina-platform/ballerina-lang/issues/30073, https://github.com/ballerina-platform/ballerina-lang/issues/30334


Unrestricted access? Sounds dangerous

Read and write ALL data on ALL websites? Is there really no other way?


the procedure entry point pcap_set_immediate_mode could not be located in the dynamic link library

Is there an existing issue for this?

[X] I have searched the existing issues.

What's the problem?
when opening app there's next error
the procedure entry point pcap_set_immediate_mode could not be located in the dynamic link library

npcap installed
How did you install the app?
downloaded one of the provided packages
Operating System
Windows
Additional context
No response

Hi @AriesAlex
As stated in other issues and written in the README, you have to

Install Npcap, making sure to check the box Install Npcap in WinPcap API-compatible Mode during the installation.

This will solve your problem.
Closing this issue as it's a duplicate of others.


nixos/systemd: Support notify-reload service Type

Description of changes
Support for this was added in systemd 253:
https://github.com/systemd/systemd/releases/tag/v253
But the NixOS module never started supporting it.
I discovered this in Nix Hour 62
Things done
Tested that notify-reload works correctly:
{ pkgs, config, ... }:
{

  # This file determines what the service prints,
  # changing the text just requires a reload of the service, not a restart!
  environment.etc.output.source =
    pkgs.writeText "output" "Hello Silvan!";

  systemd.services.myService = {
    serviceConfig.Type = "notify-reload";
    # Not necessary with notify-reload and the systemd-notify below!
    #serviceConfig.ExecReload = "${lib.getBin pkgs.coreutils}/bin/kill -HUP $MAINPID";
    reloadTriggers = [ config.environment.etc.output.source ];
    wantedBy = [ "multi-user.target" ];
    script = ''

      outputFile=$(mktemp)
      loadOutput() {
        echo "Loading output"
        cp -f /etc/output "$outputFile"
      }
      reloadOutput() {
        systemd-notify --reloading
        loadOutput
        systemd-notify --ready
      }
      loadOutput
      trap reloadOutput HUP

      trap 'echo "Stopping"' EXIT
      echo "Starting"

      cat "$outputFile"
      systemd-notify --ready
      while true; do
        sleep 5
        cat "$outputFile"
      done
    '';
  };

}

Add a :+1: reaction to pull requests you find important.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/tweag-nix-dev-update-54/39990/1


TrainWithOptimizers throws TrainingDivergedException

Description
TrainWithOptimizers throws TrainingDivergedException
Possibly caused by Metric name not found: epoch
Expected Behavior
Run most things in ai.djl.examples.training.* out of the box.
Error Message
mymac:examples me $ ./gradlew run -Dmain=ai.djl.examples.training.TrainWithOptimizers

> Task :run
[INFO ] - Running ExampleTrainingListener on: cpu(0).
[INFO ] - Load library 1.6.0 in 0.106 ms.
Training:      0% |█                                       | Accuracy: 0.19, SoftmaxCrossEntropyLoss: 4.72, speed: 8.18 images/sec                                                        [INFO ] - Training: 1562 batches15s]
[INFO ] - Validation: 312 batches
[INFO ] - train P50: 3914.031 ms, P90: 3914.031 ms
[INFO ] - forward P50: 20.862 ms, P90: 21.610 ms
[INFO ] - training-metrics P50: 3606.591 ms, P90: 5841.697 ms
[INFO ] - backward P50: 8.703 ms, P90: 11.023 ms
[INFO ] - step P50: 39.751 ms, P90: 39.751 ms
Exception in thread "main" ai.djl.TrainingDivergedException: The Loss became NaN, try reduce learning rate,add clipGradient option to your optimizer, check input data and loss calculation.
        at ai.djl.examples.training.util.ExampleTrainingListener.onTrainingBatch(ExampleTrainingListener.java:87)
        at ai.djl.mxnet.engine.MxTrainer.lambda$trainBatch$3(MxTrainer.java:142)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
        at ai.djl.mxnet.engine.MxTrainer.trainBatch(MxTrainer.java:142)
        at ai.djl.examples.training.util.TrainingUtils.fit(TrainingUtils.java:47)
        at ai.djl.examples.training.TrainWithOptimizers.runExample(TrainWithOptimizers.java:107)
        at ai.djl.examples.training.TrainWithOptimizers.main(TrainWithOptimizers.java:69)
        Suppressed: java.lang.IllegalArgumentException: Metric name not found: epoch
                at ai.djl.metric.Metrics.percentile(Metrics.java:135)
                at ai.djl.examples.training.util.ExampleTrainingListener.onTrainingEnd(ExampleTrainingListener.java:168)
                at ai.djl.mxnet.engine.MxTrainer.lambda$close$10(MxTrainer.java:344)
                at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
                at ai.djl.mxnet.engine.MxTrainer.close(MxTrainer.java:344)
                at ai.djl.examples.training.TrainWithOptimizers.runExample(TrainWithOptimizers.java:96)
                ... 1 more

> Task :run FAILED

FAILURE: Build failed with an exception.

How to Reproduce?
git clone from repository, then start running examples.
Steps to reproduce

./gradlew run -Dmain=ai.djl.examples.training.TrainWithOptimizers

What have you tried to solve it?

Nothing

Environment Info
Please provide the following information:

Operating System: OSX
Hardware(Machine) Info: Macbook pro
CUDA version(if available): None
Deep Java Library version: ?
MXNet version: ?

@salamanders Thank you for reporting this issue. I will look into it in the next couple of days.

@salamanders,
This issue is a regression in recently change, we are working on it. For the time being, please try stable vesion: v0.2.1


_.findWhere returns the first element in array if prob value is falsy

Is it the expected behaviour when passing the falsy value as the second argument to the _.findWhere it returns the first element from the array?
For instance:
var list = [{a: 1}, {a:2}, {a:3}];
var prob = null; // undefined, 0, false or {}
var result = _.findWhere(list, prob);

// result is {a: 1}

For me it is not correct. At https://github.com/jashkenas/underscore/blob/master/underscore.js#L1116 if attrs.length is 0 underscore thinks object matches prob. And it will be always the case for the falsy values 'cause prob will be converted to the empty object by _.extendOwn and than to the empty array of attrs via _.keys

prob is seen as empty so you're choosing to match everything (so it hits the first element).

@jdalton sounds like it is expected behaviour. Unfortunately it is not the first time I see when underscore consumers use _.findWhere in the wrong way. So this ticket is just for the future reference (probably will be better to cover it in documentation, or throw error when prob has unexpected type). Closing this for now.


[GH-#230] Change account identifier in api to bech32 encoding

closes #230

@cheezus1 @nedelcho-delchev-tues can you review this as well?


ci: Introduce djhtml github workflow

Is there a way to set a preferred indentation with this tool? Currently, this seems to do more the opposite of what my goal is (it adds additional whitespace rather than removing it).

Is there a way to set a preferred indentation with this tool? Currently, this seems to do more the opposite of what my goal is (it adds additional whitespace rather than removing it).

Yes, -t - what is your preferred indentation?

I've now updated the PR and set the indentation to 2 in the pyproject.toml - is two spaces an ok indentation?

Oh no, looks like the reply I'd typed out never made it into the issue. ): Trying to recreate it from memory...

Yes, -t - what is your preferred indentation?

2 spaces instead of 4, and the outermost Python block shouldn't get indented because that doesn't really do anything for readability.
The main overall concern is screen real estate because lines become very long very quickly (due to HTML nesting, which isn't a necessity from a technical POV but invaluable for readability), and neither horizontal scrolling nor the results of IDEs soft-wrapping lines are great to deal with. Reason why 2 spaces for indentation have become a thing (4 used to be the default) and why certain tags – like <html>, <head>, <body>  – are often not indented anymore at all, because the important stuff is what goes inside the <body> tag.

Look like we posted at the same time!

is two spaces an ok indentation?

Yes!
Does it have to be told separately for HTML, CSS and JS? Because I think I'm still seeing 4 spaces in some files.

I'll look at the files locally, the GitHub diff doesn't necessarily make regular indentation and lining up of tags obvious.
Did you end up switching the tool? Just wondering where I should look for documentation.

Did you end up switching the tool? Just wondering where I should look for documentation.

Ok, just saw it's indeed djlint now!

Related issue: acdh-oeaw/apis-rdf-devops#21

Is the linting fine the way it is for now? Should we change some configuration?

Sorry, I haven't got around to actually trying it out so far. Will try to make time this week!

@b1rger I ended up installing the package to work around the merge conflicts & to take a closer look at its capabilities in general because it would be preferable if it could be used with apis-rdf-devops / for local development (i.e. #21).
I'm thinking it might make sense to move further discussion to the other issue.

Now that we decided to use poetry for the github workflows, this is blocked by #214


"and more"?  What are all the languages it's trained on?

Please list all the languages that Granite is trained in.  I am specifically wondering if one of the most used languages, COBOL, is supported.

The Granite code model has been trained on data encompassing 116 programming languages (see Appendix A in the Granite technical paper), although its performance may vary across these languages depending on the depth and breadth of the data available for each.

Hi,
Thanks for the reply.  I couldn’t find the Appendix, but if it has been trained in 116 languages, I have to assume COBOL was one of them.
From: alvkhtan notifications-at-github.com |Github| @.***>
Sent: Friday, September 13, 2024 11:48 AM
To: *********; ibm-granite/granite-code-ide @.>
Cc: rossburnett @.>; Author @.>
Subject: Re: [ibm-granite/granite-code-ide] "and more"? What are all the languages it's trained on? (Issue #1)
The Granite code model has been trained on data encompassing 116 programming languages (see Appendix A in the Granite technical paper https://github.com/ibm-granite/granite-code-models ), although its performance may vary across these languages depending on the depth and breadth of the data available for each.
—
Reply to this email directly, view it on GitHub https://github.com/ibm-granite/granite-code-ide/issues/1#issuecomment-2349879433 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AABKMO4O7OOJRV7W7TFFCLDZWMXO3AVCNFSM6AAAAABOBLCPQOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBZHA3TSNBTGM .
You are receiving this because you authored the thread.  https://github.com/notifications/beacon/AABKMO74VSYNIUMPG2DUZTDZWMXO3A5CNFSM6AAAAABOBLCPQOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUMCBIIS.gif Message ID: @.*** @.***> >

page 28: https://arxiv.org/pdf/2405.04324
note: performance vary across these languages depending on the depth and breadth of the data available for each

@rossburnett hope the above answers your question

Yes, it does, thanks.  I'll have to see what it "thinks" of my code.


Adding check for remote before trying to delete the binary store object

Coverage remained the same at 58.463% when pulling 7bb1d586159a0667513f7afc9cf1745d6e2067c4 on i#1448 into 972bfe8a59c61585f600d6bbdcb4fce0c56f8231 on release-3.5.0.


Markdown scope error?

The link style is added for the link text, not the url, so I think the image link looks good.
Which theme is that? In the default theme, the cm-link style has higher precedence than cm-quote, but it appears that is not the case in this theme.

Should there be a scope for URLs, separate from the scope for strings? Maybe cm-url?
So, so in the case of quotes, it could be cm-url.cm-quote.
The theme is my own adaption of the Tomorrow Night theme. I'll look there for the problem with quote link coloring.

We intentionally don't have token styles for every possible semantic thing, so that writing themes remains workable. This many modes overload token styles to mean different things, but this should not be a problem.

Are you saying it shouldn't be a problem to add a cm-url style? Or that overloading the cm-string style for Markdown mode isn't a problem.
I can see an argument for a cm-url style, as that would be a pretty specific semantic case.
Off the top of your head, can you think of a theme using mode overloading that I could use as an example?

I am saying that using cm-string for URLs is not a problem. Themes don't overload modes, modes overload styles -- using string for urls is exactly an example of that.

OK, so the intent of the Markdown mode is that URLs should use the same styling as strings. Could it at least use cm-stings-2, so that my theme can show URLs in Markdown differently than strings in JavaScript?

 Attached patch also styles link targets as url, so that a site can give them a custom style.

Thank you!


union: fix union dual table order by

ref https://github.com/pingcap/tidb/issues/8201
select 2 as a from dual union select 1 as b from dual order by a

need order by whole union resut, but current version order by is attached to last dual.

This change is

And I think we'd better submit a PR in TiDB repo to add an integration test,
which can be merged with this PR together.

@XuHuaiyu @lysu, For integration test, It's better to add it to the tidb-test repo, not the tidb repo.

@lysu Please add some UT

@XuHuaiyu @zz-jason  PTAL


Create ECMAScript 2020 version (ES11) with optional chaining and such

https://en.wikipedia.org/wiki/ECMAScript#11th_Edition_–_ECMAScript_2020

ES7/2016 — exponential operator **, constructions async/await
ES9/2018 — spreading operator ...
ES11/2020 — optional chaining operator ?., nullish coalescing operator, ??
ES12/2021 — logical assignment operators ||=, &&=, ??=


dsl_pipeline_streammux_batch_properties_get/set services - batch_timeout property should be int not unit

The streammuxer property is an integer with -1 = wait indefinitely / no timeout.

Merged into the v0.27.alpha branch


Fix split/ensure_started with non-stdexec senders

It looks like the computation of the completion signatures for split/ensure_started assumed that the sender and env types were ADL-hidden when they in fact aren't. This happens to compile with stdexec-senders (that have a __t typedef), but doesn't compile with user-provided senders. I've added tests with "custom senders", and removed the un-hiding of types. Or should it be the converse: the sender and env types should actually be hidden? It's unclear to me if the types will show up in a tag_invoke call somewhere.

/ok to test

thank you! well-spotted. this is the correct fix.


using global values for proxy override

This PR provides an example of using global values for proxy configuration. This strategy requires us to change the osm oss chart so that the proxy values live under the global key. See more info about Helm's global value here. Global values allow the parent chart to share values with the subchart.
We'd also need to ask the extension team if they'd be okay with us scoping the proxy values under the global key.
From Helm's documentation:
This provides a way of sharing one top-level variable with all subcharts, which is useful for things like setting metadata properties like labels.

If a subchart declares a global variable, that global will be passed downward (to the subchart's subcharts), but not upward to the parent chart. There is no way for a subchart to influence the values of the parent chart.

Also, global variables of parent charts take precedence over the global variables from subcharts.

To test this, pull down this PR and run:
$ helm template charts/osm-arc/ --set global.enableProxySupport=true > out.yaml
Inspect out.yaml. You should see the proxy-config secret and the relevant proxy env vars in the osm-deployment template.
Then, run:
$ helm template charts/osm-arc/ > out.yaml
Inspect out.yaml. You should not see a template for proxy-config secret. You should also not see the proxy env vars in the osm-deployment template.
If this strategy works, we'd want to change global.enableProxySupport to global.proxySettings.isProxyEnabled, global.httpProxy to global.proxySettings.httpProxy and global.httpsProxy to global.proxySettings.httpsProxy as per the arc extension spec

Closing in favor of #54

Closing in favor of #54


Related to #78, adding custom window sizes

Great package, thanks a lot! I'm planning on developing my sites in a separate window now because this thing is so sweet.
It would be really nice to automatically switch the window width/height so I can see how this chromeless browser looks when it's supposed to be a mobile device, tablet, etc. I see that there are window width/height options on the CLI, would it be possible to add user-generated lists of window widths/heights to the menu bar to quickly toggle between?

Hi, this is quite a specific use case and I don't really have plans for this. I believe the app remembers the state of the window when it is closed, could you work with that instead?

One thing that does not persist is the window being in fullscreen mode when quit and relaunched.

@MacWorks You're right, that could be an enhancement to save the state of the window

@MacWorks  Are you sure it does not remember its full screen state? It seems to work for me. I'm on nativefier 6.9.1 on OSX 10.11.2

I'm on OS X 10.11.2 and my apps were last built with 6.8.0, I updated to 6.10.0 and rebuilt the apps. But they still do not remember full screen mode. If I put one in full screen mode then quit the app and relaunch, it will launch in window mode (not full screen).

Hi, is there a fix to remember fullscreen mode? I'm on OS X 10.12, after I close the application, the app does not launch in fullscreen mode after that.

@surreal8 I'm using 7.0.1 and on macOS 10.12 my apps do remember fullscreen mode.

Thanks @MacWorks. I was just testing and my app was not remembering full screen mode after the first time. So then I did Control+Cmd+F to enter fullscreen. After that when I quit, the app is remembering fullscreen - weird?


I keep getting a NoMethodError concerning RDiscount

My error:
NoMethodError at /
undefined method `gh_blockcode=' for #<RDiscount:0x007f985ca27078>

Ruby<EMAIL_ADDRESS>in block in initialize, line 89
Web	GET localhost/

Anyone know what this is about?  This has happened to me several times now. Before I literally had to delete all my articles and start again.  Is there something simple I'm missing here.  Even rolling back to a commit that was working yesterday doesn't fix it.
This is my first time working with toto and markdown; maybe I'm miss-using one?
My code in case it helps: https://github.com/benjamincharity/Toto-Site
Thanks in advance.

Found that this line from my config.ru was un-commented:
  set :markdown,    [:gh_blockcode, :strikethrough, :fenced_code, :no_intraemphasis]

I don't know anything about markdown engines etc (yet) so was unaware that this was causing it.  I'm closing this since it was my own error, but if anyone would like to explain why this was causing the error I would love to learn!


Custom color on activeBgColor is not working...

When i tried to add a custom color of activeBgColor property then its not working. Its remaining all the blue.. check this please

Can you provide a minimal sample to reproduce the issue ?

Can you provide a minimal sample to reproduce the issue ?

ChipList(
listOfChipNames: _dogeNames,
supportsMultiSelect: true,
shouldWrap: true,
activeBgColor: Colors.orange,
inactiveBgColor: Colors.white,
activeTextColor: Colors.white,
inactiveTextColor: Theme.of(context).primaryColor,
listOfChipIndicesCurrentlySeclected: [0],
),

:)
That is because supportsMultiSelect has been set to true. This means that multiple chips can be selected at once.
To prevent this simply remove that line or set it to false.

:)
That is because supportsMultiSelect has been set to true. This means that multiple chips can be selected at once.
To prevent this simply remove that line or set it to false.

But when the user will do when he wants supportmultiple and also custom color??

:)
That is because supportsMultiSelect has been set to true. This means that multiple chips can be selected at once.
To prevent this simply remove that line or set it to false.

But whet the user will do when he wants supportmultiple and also custom color??

Oh ! Thank you again !
Silly of me, the value was hardcoded. It's been patched in the latest version, 0.1.2+5.


[Bug] Prettify not working if JSON body contains comments

Similarly to #1553 prettifying the JSON body fails if the body contains comments:

Tested on v1.11.0 on Windows 11

Formally, comments are not part of JSON and many tools will tell you about that, too.

As documented in #396, Bruno supports JSON with comments in the request body whether they are part of JSON spec or not.

This will go out in the 1.13.0 release. Please subscribe to Discord announcement channel to stay notified on the releases.


Add SOURCE CTCP Command

Note: won't work until new irc-framework release with https://github.com/kiwiirc/irc-framework/pull/104

ref: https://defs.ircdocs.horse/defs/ctcp.html
Two comments:

Linting is very strange with switch statements, but that should be fixed in a different PR (or are we okay with how it is?)
~iirc, we decided we wanted to slowly convert codebase over to ES6 -- right now I just converted part of ctcp.js, should I convert the rest? Or convert none?~

should be good to go


Not able to run the code in staging

We are facing issue while running the code
Error:
"APIV2error: entity not supported".

The problem was that the owner property in app.json did not match the owner for whatever account you're logged into on expo-cli or your expo go app.
For a Quick Run of the App Just use the following command:
 npx expo start --offline
OR
expo logout  and then launch the app again
If you want to use your own Expo account credentials and create builds using Expo, you can follow these steps:

Create Expo Account:

Create an Expo account by running the following command in your terminal:
expo register
OR Create your account from EXPO

Log in to Expo Account:

Log in to your Expo account using the following command:
expo login

Update "owner" in app.json:

Open your app.json file and update the "owner" property to match the Expo account username you just created or logged in with.
Example app.json:
{
  "expo": {
    "name": "YourAppName",
    "owner": "your-expo-account-username",
    // other configurations...
  }
}

Rebuild and Run:

expo build:android
expo build:ios

If you're using Expo Go, run:
expo start
OR
npm start

OK I LL CHECK
On Fri, Dec 15, 2023 at 12:24 PM Muhammad Adnan @.***>
wrote:

The problem was that the owner property in app.json did not match the
owner for whatever account you're logged into on expo-cli or your expo go
app.
For a Quick Run of the App Just use the following command:
npx expo start --offline
OR
expo logout and then launch the app again
If you want to use your own Expo account credentials and create builds
using Expo, you can follow these steps:

Create Expo Account:

Create an Expo account by running the following command in your terminal:
expo register
OR Create your account from EXPO https://expo.dev/

Log in to Expo Account:

Log in to your Expo account using the following command:
expo login

Update "owner" in app.json:

Open your app.json file and update the "owner" property to match the Expo
account username you just created or logged in with.
Example app.json:
{
"expo": {
"name": "YourAppName",
"owner": "your-expo-account-username",
// other configurations...
}
}

Rebuild and Run:

expo build:android
expo build:ios
If you're using Expo Go, run:
expo start
OR
npm start
—
Reply to this email directly, view it on GitHub
https://github.com/Ninjas-Code-official/Enatega-Multi-Vendor-Food-Delivery-System/issues/125#issuecomment-1857369413,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA2KXBOZBEB4MM6BQ5Q3QATYJPX3VAVCNFSM6AAAAABAU7IRUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJXGM3DSNBRGM
.
You are receiving this because you authored the thread.Message ID:
<Ninjas-Code-official/Enatega-Multi-Vendor-Food-Delivery-System/issues/125/1857369413
@github.com>

--
Regards
Athma Patil G S


AnyDesk installer is broken

Brief description of your issue
The Anydesk installer always fails:
Installer failed with exit code: 11341828
Steps to reproduce

winget install AnyDeskSoftwareGmbH.AnyDesk

Expected behavior
No error
Actual behavior
Installer failed with exit code: 11341828
Environment
Windows Package Manager v1.0.11451
Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.

Windows: Windows.Desktop v10.0.19042.985
Paket: Microsoft.DesktopAppInstaller v1.11.11451.0

Protokolle: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

Links
----------------------------------------------------------------
Datenschutzerklärung        https://aka.ms/winget-privacy
Lizenzvereinbarung          https://aka.ms/winget-license
Hinweise von Drittanbietern https://aka.ms/winget-3rdPartyNotice
Startseite                  https://aka.ms/winget

The Problem here is that https://download.anydesk.com/AnyDesk.exe isn't actually an installer. It's a thin client with an installation button (not sure if there is an install flag or something)
The AnyDeskSoftwareGmbH.AnyDeskMSI seems to work fine though

I'll be trying to reproduce this today and I'll +1 this post if I can confirm, I can maybe try resubmitting the manifest package or remove it altogether until AnyDesk developers patch it

Upon testing the MSI Version Anydesk MSI works better than the .exe installer, I'll try locally making another manifest and see if that works otherwise I'll pull request for removal of the Exe version until further notice of the team and Contributors of the repository.
Rather than commenting second time and filling out the issue I'll edit once I grab my results.

The 11341828 error code means its already installed, i had the same issue with the MSI when doing winget update anydeskmsi until i swapped the UpgradeBehavior from Install to uninstallPrevious, i also solved this issue for the exe by adding the --remove-first parameter

Aight, lemme know if there are more issues with AnyDesk

I would like to report the same issue with winget install on Windows11 (exit code: 11341828).

Is it already installed?

The 11341828 error code means its already installed,

Which AnyDesk are you installing?  Since there have been some rework


Trait Idea Thread(?)

Positive traits

[X] [2] King of Frauds -> 4 hands (Arachnid + Moth exclusive, mutually exclusive with "I need a hand!") (It's done but the sprites aren't showing. I'm gonna wait for some body sprite refactor before messing with this shit.)
[x] [2] Legend of the Northstar -> Grants punches similar (but weaker) to the northstar gloves
[x] [2] Mutation - Bloom -> Diona chem buffs (Human exclusive)
[x] [2] Mutation - Slimy Lungs -> Can breathe nitrogen just fine (Human exclusive)
[x] [1] BFFS (Arachnid) -> Spiders are neutral
[ ] [1] BFFS (Lizard Person) -> Scaly creatures are neutral
[x] [1] BFFS (Slime person) -> Slimes are neutral
[x] [2] Lootbox time! -> Gain one item with varying quality
[ ] [2] Stringy pockets -> Grants two extra pockets (Arachnid exclusive)
[ ] [2] Slime Storage -> It's like one half of a backpack inside you (Slime exclusive)
[ ] [2] BLOOD IS FUEL -> Blood (excluding blue blood, slime and water) provides minor brute healing properties
[x] [2] Clawing Out -> Your claws function like crowbars (Lizard exclusive)
[x] [3] Breathless -> You no longer need nitrogen (Slime exclusive)

Negative traits

[ ] [1] Stiffness -> 20% reduced speed
[ ] [2] Brawl Reference -> Chance to trip when running
[x] [2] I need a hand! -> You lose an arm (Mutually exclusive with "King of Frauds")

Values aren't final, and will be changed as time goes on

Few more trait ideas:

Silkmoth (for moths): Gives moths the ability to create and use silk
Iron Lotus (diona): good reduction against heat damage
Iron Stomach (human): Ability to consume raw meat without consequences

Oh yeah I'm wondering if I should be a bit generous with the traits and give players like 2 points to take 1 positive trait.

Another idea to toss in:
Do no harm Cost: 1
Gain the innate ability to sense the current state someone is in, helping the user identify the best treatment to use.

Additional Idea:
At Death's Door.
Cost: 2
When recieving damage, if that damage will put you into crit, only take 10% of the damage.


Privileged mode

Hi,
Just a quick question, not sure if I'm missing something but I generated some vmx's with vrnetlab and they run fine using docker run manually using the --privileged flag but fail without it (some qemu connect error).
It seems when I deploy with containerlab they fail, and show unhealthy.
I was wondering if Containerlab deploys them with privileged by default?
If so then I can start troubleshooting elsewhere to see why its failing but at the moment I'm just curious to see if its trying to run them without privileged mode enabled.
Thanks!
Jon.

sorry showing healthy now! I think I had not given it enough time?

Hi @bodleytunes
Yes, by default privileged flag is set to true. You can monitor the boot process of a vmx with 'docker logs -f '


updated yworks data explorer entry

Is the project still active? Is there something we can do to get this PR considered?


Unwinding kernels need fixing

Seems there is an error in the upwind kernels. The copysignf function only applies to float and not doubles. Hence, its use is not appropriate in the kernel as we are working with doubles and not floats. Just use the copysign function; it is “type-generic” and will pick the proper float/double based on the input values.
However, a more serious question is: why is this logic needed? I believe this code can be significantly simplified and perhaps even made faster by only computing the left/right value based on the sign of alpha at the node. Writing the flux as:
Flux = (fr+fl)/2 + abs(alpha)*(fr-fl)/2
is wasteful. We can write it instead as:
Flux = fr  (if alpha > 0) or Flux = fl (if alpha < 0)
This means only fr or fl need to computed and not both. This could save FLOPS and hence improve performance.
Further, I think the interpolation code can be simplified by storing basis-functions at quad-nodes (as we do in proj_on_basis) and then writing a dot-product function that is called to compute fl/fr as needed (depending on the sign of alpha).
Perhaps this is best explained on a call, but just writing all this before I forget it.

Yes this seems reasonable.
And it is true that there's no need to evaluate basis functions at nodes
over and over again. You weren't doing that in g1 if I'm not mistaken.
On Sun, 15 Aug 2021 at 21:09, Ammar @.***> wrote:

Seems there is an error in the upwind kernels. The copysignf function only
applies to float and not doubles. Hence, its use is not appropriate in the
kernel as we are working with doubles and not floats. Just use the copysign
function; it is “type-generic” and will pick the proper float/double based
on the input values.
However, a more serious question is: why is this logic needed? I believe
this code can be significantly simplified and perhaps even made faster by
only computing the left/right value based on the sign of alpha at the node.
Writing the flux as:
Flux = (fr+fl)/2 + abs(alpha)*(fr-fl)/2
is wasteful. We can write it instead as:
Flux = fr (if alpha > 0) or Flux = fl (if alpha < 0)
This means only fr or fl need to computed and not both. This could save
FLOPS and hence improve performance.
Further, I think the interpolation code can be simplified by storing
basis-functions at quad-nodes (as we do in proj_on_basis) and then writing
a dot-product function that is called to compute fl/fr as needed (depending
on the sign of alpha).
Perhaps this is best explained on a call, but just writing all this before
I forget it.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ammarhakim/gkylzero/issues/11, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAQ6DKCYJO455G5Y7543W2DT5CFONANCNFSM5CG5RRJQ
.
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&utm_campaign=notification-email
.

What we are doing in upwinding currently is unrolling a matrix-vector product that evaluates the distribution function at quadrature points. This operation seems to have zero performance difference for small basis sets (maybe up to about 32 basis functions), but balloons for the higher dimensions and polynomial order and is likely not optimal anyway (I expect the compiler at some point does not like an unrolled expression that's 10k operations).
Interpolation code would significantly clean up this operation and reduce the size of the kernels, making it feasible to actually go to higher polynomial orders in higher dimensions than we currently do. Further, the interpolation code could be a heavily optimized matrix-vector product, because it's a dense operation anyway. We should vectorize and optimize the interpolation as much as feasible.

We don't want to do a mat-vec product, actually. Instead we want to do a dot product. So the sequence would be:

For each quad-point determine the direction of alpha
Then depending on the direction, compute f_face = fL or fR ... this is a vector-vector dot product (values of basis at quad dot expansion coefficients)
Reconstruct surface expansion and do rest of algorithm

This means at each quad node we only compute EITHER fL or fR but not both. This will cut the flops by 2x for computing upwinded numerical flux.

The latest work in the upwind branch that was merged to main fixes this and other issues. Closing it.


Test util to ensure all API types conform to certain rules

e.g.

no public constructors
is final class (actually test for non-public is enough - checkstyle will then pick up if class is not final)
throws on null params...

(Can add more over time)

Requires https://github.com/java9-modularity/gradle-modules-plugin/issues/209...

Moved remaining to https://github.com/creek-service/creek-test/issues/49


License?

Hello,
Can you please include a license for the use of parts of this demo in other projects?

Done :ok_hand:


Zephyr: re-work DT flash partitioning for Nordic nRF boards in the tree

The purpose of this PR is to address #27471 which is a rather serious bug: the ARM linker is not aware of the storage partition, when the flash partitioning layout - defined in board DeviceTree - is not used by the linker. If the Zephyr firmware is relatively large, it may overflow into the storage partition, with unpredictable behavior.
To solve the problem, we need to always use the Device Tree-defined partition layout information for the Zephyr application code partition, in the cases when there are parts of flash (e.g. the storage partition) that cannot be available for code. So we need to enforce USE_DT_CODE_PARTITION at all times.
This PR shows how this can be done and actually applies this for the Nordic-maintained nRF-based platforms in the tree.
This PR is an alternative to #29749. It is aligned with the constructive feedback by @nvlsianpu and @Laczen .
The main design idea is that most platforms would need to have two alternative flash partitioning layouts to be used when building with or without bootloader, respectively. The generic logic to pick the right layout is done in Kconfig.zephyr. Platforms where more alternative layouts make sense would need to define a more complex logic (in the board definition)
In brief, this PR - consisting of several patches - does the following:

Adds a dependency to config USE_DT_CODE_PARTITION, so it cannot be selected if the device tree does not define the corresponding "chosen" code-partition symbols.
Instructs the linker to use the zephyr,code-partition when building a chain-loadable image (loadable by MCUboot) and zephyr,single-image-code-partition when building a standalone image . How?  Kconfig.zephyr will modify the defaults for FLASH_LOAD_OFFSET and FLASH_LOAD_SIZE, to pick either the single-image-code-partition, when we build a standalone image, or pick code-partition, when we build a chain-loadable image (with MCUboot support).
For all Nordic nRF based boards, the PR defines two alternative flash layouts (with and without MCUboot) and defines the chosen symbols, for code partitions with and without BL. The PR forces using the DT Code Partition by default in Nordic DKs, regardless of MCUBoot, effectively solving #27471 for them.
For Trustzone-enabled Nordic platforms (nrf5340 APP and nRF9160) the flash layouts also depend on the security domain we build for (Secure or Non-Secure), therefore the default mechanism we implement in Kconfig.zephyr is overridden locally in the nrf53 and nrf91 board definitions.

Currently address only for Nordic-maintained nRF Dev Kits, but if this solution is approved, it should be extended to all boards.

@Laczen @galak @mbolivar-nordic @anangl I am looking, again, for feedback on the rework of DT flash layout/partitioning.

@ioannisg, it would be the cleanest using overlays, I think it is "bending the rules" a bit to declare two partitions at the same starting address. There could be the following options:
a. No code-partition specified: complete flash area is zephyr-code (no storage possibility)
b. Code partition specified and determined: possibility to use storage if defined
c. Mcuboot layout with code-partition = boot_partition: Offset = 0 and no extra offset.
d. Mcuboot layout with code-partition = slot0_partition: Offset = slot0_offset + image_offset (0x200)

@ioannisg, it would be the cleanest using overlays, I think it is "bending the rules" a bit to declare two partitions at the same starting address. There could be the following options:
a. No code-partition specified: complete flash area is zephyr-code (no storage possibility)
b. Code partition specified and determined: possibility to use storage if defined
c. Mcuboot layout with code-partition = boot_partition: Offset = 0 and no extra offset.
d. Mcuboot layout with code-partition = slot0_partition: Offset = slot0_offset + image_offset (0x200)

@Laczen to clarify: you suggest having a dts overlay inside every board definition?

it would be the cleanest using overlays, I think it is "bending the rules" a bit to declare two partitions at the same starting address.

This silent rule is indeed not satisfy by this approach, but it makes usage simpler for an end-user as it doesn't requires usage of overlays. Can we neglect this rule then? Moreover It was never stated firmly.

it would be the cleanest using overlays, I think it is "bending the rules" a bit to declare two partitions at the same starting address.

This silent rule is indeed not satisfy by this approach, but it makes usage simpler for an end-user as it doesn't requires usage of overlays. Can we neglect this rule then? Moreover It was never stated firmly.

I am not aware of such a formal rule, either. I understand the "beauty" of having a partitions' definition that is cleaner, but, using a .dts overlay for MCUboot, for each board definition seems an overkill; i think we could go for the "hybrid" solution of having a single partitions DTS node with possibly multiple layouts inside it. And proper comments to make it easy to understand.
Also, overlays means we duplicate partition entries (e.g. storage) which will have to be defined in all the different layouts (the main one and the overlay or overlays). Currently, this is not needed since all partitions are defined in one place..

Thinking a bit more, @Laczen, I am not sure how the overlay could work: the overlay is already effective during DTS compilation; at that point we do not know if we build a standalone or a chain-loadable image. So we need to have both alternative layouts at our disposal; an overlay would simply overwrite the default layout.
[In MCUboot we create and use a partition overlay, but we know already at DT compilation time that we will be building a bootloader.]
Am I missing something? feel free to draft a proposal.

Thinking a bit more, @Laczen, I am not sure how the overlay could work: the overlay is already effective during DTS compilation; at that point we do not know if we build a standalone or a chain-loadable image. So we need to have both alternative layouts at our disposal; an overlay would simply overwrite the default layout.
[In MCUboot we create and use a partition overlay, but we know already at DT compilation time that we will be building a bootloader.]
Am I missing something? feel free to draft a proposal.

This can be solved by deleting the default layout.
Regarding the default definition: Be carefull not to give mixed signals: "you cannot define overlapping regions" (because you will get stuck) and "we will define overlapping regions (because it is easier)".

--This can be solved by redefining the chosen partition.-- I think I misunderstood your remark. A standalone image has a different flash layout than chain-loadable, so both should have their own layout.

@Laczen no worries. Yes, I think this the middle ground here; we need to have the different layouts available.

Regarding the default definition: Be carefull not to give mixed signals: "you cannot define overlapping regions" (because you will get stuck) and "we will define overlapping regions (because it is easier)".

Agreed. I am thinking of a "big" warning that

we are allowed to have multiple flash layouts (because we need to have them at build time before Kconfig)
but we cannot use partitions from mixed layouts as we risk messing up with the linker.

And add this warning in the .dts files of the flash layout definitions.

--This can be solved by redefining the chosen partition.-- I think I misunderstood your remark. A standalone image has a different flash layout than chain-loadable, so both should have their own layout.

@Laczen no worries. Yes, I think this the middle ground here; we need to have the different layouts available, if we want to follow the nice approach of always using the DTS partitioning when possible (and at least, when we do dangerous things like using storage partition)

Regarding the default definition: Be carefull not to give mixed signals: "you cannot define overlapping regions" (because you will get stuck) and "we will define overlapping regions (because it is easier)".

Agreed. I am thinking of a "big" warning that

we are allowed to have multiple flash layouts (because we need to have them at build time before Kconfig)
but we cannot use partitions from mixed layouts as we risk messing up with the linker.

And add this warning in the .dts files of the flash layout definitions.

I have tried to solve this, from different reasons, in several other ways and I think that this solution is fine.

I have tried to solve this, from different reasons, in several other ways and I think that this solution is fine.

BTW, related to this PR, I opened this MCUboot issue: https://github.com/mcu-tools/mcuboot/issues/915

BTW, related to this PR, I opened this MCUboot issue: https://github.com/mcu-tools/mcuboot/issues/915

I personally think "the cure is worse than the disease" here. Yes, users might misconfigure their partitions and end up with text overlapping with settings, but I'm not sure that all this extra machinery is a good solution. Would like to discuss in dev review.

I agree with @mbolivar-nordic: "The cure is worse than the disease".
I propose the following alternative solution:
a. A new standard partitioning is created for boards that are using the storage area, this consists of a area called slot0_partition and a storage area (for devices that have secure, non-secure areas the slot0_partition could be divided).
b. The code-partition is standard set to slot0_partition (for all devices).
c. A mcuboot overlay is added to the boards directory, this mcuboot overlay deletes the slot0_partition and redefines the partitions.
d. Projects using mcuboot use the overlay to generate the image.
e. The mcuboot project itself uses a overlay that sets the code-partition to mcuboot.
The advantages:
a. It is clear and uses the available options as they were meant to be used.
b. It separates mcuboot partitions from default partitions, opening the way for alternative bootloaders.
c. It creates no special meaning for the storage partition.
The disadvantage: more work (altough maybe not).
A possible risk is that by separating the mcuboot partitioning to a different file it is easier to overwrite the storage partition.

I personally think "the cure is worse than the disease" here. Yes, users might misconfigure their partitions and end up with text overlapping with settings, but I'm not sure that all this extra machinery is a good solution. Would like to discuss in dev review.

I agree with @mbolivar-nordic: "The cure is worse than the disease".
I propose the following alternative solution:
a. A new standard partitioning is created for boards that are using the storage area, this consists of a area called slot0_partition and a storage area (for devices that have secure, non-secure areas the slot0_partition could be divided).
b. The code-partition is standard set to slot0_partition (for all devices).
c. A mcuboot overlay is added to the boards directory, this mcuboot overlay deletes the slot0_partition and redefines the partitions.
d. Projects using mcuboot use the overlay to generate the image.
e. The mcuboot project itself uses a overlay that sets the code-partition to mcuboot.
The advantages:
a. It is clear and uses the available options as they were meant to be used.
b. It separates mcuboot partitions from default partitions, opening the way for alternative bootloaders.
c. It creates no special meaning for the storage partition.
The disadvantage: more work (altough maybe not).
A possible risk is that by separating the mcuboot partitioning to a different file it is easier to overwrite the storage partition.


Update next-mdx to match other plugins' interface

This is a PR in response of #320.
The following changes are made:

Remove pluginOptions currying in favour of specifying nextConfig.mdxLoaderOptions.
Custom extensions via pluginOptions.extension are now impossible since pluginOptions is removed. The extensions are now limited to .mdx and .md.

The README.md file has been updated accordingly.
This commit is definitely breaking, but I don't know how to handle it. Is it possible to specify a deprecation warning or backward compatibility somewhere?

As per https://github.com/zeit/next-plugins/issues/320#issuecomment-433739761