Redesign admin question list page

Description

Show question text and help text as main question info. Question name and description are now shown as "admin notes".
Add "draft" and "active" rows for questions.
Render questions as a list rather than a table.
Remove translated languages text.

Release notes:
Redesign admin questions list page to display questions a list and provide clear active and draft versions for each question.
Checklist

[x] Added the correct label: < feature | bug | dependencies | infrastructure | ignore-for-release >
[x] Created tests which fail without the change (if possible)
[ ] Extended the README / documentation, if necessary

Issue(s)
Issue #3033

Codecov Report

Merging #3378 (f9cd86c) into main (29dd829) will not change coverage.
The diff coverage is 100.00%.

:exclamation: Current head f9cd86c differs from pull request most recent head 14852b6. Consider uploading reports for the commit 14852b6 to get more accurate results

@@            Coverage Diff            @@
##               main    #3378   +/-   ##
=========================================
  Coverage     80.20%   80.20%
  Complexity     2348     2348
=========================================
  Files           287      287
  Lines          9275     9275
  Branches        618      618
=========================================
  Hits           7439     7439
  Misses         1594     1594
  Partials        242      242

Impacted Files
Coverage Δ

...app/services/question/ActiveAndDraftQuestions.java
98.64% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Sorry I'm not going to have time to review this today, Status Tracking took my focus and I'm OOO mon/tue.  Bion can likely review the versioning model interactions if you want that.

I reverted versioning changes so now it's only UI. Will be easier to get in.


Replacing string with table corrupts DOCX

Describe the bug
Replacing a string with a table makes DOCX invalid
To Reproduce
Steps to reproduce the behavior:

Command:

docxbox rpt table_unordered_list_images.docx Officia "{"table":{"header":["A","B","C"],"content":[["a1","a2","a3"],["b1","b2","b3"],["c1","c2","c3"]]}}"

Resources: table_unordered_list_images.docx

Expected behavior

Given string is replaced by table (works)
DOCX is valid →DOCX is invalid

Screenshots

Environment:

docxBox Version: 0.0.5
DOCX Processor: Word 2019

Additional information
Screenshot only shows relevant lines, the actual diff has more lines

@LucasBornhauser  Can the resulting docx be opened e.g. in FreeOffice TextMaker w/o corruption message?

Yes, all other DOCX processor manage to open the DOCX:

Abi Word: Document can be opened, table borders are not displayed, but the content is
LibreOffice: Document can be opened, no table or table content is displayed
FreeOffice 2018 TextMaker: Document can be opened, table and content are displayed

No error message is given upon opening the file with either one of these applications


publication_list: enable multiple highlight authors

Bibtex files (especially when pulled from different sources) often contain authors in different formats or spelling, for example I have entries with Jochen Schroeder, Jochen Schröder and just initials. This (small) change enables to specify a comma separated list of highlight authors which will be highlighted. I left the option name unchanged (highlight_author, singular) to not break existing sites.

Could , appear if someone is doing Lastname, Firstname? If yes, ; would work better instead.
Also, please add your @gmail.com e-mail address to GitHub settings to ensure proper attribution of commits.

I agree with @Kwpolska that you probably want a different delimiter.

Ok, I changed this to semicolon delimited

Thanks for contributing to Nikola!


nvalt shows only a subset of notational velocity notes

I downloaded and launched nvALT today and it only showed about half the notes that I can see in vanilla Notational Velocity. I have several hundred notes in Notational Velocity and nvALT shows only a few hundred. The distinguishing characteristic of the notes that nvALT shows is that they're old—I don't see any notes that I created after about January of last year.
Looking in my ~/Library/Application Support/Notational Data, I can see that Interim Note-Changes is present even after I quit regular Notational Velocity (and is a little over twice as big as Notes & Settings). When I run ls -l, I see numerous files with names like .01716643-603407728-1, most of which are about the same size or larger than Notes & Settings. I tried converting my database to plaintext files (using these instructions), thinking that would smooth things over, but got error messages similar to those in this thread.
My theory—based on what little I know about how Notational Velocity's database system works—is that for some reason Notational Velocity isn't syncing note updates from Interim Note-Changes on exit, and hasn't been since last year. So nvALT is only seeing those notes that actually made it into Notes & Settings, while vanilla Notational Velocity is able to reconstruct all of my notes by reading the Interim Note-Changes file on load.
Any tips or workarounds for getting this to work? Or other ways of exporting notes from vanilla Notational Velocity to nvALT? (I was able to export everything as plain text files using Note > Export, but I'd prefer to keep e.g. tags and formatting when moving over.)
I'm running macOS Mojave (10.14.6). (And now that I'm thinking about it, January of last year might have been when I upgraded to Mojave...)

I have same issue with you, my note on 2020, but only see 2019 notes


Mongo DB storage

This PR implements a basic Mongo DB persistent storage as requested by #5.
Features:

Physical storage. We make Mongo DB write its DB files to /data/db and mount this dir on a K8s volume backed by 10GB physical storage. That should be enough disk space for the next few months but we'll probably have to up it as soon as we connect real-world devices. (Consider we've only got 120GB physical storage at the moment and other DBs to cater for, so it's best not to allocate too much storage until we expand our underlying physical capacity.)

Demo
Set up a demo VM by following the steps in the bootstrap procedure. Then start it and port forward localhost 1026 to Orion:
$ kubectl port-forward svc/orion 1026:1026

Now POST an entity to Orion:
$ curl -v localhost:1026/v2/entities \
       -H 'Content-Type: application/json' \
       -d '{"id": "1", "type": "foo", "a": {"type": "Text", "value": "bar"}}'

Bounce the Mongo DB deployment to restart the pods and get rid of any state that may be in memory
$ kubectl rollout restart deployment mongodb

Wait for the Mongo DB pods to restart then GET all entities from Orion:
$ curl -v localhost:1026/v2/entities

You should get back a JSON array with the entity you POSTed earlier:
[{"id":"1","type":"foo","a":{"type":"Text","value":"bar","metadata":{}}}]


Get SpanData of spans

