Expose request_focus on WidgetPod

It can be extremely useful to give a widget focus when instancing it. This patch allows that by exposing request_focus on WidgetPod. It was required to change Window's behavior to handle focus requests after dispatching WidgetAdded if prompted to do so by a children_changed call otherwise the subject widget would be marked as focused according to ctx.is_focused() but would not get keyboard events (in addition to the logged warning).

sorry, just explain it to me like I'm five... what's the use case here? When a container creates a child, and wants that child to get focus?

Also please feel free to open a thread on zulip or leave a comment in druid-chatter if something is waiting for review, it's easy to lose sight of the review queue these days 😬

what's the use case here? When a container creates a child, and wants that child to get focus?

Yes, among other potential usage cases. Say you have a complex search panel widget which houses a textbox, flex of entries, ect. When you construct it you would want it to auto-focus the textbox. With this patch you can pass the event ctx to the new fn and let it give its textbox focus. In fact this is the very usage case that drove the implementation of this patch which I have been using for the past few days. This is a bit clunky in the case of initial UI construction where that parameter would have to become optional and yada yada, more mess.
The one alternative I can think of would be to pass a command down to the widget to have it request focus which is fairly reasonable when you control the implementation of the widget such as I do with my custom text edit widget but if the widget is coming from Druid itself or some other library then the situation is markedly more painful.
Something to note is that in some specific situations, the widget automatically grabbing focus by itself on WidgetAdded might be a reasonable solution but this covers only a very specific set of cases and is also limited to which widgets you have source control over. Of course there is the fact that LifeCycleCtx does not expose request_focus but that is a separate issue that I also intend to propose exposing in a separate PR. (Requesting focus on WindowConnected in event works for widgets constructed during initial UI setup but not for dynamically added widgets)
If anyone has a nicer potential solution please do throw it out, especially if it cleans up the messiness around construction during initial UI setup vs in response to an event. I remain open to the possibility that there might be an existing mechanism that can already handle this, if so that would be great.

Also please feel free to open a thread on zulip or leave a comment in druid-chatter if something is waiting for review, it's easy to lose sight of the review queue these days

I would if it sat for a week or two :) I don't like to shout for attention on PRs unless it really is about to slip through the cracks, especially as I personally don't do to many reviews myself.

Okay, so thoughts on this:
To me, the preferred way of handling this would be some sort of simple controller widget that wraps the text field and handles requesting focus. Another viable option would be to have a method that lets you request focus for a specific widget, using its widget id.
A bigger issue, I think, is just that the whole focus system needs some more thought and work. There is #1089, which was an ambitious attempt to change how focus works, but i'm not fully convinced by that approach; however one thing it does offer is a mechanism for setting which widget gets initial focus.
Here, I think my main hesitation is about reaching down into the widget pod to ask it to change some state. This isn't something we really do anywhere else, and so I'm reluctant to add API that introduces a new pattern unless there's really no easy way to achieve this otherwise, and I think a simple TakeFocus controller would be a reasonable alternative, and I could also definitely imagine a EventCtx::set_focus method that lets you pass an explicit WidgetId.

That sounds like a reasonable path forward while using current Druid idioms which is generally a good thing to try to do :+1: All that's missing at the moment is the ability for a widget to request focus on WidgetAdded so I'm going to go poke at that. There may be blockers on doing that similar to the changes that this patch required, I'll see when I try.

@ForLoveOfCats I think that #1480 might be a good way to make working with WidgetAdded much easier.


SCN vs. sh for gradients

There seems to be two ways to describe a gradient in PDF, either the PDF 1.2 SCN/scn method that sets a Pattern Type 2 as a gradient, or the sh command that directly links to a shading object.
The big difference is that SCN/scn can be used in strokes and fill, while sh is only available for fill, making it much more limited.
Do you know which capypdf is currently supporting?

sh seems to be the only supported one. I have not done proper SCN/scn support, probably because I did not have pattern support available at all at the time. That needs to be added.

You can see the kind of construction from this cairo output:  test-sf-grad.pdf
So constructing a pattern from a shading object is going to be pretty critical, because I'll also need to construct soft masks for transparencies and trying to layer a individual transparency groups with soft masks is going to be a real PITA. But if I can SCN/scn the gradient, then the transparency will just mirror that same structure without extra groups.

Yes, that is definitely a thing that should be supported. However I will most likely be unable to work on that until next week.

Looking at the code, I can see patterns are handled differently from other objects and are constructed in-stream from the given draw context.
If the same code pattern is used we might end up with:
rvoe<CapyPDF_PatternId> PdfDocument::add_pattern(PdfShading sh, double a, double b, double c, double d, double e, double f) {
  std::string shading_commands = serialise_shading(sh);
      auto pattern_dict = std::format(R"(<<
    /Type /Pattern
    /PatternType 2
    /Matrix {:f} {:f} {:f} {:f} {:f} {:f}
>>
)", a, b, c, d, e, f);

  return CapyPDF_PatternId{
          add_object(FullPDFObject{std::move(pattern_dict), std::string(shading_commands)})};
}

The refactoring needed, would be:

Making serialise_shading do the switch between each of the shading type variants
Make it return the shading dictionary without adding it as a Gfx reource object
Refactor add_shading so it just calls serialise_shading and adds the shading object itself.

Before I do any of this work, I'd like your input @jpakkane

I created an MR for the refactoring work so you can see what it looks like in situ
https://github.com/jpakkane/capypdf/pull/46/files

This makes sense. I suspect you want to upgrade the Pattern to a full fat object so a matrix or other settings can be applied.
I feel like I've run this up to the line of what you find comfortable me contributing. So I'll leave this with you can work on something else for now.
I did work out how to do reflection and repeat gradient patterns though. So many things to test!


Update Item Height After RenderItem

I use react-list for chatting app. Item height can only be measure during RenderItem(). I use react-measure to measure the height of each item and save the height back to a global array with index.
After reading through the react-list code, I guess the height measurement is invoked before render()?  In my chatting app, React-list will always left a huge amount of empty space at the bottom of the list, I'm wondering maybe it's caused by wrong height of each item. Is there a callback available to update item height after render each item?

Please reproduce the issue in a jsfiddle/codepen. The issue will depend on several factors, including the props your passing in, your DOM structure, your CSS, etc. It's easiest to debug when I can see an example.

@caseywebdev, Ok, I will try to reproduce it in jsfiddle or codepen, but it will take some time.


Add a confirmation banner when stream is created

To make it more clear that a stream was created successfully, and make it easy to navigate to the new stream, we should add the following confirmation banner. The stream name links to the stream.

Stream #stream name created!

Placing it just below the tab in the right panel is probably good.

CZO thread

@sahil839 is this a quick one for you? It would be nice to just get it done if so.


Longruns SSP: Use max_newton_iters 3

