Media queries inside variants

We need to be able to place media queries inside a variant block.
.Button.blue {
  @media (hover: hover) {
    // cool hover effect for the blue variant
  }
}

This is possible in all popular css-in-js libs and preprocessors.
Without it, styling components becomes unmaintainable.
This may be related to #79.

Yep, definitely 💯
Here's a Codesandbox with a repro: https://codesandbox.io/s/stitches-media-query-in-variant-sd93t?file=/src/App.tsx
As a rule of thumb: anything that can be done in the base styles, should be supported in variants
/cc @christianalfoni just wondering if you had ever come across this and if it was intentional? (the error message is funny!)

@peduarte been looking into supporting inline media queries today and @christianalfoni keep me honest but I think this might be intentional because currently, we don't support nesting screens and because variants get converted to responsive ones that map to your screens when you do a screen inside a variant you're practically nesting the screen in all other defined screens which is disallowed intentionally for reasons @christianalfoni  mentioned here https://github.com/modulz/stitches/issues/67#issuecomment-671025206
Still looking into this but overall, I'm in agreeance with @christianalfoni on the whole nesting media queries thing, as it's not only very tricky but, might be near-impossible to solve gracefully.

so looks like Otion did the sorting thing to get around the specificity issues which appear to be working well from my initial testing so will give this another spin tomorrow and see how it goes

@hadihallak yeah I fully understand the complexity here 😕
Personally, I'd be totally fine with not supporting media queries within the Variant Style object, and instead, force people to change their variants responsively at the consumption layer. But Im not sure everyone is ready to think this way yet...
Hmm, is there a way to know that, if a variant contains responsive styles, and the user users the responsive syntax to apply that variant, we throw a warning? (or ignore one of the media queries)? Just throwing an idea out there :D

The issue with this one is not about breakpoints. With breakpoints, it's fine to just define your variants and then apply them at consumption.
This issue is about all of the other media queries which are not breakpoints. Like @hover: hover, for example, which should be applied every single time you define a hover pseudo class. Or (prefers-reduced-motion), or any of the others.
The lack of support for nested media queries makes building high-quality component libraries unmanageable. It's not something we can prevent or ignore. If we can't solve very soon, we'll have to switch back to Stylix.

