Unable to close or re-open pull requests with buttons at the bottom

Description
I recently updated to 1.21.0 and am running into an issue now that I cannot close or re-open pull requests from the discussion page buttons at the bottom (neither with or without comment). I did not have this issue on our last version (1.19.4).
I am still able to open and close pull requests from the pull request listing (checking the boxes then clicking the close button).
I have not seen any error message be thrown in the UI.
Gitea Version
1.21.0
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots

Git Version
No response
Operating System
CentOS 7
How are you running Gitea?
Binary download from gitea distr. natively installed (command-line/service)
Database
MySQL/MariaDB

Sorry if I wasn't clear. I can click on it, the page refreshes, but nothing changes in the status of the pull request.

I'm having the same/similar issue. It's a Draft PR with one dependency.

You need to close all issues blocking this pull request before you can merge it

Tried closing via the PR listing, but then it says

Cannot batch close issues that you choose, because issue #115487 still has open dependencies

This seems backwards, a dependency should not prevent me from closing the PR.

I'm having the same/similar issue.

I don't think that's related. This issue occurs for me regardless of dependencies and does not throw any errors. It just reloads the page (as if the command would be processed) but the status of the PR does not change, no error given.

I'm having the same/similar issue.

I don't think that's related. This issue occurs for me regardless of dependencies and does not throw any errors. It just reloads the page (as if the command would be processed) but the status of the PR does not change, no error given.

Quote your issue:

Can you reproduce the bug on the Gitea demo site?
Yes

How to?

How to?

edit a file in a repo on a separate branch
create a PR from the branch comparison
attempt to close the PR from the comment tab on the PR (see screenshot)

On try.gitea.io:
1 & 2: edit a file in a repo on a separate branch, create a PR from the branch comparison

attempt to close the PR from the comment tab on the PR (see screenshot)

Double confirm: are you sure you can reproduce it on try.gitea.io? If yes, is it browser related? If no, is it custom-template related?

I can't see anything in our gitea log. Nothing in the browser console either. no errors on the page.
The behavior when checking the network request seems to be the following:

POST request to "comments"
response is a redirect: to the issue/pr URL.
POST request to the redirected URL.
response is the issue/PR page
GET request to the issue/PR page
response is the issue/PR page
with further loading of the page

has anything in that respect changed since 1.19?

are you sure you can reproduce it on try.gitea.io?

Yes absolutely. i just tested and verified. created a new issue, tried to close it. nada.

OK, seems Blink-based browsers have no problem (tested with edge and it works), so there may be something specific interop-wise with Pale Moon as a browser.

has anything in that respect changed since 1.19?

I think it's related to this one: https://github.com/go-gitea/gitea/pull/25258

Looks like that might be the problem yes. Clearly there are some issues depending on browser implementations in use as the fetch spec is pretty ambiguous when it comes to CORS, preflight and redirects and it's not guaranteed to work. You may want to revert that.

Looks like that might be the problem yes. Clearly there are some issues depending on browser implementations in use as the fetch spec is pretty ambiguous when it comes to CORS, preflight and redirects and it's not guaranteed to work.

Sorry I didn't see it ever used any CORS/pre-flight.
See the request from Firefox

Everything there is using standard browser implementations. I don't see anything trick. Any modern browser should work well with it.

You may want to revert that.

That change benefits a lot and is the future. I do not see any reason to revert.

Sorry I didn't see it ever used any CORS/pre-flight/fetch-redirects (the /-/fetch-redirect is a traditional POST FORM request to help to redirect, no JS fetch redirect)

I was assuming it was a fetch-redirect based on the response names. Please let me know exactly what requests you're making if you're convinces this is a web client issue. note that "standard browser implementations" in general means "Blink" but not everyone is using Blink.

I do not see any reason to revert.

Well as far as I know Goanna/UXP/Pale Moon is following the Fetch spec correctly! This is a problem as we do use gitea for our code development. If there is an issue with the implementation of Fetch in Pale Moon then please tell me what is wrong with it, as Gitea is literally the only WebUI where this problem seems to occur. Fetch is used everywhere and there have not been any reports otherwise. What exactly are the fetch API calls used here?

FTR, here are the network requests in Pale Moon.
It seems to be exactly the same as Firefox you posted.

I tested with PaleMoon, the problem is that PaleMoon doesn't send the expected form content:
The left one is firefox, the right one is palemoon

I think the root problem is here. PaleMoon doesn't support "SubmitEvent.submitter"

Pale Moon does NOT use Gecko. It is forked from Gecko and has been independently developed for the last decade.
Gecko in 2023 is pretty much equal to Blink because Google pays their bills to be the controlled "second vote" for any spec requests.
I looked at your quoted code, and noticed the lines you pointed out do not include the "status" attribute for the form submitted. I don't see how that is being transferred to Gitea:
// doRedirect does real redirection to bypass the browser's limitations of "location"
// more details are in the backend's fetch-redirect handler
function doRedirect(redirect) {
  const form = document.createElement('form');
  const input = document.createElement('input');
  form.method = 'post';
  form.action = `${appSubUrl}/-/fetch-redirect`;
  input.type = 'hidden';
  input.name = 'redirect';
  input.value = redirect;
  form.append(input);
  document.body.append(form);
  form.submit();
}

You synthesize a new form with "redirect:" and nothing else, so it would make sense that "status" isn't part of that submitted form...
How are you handling the form submission code, exactly? maybe this has less to do with the fetch redirect and more to do with submission. Are you triggering it from JS and if so, how?

You synthesize a new form with "redirect:" and nothing else, so it would make sense that "status" isn't part of that submitted form...
How are you handling the form submission code, exactly? maybe this has less to do with the fetch redirect and more to do with submission. Are you triggering it from JS and if so, how?

They are really not related. See my comment above, the problem is PaleMoon lacks SubmitEvent.submitter support.

I think the root problem is here. PaleMoon doesn't support "SubmitEvent.submitter"

Ah. that would do it, yes. We don't have the SubmitEvent interface at all, I think.
I can see about implementing that... but that won't be short term. Could you perhaps implement a workaround in Gitea in the interim?

I think the root problem is here. PaleMoon doesn't support "SubmitEvent.submitter"

Ah. that would do it, yes. We don't have the SubmitEvent interface at all, I think. I can see about implementing that... but that won't be short term. Could you perhaps implement a workaround in Gitea in the interim?

TBH, I don't know how to polyfill it .... how could the JS code know the real "submitter"? The low-level logic is:

For a tradtional form, when a users clicks a form button, its value will be also included in the form request
Now Gitea is using more and more fetch (AJAX) forms, to improve user experiences. So when a user clicks a "fetch form" button, the JS code must know the button and use its name/value to fill the form.

EDIT: This by the way underlines the problem using ?. everywhere -- any errors get silenced.

I think it is the correct usage of ?. because the submitter could be null in many cases IIRC. See the MDN: https://developer.mozilla.org/en-US/docs/Web/API/SubmitEvent/submitter If the submission was not triggered by a button of some kind, the value of submitter is null.

If the submission was not triggered by a button of some kind, the value of submitter is null.

I don't understand how that could be a valid scenario here. Your action is linked exclusively to a button, no?

The form could also be submitted by: JS code, Enter, etc. So in many cases submitter could be null, the framework should tolerate (work with) these cases, they are valid cases.

don't want to use normal form submission

Because tradition POST FORM causes too many problem (duplicate content, content lost, etc).  You can take a look at these related issues/PRs.

I hope there won't be any big hurdles porting this code :/

For myself, I also agree (and am doing my best) to keep compatibility. For this case, I already checked the MDN, it shows that all recent browsers have supported such feature for long time. I couldn't figure out which feature works with PaleMoon while which don't ahead ......

For myself, I also agree (and am doing my best) to keep compatibility. For this case, I already checked the MDN, it shows that all recent browsers have supported such feature for long time. I couldn't figure out which feature works with PaleMoon while which don't ahead ......

Hey I fully understand. The problem is that many specs these days are moving targets created almost exclusively by Google who benefit greatly from an implementation-first ecosystem, and we're often explicitly not included in any spec discussions or notifications (because we apparently pissed off the wrong people by existing independently, and Mozilla apparently hates us and has tried their best to cancel us -- including defamatory statements by Mozilla employees in official Mozilla chatrooms) so we can get blindsided by the sudden use of a less well-known addition that has had almost zero documentation or implementation notes attached (like this one). We're a small team, the whole of web specs is obscenely large, and have to be reactive as a result.
Conversely, the interesting part is that if something works on Pale Moon, it's pretty much guaranteed to work everywhere because we stick to established standards where we can.
I absolutely understand you're doing your best as well to stay compatible as broadly as possible, and that the previous method apparently caused issues for you (although we've never seen problems with duplicate or lost content in Gitea from Pale Moon...) so we're having to find a way around it. I just recapped the situation; it wasn't a complaint so please don't see it that way.

I've managed to find a tricky approach to polyfill.
Try "Polyfill SubmitEvent for PaleMoon #28441"

Thanks for trying to polyfill! So far Ive not had much luck porting stuff across on our end so it's probably going to be tricky because of our divergence from Gecko.

Try "Polyfill SubmitEvent for PaleMoon https://github.com/go-gitea/gitea/pull/28441"

I'm sorry but I don't how I could try that. I know nothing about Go...

Thanks for the pointers.
After struggling a little through installing from source (needing gcc (for CGO_ENABLED=1) for sqlite and all that jazz...) I can confirm that the 28441 branch works properly for closing/reopening issues from the comments page! 💙

Thanks for the quick turnaround here! I'm assuming this will be uplifted to 1.21.3? what's the planned release date for that?

You can use the nightly build.
@techknowlogick  Would you like to use "1.21-nightly" for the directory name? Then it doesn't need to explain again and again, and the FAQ can be removed.
https://docs.gitea.com/help/faq?_highlight=nightly#difference-between-1x-and-1xx-downloads-how-can-i-get-latest-stable-release-with-bug-fixes

Okay got it. I wasn't aware that "1.21" was "1.21-release-nightly". I generally don't want to run nightly builds on production but this is of course an exception. I'll update to 1.21.3 when it's out in due course.

Good news. That'll be soon.

I wasn't aware that "1.21" was "1.21-release-nightly"

I just don't want to repeat that "1.21 is 1.21-nightly" again and again, it confuses many users.

I generally don't want to run nightly builds on production but this is of course an exception.

There is no difference for stability between 1.21-nighty and 1.21.3. Actually, 1.21-nightly will become 1.21.3.


google cloud auth fails during online-sign

google cloud auth fails with 403 with

