Action for closing prs submitted by the submitters master branch

About the PR

Makes a github action to close new pr's from the master branch
Why / Balance

Breaking changes

Feature prs from master branches are automatically closed
I think you can bypass this action by just manually reopening the pr.
Will need to be ported to all other projects since ya know... actions

Note: this needs a better comment imo. Up for suggestion

a better comment would be something like ```
Thank you for your contribution to the Space Station 14 repository.  We suggest you follow our git usage documentation.
You can move your code from the master branch to another branch by doing git branch <branch_name and resetting the main branch.

idk just a suggestion

agree w eclipse

gotta make it inclusive to the noobs using github desktop (people making this mistake are probably using it anyway)

now make it autoclose github desktop prs :trollface:

This code assumes that the downstream trunk branch is called "master". This is non-ideomatic for modern Git.
e.g.
https://about.gitlab.com/blog/2021/03/10/new-git-default-branch-name/

people that make prs from master commonly include old prs in new ones which is why its bad

This code assumes that the downstream trunk branch is called "master". This is non-ideomatic for modern Git.
e.g. about.gitlab.com/blog/2021/03/10/new-git-default-branch-name
develop and main are also valid names for base branches.
Personal note: "fuck you" bot messages discourage collaboration - it's like trying to wade through submitting a link on modern Reddit.

By default our main branches are called "master", when you fork you just copy the main name of the fork branch

This code assumes that the downstream trunk branch is called "master". This is non-ideomatic for modern Git.
e.g. about.gitlab.com/blog/2021/03/10/new-git-default-branch-name
develop and main are also valid names for base branches.
Personal note: "fuck you" bot messages discourage collaboration - it's like trying to wade through submitting a link on modern Reddit.

By default our main branches are called "master", when you fork you just copy the main name of the fork branch

Personal note: "fuck you" bot messages discourage collaboration - it's like trying to wade through submitting a link on modern Reddit.

And the docs say that we will close your branch if its on master. And causes more issues if we let them do more prs later on. The bot message provides instructions on how to resubmit

If preferred, we can keep it as just a bot message. Then the maintainer reviewing can close it on their own decision.
Letting this option be out there.

Personal note: "fuck you" bot messages discourage collaboration - it's like trying to wade through submitting a link on modern Reddit.

A lot of people have cooked their very first / first N prs (seth) by using master and in some cases have nuked their entire repos just to recover. Personally it doesn't affect me but it's a warning that they're probably gonna have a bad time.


fix: compilation errors

Fixes some compilation errors that pop up when running cargo clippy --all --all-targets -- -D clippy::all -D warnings. Apparently there was a refactor and now some assembly related structs were moved to miden-objects

Looks good! Thank you!
Do we still need the assembly dependency (in Cargo.toml) after this?

No we don't. I removed it


Viewport2DIn3D

Implementing Reusable Viewport2DIn3D Scene
An implementation of having a viewport render a 2D UI in 3D inspired by the Godot XR Tools project's viewport_2d_in_3d implementation. The main guts of this already exited in the Killhouse demo scene for the screen that lets you change your dominant hand. I mainly focused on generalizing this implementation for reuse. This implementation should behave near identically (if not totally identically) to what is found in the Killhouse demo scene.
Implementation
Viewport2DIn3D is a Node3D derived node that needs a PlaneMesh child to act as a screen that is managed by the script to render the SubViewport which contains a Control scene for 2D UI.
Screen Properties
This node is highly based on the implementation in the Godot XR Tool project. The main difference is that this node does not completely manage the screen mesh and so does not need to track many mesh render properties. However this means that it must make sure that the collision shape is kept updated with the mesh. This is done using the CheckScreenProperties method.
https://github.com/VirtualNubs/NXR/blob/9e721ccbc1b5ee8e7676b38afe6973f4614f30da/addons/nxr/scripts/ui/Viewport2DIn3D.cs#L264-L272
Update Loop
Keeping the screen mesh updated with the Subviewport is handled by the two update methods, Update and UpdateRender where Update calls UpdateRender along with also checking if the collision size needs to be changed to keep in sync with the screen size. All updates are handled via bit flags in the _dirty bitfield.
https://github.com/VirtualNubs/NXR/blob/9e721ccbc1b5ee8e7676b38afe6973f4614f30da/addons/nxr/scripts/ui/Viewport2DIn3D.cs#L190-L199
For example this check in the UpdateRender method updates the screen material and updates the albedo and surface to ensure that the material is reapplied.
https://github.com/VirtualNubs/NXR/blob/9e721ccbc1b5ee8e7676b38afe6973f4614f30da/addons/nxr/scripts/ui/Viewport2DIn3D.cs#L202-L219
This check updates the scene by managing the SubViewport child and triggering a redraw.
These flags are controlled when their backing store is set
https://github.com/VirtualNubs/NXR/blob/9e721ccbc1b5ee8e7676b38afe6973f4614f30da/addons/nxr/scripts/ui/Viewport2DIn3D.cs#L15-L28
Modifying Pointer.cs
To make use of the already existing code for this functionality I changed the code in the TrySendInputToGUI method to grab the SubViewport node in the new scene structure.
https://github.com/VirtualNubs/NXR/blob/2e044cc12fc64e1da035eee5c1fc36af3af74b3b/addons/nxr/scripts/ui/Pointer.cs#L69-L89
The Pointer will collide with the collision child of the Viewport2DIn3D node so we will need to check if the collider's parent is a Viewport2Din3D node from which we can access the Subviewport.
Class Documentation
When writing this feature I added XML documentation comments as specified by the C# Language Specification, Annex D . I wanted to start setting a standard of documentation for new code (and a future revision of current code) to include documentation comments. I believe that this will help both addon users and future project contributors gain an understanding of the codebase and how to leverage it for their purposes.
The Viewport2DIn3D class contains documentation strings for the class itself, all class members part of the public API, and certain private members I thought should be explained as they are large, important parts of the class's function.
Documenting at least the class's public API would help immensely with code comprehension moving forward and using XML documentation comments is well supported by C# as part of its specifications and in tools such as Visual Studio through generating and inserting XML comment templates.

I think the same-line exports are very clean looking, especially in ExportGroups like your linked example. I wanted to bring up enforcing a style guide for the project; it'll help keep diffs for file changes lean to make reviewing pull requests cleaner. I'll make an issue so we can track our solutions past this PR.
As for this PR I apologize for holding it up for so long. I've gotten busy with some stuff, but I'm aiming to work on it and mark this ready for review ASAP!

I'll make an issue so we can track our solutions past this PR.

The style guide issue is #19

Fixed an issue with having multiple Viewport2Din3Ds scene instances in one scene, added controls for the child SubViewport, and added more public member documentation. Should be ready for review now.

Just had a chance to try it out. Works great! The only issue I saw was the shooting range demo UI needing to be updated, but everything was flawless!

Found another thing while testing. When having UI elements off center it seems like the pointer coordinates are flipped. Looks like a mistake in Pointer.cs with a negative axis.
https://github.com/VirtualNubs/NXR/blob/310092937faf61a5b996ef7ed9d030be973bc169/addons/nxr/scripts/ui/Pointer.cs#L76


Travis failure

Travis seems to fail because of the SafeProcess module.
I think this module is not used. Shall we remove it ?

Well, it will be made pretty obvious if that module is not used :) Why not try?

Build is passing again but I had to remove ghc-7.10 (which I guess is not a big deal) and remove haddock generation for ghc-8.2.1.
I really don't know why it blocks. I am still using ghc-8.0.2 so I could not witness this locally.
For the record, there are some strange warnings with ghc-8.2.1 (they don't seem to make sense) about:
<no location info>: warning: [-Wmissing-home-modules]

    These modules are needed for compilation but not listed in your .cabal file's other-modules: Paths_language_puppet


Merging changes from KAIST on Rust rewriting of Hafnium on behalf of @efenniht

As described in title. I am not sure if I have merged everything correctly. After this change lands, I will ask @efenniht and @jadephilipoom for confirmation.

Will land this PR first then ask people for examination.

This PR is involved with two orthogonal streams of patches: (1) upstream updates, and (2) Rust port.  How about splitting this PR into two for each stream?


flowey/gh: ensure the "all good" job does what its supposed to do

It seems that on github, this job never actually did what it was supposed to do, which was:

pass if all previous jobs passed
fail if any previous job failed

Instead, it seems that in the case of any previous job failing, GitHub Actions would simply skip executing the "all good" job entirely, and treat the skip as a "pass" of the (required) check. An interesting default indeed...
We never noticed this as we would previously run the PrivateVsoBuild job, which was a superset of all open-source checks, and would therefore fail if any open-source check failed, causing the PR to be blocked even through the "all good" check was ostensibly "passed".
This PR should fix things up such that our "all good" job does what its supposed to do, by relying on a workaround suggested in https://github.com/actions/runner/issues/2566 (albeit, a slightly tweaked variant of it).

I also switched the job to run on a Linux machine, which I believe is marginally faster to provision and execute on.

Looking promising: seems my totally on purpose doc issues were correctly identified by the job, causing it to fail as expected.

After this is merged I will tweak the required status checks to only have the openvmm checkin gates job.


Use tree structure for files uploaded through the UI

For files uploaded through the UI, we now create
Imports::Uncategorized records instead of SourceFile
records. These Uncategorized records will not
immediately be processed. The processing will
be handled by a rake task in a future PR.
Asana ticket

I think this needs to go in before the backfill, which is the next item in the todo list. I'll spend a few minutes looking at the test failures to see if it's actually something we can quickly fix.

I think this needs to go in before the backfill

What piece here is needed for the backfill? I actually think the tickets around linking up the DataImport records and allowing converters to claim (assign themselves) will need to happen soon so we can start transitioning the converters over to the new system.

This PR augments the file upload to also store into the new imports tree. The backfill's goal is to add import trees for all existing StandardsImports. If we merge the backfill before we merge this, then we'll miss out on files uploaded between the backfill and this merge.


use CLIP to convert text into conditions

Hi Phil,
Are you considering adding CLIP into classifier-free and thus implementing text2img?
If so, I'm willing to do a PR.

yea sure, or maybe it can be generalized to any CLIP model? it can be any modality to any modality after all

@lhaippp maybe generalize it to any model, with a text CLIP as one example
would be a great contribution!

@lucidrains Okay, Let's find time to implement this feature

@lhaippp looking forward to it!


operator specific init function

currently the type specific operator implementation allocates memory and initializes its outputs.
therefore resolving can only happen after a previous operator has been executed.
I propose to split up the initialization and execution in two different functions.
This enables us to initialize and resolve all tensors before any execution happens and also to run the network multiple times with changing input data without reconstructing the whole network again.

therefore resolving can only happen after a previous operator has been executed.
Not sure what you mean by this.

Yes, this is something that we have to fix. Our current implementation is hardcoded to float.
// inference.c
...
all_context[nodeIdx].outputs[i]->data_type = 1;
...

So I imagine that the "initialisation" function that you are referring to is a function that populates this data_type for a given operator, right? Or what do you mean by "initializes its outputs"?
Someway related to #40, we have to think a way to know the output data_type for each operator. I haven't deeply looked into it but I had in mind some kind of generic function, and treat the specific cases aside. Some come cases from the top of my mind:

If the operator has only 1 input and 1 output. Output data_type is the same as the input one (with some exceptions ofc)
If there are two inputs, take the data_type of the first one.
Treat aside specific cases such as Cast, Constant,...

In order to run an operator, all its inputs must be allocated (i.e. data field, not the tensor itself), have a set datatype/shape/... attribute and be filled with data.
Currently the executer does all of these things at once, I would like to split these things up.
As far as I see it, the allocation and setting of datatype/shape/... can be done before any calculation.
So we could split up these parts into two functions, one that does the actual calculation and one that does all the other stuff needed beforehand.

Someway related to #40, we have to think a way to know the output data_type for each operator. I haven't deeply looked into it but I had in mind some kind of generic function, and treat the specific cases aside. Some come cases from the top of my mind:

At least for things like the shape attribute, I don't think a generic approach is possible. Would be great, but I don't see it.

Sounds good. I wasn't thinking about the shape but can help to remove repeated code. Some operators like Conv need quite a lot of code to calculate the output shape, and with the current implementation we have to run this calculations for every type (float, double). This idea might help with that also.


Current AppImage Runtime does not support Zstd

We should replace with https://github.com/AppImage/type2-runtime/releases and test

Fixed in https://github.com/velopack/velopack/pull/243


expose PriorityClass for eraser helm chart for manager and collector containers

Describe the solution you'd like
We need to set the PriorityClass for eraser manager and collector containers as well for our kuberneters management

Eraser version: v0.5.0
Kubernetes version: (use kubectl version): v1.24.6

we can need a design for this as part of #446


On workspace delete, do cleanup / cascade delete

Details
If we are deleting a workspace perform clean up queries
Fixed Issues
$ https://github.com/Expensify/App/issues/14260
PROPOSAL: https://github.com/Expensify/App/issues/14260#issuecomment-1385632796
Tests

Create a workspace
(device A) Go to one of the workspace reports (such as the admins room or announce room)
(device A) Type any message
(device A) Verify that you see the pencil icon on LHN
(device B) Delete the same workspace
(device A) Verify that you no longer see the pencil icon on LHN

[ ] Verify that no errors appear in the JS console

Offline tests
n/a
QA Steps

Create a workspace
(device A) Go to one of the workspace reports (such as the admins room or announce room)
(device A) Type any message
(device A) Verify that you see the pencil icon on LHN
(device B) Delete the same workspace
(device A) Verify that you no longer see the pencil icon on LHN

[ ] Verify that no errors appear in the JS console

PR Author Checklist

[X] I linked the correct issue in the ### Fixed Issues section above
[X] I wrote clear testing steps that cover the changes made in this PR

[X] I added steps for local testing in the Tests section
[X] I added steps for the expected offline behavior in the Offline steps section
[X] I added steps for Staging and/or Production testing in the QA steps section
[X] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[X] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[X] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[X] I included screenshots or videos for tests on all platforms
[X] I ran the tests on all platforms & verified they passed on:

[X] Android / native
[X] Android / Chrome
[X] iOS / native
[X] iOS / Safari
[X] MacOS / Chrome / Safari
[X] MacOS / Desktop

[X] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[X] I followed proper code patterns (see Reviewing the code)

[X] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[X] I verified that comments were added to code that is not self explanatory
[X] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[X] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[X] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[X] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[X] I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[X] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[X] I verified the JSDocs style guidelines (in STYLE.md) were followed

[X] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[X] I followed the guidelines as stated in the Review Guidelines
[X] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[X] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[X] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[X] I verified that if a function's arguments changed that all usages have also been updated correctly
[X] If a new component is created I verified that:

[X] A similar component doesn't exist in the codebase
[X] All props are defined accurately and each prop has a /** comment above it */
[X] The file is named correctly
[X] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[X] The only data being stored in the state is data necessary for rendering and nothing else
[X] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[X] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[X] All JSX used for rendering exists in the render method
[X] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[X] If any new file was added I verified that:

[X] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[X] If a new CSS style is added I verified that:

[X] A similar style doesn't already exist
[X] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[X] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[X] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[X] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[X] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
https://user-images.githubusercontent.com/16493223/213022809-38025198-28db-469c-b4d6-df6f8d871c53.mp4

Mobile Web - Chrome
https://user-images.githubusercontent.com/16493223/213022827-0f5f084a-b765-4725-9575-41cc7862efed.mp4

Mobile Web - Safari
https://user-images.githubusercontent.com/16493223/213023116-50291cf1-7ac0-43b9-b489-9f99470c25a6.mp4

Desktop
https://user-images.githubusercontent.com/16493223/213023127-8d277207-5a13-45f6-a08a-d24d6a4789f7.mp4

iOS
https://user-images.githubusercontent.com/16493223/213023452-93f1d98f-00cb-4c19-b88f-07d9d8838e68.mp4

Android
https://user-images.githubusercontent.com/16493223/213023471-db53b32b-dd38-4477-8f6d-a0081b4e026f.mp4

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by https://github.com/tgolen in version: 1.2.57-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/luacmartins in version: 1.2.57-3 🚀

platform
result

🤖 android 🤖
failure ❌

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Pokemon info is revealed when it shouldn't be while learning a move immediately after evolving

Version: 0.6.0
When a Pokemon evolves and then immediately learns a move, the Tracker reveals the new stat information about your evolved Pokemon. These stats and abilities are information that the user cannot normally know because they are stuck in the Learning a Move prompt. So they can't check the summary of the evolved Pokemon.
I suppose one solution here is to hide the info in a similar way as we do when hiding for mustCheckSummary.

Labeling this as a bug because this breaks the first rule of the Tracker: don't show information to the player that they couldn't otherwise have themselves.

Dumping everything here so some other poor soul doesn't also dive into this. The bad news:

FRLG and E have a flag specifically when evolution triggers. RS has no such flag.
There is a return pointer set in all games when an evolution takes place, which tells the game where to return in battle. This does not get set, though, for evos that occur outside of battle aka from items

The good news:

Each game has a data structure which governs evolution data (sEvoInfo in RS, sEvoStructPtr in FRLG/E), and a list of tasks (gTasks), of which evolution has several.
The evolution task can be looked up and has a variable dedicated to the function (which can be tied back to an evolution task), and a state (evolution ends on 15, otherwise it is playing an animation or learning a move), as well as some other useful things.

Working on setting it up so that if the evolution task is active, we only update the tracker if the Task is on the final state

https://user-images.githubusercontent.com/12836386/186820858-4b5ecb91-2a15-4e69-9480-9920e8b5a026.mp4
Working for RS, checking FRLG

Resolved as of #216 and #220


swift support

When will you add the swift support?

Hello!
Sorry, but this project doesn't support.
Please, see https://github.com/yandex-money/yandex-money-sdk-objc and create issue there.


Add a qjit-compatible catalyst.vmap function

[X] catalyst.vmap(fun) is added to Catalyst and can apply inside qjitted functions
[X] catalyst.vmape currently converts vmap specifications to catalyst.for_loop
[X] Add support for in_axes (vectorization of only one argument is currently supported)
[X] Add support for out_axes (also need to specify the shape and size of the output of the qnodes)
[ ] Support PyTrees as parameters and return values of vectorized hybrid programs

[sc-55115]

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (f05d463) 99.57% compared to head (2232930) 99.57%.
 Consider uploading reports for the commit 0a3630b to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #497   +/-   ##
=======================================
  Coverage   99.57%   99.57%
=======================================
  Files          43       43
  Lines        7740     7782   +42
  Branches      533      544   +11
=======================================
+ Hits         7707     7749   +42
  Misses         17       17
  Partials       16       16

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Same code as Playwright but the response is different in Puppeteer with click()

I moved to Puppeteer few days ago and been stuck on this thing ever since. Basically what I am trying to do is load up a page, do .click() and the the button then sends an xHr request 2 times (one with OPTIONS method & one with POST) and gives the response in JSON. Everything worked fine in playwright, the requests were sent successfully and response was good but in Puppeteer, the request is fine but the response is different. Here are both of the codes:
Playwright:
const {webkit, devices} = require("playwright-webkit");
const iPhone11 = devices["iPhone 11 Pro"];
const fs = require('fs');

var userAgent =
    "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36"

var options = {
    args: [],
    ignoreDefaultArgs: ["--mute-audio", "--hide-scrollbars"],
    ignoreHTTPSErrors: true,
};

(async () => {
    const browser = await webkit.launch(options);

    let emulateTemplate = {
        ...iPhone11
    };
    emulateTemplate.viewport.width = getRandomInt(320, 1920);
    emulateTemplate.viewport.height = getRandomInt(320, 1920);

    const context = await browser.newContext({
        ...emulateTemplate,
        deviceScaleFactor: getRandomInt(1, 3),
        isMobile: Math.random() > 0.5,
        hasTouch: Math.random() > 0.5,
        userAgent: userAgent,
    });

	const cookies = fs.readFileSync('cookies.json', 'utf8');
	const deserializedCookies = JSON.parse(cookies);

	await context.addCookies(deserializedCookies)

    const page = await context.newPage();
    url = "https://example.com";

    console.log("~browser started");

    await page.goto(url, {
        waitUntil: "load",
        timeout: 0
    });

    console.log("~u loaded");

    const [response] = await Promise.all([
		page.waitForResponse(/[\\/]run/),
        page.click('.go-button'),
    ]);

	console.log(await response.json())

    await browser.close();

})();

function getRandomInt(a, b) {
    const min = Math.min(a, b);
    const max = Math.max(a, b);
    const diff = max - min + 1;
    return min + Math.floor(Math.random() * Math.floor(diff));
}

Puppeteer:
const webkit = require('puppeteer');
const iPhone = webkit.devices['iPhone 11 Pro'];
const fs = require('fs');

var url = "https://www.example.com";

var userAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36"

var options = {
    ignoreDefaultArgs: ["--mute-audio", "--hide-scrollbars"],
    ignoreHTTPSErrors: true,
    defaultViewport: {
        width: getRandomInt(320, 1920),
        height: getRandomInt(320, 1920),
        isMobile: Math.random() > 0.5,
        hasTouch: Math.random() > 0.5,
    }
};

(async () => {
    const browser = await webkit.launch(options);
	const page = await browser.newPage();

    // Enable request interception
    //await page.setRequestInterception(true);

    //set iPhone as emulator
    await page.emulate(iPhone);

	// set user agent (override the default headless User Agent)
	await page.setUserAgent(userAgent);

	const cookies = fs.readFileSync('cookies.json', 'utf8');
	const deserializedCookies = JSON.parse(cookies);

	//set cookie
	await page.setCookie(...deserializedCookies);

    console.log("~browser started");

    await page.goto(url, {
        waitUntil: "load",
        timeout: 0
    });

    console.log("~u loaded");

    const [response] = await Promise.all([
        page.waitForResponse(response => response.url().includes('/run/') && (response.request().method() === 'POST')),
        page.click('.go-button')
    ]);

	console.log(response.url(), await response.json())

	await browser.close();
})();

function getRandomInt(a, b) {
    const min = Math.min(a, b);
    const max = Math.max(a, b);
    const diff = max - min + 1;
    return min + Math.floor(Math.random() * Math.floor(diff));
}

Would be grateful if someone can help me on this. I literally can't figure out whats wrong.

Okay I tried running headless and tested everything there with Console network requests. For some reason the website I am trying to access can detect that I am using a third party app to control chrome, in Playwright I was using webkit and everything works just fine. Also we cant login into GMAIL in puppeteer, I will open a new thread about this.


wheel builder doesn't compress python source files

poetry writes the metadata files using ZIP_DEFLATE but the source files are not compressed.
This is unlike wheel which does store source files deflated. As a result poetry generated wheels can be much larger than the equivalent bdist_wheel generated one.

Fixed in #838 that got merged today 2019-03-06.


⚠ Bofrost.de has degraded performance

In 8bd3b76, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1421 ms

Resolved: Bofrost.de performance has improved in a102e24 after 6 minutes.


[Enhancement] be prints more accurate logs when accessing hdfs fails

Fixes #issue
add more accurate logs like the box

What type of PR is this:

[ ] BugFix
[ ] Feature
[x] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Does this PR entail a change in behavior?

[ ] Yes, this PR will result in a change in behavior.
[x] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

[ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
[ ] Parameter changes: default values, similar parameters but with different default values
[ ] Policy changes: use new policy to replace old one, functionality automatically enabled
[ ] Feature removed
[ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[x] 3.2
[x] 3.1
[ ] 3.0
[ ] 2.5

[FE Incremental Coverage Report]
:heart_eyes: pass : 0 / 0 (0%)

[BE Incremental Coverage Report]
:disappointed: fail : 0 / 4 (00.00%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
src/fs/hdfs/fs_hdfs.cpp
0
4
00.00%
[59, 60, 605, 606]

@Mergifyio backport branch-3.2

@Mergifyio backport branch-3.1

@Mergifyio backport branch-3.2


octave: Try to use build with Qt5

Motivation for this change
Tackling #57900
This is very much work in progress.
Right now I can build octaveFull with this patch applied, but it crashes at startup (signal 6). strace output:
[...]

recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\0\5\0\0\0\0\0\1\207U\211\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\207\0\2\0\1\0\0\0", iov_len=8}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 8
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\1\6\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="<\0\2\0\0\0\0\2+\2\1\0", iov_len=12}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 12
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\1\10\0\0\0\0\0\"\0\200\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
shutdown(3, SHUT_RDWR)                  = 0
close(3)                                = 0
rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT PIPE ALRM TERM CHLD XCPU XFSZ VTALRM], NULL, 8) = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f6830c4d050) = 85090
rt_sigaction(SIGINT, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGABRT, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGALRM, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGBUS, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGFPE, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGHUP, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGILL, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGABRT, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, 8) = 0
rt_sigaction(SIGPIPE, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGIO, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGQUIT, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGSEGV, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGSYS, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTERM, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTRAP, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGUSR1, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGUSR2, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGVTALRM, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGIO, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, 8) = 0
rt_sigaction(SIGXCPU, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGXFSZ, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [HUP INT QUIT PIPE ALRM TERM CHLD XCPU XFSZ VTALRM], NULL, 8) = 0
wait4(85090, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGABRT}], 0, NULL) = 85090
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=85090, si_uid=1000, si_status=SIGABRT, si_utime=3, si_stime=1} ---
write(2, "octave exited with signal ", 26octave exited with signal ) = 26
write(2, "6", 16)                        = 1
write(2, "\n", 1
)                       = 1
exit_group(0)                           = ?
+++ exited with 0 +++

Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[ ] NixOS
[ ] macOS
[x] other Linux distributions

[x] centos 7

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Assured whether relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

@matthiasbeyer I can build octave from your PR.
 It starts for me, too! Awesome!
Now I guess I have to bring this PR here in shape for inclusion, right?

What I would do: I would add two packages where octave is build with Qt5.12 instead of Qt4 and add them to the top-level as octaveQt5 and octaveQt5Full. This way users do not automatically download Qt5 when upgrading their stuff but get the option to do the switch to the Qt5-version of octave.
Comments on this idea?

Okay, so what I have right now is:

It builds with libsForQt512 but without GUI because qcollectiongenerator cannot be found somehow
It builds (with gui) for libsForQt511
It builds (with gui) for libsForQt59

So I assume I should package it with 5.11 and do what I suggested above. I will do that tomorrow, though.

This builds for me, so lets see whether it builds for
@GrahamcOfBorg build octaveQt5Full

Hm, eval failure seems related to this PR

How can I reproduce this failure?
I just rebased this branch on master and rebuild the attribute and it worked fine in my environment (centos7 in a VM, no sandboxing).

@GrahamcOfBorg eval
@GrahamcOfBorg build octaveQt5
@matthiasbeyer did you also run the test-eval-release.sh script?

@matthiasbeyer Are you able to continue with this PR and address comments from @7c6f434c?

This needs tests with the new octave 5.2.0.

@matthiasbeyer I'm working on enabling qt5 at these very moments. Since qt4 is deprecated both in Nixpkgs and upstream, I decided to drop the qt4 support and use qt5 or nothing by default. Plus, I'm trying to add a build with JIT enabled. Would you like to chat / join forces for this?

@doronbehar well, actually no, sorry. Building octave with qt5 was (at the time I started this PR) just a proof of concept for my professional job, that it could be done and "just work". I do not feel comfortable investing time into this direction in nixpkgs, as I am not actually using any qt applications myself (besides pavucontrol maybe) and am not knowledgeable about qt at all...
So I do not feel qualified for this, but I also do not have that much private time that I could invest in this topic to actually contribute somem real value to it.

Don't mind it @matthewbauer. I've just finished my semester so I've just gained a lot of free time. I'll quote you when my PR will be ready so you could subscribe :).


Being able to customise check mark in button to only have colours

Is your feature request related to a problem? Please describe.

I want to create a Game of Life. So I need a grid of n x n buttons or checkboxes. When activated, I want the button or checkbox to change colour instead of showing the check mark. Maybe this is already possible (using radio buttons is too ugly).
Describe the solution you'd like

A n x n grid where every cell is black and when "activated", the cell has a different colour, e.g. green.
Describe alternatives you've considered

Additional context

You can change checkbox color or radio button's dot by changing visuals.widgets.inactive.fg_stroke.color. Additionally you can wrap it into ui.scope so those changes won't affect the rest of the application. https://imgur.com/fPg4kZ3
ui.scope(|ui| {
    ui.style_mut().visuals.widgets.inactive.fg_stroke.color = Color32::RED;
    // If you want the same color when hovered
    ui.style_mut().visuals.widgets.hovered.fg_stroke.color = Color32::RED;

    ui.checkbox(&mut self.check, "Checkbox");
    ui.radio(self.check, "Radio");
});

Thanks a lot for the quick response.
The code works. However, now my check mark is red instead of green. I want no check mark but the whole box to be red (if inactive) and green (if active / checked). Does that make sense?

You can use https://docs.rs/egui/latest/egui/struct.Painter.html#method.rect_filled for that.

Thanks a lot. I am quite new here, but do you mean changing the Painter in button.rs? Can I somehow override the default Painter?

To get a Painter instance you probably would want to use one of the ui.allocate_* functions. You can take a look at the example with custom checkbox to see how it is used. Then through various methods you can fill allocated space with small squares(rect_filled method I mentioned above).

Man, sorry to bother again, I am sure you have other stuff to do as well. But somehow I don't get it.
I have the following code working at the moment:
                egui::Grid::new("some_unique_id").show(ui, |ui| {
                    for i in 0..=*(sqrt_number_of_cells) as usize  - 1 {
                        for j in 0..=*(sqrt_number_of_cells) as usize - 1 {
                                ui.checkbox(&mut self.front_end_grid[i][j], "");
                        }
                        ui.end_row();
                    }
                });

It creates a grid of checkboxes for a given number of cells sqrt_number_of_cells.
I understand, that I can now put the grid inside a
ui.scope(|ui| {
... grid ...
});

Within the ui.scope I can use ui.allocate_*. But somehow I don't get my checkbox red (inactive) and green (active).

You can use this to create a rectangle, whose background color can be toggled:
fn custom_checkbox(ui: &mut Ui, width: f32, height: f32, checked: &mut bool) -> Response {
    // create a `Rect` with given size
    let (rect, response) = ui.allocate_exact_size(
        vec2(width, height), Sense::click(),
    );

    // if the rect is visible
    if ui.is_rect_visible(rect) {
        // paint with a background color, depending on whether we're checked
        let color = if *checked { Color32::GREEN } else { Color32::RED };
        ui.painter().rect_filled(rect, 0.0, color);

        // if we're clicked, update the checked state
        if response.clicked() {
            *checked = !*checked;
        }
    }

    response
}

The response also has other useful functions, such as hovered().
For a larger example, see https://github.com/emilk/egui/blob/master/crates/egui_demo_lib/src/demo/toggle_switch.rs.

const SPACING: f32 = 4.;
const WIDTH: f32 = 18.;
const N: usize = 10;

let (r, p) = ui.allocate_painter(Vec2::splat(N as f32 * WIDTH + SPACING * (N - 1) as f32), Sense::click());
let input = ui.input().pointer.clone();

for i in 0..N {
    for j in 0..N {
        let min = r.rect.min
            + vec2(
                i as f32 * WIDTH + i as f32 * SPACING,
                j as f32 * WIDTH + j as f32 * SPACING,
            );

        let rect = Rect {
            min,
            max: min + Vec2::splat(WIDTH),
        };

        let color = if input.hover_pos().map(|p| rect.contains(p)).unwrap_or(false) {
            // Hovered

            if r.clicked() {
                // Clicked
                println!("Clicked {i} {j}");
            }

            Color32::WHITE
        }

        p.rect_filled(rect, Rounding::none(), color)
    }
}

Amazing, exactly what I wanted. Thanks


How to set the whole struct to its default value from it's attributes?

I have a scenario where I am expecting user input to be minimal by default with assumptions on all levels of nested structs.
class CustomSpec < ::Dry::Struct
    attribute :thresholds, ::Dry::Struct.meta(omittable: true) do
      attribute :success, ::AttributeTypes::Integer.default(1)
      attribute :failure, ::AttributeTypes::Integer.default(1)
      attribute :retryTime, ::AttributeTypes::Integer.default(10)
    end
end
c = CustomSpec.new({})

Expectation:
c.thresholds is set to have default values via its attributes.
c.thresholds.success is equal to 1 and so on.
Reality:
c.thresholds is nil
How do I get this working?

Hi there, you can use:
class Foo < Dry::Struct
  attribute :bar do
    attribute :nested, Types::Integer
  end
end

class Foo < Dry::Struct
  class Bar < Dry::Struct
    attribute :nested, Types::Integer
  end

  attribute :bar, Bar.default { Bar.new(nested: 1) }
end


auth.log full of messages related to em0, and icon status

I have networkmgr running in 10.4. There are two problems:

networkmgr seems to work well, it's able to configure the wlan0 interface to the desired ssid but icon status remains as "not connected" (with the two arrows up and down instead of the wifi symbol)

auth.log is filled all time with messages like:

ct 15 08:59:46 bsd420s doas: jjess ran command ifconfig -l as root from /usr/home/jjess
Oct 15 08:59:46 bsd420s doas: jjess ran command ifconfig em0 as root from /usr/home/jjess
My em0 is not configured and down. auth.log is rotating every few minutes due to so many messages.
Any idea?
Thanks
Jes

+1
Got the same issue but on 11.1-RELEASE,  icon status remains as "not connected" always,
while I gon only one active network interface — wlan0,
em0 is disabled via bios and do not exist on my system.
Here is what networkmgr says when I start i via command line
Your wifi network card is already configured.
ifconfig: interface em0 does not exist
ifconfig: interface em0 does not exist
ifconfig: interface em0 does not exist
ifconfig: interface em0 does not exist
ifconfig: interface em0 does not exist
ifconfig: interface em0 does not exist
ifconfig: interface em0 does not exist
ifconfig: interface em0 does not exist...

Fixed after update to 2.5.

Yeah, there was a bug that I made in the 2.4
On Mon, Nov 13, 2017 at 4:48 PM, I-L-U-X-A<EMAIL_ADDRESS>wrote:

Fixed after update to 2.5.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/GhostBSD/networkmgr/issues/12#issuecomment-344052869,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEDY-Lkk9pRTNMzlyDJsglD7_JwQ3NkOks5s2KsRgaJpZM4P5p-R
.

--
Eric Turgeon**GhostBSD project leader
www.ghostbsd.org
Cité de la grâce Member
www.citedelagrace.com

Try master latest change https://github.com/GhostBSD/networkmgr/commit/203f09a66c2e77f3b22d49b92efef5456e34cbec fixed a lot of problems. Make sure to follow https://github.com/GhostBSD/networkmgr/blob/master/README.md.


smart_listing_controls not auto-firing on change

At the moment, AJAX UJS is not firing for me - it only works if I have a submit button and click the button - and it only works once.
I'm on v1.1.2

Hello @danieljacobarcher ,
please visit: https://smart-listing-example.herokuapp.com/ and write some names in search field. It responses automatically without reloading the page. Was that your goal?
v1.1.2

@ardahaal it seems like it depends on class names and not just fields in general? I'm having a problem where check boxes being changed does not submit the form accurately. (if both unchecked, it still submits values for each of them)

@danieljacobarcher Could you provide some code? Possibly little app deployed on heroku?

Figured it out and created a PR https://github.com/Sology/smart_listing/pull/66


InfoExampleUI.cpp: remove unnecessary assignments

Those lines are intentional, so it is easy to add more stuff below it when the need comes.

Okay


Allow script main fns to have args

This PR adds support for main args:
script;

struct TestStruct {
    val: u64,
}

fn main(baba: TestStruct, keke: u64) -> u64 {
    baba.val + keke
}

TODO:

[x] This PR needs GTF so it might get blocked by #2482 if other items are finished before it lands on master. When it lands, the incomplete GTF support commit in this PR should be removed.
[x] Predicate support.
[x] Checking if the length of script data is correct.
[x] Implement copying, test mutating the args. Disallow ref mut args in main fns.

Do you mind adding a small section in the Sway book about this? Potentially here. We basically should mention that main() does accept arguments, that those arguments cannot be mutable, and where those arguments live (in script data, maybe a link to the specs?). Also, is there a way to exercise this feature today using forc? Or nothing can be done without support from the SDK?

TODO:

[ ] Docs
[ ] Test w/ enums, strings, arrays

TODO:

[ ] Docs
[ ] Test w/ enums, strings, arrays

Do you mind adding a small section in the Sway book about this? Potentially here. We basically should mention that main() does accept arguments, that those arguments cannot be mutable, and where those arguments live (in script data, maybe a link to the specs?). Also, is there a way to exercise this feature today using forc? Or nothing can be done without support from the SDK?

Both SDKs have a way of providing script data, but (at least on the TS side) the user is responsible of encoding both the args and the return value. I could doc this mentioning the script_data field but it will be confusing when SDKs eventually start managing this for the user. Maybe we should wait for SDK support to doc this. (Or I could just add some args to the example main() to signal support without mentioning how to get the data there.)

So I've:

Added a new test that involves strings, enums, tuples, structs and arrays: https://github.com/FuelLabs/sway/pull/2592/files#diff-4b244577e2be7c4b79eed1f45ece8b31fa082219e46ea034e3e8ac2a169dd026
Moved the failing test to should_fail directory.

What should I do with:

Docs? Leave it for another PR when SDKs support script args?
Length checking? Remove and let the SDKs handle it?

Yeah we can postpone docs for now. Will circle back on the runtime check...


Swerve Simulations

Initial keyboard simulation of swerve modules - vectors of each wheel & overall robot. Adapted to joystick simulation, to provide vectors of each wheel & overall robot + robot moving around a screen. Keyboard sim modified to use poetry, to standardize setup.

Reviewed with Ishan in person, I added commits for my suggestions.
A few minor comment changes.
I don't like that the keyboard/controller versions of the sim have diverged, it means one will probably become deprecated. I talked with Ishan and that seems to be the intention so, as not to mislead people, I have written a comment above the file saying it is deprecated. Mainly due to difficulties getting keyboard input on different computers.
Also, the keyboard version contains vector normalization that the joystick one does not. That's not important in simulation, but is really important for real swerve so I added a note about it.

To add to Anthony's note, the reason we're not combining the keyboard and joystick simulations is because only Windows allows the python keyboard module to read keyboard input without running the python file as sudo. Additionally, the keyboard simulation does the math for each module's movement and the overall motion of the robot, but the robot doesn't visually move around on screen. The joystick sim implements this functionality. While we could add the keyboard input as an option to the joystick sim, but I don't think it's worth the time and effort, considering both of these were intended to act as proof-of-concepts and not much more. Our control flow will end up being something similar to the joystick sim, but broken up into one python program running on a laptop, one python program running on the pi, and one c/c++ program running on a pico.


Add shouldWaitForPopupClosure option to approvals and txs

@duckception isn't this backwards? shouldWaitForPopupClosure: true does not wait for popup to close, false does.


Add support for GET/POSTing multiple parameters with the same name

see POST $API_BASE/strategies/100002/target_dimensions/16 at https://developer.mediamath.com/docs/read/execution_and_management_api/targeting/Target_Dimensions_and_Values for example.

The same limitation in guzzle is preventing the use of multiple with parameters in GETs.
It's possible to work around it with some tomfoolery but this does require a nontrivial code change.

thanks for the docs link @FodT
i think it should be possible to set, for example, an array for any query given string parameter and call ->add($key, $value) for each element of the array
$params['with'] = [
    'value1',
    'value2',
    'value3'
];

foreach($params AS $key => $value) {
    $query->add($key, $value);
}

The only potential drawback I can think of right now is that the authenticator handles the query string parameters as part of the authentication process, so there might be some added complexity in deciding where to implement the checking

Oh, reading further down the page (literally a few lines), this might not even be necessary.
Guzzle\Http\QueryAggregator\DuplicateAggregator might be the answer


Implement quality selection for transcoded videos

PR Checklist

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

[x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
[x] I have checked that this PR does not introduce a breaking change

PR Type
What kind of change does this PR introduce?

[x] Feature

Fixes
Issue Number: #113
What is the current behavior?
No quality selector
What is the new behavior?
Quality selector next to the speed selector.

An Auto selection to let Exoplayer decide the best quality to use (also for non-transcoded videos)
Settings for default qualities on Wi-Fi or Mobile Data

Player view
Settings

Note
The Exoplayer dependency is bumped to 2.16.0 to allow using the new track selection APIs. To the best of my knowledge this didn't break anything, but I didn't test live streams.

Also, Odysee is looking for buffering events when playing. Maybe changing the quality will generate a new buffering event, and as position may be different from the start of the stream, the event might be reported to analytics backend, which would probably be a false positive, as buffering could be required in order to change to the new quality and it has been because a user initiated action.

Yes, I think I does buffer when changing quality, any idea how to prevent it sending false positives?

Yes, I think I does buffer when changing quality, any idea how to prevent it sending false positives?

Add a global boolean variable set to true when user changes the quality and reset it after player starts playing with the new quality setting. Then on the buffering event listener, check to see if the event was triggered when changing to the new quality setting

This isn't a blocker, but I was curious if Exoplayer automatically detects whether the device is connected via WiFi or mobile data, or if we have to write code for this functionality. If it's the latter, we can create a new issue as that is outside the scope for this issue. Thanks.

@akinwale I don't quite get what you mean. What functionality should be performed when connected via Wi-Fi or mobile data?

That's what https://github.com/OdyseeTeam/odysee-android/pull/155/files#diff-877c3bf19aa98ed68e9e8f93236a2ab1bcf1e25b69dae15739f293ee84e7df95R2134-R2140 is meant to do, although now that I look at how NewPipe does it, I think that's a better way.

Changes made in latest push:

Removed setter and getter for permanentUrl.
Fixed the logic in the quality selector not considering qualities lower than available, or non-transcoded videos.
Changed the sizes and alignment of the speed and quality containers to add more space after the duration bar.
Use the metered network detection code from NewPipe.
Don't report buffer events when buffering due to changing quality.

Thanks!


puppeteer: link to pptr.dev api docs

[ ] This has been reviewed and approved by (NAME)
[x] I have run gulp test locally and all tests pass.
[x] I have added the appropriate type-something label.
[x] I've staged the site and manually verified that my content displays correctly.

CC: @petele

:tada: This has been pushed live to https://developers.google.com/web/


Implement vjps of vjps for HPE and SAP (CPU)

This is needed to train models on forces and stresses, for example

Regarding the test failure: this could be caused by a data race in OpenMP. You could try running the tests without OpenMP to check if that's the case, and/or compiling the code with the threads sanitizer, which should catch some issues at runtime.

An update on the bug:
Thanks @Luthaf for the suggestion to look into parallelism and use thread sanitizer. That was indeed the issue because removing the OpenMP parallelism from HPE indeed eliminates the test failure. However, I found it to be nearly impossible to test the code with thread sanitizer: on my laptop (Ubuntu 23.10), there is a known bug that prevents thread sanitizer to work properly ("unknown memory mapping"), on CI (ubuntu 20.04) there is another known bug for which the compiled thread sanitizer library is missing (linker fails), on Jed mops is very difficult to build in the first place because it requires a workaround (due to the conflict of Jed having a cuda compiler and libtorch_cuda.so missing).
To that, I should add that the double backward of HPE is virtually useless for us: HPE cannot be used during training of equivariant models (where SAP would take its place). However, if one uses ACE/WK, the trained model can be re-expressed in terms of a few call to HPE (rather than many to SAP), and that is its main use case. As a result, the double backward for HPE is there just for completeness, but it is virtually useless in our field (and I suspect in general... who's going to need VJP of VJP of homogeneous polynomials?).
As a result, I disabled parallelism for the VJP of VJP of HPE and I'm going to open an issue to fix it (which will be very low-priority). I will also open an issue to document the workaround to build mops-torch without CUDA in environments where a CUDA compiler is available (this PR is a good start, because it adds a MOPS_CUDA option rather than just looking at the availability of a CUDA compiler).
Regarding this PR, I will try to address the review from @Luthaf and then he will be able to review again.

Let's keep this moving, we can improve the docs further later!


add code config option to enable alternative rule DSL

This little tweak will allow for alternative DSLs where the resulting rule code and the string generated can differ.

// could be generated by DSL
let selectClauseStr = `() => {
    this.CONSUME(Select)
    this.AT_LEAST_ONE_SEP({
        SEP: Comma, DEF: () => {
            this.CONSUME(Identifier)
        }
    })
}`

export class SelectParser extends Parser {
  registry = {}

  constructor(input) {
    super(input, allTokens)
    this.rules()

    // must be called at the end of the constructor!
    Parser.performSelfAnalysis(this)
  }

  rules() {
    let def = {
      SEP: Comma,
      DEF: () => {
        this.CONSUME(Identifier)
      }
    }

    let execRule = () => {
      this.CONSUME(Select)
      this.AT_LEAST_ONE_SEP(def)
    }

    this.selectClause = this.RULE("selectClause", execRule, {
      // using code string override to make regExp parser work!
      code: selectClauseStr
    })

    this.selectStatement = this.RULE("selectStatement", () => {
      this.SUBRULE(this.selectClause)
    })
  }

Already tested and works with my DSL experiment in red-dragon :)

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

I like the concept.
But not the reliance on strings.
This means that any custom API must also generate strings compatible with the original API.
This is not a very robust approach.
Instead I would go with a more generic approach:

modify the Parser's config object (passed at construction) not each Rule's config object.
to accept a custom function that given some params (rule name / rule impel func/ ...) will create the GAST structure.
By default it will use the built in GAST Builder.
Custom use cases can implement their own logic, but won't have to be forced to generate strings.

From code review perspective:

100% code coverage is mandatory, so if you add a new code branch a new test must also be added.
Your IDE auto formatted the whole file, please only commit your changes 😄
An example (in examples/parser) directory could be nice, but not mandatory.

Cool, sounds great :)
Yeah well, using strings was the easiest approach since I don’t know the internals of the GAST model. I would much welcome a mixed approach,
where the code option is allowed as an override but where the recommended approach is to use a custom GAST builder!
Would love to see a minimal example of this next week!
Cheers! Kristian
PS: Just managed to make the DSL example work with my String based approach for now

I would much welcome a mixed approach.

There is no need for a mixed approach.
If the GastBuilder string --> gast method is exposed.
Than a single generic function on the parser level can perform the conversion from
a string you generated to the GAST using some ID (ruleName).

Would love to see a minimal example of this next week!

You would if you code it 😄
This is a nice to have feature, but not a high priority.
unfortunately I have some higher priority items:

CST Visitor + Docs
POCing using Chevrotain in the CoffeeScript compiler

So it would take a while before I get around to this...

Excited to see what you come up with next. I have this rule DSL for now.
Will look into CST/GAST next.
Cheers!

new CST related capabilities (CST Visitor) will be available in a day or two.
It will make working with CST much easier. 😄
I'll look into these extensibility options in a week or two...
It nice that ppl can create "plugins" to Chevrotain to customize something so internal as
the DSL itself. 👍

I will attempt to implement an official GAST --> Chevrotain DSL transformer.
This will be the basis of supporting both a built-in Combinator API (probably similar to myna's APIs) and to enable users to create their own custom APIs for Chevrotain.
Relevant issue: https://github.com/SAP/chevrotain/issues/480
This could even enable using Chevrotain as a parser generator 😄
This is a huge issue. But the first thing on the agenda is the
** GAST --> Chevrotain DSL transformer. **
Which should at least enable your custom API.

AweZome!


Update Functionality

Hello,
a update functionality would be nice. At the moment, if i want to refresh the Odata context, i had to delete and recreate the Odata Context.
Thanks for this great tool, it helps al lot.
:+1:

@WFeneberg Hi. Thanks for feedback.
I'll check what i can do


Streamline installation

Right now, installation includes installing the conda package for rstfinder and then installing the PyPI package for python-zpar. This is because python-zpar is only available via PyPI. To make it easier for uses, we should either.

Make PyPI the primary method for distributing rstfinder instead of conda.
Remove the dependency on python-zpar (see #53 ) and use another parser that's available via conda.

Hello, I have a problem in running this line'''convert_rst_discourse_tb ~/corpora/rst_discourse_treebank ~/corpora/treebank_3'''. I'm wondering the PDTB dataset in your setting is PDTB-v1（2019） or PDTB-v2（2020）, cause I downloaded the dataset from LDC, but it doesn't have a 'parsed' file under it, only data，docs and tools, index.html. Have you met this issue? @desilinguist


in resolution of [Wsign-compare] warning id 3

It is explicit that 'counter_value' is of unsigned type. It is implied that 'n' is a quantity/count. Given that 'n' is a signed int however, the apparent intended behavior of logging the first N state transistions is not ensured.
In resolution of the warning I cast 'n' to size_t.
It is suggested however that the type n be changed from an int to an appropriate unsigned type in order to disqualify the possibility of the passed 'n' being negative; unintentional behavior.

@mihaimaruseac


Unknown crash only when kRTCMediaConstraintsOfferToReceiveAudio set to true

If kRTCMediaConstraintsOfferToReceiveAudio set to true, app is getting crashed on setRemoteDescription only if the stream has audio other wise it's working fine.
let sessionDescription = RTCSessionDescription(type: .answer, sdp: sdp)

        // Set the remote session description
        self.peerConnection?.setRemoteDescription(sessionDescription) { (error) in
            guard error == nil else {
                print("Error: ",error.debugDescription)
                return
            }

            // Connection established, ready to start exchanging media
        }

Getting crash like this:
libsystem_kernel.dylib`:
    0x1baf94644 <+0>:  mov    x16, #0x209
    0x1baf94648 <+4>:  svc    #0x80