We want to implement log correlation for go(#950), so we need to access Span.data for parent span id and span name etc, and log them.
Is there a way to access Span.data? We can access it in Exporters, but only sampled trace/span can reach Exporter, while we want to log span info even if trace/span is NOT sampled.
Thanks!

For log correlation you only need the SpanContext which holds items like TraceID and SpanID which is sufficient for correlation purposes and also propagated in cases when a Trace is not sampled.
Span.data does not hold any required information to allow for log correlation and is only available for Spans that are sampled.

I am not sure I completely understand this,

My bad of pressing close button.

@rghetia Because whether a trace will be sampled is determined at the time when the trace/span is created, but that's not where logging happens. When later the program decides to do some logging, there's no way to make sure this trace will be sampled and exported.

unless log is created for every span rebuilding trace from log is not going to be useful. At that point it is as good as turning on always-sampling mode. Logging every span is probably more expensive then turning on sampling.

Always-sampling would be a waste of resources apparently. But when error happens, it would be nice to recover/rebuild more information as much as possible. Of course we can't recover the whole trace/span structure, but still, things like span name can provide valuable info for diagnosing problems, since not all the people in a team are familiar with the source code. And, we are planning to relate span names to the metrics names, so we can process and diagnose problems automatically in the future.

Any update on this?
Is there currently no way to get the SpanContext from a span?
I can't seem to find any way to get SpanID or TraceID from a span either.
This would be really useful to have so that one could implement log correlation yourself.

Use https://github.com/census-instrumentation/opencensus-go/blob/master/trace/trace.go to get the SpanContext then the Span/trace IDs.

Oh look at how I missed that! Didn't see the function where you could get the SpanContext from the span. Thanks!

how does it going? I need to get parent span id too.


Explicitly Disabling Notebook Execution for one cell

How can nbsphinx ignore one specific cell?
ideally we would add something like
NBSPHINX SKIP
print('this code should never run')

https://github.com/gdsfactory/gdsfactory/issues/335

nbsphinx uses nbconvert for executing notebooks (which in turn uses nbclient).
Is it possible to ignore one cell in nbconvert?
If yes, I can try to enable that in nbsphinx.
Alternatively, you can try https://github.com/executablebooks/MyST-NB, maybe it is possible with that?


[Baremetal] Add Secp256r1 test keys and certificates

Context: Example applications and tests don't currently run in reduced configurations such as configs/baremetal.h. We therefore modify the configurations we're actually interested in testing - in the case of baremetal.h, this is baremetal_test.h -  which comes at the danger of missing or misleading tests (e.g. if the modifications lead to different code being exercised). For example, setting MBEDTLS_PEM_PARSE_C to be able to use PEM-encoded test certificates will give overly high RAM usage figures. This PR belongs to a series of PRs which aim at reducing baremetal_test.h to move the actual configuration under test closer to the configuration baremetal.h we want to test. The first such PR is #2569 which adds DER encoded test keys and certificates, thereby allowing to remove MBEDTLS_PEM_PARSE_C and MBEDTLS_BASE64_C from baremetal_test.h.
Summary: This PR builds on #2569 and adds Secp256r1 test keys and certificates, thereby allowing to remove MBEDTLS_ECP_DP_SECP384R1_ENABLED from baremetal_test.h which was previously needed because the test certificates were using Secp348r1.

Since https://github.com/ARMmbed/mbedtls-restricted/pull/643 was merged in the meantime, I think this PR is no longer useful, so I'm closing it. @hanno-arm Please double-check and re-open if I missed something.


Fix Related to #15891

Hello. We have tested the functionality and some updates need to be made since the code is incorect. The correct code is as follows:
trigger OnFindRecord(Which: Text): Boolean
    var
        Found: Boolean;
        IsHandled: Boolean;
    begin
        OnApplyVendorEntriesOnFindRecord(Rec, Which, Found, IsHandled);
        if IsHandled then
            exit(Found);
       exit(Find(Which));
    end;

[IntegrationEvent(true, false)]
    local procedure OnApplyVendorEntriesOnFindRecord(var VendorLedgerEntry: Record "Vendor Ledger Entry"; Which: Text; var Found: Boolean; var IsHandled: Boolean)
    begin
    end;

Thank You

It is currently implemented like this.


⚠ RPC server - Conflux has degraded performance

In 9803be0, RPC server - Conflux ($CONFLUX_RPC_URL) experienced degraded performance:

HTTP code: 0
Response time: 0 ms

Resolved: RPC server - Conflux performance has improved in a9af503 after 5 minutes.


Popups blocked in 0.14

After upgrading to 0.14 the popups are getting blocked in both Chrome and Firefox (desktop). The master branch has the same issue. Rolling back to 0.13.4 fixes the problem.

I have narrowed the problem down to 76ba026870c0734ba54fa55bb23402f7d9c70e60

Are there any news on this?

Moving popup.open call outside of the $timeout(function () will resolve the browser blocking issue.


freeswitch: 1.10.9 -> 1.10.10

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/signalwire/freeswitch/releases.
meta.description for freeswitch is: Cross-Platform Scalable FREE Multi-Protocol Soft Switch
meta.homepage for freeswitch is: https://freeswitch.org/
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.10.10 with grep in /nix/store/2rkjdr7mhb6kny89fbkdp0kisdbkl8vr-freeswitch-1.10.10
found 1.10.10 in filename of file in /nix/store/2rkjdr7mhb6kny89fbkdp0kisdbkl8vr-freeswitch-1.10.10

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
freeswitch

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/2rkjdr7mhb6kny89fbkdp0kisdbkl8vr-freeswitch-1.10.10 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A freeswitch https://github.com/r-ryantm/nixpkgs/archive/0af1a3b6ced4db22e0cf86b46daa6241ee3f3ff5.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/2rkjdr7mhb6kny89fbkdp0kisdbkl8vr-freeswitch-1.10.10
ls -la /nix/store/2rkjdr7mhb6kny89fbkdp0kisdbkl8vr-freeswitch-1.10.10/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

freeswitch

Maintainer pings

Result of nixpkgs-review pr 251599 run on x86_64-linux 1

1 package built:

freeswitch

This upgrades includes the fixes for CVE-2023-40018 and CVE-2023-40019.
Changelog: https://github.com/signalwire/freeswitch/releases/tag/v1.10.10


Add better handling for environment variables

Add functions to handle global and project specific environment variables and .env files.
Add commandline parameter to pass global or project specific .env files.
Add docs for .env.
Remove unnecessary load_writer_from_env function.

I am thinking of generating the global env from the setup tool, which will be the default, then loading in user env and overwriting things when needed.

Ok, this can still be done. All used env vars have defaults, so no known FABulous behavior is broken.
Maybe setup tools could just generate a .env file, which could still be changed.

Forgot default value exists🤦🏻Nothing needs worrying then.
Kind regards,
Kelvin Chung

From: Jonas K. @.>
Sent: Tuesday, September 10, 2024 3:33:06 PM
To: FPGA-Research-Manchester/FABulous @.>
Cc: King Chung @.>; Comment @.>
Subject: Re: [FPGA-Research-Manchester/FABulous] Add better handling for environment variables (PR #232)
I am thinking of generating the global env from the setup tool, which will be the default, then loading in user env and overwriting things when needed.
Ok, this can still be done. All used env vars have defaults, so no known FABulous behavior is broken.
Maybe setup tools could just generate a .env file, which could still be changed.
—
Reply to this email directly, view it on GitHub [github.com]https://urldefense.com/v3/__https://github.com/FPGA-Research-Manchester/FABulous/pull/232*issuecomment-2341013814__;Iw!!PDiH4ENfjr2_Jw!Fdw4WsyKLMqP-mCiF98_mk4fo5q1Q8tjfeWGbGwShYdGAcMCtfEc1PsVH0XAh8P7FrqIC5tekhqLxEeeMKBTlOy9-hwdYI-j$, or unsubscribe [github.com]https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AQF2K6I347HEXAOAXIYUGWTZV37KFAVCNFSM6AAAAABN6PYAT2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBRGAYTGOBRGQ__;!!PDiH4ENfjr2_Jw!Fdw4WsyKLMqP-mCiF98_mk4fo5q1Q8tjfeWGbGwShYdGAcMCtfEc1PsVH0XAh8P7FrqIC5tekhqLxEeeMKBTlOy9-i4xMyrC$.
You are receiving this because you commented.Message ID: @.***>


feat: have a feed open by default

Describe the feature you'd like to request
a default feed open when you hit the feeds tab.
Describe the solution you'd like to see
I tap feeds at the bottom of the screen then have to tap ‘following’ up at the top of the screen.
For me the main user experience is viewing my following feed (or whatever feed I’ve set as default)
Additional information
Maybe just requires a UX review of what is the best way to handle feeds. As it’s a social app they are the main part of it but they are now hidden behind a further tap in a different area of the screen.

Thank you for this. I’m going to make changes to the layout, not entirely sure how yet but I’ll take this feedback into account

Done in v0.1.5


When a PR is created, create a Mautic instance with the changes in it

Because the GrapesJsBuilderBundle lives in mautic/mautic, separated from the preset, it's hard for non-developers to test changes that we do here in grapesjs-preset-mautic (see the README for the current 12-step process to do that).
Example:

Issue reported: https://github.com/mautic/mautic/issues/9998
Preset PR created: https://github.com/mautic/grapesjs-preset-mautic/pull/20
Companion PR in mautic/mautic PR created so the user can validate the fix we did in grapesjs-preset-mautic: https://github.com/mautic/mautic/pull/10360

This is quite painful to do, because it requires us to create or update a companion PR every time we do a change here and want (non-technical) people to test it.
In order to make this simpler, I'd like to suggest an approach where a bot/CI can create a live Mautic instance with the fix included, so that we don't have to create a companion PR in mautic/mautic every time we want to do a change here and have folks validate it. An example is https://github.com/angular/angular/pull/43229#issuecomment-903833033 where a bot creates a live preview URL for testing:

We might be able to leverage Mautibot and Mautibox for this. It's probably not an easy task, but I wanted to report it here for future reference.
CC @adiux @RCheesley

I think that would be an awesome idea - it is super convoluted to test them as things stand!  It would also be valuable for mautic/mautic as well I think.


implement logic for getting image architecture from scratch, instead of relying on google/go-containerregistry/crane.

Signed-off-by: Tiger Wang<EMAIL_ADDRESS>

This is needed due to https://github.com/google/go-containerregistry/issues/377


fix two code issues

issue 1: the switch clause in tpm2_akparse.c is problematic.
issue 2: some malloc was not followed by error handling check.

@flihp, please help double check my fixes.

A few general comments on these commits:

In 0c0d34266c661bac9eaca80142752b60a2fed154 it's pretty clear what you're doing and why. It is however a bit of a mystery why you return -1 in one case and return -99 in the other.
In d5226a0262849bcb71275d8986dd630a0fbc9f4e you've change a bunch of the logic and a few return values and without some indication as to what the return values mean or what the purpose of the function is it's a bit more difficult to review this. The logic looks right to me but it would be much easier to review if I could verify the logic with a written description of what the function is intended to do and a description of why you're making these changes. Your commit message states: "Fix the switch case clause problem in tpm2_akparse.c" but I don't know what the "switch case clause problem" is, or how the change actually fixes it.
The spacing around ( and ) in your function calls and conditionals is inconsistent. Are we putting what space around all parentheses or just in conditionals? Line 49 mixes both forms.

@flihp, good comments!

for the exit code in tools, as you can see, I used to try to use different minor numbers to indicate where the error happened so that user can check the code when meet error. When people changes the code eventually, the exit code becomes a little bit messed now. It is the time to reconsider how to define the exit code in a more suitable style. I will open a issue for the error/exit code cleanup.
The original code uses if/elses to handle the dispatching, when PR#110 try to change this to switch clause, there are some wrong changes which didn't keep the original logic like below:

int parseAKPublicArea()
{
    TPM2B_PUBLIC outPublic;
    UINT16 size = sizeof(outPublic);
    if( loadDataFromFile(akDataFile, (UINT8 *)&outPublic, &size) )
    {
        return -1;
    }

    if( TPM_ALG_RSA == outPublic.t.publicArea.type )
    {
        if(SaveKeyToFile(akKeyFile, TPM_ALG_RSA, outPublic.t.publicArea.unique.rsa.t))
            return -2;
    }
    else if( TPM_ALG_ECC == outPublic.t.publicArea.type )
    {
        if(SaveEccKeyToFile(akKeyFile, TPM_ALG_ECC, outPublic.t.publicArea.unique.ecc))
            return -3;
    }
    else if( TPM_ALG_KEYEDHASH == outPublic.t.publicArea.type )
    {
        if(SaveKeyToFile(akKeyFile, TPM_ALG_KEYEDHASH, outPublic.t.publicArea.unique.keyedHash.t))
            return -4;
    }
    else if( TPM_ALG_SYMCIPHER == outPublic.t.publicArea.type )
    {
        if(SaveKeyToFile(akKeyFile, TPM_ALG_SYMCIPHER, outPublic.t.publicArea.unique.sym.t))
            return -5;
    }
    else
    {
        printf("\nThe algorithm type(0x%4.4x) is not supported\n", outPublic.t.publicArea.type);
        return -6;
    }

    return 0;
}

What I did it just try to back to the equal original logic as above, except the return code.

oh, that is my fault. I will fix it.

Ah I fell into the same trap you did with the 'approve' button on the code review. I guess it doesn't apply to individual patches. Either way, thanks for the clarification. Looks good to me. Will merge in a second.


Added a delete unverified user from the table after every 1 minute

I added an option to delete a user after every 1 minute if the user is not verified.

the code syntactically looks ok to me, but was hoping to understand why we're making this change! I noticed in your project plan you mentioned users should request a new verification if it expires - how can they do that if the user is deleted?

the code syntactically looks ok to me, but was hoping to understand why we're making this change! I noticed in your project plan you mentioned users should request a new verification if it expires - how can they do that if the user is deleted?

Yes, that was the initial plan but if the user is not deleted from the database his or her information is stored. It is not possible to make a new account due to the user details already in the database. So deleting it will make it possible for the user to create a new account.


How does this work?

I installed the chrome extension and without even having to provide any credentials, the free models seemed to work immediately
specifically these ones:
chatgptFree35: { value: 'text-davinci-002-render-sha', desc: 'ChatGPT (Web)' },
chatgptFree35Mobile: { value: 'text-davinci-002-render-sha-mobile', desc: 'ChatGPT (Mobile)' },
I tried inspecting the webviews of the application via the associated button that launches chrome devtools on the extension page, but i couldn't follow what was happening in the network requests.
I'm curious how this works because I was trying to research for how to potentially call gpt from the backend of an application, and I was just looking around for if there were any free workarounds before paying for the API.
I realize the function that is calling the api is likely generateAnswersWithGptCompletionApi() from openai-api.mjs; but the extension worked with the default model without me even having to input my api key yet, so I'm confused.
Very impressed with this project; thank you for releasing all of this for free! :)

By default, this extension uses reverse-engineered interfaces from chat.openai.com. Because the browser extension can directly access your cookie, you can use it for free after installation, just like sending a message on chat.openai.com.

https://github.com/josStorer/chatGPTBox/blob/master/src/services/apis/chatgpt-web.mjs

would it be possible at all to use this strategy to write a script that runs on a server and responds with chat gpt to user's messages with me hard coding the cookie that was present on my browser? or almost certainly that cookie would expire after some time?

Yes, you can. The cookie usually expire after one month.


[Build] The -Werror flag is enabled only for Debug builds - issue #812

See also #813 and #812

That change allows to cleanly build on ARMv7hl: https://koji.fedoraproject.org/koji/taskinfo?taskID=45426720
So, awaiting for your accepting to merge that pull request :)

I'd really like to modify Travis/Appveyor configs to enable using -Werror, we still want to do it there. If you could do it, it would be great, otherwise I'll try to do it later but, as I said, not immediately.

I'd really like to modify Travis/Appveyor configs to enable using -Werror, we still want to do it there. If you could do it, it would be great, otherwise I'll try to do it later but, as I said, not immediately.

If you build in Debug mode (-DCMAKE_BUILD_TYPE=Debug)), -Werror will be activated by default. And Debug mode makes sense for CI (at least to me). I know how to configure Travis CI, but not (yet) AppVeyor.