workload_identity_provider: projects/306323169285/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider
service_account<EMAIL_ADDRESS>
https://github.com/sigstore/root-signing-staging/actions/runs/7448247220
(note that the whole online-sign workflow is not expected to succeed yet -- but I did expect the cloud auth to work already)
Run google-github-actions/auth@67e9c72af6e0492df856527b474995862b7b6591
  with:
    token_format: access_token
    workload_identity_provider: projects/306323169285/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider
    service_account<EMAIL_ADDRESS>    create_credentials_file: true
    export_environment_variables: true
    universe: googleapis.com
    cleanup_credentials: true
    access_token_lifetime: 3600s
    access_token_scopes: https://www.googleapis.com/auth/cloud-platform
    retries: 3
    backoff: 250
    id_token_include_email: false
Created credentials file at "/home/runner/work/root-signing-staging/root-signing-staging/gha-creds-eb3faa947874d898.json"
Created credentials file at "/home/runner/work/root-signing-staging/root-signing-staging/gha-creds-f337[67](https://github.com/sigstore/root-signing-staging/actions/runs/7448247220/job/20262176293#step:2:76)300f[73](https://github.com/sigstore/root-signing-staging/actions/runs/7448247220/job/20262176293#step:2:82)3fac.json"
Created credentials file at "/home/runner/work/root-signing-staging/root-signing-staging/gha-creds-c213[82](https://github.com/sigstore/root-signing-staging/actions/runs/7448247220/job/20262176293#step:2:92)ff1d8e8444.json"
Created credentials file at "/home/runner/work/root-signing-staging/root-signing-staging/gha-creds-9d82ee105c98de37.json"
Error: google-github-actions/auth failed with: retry function failed after 4 attempts: failed to generate Google Cloud OAuth 2.0 Access Token for<EMAIL_ADDRESS>{
  "error": {
    "code": 403,
    "message": "Permission 'iam.serviceAccounts.getAccessToken' denied on resource (or it may not exist).",
    "status": "PERMISSION_DENIED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.ErrorInfo",
        "reason": "IAM_PERMISSION_DENIED",
        "domain": "iam.googleapis.com",
        "metadata": {
          "permission": "iam.serviceAccounts.getAccessToken"
        }
      }
    ]
  }
}

Issue was found, the WLI user was not properly configured. Working on fixing now...

This is working now, thanks Hayden.


Same topology.go info message keeps being logged by Antrea Agent

Describe the bug
On a new cluster, with Antrea just deployed, I noticed the same log message being spammed by each Antrea Agent over and over again:
I0920 21:18:50.183476       1 topology.go:138] "Skipping topology aware Endpoint filtering since Node is missing label" label="topology.kubernetes.io/zone"
I0920 21:18:50.183698       1 topology.go:138] "Skipping topology aware Endpoint filtering since Node is missing label" label="topology.kubernetes.io/zone"
I0920 21:18:50.183794       1 topology.go:138] "Skipping topology aware Endpoint filtering since Node is missing label" label="topology.kubernetes.io/zone"
I0920 21:18:50.183908       1 topology.go:138] "Skipping topology aware Endpoint filtering since Node is missing label" label="topology.kubernetes.io/zone"
I0920 21:18:50.184018       1 topology.go:138] "Skipping topology aware Endpoint filtering since Node is missing label" label="topology.kubernetes.io/zone"
I0920 21:19:20.188511       1 topology.go:138] "Skipping topology aware Endpoint filtering since Node is missing label" label="topology.kubernetes.io/zone"
I0920 21:19:20.188625       1 topology.go:138] "Skipping topology aware Endpoint filtering since Node is missing label" label="topology.kubernetes.io/zone"
I0920 21:19:20.188725       1 topology.go:138] "Skipping topology aware Endpoint filtering since Node is missing label" label="topology.kubernetes.io/zone"
I0920 21:19:20.188890       1 topology.go:138] "Skipping topology aware Endpoint filtering since Node is missing label" label="topology.kubernetes.io/zone"
I0920 21:19:20.188974       1 topology.go:138] "Skipping topology aware Endpoint filtering since Node is missing label" label="topology.kubernetes.io/zone"
I0920 21:19:50.191431       1 topology.go:138] "Skipping topology aware Endpoint filtering since Node is missing label" label="topology.kubernetes.io/zone"
I0920 21:19:50.191712       1 topology.go:138] "Skipping topology aware Endpoint filtering since Node is missing label" label="topology.kubernetes.io/zone"
I0920 21:19:50.191802       1 topology.go:138] "Skipping topology aware Endpoint filtering since Node is missing label" label="topology.kubernetes.io/zone"
I0920 21:19:50.191906       1 topology.go:138] "Skipping topology aware Endpoint filtering since Node is missing label" label="topology.kubernetes.io/zone"
I0920 21:19:50.192097       1 topology.go:138] "Skipping topology aware Endpoint filtering since Node is missing label" label="topology.kubernetes.io/zone"

This was probably introduced by #6604 or #6607. cc @hongliangl
It needs to be addressed before the next release.
Versions:
Antrea version: v2.2.0-dev-5b80425 (current main)
K8s version: v1.29.2

I'll take a look.


chore: Update replica to 936bf9cc

The included 128-bit cycles support is needed in order to upgrade to Motoko 0.6.21.
This isn't the latest replica, because darwin binaries weren't generated for the latest replica (see https://gitlab.com/dfinity-lab/public/ic/-/merge_requests/2914?commit_id=d45fbb038ab9cb993fce2e84e46d86b0b0a1ece7 for work in progress to fix).

The e2e/start.bash tests are failing after killing the replica process.  When the replica process tries to restart, it gets this error:
# thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value:
"Crypto state directory /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/dfx-e2e-XXXXXXXX.vFNSKcWh/working-dir/hello/.dfx/state/replicated_state/node-100/crypto
has permissions 0o40772, allowing general access"', replica/src/setup.rs:331:75


[TEST] Add hello world

This is a test PR. Please ignore.

Resolved. See the latest https://oss.acmcsuf.com/codemod module https://deno.land/x/codemod!


Remove react-dev-utils crossSpawn package

This yarn package had no purpose since it is just an import of the cross-spawn npm package.

background of why they do it https://github.com/facebook/create-react-app/pull/2283#issuecomment-302890673

ohh @viankakrisna now I see, I'm sorry! I will close this PR. Thank you very much for the response :slightly_smiling_face:


fix: inline code boldness on headings

Describe this PR

Changes

What issue does this fix?

Any other relevant information

I think in bigger headlines the code font-size is now a bit much:

@janpio Can you review again?

Now it is the same size as before, but bold - that is definitely better in that it does not add another design weirdness.
But the font size is probably too small really for a headline.
Examples:

@janpio If it is the same font, the it would look like the image in your first feedback.

I know, the code font is "visually bigger" - so if we want to tweak this, we'll probably have to play with the font-size a bit to adapt to all these use cases.

A page where this occurs: https://www.prisma.io/docs/about/prisma-docs/about-the-docs#the-user-and-post-data-model


my dashboard: add responsive layout

Needs react-invenio-forms PR 118
Solves the responsibility issues for the My dashboard page of #1360. Search result page issues are solved in invenio-search-ui PR #129.

Changed the column width of the tab content to be full grid-width for mobile and tablet.
Moved the facet filter to a slide-in sidebar triggered by a filter button for mobile and tablet.
The desktop version remains the same as before.

The sidebar closes when clicking the close-button or by clicking outside the sidebar.
Accessibility was tested with axe DevTools and VoiceOver.
Screenshots
Tablet
Filter closed

Filter open

Mobile
Filter closed

Filter open

Needs https://github.com/inveniosoftware/react-invenio-forms/pull/118


Composer package updates for php8

Could we add a composer.lock, to avoid issues with psalm/phpcs upgrades?

We now have composer lock file and mutually compatible psr/log version. I'm entirely new to psalm so I could use some help with these errors.

I think all getMockBuilder() errors are fixed by using getMock() directly 🤣


A few perf fixes we'd like to take for release 1.5

These are:
https://github.com/Microsoft/TypeScript/commit/05b8609f04f3f10513ecc2059c868b2aeea49012 Reduce GC pressure by not logging by default.  This prevents GCs that were causing hiccups during typeing.
https://github.com/Microsoft/TypeScript/commit/29fcd4aa905f4d51fcaca92a0ff85425a5315306 Make semantic classification cheaper by avoiding scanning calls to get start/width.  fullStart/fullWidth is much cheaper and and speeds things up significantly.
https://github.com/Microsoft/TypeScript/commit/a3916ffb50f4297b76dbb91cd1210cb23c2c10b6 Make semantic classification cheaper by avoiding resolution of identifiers that couldn't possibly be classified.

This is already in master, and we have cherry picked one commit into release-1.5


Load private data files + use glob on ZIP archives for json/csv/etc. module inference

As mentioned in https://github.com/huggingface/datasets/issues/3032 loading data files from private repository isn't working correctly because of the data files resolved.
#2986 did a refactor of the data files resolver. I added authentication to it.
I also improved it to glob inside ZIP archives to look for json/csv/etc. files and infer which dataset builder (json/csv/etc.) to use.
Fix https://github.com/huggingface/datasets/issues/3032
Note that #2986 needs to get merged first

I have an error on windows:
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host moon-staging.huggingface.co:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1131)')]

at the fsspec call in xglob:
fs, *_ = fsspec.get_fs_token_paths(urlpath, storage_options=storage_options)

Looks like the windows CI has an SSL issue...

I can reproduce it on my windows machine. On linux it works fine though


Test webhook create issue

Issue test created

Hello! Thank you for creating the issue! We will review it shortly.


Selectors, tests and functions

Test that the services dropdown navigate to the right page

@romarioraffington I think a linter that automatically runs on the rep would be a better approach to enforcing code style than the contributing.md

@JavonDavis WebDriverWait was giving error and issues. Will try to implement again.

Made requested changes


Log Vm or Template for Create/Update

Previously we logged "Creating Vm" or "Updating Vm" even if the object
was a template.  This looks at the h[:template] field to log the
appropriate type.

:+1:


Save all store data in localstorage

Save all NOT sensitive data in localstorage

Products
Categories
Measurements units
Currencies
User (Full name, email)

Integrated vue persist


Connect with Storage Explorer

I already looked into the previous issue related to storage explorer. Is it possible to connect when running on Mac OSX? I tried to connect using the connection string provided in the Readme (below) but I get an unhelpful error from explorer.
DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://<IP_ADDRESS>:10000/devstoreaccount1;

Can we close this ? It works with the latest Storage Explorer.


docs images not showing after setup

