Feature/notebook with pytorch training and tensorboard

This PR adds a PyTorch training example using a Variational Autoencoder (VAE) for generating MNIST images. The main objectives are:

Demonstrating the feasibility of using Kubeflow notebooks as python IDEs for development.
Illustrating the use of TensorBoard within Kubeflow by creating a new instance linked to the PVC of the training notebook.

Testing Procedure:

Initiate a new notebook instance (preferably with the code server Python image).
Clone this repository.
Go to the kf-notebook/mnist directory.
Follow the setup instructions in the README. (Python 3.9 is required for the poetry install, which can be installed in a  Conda env in the Kubeflow notebook.)
Execute the steps and confirm operational functionality.

I added a commit fixing two minor issues. Is there a reason you created a kf-notebooks folder instead of putting this in notebooks?

@samoturk : Thanks!
The reason I put it into kf-notebooks is a) that I want to show that kf-notebooks are more that what people think of when they hear "notebook" (in most cases Jupyter notebook I assume) and b) that I plan to also describe how to set up demonstration UIs using dash or streamlit in this directory.

Notebook tab in KF UI shows all types notebooks not just Jupyter, so in Kubeflow context notebook is broader concept anyway. Your call :)

Alright, you seem to have a stronger opinion. So I disagree and commit ;)


[BUG] UI is also showing when flying with Tulip Snakes

When Tulip Snakes make you fly, the Jetpack UI will be shown

I'd like to leave it as is because it's fun.

(In fact, in the code, it is the same as a tulip snake and a jetpack)
Well... Anyway, I'll add a function to ignore the tulip snakes.

I just added a setting to display the UI when flying with the Tulip Snakes!


usb: dfu: rework of dfu class implementation

To improve the usability and flexibility of the USB DFU class, some fixes and changes were implemented:

Added separate Kconfig variables for idVendor and idProduct when running in DFU mode as required by USB DFU 1.1 specification (Ch 2) since keeping the same values for these fields can lead to host OS caching of descriptors and not properly updating the configuration descriptor once in DFU mode.
Leverage Zephyr's devicetree-defined flash partitions to also define the alternates for USB DFU, allowing for flashing of images and data to more than just the image-1 used by mcuboot, making the class much more dynamic. It also enforces the read-only property of the partitions to prevent writing to partitions that arent supposed to be written to (this is actually a more general problem in the flash APIs right now ignoring this property)
Fix a few other minor issues, adding timeout timer for appDETACH, moved the time when the descriptor table changes in DFU mode, etc.

This is not a minor rework.

As mentioned above, there is a lot more discussion that needs to happen around the partition mapping; however there are a number of minor fixes also in this PR. So, I think its best if we split the PR between those actually minor fixes and the move to using the device tree partition map for USB DFU. As also mentioned, is it preferred by the code owners if those fixes are each a small PR or one PR?

All the other fixes have been moved to their own PR: https://github.com/zephyrproject-rtos/zephyr/pull/30611
How best should be handle the discussion in this thread for opening up DFU to more partitions? Continue this PR, open a new PR, open an issue for discussion?

My opinion is that rest can be continued here.

After a bit of thought on this (and coming back to it), I think there are two ways to go about adding the additional functionality while providing the control needed to minimize the number of partitions exposed, both leveraging devicetree:

Add to the partition table a few new labels to the partitions themselves (like what @de-nordic suggested) and have something like dfu-access with values "readonly" (can only be uploaded, like "image-0" now), "readwrite" (can be uploaded/downloaded, like "image-1" now), "hidden" (isnt accessible via dfu at all, like everything else now, so would be the default). To accommodate downloads to partitions that arent images (for example, loading prebuilt filesystems), another label should be added to handle what should happen during manifest, for mcuboot images, this is a call to boot_request_upgrade, so something like "dfu-manifest-type" with values "none" (default), "mcuboot", and allowing for expansion later if other post-processing steps are needed for other bootloaders/partitions.

partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		boot_partition: partition@0 {
			label = "mcuboot";
			reg = <0x00000000 0xc000>;
		};
		slot0_partition: partition@c000 {
			label = "image-0";
			reg = <0x0000C000 0x32000>;
			dfu-access = "readonly";
		};
		slot1_partition: partition@3e000 {
			label = "image-1";
			reg = <0x0003E000 0x32000>;
			dfu-access = "readwrite";
			dfu-manifest-action = "mcuboot";
		};
		scratch_partition: partition@70000 {
			label = "image-scratch";
			reg = <0x00070000 0xa000>;
		};
		storage_partition: partition@7a000 {
			label = "storage";
			reg = <0x0007a000 0x00006000>;
			dfu-access = "readwrite";
		};
	};

Instead of adding these to the partition table device tree, instead do something like what the USB audio class does and have the USB DFU class have its own set of device tress configurations settings as a child of the USB controller (maybe all USB classes should be this way, so descriptor tables/class configuration come more from device tree instead of all from Kconfig?). In this system, there are similar tags to the partitions but is instead but in one place associated with the DFU class and not mixed in with the partition table:

&usbd {
	dfu {
		label = "usb-dfu";
		compatible = "usb-dfu";

		alt_image_0 {
			partition = &slot0_partition;
			read-only;
		};
		alt_image_1 {
			partition = &slot1_partition;
			manifest-action = "mcuboot";
		};
		alt_storage {
			partition = &storage_partition;
		};
	};
};

Instead of adding these to the partition table device tree, instead do something like what the USB audio class does and have the USB DFU class have its own set of device tress configurations settings as a child of the USB controller (maybe all USB classes should be this way, so descriptor tables/class configuration come more from device tree instead of all from Kconfig?).

No, I do not think it is a good idea. DT for audio is temporary solution and please do not use it as an example. And we do not obtain "descriptor tables" from from Kconfig.
I think in the opposite direction. Maybe it should not come preconfigured from the USB DFU implementation which partition is exposed, but the application (developer/user) should determine which partitions should be used. Before the USB start (usb_enable()) the partitions would be registered in the USB DFU core, possibly with appropriate flags (R|RW). But that would consume a little more flash.

@jfischer-no Do you mean for applications to each make their own version of the secondary descriptor table and set a pointer for the dfu implementation to use at runtime? With helper macros that would certainly be one way to do it, but now any application wanting to use DFU would have to include this macro (unless there is a default one in the DFU implementation folder).

@jfischer-no If its supposed to be user configurable (in code rather than DTS), it gets a bit messy to do while still ensuring the descriptors end up in the readonly section and dont consume RAM; since the descriptors need to change based on what partitions the user selects.  \
      }, \
    }, \
  }; \
  ... // Same for string descriptors

USB_DFU_PARTITIONS(image_0, DFU_READ, NULL,
                   image_1, DFU_READ | DFU_WRITE, DFU_MANIFEST_MCUBOOT,
                   storage, DFU_READ | DFU_WRITE, NULL);

Another thing to consider with this solution is that any errors generated from a bad partition name or other mistake might be difficult to decipher. But without moving the descriptor into RAM, Im not sure of a better way to handle this. There might be better ways of using the FOR_EACH and other macros to make this cleaner but I couldnt come up with a different way.
Alternatively, a custom linker section/scripts could be used to setup the descriptors in memory from many different definitions like how device initialization works (I havent looked into this approach in detail).

@jfischer-no If its supposed to be user configurable (in code rather than DTS), it gets a bit messy to do while still ensuring the descriptors end up in the readonly section and dont consume RAM; since the descriptors need to change based on what partitions the user selects. As I mentioned above, we can generate them all using macros (not complete):

Generally, all descriptors are placed in RAM because they are changed at runtime. This is how the stack works. Excuse me, but I do not see any urgent need to change anything in DFU implementation at the moment, especially to add new features, or change how we handle descriptors in current USB stack just because of new feature for DFU. I am in the process of reworking the USB device stack. The handling of the descriptors will change and the application will have more control over them, after that also the USB DFU implementation will be reworked and more abstracted.

@jfischer-no I didnt notice the descriptors were in RAM, so I apologize for that misunderstanding. The only urgency here was that this is a feature I need for my project (expanded access to other partitions via DFU), and thought it would be a nice feature to upstream in a generic way to enable anyone else who might need it (as well as fix the issues we found when trying to use DFU on Windows that were part of the original PR).
I can just use my original technique for my project and we can look at expanding this functionality with the new device stack later; so can close this PR.

The only urgency here was that this is a feature I need for my project (expanded access to other partitions via DFU), and thought it would be a nice feature to upstream in a generic way to enable anyone else who might need it (as well as fix the issues we found when trying to use DFU on Windows that were part of the original PR).

@mrrosen Could you please open a feature request so that it does not get lost?
Thanks for the patch which fixed the problem on Windows OS.

The only urgency here was that this is a feature I need for my project (expanded access to other partitions via DFU), and thought it would be a nice feature to upstream in a generic way to enable anyone else who might need it (as well as fix the issues we found when trying to use DFU on Windows that were part of the original PR).

@mrrosen Could you please open a feature request so that it does not get lost?
Thanks for the patch which fixed the problem on Windows OS.

https://github.com/zephyrproject-rtos/zephyr/issues/32135
This feature can be now tracked here instead.


expand entity in jsonschema schema

https://github.com/citation-file-format/citation-file-format/blob/04ec97816b5f069c205885642027eb50a5a17135/schema.json#L668-L671

Also relates to #103.

Assigned @sdruskat because he opened a PR for this already.

#155 merged now, closing.


feat(shared,clerk-react,clerk-js): Auto-revalidation of paginated resources based on events

Description
Three new events were added to eventBus in order to describe the action that was taken and broadcast it to subscribers.
This ensures that specific clerk-js methods can broadcast an event and our hooks can listen to that event and in this case revalidate the cache.
Why do we need this
This is extremely useful of situations where our UI components are used in conjunction with custom implementations. For example, let's say that an application is using the Organization Profile and CreateOrganization components, but it has a custom implementation of OrganizationSwitcher. Until now there was no way to notify the custom switcher to refetch data when an organization was created via the component.
Before
"test2" is not getting removed from custom switcher
https://github.com/clerk/javascript/assets/19269911/da74d1c3-6373-40f0-8ec4-55ab30b74eba
After
"dwadaw" is getting correctly removed from custom switcher
https://github.com/clerk/javascript/assets/19269911/92df255d-dd68-44ea-8604-8062935a5257

Checklist

[ ] npm test runs as expected.
[ ] npm run build runs as expected.
[ ] (If applicable) JSDoc comments have been added or updated for any package exports
[ ] (If applicable) Documentation has been updated