->  0x1baf9464c <+8>:  b.lo   0x1baf94668               ; <+36>
    0x1baf94650 <+12>: stp    x29, x30, [sp, #-0x10]!
    0x1baf94654 <+16>: mov    x29, sp
    0x1baf94658 <+20>: bl     0x1baf6b60c               ; cerror_nocancel
    0x1baf9465c <+24>: mov    sp, x29
    0x1baf94660 <+28>: ldp    x29, x30, [sp], #0x10
    0x1baf94664 <+32>: ret
    0x1baf94668 <+36>: ret

I have the same issue. Is that already fixed?

Yes, I figure out that when you set the kRTCMediaConstraintsOfferToReceiveAudio constraint to true in WebRTC, you must have to set Microphone Usage Description in info.plist file even if you're receiving only audio stream.

Yeah, thanks for the reply.
I guessed the same thing myself.
NSMicrophoneUsageDescription
I didn't see that error in the console because I always used the filter for WebRTC.
I couldn't even think of needing mic rights to play audio, but from a WebRTC perspective, it makes sense.


Add js_test endpoint

JS tests can be run with their REST API.  Would be awesome to have that added in this library.
https://saucelabs.com/docs/rest#jsunit

:+1: exactly what we need. @holidayextras team, would you accept a PR?

Hey all, Sorry I'm really not sure how I missed this. Opened 2 years ago?!
Is this still relevant? @phated @cvrebert @nelsonic
Thanks!

@danjenkins I absolutely still have this requirement.

OK, yes, absolutely the project would accept a PR if this is the right place for the code :) I'm lacking in time for the next month to be perfectly honest but if you'd like to do a PR I'd definitely look through it. I should have time to take a look in around a months time, sorry about the lack of any communication on here!

