[Obsolete] MONDO:0016784 'gestational trophoblastic disease'

Mondo term (ID and Label)
'gestational trophoblastic disease'
Reason for deprecation
Grouping class that is no longer needed
Suggested term to consider
MONDO:0018944 'gestational trophoblastic neoplasm'
MONDO:0006248 'hydatidiform mole'

related to https://github.com/monarch-initiative/mondo/issues/5192

for now, remove logical def


Go to definition shows duplicate definitions

Description
When using the go-to-definition features in VS Code, variables and constants show duplicate definitions.
With this code file:
# example.rb

class Example
  def foo
    5
  end
end

class Other
  def bar
    example = Example.new
    example.foo
  end
end

If you hold CMD and hover over the class definition of Example or Other, it says there are two definitions:

If you "Go to Definition" (F12 or CMD+ click), it shows two duplicate definitions:

This is not happening for on the method definitions. On CMD + hover:

And CMD+ click (note that it says two "references" rather than "definitions"):

But where a method or constant is used, I'm getting four definitions on CMD + hover:

And three definitions on CMD+ click:

I'm on macOS 14.5. I was able to reproduce this with both Ruby 3.1.1 and Ruby 3.2.3, both in Rails <IP_ADDRESS> projects.

Aha! That was it. I had both solargraph and fuzzy ruby server enabled as well.
Thanks for clearing that up for me!


Spec: Add example RO-Crates/snippets with new features described in version 1.2

Particular examples to target:

[ ] example detached RO-Crate (requested by @simleo)
[ ] snippets for the different ways one might reference an RO-Crate - particularly for this list which is very text-heavy

For detached crate, some existing crates to draw on:
From @stain
https://trefx.uk/5s-crate/0.4/#referencing-a-workflow-crate uses references to Workflow RO-Crate.
https://trefx.uk/5s-crate/0.4/example-request/data/ro-crate-preview.html
https://trefx.uk/5s-crate/0.4/example-request/data/ro-crate-preview.html#https%3A//workflowhub.eu/workflows/289%3Fversion%3D1  – but it is missing the conformsTo for RO-Crate as required now by 1.2 section.
From @ptsefton : https://data.ldaca.edu.au/api/object/arcp%3A%2F%2Fname%2Chdl10.4225~35~555d661071c76?meta=all


Reform the benchmark rules.

We provide the benchmarks by sorted batch_size, and also provide GPU benchmark with maximum batch_size for current model. For cifar10_cnn_benchmark_test, we used the small epochs to get the results quickly.

@yhliang2018 I think this PR should be approved.


enable deleting history items with keybinding

Inspired by https://github.com/fish-shell/fish-shell/issues/9454
When a history item is selected, delete it with shift-del (apparently a standard binding, according to the issue linked above).
Will not delete (it just refuses, without showing feedback), when using a file-backed history where the history item being targeted has already been written to the file. It's not trivial to implement for this case, due to the concurrent modification of the text file.
I don't understand the
self.editor.move_to_start(UndoBehavior::HistoryNavigation);
self.editor.move_to_line_end(UndoBehavior::HistoryNavigation);

statements, so those changes in src/engine.rs may not be correct. I see in some places it just does move_to_line_end.

I still need to do the tests.
I made it so it clears the buffer, if not going through history. If it fails to delete a history item, it doesn't clear it, in order to signify that.
For the file history, the concern is that if one instance deletes a line, and then another instance tries to delete a (different) line afterwards, its index is going to have changed. I guess the way to solve this would be to reload it and then search for a matching string. I'm thinking add a delete: Option<usize> field, which is used by sync(). The delete function would then call sync, if the entry is stored on the file. Does that seem reasonable?

I made it so for the file-backed history, it will delete all occurrences of the referenced entry. This solves the concurrency issue, but changes the behavior of delete(). I will sometimes rename a script, but it will keep recommending the old name, and since I've run the script many times, there will be many entries, so I like this behavior better.
Let me know if that seems good, and I'll make the same change to the sqlite implementation, and then add the tests.

I made it so for the file-backed history, it will delete all occurrences of the referenced entry. This solves the concurrency issue, but changes the behavior of delete(). I will sometimes rename a script, but it will keep recommending the old name, and since I've run the script many times, there will be many entries, so I like this behavior better.

Yeah I can see the value of your proposed behavior both for purging the history from something secret as well as to suppress a history completion/hint that is no longer relevant.
Will ping the rest of the team if they want to advocate for a particular behavior.

Let me know if that seems good, and I'll make the same change to the sqlite implementation, and then add the tests.

Awesome! Thanks for sticking with us and sorry for my radio silence on the PRs

If I remember @fdncred 's feedback correctly the main concern here was the behavior of what happens when you try to delete a history entry when you are not actually on the history but just hit the keybinding. Maybe that is an additional source of confusion and we should just ignore that?
cc @amtoine @rgwood for UX comments

i'm not sure what should be tested with the UX here and how :confused:

https://github.com/nushell/nushell/issues/11620
Since this is still open I am referencing the above issue as well....


Connection timeout

I’m using the last updated, and the issue where people get timeout, after trying to solve the issue realized that having a lot of streaming assets in your server starting in your cfg after MySQL-async generates the problems, so if you have this problem just start the streaming assets before MySQL-async and the red timeout goes away..

can you show us a example on how you have yours set up please?


How to detect view expanded to full size

How to detect view expanded to full size? I dont want my tableView to scroll untill the View is fully expanded.

Im using this logic, its not working as expected. Thank you for your help.
    override func viewDidLoad() {
        super.viewDidLoad()

        didMoveToStickyPoint = { [weak self] point in
            self?.isFull(point)
        }

        willMoveToStickyPoint = { [weak self] point in
            self?.isFull(point)
        }
    }

    func isFull(_ point: CGFloat) {
        if point != pullUpControllerAllStickyPoints.last! {
            contentVC?.tableView?.contentOffset.y = 0
        }
    }

What's exactly is not working? In my example if point == self.pullUpControllerAllStickyPoints.last that means that the controller's view is fully expanded.
I'm using this code:
        willMoveToStickyPoint = { point in
            print("is full expanded: \(point == self.pullUpControllerAllStickyPoints.last)")
        }

That doesn't work for you?

this is the problem

Ok, so the problem is not How to detect view expanded to full size.
Please let's discuss the problem in detail in another issue.
Thanks,
Mario.


Made some dev flavor settings as variables

Description
What: I have set the following dev flavor settings to be variables and allow them to be set with environment variables.

MainRegistry
ScannerImageTag
MainImageTag

Why: This is so that I customize these settings according to my development environment setup. For my specific use case, I want to point MainRegistry to my local registry so that I can easily use it with my kind cluster (very convenient), while the *ImageTags I customize them (e.g. latest) so I can ensure the images used for these components use the image builds I have run in my local development environment.
Development Setup Goal:

Use a kind cluster as the k8s cluster with a local registry (e.g. localhost:5001
Build central services images and push them to my local registry
Run stackrox operator locally, outside the cluster, and using the settings above mentioned
Stackrox operator will reconcile a Central CR and will cause to create deployments that has images tagged as

localhost:5001/scanner:latest, localhost:5001/main:latest, etc...

I've put all these in a makefile and it works well with the changes above. It helps simplify my dev set up because I can simply build everything locally and just relaunch them as needed.
Checklist

[ ] Investigated and inspected CI test results
[ ] Unit test and regression tests added
[ ] Evaluated and added CHANGELOG entry if required
[ ] Determined and documented upgrade steps
[ ] Documented user facing changes (create PR based on openshift/openshift-docs and merge into rhacs-docs)

If any of these don't apply, please comment below.
Testing Performed
I tested this by setting the corresponding environment variables to some valid value and an empty values.
P.S. This is my first time to contrib to this codebase hence I may be missing something that is not obvious to me. Please help review.

Hey @pepedocs thanks for the contribution!
The image flavor struct you changed is holding the default values depending on the installation flavor (development, OSS or RHACS). This dictates where the images are being pulled from and their name and tag structure. We don't want to make these values configurable, because they define what is set in case there is no custom configuration set.
However, the feature you're asking for is already provided. You have the possibility to overwrite image registry, name and tag, depending on the installation method.
I don't know exactly how to overwrite this when running the Operator. Maybe @stackrox/draco can answer this?

Hi @pepedocs
If using local image registry is not critical for you, you can leave images tagged as quay.io/stackrox-io/.... Then, images you haven't changed will be pulled from actual repositories, and you'll need to import images you've built locally into kind. I'm not using MacOS, but I think images built by docker should be visible in kind by default. If not, I use these commands to import locally-built images in my minikube cluster:
docker save quay.io/stackrox-io/central-db:$(make tag) | ssh -o StrictHostKeyChecking=no -i $(minikube ssh-key) docker@$(minikube ip) docker load

docker save quay.io/stackrox-io/main:$(make tag) | ssh -o StrictHostKeyChecking=no -i $(minikube ssh-key) docker@$(minikube ip) docker load

After that, images will be available for deployment. Obviously, you'll need to adapt it to your setup.
If using local image registry is for some reason important, the operator respects these environment variables
https://github.com/stackrox/stackrox/blob/c512121cba33e6a02cb82dfd218faaada7ca5948/operator/bundle/manifests/rhacs-operator.clusterserviceversion.yaml#L946-L954
You will be able to provide exact images with tags you want to use.
Hope this helps

@msugakov @fredrb Thank you for explaining.
My goal was to completely use local images in my set up to simplify it. Pretty much how simplifies local orchestrator tools out there such as docker compose.
I haven't tried your suggestions but it seem it can work. So I may just close this PR.

@pepedocs hey, just chiming in.

We don't want to make these values configurable

Can you explain a bit more why that is?
@msugakov perhaps that the ability to make the images configurable in Central directly would allow us to tackle part of our problem about letting know Central what downstream to use. I like this approach because it's super simple, and there's no "magic" behavior (image flavors).

@fredrb I just forgot to mention that the settings use default values in case their env vars are not set.

@ludydoo Flavors are just a set of defaults baked in the image, which are used by roxctl, the operator and when installing Secured Clusters. Nothing more.
Making this change here would only affect the operator installation path and installing via roxctl which also has its own means of overwriting image values (see roxctl sensor generate k8s --help). Installing Central using helm charts would still require overwriting the value in central-service (doc reference).
In my opinion, this change would only add another way to customizing images. For example, one could set this env variable (ROX_MAIN_REGISTRY) which changes the flavor value and overwrite the main image with roxctl sensor generate k8s --name my-cluster --main-image-repository="my.registry". The roxctl param will take precedence, but it makes installation a little more confusing.
If we can come up with a way to overwrite images for all installation methods, and make this simpler, I'm all for it. Maybe this is a hint to unify installation methods once and for all? 😉
Hope this make my reasoning more clear on why I don't think we should change flavor.

If using local image registry is for some reason important, the operator respects these environment variables

@msugakov
I tried exporting the env vars above (e.g. RELATED_IMAGE_SCANNER) and run the operator locally but it did not seem to pick up this environment variable and used the images from quay. Do you know any example usage of these env vars? Do they take precedence over other ways to specify these settings?
RELATED_IMAGE_SCANNER=localhost:5001/scanner:latest make install run

@msugakov I see these env vars arent' available if operator is installed locally outside a cluster. So my only other option is to load the images I've built locally in kind. I still have to check if this is fast enough, the last time I was loading images to kind was that it was inconveniently slow. FYI AFAIK docker images are not immediately accessible to kind, they need to be loaded.

@pepedocs I'm surprised RELATED_IMAGE_SCANNER did not work, although to be fair I haven't tried it with the locally-running operator.
From the first glance at this fragment, this and other values should work
https://github.com/stackrox/stackrox/blob/464818dd78757c1499111552acd7f7d8ff3afebf/operator/pkg/central/values/translation/translation.go#L50-L55
(In fact, they do work for downstream-built operator image, but that's another thing.)
Maybe it's not completely fair ask, but if you have development environment setup, could you please try step through with debugger in that block of code to see if RELATED_IMAGE_SCANNER gets read and where it gets lost?

If we can come up with a way to overwrite images for all installation methods, and make this simpler, I'm all for it. Maybe this is a hint to unify installation methods once and for all?

@fredrb As a new user of these install methods, my input on this concern is at least to consistently make the minimal configurable variables available in all methods with their defaults of course. They have to be available all the time and some dedicated documentation is necessary to describe these few installation goals/states and provide information how to reach these goals.
As a first time user of these install methods with very minimal supervision, I had to look into Makefiles to understand which variables are configurable. There is great documentation but to me it wasn't enough with respect to reaching my installation goal.

I'm surprised RELATED_IMAGE_SCANNER did not work, although to be fair I haven't tried it with the locally-running operator.
From the first glance at this fragment, this and other values should work

@msugakov Thanks for providing that code snippet. I've recreated my set up and these variables worked for my set up - operator runs locally. I am closing this PR.


Validation order: elements go first and collection itself goes second

Hi, I have a web api accepting a collection of elements both having validator:
public IHttpActionResult PostData(PaymentCollection payments)
{
}

[Validator(typeof(PaymentCollectionValidator))]
public class PaymentCollection : Collection<Payment>
{
}

[Validator(typeof(PaymentValidator))]
public class Payment
{
}

I want to check the collection for length and its elements for validity.
But whrn I make a request, elements go first and collection itself goes second in the validation order even collection is invalid (has too many elements, for instance) so validation is guaranteed to fail.
How can I change the order?

That's not possible if you're using the web api integration. You'd need to invoke the validator manually and use SetValidator instead of using the Validator attributes.
Jeremy

Can I anyhow extend the existing model validation provider?

Sure - you'd probably want to look at WebApi's DefaultBodyModelValidator as a starting point; this is where the recusrive validation of properties actually occurs.

So you're suggesting do not try to extend FluentValidationBodyModelValidator but System.Web.Http.Validation.DefaultBodyModelValidator instead?

Would you agree to add a public boolean property ValidateChildrenFirst to FluentValidationBodyModelValidator to control whether or not follow the rule "Validate the children first - depth-first traversal"? e.g.:
if (ValidateChildrenFirst)
{
    ValidateChildren();
    isValid = ShallowValidate(metadata, validationContext, container) && isValid;
}
else
{
    isValid = ShallowValidate(metadata, validationContext, container) && isValid;
    ValidateChildren();
}

I'm not at all keen on doing that to be honest - the only reason the
fluentvalidationbodymodelvalidator exists is to work around an issue in the
defaultbodymodelvalidator...id prefer to keep its code as close to the
original as possible. Eventually, I'd like to get rid of that class
completely.
If you need this behaviour, I'd suggest having your own Bodymodelvalidator
implementation in your project...so you can then swap out the default (or
the FV one) with your version, if you want to make this modification.
On Monday, 21 December 2015, Alexander Batishchev<EMAIL_ADDRESS>wrote:

Would you agree to add a public boolean property ValidateChildrenFirst to
FluentValidationBodyModelValidator to control whether or not follow the
rule "Validate the children first - depth-first traversal
https://github.com/JeremySkinner/FluentValidation/blob/master/src/FluentValidation.WebApi/FluentValidationBodyModelValidator.cs#L109"?
e.g.:
if (ValidateChildrenFirst)
{
ValidateChildren();
isValid = ShallowValidate(metadata, validationContext, container) && isValid;
}else
{
isValid = ShallowValidate(metadata, validationContext, container) && isValid;
ValidateChildren();
}
—
Reply to this email directly or view it on GitHub
https://github.com/JeremySkinner/FluentValidation/issues/178#issuecomment-166399951
.

I see, fair enough. To minimize the pain of copy-pasting the code, could you please change ValidateNodeAndChildren to protected virtual and other private methods to protected?

Honestly I'd rather not for the same reasons...they're private in the
original webapi version and it's literally a copy and paste...I don't want
people relying on the FV version of the class as it's a fork that is going
to go away...I'm sorry if it sounds like I'm being awkward but by opening
it up, I'm then locked into supporting it going forward, which is something
I absolutely don't want to do as its internal webapi code, owned by MS.
Ideally, MS should make that method virtual in the original class (which
would mean that the code wouldn't have had to have been copied in the first
place), but I doubt they'll change it now that aspnet 5 supersedes webapi.
On Monday, 21 December 2015, Alexander Batishchev<EMAIL_ADDRESS>wrote:

I see, fair enough. To minimize the pain of copy-pasting the code, could
you please change ValidateNodeAndChildren to protected virtual and other
private methods to protected? Please don't make us suffer :)
—
Reply to this email directly or view it on GitHub
https://github.com/JeremySkinner/FluentValidation/issues/178#issuecomment-166402469
.

Can you please elaborate on your reasons do not open it up?
Since Web Api source code is licensed under the Apache 2.0 license and is released as a separate nuget package, from my point of view, it should be fine. Web Api doesn't go away right away after ASP.NET 6.0 is released, and will be widely used for year after that.

Sure, the license isn't the issue- it's the maintenance and
support overhead.  I understand that from your point of view it's fine,
but by opening it up, it's then something I have to support going forward,
and commit to having it in the codebase for the foreseeable future as
others could be relying on its presence.
Unfortunately I just don't have the capacity to do this...just supporting
FV by itself is already a massive time investment for me, and I have to
be very careful about what becomes part of the public api.
Once something is publicly accessible, then I have to commit to supporting
it, because inevitably someone else's code can now be relying on this. It
essentially becomes a contract, in the same way as an interface. Removing
it, or changing it later now becomes a breaking change for all consumers.
This particular class is only in the codebase as a workaround for an issue
with webapi...the aim is that it'll be removed eventually, so I don't want
it to become something that becomes consumed directly or is relied upon. As
this class is essentially a fork, the fewer changes that are made to it the
easier it is for me to maintain. When MS update their version of the class,
the merge process is much easier if I don't have to make lots of small
amendments. If MS completely refactor the class and suddenly change its
structure, I'd have no choice but to make a breaking change to the public
api, and breaking changes Need to be kept to a minimum unless there's a
very good reason.
I know that's not what you want to hear, but this is the reality of
supporting a library that a lot of people rely on, especially when it's a
1-person job
On Monday, 21 December 2015, Alexander Batishchev<EMAIL_ADDRESS>wrote:

Can you please elaborate on your reasons do not open it up?
Since Web Api source code is licensed under the Apache 2.0 license
https://aspnetwebstack.codeplex.com/license and is released as a
separate nuget package, from my point of view, it should be fine. Web Api
doesn't go away right away after ASP.NET 6.0 is released, and will be
widely used for year after that.
—
Reply to this email directly or view it on GitHub
https://github.com/JeremySkinner/FluentValidation/issues/178#issuecomment-166411973
.

Sure, I see your point. I can believe that maintaining a heavily used open-source library is a huge deal and chore.
Can I propose two things:

myself as a co-maintainer of the web api integration package. I'm mainly working with web api projects, for years now and for years to go, I hope.
since I'm internal to MS, I can contact web api official maintainers and try to convenience them on particular changes. So let's sync on this, what kind of changes you'd like to have in the built-in classes so both your and my goals were achievable.

That would be very helpful, and very much appereciated if you're up for
being involved-thank you.
That'd be especially welcome as I don't personally work with webapi much at
all, and my experience with it is very limited.
I'll document the changes that'd need to happen to support this properly.
Do you mind if I wait until tomorrow morning? I don't have my dev laptop
with me at the moment.
Thanks again
On Monday, 21 December 2015, Alexander Batishchev<EMAIL_ADDRESS>wrote:

Sure, I see your point. I can believe that maintaining a heavily used
open-source library is a huge deal and chore.
Can I propose two things:

myself as a co-maintainer of the web api integration package. I'm
mainly working with web api projects, for years now and for years to go, I
hope.
since I'm internal to MS, I can contact web api official maintainers
and try to convenience them on particular changes. So let's sync on this,
what kind of changes you'd like to have in the built-in classes so both
your and my goals were achievable.

—
Reply to this email directly or view it on GitHub
https://github.com/JeremySkinner/FluentValidation/issues/178#issuecomment-166429723
.

Awesome, sounds good!
No rush at all, anyway it's the holiday season, so no changes would be reviewed till mid-January, I'm afraid.

So there's a few things that I'd like to see changed in WebApi to better support FV, but for now just focusing on the BodyModelValidator:
If the binder added errors into ModelState before validation occurs, and then FV generates an error message for the same property, the message generated by FV is ignored and never appears. This is because of the following check in DefaultBodyModelValidator.ShallowValidate:
if (!validationContext.ModelState.IsValidField(key))
{
  return false;
}

The FluentValidationBodyModelValidator changes this check to:
var isFluentModelValidator = validator is FluentValidationModelValidator;
...
if ((!isFluentModelValidator && !validationContext.ModelState.IsValidField(key)) ||
	(isFluentModelValidator && validationContext.ModelState.ContainsKey(key))) {
   return false;
}

...so it explicitly checks if we're invoking FV, and if so it allows the second error to be added, with a separate key:
validationContext.ModelState.AddModelError(isFluentModelValidator ? CreatePropertyModelName(key, error.MemberName) : key, error.Message);

Unfortunately, the ShallowValidate method is private static, which is why FluentValidationBodyModelValidator includes so much copy-pasted code.
The simplest change would be for DefaultBodyModelValidator.ShallowValidate to be virtual, but this would still require some duplicate code. However, this method is nested within several other private static method calls, so could possibly have a large refactoring impact for the webapi team.

Maintenance / cleanup: Closing this as there hasn't been any activity for a few months.

Actually I work on this :) Just wrote another email yesterday.

@abatishchev is there a reason this issue doesn't link to that work on a branch or PR somewhere? Perhaps we could get them linked together.
From a cleanup perspective, I'm not sure having an issue that was last updated 4 months ago remain open is the best course. Perhaps we could re-phrase the conversation in a new ticket? Or move the conversation from e-mail to this thread so that others can see the progress?
I'll defer to @JeremySkinner on this one.

Unfortunately there is no code branch here, yet. However here is a PR in Web Api repo on Codeplex and in parallel I try convince its maintainers to review it. Basically open the validation infrastructure for customization via inheritance, currently it's locked down.

Let's keep this one open for now. I live in hope that the WebApi team will be open to making some changes...

@abatishchev @JeremySkinner makes perfect sense, thanks.
@abatishchev, could you post a link to that PR here so that new and slightly clueless collaborators can follow along? :)