No, sorry, I disagree. We really want to run the tests using the production version, because this is what we ultimately care about. If some optimization breaks something in SOCI (which is not impossible), we want to know about it.

No, sorry, I disagree. We really want to run the tests using the production version, because this is what we ultimately care about. If some optimization breaks something in SOCI (which is not impossible), we want to know about it.

You are absolutely right in principle (and I actually fully subscribe to such principle myself: https://www.12factor.net/dev-prod-parity). Normally, with CI tools, it's pretty straightforward to test several configurations in parallel. In Travis CI, for instance, one test per line in the env: section is made. So, we can have -DCMAKE_BUILD_TYPE=Debug and -DCMAKE_BUILD_TYPE=Release kind of rows (out of my memory; there are surely other ways to that properly).

I'd really prefer to keep things simple and just pass extra CXXFLAGS to the build. I'm completely CMake ignorant so I always forget how to do it, but surely this must be possible.

Ok, no problem, I'm with you: 5afc2f54a3454f06c1001b13603054f74d4d16ab
If, in the cmake command-line, you pass the -DSOCI_ENABLE_WERROR=ON option, -Werror will appear where it used to appear. By default, -Werror does not appear.

Sorry for the delay, I've finally returned to this and made the changes to keep using -Werror in the CI builds in #825, so I'm closing this one in favour of the other PR which I'll merge as soon as the CI builds there finish successfully.


iroh: provider list for the downloader

Copying from #1420

Prioritizing candidates per role: Provider and Candidate
A nice extension, as discussed at some point, is to differentiate candidates we know have the data, from those that might have the data. This has added benefit that when a peer is available to perform another download under the concurrency limits, a hash we know they have could be downloaded right away instead of waiting for the delay. At this point making this doesn't make sense because we will likely attempt a download before the peer has retrieved the data themselves. To implement this, we would need to add the notifications of fully downloaded hashes as available into gossip first.

My suggestion to do this is to:

Add a new message kind to gossip that informs connected peers that some data is available. This would only be done for peers in the tree
Said notification would be triggered when the data has just been downloaded. An ideal world would make this notification come from the DB itself as the one and only source of truth since downloads can occur via other mechanisms different to the downloader. A potentially easier approach would be to produce this notification from the downloader itself since it clearly knows when a download has been successfully concluded.
Upon receiving the gossip notification of a new provider available this can be used to prioritize them to retrieve the data as mentioned in the original future work
A nice property of this is reusing existing known connections that are already bounded by the gossip parameters and generate an effective propagation of actually available data

closed by #1420


Control whether parent's scroll top should be ignored or not.

Hi @noordawod, sorry for the very late response.
Can you please rebase your pull request?

Sorry, but I'm busy right now. It's few lines of code, I'm sure you'll know how to embed them in.


feat: Use DependencyPropertyGenerator

Not sure about the default DefaultBindingMode.TwoWay. This only makes sense for those properties that can be changed by a given library

I checked the platform methods and didn't see anything changing these properties. So I removed all DefaultBindingMode.TwoWay

propertyChanged: (bindable, value, newValue) => ((CameraView)bindable).OnDetectionFinishedCommand = (ICommand)newValue

For the future - you don't need to write code like this, this duplication and assignment already happens in the property setter.

@HavenDV Looking at this, I think I can see that you are trying to use this new dep to make the code more readable, but I'm not sure. Would you mind adding a description to this pull request, explaining your reason for making the changes? They may help the owner decide on it.

https://github.com/afriscic/BarcodeScanning.Native.Maui/issues/25
The initial discussion regarding this was here

Sorry, this is on hold for now as I currently don't have enough time to test it properly.


replicating fbc-v4.13 into other overlays

/cc @lance @tommyd450 @cooktheryan

Changes include:

Updating versions of component images and swapping to what they will become at registry.redhat.io.
creating FBC overlays for all OCP catalogs 4.11 - 4.16.
removing .tekton files for the FBC component as I will be re-creating them after this merges in keeping with how cnv did theirs so we can have a reference and keep things consistent for the konflux folks


link the "3.6.0" readme in master for people viewing the repo today?

@jasonmit you mentioned this and I didn't know if you had a fancy github way to achieve this :)

I don't I just make it a nice bold header at the top of the README saying the master doesn't reflect the latest stable API.  And point them to the latest tagged version

https://github.com/toranb/ember-cli-simple-store/commit/ee2a211fd2adfff35311af4895fb72b99fe902fb
done :)

:+1:


Feature Idea: kmeans clustered histograms for Mattes and MI

Was looking into the impacts of histogram bin sizes for Mattes/MI and I came across this interesting paper:
Normalized mutual information based registration using k-means clustering and shading correction.
http://europepmc.org/abstract/MED/16111913
The reasoning for unequal histogram bins seems reasonable to not subdivide anatomically similar regions.
I took a look at the Mattes and MI implementations in ITK and it looks like the histogram construction is part of the function itself.
My C++ isn't strong enough to modify the code directly so I tried the following hack, kmeans threshold both images, set the number of bins in the Mattes metric thresholds + 1:
> ThresholdImage 3 $movingfile $tmpdir/$(basename $movingfile) Kmeans $thresholds
> ThresholdImage 3 $fixedfile $tmpdir/$(basename $fixedfile) Kmeans $thresholds
> antsRegistration ....
  --transform Affine[0.1] --metric Mattes[$tmpdir/$(basename $fixedfile),$tmpdir/$(basename $movingfile),1,$(expr $thresholds + 1)] ....

Simple eyeballing of the registrations seems to show similar registration quality with a nice speed increase.
I'd like to examine this a bit more systematically, but I'm not sure how to go about computing some comparisons.
Can anyone suggest a systematic way to compare registration methods?
Does this method seem reasonable enough to investigate further?

Any thoughts on this?

Sure.  If you think it's worthwhile, why don't you write a similarity metric class and submit an Insight Journal article?  That would help determine whether or not it's worth incorporating into ANTs.

Any pointers on where to start? My C++ skills are not at a "writing from scratch" stage right now...

https://github.com/InsightSoftwareConsortium/ITK/tree/master/Modules/Registration/Metricsv4
specifically, you might want to look at Mattes .hxx and .h files.
as well as the parent .h and .hxx files.


Allow | head commands from terminal

Using whatwhat person ... | head returns an error:
Fatal error: exception Sys_error("Broken pipe")

Suspected cause is due to broken pipe signal (see SO question)
We probably want to catch this exception and ignore the error

Digging into this more deeply, you can't even catch the exception and call exit, because exit causes stdout/stderr to be flushed and this flushing triggers the broken pipe error again.
The opam tool has handled this before: https://github.com/ocaml/opam/issues/4216
And the associated PR is probably a good reference of how to fix it: https://github.com/ocaml/opam/pull/4901


refactor with rubocop

Coverage remained the same at 74.34% when pulling 308741340bd7253edd1a833f05463ee599d01d09 on sunny4381:refactor-with-rubocop-20150410 into be835001008549dc22bab0aaa5d9aa1bdee6498d on shirasagi:master.

Already Fixed.


Hostcentral mirror is gone

[x] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
[x] I have searched the existing issues and I'm convinced that mine is new.
Describe the bug
The mirror "Hostcentral (HTTP,Melbourne, Australia)" appears to have deleted their opnsense mirror. The URL returns 404 now for the top-level directory http://mirror.as24220.net/opnsense/
To Reproduce

Select "Hostcentral (HTTP,Melbourne,Australia)" in System -> Firmware -> Settings
Attempt to update opnsense firmware.

Expected behavior
Mirror provides updates.
Relevant log files
# opnsense-update
Updating OPNsense repository catalogue...
pkg-static: http://mirror.as24220.net/opnsense/FreeBSD:11:amd64/19.7/latest/meta.txz: Not Found
repository OPNsense has no meta file, using default settings
pkg-static: http://mirror.as24220.net/opnsense/FreeBSD:11:amd64/19.7/latest/packagesite.txz: Not Found
Unable to update repository OPNsense
Error updating repositories!

Environment
OPNsense 20.1.r_12-amd64

@fukawi2 thanks for the report! I contacted the maintainer for assistance.

It's back now, pending a bit of audit in the next 24 hours. :)


rendering latest react Hello World app

Hi there! You might want to try our chrome branch: https://github.com/prerender/prerender/tree/chrome
That should work fine and we'll be merging that into master soon