For those who still want to run their unit test throw nodejs on Saucelabs I did that module : https://github.com/Johann-S/JSUnitSaucelabs

Sauce Labs EOLed the unit test feature which makes this issue obsolete. If you still feel that this feature is/was useful please create a feature request in our Aha Portal. Thanks!


Tours: fix error on DQ

setMatchResult is already called when the battle is won through the forfeit

oops, this doesn't remove everything, give me a second to make sure we can remove the rest.

This is pretty much the cleanest solution I could find. Ideally I think you'd want to rework the node state system, but this works well enough imo.

@sirDonovan ?

From what I can tell, this is happening because when you get DQd, two things happen:
-the DQ method sets a loss result for all "active" battles
-you forfeit your battles, which will eventually set the result for
The problem arises when the dq method happens before the battle is ended. Since the DQ method will have marked the battle as complete, after the battle actually ends there's nothing to update.
You can't strictly remove the part in the dq method, because then it won't mark battles that are active but haven't started yet, and you can't remove the one when a battle is won, because that breaks normal wins.
IMO the best solution would be to make the DQ method only mark battles as ended if they haven't started, but I don't see a way to do that that isn't terrible.

You could change the part in the dq method to only mark the ones that aren't started?

How? The generator can't tell the status of a match

...I guess hacks are fine...