Oh, yes, absolutely. https://aspnetwebstack.codeplex.com/SourceControl/network/forks/abatishchev/modelvalidation2/contribution/8644
Thanks for support!

I just saw that there was actually a commit made to the WebApi code to enable this in October (only 2 years late!) Not sure how relevant this is now that that we have aspnetcore, but it looks like this will be part of WebApi 5.2.4 so we could look at doing this once WebApi 5.2.4 is out. @abatishchev Would you be up for doing a pull request for this once the aspnet team finish their release?

Wow, really? I literally lost hope. Let me check that out, will come back shortly.

Didn't know they resumed the work on WebApi, and for quite some time. Sure, I'll monitor and will pick the changes once they're out.

These changes are already available from nightly build https://dotnet.myget.org/feed/aspnetwebstack-dev/package/nuget/Microsoft.AspNet.WebApi so I'll give it a try

@JeremySkinner FluentValidation.WebApi in master depends on AspNet.Core. Shouldn't it be FluentValidation.WebApi which still depends on AspNet.WebApi and FluentValidation.WebApi.Core which would depend on AspNet.Core?

But maybe I'm wrong and just out of date with modern projects structure.

It doesn’t depend on aspnetcore - it’s just using the new SDK-based projects. Still targets .net 45 and webapi2 as always, but used the modern build chain.

Right, I got confused with Core in package name, forgot that's how WebApi is structured. Please disregard.

By doing FluentValidationBodyModelValidator : DefaultBodyModelValidator with no overrides I have all tests but 1 succeeded. Looking into it: Should_still_validate_other_properties_when_error_found_in_collection

The test fails because the built-in provider doesn't bother to validate the model if its elements aren't valid, see https://github.com/aspnet/AspNetWebStack/blob/master/src/System.Web.Http/Validation/DefaultBodyModelValidator.cs#L162.
So our options are:

Ask @dougbu to allow the flexibility in the base class
Override just ValidateNodeAndChildren() what is now possible. Yay! However it's huge and uses internal helper. Implement it differently, allow the flexibility by our own.

Yes that's the same behaviour as aspnetcore (not validating the root model if any children fail). The aspnet team recently merged my pull request in to allow this behaviour to be customized (see github.com/aspnet/mvc/issues/7014) so I expect they'd be open to doing the same in webapi.
Although saying that....I think we can achieve it pretty easily by just overriding the method. I don't think we should need to implement its internals. Pseudocode example:
override ValidateNodeAndChildren(metadata, validationContext, container, validators) {
   bool isValid = base.ValidateNodeAndChildren(metadata, validationContext, container, validators);

   if(! isValid && !HasAlreadyBeenValidated(container)) {
       var rootIsValid = ShallowValidate(metadata, validationContext, container, validators);
       return rootIsValid && isValid;
   }
   return isValid;
}