Describe the bug
Installing this repo and dependencies, then packaging them and hosting them as a static bundle  results in images not loading. The markdown in codecard s points to /static/mb/.... but all of those paths need prefixing with /docs to point to the correct images.
To Reproduce
Steps to reproduce the behavior:

clone and install
run pxt staticpkg
host the built/packaged directory
See images not showing in browser

Expected behavior
Visible thumbnails
Screenshots

the 'heart' thumbnail has a path prefixed with /docs, and it loads properly
Desktop (please complete the following information):

OS: MacOS
Browser Chrome
Version 70

It's interesting that the first one shows up.

This issue also affects images used by the simulator.

this is still a problem, I will attempt to solve it, and report back with results

Any feedback?

This is fixed.


Hi

May I know what is the font?

Sorry, but I don't remember at all.  Let me point out two fonts that I love and use right now.  One is Victor Mono, the other is Fira Code Retina.
fontSize:14
fontWeight:600,
lineHeight:26
turne: Tokyo Night Storm


Updated to include the latest php releases

Ping @rogeriopradoj, @loicfrering.

:+1:

:+1:

:+1:

:+1:

:+1:

Ping @rogeriopradoj, @loicfrering.

Sorry everyone! Our bad! (I going to get married this weekend, going a little crazy :-) ) See ya!

I going to get married this weekend

Congratulations!

congrats @rogeriopradoj


Add download function

I'm having trouble downloading files with JavaScript code; the download speed is only 3 MB/s. I hope you can add the function Switch.download(url, pathStore, bigFile).
import { formatBytes, getFileNameFromUrl } from "./utilities";

const REPORT_INTERVAL_MS = 1000;
const MB = 1024 * 1024;
const WRITE_INTERVAL_MS = 3000;
const FAT32_FILE_SIZE_LIMIT = 4194303 * 1024;
interface DownloadResult {
    filename: string;
    path: string;
    size: number;
}

export function Download(url: string, path: string, filename?: string, callback_status?: MyCallbackType, debug?: boolean, signal?: AbortSignal): Promise<DownloadResult> {
    return new Promise(async (resolve, reject) => {
        try {
            const response = await fetch(url, { signal });
            if (!response.ok) {
                throw new Error(response.status.toString());
            }

            const contentLength = +response.headers.get("Content-Length")!;
            const fileName = filename || getFileNameFromUrl(url);
            const shouldChunk = contentLength > FAT32_FILE_SIZE_LIMIT;
            const fileOptions = shouldChunk ? { bigFile: true } : {};
            const fileHandle = await Switch.file(`${path}${fileName}`, fileOptions);
            const writer = fileHandle.writable.getWriter();

            let downloadedBytes = 0;
            let startTime = Date.now();
            let lastReportTime = startTime;
            let lastDownloadedBytes = 0;
            let lastWriteTime = startTime;

            const reader = response.body?.getReader();
            const buffer: Uint8Array[] = [];

            const reportProgress = () => {
                const currentTime = Date.now();
                const timeDiff = (currentTime - lastReportTime) / 1000;
                const downloadedDiff = downloadedBytes - lastDownloadedBytes;
                const speedMBps = (downloadedDiff / MB) / timeDiff;
                lastReportTime = currentTime;
                lastDownloadedBytes = downloadedBytes;

                if (callback_status) {
                    callback_status({
                        state: "download",
                        percent: Math.floor((downloadedBytes / contentLength) * 100),
                        msg: `${formatBytes(downloadedBytes)}/${formatBytes(contentLength)} - ${speedMBps.toFixed(1)} MB/s`
                    });
                }
            };

            // Interval to log progress every second
            const intervalId = setInterval(reportProgress, REPORT_INTERVAL_MS);

            while (true) {
                const { done, value } = await reader!.read();
                if (done) break;

                buffer.push(value);
                downloadedBytes += value.length;

                const currentTime = Date.now();
                if (currentTime - lastWriteTime >= WRITE_INTERVAL_MS) {
                    const combinedBuffer = concatUint8Arrays(buffer);
                    await writer.write(combinedBuffer);
                    buffer.length = 0;
                    lastWriteTime = currentTime;
                }
            }

            if (buffer.length > 0) {
                const combinedBuffer = concatUint8Arrays(buffer);
                await writer.write(combinedBuffer);
            }

            clearInterval(intervalId); // Stop reporting when done
            await writer.close();

            if (callback_status) {
                callback_status({
                    state: "download",
                    percent: 100,
                    msg: `Download completed`
                });
            }

            resolve({ filename: fileName, path, size: contentLength });

        } catch (error: any) {
            if (callback_status) {
                callback_status({
                    state: "error",
                    percent: 0,
                    msg: `Download failed: ${error.message}`
                });
            }
            reject(error);
        }
    });
}

// Helper function to combine multiple Uint8Array chunks into one large Uint8Array
function concatUint8Arrays(arrays: Uint8Array[]): Uint8Array {
    const totalLength = arrays.reduce((sum, arr) => sum + arr.length, 0);
    const result = new Uint8Array(totalLength);
    let offset = 0;
    for (const arr of arrays) {
        result.set(arr, offset);
        offset += arr.length;
    }
    return result;
}

export function startDownload(url: string, path: string, callback_status?: MyCallbackType, filename?: string, debug?: boolean): { controller: AbortController, promise: Promise<DownloadResult> } {
    const controller = new AbortController();
    const signal = controller.signal;
    const promise = Download(url, path, filename, callback_status, debug, signal);
    return { controller, promise };
}

A Switch.download() function wouldn't make sense for the core nx.js runtime, since it would not need to rely on any native APIs. It would be better as an external module.
Can you elaborate on what kind of error/issue you are seeing though?

The code above cannot increase the loading speed beyond 3MB/s because it needs to write to the memory card every 3 seconds to avoid memory overflow. I tried writing every 100MB, but the download speed remained unchanged. However, when using the following code, the download speed reached 8MB/s. I noticed that the code below does not have the step of writing to the memory card.
`
export async function fetchProgress(
url: string,
{ onProgress, onDownloadStart }: FetchOptions
) {
// Step 1: start the fetch and obtain a reader
const response = await fetch(url);
if (!response.ok) {
throw new Error(response.status.toString());
}
const reader = response.body!.getReader();
// Step 2: get total length
const contentLength = +response.headers.get("Content-Length")!;
// Step 3: read the data
let receivedLength = 0; // received that many bytes at the moment
let last = { time: 0, value: 0 };
let counter = 0;
let speed = 0;
const stream = new ReadableStream({
start(controller) {
onDownloadStart();
return pump();
function pump(): Promise<
ReadableStreamReadResult | undefined
> {
return reader.read().then(({ done, value }) => {
// When no more data needs to be consumed, close the stream
if (done) {
controller.close();
return;
}
// Enqueue the next data chunk into our target stream
controller.enqueue(value);
      receivedLength += value.length;

      const progress = receivedLength / (contentLength / 100) / 100;

      const current = { time: Date.now(), value: receivedLength };

      if (counter % 50 === 0) {
        if (last.time) {
          const time = current.time - last.time;
          const val = current.value - last.value;

          speed = byteToMB(val / (time / 1000));
        }

        last = { ...current };
      }

      onProgress({
        progress: isFinite(progress) ? progress : 0,
        receivedLength,
        contentLength,
        speed,
      });

      counter += 1;
      return pump();
    });
  }
},

});
return new Response(stream);
}
`

Please give nx.js v0.0.52 a try, I made some tweaks to the networking code and am seeing a lot better throughput for HTTP requests.
As for your original topic, I suggest implementing progress monitoring by using an intermediary TransformStream that can report on the chunks of bytes received. Here's a rough proof-of-concept. Feel free to adapt for your code as you see fit:
const res = await fetch('https://example.com');
const outFile = Switch.file('sdmc:/test.txt');
let bytesRead = 0;

await res.body.pipeThrough(
    new TransformStream<Uint8Array, Uint8Array>({
        transform(chunk, controller) {
            bytesRead += chunk.length;
            console.log(`Read ${bytesRead} bytes`);
            controller.enqueue(chunk);
        }
    })
).pipeTo(outFile.writable);

I tried version 0.0.52 of nx.js, and it’s amazing! It provides double the download speed. I believe nx.js will become the go-to platform for writing homebrew applications in the future."

I tried version 0.0.52 of nx.js, and it’s amazing! It provides double the download speed. I believe nx.js will become the go-to platform for writing homebrew applications in the future.


Disable pointer events on dragging.

Let's assume we change the following line in the example:
https://github.com/orefalo/svelte-splitpanes/blob/2fcc1aa99fb923c67d29e870b60a1abc4c4c9b38/src/comp/MinMax.svelte#L7-L12
to the following:
    <Pane minSize="20" maxSize="70">

1

            I have a min height of 20% & max height of 70%

    </Pane>

When we run the example, we'll see that while the user drag the splitter, she may still see the new cursor although she's still dragging (tested in Firefox and Edge):
https://user-images.githubusercontent.com/1467072/174052570-bae2eaaa-4c18-47b3-b7c8-75ea885f6cf2.mov
Split.js fix it in the simplest way - just set the CSS pointer events property to none.
This PR does exactly this thing. Result after fix:
https://user-images.githubusercontent.com/1467072/174052584-96ef2a57-d818-44ec-a216-1ecf43b17dd1.mov

good catch nice to have other developers overwatching the code.
Thank you

I know this since I'm trying to migrate my code from Split.js. It is a great package overall, but doesn't works well with Svelte idiom, SSR in particular, unless you hack it a little bit.


register.ftl and login-verify-email.ftl throw errors

Hello, i made a fully custom theme using others deps as 'styled-components' and 'react-intl', everything is working well except the register and login verify email where both of those pages throw me the same error:
FTL stack trace ("~" means nesting-related):
        - Failed at: #local value = object[key]  [in template "login-verify-email.ftl" in macro "objectToJson" at line 70, column 21]

this is the code at line 70:
 <#attempt>
                    <#local value = object[key]>
                <#recover>
                    /* couldn't dereference ${key} of object */
                    <#continue>
                </#attempt>

Do you have any ideas of what is going on with this issue, the user cannot register and verify its email (he can only log in) ?
Thanks

Actually it seems to not be the cause of the error, following the last paragraph from this:
https://freemarker.apache.org/docs/ref_directive_attempt.html

having a look...

@PierreMouchan I am very sorry for the inconvenience.
I don't understand... the ligne that throws is within a try/catch... I will try to reproduce.

@PierreMouchan I am sorry, I can't reproduce.
I am fully committed to fix the issue but I will need some more info on your side.
Can you give me a screenshot of the console when you load a failing page?

@PierreMouchan I am sorry, I can't reproduce.
I am fully committed to fix the issue but I will need some more info on your side.
Can you give me a screenshot of the console when you load a failing page?