Type of change

[ ] 🐛 Bug fix
[ ] 🌟 New feature
[ ] 🔨 Breaking change
[ ] 📖 Refactoring / dependency upgrade / documentation
[ ] other:

We are closing this due to inactivity, we would like to experiment more with the solution before releasing it as stable.


Question about 'Delivery method'

hi Kirill, i dont know why but the 'Delivery method' step in checkout page is gone from all of my sites, even though I already added Shipping method.

Hi @sonnt2510
Is the product physical? Check it here:

hi @kirill-zhirnov awesome, thanks mate, and is there anyway that I can customize the Shipping Address form just a little bit, like remove zip code, city, state ... or change the input label

thanks @kirill-zhirnov i got it


Add French translation and add django-rosetta for easier translation

This PR adds a DeepL-generated French translation, adds some {% translate ... %} calls in the templates for strings that appeared to be missing, and fills in some of those strings in the Spanish translation.
It also adds django-rosetta to assist in future translations.
Apologies in advance, while I do speak some Spanish and French, I do not consider myself fluent in either language.

I missed this. I will have a look at it next week.

Released as 0.3.0. Thank you.


Is it possible to output a warning if compiling in a deprecated class

I've just noticed that I've been compiling code that uses qx.ui.table.model.Filtered which is marked as deprecated. Is it possible to output a warning to tell you that this is the case?

good idea 👍


Add option to filter gnomAD variants to variants in ClinVar

Implement this with filters on table columns (clinical significance in this case).

We got a renewed request for this feature, so just dropping it in the Plan/Discuss column for more discussion.

The functionality that would be the most helpful is if there was a check box in the ClinVar section, likely near where it says "Only show ClinVar variants that are in gnomAD" that allowed one to match the table of gnomAD variants to what is selected for ClinVar variants. This is needed to understand the characteristics of ClinVar variants that are in the gnomAD dataset.


Horizontal Flatlist does not work smoothly

Is this a bug report?
Yes

Have you read the Contributing Guidelines?
Yes
Environment

react-native -v: react-native: 0.47.2
node -v: v8.4.0
npm -v: 5.4.1
yarn --version: 0.27.5

Then, specify:

Target Platform:
iOS

Development Operating System:
macOS

Build tools:
Atom

Steps to Reproduce

(Write your steps here:)

Write a flatlist, which will place elements side by side rather than one below other, using horizontal attribute.
Provide 3 or more values.

Expected Behavior

The list must scroll horizontally.
Actual Behavior

The app goes horribly unstable and the state keeps on refreshing (render method gets called again and again continuously).
Reproducible Demo

As you can see the logs, there are only 3 records, and the state, of the component, keeps refreshing and hence it does not work smoothly. If I remove horizontal attribute, everything goes fine.

If I fix the width of the view then it will work perfectly fine. As of now I think we can consider this as workaround.


UP007 problems with pydantic and from __future__ import annotations

Consider the following file, written for Python3.9+.
# tmp.py
from __future__ import annotations

from typing import Union

from pydantic import BaseModel

x: Union[int, str] = 5

class A(BaseModel):
    y: Union[int, str] = 5

Running ruff check tmp.py --target-version py39 --select UP --fix with Ruff version 0.0.275 yields:
from __future__ import annotations

from typing import Union

from pydantic import BaseModel

x: int | str = 5

class A(BaseModel):
    y: int | str = 5

Running the script results in the following error:
Traceback (most recent call last):
  File "/home/felipe/Projects/voraus-vtest/tmp.py", line 10, in <module>
    class A(BaseModel):
  File "pydantic/main.py", line 178, in pydantic.main.ModelMetaclass.__new__
  File "pydantic/typing.py", line 400, in pydantic.typing.resolve_annotations

  File "/home/felipe/.pyenv/versions/3.9.13/lib/python3.9/typing.py", line 292, in _eval_type
    return t._evaluate(globalns, localns, recursive_guard)
  File "/home/felipe/.pyenv/versions/3.9.13/lib/python3.9/typing.py", line 554, in _evaluate
    eval(self.__forward_code__, globalns, localns),
  File "<string>", line 1, in <module>
TypeError: unsupported operand type(s) for |: 'type' and 'type'

The module-level x seems to work fine (because of the __future__ import?). Should Ruff maybe not change the type annotation if from __future__ import annotations is present? The type annotation might be evaluated in a different context where the import is not available.

Yeah, the problem stems from the fact that pydantic evaluates the type annotations at runtime. I've had similar problems with hydra which also evaluates type annotations in order to do type validation at runtime.
Also note that from __future__ import annotations is generally problematic in pydantic: https://github.com/pydantic/pydantic/issues/2678 which is why the Python steering committee has not made it the default in Python 3.10 as originally planned, and instead has decided on the alternative mechanism proposed in PEP 649.
Ruff could check for these libraries but that would be a lot of special casing because I don't think you can in general tell whether it type annotation will be evaluated without knowing what the library does.

While it's true ruff can special case imports of pydantic and just assume all annotations aren't safe to apply UP007 to, it's also true that UP007 is quite narrowly scoped and should arguably be disabled entirely in codebases that both support older versions of python, and use pydantic in some form.
A dedicated config setting for "i-use-runtime-annotations-please-dont-break-that = true" would allow UP007 to smartly detect when the minimum required python is updated and automatically re-enable itself.