....where HasAlreadyBeenValidated should be able to check the root model has been validated or not (either by checking ModelState, or if that's not possible then the FluentValidationModelValidatorProvider could track the objects it validates in an HttpContext.Items variable which we could check).

Sorry for a pause in response, it's a holidays season, you know, one day no work, another day a ton.
The issue I see in calling base.ValidateNodeAndChildren() that it'll validate children first, What might be relatively resource-intensive. And only then will validate the root model. Ideally we shoudn't validate them at all rather than do this but swallow the errors (if any). I'd keep this for plan B if there will be no better options.

@JeremySkinne how do you think which option we should perused first? open up the build-in provider for maximum flexibility/extensibility/customization?

I will try and do some prototyping and will get back to you

WebApi 5.2.4 has been out for a few weeks now, so I've done a new release of the FluentValidation.WebApi package (7.4.0) that contains the updated FluentValidationBodyModelValidator and the other changes that we discussed.
Let me know if you run into any issues.


37 housing fund tests

Added tests to the housing_fund pallet for the methods and the structs

Codecov Report

Merging #61 (8ac1f6a) into main (e35eb3d) will increase coverage by 32.60%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##             main      #61       +/-   ##
===========================================
+ Coverage   25.58%   58.19%   +32.60%
===========================================
  Files          18       18
  Lines         852     1153      +301
===========================================
+ Hits          218      671      +453
+ Misses        634      482      -152

Impacted Files
Coverage Δ

pallets/housing_fund/src/functions.rs
100.00% <100.00%> (+100.00%)
:arrow_up:

pallets/housing_fund/src/lib.rs
81.69% <100.00%> (+78.09%)
:arrow_up:

pallets/housing_fund/src/mock.rs
100.00% <100.00%> (+20.00%)
:arrow_up:

pallets/housing_fund/src/tests.rs
100.00% <100.00%> (ø)

pallets/housing_fund/src/structs.rs
100.00% <0.00%> (+100.00%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e35eb3d...8ac1f6a. Read the comment docs.


back port https://github.com/Azure/cadl-ranch/pull/748

sync cadl-ranch fix of https://github.com/Azure/cadl-ranch/pull/748

No changes needing a change description found.

You can try these changes here

🛝 Playground
🌐 Website
📚 Next docs


Beginner guidance

First of all, what a great tool you've developed. Simple, lightweight SMTP + API = ❤
Being a n00b, both with this tool and in the SMTP world in general, I do have a few questions I could need a hand with:

I'm exposing it to the Interwebz and I would like for the SMTP server to be readonly. No need to send, nor forward anything. Is that possible?

My current attempt is to pass an empty auth file to SMTP auth file env var/flag. But it also requires me to allow insecure auth. Is that the way to go? Feels a little odd.

Can you (spam) filter or allowlist from/to fields? I.e. I only want mails from a certain sender and/or to a certain mail address to end up in the mailbox. I realize that can be spoofed, but better than nothing.

I read something similar using the relay functionality, but I don't think that's what I'm after here, unless I'm missing something (which is totally possible).

I don't understand the support for "encrypted" passwords in auth files. How could that possibly work/bring any practical extra security without providing any salt etc.? I'm definitely missing something here.

Thank you for bearing with me 😊

Please see my comments below @ulken

First of all, what a great tool you've developed. Simple, lightweight SMTP + API = ❤

You're welcome!

Being a n00b, both with this tool and in the SMTP world in general, I do have a few questions I could need a hand with:

I'm exposing it to the Interwebz and I would like for the SMTP server to be readonly. No need to send, nor forward anything. Is that possible?

By readonly I suspect you mean "receive only" - in that Mailpit can receive emails, but cannot send them? If so, then yes most definitely, this is actually the default.

My current attempt is to pass an empty auth file to SMTP auth file env var/flag. But it also requires me to allow insecure auth. Is that the way to go? Feels a little odd.

A SMTP authentication file is only needed if you require authentication to send email to Mailpit. I do not fully understand what your expectation is with your setup - whether it is you sending email to Mailpit, or whether it is supposed to be "open to the internet" to receive emails from anyone. Could you please explain?

Can you (spam) filter or allowlist from/to fields? I.e. I only want mails from a certain sender and/or to a certain mail address to end up in the mailbox. I realize that can be spoofed, but better than nothing.

No, this is not how it works. Mailpit is designed to accept any/all email sent to it. There is no filtering of any sort, only "tagging" (if set) based on "filters" you can set. If SMTP authentication is set, then that is required to send to Mailpit, but even with authentication it will accept all mail (provided it is a valid email of course).

I read something similar using the relay functionality, but I don't think that's what I'm after here, unless I'm missing something (which is totally possible).

I don't think that is what you are wanting, though difficult to know without a clear explanation of what it is you are trying to achieve. Again, relay (automatically sending messages onto their intended destination) is optional, and by default off.

I don't understand the support for "encrypted" passwords in auth files. How could that possibly work/bring any practical extra security without providing any salt etc.? I'm definitely missing something here.

Passwords can be stored in an encrypted manner, however let's not get into that right now until I understand exactly what it is you are wanting to achieve here.
Mailpit is designed an an SMTP testing tool. Common use cases are application/website developers who need to test their application's email sending capabilities - without spamming users. Mailpit it used as the SMTP server and "swallows" the emails without actually sending them on. The developer can then view those emails and ensure they are formatted correctly and contain the correct information.
It sounds to me however that you are wanting to set it up as a receiving mail server (ie: actual emails get delivered to it from other SMTP servers). I need clarification though.

Thank you for bearing with me 😊

No problem :)

Thank you for your swift reply. Although I'm just getting started with Maillpit, I must say I've yet to meet a more kind, attentive and open-minded open source developer than yourself. Hope you're not wearing yourself out in the process.
I apologize for being unclear to you. Let's take a different approach and let me describe my use case:
We have had problems with alert notifications not being sent from Grafana more than once and decided to take several measures to get on top of it. The reasons have varied: changing mail provider and forgetting to update the SMTP credentials in Grafana, upgrading Grafana and forgetting to adjust the custom notification template etc. Mistakes happen, but we should be aware as soon as they happen. Until now, it could be weeks or even months before we realize it's not working. At times, customers would inform us 🤦
Apart from adding monitoring to logs, we want to add E2E monitoring.
My idea is to have a constantly firing (alerting) alert in Grafana, sending out reminders every X minutes. The email would be sent to an address accepted by Mailpit, running in a Docker container, on a VM in Azure.
Another script (Azure Function) would run every Y minutes to list messages in the mailbox and verify we are receiving alerts as expected. Otherwise notify responsible parties.
So yes, from Mailpit's point of view, I only want to receive emails (and preferably only ones I would allow to leave out spam).
Does that give you enough insight into the problem I want to solve?
I've tried multiple other approaches: Microsoft Graph API + Office365, Gmail API, WildDuck, but they've either been too complicated or required permissions I do not have and don't want to depend on.

I guess I can tag messages I'm interested in and filter out those in the verifying script. I'm just afraid all kinds of spam would end up in and fill the inbox. I had one spam email sent within the first 10 minutes of being "live".

Another newbie question: which port is actually used when sending/receiving the mails? 25? 465? 587? Right now I've bound them all to 1025 and of course I can find out by trial and error. Just curious if you have a short answer.

And regarding authentication I still want that for the web UI and API, so I suppose the question around encryption of passwords still apply.

Thanks for the kind words :)
From what I understand - you want Mailpit to effectively catch only emails sent by Grafana, ie: the online Grafana "webmail" of sorts? If that is the case (keep in mind I'm not familiar with Grafana's setup), I'm sure you can configure Grafana with which SMTP server to use?
So what you could do is run a Mailpit docker instance whereby port 1025 (the default Mailpit SMTP port) is only accessible to the Grafana server (firewall, or if it's running on the same server via Docker) - then you just set up Grafana to use Mailpit as its SMTP server. That would sort out the email sending and "receiving" - they would all go to Mailpit. You wouldn't even need to use TSL and/or SMTP authentication - assuming the Grafana server is the only IP with access to Mailpit's port 1025.
Then comes the matter of the web UI - ie: your access to Mailpit. This could have restricted access (username/password) using the Basic Authentication method - the credentials file would be as simple as a text file in username:password format (one per line), or those passwords could be encrypted in that text file (that link explains a bit more, but the htpasswd format is quite popular). There are even online websites that can generate those for you such as https://htpasswd.org/ (use the Apache MD5 one), so you end up with something like username:$apr1$ZpnLrpTc$wGOXX6qSEv91HM0Jm1n7H/. This would restrict the web UI and API with Basic Authentication. As an added measure, you could use set the web UI up with HTTPS (or via a proxy server running Nginx or Apache etc), however there are several approaches to that are too long to explain now, and I don't know what you do or don't understand regarding sysadmin. Seeing as you already set up Grafana and are referring to docker containers I suspect a fair bit.
Does that make sense?

From what I understand - you want Mailpit to effectively catch only emails sent by Grafana, ie: the online Grafana "webmail" of sorts? If that is the case (keep in mind I'm not familiar with Grafana's setup), I'm sure you can configure Grafana with which SMTP server to use?

The first part is correct and yes, you can configure which SMTP server to use (which I hinted at naming the type of problems we've had). But I don't think that's the way to go here. We still want "regular" (as in not for monitoring purposes) emails to go through our regular SMTP server. Plus, we want to test as much as possible of the production chain. I.e. if the SMTP server goes down or similar, we would want to be notified by that as well. In short: if alert emails are not delivered as expected (for whatever reason), we want to know.

So what you could do is run a Mailpit docker instance whereby port 1025 (the default Mailpit SMTP port) is only accessible to the Grafana server (firewall, or if it's running on the same server via Docker) - then you just set up Grafana to use Mailpit as its SMTP server. That would sort out the email sending and "receiving" - they would all go to Mailpit. You wouldn't even need to use TSL and/or SMTP authentication - assuming the Grafana server is the only IP with access to Mailpit's port 1025.

Yeah, that sounds good in theory and I did consider something similar, but as I mentioned above, we would rather monitor the setup as used in production, in order to catch as many potential issues as possible.

Then comes the matter of the web UI - ie: your access to Mailpit. This could have restricted access (username/password) using the Basic Authentication method - the credentials file would be as simple as a text file in username:password format (one per line), or those passwords could be encrypted in that text file (that link explains a bit more, but the htpasswd format is quite popular). There are even online websites that can generate those for you such as https://htpasswd.org/ (use the Apache MD5 one), so you end up with something like username:$apr1$ZpnLrpTc$wGOXX6qSEv91HM0Jm1n7H/. This would restrict the web UI and API with Basic Authentication.

That's all fine and dandy. I've already got that far on my own (using the docs 👍 ), thank you. Although I went with Bcrypt. I still don't understand how encrypting the password adds any extra security apart from making it seemingly more random and obscure.
If the password can be decrypted without providing any key and/or salt etc. to the application, I can't fathom how that could possibly work in matters of security.

As an added measure, you could use set the web UI up with HTTPS (or via a proxy server running Nginx or Apache etc), however there are several approaches to that are too long to explain now, and I don't know what you do or don't understand regarding sysadmin. Seeing as you already set up Grafana and are referring to docker containers I suspect a fair bit.

I'm already using Caddy as a reverse proxy here, so TLS is already taken care of. No need to worry about that within the Docker network.

And if you do "accept" my desired solution, (spam) filtering and ports are still open questions.

I'll need to get back to you in about 18 hours or so, bed time then work tomorrow 👍

No rush. Take your time. Thank you very much for assisting and I wish you a good night's sleep 😴

Sorry, I just edited my previous comment with a question 😂

In the meantime, does Gratama send out emails to different people, and you just want to catch one of those email addresses?

Gratama is a cool name 😎
But yes, very much so. We use their dashboards and alerting engine in combination with IoT devices monitoring water distribution systems. So we have hundreds or even thousands of different email addresses it's sent to.
The one in question here is special, but set up as a normal alert.

To clarify, those are all separate alerts, with different recipients. So this alert mail is only sent to one specific address.

Sorry, that was a typo / autocorrect / bad eyesight 😬 Considering that Grafana send to many different email addresses, we can't use Mailpit as the SMTP server to send directly to because it will intercept all emails and nothing will get out.
The only potential solution I can think of is that Mailpit would act like a regular SMTP server (with port 25 on the host mapped to 1025 in the docker container). The email address you wish to receive would need to resolve to that Mailpit server so that external mail servers try to deliver directly to it. You may need to set the MX records of that subdomain if using an existing domain that normally points elsewhere. The downside of this is that your Mailpit server is then open to the world, so spammers will definitely try to use it to relay spam, and Mailpit will just ingest anything sent to it. If your regular SMTP server (I don't know which one you use) has a dedicated IP address(es), you could firewall it off from everything except for that/those.
This solution should work, but still opens you up to the potential that the default SMTP server's IP changes and thus is firewalls off.

That wasn't 18 hours 😉 Did you cheat at work? 😬
First, I should probably have clarified from the start that I already got the setup working. My initial questions was more towards best practices.

The only potential solution I can think of is that Mailpit would act like a regular SMTP server (with port 25 on the host mapped to 1025 in the docker container). The email address you wish to receive would need to resolve to that Mailpit server so that external mail servers try to deliver directly to it. You may need to set the MX records of that subdomain if using an existing domain that normally points elsewhere. The downside of this is that your Mailpit server is then open to the world, so spammers will definitely try to use it to relay spam, and Mailpit will just ingest anything sent to it. If your regular SMTP server (I don't know which one you use) has a dedicated IP address(es), you could firewall it off from everything except for that/those.

That's exactly what I'm doing and yes, I had to add an MX record. Good tip on firewalling IP addresses 👍 I had thought of it, but now I actually did it. We're using Office365/Outlook, so their IP address ranges should be pretty stable. Otherwise, if all works as planned, we'll be notified and can update accordingly.
Thank you for verifying the port. Now my only remaining question mark is around the practicality around password encryption. Then I'll be out of your way (I think 😛).

I had actually replied before work - trying to get through GitHub issues faster than they are building up (and failing it seems lol) :) It sounds like you have it sorted, and limiting the IP addresses will sort your potential spam issue (unless that domain is being used already, in which case you should use a subdomain with MX records or something)!
Just for clarity, you do not need (or should have) passwords set for the SMTP server, else the remote server(s) won't be able to deliver mail. So with regards to the password encryption, those password hashing are almost all one-way hashing (ie: cannot be decoded, only compared with via "CPU expensive" lookups), and are similar to Linux system password hashing, or in fact any good password system these days. You can see a list of the supported hashing algorithms. Whilst plain text is supported (user:password), so are all those other algorithms too for the more security-conscious. I won't explain how each work, in fact I don't even want to know (it's really technical, and whilst similar, they all are different) - but they are (almost?) all salted. You can use any of those supported ones, so if you are concerned then just look up each one and decide on whatever suits you best.
Lastly - don't forget - by default Mailpit will loose all emails when restarted unless you have specified a database file to use. Also, it will only keep the latest 500 messages unless otherwise specified (see the runtime options).
I hope this answers all your questions?

I had actually replied before work - trying to get through GitHub issues faster than they are building up (and failing it seems lol) :) It sounds like you have it sorted, and limiting the IP addresses will sort your potential spam issue (unless that domain is being used already, in which case you should use a subdomain with MX records or something)!

Yep, using a subdomain, thanks 👍

Just for clarity, you do not need (or should have) passwords set for the SMTP server, else the remote server(s) won't be able to deliver mail. So with regards to the password encryption, those password hashing are almost all one-way hashing (ie: cannot be decoded, only compared with via "CPU expensive" lookups), and are similar to Linux system password hashing, or in fact any good password system these days. You can see a list of the supported hashing algorithms. Whilst plain text is supported (user:password), so are all those other algorithms too for the more security-conscious. I won't explain how each work, in fact I don't even want to know (it's really technical, and whilst similar, they all are different) - but they are (almost?) all salted. You can use any of those supported ones, so if you are concerned then just look up each one and decide on whatever suits you best.

Yes, I already got the SMTP authentication sorted from your previous reply. I'm referring to the UI/API now.
Ohhhh, now (I think) I understand. one-way hashing was the missing key (he he) for me. I thought they were being decrypted on the other end and then the setup made no sense. Now that makes perfect sense, thank you very much for your patience!

Lastly - don't forget - by default Mailpit will loose all emails when restarted unless you have specified a database file to use. Also, it will only keep the latest 500 messages unless otherwise specified (see the runtime options).

Yes, I'm aware, thank you. Already using a db file and 500 is more than enough. I'm just interested in the latest emails.

I hope this answers all your questions?

For the time being, yes ✅


perf(Container): Do not apply 'styleProps' to parent of children

BREAKING CHANGE: There now is an additional Box
between the Container component and its children.
If you are using the 'styleProps' on the Container to
customize the layout of its children, it is advised to
pass the children inside of a single Box, Flex or Grid
component and to use that component to customize
the layout of the children.

Accidentally opened this PR. @raulsteurer please reopen since it's your commit


periodic memory release results in increased latency

Pegasus version
pegasus-server-1.11.6-9f4e5ae-glibc2.12-release
Problem
periodic memory release results in increased latency
Reason
When build and  run  rdsn，the macro ENABLE_GPERF  and  the variable mem_release_enableddefault value is ON:
#ifdef DSN_ENABLE_GPERF
    if (_options.mem_release_enabled) {
        _mem_release_timer_task =
            tasking::enqueue_timer(LPC_MEM_RELEASE,
                                   &_tracker,
                                   []() {
                                       ddebug("Memory release has started...");
                                       ::MallocExtension::instance()->ReleaseFreeMemory();
                                       ddebug("Memory release has ended...");
                                   },
                                   std::chrono::milliseconds(_options.mem_release_interval_ms),
                                   0,
                                   std::chrono::milliseconds(_options.mem_release_interval_ms));
    }
#endif

but the strategies for freeing memory is unreasonable. for example, this time frees too much memory (5GB) at once  and results in the significant latency.
Solution
Now the config.ini is not set the value about "release memory", we can only add the section and set the mem_release_enabled value is false.

This problem is resolved in v1.12.1. Refer to this PR: https://github.com/XiaoMi/rdsn/pull/343.


Model - Serial - add boolean contains_valid_iczn_nomenclature?

When I add a serial, then I want to know if papers published in a serial contain nomenclatural acts that are "available" for ICZN purposes.
True - By default, if a paper comes out in this serial, then it is deposited in X archives, and or meets the digital requirements for name availability.
Considerations - is_preprint_publisher? (if false, then we can make strong assumptions)

we have is_electronic_only check box on the serials. The rest would be much harder to validate. The papers which are published in electronic only format, but do not completely follow iczn recomendations, the names published in those journals could still be available, if the authors follow all ICZN recomendations.


[SWARM-121] Enable clustering for messaging

add swarm.bind.address=<IP_ADDRESS> & java.net.preferIPv4Stack=true to
ensure that JGroups does not complain about binding to <IP_ADDRESS>.
This error was preventing mvn verify to pass.
JIRA: https://issues.jboss.org/browse/SWARM-121

The example tests will go further and JGroups will start but it now fails after https://github.com/wildfly-swarm/wildfly-swarm-core/commit/91f06a4e0265b68cd161d4a32416b538d2736133 as the messaging-subsystem is required the Undertow's http-upgrade handler to start.
11:20:50,139 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "messaging-activemq"),
    ("server" => "default")
]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.messaging-activemq.default is missing [jboss.http-upgrade-registry.default]"]}

