transferring props to children in 1.0.0

Hey,
I am now migrating our code from 0.13.3. I really think that using (taking from a closed issue):
React.cloneElement(this.props.children, { appState: this.state });

To transfer props to children, is an anti-pattern. I mean, this is really not the way to transfer props using React. I find that using RouteHandler is much simpler, and readable.

RouteHandler had its own problems though. With react-router, your route handlers are controlled by the router itself, so imo a route component shouldn't need to know about its child and which props it requires, just where to render it.
The new API gives you createElement to hook into the router and decide which props to pass to your components. In your example, appState seems like a good candidate to pass directly to all route handlers, instead of passing it manually from route component to route component.

@taurose looks like a good point, and a good solution. Thank you :)

@taurose coming to implement your solution, it looks like I need a switch case to handle which props to inject, which seems like I might as well just use this switch case to decide which components to render (which is exactly what react-router wants to help us avoid). I have looked into AsynProps, but I don't want every component with props, to have to know my AppStore. I know the above example is injecting the whole state for which createElement will be good, but I have cases where I transfer to the RouteHandler just something out of the state.

+1 to what @omerts said It's harder to move the props down the chain like that.
Parent always need to know what it supposed to pass on to its children (in functional paradigm)

By the way there is another problem using createElement, when the parent re-renders using setState, createElement isn't called

@taurose createElement would only work when I want to pass down something from within the module in which I set up the router, would it?
I'm currently trying to pass some actions from within the router's main component to this.props.children for the child to call:
export default class App extends React.Component {
  render() {
    const { dispatch } = this.props;
    const actions = bindActionCreators(Actions, dispatch); // <-- actions
    return (
      <div>
        {this.props.children} // <-- feed me actions
      </div>
    )
  }
}

My current line of thought: The main component (and not the router) is the correct place for these actions to be passed down — would this imply that I have to use @omerts code from the first post?

I have a similar problem and want to explicitly set the properties for child components based on each route. I suggested in #1857 to use the route map for this.  Using a function for the handler that returns a React component would allow the properties to be set explicitly and avoid a switch/case. Something like:
<Route path="/inbox" handler={ (props,state) => <Inbox user={props.users} />}>
    <Route path=":messageId" handler={ (props,state,params) => <Message messageId={params.messageId}/> }/>
    <Route path="*" handler={InboxStats}/>
</Route>
<Route path="/calendar" handler={ (props,state) => <Calendar user={props.user} timezone={props.timezone} />} />

React.cloneElement is public API, route handlers should be thought of as entry points into your app and you should rarely need to clone the children, it should be pretty opaque.
We measured the tradeoffs and find this.props.children to give us the best benefit,

I'm sorry, I think I missed the conclusion. How do you pass props to children using 1.0??
Thanks in advance!

@aybmab - you may find this ticket helpful: #1857
Plus this page helped with the use of createElement: https://github.com/rackt/react-router/blob/3891ee7fcf4e780aa54ce1f68f271f419d2cd1b1/docs/api/Router.md

@joewood thanks! That definitely helped.

I just wanted to add my voice to this.   I am server side rendering and I need to pass a few properties in to the component that's going to be rendered, but I need to do it per request - having a single createElement override is not helpful.  I really want to be able to pass additional properties in to RouteContext and have them filter down in to my components.  Is there some way to do this that I'm missing?

@BrandesEric
Not recommended, but you could you do something like cloneElement(this.props.children, _.omit(this.props, 'children'))
You may want to step back and consider what you are ultimately trying to accomplish.  Generally if you are providing different data for different requests, you'd do something like:

Get the data for that request (which you already have)
Hydrate some store with that data (store in the flux-y sense)
Connect that store to the relevant container component (optionally you just connect the store to whatever component needs the data)

Does your use case fit this pattern?

Yeah, I'm struggling with the right Flux impl.  I prefer Reflux because it's so simple, but it's not great on the server.  I've looked at a few of the isomorphic ones and they look overly complicated.

I think I'm having problem with property propagation when it comes to sub-routes of nested components. These sit under the same container component, so this makes it very difficult to selectively propagate properties from a container down to those child components. Sending a reference to the entire store just doesn't feel like a good separation of concerns.

I can commiserate with that struggle.  FWIW, I used a couple flux-ish libraries and eventually chose Redux.  Its use of a single state tree (store) where containers use "selectors" to propagate only the data their children need eases the messiness @joewood mentioned.  Selectors seem pretty effective at decoupling store/state tree from components.
There are many resources, but a couple I found helpful:

https://medium.com/@bananaoomarang/handcrafting-an-isomorphic-redux-application-with-love-40ada4468af4
https://github.com/erikras/react-redux-universal-hot-example

I've been browsing related issues for some time and only now did I start to grasp how to properly do this in 1.0.0-rc1. Let me know if I've made a mistake, this is fresh knowledge and not thoroughly tested.
Passing props to routes
Route used for all examples below.
React.render((
  <Router>
	<Route path="/" component={RootComp} myprop="foo">
	    <Route path="foo" component={FooComp}>
	       <Route path="bar" component={BarComp} />
	    </Route>
	</Route>
  </Router>
), document.getElementById('example'));

Option 1) With route attributes
this.props.route.myprop is accessible in RootComp, but not in any of the child routes. The only workaround is to access this.props.routes[0].myprop, but I consider that hacky.
class RootComp extends React.Component {
    render: {
        this.props.route.myprop // == "foo"
    }
}

Option 2) To first level children with React.cloneElement()
Read this.props.route.myprop in RootComp, then pass down as extra property to its rendered children with React.cloneElement().
Note: I can only seem to access this.props.myprop from FooComp, but not in BarComp. I was puzzled by this, so it seems to only pass to first-level children. Not sure if this is a bug or intended behavior?
class RootComp extends React.Component {
    render: {
        React.cloneElement(this.props.children, {myprop: this.route.myprop})
    }
}

class FooComp extends React.Component {
    render: {
        this.props.myprop // == "foo"
    }
}

class BarComp extends React.Component {
    render: {
        this.props.myprop // == undefined
    }
}

Option 3) To all route components with Router.createElement
Source: https://github.com/rackt/react-router/blob/master/docs/API.md#createelementcomponent-props
Add this.props.myprop to all route components with createElement. Useful for things like data stores.
<Router createElement={createElement} />

function createElement(Component, props) {
   // Add myprop to props for all route components
    _.extend(props, {myprop: "foo"})
  return <Component {...props}/>
}

@anjdreas

Note: I can only seem to access this.props.myprop from FooComp, but not in BarComp. I was puzzled by this, so it seems to only pass to first-level children. Not sure if this is a bug or intended behavior?

I think this is intended behavior, as RootComp's this.props.children consists of [FooComp]. FooComp gets passed the property (since RootComp is cloning it and passing it down) while BarComp isn't getting anything because FooComp isn't cloning/injecting the props for its this.props.children (which consists of [BarComp]).
Hopefully that makes sense, but I believe that's what's causing the injected props to only go one level deep.

That's just how props work in React. Otherwise you can use context.