This PR uses --max_newton_iters 3 for the SSP longrun tests. This guarantees that we have stable results for moist BW for dt=300secs and for moist HS and moist aquaplanet with dt=100secs.
It was tested and produced stable results and plots (see this build), with a better SYPD rate than the current setup (which was unstable) (see Issues #1490 and #1441 ).
Components

It raises --max_newton_iters to 3 for the SSP tests with limiters
It removes the --apply_limiter false option. I don't think the tests without limiters are necessary to keep (they are not our target). They were there initially just to compare results with/without limiters.
It raises the slurm_time because the moist SSP aquaplanet run may take longer than the current slurm_time (the other tests cases don't).

Review checklist
I have:

followed the codebase contribution guide: https://clima.github.io/ClimateMachine.jl/latest/Contributing/
followed the style guide: https://clima.github.io/ClimateMachine.jl/latest/DevDocs/CodeStyle/
followed the documentation policy: https://github.com/CliMA/policies/wiki/Documentation-Policy
checked that this PR does not duplicate an open PR.

In the Content, I have included

relevant unit tests, and integration tests,

appropriate docstrings on all functions, structs, and modules, and included relevant documentation.

[x] I have read and checked the items on the review checklist.

Looks good!
BTW, do you have plots for the three simulations here? If you only have hdf5, following the second command will give you remapped netcdf files, and 3rd command will give you the plots we'd like to see for the longruns.

Looks good!
BTW, do you have plots for the three simulations here? If you only have hdf5, following the second command will give you remapped netcdf files, and 3rd command will give you the plots we'd like to see for the longruns.

Oh yes, I have them all.

SSP moist BW with limiter:

mean u-sigma:

mean u-height:

mean qt-sigma:

mean qt-height:

SSP moist HS with limiter (without first 200-days spinup time):

mean u-sigma:

mean u-height:

mean qt-sigma:

mean  qt-height:

SSP moist aquaplanet clearsky radiation with limiter (without first 200-days spinup time):

mean u-sigma:

mean u-height:

mean qt-sigma:

mean qt-height:

looks good to me. Thanks!

bors r+


[BUG]

Describe the bug
A clear and concise description of what the bug is.
E.g: The '...' label shows nothing.
To Reproduce
Steps to reproduce the bug:
I dont know how i got it and is it just my browser
Expected behavior
to load the buttons
Additional context
in the screenshot it shows what happens

Hello,
Thanks for reporting the bug.
It should be fixed in the latest version :)

I closed the issue because there was no reply and the problem has been fixed.


inference_paired.py produces Error: AttributeError: 'AutoencoderKL' object has no attribute 'add_adapter'

Hello I am trying to run the inference_paired.py file on Windows, I have installed Diffusers==0.27.2 but there appears to be a missing function:
python inference_paired.py --model_name "edge_to_image"   --input_image "C:\Users\Stanford\Desktop\Img2Img\assets\examples\bird.png"  --prompt "a blue bird"  --output_dir "outputs"
Traceback (most recent call last):
  File "C:\Users\Stanford\Desktop\Img2Img\src\inference_paired.py", line 29, in <module>
    model = Pix2Pix_Turbo(pretrained_name=args.model_name, pretrained_path=args.model_path)
  File "C:\Users\Stanford\Desktop\Img2Img\src\pix2pix_turbo.py", line 69, in __init__
    vae.add_adapter(vae_lora_config, adapter_name="vae_skip")
  File "c:\Python39\lib\site-packages\diffusers\models\modeling_utils.py", line 218, in __getattr__
    return super().__getattr__(name)
  File "c:\Python39\lib\site-packages\torch\nn\modules\module.py", line 1704, in __getattr__
    raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
AttributeError: 'AutoencoderKL' object has no attribute 'add_adapter'

Is this a bug? Which version of Diffusers is img2img-turbo expecting?
Thanks

Solved by installing a earlier version of Diffusers
pip install diffusers==0.25.1


NEP-18: fix() with CuPy array depends on array_wrap

Calling dask.array.fix() on a Dask array created from a CuPy array fails as it depends on unimplemented __array_wrap__ from CuPy. There's an issue open to add that feature to CuPy https://github.com/cupy/cupy/issues/589.
@mrocklin

FWIW raised issue ( https://github.com/numpy/numpy/issues/13100 ) to see if fix and a few other functions could be converted to ufuncs, which would be one way to solve this. Please feel free to join the discussion over there if it is of interest.

Thanks @jakirkham, I've subscribed for notifications, I'll join if I can help with something. :)

Just in case it is needed, here's a workaround.
np.where(a < 0, np.ceil(a), np.floor(a))

CuPy does implement where, which could be dispatched to via NEP 18. Also ceil and floor are both ufuncs, which already dispatch through the __array_ufunc__ protocol.

Closing this, since #4708 was merged already.


Add support for some new WASI targets:

wasm32-wasi-preview1
wasm32-wasi-preview2
wasm32-wasi-preview1-threads

Gentle ping. https://github.com/rust-lang/miri/issues/722#issuecomment-1911016180 needs this to compile cg_clif for wasm32-wasi-preview1-threads.

Following this discussion, we should change these names to wasm32-wasip1 and wasm32-wasip2.

Oops yes, updated now!

This is now released in target-lexicon 0.12.14.


[Bug]: Fix warnings in test suite

What happened?
There are two regridding tests and an open_dataset test that are producing warnings.
https://github.com/xCDAT/xcdat/runs/7049011115?check_suite_focus=true#step:7:23

[=============================== warnings summary ===============================
tests/test_dataset.py::TestOpenDataset::test_non_cf_compliant_time_is_not_decoded
  /usr/share/miniconda/envs/xcdat_ci/lib/python3.10/site-packages/xarray/backends/plugins.py:98: DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.
    entrypoints = entry_points().get("xarray.backends", ())

tests/test_regrid.py::TestRegrid2Regridder::test_output_bounds
tests/test_regrid.py::TestAccessor::test_convenience_methods
  /home/runner/work/xcdat/xcdat/xcdat/regridder/regrid2.py:233: RuntimeWarning: invalid value encountered in true_divide
    np.multiply(input_lon_segment, dot_weight).sum(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html](https://github.com/xCDAT/xcdat/runs/7049011115?check_suite_focus=true)

What did you expect to happen?
No warnings in test suite.
Minimal Complete Verifiable Example
No response
Relevant log output
No response
Anything else we need to know?
No response
Environment
xcdat main branch

@tomvothecoder I'll take a look at this.

The first warning as been resolved in the latest xarray release (https://github.com/pydata/xarray/issues/6514).
[=============================== warnings summary ===============================
tests/test_dataset.py::TestOpenDataset::test_non_cf_compliant_time_is_not_decoded
  /usr/share/miniconda/envs/xcdat_ci/lib/python3.10/site-packages/xarray/backends/plugins.py:98: DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.
    entrypoints = entry_points().get("xarray.backends", ())

I'm adding a filter for the two others as they are safe to ignore.


Fix Chinese translation for playlist downloader and add Chinese translation for the installer

that's it.

Was the Chinese translation wrong? I see that you changed most of it

Because most of it are bot translate

Fixed accident remove qwq


codegen: Only call setter in constructors if value is not derivedFrom

Fixes this bug: https://gist.github.com/otaviopace/8406cb39644d2e7678570d1e7f50dac4#gistcomment-3878941
This is because derivedFrom fields only exist in query time.
Before this commit, developers would get an error similar to this:
field `nftsOwned` is derived and can not be set

Codegen before:

And after the change:

This PR doesn't contain automated tests because we don't have any for this part of the code yet.
This will be addressed later in a future PR.


Just some random questions bcuz im noob (not a bug or anything)

Hello, i'd like to make a bot (like karuta) just for fun like, for me and my friends, i'd like to make a view command how can i do that, also would you happen to know how to make it so i can add more than 20 cards in cards db, how can i add a print system to the drop system (i'd really love to do a print system), and btw how do i make it so ppl can have multiple of the same cards in their collection ?
how did you make the frame, sorry if thats a lot of question 😿
last question if u can help me with lookup system, wishlist, inventory, or trade
if you'd like to answer on disc: By_Redox#7785

Hi, first of all, thanks for the question, I'm working on the bot to make it better, faster, (stronger) and more accessible in terms of coding.
I will be pretty happy to help you in the making of it, so if you have any doubts contact me on discord: Nessuno#4792
Ok, so:

First of all, there is already a function to view a specific card, that has been first forked, then added to the main project.
The command is -viewcard id, where the "-" is the prefix that you have chosen on your configuration file, and the id is the identification number of the card.

Second, you can already add more than 20 cards to the database, for how is structured the bot at the moment may be a bit slower than normal with a number of over 50-100 cards, but if something like that happens tell me so that I can work on optimizing it.

For the print system on the drop, what do you mean? If it's about seeing the card you have dropped, there is already something like that in the bot, so you can try to study it. If you want I can give you the exact lines of code where to search for that function.

For the multiple cards, I have not worked on it, because I think it's a pretty useless thing, but if you want to do that so that then you can fork the project, I will be happy to help!

The frame is built using the cardcreator.py bot, which adds the info of the card to the database too: it's a little buggy as now, but I will try to make it more viable.

The function that you wrote after the first paragraph (wishlist and trade, lookup, and inventory are already there, just read the documentation on the bot when you start it) I'll work on it when I get back from my holiday.
I know that the bot is not receiving a lot of support, but this is because it was mostly a personal project, if I see that multiple people see this bot and use it, working on it and everything, I will try to stay on track.

If this is enough for your questions, please close the thread, else, I'll be here to resolve any of your doubts!
Sergio

For the print system i mean like in karuta, like everytime gojo drop, its print goes up by 1, like first time gojo drop it will be print1, then if it drop again print2, ect ect which makes lower print rare

and thanks for the answer btw!

also about the cardrarity it gives me that error: c!d Command raised an exception: ValueError: invalid literal for int() with base 10: 'cardrarity'
2021-07-28 05:44:55.404437

also i cant seem to find the wishlist, ect command 😿


Hardcoded path

There is a hardcoded path in Simulation.py on line 15, leading to errors.

https://github.com/sryu1/jsbgym
My fork of it has it fixed.


[ZEPPELIN-6026] Zeppelin Websocket code 1006

What is this PR for?
When testing version 0.11.1 I found an unpleasant bug. The system is deployed in the kubernetes environment in conjunction with ha-proxy. Some time after starting work, error 1006 occurs - after which the socket is not created again - only refreshing the page helps. There is no such problem in version 0.10.1.
What type of PR is it?
Bug Fix
Todos
[ZEPPELIN-6026]
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-6026
How should this be tested?
I tested the problem in the k8s environment. With debug mode enabled in the browser. As soon as an error with code 1006 occurs, a new Websocket should be created without refreshing the page.
Screenshots (if appropriate)
Questions:

Does the license files need to update?
no
Is there breaking changes for older versions?
no
Does this needs documentation?
no

I think your IDE is making some automatic changes here. The IDE changes need to be avoided as these can differ between developers.
Only make small changes.

LGTM except for the minor comment

I think your IDE is making some automatic changes here. The IDE changes need to be avoided as these can differ between developers. Only make small changes.

I think your IDE is making some automatic changes here. The IDE changes need to be avoided as these can differ between developers. Only make small changes.

I don't have much experience with npm.
I deleted the package-lock.json file, then changed the version of the package "angular-websocket": "^1.0.13" in package.json, and then ran npm install. There were some warnings about package compatibility, but I noticed that they are also in the versions from the master branch. I ran all the commands in the console, maybe there is another way?

I don't have much experience with npm.

My knowledge is also not really good.
I have modified the package.json as follows.
diff --git a/zeppelin-web/package.json b/zeppelin-web/package.json
index c0044146e..d3de12d17 100644
--- a/zeppelin-web/package.json
+++ b/zeppelin-web/package.json
@@ -40,7 +40,7 @@
     "angular-sanitize": "1.5.7",
     "angular-touch": "1.5.7",
     "angular-ui-ace": "0.2.3",
-    "angular-websocket": "1.1.0",
+    "angular-websocket": "1.0.13",
     "angular-xeditable": "0.1.12",
     "bootstrap": "~3.4.1",
     "bootstrap3-dialog": "~1.35.4",

~1.0.13 means >=1.0.13 <1.1.0-0, so basically version "1.0.14" can be used. Version 1.0.14 looks also good to me. https://github.com/PatrickJS/angular-websocket/compare/v1.0.13...v1.0.14
^1.0.13 means >=1.0.13 < 2.0.0-0, so basically version "1.1.0" can be used, which has the bug.
To generate an updated package-lock.json use npm install inside zeppelin-web module.
It is up to you whether you want to use "~" or enter the exact version.

Before using npm install you should reset the package-lock.json and delete the node_modules folder. This should result in minimal changes in the package-lock.json.

Before using npm install you should reset the package-lock.json and delete the node_modules folder. This should result in minimal changes in the package-lock.json.

in the last commit, i did so

My changes are smaller. I have no idea where this comes from.
https://gist.github.com/Reamer/c076906b65667ed2fa6b4fd5a7039508
@jongyoul
Do we want to merge the pull request like this? I have roughly checked the changes in package-lock.json and have not noticed any major changes.

I'm also not a FE expert so I just know that the package-lock.json is generated by npm and it's based on package.json.
@cherrie-k @Henry-Hong Can you help to verify the file?

It is up to you whether you want to use "~" or enter the exact version.

You can choose to use either “~” or an exact version as @Reamer mentioned, since NPM follows semver.
From what I understand, we need to avoid version 1.1.0 due to the bug, so it doesn’t really matter whether we use “~” or specify the exact version.
However, in my opinion, it might be better to use the exact version like "angular-websocket": "1.0.14".
Most projects in web front-end development typically use ~ or ^, so specifying the exact version could help highlight the issue and provide context for why this particular version was chosen. (If they trying to find why)
So, LGTM 👍

Thank you for checking it @Henry-Hong


[BEAM-9452] Update classgraph to latest version to resolve windows classpath scanning issue

As reported here https://github.com/classgraph/classgraph/issues/388

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

Run Python2_PVR_Flink PreCommit

R: @iemejia @amaliujia

Run Python2_PVR_Flink PreCommit

Run Python2_PVR_Flink PreCommit

Linkage checker says that there is no changes in linkage errors with this update.

LGTM


[Support] Smart Water Timer - Moes SOP10

https://moeshouse.com/en-fr/products/smart-bluetooth-sprinkler-water-timer-with-rain-delay-filter-washer-programmable-irrigation-timer
          "category": "sfkzq",
          "product_id": "nxquc5lb",
          "device_name": "Smart Water Timer",
          "product_model": "SOP10",
          "product_name": "Smart Water Timer"

specifications-properties.json.txt
I could not make it pair with my NUC, but just wanted to share the the tuya spec's

Hi,
In additional to provided information, datapoint IDs are required. Here is an instruction how to obtain it:
https://www.zigbee2mqtt.io/advanced/support-new-devices/03_find_tuya_data_points.html#_9-find-your-data-point
Is the device discovered by the integration, if not it may point to usage Bluetooth Mesh instead of BLE. In this case, adding it to the integration is useless.

Here we go with the datapoint IDs:
{"1":"Valve switch","4":"Fault reporting","7":"Battery level","9":"Accumulated use time","10":"Weather Delay","11":"Irrigation time","12":"Operating status","16":"Cycle timer","17":"Timer"}
Thank you!

Hi,
Do we have any updates on this one?


Examples use links instead of networks

The links directive is legacy, and should not be used: https://docs.docker.com/network/links/. Is there a reason links are being used here? I am using a network with no issue (e.g. "artifactory-network")

Warning: The --link flag is a legacy feature of Docker. It may eventually be removed. Unless you absolutely need to continue using it, we recommend that you use user-defined networks to facilitate communication between two containers instead of using --link. One feature that user-defined networks do not support that you can do with --link is sharing environmental variables between containers. However, you can use other mechanisms such as volumes to share environment variables between containers in a more controlled way.

See Differences between user-defined bridges and the default bridge for some alternatives to using --link.

@mtdeguzis - thanks for the note.
These examples are old, so they still use links.
Do you want to submit a pull request with the suggested improvement?

Due to inactivity am closing this issue.

You closed the issue despite the example not being fixed? Huh? Of course individuals get busy, and while it would/would have been great to get a free PR from an end-user, it is still the responsibility of this repo to correct the example. This is especially true of a vendor-backed code repository.

@mtdeguzis These examples are deprecated and no longer being updated. We do have a new docker-compose that should not have this issue. It is now part of the official JFrog release (https://jfrog.com/download-jfrog-platform/), as opposed to just an example here in GitHub.
Give these a try and we would love to hear any feedback on making them better.

@jfrog-aparicio , due to some requirements, we run this on a VM now. This was from a "past life." Sorry that I can't confirm/contribute to this anymore. My last comment was only to highlight that the issue should still be resolve so folks in the future do not hit any issues. But, as noted, if they are deprecated and noted as so, no need to do anything.


Increased number of node requests when multi-threading enabled

The number of node requests from a single miner using multi-threading can become large.  It may be possible to reduce the number of node queries if miner workers only interact with the database or a master thread.

Now uses remote data server separating data management from mining ops.


Fixes setup.py to include templates

Templates were not being included in the setuptools-bundled version of mythril. This should resolve the problem.

Fixes #169

Weird, I thought I added that already.


Cannot run debugger when App is deployed by another way than from VSCode

This is related to issue #4256
If App is deployed by e.g. powershell, there is no way how to run debugger.
Could you add possibility to run debugger from VSCode without publishing the app first (if it is not there already, I didn't find it)? If I have tooling to publish the app through powershell (because depending apps compilation/publication/unpublication etc.), I cannot debug because I cannot run the debugger just because the app cannot be deployed (see the issue 4256). App is installed and working, but I have no way how to start the debugger because the conflict of scope of the existing app and the publication of the app during starting the debugger...

Am I wrong, but isn't the support for attaching supported for the Fall 2019 release? But not the Spring 2019?

2019 Spring: We added ability to attach to already active web client without having to redeploy
2019 Fall: We added the ability to attach to next session (breakOnNext).
2020 Fall: We added snapshot debugging, and when using that (not normal debugger) also attach to specific session ID or session for user.


build(deps): bump Adaptive card version from  from 1.2.0 to latest

Updating adaptive card version to latest

Hi @Saumyacd, can you make sure your commits are squashed? Seems like one file is part of one commit and the other from the next commit, they should be one change.
Additionally, please make sure tests are passing. These changes are breaking the adaptive cards unit tests.

Sure will work on that


Detect that a site got hacked (having a list of known payloads that are put on hacked websites)

just to be clear, you want to compare it with payloads like, say OWASP Cheat Sheets? like you somewhat scrape the site to see that right?

I am not sure whether OWASP cheat cheets are a good direction. I was rather thinking of detecting victims of e.g. https://www.bleepingcomputer.com/news/security/new-balada-injector-campaign-infects-6-700-wordpress-sites/ or https://github.com/projectdiscovery/nuclei-templates/blob/3fcda12c44c235e09586fd929c37fa60fbe28f71/http/miscellaneous/defacement-detect.yaml#L4

so why not add this nuclei template ?

I think this template has two drawbacks:

it performs a significant number of HTTP requests,
it has a significant risk of FPs (e.g. any occurence of TangoDown causes the template to match).


TF IDF with Morel

Hi, I tried to implement TF-IDF (Term Frequency - Inverse Document Frequency) in Morel, and I almost managed to get it to work.
The formula that is used to compute tf-idf is defined as follows:

tf-idf(t, d) = tf(t, d) * idf(t)

t is a term
d is a document in a document set
idf(t) = log [n/df(t)] + 1 is the inverse document frequency

n is the total number of documents in the document set
df(t) is the document frequency of t

i.e., number of documents containing the term t

tf(t, d) is the term frequency of t in d

i.e., number of occurrences of the term t within the document d

1 is added so that terms which occur in all documents will not be
entirely ignored.

This is the code:
(* Split a string by whitespace *)
fun split s =
    let
        fun split0 [] "" words = words
          | split0 [] word words = word :: words
          | split0 (#" " :: s) "" words = split0 s "" words
          | split0 (#" " :: s) word words = split0 s "" (word :: words)
          | split0 (c :: s) word words = split0 s (word ^ (String.str c)) words
    in
    List.rev (split0 (String.explode s) "" [])
end;

val docs = [
  { name="doc0.txt", text="a a a d b b b c c c" },
  { name="doc1.txt", text="a c c d e f e e i j" },
  { name="doc2.txt", text="e f c d f f i h a j" },
  { name="doc3.txt", text="a i c j e f g h i j" },
  { name="doc4.txt", text="e f j d d f i d d j" },
  { name="doc5.txt", text="b i c i e j g j i g" },
  { name="doc6.txt", text="a a c d b b e e j j" },
  { name="doc7.txt", text="a b j j e f f h i j" }
];

val n = List.length docs;

(* Compute the TF-IDF for all terms in docs *)
from doc in docs, term in split doc.text
yield {doc.name, term}
group name, term compute tf = count
(* Everything above up until this point works great *)
group term compute df = count
(* There are two problems at this point:
    1. `tf` is no longer a field in the record after the second group operation.
    2. We did not filter out duplicate documents when calculating `df`.
*)
yield {name, term, tfidf = tf * (log ((n / df) + 1))};

Is there a way to calculate tf-idf that I might have missed? It would be interesting to see if it was possible. I am unsure, but maybe a unique relational operator is needed to calculate df.

The first problem seems to get solved if I calculate df and tf separately and then join them. Somehow I know it's possible to calculate unique entries with group. The only thing remaining after that is the logarithm function.
val tfs =
    from doc in docs, term in split doc.text
    yield {doc.name, term}
    group name, term compute tf = count;

val dfs =
    from doc in docs, term in split doc.text
    yield {doc.name, term}
    group term compute df = count

val tfidfs =
    from tf in tfs
    join df in dfs on tf.term = df.term
    yield {tf.term, tf.name, tfidf = tf.tf * (n/df.df + 1)};

Thanks for giving Morel a try.
This is an interesting problem, because the different measures require you to group at different granularities. That is hard to do in relational algebra because - using my favorite analogy, the pasta machine - you need to run the pasta through the machine more than once. SQL gives us GROUPING SETS, but it's still hard.
So I settled on an approach that uses correlated functions. Your approach produces collections that could be later joined on the common attributes, but it's basically similar. With some query optimization magic, perhaps both solutions could produce the same physical plan.
Here's my solution:
fun docTerms () =
  let
    val rawDocTerms =
      from doc in docs,
          t in split doc.text
        yield {d = doc.name, t}
    val n = only (from d in docs group compute count)
    fun tf (t, d) =
      only (from dt in rawDocTerms
        where dt.t = t
        andalso dt.d = d
        group compute count)
    fun idf t =
      Math.ln (real n /
        real (only (from r in rawDocTerms
            where r.t = t
            group r.d
            group compute count)))
  in
    from {d, t} in rawDocTerms
      group d, t
      yield {d, t, tf = tf (t, d), idf = idf t}
  end;
val docTerms = fn : unit -> {d:string, idf:real, t:string, tf:int} list

from x in (docTerms ()) where x.d = "doc5.txt";
val it =
  [{d="doc5.txt",idf=0.13353144,t="e",tf=1},
   {d="doc5.txt",idf=0.6931472,t="b",tf=1},
   {d="doc5.txt",idf=0.28768212,t="c",tf=1},
   {d="doc5.txt",idf=0.13353144,t="j",tf=2},
   {d="doc5.txt",idf=0.28768212,t="i",tf=3},
   {d="doc5.txt",idf=1.3862944,t="g",tf=2}]
  : {d:string, idf:real, t:string, tf:int} list

You'll need to use my https://github.com/julianhyde/morel/tree/0088-math branch (work in progress for #88). It includes the Math.ln and Real.fromInt (aka real) functions that I just added. It also includes the use function (to be fixed in #86).
There is potentially also a solution that uses clever aggregate functions over sets, but I didn't have time to write it.

Oops, I missed the '+ 1'. Here is a revised solution that sorts by idf-tf:
fun docTerms () =
  let
    val rawDocTerms =
      from doc in docs,
          t in split doc.text
        yield {d = doc.name, t}
    val n = only (from d in docs group compute count)
    fun tf (t, d) =
      only (from dt in rawDocTerms
        where dt.t = t
        andalso dt.d = d
        group compute count)
    fun df t =
        only (from r in rawDocTerms
            where r.t = t
            group r.d
            group compute count)
    fun idf t = Math.ln (real n / real (df t)) + 1.0
    fun idf_tf (t, d) = (idf t) * real (tf (t, d))
  in
    from {d, t} in rawDocTerms
      group d, t
      yield {d, t, tf = tf (t, d), idf = idf t, idf_tf = idf_tf (t, d)}
  end;
val docTerms = fn
  : unit -> {d:string, idf:real, idf_tf:real, t:string, tf:int} list

from x in (docTerms ())
  where x.t elem ["b", "g"]
  order x.idf_tf desc;
val it =
  [{d="doc0.txt",idf=1.6931472,idf_tf=5.0794415,t="b",tf=3},
   {d="doc5.txt",idf=2.3862944,idf_tf=4.7725887,t="g",tf=2},
   {d="doc6.txt",idf=1.6931472,idf_tf=3.3862944,t="b",tf=2},
   {d="doc3.txt",idf=2.3862944,idf_tf=2.3862944,t="g",tf=1},
   {d="doc5.txt",idf=1.6931472,idf_tf=1.6931472,t="b",tf=1},
   {d="doc7.txt",idf=1.6931472,idf_tf=1.6931472,t="b",tf=1}]
  : {d:string, idf:real, idf_tf:real, t:string, tf:int} list

Thank you, this code is super clean! It is interesting how the relational and functional worlds intersect 🤔
Is the goal for a program like this to execute on a distributed system like Spark or Flink using Calcite, or does Calcite translate the query plan back into Morel? I am also wondering, is there a chance Morel will support data streams?

Yes, absolutely. The goal is to provide a language more powerful than SQL that can be executed as efficiently as SQL, on any system that can execute SQL.
In my StrangeLoop talk, I talk about how Morel can implement WordCount. WordCount is the examplar of data-parallel systems like MapReduce and Spark. Those systems execute DAGs of extended relational algebra (extended with aggregate, table functions, and iteration). Via Calcite we can generate such DAGs.

By the way, the program I have written is a query. The functions, when inlined, become correlated scalar sub-queries. The query is initially correlated and seems to make multiple passes over the data, but those problems can be solved via rewrites. I expect that the relational algebra plan would include Aggregate with multiple grouping sets, but that can be evaluated efficiently in a data parallel system.
Someone could work backwards from that plan to a SQL query that contains GROUP BY ... GROUPING SETS and calls a "split" user-defined scalar function. That query would run efficiently on most modern DBs. But I claim that writing that query would be difficult and error-prone, and the task is much easier in Morel.


Incorrect @babel/runtime version

[x] This is a v1.x issue.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Building files with webpack shouldn't raise @babel/runtime errors
Current Behavior

Described in this react-event-listener issue.
Steps to Reproduce

Link:

Install material-ui v1.5.1
Insert a Button
Build your dist output with webpack

Context

Looking at @material-ui/core packages.json, I see 2 conflicting dependencies:

@babel/runtime 7.0.0-rc.1
react-event-listener 0.6.2 using @babel/runtime 7.0.0-beta.42

These 2 versions of babel runtime are incompatible.
Your Environment

Tech
Version

Material-UI
v1.5.1

React
v16.4.2

I tried debugging this issue, but still unable to resolve it.
Let's take the error:
ERROR in<EMAIL_ADDRESS>Module not found: Error: Can't resolve '@babel/runtime/helpers/getPrototypeOf' in 'project/node_modules/@material-ui/core/styles'
<EMAIL_ADDRESS>20:46-94
<EMAIL_ADDRESS><EMAIL_ADDRESS> @ ./src/components/pages/AccountDelete/index.js
 @ ./src/components/Routes.js
 @ ./src/components/Root.js
 @ ./src/app.js
 @ multi babel-regenerator-runtime ./src/app.js

I have 4 @babel/runtime versions in my node_modules. When trying to list the getPrototypeOf.js file in these dirs, I get
$ for dir in $(find node_modules -name 'runtime'); do ls $dir/helpers/getPrototypeOf.js; done
<EMAIL_ADDRESS>node_modules/<EMAIL_ADDRESS>node_modules/<EMAIL_ADDRESS>ls: cannot access<EMAIL_ADDRESS>No such file or directory

So it appears imports from material-ui will search in the node_modules/@babel directory instead of the node_modules/@material-ui/core/node_modules/@babel one ... weird

@Fandekasp It should be fine, both versions can live under the same bundle.
Your issue has been closed because it does not conform to our issue requirements.
Please provide a full reproduction test case. This would help a lot 👷 .
A live example would be perfect. This codesandbox.io template may be a good starting point. Thank you!

I also have similar problems when updating to 1.5.1 from 1.5.0.
<EMAIL_ADDRESS>Module not found: Can't resolve '@babel/runtime/helpers/builtin/interopRequireDefault' in '/<project_dir>/node_modules/@material-ui/icons'

I had this issue with this packages
"@material-ui/core": "^1.3.1",     "@material-ui/icons": "^1.1.0",
Update @material-ui/icons to the lastet, current ^2.0.3 resolve my problem

Same here - issue with react-event-listener and @babel/runtime.
Error is:
ERROR in ./node_modules/react-event-listener/dist/react-event-listener.cjs.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/builtin/classCallCheck'

@guilherme-sol7 is right, to use @material-ui/core 1.5.1 you must also use @material-ui/icons >= 2.0.0.

Same problem with "@material-ui/core": "^1.5.1" and without "@material-ui/icons".

@remiroyc check the error carefully, maybe you have something else which depends on an older version of @babel/runtime ? i.e. lower than 7.0.0-rc.1

Wouldn't locking dependency versions or providing a package-lock.json help avoid the issue altogether? I understand that it's a standard practice among the many developers to provide version ranges instead of precise versions due to the overhead of updating these versions later on, but this ends up making it possible to install the same version of material-ui with correct or broken dependency tree.
Would you consider adding doing either?

Lockfiles are not published. The smaller the version range the more likely you end up with a very big bundle which is a problem if your bundle has to be shipped to users. That's why every package in the dependency tree should agree to semantic versioning or everybody has to use exact versions because nobody guarantees non-breaking changes between version bumps.
I do however agree that using a release candidates or beta version in releases marked as stable is concerning. Maybe more care should be taken when bumping those to get the full benefit.


Does not support VS Code multi root workspaces

Due to changes in VS Code, this extension will not work for multi-root workspaces. More details can be found, on adding support for multi-root workspaces, here

Strictly speaking, I don’t think that this can be achieved or is necessarily advisable for direnv without fairly broad changes to this extension. If you have two roots in a workspace a and b, and they both have .envrc files, what should the result be? It’s not safe to merge them, because they may have conflicting environment settings.
In #5, I’ve done the absolute minimum to support none (no folders opened) and one workspace folder; anything more than one will be treated as one, as the first workspace folder being treated as if it were the old setting for vscode.workspace.rootPath, which IMO is the only sane thing to be done.
Other options would be to have the option to load a specific .envrc from one of the workspace folders, but that greatly exceeds my interest at the moment.

FWIW, it doesn't seem to support workspaces at all, even if there is only one root.


Make all traffic goes to the new cluster

Direct the whole traffic to the new cluster. If everything is okay the acceptance tests will pass.
Passed here

did we say were not going to go 100% to the new cluster yet? or is this just a placeholder PR?

Right now it is already going 100% to the new cluster because of https://app.circleci.com/pipelines/github/ministryofjustice/fb-base-adapter/151/workflows/e75b8917-44b2-4210-b67c-7e59b3abea66


Discord invite has expired.

The README.md invite link to Discord has expired, and needs to be updated.

The discord was owned by PL, and was either taken over or removed. We currently don't have a discord.
How do we feel about just removing discord everywhere, since it isn't being used and Gitter works for our purposes?

Yes and now that Gitter speaks matrix we get two for one :)

I wasn't happy with these old links existing. There.

Holy pr spam, Batman! 😜

Haha I'm sorry. It had to happen, though.


DO NOT MERGE - run VC v3

Description
This PR tests PVC against https://github.com/ViewComponent/view_component/pull/1613/ to make sure we're compatible!

Can this be closed?


Improve links for sitemap and taxonomies

This PR makes a few changes to improve the links generated by the theme templates:

use absURL to create the sitemap URL rather than concatenating with .Site.BaseURL. This avoids a non-canonical URL if BaseURL ends in a slash.
use .GetTerms to get a list of the tags for the page. This returns a list of page objects that know their URL.
use .Data.Pages to enumerate the terms in a taxonomy rather than .Data.Terms. Again, this lets Hugo generate the appropriate URL.

I noticed (2) and (3) in a Google search console report for my site, where the existing templates generate links without a trailing slash, resulting in a redirect. Letting Hugo generate the links itself avoids the problem. It also seems to work correctly with multi-lingual sites, after clicking around in the example site.
To test the example site, I modified its go.mod file to force it to use the in-tree version of the theme rather than downloading a second copy of the theme (which won't include any of the changes I'm trying to test). Looking at the git history, it seems the example site used to do this but it was reverted for some reason in ddf6a834. It's not clear from the commit message why that was done.

Looking at the git history, it seems the example site used to do this but it was reverted for some reason in https://github.com/theNewDynamic/gohugo-theme-ananke/commit/ddf6a834054bf08e773ffd26599a1b23af16e2e5. It's not clear from the commit message why that was done.

We have been trying to move the demo site to cloudflare but it breaks on the replace line...
I added it back as we are still using Netlify anyway. (you might have to fix the conflicted I just introduced by fixing master :/)

I've rebased the PR on current master, removing the revision altering the example site go.mod file.


Set Tag of ViewHolder Item and Later Retrieve View by Tag

So I have learned that the default FirebaseRecyclerAdapter behavior is to repopulate the RecyclerView on any updates. However, I do not want to update the RecylcerView this way; I simply want to set an ID or Tag for each view in the RecyclerView, and then later retrieve that view.
In order to make this work, I want the actual ID to be the push.getKey() value that I originally use to write an item to Firebase. Then, as I listen for changes from Firebase, I can reference a particular view based on the push.getKey() value that is returnred from my ValueEventListener, which now ultimately serves as the tag for each view in the RecylcerView.
Is there a way to set a tag = push.getKey(); and then later retrieve that viewHolder / RecyclerView view based on that tag?
Below is my code:
public class LiveFragment extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";

private RecyclerView mRecyclerview;
private DatabaseReference mBaseRef;
private DatabaseReference mPollsRef;
private LinearLayoutManager mLayoutManager;
private FloatingActionButton mFloatingActionAdd;

private FirebaseRecyclerAdapter<Poll, PollHolder> mFireAdapter;

private RecyclerView.ItemAnimator mItemAnimator;

// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;

private OnFragmentInteractionListener mListener;

public LiveFragment() {
    // Required empty public constructor
}

/**
 * Use this factory method to create a new instance of
 * this fragment using the provided parameters.
 *
 * @param param1 Parameter 1.
 * @param param2 Parameter 2.
 * @return A new instance of fragment LiveFragment.
 */
// TODO: Rename and change types and number of parameters
public static LiveFragment newInstance(String param1, String param2) {
    LiveFragment fragment = new LiveFragment();
    Bundle args = new Bundle();
    args.putString(ARG_PARAM1, param1);
    args.putString(ARG_PARAM2, param2);
    fragment.setArguments(args);
    return fragment;
}

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mBaseRef = FirebaseDatabase.getInstance().getReference();
    mPollsRef = mBaseRef.child("Polls");

    if (getArguments() != null) {
        mParam1 = getArguments().getString(ARG_PARAM1);
        mParam2 = getArguments().getString(ARG_PARAM2);

    }
}

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    final View v = inflater.inflate(R.layout.fragment_new, container, false);
    Log.v("TAG", "ON CREATE CALLED FROM NEW");

    mRecyclerview = (RecyclerView) v.findViewById(R.id.list);
    mRecyclerview.setItemAnimator(new SlideInLeftAnimator());

    mLayoutManager = new LinearLayoutManager(getContext());
    mLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
    mLayoutManager.setReverseLayout(true);
    mLayoutManager.setStackFromEnd(true);

    mFloatingActionAdd = (FloatingActionButton) getActivity().findViewById(R.id.myFAB);
    mFloatingActionAdd.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            Intent I = new Intent(getActivity().getApplicationContext(), CreateActivity.class);
            startActivity(I);
        }
    });

    mRecyclerview.setLayoutManager(mLayoutManager);
    return v;
}

@Override
public void onStart() {
    super.onStart();

    mFireAdapter = new FirebaseRecyclerAdapter<Poll, PollHolder>(Poll.class, R.layout.latest_item, PollHolder.class, mBaseRef.child("Polls")) {

        @Override
        public void onChanged(EventType type, int index, int oldIndex) {
            if (type != EventType.CHANGED)
                super.onChanged(type, index, oldIndex);
        }

        @Override
        protected void populateViewHolder(final PollHolder viewHolder, final Poll model, final int position) {
            viewHolder.mPollQuestion.setText(model.getQuestion());
            String voteCount = String.valueOf(model.getVote_count());
            viewHolder.mView.setId(position);

            Picasso.with(getActivity().getApplicationContext())
                    .load(model.getImage_URL())
                    .fit()
                    .into(viewHolder.mPollImage);
            viewHolder.mView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    Log.v("TAG", model.toString());
                    Log.v("TAG","ONCLICKED");
                    Intent toPoll = new Intent(getActivity(), PollHostActivity.class);
                    //TODO: Go back to clicked item when navigating from Poll Fragment back to LiveFragment
                    toPoll.putExtra("POLL_ID", mFireAdapter.getRef(viewHolder.getAdapterPosition()).getKey());
                    startActivity(toPoll);

                }
            });
            Log.v("TAG", mFireAdapter.getRef(position).getKey());
            Log.v("TAG", String.valueOf(position));
            Log.v("TAG", model.getQuestion());
            Log.v("TAG", model.getImage_URL());
        }
    };

    mRecyclerview.setAdapter(mFireAdapter);
    scrollToPosition();

}

@Override
public void onDestroy() {
    super.onDestroy();
    if (mFireAdapter != null) {
        mFireAdapter.cleanup();
    }
}

@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

}

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    if (context instanceof OnFragmentInteractionListener) {
        mListener = (OnFragmentInteractionListener) context;
    } else {
        throw new RuntimeException(context.toString()
                + " must implement OnFragmentInteractionListener");
    }
}