Yah, I’m working on fixing the undertow upgrade registry bit now.
I’ll take ownership of this failure now.
Thanks!
On Tue, Apr 5, 2016 at 5:28 AM, Jeff Mesnil<EMAIL_ADDRESS>wrote:

The example tests will go further and JGroups will start but it now fails
after wildfly-swarm/wildfly-swarm-core@91f06a4
https://github.com/wildfly-swarm/wildfly-swarm-core/commit/91f06a4e0265b68cd161d4a32416b538d2736133
as the messaging-subsystem is required the Undertow's http-upgrade handler
to start.
11:20:50,139 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "messaging-activemq"),
("server" => "default")
]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.messaging-activemq.default is missing [jboss.http-upgrade-registry.default]"]}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/wildfly-swarm/wildfly-swarm-examples/pull/61#issuecomment-205729086

I have no idea how I replied as @projectodd-ci
This is Bob, and I'll take ownership of this failure.


fixed a bug in mul_acc_mat_vec_csr and mul_acc_mat_vec_csc

There is a bug in mul_acc_mat_vec_csr and mul_acc_mat_vec_csc. Basically, the output res_vec needs to be set to zero before accumulating values in the matrix vector multiplication.
I also btw did some small tweaks following the suggestions from cargo clippy

Hello,
That's not a bug, that's the expected behaviour. The function accumulates in the output vector, so should preserve the contents it has on input. It probably should be stated more explicitly in the docs. Maybe some line like This function implements the operation y += A * x.
This accumulation behavior is desirable because it enables adding matrix/vector products with only one storage vector, ie the equivalent of y = A * x + B * x is something like
let mut y = [0; n];
mul_acc_mat_vec_csr(b.view(), x, &mut y);
mul_acc_mat_vec_csr(a.view(), x, &mut y);

One could argue this is not convenient, but this function is quite low-level, the high level interface is the *operator. The drawback of this high-level operator is that it allocates, and does not work on slices. Maybe we could add a version of mul_acc_mat_vec_cs{r,c} that has this zeroing behavior for that purpose, eg mul_mat_vec_cs{r,c}.
The clippy suggested fixes look nice.

Hello,
That's not a bug, that's the expected behaviour. The function accumulates in the output vector, so should preserve the contents it has on input. It probably should be stated more explicitly in the docs. Maybe some line like This function implements the operation y += A * x.
This accumulation behavior is desirable because it enables adding matrix/vector products with only one storage vector, ie the equivalent of y = A * x + B * x is something like
let mut y = [0; n];
mul_acc_mat_vec_csr(b.view(), x, &mut y);
mul_acc_mat_vec_csr(a.view(), x, &mut y);

One could argue this is not convenient, but this function is quite low-level, the high level interface is the *operator. The drawback of this high-level operator is that it allocates, and does not work on slices. Maybe we could add a version of mul_acc_mat_vec_cs{r,c} that has this zeroing behavior for that purpose, eg mul_mat_vec_cs{r,c}.
The clippy suggested fixes look nice.

Sorry for my misunderstanding of the two functions' behaviors. What you explained makes sense. I changed them back.

Thanks for your quick iteration @cxzheng. Do you want me to add the non-accumulation versions mul_acc_mat_vec_cs{r,c}, or are you using the * operator?

It's okay for me. I'm just gonna set the vector to zero before calling mul_acc_mat_vec_cs{r,c}. I think it makes sense to stay with the same style like saxpy in BLAS in this case.


Update travis.yml and add power support ppc64le

Added power support for the travis.yml file with ppc64le. This is part of the Ubuntu distribution for ppc64le. This helps us simplify testing later when distributions are re-building and re-releasing.

This helps us simplify testing later when distributions are re-building and re-releasing

Can you clarify this? why do you need to add a different arch for testing a simple emoji list?

Closing, related https://github.com/apertium/streamparser/pull/38

tagging @gerrith3

@kilobeats you are correct - we are working through packages in debian/ubuntu that are built today with travis on Intel.  But I see your point, as a simple list of emojis there really isn't much to test here.  I think we can go ahead and close this one out.


⭐ Some useful advice that may help you ⭐

RKNN-Toolkit:

For yolov5, please refer here : https://github.com/airockchip/rknn_model_zoo/tree/main/models/vision/object_detection/yolov5-pytorch

For loading already quantized model, refer here: https://github.com/rockchip-linux/rknn-toolkit/tree/master/examples/common_function_demos/load_quantized_model

For how to export a .pt model(torchscript format), refer here: https://github.com/rockchip-linux/rknn-toolkit/blob/master/examples/pytorch/resnet18/test.py

Quantization RKNN model drop accuracy, please refer here: https://github.com/rockchip-linux/rknn-toolkit/tree/master/examples/common_function_demos/accuracy_analysis