Thanks for the reply, and sorry if this is not the right place to ask  ,when to expect that chrome renderer in netlify, or at lease accept the X-Prerender-Browser: chrome header (I've changed that)
Regards!

Great question. We will try to get in touch with Netlify and see if they are interesting in switching over to Chrome. It probably wouldn't be until we switch all of our users over to Chrome. We don't have a set date yet but we plan for it to be after the new year.

Feel free to reopen if the chrome branch didn't fix your issue!


AI can't build cattle farm,so AI can't update to engineer

i test it，when enable Industrialized Low Tier Production and Cattle needs to be butchered，AI don't build cattle farm,
delete Cattle needs to be butchered no avail，disable Industrialized Low Tier Production，AI quickly build cattle farm....then update to engineer

I think I am having the same issue ummm

There is an update on mod.io by kruila that fixes this.


⚠ Bofrost.at has degraded performance

In d5ca764, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 2039 ms

Resolved: Bofrost.at performance has improved in b87df8a after 6 minutes.


BAH-1747 | Added Malaria json and updated concepts

had a desk check with Akhil  and Gokul on Tuesday . one feedback was to change the label for problem severity which didn't work as expected, so we are going ahead with the existing concept name as confirmed by Akhil


Broken Demo

Demo doesn't seem to be working.

Can you check again?

After a bit of testing, it seems it's more of a UI issue. Yes, the filter does work but only after you click back on the map. In my opinion, it should trigger at the moment a checkbox is selected or deselected.

"The filter should be work at the check/uncheck time" maybe this request can be new feature. This not a bug. Because filter triggered at the popup closed.
If there is no selected any checkbox then the plugin does not need filter anything.


Error handling on lack of XML support on router

Fails on .open() when xml mode has not been enabled on remote device, but does not give any indication of the error being beyond opening the connection.

Started working on adding in some type of error catching and reporting. Suggestions would be helpful.

Maybe just returning what is in the stdin and the stdout in case of an exception would be good enough to have an idea on what the actual problem is.

added a specific error for this in version 0.10


c-ares gRPC library: fix a bug impacting gRPC's use of c-ares

Commit Message: c-ares gRPC library: fix a bug impacting gRPC's use of c-ares
Additional Description:
When a GoogleGrpc service is configured with a domain name and using C-Ares as a resolver results in an immediate disconnect.
The fix (https://github.com/c-ares/c-ares/commit/a070d7835d667b2fae5266fe1b790677dae47d25) is being imported as a patch until c-ares can be upgraded.
Risk Level: low
Testing: N/A
Docs Changes: N/A
Release Notes: Added
Platform Specific Features: N/A

/retest

Thanks @adisuissa! This LGTM.
I am wondering if we can upgrade c-ares to 1.21.0 that includes this fix.

It may be, but seeing that later versions were broken, I think it might be better to solve the current issue, and later upgrade to a new version of c-ares.

/assign @phlax
Context: users of Envoy v1.31 experienced an issue using a GoogleGrpc service, when the gRPC service needed to resolve a domain name. We tracked it down to a bug in C-Ares that was fixed in this PR.
We decided on cherrypicking this to avoid any complications in upgrading C-Ares to a new version.
After this is merged we will backport the fix to version 1.31.


Reflect 2.0.7 release

Codecov Report

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

@@            Coverage Diff            @@
##             master    #6091   +/-   ##
=========================================
  Coverage          ?   83.05%
  Complexity        ?    12446
=========================================
  Files             ?     1437
  Lines             ?    47087
  Branches          ?     5801
=========================================
  Hits              ?    39106
  Misses            ?     5283
  Partials          ?     2698

Continue to review full report at Codecov.

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


Update defaults in config.ini

I pushed this change into https://review.openstack.org/#change,1820


[feature] Detail textures

Implement detail texture blending
Additional context
Take a look at the Source SDK's DirectX 9 pixel shaders to see how they're incorporated into LightmapLitGeneric and VertexLitGeneric

Postponing to 0.11

Added in 4d9937e495c5c5142a8677890a63476d5589a69b


[tf.keras] Bugfix - Add Stateful Metrics to fit_generator

Description:
This should address the 2nd (of 3 issues) in https://github.com/tensorflow/tensorflow/issues/20529.
This is just a sync with Keras master branch also: https://github.com/keras-team/keras/blob/master/keras/engine/training_generator.py

Nagging Assignee @qlzh727: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Ping @fchoolet for review again.
Btw, the lint is failing for this PR. Please please accordingly.
https://source.cloud.google.com/results/invocations/9ec5867b-8d7f-4d5d-b5a1-13d9cce2271a/targets

Looks like this was refactored, going to close.


proposal: add admin dashboard for SaaS owner that enables CRUD operations on users/orgs db (think PHP my admin)

@iuioiua , I'd love to see this on v1 as I believe this is a core part for many SaaS products.
But I'm curious to know how you are thinking about the concept of orgs for Deno Hunt. What would users that belong to the same org share?

Frankly, I'd have to think about how we do this. At the moment, there's plenty of work to get done before v1. I think this can wait till after v1.

ah, got it! sorry, I thought that the v1 label you've added meant that you were prioritizing this task to get into that version.
what do you mean by this v1 label?

Ah, I must've accidentally added the v1 label. I've removed it now. I think having orgs and an admin dashboard with full read/write functionality is not needed for v1.


Copied the Postgres IsCustomSqlSyntax over for MySQL

Looks good to me... Will have to set up CI for this project in the future.
Thank you very much


!Here's Way To Watch UFC 310: Pantoja vs Asakura Live 𝐒𝐭𝐫𝐞𝐚𝐦𝐬 On TV Channel 7th December {2024}

UFC 310 promises thrilling fights right through the card. As well as the Pantoja vs Asakura headliner, unbeaten duo Shavkat Rakhmonov and Ian Machado Garry go toe-to-toe in a mouthwatering co-main event, which is a 5-round welterweight title eliminator. There’s also the eye-catching heavyweight showdown and a rematch between the former interim UFC champion, Ciryl Gane and former Bellator world champion, Alexander Volkov. Gane won by unanimous decision when the pair clashed in 2021.
Let GOAL help take you through all the essential info ahead of the mouthwatering UFC card in Nevada, including how to watch or stream all the octagon action and what time it’s all getting underway.
When is UFC 310?
UFC 310 will take place on Saturday, December 7, at the T-Mobile Arena in Paradise, Nevada, United States. The prelims get underway from 8pm ET (Sunday 1am GMT), with the main card starting at 10pm ET (Sunday 3am GMT). The octagon ring walk for the main event, Pantoja vs Asakura, is expected to take place at approximately midnight ET (Sunday 5am GMT).
FC 310 is taking place at the T-Mobile Arena, a multi-purpose indoor venue in Paradise, Nevada. Opened in 2016, it is the home arena of ice hockey team, the Vegas Golden Knights of NHL fame and is situated on the Las Vegas Strip. It has hosted various sports and entertainment events over recent years, including MMA, boxing, and wrestling. The UFC signed a long-term tenancy agreement in 2017, under which it agreed to host multiple events yearly at the arena. Earlier this year, both UFC 303: Pereira vs Prochazka 2 and UFC 300: Pereira vs Hill were held at the T-Mobile.
How to watch UFC 310 in the US
You can order UFC 310: Pantoja vs Asakura exclusively through ESPN+ in the US. Before purchasing, you need a subscription to ESPN+ to access the service’s PPV content. An ESPN+ subscription costs $11.99/month or $119.99/year. You must pay separately to access UFC 310 and any future pay-per-view events. The UFC 310 pay-per-view is $79.99. After purchase, you can live stream the event from compatible devices at home or on the go. ESPN+ allows simultaneous streaming on up to five devices for most content, but with UFC PPV events, you can only stream simultaneously on up to two devices.

bvb

vbvb

esrrytreyter

ertgregf


How can I set headers for resources in the public folder?

Environment

Operating System: Darwin
Node Version:     v18.16.1
Nuxt Version:     3.6.2
Nitro Version:    2.5.2
Package Manager<EMAIL_ADDRESS>Builder:          vite
User Config:      devtools, modules, css, app, routeRules, security, vite
Runtime Modules<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Build Modules:    -

Reproduction
/
Describe the bug
Hello!
I have a nuxt 3 app and when a certain 'boot' button is clicked a synth.worker.js file is loaded from my nuxt public folder. However, the file is not being loaded, in google chrome dev tools it says the file is being blocked by Cross-Origin-Embedder-Policy not being set and should be set to 'require-corp'.
I tried to use nuxt-security to add the Cross-Origin-Embedder-Policy and all the others, but it is still being blocked. I also tried to run some server/middleware file but it is not even triggered when the resource is dynamically requested.
How can I simply specifiy headers for static files in the public folder in nuxt 3????
Said file is located in /public/lib/scserver/scsynth.worker.js
This is my nuxt.config.ts:
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
    devtools: { enabled: true },
    modules: ['@nuxtjs/tailwindcss', '@pinia/nuxt', 'nuxt-security'],
    css<EMAIL_ADDRESS>    app: {
        head: {
            title: 'ColliderNFT',
            htmlAttrs: {
                lang: 'en'
            },
            script: [
                {
                    src: 'lib/scserver/scsynth.js',
                    body: true,
                    crossorigin: 'anonymous'
                }
            ]
        }
    },
    routeRules: {
        '/lib': { cors: true }
    },
    security: {
        headers: {
            crossOriginOpenerPolicy: 'same-origin',
            crossOriginResourcePolicy: 'cross-origin',
            crossOriginEmbedderPolicy: 'require-corp',
            contentSecurityPolicy: { 'frame-ancestors': ["'self'", 'https://localhost:3000'] },
            strictTransportSecurity: 'max-age=31536000; includeSubDomains'
        }
    },
    vite: {
        server: {
            headers: {
                'Access-Control-Allow-Origin': '*',
                'Cross-Origin-Embedder-Policy': 'require-corp'
            },
            cors: {
                origin: 'http://localhost:3000'
            }
        }
    }
})

Additional context
No response
Logs
No response

You can set headers using routeRules. Note that vite.server options are misnamed and only apply to the vite dev server which is not used by Nuxt.
export default defineNuxtConfig({
  routeRules: {
    '/lib/scserver/scsynth.worker.js': {
      headers: {
        // your headers
      }
    }
  },
})

You can set headers using routeRules. Note that vite.server options are misnamed and only apply to the vite dev server which is not used by Nuxt.
export default defineNuxtConfig({
  routeRules: {
    '/lib/scserver/scsynth.worker.js': {
      headers: {
        // your headers
      }
    }
  },
})

Thank you for the help. I tried your code but it is not working. However I noticed that in the network tab, the Initiator is 'other', maybe this means that this file is requested by another file, probably scsynth.js and not the main nuxt app? Could this be a reason that it is not going through the nuxt routes?

I managed to circumvent this issue by copy/pasting the code of the worker.js file inside my calling javascript file and simply using this:
const workerCode = `pasted worker.js file code here...`
const blob = new Blob([workerCode], { type: 'text/javascript' });
const workerUrl = URL.createObjectURL(blob);