@Override
public void onDetach() {
    super.onDetach();
    mListener = null;
}

public static class PollHolder extends RecyclerView.ViewHolder {

    TextView mPollQuestion;
    TextView mVoteCount;
    ImageView mPollImage;
    View mView;

    public PollHolder(View itemView) {
        super(itemView);

        mPollQuestion = (TextView) itemView.findViewById(R.id.latest_item_question);
        mPollImage = (ImageView) itemView.findViewById(R.id.pollThumbNailImage);
        mVoteCount = (TextView) itemView.findViewById(R.id.latest_item_poll_count);
        this.mView = itemView;
    }

}

private void scrollToPosition(){
    mFireAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {
        @Override
        public void onItemRangeInserted(int positionStart, int itemCount) {
            super.onItemRangeInserted(positionStart, itemCount);
            int pollCount = mFireAdapter.getItemCount();
            int lastVisiblePosition = mLayoutManager.findLastCompletelyVisibleItemPosition();

            // If the recycler view is initially being loaded or the user is at the bottom of the list, scroll
            // to the bottom of the list to show the newly added message.
            if (lastVisiblePosition == -1 ||
                    (positionStart >= (pollCount - 1) && lastVisiblePosition == (positionStart - 1))) {
                mRecyclerview.scrollToPosition(positionStart);
            }
        }
    });
   }

  }