Model got error when setting rknn.build(precompile=True)? Please try this way: https://github.com/rockchip-linux/rknn-toolkit/tree/master/examples/common_function_demos/export_rknn_precompile_model

Want to using Python api on board (such as rk1808/rv1126/rv1109/rk3399pro)? Using PC(x86) to generate RKNN model, and the using RKNN-Toolkit-lite for deplotment. https://github.com/rockchip-linux/rknn-toolkit/tree/master/rknn-toolkit-lite/packages

Pytorch version higher than RKNN-Toolkit requires? There are two way to do this:
First way: Install RKNN-Toolkit first. Then "pip uninstall torch". Then "pip install torch==1.10.0"
Second way: Install Pytorch first like "pip install torch==1.10.0". Then "pip install rknn-toolkit.whl --no-deps"

Other format data instead of image(lile jpg/png etc.)? The npy format is also accept for quantize model. NOTICE! If your npy data is 4D, then the layerout of the data should be "nhwc"!  If dims not equal to 4D, then the raw data is ok.

Please tell us if anything confuse you.

RKNPU

For RK1808/RV1109/RV1126, refer here https://github.com/rockchip-linux/rknpu

For RK3399pro, refer here https://github.com/rockchip-linux/RKNPUTools (This respository was old, the newer one is coming )

About rknn.init_runtime with devices connected

Init Failed
There could be many reasons for the failure of the rknn.init_runtime. Normally it only return a short code or discription. To obtained more information about the failure, you can try to connect the devices with the serial port. Type in this code

export RKNN_SERVER_LOG_LEVEL=5
export RKNN_LOG_LEVEL=5
export TRANSFER_LOG_LEVEL=5

Then restart the rknn server

restart_rknn.sh
or
find / -name rknn_server
find the path of server file. Kill the 'rknn_server' process mamully and then {your_path}/rknn_server &

Then try to init_runtime with your model again. The error reason is supposed to be printed on the serial port terminal.

Inference speed is lower than rknn capi
Yes. If you have higher requirement for inference speed, the Capi is the better to achieve it. RKNN python api is convenient but slower than Capi.

This was helpful thank you, do you have any advice or insight on a way to use this with python 3.9 (trying to avoid using venvs)? Haven't tried just using it so perhaps it will work as with previous versions

This was helpful thank you, do you have any advice or insight on a way to use this with python 3.9 (trying to avoid using venvs)? Haven't tried just using it so perhaps it will work as with previous versions

Sorry, at this time only python 3.6/3.8 is supported.


⚠ Mobitopup has degraded performance