Sign-Up Captcha does not display correctly on some displays in a way that prevents use [Android]

Steps to Reproduce

Open bluesky app on the internal screen of Galaxy Fold 4 (potentially other foldables and tablets too, but I don't have any to test)
Attempt to create new account
Proceed through application to required captcha
Captcha prompt is cut off, showing only the pictures without instructions

Attachments

https://github.com/user-attachments/assets/4e2979c6-a04b-4d04-b71d-d518a73430f3
What platform(s) does this occur on?
Android
Device Info
Samsung Galaxy Fold 4. Running Android 14, OneUI Version 6.1.1
What version of the app are you using?
Build version: <IP_ADDRESS>2; Bundle info: 3c30bb1 (prod); Bundle date: 24111623; Platform: android; Platform version: 34
Additional Information
As shown in attached demo, the captcha required to make a new account had its prompt cut off and couldn't be completed. I had to switch to the inner screen to complete it properly (which also crashed the app so I had to start over, see #6693
As an aside, thank you guys for all the hard work you're putting in! Despite the quirks, it's far from the jammiest app for folds, and I'm really excited to be making the jump over 😊

There's a similar issue on web when the window height is small. Any ideas on how to improve this?

There's a similar issue on web when the window height is small. Any ideas on how to improve this?

omw to the airport BUT I have identified problem, tried a few things, and have ideas on how to fix! will do a write up when I have the chance, just got wanted to lyk I've been on this 😊


get_template("template.html").render("variable": value) do not pass value to template

First Check

[X] I added a very descriptive title to this issue.
[X] I used the GitHub search to find a similar issue and didn't find it.
[X] I searched the FastAPI documentation, with the integrated search.
[X] I already searched in Google "How to X in FastAPI" and didn't find any information.
[X] I already read and followed all the tutorial in the docs and didn't find an answer.
[X] I already checked if it is not related to FastAPI but to Pydantic.
[X] I already checked if it is not related to FastAPI but to Swagger UI.
[X] I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

[X] I commit to help with one of those options 👆

Example Code
import asyncio

from datetime import datetime

from fastapi import FastAPI, Request, WebSocket
from fastapi.responses import HTMLResponse
from fastapi.staticfiles import StaticFiles
from fastapi.templating import Jinja2Templates

app = FastAPI()

app.mount("/static", StaticFiles(directory="static"), name="static")
templates = Jinja2Templates(directory="templates")

@app.get("/", response_class=HTMLResponse)
async def index(request: Request):
    return templates.TemplateResponse("index.html", {"request": request})

@app.websocket("/clock")
async def websocket_endpoint(websocket: WebSocket):
    await websocket.accept()
    while True:
        current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
        # This only render template without passing new_time to template:
        text = templates.get_template("clock.html").render({"new_time": current_time})
        await websocket.send_text(text)
        await asyncio.sleep(1)

Description
In Jinnja template clock.html I have:

Current date and time: { new_time }

but templates.get_template("clock.html").render({"new_time": current_time}) do not pass new_time value (current_time) to template. In stand of that, it show key new_time.
What I have made wrong? Thanks...
Operating System
Linux
Operating System Details
No response
FastAPI Version
0.70.1
Python Version
3.8.12
Additional Context
No response

I realy apologize... I have terrible typo i template. Everythings works OK.
html

Current date and time: {{ new_time }}


Range and post scaling

Since this needs a really good review, this is a draft

@nilsRoettgerAtBB @JakaMohorkoDS one question on topic of integration - what would be the default range value for openDAQ mirrored signal descriptor if range in metadata is not set (has default unlimited bounds):

nullptr
or
[min, max] of signal data type - e.g. [0, 255] for UInt8, [-128. 127] for Int8 etc. ?

@nilsRoettgerAtBB @JakaMohorkoDS one question on topic of integration - what would be the default range value for openDAQ mirrored signal descriptor if range in metadata is not set (has default unlimited bounds):

nullptr
or
[min, max] of signal data type - e.g. [0, 255] for UInt8, [-128. 127] for Int8 etc. ?

I would do the second one:  [min, max] of signal data type - e.g. [0, 255] for UInt8, [-128. 127] for Int8 etc.


Fixed queue message purge

Propsed fix for #554

:white_check_mark: Build ServiceBusExplorer 5.1.0-queue-message-purge.33.build.845 completed (commit https://github.com/paolosalvatori/ServiceBusExplorer/commit/18cdf0a924 by @SeanoNET)

Thank you, @SeanoNET.
@ErikMogensen, let's get two other bugs into 5.0.4 and release? If we don't get those two remaining PRs merged in the next 24h, I'll release 5.0.4 as-is.


Please update the license of the repo.

Can you please provide the license of the repo.? Thanks.

Thank you for the reminder.
I have added a MIT license for this repo.


Using self signed SSL

Describe the bug
I can't say it's a bug; however, I'm trying to reach a server with a self-signed SSL. While modifying the Info.plist allowed me to run against a clear HTTP using NSExceptionAllowsInsecureHTTPLoads but I'm unable to find a way to use SSL.
I did install the actual certificate and trust it in the simulator (exported from server, and dragged and dropped it in the simulator and went to Profiles and installed) but that didn't seem to help.
Is there a way of allowing self signed ssl through a combination of code and the Info.plist?

I think this issue #127 shows how to work around the problem. Note however, that I recently replaced the 3rd party webSocket library with webSocketTask so the workaround will no longer work in the next version but hopefully no workaround will be needed.

Thank you... that worked (obviously)
So, in the next version it will only be by setting
.withHttpConnectionOptions(configureHttpOptions: { (HttpConnectionOptions) in
HttpConnectionOptions.skipNegotiation = true;
without the need to download the source code and set the flag in Websockets?
I'm on version 0.8, which version would have the change?
Thanks again

I am thinking about allowing to inspect and approve the certificate. So, modifying the source code and skipping negotiate will not be needed because the code to handle the untrusted certificate will be invoked for all requests (negotiate, websockets, polls). Accepting untrusted certificates is a risky business and this risk is on the user's side and the client will not do this automatically. I would say that the best way to go around this is to use a real certificate as much as possible.
The old webSocket client was removed in one of the first commits after 0.8.0 and I expect these changes to be released in the next version.

I have a version where it is possible to configure client side pkcs7 certificate and it sends it to the server if it asks for it . Do you want me to create a pull request that contains it ?

Feel free to open a pull request.

Fixed by @gpotari  in #179


[Test-Proxy] Customizable Default Matcher, Conditional Matching

The ask here is essentially:

The standard test matcher has all the capabilities I need, but I need to tweak some of them.

@JoshLove-msft wants to be able to customize the headers that are matched on.
@HarshaNalluru wants the ability to specify "conditional" matching. The ask originally had an example of a request that looks something like this:
{
  "requestUriRegex" : "https://login.microsoftonline.com/azuretenantid/oauth2/v2.0/token"
  "match-conditions" : {
    "match-body" : "false"
    "header-list-to-not-match" : [ "Some-Dynamic-Header" ]
  }
}

requestUriRegex could be a URI or a regex. It's intended to be used as a

only apply these specific conditions if the request URI looks like this.

In terms of conditional matching, we should probably allow parts of the HTTP request to trigger the matching. I can see a specific Header or Body needing the same behavior.

Originally, the way I'm thinking about this it to make everything conditionally applied (just True by default).

RecordMatcher
RecordedTestSanitizer
ResponseTransform

POST AddSanitizer/
{
 "value": "replacement",
 "regex": "<regex>"
}

In the relevant "do work" part of whatever the customization is, we will check the apply-conditions if provided, then apply the transform or sanitization.
However, after implementing a bit, I don't think this practice will work for matchers. We can only have a single matcher defined when matching a request to the playback entries. Given that, there is no way to only have the customized match operation apply only in certain circumstances. In the cases where it didn't apply, we wouldn't have a matcher to use!
Going to stick with match-conditions naming for matcher, and apply-conditions naming for sanitizer and transform.


runtime: Add missing BigInt host exports

Hello! This is my first Pull Request here, I am trying to solve this issue https://github.com/graphprotocol/graph-node/issues/2145.
I don't know much about the project, so correct me if I am doing anything wrong :slightly_smiling_face:

@Jannis so, in the issue @leoyvens wrote that some tests should be added here.
I should just call the new BigInt functions there with some sample assertions?

@otaviopace That's my suggestion. Tests are actually failing on master right now, that will be fixed shortly.

@Jannis @leoyvens I've added the tests, but I don't know if I am doing something wrong, the pipeline is failing.

Yaaaay :tada: :confetti_ball:
Thanks for the help :blush:


fixing markdown

that's the best I could get to work in all the markdown editors I've tested with. Not a single one of them would reproduce ordered sublist...

Hi @4c74356b41, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no contribution license agreement is required at this point. Real humans will now evaluate your PR.

TTYL, AZPRBOT;

actually, the same article has got a ordered sublist, but when I look at it - it makes no sense. it's like ordered list, than next line 4 spaces another ordered list, than several lines with tabs instead of spaces and it renders properly. I have no idea how this thing works. Every markdown article states that ordered sublist is just 2 spaces indented from the ordered list but it doesn't work that way.

test
1.testo

@4c74356b41 : Thanks for your contribution to the Azure documentation! The author, @ruturaj, has been notified to review your proposed change.

#sign-off

@ruturaj - Hi Ruturaj, please resolve this conflict. Thank you, Katie
#hold-off

How can I resolve the markdown for a pull I have not created? Please let me know how to close the request.

you could tell me what to fix or you could submit a PR to my fix

Just a ping ;)

#sign-off

then please close this pull request as the fixes are old.

well, they were not old when i submitted them 3 months ago, you know


Add sg 4.x best practices and egress-all sg rule added

what

Add sg 4.x best practices (separate inputs, deprecation, allow additional rules)
Added egress-all rule to sg

why

More flexibility
Sane defaults

references

Followed best practices from https://github.com/cloudposse/terraform-aws-efs

commands
terraform plan
Terraform will perform the following actions:

  # module.ec2_client_vpn.module.vpn_security_group.aws_security_group_rule.keyed["_m[0]#vpn-self#cidr"] will be created
  + resource "aws_security_group_rule" "keyed" {
      + cidr_blocks              = [
          + "<IP_ADDRESS>/22",
        ]
      + description              = "Allow self access only by default"
      + from_port                = 0
      + id                       = (known after apply)
      + prefix_list_ids          = []
      + protocol                 = "-1"
      + security_group_id        = "sg-05dsnip"
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "ingress"
    }

  # module.ec2_client_vpn.module.vpn_security_group.aws_security_group_rule.keyed["_m[0]#vpn-self#self"] will be created
  + resource "aws_security_group_rule" "keyed" {
      + description              = "Allow self access only by default"
      + from_port                = 0
      + id                       = (known after apply)
      + prefix_list_ids          = []
      + protocol                 = "-1"
      + security_group_id        = "sg-05dsnip"
      + self                     = true
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "ingress"
    }

  # module.ec2_client_vpn.module.vpn_security_group.aws_security_group_rule.keyed["_m[0]#vpn-self#sg#0"] will be created
  + resource "aws_security_group_rule" "keyed" {
      + description              = "Allow self access only by default"
      + from_port                = 0
      + id                       = (known after apply)
      + prefix_list_ids          = []
      + protocol                 = "-1"
      + security_group_id        = "sg-05dsnip"
      + self                     = false
      + source_security_group_id = "sg-077snip"
      + to_port                  = 0
      + type                     = "ingress"
    }

  # module.ec2_client_vpn.module.vpn_security_group.aws_security_group_rule.keyed["vpn-self"] will be destroyed
  - resource "aws_security_group_rule" "keyed" {
      - cidr_blocks              = [] -> null
      - description              = "Allow self access only by default" -> null
      - from_port                = 0 -> null
      - id                       = "sgrule-1231358990" -> null
      - ipv6_cidr_blocks         = [] -> null
      - prefix_list_ids          = [] -> null
      - protocol                 = "-1" -> null
      - security_group_id        = "sg-05dsnip" -> null
      - self                     = true -> null
      - source_security_group_id = "sg-05dsnip" -> null
      - to_port                  = 0 -> null
      - type                     = "ingress" -> null
    }

Plan: 3 to add, 0 to change, 1 to destroy.

This is replaced
module.ec2_client_vpn.module.vpn_security_group.aws_security_group_rule.keyed["vpn-self"]

by
module.ec2_client_vpn.module.vpn_security_group.aws_security_group_rule.keyed["_m[0]#vpn-self#self"]

/test all


Copy from other spreadsheets to tables not working

Using jexcel.js (nowadays "jspreadsheets") we should be able to paste a selection from another spreadsheet, for example google sheets
Seems to be working in this example: https://bossanova.uk/jspreadsheet/v3/
Guess I messed it up somehow - will have to fix it so I can import lots of data for my (hopefully fun) pokemon-calculator example :)

Ok - this will have to wait until I switch what js-component I use for the tables; it's in the pipes

Fixed but not published yet (to the 0.1.0 site) - some polishing remains on table-handling solution


model weight

could you provide the weight?  I want to test on my data, thanks

I will upload the clean version of code, readme, and weights within a week.
Thank you for your interest.


Completion sorting ignores sortText from completion items when typing

It seems like there have been some issues around this before, but I can't find any conclusive description that this is by design (though there's a comment from @jrieken at https://github.com/microsoft/vscode/issues/71660#issuecomment-481122861 suggesting there may be internal ranking going on that can't currently be disabled, but I can't find the related case to see if it's been addressed yet). I've tried all of the "suggest" config options I can find, but I can't find a way to disable this.
Here's what my completion item provider is returning:
const allResults: CompletionItem[] = [
	{ sortText: "998893", label: "MainAxisSize.min" },
	{ sortText: "999992", label: "CustomInactiveIcon" },
	{ sortText: "999993", label: "AnimationMin" },
	{ sortText: "999993", label: "BlendMode.luminosity" },
	{ sortText: "999993", label: "kMinInteractiveDimension" },
	{ sortText: "999993", label: "MinColumnWidth" },
	{ sortText: "999996", label: "$minus" },
	{ sortText: "999996", label: "kDoubleTapMinTime" },
	{ sortText: "999996", label: "kMinFlingVelocity" },
	{ sortText: "999996", label: "minBy(…)" },
	{ sortText: "999997", label: "Float32x4.fromInt32x4Bits(…)" },
	{ sortText: "999997", label: "FrameTiming" },
	{ sortText: "999997", label: "FrameTiming(…)" },
	{ sortText: "999997", label: "min(…)" },
	{ sortText: "999997", label: "RawSocketOption.fromInt(…)" },
	{ sortText: "999997", label: "TimingsCallback(…)" },
];

And when I invoke completion, the list sorted as expected:

However, when the user types min, VS Code does its own sorting, and the values the user is interested in (which we've ranked highest according to sort order) move right down the list:

I appreciate VS Code is trying to be helpful, but here it's magic is making things significantly worse. Is there some way to influence this (either as a user, or an extension author) that I've overlooked, or is this currently the expected behaviour?
(Raised at https://github.com/Dart-Code/Dart-Code/issues/1934 by @dancojocaru2000)

(I found https://github.com/microsoft/vscode/issues/64367, but that seems more based on filtering than sorting?)

An extension can define the initial order with sortText but as soon as the user starts typing a prefix that initial order is overruled by the scores computed by comparing completions against the prefix.

@jrieken does this mean there's no way to override it, and it won't be considered? The example given above is a bad user experience (and leads to bugs being raised) - it seems silly not to consider an option to control this.
Also - out of interest - the IntelliCode extension claims to do intelligent sorting of completions - does that also only apply when there's no prefix?

This behaviour is very limiting as the overruled results are completely irrelevant. When passing the value of an enum, I would much rather have the enum values completed than the min function.

@jrieken does this mean there's no way to override it, and it won't be considered?

Yes. However, if find cases in which the scorer selects the wrong item or ranks badly then feel free to file issues.
In above sample suggestions like min and minBy exist and when a user types min that's very strong signal she/he doesn't want to insert MainAxisSize.min but something that starts with min, otherwise one should type Main, MAS, etc.

In above sample suggestions like min and minBy exist and when a user types min that's a very strong signal she/he doesn't want to insert MainAxisSize.min but something that starts with min

That's not true if you have the context that the language server has. The language server knows that's a property and its type is MainAxisSize and that MainAxisSize.min is absolutely the best bet if they've typed min.
VS Code doesn't have anywhere near as much context as the language server so having it override the results the server came up with with simple text-based heuristics that don't understand the language will always be sub-optimal to a good language server. What's the reason this shouldn't be controlled by an option (either for the user, or the completion provider)?

That's not true if you have the context that the language server has.

I agree that the language server has most context but this is about enabling users to pick any suggestion. Assuming I do want to insert min, what should I do? Type min and then press arrow down until I am there? Would that be good UX?
Resorting items based on user input isn't a critic to the language server but helping the user to insert the suggestion she/he wants to select. I understand that from your point of view it should be the absolute best suggestion but you have to accept users choosing different (or not make that suggestion to begin with).
The selection/resorting is based on an algorithm which, amongst other things, favours matches at the beginning of words over matches at the end. I think that's a fair assumption because words are usually typed from 'start to end' (and not 'end to start').

If the parameter is an enum and the min function returns any kind of number type, I would argue that the user doesn't want the min function, but rather the Enum.min value.
In Swift, this problem is tackled by being able to type .min, without the enum type prefix. It is very tiring to be forced to type the enum type non stop.
Also, technically, min is at the beginning of the possible enum values, after the dot. Even if VS does the sorting, it seems weird to put kMinSomething before Enum.min.

In Swift, this problem is tackled by being able to type .min, without the enum type prefix. It is very tiring to be forced to type the enum type non stop.

Did you try that? You should be able to type .min and MainAxisSize.min should be the top match. If not then that's a bug.

Even if VS does the sorting, it seems weird to put kMinSomething before Enum.min.

Matches on upper-case characters and after separate characters (., _, -, etc) are boosted. So a draw between matching M and .m. In that case matching at a lower index (1 vs 5) makes the difference.
Last, if you think no-one ever types MainAxisSize than set .min or min as CompletionItem#filterText so that typing min makes that the top match (tho it disables typing MainAxisSize letters, so tweak the label and have a full type label)

I agree that the language server has most context but this is about enabling users to pick any suggestion. Assuming I do want to insert min, what should I do? Type min and then press arrow down until I am there? Would that be good UX?

In this specific case, yes - it would definitely be the best UX. Because the language server knows that the chance of that case is almost 0 and the case of the other is almost 100% because it has context. The language server has done hard work to provide contextual-relevant results but VS code is overriding them with naive text-based heuristics.

Resorting items based on user input isn't a critic to the language server but helping the user to insert the suggestion she/he wants to select.

But VS Code doesn't have all the information to make the best call, as is shown here. If VS Code wants to do the sorting, then it should allow servers to provide it more information to make a better decision.
If I change filterText on MainAxisSize.min to just min then the sorting remains good (because it "starts with min"), however if the user starts typing MainAxisSize to see what all the options are, it disappears. What if we could supply multiple filterTexts (for ex MainAxisSize.min and min) or the heuristic could consider foo.bar to be equally matched with things starting with bar?
Out of interest - how does IntelliCode work? Does it suffer from the same issue, or does it have some ability to mark preferred completions that we don't have?

You should be able to type .min and MainAxisSize.min should be the top match. If not then that's a bug.

Not only does it not work, it puts minBy above min :/

Last, if you think no-one ever types MainAxisSize than set .min or min as CompletionItem#filterText

I mentioned that above, but that removes the ability for a user to type the enum name to see all the values if they don't know what they are (and that's even worse UX).

Typing .min when the programming language doesn't support this feature is unintuitive, I wouldn't have thought of doing that. Also, as shown above, it doesn't even work.

The language server has done hard work to provide contextual-relevant results but VS code is overriding them with naive text-based heuristics.

Sorry, you don't understand what I am saying. This is not about VS Code but about users having the freedom to select the suggestions you are making. Don't make bad suggestions if you don't want them to be inserted.

Out of interest - how does IntelliCode work? Does it suffer from the same issue, or does it have some ability to mark preferred completions that we don't have?

There is no difference. They use CompletionItem#preselect in addition to sorting but they can also not overrule user intend.

Typing .min when the programming language doesn't support this feature is unintuitive, I wouldn't have thought of doing that. Also, as shown above, it doesn't even work.

I have filed https://github.com/microsoft/vscode/issues/79558 for that.

Freedom? What freedom? A list is shown anyway. This is about the language server saying "here's what they 99% meant" and VS Code saying "nope, they actually meant this because firstMatch.startIndex is lower", even if min(a, b) returns int but the function expects MainAxisSize.

Sorry, you don't understand what I am saying. This is not about VS Code but about users having the freedom to select the suggestions you are making. Don't make bad suggestions if you don't want them to be inserted.

This isn't about good and bad suggestions though, it's about "very relevant" and "not so relevant". We shouldn't exclude entries from completion just because they're very unlikely if they could still be valid (although min returns a number, some entries return classes, which could have fields that are the correct type).

There is no difference. They use CompletionItem#preselect

In their examples, the ones with the stars all appear at the top (it's possible the example gif isn't showing the whole picture though). Are they all set as preselect? If not, how do they all stay at the top?

I have filed #79558 for that.

Thanks - based on the text there it sounds like you already have a concept of a separator. Given that, couldn't you weight foo.bar against bar equally with the first matches? It seems likely if the language has gone to the effort of putting something with a separator in the list it's because they want the user to have the convenience of being able to pick it directly, so if the second part starts with, it seems also like a strong signal?

To give my provideCompletionItems method more control over this kind of thing I have resorted to returning its results as a CompletionList with isIncomplete: true. This stops VSCode from resequencing what I gave it. When the user types another character I get called again and can supply another list. I also use this to achieve prefix-only matching.

@gjsjohnmurray does that actually work here? I see VS Code doing the same magic if I force completion open with Ctrl+Space after typing the prefix (so it's hitting my provider), but it still seems to re-sort them based on the prefix it sees in the doc, rather than one that was typed since opening the completion list.

@DanTup I've certainly found isIncomplete useful, but YMMV

It's definitely useful, but I don't think it helps here. I tried enabling it but it made no difference.
@jrieken I just noticed that just typing m causes MainAxisSize.min to move down too. Is it intended that the casing matters? I don't expect many people type capitals when they want to complete something that starts with a capital.

@jrieken I just noticed that just typing m causes MainAxisSize.min to move down too. Is it intended that the casing matters?

Yeah, that because m and min are perfect prefix matches and m and Main... aren't. I see the issue. We do boost matches when users invest effect in typing upper-case letters but shouldn't do it the other way around.

extracted https://github.com/microsoft/vscode/issues/79627

@jrieken not sure this warrants its own issue if it's expected, but here's another place I think the ranking is bad:

I think things that have "end" as concurrent characters (and in exact matched case) should come above things that have e, n, d just in them in that order with mismatched casing (eg. MainAxisAlignment.end is far more likely for end than Encoding).

Any updates on this? Any change of mind? There seems to be a tradition for VS Code to think it's smarter than the language server and mess things up, creating a bad user experience.
Why do we even have the language server if VS Code doesn't listen to it?
Time to move to JetBrains.