@troy21688 you've presented a lot of code here and it's not clear what part is not working as you've expected.  Please keep code snippets as short as they can be while demonstrating the issue.
You say "this way; I simply want to set an ID or Tag for each view in the RecyclerView, and then later retrieve that view." ... can you explain what exactly you mean here?  As you know, RecyclerView recycles the ViewHolder and View instances so there's no guarantee that a view for each item would even exist at a given time.
As for the update mechanics, the adapter only changes items where the backing data from Firebase has changed.

@troy21688 it's been 26 days since the last update so closing this issue.


Drupal 11 support for ddev phpunit

I have installed Drupal 11.0-dev to investigate issues with the phpunit (next major) pipeline in https://gitlab.com/drupalspoons/devel/-/jobs/7146821758. Pipeline from gitlab templates invokes phpunit differently than ddev-drupal-contrib:
sudo -u www-data -E vendor/bin/phpunit  --bootstrap /builds/drupalspoons/devel/web/core/tests/bootstrap.php /builds/drupalspoons/devel/web/modules/custom/devel --log-junit /builds/drupalspoons/devel/junit.xml

When I try to run phpunit in my local project using ddev phpunit, I get the following error:

The PHPUnit 10.5 documentation seems to indicate that there is no --printer flag.
In .ddev/commands/phpunit there is the following code:
phpunit --printer="\Drupal\Tests\Listeners\HtmlOutputPrinter" --bootstrap $PWD/$DDEV_DOCROOT/core/tests/bootstrap.php --testdox $DDEV_DOCROOT/modules/custom "$@"
I have noticed that HtmlOutputPrinter is present in Drupal 10.3, but has been moved/removed/modified in 11.x.
After some digging I have found Drupal\TestTools\Extension\HtmlLogging\HtmlOutputLogger that might be helpful.
However, simply removing --printer="\Drupal\TestTools\Extension\HtmlLogging\HtmlOutputLogger" part of the command so that only phpunit --bootstrap $PWD/$DDEV_DOCROOT/core/tests/bootstrap.php --testdox $DDEV_DOCROOT/modules/custom "$@" remains, allows phpunit to run properly (still, I am not sure if output is formatted/handled as expected):