In f474b1f, Mobitopup (https://napcard.voz.tech) experienced degraded performance:

HTTP code: 200
Response time: 6965 ms

Resolved: Mobitopup performance has improved in eff3ef2 after 422 days, 7 hours, 33 minutes.


GraalVM toolchain does not detect GraalVM EE (Enterprise Edition)

Gradle runs System.getProperty("java.vm.vendor") to determine the JVM's vendor. On GraalVM CE 22.3.0 this returns GraalVM Community and Gradle correctly recognizes this as a JVM vendored by GraalVM. On GraalVM EE 22.3.0 this returns Oracle Corporation and Gradle fails to recognize this as a JVM vendored by GraalVM.
Expected Behavior

I have GraalVM EE 22.3.0 installed at /Library/Java/JavaVirtualMachines/graalvm-ee-java11-22.3.0 and configure Gradle with:
java {
  toolchain {
    languageVersion.set(JavaLanguageVersion.of(11))
    vendor.set(JvmVendorSpec.GRAAL_VM)
  }
}

I expect Gradle to pick up the GraalVM EE installation as a Java toolchain that's vendored by GraalVM.
Current Behavior

The GraalVM EE installation is picked up as an Oracle installation:
$ ./gradlew -q javaToolchains
...
 + Oracle JDK 11.0.18+9-LTS-jvmci-22.3-b11
     | Location:           /Library/Java/JavaVirtualMachines/graalvm-ee-java11-22.3.1/Contents/Home
     | Language Version:   11
     | Vendor:             Oracle
     | Architecture:       x86_64
     | Is JDK:             true
     | Detected by:        Current JVM
...

and when running the build I'm hit with an error:

No matching toolchains found for requested specification: {languageVersion=11, vendor=GRAAL_VM, implementation=vendor-specific}

Context
I am not sure if this is an error on GraalVM's part (e.g. it could configure the vendor as "GraalVM Enterprise") or if this is an error on Gradle's part (perhaps a different probe such as the output of java --version can be used to recognize that the JVM is vendored by GraalVM?). At the very least this ticket should make others aware. If there is no solution to this problem, then perhaps a note in the documentation is justified.
Your Environment
Using latest Gradle (8.0.1) and latest GraalVM Java 11 (22.3.0).

See #18028

Ah, so I see this is already being tracked. Looking forward to the fix, thanks @melix!

This issue got a tad worse with GraalVM 23. Indeed there's a new free distribution if GraalVM called "Oracle GraalVM". It is the only download from GraalVM website.
Also in Github Action, the first configuration example of the graalvm/setup-graalvm action, uses the graalvm which the free oracle distribution.
    - name: Set up GraalVM
      uses: graalvm/setup-graalvm@v1
      with:
        distribution: 'graalvm'
        java-version: '20'
        native-image-job-reports: 'true'
        github-token: ${{ secrets.GITHUB_TOKEN }}

And Gradle fails with the usual:
Execution failed for task ':jufmt-cli:nativeCompile'.
> Error while evaluating property 'compileOptions.javaLauncher' of task ':jufmt-cli:nativeCompile'.
   > Failed to query the value of property 'javaLauncher'.
      > No matching toolchains found for requested specification: {languageVersion=20, vendor=GRAAL_VM, implementation=vendor-specific}.
         > No locally installed toolchains match (see https://docs.gradle.org/8.1.1/userguide/toolchains.html#sec:auto_detection) and toolchain download repositories have not been configured (see https://docs.gradle.org/8.1.1/userguide/toolchains.html#sub:download_repositories).

Using vendor.set(JvmVendorSpec.matching("Oracle")) is not a proper workaround as this may work in the CI but not locally unless some precautions are taken.

@bric3 given the fact that there's basically no way for Gradle to figure out the difference between various JVM implementations and vendors, we've made the decision in the official GraalVM native build tools to disable toolchain support by default.

I know. I'm using javaLauncher in combination with tool chain. It was working OK since I wasn't relying on EE distribution before.
I just stumbled on the issue, when upgrading the GHA action. This can be confusing for those not aware of this issue.


[SCB-825] fix SagaStartAnnotationProcessor class  bug

Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Make sure there is a JIRA issue filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
[ ] Each commit in the pull request should have a meaningful subject line and body.
[ ] Format the pull request title like [SCB-XXX] Fixes bug in ApproximateQuantiles, where you replace SCB-XXX with the appropriate JIRA issue.
[ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[ ] Run mvn clean install to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

Coverage increased (+0.3%) to 94.175% when pulling 3fa5a1398691c84ac2d45486b76fdc29aab8b1dd on WithLin:patch-1 into dcf9f2a28e062baacd96f22f80f08e40b485fc51 on apache:master.


Refactor osdctl account get xxx output code

The output of osdctl account get xxx -o yaml is not correct. We can use the genericcli library to print out yaml and json files.

We can refactor the code like what kubectl does https://github.com/kubernetes/kubectl/blob/master/pkg/cmd/get/get_flags.go#L33:6


[Azs.Compute.Admin] Tests need to properly categorized

The test framework expects each cmdlet have a separate test file. For example,
Set-AzsComputeQuota
should have a test file called "Set-AzsComputeQuota.Tests.ps1" under "test" folder.
If its not provided, the test run will complain saying this test file is missing and the test will be reported as skipped.
Executing script D:\a\1\s\src\Azs.Compute.Admin\test\Set-AzsComputeQuota.Tests.ps1
Running 'playback' mode...
Recording file 'D:\a\1\s\src\Azs.Compute.Admin\test\Set-AzsComputeQuota.Recording.json' is not present. Tests expecting recorded responses will fail

  Describing Set-AzsComputeQuota
    [!] Update, is skipped 0ms

This should not be needed


Enable packages to control order of context menu items

Goals:

Allow packages to share context menu “groups” (sets of context menu items delineated by separators). For example, a package should be able to provide a “Copy Full Path” context menu item which lives in the same group as the core “Copy” item.
Allow packages to control the ordering of context menu items.
Allow packages to control the order of context menu groups.

Constraints:

Packages should be able to position their items alongside other package's items without requiring the other package to make any changes.
The current sorting behavior should be maintained for context menus which do not contain any items which use this new option.
Packages may make ordering requests which are in contradictory. In this case, some ordering requests must be ignored in a deterministic way.

Prior work:

There has been at least one prior proposal to (discussion here) support ordering in Atom context menus. It got as far as merging support into Electron. Unfortunately, the Electron implementation has some problems, and the Atom support was never implemented.
The prior proposal seems to be based upon the the API that Eclipse has.

-- Extract from the Eclipse documentation.
Proposed Solution:

Add four new optional properties to the context menu items accepted by atom.contextMenu.add() each accepting as its value either an array of atom commands. The four properties are:

before
after
beforeGroupContaining
afterGroupContaining

before/after Provide a means for a single context menu item to declare their placement relative to another context menu item. These also imply that menu item in question should be placed in the same “group” as the item
beforeGroupContaining/afterGroupContaining Provide a means for a single context menu to declare the placement of their containing group, relative to the containing group of the specified item. Ideally these could be declared on some entity representing the notion of a “group”, but no such entity exists at this time, and I don't believe it's worth introducing a new construct within this API.

Edge case handling:

If no menu item with the given command exists, the relationship is ignored. This allows package authors to declare positioning relative to packages which the user may or may not have installed.
When a menu item attempts to position itself relative to another item, the two groups are joined. Note that this can happen recursively.
If two sets of menu items are provided by two consecutive plugins, and they don't delineate their items with separators, the items at the boundaries will be merged together into a group. If any item in that group specifies its position, it would cause all items in that new group to be relocated.

Possible challenges:

This approach assumes that context menus do not contain multiple entries that dispatch the same command. I can't think of any rational case in which this would happen, but it could be that there is some case I have not thought of. Another option would be for menu items to declare their position relative to other items via the other item's label. This would have the advantage that Atom is already enforcing label uniqueness, but it does not seem as stable for me. Localization would be one reason to avoid using labels as an item's unique identifier.

@maxbrunsfeld Thanks for taking the time to review. I'll try to construct some reasonable worst-case scenarios and profile them.

For a rather complex context menu of >30 elements containing 20 relationships of various types it takes under 10 milliseconds to sort them.

In a lot of code paths in Atom, ten milliseconds would be pretty significant, but since this only occurs on a fairly course-grained basis (once per right click) it doesn't seem like a big deal here.

Do packages that use a .cson file to build the context menu need to make any changes to use?  Or does this not have anything to do with them?

This should work from either CSON or via the atom.contextMenu.add().

There's no documentation on this feature. Is this intended to be left undocumented, or is this an oversight?

@lierdakil Yeah, this should probably get documented now that it's been accepted. I'll add it to my list.

now that it's been accepted

Uh... to my understanding, it's not only "accepted", but also released with v1.26.0... so yeah, the feature is released, but documentation isn't there. I'm aware that's how it usually is, but it doesn't mean that's a good thing. I would argue the docstring should've been updated as a part of this PR.
This is especially not fun considering Atom had a policy "undocumented means unsupported" since the early days. So this feature is in a kind of an awkward spot right now.
To be clear, I'm not trying to start anything, just sharing my point of view. Please don't take it personally.

@lierdakil Not sure about the official stance, but I'm okay with this being an "unsupported" API until it gets documented. In fact, it might be good to get some people trying it out and proving that it doesn't have any unforeseen problems before it's fully blessed. That said, I don't know exactly how these things generally get rolled out.
The Nuclide team will be doing some work to adopt this in the near future and we will probably get some additional single there to see how this works at a larger scale than my initial tests.


(There was no jsconfig.schema.json back then, so it's not particularly surprising that it wasn't changed at the same time.)

Thanks @SamB !


Drawing error with met module

Hi,
When using the demo files from paoyang.ipmb.sinica.edu.tw or my own datasets I can successfully run methgo cov but then I get an error (methgo.met.log.txt) when running methgo met:
methgo met genes.gtf genome.fa demo.CGmap
Files demo.bulk.hist.png and demo.bulk.mean.png are produced, although the second one shows only one color for the three C contexts.

In case it may help, MethGo was retrieved from git using:
git clone https://github.com/paoyangchen-laboratory/methgo.git
I am using the following packages:
cython 0.25.2
numpy 1.12.1
scipy 0.19.0
matplotlib 2.0.2
pandas 0.20.2
pysam 0.8.0
biopython 1.69
pyfasta 0.5.2
pybedtools 0.6.9

Thanks a lot for your help.
Regards.

Looks like a bug in Pandas 0.20.2. If you downgrade Pandas to 0.20.1, everything will be back to normal. Thanks.

I downgraded to 0.20.1 as suggested:
Name: pandas
Version: 0.20.1
Summary: Powerful data structures for data analysis, time series,and statistics
Home-page: http://pandas.pydata.org
Author: The PyData Development Team
AAuthor-email<EMAIL_ADDRESS>License: BSD
Location: /usr/local/lib/python2.7/dist-packages
Requires: pytz, python-dateutil, numpy

But doing it I get a new error related to pyobject:
error_Pandas_0.20.1.txt
Does it mean I also need to downgrade other packages such as matplotlib?
Thanks for your time.

Hi,
Problem solved with a fresh install from Debian packages rather than pip. Thanks again.


Signature extraction failed

On this video: https://www.youtube.com/watch?v=je_R3gEtDbw
I have upgraded youtube-dl via pip, current version is 2020.5.3. Verbose log output:

ERROR: Signature extraction failed: Traceback (most recent call last):
File "C:\Users\username\AppData\Local\Programs\Python\Python37\lib\site-packages\youtube_dl\extractor\youtube.py", line 1385, in _decrypt_signature
video_id, player_url, s
File "C:\Users\username\AppData\Local\Programs\Python\Python37\lib\site-packages\youtube_dl\extractor\youtube.py", line 1262, in _extract_signature_function
raise ExtractorError('Cannot identify player %r' % player_url)
youtube_dl.utils.ExtractorError: Cannot identify player 'https://www.youtube.com/s/player/64dddad9/player_ias.vflset/en_US/base.js'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
(caused by ExtractorError("Cannot identify player 'https://www.youtube.com/s/player/64dddad9/player_ias.vflset/en_US/base.js'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.")); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Lol :) Why do you put "outdated version" label on this issue, when I explicitly state that I have updated to latest version available via pip?

Now, you will prove that with verbose log, "lol".

Is this a joke or something? Here is output of pip show youtube-dl:
Name: youtube-dl
Version: 2020.5.3
Summary: YouTube video downloader
Home-page: https://github.com/ytdl-org/youtube-dl
Author: Ricardo Garcia
Author-email<EMAIL_ADDRESS>License: Unlicense
Location: c:\programdata\anaconda3\lib\site-packages
Requires:
Required-by:

Again: post complete verbose log as requested in the issue template.

Yeah right, you do that buddy :)


Bug: Some fields is not reset when you re-enter the login/registration page

Fixed by b372280 commit


Having question mark in the commonAuthCallerPath during the direct logout from commonauth leads to invalid call back url

Ex:
https://localhost:9443/commonauth?commonAuthLogout=true&type=oidc&sessionDataKey=RANDOMSTRING&commonAuthCallerPath=http%3A%2F%2Fwww.example.com%2Ffoo%3Fbar&relyingParty=playground
Invaild URL having two '?' charatcers.
http://www.example.com/foo?bar?sessionDataKey=RANDOMSTRING

This issue is being closed due to extended inactivity. Please feel free to reopen it if further attention is needed. Thank you for helping us keep the issue list relevant and focused!


Where's Change Log?

Root folder should contain a change log.md file with changes brought with new versions. This is especially important for breaking changes. Are there any breaking changes going from 1.6.x to 2.x? I know that many developers regard this a mandatory requirement.
Without a change log developers are hesitant to upgrade your plugin as they don't know whether it'll break something in their existing codebase. At least it gives them guidance what to test in their apps after an upgrade.

Although one can actually see that there, but it's an unlikely place for developers to look for changelog. And you can't emphasize more important items there like breaking changes or other specifics that may be of interest to your users.

True, but all versions have been backward compatible so far and readme example page is a good place to know the syntax and sample of each version.

I want to keep the work needed for maintaining the plugin to the minimum so I could focus on adding features and fixes in the limited time I have to put on this open source module. If you are willing to contribute and create the change logs based off the release notes you are more than welcome.


bpb: mark as broken

Description of changes
This has been broken since Rust 1.76.0, as the feature rust_2018_preview has been removed. bpb as well as its dependency pbp use this flag in their source code. While patching was an option, I would personally propose the eventual removal of this package as it hasn't been updated in 6 years.
Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

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

I would personally propose the eventual removal of this package as it hasn't been updated in 6 years.
Just removing it altogether would be okay.

Just removing it altogether would be okay.

Wouldn't that be considered a breaking change? The 24.05 release schedule prohibits such changes atm

@Aleksanaa looks like I misunderstood the wording in the release schedule issue. Once ofborg is happy, maybe we can get this merged before 2024-05-1 AoE :D


Tried using TTS  and this error showed up

it says "error" in russian. What do I do?

follow the issue template


Question : What does amb(er) stand for?

It looks like that amber is the thing that "ambs", but what is the meaning of "amb" ?

ambs means "amber search", and ambr means "amber replace".


⚠ Bofrost.de has degraded performance

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

HTTP code: 200
Response time: 1156 ms

Resolved: Bofrost.de performance has improved in d9f84cc after 16 minutes.


fix compiler issues Mac

use AM_CPPFLAGS instead of INCLUDES
add libargp to the compile process

I'm not sure if the libargp thing is also okay when compiling on linux. But on mac installing libglib2 thought macports does not install libargp.

FWIW, the AM_INIT_AUTOMAKE([gnu]) -> AM_INIT_AUTOMAKE([foreign]) fixes the autotools bootstrap as well.
However, on Linux, it's unreasonable to require some argp library, as argp_parse and friends are already provided by glibc.  In fact, merging this request breaks builds on Linux.

Manually applied upstream


why there are no updates since five months ago

I 'd like to know is there someone maintain it ~

+1

Hello, I'll be helping maintain this library. File away


There is a bug that strings are not displayed in iOS darkmode.

System information

Mobile device : iPhone 8 , iOS 13

Describe the current behavior
url : image_classification/ios
There is a bug that strings are not displayed in iOS darkmode.

There is not a bug in light mode.

Other info / logs
The reason for this is that the background and text are the same color.

I'm working on this bug.
https://github.com/tensorflow/examples/pull/177

This is fixed by merging the PR. Thanks for the fix!


Wrap async/sync result in the library

Its super common for async/sync operations to throw an error, but i don't see a constructor to conveniently wrap the operation in the Result. I propose a new constructor:
async function AsyncResultOf<T>(val: Promise<T>): Promise<Result<T, Error>> {
  try {
    return Ok(await val);
  } catch(err) {
    return Err(err);
  }
}

This allows us to go from the throw/catch error handling to the monadic error handling patterns const result = await AsyncResultOf(fetch(...))
I will go further to suggest an even more general constructor that translates both async and non-async fallible operations:
async function ResultOf<T>(val: () => Promise<T>): Promise<Result<T, Error>> {
  try {
    return Ok(await val());
  } catch(err) {
    return Err(err);
  }
}

This can of course be overloaded with the signature of AsyncResultOf.
(PS im trying to whip up a PR but the test keeps saying "Timed out while running tests" on my machine)

i changed results.ts interestingly.

I think your proposal is interesting. Have you considered using TaskEither from the fp-ts library? It could be more suitable for more complex scenarios. Additionally, if we're planning to support this constructor, we should also consider adding a wrapper for regular functions. Your syntax seems fitting for this purpose:
async function resultOf<T, E = unknown>(val: () => T): Result<T, E> {
  try {
    return Ok(val());
  } catch(err) {
    return Err(err);
  }
}

// usage:
const result = resultOf(() => 10 / 0);

Also, I have modified the error type, as we cannot be certain that the thrown value is an error.

Would be cool to see this implemented :)