Yep. We should allow nested mediaQueries 👍
To clarify, we need it to work like this:
styled('button', {}, {
  variant: {
    blue: {
      backgroundColor: 'royalblue',
      '@media (hover: hover)': {
        ':hover': {
          backgroundColor: 'navy'
        }
      }
    },
})

This usage:
<Button variant="blue">Blue button</Button>

Should write this css:
.bg-200 {
  background-color: royalblue;
}

@media (hover: hover) {
  .hover-bg-400:hover {
    background-color: navy;
  }
}

If the variant is applied within a media query:
<Button variant={{ '@media (min-width:480)': 'blue'  }}>Responsive button</Button>

Then it should write this css:
@media (min-width:480px) {
  .md-bg-200 {
    background-color: royalblue;
  }
}

@media (min-width:480px) {
  @media (hover: hover) {
    .md-hover-bg-400:hover {
     background-color: red
    }
  }
}

Does this look right to everyone?

Looks perfect. Thanks for demonstrating all that 💯

Okay, so I am running a branch on poc where I have implemented media queries.
The way it works is that the atom now has a notion of mediaQueries, which is identified by looking at @ at the beginning of a selector. When the CSS rule is created it iterates the mediaQueries to create nested rules, where the actual CSS rule is inside the very nested media query.
To handle specificity issues every nested level adds an additional classname to the rule  (.c0.c0), increasing specificity. That means you can feel safe when writing media queries that order of injection does no matter. This is not all an "atom approach" issue, more the fact that media queries does not add any specificity to a rule, so generally weird things can happen. So we are basically making it even more predictable than it really is 😄
I am not writing tests, just ensuring that I do not break any existing tests. So please try it out on poc branch.

@christianalfoni sounds great, thanks for the update!

@christianalfoni I think we might be referencing two different issues then. Apologies for the mix up.
I’ve created a codesandbox that uses your poc version of stitches to showcase how it will produce un-expected results just by changing the rendering order of components (hence the injection order of atoms).
https://codesandbox.io/s/affectionate-meadow-rhzbd?file=/src/App.js
here is a video of how this might occur:
https://drive.google.com/file/d/1eTpEmy12aydZd4xYjPHlZLj9-Fuw-AkA/view?usp=sharing

Thanks a bunch for testing that @hadihallak ! Yeah, hm, this really shows that media queries can not be "atomized". Or, if they are going to be atomized we need to parse them and understand their order based on how they are expressed. Like check for min-width, max-width and their values etc. But that is pretty intense.
So there is a simple solution here and that is to make all media query atoms unique. It basically just means that stitches can not re-use the media query atoms, unless you express them in the mediaQueries config, which really is intended for recurring media queries.
Lets have that as a fallback, while we think a bit more 😄

Oh, I have an idea... now we are increasing specificity by nested media queries... we can also increase them on the same level. Which means:
{
  "@media screen and (min-width: 200px) ": {
    backgroundColor: "green"
  },
  // This will get higher specificity because you have defined it as the second one
  "@media screen and (min-width: 300px) ": {
    backgroundColor: "yellow"
  }
}

Doing this specificity increase does help the mental model of dealing with media queries, as they will run as you define them.
Here is updated sandbox @hadihallak : https://codesandbox.io/s/tender-sun-gu4s3?file=/src/App.js

Oh, I have an idea... now we are increasing specificity by nested media queries... we can also increase them on the same level. Which means:
{
  "@media screen and (min-width: 200px) ": {
    backgroundColor: "green"
  },
  // This will get higher specificity because you have defined it as the second one
  "@media screen and (min-width: 300px) ": {
    backgroundColor: "yellow"
  }
}

Doing this specificity increase does help the mental model of dealing with media queries, as they will run as you define them.
Here is updated sandbox @hadihallak : https://codesandbox.io/s/tender-sun-gu4s3?file=/src/App.js

@christianalfoni I kinda landed on the same conclusions. here are my thoughts:

processing media queries is a bit heavy for the task and we might need to make hard decisions when we encounter things mixed queries or @supports or @hover media query because these aren't sortable
creating atoms might be the most bulletproof solution but might end up causing the generation of a lot of new atoms that could've been re-used in a perfect world with no CSS issues (like if we support nested screens or for things like variants)

the specificity idea is very interesting. will give it a try and let you  know how it goes but I'm suspecting it might not be as bulletproof as doing inline atoms

this feels a lot better already 💯  but there are cases where this might produce the same results although with not a very unusual usage https://codesandbox.io/s/elated-sea-7rqij?file=/src/App.js

@hadihallak I guess @supports is also considered a mediaQuery? Or is that something else? Cause now I explicitly check for @media, but can just add @supports to that match 😄

https://github.com/modulz/stitches/commit/0f63cdd4ef2c16597c34d6beb98f62b6511a7622
I now do a check for @ at the beginning of selector, instead of @media explicitly. So @supports is covered by the same logic.

My head is getting fried from thinking of all of the cases in the large scheme of things so I'm not much use for now 😄
I think we're getting there tho. Thanks for looking into this very quickly. I think we will concur this with some more testing back and forth 💪

@chancestrickland @hadihallak I couldn't get responsive variants to work anymore in the pocs branch, so I checked the source of styled package, and I think we're still relying on the screens key:
Checkout this line https://github.com/modulz/stitches/blob/pocs/packages/styled/src/index.tsx#L407
I replaced it with const configScreens = (css as any)._config().mediaQueries; and it works
Thought I'd let you know

Oh, ops, fixed 😄

@christianalfoni first off, it's crazy you came up with the specificity implementation in what feels like 30 mins. really impressive 🎩
Here are my two cents after trying it and trying to break it 😄 :

I couldn't replicate the issue I referenced in the video above 💯
Was really nice that this solution tries to minimize the generation of unique atmos
increasing specificity implicitly made maintaining styles/variants/overrides a very tiresome and prone to error task once inline media queries are involved. add one media query somewhere and you might break everything. or you would need to manually add specificity to your overrides for them to work correctly (see: https://github.com/modulz/stitches/issues/97)

I suggest is that we stick with this:

So there is a simple solution here and that is to make all media query atoms unique. It basically just means that stitches can not re-use the media query atoms unless you express them in the mediaQueries config, which really is intended for recurring media queries.

we advertise that abstracted mediaQueries are the right way of doing things
generate complete unique atmos whenever inline media queries are involved. this way we don't have all of the specificity related issues that come from trying to minimize the creation of unique atmos
heavily document that inline media queries should be treated as an escape hatch and that they hurt style re-usability.

I think what you did when you introduced screen (abstracted media queries) is very powerful and predictable at the same time so we can show people how to nest media queries there like this:
const { styled } = createStyled({
  mediaQueries: {
    myNestedQuery: (rule) =>
      `@media(min-width:300px){ @media (hover: hover) {${rule}} }`,
  }
});

this syntax is already supported in all major browsers without any CSS preprocessor so I think we should be fine if we advertise it as the way to do things.
Personally, I don't think that messing with specificity is the right way to go and would suggest that we keep things simple like what you mentioned in the comment above and rely on abstracted media queries as much as possible.
Keen to know what everyone thinks.

@hadihallak This is just amazeballs testing and I think you conclusion makes sense. Using specificity to handle this will not work. I did go through your examples and fixed a bug you found related to selectors in general. I also removed the specificity stuff for media queries: https://codesandbox.io/s/bugs-test-cases-forked-33o7h?file=/src/css/index.ts
I want to give it a little bit more thought until we give in to the fallback, but for me personally your reasoning makes a lot of sense. Cause I would argue that having a bunch of random media queries all over would create a very unpredictable design? They are more exceptions than the rule? Just like css prop is an exception, not how you design your app?
Anyways, will get back to you on this one 😄
Thanks again for excellent examples making it very easy for me to trigger new thoughts and fixing issues!

Okay, so I have made up some thoughts today:
Even when making each inline media query unique we have a challenge. This uniqueness needs to be based on something, which is not a problem for the client. But it is a problem for server side rendering. Typically we would just use a sequence, or some random thing, to produce the classname. But neither creates consistency across client/server. So we actually have to deal with this somehow.
I see two different ways of dealing with this:

We do a conceptual change. Instead of having mediaQueries as a config, we call it breakpoints. Cause media queries is not the problem, it is the breakpoints that is messy related to specificity. So the API could then be:

{
  tokens,
  breakpoints: {
    mobile: { minWidth: '600px' },
    tablet: { minWidth: '1000px' }
  }
}

These breakpoints are converted into media queries, but conceptually they deal with breakpoints in the app. All other kinds of media queries are done inline as normal. So would have to document that inline media query breakpoints does not ensure specificity.

We deal with width and height (with their respective min and max). The way this would work is that all media queries are parsed and we look at what breakpoints they represent. By tracking what breakpoints has been inserted we are able to figure out at what position the CSS rule should be inserted using addRule instead of insertRule. There is a parsing library already, https://github.com/ericf/css-mediaquery, but we do not need all the parsing. Only need what affects breakpoints.

Option 2 would be the most elegant as it would not matter what order you insert your mediaQueries in any situation. They are always inserted at the correct point in the stylesheet based on what they actually try to express.
I am going to play around with 2, but let me know what your thoughts are 😄

Okay, still leaning on breakpoints being the best solution (because it explicitly defines what breakpoints your app operates with), we could make atoms representing media queries a MediaQueryAtom. What is special about these atoms is that they are treated differently in the composition. Btw, the composition is what goes through the array of atoms and figures out which one should be part of it and then toString them to produce the whole classname string 😄  :

The composition iterates a MediaQueryAtom
The composition creates a hash based on all the atoms being part of the composition
The MediaQueryAtom is now updated with this "composition-hash"
When the className is now created for the MediaQueryAtom it will include the "composition-hash"

This will work consistently between client and server. Now... we really only need this behaviour for "media query breakpoints", so we could rather name is BreakpointAtom with the same behaviour.
So yeah... either using breakpoints as a configuration and that is where breakpoint specificity is handled. Or I can explore the approach described here 😄

@christianalfoni Thanks a lot for doing this detailed research 🙏
I will be thinking more about this today and help with the research as specificity issues have been the most tricky thing to deal with so I think it's good if we spend some time on this making sure that we tick all the boxes so here is my initial feedback:
Personally I like the breakpoints approach a lot. this is how we currently handle breakpoints in Radix and it has been working nicely.

I also thought about parsing the media query to figure out the breakpoints, but I see now that is also impossible, because you can have things like (min-width: 400px, max-width: 40rem)

Great point 👍

So would have to document that inline media query breakpoints does not ensure specificity.

Do you mean the specificity related to injection order or something else?

When the className is now created for the MediaQueryAtom it will include the "composition-hash"

so the classname for each MediaQueryAtom/BreakpointAtom would be something like this .hash.atom-class? and if this is the case, does this mean that we will be generating new atoms whenever the composition changes (variants + css prop) to guarantee that we won't have injection order related issues with media queries

Do you mean the specificity related to injection order or something else?

Ah, yes. Basically if you do like a { '@media (min-width: 200px)': { color: 'red' } } we can not ensure it will work if you use that media query inline somewhere else as well.... hm... that makes me think that we can actually keep a reference to all media queries and if duplicate media queries containing breakpoints occur we can show a warning saying. "You have the same media query breakpoints in different compositions, please define this as a breakpoint in the configuration instead to ensure specificity".

so the classname for each MediaQueryAtom/BreakpointAtom would be something like this .hash.atom-class

Jup, exactly. So basically each composition using the atom would "clone" the atom using the hash of the composition itself. So basically inline media queries would not be reusable. But yeah... with even having a warning as explained above I lean even more over to breakpoints config.

Since we are creating responsive variants that map to each breakpoint, what would happen when you nest a breakPoint inside a variant?

Good question 😄  So the inline media queries should be nested inside the breakpoints configured. Meaning if you do:
<Button someVariant={{ mobile: 'someVariantValue' }} />

If someVariantvalue has a nested media query, that will just be injected inside the mobile:
@media (min-width: 640px) {
  @media (min-width: 700px) {
    .someVariantValue {}
  }
}

Btw, I thought I would rather go ahead now and create PRs based on the stuff we have already concluded on. So get ampersand support and the bug fixes in etc. So I will not do anything more with pocs now, but rather help getting these things into master 😄

@christianalfoni  great insight as always 💯
so I just had a chat with @colmtuite and we're leaning towards keepingmediaQueries because breakpoints discourage you from abstracting other media queries.
we also discussed the possibility of having both breakpoints and mediaQueries at the same time but this isn't ideal as they're practically the same thing.
I also chatted with @peduarte and he also likes the flexibility of mediaQueries
So pretty much what we're thinking of is that:

we do a similar implementation as the latest one you suggested but we would prefer to have mediaQueries instead of breakpoints (maybe we could separate them internally by doing some regex matching)
when inline media queries are involved (the ones that have breakpoint related issues) we want to try to ideally eliminate specificity issues by treating these atoms as breakpoints atoms as well and giving them the hash treatment.
Document best practices to teach people to avoid using inline media queries (the ones that have breakpoint related issues). maybe we could throw the warnings you mentioned while also providing them with a link to the best practices page

so ideally, what we're trying to do is that even if someone used inline media queries, we'd prefer that the library handles this situation in the most optimal way possible to user expectation while also providing the user with some useful info on un-optimized media usage and how he could fix this.
What do you think of the above? do you foresee any difficulties if we go with it?

Thanks for the summary! 😄
So one final argument to make sure we are not doing any unnecessary implementation. If we want developers to use the mediaQueries configuration and we want to warn them when using inline breakpoints, is the composition hash worth it? Cause especially with a warning I would suggest developers wants to remove it? Meaning that when they write an inline media breakpoint and sees the warning... they will immediately fix it?
It will take some time finding a good way to handle the composition hash, cause it fundamentally contradicts the isolated atomic approach. So need to find a way that does not affect performance for all the other normal atoms 😄
Just taking on the role of "the protector of the code" to make sure we are completely certain 😂  Will not push back anymore if we still want to move on with the composition-hash, like... it is a fun thing to work on, but yeah, just have to be absolutely sure it is worth it 😄

So one final argument to make sure we are not doing any unnecessary implementation. If we want developers to use the mediaQueries configuration and we want to warn them when using inline breakpoints, is the composition hash worth it? Cause especially with a warning I would suggest developers wants to remove it? Meaning that when they write an inline media breakpoint and sees the warning... they will immediately fix it?

I would hope that this would be the case. for me it goes like this:

We're confident enough that inline media queries aren't going to be used and in this case, the library should throw an Error whenever we detect someone is nesting media queries or at the very least give clear warnings that we can't guarantee the specificity of inline media queries and that they might and might not work now or in the future due to injection order and then it would be up to the dev to take the risk or not. maybe we could have a mode __UNSAFE__ENABLE__INLINE__MEDIA__QUERIES in the config.
We think there are uses for when people might need inline media queries and then for me at least, I think we should guarantee that it's gonna work regardless of the injection order.

So if we are confident that there are no uses for inline media queries then I'd say by all means we should remove them and save ourselves the implementation headache.
cc @colmtuite @peduarte
I have a few questions tho if we go this route of disallowing inline media queries:

will it be allowed to nest mediaQueries inside each other?
and if the answer is no to the above then how would we handle mediaQueries in responsive variants (as they already get wrapped by mediaQueries themselves so wouldn't this be kinda like inline and prone to the same issues under the right circumstances as well?

It will take some time finding a good way to handle the composition hash

I think we could take the approach of converting the css definition to string then hashing it into a css class which is something similar to the way other css-in-js libraries handle it

it fundamentally contradicts the isolated atomic approach

Totally agree. and honestly, if it were to me I would go with something similar the prototype @jjenzz  did without nesting and with everything done using js states and all but I think we got caught with a mix of requirements that fundamentally contradicts with each other and now every fix seems like a hack.

Just taking on the role of "the protector of the code" to make sure we are completely certain 😂 Will not push back anymore if we still want to move on with the composition-hash, like... it is a fun thing to work on, but yeah, just have to be absolutely sure it is worth it 😄

this discussion is very good. This is a big change and I think we should all be aligned on the expected outcome. so please keep the feedback going.
So if we're voting I'd vote to remove inline media queries completely if we're sure that there are no valid use-cases for it or just hide it under a flag. otherwise, we should support it.

It seems there are valid use-cases for inline media queries when a particular media query is used once or when prototyping. Correct me if I'm wrong @christianalfoni, but I think the suggestion is to have a warning only when the same media query appears inline more than once to guide them towards abstracting it into the config.
That approach would mean that users will likely abstract to prevent specificity issues and there is no need for us to implement something to prevent issues. They can still define duplicated inline media queries at their own risk.
Sounds like the simplest approach to me if I've understood correctly 🙂

will it be allowed to nest mediaQueries inside each other?

I don't see how one issue is related to the other? Whether I'm using mediaQueries or inline media queries, I'd want to nest them. Disallowing inline media queries is unrelated imo.
hover: {
  motion: {
    // styles only applied if prefers-reduced-motion and hover input device
  }
}

Maybe we could automatically unwrap this and combine them using the and operator? Or maybe we could decide to force to user to set-up a single media query which includes both.
But imo, the path of least resistance for the user is to just allow this.

Exactly @jjenzz 😄  The warning would only appear when we see TWO different compositions which has the exact same media query with the same breakpoints in them. So you can still inline as normal, prototype etc. ... only when we actually see a possible issue the developer is warned about it 👍

@colmtuite Ah, yes, there is some history here. Initially the screens represented breakpoints, so was only intended for breakpoint types of media queries. And did not make any sense to say like: { MOBILE: { DESKTOP: { color: 'red' } }. But it being a general media query thing, I totally see the argument 👍
Currently a mediaQuery at the configuration level means "Create a new style tag for this stuff". It basically just creates a "bucket" for where we can insert CSS rules at any order, grouped inside a breakpoint.
So yeah, we would need to change the approach if mediaQueries is going to be any mediaQuery. Sorry, I should have picked up on that earlier. Hm... This is really interesting. Because technically a breakpoint is something very different than a media query, though conceptually for a user a "media query is a media query".
So okay, to summarize again. To use the current "bucket" approach to deal with breakpoint specificity it would be ideal if we did a config of:
{
  tokens: {},
  breakpoints: {
    mobile: '500px'
  }
}

So user do not use other media queries there. Then they are allowed to use any kind of media query inline:
{
  '@media (hover)': {
    '@meida (motion)': {
      ...
    }
  }
}

They can also use inline media queries with breakpoints, even nested:
{
  '@media (min-width: 300px)': {
    '@media (min-width: 400px)': {}
  }
}

But if they were to write two inline media queries with breakpoints that are exactly the same:

```ts
const a = css({
  '@media (min-width: 300px)': {
    '@media (min-width: 400px)': { color: 'blue' }
  }
})

const b = css({
  '@media (min-width: 300px)': {
    '@media (min-width: 400px)': { color: 'red'}
  }
})

We would say: "WARN - The property "color" with media query bla bla bla can cause a specificity issue. You should create a breakpoint".
Something like that... least resistance technically, and conceptually separates the "bucketing requirement" of breakpoints and the nesting you want with all other media queries.
Hope I explained that okay. I can summarize better later, kindergarten pickup 😄

so I very much like this.  this would mean that we don't have to generate any atoms while also providing the users with warnings only when things could go wrong instead of just disabling the whole thing.
At first, I thought we'd need to normalize the selectors (for when two different selector strings are different but mean the same thing in css) but I think and correct me if I'm wrong with the assumption but even if we don't normalize the selectors. the worst thing that could happen is that we'd create new atoms which is totally fine because ultimately what we're trying to avoid is to have two responsive inline atoms spread across two different components and from the looks of it, this solution should be sufficient.
Amazing job man! really love this 💯

Yes, exactly @hadihallak, the resulting CSS class would get a different id because the selector is different 😄
And also, just to be clear... you can still do:
{
  tablet: {
    '@media (hover: hover)': {
      color: 'red'
    }
  }
}

It is just this inserting a breakpoint inside a breakpoint that breaks the concept. { someDefinedMediaQuery: { someOtherDefinedMediaQuery: {} }.
You can also do:
{
  tokens: {},
  breakpoints: {
    complexBreakPoint: css => `@media (min-device-width: 300px) { @media (min-width: 400px) { ${css} } }`
  }
}

And then use that with any CSS rules:
{
  complexBreakPoint: {
    color: 'red'
  }
}

The breakpoints config just puts the exact specificity order in the hands of the developer. Which is why the breakpoints themselves  not be nested, because then we would end up in specificity issues again 😄
You break a sweat just talking about this stuff 😂

we can do this via utils so I'm going to close this as #112 is merged in

/cc @jonathantneal


[Bug] : Cursor Hovering Issue

Describe the bug
After hovering on "Click Here To Open List" sentence, Typing cursor is showing instead of thumb or a hand cursor.
To Reproduce
Steps to reproduce the behavior:

Go to 'https://student-offers.ml/#/'
Hover on 'Click Here To Open List'
See error

Expected behavior
It will show a hand cursor while hovering on the sentence
Screenshots
If applicable, add screenshots to help explain your problem.
https://user-images.githubusercontent.com/94970107/196711326-f7fee420-5119-4ca9-8979-e1f3870fcfa4.mp4
Desktop (please complete the following information):

OS: [Windows 11]
Browser [Brave]
Version [01]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

I want to fix this, would appreciate it if you assign me.

assign me this one

ok, just make sure you're following docsify docs


Bug in assets.xml file on odoo 16

odoo.tools.convert.ParseError: while parsing None:3, somewhere inside

        <script type="text/javascript" src="/owl_tutorial_views/static/src/owl_tree_view/owl_tree_view.js"/>
        <script type="text/javascript" src="/owl_tutorial_views/static/src/owl_tree_view/owl_tree_model.js"/>
        <script type="text/javascript" src="/owl_tutorial_views/static/src/owl_tree_view/owl_tree_controller.js"/>
        <script type="text/javascript" src="/owl_tutorial_views/static/src/owl_tree_view/owl_tree_renderer.js"/>
    </xpath>
    <!-- <xpath expr="link[last()]" position="after">
        <link rel="stylesheet" type="text/scss" href="/owl_tutorial_views/static/src/components/tree_item/tree_item.scss"/>
        <link rel="stylesheet" type="text/scss" href="/owl_tutorial_views/static/src/owl_tree_view/owl_tree_view.scss"/>
    </xpath> -->
</data>

Hello @rrawann, from the look of your error you are using the main branch (14.0) version.
There is no branch for Odoo 16 but there is one for Odoo 15 that uses the assets import from __manifest__.py.
You could switch on branch 15.0 and then try to upgrade to 16.0.

OK , Thank you @PhilDL


[feature-1] Trapping Rain Water added in CPP

Related Issues

Added an important problem named Trapping Rain Water.

Closes: #254
Describe the changes you've made
I have completely implemented a CPP program that takes the input of array elements from the user and prints the amount of rainwater that can be trapped.
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[x] Code style update (formatting, local variables)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
This has been tested by generating a set of random inputs using a generator and verified the outputs manually.
Describe if there is any unusual behavior of your code(Write NA if there isn't)
NA
Checklist:

[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have commented on my code, particularly in hard-to-understand areas.
[ ] I have made corresponding changes to the documentation.
[x] My changes generate no new warnings.
[ ] I have added tests that prove my fix is effective or that my feature works.
[ ] New and existing unit tests pass locally with my changes.

@ankitapuri Please have a look at it


deps: fix crate vulnerabilities

https://rustsec.org/advisories/RUSTSEC-2024-0402
https://rustsec.org/advisories/RUSTSEC-2024-0399
Also updated yanked crate futures-util.

Thank you


Pool return no longer nulls connection

The borrowed object would be returned to the pool on pool.freeResource() properly
If close() was called, it would return the resource to the pool,
then null the connection.

Coverage decreased (-0.0%) to 96.39% when pulling 43df7f09ff3e03992788387186e439d85461ce28 on taer:poolFix into cf7c9402a97e0fbf78c30deb371a02986f44de68 on mp911de:master.

Thanks for the fix.


Jekyll, Gatsby, and Docusaurus packages

With the release of v2.16.0, it's now possible to create sharable configurations. This is particularly useful for providing a better out-of-the-box experience with popular site generators.
I've released the first version of such a package for Hugo, and I'd like to get 3 more released soon:

[ ] Jekyll
[ ] Gatsby
[ ] Docusaurus

Gatsby and Docusaurus should both probably inherit from a more general MDX package.

Pelican as well I guess


Update the icon content

Apologies for the super late reply. I ended up taking a different road.
Thanks for the PR!


SCM theme keys should not reference colors

Testing #226648
green, red, yellow here:

They should be associated with their meaning, not their color. This might be just a case where it should be <something><number> like the below, which would imply to me that they are used 1st, 2nd, 3rd, etc.:

Adding @daviddossett.
I am seeing similar patterns in other areas of the product (ex: charts, terminal):
"--vscode-charts-blue",
"--vscode-charts-green",
"--vscode-charts-lines",
"--vscode-charts-orange",
"--vscode-charts-purple",
"--vscode-charts-red",
"--vscode-charts-yellow",
"--vscode-terminal-ansiBlack",
"--vscode-terminal-ansiBlue",
"--vscode-terminal-ansiBrightBlack",
"--vscode-terminal-ansiBrightBlue",
"--vscode-terminal-ansiBrightCyan",
"--vscode-terminal-ansiBrightGreen",
"--vscode-terminal-ansiBrightMagenta",
"--vscode-terminal-ansiBrightRed",
"--vscode-terminal-ansiBrightWhite",
"--vscode-terminal-ansiBrightYellow",
"--vscode-terminal-ansiCyan",
"--vscode-terminal-ansiGreen",
"--vscode-terminal-ansiMagenta",
"--vscode-terminal-ansiRed",
"--vscode-terminal-ansiWhite",
"--vscode-terminal-ansiYellow",

Terminal is a special case as they are literally the ansi colors that are mapped to and inherently don't have meaning other than this color must be red, blue, etc. because that's what the application asked to print.
I'm not sure about charts but I would probably give that the same feedback as the colors likely have no meaning (unless it's pumped into some library that requires such colors).

Thanks for the feedback. @daviddossett, love to get your thoughts on this. Thanks!

Are the colors use for the history graph always intended for a specific use? If so I'd agree that they should be meaningful. Even if that means you have >1 colors that use the same red as their value.

A real world case against it would be that it's perfectly valid for a theme to set red, green and yellow to different shades of green for example if it matched the esthetics of the theme.
@daviddossett it's these colors which are assigned to any branch afaict:

  "workbench.colorCustomizations": {
    "scm.historyGraph.green": "#008800",
    "scm.historyGraph.red": "#00FF00",
    "scm.historyGraph.yellow": "#88FF88",

We have 3 dedicated theme colors for the local/remote/base branches and then an array of colors (currently there are only three but we should add more) that are assigned round robin to branches in the graph. I am fine using either names/numbers, the important thing is to be consistent with the rest of the workbench and to add more colors.

I'd like this to get done for August as changing theme keys after they are published would be very annoying for theme authors:
  `scm.historyGraph.green`: The green color used in history graph.
  `scm.historyGraph.red`: The red color used in history graph.
  `scm.historyGraph.yellow`: The yellow color used in history graph.

How about scm.historyGraph.branch1, 2, 3?


Proof of concept PR - Add DS18B20 temperature sensor

More of a proof of concept as I could see a little different module process built out to support various temperature sensors.  Very common to measure environment temperature/humidity variables where you are doing some LEDs.  A user on the HomeAssistant DIY discord channel was going to get another ESP to just do temperature readings so I whipped up a little add for his sensor.  I didn't modify the MQTT discovery process.
Would be cool to do various sensors and some simple binary sensors with McLighting.

So how is it related to lights, are you going to change the color based on temperature?

I saw the use of tickers after I added the period code. I had another project running that was using some PIR sensors and BME280 sensor and used pieces of that and adapted for this temperature sensor.
Like I said this is more of a proof of concept and probably shouldn't be 100% merged, maybe cherry pick a few pieces. I envision a temperature sensor piece in the defines where you choose between 3 or 4 mainstream sensors, F or C,  data pin and polling time.
I don't think the user I made this for is doing anything with temperature and lights but it is very much possible. I wouldn't build in any rules based on that though as the user is able to do that with their own in the rules of the home automation software. I believe they are putting the Esp outdoors in a box under the eave of the roof and have the temperature sensor hanging out of the bottom.

Hi @digiblur,
thank you for your contribution. We'll see what we can incorporate into McL.
Best regards
Tobias

@toblum Thanks and I would be happy to collaborate with anyone on it if it is decided to move forward with some environmental sensing features. I closed this PR as it wasn't intended to be fully committed.


Changed a few things

Updated to JAVA 17;
Updated to Minecraft 1.19.2;
Bumped version to 2.0.1;
Updated all dependencies to their latest versions;
Added en_us.json lang asset;
Removed all unused imports;
... and a few more random things like fixing indentation and fixing the .gitignore file;

on fabric.mod.json i did change the repo links to point to yours, probably shouldn't have done that, you might want to make a pull request on the original author repo afterwards


Match packwiz format as closely as possible

for easier diffs and overall format compatibility. In all pictures red is generated by packwiz and green is generated by mmc-export.
E.g. in mod file the order of update-download and the side:

in index.toml the slashes (mod files already use / consistently!):

and in pack.toml there should be the format version:

Oh, my bad, I accidentally let path's be OS-dependent.
Side is... Do you really need it? I removed it from everywhere because it's useless mostly.
Order... Well, I can change the order if it's so important.

But it's optional anyway...

Well, okay. If I'll just add side = "both" without really trying to determine side will be enough?

Yeah, that's what packwiz already does I think.


Consider aliasing cargo new --library to cargo new --lib rather than throwing an error for it

Problem
Currently if a cargo user wants to create a library project, they need to use cargo new --lib and cargo new --library throws an error with a nice error message:
error: unexpected argument '--library' found

  tip: a similar argument exists: '--lib'

Usage: cargo new --lib <path>

For more information, try '--help'.

But --library and --lib means the same thing and I feel like there would not be an ambiguity if we also accept --library.
I would argue that it would feel more natural to some people.
Proposed Solution
If there are no strong reasons to not do that, I think we can also accept --library as a valid argument and basically make sure that cargo new --library and cargo new --lib actually does the same thing.
This can be further expanded --bin and --binary.
Notes
No response

Thanks for the idea.
I feel like the error message is quite clear to route you to the right argument. Also, bin and lib are already used everywhere in other subcommands, Cargo.toml, as well as rustc.
I lean towards not adding clever aliases at this moment, in order to reduce the overhead for both users and developers.

Agreed.  When I first read this, I thought it was for the other way around, which made sense to me.  For better or worse, the rust ecosystem uses a lot of abbreviations.
If the existing clap message wasn't useful, we would have instead wanted to make it more useful at a later point, like when https://github.com/clap-rs/clap/issues/4706 is implemented.  Since it is useful, I don't see something to do here.

Agreed. Since the error message suggests the correct flag, I think we can close this.
Thank you for the suggestion.


Encode mainnet Genesis.Config as a Haskell datatype, and check consistency with test/mainnet-genesis.json in a Property

Background
See background here. We can avoid unnecessarily reading the on-disk config by putting it in a datatype.
Add a Property somewhere to check that they match up.
Proposed Solution
See ⬆

One problem with this is how large the balances are in the mainnet genesis config, but maybe that's okay

One problem with this is how large the balances are in the mainnet genesis config, but maybe that's okay

Not sure I understand - why does balance size matter for encoding it as a Haskell datatype?

Just would be a massive source file is all!


UNO: Basic Sender/Receiver test failed

hello,
i thought i got all quirks worked out, but apparently i have not.
I use 2 uno ( 5v) with shifters in attempt to run a simple Basic Sender/Receiver test with no positive results:
on Sender:
[code]
DW1000-arduino-sender-test
DW1000 initialized ...
Committed configuration ...
Device ID: DECA - model: 1, version: 3, revision: 0
Unique ID: 00:00:00:00:00:00:00:00
Network ID & Device Address: PAN: 0A, Short Address: 05
Device mode: Data rate: 110 kb/s, PRF: 16 MHz, Preamble: 2048 symbols (code #4), Channel: #5
Transmitting packet ... #0
[/code]
on Receiver:
[code]
DW1000-arduino-receiver-test
DW1000 initialized ...
Committed configuration ...
Device ID: DECA - model: 1, version: 3, revision: 0
Unique ID: FF:FF:FF:FF:00:00:00:00
Network ID & Device Address: PAN: 0A, Short Address: 06
Device mode: Data rate: 110 kb/s, PRF: 16 MHz, Preamble: 2048 symbols (code #4), Channel: #5
[/code]
if i run the BasicConnectivity test both seemed to work:
[code]
DW1000 initialized ...
Committed configuration ...
Device ID: DECA - model: 1, version: 3, revision: 0
Unique ID: FF:FF:FF:FF:00:00:00:00
Network ID & Device Address: PAN: 0A, Short Address: 03
Device mode: Data rate: 6800 kb/s, PRF: 16 MHz, Preamble: 128 symbols (code #4), Channel: #5
Device ID: DECA - model: 1, version: 3, revision: 0
[/code]
and
[code]
DW1000 initialized ...
Committed configuration ...
Device ID: DECA - model: 1, version: 3, revision: 0
Unique ID: 00:00:00:00:00:00:00:00
Network ID & Device Address: PAN: 0A, Short Address: 03
Device mode: Data rate: 6800 kb/s, PRF: 16 MHz, Preamble: 128 symbols (code #4), Channel: #5
[/code]
I'm not sure what should be my next step.
Appreciate your input.
P.S. I measured the V on the pins of the DW1000s while they were running BasicConnectivityTest:
1 -3.25
2 - 0.01
3 - 3.25
4 - 0.01
5 - 3.25
not in use - didn't measured
13 - 3.25
14 - 2.76
15 - 2.76
16 - 0.01
17 - 0.01 ( on the other one it is 0.02-0.03)
18 - gnd

any help :( ?

I changed in both BasicSender.cpp and BasicReceive.cpp the line
[code]
DW1000.begin(0, RST);
[/code]
to
DW1000.begin(2, RST);
and the receiver shows now
[code]
Unique ID: FF:FF:FF:FF:00:00:00:00
Network ID & Device Address: PAN: 0A, Short Address: 05
Device mode: Data rate: 110 kb/s, PRF: 16 MHz, Preamble: 2048 symbols (code #4), Channel: #5
Transmitting packet ... #0
ARDUINO delay sent [ms] ... 28
Processed packet ... #0
Sent timestamp ... 300766.34
DW1000 delta send time [ms] ... 300.77
Transmitting packet ... #1
ARDUINO delay sent [ms] ... 28
Processed packet ... #1
Sent timestamp ... 462976.40
DW1000 delta send time [ms] ... 162.21
Transmitting packet ... #2
[/code]
but nothing on the receiving side and it doesn't send anymore data.
puzzled...

now if i take the Pin2 that is connected to pin19 on DWM1000, out or plug it into any other pin on UNO , it seems, that sender works:
[code]
DW1000-arduino-sender-test
DW1000 initialized ...
Committed configuration ...
Device ID: DECA - model: 255, version: 15, revision: 15
Unique ID: FF:FF:FF:FF:FF:FF:FF:FF
Network ID & Device Address: PAN: FFFF, Short Address: FFFF
Device mode: Data rate: 110 kb/s, PRF: 16 MHz, Preamble: 2048 symbols (code #4), Channel: #5
Transmitting packet ... #0
ARDUINO delay sent [ms] ... 28
Processed packet ... #0
Sent timestamp ... 17207402.00
DW1000 delta send time [ms] ... 17207.40
Transmitting packet ... #1
ARDUINO delay sent [ms] ... 29
[/code]

at the same time if i unplug the Pin2 on the receiver:
DW1000-arduino-receiver-test ###
DW1000 initialized ...
Committed configuration ...
Device ID: DECA - model: 1, version: 3, revision: 0
Unique ID: FF:FF:FF:FF:00:00:00:00
Network ID & Device Address: PAN: 0A, Short Address: 06
Device mode: Data rate: 110 kb/s, PRF: 16 MHz, Preamble: 2048 symbols (code #4), Channel: #5
Error receiving a message
Error data is ...
Error receiving a message
Error data is ...
not clear what "..." is but it is just what the terminal displays.

Summary:
i completely failed to get UNOs to work.
Instead, in my infinite wisdom , i purchased Pro Minis 5v and got them to work. DWs are been powered up by the external power (9v battery) and minis' by usb.
i do see that it take some time ( 1-3 seconds) for the mini to send the message. not sure why.


[BUG] input() or Prompt.ask does not work properly with progress bars.

The input() / Prompt.ask() functionality does not render properly with the progress bars.
Specifically, the input being typed is visible for a brief second only. It then hides behind the progress bar. The input, however, is captured properly and prints without issues.
from time import sleep
from rich.progress import track
from rich.prompt import Prompt

for i in track(range(3)):
    print(f"we are at: {i}")
    x = input("Type something")
    # x = Prompt.ask("Type something")
    print(f"You typed: {x}")
    sleep(1)

I tried using both input() and Prompt.ask()
The output while using input() is -
$ python test.py
we are at: 0
Type something
Working... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% -:--:--

The output with Prompt.ask()
$ python test.py
we are at: 0
Type something: Working... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  0% -:--:--
Working... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% -:--:--

Platform

Click to expand
What platform (Win/Linux/Mac) are you running on? What terminal software are you using?
I'm using GNOME terminal 3.28.2 (Bash) on Ubuntu 18.04.
python -m rich.diagnose
╭───────────────────────── <class 'rich.console.Console'> ─────────────────────────╮
│ A high level console interface.                                                  │
│                                                                                │
│ ╭──────────────────────────────────────────────────────────────────────────────╮ │
│ │ <console width=158 ColorSystem.TRUECOLOR>                                    │ │
│ ╰──────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                │
│     color_system = 'truecolor'                                                   │
│         encoding = 'utf-8'                                                       │
│             file = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'> │
│           height = 43                                                            │
│    is_alt_screen = False                                                         │
│ is_dumb_terminal = False                                                         │
│   is_interactive = True                                                          │
│       is_jupyter = False                                                         │
│      is_terminal = True                                                          │
│   legacy_windows = False                                                         │
│         no_color = False                                                         │
│          options = ConsoleOptions(                                               │
│                        size=ConsoleDimensions(width=158, height=43),             │
│                        legacy_windows=False,                                     │
│                        min_width=1,                                              │
│                        max_width=158,                                            │
│                        is_terminal=True,                                         │
│                        encoding='utf-8',                                         │
│                        max_height=43,                                            │
│                        justify=None,                                             │
│                        overflow=None,                                            │
│                        no_wrap=False,                                            │
│                        highlight=None,                                           │
│                        markup=None,                                              │
│                        height=None                                               │
│                    )                                                             │
│            quiet = False                                                         │
│           record = False                                                         │
│         safe_box = True                                                          │
│             size = ConsoleDimensions(width=158, height=43)                       │
│        soft_wrap = False                                                         │
│           stderr = False                                                         │
│            style = None                                                          │
│         tab_size = 8                                                             │
│            width = 158                                                           │
╰──────────────────────────────────────────────────────────────────────────────────╯

python -m rich._windows
platform="Linux"
WindowsConsoleFeatures(vt=False, truecolor=False)

pip freeze | grep rich
rich==11.0.0

Yes I'm afraid progress bars and Live will not work in conjunction with input./

Is there nothing that can be done about this? I just ran into this and it's a a rather sad limitation. When you're processing some work with multiple elements and want to confirm with the user which action to take on a case by case basis, progress and input will inevitably meet.

it's the auto refresh thread which will be writing to stdout at the same time as input(). If you disable auto refresh, it should work.
Otherwise, best we could do is allow the progress bar to be paused while taking input. Something like this:
with progress.pause():
    response = input()

What would you suggest if the action wrapped by a progress bar isn't controllable? Such as a program to clone a git URL that may or may not require inputs of credentials.


Allow or document setting base_branch option

Is your feature request related to a problem? Please describe.
Most modern git repo's use "main" as the default base branch, and rebasing a feature branch onto the base branch is a fairly common operation. However neogit uses "master" as its default base branch, which is fine, but how a user can go about changing this option seems to be very obscured at the moment, if at all possible.  This makes r b basically unusable in most modern repos.
After some digging around, I found the option being set here, but I can't figure out how to actually change the value to "main".
I have tried adding base_branch = "main" and baseBranch = "main" to my neogit lua config, and it doesnt work, and ive also tried adding
[neogit]
  baseBranch = main

to my gitconfig, which also does not work.
Describe the solution you'd like
based on that code snippet i've linked, it seems to be possible to configure this but i cant seem to find any documentation about how to go about it. if its currently possible, then we should document it. if not, it would be nice to add that as an option, or possibly use a smarter default like the users own git.config.init.defaultBranch option.

You're right - the documentation is lacking. PR's welcome 😅
There is an option in the branch-config popup to change this. bC then pick any branch. It's a default for the whole repo, so the branch doesn't matter in this case. Then use b to set the base branch.

ah interesting. i had no idea these options were available, i wouldve opened a PR had i figured out how to get here. thanks!
is there a reason this is not an option that can be set globally in the plugin config, and then overridden in the bC menu on a per repo basis? Since the default option in the neogit codebase is not what is the default for most (newer) repo's, it seems this would provide a better experience for the majority of (newer) codebases.

Think I can do one better - https://github.com/NeogitOrg/neogit/pull/694 - if the config value isn't set, we'll check for the presence of master then main and if we find that they exist, use that value. If they don't, it's up to the user to manually set the value.

@CKolkey awesome stuff! thanks for taking the time to do this

of course :)


[DRAFT] Replace Conan with vcpkg

Tickets addressed: N/A
Review: By commit
Merge strategy: Merge (no squash)

Description
This PR replaces the Conan-based build and dependency orchestration with a simpler vcpkg solution. This has the following intended benefits:

Better interaction with GitHub Actions build caches;
Shorter, fewer, and more memorable command-line invocations;
Replacement of a layer "on top of" CMake (conan) with a layer "integrated into" CMake (vcpkg), reducing the number of distinct cognitive contexts that need to be juggled; and
Removal of our dependence on an outdated version of Conan.

(There's also a deprecation warning removal in the first commit, which can be easily pulled out into a separate PR if desired.)
Verification

[ ] TODO: Check that the updated GitHub Actions work.
[ ] TODO: Check that the vcpkg caching works.

Documentation

[ ] TODO: Update (and disseminate) build instructions using CMake (and its presets files) rather than Conan.

Future work

The CMakeLists.txt files could still be refactored and simplified pretty drastically

Build cache :) from here:

Restored 59 package(s) from GitHub Actions Cache in 25 s. Use --debug to see more details.


Add Creative Commons Catalog API

Hi! Great collection of links here! I just wanted to drop an additional API that can be of help.
Currently CC Catalog only serves images, but it's planned to add additional media types such as open texts and audio, with the ultimate goal of providing access to all 1.4 billion CC licensed and public domain works on the web. See the web portal.
So it can be categorized under Photography or Open Data (maybe), but I put it in Open Source Projects for now.
The API supports OAuth2 but is not required. There are limitations for anonymous users though.
Awaiting for comments about this entry.
Checklist

[x] Your submissions are formatted according to the guidelines in the contributing guide
[x] Your additions are ordered alphabetically
[x] Your submission has a useful description
[x] The description does not end with punctuation
[x] Each table column should be padded with one space on either side
[x] You have searched the repository for any relevant issues or pull requests
[x] Any category you are creating has the minimum requirement of 3 items
[x] All changes have been squashed into a single commit

@yannbertrand Please point out if you think anything is needed to merge this.
Thanks!

Thank you!


Build for embedded UI is failing

We are getting an error in the CI when building the UI:
Run pushd ${GITHUB_WORKSPACE}/server
~/work/tegola/tegola/server ~/work/tegola/tegola
Changed to directory: /home/runner/work/tegola/tegola/ui
Running: npm version
Running: npm install
Running: npm run build
>
> ><EMAIL_ADDRESS>build
> > vue-cli-service build
exit status 2
viewer_gen.go:1: running "go": exit status 1
>
> Browserslist: caniuse-lite is outdated. Please run:
> npx browserslist@latest --update-db
>
> Why you should do it regularly:
> https://github.com/browserslist/browserslist#browsers-data-updating
>
> -  Building for production...
>  ERROR  Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './2020/CreateDataProperty' is not defined by "exports" in /home/runner/work/tegola/tegola/ui/node_modules/es-abstract/package.json
> Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './2020/CreateDataProperty' is not defined by "exports" in /home/runner/work/tegola/tegola/ui/node_modules/es-abstract/package.json
>     at new NodeError (node:internal/errors:399:5)
>     at exportsNotFound (node:internal/modules/esm/resolve:361:10)
>     at packageExportsResolve (node:internal/modules/esm/resolve:697:9)
>     at resolveExports (node:internal/modules/cjs/loader:565:36)
>     at Module._findPath (node:internal/modules/cjs/loader:634:31)
>     at Module._resolveFilename (node:internal/modules/cjs/loader:1061:27)
>     at Module._load (node:internal/modules/cjs/loader:920:27)
>     at Module.require (node:internal/modules/cjs/loader:1141:19)
>     at require (node:internal/modules/cjs/helpers:110:18)
>     at Object.<anonymous> (/home/runner/work/tegola/tegola/ui/node_modules/object.getownpropertydescriptors/implementation.js:3:26)
>     at Module._compile (node:internal/modules/cjs/loader:1254:14)
>     at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
>     at Module.load (node:internal/modules/cjs/loader:1117:32)
>     at Module._load (node:internal/modules/cjs/loader:958:12)
>     at Module.require (node:internal/modules/cjs/loader:1141:19)
>     at require (node:internal/modules/cjs/helpers:110:18)
>
PATH: /home/runner/go/bin:/opt/hostedtoolcache/go/1.18.10/x64/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
While running `npm run build`
Got error:
exit status 1
Error: Process completed with exit code 1.

see: https://github.com/go-spatial/tegola/actions/runs/4423598112/jobs/7797285048?pr=893

The viewer is ridden with vulnerabilities. Devils advocate here, does the viewer need to be embedded in the first place or can we take it out into its own repository to maintain it separately?

can you folks please take a look at #916 @ARolek @gdey?


Delete test by non-existent testId does not return status code 404

Description
When we send delete test by testId request and pass non-existent id, we have response with status code 200.
Steps to reproduce

authorize in Zafira API
choose any id that you don't have, f.e. 1000
send DELETE request to automation.qaprosoft.farm/zafira-ws/api/tests/1000

Actual behavior
HTTP/1.1 200
Server: nginx/1.13.12
Date: Mon, 13 Jan 2020 14:36:36 GMT
Content-Length: 0
Connection: keep-alive
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: POST, GET, PUT, UPDATE, OPTIONS, DELETE
Access-Control-Max-Age: 3600
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Accept-Language, Authorization, Access-Token, FileType
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Strict-Transport-Security: max-age=15724800; includeSubDomains
Expected behavior (if known)
status code 404 in response
Environment
https://automation/zafira-ws/api
API (back-end) version: 2

Available on stage env ui v.1.34.RC6 | server v.1.532-SNAPSHOT @lmikhadyuk

Verified in ui v.1.34.RC6 | server v.1.532-SNAPSHOT | client v.1.0-SNAPSHOT.


Discuss Spatial caching on app

Describe the Task
Discuss Spatial caching on app

overall plan is to make a service that allows a person to check for intersections between a list of layers kept in sync with the warehouse, and the geojson input
this service should be shared with all SEISM projects
plan on device is to cache layers in geojson and images, which will be served up by geoserver when we can't pull WMS from the warehouse directly


Arch linux dev container

Hey, I hate debian 😄
How can I make an arch rust devcontainer for my github codespace?

I have the same question. I want this so I can run archiso in codespaces.

I feel like you should just be able to copy the debian container and modify it slightly to make it work with arch, but I don't think I have the skills for that kind of project

Hey @paul-f-maxson @AsafFisher you can use my configuration https://github.com/IgnisDa/codefarem/blob/main/.devcontainer/Dockerfile
Here is the base image if you want to make some changes: https://github.com/IgnisDa/developrs/blob/main/docker/Dockerfile


Move it to TheStack

Moves the core setup to TheStack, also adds in the following

Auth
Post creation
Sync Setup queue
Search Indexing

Un-necessary improvement


[fixes #3535] Fix constructed functions in RTree

Change type: Bug fix, #3535
The previous patch didn't take into account that the accessors passed in as the format array were dot-prefixed due to the previous eval-based construction.
The only two uses of RTree that I found were in World.js:
this.tree = new RTree(this.maxEntries, [ '.left', '.top', '.right', '.bottom' ]);
// ...
this.staticTree = new RTree(this.maxEntries, [ '.left', '.top', '.right', '.bottom' ]);

It's likely that this could be updated to just not pass dotted attribute names but I wasn't super comfortable that they weren't needed in this form elsewhere despite a quick search. I'd honestly say that it might be a better change if we remove the dots before merge but I'll leave that up to the discretion of the reviewers/merger.
I'm not super familiar with Phaser's style but I passed lint sooo :D
Buyer beware: I didn't verify this is still within the twitch CSP (it should be). I tested the following cases using slight variations of the repro code I left in the bug:

this.physics.world.collide(sprite, group)
this.physics.world.collide(group, sprite)
this.physics.world.collide(sprite, sprite)
this.physics.world.collide(group, group)

Thank you for this. I see no reason why we need to keep the dot prefix. We can also make the default accessors array be [left, top, right, bottom] one as well. Going to merge this PR for now though, can always merge another one to modify that.


Project inference is broken under Python 3.5.1

Project inference takes place in _determine_default_project(), which hands off to _compute_engine_id(). That returns the correct value -- but as bytes. The Client class checks if the project value is a str (using six.string_types) and raises an error because it is not (that code is here).

Really appreciate the bugs @jlowin!

Happy to help :)

@jlowin Working on a fix now. Sorry for the delay!


0.4.4

New capability: Providers check
New feature test: Checking AWS Credentials within the code.
~ Changed README.md a bit to explain the tool a bit better.

This PR is also addressing https://github.com/eerkunt/terraform-compliance/issues/32

Pull Request Test Coverage Report for Build 133

1 of 37 (2.7%)  changed or added relevant lines in 2 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-1.8%) to 49.333%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

terraform_compliance/steps/steps.py
0
36
0.0%

Files with Coverage Reduction
New Missed Lines
%

terraform_compliance/steps/steps.py
1
0.0%

Totals

Change from base Build 130:
-1.8%

Covered Lines:
185

Relevant Lines:
375

💛  - Coveralls


Add artifactiry info into the test job template

add ARTIFACTORY_REPO and ARTIFACTORY_ROOT_DIR
rename JENKINS_DOMAIN to ARTIFACTORY_ROOT_DIR in Jenkins base to avoid
confusion. This value defaults to jenkins domain, but it can be set to
other value.

Issue: https://github.com/eclipse/openj9/issues/5198
Signed-off-by: lanxia<EMAIL_ADDRESS>

Tested in the internal Jenkins.


Final standings after handle changes.

Carrot shows N/A for finished contests after you've changed your handle.

Thanks for reporting, I'll publish the fix soon but in the meantime this issue can be worked around by closing and reopening your browser.

Thanks for reporting, I'll publish the fix soon but in the meantime this issue can be worked around by closing and reopening your browser.


MeshInfo - compiler error on Unity 2019.3

XRTK - Mixed Reality Toolkit Bug Report
Describe the bug
The type or namespace name 'MeshInfo' could not be found
The offending line is:
https://github.com/XRTK/Lumin/blob/dbd3a908bf250af59b7d4d275457ccc09e309251/XRTK.Lumin/Packages/com.xrtk.lumin/Runtime/Providers/SpatialAwarenessSystem/SpatialObservers/LuminSpatialMeshObserver.cs#L152
To Reproduce
Create project with 2019.3.
Compile
See above error
Your Setup

Unity Version 2019.3.9f0
XRTK Version 0.2.0
Additional context
I think MeshInfo got removed in 2019.2.  However, I'm also pretty sure that the function throwing the error in XRTK is unused: the lines pointing at it have been commented out.

Thanks! I'll try to give this a look see. For now I believe the XRTK is pinned at 2019.1.14f1 but will try to update to the latest 2019.4 TLS as soon as possible. https://github.com/XRTK/XRTK-Core/issues/673

Yeah, I saw that.  I'll be updating to 2019.4 as soon as I have the current batch of (non-XRTK) errors resolved.  I'll fork lumin for now and fix this there.
Would you like a PR with any changes coming back your way?

That'd be awesome of ya 😎
Really the whole meshing system needs an update I think to be the native implementation. I think commenting it out would just disable the spatial awareness system, as it wouldn't be generating any meshes.


Fix ada.o object build

Should fix #49.

I think tests should now all be passing.

Hmm, this breaks on my machine:
ada_url/ada.cpp:11791:31: error: 'value' is unavailable: introduced in macOS 10.13
    helpers::encode_json(hash.value(), back);
                              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/optional:1057:33: note: 'value' has been explicitly marked unavailable here
    constexpr value_type const& value() const&
                                ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

Any ideas?

introduced in macOS 10.13

Looks like you need to set the MACOSX_DEPLOYMENT_TARGET.


Switch issuer.Issue to return a pointer and fix up setting secret fields

What this PR does / why we need it:
Replaces #962
Now, if the Issuer returns a non-nil IssueResponse, we will update the secret resource to contain the fields that were returned.
It also tidies up how we set metadata, and makes the metadata be set based on the contents of the certificate.
Release note:
NONE

Fixed a missed unit test check function!


filter empty line

Is there any reason that this repo will filter the empty line?
Currently, I use this code
converters: [         {           filter: 'br',           replacement: function(){             return '
'           }         }]
to keep my blank empty line. And it's useful. I appericate that any guys can give me some help explanation.

This library will convert a
 to a single line-break (with two spaces at the end of the line). To space out text with a blank line (i.e. 2 line-breaks), you will need to use
 tags.
For example:

A paragraph

Another paragraph

A paragraph
with a line-break

converts to:
A paragraph

Another paragraph

A paragraph
with a line-break

To test this, paste the HTML at the top into http://domchristie.github.io/to-markdown/
Hope that helps

Emm... Seems I didn't express clearly.
Use
 in
 tag should be translated to a single line break, that's true.
But consider when
 was used directly as a full line break, like:

Hello

World

On this situation, since the 'native markdown' doesn't provide any way to express it, the
 tag should be reserved in output.
Any ideas?
Thanks

Ah I see. This is because the library does a "cleanup" to remove more than three line-breaks (https://github.com/domchristie/to-markdown/blob/master/index.js#L222).
I'm not sure there is an east way round this, because every block-level converter adds 2 line-breaks before and after the content. I will have a think.
Related: https://github.com/domchristie/to-markdown/issues/130

@domchristie Can you just give a option to set that whether do the "cleanup", sometime, it needs preserve multiple blank lines

@LuoPQ unfortunately this is not possible without breaking the formatting of every paragraph, list, blockquote etc. Feel free to fork the project and make changes as you need to.


Latest Sway version that worked with xembedsniproxy?

I know proper xembed support will appear in the future and I see that xembedsniproxy launching was removed from 0.14.
Just out of curiosity I want to look at Sway which worked with xembedsniproxy.
I've tried 0.13 on Arch and NixOS and few programs with xembed tray icon, however Sway doesn't launch xembedsniproxy and if I launch it manually, then program icon appears in a new window instead of showing on a bar and a small black square appears in the top left corner.

If xembedproxy was supported we wouldn't have said it wasn't -_-

Sorry :-)


CustomHidDevice (Error: Value is blocked)

I am using Universal Windows Platform sample CustomHidDeviceAcess to connect with my keyboard with HID support. But then I am getting the following error during 'Build'.
usage:0001 0006: Value is blocked, and not allowed on this bus
Is there is no way to override it?

I'll forward your question to the feature team. In the meantime, there is a StackOverflow question(with answer) on the same topic.

Wait a second, the sample uses usage FFAA 0001, not 0001 0006. It looks like you modified the sample. So this isn't a samples issue at all. The problem is with your modifications to the sample.
You can open a support case with our Developer Support team:

Visit http://aka.ms/storesupport and sign-in with your Microsoft account
Under the “App Development” section choose "Windows 10 universal app development", then choose the appropriate problem type and category to get engaged through a formal support channel.


Fix Console error in Meshery cloud

Notes for Reviewers
This PR fixes #9030
Signed commits

[x] Yes, I signed my commits.

cc @aabidsofi19

@aabidsofi19 I placed a pr/hold label on this pull request, because hiding these logs is not necessarily desirous. These logs, while unwanted, serve as indicator of an underlying issue that needs to be addressed at source in Meshery Server.
If the underlying issue hasn't been addressed, I'm hesitant to have this indicator muted.


limiting Camera view

hi,
i'm just beginning coding SWIFT and i'm wondering, if there is a way to limit the view of the camera and do a red line for scanning? So only the barcode that is under the red line in the camera view should be read.
thank you!

I'm not sure it's possible to limit the zone for scanning, but at least you can check the ScanResult.corners and filter if it's in the area you want.


added Progress Engine to readme

Please review our Contribution Guidelines to ensure your changes abides by it.
Review your changes and complete the checklist below.

[x] Company name
[x] Company description
[x] GitHub link
[ ] How Elixir is used
[x] Sorted alphabetically

Thank you @alec-c4!


Update Ubuntu install ISO version. the old versions are not available  any more

Hmm... the original iso link is no longer valid...
need to find a long term way how to resolve it..
@changev @PengTian0

:+1:


fix(asks): They were in wrong order.

Asks in 0.4.2 were using each but in this version they are using reach.  Thus causing them to be backwards.

A counter fix would be to insert with a different sorter. b > a instead of the current a > b

Thanks a lot @michaelbpaulson!


Add support for Python 3.10

Summary
Following Qiskit/qiskit-terra#7102
Fixes #319
Fixes #321
Details and comments
There isn't cplex for python 3.10. Keeping the tutorials running under python 3.7 and 3.8
Even though docplex builds and installs on python 3.10, it is not advertised as working in neither python 3.9 nor python 3.10.
The tutorials under python 3.10 fail on docplex. I am keeping the tutorials CI running for python 3.7 and python 3.8 as before.
The failure occurs inside 08_cvar_optimization.ipynb:
# create docplex model
mdl = Model("portfolio_optimization")
x = mdl.binary_var_list("x{}".format(i) for i in range(n))
objective = mdl.sum([mu[i] * x[i] for i in range(n)])
objective -= q * mdl.sum([sigma[i, j] * x[i] * x[j] for i in range(n) for j in range(n)])
mdl.maximize(objective)
mdl.add_constraint(mdl.sum(x[i] for i in range(n)) == budget)

# case to
qp = from_docplex_mp(mdl)

ImportError                               Traceback (most recent call last)
Input In [5], in <module>
      1 # create docplex model
      2 mdl = Model("portfolio_optimization")
----> 3 x = mdl.binary_var_list("x{}".format(i) for i in range(n))
      4 objective = mdl.sum([mu[i] * x[i] for i in range(n)])
      5 objective -= q * mdl.sum([sigma[i, j] * x[i] * x[j] for i in range(n) for j in range(n)])

File ~/opt/anaconda3/envs/Qiskitenv310/lib/python3.10/site-packages/docplex/mp/model.py:2349, in Model.binary_var_list(self, keys, lb, ub, name, key_format)
   2325 def binary_var_list(self, keys, lb=None, ub=None, name=str, key_format=None):
   2326     """ Creates a list of binary decision variables and stores them in the model.
   2327
   2328     Args:
   (...)
   2347
   2348     """
-> 2349     return self._var_list(keys, self.binary_vartype, name=name, lb=lb, ub=ub, key_format=key_format)

File ~/opt/anaconda3/envs/Qiskitenv310/lib/python3.10/site-packages/docplex/mp/model.py:2316, in Model._var_list(self, keys, vartype, lb, ub, name, key_format)
   2315 def _var_list(self, keys, vartype, lb=None, ub=None, name=str, key_format=None):
-> 2316     return self._lfactory.var_list(keys, vartype, lb, ub, name, key_format)

File ~/opt/anaconda3/envs/Qiskitenv310/lib/python3.10/site-packages/docplex/mp/mfactory.py:434, in ModelFactory.var_list(self, keys, vartype, lb, ub, name, key_format, create_container)
    432 if create_container:
    433     ctn = self._new_var_container(vartype, key_list=[fixed_keys], lb=lb, ub=ub, name=name)
--> 434     var_list = self.new_var_list(ctn, fixed_keys, vartype, lb, ub, actual_name, 1, key_format)
    435     ctn._attach_var_list(var_list)
    436 else:

File ~/opt/anaconda3/envs/Qiskitenv310/lib/python3.10/site-packages/docplex/mp/mfactory.py:470, in ModelFactory.new_var_list(self, var_container, key_seq, vartype, lb, ub, name, dimension, key_format, _safe_bounds, _safe_names, var_factory_fn, _add_container)
    468     xnames = name or []
    469 else:
--> 470     xnames = self._expand_names(key_seq, name, dimension, key_format)
    472 safe_lbs = _safe_bounds or not xlbs
    473 safe_ubs = _safe_bounds or not xubs

File ~/opt/anaconda3/envs/Qiskitenv310/lib/python3.10/site-packages/docplex/mp/mfactory.py:301, in ModelFactory._expand_names(self, keys, user_name, dimension, key_format)
    299 else:
    300     stringifier_ = self._get_stringifier(dimension, keys)
--> 301     actual_naming_fn = compile_naming_function(keys, user_name, dimension, key_format,
    302                                                stringifier=stringifier_)
    303     computed_names = [actual_naming_fn(key) for key in keys]
    304     return computed_names

File ~/opt/anaconda3/envs/Qiskitenv310/lib/python3.10/site-packages/docplex/mp/mfactory.py:125, in compile_naming_function(keys, user_name, dimension, key_format, _default_key_format, stringifier)
    121     else:
    122         # here keys are tuples of size >= 2
    123         return lambda key_tuple: fixed_format_string % key_tuple
--> 125 elif is_function(user_name):
    126     return user_name
    128 elif is_iterable(user_name):
    129     # check that the iterable has same len as keys,
    130     # otherwise thereis no more default naming and None cannot appear in CPLEX name arrays

File ~/opt/anaconda3/envs/Qiskitenv310/lib/python3.10/site-packages/docplex/mp/utils.py:220, in is_function(e)
    218     from collections.abc import Callable
    219 else:  # pragma: no cover
--> 220     from collections import Callable  # @UnresolvedImport
    221 return isinstance(e, Callable)

ImportError: cannot import name 'Callable' from 'collections' (/Users/manoel/opt/anaconda3/envs/Qiskitenv310/lib/python3.10/collections/__init__.py)

IMPORTANT:
Terra is backporting this. Once they release it to pypi, I will backport it as well. Do not backport before they release otherwise it will fail. The stable CI gets Terra from Pypi.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

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

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
4068

Relevant Lines:
4489

💛  - Coveralls

Could you try #322? This should work with Python 3.10.

I tested with python 3.10 and it works.


Bug intersect_count function use in string cause ASAN error  (#11936)

Proposed changes
Issue Number: close #xxx
Problem summary
Describe your changes.
Checklist(Required)

Does it affect the original behavior:

[ ] Yes
[ ] No
[ ] I don't know

Has unit tests been added:

[ ] Yes
[ ] No
[ ] No Need

Has document been added or modified:

[ ] Yes
[ ] No
[ ] No Need

Does it need to update dependencies:

[ ] Yes
[ ] No

Are there any changes that cannot be rolled back:

[ ] Yes (If Yes, please explain WHY)
[ ] No

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

是不是合错了，1.1.2已经release，该是1.1-lts？


Field name not found

The script doesn't populate field names like this one
topmostSubform[0].Page4[0].DateTimeField1[0]

Anything regarding that?


strings written as arrow binary in Parquet

loving the new updates to the package, however using the bleeding edge package release, i've run into the case where strings are mangled into "Arrow Binary" when i write a parquet file. therefore, when read back in R, the column type is "arrow binary" and DuckDB can't read it either because it is a "BLOB".  therefore the Parquet file becomes unusable.
i'm debugging why this happens into a reproducible file, but preliminarily i think it's because the file i'm reading and rewriting is large. in the reverse direction, i have seen the R arrow package complain when I try to write a large file with a string column, complaining about how it doesn't support a "large binary". this problem goes away when i break up the file - i imagine some sort of column size issue when the column is too large?
EDIT: Examining this further, indeed breaking the query into smaller pieces DuckDB does not perform the string mangling described above. I can try to provide a test replication file if helpful in a few days.  I imagine the easiest fix is just allowing for chunked output?

Thanks for the report!

loving the new updates to the package, however using the bleeding edge package release, i've run into the case where strings are mangled into "Arrow Binary" when i write a parquet file. therefore, when read back in R, the column type is "arrow binary" and DuckDB can't read it either because it is a "BLOB". therefore the Parquet file becomes unusable.

Interesting, could you share one of those Parquet files with us together with some code snippet on how you generated it? It is possible that we can adopt the Parquet reader to correctly read that format.

i'm debugging why this happens into a reproducible file, but preliminarily i think it's because the file i'm reading and rewriting is large. in the reverse direction, i have seen the R arrow package complain when I try to write a large file with a string column, complaining about how it doesn't support a "large binary". this problem goes away when i break up the file - i imagine some sort of column size issue when the column is too large?

At least from the perspective of DuckDB there is no size limit on columns, and by default things should be chunked up (DuckDB uses block-based execution, which means we never process more than 1024 tuples at a time). I'm not sure how this works on the DuckDB-arrow boundary though. Could you provide any code snippets that result in the behavior you describe?

Thanks, I'll try to find a time tmrw or the day after to replicate this. The issue is I can't share confidential data but I think I have a sense of how one might - what's your email?

You can send anything you don't want to publish here to my email at<EMAIL_ADDRESS>Thanks!

@Mytherin i saw your other thread, and i think decode(variable_name) fixed it. would it still be helpful to replicate the error?

Ah great, I didn't realize that these issues were the same. In that case I won't need the file. Thanks for the report!

i noticed you pushed a PR to the python API, which i imagine flows through to the R API too. would it still be helpful to replicate the error?

The PR only added blob support to the Python API, but I will have a look at adding blob support to the R API as well.

Is there any workaround to this? Like if I cast everything as decode should it work?

Decode converts from a blob to varchar, so then it should work (as long as the column is actually UTF8 - if it is not decode will throw an error). The latest R client should now also support blobs, but maybe not the one on CRAN.

I'll close this for now, re-open if I encounter any more issues. Seems OK.


Prefer same-language tag over tag for different language

Sometimes hitting <C-]> on a tag for one language, e.g. Python, will jump to a tag in a different language, e.g. TypeScript. This is almost never what I want; tags for the current language should be preferred over the same tag in a different language.

Maybe try https://stackoverflow.com/a/12922629


231 - Migrated from Java-Markdown-Generator to own classes in logchange-md module

Created new  logchange-md module with the necessary classes to replace the Java-Markdown-Generator dependency from com.github.Steppschuh. This module provides functionality for the following Markdown elements:

Text
Code
Link
Heading
UnorderedList
UnorderedListItem
UnorderedNestedList
Table

All of the features was unit tested using juint
Closes https://github.com/logchange/logchange/issues/231

@witx98 thank you so much for your contribiution!


Version Decrement and Rename

Hey, might be worth leaving a note on the front page for a few months to say that the crate was renamed and version number changed. We had to go digging to work out what happened.

Yeah, it's in the CHANGELOG.
It was pulled from crates.io by the Crates team so we could republish with underscores instead of kebab case. (e.g. bevy_async_task instead of bevy-async-task)


add final version of files about bank and trade

merge banktrade branch code to main

they did not have a contracts directory, so I decide to merge to rui yao branch and make some change to the structure then merge to the main branch


Fix several issues with line height

Fixes #966
Fixes #967

Coverage decreased (-1.2%) to 69.794% when pulling 903ed1917e38c52c372d6b340d6a65ac0dcbef78 on Tyriar:line_height_fixes into 052e0b5a9465f18aa983505f0aefa0cdfeccdf98 on sourcelair:v3.

Coverage decreased (-0.8%) to 70.24% when pulling 903ed1917e38c52c372d6b340d6a65ac0dcbef78 on Tyriar:line_height_fixes into 052e0b5a9465f18aa983505f0aefa0cdfeccdf98 on sourcelair:v3.


docs(*) fix readme logo url

Summary
Fixes logo url on README.md

Seems like this is issue for Europeans? Or CDN related issue?

Updated the right images to konghq (those were not correct), and manually merged. Thanks


Ability to use alidns provider in globaldns

Add alidns(Alibaba Cloud DNS) as an option in globaldns.

Steps to validate:

Go to https://dns.console.aliyun.com/#/dns/domainList and check that the rootDomain about to use is available in alidns console, and the aliyun user has permision to manage the domain.

Create a multiclusterapp that uses ingresses, the ingress need to has sub-domain of the rootDomain as the hostname, and contains the annotation rancher.io/globalDNS.hostname: 'subdomain.rootdomain'
Go to globaldns-entries, Create an entry that uses the above provider, and choose the mcapp as the target(Also try using projects targets as another use case).

Result:
An A-record is added in alidns console. you can access the app ingress via the configured domain.

Version: master 2.2 (2/15/19)  Image ID: 43fc066bb7db
Confirmed fix.  I tested the Multi Cluster App and Projects with Alibaba Cloud Provider and worked fine on my environment.


isUnifiedPlan = true is not working

Hi ~ everyone.
I am using the video call plugin.
If you set isUnifiedPlan = true
Remote video cannot be received.
I would be grateful if you could tell me how.
Thank you.

If you set isUnified plan to false remotetrack will not work instead you will receive remotestream

Thank you for the reply.
But both remoteTrack and remoteStream do not work.

Can you share the code snippet that is not working or example project with minimal reproduction that i can run and investigate

Can you share the code snippet that is not working or example project with minimal reproduction that i can run and investigate

I just downloaded the master branch code and ran it.
Mainly used for Android, iPhone, and iPad.
I also used the MacBook Pro's Chrome web browser, but the results were the same.
Also, I tried running the https://flutterjanus.github.io/flutter_janus_client/ link and the result was the same.
The code was executed as is without any changes, and when debugging, the remoteTrack event was not called.
publishVideo.remoteTrack?.listen((event) async {
if (event.track != null && event.flowing == true) {
remoteVideoStream?.addTrack(event.track!);
_remoteVideoRenderer.srcObject = remoteVideoStream;
// this is done only for web since web api are muted by default for local tagged mediaStream
if (kIsWeb) {
_remoteVideoRenderer.muted = false;
}
}
});
However, by changing the isUnifiedPlan value in the code below from true to false, I was able to receive remote video.
client = JanusClient(transport: ws, iceServers: [RTCIceServer(urls: "stun:stun.voip.eutelia.it:3478", username: "", credential: "")], isUnifiedPlan: true);
By looking at the sdp value of the offer or answer sent every time the isUnifiedPlan value is changed, we checked whether UnifiedPlan was set properly and confirmed that the isUnifiedPlan setting was working properly.

lmk if it works @anewgate

@shivanshtalwar
I also confirmed that the unified plan works well in the master branch.
thank you so so so so so much. :)


Unable to create new table and new columns MariaDB

System information:

Operating system (distribution) and version - macOS 10.14.6
DBeaver version -  <IP_ADDRESS>103021012
Additional extensions

Connection specification:

Database name and version
Driver name - defualt
Do you use tunnels or proxies (SSH, SOCKS, etc)?

Describe the problem you're observing:
after selecting "create new table", unable to add columns to it, or save the table without columns
Steps to reproduce, if exist:
select "create table" and then try to add columns, or save table without column.
here is error when trying to create column:
class org.jkiss.dbeaver.tasks.ui.DataSourceToolsContributor$DataSourceEditorInput cannot be cast to class org.jkiss.dbeaver.ui.editors.IDatabaseEditorInput (org.jkiss.dbeaver.tasks.ui.DataSourceToolsContributor$DataSourceEditorInput is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @69759d04; org.jkiss.dbeaver.ui.editors.IDatabaseEditorInput is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @3d2eb7fa)

cannot reproduce it. Could you check it against 21.0.1?

21.0.1 seems to have fixed the issue. Thanks

On Mar 22, 2021, at 5:10 AM, Dziyana @.***> wrote:
cannot reproduce it. Could you check it against 21.0.1?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/dbeaver/dbeaver/issues/11777#issuecomment-803896206, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIJ4HKHBY5HEXXRNDMZGH3TTE4CPBANCNFSM4ZMCEVVA.


Linting CRL and OCSP responses

Hi all,
I think it would be useful to have linters for CRL and OCSP responses. Do you think that would be a good addition to this repo, or do those make sense as a separate tool?
Thanks,
Jacob

Personally I think it makes sense to include in-repo :+1:
I suspect it might make be a good idea to make a separate command line tool (vs adding to cmd/zlint/main.go) for linting these other resource types from the CLI (if only to avoid piling in extra command line flags).

I agree this makes sense. Similar to @cpu, I'd like to make sure it doesn't greatly complicate the existing code base.

I realized I opened this issue twice; sorry about that! Closing in favor of #458, which has a reference for a potentially good set of lints to implement.


Document scrolls rapidly back and forth during typing

On Firefox for OS X, typing in the editor can cause the scroll position to rapidly flicker up and back down on every other keystroke or so. I disabled scroll syncing, but nothing changed. Mucking around in the devtools reveals some rather hellacious style recalc occuring, described as being caused by CSS animations and transitions.
I have a screen recording if that helps, but I'm not sure where to upload it.

I added the following rule during the issue:
*, :before, :after {
  transition: none !important;
  animation: none !important;
}

But the effect remains.
Some more investigation reveals it doesn't happen as long as the last heading is still onscreen.

I have a similar issue with this on Firefox running on Ubuntu 15.10.


nixos/httpd: fix broken PHP extensions

Motivation for this change
Fix PHP extensions not being loaded by the httpd’s PHP module.
Fixes: #85401
Things done

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

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

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

@jtojnar why is this override not required? What happens when I have this configuration:
services.httpd.package = myCustomApacheHttpd;
services.httpd.phpPackage = myCustomPHP;

Since php requires apacheHttpd the override kinda looks necessary to me... : thinking: Can you please explain what part I have overlooked? Sorry if this is really obvious and I'm just not getting it.

Oops, just meant to remove the .dev part.

Oh yes, that's not required. I was going to fix that after https://github.com/NixOS/nixpkgs/pull/85026 so thanks!

@GrahamcOfBorg test php

@GrahamcOfBorg build nixosTests.php


Mobile controls should be customizable

The current setup is "move on the left, rotate on the right" but some people will be really used to playing with the keyboard and want those swapped.
Elite players might even want move left/move right to be bound to the left/bottom buttons, so that they have to move their thumb less during normal play. Who knows. But, the controls should be customizable.

 While I can't really tell yet (both seem crazy and unintuitive to me) I feel like consistency will help.


Unhandled Exception: System.IndexOutOfRangeException

I'm using the aconv command in a Windows environment with git installed.
Command line:
aconv Data\MyFile.zip Data\MyFile23.txt -i ancestry -o 23andme
Error message:
Unhandled Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.

Same issue, input file is geno2

aconv.exe Genetic-1.csv ancest-1.csv -o ancestry
+-------------------------------------------+
| Product: Autosomal DNA Converter          |
| Website: www.y-str.org                    |
| Developer: Felix Immanuel<EMAIL_ADDRESS>  |
| Version: 1.4                              |
| Build Date: 22-Jun-2015                   |
+-------------------------------------------+

Unhandled Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at atDNA_Conv.Program.updateMasterSNPlist(String infile, String outfile, Int32 intype, Int32 outtype)
at atDNA_Conv.Program.Main(String[] args)


Unable to add Point & Figure chart

I'm trying to add Point & Figure chart but get error below :

Here is my component:
`var { ChartCanvas, Chart, series, scale, coordinates, tooltip, axes, indicator, helper } = ReStock;
var pointAndFigureTransformOptions = { boxSize: 0.25 };
var { BarSeries, LineSeries, AreaSeries, PointAndFigureSeries } = series;
var { discontinuousTimeScaleProvider } = scale;
var { CrossHairCursor, MouseCoordinateX, MouseCoordinateY, CurrentCoordinate } = coordinates;
var { EdgeIndicator } = coordinates;
var { OHLCTooltip, MACDTooltip } = tooltip;
var { XAxis, YAxis } = axes;
var { pointAndFigure } = indicator;
var { fitWidth, TypeChooser } = helper;
class PointAndFigure extends React.Component {
getChartCanvas() {
return this.refs.chartCanvas;
}
render() {
var { data, type, width, ratio } = this.props;
var pAndF = pointAndFigure();
	return (
		<ChartCanvas ref="chartCanvas" ratio={ratio} width={width} height={400}
				margin={{ left: 80, right: 80, top: 10, bottom: 30 }} type={type}
				seriesName="MSFT"
				data={data} calculator={[pAndF]}
				xAccessor={d => d.date} xScaleProvider={discontinuousTimeScaleProvider}>
			<Chart id={1}
					yExtents={d => [d.high, d.low]}
					padding={{ top: 10, bottom: 20 }}>
				<XAxis axisAt="bottom" orient="bottom"/>
				<YAxis axisAt="right" orient="right" ticks={5} />
				<MouseCoordinateY
					at="left"
					orient="left"
					displayFormat={d3.format(".4s")} />

				<PointAndFigureSeries />
				<OHLCTooltip origin={[-40, 0]}/>
			</Chart>
			<Chart id={2}
					yExtents={d => d.volume}
					height={150} origin={(w, h) => [0, h - 150]}>
				<YAxis axisAt="left" orient="left" ticks={5} tickFormat={d3.format(".0s")}/>

				<MouseCoordinateX
					at="bottom"
					orient="bottom"
					displayFormat={d3.timeFormat("%Y-%m-%d")} />
				<MouseCoordinateY
					at="left"
					orient="left"
					displayFormat={d3.format(".4s")} />

				<BarSeries yAccessor={d => d.volume} fill={d => d.close > d.open ? "#6BA583" : "#FF0000"} />
			</Chart>
			<CrossHairCursor />
		</ChartCanvas>

	);
}

}
PointAndFigure.propTypes = {
data: React.PropTypes.array.isRequired,
width: React.PropTypes.number.isRequired,
ratio: React.PropTypes.number.isRequired,
type: React.PropTypes.oneOf(["svg", "hybrid"]).isRequired,
};
PointAndFigure.defaultProps = {
type: "svg",
};
PointAndFigure = fitWidth(PointAndFigure);`
Data array:

By the way, I have only trouble with Point & Figure chart. Other charts (Area, Candlestick, Heikin Ashi, Renko and Kagi) work fine with such kind of data.
Hope You can help. Thanks in advance!

I have seen this problem earlier, I dont quite recall what the problem was, could you try changing the boxSize and other options?
Also could you try with the new 0.7 beta? (be sure to review the list of breaking changes)
I just created a big list of examples for 0.7
https://codesandbox.io/s/github/rrag/react-stockcharts-examples2/tree/master/examples/PointAndFigure

I tried to implement Point and Figure and get this same exact bug. I notice that in the Examples the updating Point and Figure has the same issue. It seems that the big difference is that the data I am using is not day data but also hour and minute data. If any help here, here is the function and data input I am using to the chart framework (input data in the form of type string:  "2018-03-16 12:25:32"):
`function parseData() {
return function(d) {
    var s = d.date.replace(/[ :]/g, "-").split("-");
    d.date = new Date( s[0], parseInt(s[1],10) - 1, s[2], s[3], s[4], s[5] );

	return d;
};

}`
I feel this bug is still an issue. It would be nice to have this working.

@QRMarketing after the P&F is calculated what is the length of the data? I suspect this error happens when you have a data of length 1. This only happens when the ohlc data [] length is too small to begin with.

Thanks for the response.
In review this is this same error:
TypeError: Cannot read property 'getTime' of undefined
(anonymous function)
C:/Users/blue/Desktop/PF_bptweb.1.4/bptweb/bptapp/node_modules/react-stockcharts/lib/scale/discontinuousTimeScaleProvider.js:43
40 |
41 | var i = initialIndex;
42 | var row = {

43 | 	date: d.getTime(),
44 | 	startOf30Seconds: false,
45 | 	startOfMinute: false,
46 | 	startOf5Minutes: false,
View compiled
(anonymous function)
C:/Users/blue/Desktop/PF_bptweb.1.4/bptweb/bptapp/node_modules/react-stockcharts/lib/utils/slidingWindow.js:57
54 | return data.map(function (d, i) {
55 | 	// console.log(d, i);
56 | 	if (i < skipInitial + size - 1) {
57 | 		return undef(sourceFunction(d), i, misc);
58 | 	}
59 | 	if (i >= skipInitial + size) {
60 | 		// Treat windowData as FIFO rolling buffer
View compiled
slidingWindow
C:/Users/blue/Desktop/PF_bptweb.1.4/bptweb/bptapp/node_modules/react-stockcharts/lib/utils/slidingWindow.js:54
51 | var accumulatorIdx = 0;
52 | var undef = (0, _index.functor)(undefinedValue);
53 | // console.log(skipInitial, size, data.length, windowData.length);
54 | return data.map(function (d, i) {
55 | 	// console.log(d, i);
56 | 	if (i < skipInitial + size - 1) {
57 | 		return undef(sourceFunction(d), i, misc);

The data input is confirmed at 1000 records. I looked at the data in slidingWindow.js point and it has just one empty array item. See below:

It is like it is not building the PF data correctly, due to some reason (see the format of data from above). Note: The other chart series all work fine and have this same data input.