FYI We removed --testdox recently in https://github.com/ddev/ddev-drupal-contrib/pull/63.
We do want to keep the browser output so lets see how to fix this properly.

I removed --printer in #70. I think the debug files are saved just by the fact that we set BROWSERTEST_OUTPUT_DIRECTORY. We can add back the links if we want. See https://www.drupal.org/project/drupal/issues/3452519


London Waterloo International not selectable

I can see the sound is there, however it is not selectable (station code is WIT if you needed it)

London Waterloo International does not exist anymore.
This would be covered by #184

It'd be nice to have it, even if it is not selectable, simply because the announcement exists and some people would like to make some... truly insane announcements. Weymouth quay is unable to have trains anymore, yet it still is selectable.


All projects to 100%

Hello
I use redmine 3.0.1 and this plugin version 2.0.1, and the progress bar is always at 100%, which is of course irrelevant in almost all cases.
The bar doesn't show when no issues are opened though, which I think is right.
Why does it happen? How can I repair?
Thanks

Seems that this problem was already reported #49. Also there is a pull request with a fix #55. You may try it but I haven't tested it.
Thank you.

Sorry I didn't notice the bug report! Thank you for still taking time to answer!
I tried the fix and it seems to be working for me (I haven't calculated but I now have values that seem correct).
Thanks again

Fixed by #55.


Update  Samplings Available in Run page

The samplings available needs to surface the tomogram voxel spacing associated to the run.

hey @manasaV3 - can you remind me why this is blocked?

@junxini Sorry, I think this got moved into blocked by mistake.


i.MX8QM Secure Boot

Docs for 231def1737f0e5c5649283c200ca9566ee08949f are browesable at: https://ci.foundries.io/projects/fio-docs/builds/1213/docs/artifacts/html/index.html

Docs for 9f4a207204399b88ba48543735f73daeb95f41c6 are browesable at: https://ci.foundries.io/projects/fio-docs/builds/1214/docs/artifacts/html/index.html

thanks @vanmaegima @angolini, all comments addressed!

Docs for 3806f89938d1c21a3a3d7438f1e757d220d97bbf are browesable at: https://ci.foundries.io/projects/fio-docs/builds/1215/docs/artifacts/html/index.html

Could you please take a look @ricardosalveti @mike-scott
Same for (this one depends on these two PRs):
https://github.com/foundriesio/optee_os/pull/66
https://github.com/foundriesio/docs/pull/298


⚠ T:Riza Docs has degraded performance

In e72380c, T:Riza Docs (https://docs.triza.dev) experienced degraded performance:

HTTP code: 200
Response time: 3747 ms

Resolved: T:Riza Docs performance has improved in 57966c2.


Replace monitoring solution with kube-prometheus-stack dependency

Related issues #294 #65
Supersedes #296 and #297
Motivation
Our helm chart is out of date. I propose we make a breaking change for the monitoring solution and start using the kube-prometheus-stack as a dependency. This should make upgrades easier and will let users leverage all of that chart's features.
This change will result in the removal of the StreamNative Grafana Dashboards. We'll need to figure out the right way to address that. The apache/pulsar project has grafana dashboards, but they have not been maintained. With this added dependency, we'll have the benefit of being able to use k8s ConfigMaps to configure grafana dashboards.
Modifications

Remove old prometheus and grafana configuration
Add kube-prometheus-stack chart as a dependency
Enable several components by default. I am not opinionated on these, but it is based on the other values in the chart.

Verifying this change
This is a large change that will require manual validation, and may break deployments. I propose this triggers a helm chart 3.0.0 release.

just did the same check for the proposed stack at artifacthub.
There are (like in every project) some vulnerabilities, but

much fewer than we have today
no damn old ones
most of them could be fixed by minor version bumps of their dependencies
and they are moving fast

see https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack?modal=security-report
-> so it looks fine to use it.
Maybe one could point their community to the general view of their security scan results by opening an issue...

@michaeljmarshall
since this will be some work and will probably trigger a major version bump,
what do you think of releasing in the meantime a last updated version of 2.x - with no other changes than containing pulsar 2.10.1?

@michaeljmarshall since this will be some work and will probably trigger a major version bump, what do you think of releasing in the meantime a last updated version of 2.x - with no other changes than containing pulsar 2.10.1?
next version with new monitoring stack, could than directly start with pulsar 2.11 as pulsar helm 3.0

I think we need to understand why #274 stalled first. I am working on fixing the release process too, so there will be a slight delay in getting these fixes delivered. However, once the new release process is in place, I expect that we will be able to ship releases more frequently.

One relevant item to verify is metric label parity. Labels are often added/modified by the relabel config in the scrape definition.
Metric from publicly available pulsar-helm chart:

pulsar_broker_lookup{app="pulsar",cluster="p-pulsar",component="broker",controller_revision_hash="p-pulsar-broker-5fc786b7c8",
exported_cluster="p-pulsar",instance="<IP_ADDRESS>:8080",job="broker",kubernetes_namespace="default",kubernetes_pod_name="p-pulsar-broker-0",quantile="0.5",release="p",statefulset_kubernetes_io_pod_name="p-pulsar-broker-0"}

Metrics from the helm chart deployed with this PR at this point in git history.

pulsar_broker_lookup{app="pulsar", cluster="test-pulsar", component="broker", container="test-pulsar-broker", controller_revision_hash="test-pulsar-broker-5d4489dc7d", endpoint="http", exported_cluster="test-pulsar", instance="<IP_ADDRESS>:8080", job="broker", kubernetes_namespace="default", kubernetes_pod_name="test-pulsar-broker-0", namespace="default", pod="test-pulsar-broker-0", quantile="0.5", release="test", statefulset_kubernetes_io_pod_name="test-pulsar-broker-0"}

The scrape definitions are pretty different, but ultimately, the broker's current scrape definition is created by the already established broker-podmonitor.yaml, so this might be a non-issue.


Handle obj=null gracefully in update()

In some cases the widgets update function is called with a null obj.
This call is now skipped.

Thanks!


[Feature suggestion] Add a contains(Coordinate c) method.

It would come really handy if it was possible to check if a coordinate is contained by the polygon.
bool contains(Coordinate c, {bool includeBorder = true});

E.g.:
Polygon poly = Polygon(regions: [
  [
    Coordinate(10, 10),
    Coordinate(10, 0),
    Coordinate(0, 0),
    Coordinate(0, 10),
  ]
]);

poly.contains(Coordinate(5, 5));  // true
poly.contains(Coordinate(10, 5), includeBorder = true);  // true
poly.contains(Coordinate(10, 5), includeBorder = false);  // false

Afaik it would simply mean to iterate through all regions in the Polygon object and check if the number of regions containing the Coordinate is odd.

Hi
I would suggest using this library https://pub.dev/packages/dart_jts
It has features you want
Thanks!


fix(duration accuracy for coldstarts by using process.uptime)

Fixes #283
Signed-off-by: Erica Windisch<EMAIL_ADDRESS>

@ewindisch re-ran the workflow -- if your commit is formatted in the semantic release formatting (you can do this by running yarn commit when you commit), it'll trigger a release. Request a review when you want, LGTM :)

Closing as stale


Update apps.yaml - Updated AKASHA title and website

Updated AKASHA title and website.

Please run npm ci && npm run build and commit changes to README as well.

No longer needed

Closing as this is not directly related to IPFS


Make single slide w/QR code

https://docs.google.com/presentation/d/1JfA6v1W5U2rCMFbKlaJ6G0Gj1iRCrDeY3vYrIToeZHk/edit?usp=sharing

I copied and added this to the SCR folder with other collateral: https://docs.google.com/presentation/d/1UWl_yd449h3xKk2nH3q5WCo5inVOJ-uFZ9ke1LeY3ws/edit#slide=id.g2e351cb43d9_0_1


fixed deserialization problems for nodes not present in the xml file

looks like when we are de-serializing if a node is not present, the the model is loaded with null, causing some NPE :)
this should fix this

Current coverage is 50.00%

Merging #18 into master will not affect coverage as of e3f69f3

@@            master    #18   diff @@
=====================================
  Files           33     33
  Stmts          712    712
  Branches        77     77
  Methods          0      0
=====================================
  Hit            356    356
  Partial         23     23
  Missed         333    333

Review entire Coverage Diff as of e3f69f3

Powered by Codecov. Updated on successful CI builds.


Add srwiki damaging and goodfaith

bug: T195063

Looks like we have lower fitness for good-faith.  I wonder why that is.


Permision to use this code for Bachelorthesis?

hello @dimtics ,
i am currently writing my Bachelorthesis about Intrusion Detection implement with Machine learning Algorithms. Could I have your permission to use this code? I would also indirectly quote this code.
Kind regards.

Hi - You can use the code. Good luck in your research work.
On Sat, Dec 10, 2022 at 5:43 AM, esra9910 @.***> wrote:

hello @.***(https://github.com/dimtics) ,
i am currently writing my Bachelorthesis about Intrusion Detection implement with Machine learning Algorithms. Could I have your permission to use this code? I would also indirectly quote this code.
Kind regards.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>


svg: decode from XmlNode

Add a proc for decoding from a pre-parsed XmlNode.

Hey thank you for the PR.  But thank for brining this to our attention!


exclude superclass of Guillain-Barre syndrome

Guillain-Barre syndrome can have acquired and inherited forms (see https://omim.org/entry/139393).

[ ] Exclude superclass 'acute and subacute inflammatory demyelinating polyneuropathy' (from Orphanet)
[ ] add GUILLAIN-BARRE SYNDROME, FAMILIAL as a child of Guillain-Barre syndrome

related to https://github.com/monarch-initiative/mondo/issues/2760 and https://github.com/monarch-initiative/mondo/issues/834

Make 'acute inflammatory demyelinating polyradiculoneuropathy' a child of 'acute and subacute inflammatory demyelinating polyneuropathy'.
This relationship doesn't currently exist in Orphanet, but seems to make sense based on the labels. 'acute and subacute inflammatory demyelinating polyneuropathy' seems to be a grouping class for these two classes.


Blurred content offset since Beta04

Information

Haze version: 0.9.0-beta04, 0.9.0-beta04.1
Platform: Android, iOS
Platform version: Android 15

Expected Behavior
Content isn't offset
Actual Behavior
The blurred content is strangely shifted on the x axis. See screenshots (second one is using 0.9.0-beta04)
Steps to Reproduce the Problem

Use any version after 0.9.0-beta03

I can't recreate this. If you turn the blurRadius down to 0.dp what does it look like?

@chrisbanes There is actually no offset when I set the blurRadius to 0.dp. The offset correlates with the blurRadius - the larger this is, the larger the negative offset becomes.

Interesting. I'm still not seeing that though 🤔
Just double checking, are you sure that you're using 0.9.0-beta04.1? That has a fix for blurRadius from styles not working.

I am using 0.9.0-beta04.1 and also tried 0.9.0-beta04. The last version the issue didn't occur was 0.9.0-beta03.

Can you post some code of how you're using Haze? Maybe there's something which I'm missing.

I still can't recreate this unfortunately. If anyone else can reproduce this, please comment/react (ideally with an example).

I encountered a similar problem (Unsure if causes match. Commenting here first. Will create new issue if needed). I used 'hazeChildforPrimaryScrollableTabRow`. From the video, you can see that there is blurring effect even before scrolling.
Removing statusBarsPadding() doesn't seem to help.
https://github.com/user-attachments/assets/3ad772e1-d7f0-4891-86fb-65066a792d27
Code snippet:
@OptIn(ExperimentalMaterial3Api::class)
@Composable
@Preview
fun App() {
    MaterialTheme {
        var showContent by remember { mutableStateOf(false) }
        Column(modifier = Modifier.fillMaxSize()) {
            var tabState by remember { mutableStateOf(0) }
            val titles = listOf("Article", "Social Media", "Image", "Video", "Audio", "Notification")
            val coroutineScope = rememberCoroutineScope()
            val pagerState = rememberPagerState(pageCount = {
                titles.size
            })
            val hazeState = remember { HazeState() }
            LaunchedEffect(pagerState) {
                snapshotFlow { pagerState.currentPage }.collect { page ->
                    tabState = page
                }
            }
            PrimaryScrollableTabRow(
                modifier = Modifier.hazeChild(
                    hazeState,
                    style = HazeMaterials.thin(MaterialTheme.colorScheme.background)
                ),
                containerColor = Color.Transparent,
                selectedTabIndex = tabState,
                edgePadding = 8.dp,
                divider = {}
            ) {
                titles.forEachIndexed { index, title ->
                    Tab(
                        selected = tabState == index,
                        onClick = {
                            tabState = index
                            coroutineScope.launch {
                                pagerState.animateScrollToPage(index)
                            }
                        },
                        text = {
                            if (tabState == index) {
                                Text(
                                    text = title,
                                    maxLines = 2,
                                    overflow = TextOverflow.Ellipsis,
                                    style = MaterialTheme.typography.titleMedium,
                                    fontWeight = FontWeight.Bold
                                )
                            } else {
                                Text(
                                    text = title,
                                    maxLines = 2,
                                    overflow = TextOverflow.Ellipsis,
                                    color = MaterialTheme.colorScheme.onSurfaceVariant,
                                    style = MaterialTheme.typography.titleSmall
                                )
                            }
                        }
                    )
                }
            }
            HorizontalPager(modifier = Modifier.haze(state = hazeState).fillMaxSize(), state = pagerState) { page ->
                DemoListScreen(titles[page])
            }
        }

    }
}

@Composable
fun DemoListScreen(title: String) {
    LazyColumn(
        modifier = Modifier.fillMaxSize(),
        horizontalAlignment = Alignment.CenterHorizontally
    ) {
        repeat(100) {
            item {
                Button(onClick = { /*TODO*/ }, modifier = Modifier.fillMaxWidth().padding(8.dp)) {
                    Text(text = "$title  Item $it", style = MaterialTheme.typography.titleLarge)
                }
            }
        }
    }
}

project for reproduction https://github.com/rosuH/haze-reproduced

Hi, please don't comment on closed issues, even if you think it is related.
As to your sample, it's make little sense. You're using a Column, so the tab bar isn't being drawn on top of the HorizontalPager. Without that, Haze is useless as the whole point is background blurring.
Use a Scaffold instead and it works as expected. Related sample is here: https://github.com/chrisbanes/haze/blob/main/sample/shared/src/commonMain/kotlin/dev/chrisbanes/haze/sample/ScaffoldSample.kt


https://arxiv.org/html/2302.03038v2

Description
learnable PE and sinusoid PE. Learnable PE is introduced in ViT (Dosovitskiy et al., 2020), where it learns a positional encoding for each individual position. Sinusoid PE is proposed in vanilla transformer (Vaswani et al., 2017), originally designed for sequential data, while it can be extended to 2-dimensional space (Carion et al., 2020).
(Optional:) Please add any files, screenshots, or other information here.
No response
(Required) What is this issue most closely related to? Select one.
Choose One
Internal issue ID
cb57dc1b-386d-495b-a1fc-766534080790
Paper URL
https://arxiv.org/html/2302.03038v2
Browser
Chrome/<IP_ADDRESS>
Device Type
Desktop

Please contact the authors directly for questions on document content.
This repository only tracks the quality of the experimental HTML format.


provide a way to avoid having to specify __esModule:true in jest.mock()

Describe the feature
after migrating jest from babel to swc we found that now our unit tests have to specify an __esModule: true when mocking a module that has a default export.
example:
jest.mock('path/to/some-module.js', () => ({
 default: jest.fn(),
 __esModule: true,
}));

worth a mention that it seems this is only needed when mocking a module that is dynamically imported with import() (statically imported modules are fine)
we previously avoided this with babel config via specifying a noInterop: true on a plugin called babel-plugin-dynamic-import-node
here is the full Babel config
{
  "presets": [
    ["@babel/preset-env", {
      "exclude": ["proposal-dynamic-import"]
    }],
    "@babel/preset-react"
  ],
  "plugins": [
    ["babel-plugin-dynamic-import-node", { "noInterop": true }],
    "@babel/plugin-transform-runtime",
    ["babel-plugin-module-resolver", {
      "root": ["."]
      }
    }]
  ]
}

can you please provide an equivalent for swc config
our swc config is
{
  "$schema": "https://swc.rs/schema.json",
  "sourceMaps": "inline",
  "jsc": {
    "target": "es5",
    "externalHelpers": true,
    "loose": true,
    "baseUrl": "./",
    "parser": {
      "syntax": "ecmascript",
      "jsx": true,
      "dynamicImport": true
    },
    "transform": {
      "react": {
        "pragma": "React.createElement",
        "pragmaFrag": "React.Fragment",
        "throwIfNamespace": true,
        "development": false,
        "useBuiltins": false
      },
      "optimizer": {
        "globals": {
          "vars": {
            "NODE_ENV": "true"
          }
        }
      }
    },
    "experimental": {
      "plugins": [
        [
          "swc_mut_cjs_exports",
          {}
        ]
      ]
    }
  },
  "module": {
    "type": "commonjs"
  }
}

Babel plugin or link to the feature description
No response
Additional context
No response

You may try noInterop: true for swc

And please provide a minimal reproduction

here is github and codesandbox links that reproduce the issue, whichever you prefer

https://github.com/dalimian/jest-swc/tree/main
https://codesandbox.io/p/github/dalimian/jest-swc/main

I did try noInterop: true, it did fix this issue but introduced another issue where nothing from node_modules could be imported.


Docker

Hello, are there plans for Docker container of PiVPN? :)

Yup there is, however there is no ETA.
you can get some pointers on how to install it on a ALPINE container here: https://docs.pivpn.io/install/#docker-experimental
Moving to discussions, not an issue!


Extract FZF_PREVIEW_WINDOW to allow customization

Description
By default the preview is hidden but the user can decide how to set the
preview by setting this environment variable. The value will also be
taken by other scripts like fif.
Signed-off-by: Gerard Bosch<EMAIL_ADDRESS>

License Acceptance

[x] This repository is Apache version 2.0 licensed (some scripts may have alternate licensing inline in their code) and by making this PR, I am contributing my changes to the repository under the terms of the Apache 2 license.

This makes customization without forking easier, thanks!


⚠ Bofrost.de has degraded performance

In 7b5478a, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1715 ms

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


Fix calculating the report_date in demand_hourly_pa_ferc714

For some reason report_date could be missing for some number of records (0.7%). This addresses that problem by changing the way we align the reports to year boundaries.

Did you happen to run the full FERC-714 ETL locally for all years with these changes?
It looks like there were NaT values included in the 2020 data which got processed by the integration tests in CI, and it passed, so it seems like it will probably work in general. 🤞🏼

I have ran the affected table locally with dagster with etl_fast.yml. I'm expecting this to be low risk WRT possibility of this breaking on additional data.


consider BeforeCreate, BeforeUpdate, AfterCreate, AfterUpdate, *Delete, etc., per-table hooks

another name for this is "software-based triggers"

i think i'm going to avoid this for the moment.


Some failure transitions missing?

Consider this input:
var sut = new AhoCorasickTree(new[] { "abcd", "bc" });
var x = sut.Contains("abc"); // => false

This should yield true because "abc" contains "bc". The failure transition from "c" of the "abcd" subtree to the "c" of "bc" seems to be missing.

No, it shouldn't. There's no keyword "abc" in the Aho-Corasick dictionary. You specified "abcd" and "bc". It searches those keywords in the specified string which is "abc" in your case. Yes, Contains() could be misleading here. Other ideas?

Take a look at the example

Ops, you're right! Sorry. I'll take a look.

Released 0.5.0


Trouble finding Internet Explorer in the data

There is a support timeline ending for IE 11. But I am having trouble finding IE as a product in the endoflife data.
https://death-to-ie11.com/

For my 2 cents adding already finished product is not useful

This could be done, but we would have to account for oddities, mainly being that there is not a simple end of life date, the end of life date is tied to the end of life date of certain versions of Windows:

https://docs.microsoft.com/en-us/lifecycle/announcements/internet-explorer-11-end-of-support-windows-10
https://docs.microsoft.com/en-us/lifecycle/faq/internet-explorer-microsoft-edge#what-is-the-lifecycle-policy-for-internet-explorer-

From what I gather there, Internet Explorer 11 will be supported until the last operating system that uses it is end of life (including ESU), which I believe is Windows Server 2022, ending on October 14, 2031.

After having some nightmares with the dating, this should be fixed with https://github.com/endoflife-date/endoflife.date/pull/1316

For my 2 cents adding already finished product is not useful

On the other hand, there are very many people unaware of this. The purpose of our database is to increase exactly this kind of awareness.

Closing this, page is live: https://endoflife.date/internet-explorer


Giving the current animation a specified value to go to.

Hello.
I would like to know if it is possible to use an animation i have made like a Blendshape in 3D modeling, where when given a certain value, it will snap to a specific spot.
Thank you.

Join the discord if you have usage questions


Canot use in DOM templates

Bug Report
Current Behavior
When editing html files, using <carousel autoplay="true"> works, but <carousel perPage=4> doesn't. Can be worked around by using string templates.
Possible Solution
naming the options without camelCase but rather kebab-case should make it work
see: https://vuejs.org/v2/guide/components-props.html#Prop-Casing-camelCase-vs-kebab-case

Have just found out I can use  in the DOM template :D So this is probably not an issue.


Fix recvICMP return arguments

The Pinger.recvICMP() method should return nil instead of returning nothing. The current return statement causes issues when attempting to go get this package.
Running:
go get github.com/go-ping/ping

Causes the following error:
# github.com/go-ping/ping
../../../go/pkg/mod/github.com/go-ping/ping@v0.0.0-20201001152913-70ede2ab323b/ping.go:476:5: not enough arguments to return
	have ()
	want (error)

Whoops, this is a duplicate of #106. My mistake.

No worries, thanks for hopping on the problem. :smile:


Add warning to readme that this plugin does not work

To save people time.
https://github.com/prisma/vscode-graphql/issues/93
https://github.com/prisma/vscode-graphql/issues/89
https://github.com/prisma/vscode-graphql/issues/88
https://github.com/prisma/vscode-graphql/issues/87
Thank you.

Meanwhile, this extension works for me: https://github.com/kumarharsh/graphql-for-vscode
Just  npm install @playlyfe/gql --dev and then the extension itself.
A minimal example is great enough: https://github.com/kumarharsh/graphql-for-vscode#a-minimal-example

But import somehow sucks, it imports everything and then warns about clashes.

But import somehow sucks, it imports everything and then warns about clashes. Without importing from generated prisma schema, it works.

@steida Does kumarharsh/graphql-for-vscode works for you with the newest graphql-js v14? 😕

@19majkel94 It looks like it works.

@19majkel94 Check https://github.com/este/este-typescript

@steida : Thanks for raising this. I will take a look at this soon, I already commented on the 4 issues you mentioned here asking for more information or suggesting resolutions. Thanks!

#75

all the issues noted have been fixed, or resolutions have been provided.
please open new tickets if you have issues with the latest versions! thanks!


add oidc config.

fixes eclipse-xpanse/xpanse#572
fixes eclipse-xpanse/xpanse#574
fixes eclipse-xpanse/xpanse#581

@Alice1319
It looks like the oidc-react library does not satisfy all our requirements. We must switch to another one - https://github.com/AxaFrance/react-oidc

I have used your branch and created another branch just to show you how it must be done. You can refer to my changes here - https://github.com/eclipse-xpanse/xpanse-ui/tree/feature/use-react-oidc
Important is -> complete app must be projected like this with a context. https://github.com/eclipse-xpanse/xpanse-ui/blob/feature/use-react-oidc/src/App.tsx#L35
additionally all routes must be protected like this - https://github.com/eclipse-xpanse/xpanse-ui/blob/feature/use-react-oidc/src/App.tsx#L40
Then within the "Protected" component, we only verify the roles. https://github.com/eclipse-xpanse/xpanse-ui/blob/feature/use-react-oidc/src/components/protectedRoutes/ProtectedRoute.tsx#L39 -> this method is not fully implemented. I see one small problem here that the userInfo is null for few seconds and its only available after few seconds. Please see if you find any workaround to handle this. We need some kind of wait there.
Important is - nothing should be stored and read from local storage. Everything should be accessed from hooks only.

Please copy whatever changes you find right from my branch to yours.

As we are taking the csp as the default role when login, this may puzzle someone, would it be better to record the last selection?

@Alice1319 As we discussed, please remove all "localstorage" calls. Use the hooks form react-oidc lib.
To address the point raised by Yichao, we can store the last selected role in the sessionstore (not local storage) and compare and use the same if the fresh login also returns the the stored role as one of the available roles of the user.

As we are taking the csp as the default role when login, this may puzzle someone, would it be better to record the last selection?

reference  to eclipse-xpanse/xpanse/#593

@Alice1319 As we discussed, please remove all "localstorage" calls. Use the hooks form react-oidc lib. To address the point raised by Yichao, we can store the last selected role in the sessionstore (not local storage) and compare and use the same if the fresh login also returns the the stored role as one of the available roles of the user.

reference  to eclipse-xpanse/xpanse#593

looks good


PostgreSQLException (PostgreSQLSeverity.error : Query cancelled due to the database connection closing.)

Hi, thank you very much for your wonderful plugin. I'm facing a very strange problem.
After Postgres returns an error about the uniqueness of names, then the error about the lack of connection to the database is constantly returned.

[log] PostgreSQLException (PostgreSQLSeverity.error 23505: duplicate key value violates unique constraint "__unique" Detail: Key (email, username)=(1, 1) already exists. Table: user_models Constraint __unique )
[log] #0      _PostgreSQLExecutionContextMixin._query
connection.dart:514
#1      _PostgreSQLExecutionContextMixin.query
connection.dart:475
#2      Database.query
database.dart:91

#3      _UserModelRepository.insert
user_model.schema.dart:41

#4      Database.runTransaction
database.dart:163

#5      AuthMethodsService.signUp
auth_methods_service.dart:56

#6      new Stream.fromFuture. (dart:async/stream.dart:247:17)

[log] Error SignUp
[log] PostgreSQLException (PostgreSQLSeverity.error : Query cancelled due to the database connection closing. )
[log] Error SignUp
[log] PostgreSQLException (PostgreSQLSeverity.error : Query cancelled due to the database connection closing. )
[log] Error SignUp
[log] PostgreSQLException (PostgreSQLSeverity.error : Query cancelled due to the database connection closing. )
[log] Error SignUp

Solved problem, check connection and reinit.
if (db.connection().isClosed) {         db = initDatabase();       }

@petrovyuri Hey!
I have the same problem in the production. And I think when errors come from plugin then we get closed connection. As my db variable is created in the main method and is passed to the repository models then after this I get constantly issue with closed connection.
I am going to try your approach before creating an issue about it.

Solved problem, check connection and reinit. if (db.connection().isClosed) { db = initDatabase(); }

This is extremely bad code, because your initDatabase MUST be in a completely separate layer of abstractions than your method which actually performs any request to check for it's isClosed state...


[Feature Request]: Add a prop onAfterClose on the ActionMenu

Component that this feature request involves
ActionMenu
Is your feature request related to a problem? Please describe
I need to remove a css class onClose of the ActionMenu, but it is not visually nice because of the animation (the onClose is triggered before the animation is completed). With a prop onAfterClose triggered after the animation is completed, it would be perfect for my case! Now I use a settimeout and the timeout value is 150 because I checked in the ds code to see what it is. So if you change it, my value will not be good anymore. The best would be a onAfterClose prop! Thanks!
Describe the solution you'd like
Add a prop onAfterClose (or the naming that you want) on the ActionMenu that will be triggered after the animation is completed.
Describe alternatives you've considered
As mentionned before, I used a settimeout, but it is not a good solution in my opinion.
Additional context
No response

This is completed.

Cool thanks!


Type guard not considered for unreachable code

function typeGuardNotDetectingUnreachableCode(x: string | boolean) {
    if (typeof x === "string" && x === false) {
        console.log();
    }
}

function unreachableCodeDetectedFine1() {
    return;
    console.log();
}

function unreachableCodeDetectedFine2() {
    throw new Error();
    console.log();
}

It would be good if the first scenario was highlighted as unreachable code, like the other 2 scenarios are. TypeScript currently detects this scenario.

Still an issue in v0.67.0

Still an issue in v0.70.0


JSON reporter for kubepug

As a kubepug integrator I would love to parse some json report instead of terminal like text.
Haven't noticed any reporter output. Would be nice to implement such.

There is one ;) just found it