Bug: Use canonical attribute

Summary
Sites that contain the defacto version of it's content should have a link element in the head stating it is the canonical source:
 <link rel="canonical" href="https://example.com"/>

source: https://developers.google.com/web/tools/lighthouse/audits/canonical
Note: unsure whether the https is required at the start or if the url will fallback to whatever protocol it's on

Found to be an issue with configuration


fix: display target for local profile

Summary
Fix #514
Testing
Test case in #514

'localhost' is shown on the profile tooltip (Local 94 connection)


fix: cisco timesync bug

Closes: #1731

:tada: This PR is included in version 2.31.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


docs: update README.md on benchmark result

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (cf554bf) to head (b925f26).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #347   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           41        41
  Lines         3696      3696
=========================================
  Hits          3696      3696

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Simon Game Zipline marked as complete instead of Tic Tac Toe Zipline after update.

I had finished the Tic Tac Toe Zipline before the update. After the update the new Simon Game Zipline is showing as complete and the Tic Tac Toe Zipline is showing as not complete.

I experienced this as well.

Same here.

Any ideas @QuincyLarson or @benmcmahon100?
@1hella @SaintPeter @denmch is this still an issue for you?

Yes, my map is still incorrect:

My profile, though, does show my tic-tac-toe completion:

I had the problem too.

Hi everyone, sorry I just now saw this issue (I need to go through these more often). Here's what happened: when I added the Simon challenge, I copied the Tic Tac Toe challenge and accidentally changed the Tic Tac Toe challenge's ID instead of the Simon challenge's ID.
For most campers, this was of no consequence. But for those who had already completed the Tic Tac Toe challenge, it ended up with the mixed up state it's in currently. I can fix it manually. Please respond to this issue telling me which of these challenges you've completed:
Simon
Tic Tac Toe
or both

I have completed Tic Tac Toe but not Simon.

I completed Tic Tac Toe. Almost done with Simon, but not quite there.

Same. Tic tac toe but not simon.

I have completed both. Thank you.

I completed Tic Tac Toe. Still working on Simon.

I completed Tic Tac Toe. Still working on Simon.

@QuincyLarson @BerkeleyTrue any updates on fixing this issue?

Closing this issue. If you still have problems, please, feel free to reopen or left a comment here, thanks.


NX   Running global Nx CLI with PNPM may have issues.

When running nx in pnpm managed repo, I get the following warning (which sometimes even results in not working command)
 >  NX   Running global Nx CLI with PNPM may have issues.

   Prefer to use "pnpm" (https://pnpm.io/cli/exec) to execute commands in this workspace.
    TIP  create a shortcut such as: alias pnx="pnpm nx --"

Using the alias from the TIP would break this autocompletion, so would be really great if the plugin could work with PNPM natively and run pnpm nx whenever nx is used.
Here is what I came up with as a solution for me:
In .zrhrc
function pnpm-nx() {
	local cmd=$BUFFER
	if [[ "$cmd" =~ ^nx ]]; then
		local new_cmd=$(echo $cmd | sed -E 's/^nx /pnpm nx /g')
		BUFFER="$new_cmd"
	fi
	zle accept-line
}

zle -N pnpm-nx
bindkey "^M" pnpm-nx

So, now whenever I type nx {command} it gets replaced by pnpm nx {command} automatically on Enter. This also doesn't break this autocompletion plugin

I recently started to use pnpm and also noticed the warning but I just ignored it, I wonder what issues it can cause and why. I agree it would be great to handle this directly in the plugin, if you want to contribute you are welcome.

Sometimes, some command will fail if used without pnpm  prefix. Usually more complex commands like nx generate or nx migrate, so this is not only warning.
I might take a look on this, but not sure I'll have time. But feel free to reuse that piece of code I've shared.
btw, not sure if this is possible, but I would improve the behavior of that script a bit.
The downside of script from above is that pnpm nx.. command gets written to history instead of nx .... So, I can't navigate back in history with arrows and re-use nx ... command with substitution. nx-completion plugin won't work.
Probably the solution would be to alter terminal history somehow after execution and write there nx ... instead of pnpm nx ...

I'm not sure if this helps in your case, but I have added this tiny script to my .zshrc to get autocomplete working whithout nx being globally installed:

function nx() {
    yarn nx "$@"
}

Just as an idea for potential solution. There is a package I use https://github.com/antfu/ni which can automatically detect package manager used in the project and install dependencies with proper manager.
So, this plugin, potentially could do the same – detect package manager used and append yarn , pnpm  or nothing in case of npm

and @Peeeep , your solution works like a charm, thanks.
In my case, I did the following for pnpm
# ~/.zshrc file
function nx() {
    pnpm nx "$@"
}

Just as an idea for potential solution. There is a package I use https://github.com/antfu/ni which can automatically detect package manager used in the project and install dependencies with proper manager. So, this plugin, potentially could do the same – detect package manager used and append yarn , pnpm  or nothing in case of npm

Thanks for this recommendation!
I updated my .zshrc with the following:
function nx() {
    na nx "$@"
}

Works like a charm for all package managers.


Strange behavior creating parametric mutable structs in IJulia / Jupyter

I'm using Jupyter 4.3.0 / IJulia 1.6.2 with Julia 0.6, and trying to create a new mutable struct with a parametric type when I encountered some very strange behavior. When typing a line like this:
mutable struct test{a::Real, b::Real}
If I hit return to start a new line and try typing, the new characters do not appear. Additionally, if I click on or try to select the cell, the existing text in the cell is pasted on a new line inside of the cell. This happens regardless of whether I start a new notebook or use a different browser. The issue appears to happen with earlier kernels as well. Kernels for different languages like Python do not replicate this issue.
A workaround is removing the type restrictions on the type parameter, but I'd prefer to have the full functionality available inside IJulia.

I can't replicate your behavior; if I hit return in a cell containing that line it all works fine.  (I'm using Jupyter 5 ... can you try upgrading?)
Typing in cells really has nothing to do with IJulia (which is only involved when you execute a cell), so this is a Jupyter problem and not IJulia.
Note, by the way, that your syntax is incorrect: I think you want mutable struct test{a<:Real, b<:Real}.

Thanks for the response - I will try upgrading Jupyter.


[COMMUNITY] mikepapadim -> Reviewer

Please join us to welcome Michalis Papadimitriou (@mikepapadim) as a new reviewer to TVM. Michalis has contributed a lot to BYOC and TensorRT backend.

Commits History
Code Review
Community Forum Summary

congrats @mikepapadim!!


updates to management command

Pull Request Checklist:

[ ] Positive Test Case Written by Dev

[ ] Automated Testing

[ ] Sufficient User and Developer Documentation

[ ] Passing Jenkins Build

[ ] Peer Code review and approval

Positive Test Case

[Enter positive test case here]

@pkdash Can you take a quick look of this small PR with two line changes? The problem was discovered when I ran this management command to verify resources with versioning issues have been fixed. It turns out the last string to identify resources in replaced by and version of relations for some published resources have the form of hs.<resource_uuid>, so the split by / itself is not sufficient, and I have to retrieve the last 32 characters after the split to make sure to remove hs. to get the true resource id. This PR is to fix this issue.

METRIC
VALUE

NEW SECURITY HOTSPOTS
0

NEW DUPLICATED LINES DENSITY
0.0

NEW VULNERABILITIES
0

NEW CODE SMELLS
0

NEW BUGS
0

https://sonarqube.cuahsi-workstation.com:9000/dashboard?id=hydroshare-4464


chrome library issue

Description
Running into an error when trying to start the app
(node:30620) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
/home/ubuntu/nvidia-snatcher/node_modules/puppeteer/.local-chromium/linux-800071/chrome-linux/chrome: error while loading shared libraries: libxcb-dri3.so.0: cannot open shared object file: No such file or directory

https://github.com/jef/nvidia-snatcher/wiki/Installation:-Linux:-Debian-based


Add magento.cart connector

Description
add Magento cart connector
Fixes https://github.com/ballerina-platform/ballerina-extended-library/issues/226
One line release note:

add Magento cart connector

Type of change

[X] New feature (non-breaking change which adds functionality)

Test Configuration:

Ballerina Version: Ballerina Swan Lake Beta 6
Operating System: Linux
Java SDK: Java 11

Checklist:
Changes to OpenAPI definition

[X] Modified info section of the OpenAPI definition file - Example

description - what the connector is about
x-ballerina-init-description OpenAPI extension - connector initialization details
x-ballerina-display OpenAPI extension - connector name and path to the connector icon

[X] Added proper description each API Key, if API Key authentication is defined in OpenAPI definition file

Changes to connector module

[X] Added license header at the top of each .bal file.
[X] Added Package.md as per the guide here
[X] Added Module.md for the module of the  connector as per the guide here
[] Added icon.png
[X] Added Ballerina.toml file with following information. For keywords refer to guide

Verifying connector module

[X] Compiled the connector successfully with the targeted ballerina version.
[] Conducted smoke tests on the connector (Recommended when OpenAPI definition is obtained from an unofficial source)

Security checks

[X] Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines?
[X] Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets?

PR check is failing because Dependecies.toml is generated with SLBeta6 pack.
Please generate with latest pack and update the PR.