Here is the full screenshot ->

This throws an error inside the console but this does not 'crash' the app and it wasn't my initial issue, sorry for that

Ok cool,
So, just so you know, it is expected that a lot of errors appears in the Keycloak logs. To converts the .ftl values into a JavaScript object blindly we have to do things that throws. But it's all-right because every statement that can fail is inside a <#attempt><#recorver> block.
You are not the first one however to be concerned by all the error in the Keycloak logs, maybe I should explain this in the README.
However, back to our problem. As long as you don't get a 500 when loading the pages and as long as window.kcContext looks alright you should be able to implement the page....
How is your window.kcContext looking on the problematic pages? (You can display it in the devlopper tool of your browser)

Ok cool,
So, just so you know, it is expected that a lot of errors appears in the Keycloak logs. To converts the .ftl values into a JavaScript object blindly we have to do things that throws. But it's all-right because every statement that can fail is inside a <#attempt><#recorver> block.
You are not the first one however to be concerned by all the error in the Keycloak logs, maybe I should explain this in the README.
However, back to our problem. As long as you don't get a 500 when loading the pages and as long as window.kcContext looks alright you should be able to implement the page....
How is your window.kcContext looking on the problematic pages? (You can display it in the devlopper tool of your browser)

Thanks for your quick answer ! The error was coming from our SMTP server (not getting the verification through email), i though it was from Keycloakify ! Sorry for that one !  There is no issue with the kcContext

It's alright,  even our Keycloak expert got mislead by those errors.
Thanks for reporting


Replay FirestoreEncoder changes