Pub/Sub: add subscription detachment sample

Please add a sample using the "pubsub_detach_subscription" region tag. Here's an example in Java:
try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
  ProjectSubscriptionName subscriptionName =
    ProjectSubscriptionName.of(projectId, subscriptionId);
  topicAdminClient.detachSubscription(subscriptionName);
}

try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
  ProjectSubscriptionName subscriptionName =
    ProjectSubscriptionName.of(projectId, subscriptionId);
  Subscription subscription =
    subscriptionAdminClient.getSubscription(subscriptionName);
  if(subscription.getDetached()) {
    System.out.print(“Subscription is detached”);
  } else {
    System.out.print(“Subscription is NOT detached”);
  }
}

@laljikanjareeya Is it okay for me to assign it to you?

Friendly ping.


Specify MSRV for profiling and profiling-procmacros and verify in CI

Supersedes #69. (See that PR for discussion)
The cache entries for check-msrv are relatively big (~450MiB). This seems to be intended. Any rust version >= 1.70 will use a different registry checkout mode (sparse), so newer versions don't have this issue.
If cache size is a concern, I could look into fixing this manually.

Note that the first run took a while (~3 mins) due to missing cache entries.
I have a run on my fork that has a populated cache which shows a runtime of <20 seconds. So it shouldn't impact CI speed at all under normal circumstances because the clean job takes longer to complete.