All good. Thnx

Not really all good, this is just a hack around this issue.. We should be able to set headers for static files.. (I have the same problem with a worker file)

Guys, also stucked with emscripten files not served with the expected headers.
Middleware are not designed to do the job.
Plugins are inefficients, as we're speaking about static assets.
RouteRules doesn't works either.
Nitro config is quiet.
Nuxt config is silent.
It sucks, really. How are we supposed to deal with those kind of requirements?

Is it possible to do this in route middleware ?
I need to apply a locale variable in the header, which is not available in the nuxt.config file.

Did some digging - by reading this post I finally get it. (Thanks to AlanCodeLog)

you can't add headers through nuxt to public resources when using the dev server. You must set the headers using vite

Therefore, below is my vite config
export default defineConfig({
...
  server: {
    headers: {
      'cache-control': 'max-age=31536000'
    }
  }
});

run nuxt build (rebuild your outDir) then use npm start NOT npm run dev
@danielroe - Is this documented somewhere in the nuxt 3 docs? I can't seem to find any notes saying it will not take effect for outDir or public folders, maybe you could help me put a link here. Thanks!

Deleted my first post here's what works for me.
 (Thanks to AlanCodeLog)

you can't add headers through nuxt to public resources when using the dev server. You must set the headers using vite

Therefore, below is my vite config
export default defineConfig({
...
  server: {
    headers: {
      'cache-control': 'max-age=31536000'
    }
  }
});

But it doesn't take effect when u add it in the vite config, tried a few tests, and I'm back to using the routeRules - you just need to specify the proper route to your public files. Here's my nuxt config file
export default defineNuxtConfig({
 ...
  routeRules: {
    '/my-js-file.umd.js': {
      'headers': {
        'Cache-Control': 'public, no-cache, weszdasfwe'
      }
    }
  }
});

^ browser URL sample localhost:3000/my-js-file.umd.js
run nuxt build (rebuild your outDir) then use npm start NOT npm run dev. Run in Incognito for optimal results.
@danielroe - Is this documented somewhere in the nuxt 3 docs? I can't seem to find any notes saying it will not take effect for outDir or public folders, maybe you could help me put a link here. Thanks!

You should not have a vite.config if you are using Nuxt. You can set vite config within your nuxt config vite option.
But changing anything related to server will only impact your dev server. SorouteRules or nitro configuration or middleware is the correct approach.

@queroin Sorry maybe my comment wasn't clear. This must be done with a vite plugin that adds a middleware, for example, I use something like this, you can customize this further for different routes, etc:
// in some file somewhere (e.g. build/plugins/viteHeadersPlugin)
export function viteHeadersPlugin(headers: Record<string, string>): Plugin {
	return {
		name: "configure-response-headers",
		configureServer: server => {
			server.middlewares.use((_req, res, next) => {
				for (const key of Object.keys(headers)) {
					res.setHeader(key, headers[key])
				}
				next()
			})
		},
	}
}
// in nuxt.config.ts
//...
	vite: {
		plugins: [
			// you can also inline the plugin
			viteHeadersPlugin({
				"Access-Control-Allow-Origin":"*"
				// ...any other headers
			})
		]
	}
//...

vite.server.headers is ignored, I'm not 100% sure why.
@danielroe None of the recommended options work in the dev server. Both a recommended way + this must be used to get consistent behavior between dev and production.
Is routeRules supposed to already do this already when using the dev server but it doesn't? Because that would be ideal.
Also in a comment you wrote nuxt does not use the vite dev server... do you mean the vite server options? Is that why vite.server.headers is ignored? If that's on purpose should the types be changed to remove that property?

