Add support for underline style and color in VT

Add support for underline style and color in VT.
Underline color sequence SGR 58 (unlike SGR 38, SGR 48) only works with sub parameters, eg. \e[58:5:<n>m or \e[58:2::<r>:<g>:<b>m will work, but something like \e[58;5;<n>m won't work. This is a requirement for the implementation to avoid problems with VT clients that don't support sub parameters.
Detailed Description

Added underlineColor to TextAttribute, and UnderlineStyle into CharacterAttributes.
Added two new entries in GraphicOptions namely, UnderlineColor (58) and UnderlineColorDefault (59).
SGR 58 renders a sequence with sub parameters in the VT renderer.
SGR 4:x renders a sequence with sub parameters in the VT renderer, except for single, double, and no-underline, which still use backward-compatible SGR 4, SGR 21 and SGR 24.
XtermEngine will send \e[4m without any styling information. This means all underline style (except NoUnderline) will be rendered as single underline.

Reference issues

#7228

### PR Checklist
- [x] ~Use pre-calculated maps for efficient mapping between `CharacterAttributes` and `UnderlineStyle`.~
- [x] update DECRARA, DECCARA to respect underline color and style.
- [x] update DECRQSS to send underline color and style in the query response.
- [x] update DECRQPSR/DECRSPS/DECCIR
- [x] Tests added

@microsoft-github-policy-service agree

quick question, does this supersede #15599?

quick question, does this supersede #15599?

Yeah, that was from pre subparam era, so. I'll close that in a bit.

I'd request to keep the final ✅ until pr checklist is over. I usually update them as I find more work need to be done.
I guess I should mark PRs as draft until it's ready, but I really like when I get reviews (on where I can improve) as I'm working on it ✌. I'm not sure if "Draft" conveys that properly, instead it seems to say "don't look here! I'm still working on it"

TestComposedConstProperties is failing and I've no clue how it works and how to fix this :/

Mike's working on that one :) Thanks!

If XtermEngine should get the underline style and color support?

If XtermEngine should get the underline style ~and color~ support?

I'm okay with restricting this to Xterm256Engine :)
The other engine doesn't get much use anyway...

Alright, you're going to need to merge in main to get the build system changes and the test fixes!

If XtermEngine should get the underline style ~and color~ support?

I'm not sure what the exact specs are for XtermEngine, but it's meant to be for really basic conpty clients, so they definitely wouldn't be expected to support extended underline styles. The only attributes we currently pass through are reverse video and single underline. See here:
https://github.com/microsoft/terminal/blob/69eff7e9fdf07afc9f6c29788466cb1e12cc5938/src/renderer/vt/XtermEngine.cpp#L153-L166
Although it might be worthwhile converting all the other underline styles into a single underline in this engine. That way the client at least sees some indication that there was an underline, even if it doesn't look exactly right.

[!Note]
Pending work:

Few tests are missing.
Requested changes.

Though this PR is almost complete, I'm stuck implementing the DECRARA for the underline style, and this should probably be visible by looking at the failing test.
DECRARA flips the individual bit flags in CharacterAttribute, but this doesn't work with underline style, since it is a 3 bit combo value. Flipping individual bits would be wrong. Also, DECRARA implementation is split into two halves, and the second half is shared with DECCARA, which makes this even harder. Modifying the ChangeOps flags directly impacts DECCARA also, we currently have no way to detect if ChangeOps is coming from DECCARA or DECRARA.

Working on XTPUSHSGR / XTPOPSGR right now, need to check few more cases for this operation.

I'm waiting for #15844 to merge. I need the MakeSubParamsAndRanges(...) on that PR to add some more tests on this PR. Once I add the test, this should be ready to merge (unless we need more changes).

Use pre-calculated maps for efficient mapping between CharacterAttributes and UnderlineStyle.
Guessing we don't need this one any more, since they're as efficient as can be (just some constexpr arithmetic), right?

How's the rest of the checklist? Does it need any updates?

Guessing we don't need this one any more, since they're as efficient as can be (just some constexpr arithmetic), right?

Yeah, the generated asm already does the calculations for us! 😄

How's the rest of the checklist? Does it need any updates?

Updated the list. They are all marked as Complete.

I've reverted the changes in DECRARA.
Let me summarise what we've discussed so far:
There are two types of applications that would be interested in DECRARA:

Application that just want to reverse an attribute. They're interested in toggling the state of an attribute. This kind of application depends on the fact the attributes will switch on/off based on the current state of the attribute.
Applications that are interested in bringing the original state back after doing two DECRARAs with exactly the same sequence in a row. The two DECRARA ops could be applied at any point in time. After the ops, the current attribute must represent the original attribute we started from.

In an ideal case, we want our implementation to satisfy both, and this is already true for all CharacterAttributes, except underline style because it has more than two states.
As @j4james mentioned, (1) can easily be achieved using DECCARA (application may need to build the sequence in a way that would 'toggle' the state and not simply 'change' it):

If you wanted to convert any underline to no-underline without needing to get the original back again, you could just use DECCARA.

OTH, there's no way for an application to achieve (2) unless DECRARA is strictly reversible.
Given the current implementation and keeping it simple to work with, we have to choose between the two usecases with DECRARA. So, we are going to prefer the (2) for our implementation.
The only problem we're going to see with this implementation is that the 'intermediate' state of the underline style between the two DECRARA ops can't be treated as anything useful. It may or may not be as expected.
@j4james Can you have a look on the new changes and see if it's behaving in the way we discussed?

I've been playing around with a build of this PR, and it seems to work reasonably well. The only weird thing I've noticed is when you XOR say style 2 with style 4 and you get style 6. Since that's not a supported style, we don't currently do anything with it, which wouldn't be a big deal if it was consistent, but it actually leaves the conpty client in a random state.
So I think it would probably be best to make the default case the same as a single underline, like a placeholder for future underline styles we may assign to those values. And make sure that both the Renderer::s_GetGridlines and VtEngine::_SetUnderlineExtended are handling them the same way, so the results are the same in both conhost and WT.

Playing around after some more changes in the renderer:

(thanks @lhecker for the awesome bc.exe)
Contents of 'New Text Document.txt'
\e[4m					Default Underline Color
\e[4;38:2::255::m			[4;38:2::255::mRed Foreground with Default Underline Color
\e[4;38:2::255::;58:2:::255:m		[4;38:2::255::;58:2:::255:mRed Foreground with Green Underline Color
\e[4;58:2::::255m			[4;58:2::::255mBlue Underline Color
\e[4;58:5:144m				[4;58:5:144mIndex256 (index = 144) Underline Color
\e[4m;\e[58:5:112m\e[59\e[4:0m		Only Underline---[58:5:112mNow with Some Color---Color Removed---[4:0mUnderline Removed
\e[4:1m\e[4:2m\[4m\e[24m		[4:1m Single Underline---[4:2mDouble Underline---Back to Single---No Underline
\e[4;58:2::::255m			[4;58:2::::255mBlue Underline Color
\e[4;33m				Default Underline Color follows Foreground
\e[4;33;1m				Default Underline Color follows Foreground (Intense)
\e[4;36;2m				Default Underline Color follows Foreground (Faint)
\e[4;36;58:5:122;2m			[4;36;58:5:122;2mUnderline Color (when set) doesn't follow the Faint
\e[4;36;7m				Underline Color follows the Reverse Video if it's Default
\e[4;36;58:5:122;7m			[4;36;58:5:122;7mUnderline Color (when set) doesn't follow the Reverse Video
\e[4;36;58:5:122;8m			[4;36;58:5:122;8mUnderline Color follows the Invisible attribute (that's invisible)

( is just "\e")

conhost too:

@tusharsnx Thank you for persisting through this! The PR is amazing. If you have any questions whatsoever regarding the rendering code, please feel free to direct them to me. 🙂

So I think it would probably be best to make the default case the same as a single underline, like a placeholder for future underline styles we may assign to those values. And make sure that both the Renderer::s_GetGridlines and VtEngine::_SetUnderlineExtended are handling them the same way, so the results are the same in both conhost and WT.

@j4james I've made the changes 👍

I haven't really reviewed the code, but I've tested a build of the PR (with some rendering hacked in so I could see what it was doing)

I can understand that.
I've made these examples with WezTerm as the frontend:

Basic example:

DECCARA

DECRARA (when things work fine)

DECRARA (when things go wacky)

Neovim:

Thanks for doing all of this, and for complying with ours (and James') requests. I'm so stoked to finally land this, but I'll give you a couple minutes (or hours, depending on whether you're around!) to chat about open comments before I smash Merge.

Congrats 😁

Thanks ! 🫶


Fix backward compat with old cephfs_pools format

Previously cephfs_pools items used to have a pgs: key but not
pgp_num: nor pg_num:

Could you amend your commit and add a signoff ?

Unrelated CI failure due to missing nfs-ganesha packages upstream.


Drop python 3.6

Python 3.6 reached end of life two months ago. It is failing tests because anndata v0.8 doesn't install of py 3.6 and the version mismatch caused an error (see https://github.com/theislab/anndata/issues/739) -- imho I'd rather drop the unsupported python than pin down anndata.
Submission type

[X] This submission fixes a bug

Testing

[X] This submission was written on a forked copy of SingleCellOpenProblems
[x] GitHub Actions "Run Benchmark" tests are passing on this base branch of this pull request (include link to passed test: https://github.com/scottgigante-immunai/openproblems/runs/5587767184?check_suite_focus=true)
[X] If this pull request is not ready for review (including passing the "Run Benchmark" tests), I will open this PR as a draft (click on the down arrow next to the "Create Pull Request" button)

Submission guidelines

[X] This submission follows the guidelines in our Contributing document
[X] I have checked to ensure there aren't other open Pull Requests for the same update/change

PR review checklist
This PR will be evaluated on the basis of the following checks:

[X] The latest version of master is merged and tested

Turns out the anndata problem is maybe more complicated than I thought.

Generally I agree with dropping python 3.6 support... but why are CI tests failing here? I can't seem to find the log anymore.

This was failing due to the anndata 0.8 issue which is now resolved; however I'm having second thoughts because the scvis container is explicitly calling for py3.6. Not sure how to handle that except maybe to put this on ice for now.

I don't know much about it to be honest. Someone added it during the Jamboree and there didn't seem any reason at the time not to include it. If the core people want to make a call on a minimal Python version that is supported that seems reasonable to me.

Given lack of response by scvis authors, I'm happy to drop it.


feat(markdown): add rainbow headlines

Close #492
Colors taken from catppuccin style guide rainbow highlights

Can we match the color of the '#' to the color of the texts?


Added map-pin-off, navigation-off & navigation-off-2

As per #119 and https://github.com/feathericons/feather/issues/841

nice icons!
I think the name of navigation-off-2 should be changed tonavigation-2-off


fix: postgresql raw query ILIKE example

fix: postgresql raw query ILIKE example

Thanks for the PR! @millsp can you confirm this is correct please 😄

That should already fixed in my other PR :+1:

thanks for the review! feel free to close if it's not needed :)

Yep, looks like this was already fixed, but thanks @simone-sanfratello!


Fix preview size

Resolved / Related Issues
When the application window is resized and the PreviewPane is opened, the content size shrinks to keep the same size for the PreviewPane. This is the proper behavior.
But if we reduce too much, the content reaches the minimum possible size but the size of the PreviewPane is not reduced. This cannot be seen directly because the content of the PreviewPane adapts to the visible part. But the grid is too big and this can be seen in the InnerToolbar which no longer displays the elements on the right, which are displayed outside the available space. It also causes the PreviewPane to get the wrong size if you close it and reopen it. #9093
Details of Changes
Add an event to adapt the size of the PreviewPane when the size of the window is modified and the content has its minimum size.
Validation
How did you test these changes?

[x] Built and ran the app
[ ] Tested the changes for accessibility

Screenshots (optional)
Before/After
https://user-images.githubusercontent.com/46631671/167406957-d6ae5abc-b1c8-4903-a2ba-ab026bf0353e.mp4
https://user-images.githubusercontent.com/46631671/167405735-4f8e33e8-0c38-4499-9a89-c5abdc73800a.mp4

@cinqmilleans before merging this, it looks like the issue is already resolved in the main branch. The visual state is broken though so we should still take that fix.

@yaichenbaum I'm not sure I understand your comment. This bug is not yet fixed in the main branch.

@cinqmilleans I can't reproduce it locally, can you make sure you have the latest commit?

@yaichenbaum I just tested on the most up-to-date version of main, and there is the bug. To reproduce it, follow the instructions given here #9093. It takes a wide window, enlarge the PreviewPane almost to the maximum and reduce the window. You can see it in my "before" video at 11s.

@yaichenbaum I just tested on the most up-to-date version of main, and there is the bug. To reproduce it, follow the instructions given here #9093. It takes a wide window, enlarge the PreviewPane almost to the maximum and reduce the window. You can see it in my "before" video at 11s.

I still can't reproduce the issue, looking at the screen recording, it appears that you're testing an older version.

The video was made with the sideload version. The bug is still present in the latest version of main, as I just checked (commit 3df71f1f717ab67840bf10a04ef60cc3264caeab).

The video was made with the sideload version. The bug is still present in the latest version of main, as I just checked (commit 3df71f1).

Can you upload a screen recording of the version in main so I can compare the results?

@yaichenbaum Here.
https://user-images.githubusercontent.com/46631671/167614598-e980474e-e543-40fd-add1-1aa67d95daf2.mp4

@cinqmilleans I see the issue now, I thought you were talking about the column sizes changing in the details pane. I think this can all be solved by adjusting the xaml controls so we're going to hold off on this until after v2.3.

I fixed the merge, which was broken. I retested to validate the bug fix. This pr was pending release of version 2.3.

Instead of handling this in codebehind, is this something we can handle with a visual state?

looks good

@d2dyno1 do you think we should use visual states here?

I guess using visual states there would only make things harder

I guess using visual states there would only make things harder

In what way? I find it easier when everything is done in xaml, it helps prevent surprises.

@yaichenbaum Settings are saved in the code behind if you take a look, won't be possible with xaml only iirc


Add a color-scheme option to pdf.js

Hi everyone reading this!
This is my first PR for pdf.js so a fair warning that I might have done things that are considered not "best practices".
This PR is mainly to resolve #2071 as I'm getting tired of whipping out a external PDF Viewer to not eyestrain while reading PDF's.
Having this automatically implemented within the browser(Firefox) is a feature I really loved to see, and thereby currently extensions like Dark Reader(DISCLAIMER: I'm the maintainer) cannot access the pdf files on Firefox, so it was basically my only option to see such feature in Firefox.
I'm really looking towards fixing issues being raised and answering how this whole thing actually works and of course the moment that's being merged ;).
Preview:

Regards,
Gusted

* First of all you should _not_ be changing the UI of the viewer it in this way, since there's already a preference `viewerCssTheme` used for that purpose and the toolbar buttons shouldn't be modifying the viewer itself (only the actual PDF document).

As a new-user I would "kind of" expect if I select such option to have the whole UI change with it. But no hassle to remove that bit of code.

Secondly, looking at the actual color-inversion part of the actual PDF document

Luckily that code is only used for images as they somehow will need to be changed to - I actually haven't really got much of testing with that code and the images as I only could find a 1BIT_Images.pdf which is working as intended with that code.
About the code in speaking, it's a much more simplifies version of something we use in Dark Reader, to have a "natural" color inversion with some options to play with the sepia/brightness.
Also it's used for the setStrokeRGBColor and setFillRGBColor this is mainly to satisfy the "graphs" on the default loaded .pdf as they set a white color as background and on top of that paint the graph, which will look worse when painted without any color inversion.
So that part is pure to satisfy images-like and graphs on documents.

Can we not simplify all of this considerably, by using a CSS-only approach

I've looked into it, and I'm not really satisfied by the result, especially because invert and hue-rotate will caus the render-engine(Both chromium and firefox) to have this purple-ish sub-pixels on rendering text and some other elements. It's a side-effect of that approach which is something that my currently native pdf-viewer does and that doesn't satisfy my eyes either. That's why I went with this approach to not have such side-effect and have a more natural feeling.

Sorry, but anything related to the existing viewerCssTheme handling would need to be removed.

No problems, fixed.

Is there also not a risk that all the added checks, in various (potentially hot) parts of the src/display/canvas.js code could have a performance impact for all documents even in the "normal" colour mode?

for "normal" colour mode, it shouldn't be a problem, modern and even older browsers are very fast at checking properties for truthiness. For when "dark" colour mode is enabled, it will yes iterate over the images chunks and over the pixels, that is the only "big" hassle I could see when bench marking, the modifyColor is pretty fast and has caching implemented where available and should be for the setStrokeRGBColor and setFillRGBColor not a big problem in my eyes.

Maybe a CSS-only approach isn't perfect, but would it not be "good enough" for many cases!?

If the PDF is simply a text-only. With some title's. Yeah it would be a suit-able? Other then the rendering of purple-ish sub-pixels. But if even a small images or graphs comes into place, I wouldn't even remotely recommending it.
As for the test-cases, it seems like gulp test doesn't run the gulp unittest command that explicitly test for all test cases, Ill be looking into running those unittests on the code.

I've had some success with the unittest after finally downloading them all(got a lot of times where network got dropped), luckily they are all passing with the current changes, however I imagine they will also need to be checked on dark-mode? Any recommended way to do so?

https://github.com/mozilla/pdf.js/pull/13676/commits/fd222626aa79424f8709b8cad0cfea92466f1def removes the modifying images code. Thus results to less more code being changed in src/display/canvas.js and now being minimal, and only does the modifying color of stroke/fill and actually make sure that the drawn text is being the correct color.

https://github.com/mozilla/pdf.js/pull/13676/commits/4e04a74a7a6885c3587d0e56ceb1c1d7dd83812d makes the color_utils.js more minimal and combined with the previous commit removes around ~200 LOC with having minimal impact on the PR.

for "normal" colour mode, it shouldn't be a problem, modern and even older browsers are very fast at checking properties for truthiness.

Apart from the readability/maintainability aspect of all this (untested) code being sprinkled throughout the src/display/canvas.js file, there's (even in the last version) also the potential performance issue of the repeated and for normal rendering completely unnecessary updating of the canvas-context fillStyle for every single text-rendering operation. That really doesn't feel great at all, as far as I'm concerned!
Again, for all of the reasons already mentioned, a CSS-only solution definitely seem to be the way to go here. /cc @timvandermeij What's your opinion on this patch?

also the potential performance issue of the repeated and for normal rendering completely unnecessary updating of the canvas-context fillStyle for every single text-rendering operation.

I could check for the current fillStyle/strokeStyle and only update when necessarry but these 2 properties are being modified(my understanding) and I don't have any assurance when the text is being rendered that the correct styles are the correct color.

That really doesn't feel great at all, as far as I'm concerned!

I get that, I don't like it either.

a CSS-only solution definitely seem to be the way to go here.

This is going to be a agree to disagree situation on that.

I agree with @Snuffleupagus that this is quite a lot of code for something that should be much simpler to address with CSS. It might not give perfect results, but to be honest looking at https://user-images.githubusercontent.com/25481501/124488836-d8b1c680-dd9f-11eb-9241-3b189003b24f.png doesn't quite look good to me as well. I find the text quite hard to read because because of the color change; the letters aren't "crisp" anymore and look like they consist of multiple colors of pixels instead of being white.
Actually, I think the images from the simple CSS invert solution in https://github.com/mozilla/pdf.js/issues/2071 look much better to me. If I look at https://user-images.githubusercontent.com/37630203/116760785-7a3b3580-aa48-11eb-9051-443a33d9402a.png the text is much more "crisp" and evenly colored, which makes me wonder why the CSS solution wouldn't just suffice here?!

, which makes me wonder why the CSS solution wouldn't just suffice here?!

Honestly, I've worked quite hard on this system that now the PR is, took me a good couple of days. And the CSS Filter doesn't really spark interest in me. Because any issues raised with them will be way way harder to fix. Because such filter affect every element at once and not individually. Thereby this is just an opinion that the filter is way too dark, but that can be fixed, to be more inline with the dark cssViewerTheme.
About the "crisp", my current setup with fonts and Firefox isn't the best and shouldn't be used for reference, the "broken" crispness is to fix some issue with my current monitor.
Il get this PR changed a CSS alternative.

So, 1 of the downside of filter, any colors, won't have the original "color",  we mainly resolve that with the hue-rotate(180deg) which gives you a slightly different color of the original but still in the same spectrum. However adding such filter-function will cause this "crisp" on text-rendering.
So it's either no crisp but have incorrect-coloring.
Or have crisp on text but have better coloring which makes more sense.

Comparison:
Better coloring but crisp:

Incorrect coloring but no crisp:

I'm a little bit disappointed that @Gusted's work isn't getting attention anymore.
He was clearly listening to your opinions and putting work in. Both of the images above look good enough to me, either options is so much better than nothing.

Isn't there a better way to implement this to take the PDF internally and swap the default colors so that the background and foreground text colors are different?
This way pictures would look normal.

Isn't there a better way to implement this to take the PDF internally and swap the default colors so that the background and foreground text colors are different?
This way pictures would look normal.

Ah well, that was my first thought too(see earlier comments) and it was the implementation I had created at first. However the pdf.js team disagrees with this and prefers to use filter which makes these pictures looks weird.
If the pdf.js team still wants to use this CSS implementation rather than the modifying color(which is still in the commit history) then I will be closing the PR as I don't like nor want that kind of implementation be the way it should be, it's poor and not the correct way to do this. I don't want my name signed off on this feature with such a poor implementation.

@Gusted
Why dark-theme is not completely black on the background?

Why dark-theme is not completely black on the background?

Pure black isn't natural to look at, it's only interesting for people with a amoled screen and most of those are phone users anyway. Looking at a lighter shade of black makes it more natural to look at than pure black.

Pure black isn't natural to look at, it's only interesting for people with a amoled screen and most of those are phone users anyway. Looking at a lighter shade of black makes it more natural to look at than pure black.

I believe pure-black is healtier for the eye and easier to detect white fonts. If you try https://darkreader.org to read pdf, it does uses pure black on the end.

I made an add-on for the viewer that does this (and a bit more). Live demo here (color scheme can be changed from the toolbar).
It employs the same tactic as @Gusted's original patch, of modifying the Canvas drawing on the go. However instead of patching the PDF.js source I wrote it as an external script. Clearly there is a performance impact (probably more than Gusted's). But as Gusted said the CSS-filter method is suboptimal experience-wise (my add-on includes it only as a fallback option).
It's not pretty, a bit too fancy (what it does) and, as @Snuffleupagus said, a lot of complexity for the maintainers. So I didn't imagine it getting merged anyway, and that's where stuff like this would actually be ideal as add-ons. It's really unfortunate Firefox add-ons don't work on the built-in viewer.
I guess I might be able put together a custom viewer with my add-on on top and make it into a Firefox extension, and make it the default PDF viewer.. but then it'd be unnecessary bloat, and also elicit the refrain oft-repeated here:

... that it not just be an unmodified version. Please re-skin it or build upon it.

Can we have the maintainers' take on this? I hope I am clear that my only intention is to extend the default viewer, not to "monkey patch" it. This seems to be the only way, at least till PDF.js natively supports add-ons.
It does what I want (view PDFs in eye-friendly colors), and I don't mind the performance hit most of the time. It seems a lot of users desire the same and IMHO we are being held back by mere technicalities here.

Let's close this PR for now, given the differing opinions and perspectives regarding how this could be implemented.
(As mentioned previously, an implementation that requires adding a bunch of branches/checks sprinkled throughout the src/display/canvas.js file will unfortunately have negative effects on overall readability, maintainability, and performance.)
Please note that #2071 is still open for tracking this issue.

I guess I might be able put together a custom viewer with my add-on on top and make it into a Firefox extension

https://github.com/shivaprsd/doqment
For anyone who wants this feature now.


Supporting Typed CSS OM on CanIUse

Will the Typed CSS OM be tracked on CanIUse sometime soon? https://www.w3.org/TR/css-typed-om-1/

Duplicate of #4164?

Ah, for some reason a search didn't match, thanks!


Acceptance criteria are met

Description
Acceptance criteria are met
Acceptance criteria

Tasks

[ ]

I have decided to move this to the current iteration as we should do this anyway already at the moment. Let's discuss it briefly during our daily.


Background for POI cards label is inherited from "outdoor" category color

There's no explicit color defined for POI (and I'm not sure it's really relevant).
But the point is that the background is inherited from the "outdoor" category.
https://github.com/GeotrekCE/Geotrek-rando-v3/blob/main/frontend/src/components/pages/search/components/ResultCard/getActivityColor.ts#L31
This is how it could look on a trek page for example (purple on the left and pink on the right)

Would it be better to define POIs color with the primary1 color, as for the POIs on the map?

Yes it should not use Outdoor color, and should rather the global and generic primary1 color.

The best solution is to offer a "poi" settings that lets you define a custom color (with a fallback to the primary color if it's not defined), and also apply this color in the map's POI marker.


Enable multiple channels in pub/sub

The subscribe command in redis allows it to be subscribed to multiple channels. This pull request enables multiple channels by allowing to pass lists to the subscribe/psubscribe methods. It then checks if it is a list or the default and handles this accordingly.
Please bear with me as I am fairly new to the elixir language, any criticism and/or help in getting better is appreciated.

Nice commit and code, without remarks, keep learning and thanks!


Add a guard for Null Pointer Exception

This is causing a Null Pointer Exception, there seems to be a similar check in deleteLeft() method but seems to have gotten missed here in the deleteRight() method. Please also merge this in r7.74.1 as we are using that version in Prod and need to patch that as soon as possible.
Thank you for submitting this pull request
NOTE!: Double check the target branch for this PR.
The default is main so it will target Drools 8 / Kogito.
If this PR is not strictly related to drools and kogito project in drools.git, it should probably target 7.xas a branch
Ports If a forward-port or a backport is needed, paste the forward port PR here
link
JIRA: (please edit the JIRA link if it exists)
link
referenced Pull Requests: (please edit the URLs of referenced pullrequests if they exist)

paste the link(s) from GitHub here
link 2
link 3 etc.

How to replicate CI configuration locally?

Build Chain tool does "simple" maven build(s), the builds are just Maven commands, but because the repositories relates and depends on each other and any change in API or class method could affect several of those repositories there is a need to use build-chain tool to handle cross repository builds and be sure that we always use latest version of the code for each repository.
build-chain tool is a build tool which can be used on command line locally or in Github Actions workflow(s), in case you need to change multiple repositories and send multiple dependent pull requests related with a change you can easily reproduce the same build by executing it on Github hosted environment or locally in your development environment. See local execution details to get more information about it.

How to retest this PR or trigger a specific build:

for pull request checks
Please add comment: Jenkins retest this

for a specific pull request check
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] tests

for a full downstream build

for jenkins job: please add comment: Jenkins run fdb
for github actions job: add the label run_fdb

a compile downstream build please  add comment: Jenkins run cdb

an upstream build please add comment: Jenkins run upstream

for quarkus branch checks
Run checks against Quarkus current used branch
Please add comment: Jenkins run quarkus-branch

for a quarkus branch specific check
Run checks against Quarkus current used branch
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] quarkus-branch

for quarkus main checks
Run checks against Quarkus main branch
Please add comment: Jenkins run quarkus-main

for a specific quarkus main check
Run checks against Quarkus main branch
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] quarkus-main

for quarkus lts checks
Run checks against Quarkus lts branch
Please add comment: Jenkins run quarkus-lts

for a specific quarkus lts check
Run checks against Quarkus lts branch
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] quarkus-lts

for native checks
Run native checks
Please add comment: Jenkins run native

for a specific native check
Run native checks
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] native

for native lts checks
Run native checks against quarkus lts branch
Please add comment: Jenkins run native-lts

for a specific native lts check
Run native checks against quarkus lts branch
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] native-lts

How to backport a pull request to a different branch?

In order to automatically create a backporting pull request please add one or more labels having the following format backport-<branch-name>, where <branch-name> is the name of the branch where the pull request must be backported to (e.g., backport-7.67.x to backport the original PR to the 7.67.x branch).

NOTE: backporting is an action aiming to move a change (usually a commit) from a branch (usually the main one) to another one, which is generally referring to a still maintained release branch. Keeping it simple: it is about to move a specific change or a set of them from one branch to another.

Once the original pull request is successfully merged, the automated action will create one backporting pull request per each label (with the previous format) that has been added.
If something goes wrong, the author will be notified and at this point a manual backporting is needed.

NOTE: this automated backporting is triggered whenever a pull request on main branch is labeled or closed, but both conditions must be satisfied to get the new PR created.

@mariofusco I will try to recreate it in a separate project, as it threw this NPE in production in a very complicated scenario. Regardless of whether or not I am able to recreate this, I suggest this change be pulled anyway as it is very clear that this could throw an NPE anytime, and a similar check is also present in the deleteLeft() method below.

I suggest this change be pulled anyway as it is very clear that this could throw an NPE anytime.

Sorry but no, this is not how we work generally. All the null checks that we have are there for a valid reason, and without a reproducer I cannot know if in this case it is valid or not. In many cases adding a null check is not a fix, but only a workaround for a bug that is happening somewhere else along the rules evaluation chain. When this happens simply adding the null checks is not acceptable because it doesn't fix the root cause of the problem, but conversely just hides the error, propagating it even further and making it even harder to be investigated. When I add a null check I'm saying "I know why and in which circumstance this value could be null and it is expected and acceptable to be it" and not "let's add one more null check just in case".

If you're still having this problem please feel free to provide a reproducer and reopen this pull request or submit another one.


Reducing Filter Configuration Boilerplate

Currently most of the boilerplate in writing a filter, is writing a configuration that is statically and dynamically configurable. Right now, you essentially have to write twice, once in Rust and another in Protobuf. I'd like to propose that we try to generate one these representations from the other, so that we can much more easily iterate and add to a filter's configuration. This would come in the form of a tool that is either run separately, or as part of the build process.

Protobuf -> Rust

The issue with this route is that the protobuf parsers in Rust, aren't at the same level quality as the Rust parser libraries. So we'd have to put more work in the parser than I think would be worth it.

Rust -> Protobuf

I think this the most realistic both in terms of the implementation as well as flexibility, as we can do a lot more in Rust than we can in Protobuf.

One way we could do this is have a procedural macro for the configuration struct, that generates protobuf files from their type  definitions, and then dump the generated definition into the folder, so you'd have to run cargo build after changing a configuration struct to generate the update protobuf, but that seems reasonable and in return we wouldn't have to manually edit protobuf definitions.
// src/lib.rs
quilkin::generate_config_protobufs!("proto/quilkin");

// src/filters/capture_bytes.rs

#[derive(quilkin::ConfigEnum)]
enum Strategy {
    #[quilkin(rename = "PREFIX")]
    /// Looks for the set of bytes at the beginning of the packet
    Prefix = 0,
    #[quilkin(rename = "SUFFIX")]
    /// Look for the set of bytes at the end of the packet
    Suffix = 1,
}

#[derive(quilkin::Config)]
struct Config {
    #[quilkin(default)]
    strategy: Strategy,
    /// the number of bytes to capture
    #[quilkin(rename = "size")]
    size: usize,
    /// the key to use when storing the captured bytes in the filter context
    #[quilkin(rename = "metadataKey")]
    #[quilkin(default = "default_metadata_key")]
    metadata_key: String,
    /// whether or not to remove the set of the bytes from the packet once captured
    #[quilkin(default = "default_remove")]
    remove: bool,
}

I love this idea, because the double definition of models for each config type annoys me no end. 🥳
I'm also being the Rust -> Protobuf - the other thing we could do is have some opinionated defaults on how the protobuf gets generated (or maybe even start with not even letting people have the option).
For example, above we have #[quilkin(rename = "metadataKey")] - but if we have strong opinions on how the protobuf should be generated, and we would be doing code reviews to ensure that people align with that standard - we might not want to give them the option to do anything other than convert metadata_key ➡  metadataKey ... or maybe a better idea is that we could build in linting tools into the macro that would let you write snake_case -- or something like that 😄 .
🤔 I might lean towards this being part of our build.rs than a tool that is manually run, since it will get rebuilt automatically on each compile, and there is less for new developers to do -- but we could also build it into our CI pipeline to run the tool and see if there is any difference in the .proto files (which helps us, but not others that use this as a library 🤔 ).
What are your thoughts on build.rs vs manual tool?

Thinking on it more, I think it makes sense to run on every build. Also to clarify, I don't think this would run in build.rs, we should run this as a proc macro, as it makes it easier to catch all of the configuration in the crate. Like the above syntax should work as-is with this macro IMO.

the other thing we could do is have some opinionated defaults on how the protobuf gets generated (or maybe even start with not even letting people have the option).

I don't have any opinions on Protobuf style (yet 😄) as this is my first production project using it. But I do think we should try to use or have some convention that we follow and make that the easy path. I don't see a problem with having a rename attribute as an escape hatch if you need it but it should be the uncommon case.

Working #358 I've realised that this problem is actually a bit bigger than the filter configuration, as there are types we want to use in configurations as well as use in filters such as the Endpoint type. Now with the addition of #360 now requiring a Go representation of the configuration, as well as #13 requiring a representation that can safely used across a VM/language barrier.
This brings us up to five potential different representations of a type (Rust, Go, Protobuf, YAML/JSON, FFI). Implementing all of those for each type would be a lot of work, and is not really sustainable to maintain. What I'd like to propose is instead that we create a Quilkin a data model layer between the types and the formats (similar to how serde works), that essentially represents the same types as JSON/YAML, but we can use this layer to have all types that implement Quilkin's data model have a single implementation and generate the five different representations from this data model. This would also make it easier to replace, add, or remove formats in the future as new formats only need to implement translating from Quilkin's data model to their format.

What I'd like to propose is instead that we create a Quilkin data model layer between the types and the formats (similar to how serde works), that essentially represents the same types as JSON/YAML, but we can use this layer to have all types that implement Quilkin's data model have a single implementation and generate the five different representations from this data model.

To confirm - I'm assuming this would still be a series of macros (much like serde/what is above) that would be applied to our config data models as well as our Filter config, and users that write their own custom models as well.
This makes a lot of sense to me.
Small thing:

This brings us up to five potential different representations of a type (Rust, Go, Protobuf, YAML/JSON, FFI)

I think the Go representation would come from the generated proto, so I don't think we need to concern ourselves with that layer in Quilkin.
@iffyio Would this affect the xDS layer at all? Make that more complicated / easier / the same? I can't think of any concerns, but figured I would ask.

@XAMPPRocky could you give some pseudocode+config examples of what this would look like? I'm not too sure I understand what's being proposed beyond the rust->protobuf side of things unfortunately. My current assumption is that we still specify a config as a struct then the macro generates pretty much all formats or maybe only some formats (if e.g the go would still come from protobuf)? Then where does the quilkin data model layer and translation between layers fit in (is it the macro also generating code that translate between any two layers)? Or is this something else entirely? I don't think I have a picture of it yet unfortunately.

I think the Go representation would come from the generated proto, so I don't think we need to concern ourselves with that layer in Quilkin.

Looking at #360 there's types here that aren't part of the protobuf that we need to generate.
https://github.com/googleforgames/quilkin/blob/2787e967c9652a94fcdd1d0a2ce86db11e6c5934/examples/xds-management-server/pkg/resources/resources.go#L23-L49

could you give some pseudocode+config examples of what this would look like?

Sure, the configuration as it stands today should be entirely the same, the only things we're changing is what code is generated, and how we encode/decode to a format like YAML or Protobuf. At compile-time, the macro generates three representations of the config. Protobuf schema, Go, and Rust. The Rust generated code uses a layer between the type and the runtime format, so that we can decouple the types from the format.
I've written a basic example of what this could look like for boolean types, in reality we'd have probably at least the same kind of types as YAML. While this pattern has a bit of boilerplate it's incredibly powerful, and hopefully it shows enough to demonstrate how we can take advantage of this kind of layout going forward. We only implement formats in terms of Quilkin's layer, which is then transformed into JSON, YAML, or Protobuf. This design means that now whenever we have any bool like type, we just call serialise_bool on it, and through the traits we now have a single implementation of that type that works with JSON, YAML, and Protobuf. This also means we can add and remove formats as we want without also having to refactor the types in the codebase, you just add or remove the Serializer/Deserializer implementations and they support all types that implement the traits.
// Abstract traits that represent encoding and decoding a type into Quilkin's "data layer".
pub trait Serializer {
    fn serialize_bool(&mut self, value: bool) -> Result<()>;
}

pub trait Deserializer {
    fn deserialize_bool(&mut self) -> Result<bool>;
}

pub trait Serialize {
    fn encode<S>(&self, encoder: &mut S) -> Result<()> where S: Serializer;
}

pub trait Deserialize {
    fn decode<D>(decoder: &mut D) -> Result<Self> where D: Deserializer;
}

// Implementations for types

impl Deserialize for bool {
    fn decode<D>(decoder: &mut D) -> Result<Self> where D: Deserializer {
        decoder.decode_bool()
    }
}

impl Serialize for bool {
    fn encode<S>(&self, encoder: &mut S) -> Result<()> where S: Serializer {
        encoder.encode_bool(self)
    }
}

// Serializer formats

struct JsonEncoder {
    ser: serde_json::Serializer,
}

struct YamlEncoder {
    ser: serde_yaml::Serializer,
}

struct ProtobufEncoder {
    buf: Vec<u8>
}

impl Serializer for Json {
    fn serialize_bool(&mut self, value: bool) -> Result<()> {
         self.ser.encode_bool(value)
    }
}

impl Serializer for Yaml {
    fn serialize_bool(&mut self, value: bool) -> Result<()> {
         self.ser.encode_bool(value)
    }
}

impl Serializer for Protobuf {
    fn serialize_bool(&mut self, value: bool) -> Result<()> {
         prost::Message::encode(value, &mut self.buf)
    }
}

// Deserializer formats

struct JsonDecoder {
    de: serde_json::Deserializer,
}

struct YamlDecoder {
    de: serde_yaml:: Deserializer,
}

struct ProtobufDecoder<'input> {
    buf: &'input mut [u8]
}

impl Deserializer for JsonDecoder {
    fn deserialize_bool(&mut self) -> Result<bool> {
         self.de.decode_bool()
    }
}

impl Deserializer for YamlDecoder {
    fn deserialize_bool(&mut self) -> Result<bool> {
         self.de.decode_bool()
    }
}

impl Deserializer for ProtobufDecoder<'_> {
    fn serialize_bool(&mut self, value: bool) -> Result<()> {
         prost::Message::decode_length_delimited::<bool>(value, self.buf)
    }
}

This definitely makes a lot of sense to me.
On the point of Go types, I'm going to go back to #360 - because either (a) those specific types (like Endpoint), don't changes, they are set to the specifications of xDS or (b) we can generate the Filter specific configs from protobuf - but I think that's a minor point to the overall strategy, which makes perfect sense to me 👍🏻


Introduce livereload for reloading page

It rocks!

r?=@EragonJ
Flags<EMAIL_ADDRESS>

There are some bugs in this PR and would break gulp build

@rickychien , I just merged the patch on https://github.com/EragonJ/Kaku/commit/7ce58e56129de7f2e897c0b384d7ecaee29da1f5 , thanks !!


Stopped

Just installed via go install, but application is going to background instantly:
$ rclone-tui

[1]+  Stopped                 rclone-tui

How can I debug this issue?
update: its working if I'm using the pre-compiled binary

Apparently go module has cached a buggy version of this repo, I'll try correcting it now

I will have to release a new version to retract the buggy cached version in proxy.golang.org, upon which I will close this issue.

thanks, its working!


Feature add airflow

What's changed?
Support airflow monitor
Checklist

[x] I have read the [Contributing Guide](https://hertzbeat.com/docs/others/contributing/)
[x] I have written the necessary doc or comment.
[ ] I have added the necessary unit tests and all cases have passed.

@all-contributors please add @luoxuanzao for code


Encrypt content using Crypt::encryptString instead of encrypt() fn

The Crypt::encryptString works best. The encrypt() fn serializes the content using PHP's serialization...
We'd have to introduce a new option for the attributes configuration. Otherwise, package users using the current encryption settings would have to re-encrypt their encrypted data.
Something like:
class Document extends Model
{
  use HasRichText;

  protected $richTextAttributes = [
    'content' => ['encrypted_string' => true],
  ];
}

Fields using the old 'encrypted' => true wouldn't be affected by the change.
If users want to migrate from the previous encryption method to the current one, they could still do that by:

Add a new 'new_content' => ['encrypted_string' => true] field on their model
Add a new migration that would do $document->update(['new_content' => $document->content?->toTrixHtml()])
Start using the new_content attribute on the application
(new deploy) Add a new migration to delete the old content attributes $document->richTextContent?->delete()
(new deploy) Change the old 'content' => ['encrypted' => true] to 'content' => ['encrypted_string' => true]
Add a new migration that would do `$document->update(['content' => $document->new_content?->toTrixHtml()])
Revert to using content attribute on the application
(new deploy) Add a new migration to delete the old content attributes $document->richTextNewContent?->delete()
(new deploy) Remove the new_content attribute from the rich text attributes list

Simpler instructions on migrating the data can be found in the 2.2.0 release notes.


Support for Arrays of Strings and objects.

class ThriftCatalog
{

    public boolean isSupportedStructFieldType(Type javaType)
    {
...
        if (rawType.isArray()) {
            Class<?> elementType = rawType.getComponentType();
            return isSupportedArrayComponentType(elementType);
        }
...

    public boolean isSupportedArrayComponentType(Class<?> componentType)
    {
        return boolean.class == componentType ||
                byte.class == componentType ||
                short.class == componentType ||
                int.class == componentType ||
                long.class == componentType ||
                double.class == componentType;
    }
...
}

Leaves us without support for Array[String] or Array[T extends Object], ...

When I added support for arrays a couple months back, I didn't add support for arrays of Objects, because I personally find them to be fairly useless, and it would have been annoying (I don't remember the specifics, other than it would have been annoying).  IMO, the only reason to use an array in Java is to build a higher level data structure, or for performance.  The performance gain only happens when the data is physically next together in memory, which means primitive objects.  When it comes to objects, you should just use one of the collection classes, which can be immutable and have the same performance.
That said, if you really, really, really want arrays of objects, send a pull request.  The tricky part will be the compiler, but it isn't that tricky.  An alternative implementation might be to add converters from Collection to T[], which might be doable without changing the byte code generator.

When I added support for arrays a couple months back, I didn't add support for arrays of Objects, because I personally find them to be fairly useless, and it would have been annoying (I don't remember the specifics, other than it would have been annoying).  IMO, the only reason to use an array in Java is to build a higher level data structure, or for performance.  The performance gain only happens when the data is physically next together in memory, which means primitive objects.  When it comes to objects, you should just use one of the collection classes, which can be immutable and have the same performance.
That said, if you really, really, really want arrays of objects, send a pull request.  The tricky part will be the compiler, but it isn't that tricky.  An alternative implementation might be to add converters from Collection to T[], which might be doable without changing the byte code generator.

Thank you for reporting this issue and appreciate your patience. We've  notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.


Update ApiBase.cs

return true, when we have the required scope(s)
scopes: "user_rates"
scope: "user_rates"
Method: Any - return true, All - return true - we have the NotInScopeException.

Thanks for your contribution, I appreciate it 👍


Implement window event listener

In order to make the different frames to talk to main window, Window.postmessage() must implement wherein it acts as a broadcaster to every element in the DOM that listens for events actively.
https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
These might help:
http://stackoverflow.com/questions/18464635/detect-event-from-iframe-works-with-jquery-event-listener-on-parent-but-now-wit
http://stackoverflow.com/questions/6452502/adding-click-event-handler-to-iframe
http://javascript.info/tutorial/cross-window-messaging-with-postmessage

(The same thing is in the google doc, I just add some notes about the links provided by Joseph and some documents about the method we are using.)
How it works: http://javascript.info/tutorial/cross-window-messaging-with-postmessage
Documents and References of related method(Syntax and Examples):
https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
Window.postMessage() (This method is used to post a custom message from the sending side to a desired destination. Also contains a nice example about how cross-window messaging are implemented.)
https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
EventTarget.addEventListener() (This method is used to add a listener to a specific event and react when that event is triggered. In this case, it is used at the receiving side to listen to the event “message”, i.e. the message sent by the sending side.)
https://developer.mozilla.org/en-US/docs/Web/Events
A Event Reference (Just a list of event type, pay attention to the  “message” event.)
Some related examples (Little bit hard to understand…):
http://stackoverflow.com/questions/6452502/adding-click-event-handler-to-iframe
Add click event handler to iFrame (Example about addEventListener() method.)
http://stackoverflow.com/questions/18464635/detect-event-from-iframe-works-with-jquery-event-listener-on-parent-but-now-wit
Detect event from iframe works with jQuery event listener on parent, but now with pure JS
(I didn’t quite understand this example, but it seems we can detect events other than “message” from the parent side. And this also provides us an option of using jQuery.)
Feel free to make changes and add comments, especially if you have any ideas about the second related examples… I will post anything that I think is useful.


Can't clear selected items

Hello everyone! Is there a way to clear selected items from multi select?
I have tried clearChoices, unhighlightAll - still no way to "unselect" values with js, thanks!

With new 9.0.0 same, ain't works

removeActiveItems works fine!


Java: Java Method Overriding

I want to contribute my code for the problem mentioned . Please assign this under hacktoberfest 2022 tag.
Problem statement- https://www.hackerrank.com/challenges/java-method-overriding

/assign

@sahilsarawagi Hey, Thanks for taking the issue😃!
Please note that it is considered a good practice to first wait till the issue is assigned to you, before working on it.


Switched QueueWriteTask to use the AsyncKeyedLock library

@PraxisMapper

@PraxisMapper

@PraxisMapper let me know what your intentions are so I can see whether or not to fix the conflict please.

I don't think I'm going to merge this.
Your library looks good, and this pointed out that I have a couple different places in my code with locks that needed consolidated. I do not want to add an external dependency to my project for this, since I'm not doing anything particularly complicated with locks where your library would be a bigger help.

OK. Though I'd suggest you at least release inside a finally block in case that AppendAllText throws an exception because then you'd have an issue.


Clarify how to run end-to-end tests

I added instructions on how to add and obtain your credentials and
what they are used for, and aligned the filename of the local .env
file across both browser-based and Node-based end-to-end tests.

Added b3d855b2 to clarify the reason Pat's local running of the end-to-end tests had a different result than on CI.


question about formula (2) and (5)

Hi @fanyangxyz ,
I am confused why formula (2) can  be converted into to formula (5). It seems like these two formulae are not equivalent and there is no explanation in paper. Would you mind tell me more details about this?

We are not intended to say that Eq (2) and Eq (5) are equivalent, but that rules parameterized using Eq (5) (or (6)-(8)) can be converted back to Eq (2), which is essentially what Algorithm 1 is about. Hope this helps.

Did you use the evaluation steps in the README? My guess is that your number is not the filtered hit@10.


FR: Add valueOf() to Timestamp instances

This is a clone of https://github.com/firebase/firebase-js-sdk/issues/2632.
[REQUIRED] Describe the problem
Unable to compare Timestamp instances with native comparators. Javascript calls valueOf() on the object and uses the results of that to do native comparisons.
Steps to reproduce:
Attempt to compare Timestamps directly.
Relevant Code:
firebase = require('firebase-admin')
a = new firebase.firestore.Timestamp(1, 1)
b = new firebase.firestore.Timestamp(2, 2)
console.log(a < b) // false
console.log(b < a) // false

Workaround
Of course you can simply call toMillis() and compare those, but having it auto handled would be better.

I've opened this ticket to apply the fix for https://github.com/firebase/firebase-js-sdk/issues/2632 here in this repository also.


Request for MSI GE73VR laptop keyboard/easy keyboard configurator

Hello there. Could you please add proper support for the MSI GE73VR keyboard? It uses the Steelseries engine as its base. If not, could you at least add an easy keyboard configurator? Like a drag and drop feature? Otherwise, I'm loving the program!

Does it light at all with just a standard layout selected?

It lights up almost all of them (it misses the "" key which exists twice on my keyboard for some reason) with a us key layout, but since the layout is non standard, the lights are ever so slightly off, with the home, delete, pg up and pg down being the biggest culprits.

(I had to modify the steelseries m750 script to get it to work as clost to normal as possible)


Why doesn't hack work on rx10 m1?

I tried so many times even with cmd window. But i couldn't achieve to bypass video limitation. I supposed rxm2 and m1 uses similar software. Why doesn't it work on m1? And could you find a solution for it?

hi ,i have the same problem on my Rx10 ,to change the japenees language menu ,please any issue? ,thanks

The RX10 does not support android apps. So for now, you're out of luck...

@korduo @redaaziouaz
There is a new experimental way to tweak settings on older cameras using the firmware update functionality. Read more about it here. Keep in mind that you are probably the first person to test this on an RX10, so your mileage may vary. If you attempt anything, please let us know!

Hi korduo or ma1co . How can i install the hack on a RX10 m1? the documentation didn't help me out. grtz

@korduo @redaaziouaz
There is a new experimental way to tweak settings on older cameras using the firmware update functionality. Read more about it here. Keep in mind that you are probably the first person to test this on an RX10, so your mileage may vary. If you attempt anything, please let us know!

Figured it out and it works. But be aware not to disable protection before unplugging from the computer. Because in that mode camera takes itself to macro mode and doesn't focus to anything. Thanks god it can be undone. Thanks for the info finally i bypass the movie recording time. 25.01.2018 20:23 tarihinde Yankı Garan yazdı:
…
Rx10 is not on the list. I tried it last year but didn't work out. You said firmware update functionality but i didn't understand how to do it. 25.01.2018 20:18 tarihinde Yankı Garan yazdı: > Hi, > I wanna do it but didn't understand what to do. > > 31.10.2017 00:01 tarihinde ma1co yazdı: >> >> @korduo https://github.com/korduo @redaaziouaz >> https://github.com/redaaziouaz >> There is a new experimental way to tweak settings on older cameras >> using the firmware update functionality. Read more about it here >> https://github.com/ma1co/Sony-PMCA-RE#tweaking-camera-settings. >> Keep in mind that you are probably the first person to test this on >> an RX10, so your mileage may vary. If you attempt anything, please >> let us know! >> >> — >> You are receiving this because you were mentioned. >> Reply to this email directly, view it on GitHub >> <#96 (comment)>, >> or mute the thread >> https://github.com/notifications/unsubscribe-auth/AUCw7ygwuU3nOU9lwbwyrltWEXzSTzAAks5sxjk4gaJpZM4Jj3mF. >> >

Figured it out and it works. But be aware not to disable protection before unplugging from the computer. Because in that mode camera takes itself to macro mode and doesn't focus to anything. Thanks god it can be undone. Thanks for the info finally i bypass the movie recording time. 25.01.2018 20:23 tarihinde Yankı Garan yazdı:
…
Rx10 is not on the list. I tried it last year but didn't work out. You said firmware update functionality but i didn't understand how to do it. 25.01.2018 20:18 tarihinde Yankı Garan yazdı: > Hi, > I wanna do it but didn't understand what to do. > > 31.10.2017 00:01 tarihinde ma1co yazdı: >> >> @korduo https://github.com/korduo @redaaziouaz >> https://github.com/redaaziouaz >> There is a new experimental way to tweak settings on older cameras >> using the firmware update functionality. Read more about it here >> https://github.com/ma1co/Sony-PMCA-RE#tweaking-camera-settings. >> Keep in mind that you are probably the first person to test this on >> an RX10, so your mileage may vary. If you attempt anything, please >> let us know! >> >> — >> You are receiving this because you were mentioned. >> Reply to this email directly, view it on GitHub >> <#96 (comment)>, >> or mute the thread >> https://github.com/notifications/unsubscribe-auth/AUCw7ygwuU3nOU9lwbwyrltWEXzSTzAAks5sxjk4gaJpZM4Jj3mF. >> >


[zlib] Restclient Build error

Host Environment

OS: [e.g. Windows/Linux etc...]
Compiler: revision

To Reproduce
Steps to reproduce the behavior:
./vcpkg install restclient-cpp
Failure logs
The following packages will be built and installed:

curl[core,non-http,schannel,ssl,sspi]:x86-windows -> 7.81.0
restclient-cpp[core]:x86-windows -> 0.5.2#1
zlib[core]:x86-windows -> 1.2.11#13
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x86-windows...
Restored 0 packages from C:\Users\sospo\AppData\Local\vcpkg\archives in 558.6 us. Use --debug to see more details.
Starting package 1/3: zlib:x86-windows
Building package zlib[core]:x86-windows...
-- Using cached zlib1211.tar.gz.
-- Cleaning sources at C:/libs/vcpkg/buildtrees/zlib/src/1.2.11-e9a093319e.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/libs/vcpkg/downloads/zlib1211.tar.gz
-- Applying patch cmake_dont_build_more_than_needed.patch
-- Applying patch 0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch
-- Applying patch add_debug_postfix_on_mingw.patch
-- Applying patch 0002-android-build-mingw.patch
-- Using source at C:/libs/vcpkg/buildtrees/zlib/src/1.2.11-e9a093319e.clean
-- Found external ninja('1.10.2').
-- Configuring x86-windows
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
Command failed: ninja -v
Working Directory: C:/libs/vcpkg/buildtrees/zlib/x86-windows-rel/vcpkg-parallel-configure
Error code: 1
See logs for more information:
C:\libs\vcpkg\buildtrees\zlib\config-x86-windows-out.log

Call Stack (most recent call first):
scripts/cmake/vcpkg_configure_cmake.cmake:345 (vcpkg_execute_required_process)
ports/zlib/portfile.cmake:23 (vcpkg_configure_cmake)
scripts/ports.cmake:142 (include)
Error: Building package zlib:x86-windows failed with: BUILD_FAILED
including:
package: zlib[core]:x86-windows -> 1.2.11#13
vcpkg-tool version: 2021-12-09-724cea8b33cbf06c645f5095fa29773697da9761
vcpkg-scripts version: 5ef52b5b7 2022-01-19 (9 hours ago)
Additional context
Attempted to download things listed here:
https://github.com/microsoft/vcpkg-tool/pull/314
through visual studio community's installer.
config-x86-windows-out.log

    LINK : fatal error LNK1104: cannot open file 'ucrtd.lib'
    ninja: build stopped: subcommand failed.

Please ensure you've installed the Windows SDK first.

We hope your question was answered to your satisfaction; if it wasn't, you can reopen with more info.


Support the SameSite attribute

Many thanks for your patch!

Thanks for the quick merge! Any ETA on cutting a release? I'd love to use this feature in prod at $work.

Just uploaded HTTP-XSCookies-0.000007.tar.gz to CPAN, so get it fresh in a
couple of hours!
Cheers,
Gonzo
On Fri, Feb 10, 2017 at 12:41 PM, James Raspass<EMAIL_ADDRESS>wrote:

Thanks for the quick merge! Any ETA on cutting a release? I'd love to use
this feature in prod at $work.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/gonzus/http-xscookies/pull/2#issuecomment-278923487,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAMuopR-Wgtc2NfvcsG7aqOME821vTp0ks5rbEzjgaJpZM4L8yYA
.

--
Gonzalo Diethelm


review if is right ?

review if is right  the next method?
https://github.com/openjaf/cenit/blob/develop/lib/mongoff/record.rb#L36
def save(options={})
  if errors.blank?
    errors.add(:base, "Save operation not supported on not loaded data type #{orm_model.data_type.title}")
  end
  false
end

maybe should be
def save(options={})
  if errors.present?
    errors.add(:base, "Save operation not supported on not loaded data type #{orm_model.data_type.title}")
     return false
  end
  true
end

The method is not right but it is not wrong. The save method on Mongoff records should save the record in a compatible way with Mongoid, but this is not yet implemented so the method always fails by returning false an report an error if errors.blank? These behavior prevents the use of these method until the a proper implementation is supplied.


"Python" doesn't appear in status bar

Issue Type: Bug
I recently installed the Python extension and made sure it was enabled. However, the "Python..." won't appear in the lower left corner and I'm unable to proceed. What can I do to resolve this issue?
Regards, Gabriel
Extension version: 2020.2.64397
VS Code version: Code 1.42.1 (c47d83b293181d9be64f27ff093689e8e7aed054, 2020-02-11T14:45:59.656Z)
OS version: Windows_NT x64 10.0.16299

System Info

Item
Value

CPUs
Intel(R) Core(TM) m3-7Y30 CPU @ 1.00GHz (4 x 1608)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: enabledrasterization: enabledskia_renderer: disabled_offsurface_control: disabled_offsurface_synchronization: enabled_onvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
3.90GB (0.44GB free)

Process Argv

Screen Reader
no

VM
0%

@GabrielNorell  Python extension won't activate unless you open a python file. Have you opened a python file? Another option is to use the command pallet and run Python: Select Interpreter command.

Thank you, I just realized that I hadn't even dowloaded the program itself (Python). As you hear, I'm quite the beginner.

@GabrielNorell Happy to help :) Closing this issue.


Feature: fix libmluops.so file symbol visibility

Thanks for your contribution and we appreciate it a lot.
1. Motivation
fix libmluops.so file symbol visibility issue.
2. Modification
bangc-ops/CMakeLists.txt
bangc-ops/build.sh
bangc-ops/gen_mluops.py
bangc-ops/test/mlu_op_gtest/CMakeLists.txt

测试报告：https://wiki.cambricon.com/pages/viewpage.action?pageId=240779458

[


feat(syntax): add AssignmentOperator::to_logical_operator and to_binary_operator methods

Add methods to convert AssignmentOperator to LogicalOperator or BinaryOperator. e.g. += -> +, &&= -> &&.

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#7011
#7122
#7351
#7350  👈 (View in Graphite)
#7349
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Merge activity

Nov 18, 8:06 PM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.


Port azure-core Models to JsonCapable

Description
Ports models in azure-core to implement JsonCapable instead of solely relying on Jackson Databind. The implementations in this PR will represent what AutoRest should generate when it begins writing JsonCapable implementations.
All SDK Contribution checklist:

[x] The pull request does not introduce [breaking changes]
[x] CHANGELOG is updated for new features, bug fixes or other significant changes.
[x] I have read the contribution guidelines.

General Guidelines and Best Practices

[x] Title of the pull request is clear and informative.
[x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[x] Pull request includes test coverage for the included changes.

API change check for com.azure:azure-core
API changes have been detected in com.azure:azure-core. You can review API changes here


nixos/keycloak: add realmFiles option

Description of changes
Enable realm imports during startup as described in the corresponding Keycloak guide.

Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

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

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

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

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

This is a nice feature, could you rebase the PR to resolve the merge conflict?

Sorry, I lost track of it. The merge conflict is resolved now.

We could also add a note to the 24.11 release notes about this new feature :)

Just thought about managing the realm files in /run/keycloak/... via systemd.tmpfiles? so if we remove one from the realmFiles option, it gets removed from the /run-directory too

For example
systemd.tmpfiles.rules = [
  "L+ /run/keycloak/data/import/myrealm.json - - - - "${pkgs.writeText "myrealm.json" builtins.toJSON realmJSON}"
];

I tested this but the links also don't get removed during rebuild when using systemd.tmpfiles. I don't see how systemd would clean up links, except we set an age. However, I'm very fine with using systemd.tmpfiles anyway instead of installing the realm files.


Switch to structured errors, inline encoding

This PR switches to "real" structured errors, and inlines an encoding step. Perf compared to current main:
encode 10_000 coordinates at precision 1e-5
                        time:   [176.72 µs 177.11 µs 177.57 µs]
                        change: [-7.9523% -7.6511% -7.3754%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild

encode 10_000 coordinates at precision 1e-6
                        time:   [207.34 µs 207.55 µs 207.81 µs]
                        change: [-4.6981% -4.4789% -4.1689%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 13 outliers among 100 measurements (13.00%)
  4 (4.00%) high mild
  9 (9.00%) high severe

decode 10_000 coordinates at precision 1e-5
                        time:   [101.06 µs 101.53 µs 102.02 µs]
                        change: [-34.622% -34.329% -34.044%] (p = 0.00 < 0.05)
                        Performance has improved.

decode 10_000 coordinates at precision 1e-6
                        time:   [120.94 µs 121.46 µs 122.02 µs]
                        change: [-30.601% -30.360% -30.095%] (p = 0.00 < 0.05)
                        Performance has improved.

The inlining improves encoding perf. Without inlining, the change to structured errors improves decoding perf as above, but regresses encoding perf by 10 - 12 %.
Please feel free to bikeshed the Error impl: I usually use thiserror for everything but since this crate doesn't depend on geo I didn't want to introduce another dependency.

I'm seeing some different results:
On x86 I see some 10-15% improvements to encode, but no change for decode.
$ uname -a
Linux foo 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux
$ cargo --version
cargo 1.78.0 (54d8815d0 2024-03-26)

$ cargo bench --bench="*" -- --baseline=sha-5340961
   Compiling polyline v0.10.2 (/pool1/mkirk-src/georust/polyline)
    Finished `bench` profile [optimized] target(s) in 1.51s
     Running benches/benchmarks.rs (target/release/deps/benchmarks-13776a8dbab4bcdb)
Gnuplot not found, using plotters backend
encode 10_000 coordinates at precision 1e-5
                        time:   [197.15 µs 198.60 µs 200.18 µs]
                        change: [-14.911% -14.244% -13.438%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high mild

encode 10_000 coordinates at precision 1e-6
                        time:   [219.22 µs 219.69 µs 220.28 µs]
                        change: [-14.104% -13.672% -13.255%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 9 outliers among 100 measurements (9.00%)
  6 (6.00%) high mild
  3 (3.00%) high severe

decode 10_000 coordinates at precision 1e-5
                        time:   [133.48 µs 133.94 µs 134.47 µs]
                        change: [-0.6733% +0.6886% +2.6489%] (p = 0.59 > 0.05)
                        No change in performance detected.
Found 17 outliers among 100 measurements (17.00%)
  5 (5.00%) high mild
  12 (12.00%) high severe

decode 10_000 coordinates at precision 1e-6
                        time:   [157.01 µs 157.52 µs 158.16 µs]
                        change: [-2.4903% -1.1355% +0.4666%] (p = 0.12 > 0.05)
                        No change in performance detected.
Found 12 outliers among 100 measurements (12.00%)
  2 (2.00%) high mild
  10 (10.00%) high severe

On my aarch64 machine, large regression in encode and 10-15% improvement in decode.
$ uname -a
Darwin bar 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 arm64

$ cargo --version
cargo 1.78.0 (54d8815d0 2024-03-26)

$ cargo bench --bench="*" -- --baseline=sha-5340961
   Compiling polyline v0.10.2 (/Users/mkirk/src/georust/polyline)
    Finished `bench` profile [optimized] target(s) in 1.31s
     Running benches/benchmarks.rs (target/release/deps/benchmarks-8b91c88197106af3)
encode 10_000 coordinates at precision 1e-5
                        time:   [180.80 µs 181.20 µs 181.66 µs]
                        change: [+70.949% +71.378% +71.805%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 10 outliers among 100 measurements (10.00%)
  3 (3.00%) low mild
  7 (7.00%) high mild

encode 10_000 coordinates at precision 1e-6
                        time:   [220.65 µs 221.66 µs 222.59 µs]
                        change: [+69.852% +70.752% +71.690%] (p = 0.00 < 0.05)
                        Performance has regressed.

decode 10_000 coordinates at precision 1e-5
                        time:   [84.025 µs 84.819 µs 85.599 µs]
                        change: [-2.0141% -1.0429% -0.0875%] (p = 0.04 < 0.05)
                        Change within noise threshold.

decode 10_000 coordinates at precision 1e-6
                        time:   [99.168 µs 100.22 µs 101.23 µs]
                        change: [-12.613% -11.723% -10.840%] (p = 0.00 < 0.05)
                        Performance has improved.

This reminds me of the "touchy" madness I was talking about earlier. Can you provide any platform details?

Ugh. My results are on macOS arm64. Most of the reason for this PR was to try to move as much of error-handling and formatting out of the encode / decode functions in order to try to address the "touchiness". Bah.

What I find most confusing here is that you're seeing regressions on the same platform.
Different processor? I'm using an M2 pro plugged into mains power.
I can try updating my macOS version too.

OK, more attempts at consistency.
cargo clean
cargo update
cargo 1.78.0 (54d8815d0 2024-03-26)

main (5340961)
Command: cargo bench -- --save-baseline main
encode 10_000 coordinates at precision 1e-5
                        time:   [100.76 µs 100.90 µs 101.04 µs]
Found 6 outliers among 100 measurements (6.00%)
  2 (2.00%) low mild
  3 (3.00%) high mild
  1 (1.00%) high severe

encode 10_000 coordinates at precision 1e-6
                        time:   [124.84 µs 125.50 µs 126.24 µs]

decode 10_000 coordinates at precision 1e-5
                        time:   [79.999 µs 80.795 µs 81.611 µs]

decode 10_000 coordinates at precision 1e-6
                        time:   [102.27 µs 103.04 µs 103.88 µs]
Found 5 outliers among 100 measurements (5.00%)
  3 (3.00%) low mild
  1 (1.00%) high mild
  1 (1.00%) high severe

structured_errors (626bbdb)
Command: cargo bench
encode 10_000 coordinates at precision 1e-5
                        time:   [83.497 µs 83.699 µs 83.968 µs]
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe

encode 10_000 coordinates at precision 1e-6
                        time:   [97.963 µs 98.124 µs 98.290 µs]
Found 9 outliers among 100 measurements (9.00%)
  7 (7.00%) high mild
  2 (2.00%) high severe

decode 10_000 coordinates at precision 1e-5
                        time:   [71.105 µs 71.637 µs 72.167 µs]

decode 10_000 coordinates at precision 1e-6
                        time:   [88.605 µs 89.660 µs 90.705 µs]

Comparison
Command: cargo bench -- --load-baseline new --baseline main
encode 10_000 coordinates at precision 1e-5
                        time:   [83.495 µs 83.699 µs 83.965 µs]
                        change: [-17.406% -17.103% -16.690%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe

encode 10_000 coordinates at precision 1e-6
                        time:   [97.962 µs 98.124 µs 98.291 µs]
                        change: [-21.526% -21.076% -20.602%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 9 outliers among 100 measurements (9.00%)
  7 (7.00%) high mild
  2 (2.00%) high severe

decode 10_000 coordinates at precision 1e-5
                        time:   [71.110 µs 71.637 µs 72.164 µs]
                        change: [-12.601% -11.857% -11.095%] (p = 0.00 < 0.05)
                        Performance has improved.

decode 10_000 coordinates at precision 1e-6
                        time:   [88.615 µs 89.660 µs 90.693 µs]
                        change: [-15.005% -14.143% -13.241%] (p = 0.00 < 0.05)
                        Performance has improved.

I keep reading this:  https://bheisler.github.io/criterion.rs/book/user_guide/command_line_options.html#baselines
--save-baseline <name> will compare against the named baseline, then overwrite it.
--baseline <name> will compare against the named baseline without overwriting it.
--load-baseline <name> will load the named baseline as the new data set rather than the previous baseline.

but cannot understand the difference between --load-baseline and --baseline.

Oh yeah it's confusing but the actual example below it makes sense?

Ah, I see. It made sense once I just tried to run it.
So load-baseline doesn't run any benchmarks, it only generates a report from a previously saved benchmark against a previously saved baseline. So presumably you'd previously run cargo bench -- --save-baseline new

I also just found this, which works very well and can actually be understood:
https://github.com/BurntSushi/critcmp

I'm on M1, but I'd be surprised if there'd be much difference between the architectures of M1 and M3.
Since I'm seeing mostly positive results on x64_64, mixed results on aarch64, and because I think it's "better" to have structural vs. String errors, I think we should merge this.

https://github.com/BurntSushi/critcmp

Ooo this is nice.


Stub a method of the parent type

I have a class B that inherits class A, with method A.Id
I created the indirection settings for B non inherited methods and for B.Id
I cannot replace the body for B.Id as in:
bProxy = new PProxyB();
bProxy.Id().Body = @this => 1;
Error: PProxyB does not contain a definition for "Id"
Is there a way to cast bProxy to PProxyA?

Currently, Prig doesn't support the way to use, but a workaround exists:

Create the Indirection Stub Setting for A.Id.
In the Indirection Stub, compare an instance of B and @this then return dummy value if it is true; otherwise @this.Id with IndirectionsContext.ExecuteOriginal. Here is the example:

[Test]
public void B_Id_should_be_callable_indirectly_but_does_not_replace_A_Id()
{
    using (new IndirectionsContext())
    {
        // Arrange
        var a = new A();
        var b = new B();
        PA.IdGet().Body = @this => ReferenceEquals(@this, b) ? 1 : IndirectionsContext.ExecuteOriginal(() => @this.Id);

        // Act
        var aid = a.Id;
        var bid = b.Id;

        // Assert
        Assert.AreEqual(42, aid);
        Assert.AreEqual(1, bid);
    }
}

Full sln is here: Issues99.zip


MINOR: MockClient's disconnect() method has two bugs

(and a prospetive refactoring)

First, it compares Strings using == instead of equals()

Second, it tries to remove a String from a Set. As disconnect() method is only called by a single method on SenderTest then it's safe to refactor it to make it both explicit that its argument is a node id and perform a Integer.valueOf() before trying to remove from ready.

Third, not a bug, but the Iterator logic can be simplified, shrinking the scope of the Iterator without changing the logic.

*tries to remove a String from a Set of Integer.

The changes look good, but it why was SenderTest passing before this change even though it calls this method a number of times? Ideally, we would change SenderTest to fail and then fix this and make it pass.

Hi @ijuma, it is passing because the disconnect() method is only used on a single test method so far, and there's no yet any assertion that relies on the ready collection having the correct values after the disconnect() has been called. Also, the == works because the JVM does a good job of interning the Strings, but this is not the right way of performing comparison between objects in Java.
All in all, those are bugs lurking to happen, and I only stumbled upon by chance as MockClient. Do you think it's worth trying to devise an assertion that expose at least the collection flaw? I am fine with this approach, committing as-is today, or even dropping this PR. :)

I think it would be nice to have the assertion you suggest, if it's easy to do yes.
Whatever happens, the fixes in the PR are good and should be included.

okay :+1: I am gonna include an assertion yet today. :)

Hi @ijuma, I have exposed a internal field of MockClient (same spirit of public Queue<ClientRequest> requests(), and added a two assertions to flesh out the bug. See what you think. Cheers!

Why not use the existing isReady method instead of adding this new method?

Hi @ijuma, good question. In fact, I didn't want to create a new Node just to test it, but looking again I should have been done that. Gonna change now. Btw, did you see that now is not used by isReady?

Sounds good. Yes, the mocks often ignore parameters if not needed for the existing tests.

@ijuma please, tell me if it's good. Thx!

LGTM

Yeah, has just fixed that. Sorry!

LGTM

Urgh, the failures in the Jenkins build above looks unrelated to my changes (see below):
kafka.api.ProducerSendTest > testClose FAILED
    java.lang.AssertionError: Partition [topic,0] metadata not propagated after 5000 ms
        at org.junit.Assert.fail(Assert.java:88)
        at kafka.utils.TestUtils$.waitUntilTrue(TestUtils.scala:655)
        at kafka.utils.TestUtils$.waitUntilMetadataIsPropagated(TestUtils.scala:695)
        at kafka.utils.TestUtils$$anonfun$createTopic$1.apply(TestUtils.scala:199)
        at kafka.utils.TestUtils$$anonfun$createTopic$1.apply(TestUtils.scala:198)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
        at scala.collection.immutable.Range.foreach(Range.scala:141)
        at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
        at scala.collection.AbstractTraversable.map(Traversable.scala:105)
        at kafka.utils.TestUtils$.createTopic(TestUtils.scala:198)
        at kafka.api.ProducerSendTest.testClose(ProducerSendTest.scala:197)

So, I am rebasing it to see if this helps.

@eribeiro, can you please close this as it has been merged?


Support AnyIO v4

Hi!
This is great, thanks.
Why this is not merged yet?

@tiangolo sorry to border you
seems no complex changes in this PR, please have a check at leisure, thanks! 🙂

Thank you @khiemdoan! 🚀
This will be available in the next version, Asyncer 0.0.3, in the next few hours. 🎉


CORS Errors?

Is there a way to just completely disable CORS in development? That would be fine as well.
I was getting this error initially. Then I attempted to set a bunch of cors rules via serviceURL.setServiceProperties (from the @azure/storage-blob sdk), which appears to have succeeded, although it has had no effect on resolving the issue.
As you can see, I have set the cors rules appropriately

Yet when I attempt an upload from a browser

Why?

Hi @sarink V3 blob doesn't support prefligt requets right now. We will add this feature request into our backlog and triaging of next plan. We are currently busy with V3 Queue implementation  and next step will be with high priority newstorage features in V3 blob, such as unblocking the breaking change in SAS authentication. It may need more time before we get change for Preflight request supports for V3 blob. In the meantime, contribution are welcome!

I see.
For those interested, I solved this problem by setting up a proxy. In my case, I was using the webpack-dev-server, and did it like this: https://webpack.js.org/configuration/dev-server/#devserverproxy

I'll close this issue since it's known and on your roadmap.


compose: Add alert for resolved topic.

#18751
Testing plan:
GIFs or screenshots:

I am currently stuck at:

When I change the URL, or say click on some other topic, the input change listener is not called. How the topic is changed, etc, so manually add the function there. [Fixed]

A gif to show what I am talking about where I am stuck.

@alya what do you think this text should say?  I feel like the way this is phrased currently suggests you need to unresolve the topic to reply, which isn't accurate; we want this to be more of a "Are you sure you want to post to a resolved topic?  You can also unresolve the topic if that's appropriate.".

Mm, yeah... Something like this?
"You are sending a message to a resolved topic. You can send to a resolved topic, or unresolve the topic if appropriate."
Do we have a variant of this banner for a user who doesn't have permissions to unresolve?

If they unresolve the topic using the banner, we should make sure the topic they are sending to changes automatically as well.

If they unresolve the topic using the banner, we should make sure the topic they are sending to changes automatically as well.

I'd expect the message-edit code to do this automatically, but worth testing!

If they unresolve the topic using the banner, we should make sure the topic they are sending to changes automatically as well.
Yes it changes as @timabbott said.

OK; can you try a next version of the actual message, and post a screenshot?

This looks a bit long.

I think this would be better.

Hmm, that's a bit less clear... Does this fit?
You are sending a message to a resolved topic. You can send as-is or unresolve the topic first.

I'd expect that to fit in English; we should make sure it doesn't look terrible if it line-wraps, since it surely won't in German.  Or perhaps "This topic is marked as resolved. Do you want to unresolve it before sending?"

I am very sorry for the late reply.
Here is the screenshot for both of these.

I think what @alya suggested seems good.

@timabbott this is now ready for review.

@alya I think the next step for this is for you to play with the UX and comment on the language / text here.
This is one of the three outstanding projects in the overall "Resolve topic" effort.

Sure, will take a look!

I just played with this PR -- looking good! A couple of small pieces of feedback:

The text placement looks to be too high within the banner. You can compare the two banners in this screenshot:

It's not specific to this banner, but when the user clicks the button on the banner or dismisses the banner, should we put the cursor back in the compose box?

The text placement looks to be too high within the banner. You can compare the two banners in this screenshot:

@alya I have fixed this first issue in my PR #20673, Can you please review it?

It's not specific to this banner, but when the user clicks the button on the banner or dismisses the banner, should we put the cursor back in the compose box?

@timabbott @alya Do we want to put cursor back in the compose box after banner dismiss?

It's not specific to this banner, but when the user clicks the button on the banner or dismisses the banner, should we put the cursor back in the compose box?

@timabbott @alya Do we want to put cursor back in the compose box after banner dismiss?

I think we do -- @timabbott what do you think?

That'd be a nice touch; if it's challenging, we may want to fork that off into a separate issue/PR, since we may want to that for other alerts as well.

Closing as this alert was added in https://github.com/zulip/zulip/pull/20673.


When run locally, document/references returns references that aren't in the initial root_path

When debugging the go language server locally, I noticed that a references request pulled back refs that weren't in the root_path of the project.
Step 1: Initialize language server, notice the rootPath
language server initialized: [{"jsonrpc": "2.0", "id": 1, "result": {"capabilities": {"workspaceSymbolProvider": true, "textDocumentSync": 1, "definitionProvider": true, "hoverProvider": true, "referencesProvider": true}}}, {"request": {"params": {"capabilities": {}, "processId": 5506, "rootPath": "file:///Users/mattfs/gopath/src/sourcegraph.com/sourcegraph/sourcegraph"}, "jsonrpc": "2.0", "id": 1, "method": "initialize"}}]
Step 2: Make a references call, was on net.Listener in server.go:
{'params': {'includeDeclaration': True, 'position': {'line': 43, 'character': 32}, 'textDocument': {'uri': 'file:///Users/mattfs/gopath/src/sourcegraph.com/sourcegraph/sourcegraph/pkg/gitserver/server.go'}}, 'jsonrpc': '2.0', 'id': 3, 'method': 'textDocument/references'}
Step 3: A sampling of results returned (over 130 results):
file:///Users/mattfs/gopath/src/github.com/chzyer/readline/remote.go
file:///Users/mattfs/gopath/src/github.com/rogpeppe/rog-go/loopback/net.go
Notice how none of these are vendored (how I know they aren't coming from Sourcegraph), and they all happen to be in my GOPATH.
Is it possible we are pulling all references to a given def that are in the GOPATH, not just the ones in the doc_root of the project we are in?

This is actually the same behaviour as any other go plugin. (go guru searches the whole GOPATH). However, I agree that this is surprising behaviour for find local references.
I am guessing we can do one (or more) of three things:

Limit results to rootPath.
Order results intelligently.
Wait until we references searches global as well (will still need 2).

(1) should be pretty easy to implement. (2) for just boosting results in rootPath should also be very easy.
cc @sqs

Iirc this is filed somewhere already or mentioned in code TODO. Agreed we should do (1) below now.
Sent from my iPhone

On Oct 27, 2016, at 06:16, Keegan Carruthers-Smith<EMAIL_ADDRESS>wrote:
This is actually the same behaviour as any other go plugin. (go guru searches the whole GOPATH). However, I agree that this is surprising behaviour for find local references.
I am guessing we can do one (or more) of three things:

Limit results to rootPath.
Order results intelligently.
Wait until we references searches global as well (will still need 2).

(1) should be pretty easy to implement. (2) for just boosting results in rootPath should also be very easy.
cc @sqs
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Cool - the main reason I'd like to do this is for performance, within an editor find all refs in Sourcegraph is taking ~10 seconds, and at that rate I think folks will choose to use "Find All."
I don't know if this adds too much code complexity, but I wonder if the ideal is to look inside of rootPath + dependencies. Trying to decide if this would be desirable behavior... For instance, it seems inconsistent that for those that vendor, they will see refs of deps, but for those who won't they won't.

On sourcegraph.com it should just be rootPath + deps, unless I am mistaken. I don't think (1) should be that hard to implement.

So we already do this filtering, it's just broken from Sublime due to an LSP extension we do called RootImportPath<EMAIL_ADDRESS>EG github.com/kubernetes/kubernetes has a RootImportPath of k8s.io/kubernetes.
Currently that is always empty from Sublime, since it doesn't do the calculation. On sourcegraph.com our buildserver calculates this value using a heuristic which tries to find package import paths, but otherwise falls back to the path.
An empty RootImportPath is actually treated as a special value, meaning we are looking at the stdlib. This means workspace/ commands are probably broken if we started using them from Sublime.
@sqs you introduced the RootImportPath. Should we port the import path code? I assume not, since it makes assumptions on GOPATH layout. Instead we probably need a way to tell the LSP server to ignore the RootImportPath (maybe make stdlib not the empty string?)

BTW doing the filtering won't actually make any of this faster, since we use importgraph.Build<EMAIL_ADDRESS>Creating a patched version of importgraph.Build is what we need to do to speed up this operation.

I have a potentially terrible hack which will allow us to use importgraph.Build, adjust the build.Context such that we fail to read any file outside of the rootPath :O

Haha nice - seems like a reasonable approach :-) .
That will miss non-vendored projects though, right? Like if I'm depending on github.com/gorilla/mux , and it's not vendored, than it won't be in the rootPath. FWIW, I think this could be a reasonable approach. Another data point: it looks like VSCode grabs the entire GOPATH references, I noticed a find all refs on "Handler" in our project returns stuff from cockroachDB.
Re: importgraph.Build - why does that prevent us from making things faster? Does it by default scan the whole GOPATH?
What would you guys expect for find all refs? just refs in the project you are in, refs in the project + deps (including Go STL), or refs in everything in GOPATH?
Choice 2, then 1, then 3 would be my preference list.

importgraph.Build is used by guru and go-langserver to find all references. It looks at the whole GOPATH. This behaviour is surprising to others as well and someone filed an issue about it a while ago https://github.com/golang/go/issues/14747 and https://github.com/golang/go/issues/14748
What we can actually do is cache importgraph.Build so at least future calls to references is faster, but that likely will lead to us giving wrong results for long running langservers + people updating there GOPATH. However, that is an issue we can defer to fixing later since we likely have lots of issues along those lines (not invalidating caches since we don't need to on sourcegraph.com). As such I'll send out a PR about caching it, and we can discuss it on there.

What would you guys expect for find all refs? just refs in the project you are in, refs in the project + deps (including Go STL), or refs in everything in GOPATH?

It totally depends on what I am querying. I think intelligently ordering results will get us what we want. I'll take a stab at using the lowest common ancestor to our query path. That mixed with the caching will get us the speed we want.


Does not save Double

Describe the bug
When you do json.set("Path", value) and pass value as a double, it saves an int to the file instead of a double.
double x = loc.getX();
json.set("Sirens." + openId + ".X", x);
leads to a value in the .json file of ->   "X": -9992,
calling json.getDouble("Sirens." + i + ".X") then returns the int instead of a double

Thanks for your feedback. This issue will be resolved in 2.4:)

Fixed:)