Thanks again, much appreciated!


Adding an Implementation of ERC1538

🧐 Motivation
ERC1538 is a very useful standard for transparent, upgradeable contracts that provides the following benefits:

The ability to add, replace or remove multiple functions of a contract atomically (at the same time).
Each time a function is added, replaced or removed, it is documented with events.
Build trust over time by showing all changes made to a contract.
Unlimited contract size.
The ability to query information about functions currently supported by the contract.
One contract address that provides all needed functionality and never needs to be replaced by another contract address.
The ability for a contract to be upgradeable for a time, and then become immutable.
Add trustless guarantees to a contract with "unchangeable functions".

See ERC1538 for more information.

📝 Details

Is anybody interested in adding an implementation of this standard to OpenZepplin?  I think it would be a valuable contribution.

@mudgen your implementation in (https://github.com/mudgen/transparent-contracts-erc1538) looks good.
You could create a PR with that

Hi @mudgen! We think that upgradeabilty requires a lot more tooling than what's in scope for OpenZeppelin. So our current decision is to leave those matters to ZeppelinOS.


fix: OCR Read now supports 7 langauges

@atraining : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Swagger requires unique symbols for return ids.

Replaced generic response with distinct names so the resulting swagger
reports the desired return description.
Fix for https://www.pivotaltracker.com/story/show/148112793

@ivan-c Bonus points for turning this around soon - I'd like it to be live on stg by morning to fix the swagger for Weldon's use.


Twitter Bootstrap

How to implement Twitter Bootstrap in this theme? By using webpack? How to make it included in theme styles and how to correctly add bootstrap js files?
I do bower install bootstrap-sass and what next?

I installed bootstrap 4 via bower, then shimmed it in gulp/config/styles.js:
module.exports = {
  options: {
    sass: {
      style: 'nested',
      includePaths: ['./bower_components/bootstrap/scss'],
      errLogToConsole: true
    }
  }
};

and I'm using it as usual in my .scss files:
@import "grid";

Thanks, its working for me. Now I will try to implement js files.

Please post your solution here, for other users and if I ever need to use the .js files :) Should be fairly easy though! And before you go on too long, try running gulp build after you've added the .js, so you know everything is compatible.