Thanks for the clarification. I think the main thing I've come to realize after using nested routes more lately is that you need to do this type of pattern in all route components that has child routes:
class FooComp extends React.Component {
render() {
  // URL points to a child route component of FooComp, so render children
  if (this.props.children) {
    return this.props.children
  }

  // URL points to FooComp, so render FooComp
}

After realizing this, it's just a matter of repeatedly doing this to keep passing on myprop in solution 2, but I still don't like that pattern.
  return React.cloneElement(this.props.children, {myprop: this.route.myprop})

If you need to pass something down deeply, I recommend using React context. At this point this discussion doesn't really touch on React Router any more, though. Let's stop commenting on this issue unless there's something new to add regarding the original problem.

Wouldn't named components solve this?
The thinking is - route components are supposed to be route-driven - that is, should be able to restore their "state" by using route and routeParams (and params) only.
For cases where you must to pass some sort of configuration (because it should be used for data, that's your controller component's job to bring in) from parent route to child route - you opt in using named components:
<Route component={Parent}>
            <Route components={{child: Child}}/>
</Route>

and in Parent:
export class Parent extends React.Component {
    render() {
        const myProp = 1000;
        const Child = this.props.child.type;
        return (
            <main className="app-content dashboard">
                <Child someProp={myProp}/>
            </main>
        );
    }
}

Now, you should add some defensive code around it, in case no one passed named component in, but this seems like a cleaner workaround.

No, that's wrong - use cloneElement, that's what it's for.

@taion
Wrong how?

named components - ?
using named components inside route - ?
passing props to components - ?

I am missing something here and, frankly, it puzzles me that you'd say that purely React-esque way of doing this is wrong, but using this abomination (pardon my language) is right:
React.cloneElement(this.props.children, {myprop: this.route.myprop})

Can you perhaps elaborate a little?

The cloneElement pattern is exactly how you inject new props into another component in React.

@taion
While this might be true (and I think that using cloneElement in such a way is code stink, on React part), it still doesn't explain why you think my suggested solution is wrong.

You lose all the route props the routing context has injected into that component (params, &c.).
There are probably also nasty edge cases there if the child is e.g. a stateless component or something.
Anyway, I'm locking this issue for now, since it doesn't seem like there's any more meaningful discussion. I encourage everyone involved to learn more about standard React patterns.


website: Remove extra slash from website URLs

Algolia has indexed our whole docs website twice, and is returning all
search results twice (#2561). I suspect this is related to how the
generated source code contains an incorrect double-slash:
<link data-rh="true" rel="canonical" href="https://docs.gitops.weave.works//docs/installation/">

This change appears to make the double-slash go away but still leave
links working, which should fix the problem. Maybe.

Staging docs site still seems to work and have the right URLs.


[cosmo-dycore] Merges changes from Jonas and Dominic

This branch is currently based on the branch 'pytest-xdist', so it can test faster. But its changes are independent.

:green_circle: daint/integration_test/spack_info_cosmo-dycore.log
:green_circle: daint/integration_test/spack_spec_cosmo-dycore.log
:green_circle: daint/integration_test/spack_spec_cosmo-dycore_+cuda_+gt1_+build_tests.log
:green_circle: daint/integration_test/spack_spec_cosmo-dycore_~cuda_+gt1.log
:red_circle<EMAIL_ADDRESS>:red_circle<EMAIL_ADDRESS>:red_circle<EMAIL_ADDRESS>:red_circle<EMAIL_ADDRESS>:green_circle: daint/unit_test/summary.log

launch jenkins cosmo-dycore

:green_circle: tsa/integration_test/spack_info_cosmo-dycore.log
:green_circle: tsa/integration_test/spack_spec_cosmo-dycore.log
:green_circle: tsa/integration_test/spack_spec_cosmo-dycore_+cuda_+gt1_+build_tests.log
:green_circle: tsa/integration_test/spack_spec_cosmo-dycore_~cuda_+gt1.log
:green_circle<EMAIL_ADDRESS>:green_circle<EMAIL_ADDRESS>:green_circle<EMAIL_ADDRESS>:green_circle<EMAIL_ADDRESS>:green_circle: tsa/unit_test/summary.log

:green_circle: daint/integration_test/spack_info_cosmo-dycore.log
:green_circle: daint/integration_test/spack_spec_cosmo-dycore.log
:green_circle: daint/integration_test/spack_spec_cosmo-dycore_+cuda_+gt1_+build_tests.log
:green_circle: daint/integration_test/spack_spec_cosmo-dycore_~cuda_+gt1.log
:green_circle<EMAIL_ADDRESS>:green_circle<EMAIL_ADDRESS>:green_circle<EMAIL_ADDRESS>:green_circle<EMAIL_ADDRESS>:green_circle: daint/unit_test/summary.log

:green_circle: balfrin/integration_test/spack_info_cosmo-dycore.log
:green_circle: balfrin/integration_test/spack_spec_cosmo-dycore.log
:green_circle: balfrin/integration_test/spack_spec_cosmo-dycore_+cuda_+gt1_+build_tests.log
:green_circle: balfrin/integration_test/spack_spec_cosmo-dycore_~cuda_+gt1.log
:red_circle<EMAIL_ADDRESS>:red_circle<EMAIL_ADDRESS>:red_circle<EMAIL_ADDRESS>:red_circle<EMAIL_ADDRESS>:green_circle: balfrin/unit_test/summary.log


Calypso SmartCard support

Hi,
Would it be possible to support Calypso SmartCard technology ? I have no idea if it's possible but that's what most Transit company use in Canada

Used too in Paris (Navigo pass)

This list is pretty much everything that could be supported by TransitPal, although support would obviously need to be added. Keep in mind, iOS supports everything on that list except MIFARE Classic.

Awesome.
I ran the app on my iPhone Xs Max running iOS 13 Beta 5 with Xcode 11 beta 5and I , I have correctly the ready to scan modal, but with my Navigo card (which is Iso14443) I cannot get at least into tagReaderSession, it's stuck as if there is no card.

Calypso smartcard including Navigo is supported by my iOS port of Metrodroid: https://github.com/micolous/metrodroid/pull/568


🐛 Compile on Linux fails with error

Complete The Items Below

[X] I have updated the title without removing the 🐛 emoji.
[X] I searched whether or not an issue already exists for the bug I encountered.

Current Behavior
Using Rider on EndeavourOS (A variant of Arch Linux) to compile a very simple example with Velaptor causes an error during compilation.
Expected Behavior
To compile properly and pop up a Window as per the exact same process on Windows 11 and Rider using the same version of .net.
Steps To Reproduce

Create a new console C# project with Rider
Using NuGet, add kinsondigital.velaptor/1.0.0-preview.23 to project.
Create a simple Game.cs with:

using Velaptor.UI;

namespace GameApp;

public class Game : Window
{

}

Create a simple Program.cs with:

var game = new GameApp.Game();
game.Show();

Compile Program.cs causes the following compile time error:

/home/hendrin/RiderProjects/GameApp/GameApp/bin/Debug/net7.0/GameApp
Unhandled exception. SimpleInjector.ActivationException: The configuration is invalid. Creating the instance for type IItemCache<string, ITexture> failed. Field not found: 'FreeTypeSharp.Native.FT.FT_Init_FreeType'. Verification was triggered because Container.Options.EnableAutoVerification was enabled. To prevent the container from being verified on first resolve, set Container.Options.EnableAutoVerification to false.
---> System.InvalidOperationException: The configuration is invalid. Creating the instance for type IItemCache<string, ITexture> failed. Field not found: 'FreeTypeSharp.Native.FT.FT_Init_FreeType'.
---> SimpleInjector.ActivationException: Field not found: 'FreeTypeSharp.Native.FT.FT_Init_FreeType'.
---> System.MissingFieldException: Field not found: 'FreeTypeSharp.Native.FT.FT_Init_FreeType'.
at Velaptor.NativeInterop.FreeType.FreeTypeInvoker.FT_Init_FreeType()
at Velaptor.Content.Fonts.Services.FontService..ctor(IFreeTypeInvoker freeTypeInvoker, ISystemMonitorService sysMonitorService, IPlatform platform)
at lambda_method36(Closure)
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonRegistration.Execute(Func1 instanceCreator)    at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonRegistration.GetInterceptedInstanceWithNullCheck()    at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonRegistration.GetInterceptedInstance()    at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonRegistration.BuildExpression()    at SimpleInjector.InstanceProducer.BuildExpressionInternal()    at SimpleInjector.Internals.LazyEx1.InitializeAndReturn()
at SimpleInjector.InstanceProducer.BuildExpression()
--- End of inner exception stack trace ---
at SimpleInjector.InstanceProducer.BuildExpression()
at SimpleInjector.Registration.BuildConstructorParameters(ConstructorInfo constructor)
at SimpleInjector.Registration.BuildNewExpression()
at SimpleInjector.Registration.BuildTransientExpression()
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonRegistration.GetInterceptedInstanceWithNullCheck()
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonRegistration.GetInterceptedInstance()
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonRegistration.BuildExpression()
at SimpleInjector.InstanceProducer.BuildExpressionInternal()
at SimpleInjector.Internals.LazyEx1.InitializeAndReturn()    at SimpleInjector.InstanceProducer.BuildExpression()    at SimpleInjector.Registration.BuildConstructorParameters(ConstructorInfo constructor)    at SimpleInjector.Registration.BuildNewExpression()    at SimpleInjector.Registration.BuildTransientExpression()    at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonRegistration.GetInterceptedInstanceWithNullCheck()    at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonRegistration.GetInterceptedInstance()    at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonRegistration.BuildExpression()    at SimpleInjector.InstanceProducer.BuildExpressionInternal()    at SimpleInjector.Internals.LazyEx1.InitializeAndReturn()
at SimpleInjector.InstanceProducer.BuildExpression()
at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
--- End of inner exception stack trace ---
at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt(InstanceProducer[] producersToVerify)
at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt()
at SimpleInjector.Container.VerifyInternal(Boolean suppressLifestyleMismatchVerification)
at SimpleInjector.Container.Verify(VerificationOption option)
at SimpleInjector.Container.Verify()
at SimpleInjector.Container.NotifyAndLock()
--- End of inner exception stack trace ---
at SimpleInjector.Container.NotifyAndLock()
at SimpleInjector.Container.GetInstanceTService
at Velaptor.Factories.WindowFactory.CreateWindow()
at Velaptor.UI.Window..ctor()
at GameApp.Game..ctor()
at Program.$(String[] args) in /home/hendrin/RiderProjects/GameApp/GameApp/Program.cs:line 2
Process finished with exit code 134.
Operating System(s)
Linux
OS Version
Endeavouros_Cassini_Nova-03-2023_R3
Kernel 6.4.10-arch1-1
Anything Else
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

@Hendrin-Mckay Thank you for bringing this issue to my attention.
I apologize for posting this so late. The notification system built into GitHub is horrible, and I have had issues with missing stuff before because the notifications don't come through as they should.
I will be honest, though: I have kept the direction of Velaptor as primarily cross-platform, but I have yet to do heavy testing and know there will be issues. I have been planning an initiative to dig my heels in and spend a bunch of time getting Velaptor working on Linux with no problems.
I have contributors who come through, but only a few, and 99% of these projects are maintained solely by me. I also have a client, so it isn't easy to get the things I want done.
Again, thanks for filing this issue! Greatly appreciate that!  If you are interested in contributing anything, even noncode-related, let me know!

@Hendrin-Mckay Also, can you let me know if you have tried this with the latest version of Velaptor?

I understand and no worries.
I just tried with the latest version of Velaptor (Preview 36) and got the following:
Unhandled exception. SimpleInjector.ActivationException: The configuration is invalid. Creating the instance for type IFontFactory failed. The registered delegate for type IFontStatsService threw an exception. Currently loading system fonts is only supported on Windows. Verification was triggered because Container.Options.EnableAutoVerification was enabled. To prevent the container from being verified on first resolve, set Container.Options.EnableAutoVerification to false.
 ---> System.InvalidOperationException: The configuration is invalid. Creating the instance for type IFontFactory failed. The registered delegate for type IFontStatsService threw an exception. Currently loading system fonts is only supported on Windows.
 ---> SimpleInjector.ActivationException: The registered delegate for type IFontStatsService threw an exception. Currently loading system fonts is only supported on Windows.
 ---> System.NotSupportedException: Currently loading system fonts is only supported on Windows.
   at Velaptor.Factories.PathResolverFactory.CreateSystemFontPathResolver()
   at Velaptor.Factories.PathResolverFactory.CreateFontPathResolver()
   at Velaptor.IoC.<>c.<SetupServices>b__13_0()
   at lambda_method70(Closure)
   at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonRegistration.Execute(Func`1 instanceCreator)
   at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonRegistration.GetInterceptedInstanceWithNullCheck()
   at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonRegistration.GetInterceptedInstance()
   at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonRegistration.BuildExpression()
   at SimpleInjector.InstanceProducer.BuildExpressionInternal()
   at SimpleInjector.Internals.LazyEx`1.InitializeAndReturn()
   at SimpleInjector.InstanceProducer.BuildExpression()
   --- End of inner exception stack trace ---
   at SimpleInjector.InstanceProducer.BuildExpression()
   at SimpleInjector.Registration.BuildConstructorParameters(ConstructorInfo constructor)
   at SimpleInjector.Registration.BuildNewExpression()
   at SimpleInjector.Registration.BuildTransientExpression()
   at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonRegistration.GetInterceptedInstanceWithNullCheck()
   at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonRegistration.GetInterceptedInstance()
   at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonRegistration.BuildExpression()
   at SimpleInjector.InstanceProducer.BuildExpressionInternal()
   at SimpleInjector.Internals.LazyEx`1.InitializeAndReturn()
   at SimpleInjector.InstanceProducer.BuildExpression()
   at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
   --- End of inner exception stack trace ---
   at SimpleInjector.InstanceProducer.VerifyExpressionBuilding()
   at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt(InstanceProducer[] producersToVerify)
   at SimpleInjector.Container.VerifyThatAllExpressionsCanBeBuilt()
   at SimpleInjector.Container.VerifyInternal(Boolean suppressLifestyleMismatchVerification)
   at SimpleInjector.Container.Verify(VerificationOption option)
   at SimpleInjector.Container.Verify()
   at SimpleInjector.Container.NotifyAndLock()
   --- End of inner exception stack trace ---
   at SimpleInjector.Container.NotifyAndLock()
   at SimpleInjector.Container.GetInstance[TService]()
   at Velaptor.Factories.WindowFactory.CreateWindow()
   at Velaptor.UI.Window..ctor()
   at HelloVelaptor.Game..ctor()
   at Program.<Main>$(String[] args) in /home/hendrinm/RiderProjects/TestApp/TestApp/Program.cs:line 3

Process finished with exit code 134.

It still seems to be a font issue, although a different error this time, in that loading system fonts is only supported on Windows, hence why it would throw an exception on Linux.  Systems fonts are usually stored in /usr/share/fonts.
I'm not sure I got a good enough grasp of C# yet to be able to contribute but I will definitely let you know.
Operating System(s)
Linux
OS Version
Endeavouros Gemini
Kernal 6.9.6-arch1-1
Gnome/Wayland

I will see if I can make heads of tails of the code and perhaps submit a PR if I can.  I did comment out the exceptions for Windows only  and if I copied the TTF fonts to a /Content/Fonts directory where it builds, it all runs, so this was the only blocker for things running on Linux as I got a few of the examples working fine as well as the font rendering example.

I will see if I can make heads of tails of the code and perhaps submit a PR if I can. I did comment out the exceptions for Windows only and if I copied the TTF fonts to a /Content/Fonts directory where it builds, it all runs, so this was the only blocker for things running on Linux as I got a few of the examples working fine as well as the font rendering example.

That is great news!!  I am super glad that it ran that well. That means less work for me.  😊
It would be awesome if you could help out.  No pressure, though.  I understand how busy we can all be.
Let me know if you need anything at all. I think I saw your name on the Discord server, so you can also reach me there.

Made a draft pull request. Still learning Git and Github so if I did something in correct please let me know:
https://github.com/KinsonDigital/Velaptor/pull/982

Space Shooter Example Running on EndeavourOS Linux.  Still trying to resolve the issue where the window has to be resized before it renders.

Made a draft pull request. Still learning Git and Github so if I did something in correct please let me know: #982

Not a problem at all.  I added a comment to that pull request with some more info.  I understand that you are new and that is completely fine.  😊
If you have any questions about git and github, practices and how to contribute, let me know and let's talk about it!! 🚀

My apologies in getting back to this. Was dealing with COVID. Attempting to do a new draft pull request following the Contribution Guidelines.

My apologies in getting back to this. Was dealing with COVID. Attempting to do a new draft pull request following the Contribution Guidelines.

No apologies are necessary!  😀
Thanks for responding though.  Greatly appreciated.

@Hendrin-Mckay
Quick Update
I am currently working through some content-loading-related changes. These changes have been in the backlog for a while and involve improvements and more cross-platform compatibility. Because of this and what I have discovered so far, I would please ask that you do not waste your time on this issue.
There will be too many changes, conflicts, and a direction that I might have to change, making your contributions on this issue pointless.
I am going to assign this issue to myself to tackle later, as it concerns some other changes that I have to deal with.
I apologize for any time you might have wasted on this. If you are interested in possibly tackling something else or something else, please let me know!

No worries and no need to apologize.
Will do!

No worries and no need to apologize.
Will do!

Thanks @Hendrin-Mckay !!

Closed without merging
Reason: This issue was fixed indirectly by another issue.


Chore: node bindings dx

Description
Now that we have the framework for the node bindings in, next steps are ensuring a good experience when developing the bindings. This issue tries to list out the paper cuts we have right now.

Document how to run the example script.

Running node example.js results in an error about it having an import and that we need to rename with a .mjs extension or update the package.json. Should we do that, or should be be running the example differently.

Debug SIGABRT when running adding additional tests

Currently hitting a abort trap: 6 on npm and error Command failed with signal "SIGABRT". on yarn. Currently unknown what's causing this

Running node example.js results in an error about it having an import and that we need to rename with a .mjs

honestly I just run it with bun. It's soo much easier than dealing with module imports & the terrible node ecosystem.

Originally I was using the example file for testing purposes. Honestly, I didn't realize I committed it until you opened this issue.

Running node example.js results in an error about it having an import and that we need to rename with a .mjs extension or update the package.json. Should we do that, or should be be running the example differently.

This is just node specific BS. Somehow, node still can't natively handle import statements without using either custom extensions or transpilation.
I've since just started using bun as it all works out of the box. I highly recommend it.
Otherwise, we can replace the example with commonjs compatible code.
const glaredb = require('./glaredb.js');

async function main() {
    let con = await glaredb.connect();
    let res = await con.sql("select * from '../testdata/json/userdata1.json' limit 1");
    let df = await res.toPolars();
    console.log("polars\n---\n ", df.toString());
}

main().catch(console.error);

I think it'd be good to be able to run the example file with nothing special required even if it's not great.


Mutliple buttons

Is it possible to display multiple menu buttons on the same screen? E.g: Bottom left menu has certain buttons rating to requirement A, Bottom right menu has certain buttons relating to requirement B but neither menu must display it's buttons when the other is clicked.

It definitely was some time ago (see an example on Codepen I made some time ago).
The code has changed quite a lot, but it should still be possible, but only way is trying. Did you make some tests?


adding prop to customize path for googletagmanager script

Hi and thank you for your great lib
I want to add an ability to use a customized googletabmanager script so it can be modified and optimized to bypass ad-blockers
I am a writer on Medium and if you approve this request I will cover the above solution in my next article with credits to your work
https://medium.vladmykol.com/

Good stuff, thanks @vladmykol !


Move to jib

Fix @pascalgrimaud comment
https://github.com/jhipster/generator-jhipster/pull/8352#issuecomment-424012957

Great thx!


Release Service

The scenario player downloads raiden binaries as archives from our DO space during set-up.
This is done by checking for the presence of an archive with the same name as pointed to by the _LATEST-* file on the DO space is present on disk.
Problem
We currently do not check for validty of files, and do not perform clean up actions. Removing old archives includes ssh-ing into the server and manually removing them.
Downloaded archives and unpacked binaries are not tracked beyond a scenario run.
It's currently not possible to specify a release archive for download.
Solution
We propose the creation of a Release Manager service with the following domain:

Downloading archives
Unpacking archives
Removing archives
Installing Binaries
removing Binaries
Tracking of files downloaded, unpacked and installed using the service
Validation of archives using checksums (need to be provided first)
validating origin / signature of archives/binaries
Providing install/download paths to the files

To-Dos

[x] Write stubs for blueprints, components (#37)
[x] Write unit-test harness (#37)
[ ] Write integration-test harness

Closing. See https://github.com/raiden-network/scenario-player/issues/495


[tool_crash] Invalid argument(s): Cannot find executable for null.

Command
flutter emulator --create flutteremu

Steps to Reproduce

...
...
...

Logs
ArgumentError: Invalid argument(s): Cannot find executable for null.
#0      _getExecutable (package:process/src/interface/local_process_manager.dart:127:5)
#1      LocalProcessManager.runSync (package:process/src/interface/local_process_manager.dart:94:30)
#2      _DefaultProcessUtils.runSync (package:flutter_tools/src/base/process.dart:417:51)
#3      EmulatorManager._getPreferredAvailableDevice (package:flutter_tools/src/emulator.dart:144:46)
#4      EmulatorManager.createEmulator (package:flutter_tools/src/emulator.dart:82:33)
<asynchronous suspension>
#5      EmulatorsCommand._createEmulator (package:flutter_tools/src/commands/emulators.dart:78:31)
#6      EmulatorsCommand.runCommand (package:flutter_tools/src/commands/emulators.dart:48:13)
#7      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:681:18)
#8      _rootRunUnary (dart:async/zone.dart:1134:38)
#9      _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#10     _FutureListener.handleValue (dart:async/future_impl.dart:140:18)
#11     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#12     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#13     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#14     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:556:7)
#15     _rootRun (dart:async/zone.dart:1126:13)
#16     _CustomZone.run (dart:async/zone.dart:1023:19)
#17     _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#18     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965:23)

[✓] Flutter (Channel master, v1.15.4-pre.153, on Microsoft Windows [Version
    10.0.18363.657], locale en-US)
    • Flutter version 1.15.4-pre.153 at C:\flutter
    • Framework revision 9b3754d56f (4 hours ago), 2020-02-24 16:42:30 -0800
    • Engine revision f2f8c342be
    • Dart version 2.8.0 (build 2.8.0-dev.9.0 0f141be8bd)

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\TUF\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling
      support)
    • Platform android-29, build-tools 29.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    ✗ Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit
      https://flutter.dev/setup/#android-setup for detailed instructions.

[✗] Visual Studio - develop for Windows
    ✗ Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including the
      following components:
        MSBuild
        MSVC v142 - VS 2019 C++ x64/x86 build tools
         - If there are multiple build tool versions available, install the latest
        Windows 10 SDK (10.0.17763.0)

[!] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[✓] VS Code (version 1.42.1)
    • VS Code at C:\Users\TUF\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.8.1

[✓] Connected device (1 available)
    • Windows • Windows • windows-x64 • Microsoft Windows [Version 10.0.18363.657]

! Doctor found issues in 3 categories.

Flutter Application Metadata
Version: null
Material: true
Android X: false
Module: false
Plugin: false
Android package: null
iOS bundle identifier: null

This might happen if the android SDK is returning null here: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/emulator.dart#L139
@chaiprasit what is the output of flutter doctor -v

Note the instructions from doctor:
    ✗ Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit
      https://flutter.dev/setup/#android-setup for detailed instructions.

Please try following the instructions at those links to make sure your Android environment is set up properly.  If you find the tool still crashing please ping this bug for us to re-open.

Why I have this error!
DELL@DESKTOP-0GTJ62F MINGW64 ~/Documents/hello_flutter
$ flutter doctor -v
[√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.18362.720], locale en-US)
• Flutter version 1.12.13+hotfix.5 at C:\Flutter Dev\flutter
• Framework revision 27321ebbad (5 months ago), 2019-12-10 18:15:01 -0800
• Engine revision 2994f7e1e6
• Dart version 2.7.0
[X] Android toolchain - develop for Android devices
X ANDROID_HOME = C:\Program Files\Android
but Android SDK not found at this location.
[√] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 44.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[√] VS Code (version 1.44.2)
• VS Code at C:\Users\DELL\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.8.1
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.


osx-arm64 build missing from Anaconda pytorch channel

🐛 Describe the bug
Mac users on Apple silicon (M1, M2) cannot conda install torchdata -c pytorch, receiving "PackagesNotFoundError: The following packages are not available from current channels: -torchdata". This appears to be because torchdata was not built, packaged, and/or submitted to the pytorch channel. Is that something that can be done for future releases?
References:

torchdata shows only linux-64, osx-64, and win-64
torchtext for comparison, showing additional entries, including osx-arm64.

Many thanks.
Versions
Any version.

We are investigating how to provide such binaries to you as Github doesn't host m1 runner for us to create such packages.
As an intermediate solution, you can install torchdata by downloading from source and running python setup.py install.

Thank you. I recognize that hardware access on CI is problematic. Lmk if you need a tester.

I was able to install torchdata on my M1 Max laptop using pip, but then when I tried to actually run the code I got this:
"_torchdata.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))"
I think this is the same issue as above as the root cause??? Basically, the binaries are not for the M1 chip.
Can I solve this issue by building from source as pointed out above?

@jrgreene Yes, you can. And, if you want to enable AWSSDK as well. You can follow the instruction here to compile torchdata from source. I have confirmed with AWS team that it can compiled on M1 chip. So, the C-extension for TorchData (used for AWSSDK) can be compiled for M1 machines.

And, I am working on a PR to add m1 binary.

@fotonick @jrgreene
The nightly releases for arm64 are available on conda. You can install it via:
conda install pytorch torchdata -c pytorch-nightly
In the coming 0.4.1 torchdata release (this week or next week), we will provide arm64 releases as well.

The binaries for arm64 becomes available for nightly release. You can get them via: conda install pytorch torchdata -c pytorch-nightly.
And, for the coming torchdata 0.4.1 minor releases (this week or the next week), you will be able to get arm64 build of torchdata using conda install pytorch torchdata -c pytorch.


Rename shell-function-invoker to command-function-invoker

Any command can be run with no requirement for a shell, so shell-function-invoker is a misnomer.
Co-requisite changes:

The riff CLI (shell and Go) will need to use the correct base image if we rename the base image too.
CI will need to use the new naming and the corresponding job will need renaming.

All done


Yii2 classMap use for rewrite, how can i extends origin class?

use yii2 classMap  can rewrite php class .
if i want rewirte  ‘yii\web\Controller.php’  ， i create a new file  frontend/web/Controller.php’，
classMap config is:
 [
<EMAIL_ADDRESS>]

how can : @front/web/Controller.php extends yii\web\Controller.php  ?
if i copy yii\web\Controller.php to  @front/web/Controller.php , if yii2 update  yii\web\Controller.php , i must re-copy file to @front/web/Controller.php , it is so trouble

Why do you want to do this for yii\web\Controller? Just create your own app\web\Controller class (which extends yii\web\Controller) and use it as base for your controllers.

if i have a software,  it have 1000  controller.php, every controller extends yii\web\Controller ,
if i create  my own app\web\Controller extends  yii\web\Controller ,  then , i must change  1000  controller extends  app\web\Controller , but i use classmap，only change classMap。

use  extends，  you must change code in  Call class ,  if   yii\web\Controller  was used in 10000 file, you  must change code extends   yii\web\Controller in the 10000 files,  That is a very large workload ,   but  use classMap ， you only  change classMap for one line code.
In other cases ， if you use thrid yii extensions  , code was in vendor diretory , You are not allowed to modify the calling class file , but  you can solve this problem by modifying classMap

but classMap  can not extends origin class ,  i must copy all code in origin class to new class,
it was bad for software update code, So I would like to ask if there is a way for classmap to extends the original class

my software fecshop: https://github.com/fecshop/yii2_fecshop
i want user rewrite code use classMap， but  classMap new class  can not extends origin class, So I would like to ask if there is a way for classmap to extends the original class

Obviously you can't extend from class that you want to replace. If you have 10000 controllers that directly extends yii\web\Controller, you have bad architecture of your app and you should fix it now - it will be even harder when you will have 20000 controllers.
Why do you want to modify base controller for extensions?


Clarified comments in constraints/requirements files

No review needed.

coverage: 37.115%. remained the same
when pulling 726ca855fde9d8f80a5fc9873db155d9d79deeb3 on andy/constraints-requirements-comments
into d63d5274d2496a5f174923c025da37231a921f4d on master.


KAFKA-12193: Re-resolve IPs after a client disconnects

This patch changes the NetworkClient behavior to resolve the target node's hostname after disconnecting from an established connection, rather than waiting until the previously-resolved addresses are exhausted. This is to handle the scenario when the node's IP addresses have changed during the lifetime of the connection, and means that the client does not have to try to connect to invalid IP addresses until it has tried each address.
Reviewers: Mickael Maison<EMAIL_ADDRESS>Satish Duggana<EMAIL_ADDRESS>David Jacot<EMAIL_ADDRESS>More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.
Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

This is a backport of 131d4753cfed65ed6dee0a8c754765c97c3d513f to 2.5. As with https://github.com/apache/kafka/pull/10061, the conflicts were due to the missing connection timeout config, which was added in 2.7, and didn't meaningfully change the behavior.

retest this please


New package: STFT v0.1.0

Registering package: STFT
Repository: https://github.com/s-zymon/STFT.jl
Created by: @s-zymon
Version: v0.1.0
Commit: f4d28dfeec8837855f47af4aa82d7767002050ee
Reviewed by: @s-zymon
Reference: https://github.com/s-zymon/STFT.jl/commit/f4d28dfeec8837855f47af4aa82d7767002050ee#commitcomment-72289816
Description: Short-Time Fourier Transform

Please close this pull due to #60052


Disabled logs by default on tests that use the NodeBuilder

The goal was to have logs disabled for nodes started with StartAll and Start
Since every node created need a NodeBuilder, I changed the way NodeBuilder.Create works and I've added two fluent methods to toggle logs on/off
Logs can be enabled calling nodeBuilder.WithLogsEnabled() and if needed disabled again with WithLogsDisabled()
WithLogsEnabled comment contains example for both scenarios

I have modified as requested


Implement sleeper agent

Is your feature request related to a problem? Please describe.
Sleeper Agent: Scalable Hidden Trigger Backdoors for Neural Networks Trained from Scratch
https://arxiv.org/pdf/2106.08970.pdf
Describe the solution you'd like

jupyter notebooks

I can work on implementing this.


Exclude updateUrl/downloadUrl in proxy userscript

When I generate the proxy userscript, it has the @downloadURL and @updateURL in the header from downloadBaseUrl and updateBaseUrl in the plugin settings. Sometimes my userscript manager will update the proxy script from the updateurl and I have to downgrade the proxy script by opening it in the browser again so that it's empty with a @require instead.
Is there a way to stop the proxy script from generating with these headers?

Fixed by #56


Implement API Key authentication

See https://github.com/elastic/apm/issues/183 for a specification.
It might make sense to use this as a test case for pytest-bdd

@beniwohli Hi! I'm new here.
Is this already implemented? I'm not sure.
https://github.com/elastic/apm-agent-python/blob/151f2ef8e7d15e7a21829d9cb72dec8bfeb887e5/elasticapm/transport/http_base.py#L92-L98

This was implemented in #679

Thanks for your offer of help @bartier! Sorry we were slow to respond here.


add Bounded typeclass to an internal package

such as we can write a Monoid instance for Min and Max
see https://github.com/typelevel/cats/issues/1536

partially done for Min


Move elements into JSON file

Move the element definitions out of element.py and into a JSON file.

Codecov Report

Merging #2 into master will decrease coverage by 73.55%.
The diff coverage is 50.00%.

@@             Coverage Diff             @@
##           master       #2       +/-   ##
===========================================
- Coverage   99.41%   25.86%   -73.56%
===========================================
  Files           3        3
  Lines         171       58      -113
===========================================
- Hits          170       15      -155
- Misses          1       43       +42


Allow for Listeners when routes change in Material App.

As a developer I would like to add listeners the Navigator to a MaterialApp so that I can save current state of the app to disk. This would allow for a user to pick up where they last left off.

Yeah we definitely need a way to serialise the state to disk. On Android at least I believe there's system-level support for this which we should leverage.

Does this feature proposal require MaterialApp, or can it work with any Navigator (which I assume doesn't require MaterialApp) ?

Any of these outcomes would be helpful

Tentatively adding a API stability label. If this is a New Feature that doesn't require API stability, we can move to M3.

This is a new feature.

The NavigatorObserver now lets you listen to all the ways the Navigator can change route, does that satisfy your needs, @marklester ?

Sure, if I have any issues I will follow up


How can I manually sync datastore?

I know this has been asked in other places but I don't see any suitable answer anywhere.
Why is there no mechanism for a user to initiate a datastore sync?  The docs don't adequately explain how often the datastore sync operation performs.  For apps that rely on updates to data and for users to ensure their data is current, such as aviation related data, there needs to be some mechanism for users to know they are actually using the most current version of their data.
For example I have data on my app that updates everyday 0600 UTC.  If a user refers to the app at 0601 UTC and needs the most updated info, how can they have confidence that their app is synced?  I would ideally like a sync button that would force the sync operation but their is no api for that.
Also, during the sync the docs say that the most recent 100 items are synced and then 1000 items in batches.  But it doesn't say what happens beyond that.  What if there are 2000 or 10,000 items?  Will they ever be synced?  And if so when.  Can you please provide specific detail on how this sync operation performs.  This is vital to using datastore.

Good question

I don't really understand the question. Maybe I'm missing something, but there's no reason why one would want to do that.
When datastore starts, it syncs with the backend. As soon as it's running, it subscribes to live-updates. Hence it won't lose sync while it's running. Since it doesn't loose sync, how much sense would manually syncing make? - There's no difference to sync.
Looking at the example give above, updates to the backend happen 6:00. If the user starts datastore at 5:59, she'll receive updates as soon as they're provided, since her client is subscribed to all changes. If the user starts datastore at 6:01, the changes get pulled with the initial sync. Answering the question above, the confidence of the latest data comes from the combination of initial sync with subsequent live-updates.
Regarding how many items are synced - it's configurable.

What if I want to store data locally only and don't want to push it to the cloud? In rder to do this you need to exclude the API at configure() time, if you try to add it later it throws an error: you cannot add a plugging after it's configured or something like that

@anatomybook
I understand your point from a developer perspective.  But not from a user perspective.
A user doesn't understand nor should he/she understand how the app works.  They just want to make sure they have the Most current data for data sensitive apps.
If the app has not had a change to the datastore in a few days it may not sync as it's unnecessary.  But a user wants to make sure that their app is synced and the way to do that is providing a sync icon and informing them that the result of the sync is that the app is synced.
If a pilot is going on a flight and they want to make sure that they have the latest database for airports routes etc, they will want to know their app is fully synced before departing on the mission.  From what you have explained it is always in sync and I understand your point.  However the user will not and I don't see what the harm is in giving the functionality to perform a manual sync and report the time that the sync completed.  Again for the sake of the user.    At the moment what your suggesting is leading me to just have a dummy button that does nothing and when the user presses the dummy sync just return that the app is synced with present time.  But seems a bit dodgy.  Why not actually allow a sync to occur.  Is there any harm in that?
I don't believe it is intuitive from a user perspective that a chat is always synced.  I believe they still want the satisfaction of knowing they have checked at THIS MOMENT in time and know for sure their data is current.  As useless as that may seem from a developer perspective.

@alionthego
First of all, I'd like to point out that I'm also just a user. I'm neither a developer nor I am affiliated with AWS or Amazon. I was merely throwing in my 2 cents.
Yes, I agree with you. Apps should be easy. The fewer buttons, the better. That's why I'm actually quite happy with the way things are right now, including a sync button not being necessary.
If you'd like to be sure that you've observed all past events and are subscribed to live-updates, consider observing events. More specially the ready event. You can make also make your code aware of changes in near-real time by coupling it to updates as described here. For more info about events, please check here.
Anyways, just my two cents.

@alionthego I agree w/ the recommendation above by anatomybook. Because DataStore is continuously syncing with AppSync once the app is initialized (unless the user is offline), and will re-establish connection once network connectivity is restored.
The recommendation around listening to hub events is sound as well, if you want to provide users w/ some visual indication of sync status, or last sync time, etc.
If you need finer-grained management of the upload/download behavior, and don't want an always-synced list of models, DataStore may not be the right offering, and using the API library directly may make more sense.

I also can't understand why there is no way in the DataStore to force the sync or even disable the local storage (I mean something like offlineSync:false!
In my experience, when I use the DataStore, sometimes it syncs, and sometimes it does not! It's not predictable! Typically, it should sync the data if you are online. But in my experience,  I was online, and it usually does not sync and I needed to try a few times until it save. (Maybe something is missing from my configuration!)
I say there should be an easy way to force the sync because there are some applications that it's critical for the user to have their data stored on the cloud. That's why there is a database defined and linked to Amplify application. For example, imagine a financial or banking application. They might like to use the DataStore as it's convenient to use, but it's still not perfect for them because it keeps the data locally which they might prefer to not store locally because of security reasons!
This is even important for a social media app. Imagine you "like" somebodies post today, and three days later this action is getting stored on the cloud and the other person receives the notification with a few days' delay.


object_store: add support for using proxy_url for connection testing

Which issue does this PR close?

Closes #2989
Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

added some unit-test. tried it against a local socks5 server

Is this PR ready to go?


Move jupyter notebooks from examples to examples/notebooks directory

QAOA_Demo.ipynb and Rabi_Demo.ipynb. Also, are notebook names supposed to be cased like that? If so we should rename quantum_walks_tutorial.ipynb

Hi, I can do this.

Fixed by https://github.com/quantumlib/Cirq/pull/2831


Turn off antialiasing completely

Environment
Windows build number: ersion 10.0.19041.572
Windows Terminal version (if applicable): Windows Terminal Preview Version: 1.4.2652.0

Steps to reproduce

Clear type turned off
Smoothing of font edges turned off

Expected behavior
Add an ability to turn of antialiasing completely within windows terminal.
Currently antialiasingMode takes only following values:
Accepts: "grayscale", "cleartype", "aliased"
Actual behavior
Even with both clear type turned off and font smoothing turned off,
windows terminal is using own antialiasing mechanism, that doesn't allow "NONE/NO" option.
Compare same font in cmd vs windows terminal (bottom one is wanted/expected)

Did you perhaps try the aliased setting? You know, the anti-anti-aliasing mode?

Now I feel silly. Indeed, setting to aliased makes it work.
I've tried all 3 modes earlier, and it didn't seem like they were working.
After re-reading the docs it's clear why, I haven't restarted the terminal when changing that value.
Thank you, very, very much ❤

One more comment on this... on documentation page:
https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-settings#antialiasing-text
animated image showing the differences between various settings looks gets resized and looks like this

the same image, when opened in full view is ok however:


fix: include src and dst ips in flowhash computation

This fixes the case when two or more flows for the same two pus with different ips are seen back to back and it is reported as being the same flow with just counters being increased. We now include the ips while computing the hash which solves it.

/build - automatically fired by gogo with following PRs and commit SHAs v1.0.0
[
  {
    "project": "",
    "component": "enforcerd",
    "pr-id": "1485",
    "commit-sha": "d070b756be2847822a7995790329a1a89dee64aa"
  },
  {
    "project": "",
    "component": "trireme-lib",
    "pr-id": "912",
    "commit-sha": "1d1aea725056f8cb7f993626d414bb2cc4dd6fea"
  }
]

I am not sure I understand. How an two PUs have different IPs? Is that host services?

/build - automatically fired by gogo with following PRs and commit SHAs v1.0.0
[
  {
    "project": "",
    "component": "enforcerd",
    "pr-id": "1485",
    "commit-sha": "3b8d71eb233af1e7b2383bed5adbd3e14f981f83"
  },
  {
    "project": "",
    "component": "trireme-lib",
    "pr-id": "912",
    "commit-sha": "1d1aea725056f8cb7f993626d414bb2cc4dd6fea"
  }
]

/build - automatically fired by gogo with following PRs and commit SHAs v1.0.0
[
  {
    "project": "",
    "component": "enforcerd",
    "pr-id": "1485",
    "commit-sha": "3b8d71eb233af1e7b2383bed5adbd3e14f981f83"
  },
  {
    "project": "",
    "component": "trireme-lib",
    "pr-id": "912",
    "commit-sha": "1d1aea725056f8cb7f993626d414bb2cc4dd6fea"
  }
]

I am not sure I understand. How an two PUs have different IPs? Is that host services? And in general, we don't really care about that. A flow for us a communication between PUs. We don't care which IPs they used for that. The fact that the Pus communicate is what matters. If they use different IPs, its their problem.

This is seen in docker to docker pus in gcp vm, where the server pu is accessed by both container ip and host ip and both the pus are in same host. The source ip varies in this case. This means we report the flows with wrong ips. @dstiliadis

/build - automatically fired by gogo with following PRs and commit SHAs v1.0.0
[
  {
    "project": "",
    "component": "enforcerd",
    "pr-id": "1485",
    "commit-sha": "512b3d00caf79fb5e8b5192fb26cf6ebf8f7e736"
  },
  {
    "project": "",
    "component": "trireme-lib",
    "pr-id": "912",
    "commit-sha": "1d1aea725056f8cb7f993626d414bb2cc4dd6fea"
  }
]

/build - automatically fired by gogo with following PRs and commit SHAs v1.0.0
[
  {
    "project": "",
    "component": "enforcerd",
    "pr-id": "1485",
    "commit-sha": "7fa7dc06fe7c208b7bf195db59f7f14b21a6434e"
  },
  {
    "project": "",
    "component": "trireme-lib",
    "pr-id": "912",
    "commit-sha": "1d1aea725056f8cb7f993626d414bb2cc4dd6fea"
  }
]

/build - automatically fired by gogo with following PRs and commit SHAs v1.0.0
[
  {
    "project": "",
    "component": "enforcerd",
    "pr-id": "1485",
    "commit-sha": "7fa7dc06fe7c208b7bf195db59f7f14b21a6434e"
  },
  {
    "project": "",
    "component": "trireme-lib",
    "pr-id": "912",
    "commit-sha": "1d1aea725056f8cb7f993626d414bb2cc4dd6fea"
  }
]


fix error

Preserve Real-Ip when not accessed through cloudflare

@Amadeus331 See build status, linting failed for complexity.
It would break normal behavour, so let's rather make it an optional config option and split into seperate statement.

*We also must add tests for this change

@Amadeus331 See build status, linting failed for complexity.
It would break normal behavour, so let's rather make it an optional config option and split into seperate statement.

It's my fault. I shouldn't have added the local IP to trustIP. Now close PR

@Amadeus331 See build status, linting failed for complexity.
It would break normal behavour, so let's rather make it an optional config option and split into seperate statement.

It's my fault. I shouldn't have added the local IP to trustIP. Now close PR

when the request comes from a trusted proxy outside of cloudflare, there is still a problem

@Amadeus331 See build status, linting failed for complexity.
It would break normal behavour, so let's rather make it an optional config option and split into seperate statement.

It's my fault. I shouldn't have added the local IP to trustIP. Now close PR

When the request comes from a trusted proxy other than of cloudflare, there is still a problem

I resubmitted the pull request, and it passed the test this time.


no-conditional-assignment: rewrite and check conditional expressions

PR checklist

[ ] Addresses an existing issue: #0000
[x] New feature, bugfix, or enhancement

[x] Includes tests

[x] Documentation update

Overview of change:
Rewrite to walker function.
Is there anything you'd like reviewers to focus on?
The rule now allows intentional assignments like if (foo(a = b)); or if ((a || (a = b)).foo);. If this is a typo the compiler should reveal that error.
CHANGELOG.md entry:

[bugfix] no-conditional-assignment: exclude intentional assignments, e.g. inside functions
[enhancement] no-conditional-assignment added check for conditional (ternary) expressions

Im so sorry, but is it should works how it works now?:
let len = value ? value.length : 0;

Abowe codeline contains error coz it is ternary operator 🤔

I was wrong. error in:
sum += !(bit ^= 1) ? parseInt(value[len], 10) : numbers[value[len]];

@seokirill the rule only forbids assignments inside of conditions.
Your first code snippet assigns a value according to the condition.
Your second example assigns a value in the condition. That's most likely a bug.


create container.yaml for odcs multi-arch builds

create container.yaml for odcs multi-arch builds
@dorzel @adammhaile Please review.

+1

@ironcladlou @joelsmith Ok to merge? We need to get this in, so can @adammhaile to enable ppc64le builds for OCP.

/lgtm
/approve

Dropping this. We won't be doing odcs builds in the near future. Thanks!


Can not install 'Google.Ads.GoogleAds v5.0.0' with Nuget Package Management

Which version of the client library are you using?

Google.Ads.GoogleAds v5.0.0

Which version of .NET are you using?

.NET Framework 4.7.2

Which operating system (Linux, Windows, ...) and version?

Windows 10 Pro (x64), Visual Studio 2015 version 14.0 Update 3

When installing with Nuget Package Management, the following error message is displayed.
Could not install package 'Microsoft.Extensions.Configuration 3.1.7'. You are trying to install this package into a project that targets
 '.NETFramework,Version=v4.7.2', but the package does not contain any assembly references or content files that
are compatible with that framework. For more information, contact the package author

'Google.Ads.GoogleAds v5.0.0' cannot be installed because of 'Microsoft.Extensions.Configuration'.
How to solve this problem?

I think this has to do with Visual Studio 2015, rather than .NET SDK 4.7.2. This is what Visual Studio 2019 generates for me, when creating a Console Application for .NET SDK 472 and adding Nuget reference to Google.Ads.GoogleAds, 5.0.0.
TestDeps.zip
Could you try this with Visual Studio Community Edition or just compare the two csprojs to see what differs?

Thank you @AnashOommen
solved in visual studio 2019


afvalwijzer doesnt work after update 2024.12.01 (provider Mijnafvalwijzer)

The problem
After the update, no sensor are created. Have rebooted HA several times.
Version of afvalwijzer integration having the issue?
2024.12.01
Version of Home Assistant Core having the issue?
2024.12.0
Anything in the logs that might be useful for us?
This error originated from a custom integration.

Logger: custom_components.afvalwijzer.const.const
Source: custom_components/afvalwijzer/sensor.py:48
integration: Afvalwijzer (documentation, issues)
First occurred: 10:41:06 (1 occurrences)
Last logged: 10:41:06

No discovery information provided; sensors cannot be created.

Additional information

Same here! I reloaded/redownloaded the old version 2024.06.02 and everything is working again. So don't update (yet) :)
Redownloading is done through HACS integration > Search Afvalwijzer > ... dots on the right side > redownload. You can select a different version after that

In my installation, the complete integration disappeared, so I redownloaded and it started working again for PreZero :)

For me it is working, except I can not change the standard configuration.
See my bug in this topic

I missed the release note saying that you have to delete your current configuration of Afvalwijzer, and re-add it via Add integration flow. Info is here https://github.com/xirixiz/homeassistant-afvalwijzer/releases/tag/2024.12.01. Maybe you have missed it too?
Working for me again now.

I missed the release note saying that you have to delete your current configuration of Afvalwijzer, and re-add it via Add integration flow. Info is here https://github.com/xirixiz/homeassistant-afvalwijzer/releases/tag/2024.12.01. Maybe you have missed it too? Working for me again now.

I completely missed that. It's now working for me again for version 2024.12.01.

Great! Then this one can be closed, right?

Resolved after having followed procedure as per release notes for 2024.12.01


Add custom headers to request.

I thik, that is the very important option )

G'Day.  I wanted to get the thing working with my Python API.  Perhaps we are doing similar things?  I can get it to work fine, but spits at anything my CORS gives back.

Yes. I did it for working with django-rest. I send X-CSRFToken. Description of using the ImagesUploader.
        <ImagesUploader
            headers={{"X-CSRFToken": Cookies.get('csrftoken')}}
            ....
        />

But CORS is cross domain request. You can setup white list for cross domain requests in Django.

thanks @RamallahS @Fastrack-Dealernet


will Camunda in Quarkus support UI, rest api and multiple pods

Hi,
I am starting to analyse is it ok to run camunda in spring boot or quarkus. But I have certain doubts can you help me with them.

will camunda ui be rendered here
will camundas rest apis work the same way as in spring boot
also since it is cloud native will it support multiple scaling because in spring boot session does not allow us to be logged in.

Hi @Premfer,
Right now, the Camunda Platform 7 Quarkus integration doesn't provide support for the Webapps or REST API.
What do you mean by "support multiple scaling"?
Best,
Tassilo

Hi @tasso94,
Thanks for the reply.
By multiple scaling I mean increasing the replicas to 2 in deployment file where two pods will be created but we cannot login due to session management in camunda in spring boot.
Thanks,
Deva


Add Christopher Reece  to Contributors list

A grain of a mustard seed.

Hi  @momotofu, I'm quite elated about your pull request. I wanna evolve this project to addresses various problems faced by first-time contributors. I'd love to learn about your journey in open source community, the problems, pain points you had etc.
Could you explain how you felt when you went through the tutorial, made a pull request and learned that I merged it?
We’ve recently added social share  to our web app. Could you please go to https://roshanjossey.github.io/first-contributions/#social-share and share your first contribution to open source?
Also, check out projects with easy issues while you’re there.


Makefile.shlib: No such file or directory

As expected I didn't reveive much attention in SO.
Any idea why this happens? Already tried with psql 10 and 11
https://stackoverflow.com/questions/54026680/compiling-from-source-pipelinedb

@ar-anvd your question has been answered on SO but I'll include the same answer here:
You should be able to use the official PipelineDB binary packages--they are built for x86.
If you would rather build PipelineDB from source, it looks like you'll want to pass the USE_PGXS=1 option to you make install command:
make USE_PGXS=1 install

@derekjn Ubuntu 14.04 x86

@derekjn Currently I had success building from source using USE_PGXS=1.
However now I am getting a "stack smashing detected" when inserting data. Not sure if this is still related with the installation.

@ar-anvd we're taking a look at this on this platform. In the meantime, can you post the output of make USE_PGXS=1? You'll probably want to make clean first...

Thanks @derekjn
I am doing these steps:
make USE_PGXS=1 clean
make USE_PGXS=1 install
make USE_PGXS=1 bootstrap
make USE_PGXS=1 run

make_USE_PGXS=1_install.txt
make_USE_PGXS=1_bootstrap.txt


Documentation / Examples

I've tried to use it, but it looks like you need to connect twice, and it says it is trying to connect to an already connected host.
IRC is hard, this is what I tried:
const string host = "irc.thehost.net";

Console.WriteLine("Connecting...");
NetIRC.Connection.TcpClientConnection tcpClientConnection = new NetIRC.Connection.TcpClientConnection();
await tcpClientConnection.ConnectAsync(host, 6667);

Console.WriteLine("Create user...");
User ircUser = new User("Username", "Real name");

Console.WriteLine("Create client...");
Client ircClient = new Client(ircUser, tcpClientConnection);

Console.WriteLine("Connecting...");
await ircClient.ConnectAsync(host);
Console.WriteLine("Connected.");

Sorry, I can't use it because it is not clear to me. Somewhere I need to join a channel also, so I can send a message to it.
Any documentation, examples or test client would be nice. Thanks in advance!

Hey,
Sorry, I've only seen your issue now :(
The client will manage the connection for you, so in your attempt to use it you tried to connect before creating the client instance.
You should do something like this:
Console.WriteLine("Create user...");
var ircUser = new User("Username", "Real name");

Console.WriteLine("Create client...");
var client = new Client(ircUser, new TcpClientConnection())

Console.WriteLine("Connecting...");
await ircClient.ConnectAsync(host);
Console.WriteLine("Connected.");

You could have a look at the Console client example in here: https://github.com/fredimachado/NetIRC/blob/master/src/NetIRC.ConsoleCli/Program.cs
I'll do some more work on this project soon, and I plan to add more examples and documentation.
Thanks and sorry for the late response.
Fredi

Thanks Fredi.
Could you add this simple example to the main page of the repo? And/or include the info that there is a example console application?
Thanks!

Did you figure out how to join a channel? I'm using await client.SendAsync(new JoinMessage("#carrots")); and it joins but then my app immediately crashes.
System.Reflection.TargetInvocationException: 'Exception has been thrown by the target of an invocation.'
InnerException IndexOutOfRangeException: Index was outside the bounds of the array.

Hey @KoalaBear84,
I've added information about the sample console app in the main README.
Also, the sample was updated and it's heavily commented now. :)

Great 👍


Links in text boxes will not open in new tabs.

PT Story: https://www.pivotaltracker.com/story/show/177104163
[#177104163]
This change will prevent the target attribute from being removed from HTML. This is needed so that links in activities can open in new windows/tabs.

@scytacki Kirk came up with this fix, which nicely fixes the problem described in the PT story. He wondered a little about any security issues with allowing the use of target, but it seems pretty safe considering rel="noopener" is automatically added to any links. Are you aware of any potential issues that aren't solved by rel="noopener?


Add skip tls verification option to https resources

Hello,
I'e added a functionality that I've come to be in need from await.
The use case is when (in docker), the system under test has self-signed certificates (since, for tests, those are "enough", while in production proper certificates would be available).
I used the same method as for the DB related ones, adding a flag on the fragment part of the URL for http resource.
I added the equivalent test for the functionality (the test is much more code than the the functionality... :) )
I also bumped the version of the tool to 1.1.0, since it seems that version 1.0.0 was released, but never actually bumped in the code.
Also, please give my kind regards to Kevin A. :)

It appears that server.Close is something that was introduced in go 1.8. It's failing on go 1.7. How strong are you about keep building for that version?

Hi @fcristovao, I'm not actively maintains the repo anymore, yet I think the PFC guys do (and us it still?) and will likely be able to merge your changes.
I think they make sense and also moving the min Go version forward makes sense as it's not officially maintained anymore.

Hey @djui! Nice to "meet" again :)
I assumed you wouldn't be maintaining it anymore, but since I saw the version 1.0.0 being released recently, I assumed PFC peeps would as well.
I'll move the min go version then.

@fcristovao @djui Hi guys! Sorry for the late reply. It's awesome to hear from you again and of course very nice to see that people are still using this. 😃  I think the changes look good. I'll just add some of my colleagues to review as well.

@AshrafAnsari Hey there! Thank you for looking into this! Hope all is well!
@HaraldNordgren Is there anything else I'm supposed to do? I can't merge myself, it's blocked.

@fcristovao Some CI status was left hanging for some reason. It happens every now and then. But I've merged this now. :)

@AshrafAnsari I just saw the new release. Is it possible to have the binaries released as well? (We use those in the docker containers)

@fcristovao Sorry man, I forgot. I've added the binaries now.

Thank you @AshrafAnsari!
Tonight I'll fix the stuff on the other PR I have opened :D


Zero-shot inference for unseen verbs

Hi,
Thank you for your excellent work. We would like to try to do ZERO-shot inference. For unseen actions (UV), all unseen action labels will be removed in training.
Suppose we use 117 verb texts from the CLIP text with dimensions [117,512]. In training, a valid object-action list excludes interactions with unseen actions. So, does training use the seen verb texts (97) or still use the 117 texts?
We assume that there are no unseen actions (UVs) in training, so they are the same as invalid object-action combinations, and backpropagation does not update them (gradient is 0). May I ask if our understanding is correct?
    def compute_classification_loss(self, logits, prior, labels):
        prior = torch.cat(prior, dim=0).prod(1)
        x, y = torch.nonzero(prior).unbind(1)
#In backpropagation, the object corresponds to invalid verbs with a gradient value of 0,
#so the corresponding parameters are not updated.

        logits = logits[:, x, y]
        prior = prior[x, y]
        labels = labels[None, x, y].repeat(len(logits), 1)

Hi @yaoyaosanqi,
The simplest way to achieve what you want is probably to just modify the function that computes the prior scores, i.e., the product of object detection scores. You can just zero out the returned prior scores when the verb is supposed to be unseen, then all the action logits will be automatically ignored.
Fred.

Thanks！


Fix #706, Add location to push CTF scripts and plugins

Describe the contribution
Fix #706
Adds locations to push CTF scripts and plugins
Testing performed
Steps taken to test the contribution:

Ensured that the editor launches nominally
Built and executed 3 test scripts

System(s) tested on
Oracle VM VirtualBox
OS: ubuntu-19.10
Versions: cFE <IP_ADDRESS>, OSAL <IP_ADDRESS>, PSP <IP_ADDRESS>
Contributor Info - All information REQUIRED for consideration of pull request
Dan Knutsen
NASA/Goddard

CCB 20200513 - Move to a stand alone repository

@dmknutsen do you need me to request the new repository under the NASA org or do you want to do it yourself?

@astrogeco Jake set one up last week.  It is located here:
https://aetd-git.gsfc.nasa.gov/gateway_cert/cfe_bvt

@astrogeco Jake set one up last week. It is located here:
https://aetd-git.gsfc.nasa.gov/gateway_cert/cfe_bvt

@skliper I thought we agreed to make it a github repo?

@astrogeco went local for simplicity for now, we can move to github later.

Closing as invalid since it won't go in this repo


The next button style of the installation package is abnormal

Try updating the electron-builder package

@Deluze Thanks for the reply. I upgraded the version to 25.0.0-alpha.10, the problem still exists.

@Deluze Thanks for the reply. I upgraded the version to 25.0.0-alpha.10, the problem still exists.

My bad for the late reply. This is an issue with the NSIS installer; https://nsis.sourceforge.io/Main_Page
This issue can't be fixed in this template, so I'll be closing the issue.


Support both X11 and Wayland at the same time

If I understand correctly, GLFW can be built with support for both X11 and Wayland (https://github.com/glfw/glfw/pull/1958), but using this crate I have to choose between these targets.

Apparently this functionality is not included in 3.3.x releases

so how do we make an application that could be run on either wayland or x11?
are we supposed to maintain two separate builds and distribute both to users?


Install from script

Is your feature request related to a problem? Please describe.
I have a script to setup and install my linux system would there be a way to skip the gui and just use a cli interface with the better discord installer.
Describe the solution you'd like
I would like an sh file or appimage (if they can provide a cli interface) that can be downloaded, added executable permissions and ran from the terminal using a terminal interface instead of a gui to install.
Describe alternatives you've considered
You could also add a script that has options such as
bash install-better-discord.sh install-location=/blah/blah

Try using https://github.com/bb010g/betterdiscordctl

A separate CLI is in the works, but it will not be a part of this installer


Filter out "market partner" (reseller) results from Woolworths

What website(s) would this filter apply to?
www.woolworths.com.au
What content should be blocked?
Woolworths tries to sell you items from their "market partners" when you're doing your shopping online.
You cannot disable these ads in your settings - so I came up with a small filter to remove them.
What options should be offered?
No response
Did you write a custom uBlock filter already?
Yes!
! https://www.woolworths.com.au Filter out market partner (reseller) ads
www.woolworths.com.au##div.ng-star-inserted.product-grid-v2--tile:has-text(Sold by Market Partner)

Additional notes
No response

Hello @sammcj, thanks for the suggestion!
I do have a similar custom rule in my list for a french retailer with the same marketplace nonsense, but I didn't add it to this project because I assumed it would not benefit enough users. I might be wrong though. Looking at the server access logs, I actually see 18 different users from Australia (and 24 from France!), so let's go with it and see if people enable it!
As with the other PR, I prefer to avoid using :has-text() so I want to investigate whether there's another way to match. Navigating through product categories, I could not find any such marketplace product, could you please provide me with a URL that show such elements?

@MasterKia the problem with :has-text is, that the text in depended on the language and :upward might have a better performance.

@MasterKia please do not make bold claims without backing them with evidence. Here is what's happening when uBlockOrigin evaluates a :has-text selector:

PSelectorHasTextTask is called, which gets the target text with node.textContent
The MDN documentation for that function states that it "returns the concatenation of the textContent of every child node, excluding comments and processing instructions"
In the Firefox engine, OnQueryTextContent allocates a new string and calls GenerateFlatTextContent to fill it. That function has to navigate down the element's children to compute and concatenate all of the text contents, every time it is called
For comparaison, here's the much shorter Attr::GetValue function, that is called when you write a a[title^="my-prefix"] rule. It just returns a pointer to a pre-computed value stored in a hashmap

To add insult to injury, I could not find any caching in the code path towards GenerateFlatTextContent, which leads me to believe that every single rule will incur the whole extraction cost again, which is an issue for configurable templates like this one, that create one rule per input value. I am happy to be proven wrong if you have evidence of caching being used to amortize that cost.
This is the evidence on which I base my opinion that :has-text is wasteful and should not be used if CSS selectors are possible. Furthermore, this function encourages bad practices such as:

calling it on the whole parent element instead of targeting the smallest possible scope, which amplifies this performance issue. For example, the suggested rule runs :has-text on the whole item card, instead of just the store link element
matching on displayed text instead of semantic information, which makes rules brittle and dependent on the user's display language

Sorry running way behind this week - I'll probably do this in the weekend as work is crazy. If the issue is an eyesore feel free to close it but I'll still submit a PR for consideration.

Hey @sammcj, not a problem, it's a weekend project with no deadlines, don't sweat it!
I finally found some marketplace results while searching for orange. Could you please test the following rule:
www.woolworths.com.au###search-content shared-product-vendor-message:upward(div.product-grid-v2--tile)

What it does:

only apply within #search-content, as in an element with a search-content id
search for shared-product-vendor-message elements (the line that gives the vendor name
find the parent that matches div.product-grid-v2--tile (a div with the class product-grid-v2--tile) and hide it

Browsing the search, I found these non-product tiles pretty obnoxious, here's how to remove them too:
www.woolworths.com.au###search-content shared-inspiration-tile:upward(div)

They both work perfectly @xvello!
It might seem petty to some folks outside of Australia but they're a for-profit company that has been price gouging and exploiting such a huge portion of the population. Add to this the cheek of then trying to people items from third parties (they don't even arrive with your shopping - and can incur extra shipping charges). I know so many people that are annoyed by this behaviour I know 5 people that are already using my crappy v1 filter 😅.
I'll have a crack at submitting a PR this morning.

I've got a draft PR - I just not quite sure on the correct way of doing the tests for a specific URL path after the domain, I think I'm fundamentally misunderstanding the tests and might need to RTFM 😅
https://github.com/letsblockit/letsblockit/pull/514

@sammcj The rules you put under the params must be the same as the rules above.
See what I changed at https://github.com/letsblockit/letsblockit/pull/514/commits/7818e5909042476b7ba3153a7fa4031c765f2e4b

The new template is live at https://letsblock.it/filters/woolworths-cleanup, thanks a lot for your contributions!

Sorry I missed your comment @JohnyP36, I appreciate you taking the time to fix it up! Thanks again for your help @xvello  🎉


Vscode not shown fvm sdk installed

I installed FVM on windows 10. After installing specific version of flutter sdk :
 fvm list
Versions path:  C:\Users\tazik\fvm\versions
stable ✔ (global)
1.24.0-10.2.pre

On vs code I added :
"dart.flutterSdkPaths": [".fvm/flutter_sdk"],
inside setting.json. I run fvm use stable in my flutter project and .fvm folder created inside project. But When I want to select specific sdk(stable) by vscode an run  Dart:Change SDK , none of fvm sdk not showing in the vscode list???
Version: 1.53.2 (user setup)
Commit: 622cb03f7e070a9670c94bae1a45d78d7181fbd4
Date: 2021-02-11T11:48:04.245Z
Electron: 11.2.1
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: <IP_ADDRESS>-electron.0
OS: Windows_NT x64 10.0.19041

https://pasteboard.co/JPkrmSR.png

I have followed the official docs on how to set up Visual Studio Code to use fvm however, I can't seem to get it working. I only have fvm installed and no standalone flutter versions
Output fvm list
stable
1.26.0-17.1.pre
1.26.0-1.0.pre
1.25.0-4.0.pre

@leoafarias Hey thank you for the advice, I did that, but it didn't work. Somehow, I managed to get it working, but I don't know what I did. I was in a hurry and didn't write things down. 🙂


Bond don't build on Windows 10 (v.15063) GHC 8.0.2

Seems to be a problem with GHC and at least the latest window insider ring windows releases (v.15063 and the one prior).  The GHC process bails.  There's a fix merged to GHC 8.2 branch but no release yet.
https://git.haskell.org/ghc.git/commitdiff/018ac7f4b2f7345e28d21fb1f99b44dbc79f6e85
Is the best way to get bond to build to try and get a GHC 8.2 frankenbuild working with the 8.0.2 platform or what's the proposed solution?
Thanks   /Niclas
Microsoft (R) Build Engine version 15.1.548.43366
Copyright (C) Microsoft Corporation. All rights reserved.
Building Custom Rule C:/packages/bond/compiler/CMakeLists.txt
CMake does not need to re-run because C:\Users\USER\AppData\Local\CMakeBuild\e9f20f28-8de9-2138-8ba4-c3fdbb38aac3\build\x64-Debug\compiler\CMakeFiles\generate.stamp is up-to-date.
Generating build/gbc/gbc.exe

C:\Users\USER\AppData\Local\CMakeBuild\e9f20f28-8de9-2138-8ba4-c3fdbb38aac3\build\x64-Debug\compiler\CUSTOMBUILD : warning : cannot determine version of C:/Program Files/Haskell
Platform/8.0.2\mingw\bin\gcc.exe :

""

`gcc.exe' failed in phase `C Compiler'. (Exit code: -1073741502)

CMake Error at cabal_build.cmake:33 (message):

c:\program files (x86)\microsoft visual studio\2017\community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 1.
Build failed.

Yeah, we ran into this bug as well. I reported it to the Windows team, and its currently working its way though the Windows bug process. I do not have more details to share.
If you just need a copy of gbc.exe, there are two ways to get a copy:

from the Releases feed and
from the Bond.Compiler NuGet package.

If you set the CMake variable BOND_GBC_PATH to point at a pre-compiled gbc.exe, then the CMake-based build will use that version, skipping all the Haskell build. There are two common ways to set this variable:

by explicitly passing it on the CMake command line like cmake c:\bond -DBOND_GBC_PATH=c:/temp/gbc-5.2.0.exe -G "Visual Studio 14 2015 Win64" or
by setting the environment variable BOND_GBC_PATH to the directory containing gbc.exe.

I've been doing my development work on the most recently released version of Windows, not on an Insider Preview build, to avoid this problem.

This Stack comment mentions that [GHC] 8.2.1 is supposed to come out in a couple weeks [...], so that's good news, but has anyone had success in building with the workarounds noted in that thread?

Since this is an upstream issue with Windows and GHC that we cannot work around in Bond, I'm going to close this issue.

There are new builds of the Haskell Platform with a fix for this live now at https://www.haskell.org/platform/windows.html. Make sure you get the 8.0.2-a version of the installers instead of just 8.0.2.
More details in the announcement to the Haskell Cafe mailing list.


add west-zephyr.yml and simplify west.yml

Add west-zephyr.yml root manifest for use cases when Golioth SDK is used
with vanilla Zephyr.
Add west-external.yml file with SDK-specific (not used by vanilla Zephyr
and/or NCS) dependencies, so that this file can be included from any
manifest file (either SDK's west-zephyr.yml, west-ncs.yml or standalone
application).
As a result there are 3 west manifest files provided in this repo:

west-external.yml - generic manifest file specifying 'qcbor' library
as the only dependency (for now); this file is to be included by
standalone applications, which select their own version of Zephyr
RTOS and/or nRF Connect SDK,

west-zephyr.yml - manifest file specifying Zephyr RTOS as dependency;
can be used as root west manifest (to try out samples/ with vanilla
Zephyr) or by standalone application that relies on Golioth SDK to
select Zephyr RTOS version,

west-ncs.yml - manifest file specifying nRF Connect SDK as
dependency; can be used as root west manifest (to try out samples/
with NCS) or by standalone application that relies on Golioth SDK to
select NCS version.

Remove 'west.yml' file, so that it does not confuse users about what use
case (from above mentioned) it covers.

Just checking - this doesn't affect usage of our SDK as a Zephyr module, does it?

I affects slightly. Notice updated README file:
-      import:
-        name-allowlist:
-          - qcbor
+      import: west-external.yml

What is the mechanism by which qcbor is pulled in for the case of using as a module?

As above, but now imported file is specified (import: west-external.yml) instead of whitelisting all dependencies except Zephyr.
Initializing new standalone application repo with Zephyr looks like that:
$ mkdir new_project_dir
$ cd new_project_dir
$ mkdir app
$ cat <<EOF > app/west.yml
manifest:
  projects:
    - name: golioth
      path: modules/lib/golioth
      revision: main
      url: https://github.com/golioth/zephyr-sdk.git
      import: west-zephyr.yml
EOF
$ west init -l app
$ west update

With NCS it is similar, but west-ncs.yml instead of west-zephyr.yml should be used. CC @szczys @ChrisGammell

So does this mean that "normal" golioth zephyr sdk install will be:
west init -m https://github.com/golioth/golioth-zephyr-sdk.git --mr west-zephyr.yml ~/golioth-zephyr-sdk

If so, LGTM.

So does this mean that "normal" golioth zephyr sdk install will be:
west init -m https://github.com/golioth/golioth-zephyr-sdk.git --mr west-zephyr.yml ~/golioth-zephyr-sdk

If so, LGTM.

Yes. But using ~/golioth-zephyr-sdk as root workspace directory might be confusing. golioth-sdk-zephyr (https://github.com/golioth/golioth-zephyr-sdk.git) git repository will be placed at ~/golioth-zephyr-sdk/modules/lib/golioth. Personally I would use something like ~/golioth-sdk-workspace or ~/golioth-sdk-project.

So does this mean that "normal" golioth zephyr sdk install will be:
west init -m https://github.com/golioth/golioth-zephyr-sdk.git --mr west-zephyr.yml ~/golioth-zephyr-sdk

If so, LGTM.

Yes. But using ~/golioth-zephyr-sdk as root workspace directory might be confusing. golioth-sdk-zephyr (https://github.com/golioth/golioth-zephyr-sdk.git) git repository will be placed at ~/golioth-zephyr-sdk/modules/lib/golioth. Personally I would use something like ~/golioth-sdk-workspace or ~/golioth-sdk-project.

I think @szczys got that name from me. I agree that calling the workspace ~/golioth-zephyr-sdk is not the best name. I think ~/golioth-zephyr-workspace is probably best (and similar for NCS - ~/golioth-ncs-workspace).


fail2ban vs firewall

Hi,
We have a few servers that have fail2ban pre-installed (thanks Rackspace), and have had issues with puppetlabs-firewall removing the rules that fail2ban creates. Do you have any examples of a working setup with a puppet "managed" firewall and fail2ban coexisting properly?
Thanks,
Tommy

Hello @TJM,
please take a look at firewallchain. I can not provide a specific code snippet, but it should be possible to prevent the firewall module from purging existing fail2ban rules.
Kind regards,
Dennis

OK, I was hoping I just missed it in the code (the github search facility is a bit janky sometimes). We had started messing with that, but ended up having to turn purge off (which is not where I want to be). I was hoping you had solved it.

You can address this by setting up a separate firewallchain, having firewall jump to that chain at the very beginning of INPUT and back to INPUT at the end of that chain, and then instructing Fail2ban to put all of its jump rules in that new chain.

The solution I am aware of is to use the firewallchain resource type along with the ignore parameter so that Fail2ban-specific rules will be ignored. The jump rule in the INPUT chain will need to be ignored along with all rules in the separate chain Fail2ban creates.
Something like this should work when using Fail2ban with the sshd jail enabled:
firewallchain { 'INPUT:filter:IPv4':
  ignore => '-j f2b-sshd',
}

firewallchain { 'f2b-sshd:filter:IPv4':
  ignore => '-A f2b-sshd',
}

There is a known issue where setting
resources { 'firewall':
  purge => true,
}

overrides the ignore parameter in any firewallchain resources (see here for more information). The solution is to use a resource collector to set purge => true for all firewallchain resources:
Firewallchain <| |> {
  purge => true,
}

This has the same general effect but still allows for the use of ignore.

To make this more flexible, we started by pulling the list of jails from hiera and looping through it:
# Ignore fail2ban chains:
$chains = hiera('firewall::purge_ignore', [])
$input_ignore = $chains.map |$chain| { "-j ${chain}" }

#ensure input rules are cleaned out, but ignore fail2ban
firewallchain { 'INPUT:filter:IPv4':
  ensure => present,
  ignore => $input_ignore,
  purge  => true,
}

$chains.each |$chain| {
  firewallchain { "${chain}:filter:IPv4":
    ignore => "-A ${chain}",
  }
}

I am now looking for a way to populate the $chains array automatically instead of using hiera. My first thought would be to create facts that include the current jails, but I wonder if there is a better way.

Can you pull the information from a variable in the fail2ban module? That has been a favorite of mine to pull out "port" or whatever from the target module for things like SSH. I have not actually messed with fail2ban in a while tho.


metatensor-learn - the building blocks sub-repo for atomistic machine learning models

General information
This PR adds the support of various building blocks for building the atomistic machine learning models based on PyTorch and NumPy. The main scope of the blocks is to prove a convenient way of working with atomistic data (like atomic positions, neighborlists) within the metatensor ecosystem as well as building coherent ML models using the familiar PyTorch modules.
Milestones

ModuleMap (i.e. ModuleDict working on TensorMap blocks) (prototype with tests)
Dataset and Dataloader, once metatensor #405 is merged

Project structure
src/python/metatensor-learn
    data/
        __init__.py
        dataset.py
        dataloader.py
    nn/
        __init__.py
        module_map.py
    transforms/
        __init__.py
        neghborlist.py
    utils/
        __init__.py
        collate_fn.py # A utility for a dataloader
tests/
    test_dataloader.py
    test_module_map.py
    ...

Notes

Neighborlists calculation via rascaline or ASE at the moment
Feature calculation goes to metatensor-models

Deadline:
MVP: Christmas 2023
General Requirements
Make prototyping of new models easy

Simple custom dataloader & dataset (prototype in: Joe's rho learn)

support both loading from memory & from disk
support both pre-computed features & systems as input
loading arbitrary number of data in each minibatch

Loss functions

MSE/MAE/L2/...
PROTOTYPE loss on values and gradients

Export metatensor System data to torch-geometric format

Building blocks that can handle equivariant properties

Provide most of torch.nn

Wrapper for something similar to ModuleDict, applying the module to blocks one by one
Some well used models should also be directly provided (mainly LinearModel)

Support both linear algebra and gradient descent for training

Option to solve with numpy export to Torch?
Option to solve with Torch directly for GPU support
Explicit user choice for one or the other linalg backend

:books: Documentation preview :books:: https://metatensor--426.org.readthedocs.build/en/426/

The main scope of the blocks is to prove a convenient way of working with atomistic data (like atomic positions, neighborlists)

I would disagree with this. anything atomistic should go in https://github.com/lab-cosmo/metatensor-models. metatensor-learn should be application-agnostic (like sklearn or torch.nn).

I'm afraid if we make a completely application-agnostic sub-repo, then the only substantial thing inside will be the ModuleMap.
If we are aimed to implement the dataset and dataloader classes, the neighborlist calculation, and make everything work in a way that scalar, tensor and graph features are properly stacked together in a single batch, then we definitely need to respect some metadata (i.e. the proper way of stacking the edge_index and edge_offsets so they can be easily used with torch.index_add() while performing a graph convolution)

Regarding the python files: I would not put any empty python files for now. The only file should be the main __init__.py, exporting __version__. Following the other packages, this file should live in python/metatensor-learn/metatensor/learn/__init__.py.

So the CI fails because pytest complains that there are no tests in metatensor-learn. If we merge the features after a review to this branch, this will be solved automatically, otherwise we need a placeholder test.

I think you can do a single dummy test for now, this allows to check the infrastructure!

This should be good to go! I'll merge once CI is happy.


⚠ Fetchers has degraded performance

In 966fd3e, Fetchers ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 271 ms

Resolved: Fetchers performance has improved in 830d709.