Setting headers for nitro public assets in production works just fine with this:
export default defineNuxtConfig({
  nitro: {
    routeRules: {
      '/my-route/**': {
        headers: {
          'cross-origin-embedder-policy': 'require-corp',
        },
      },
    },
  }
}

But in dev the header does not get set.

@danielroe

So routeRules or nitro configuration or middleware is the correct approach.

Is it intended that routeRules or nitro configuration doesn't work in DEV?
Maybe it's just a bug and should be reported?
If it is intended, then how could you call it "correct approach"? How to develop the app if headers will be set only in PROD? Other parts of the app could not work properly if for example they expect application/json but receive application/octet-stream...
I mean, these routeRules are important part of the configuration and should work identically in both DEV and PROD, or if this is not possible then their usage should be discouraged.

Should I open a bug for this, then? Because they definitely do not work in DEV mode in the same way as in PROD mode, at least with static files.
In this example /hello.txt route should return Content-type: application/json header, and it does work in the PROD mode, but doesn't work in the DEV mode, where Content-type: text/plain; charset=UTF-8 is returned.

An easy manner to know if the behaviour is good enough, is to reply to the
quick question : are we able to serve wasm using dev / prod server? As it
requires specific headers on assembly file, the answer should be yes,
otherwise the issue shouldn't be closed.
On Thu, 11 Apr 2024, 04:40 Ruslan Stelmachenko, @.***>
wrote:

Should I open a bug for this, then? Because they definitely do not work in
DEV mode in the same way as in PROD mode, at least with static files.
In this example
https://stackblitz.com/edit/nuxt-route-rules-dev?file=nuxt.config.ts
/hello.txt route should return Content-type: application/json header, and
it does work in the PROD mode, but doesn't work in the DEV mode,
where Content-type: text/plain; charset=UTF-8 is returned.
—
Reply to this email directly, view it on GitHub
https://github.com/nuxt/nuxt/issues/22141#issuecomment-2048835131, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAORHVPVSEXB2K4OPGO3WWTY4XZYVAVCNFSM6AAAAAA2KIKILKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBYHAZTKMJTGE
.
You are receiving this because you commented.Message ID:
@.***>

Please open a new issue with a reproduction if you are encountering an issue 🙏


Global variables in html file cause spurious eslint messages because eslint globals can not be configured

For reasons I have load a JavaScript file in CRA's index.html which defines a global variable.
CRA's eslint settings have "no-undef" set to error. Any use of the above-mentioned global variable will result in a compile error in the browser, preventing me from working.
Manually editing CRA's eslint settings to have "no-undef" be a warning is only a partial solution: I still get warnings in the console.
Manually editing the globals in CRA's eslint settings solves the problem, but is obviously not very elegant.
Ideally the development server would pick up on a .eslintrc file in the root of the project. (I've tried this, and it didn't work.)

Any use of the above-mentioned global variable will result in a compile error in the browser, preventing me from working.

You can read it explicitly from the window object, e.g. const $ = window.$.
This makes it obvious it's a global variable.
You can also force ESLint to ignore any line with // eslint-disable-line.

D'oh. Thanks :)

On 28 Oct 2016, at 12:53, Dan Abramov<EMAIL_ADDRESS>wrote:
Closed #972.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

It would be great to have this documented. Would you like to add this to the User Guide?

Sure. I'll send a PR.


Script does not work, error in line 3

While running the scripy i get this error:
Dowloading 1/2024
Traceback (most recent call last):
File "DownloadAllSnapchatMemories.py", line 33, in
file_name = urlparse.urlparse(url).path.split("/")[-1]
AttributeError: 'function' object has no attribute 'urlparse'
Any idea?

What version of python are you using? I didn't test it on 3.

It was on 3, but later I tried it on 2 and I got another error, 405 – method not allowed. Wysłane z aplikacji Poczta dla Windows 10 Od: Christian MemijeWysłano: wtorek, 7 kwietnia 2020 03:39Do: christianmemije/snapchat_memories_downloaderDW: Trollfurion; AuthorTemat: Re: [christianmemije/snapchat_memories_downloader] Script does not work, error in line 3 (#1) What version of python are you using? I didn't test it on 3.—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

Works on my end, try this: https://stackoverflow.com/a/45554697/5513404

Let me know if that works. 🤔


1.1.3-alpine fails with "ImportError: Error loading shared library libstdc++.so.6"

I get the following error when importing pandas in 1.1.3-alpine
  File "/usr/src/app/myapp.py", line 9, in <module>
    import pandas as pd
  File "/usr/local/lib/python3.8/site-packages/pandas/__init__.py", line 52, in <module>
    from pandas.core.api import (
  File "/usr/local/lib/python3.8/site-packages/pandas/core/api.py", line 29, in <module>
    from pandas.core.groupby import Grouper, NamedAgg
  File "/usr/local/lib/python3.8/site-packages/pandas/core/groupby/__init__.py", line 1, in <module>
    from pandas.core.groupby.generic import DataFrameGroupBy, NamedAgg, SeriesGroupBy
  File "/usr/local/lib/python3.8/site-packages/pandas/core/groupby/generic.py", line 57, in <module>
    from pandas.core.aggregation import (
  File "/usr/local/lib/python3.8/site-packages/pandas/core/aggregation.py", line 27, in <module>
    from pandas.core.series import FrameOrSeriesUnion, Series
  File "/usr/local/lib/python3.8/site-packages/pandas/core/series.py", line 4983, in <module>
    Series._add_series_or_dataframe_operations()
  File "/usr/local/lib/python3.8/site-packages/pandas/core/generic.py", line 10511, in _add_series_or_dataframe_operations
    from pandas.core.window import (
  File "/usr/local/lib/python3.8/site-packages/pandas/core/window/__init__.py", line 1, in <module>
    from pandas.core.window.ewm import ExponentialMovingWindow  # noqa:F401
  File "/usr/local/lib/python3.8/site-packages/pandas/core/window/ewm.py", line 9, in <module>
    import pandas._libs.window.aggregations as window_aggregations
ImportError: Error loading shared library libstdc++.so.6: No such file or directory (needed by /usr/local/lib/python3.8/site-packages/pandas/_libs/window/aggregations.cpython-38-x86_64-linux-gnu.so)

thanks for bringing this to my attn; looks like apk add --no-cache libstdc++ fixes the issue. I will update the image shortly.

this should be resolved once this build succeeds


Scene2d TextArea does not scroll by itself or when it is inside a ScrollPane

There was a fix posted on stackoverflow that involved setting the preferred rows but it breaks on some cases and is more of a hack.
I've tried the following solutions to no avail:

Outer container containing ScrollPane which contains TextArea
Problem: Outright doesn't scroll
Outer container and inner container containing TextArea with widths and heights
Problem: Will scroll but as more text is entered it will start deleting old text or something else funkier
Setting prefRows to change with the increasing lines in TextArea
Problem: Same issue as #2 but would take longer for that to happen. If you enter a lot of lines you can notice that something is definitely wrong.

Your first try should let you scroll if you use container.height/container.width to be smaller than the TextArea size.

https://github.com/libgdx/libgdx/issues/3796#issuecomment-202729107


Confusing React Native with the Start Up

So I brought this up a while ago and while this isn't a true bug, it is a weird occurrence.
Whenever running the startup by calling ControllerRegistry.setRootController('App'); it runs the app, everything good.
I have a dummy route hooked up to it just to get a view to load, just happens to be the login view (its the only one that works right now) which I call as so: <NavigationControllerIOS {...routes.login} /> Routes has this:
login: {
        id: 'login',
        title: 'Login',
        component: 'Login',
        style: {
            navBarTextColor: '#000',
            navBarBackgroundColor: '#f7f7f7',
            statusBarTextColorScheme: 'dark',
        },
    },

I require the Login above, I want to make this conditional to speed up start times. But different issue for a different day.
Checking in the debugger, and because this is the viewed app, React thinks that this is the core of the application. Not the Root element that is being set ('App' in this case).
AppRegistry.js:82 Running application "Login" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF

Its not causing development troubles, but I am interested as to why this is.

As far as I understand, every time RN loads a new RCTRootView with a component inside (Login in your case), it displays a console.log with the message you see (Running application "Login" with appParams)
I think they chose the wording of this message poorly, because what they mean is that a new RCTView was loaded, but they say that a new app is being run. Since the majority of RN apps have a single RCTRootView, an app === RCTRootView.
In our case this is not true of course because we have several RCTRootViews.

That makes sense, so RN is just under the impression that screen it starts on is the main app. This makes sense. Thanks for clearing that up, didn't know if this was truly an issue or not.


Accessibility: Color Contrast Header Links

The links in the header fail some contrast ratio accessibility tests, for example Lighthouse Audit in Chrome Dev Tools. Might be a good thing to tweak this.

Yeah I think this is a good idea! Could you maybe document exactly where it fails the accessibility tests?

As far as I see it's just the lightblue links in the header, if the header has a lightgrey background. I hope that helps.
You can check it if you open chrome dev tools, go to audits tab and select the "accessibility" checkbox, then generate the report.


Chunking not working properly?

So I have this code.
const muxer = new Mp4Muxer({
  target:  new StreamTarget({
    onData: async (data: Uint8Array, position: number) => {
      console.log(data, position);

      // this function performs a write to file via stream (fs.createWriteStream method)
      window.desktop.writeChunkStream(data);
    },

    // looks like this one is bugged? it doesn't send all the correct data
    chunked: true,
    chunkSize: 8 * 2 ** 20,
  }),
  fastStart: "fragmented",
  firstTimestampBehavior: 'offset',
});

I have a test video which is 2minutes and 48 seconds long. around 110MB
If I remove chunked and chunkSize parameter, everything works correctly, my video is also correctly written without any loss. will generate 2:48 with 110MB
If I add those parameter back, It would build the video but it's an incomplete one. like it would only generate a 12 second video but with the same size 110MB.
Using the logs, I am receiving the data with different position everytime (so I guess it doesn't send an identical data) but I noticed that I am getting 2 sets of data that is not identical in chunkSize even if I specifically added a chunkSize:

Hi!
Why aren't you passing position here?
window.desktop.writeChunkStream(data);

The position is just as important as the data itself and has to be respected. It's not an append-only buffer.

I see, thanks for the idea.
At first I did not used the position because I was using fs.createWriteStream which does not accept a position argument
const writableStream = createWriteStream(filePath);
writableStream.write(chunk);
...

So after your comment I realized I needed a different approach.
So for other people that will have the same question, this is what I had to do:
const writeStreams = {};

function openFile(filePath) {
    fs.open(filePath, 'w', (err: NodeJS.ErrnoException | null, fd: any) => {
      if (err) {
        console.error('Error opening file:', err);
        e.reply(`write-stream-error-${id}`, err.message);
        return;
      }
      writeStreams = { fd, filePath, writePromise: null };

      e.reply(`write-stream-started-${id}`);

      return;
    });
}

function writeChunk(chunk, position) {
    const { fd } = writeStream;

    writeStream.writePromise = new Promise((resolve, reject) => {
      fsWrite(fd, chunk, 0, chunk.length, position, err => {
        if (err) {
          reject(err);
          return;
        }
        resolve();
      });
    });
}

async function end() {
    const { fd, writePromise } = writeStream;

    try {
      if (writePromise) {
        await writePromise;
      }
      fsClose(fd, (err: NodeJS.ErrnoException | null) => {
        if (err) {
          return;
        }
        e.reply(`write-stream-ended-${id}`);
      });
    } catch (err: any) {
      console.error('Error ending write stream:', err);
    }
}

call openFile first, then initate mp4 muxer and call writeChunk when you receive the data, then end once everything is done.

Awesome, and thanks for the code. Is the file correct now, even using chunked mode?

Awesome, and thanks for the code. Is the file correct now, even using chunked mode?

Yes the file is correct now, I guess my remaining question is why I am getting 2 different chunkSizes in the data despite of the chunkSize that I set?

The chunk with the small size looks like it's out of order, if you add 608 to 66550696 you don't get the position of the next chunk. So it probably corrected some bytes that have already been written before, in which case it doesn't make sense to use the full chunk size just to write 608 bytes.


Add Inertial gravity wave test group

This PR adds a convergence study for the inertial gravity wave from Sid's paper
Note that this case relies on the linearization options added to MPAS-Ocean by @mark-petersen in https://github.com/E3SM-Project/E3SM/pull/5662.

Checklist

[x] User's Guide has been updated
[x] Developer's Guide has been updated
[x] API documentation in the Developer's Guide (api.md) has any new or modified class, method and/or functions listed
[x] Documentation has been built locally and changes look as expected
[x] Testing comment in the PR documents testing used to verify the changes
[x] New tests have been added to a test suite

Testing:
The convergence test case runs a 200, 100, and 50 km case for 10 hours and compares the errors against the exact solution:

@sbrus89 I'll review this tomorrow

@xylar Would you like to re-review this PR or is it ready for me to merge? The E3SM PR is in now.

Thanks @xylar  and @cbegeman!


PhyloPic DAG detects no content even when data exists

Description

The PhyloPic provider DAG was recently activated. It is a @daily DAG which attempts to pull image data for the current day on each run. So far, it consistently reports No content available! and returns 0 rows.
This appears to be in error, since the API should be returning data for the provided dates. For example: http://phylopic.org/api/a/image/list/modified/2020-02-24
Reproduction

Run the PhyloPic provider DAG in Airflow and check the logs of the pull_image_data task.
Resolution

[ ] 🙋 I would be interested in resolving this bug.

Interestingly enough, we've had a few successful PhyloPic runs since then!

It turns out that the API path we're using is all records modified since  rather than all records modified on : http://phylopic.org/api/#method-image-time-range
That would explain why reruns would net us more data, because those runs include all the data that's been updated since then. This ticket can be closed, and we'll address appropriate time bounding in #410


Cypress/E2E: Fix cloud onboarding tests

Summary

updated onboarding process with the last change related to notification setup
separated specs into 3 files since other tests require mocking to response. Also, it makes it easier for test maintenance and promotion.
added @cloud_only metadata so it can be filtered for Cloud tests only.

Ticket Link
failed on daily Cypress run
Screenshots

I don't see it happening on my local test. It's related to browser's notification permission. The test code is not denying anything there. Do you remember if you denied notification permission in your browser (being used by Cypress) before/during testing?
I think this is an interesting find but I don't have any workaround currently. I suggests to leave it as is and then let's observe once it gets to daily test run.

/release-note-none


Bug: Fixing the width of embided MAP

assign this to me

Hi there, I'm a beginner at open-source contribution so I want to gain hands-on experience by contributing to this project through GSSOC'24.Please kindly requested to you to assign me #706 issue to me .


any we can synchronize zoom, tooltip and scroll movement of multiple charts

C3 version:
D3 version:
Browser:
OS:

Examples for tooltip synchronization:
https://github.com/c3js/c3/issues/2769


Optimize frame stats collection

Checklist

[x] I have read the Contributor Guide
[x] I have read and agree to the Code of Conduct
[x] I have added a description of my changes and why I'd like them included in the section below

Description of Changes
Optimize UI performance by calculating frame collection statistics dynamically. Rather than repeatedly traversing each frame, we now update the stats upon adding or removing frames. This change mitigates the significant overhead caused by constantly accessing frame data protected by RwLock.
Before:

After:

Can you perhaps share before/after of the puffin_viewer and the puffin_egui ui being used in our project? The flamegraph is great but find it hard to compare it in concrete numbers. Would like to see some before after milliseconds per call comparison over maybe 50 frames or something.

Sure! Here the diff at about 10k frames collected over all visible frames (~130 frames)
Before:

After:

Bench suite results:
     Running benches/benchmark.rs (target/release/deps/benchmark-901adb2054ed4cfe)
Gnuplot not found, using plotters backend
profile_function        time:   [92.987 ns 93.116 ns 93.245 ns]
                        change: [+2.3880% +2.6026% +2.7907%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 8 outliers among 100 measurements (8.00%)
  3 (3.00%) low mild
  5 (5.00%) high mild

profile_function_data   time:   [94.111 ns 94.315 ns 94.545 ns]
                        change: [+4.0430% +4.2868% +4.5814%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 7 outliers among 100 measurements (7.00%)
  1 (1.00%) low mild
  4 (4.00%) high mild
  2 (2.00%) high severe

profile_scope           time:   [55.464 ns 55.526 ns 55.597 ns]
                        change: [-0.8271% -0.6438% -0.4595%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Found 8 outliers among 100 measurements (8.00%)
  7 (7.00%) high mild
  1 (1.00%) high severe

profile_scope_data      time:   [55.985 ns 56.091 ns 56.196 ns]
                        change: [-0.7037% -0.4836% -0.2839%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild

profile_function_off    time:   [1.0572 ns 1.0577 ns 1.0581 ns]
                        change: [-18.809% -18.318% -17.755%] (p = 0.00 < 0.05)
                        Performance has improved.

profile_function_data_off
                        time:   [1.0556 ns 1.0556 ns 1.0557 ns]
                        change: [-0.0008% +0.0055% +0.0115%] (p = 0.09 > 0.05)
                        No change in performance detected.
Found 7 outliers among 100 measurements (7.00%)
  2 (2.00%) low mild
  4 (4.00%) high mild
  1 (1.00%) high severe

profile_scope_off       time:   [1.0556 ns 1.0556 ns 1.0557 ns]
                        change: [-0.0094% -0.0018% +0.0053%] (p = 0.64 > 0.05)
                        No change in performance detected.
Found 7 outliers among 100 measurements (7.00%)
  2 (2.00%) low mild
  5 (5.00%) high mild

profile_scope_data_off  time:   [1.0588 ns 1.0592 ns 1.0597 ns]
                        change: [-20.498% -20.131% -19.842%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 6 outliers among 100 measurements (6.00%)
  3 (3.00%) low mild
  3 (3.00%) high mild

The only relevant benchmark for the changes is flush_frames. We could expect flush_frames performance to regress due to added complexity, specifically caching stats on add_frame calls but the benches show no change in sending frames performance.

Cool, thanks for doing the bencharks and posting the stats. If the benchmark proves there is not to much overhead I'm happy to merge the code! Think its not a disaster if we make the flush frame slightly longer as at least its predictable. One can argue tho that viewing statistics is less important then profiler performance.

@andreiltd what happened here? :) Not relevant anymore after pivot?

@kondrak I will add an entry to changelog as requested by @Hoodad  and it should be ready to go.


Makefile instead of the build_dependencies.sh script

libtiff update
No more image libraries in lib folder. Instead those files are taken directly from the libtiff-ios folder, where they are built.
No more leptonica & tesseract libraries in the lib folder of the repository. Instead those binaries are built automatically directly when run button in xCode is pressed
No more build_dependencies script. Makefile instead to build Tesseract and all dependent libraries.
An extra build phase has been added to the Tesseract OCR iOS framework. This phase simply runs the Makefile and build all the dependencies if necessary.
Readme files have been updated to mention above changes.

@kevincon, I've removed build script with the Makefile.
Advantages of this change:

GNU make utility figures out automatically which files it needs to update, based on which source files have changed. It also automatically determines the proper order for updating files, in case one non-source file depends on another non-source file.
As a result, if you change a few source files and then run Make, it does not need to recompile all of your program. It updates only those non-source files that depend directly or indirectly on the source files that you changed. So there is no need to rebuild everything if only one dependent library has been updated or even only one file in the library. You may check this behavior just pressing run button from Xcode, since I've added this Makefile as a prebuilt phase to the Framework target. Very first build will take about half of an hour, but every next will very fast, since there is no need to rebuild dependencies anymore (they are unchanged).
As a side effect of this, we do not have to add compiled binaries in the repo anymore. Any user gets them compiled right after they try to run the program. So we may purge all the binaries and leptonica and tesseract sources from the repo and significantly decrease its size.
I've also added -O2 compile option to the leptonica and tesseract building phase, so they should work faster now.

Pls, try this and let me know what do you think about the whole idea.

@kevincon , the build has failed cause liftiff-ios is configured to be built with iOS SDK 8.4. But in our tests we use 7.1 and 8.1 versions. I'll fork libtiff-ios and modify it to support any SDK version very soon, but so far you may try the PR with SDK 8.4.

You may also try common clean targets as follows:
     make mostlyclean // removes everything besides the results of the build procedure. No intermediate files.
     make clean //removes all object files but save the Makefiles made by GNU configure. So there is no need to reconfigure
     make distclean // removes all object files and Makefiles. So the distributive gets back to its initial state

I like the idea of converting the build script to a Makefile for the reasons you mentioned, but I think you need to update the podspec as well since the libs wouldn't be part of the repo anymore.
But before you do that, wouldn't making the Makefile run as part of the TesseractOCR target cause users of the CocoaPod to have to build the libs every time they install the pod in a new project (which takes a long time, as you mention in the README)? If that's the case, I don't think we should make this change because I think that's unreasonable for every user to have to wait that long when they add the Pod to a project.
Instead, would it be possible to add a brand new target to the project that represents building the libs using the Makefile so that it's easier for users to do that if they want to (and we still get the other Makefile benefits), but then also still have the libs included in the repo so that CocoaPod users don't have to build them when they add the Pod to a project? And maybe the existing TesseractOCR target would be smart enough to know that, since the libs are included in the repo, they don't have to be rebuilt if the user doesn't need them to be rebuilt?

I like the idea of converting the build script to a Makefile for the reasons you mentioned, but I think you need to update the podspec as well since the libs wouldn't be part of the repo anymore.

What update do you mean? Sorry, I don't understand what is necessary here.

wouldn't making the Makefile run as part of the TesseractOCR target cause users of the CocoaPod to have to build the libs every time they install the pod in a new project (which takes a long time, as you mention in the README)?

Yes, the lib is completely compiled on every installing the pod in a new project. But how often do you install new projects? That's a tradeoff between first compile time and repo size. So far the repo size is already about 350Mb and it will significantly grow further, since in the xcode 7 bitcode has appeared. It significantly increases the size of every architecture slice, almost doubles, if I'm not mistaking. Anyway, In my humble opinion 350Mb for the wrapper is quiet big, we do not have so much code in our repo ^.^
Is it possible to make a survey in hithub to ask our users about this tradeoff? What do they choose? Do they think the biuld time is preferrable or the repo size?

but then also still have the libs included in the repo so that CocoaPod users don't have to build them when they add the Pod to a project? And maybe the existing TesseractOCR target would be smart enough to know that, since the libs are included in the repo, they don't have to be rebuilt if the user doesn't need them to be rebuilt?

I thought about it. I may include the precompiled libs binaries back to the repo. In such case we even do not need the separate target. GNU Make utility will just do nothing since the target is already at the place.

@kevincon, just an example. In the bitcode branch I've uploaded 58.61 MB of just a libtesseract_all.a. And I've even received a warning from the github:
remote: warning: GH001: Large files detected.
remote: warning: See http://git.io/iEPt8g for more information.
remote: warning: File TesseractOCR/lib/libtesseract_all.a is 58.61 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB

But besides only libtesseract_all.a, there are leptonica and image binaries.
So it seems that every next binary upload will significantly increase repo size. So I think we should definitely address this issue very soon.

@kevincon, how do you like an idea of building the dependencies right in pod install phase? it will take the same time, but at least it would happen during installing the pod instead of building the project for the first time?
Purhaps, there are also another ways to decrease repo size besides the one I've proposed in this PR?

I like the idea of converting the build script to a Makefile for the reasons you mentioned, but I think you need to update the podspec as well since the libs wouldn't be part of the repo anymore.

What update do you mean? Sorry, I don't understand what is necessary here.

The podspec file (TesseractOCRiOS.podspec in the root of the repo) is what CocoaPods uses to determine how to install the library in a user's project when they run pod install. Right now there's a line in that file that tells CocoaPods that it can find the static Tesseract libs in the repo so that CocoaPods can copy it into the user's project:
 s.ios.vendored_library    = 'TesseractOCR/lib/*.a'

So if we were to merge this PR right now, pod install would break for users since these libs are no longer included as part of your changes.

Yes, the lib is completely compiled on every installing the pod in a new project. But how often do you install new projects?

I don't think the important point is how often users install new projects; I think the important point is the user's perception about the library based on their experience installing it.

@kevincon, how do you like an idea of building the dependencies right in pod install phase? it will take the same time, but at least it would happen during installing the pod instead of building the project for the first time?

I timed how long it takes to run pod install with just TesseractOCRiOS release version 4.0.0 as a dependency:
3.26s user 0.67s system 68% cpu 5.771 total

I also timed how long it takes to run make to build the libs with the changes from this PR:
1808.37s user 333.38s system 213% cpu 16:42.24 total

1808.37 seconds (30 minutes and 8 seconds) is ridiculously long for a user to wait to start using this library, regardless of whether that time is part of pod install or whether it's the part of building their project for the first time in Xcode.
To be clear, I will not merge this pull request if it results in imposing that kind of time on users when they install this library.

That's a tradeoff between first compile time and repo size. So far the repo size is already about 350Mb and it will significantly grow further, since in the xcode 7 bitcode has appeared. It significantly increases the size of every architecture slice, almost doubles, if I'm not mistaking. Anyway, In my humble opinion 350Mb for the wrapper is quiet big, we do not have so much code in our repo ^.^

It's an easy choice from my point of view to choose having a larger repo over the long compilation time that this PR introduces for users.
As yet another data point, I timed how long it takes to clone this repo (from HEAD in master):
21.70s user 6.44s system 37% cpu 1:15.12 total

I'm personally happy as long as that time stays under a minute, and I don't think users will complain that they're about to run out of hard drive space as part of using this library.

Is it possible to make a survey in hithub to ask our users about this tradeoff? What do they choose? Do they think the biuld time is preferrable or the repo size?

I can't think of a great way to do this given our resources right now. We could start a mailing list for users interested in providing their opinions on these kinds of questions, but otherwise I think the best thing we can do is to create a new issue on the repo to ask users what they would prefer.

I thought about it. I may include the precompiled libs binaries back to the repo. In such case we even do not need the separate target. GNU Make utility will just do nothing since the target is already at the place.

I think the best thing to do is to put the pre-compiled lib binaries back in the repo so that users don't have to build them when they install the library (or build it for the first time).

@kevincon, just an example. In the bitcode branch I've uploaded 58.61 MB of just a libtesseract_all.a. And I've even received a warning from the github:

remote: warning: GH001: Large files detected.
remote: warning: See http://git.io/iEPt8g for more information.
remote: warning: File TesseractOCR/lib/libtesseract_all.a is 58.61 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB

But besides only libtesseract_all.a, there are leptonica and image binaries.
So it seems that every next binary upload will significantly increase repo size. So I think we should definitely address this issue very soon.

You're right that GitHub recommends that individual files be less than 50 MB, but this is an arbitrary recommendation on their part, so I'm not concerned about it. In reality, the only true limit we face is the 1 GB limit that GitHub imposes on public repos.
I agree that we should address the issue of a growing repo size, but not at the expense of our users' experience installing the library.

Purhaps, there are also another ways to decrease repo size besides the one I've proposed in this PR?

I propose that we simply purge the repo of older versions of the libs anytime we update them. One trade-off I can think of is that if users check out a specific past commit of the repo (say commit X) then the libs they see at that commit will be the libs from HEAD as opposed to the actual libs that were part of the repo at the time of commit X. However, I think that this issue is somewhat mitigated by the fact that users can download a zip file from the Releases page that has a preserved copy of the libs from the time of each release.
There is a tool called BFG Repo-Cleaner that we can use to do this: https://rtyley.github.io/bfg-repo-cleaner. What do you think?

ok. That's make sence. I'll add libs back.

ok. I've added back the libraries binaries.
But it seems, that travis build is no longer started again.

I've removed prebuilt make from the run phase.
But it's still there during the travis build. Just let me know, if I should remove building dependency libs phase from travis build.

Thanks for putting the libs back, but it looks like you put back a folder for leptonica-1.71 while the Makefile is hard-coded to look for leptonica-1.72. This results in a bug with the Makefile; if you try to run make clean directly from this pull request, it goes into an infinite loop with the error below (I think because the leptonica-1.72 folder doesn't exist by default, but regardless it should just fail gracefully instead of inifinte looping). Can you make sure that the lib binaries and headers in the repo are all the most recent versions of leptonica, libtiff, etc., then can you fix make clean and double-check that all of the other Makefile commands work?
/bin/sh: line 0: cd: /Users/kcon/Sources/Tesseract-OCR-iOS/TesseractOCR/leptonica-1.72/arm-apple-darwin7/: No such file or directory
for folder in  /Users/kcon/Sources/Tesseract-OCR-iOS/TesseractOCR/leptonica-1.72/arm-apple-darwin7/  /Users/kcon/Sources/Tesseract-OCR-iOS/TesseractOCR/leptonica-1.72/arm-apple-darwin7s/  /Users/kcon/Sources/Tesseract-OCR-iOS/TesseractOCR/leptonica-1.72/arm-apple-darwin64/  /Users/kcon/Sources/Tesseract-OCR-iOS/TesseractOCR/leptonica-1.72/i386-apple-darwin/  /Users/kcon/Sources/Tesseract-OCR-iOS/TesseractOCR/leptonica-1.72/x86_64-apple-darwin/; do \
		cd $folder; \
		/Applications/Xcode.app/Contents/Developer/usr/bin/make clean; \
	done ; \

Can you also fix the two warnings on the TesseractOCR target? The way we resolved those before was by manually editing the affected Tesseract source files to add (int) casts (see https://github.com/gali8/Tesseract-OCR-iOS/pull/120 when we talked about it before).
Also I think it's okay for the libs to be built as part of the Travis build.

Regarding #120. I've created a [PR] (https://github.com/tesseract-ocr/tesseract/pull/65) to the upstream repo.
So let's wait a bit, while they review it and merge.
Regarding make script. I'll double check it soon.

Ok. I've fixed the issue.
It was due to a lack of the defendant lib sources.
The script tried to change the directory to the lib source folder and failed.
So I've added a condition to check if the sources exist.
So it should work now.
I've also checked other targets as well and they do work.

Regarding #120. I've created a PR to the upstream repo.
So let's wait a bit, while they review it and merge.

No, please fix those files in include/ now as part of this PR. Upstream tesseract has 14 open PRs, so I doubt they review them often (if at all?). In the meantime, we shouldn't expose our users to any compilation warnings.
Related, I think we should specify specific tags for the submodules so that we have some indication that they're stable (while preserving the ability to easily upgrade them in the future). We can do this by modifying the .gitmodules file to point to the tag of a stable release. I created a new issue to do this (#214) and to update the libs accordingly (e.g. I noticed that upstream Tesseract finally released version 3.04 last month, so we should make the tesseract-ocr submodule point to the 3.04 release tag). Let me know if you'd like to take care of this issue; otherwise I'll do it when I have some time.

Ok. I've fixed the issue.
It was due to a lack of the dependent lib sources.
The script tried to change the directory to the lib source folder and failed.
So I've added a condition to check if the sources exist.
So it should work now.
I've also checked other targets as well and they do work.

Thanks for fixing it, it works for me now. Once you fix the compilation warnings, I'll merge this PR.

No, please fix those files in include/ now as part of this PR. Upstream tesseract has 14 open PRs, so I doubt they review them often (if at all?). In the meantime, we shouldn't expose our users to any compilation warnings.

Yes, they do review PRs. But our one is low priority, I guess.
Anyway, I'll fix it.

so we should make the tesseract-ocr submodule point to the 3.04 release tag

I was going to do this as soon as we commit this PR.

Let me know if you'd like to take care of this issue; otherwise I'll do it when I have some time.

I would appreciate if you help me with this and take care about the upgrade. But be aware that Tesseract 3.04 has significantly changed the function to produce PDF output. So let me know if you need some help with upgrading our wrapper for this function or rewritting tests for it.
Thx!

Also, libtiff-ios has merged my Makefile I've created for them. So let me spend a few time to remove doublication code from our Makefile and simply use those code from libtiff-ios Makefile to build image libs.

Ok. I'm ready for this PR to be merged.
Anything I should correct in the last commit?

@kevincon, I'm thinking about modifying Makefile in such way, that instead of building all available architectures at every run, it takes active architecture exactly from the xCode, bash or any other caller environment.
So if the user tries to build a library for the i386 Simulator, only i386 architecture is built. If they try to run the library on a device, only the architecture necessary for that device is built. That will decrease the first built time from about 30 mins down to 5-6 minutes.
Is it an appropriate time for the user to wait to start using the library?
Even if it's not, it will decrease travis build time significantly (I expect about 2-3 times). Right now it takes about 20 minutes to build and test all the project.
If you think this is a necessary improvement, just create a ticket for it, and I'll try to implement it as soon as we finish tesseract upgrading.

That's ready to be merged as well.
In the last commit I've modified Makefile to respect ARCHS environment variable. So it's able to build only specified architectures. That's the same environment variable as xCode uses. So it's simple to add this Makefile as a prebuilt step to xCode build and only the active architecture is build. And it's possible to build only device targets (arms) to submit them to AppStore.
Due to above the Travis CI build has been decreased down to 10 minutes for unit tested target.
I've also modified Travis CI build matrix, so now every target is build with rebuilding dependent libraries and without it. That helps us ensure that 1. the binaries uploaded into the repo are correct and 2. the Makefile to build dependent libraries is not broken.


Simple auth within multi-requests

This patch adds a new 'authentication mechanism' for sub-requests within a multi-request, which simply gives them the same authentication as the parent multi-request. This is useful because it allows multi-reuqests without needing to get a token issued, as long as all of the sub-requests are intended to execute with the same authentication and privileges.
Implementation details:

As noted in the comments, this works by copying the results produced by the authentication procedure, so it skips needing to perform the authentication again.
This does rely on reaching directly into the rest_framework.request.Request's _request property. There didn't seem to be an obviously better way to attach the necessary information to it, since it has to survive passing through the initialize_request function.

 Using the explicit scram routes in the hopauth API to get a token would also require the archive API to parse the authorization headers it gets from the user, at least partially, I think, instead of just passing them through.
There is no security issue that I can think of with using the authtokens (the archive API would not need to expose them to the end user, even); they would just be somewhat awkward and inefficient to use in this situation. It's worth noting that using authtokens would require strictly more requests to the hopauth API (and so more latency) than using SCRAM auth (one request to begin the SCRAM exchange, one to complete it and get the token, and then finally a (multi) request to get the desired data using the token, while with HTTP SCRAM auth the completion of the SCRAM handshake also is the request for the desired data.) The multi-request is useful in either case, as it allows paying the latency cost only once to fetch two loosely connected bits of data. It would be possible to do two separate requests with a token, for a total of 4 requests of latency, which would be as bad as two double requests using HTTP SCRAM (although threading the state through two separate HTTP SCRAM handshakes would be tricky).

 Using the explicit scram routes in the hopauth API to get a token would also require the archive API to parse the authorization headers it gets from the user, at least partially, I think, instead of just passing them through.
There is no security issue that I can think of with using the authtokens (the archive API would not need to expose them to the end user, even); they would just be somewhat awkward and inefficient to use in this situation. It's worth noting that using authtokens would require strictly more requests to the hopauth API (and so more latency) than using SCRAM auth (one request to begin the SCRAM exchange, one to complete it and get the token, and then finally a (multi) request to get the desired data using the token, while with HTTP SCRAM auth the completion of the SCRAM handshake also is the request for the desired data.) The multi-request is useful in either case, as it allows paying the latency cost only once to fetch two loosely connected bits of data. It would be possible to do two separate requests with a token, for a total of 4 requests of latency, which would be as bad as two double requests using HTTP SCRAM (although threading the state through two separate HTTP SCRAM handshakes would be tricky).

Yeah I guess I was thinking of users authenticating with SCRAM once with scimma-auth to get their token, and then their token persists "forever" (until revoked) and can be used with their archive requests and passed through to scimma-auth rather than using SCRAM at that point. So the token would be used for both authentication and permissions and you could ignore the SCRAM after initially using it to setup your account with scimma-auth. Then you never incur the latency penalty of the SCRAM auth in day-to-day usage. But I agree that as things stand right now (no auth tokens), your way of multi-requests to cut down on latency of extra requests and extra SCRAM auth is good.


Escape key should hide find widget

version 1.24.0
OS Windows 10

Ctrl F to use find widget
Escape key to return to editing code

The escape key is ignored by the find widget.
Opt out for catching Ctrl - Z would also be good.

This is a more basic requirement for find requester to work like majority of other application environments than #31422.

Now unable to reproduce, will report when issue more defined.


Rework the NLU training data format page

Fixes #4063
Changes

Change the training data format from JSON to Markdown for all the examples
Add a general thematic note about how the various components work together
Move the Chatito part to the end (as it's mostly likely not relevant until they have learnt about the basic training format first)
Segregate synonyms from the other parts (since it doesn't affect the model)

Status (please check what you already did):

[x] made PR ready for code review
[x] updated the documentation
[x] reformat files using black (please check Readme for instructions)

@MetcalfeTom When does this get merged?

@msamogh Whenever you can catch it after the tests pass but before it is outdated with master 😄

Intense!

got it! 😆


reinstall packages even after one fails to reinstall

Currently pipx will exit immediately if a package fails to reinstall. This PR makes pipx continue reinstalling other packages after a failure, and print a summary of any failed packages at the end.

I didn’t compare the diff (I assume most is copy-paste and the only meaningful addition is the try block), but from what I can tell this should work well. One typo nitpick.

Yeah the code has mostly just been moved around, and the try/except was added. Would be nice if github added a highlight in the gutter to show lines of code that were moved.