Sure! I resolve my problem, but I can't say 'this is what you should do'.
First, like in documentation, add jQuery to gulp/config/scripts.js

var webpack = require('webpack');
module.exports = {
options: {
webpack: {
defaults: {
plugins: [
new webpack.ProvidePlugin({
'$': 'jquery',
'jQuery': 'jquery',
'window.jQuery': 'jquery'
})
]
}
}
}
};

Then in assets/js/main.js add import '../../bower_components/bootstrap/dist/js/bootstrap.js'; for Bootstrap4 or import '../../bower_components/bootstrap-sass/assets/javascripts/bootstrap.js'; for Bootstrap3.
Bootstrap4 require Tether.js for tooltips. For me, easiest way is add some code in function.php. In theme_script() function replace line with main.js by this two lines:

wp_enqueue_script( 'tether', "//cdnjs.cloudflare.com/ajax/libs/tether/1.3.1/js/tether.min.js", array(), null, true );
wp_enqueue_script( 'main', "$theme_dir/assets/js/main.js", array('tether'), null, true );

And currently thats all. Next days I will try to find another solution.


Exception while debugging the MediaPlayerCPP sample app

Hello,
I could successfully compile and build FFmpegInterop but I hit the roadblock while running the MediaPlayerCPP sample app.
Please find the below trace for more information.
'MediaPlayerCPP.exe' (Win32): Loaded 'C:\Windows\System32\igdusc64.dll'. Cannot find or open the PDB file.
Exception thrown at 0x00007FF836E3A388 in MediaPlayerCPP.exe: Microsoft C++ exception: Platform::COMException ^ at memory location 0x00000061F1BFEFB0. HRESULT:0x8007007E The specified module could not be found.
WinRT information: The specified module could not be found.
Stack trace:
 >[External Code]
 >MediaPlayerCPP.exe!MediaPlayerCPP::App::App() Line 53
 >[External Code]
'MediaPlayerCPP.exe' (Win32): Loaded 'C:\Windows\System32\d2d1.dll'. Symbols loaded. 'MediaPlayerCPP.exe' (Win32): Loaded 'C:\Windows\System32\DWrite.dll'. Symbols loaded. The thread 0x1c74 has exited with code 0 (0x0). Unhandled exception at 0x00007FF824F23C97 (Windows.UI.Xaml.dll) in MediaPlayerCPP.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x000001FCDF62BB90, 0x0000000000000002).
I get the same exception when I try to run the MediaPlayerCS sample app.
The exception points to Line 53 in MediaPlayerCPP.exe!MediaPlayerCPP::App::App() where the below functions are called
FFmpegInterop::FFmpegInteropLogging::SetLogLevel(FFmpegInterop::LogLevel::Info); 	FFmpegInterop::FFmpegInteropLogging::SetLogProvider(this);
what could be the issue?

I have exact same issue, did you find the cure ?


Inter contract call throws Revert(123)

Cross referenced with the sway issue

One of our ecosystem projects is reporting problems when trying to create a dApp where the contract includes an inter contract call to another contract.
The error suggests its a mismatched selector, however certain functions from the same contract, with the same ABI work successfully.
I've created a minimal reproduction that demonstrates this behaviour in both TS and RS. However, it has been reported that the RS test does work successfully locally, currently I have it running against testnet.
First step would be to port the RS test to local to get it working successfully, then we can compare what is happening between the 2 SDKs.

@petertonysmith94 diligently spotted that upon upgrading Pyth to the latest versions of<EMAIL_ADDRESS>and<EMAIL_ADDRESS>and the SDK 0.92.1, this problem was resolved. I think the main culprit was this Sway change. We've gone back and fourth with them over version changes, this has consistently been the reason for problems and we have not had to make any changes to the SDK, no bugs have been found.
I've also offered a new working reproduction and integrated local TS testing with their own exemplar repository to better support them.
Closing this issue as this is not a problem with the SDK.


lxd/db: Add missing query

fixes #7548

This pull request didn't trigger Jenkins as its author isn't in the whitelist.
An organization member must perform one of the following:

To have this branch tested by Jenkins, use the "ok to test" command.
To have a one time test done, use the "test this please" command.

Those commands are simple Github comments of the format: "jenkins: COMMAND"

@freeekanayaka can you take care of this please?

@randombenj We need a different fix as that file is auto-generated so we shouldn't modify it directly.
@freeekanayaka should be able to fix the bug in the code generator then refresh the generated files and confirm this takes care of the bug as described in #7548

The code being changed in this PR is automatically generated, so it will be overwritten next time we run the generator. I'll look into this myself tomorrow, anyway, nice catch!

Perfect, thanks! 🎉

Will close this, as another fix is needed for the code generator