Replay the changes made in the old non-conforming location and migrate
to using the FirestoreEncoder from the new location.
Changes:
f14979510 (Marek Gilbert, 2 hours ago)
Migrate to encoders in third_party/FirestoreEncoder
330ef74f2 (wu-hui, 7 days ago)
Add @DocumentId equivalent to Swift Codable (#3762)

Commit with failed optional test case.

Integration Test and cleanup

swiftformat

better doc formatting

addressing comments

rename to SelfDocumentID

Addressing Comments

fix comment

e39eb4013 (Hui-Wu, 3 months ago)
Allow firestore api to work with Codable objects + ExplicitNull +
Integration tests (#3261)

Convinience api for codables

Integration Tests

ExplicitNull implementation

14c8d1bec (Morgan Chen, 3 months ago)
Fix token fetch not invoking callback for unchanged token (#3251)
78b18282e (Hui-Wu, 3 months ago)
FieldValue and DocumentReference codable support. (#3231)

working serverTimestamp

working FieldValue. Still need: document ref and ability to Eq of
FieldValue

DocumentReference implemented and testing works

clean up header search path

improving FieldValue enum comments

run through formatting

addressing comments

formatted with swiftformat 0.35.7

add missing bool->BOOL change

undo unintended swift version change

remove unwanted proj file change

8ecec2b82 (Hui-Wu, 3 months ago)
Firestore swift Codable support (#3198)
FirestoreEncoder/Decoder and Timestamp/GeoPoint codable support.
30e493730 (Marek Gilbert, 2 hours ago)
Rename JSONEncoder; prep for split
8285f2015 (Marek Gilbert, 7 days ago)
Pristine copy of JSONEncoder.swift
From
https://github.com/apple/swift/commit/3391b746d9fb36d7bbf428bdc3f5f69e2bb9ac6f
pulled with the tag swift-DEVELOPMENT-SNAPSHOT-2019-09-04-a.

The other commits are from @wu-hui's old github handle.


New Rule: Link Metamask Impersonation with suspicious link

/update-test-rules

This has been running for 2 weeks. It has 4 hits, and should be fairly safe to deploy.

Closing may want to approach this via logodetect


Add Stop Killing Games alert at the top of the home and downloads pages

Text is a quick draft, feedback is welcome. It looks like this:

Logo in the alert will be hidden on small devices to reduce clutter.

I admittedly have less knowledge about how translations are handled on the website than I should, but it doesn't look to me like this text is translatable.

"Our missing is to preserve video games" is a complete sentence and should end in a period.


Improve acro checkbox set value

Can set value when checkbox as multiple widget

What?
Actually, unable to set value for a checkbox that as multiple widgets
Why?
Can not fill my pdf because of that
How?
iterate over all available widget to get all possible response
Testing?
Works for my use case
New Dependencies?Nope
Screenshots
Example where a checkbox here is represented by multiple widgets

Suggested Reading?
YES
Anything Else?
Nope
Checklist

[X] I read CONTRIBUTING.md.
[X] I read MAINTAINERSHIP.md#pull-requests.
[ ] I added/updated unit tests for my changes.
[ ] I added/updated integration tests for my changes.
[X] I ran the integration tests.
[X] I tested my changes in Node, Deno, and the browser.
[X] I viewed documents produced with my changes in Adobe Acrobat, Foxit Reader, Firefox, and Chrome.
[ ] I added/updated doc comments for any new/modified public APIs.
[X] My changes work for both new and existing PDF files.
[X] I ran the linter on my changes.

Hello @Hopding
Is your package still maintained ?
I can see PR's pending from 3 years and no new commits...


Prevent fragments without a signature being called with unnamed parameters

If a fragment is inserted with an unnamed parameter:

...

...but the fragment signature has no parameters:

...

This could provoke some confusion, because the users could think they are passing some needed information to the fragment that the fragment is actually ignoring.
This is specially confusing in /content() scenarios that might be used to emulate a th:include using a th:insert:

...

   [[${message}]]

In the example above, the [[${message}]] expression would print nothing, because f/content() does not match the
 tag but its contents only. And its contents contain no signature.
In these cases, therefore, an exception should be raised warning that unnamed parameters cannot be used when there is no signature at the selected fragment.

Oops, wrong repository to register this. The good one is thymeleaf/thymeleaf#603


Game display not scaling properly on iPad Mini 6 (iOS 15.2.1)

Running Game Play 2.4.3 on iPad Mini 6 with mobile Safari (iOS 15.2.1) displays the game screen at approximately half the size it does on other iOS devices (even with same version). I suspect the fact that this iPad is a new model with revised screen dimensions to be the likely culprit. Please note that no functionality is impacted by this issue and it seems to be purely cosmetic.

That doesn't look good does it. Thanks for taking the time to raise the issue @ewancube. I'll try to take a look at this and push an update.

I’d like to expand this issue to include the horizontal layout which seems to have a slightly oversized game display. Again, this is purely cosmetic and has no functional impact.

Forward duping to #243.


Change Scheduled to FixedRate in Traffic Counter

Motivation:
Traffic shaping needs more accurate execution than scheduled one. So the
use of FixedRate instead.
Modifications:
Change the executor.schedule to executor.scheduleAtFixedRate in the
start and remove the reschedule call from run monitor thread since it
will be restarted by the Fixed rate executor.
Also fix a minor bug where restart was only doing start() without stop()
before.
Result:
The precision of traffic shaping is enhanced.

@netty-bot test this please

@fredericBregier did you see any problems using it in prod ?

@normanmaurer Not issue at all in production. I've been using it for more than 6 years now (Waarp project).
However, it is not as precise as I would like. This change enhanced a bit.
Currently, we use it in a "global" way (whatever network parner, the traffic shaping is the same), both using global traffic and channel traffic shaping (2 handlers in the pipeline).
We planned to allow to enable different shaping per partner. But it is a bit touchy since it will be necessary to have one Counter per partner, so multiple Channels but not all at once.
The next plan is to try to priorize one channel against another (or more precisely one partner against others). It is almost the same case.
Is that answearing your question?

@fredericBregier yep... thanks. merged


Ignore code

First off - thanks heaps for the work, really helps me out, as I've been using vscode for markdown editing a lot lately.
I was hoping you could either make it default or add an option to:

Disable grammar / spell checking of URLs (ie the URL part between [] in ()[]), and
Disable grammar / spell checking of anything in the code quotes or whatever they are called (ASCII char #96, aka hex x60)
Code blocks:

in ```
indented

Also, I'd probably specify in the README that the config currently needs to go in the current project's/workspace's .vscode directory, as simply saying .vscode directory had me trying to put it in the $HOMEDIR\.vscode directory to no avail, it took a search through the code and a look at the other issue #7 to realize my error, not a huge deal, but it might help others.

I plan to add in the ability to define a set of reg-exp that will be used to ignore a section of the document for checking - the project started with this including the ones you mention.  I will make it optional via the config file as it can impact other languages people use.
This probably will happen in the next week or so assuming I get the time (on holiday right now :)).
Thanks for posting this and sorry for the long delay.
Sean

No worries. Thanks!

Hi,
I added in a new setting for this in 0.5.0 which I just published.  You just need to craft RegExps to match what you are after.  A good tool to help is https://regex101.com/ just don;t forget to escape out the chars once added to the JSON file.
Some examples.  The top 5 do a variety of links and the last one does code blocks.
Hope that's what you are after I'll close this for now and LMK if you have any issues.
Sean
    "ignoreRegExp": [
        "/(http\\\\S*)/gm",
        "/\\\\(.*.png\\\\)/g",
        "/\\\\(.*.gif\\\\)/g",
        "/\\\\(.*.md\\\\)/g",
        "/\\\\(.*.jpg\\\\)/g",
        "/^((`{3}\\\\s*)(\\\\w+)?(\\\\s*([\\\\w\\\\W]+?)\\\\n*)\\\\2)\\\\n*(?:[^\\\\S\\\\w\\\\s]|$)/gm"
    ]


import error

Hi Leal,
I just wanted to contact you by creating this issue on the repo.  I have been looking for an alternative for xfoil for simulation and I think your library can be really useful. However, I could not get this to work yet due to my limited know-how about packages in python. Is it possible for you to help me out. After I clone your repo, how to set it up for use in my code ? I tried to copy it to the pkg directory of my python installation, but I can not import it.
from AeroPy import find_coefficients
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named AeroPy

I would really appreciate your time.
Thanks,
Ashish

Hello Ashish,
there are at least three ways of doing it:

You define a PYTHONPATH to the AeroPy directory;
You run Python in the directory of the AeroPy directory (run python
from the command line)
You place Aeropy in Lib/site-packages for your Python install

This is the kind of question, i.e. not AeroPy specific, that you can easily
find an answer at stackexchange. If you are new to the community, I
recommend creating an account there and using that resource as much as
possible.
Thanks,
Pedro Leal
On Thu, Apr 20, 2017 at 6:27 AM, Ashish Kumar Ram<EMAIL_ADDRESS>wrote:

Hi Leal,
I just wanted to contact you by creating this issue on the repo. I have
been looking for an alternative for xfoil for simulation and I think your
library can be really useful. However, I could not get this to work yet due
to my limited know-how about packages in python. Is it possible for you to
help me out. After I clone your repo, how to set it up for use in my code ?
I tried to copy it to the pkg directory of my python installation, but I
can not import it.
from AeroPy import find_coefficients
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named AeroPy
I would really appreciate your time.
Thanks,
Ashish
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_leal26_AeroPy_issues_1&d=DwMCaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=spp-aK3wLwVKeQNTJzDrOA&m=XPRJ8bwE9VvpWOiHkSkuxdoKhoqicYVkgFefZBtTaqM&s=cwScCnkS_wN8dHDF4M-rb0VIomEB0_igBhQJC0ISH6g&e=,
or mute the thread
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AE6Xrn7n548QBAFPE5Pl2k0bq0SU5Ci-2Dks5rx0EggaJpZM4NC5bZ&d=DwMCaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=spp-aK3wLwVKeQNTJzDrOA&m=XPRJ8bwE9VvpWOiHkSkuxdoKhoqicYVkgFefZBtTaqM&s=9AsT22jki_iiIV1HMjSNb1_3jum3jrSoIUNKuFugnBs&e=
.

Hi Pedro,
Thanks a lot for a prompt response. I tried those options in ubuntu, python 2.7.  I did not spend much time debugging it however, sorry for that. It looks related to subprocess. I can run it successfully in Windows perfectly, but I don't want to use windows.
Regards,
Ashish

Hello Ashish,
The error you are getting is because you are trying to run xfoil.exe.
AeroPy uses xfoil.exe which is an executable file. Executable files only
run in Windows OS. Therefore, the current version of AeroPy only works for
Windows. You need the source code for xfoil, which is in Fortran, to make
it work with Linux system. Since I have to use Windows at work, I never did
this.
Pedro Leal
On Thu, Apr 20, 2017 at 9:59 AM, Ashish Kumar Ram<EMAIL_ADDRESS>wrote:

Hi Pedro,
Thanks a lot for a prompt response. I tried those options in ubuntu,
python 2.7. I did not spend much time debugging it however, sorry for that.
It looks related to subprocess. I can run it successfully in Windows
perfectly, but I don't want to use windows.
Regards,
Ashish
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_leal26_AeroPy_issues_1-23issuecomment-2D295768164&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=spp-aK3wLwVKeQNTJzDrOA&m=DGaeocvFdDeQzjLeZp9Y500Qk8FZxd6xjc2z2Pro5OM&s=ECNtbsxI0Aa4trvecyDpf-iGimwYqOB98y0bpWiYR_A&e=,
or mute the thread
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AE6Xrpt3zTm62r0pN8uLyb0r3lX9Fqgfks5rx3LQgaJpZM4NC5bZ&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=spp-aK3wLwVKeQNTJzDrOA&m=DGaeocvFdDeQzjLeZp9Y500Qk8FZxd6xjc2z2Pro5OM&s=KTWRYjnKqI4aK46a8y43nZbQHe6gHWt85B_k6LTPE0I&e=
.


.ical synchronization

Is it posible to make synchronization with .ical format (I want to connect to airbnb calendar)

Closing as this is out of scope.


User Story 3.1

User Story: ALTA-3.1
As an inventory manager, I want to be able to create a stock-keeper’s user account so that I can grant them access to ALTA to perform audits.
Description:
This feature requires that the inventory manager be able to create a stock-keeper account (which should be just enabling some permissions at this point), and subsequently building the mobile interface to allow for these users to login.
Acceptance Test:

Log in as an inventory manager
Select the employees tab in the sidenav bar
Click on create, and fill in the required fields, including setting the role to stock-keeper
Once created, the user can then open up the mobile app, and login with the specified credentials.

Related Mockups:

Inventory manager login page

Side navigation bar for clicking for the employees tab (which in this case is called manage members, but in the inventory manager interface, it will be called "Employees")

The page for creating a new user

The login page for the stock-keeper (this is mobile view)

This issue was completed in Sprint 4.
I accidentally reopened it.

This issue was completed in Sprint 4.
I accidentally reopened it.


Bib py

Type of change

[x] Added new project
[ ] Bug fix
[ ] New features
[ ] Enhanced documentation

Changes proposed in this pull request

Project name :

Short description :

Checklist

[x] The code is Python 3 compatible
[x] I have added relevant comments in my file to make code understandable
[x] I have added my project in a folder which includes all the necessary files

Added a new Palindrome-Checker file


Update HelloWorld.hx

Documentation in 01-introduction.tex says that this file should be saved as HelloWorld.hx -- but currently you need to use Main.hx
This change reflects that

I think the documentation should say it needs to be Main.hx

This has been fixed, thanks!


Events are not working

I am not sure if I am using it right, but this simple example is not working:
https://jsfiddle.net/v786gzhm/

This feature has not been released yet.

wow ok


segformer misspelled in colab

'segformer' should be 'SegFormer' in the get model function under 'load a pretrained model'

Thanks for informing. Updated the CoLab.


Build tooling that makes it easier to explore the Sierra data

The goal is an API something like:
import gzip
import json
from pprint import pprint

def get_cached_sierra_records():
    for line in gzip.open("_cache/sierra_records.json.gz"):
        yield json.loads(line)

if __name__ == '__main__':
    for record in get_cached_sierra_records():
        pprint.pprint(record)
        break

This should include setting up decent lifecycle policies on the infra bucket.

This is the reporting cluster.


fix(logger): fix exported symbol in web bundler

:tada: This PR is included in version 6.7.5 :tada:
The release is available on:

v6.7.5
GitHub release

Your semantic-release bot :package::rocket:


Detox clears async storage

Even after  removing  any detox.init and device.launchApp methods, detox clears data in AsyncStorage when I run detox test

It is not supposed to do anything like that.
The issue is not informative enough, you didn't add any logs, or package versions.
Usually, on bugs of this type, we request that a small demo project that can reproduce the issue be supplied.


WHY IS THERE CODE???


fix(analytics): allow analytics to work from the app

Pull Request Test Coverage Report for Build<PHONE_NUMBER>2
Details

2 of 2 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.01%) to 3.577%

Totals

Change from base Build<PHONE_NUMBER>1:
0.01%

Covered Lines:
514

Relevant Lines:
16223

💛  - Coveralls


docs: document reconstruction visualization

Document reconstruction for visualization.
Continuation here.

I wondered that the latency_histogram.md and latency_time_series.md should be deleted.
I think these file are unusefull and we should prepare APIs.

@keita1523
Could you check typos, please?
https://github.com/tier4/CARET_doc/actions/runs/3391772725/jobs/5637252722

@hsgwa
I modified documents. Please check this again.
(Sorry to keep bothering you.)


Behavior of dataarray with no dimensions

Consider
type(np.array([1.0]).mean())
# -> numpy.float64

type(pd.Series([1.0]).mean())
# -> float

type(xr.DataArray([1.0]).mean())
# -> xarray.core.dataarray.DataArray

The issue is that this dimensionless data array won't be cast into float by numpy/pandas when constructing a new ndarray/dataframe. You'll have to do it explicitly. Not a big deal but it feels weird.
I'm sure there's a real technical reason (keeping metadata ?) behind this behavior but I couldn't find any discussion about it.

Yes, this was an intentional choice, though not without occasional regrets!
This is nice from an consistency perspective: every operation on an xarray object returns another xarray object. Also, as you point out, this allows us to preserve metadata such as attributes or scalar coordinates.
I'm going to mark this as a documentation issue: this would be a great thing to add our docs where (maybe the FAQ page?).

Thanks for your answer.
I'll try to find a good spot in the doc to write a line or two about this.

I dug it a bit further. Contrary to what I said numpy seems fine. If x is a 1D DataArray
np.array(x.mean())
# -> array(2.0)
np.array([x.mean()])
# -> array([2.0])

pandas behavior is more surprising
pd.Series(2)
# ok

pd.Series(x.mean())
# -> TypeError: len() of unsized object

pd.Series([x.mean()])
# -> a series with dtype=object

# however
pd.Series(x)
# drops the index but dtype is fine

Something looks a bit odd to me.


Use synthetic monitor for static URL testing

What's your CLI version?
0.85.46
Description & steps to reproduce
Right now, several links report 400 unexpected error even if the links work eg.

This causes CI's tests to be flaky.
Desired behavior
Our CI tests should not be testing external links that are used in the codebase. Rather they should be tested using a synthetic monitor such as suggested by @adschwartz .
https://docs.datadoghq.com/synthetics/
What is the severity of this bug?
Painful; this is causing significant friction in my workflow.
What area of the product does this pertain to?
Other: anything not covered by the above

it was fixed here: https://github.com/kurtosis-tech/kurtosis/pull/1974/files


Decode content from github api while downloading seed patterns

Signed-off-by: Nishant Mittal<EMAIL_ADDRESS>Description
This PR fixes #6018
Notes for Reviewers
Signed commits

[x] Yes, I signed my commits.

Codecov Report

Merging #6026 (08a9561) into master (e07c711) will decrease coverage by 4.69%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #6026      +/-   ##
==========================================
- Coverage   17.92%   13.23%   -4.70%
==========================================
  Files         110      110
  Lines       10421    10414       -7
==========================================
- Hits         1868     1378     -490
- Misses       8096     8736     +640
+ Partials      457      300     -157

Flag
Coverage Δ

gointegrationtests
?

unittests
13.23% <0.00%> (+<0.01%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

handlers/oam_handler.go
0.00% <0.00%> (ø)

mesheryctl/internal/cli/root/system/update.go
1.05% <0.00%> (-58.95%)
:arrow_down:

mesheryctl/internal/cli/root/system/start.go
1.88% <0.00%> (-55.19%)
:arrow_down:

mesheryctl/internal/cli/root/system/status.go
1.14% <0.00%> (-55.18%)
:arrow_down:

mesheryctl/internal/cli/root/system/restart.go
1.92% <0.00%> (-48.08%)
:arrow_down:

mesheryctl/internal/cli/root/system/stop.go
2.00% <0.00%> (-46.67%)
:arrow_down:

mesheryctl/internal/cli/root/root.go
24.61% <0.00%> (-41.54%)
:arrow_down:

mesheryctl/internal/cli/root/system/logs.go
3.26% <0.00%> (-36.96%)
:arrow_down:

mesheryctl/internal/cli/root/version.go
0.00% <0.00%> (-32.95%)
:arrow_down:

mesheryctl/internal/cli/root/system/check.go
1.03% <0.00%> (-23.03%)
:arrow_down:

... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Use toBN() instead of new BN()

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 84.889%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
135

Relevant Lines:
149

💛  - Coveralls


RuntimeError exporting stateless5 model using jit

I'm using ./pruned_transducer_stateless5/export.py with --jit true and get runtime error:
RuntimeError:
Python builtin <built-in method random of Random object at 0x7fbcaaad5878> is currently not supported in Torchscript:
  File "/data/fangzhouhua/bluesky/icefall-master/egs/hik/asr1/pruned_transducer_stateless5/scaling.py", line 664
    def forward(self, x: Tensor) -> Tensor:
        if random.random() >= self.balance_prob:
           ~~~~~~~~~~~~~ <--- HERE
            return x
        else:

The ActivationBalancer, from what I understand, is to modify the backpropped derivatives and will not be used in inference mode?
https://github.com/k2-fsa/icefall/blob/bd7fa2253dab9f627edc914b3289fb2f6c0e5bb6/egs/librispeech/ASR/pruned_transducer_stateless2/scaling.py#L652-L654
I think this could be fixed by returning input directly(when exporting) but Is there a way to fix this problem without touching scaling.py?

which recipe are you using?

Please update your code by following
https://github.com/k2-fsa/icefall/blob/bd7fa2253dab9f627edc914b3289fb2f6c0e5bb6/egs/librispeech/ASR/pruned_transducer_stateless3/export.py#L664
which replaces ActivationBalancer with an Identity
https://github.com/k2-fsa/icefall/blob/bd7fa2253dab9f627edc914b3289fb2f6c0e5bb6/egs/librispeech/ASR/pruned_transducer_stateless3/scaling_converter.py#L310-L312

Also, would you mind creating a PR to fix the outdated code?

Also, would you mind creating a PR to fix the outdated code?

Sure thing, I'll do it later.


XCode 7, Pod Import

PodFile
1 platform :ios, '8.0'
2 use_frameworks!
3 pod 'YouTubePlayer'
Run pod install, pod update.
I create a new XCode project and import YoutubePlayer, but it says the module is not found. What is the cause for this? I'm running XCode 7.

imported original repo to project dir, dragged xcode source into project and linked youtube framework in settings.

Thanks for the update @schachte! And thanks for using the library :)


Remove GridFTP and other OSG 3.5 references

WIP: I still have to update the contents of the wn-client in install-wn.md but we should get SOFTWARE-5171 done first.


@orta => [Artist] Never show stale collection view cells to the user.

Fixes #623.

THIS IS THE BEST GIF

Code looks :+1:

It’s kinda creeping me out :scream:


Why is cache being reset?

Locally and on Travis blogdown is trying to reset the cache and run all Rmds from scratch. This is a problem as several blog posts rely on data that is no longer available.
It doesn't look like this is a local change (as previously successful travis builds now error) but maybe a due to a dependency change. There is little evidence of major changes in either blogdown or Rmarkdown and rolling back two versions (in each package) had no impact.

Worked around using: blogdown::serve_site and blogdown::hugo_build. No further leads on what was causing the issue.


Version conflict

I get following error when running on iOS Simulator:
[ios/.symlinks/plugins/path_provider_linux/example] flutter pub get
Running "flutter pub get" in example...
Because pathproviderexample depends on path_provider from path which doesn't exist (could not find package path_provider at "../../path_provider"), version solving failed.
pub get failed (66; Because pathproviderexample depends on path_provider from path which doesn't exist (could not find package path_provider at "../../path_provider"), version solving failed.)

get_storage: ^1.1.6
Flutter 1.20.0-0.0.pre
android is working OK!

Hi Stefan, it seems that strangely Flutter is not downloading the path_provider dependency on iOS, there are several current problems with pana including that it is not being able to analyze packages that use the path provider (any package that stores anything depends on it), and I believe that the solution is to manually add path_provider to your pubspec.yaml.
If it works for you I will make this reservation in the readme, thanks for letting me know.

Hi; so I am on DEV channel.
I need to add path_provider: ^1.6.9 which is not the very latest of path_provider.
1.6.10 introduced Linux support and that seems to be the one that is causing the problems.


tk show on helm chart doesn't work

Hi :)
We are using the Tanka support for helm charts.
Recently, we tried to install testkube using this method and we got the following issue:
vendor/github.com/grafana/jsonnet-libs/tanka-util/k8s.libsonnet:46:20-26  +:
        Field "labels"
        Field "metadata"
        Field "cluster_role_binding_cronjobs_cluster_rolebinding"
        Field "testkube"
        During manifestation

Our workaround:

We decided to use helm directly as this way the installation worked using the default chart values..

To reproduce
tk tool charts init
tk tool charts add-repo testkube https://kubeshop.github.io/helm-charts
tk tool charts add<EMAIL_ADDRESS>tk show main.jsonnet

Our setup

tanka 0.23.1
jsonnet-bundler 0.4.0

This is our jsounnetfile.json
{
  "version": 1,
  "dependencies": [
    {
      "source": {
        "git": {
          "remote": "https://github.com/grafana/jsonnet-libs.git",
          "subdir": "helm-util"
        }
      },
      "version": "master"
    },
    {
      "source": {
        "git": {
          "remote": "https://github.com/grafana/jsonnet-libs.git",
          "subdir": "ksonnet-util"
        }
      },
      "version": "master"
    },
    {
      "source": {
        "git": {
          "remote": "https://github.com/grafana/jsonnet-libs.git",
          "subdir": "tanka-util"
        }
      },
      "version": "master"
    },
    {
      "source": {
        "git": {
          "remote": "https://github.com/jsonnet-libs/k8s-libsonnet.git",
          "subdir": "1.21"
        }
      },
      "version": "main"
    }
  ],
  "legacyImports": true
}

What's in main.jsonnet?

This is the main.jsonnet
local tanka = (import "github.com/grafana/jsonnet-libs/tanka-util/main.libsonnet");
local helm = tanka.helm.new(std.thisFile);

{
  testkube: helm.template("testkube", "./charts/testkube", {
    namespace: "testkube",
    values: {
    },
  })
}

Thats' interesting, looks like the ClusterRoleBinding with name cronjobs-cluster-rolebinding has metadata.labels: null while an object is expected there. I'm not sure if null is a valid value for metadata.labels, looks like the chart could use some improvements.
Regardless, here's how to get it working:
local tanka = (import 'github.com/grafana/jsonnet-libs/tanka-util/main.libsonnet');
local helm = tanka.helm.new(std.thisFile);

{
  testkube: helm.template('testkube', './charts/testkube', {
    namespace: 'testkube',
    values: {
      global: {
        labels: { some: 'label' },
      },
      'testkube-operator': {
        globalLabels: { some: 'label' },  // presumably the chart was meant to say global.labels here
      },
    },
  }),
}


Fetch readme

Currently, the only way to look at the README file distributed with a chart is to look at it in git, or extract it out of the package tarball.
There needs to be a command like:
helm readme
which will fetch the package from the remote repo if its not already there, extract the readme, and cat it out to stdout.

@jascott1 Wish list item


Add typings for Collapsible.js

This provides type support for people who develop react-native in typescript. (Collapsible component only)

Thanks! Any chance for adding Accordion too?


[Snyk] Security upgrade vite from 4.3.9 to 4.5.2

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to fix one or more vulnerable packages in the `yarn` dependencies of this project.
Changes included in this PR

Changes to the following files to upgrade the vulnerable dependencies to a fixed version:

package.json

Note for zero-installs users
If you are using the Yarn feature zero-installs that was introduced in Yarn V2, note that this PR does not update the .yarn/cache/ directory meaning this code cannot be pulled and immediately developed on as one would expect for a zero-install project - you will need to run yarn to update the contents of the ./yarn/cache directory.
If you are not using zero-install you can ignore this as your flow should likely be unchanged.

⚠ Warning
Failed to update the yarn.lock, please update manually before merging.

Vulnerabilities that will be fixed
With an upgrade:

Severity
Issue
Breaking Change
Exploit Maturity

Access Control Bypass SNYK-JS-VITE-6182924
No
Proof of Concept

Check the changes in this PR to ensure they won't cause issues with your project.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings
📚 Read more about Snyk's upgrade and patch logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Access Control Bypass

Closing as there are no changes


tableplus: init at 504

Description of changes

Database management made easy
Modern, native, and friendly GUI tool for relational databases: MySQL, PostgreSQL, SQLite & more

Package link

Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

@drupol May I ask you to review this? Thank you.

Sorry for the delay, the PR LGTM.


feat(tutorial): complete step 3 - Hursley

:+1::skin-tone-2:   Looks good - I have recorded your completion of this step!


Strong-Name

My project can not use this library because it is not signed. Can this be done ?

I'd recommend building Fleck yourself if you need strong naming. Adding in strong naming can cause challenges for consumers with minimal benefit.

OK


Don't break when there's no newline at the end of the buffer

python-black-statement failed when run on the last line with no newline at the end, because it tried to reach past the end of the buffer. This fixes that.

thanks, merged :shipit:
not sure how you can end without a newline at the end of the buffer... i guess it only happens for unsaved buffers, since saving usually adds it. and i guess with this change, black-macchiato will also add it when formatting the statement.

That's exactly right. Thank you!


Duplicate Sample 5 printouts

https://github.com/ivan-vasilev/Python-Deep-Learning-SE/blob/53ee58399c2352e12265a82be274e6ba61f33cce/ch07/language model/model.py#L210
There is a duplicate of "Sample 5" on line 210.  It should be changed to "Sample 6".

Thank you for your contribution. The issue has been fixed now.


See if there is a way to add to existing vector store, as opposed to always creating a new one when Add button is clicked

This is not readily doable


APIM: Update LRO PUT operations to hybrid approach

ARM (Control Plane) API Specification Update Pull Request
Purpose of this PR
Update LRO PUT operations to hybrid approach. It is a required change to unblock GA release of APIM api version.
Updated definitions to contain provisioningState property
Removed 202 result from LRO PUT operations.
Updated 200/201 operations to contain Location and Azure-AsyncOperation headers.
Updated 202 operations with  Azure-AsyncOperation
Updated examples to be inline with new hybrid LRO approach
What's the purpose of this PR? Check all that apply. This is mandatory!

[ ] New API version. (Such PR should have been generated with OpenAPI Hub, per this wiki doc.)
[ ] Update existing version for a new feature. (This is applicable only when you are revising a private preview API version.)
[ ] Update existing version to fix swagger quality issues in S360.
[ ] Other, please clarify:

edit this with your clarification

Due diligence checklist
To merge this PR, you must go through the following checklist and confirm you understood
and followed the instructions by checking all the boxes:

[ ] I have reviewed the general guidance on the spec PR review process: https://aka.ms/specprreview.
[x] I confirm this PR is modifying Azure Resource Manager (ARM) related specifications, and not data-plane related specifications.
[ ] I commit to follow the Breaking Change Policy.
[ ] I have reviewed following Resource Provider guidelines, including
ARM resource provider contract and
REST guidelines (estimated time: 4 hours).
I understand this is required before I can request review from an ARM API Review board.

ARM API changes review

If you want for the ARM team to review this PR, you must add the ARMReview label.
The automation may automatically add the ARMReview label, if appropriate.
If this happens, proceed according to guidance given in GitHub comments also added by the automation.

Breaking change review
If you have any breaking changes as defined in the Breaking Change Policy,
follow the process outlined in the High-level Breaking Change Process doc.
Getting help

For guidance on fixing this PR CI check failures, see the hyperlinks provided in given failure
and https://aka.ms/ci-fix.
For additional help, see https://aka.ms/azsdk/support/spectools.

Hi @Mielek! The automation detected breaking changes in this pull request. As a result, it added the BreakingChangeReviewRequired label. You cannot proceed with merging this PR until you complete one of the following action items: ACTION ITEM ALTERNATIVE A: Fix the breaking change. Please consult the documentation provided in the relevant validation failures. ACTION ITEM ALTERNATIVE B: Request approval. Alternatively, if you cannot fix the breaking changes, then you can request an approval for them. Please follow the process described in the High-level Breaking Change Process doc. ACTION ITEM ALTERNATIVE C: Report false positive. If you think there are no breaking changes, i.e. the validation should pass yet it fails, then please explain why in a PR comment and @ the PR assignee.

Please fix the breaking changes or get approval from Breaking Changes Review Board first. Afterwards, remove ARMChangesRequested label for ARM to review your swagger PR.

Tagging @raych1 for Go, @qiaozha for JavaScript and @yanchoyanev For Python

/pr RequestMerge

@Mielek  - Your PR needs to pass checks and address the CI-BreakingChange-Python-Track2 label before merge. Add the MergeRequested label back after addressing those items. If you get stuck, you can ask for help in the API Spec Review Teams channel: https://teams.microsoft.com/l/channel/19%3A0351f5f9404446e4b4fd4eaf2c27448d%40thread.skype/API%2520Spec%2520Review?groupId=3e17dcb0-4257-4a30-b843-77f47f1d4121&tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47.

/pr RequestMerge

@Mielek - Please resolve conflicts. Add back the MergeRequested label when ready for merge.

/pr RequestMerge

There are breaking changes in .NET SDK also, please get approval for that: https://github.com/Azure/azure-rest-api-specs/pull/24696/checks?check_run_id=16996259741.

There is no tag to approve .NET SDK breaking changes.
We can handle the breaking change during .NET SDK generation, no blocker here.

/pr RequestMerge


Allow random number seeding for consistent generation

SecureRandom seeding?
e.g. Spicy::Proton.new(seed: 1234).noun
Instance only, or support in class methods, too? (maybe Spicy::Proton.seed(1234)) before other calls

SecureRandom does not support seeding. We could use Random.rand if the user wanted consistent generation. Closing this issue for now. Please reply/comment if you need consistent generation or random seeding.


Internal state not getting properly cleaned up on exit?

I dunno if this is a problem with gpiozero, or a problem with RPi.GPIO, or even whether it's not a bug at all and is "expected" behaviour, but I noticed something weird this evening... and managed to narrow it down to a very simple example.
I have three test scripts...
led_pause.py:
from gpiozero import LED
from signal import pause

led = LED(17)
pause()

led_on.py:
from gpiozero import LED

led = LED(17)
led.on()

led_off.py:
from gpiozero import LED

led = LED(17)
led.off()

When I first run sudo python led_pause.py after powering up the Pi, the LED stays off as expected (and remains off after I Ctrl-C). When I run sudo python led_on.py, the button very briefly flickers on and off again, as explained by http://pythonhosted.org/gpiozero/notes/#keep-your-program-alive-with-signalpause .
But if I now run sudo python led_pause.py the LED immediately lights up?! When I Ctrl-C, the LED goes off again, but running led_pause.py again turns on the LED. Only if I run sudo python led_off.py does the LED remain off when I next run led_pause.py

This is due to the way the GPIO hardware works under the covers. GPIOs (mostly, with a couple of exceptions) default to being "inputs". When they're set to inputs without any pull-up, the pin will be "low" (except for GPIOs 2 and 3 which have hardware pull-ups attached). When set to an "output" you might expect a GPIO to default to "low" but actually it'll immediately take whatever the last output set was. This is stored in a GPIO register and is not cleared when a GPIO is changed back to input.
 GPIO17's function select register is currently "input", and the GPIO17 output value register is 0.
You run led_pause.py and GPIO17's function select register is set to "output". The pin is still low because the value register is still 0.
The script ends and GPIO17's function select register is set back to "input" by the GPIO.cleanup function.
You run led_on.py. GPIO17's function select register is set to "output", and the value register is set to 1.
The script ends and GPIO17's function select register is set back to "input" by GPIO.cleanup. Note that the value register is still 1 but is currently ignored because the function select register is set to "input".
You run led_pause.py again, and GPIO17's function select register is set to "output". The pin is immediately set high because the value register is 1.

Now ... I could extend the GPIO cleanup to include resetting value registers as well. I'm not sure how that sort of patch would go down as I do know a few cases of people relying on this functionality (i.e. that the GPIO pins effectively "remember" their last states between runs). There's also an interesting note about pull-ups in the BCM2835 docs (which I've been trawling while digging into RPi.GPIO's guts):

Note that it is not possible to read back the current Pull-up/down settings and so it is the
users’ responsibility to 'remember' which pull-up/downs are active. The reason for this is
that GPIO pull-ups are maintained even in power-down mode when the core is off, when
all register contents is lost.

In other words, assuming I'm reading this correctly, pull-up status even survives reboots!
Anyway, would you like to see output values reset upon shut down? If so, I might have a way of doing it without affecting RPi.GPIO (basically: do it in gpiozero in OutputDevice.close - but I'll need a bit of time to experiment with it as there's all sorts of horror involved when calling that from __del__).

Hmmmm, interesting....

Anyway, would you like to see output values reset upon shut down?

I guess that's one possibility, with the other option being to automatically clear the output value each time an OutputDevice is created.
I was thinking earlier that an LED turning on unexpectedly isn't too much of a problem, but if the same thing happens with a Motor object, the result could be pretty disastrous!
Whichever way you tackle this, having the last-GPIO-state being "remembered" between program runs is certainly something I'd expect gpiozero to "protect" the user from. Principle of least surprise and all that ;-)
Hmm, maybe you could have a dont_reset_value parameter to the __init__ of OutputDevice, for advanced users (who do wan't the state to be remembered) to make use of?
This is obviously a discussion for you and @bennuttall to have :)

There's also an interesting note about pull-ups in the BCM2835 docs ... In other words, assuming I'm reading this correctly, pull-up status even survives reboots!

From what I understand that used to be the case, but since https://www.raspberrypi.org/documentation/configuration/pin-configuration.md got added, the firmware resets everything to a known state before loading the Linux kernel. There was a big discussion about it in the comments section on http://raspi.tv/2013/rpi-gpio-basics-3-how-to-exit-gpio-programs-cleanly-avoid-warnings-and-protect-your-pi (which include links to additional info).

What about using the initial= parameter of GPIO.setup() - this was added to avoid a blip on a motor like has been mentioned.

Hmmm, interesting information on the device tree stuff - thanks! Just skimming the comments on that article (incidentally I think there's a little mistake in the article where it claims GPIO.cleanup() "... only affects any ports you have set in the current program" - I'm pretty sure that's not the case, having read that code recently - maybe it was at some point in the past though).
Anyway, it does sound like the initial parameter is something we ought to expose in the base OutputDevice class. I'll have a look at that a bit later this week.

Anyway, it does sound like the initial parameter is something we ought to expose in the base OutputDevice class.

I was just looking at the code and thinking the same. But I guess you'll want to "massage" the initial value given to OutputDevice.__init__ (with it defaulting to 'off' IMHO) before passing it to GPIO.setup(), in order to "play nicely" with the active_high parameter? And I also assume that all sub-classes of OutputDevice will need to expose this new param too?
Hmmm, looking at the rest of the code in output_devices.py I can't quite tell why PWMOutputDevice inherits from DigitalOutputDevice rather than OutputDevice ?

Yeah, I'll have to look at the interaction of initial with active_high. And yes, all subclasses will need to grow an optional param on their __init__ methods too.
As to why PWMOutputDevice doesn't inherit from DigitalOutputDevice this is mostly because DigitalOutputDevice only adds one piece of useful functionality: blink. At some point my intention is to add something similar to PWMOutputDevice but it's going to be rather different to the one in DigitalOutputDevice (my hunch at the moment is that it'll be something closer to pulse in the Explorer HAT library with an on and off time, along with rise and fall time - but I'm not 100% sure about the design yet). So, given the intention is to override the one useful thing DigitalOutputDevice provides, there's not much point in inherting from it (semantically, I'm also not sure it should inherit from DigtialOutputDevice; PWM devices feel like a different branch to me - somewhere between digital and analog territory).

 ;-)
Currently PWMOutputDevice does inherit from DigitalOutputDevice https://github.com/RPi-Distro/python-gpiozero/blob/master/gpiozero/output_devices.py#L215 but I agree with you that this doesn't make much sense, so I was asking why it doesn't just inherit from OutputDevice. Glad to see I wasn't barking up the wrong tree!
Let me know if you'd like me to submit this inheritance-change as a PR - I guess the self._stop_blink() should also then be removed from https://github.com/RPi-Distro/python-gpiozero/blob/master/gpiozero/output_devices.py#L264 as well.

...and if I did do that, would I also need to have the on() and off() methods in PWMOutputDevice (to turn things fully-on and fully-off) ?

Dammit ... I should have coding days and answering tickets days and not try to intersperse them (context switching is hard)!
Given that's the way round it is, it's probably only that way to provide blink functionality on PWMOutputDevice until I can get around to providing the better replacement (the intention is to keep the first two parameters the same, on_time and off_time for compatibility with existing code, but then extend the prototype with more stuff). I wouldn't worry about fixing it at the moment, as it'll just remove functionality that someone might be relying on (now we're at 1.0 we should start taking API stability seriously).

I wouldn't worry about fixing it at the moment, as it'll just remove functionality that someone might be relying on (now we're at 1.0 we should start taking API stability seriously).

Fair enough. Is it worth opening up a "reminder" issue, that at some point it'd make sense to refactor output_devices.py to change PWMOutputDevice to inherit directly from OutputDevice (without breaking the 1.0 API)? Or is this now destined to remain as-is forever? ;)

Yeah, definitely worth opening a reminder issue. I don't have any issue with changing the inheritance of PWMOutputDevice; technically that's an API break but I can't imagine a use-case for checking isinstance(d, DigitalOutputDevice) and expecting it to come back True specifically for PWMOutputDevice descendents (whereas I can for testing the further up OutputDevice in order to determine whether or not something is an output or input device). In other words, provided the blink method can be called with the same parameters as before I'm happy to declare that "compatible enough".

Not sure if it's relevant, but I just found another nugget of info about pullup states and warm-boots: https://github.com/raspberrypi/firmware/issues/487#issuecomment-148700352

So... going back to the initial stuff - is this something that could be squeezed into the 1.1 milestone?

Yup, this ought to go in 1.1 - I can squeeze it in.

Okay, just thinking about this. I think the parameter should be called initial_value (makes it blindingly obvious we're talking about an initial state for the device rather than anything else) and that it should default to False. However, I'm thinking it should literally be the initial value for the value property; i.e. when active_high=True (the default), set the pin low but when active_high=False set the pin high so that the device itself remains off (when playing around with the PWM active high stuff I had a LED wired up active low and noted every time I instantiated a normal LED class on it, it lit up).
The default should play nicely with PWMOutputDevice as well since False==0.

Yup, that's pretty much what I was thinking in https://github.com/RPi-Distro/python-gpiozero/issues/118#issuecomment-158049019
Although thinking about it some more, in an earlier comment you said "I do know a few cases of people relying on this functionality (i.e. that the GPIO pins effectively "remember" their last states between runs)" so maybe the initial_value parameter should also accept a value of None, to indicate that no initial value at all should be passed to RPi.GPIO ?

My thoughts precisely - just coding it now :)

Though I have just realized that value is completely screwed up in OutputDevice when active_high is False. I'll fix all this up while I'm at it.


multipar-beta: Remove deprecated bin

par2_rename.exe is removed and some python scripts are added in version <IP_ADDRESS>.

/verify


Block Linking: jump into the next block immediately, if its address is known and it is already compiled.

If a basic block jumps to an address that is known at compile-time and that block is already compiled (or can be compiled upfront), then we can jump to that block directly and bypass the expensive block key construction and lookup step.

This was addressed with https://github.com/fleroviux/lunatic/commit/47c66e89945c0dcee7b417b269dbbb03fe81837e


seq_to_row simplified impl

def seq_to_rows(seq: Sequence, row_length: int) -> list[list[Any]]:
    return [
        seq[max(i - row_length, 0) : i]    # never go below 0, otherwise returns an empty list
        for i in reversed(range(len(seq), 0, -row_length))  # create the index sequence to order the results
    ]

In this first example, we reverse the range created, this is cheaper than reversing the created list, as its lazy.
I might consider making this a generator that yields List[Any], this is as simple as replacing return with yield from
or
def seq_to_rows(seq: Sequence, row_length: int) -> list[list[Any]]:
    rows = []
    for i in range(len(seq), 0, -row_length):
        rows.insert(0, seq[max(i - row_length, 0):i])
    return rows

Now, if I am remembering correctly, insert 0 has a high cost, dues to it being O(n) time, so, while this implementation will work, I think it will be slower than the above operation

this is sorta a concrete impl of dales suggestion, with the segments part implemented

Thanks for the contribution! My next session will focus on this transformation and pay attention to the above.

See issue #3


Register

@JuliaRegistrator register

Registration pull request updated: JuliaRegistries/General/68709
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.0 -m "<description of version>" a6b435012109d4e34c0997848e6b743c899f313b
git push origin v0.1.0


chore: release main

:robot: I have created a release beep boop
devcontainer: 1.3.0
1.3.0 (2024-10-25)
Features

✨ update target image at devcontainer (#209) (90053e3)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

devcontainer-v1.3.0
:sunflower:


No able to retrieve recommendations

Trace is:
[2017-09-04 13:38:26] local.nested.net.ERROR: Recombee\RecommApi\Exceptions\ResponseException: {"statusCode":404, "error":"Unknown key or database"}
 in /home/vagrant/Code/vendor/recombee/php-api-client/src/RecommApi/Client.php:167
Stack trace:
#0 /home/vagrant/Code/vendor/recombee/php-api-client/src/RecommApi/Client.php(155): Recombee\RecommApi\Client->checkErrors(Object(Requests_Response))
#1 /home/vagrant/Code/vendor/recombee/php-api-client/src/RecommApi/Client.php(90): Recombee\RecommApi\Client->post('http://rapi.rec...', 3, '{"count":5}')

I tried to reproduced the bug (both using my testing database and your database) and getting recommendations worked for me in both cases (using last released version 1.4.0 of the SDK).
What version of the SDK and what version of PHP do you use?

Hello @OndraFiedler!
I've done: artisan config:clear, and then it just started working.
Thanks! 👍


Confusing instructions on creating virtual network

Module: 01
Lab/Demo: 01
Task: 02 (Exercise 1)
Step: 04
Description of issue
"4. On the Create virtual network blade, specify the following settings and select OK (leave others with their existing values)"
During the lab an address space (<IP_ADDRESS>/24) already exists (or is prefilled). Also an subnet 'aadds-subnet' already is prefilled
It appears to be very confusing to both myself and other students.  Especially because it writes 'leave others with their existing values'
Repro steps:

Would you mind clarifying what specifically you find confusing - and what specifically would you want to change in order to minimize potential confusion?
The purpose of the phrase "leave others with their existing values" is to indicate that you should change only the settings which are explicitly referenced in the instructions.
rgds
Marcin

Thank you.
Well instructions write you should add aan new vnet az140-aadds-vnet11a
Once you start doing that it already has a <IP_ADDRESS>/24 address specified.
Also it has a 'aadds-subnet' prefilled (<IP_ADDRESS>/24)
I think (but I'm learning not knowing) that it should be replaced with the ip-ranges specified in the instructions
(<IP_ADDRESS>/16 for the address range and <IP_ADDRESS>/24 for the subnet). But 'replacing' implies changing existing values.
Because of the 'leave others with their existing values' it seems you shouldn't not touch those prefilled values.
I may be wrong. Perhaps you can just try and see how it looks and if it seems confusing to you.

Would you mind taking a screenshot of what you're looking at and including it in this thread?
rgds
Marcin

I would have done it earlier if I knew it was possible.
As I'm getting behind in this course because of other issues in the labs (see issue #39) I'm not able to fully reproduce this issue. I usually follow the labs step by step so I think it should be reproducible. But it should be the exact steps and not changing the network afterwards, because it seems the window is slightly different then.

appreciate the clarification. Updated...
rgds
Marcin


(donut) Conditional colors based on data?

This isn't a bug report. Sorry for possible confusion.
I'd like to know how to create a donut chart in which colors of particular slices are dependent on the data. I managed to achieve this fairly easily in bar charts, using:
color: function (color, d) {

if (d.value < 25) {
 return "#f00";
}

but I can't figure out the donut.
What I mean:

There are only two slices (and two data groups), A and B, and each only has 1 value, e.g. A = 35 and B = 65, i.e.

input data:
A,B
35,65

B slice should always have a constant color, e.g. "gray" regardless of its value
A slice and its color should be depended on A values, e.g. if value > 50, then color is red, if value > 75, then color is orange, and so on.

For example: A is 45 and B is 55. A slice is red. B is gray. Input data changes (i.e. the chart is refreshed). A is now 60 and B is 40. B is still gray (it always is), but A should be now orange. Input data changes. A is 90, B is 10. B is gray. A is green, and so on.
Many thanks for any help! \o/

Solved: https://stackoverflow.com/questions/51977897/conditional-colors-based-on-data-on-donut-chart-with-c3js


DS4 won't connect to controller

DS4 is suddenly not detecting my controller anymore. This happened spontaneously and I can't determine what caused/how to help it. I reinstalled the device, checked Device Manager, ran the DM's troubleshooter, and even rebooted my computer. I managed to get my controller to work over bluetooth in the morning as an experiment (I prefer USB and this was before leaving so it was a last-ditch attempt), but now that won't work either. I'm not sure why HID-Game Controller is suddenly missing from DM nor why my controller he won't show up in the control panel. The controller is completely authentic (came from the same box as the PS4) and has been working perfectly fine for months. All of a sudden, it's invisible to my computer. I've even changed USB cords and swapped the controller out for the other (official) controller I had and nothing seems to have changed. Is there any way to go about this?

@lalisdelfi did you try restarting the computer?

It happens to me today.. Out of nowhere... my computer don't see the controller anymore. You found the problem yet ?

I've found a fork that is actively developed: https://github.com/Ryochan7/DS4Windows (linked to another issue here). So far so good, although I've been using it only briefly.

Here's a solution (you're welcome)
https://www.youtube.com/watch?v=ycM-dRk1moQ


Comprehensive PDF Report Package

A full PDF that shows a break down for each report , so that the topics for different age groups are visible etc.

Identify the different pages required for the report and review them with Professor Peyton and Mansi.
Implementation of the Power BI Report.

completed


API ideas

implement format fn for Color and FontStyle types
with custom specifiers:
if specifier is empty then write CSI-sequence
bg & fg specifiers for Color type: treat value as background & foreground respectively
np: don't write CSI prefix for intelligent updates

As result:
   debug.print("{fg} FG red {bg} BG green {} default", { .Red, .Green, .Reset });

Counter-proposal which works with #10 as well:
std.debug.print("this is normal text {this is also normal} {this is red}", .{ Style.default, Style{.foreground = Color.red} });

This is of course convenient for enabling applications to have colored terminal output. But I think this library should also be robust and still provide the low-level interfaces like updateStyle in order to minimize the bytes written to the terminal.

Another counter-proposal: I think the most common use case for this high-level printing would be in association with compile-time known styles. This means we can design a function
pub fn red(comptime text: []const u8) []const u8

and use this for example:
std.debug.print("{}: " ++ Styled.red("Path {} does not exist"), .{ time(), path });


Updated CMakeLists.txt for specifing destination folder of xnp21kai

Those files are detected with TYPE parameter,
Then install directory is decided automatically.
Check 'Installing files' in CMake document.
https://cmake.org/cmake/help/latest/command/install.html#installing-files

The target directories have been updated according to the documentation, but I'm still not sure whether the manpage target is correct.
Also how to link with SDL_net using CMake?

I think this mod is unnecessary.
Let CMake.

My CMake always reports error and cannot generate makefile before I add these scripts.

What does version your CMake?
What do you use UNIX system?
Please tell me.