Yeah, I generally recommend against using from __future__ import annotations with Pydantic for the above reasons (or disabling UP007).
We actually used to have a keep-runtime-typing flag, similar to Pyupgrade, but the way it was implemented meant that it was equivalent to disabling UP006 and UP007. I ended up deprecating it (https://github.com/astral-sh/ruff/pull/4427), but I think I made a mistake. We should've kept that flag, but fixed the semantics, such that it only disabled those rules for cases in which the syntax is not yet supported at runtime (i.e., < Python 3.9 or Python 3.10 depending on the rule). I think we should restore it with those semantics.

I'm going to use this Issue as an opportunity to reintroduce that keep-runtime-typing setting.

My suggestion would be to actually reverse the flag, so that people don't break things by accident.


inline chat UI stuck on error

Got the trace below, this happens when PAUSE is enter as part of error handling which then also errors...
ERR Unexpected type: Error: Unexpected type
    at b (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:93:10132)
    at K.PAUSE (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2387:42819)
    at K.run (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2387:33125)

The error leading up to this is:
2024-01-23 16:36:20.400 [error] Session already stored for vs.editor.ICodeEditor:1@file:///Users/jrieken/Code/vscode/src/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts: Error: Session already stored for vs.editor.ICodeEditor:1@file:///Users/jrieken/Code/vscode/src/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts
    at u.createSession (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1911:72922)
    at async K.CREATE_SESSION (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2387:33692)
    at async K.R (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2387:33226)
    at async K.run (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2387:33046)
2024-01-23 16:36:20.400 [error] Unexpected type: Error: Unexpected type

To verify

start inline chat
get it to make changes
select ESC to hide inline chat
select cmd+i to start inline chat again


Bot returns an error when using Regex validation in adaptive cards

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Hi team,
Please let me know if you would need additional information, this is currently halting a few use cases in production for us.
Best,
Version

What package version of the SDK are you using.

    <PackageReference Include="Microsoft.Bot.Builder.AI.Luis" Version="4.18.1" />
    <PackageReference Include="Microsoft.Bot.Builder.AI.QnA" Version="4.18.1" />
    <PackageReference Include="Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime" Version="4.18.1" />

Describe the bug

Give a clear and concise description of what the bug is.

When adding an adaptive card with escape characters, the bot throws an error:
SimpleBot.en-us.lg:Bad JSON escape sequence: \(. Path 'body[1].regex', line 17, position 19. [SendActivity_Greeting]  Error occurred when evaluating expression. [__temp__2e107cdbb4794f199d2deef102998b02]  Error occurred when evaluating expression.

In the bot code, the following stack trace:
      [OnTurnError] unhandled error : SimpleBot.en-us.lg:Bad JSON escape sequence: \(. Path 'body[1].regex', line 17, position 19. [SendActivity_Greeting]  Error occurred when evaluating expression. [__temp__3a1a41dc84584e56a5f47d4261817df8]  Error occurred when evaluating expression.,
      SimpleBot.en-us.lg:Bad JSON escape sequence: \(. Path 'body[1].regex', line 17, position 19. [SendActivity_Greeting]  Error occurred when evaluating expression. [__temp__5a7af11be1f246ae9c7f2fb57ee0bcb5]  Error occurred when evaluating expression.
      System.InvalidOperationException: SimpleBot.en-us.lg:Bad JSON escape sequence: \(. Path 'body[1].regex', line 17, position 19. [SendActivity_Greeting]  Error occurred when evaluating expression. [__temp__3a1a41dc84584e56a5f47d4261817df8]  Error occurred when evaluating expression.,
      SimpleBot.en-us.lg:Bad JSON escape sequence: \(. Path 'body[1].regex', line 17, position 19. [SendActivity_Greeting]  Error occurred when evaluating expression. [__temp__5a7af11be1f246ae9c7f2fb57ee0bcb5]  Error occurred when evaluating expression.
         at Microsoft.Bot.Builder.Dialogs.Adaptive.Generators.MultiLanguageGeneratorBase.GenerateAsync(DialogContext dialogContext, String template, Object data, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.Adaptive.Templates.ActivityTemplate.BindAsync(DialogContext dialogContext, Object data, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.SendActivity.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginActionAsync(DialogContext dc, Int32 offset, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.DialogContext.ReplaceDialogAsync(String dialogId, Object options, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.IfCondition.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginActionAsync(DialogContext dc, Int32 offset, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ForEachElement.RunItemsAsync(DialogContext dc, Boolean beginDialog, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ForEachElement.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginActionAsync(DialogContext dc, Int32 offset, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.Adaptive.AdaptiveDialog.ContinueActionsAsync(DialogContext dc, Object options, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.Adaptive.AdaptiveDialog.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.DialogExtensions.InnerRunAsync(ITurnContext turnContext, String dialogId, DialogContext dialogContext, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.DialogExtensions.InternalRunAsync(ITurnContext turnContext, String dialogId, DialogContext dialogContext, DialogStateManagerConfiguration stateConfiguration, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.DialogExtensions.InternalRunAsync(ITurnContext turnContext, String dialogId, DialogContext dialogContext, DialogStateManagerConfiguration stateConfiguration, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.DialogExtensions.RunAsync(Dialog dialog, ITurnContext turnContext, IStatePropertyAccessor`1 accessor, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.Dialogs.Adaptive.AdaptiveDialogBot.OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.SetSpeakMiddleware.OnTurnAsync(ITurnContext turnContext, NextDelegate next, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.MiddlewareSet.ReceiveActivityWithStatusAsync(ITurnContext turnContext, BotCallbackHandler callback, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.BotAdapter.RunPipelineAsync(ITurnContext turnContext, BotCallbackHandler callback, CancellationToken cancellationToken)

To Reproduce

Steps to reproduce the behavior:

Clone the repo https://github.com/gtonye/Adaptive-Card-Regex-Error-Repro
Run the bot locally (with the CLI or an IDE)
Using the emulator, connect to the bot
On the welcome message, it should trigger the error.

Expected behavior

Give a clear and concise description of what you expected to happen.

The bot should accept the regular expression. It is valid inside the Adaptive Card Designer (with the target version 1.3) as well as valid in https://regex101.com/
Screenshots

If applicable, add screenshots to help explain your problem.

Not applicable.
Additional context

Add any other context about the problem here.

Adaptive card I am testing with
{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.3",
    "body": [
        {
            "type": "TextBlock",
            "text": "Present a form and submit it back to the originator"
        },
        {
            "type": "Input.Text",
            "id": "lastName",
            "placeholder": "1234567890",
            "label": "What is your phone number?",
            "isRequired": true,
            "errorMessage": "A valid number is required",
            "regex": "^\\(?([0-9]{3})\\)?[-. ]?([0-9]{3})[-. ]?([0-9 ]{4})\\ ?\\.?$"
        }
    ],
    "actions": [
        {
            "type": "Action.Submit",
            "title": "Submit"
        }
    ]
}

https://github.com/microsoft/botbuilder-dotnet/assets/4819282/660c57e9-e7cb-4729-8561-33f3acccd5a2

@ceciliaavila @tracyboehrer would it be possible to triage this item? it is impacting our customers too

Hi @jamesemann, we'll tackle this issue this week.

Hi @gtonye and @jamesemann,
We've been reviewing the issue and debugging the provided bot to find why it is failing with the Bad JSON escape sequence: \(. error in the regex property.
Tracking down the problem, it leads to how the JSON prebuilt function receives and parses the AdaptiveCard JSON string value to an object.
The problem is on the double backslash, since the AdaptiveCard JSON is read as a string, the double backslash is being escaped, and when the "string to object" parsing happens, the remaining backslash is interpreted as another escaping character. More information on related issue https://github.com/microsoft/AdaptiveCards/issues/4677.
To solve the issue, you need to provide 4 backslashes in the JSON, as shown in the image below.

@sw-joelmut thank you for the investigation and the very detailed answer! It's very helpful context.
The challenge we have is that it's going to be difficult to expose this constraint to our customers as the corrected regular expression ^\\\\(?([0-9]{3})\\\\)?[-. ]?([0-9]{3})[-. ]?([0-9 ]{4})\\\\ ?\\\\.?$ is invalid both on Regex tester websites like regex101 and the adaptive card designer that I tested with the input:
{"$schema":"http://adaptivecards.io/schemas/adaptive-card.json","type":"AdaptiveCard","version":"1.3","body":[{"type":"TextBlock","text":"Present a form and submit it back to the originator"},{"type":"Input.Text","id":"lastName","placeholder":"1234567890","label":"What is your phone number?","isRequired":true,"errorMessage":"A valid number is required","regex":"^\\\\(?([0-9]{3})\\\\)?[-. ]?([0-9]{3})[-. ]?([0-9 ]{4})\\\\ ?\\\\.?$"}],"actions":[{"type":"Action.Submit","title":"Submit"}]}

Is there any opportunity to enhance or optimize the JSON prebuilt function to make it consistent with the behavior of the adaptive card engine?
Thank you,

Apologies for the delay @sw-joelmut

we could try adding a flag to treat the AdaptiveCard as it is, without altering its content

That would work great! let me know if you have changes that would need testing. We have several regex samples  our customers use that we can share.


Great work. I have a question about the epe.

Great work . Thank you for your code and this implementation is closest to paper.
I have a question about the epe : in paper, this index is 1.1. But I didn't get it when I trained other implementations in github. I wonder how to train this model and get epe like paper.
Thank you very much.

Hi there.  Ya, I was never able to match the authors' EPE.  It's unclear which portion of the dataset they calculate their EPE on; so it could be a bias in the test set that is causing the higher EPE.  I reached out to the two first authors but unfortunately I didn't hear back from either.  If you have any ideas or see any mistakes in the code, please let me know.  Thanks!


allows addEventListener to use handleEvent syntax while re-using the object for options

This solves in a simple way the common need of wanting to use passive/once/capture events.
addEventListener has an "obscure" feature of allowing the listener to be in an object with key handleEvent
This PR allows this syntax:
<div on:click={ {
  handleEvent(e) {
    console.log("clicked", e)
  },
  once:true
}/>

I haven't tested this but it should work https://playground.solidjs.com/anonymous/df01ffcb-e7dc-4a36-b80d-51a398c02689
This is what pota does https://github.com/potahtml/pota/blob/master/src/lib/reactive.js#L1372

Probably oncapture: can be removed here, but that would be a breaking change https://github.com/search?q=repo%3Aryansolid%2Fdom-expressions oncapture&type=code

This is actually an interesting feature to put in.

Yeah I like the implications of this. Not needing oncapture: etc and allowing full config of native events seems a real win. I might be releasing one more minor of Solid 1.x and I'd like to see this get in.

@titoBouzout I hope we don't forget to add this to the docs. :)

@davedbase already on my mind, I will look if typings need updates and how to add tests so gets ready for merging, stay tuned

ok if I am not missing anything I think this is ready for review

updated types adding a CustomEventHandlerUnion which accepts a regular function or the object form
it will use dom-expression addEventListener instead of the browser one, as it has the logic for checking if options it's an object. This has the nice side effect that output when minified should become smaller as node.addEventListener(...) will become $addEventListener(node, ...)
added compilation test for expected output
added jsdom test for actually checking if the options object is working as expected
marked interface CustomCaptureEvents as deprecated

Considerations:

is there any code related to hydration that needs an update?
please double check my typings, can the addEventListener function signature types be improved to use the ones defined on client.d.ts?

Thanks!

@ryansolid pinging as it was noted the desired to include it on next release

docs update at https://github.com/solidjs/solid-docs-next/pull/866


[dpdk] Update to v22.07

Describe the pull request

What does your PR fix?

Update DPDK to version v22.07

Which triplets are supported/not supported? Have you updated the CI baseline?
No

Does your PR follow the maintainer guide?

Yes

I accidentally deleted the change from a rebase. Now move to #26643


add grpc._cython.ChannelArgs argument for grpc.server function

add this argument, so we can give channel arguments to server, for example, to change the max message size.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok to test.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok to test.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok to test.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok to test.

I signed the agreement

Thanks for the contribution! I've made some comments inline.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

I've gone ahead and added this change with the suggestions here:
https://github.com/grpc/grpc/pull/8137
Thanks for your contribution!


Updated docs and QS deployment to compatible static release

Issue #, if available:

N/A

Description of changes:

Updated deployment to use static and compatible Chainlink core version 1.12.0
Switched from dockerhub to public ECR
Updated UID from 1000 to 14933 to align with container's UID
Updated documentation for clarity on usage of Chainlink core version 1.12.0

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/do-e2e-tests


link_only fails with large df (~350 mio rows, 16 cols)

What happens?
I have df_1 with 350 mio. rows where dedupe_only works fine. If I try to link_only df1 with df_2 (10 mio. rows) i get "Error: Invalid Error: std::bad_alloc". link_only works if I reduce df_1 to around 0.2 (= 70 mio. rows).
Here the full error:
Traceback (most recent call last):
File "/home/wdalvai/.local/lib/python3.9/site-packages/spyder_kernels/py3compat.py", line 356, in compat_exec
exec(code, globals, locals)
File "/mnt/it/IT/Ent/DAM/KI/Deduplizierung_Baseline_Modell/programm_ausfuehren.py", line 201, in
clusters = linker.cluster_pairwise_predictions_at_threshold(predictions, 0)
File "/home/wdalvai/.local/lib/python3.9/site-packages/splink/linker.py", line 1256, in cluster_pairwise_predictions_at_threshold
cc = solve_connected_components(
File "/home/wdalvai/.local/lib/python3.9/site-packages/splink/connected_components.py", line 463, in solve_connected_components
representatives = linker._execute_sql_pipeline()
File "/home/wdalvai/.local/lib/python3.9/site-packages/splink/linker.py", line 345, in _execute_sql_pipeline
dataframe = self._sql_to_splink_dataframe_checking_cache(
File "/home/wdalvai/.local/lib/python3.9/site-packages/splink/linker.py", line 418, in _sql_to_splink_dataframe_checking_cache
splink_dataframe = self._execute_sql_against_backend(
File "/home/wdalvai/.local/lib/python3.9/site-packages/splink/duckdb/duckdb_linker.py", line 186, in _execute_sql_against_backend
self._con.execute(sql).fetch_df()
Error: Invalid Error: std::bad_alloc
To Reproduce
from splink.duckdb.duckdb_linker import DuckDBLinker
import splink.duckdb.duckdb_comparison_library as cl
settings = {
"link_type": "link_only",
"blocking_rules_to_generate_predictions": blocker_full,
"comparisons": [cl.exact_match("GESCHLECHT")],
"retain_matching_columns": False,
"retain_intermediate_calculation_columns": False
}
input_aliases = ["old", "new"]
linker = DuckDBLinker([df_1, df_2], settings, input_table_aliases=input_aliases)
Comparison pairs
Create comparison pairs and cluster_ids
predictions = linker.predict()
df_predictions = predictions.as_pandas_dataframe(limit=50)
clusters = linker.cluster_pairwise_predictions_at_threshold(predictions, 0)
df_clusters = clusters.as_pandas_dataframe(limit=50)
OS:
RockyLinux 8.5
Splink version:
3.3.0
Have you tried this on the latest master branch?

[X] I agree

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

[X] I agree

You may be trying to create too many comparisons.  To check, you can try the following to see how many comparisons your blocking rules will create:
linker.cumulative_num_comparisons_from_blocking_rules_chart()

There's an example here
There's more information on scaling jobs for big data here:
https://moj-analytical-services.github.io/splink/topic_guides/backends.html
https://moj-analytical-services.github.io/splink/topic_guides/drivers_of_performance.html


Inline HTML in Markdown is rendered as text on pub.dartlang.org

This issue was originally filed by @zoechi

What steps will reproduce the problem?
1.
I put a HTML table into the README.md file.
The HTML tags for the table are shown as text
http://pub.dartlang.org/packages/polymer_elements
2.
3.
What is the expected output? What do you see instead?
Should be displayed as at https://github.com/ErikGrimes/polymer_elements
What version of the product are you using? On what operating system?
Dart VM version: <IP_ADDRESS>_r29656 (Thu Oct 31 03:54:37 2013) on "linux_x64"
Please provide any additional information below.

This issue has been moved to dart-lang/pub-dartlang#331.


Paste whole line after a bracket does not correctly indent

VSCode Version: 0.10.12-alpha (latest)
OS Version: Windows 10

Steps to Reproduce:

Place cursor/caret at the end of a line and copy to copy the whole line
Navigate to the end of a line with an open bracket
Paste

Actual:
Does not correctly indent the next line after pasting:

Expected:
In VS2015 it will indent the pasted line after the bracket.

There is now a setting editor.formatOnPaste.


kanaBank and CellReset with eventHooks

A couple of the edits are slightly greasy, but should work at least equivalently to pre-eventHooks

Please test the changes I've made. If everything is working, I'll go ahead and merge 👍

I haven't extensively tested cell Reset, but in the testing I did I had no issues with the changes you made.

👍


Problem with uninstalling vim on windows 10

Installed vim by the following lines:
git clone https://github.com/vim/vim.git
cd vim/src
make
Version:

Could not find 'uninstal.exe' in the vim directory.
Have no idea on how to uninstall it.

It seems that you are building non-Windows version of Vim.
Please see src/INSTALLpc.txt to know how to build Windows versions of Vim.
Anyway, this is not right place to ask questions. Please use the vim_dev (or vim_use) mailinglist to ask how to build Vim.

Building Vim for Windows should not be done with the default makefile named Makefile but with a different .mak file according to which compiler you are using (usually either MS Visual Studio or MinGW gcc). For details, see the file src/INSTALLpc.txt which has the format of a Vim helpfile except that it has no modeline.
Best regards,
Tony.


bgpv2: Do not fail if PeerAddress is not configured for a peer

As PeerAddress is optional in CiliumBGPPeer struct used in CiliumBGPClusterConfig CRD, BGP Control Plane should not fail the reconciliation if it is not configured. Instead, it should skip processing of the peer until the PeerAddress is configured.

/test

/ci-ipsec-upgrade


Rogue - Rupture and Garrote damage is higher than expected

Describe the bug
Adding Rupture/Garrote into APL - damage listed in results per cast and per tick seem significantly higher than they do in game.

Looking up high parses with Garrote, for example, on WCL have garrote's ticks of ~93 on mechanical bosses
Just an arbitrary top 50 log I grabbed to check
To Reproduce
Steps to reproduce the behavior:
Create an APL (linked below) that uses rupture/garrote, Verify the damage numbers make sense.
Expected behavior
Rupture/Garrote damage is higher than expected.
Sim Links and Screenshots
Sim link
Additional context
Add any other context about the problem here.

seem "total damage" be used as "tick damage"

Fixed in https://github.com/wowsims/sod/pull/364


Added Auto Zoom functionality to scene.py

Motivation

I wanted to add the Auto Zoom functionality back to manim as it is very useful :) And saves a lot of time
Credits to @benjaminolsen12 for doing the conversion
Proposed changes

scene.py
I Basically copied the old implementation

Test

Code:
class SquareToCircle(Scene):
    def construct(self):
        circle = Circle()
        circle.set_fill(BLUE, opacity=0.5)
        circle.set_stroke(BLUE_E, width=4)
        square = Square()

        self.play(ShowCreation(square))
        self.wait()
        self.play(ReplacementTransform(square, circle))
        self.wait()
        square = Square().move_to(LEFT)
        self.play(ShowCreation(square))
        self.play(self.auto_zoom([square]))

Result:

Thanks for contributing! A few comments:

I think a lot of the implementation computes what you would get with the simpler line Group(*mobjects).get_bounding_box()
I wonder if it would be better to just make this a method of CameraFrame, so that one might call self.play(frame.animate.zoom_to(square)), or something like that.


Tags are returned only when query is grouped by them

Thanks for your contributions, I've just released v0.3.13 with your changes!

Great! That was very easy, thank you.


Add RMSE option to MSE code

What does this PR do?
Fixes #250 .
PR review
I open for any kind of feedback. This is was a very simple fix and I think it might be helpful for others to have this functionality.

Hi @johannespitz,
As RMSE is just sqrt(MSE) the implementation needs to happen in the compute function in instead of the update. Essentially, it should be:
return sum_squared_error / n_obs if squared else torch.sqrt(sum_squared_error / n_obs)

instead of
return sum_squared_error / n_obs

Should this be just a CompositeMetric(MSE, torch.sqrt)?

Hi,
unfortunately RMSE is not simply the square root of the MSE. Therefore, one can not compose the metric with some arithmetic.
import torch

targets = torch.tensor([1.0, 2, 3, 4, -1, -2])
preditions = torch.tensor([0, 1, 5, 2, 0, -2])

lenght = targets.shape[0]

mse = ((targets - preditions) ** 2).sum()
rmse = (((targets - preditions) ** 2) ** 0.5).sum()

print(f"mse {mse / lenght}")
print(f"rmse {rmse / lenght}")
print(f"mse**0.5 {mse ** 0.5 / lenght}")

The square root needs to be taken before summing up the individual errors.

Is that actually true? Wikipedia gives RMSE = sqrt(MSE): https://en.wikipedia.org/wiki/Root-mean-square_deviation

Oh, my bad. scikit-learn agrees with that definition.
In this case, I agree that there is no need to modify the existing code to implement RSME.
I still believe that the metric I implemented is more useful for anyone working with physical distances, but I understand 100% if you prefer not to clutter your API with such (apparently niche) additions.
Therefore, please feel free to close the PR and the issue.

I am actually in favour of adding this argument, as RMSE also is considered a standard machine learning algorithm.
The reason I think we should not just do CompositionalMetric(MSE, torch.sqrt) as @maximsch2 proposes is that CompositionalMetric is really not meant to be used by users (it is not in the documentation) but more as a tool to define metric arithmetics.
@johannespitz would you still be up for making the required changes?

Sorry, about all those commits. But I have tested it, and now I'm getting the expected result.
However, torchmetrics.MeanSquaredError() ** 0.5 is documented and results in the same output...

lgtm to me as well, but agree that the extra value might be slim compared to just metric ** 0.5
I see your point about root of each observation. We are getting a few metrics like that recently and it might be worth trying to combine/generalize them. The patter is that we want to have
sum(metric(pred_i, target_i))/N
And so far we have metric:

MSE: (pred_i - target_i)**2
MAE: torch.abs(pred_i-target_i)
What you asked: torch.sqrt((pred_i - target_i)**2) - if you look at it, it's actually exactly MAE, we already have it and you can use it! @johannespitz
MeanPercentageError: torch.abs((pred_i-target_i)/target_i)

I do wonder if we will exhaust all of those or we should make a generic metric implementation that will compute average "distance" between pred and target for a pluggable distance.

@maximsch2 I like the idea of a generic class which can handle all metrics that fit into this sum(metric(pred_i, target_i))/N pattern. All the current metrics could just inherit from this class and specify the function which takes in single predictions and targets.
class torchmetrics.MeanSquaredError(AverageMetric):
    def __init__(self):
        super().__init__(
            individual_metric_fn=lambda pred, targ: (pred - targ) ** 2
        )

This would also allow me to implement what I wanted (but didn't even implement as you pointed out above) individual_metric_fn=lambda pred, targ: troch.norm(pred - targ, dim=-1)


Yoshi (U) (MMC1) - black screen

This was just a bad ROM.  The iNES header specified 8x8KB blocks of CHR ROM, when it actually has 4x8KB blocks


add minter roles

Add several datatoken functions:

isMinter
proposeMinter
approveMinter

closes https://github.com/oceanprotocol/ocean.js/issues/601


Report to github the status of individual jobs rather than the multijob.

Report to github the status of individual jobs rather than the multijob.
This means that the information on the github page will be more useful,
as you can see which tests failed without clicking through and
searching. In addition, when a job is retried it will update its status
again, so a passing run will show all green on github even if it
required a job to be retried.
This commit changes the "pending" notifications to be for each test
we intend to run, and then each job does the successful/failing
notifications itself.
The github_status.sh script with the auth details isn't available
on the slaves, so this now embeds it in the script step.

Thanks. I think this is nicer (although I long for the day when an aggregate thing is enough!).
One potential bug that should be fixed plus some minor comments. Merge when happy.


Deploy non-ONAP development OpenStack environment for VNF testing

Goal: Segment testing of non-ONAP VNF work from ONAP
This is Part 2: Get VNFs running on OpenStack without ONAP  from https://docs.google.com/document/d/1GrdMynJA738fmkOPvTrkZAGz04eC4TcvmLRYLW4wbCs/edit#

[x]  Provision new packet server - cnfs-dev02 => https://app.packet.net/devices/26702938-4b18-4e4f-af7c-89926925729a

m1.xlarge.x86 - Memory: 256 GB,	CPU: Intel Xeon E5-2650 (2x)	x86	24 Cores @ 2.2 GHz, Disk: 		2.8 TB
Public <IP_ADDRESS>, <IP_ADDRESS>
Private <IP_ADDRESS>, <IP_ADDRESS>

[x] Add dns pointing to <IP_ADDRESS>

[x] Provision base dev software and pull down onap-demo code

[x] Deploy openstack to new packet server using working vagrant setup => https://github.com/cncf/onap-demo/tree/amsterdam-openstack-ocata/vagrant

@denverwilliams on steps to setup new system and provision openstack:
Provision base dev software and pull down onap-demo code:
git clone git@github.com:cncf/onap-demo.git -b amsterdam-openstack-ocata

cd onap-demo

./vagrant/run_demo.sh

Deploy the router to new packet server:
cd router-node ; vagrant plugin install vagrant-reload ; vagrant up

Deploy openstack to new packet server:
cd ../vagrant ; vagrant up


[StandardLib][Vector] Make vectors iterable

Closing since there is already an issue for this: #4823


feat: [ENG-605][ENG-606] Enrich traces attributes

This PR implements:

package otelsaramax: adds ConsumerGroup and ConsumerID
package otelhttpx:

adds WithChiSpanNameFormatter from atlas repo
adds both http.target and `http.url

What is the reason we had to copy the package codes for otelhttpx?

I've modified the implementation to allow the developer to configure the otel handler with a custom function to populate attributes for each incoming request for spans and metrics.


some C++ keywords not colorized correctly

VSCode Version: Code 1.10.2 (8076a19fdcab7e1fc1707952d652f0bb6c6db331, 2017-03-08T14:02:52.799Z)
OS Version: Windows_NT ia32 10.0.14393
Extensions:

Extension
Author
Version

cpptools
ms-vscode
0.10.2

Steps to Reproduce:

Open a c++ file
Type any of the missing keywords into the editor (sizeof, static_cast, dynamic_cast, reinterpret_cast)

Copied from: https://github.com/Microsoft/vscode-cpptools/issues/551
I see that these keywords are listed in the grammar for C/C++.  I'm not sure why the editor is not coloring them correctly.

The "bug" is that the default VS Code theme is making the color the same as normal text. How should this be solved?

@sean-mcmanus The Language needs to updated. sizeOf, for example, is not being caught correctly somewhere in the .tmLanguage/.cson/.json file. Looking at C's file, it is named in 8 places, but in C++'s it's 0. Thus making sizeof's scope source.cpp, which is the default text color. Hope this helps

I don't understand. sizeof doesn't render as the default text color when you change the theme. I don't see any difference in behavior between C and C++.

@rbenson, the C++ grammar scope includes the C grammar scope (it's a superset)
  {
    'include': 'source.c'
  }

Added to our default themes.

I see this got fixed for sizeof/etc., but we're still having the same issue with the alignof keyword. Should I open a new bug for that? https://github.com/Microsoft/vscode-cpptools/issues/938


Pagination is missing on Scema registry overview page

Describe the bug
Pagination is missing on http://redesign.internal.kafka-ui.provectus.io/ui/clusters/local/schemas
Set up
http://redesign.internal.kafka-ui.provectus.io/
Steps to Reproduce
Steps to reproduce the behavior:

Navigate to Shema registry
There is no pagination for schemas on the right panel

Expected behavior
(A clear and concise description of what you expected to happen)
Screenshots
(If applicable, add screenshots to help explain your problem)
Additional context
(Add any other context about the problem here)

@workshur backend done, pending frontend. PR: #1367


Module request specifier for a non JS file does not pick up matching definition files

Bug Report
.d.ts files are not picked up for files that do not contain a .js extension in the module request specifier.
This happens when using the following configuration:

"moduleResolution": "node16" in tsconfig.json
"type": "module" in package.json

🔎 Search Terms
definition files, non js, third party
🕗 Version & Regression Information
This reproduces on version 4.7.4, but I think this issue exists since TypeScript began supporting "type": "module" configuration.

This is the behavior in every version I tried, and I reviewed the FAQ for entries about definition files

⏯ Playground Link
No playground as this reproduction requires multiple files.
💻 Code
Minimal reproduction repo - https://github.com/barak007/type-module-ts-bug
🙁 Actual behavior
The component.ts file, imports the component.st.css file, but the component.css.d.ts file is not picked up, and the import is not resolved.
🙂 Expected behavior
Pick up the module definition for the .st.css file and allow using it.

Isn't this expected as described in following?
https://www.typescriptlang.org/docs/handbook/esm-node.html#type-in-packagejson-and-new-extensions

I work with @tomrav, and it's possible we weren't clear enough about our intent in our original post, I hope to make it clearer here.
There are a few things we can note:

In esm the evaluation of the request specifier is host-specified (node, browser, etc...)
We are talking about the node16 resolution (host) mode combined with a package.json in a type module configuration
In this resolution mode, "relative import paths need full extensions", which we provide, in our case .css
In node, you can use esm loaders to allow loading any non-JS file extension, converting them to es modules
In node, without a custom loader, if you write an import with a specifier to a .css file the result is a failure with the message ERR_UNKNOWN_FILE_EXTENSION. It's important to note that node did pick up the imported .css file and attempted to process it. This means that the file resolution is working fine (also in TypeScript). But, the import receives no typings because the .d.ts is not properly matched.

Furthermore, similar to how esm loaders work in node, bundlers or browsers can also be used to load non-JS files. One example for this is import asserts, another would be a bundler's loader configuration.
Our repository reproduction demonstrates a case where we have a .css file, and a d.ts file with the same name next to it.
We then import the .css file (with full extension specifier) and expect the d.ts file next to it to provide the typings for said file, but it does not.
This raises the question, how can we "type" this .css file?
Up until now using the Node resolution mode (cjs), this worked fine and the d.ts files were picked up.
Both of the following imports picked up the component.st.css.d.ts file.
// resolution: Node
import * as T1 from "./component.st.css";    // works
import * as T2 from "./component.st.css.js"; // works

I think that the .d.ts file should be picked up for both the .css and .css.js requests in node16 resolution mode, and it would be true so long as there is actually a file that could be resolved by those requests.
Is this the source of the issue?
I think it boils down to the fact that .d.ts files for .js files are not using full extensions, the .js is replaced with the .ts at the end of .d.ts same for cjs and mjs.
/a.js ==> /a.d.ts

When looking at the .css example, what should be done?
/a.css      <-- original request in JS

/a.css.d.ts <-- keeping the extension and adding the `.d.ts` extension
/a.d.css    <-- adding a `.d` before the `.css` extension
/a.d.ts     <-- dropping the extension and adding `.d.ts`, this is not possible

Afaik this is pretty much as expected - for any extension that isn't a known js extension that maps to a known extension (eg, js to ts, mjs to mts, cjs to cts), as far as I know, we just append .d.ts to the path as a fallback mechanism. That can conflict with a js file, sure, but it's unlikely in practice (because how many people chain extensions amirite), and we've never done anything else. Maybe a .d.css type generic extension mechanism would make sense, but we wouldn't have a reasonably backwards compatible way to remove the .d.ts appending behavior, so it's not really worth adding a second extension to type the same input path.

Like, the .d.ts addition fallback behavior arises from trying a .js addition and falling back to equivalent ts extensions. Node esm doesn't have extension lookup, so we don't even try in an esm file on node16.

Not to go too deeply into implementation details, my logic is:

in node I can write import { something } from "module.cpp";
in node I can use a loader to compile the C++ code into a javascript module
I expect that if I put a module.cpp.d.ts file next to the C++ file, that it will be used to provide typings
I don't expect to add .js extension because I already provided full path with extension for the file

Same idea is true for the browser and bundlers.
I feel like matching definition files that sit next to a source file should not be related to the raw request or the resolution algorithm, but to the resolved file path:

If the resolved file path ends with .cjs, .mjs, .js - Then replace the extension with .d.cts, .d.mts, .d.ts. I think that it should also be possible to just append .d.ts to the end of the filePath like: .js.d.ts, .cjs.d.ts, .mjs.d.ts.
If the resolved file path ends with anything else - then just append .d.ts like: .cpp.d.ts

This way when the file x.cpp is imported with the request ./x.cpp, then it will match ./x.cpp.d.ts when imported using the .js extension as ./x.cpp.js will also matches x.cpp.d.ts

Hm, I mean, the issue with going with the "always lookup an appended .d.ts extension" route in esm is is means a ./file.css.d.ts on disk would then match both ./file.css and ./file.css.js specifiers, when only one of those is likely to exist at runtime, and the runtime isn't trying both locations to paper over the difference, like it is for a require in cjs.

That is why I suggested to also allow just appending .d.ts to match .js files. (or basically any file)
Consider the following project structure:
/app
   /index.js
   /index.d.ts    <-- this will be picked up if there were no index.js.d.ts, currently it's not picked up
   /index.js.d.ts <-- this will be picked up because a full extension is a more complete match

   /index.css
   /index.css.d.ts

   /index.css.js
   /index.css.js.d.ts

Structure with "conflict":
/app
   /index.js <-- import {} from "./index.css";
   /index.css
   /index.css.d.ts <-- this will be picked up because full extension match.
   /index.css.js.d.ts <-- this will be ignored because we already matched index.css.d.ts

When adding ,js to the request
/app
   /index.js <-- import {} from "./index.css.js"; /* .js */
   /index.css
   /index.css.d.ts <-- this will be ignored because we already matched index.css.js.d.ts
   /index.css.js.d.ts <-- this will be picked up because full extension match.

There is a reason why you would want to import from ./index.css.js. if you build the css  file to js in the dist the request will match the js file.
I think there is no ambiguity in this kind of matching, and the reason there is the possibility of conflicts in the first place is because the original matching was not for a full extension.
When emitting .d.ts files I would only generate them with full extension. index.ts --> index.js.d.ts

@weswigham closed by #51435?


AARCH/ARM build fails

I'm trying to use Criterion on ARM and based on https://github.com/Snaipe/Criterion/issues/233 issue, I tried building BoxFort on the aarch/arm branch and I get the following failure:
[  5%] Building ASM object CMakeFiles/boxfort.dir/src/asm/trampoline-arm64.S.o
[ 10%] Building C object CMakeFiles/boxfort.dir/src/addr.c.o
[ 15%] Building C object CMakeFiles/boxfort.dir/src/arena.c.o
[ 21%] Building C object CMakeFiles/boxfort.dir/src/context.c.o
[ 26%] Building C object CMakeFiles/boxfort.dir/src/exe-elf.c.o
[ 31%] Building C object CMakeFiles/boxfort.dir/src/sandbox-posix.c.o
[ 36%] Building C object CMakeFiles/boxfort.dir/src/sandbox.c.o
[ 42%] Building C object CMakeFiles/boxfort.dir/src/timeout-posix.c.o
[ 47%] Building C object CMakeFiles/boxfort.dir/src/timestamp.c.o
[ 52%] Linking C shared library libboxfort.so
/usr/bin/ld: CMakeFiles/boxfort.dir/src/arena.c.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol `stderr@@GLIBC_2.17' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/boxfort.dir/src/arena.c.o(.text+0xb4): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `stderr@@GLIBC_2.17'
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
CMakeFiles/boxfort.dir/build.make:294: recipe for target 'libboxfort.so' failed

Any insight or help to fix this would be useful.

Ah, it looks like I need to always build it on the usr space on any other local space.


OwnBackup

Requirements here
Due: 6/29

Note from Adrian:

I've been researching the OwnBackup connector now that I have access, I don't see a way we can make a generic OwnBackup connector, we'll probably have to make a custom one for each client that asks for it. It's dependent on the objects a customer is archiving from Salesforce (which is configurable in OwnBackup) and any custom fields

Close as not planned since we determined there is not personal data in OwnBackup


Fixing the Camera's Snapshot API

Looks like Abode changed the API. This should now work.

Coverage remained the same at 77.565% when pulling 0f959cb3503d7d4611cce01e6bde652c990b3427 on milad-soufastai:master into 6f84bb428fd1da98855f55083cd427bebbcc57ae on MisterWil:master.


How to remove watermarks?

I'm currently using version 2024.02.27. Previous versions downloaded videos without watermarks. Now downloaded with watermarks.

It has been fixed in yt-dlp master/nightly. I'd also recommend upgrading to version 2024.03.18 of the plugin

Thank you!


no Amp\wait or run methods. Fix the documentation

Hi,
It has came to my notice from (https://github.com/amphp/artax/issues/83#issuecomment-125572351) that the documentation is wrong. It don't have wait or run methods for Amp and the namespace is also not there for the Client . My assumption is @staabm would have shown synchronous one itself for the documentation and we may need to use AsyncClient for non blocking one or I am still not sure of the same.
Thank you.

I'm sorry for the service interruption here -- we've been working hard to finish up and release amp 1.0.0. Now that that is finished I should be able to fix the breakage here ASAP.

Closing this, as Amp\wait is present in Amp v1.0.0, please use the dev-v2 for now.


fix "Can't change username/password in web UI #6"

Fix https://github.com/gjroots/esp32_nat_router_plus/issues/6 bug

I regret to inform you that I can't merge all of your pull requests due to the inclusion of static files in the commits. My concern is that this might cause confusion for other developers regarding the file changes. If there's only one file that has changes, a comment can help pinpoint the modifications in that file. However, I can definitely incorporate your code in the upcoming update.
Thank you being a part of development.... 😇

.. due to the inclusion of static files in the commits.
Thank you being a part of development.... 😇

Sorry, I included gz files due to the presence of them in the repo (if someone doesn't have Jekyll full chain, there are necessary.)
But only this commit.
See you

No problem, this isn't your error. I designed the project this way, but I might not have communicated it well. The main concept is that, if let's say only the info page has been modified, when you're making a commit, you should reverse the changes in all the other gz  files. This ensures that only the intended changes get committed, and the rest of the files remain unaffected.
So, dev's will understand what changes in which file easily.

code merged with new release #15
Thank you for your contribution......


Fix: Docker fail when creating config file

tuple attr cannot be key

Should I make PR to main or 2.6.0-dev ?


AWS Reserved Instances

Would be nice for the cold boot graph as they come up much faster.  Also, nice to have but not super important.

Migrated to Trello.
https://trello.com/c/mqshUrzc


Setup internationalization infrastructure for latin alphabets

Use Angular tool to setup the i18n infrastructure in order to offer internationalization support.
During this development, an exemple of a translation file in another language must be produced in order to give an exemple and to open the possibility of a community effort to translate the app.
For technical reasons, only the support of latin alphabets will be looked during this development.
As a roon-web-stack I want to be able to choose the language the app is running in a list of supported language.
As a roon-web-stack maintainer, I want to offer the possibility to community member to translate the app in the language they want.

@OonihiloO if you set the scaffolding for this, I can help in translating to Portuguese.


Npp Xml Treeview keeps appearing with the same version after update: could it be a minor version and build number error, perhaps?

Hello, @joaoasrosa .
As the following screenshot of Notepad++ Plugin Manager shows,
the minor version is different (1.5 installed, 1.6 is the new version),
but the build number (0.54) is the same.
By any chance, is there a typo error in some file regarding the version,
that makes the Plugin Manager think that there is a new version "1.6",
when in fact, after updating, the version still remains at 1.5?
(Because this is what's happening to me: the installed version remains at 1.5, even after I did the update)
Thanks, in advance.

The 64 bit dll file version is <IP_ADDRESS> but the version listed in the update manifest is <IP_ADDRESS>.  This is why it looks like there is still an update, even though you have the current version.

Releasing a new version at the time.
Enhanced the build process, which causes the problem.
Closing the issue for the release.
Thanks for the support!

So, now, 29th April 23:30, I tried to update the plugin, and the error still occurs.
I'm using Windows 7 Home Premium SP1 64-bit, and the rest is in the following images
(error, version of plugin manager, version of Notepad++)

Meanwhile, I'm going to send a message to Notepad++'s author,
because a user should be able to remove an installed plugin
which appears in the Updates section of the Plugin Manager...
...As you can see in the screenshot, there is no button to remove the installation of the plugin
(to try and re-install it in a clean way, instead of updating it)

Issue created in
Plugin Manager - Updates section tab without Remove button
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/4464

Hi @cmfaustino
During today I wasn't unable to update the plugin via Plugin Manager. Apparently, they didn't refresh the database.
Thanks for raising it with the authors of Notepad++.

The plugin manager, it seems, is separate from notepad++, so, it is in a different repository:
https://github.com/bruderstein/nppPluginManager/issues/107

See pluginmanager issue. Should be solved with next PM plugin list update also for 32bit.


Can someone test this on 3.12?

Rename Master 3.12 is out. I tried to push a package, but my VirtualMachine setup is gone. I tried for 2 hours to get a new setup, mapping directories, to my original ketarin db and stuff, but I cannot get it to work and I am quite simply out of time.
I just used git from linux to push this to a new branch, and I am hoping that someone can check this out.

Offtopic: Actually 3 hours went by. We could really use a vagrant box that does all this stuff, including setting up a share to /tmp, and cloning the repo there, so git is already using the setup from the host.
On the other hand, how many of you are making this complicated like me by not using Windows?


TileAvailability updated with Check

Worked on issue #4794, TileAvailability updated to include Check.

Looks good! @pjcozzi I should have checked, but are DeveloperErrors that throw a long, descriptive message not supposed to be replaced with Check?

We might just want to close this one; the semantics are different than how we usually use Check.defined.
This isn't to check if the parameter is just defined; this checks if it exists in a data structure.  If we really wanted to save a few key stokes for these cases we could add an override of one form or another for Check.defined but I do not think it is worth it.


Fix CBR link and use HTTPS where it possible

Fix Central Bank of Russia title and link. Additionally use HTTPS where it possible.

Thanks :)


Math jax does not render on mac el capitan

The titles say it.

@sivi29y I think some more information would be very useful: wich version of MathJax are you using, which browsers are effected (versions!), which behavior are you expecting and what is happing instead. Maybe you can link a plunkr as well.

Please checkout https://github.com/mathjax/MathJax/blob/master/CONTRIBUTING.md for some guidance on writing a bug report.


solar irradiance model

Module that tracks the position of the sun for a given location and time and calculates the solar irradiance.

@rubenbaetens I have changed the methods so they all take SI-units as in and outputs

Perfect, that avoids possible confusion.

@rubenbaetens @saroele I have added a model that simulates ideal PV installations

Productive evening jan :-)
As we have a PV expert on board, maybe @kdebrab can have a look?

Don't worry about the Travis CI error: I did not yet configure it, just created an account and added opengrid. I have to dig in further in the coming days.

@kdebrab ga je hier naar kunnen kijken? We werken het best af in deze branch voor we mergen in de develop. Alvast bedankt

Some ex-colleagues from KU Leuven have created a similar script for getting solar radiation (diffuse and direct components) from cloud cover only.  @Ryton took initiative to ask them permission to use their code in opengrid.  If they agree I propose to compare both approaches and come to a single solution.

KU Leuven colleagues agreed to use their code and include it or rework it into opengrid.
Lets put this on the agenda for next meeting.


Discussion: Simplify deployment for packaged app that not in store

Discussion: Simplify deployment for packaged app that not in store

Currently, to deploy a UWP app that you don't want to publish to ms store for whatever reason, you need to deliver the certificate to the end-user, the end-user needs to enable developer mode, install the certificate then install the actual app. or use the PowerShell script, it's a bit more complicate for the end-user, and it will deliver multiple files to the end-user.
I think it would be better to have just one install package file and just "click -> install -> run" without dealing with the certificate and other things. Just like Android's APK file, it does obtain a signature but the end-user will never notice that.

Yes please. That pain when client says "just send me the .exe" and you have to explain why is it more complicated than it was 10 years ago...

Do you have more information on the certificate you are using?  Anything that we can verify authenticity does not require extra steps.  Adding a certificate is usually only required for enterprises when they are using their own root, but usually deploy in mass to their devices.  If you are using a self signed certificate that offers not authenticity and is basically equivalent to not signing code.
If the issue is the type of signing certificate we plan on launching a preview of the Azure Trust Service this summer.  The goal is to reduce the friction in signing flows for developers.  The first part of this presentation covers the plans for code signing. MSIX Build

starting in the May 2020 update (2004) the sideloading setting has been removed and apps can be installed from any source similar to other installer techs

Great to hear that:)
Just clarify that it's not the problem of the certificate, it's the installation process that makes the end-user a little bit confused, they usually ask why can't just open a single installation file and click install then everything is good to go, just like what they used to.
For example, currently, when you create an app package for a UWP app with sideloading, you need a certificate, after build finish, there will be a folder that contains the app with files like *.msixbundle, Install.ps1, *.cer and some subfolder. You will need to deliver the whole folder to the end-user and tell them to run Install.ps1 to install the app. Or you will need to tell the user how to install *.cer file first like this
This is much more complex than the "traditional" way like the installation process of vscode, you just have to download a single file, open it, install it, and everything is good to go.

you are using a self signed certificate that offers not authenticity and is basically equivalent to not signing code. If the issue is the type of signing certificate we plan on launching a preview of the Azure Trust Service this summer. The goal is to reduce the friction in signing flows for developers.

@jvintzel  it was supposed to be launched last summer right?    open source developers are in need of this very service. can we now expect an answer please     since it's already past 1 year?

it's a bit more complicate for the end-user

It's not a "bit" more complicated. This is an absolute showstopper for many deployment scenarios and invalidates an entire family of new MS tech that would otherwise be appropriate if it didn't essentially force MSIX.

Can you elaborate on why you think this is a showstopper? I don't see any difference here from traditional software rollout.

It seems a lot of friction here revolves around the distribution and installation of self signed packages. This is not normal, and not something you should be doing beyond development/test.

This is not normal, and not something you should be doing beyond development/test.

Making a regular MSI without any of the ceremony is normal, works out of the box, and doesn't require buying (management is happy) or juggling certificates (devs are happy).
I understand the reasoning behind all this signature business, but it doesn't work in practice. It's a showstopper because the friction is too much and makes ignoring msix the straightforward choice. Don't use it and everything works again out of the box for everyone. Why bother with this new thing with no immediate and clear benefits but plenty of drawbacks?

I understand the reasoning behind all this signature business, but it doesn't work in practice.

do tell what works then ? making everything free ? you aware that "FrEe SoFtWaRe FoUnDaTiOn Cult "   also runs on sucking donations/money right ?
Advice : I understand the frustration but making everything free is not the way the world works. Nothing is free is in this world. Instead  You could've asked to make certificates prices affordable for indie devs.

Don't use it and everything works again out of the box for everyone.

as you seem to figure it out, keep using MSI then.

Why bother with this new thing

why bothering here in the first place ? to vent ?

I understand the reasoning behind all this signature business, but it doesn't work in practice.

do tell what works then ? making everything free ? you aware that "FrEe SoFtWaRe FoUnDaTiOn Cult "   also runs on sucking donations/money right ?
Advice : I understand the frustration but making everything free is not the way the world works. Nothing is free is in this world. Instead  You could've asked to make certificates prices affordable for indie devs.

Don't use it and everything works again out of the box for everyone.

as you seem to figure it out, keep using MSI then.

Why bother with this new thing

why bothering here in the first place ? to vent ?

that is why now some people must suffer where they didn't use to?


Statically link to the C runtime in MSVC

Description of the change
Javy version 1.4.0 statically linked to the C runtime. Such version was built with Rust 1.75.
Javy version 2.0.0, built with Rust 1.79.0, which doesn't perform static linking by default.
Checklist

[x] I've updated the relevant CHANGELOG files if necessary. Changes to javy-cli and javy-core do not require updating CHANGELOG files.
[x] I've updated the relevant crate versions if necessary. Versioning policy for library crates
[x] I've updated documentation including crate documentation if necessary.

Testing
The best way to test this change at this time is to download the Windows executable available in my fork and make sure that it runs correctly e.g. javy --version.
I considered adding a CI step, but unfortunately there are several considerations:

All Windows runners are pre-provisioned with Visual C++, and apparently: (i) there's no way to uninstall it (ii) there's no way to configure GitHub Actions to provide a fresh runner, without any dependencies. Additionally the GitHub Actions team is not planning on supporting this feature.. The recommended way to modify Windows runners is through Chocolatey, but as far as I investigated, it can't be used uninstall Visual C++ (not surprising).
The recommended approach, as per the link in the previous point is to introduce a custom runner. Which we could adopt if we wanted to, and if we do, my suggestion would be to do it a follow up PR. But generally speaking, the change in this PR are probably enough. If this issue were to happen again, there's a very easy fix that users can apply, which is installing Visual C++.


Add README Chinese document.

Add Chinese document: README_CN.md
Checklist

[ ] I have added a changelog entry describing my changes.

English is not my native language; please excuse typing errors.
Adding Chinese README documentation doesn't seem to be part of any extention changes, So I didn't add a new entry to the  CHANGELOG 😂

I can't review this but ping @Jayxiang which is one of our long time contributors that could review.

          1 Message

:book:
Thank you for submitting a pull request to SwifterSwift. The team will review your submission as soon as possible.

  Generated by :no_entry_sign: Danger


Automatic generation/sourcing of the C code?

Each time I copy some code from wlroots to ffi_build.py I think, wouldn't it be nice if ffi_build.py could find the code that is accessed at lib.<something> and take it directly from wlroots.
Do you think this is feasible? This could save a lot of work overall, though I'd have no clue where to start.

Yeah, with this approach it'd be good even to test basic things like a function does what it says. If the Python code was also autogenerated then they would always be synchronised. It'd be cool if we can get a github action that responds to wlroots' releases and triggers a new release so that packages get regenerated with the new wlroots.

If we had a bit more tests in place, this might be good to do, but I'd worry about missing breaking changes otherwise.

The thing with this concern is that it is already there. Once the next wlroots release is out we'll have to manually go through and update the CDEF and corresponding Python interface anyway, so this would remove the need for the former (and autogeneration of the Python removes the need for the latter too). I kinda see this as "end game" for this kind of cffi module.

It doesn't look like those xml files are installed by wlroots, but copying in the xml files should be easier to maintain than also having to generate the header.

Yeah agreed.
A pretty cool real-world example:  https://github.com/nanomsg/nnpy/blob/master/generate.py. These guys seem to scrape the source header files to generate their CDEF.

I had a play around with this with limited success. The ffi_build.py is below.
Installed wlroots headers have some macros that need expanding before cffi gets them, so I added a preprocessor step using distutils, which actually worked quite well.
The next issue I came across was that cffi wants some types to be defined already, and because wlroots interfaces with many other libraries (e.g. XCB, EGL), some of these need to be declared even if we don't want to pull in those headers. I didn't find a nice way to do this so I just prepend these to the CDEF string to type them, which cffi seems to be happy about. This also worked quite well, but requires hard-coding of these types in the script and therefore changes to these across wlroots releases. This is straightforward to do; the script fails when a missing type can't be parsed, then it's a matter of identifying what it's like and adding it into the script. It's not very elegant, but tbh it's something required by pywlroots anyway if it uses any non-wlroots types (e.g. currently some pixman types are defined).
Another issue has appeared though I do not have a solution for it. Compilation gives me this error:
NotImplementedError: enum wlr_axis_source: the '{}' declaration should appear on the first time the enum is mentioned, not later

However defining enum wlr_axis_source at the very top of CDEF doesn't seem to make a different so I'm not sure if it's as simple as making sure that headers are ordered so that types are defined before their usage.
Anyway that's where I'm up to. It's been a bit tedious and I've hit a dead end so I'm gonna give up on this for a bit. It also makes me wonder: is it worth it? This approach would expose all of wlroots in pywlroots. Is that a good thing? Many parts should be added, sure, but maybe many other parts may never be needed. I don't know.
import tempfile
from distutils.ccompiler import new_compiler
from pathlib import Path

from cffi import FFI
from pywayland.ffi_build import ffi_builder as pywayland_ffi
from xkbcommon.ffi_build import ffibuilder as xkb_ffi

include_dir = (Path(__file__).parent.parent / "include").resolve()
assert include_dir.is_dir(), f"missing {include_dir}"
include_dirs = ["/usr/include/pixman-1", include_dir]

wlr = Path("/usr/include/wlr")
assert wlr.exists()
headers = list(wlr.glob("**/*.h"))

SOURCE = "\n".join(f'#include <{header.as_posix()}>' for header in headers)

SOURCE += """
#include <xkbcommon/xkbcommon.h>
#include <xkbcommon/xkbcommon-keysyms.h>
#include <xkbcommon/xkbcommon-compose.h>

struct wl_listener_container {
    void *handle;
    struct wl_listener destroy_listener;
};

typedef void (*wrapped_log_func_t)(enum wlr_log_importance importance, const char *log_str);

wrapped_log_func_t py_callback = NULL;

void wrapped_log_callback(enum wlr_log_importance importance, const char *fmt, va_list args)
{
    char formatted_str[4096];
    vsnprintf(formatted_str, 4096, fmt, args);
    py_callback(importance, formatted_str);
}

void wrapped_log_init(enum wlr_log_importance verbosity, wrapped_log_func_t callback)
{
    if (callback == NULL)
    {
        wlr_log_init(verbosity, NULL);
    }
    else
    {
        py_callback = callback;
        wlr_log_init(verbosity, wrapped_log_callback);
    }
}
"""

VERSION = """
#define WLR_VERSION_MAJOR ...
#define WLR_VERSION_MINOR ...
#define WLR_VERSION_MICRO ...
"""

def gen_cdef():
    """
    Read wlroots headers from system.

    Adapted from nanomsg/nnpy
    """
    BLOCKS = {'{': '}', '(': ')'}
    IGNORED = ["log.h"]

    # We want to put wlr/types first
    TYPES = [p for p in headers if "wlr/types/" in p.as_posix()]
    ordered = TYPES + [p for p in headers if p not in TYPES]

    lines = []
    for header in ordered:
        if header.name in IGNORED:
            continue

        with header.open("r") as fd:
            cont = ''
            for ln in fd.readlines():
                if not ln.strip():
                    continue

                if cont == ',':
                    lines.append(ln)
                    cont = ''
                    continue
                if cont in BLOCKS:
                    lines.append(ln)
                    if BLOCKS[cont] in ln:
                        cont = ''
                    continue

                if ln.startswith('#include'):
                    continue

                lines.append(ln)
                cont = ln.strip()[-1]

    return "".join(lines)

def preprocess_cdef(cdef):
    """
    Preprocess headers to expand macros.
    """
    with tempfile.TemporaryDirectory() as name:
        temp = Path(name)
        pre = temp / "pre.c"
        post = temp / "post.c"

        with pre.open('w') as fd:
            fd.write(cdef)

        compiler = new_compiler(verbose=1)
        compiler.preprocessor = ["cc", "-E"]
        compiler.preprocess(
            pre.as_posix(),
            post.as_posix(),
            macros=[('WLR_USE_UNSTABLE', 1)],
            include_dirs=include_dirs,
        )

        with post.open('r') as fd:
            cdef_expanded = [
                line for line in fd.readlines() if not line.startswith('#')
            ]

        return '\n'.join(cdef_expanded)

def prepend_types(cdef):
    """
    Some types must be declared inside CDEF so we can stick skeleton definitions for
    those at the start.
    """
    ints = [
        'clockid_t',
        'pid_t',
        'time_t',
        'xcb_pixmap_t',
        'xcb_window_t',
        'xcb_atom_t',
        'EGLenum',
        'GLenum',
        'GLuint',
        'dev_t',
    ]
    prefix = "\n".join(f"typedef int {i};" for i in ints)

    prefix += """\nenum wlr_axis_source {
    ...;
};\n"""

    structs = [
        'xcb_generic_event_t',
        'pixman_region32_t',
        'pixman_box32_t',
    ]
    for s in structs:
        struct_name = s[:-2]  # without the _t suffix
        prefix += "struct %s { ...; };\n" % struct_name
        prefix += "typedef struct %s %s;\n" % (struct_name, s)

    voids = [
        "EGLDisplay",
        "EGLContext",
        "EGLSurface",
        "EGLDeviceEXT",
        "PFNEGLGETPLATFORMDISPLAYEXTPROC",
        "PFNEGLCREATEIMAGEKHRPROC",
	"PFNEGLDESTROYIMAGEKHRPROC",
	"PFNEGLQUERYWAYLANDBUFFERWL",
	"PFNEGLBINDWAYLANDDISPLAYWL",
	"PFNEGLUNBINDWAYLANDDISPLAYWL",
	"PFNEGLQUERYDMABUFFORMATSEXTPROC",
	"PFNEGLQUERYDMABUFMODIFIERSEXTPROC",
	"PFNEGLEXPORTDMABUFIMAGEQUERYMESAPROC",
	"PFNEGLEXPORTDMABUFIMAGEMESAPROC ",
	"PFNEGLDEBUGMESSAGECONTROLKHRPROC",
	"PFNEGLQUERYDISPLAYATTRIBEXTPROC",
	"PFNEGLQUERYDEVICESTRINGEXTPROC",
	"EGLImageKHR",
	"EGLint",
    ]
    prefix += "\n".join(f"typedef void *{v};" for v in voids)

    return VERSION + prefix + cdef

if __name__ == "__main__":
    CDEF = gen_cdef()
    CDEF = preprocess_cdef(CDEF)
    CDEF = prepend_types(CDEF)
    ffi_builder = FFI()
    ffi_builder.set_source(
        "wlroots._ffi",
        SOURCE,
        libraries=["wlroots"],
        define_macros=[("WLR_USE_UNSTABLE", None)],
        include_dirs=include_dirs,
    )
    ffi_builder.include(pywayland_ffi)
    ffi_builder.include(xkb_ffi)
    ffi_builder.cdef(CDEF)
    ffi_builder.compile()

Yeah, this definitely seems like a reasonable thing to try to do. One thing that may be worth considering here is that if there are any breaking changes in the structs or in the function signatures, if we just pull in the headers, then we should always be able to build and compile the cffi module no problem, and we'd have to observe the problems that would come up then at runtime. If we had a bit more tests in place, this might be good to do, but I'd worry about missing breaking changes otherwise.
I would think we should be able to find the header locations through something like pkgconfig if we do want to do something like that.
One thing that would be nice to do would be to autogenerate some of the extra headers (currently we have xdg-shell-protocol.h and wlr-layer-shell-unstable-v1-protocol.h) from the xml files and wayland-scanner, rather than having to build the files and upload them. It doesn't look like those xml files are installed by wlroots, but copying in the xml files should be easier to maintain than also having to generate the header.

I took a look at how zig-wlroots circumvents the same issue. It has a scanner step that takes these extra protocol files as part of it's function signature to generate the relevant code. Maybe we can venture such a path too?
I think pkg-config is the right way to detect where the headers are located.


Missing Storage facade

Winter CMS Build
dev-develop
PHP Version
8.1
Database engine
MySQL/MariaDB
Plugins installed
none
Issue description
Running latest WinterCMS version (dev-develop d5fd520), when calling php artisan winter:util command throw an error :
In WinterUtil.php line 309:   Class "System\Console\Storage" not found
The commit #934 commit is behind this error.
Steps to replicate
Install the latest version of WinterCMS and call one of the commands php artisan winter:util.
Workaround
No response

Confirmed. The referenced PR resolves the issue.


Add missing dependencies to XRSound_dll target

Orbiter.lib and Orbitersdk.lib dependencies not listed for XRSound_dll target.
Can cause build errors.

closed with pull request #98


Presever source directory structure

Is there any way to have gulp-babel preserve the directory structure of output?
I'm using:
var compilePath = 'dist';
gulp.task('babel', function () {
    gulp.src(['js/*.js','js/modules/*', 'js/widgets/*'])
        .pipe(babel())
        .pipe(gulp.dest(compilePath));
});

But that flattens the folder structure and outputs all files to dist. I'd like to have the output preserve the source folder structure so that dist had modules and widgets as sub folders. Is this possible?

Support questions are better asked on Stack Overflow: http://stackoverflow.com/questions/tagged/gulp
This is not relevant to this plugin, but rather a generic gulp question. gulp.src is what decides how the files are structured.


Choices triggers change event only if value of option is not empty

I have dropdown where first option has empty value (in my domain model it means no choice). Choices does not trigger change event if user select this item, but empty value is value too. Is it bug or I missed something?

I have the same issue. Why the Choices doesn't work as a native dropdown in this case?
I have the following structure:
<select>     <option value="">Please Select</option>     <option value="1">Item1</option>     <option value="2">Item2</option> </select>
The change event fires only if I chose any item, but does not fire if I chose the "Please select" option.

Sorry closed this by accident. I think you’re right. I’ll put a fix in for this with the next release.

As a workaround you can listen for the "choice" event instead of "change". This fires with each selection, regardless of the selected value.

Not solved yet?

@tekord This should now be fixed


How to register a new MuJoCo environment

Question
So I'm trying to register a new MuJoCo env to use in gym.make(), by using gym.register(). I've tried following a tutorial here without making any heading. Im working in a notebook (ipynb) with python 3.10.10 on mac 14.3 intel.
My goal is to use the command gym.make("Terrain_scene-v0" ,xml_file="Main_body.xml") where the "Main_body" is a ATV.xml file and be able to change certain elements in "Terrain_scene" with a random seed, specifically size values for asset-> hfield name="terrein" and pos -512 for the Ground geom named "terrain".
<mujoco model="Terrain Scene">
  <compiler autolimits="true"/>

  <!-- ASSETS  -->
  <asset>
    <hfield name="terrain" file="bla.png" ncol="0" nrow="0" size="200 900 2 .9"/>
    <texture type="skybox" builtin="gradient" rgb1="1 1 1" rgb2="1 0.7 0.2" width="512" height="512"/>
    <texture name="hfield texture"type="2d" builtin="gradient" rgb1="1 1 1" rgb2="1 0.7 0.2" width="512" height="512"/>
    <material name="hfield material" texture="hfield texture"  reflectance=".2"/>
  </asset>

  <!-- VISUALS  -->
  <visual>
    <rgba fog="1 0.7 .3 1" haze="0.85 0.25 0.35 1" contactpoint="0.9 0.6 0.2 1" contactforce="0.9 0.2 0.2 0.6" />
    <quality shadowsize="4096"/>
    <map stiffness="700" shadowscale="0.5" fogstart="10" fogend="15" zfar="40"  haze="0.1" force="0.1" alpha="0.3"/>
    <!--Slow motion mode, 1=real time, måste vara större än 0. -->
    <global realtime="1"/>
  </visual>

  <!-- WORLD BODIES  -->
  <worldbody>
    <!-- Ground-->
    <geom name="terrain" type="hfield" hfield="terrain" rgba=".3 .3 .3 1" friction="1 1 0.1" pos="0 -512 -.01" material= "hfield material" />
    <!-- World Lights  -->
    <light directional="true" diffuse=".5 .5 .5" specular="0.1 0.1 0.1" pos="0 0 5.0" dir="0 0 -1" castshadow="false"/>
    <light directional="true" diffuse=".6 .6 .6" specular="0.2 0.2 0.2" pos="0 0 4" dir="0 0 -1"/>
  </worldbody>

</mujoco>

What I woud like help with is understand how to build the structure that is needed for make.register() for a MuJoCo env.
All from the class structure to what exatly the variable entry_point in make.register() actually  looking for.
I have a rough understanding from the Make your own custom environment example. But there are some elements that doesn't translate to mujoco.
Thx

Hey, from what I can tell, these are 4 different questions

how do I create a MujocoEnv
how do I register it
how can I reset_model after initialization of my MujocoEnv
How do I make my environment class "registrable"

Answers:

simply superclass MujocoEnv and implement all abstract functions like reset_model and step
read the tutorial
for now (beginning of the implementation) make reset_model deterministic and change it after you have a minimum viable environment, then you will have to ask the mujoco devs for advice after reading the respective documentation pages
if use superclass MujocoEnv that is all you need to do


two typos in 01_IntelligentPerformance.md for sql2019lab

https://github.com/microsoft/sqlworkshops/blob/rgward/sql2019lab/01_IntelligentPerformance.md
Typo 1: in "1.0 The Solution"
"processing" I think should be capitalized

Typo 2: in "Activity: SQL Server Intelligent Query Processing"
The WideWorldImporters database example was created using SQL Server 2016 which has a default database compatibility level of 130. When a database is restored from a previous version oF SQL Server, the compatibility level of the database is preserved to help reduce the risk of upgrades.

Typo "oF"

@rgward

Fixed in rgward branch


improve how DDC finds its runtime files

From @jmesserly on March 9, 2016 21:2
Right now we do something incredibly hacky:
https://github.com/dart-lang/dev_compiler/blob/4b57101ea760a9f2589da63ac7ca29e4b87dc04f/lib/src/options.dart#L362
I tried to use the Resource package, but it doesn't look like it will work for our use case. Among the problems:

it only offers an asynchronous API
we use the file modification time, which is not accessible
it'd be nice to use directory listing instead of a hard coded list of files
when run from pub global activate, it seems to serve these over http://localhost:some_port

I'm not really seeing a path forward there.
One way around the resources issue is to have a the precompiled JS be bundled into constant data (raw strings) in a Dart file. Ugly, but that would make the string contents accessible (synchronously, and we could include the folder listing/timestamps).
Copied from original issue: dart-lang/dev_compiler#477

From @devoncarew on March 17, 2016 23:45
I've used the constant string technique in stagehand. It does work, but that's about the best you can say about it.
You could also recognize that you're running in a pub global activate context, and load your resources out of the .pub-cache. The https://pub.dartlang.org/packages/pub_cache package gives you an API to introspect the pub cache -

oops, actually this will be fixed by putting the precompiled JS in the SDK. Closing this because we already have another issue for that.


[Security Vulnerability] loader-utils 2.0.0 is deprecated,

Nexus iq server found Security Vulnerability CVE-2022-37601.
We need migrate loader-utils to 3 version.
could you please give a suggestion a webpack version to fit it?

Not related to webpack, please open an issue in projects where loader-utils@2 used - need to migrate on v3 (and avoid to using v3, because webpack v5 have almost all API)

hey @alexander-akait, I'm confused, yarn why loader-utils reports webpack as one of the packages that depend on this, am I missing something?

we depend on
"webpack": "^4.46.0",
"webpack-cli": "^3.3.12"