Dependency resolution fails with import module.submodule as alias

import module.submodule as alias identifies module.submodule as dependency.
This results in failed to solve: process "/bin/sh -c conda env update -n venv -f ***-environment.yaml" did not complete successfully: exit code: 1 when building the cell.
The correct behaviour is to identify module as dependency.

We get an error in class IOLoop(Configurable) line 525:
        if future_cell[0].cancelled() or not future_cell[0].done():
            raise TimeoutError("Operation timed out after %s seconds" % timeout)

The error comes when we test laserfarm.json


Notifications in all screens

Description of the new feature / enhancement
I think it could be very interesting to be able to see notifications from applications such as teams or slack on all screens connected to the computer.
Scenario when this would be used?
When you work with a large screen and a small laptop it is very uncomfortable to receive notifications on the small screen.
Supporting information
No response

/feedbackhub


feat: deploy wallet account with Safe + Zodiac

@Orland0x can share link to script that you use?

@bonustrack  you mean that we should deploy safe on behalf of the user creating a space?


node info command doesn't need to do retry. node tip need smaller retry

if node is offline, it takes too much time to get a response from the wallet

Testing:
Connect qt wallet to offline node. Then check if it is not unreasonably slow.

It took just over 2 minutes

I confirmed with K and that is a good time :).


How to set the relationship in two column which is not index?

Bug/Feature Request Description
(replace this text with your issue)
I want to set the relationship of two columns in two tables.  For example:
# Relationship between clients and previous loans
r_client_previous = ft.Relationship(es['clients']['client_att'],
                                    es['loans']['client_att'])

# Add the relationship to the entity set
es = es.add_relationship(r_client_previous)

But the es['clients']['client_att'] and es['loans']['client_att'] is not the index of data frames of 'clients' and 'loans', which means these columns may contains the repreated value and not unique. Then it will riase an error.
So does featuretools support to set the relationship of two not-index columns?
Thank you!
Issues created here on Github are for bugs or feature requests. For usage questions and questions about errors, please ask on Stack Overflow with the featuretools tag. Check the documentation for further guidance on where to ask your question.

In a parent-child relationship, only the parent has to have a unique index. In this case, the column in client dataframe should be unique, but the column in the loans dataframe won't be unique. That is because one client might have many previous loans. If your client entity doesn't have one row per client, you likely will want to try to arrange your data such that it does.
Closing this issue for now. If you have other questions about using Featuretools, please post on our Slack or on Stack Overflow


[Menu] Add onFocusIndexChange property

Note
This PR is a follow-up to issue https://github.com/callemall/material-ui/issues/5790, where I described the use case that I am trying to solve.
Description
Add a callback property that is called whenever the MenuItem focus is changed.
Sometimes it will be called when the focus isn't changed.  For example:

If top menu item is keyboard focused (call #1) and then the up arrow is pressed (call #2).
If some menu item is keyboard focused (call #1) and then that same menu item is clicked (call #2).

[x] PR has tests / docs demo, and is linted.

No docs demo

[x] Commit and PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".
[x] Description explains the issue / use-case resolved, and auto-closes the related issue(s) (http://tr.im/vFqem).

Hmmm... I used npm run test:karma during development, which works fine on my computer.  But npm run test fails on my computer, just like on Travis.
Looking into it.

Thanks for your feedback!
I just made your suggested change to the order of the event argument.
I also just added a unit test for some code that I realized I hadn't even tested manually.  In the process, I noticed one or two pre-existing bugs in the hotkey code.  They are documented in the tests.  Do you think I should open issues for them?

Thanks!


build(scripts): get latest designkit master on build

Get the latest designkit master from github when building a release instead of using the local one.
Why:
The latest release (0.7.0) includes a more or less broken version of designkit because it has its dependencies messed up which makes it unbuildable today. As far as I can see the version contained in 0.7.0 was never a master of meetalva/designkit but just a local version of whom evers machine while building the release.
This is now prevented to happen again 🎉!

Good idea and also seems to work very good. I was concerned of it taking to long but it's just a small step in the build process.
Thank you :)


[HOLD]: Refactor file structure

I went ahead and restructured the file structure so that it would be easier to test and maintain.  The naming structing (having folders with an index.js in it) is opinionated so let me know if you'd rather not.
Deprecations

I removed the constructor in favor of class-transform-properties
babel-preset-2015 references were removed in favor of the already-installed babel-preset-env

To verify changes
I went ahead and ran npm run demo-build to verify the changes and everything ran successfully, however, I ran npm run build and the index.js file created could not be found.  I'll keep this PR open on my end so I can push changes as needed.
If accepted, I'd be more than happy to add tests to showcase coverage.

Thanks @mtliendo , it needed some cleanup. I am new to testing, so would be happy to have your support!

Thanks! Can you give me some insight into why the build script is proving a runnable inde.html file?

Sure. First react npm lib. Needed a way to provide a transpiled file to our parent project. This worked, but open to suggestions.


ios escape alphanumeric characters

this appears to handle the issues outlined here
https://github.com/flutter/flutter/issues/28094#issuecomment-533839957

Thank you, will merge. I've read the discussion in the linked PR after I was mentioned, but didn't have the time to look into the last issues.

Thank you so much for your efforts, you are helping my project out a great deal.!


nix-ci: Fix docker push conditional

Codecov Report

Merging #411 (92abf57) into master (3de6df8) will decrease coverage by 0.82%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #411      +/-   ##
==========================================
- Coverage   75.37%   74.55%   -0.83%
==========================================
  Files          83       83
  Lines       10395    10511     +116
==========================================
+ Hits         7835     7836       +1
- Misses       2560     2675     +115

Impacted Files
Coverage Δ

modules/minimint-mint/src/config.rs
76.92% <0.00%> (-23.08%)
:arrow_down:

modules/minimint-ln/src/config.rs
87.75% <0.00%> (-12.25%)
:arrow_down:

modules/minimint-wallet/src/config.rs
89.04% <0.00%> (-10.96%)
:arrow_down:

minimint/src/config.rs
65.00% <0.00%> (-7.57%)
:arrow_down:

client/client-lib/src/api.rs
81.45% <0.00%> (-5.86%)
:arrow_down:

minimint/src/net/api.rs
88.18% <0.00%> (-4.13%)
:arrow_down:

modules/minimint-mint/src/lib.rs
90.65% <0.00%> (-0.51%)
:arrow_down:

minimint/src/lib.rs
78.67% <0.00%> (-0.47%)
:arrow_down:

client/cli/src/main.rs
0.70% <0.00%> (-0.12%)
:arrow_down:

ln-gateway/src/bin/ln_gateway.rs
0.55% <0.00%> (-0.08%)
:arrow_down:

... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


test gha

meh

trying another approach to adding the trigger - Hersh and I think it has to do with the merge from a fork


Possible to inherit from the RequiredIf attribute?

I want to know if I can inherit from the RequiredIfAttribute and override the FormatMessage method. I need to create a 'localized' attribute so that I can get translations for the error messages.

Hi,
The sealed keyword is there by design. I've introduced it I after going through several sources, e.g.:

MSDN:

CA1813: Avoid unsealed attributes: The .NET Framework class library provides methods for retrieving custom attributes. By default, these methods search the attribute inheritance hierarchy; for example Attribute.GetCustomAttribute searches for the specified attribute type, or any attribute type that extends the specified attribute type. Sealing the attribute eliminates the search through the inheritance hierarchy, and can improve performance.

Framework Design Guidelines:

DO seal custom attribute classes, if possible. This makes the look-up for the attribute faster.

Jon Skeet note:

Classes should either be designed for inheritance or prohibit it. There is a cost to designing for inheritance:

It can pin down your implementation (you have to declare which methods are going to call which other methods, in case a user overrides one but not the other)
It reveals your implementation rather than just the effects
It means you have to think of more possibilities when designing
Things like Equals are hard to design in an inheritance tree
It requires more documentation
An immutable type which is subclassed may become mutable (ick)

Item 17 of Effective Java goes into more details on this - regardless of the fact that it's written in the context of Java, the advice applies to .NET as well.
Personally I wish classes were sealed by default in .NET.

To summarize, I wasn't considering the inheritance there and can't say right now it is a correct approach. Probably the better idea is to inherit from abstract ExpressiveAttribute class.

I see. I will try that. Thanks!
--
Dit bericht is verstuurd vanaf mijn telefoon en is om die reden kort en direct.
Op 4 aug. 2015 om 22:38 heeft Jaroslaw Waliszko <notifications<EMAIL_ADDRESS>het volgende geschreven:
Hi,
The sealed keyword is there by design. I've introduced it I after going through several sources, e.g.:

MSDNhttp://msdn.microsoft.com/en-us/library/ms182267(v=VS.100).aspx:

CA1813: Avoid unsealed attributes: The .NET Framework class library provides methods for retrieving custom attributes. By default, these methods search the attribute inheritance hierarchy; for example Attribute.GetCustomAttribute searches for the specified attribute type, or any attribute type that extends the specified attribute type. Sealing the attribute eliminates the search through the inheritance hierarchy, and can improve performance.

Framework Design Guidelineshttp://www.amazon.com/dp/0321545613:

DO seal custom attribute classes, if possible. This makes the look-up for the attribute faster.

Jon Skeet notehttp://stackoverflow.com/a/268287/270315:

Classes should either be designed for inheritance or prohibit it. There is a cost to designing for inheritance:
 *   It can pin down your implementation (you have to declare which methods are going to call which other methods, in case a user overrides one but not the other)
 *   It reveals your implementation rather than just the effects
 *   It means you have to think of more possibilities when designing
 *   Things like Equals are hard to design in an inheritance tree
 *   It requires more documentation
 *   An immutable type which is subclassed may become mutable (ick)

Item 17 of Effective Java goes into more details on this - regardless of the fact that it's written in the context of Java, the advice applies to .NET as well.
Personally I wish classes were sealed by default in .NET.
To summarize, I wasn't considering the inheritance there and can't say right now it is a correct approach. Probably the better idea is to inherit from abstract ExpressiveAttribute class.

Reply to this email directly or view it on GitHubhttps://github.com/JaroslawWaliszko/ExpressiveAnnotations/issues/70#issuecomment-127754430.

No problem. I'd just like to add that if localization is the main issue, take look at the sample project, where the error messages are localized. Maybe that solution will be sufficient for your purposes.
Regards.

An example of inheritance from ExpressiveAttribute is shown below:
public class AssertThat2Attribute : ExpressiveAttribute
{
    public AssertThat2Attribute(string expression)
        : base(expression, "redefined default message for {0} field with {1} logic")
    {
    }

    protected override ValidationResult IsValidInternal(object value, ValidationContext validationContext)
    {
        if (value != null)
        {
            Compile(validationContext.ObjectType);
            if (!CachedValidationFuncs[validationContext.ObjectType](validationContext.ObjectInstance))
                return new ValidationResult(
                    FormatErrorMessage(validationContext.DisplayName, Expression),
                    new[] { validationContext.MemberName });
        }

        return ValidationResult.Success;
    }
}

Next, if client-side validation is needed as well, new validator needs to be provided for such a new attribute to be recognized:
public class AssertThat2Validator : ExpressiveValidator<AssertThat2Attribute>
{
    public AssertThat2Validator(ModelMetadata metadata, ControllerContext context, AssertThat2Attribute attribute)
        : base(metadata, context, attribute)
    {
    }

    public override IEnumerable<ModelClientValidationRule> GetClientValidationRules()
    {
        var rule = GetBasicRule("assertthat");
        yield return rule;
    }
}

Global.asax wire-up can be done in the following manner:
protected void Application_Start()
{
    DataAnnotationsModelValidatorProvider.RegisterAdapter(
        typeof(AssertThat2Attribute), typeof(AssertThat2Validator));
    ...

If the Priority property has to be recognized, different Global.asax setup is required, namely:
protected void Application_Start()
{
    ModelValidatorProviders.Providers.Remove(
        ModelValidatorProviders.Providers.FirstOrDefault(x => x is DataAnnotationsModelValidatorProvider));
    ModelValidatorProviders.Providers.Add(new ExpressiveAnnotationsModelValidatorProvider2());
    ...

As you can see, custom version of ExpressiveAnnotationsModelValidatorProvider is used. It differs from default one, because recognizes newly defined attribute. Its implementation is as straightforward as that:
public class ExpressiveAnnotationsModelValidatorProvider2 :  ExpressiveAnnotationsModelValidatorProvider
{
    public ExpressiveAnnotationsModelValidatorProvider2()
    {
        RegisterAdapter(typeof(AssertThat2Attribute), typeof(AssertThat2Validator));
        ...
    }
}

Just for info. Code works before, but after new version I can not use translation message any more. Now is always in english. Why? What has changed?

@senzacionale: I haven't noticed that, could you show any reproducible example?

ErrorMessage code:
private const string _defaultErrorMessage = "The {0} field is required by the following logic: {1}";
public override IEnumerable GetClientValidationRules()
{
var rule = GetBasicRule("requiredif");
rule.ValidationParameters.Add("allowempty", AllowEmpty.ToJson());
yield return rule;
}
rule.ErrorMessage is "The SchoolName field is required by the following logic: IsCustomerInputRequired == true"
but in UI I get back
The SchoolName field is required.
I checked jquery.validate.unobtrusive.js file
function setValidationValues(options, ruleName, value)  method has this message and not message from ExpressiveAnnotations

Thank you for reply. I copy code in github
regards,
Mitja
2015-12-10 22:19 GMT+01:00 Jarosław Waliszko<EMAIL_ADDRESS>
@senzacionale https://github.com/senzacionale: I haven't noticed that,
could you show any reproducible example?
—
Reply to this email directly or view it on GitHub
https://github.com/jwaliszko/ExpressiveAnnotations/issues/70#issuecomment-163752300
.

--
L.P.
Mitja Bombač

@senzacionale: I don't understand what has happened. I need more comprehensive explanation what is wrong, ideally tiny project where it can be reproduced. What's more - I've just pushed a commit: https://github.com/jwaliszko/ExpressiveAnnotations/commit/b7127e44b86ad450af8dec3a711c98ff00dc0c73 where I've shown how to override default messages globally (if it is the problem you're talking about), and it seems to be working as expected.

I will try to prepare small project if I can reproduce it there, Only probme is that jquery validation message is not the same for "RequiredIf". Problem is only with jquery error message. So I don't know if is jquery and MVC5 or something else now.

@senzacionale: hi, any more update on this? Have you been able to reproduce it?

Hi, I got this error now when I try your solution:
Message=Either ErrorMessageString or ErrorMessageResourceName must be set,
but not both.
Source=System.ComponentModel.DataAnnotations
2015-12-14 13:09 GMT+01:00 Jarosław Waliszko<EMAIL_ADDRESS>
@senzacionale https://github.com/senzacionale: hi, any more update on
this? Have you been able to reproduce it?
—
Reply to this email directly or view it on GitHub
https://github.com/jwaliszko/ExpressiveAnnotations/issues/70#issuecomment-164421424
.

--
L.P.
Mitja Bombač

Just wanted to check in with a question about the override of the RequiredIfAttribute. Currently I use the following code as my custom RequiredIf attribute:
public class LocalizedRequiredIfAttribute : RequiredIfAttribute`
{
    private string taal;
    private string sectie;
    private string fieldName;

    [Inject]
    public IChannelFactory<IBLBgsServiceChannel> Factory { get; set; }

    public LocalizedRequiredIfAttribute(string dependentProperty, object targetValue, string sectie = null, [CallerMemberName] string fieldName = null)
        : base(dependentProperty, targetValue)
    {
        this.taal = Constants.StandaardLandcode;
        this.sectie = sectie ?? ResourceBO.DefaultSectie;
        this.fieldName = fieldName ?? "Veld";
        ErrorMessageResourceName = this.fieldName + "VerplichtOmdatAnderVeldTrueIs";
    }

    public override string FormatErrorMessage(string name)
    {
        return TaskHelper.RunSync(() => new ResourceBO(Factory).GetStringAsync(taal, sectie, ErrorMessageResourceName, name));
    }
}

How would I transfer this to the code you mentioned above (the AssertThat2Attribute)?

Both examples are shown here: CustomizedAssertThatAttribute and CustomizedRequiredIfAttribute.

Thanks.
Do I need to use the Resources type as you use in the example? I do not make use of .NET Resources (.resx files). So I'm not sure how to implement otherwise.
As you can see I get the resource from my BusinessLayer.

These are examples of possible modifications to default implementation. You are not forced to use the resources. As you can see here, error formatting function is called when validation fails. You can either override that method, do not use it, write your own, etc.
I believe your approach will work, at least to the extent you are going to use it - give it a try. Just a side note - be aware that when you decide to override mentioned error formatting method, you can loose the possibility of using {field} and {field:n} formatters (see [here])(https://github.com/jwaliszko/ExpressiveAnnotations#how-to-fetch-field-value-or-display-name-in-error-message) - but again, unless you provide that code.

OK, got it to work. Just having a problem with using the Priority.
If I use the approach with a custom ExpressiveAnnotationsModelValidatorProvider then I get this error:
Validation type names in unobtrusive client validation rules must be unique. The following validation type was seen more than once: required

This occurs when this code is executed:
sb.Append(InputExtensions.RadioButtonFor(htmlHelper, expression, value, routeValueDictionary));

Any idea why this is a problem?

It's MVC generated exception, saying that you cannot send to the client-side duplicated validation type names, i.e. rules with the same name. Your error is surprising for me, and related to MVC built-in required attribute, which is not even processed by EA. It's because, when you need to apply more than one attribute of the same type to a single field, EA takes care of that by diversifying the names - see logic responsible for that.
I assume, you haven't removed any existing validation providers prior to registering your own and there is a conflict. Probably you should disable existing provider - as shown few posts above, in Global.asax, try to invoke:
ModelValidatorProviders.Providers.Remove(
    ModelValidatorProviders.Providers.FirstOrDefault(x => x is DataAnnotationsModelValidatorProvider));

before:
ModelValidatorProviders.Providers.Add(new YourCustomModelValidatorProvider());

Hmm... strange. I actually did that:
// Add new ModelValidatorProvider (Expressive Annotation RequiredIf attribute)
        ModelValidatorProviders.Providers.Remove(ModelValidatorProviders.Providers.FirstOrDefault(x => x is DataAnnotationsModelValidatorProvider));
        ModelValidatorProviders.Providers.Add(new LocalizedExpressiveAnnotationsModelValidatorProvider());

Not sure. I do have some old validators that register Adapters inside there constructors:
DataAnnotationsModelValidatorProvider.RegisterAdapter(typeof(LocalizedRangeAttribute), typeof(RangeAttributeAdapter));

If some of them inherit at some point from System.Web.Mvc.DataAnnotationsModelValidatorProvider, it can be the reason. Move all of the other adapters registrations this single EA provider and it should be fine.

Well, this is not working out for me :(
I've add all Adapters to my custom class as you suggested, but no luck.
I can see that e.g. another attribute (LocalizedRequiredAttribute) is inheriting from:
public class LocalizedRequiredAttribute : System.ComponentModel.DataAnnotations.RequiredAttribute

Maybe that is a problem?
If I register my LocalizedExpressiveAnnotationsModelValidatorProvider inside the Application_Start I can see that there are allready 2 ModelValidator providers, but I don't think that is a problem though since they are not inheriting from DataAnnotationsModelValidatorProvider:

System.Web.Mvc.DataErrorInfoModelValidatorProvider
System.Web.Mvc.ClientDataTypeModelValidatorProvider

Out of ideas now.

These both left are OK. This leaves me out of ideas also. Probably I can help if I get a tiny zip archive from you. Remove everything, leave just most basic stuff, instead of resources return hardcoded strings, simplify view, simplify model etc. Expose the problem only.

If I use a new application and implement my own attribute with the registration as above, it works. When I add to RequiredIf attributes on the same property I get the same error with this test:
 public class TestModel
{
    public bool IsRequired { get; set; }

    [LocalizedRequiredIf("IsRequired == false")]
    [RequiredIf("IsRequired == false")]
    public string Name { get; set; }

}

I assumed that since my LocalizedRequiredIf inherits from the EA RequiredIf it should be no problem?

You should inherit from ExpressiveAttribute. You cannot inherit from RequiredIf unless you're using your custom build of EA. There is a sealed keyword, about which this entire topic is.

Ah yes! That is what I'm doing of course. :)
In my test case the LocalizedRequiredIf is inheriting from the ExpressiveAttribute and the RequiredIf attribute is the default one, from your package.
So, is it expected behavior that I get that error message by just using the EA attributes (one default and a custom one?) If I use two attributes of the same type, it isn't a problem.

Current implementation doesn't allow you to mix your custom implementation of RequiredIf\AssertThat attributes, with original ones - but only when applying to a single field. You need to decide which one you prefer;], Across multiple fields, such annotations can be mixed.
There are technical reasons behind that. Maybe it could be redesigned, but it's not that straightforward.
Why? Briefly - it's because your custom attributes are different types than original attributes, while they are registered under the same validation types names (rules names) for client-side (custom vs orig). At the client-side we have hardcoded 2 adapters - requiredif and assertthat, so these are the only names, under which your custom attributes can be registered and later matched. Because identical rules throws exception, suffix allocation logic tries to differentiate them. Lookup fails because types are different, rules stays unchanged (suffix not generated - check) and error is risen.

Using the ExpressiveAnnotationsModelValidatorProvider approach just doesn't work for me. I have other custom attributes that for sure exist ones, but are also generating the same error when using a custom ExpressiveAnnotationsModelValidatorProvider. Very weird...
Also, is this right?
protected override ValidationResult IsValidInternal(object value, ValidationContext validationContext)
    {
        var isEmpty = value is string && string.IsNullOrWhiteSpace((string) value);
        if (value == null || (isEmpty && !AllowEmptyStrings))
        {
            Compile(validationContext.ObjectType);
            if (CachedValidationFuncs[validationContext.ObjectType](validationContext.ObjectInstance)) // check if the requirement condition is satisfied
                return new ValidationResult( // requirement confirmed => notify
                    FormatErrorMessage(validationContext.DisplayName, Expression, validationContext.ObjectInstance),
                    new[] {validationContext.MemberName});
        }

        return ValidationResult.Success;
    }

This isn't validating empty strings or the expression? The CachedValidationFuncs is working as I would expect.
I've included a test project.
ValidationTest.zip

If I change my code like this, it seems to work:
private static void ConfigureDataAnnotations()
    {
        // Do not enable default data annotations
        DataAnnotationsModelValidatorProvider.AddImplicitRequiredAttributeForValueTypes = false;

        // Register the LocalizedRangeAttribute
        DataAnnotationsModelValidatorProvider.RegisterAdapter(typeof(LocalizedRangeAttribute), typeof(RangeAttributeAdapter));

        // Register the LocalizedRequiredAttribute
        DataAnnotationsModelValidatorProvider.RegisterAdapter(typeof(LocalizedRequiredAttribute), typeof(RequiredAttributeAdapter));

        // Register the LocalizedStringLengthAttribute
        DataAnnotationsModelValidatorProvider.RegisterAdapter(typeof(LocalizedStringLengthAttribute), typeof(StringLengthAttributeAdapter));

        // Register the LocalizedRequiredIfAttribute
        DataAnnotationsModelValidatorProvider.RegisterAdapter(typeof(LocalizedRequiredIfAttribute), typeof(LocalizedRequiredIfValidator));
    }

Whenever I create a new ExpressiveAnnotationsModelValidatorProvider or even a DataAnnotationsModelValidatorProvider then all my existing custom Validation Attributes are not working anymore. Seems that they occur more than once at the moment I use the custom provider(s).
That's pitty, since I now can't make use of the Priority.

If I use only server-side validation I can get it to work with the above solution. When I also 'enable' the unobtrusive clientside validation, the error message is the one from the constructor:
public LocalizedRequiredIfAttribute(string expression, string sectie = null, string suffix = null, [CallerMemberName] string fieldName = null)
        : base(expression, "Errormessage")
    {
        _taal = Constants.StandaardLandcode;
        _sectie = sectie;
        _fieldName = fieldName ?? "Veld";
        _suffix = "_" + suffix;

        AllowEmptyStrings = false;
    }

Where I would love to see the same one has I get with server side validation:
/// <summary>
    /// Format the error message
    /// </summary>
    /// <param name="name"></param>
    /// <returns></returns>
    public override string FormatErrorMessage(string name)
    {
        return TaskHelper.RunSync(() => new ResourceBO(Factory).GetStringWithExpressionsAsync(
            _taal,
            _sectie,
            string.Concat(_fieldName, _suffix),
            Expression,
            name));
    }

    /// <summary>
    /// Check if the value is valid
    /// </summary>
    /// <param name="value"></param>
    /// <param name="validationContext"></param>
    /// <returns></returns>
    protected override ValidationResult IsValidInternal(object value, ValidationContext validationContext)
    {
        var isEmpty = value is string && string.IsNullOrWhiteSpace((string)value);
        if (value == null || (isEmpty && !AllowEmptyStrings))
        {
            Compile(validationContext.ObjectType);

            // Check if the requirement condition is satisfied
            if (CachedValidationFuncs[validationContext.ObjectType](validationContext.ObjectInstance))

                // Set errormessage
                ErrorMessage = FormatErrorMessage(validationContext.DisplayName);

                // Requirement confirmed => notify
                return new ValidationResult(ErrorMessage, new[] { validationContext.MemberName });
        }

        return ValidationResult.Success;
    }

Is this possible?

I've pushed a commit which should simplify that: https://github.com/jwaliszko/ExpressiveAnnotations/commit/9721b5a29d28dc7feaa0e08a34d318659c716148. Take a look at the custom attributes implementations in web sample.
Your sample is fixed as well, but GitHub doesn't allow me to attach it here, they have some bug right now. I'll attach it when it will be fixed.

Ah... that is a really great addition! Thanks for that.
I'm going to test this in the following days.

Fixed sample: ValidationTest_FIX.zip. I've added comments after ToDo-fix: prefix. I've also attached DLLs, which are compiled with the https://github.com/jwaliszko/ExpressiveAnnotations/commit/9721b5a29d28dc7feaa0e08a34d318659c716148 changeset (to be shipped with next release).

Thank you for the project. Very helpful information!
I think I've got it working except for the client side validation that gives me the error of duplicate rules.
The strange thing is that there error also occurs for validators other than the RequiredIf validator.
As if the DataAnnotations are added twice, but I did removed them first.
Anyway, thanks for the help!

I believe that the error mentioned above, related to duplicated client validation rules, should be fixed now (as reported here: https://github.com/jwaliszko/ExpressiveAnnotations/issues/113).


Fix a bug when resetting lists or maps (#1)

This pull request warns the user about the issue described in #98 and fixes the issue when using EmpireListProperty or EmpireMapProperty.
We didn't want to introduce a breaking change, so we opted for the following:

Added a field called "isPrimitiveType" to EmpireProperty which defaults to false.
Added a new interface called EmpireCloneable which provides a clone() method, intended to allow the user to provide their own means of deeply copying the empire property value.
In the default implementation of reset, if the value implements EmpireCloneable, call the clone() to copy the original value rather than copying by reference.
In the default implementation of reset, if the value isPrimitiveType is false, maintain the original method of resetting (which still works fine for any immutable value like an int, but show a warning to the user about the bug.
In the default implementation of reset, if the value isPrimitiveType is true, simply copy the value and don't show the warning
Update the implementations of the immutable EmpireProperty derivatives (EmpireIntPropert, etc) to set isPrimitiveType to true so the warning is suppressed.
Override the implementation of reset in EmpireListProperty and EmpireMapProperty so that new lists/maps are created instead of copying by reference.
Updated the documentation for reset to describe the behavior when T is mutable.

As a result of this change, anyone using the EmpireProperty derivatives should see the bug go away, and should not see the warning.  Anyone using EmpireProperty will see the warning and have enough info in the method documentation to avoid it or suppress the warning.
We've also added tests for some of the EmpireProperty derivatives to confirm the behavior, then fix it.

This PR should close #98


TakePhoto problem

Hello,
My target framework is set to 7.1.  When I test on android OS version 7, taking multiple pictures works just fine.  However when I test on android OS 5.1 on a Nexus 4, I can only take one picture.  On the next attempt it throws an error.  However when I close the page, and come back into it, then take a picture it works again. On the second attempt it fails on TakePhotoAsync. Below is my code:
internal async Task TakeProfilePicture()
        {
#if __ANDROID__
            var status = await CrossPermissions.Current.CheckPermissionStatusAsync(Permission.Camera);
            if (status != PermissionStatus.Granted)
                status = (await CrossPermissions.Current.RequestPermissionsAsync(Permission.Camera))[Permission.Camera];

            if (status != PermissionStatus.Granted || !CrossMedia.Current.IsCameraAvailable || !CrossMedia.Current.IsTakePhotoSupported)
            {
                Util.DisplayAlert("No Camera", ":( No camera available.", "OK");
                return;
            }
#endif

            await CrossMedia.Current.Initialize();

            if (!CrossMedia.Current.IsCameraAvailable || !CrossMedia.Current.IsTakePhotoSupported)
            {
                Util.DisplayAlert("No Camera", ":( No camera available.", "OK");
                return;
            }

            //using (UserDialogs.Instance.Loading())
            //{
            try
            {
                DependencyService.Get<IFileHelper>().ClearDirectoryForFormImages();

                var file = await CrossMedia.Current.TakePhotoAsync(new Plugin.Media.Abstractions.StoreCameraMediaOptions
                {
                    Directory = Util.TempImagesDirectoryName,
                    Name = Util.TempImagesFileName
                });

                if (file != null)
                {
                    using (file.GetStream())
                    {
                        byte[] ba = ImageResizer.ResizeImage(Util.StreamToByteArray(file.GetStream()), 400, 400);
                        profilePicture = ImageSource.FromStream(() => new MemoryStream(ba));
                        profilePictureBA = Convert.ToBase64String(ba);
                    }
                }
            }
            catch (Exception ex)
            {
                Util.DisplayAlert("Error", "Error processing image.  Please try again.", "Ok");
            }
        }

What is the error?

Closing as need more info.


Line history wanted

Is there any change that we can show line history by right-click the current line? Or make it a hint on current cursor position?
I guess it would be a popular feature if added.

Hi I have considered doing something like this but haven't settled on a design for it so I'm open to ideas.
How would you expect it to work/look?

Not quite sure, but have you tried the gitlens plugin in vscode? Those blaming hits are useful but not disturbing.

Yeah I have used this, it's great but probably beyond the scope of this plugin. I'll have a think to see if there's any lightweight quality of life features I can add regarding this.


Support for SW5e

I've submitted the update to module.json (I think).  This is essentially D&D5e, but for Star Wars.

I've submitted the update to module.json (I think). This is essentially D&D5e, but for Star Wars.

where could i get information about the system? My preferred form of communication is discord.

I don't know which channel(s) to find you on, or your username.
Assuming you mean the system for foundry can be found here: https://github.com/unrealkakeman89/sw5e
The rules for the system live here: https://sw5e.com/

As this is an unlisted system, it is outside the scope of direct support.
However, we will accept an PR containing the changes needed to support this system.


Libs history

Move libs over from eve. Includes yetus and updated README

Note that the DCO is because of very old commits that do not have signatures. It will need to be ignored.

@deitch shouldn't we also have a GH workflow (or two) to build and run unittest basically running go build and go test in the subdirs?

Yeah, I can do that. No real "build", as none of these has a target binary, but close enough.

Added, the repo needs to be updated in "Settings" to take advantage of it.

Can you check and add that one? Or do you want to do a separate PR with it?

Nah, let's get this right. I will redo this one with the latest commit from here.

OK, strange that this was closed, and will not let me reopen it. I will start a new PR.

Ah, it will let me now. Reopening.

Replaced with #2


Use UnsignedLong in all Settlement interfaces

Also, check Preconditions in RedisBalanceTracker because it only support signed-long numbers.

Java8's Long can parse unsigned longs, and Guava offers a utility class for this, however, we're going to leave the interface as long in the interface, Javadoc that the number is unsigned, but then allow implementations to override this behavior (e.g., RedisBalanceTracker which only supports signed-longs due to Redis).

Closed via #266


Fix attribute errors

@hardbyte, something appears to have changed meaning the dot notation doesn't work for dicts in recent versions of HA. Fixes #36

I don't think this fix should be required, perhaps it was with an older version of python-evnex?
I just tried with the latest homeassistant docker image and main worked for me.

I don't think this fix should be required, perhaps it was with an older version of python-evnex?
I just tried with the latest homeassistant docker image and main worked for me.

I can't use evnex >=0.4 due to a pip dependency conflict. My HA pydantic is still on 1.10.15 in docker HA 2024.6.2 and I'm getting still getting the attribute error. Is it likely the two are related?

@hardbyte, looks like it is pydantic version related as forcing pydantic version to be >=2 gets rid of attribute error. Only problem is a number of other integrations are not yet supporting V2...

Yeah its not an ideal situation at all. If you like you could branch off the last working 0.4.x version and create a new release that targets the older pydantic.

Thanks, my HA install is now sorted. Hopefully the HA devs migrate to v2 soon.

Yes the charger is back online BUT I no longer can control the maximum current. I use this to charge the battery at the lowest possible amps.
Therefore this solution isn't for me.
I am going back to 2024.5

Thanks, my HA install is now sorted. Hopefully the HA devs migrate to v2 soon.

@sydney2711 @drc38  Interim fix: https://github.com/hardbyte/ha-evnex/issues/36#issuecomment-2544656736


Default host of <IP_ADDRESS> fixes #556

This change should remove the need to specify the hostname to listen on <IP_ADDRESS> in order to allow connections from outside a docker network.  See Issue #556 for more information.

Thanks @GarethOates for contributing this PR! Unfortunately, this isn't quite the solution to #556 (which isn't an issue per se, but rather changed/unexpected behavior that broke some things).
Per the discussion on https://github.com/trufflesuite/ganache-cli/pull/529, we decided to change the default to <IP_ADDRESS> as it is a minor security issue.
I'm going to close this PR and open a new one with a more appropriate solution (modifying the docker file)


refactoring "extract method" creates parameter for named arguments with const values

  _writeFile(io.File elementHtmlFile, bool recursive, String tagName) {
    if (!elementHtmlFile.existsSync()) {
      elementHtmlFile.createSync(recursive: true);
      elementHtmlFile.writeAsStringSync(_elementHtmlContent(tagName, '', ''));
    }
  }

bool recursive is redundant.

Works for me in Dart Editor.

Are you using IDEA?
IIRC its refactoring implementation has this bug.

Shouldn't WebStorm 11 EAP already use the analyzer for this?

In current WebStorm 11 EAP server driven 'extract method' is disabled. Will be enabled in the next EAP later this week.


profile list performance

After fixing list command performance in #63 and #92, the Python vs Go client speed advantage is back to normal.
However, whlist for smaller outputs Go can be 5x faster than Python:
$ hyperfine --warmup 5 'reana-client list --size 20' './reana-client-go list --size 20'
Benchmark 1: reana-client list --size 20
  Time (mean ± σ):     628.7 ms ±   9.5 ms    [User: 464.2 ms, System: 42.7 ms]
  Range (min … max):   617.9 ms … 643.6 ms    10 runs

Benchmark 2: ./reana-client-go list --size 20
  Time (mean ± σ):     133.3 ms ±  19.1 ms    [User: 6.0 ms, System: 6.4 ms]
  Range (min … max):   118.8 ms … 190.7 ms    23 runs

Summary
  './reana-client-go list --size 20' ran
    4.72 ± 0.68 times faster than 'reana-client list --size 20'

for larger outputs the difference can be less than 2x faster only:
$ ./reana-client-go list | wc -l
824
$ hyperfine --warmup 5 'reana-client list' './reana-client-go list'
Benchmark 1: reana-client list
  Time (mean ± σ):      1.254 s ±  0.030 s    [User: 0.528 s, System: 0.055 s]
  Range (min … max):    1.199 s …  1.287 s    10 runs

Benchmark 2: ./reana-client-go list
  Time (mean ± σ):     691.5 ms ±  47.1 ms    [User: 20.6 ms, System: 12.1 ms]
  Range (min … max):   639.8 ms … 781.6 ms    10 runs

Summary
  './reana-client-go list' ran
    1.81 ± 0.13 times faster than 'reana-client list'

This is perhaps simply due to longer REST API response transfer times, but perhaps we should profile where the most time is spent in the Go client when handling when the list output, and see whether we could improve anything here.
BTW we may perhaps take this occasion to revive the idea of introducing a --profile option to commands like list in order make these measurements easily doable and also repeatable in the future.

With https://github.com/reanahub/reana-client-go/pull/124 we introduced a generic profiler to all cli commands. It produces a profiling data file which could be analyzed with pprof. To install it do: go get -u github.com/google/pprof. Usage example:
go build
./reana-client-go list --profile=cpu
go tool pprof -text profile-cpu.pprof

Here is the output for ~1200 workflows:
reana ❯ go tool pprof -text profile-cpu.pprof
File: reana-client-go
Type: cpu
Time: Sep 16, 2022 at 1:57pm (CEST)
Duration: 2.09s, Total samples = 20ms ( 0.96%)
Showing nodes accounting for 20ms, 100% of 20ms total
      flat  flat%   sum%        cum   cum%
      10ms 50.00% 50.00%       10ms 50.00%  encoding/json.(*decodeState).object
      10ms 50.00%   100%       10ms 50.00%  runtime.nanotime (inline)
         0     0%   100%       10ms 50.00%  encoding/json.(*Decoder).Decode
         0     0%   100%       10ms 50.00%  encoding/json.(*decodeState).array
         0     0%   100%       10ms 50.00%  encoding/json.(*decodeState).unmarshal
         0     0%   100%       10ms 50.00%  encoding/json.(*decodeState).value
         0     0%   100%       10ms 50.00%  github.com/go-openapi/runtime.ConsumerFunc.Consume
         0     0%   100%       10ms 50.00%  github.com/go-openapi/runtime.JSONConsumer.func1
         0     0%   100%       10ms 50.00%  github.com/go-openapi/runtime/client.(*Runtime).Submit
         0     0%   100%       10ms 50.00%  github.com/spf13/cobra.(*Command).Execute (inline)
         0     0%   100%       10ms 50.00%  github.com/spf13/cobra.(*Command).ExecuteC
         0     0%   100%       10ms 50.00%  github.com/spf13/cobra.(*Command).execute
         0     0%   100%       10ms 50.00%  main.main
         0     0%   100%       10ms 50.00%  reanahub/reana-client-go/client/operations.(*Client).GetWorkflows
         0     0%   100%       10ms 50.00%  reanahub/reana-client-go/client/operations.(*GetWorkflowsOK).readResponse
         0     0%   100%       10ms 50.00%  reanahub/reana-client-go/client/operations.(*GetWorkflowsReader).ReadResponse
         0     0%   100%       10ms 50.00%  reanahub/reana-client-go/cmd.(*listOptions).run
         0     0%   100%       10ms 50.00%  reanahub/reana-client-go/cmd.newListCmd.func1
         0     0%   100%       10ms 50.00%  runtime.bgscavenge
         0     0%   100%       10ms 50.00%  runtime.main

According to the docs: cpu: CPU profile determines where a program spends its time while actively consuming CPU cycles (as opposed to while sleeping or waiting for I/O) It means that the data fetching time is ignored here and only active internal computing is measured.
Alternative approach for catching potential bottlenecks in the code could be to use Nitro package. It's very minimalistic and simple tool to measure the time between predefined steps. The steps could be each function call or similar. Example output for the list command:
parseListFilters:
        8.467µs (949.704µs)         0.00 MB     6 Allocs
GetWorkflows - fetch data:
        1.773689464s (1.774687281s)         3.14 MB     17492 Allocs
buildListHeader:
        1.697µs (1.774720766s)      0.00 MB     2 Allocs
ParseFormatParameters:
        250ns (1.774742914s)        0.00 MB     0 Allocs
displayListPayload:
        19.271453ms (1.794043638s)          4.35 MB     63112 Allocs

As you can see the majority of time is spent while fetching the data (1.774 sec spent while fetching data out of 1.794 sec total with display). It means that only 0.02 sec was spent in internal computing. This matches the results with the previous profiler where the total active cpu time was also 20ms.


Bugzilla: System.FormatException in AppDelegate.cs:87

Mike Cherry [reporter] 2015-04-21 14:30:30 UTC
Running a freshly compiled version from the current git repository as of April 21st, 2015
Application was crashing and Console was showing:
4/21/15 09:01:58.208 com.apple.xpc.launchd[1]: (org.gnome.Tomboy.118460[80050]) Service exited with abnormal code: 1

This happens at line 87 in AppDelegate.cs:
NoteEngine = new Engine (noteStorage);

The issue occurred while trying to load 500+ GNote files from an old set of notes on a linux box. I was able to track it down to the following xml fields being blank in 19 of the .note files:
<create-date></create-date>
<last-change-date></last-change-date>
<last-metadata-change-date></last-metadata-change-date>

After some shell trickery to give them all the same date value (I used the value "2009-06-30T19:44:30.000000Z" from one of the working notes) everything works as expected.
Suggested fixes/improvements:

Check for blank values in create-date, last-change-date, and last-metadata-change-date
Use file creation date or other generated date to insure values are no longer blank

https://bugzilla.gnome.org/show_bug.cgi?id=748250

I will look in to the issue this week, hopefully the fix should be pretty straight forward. @trepidity - I also fixed some stability bugs, please try out the new version and see if you are able to crash the application ;)


[Feature] Why not completely remove fastjson 1.x.x?

Is Your Feature Request Related to a Problem?
org.apache.rocketmq:rocketmq-common:5.3.0
-- com.alibaba:fastjson:1.2.83
-- com.alibaba.fastjson2:fastjson2:2.0.51
why not completely remove fastjson 1.2.83，and lower versions cannot be exclusion
Describe the Solution You'd Like
completely remove fastjson 1.2.83
Describe Alternatives You've Considered
make the serialization method plugin like and load it by checking if the class exists
Additional Context
No response

you can see https://github.com/apache/rocketmq/pull/6583#issuecomment-1505108339

The unit test only covers a very small part of the usage, aka, having namesrv generate valid JSON when answering route of topic query.

Actually, there are a few places, for example, storing consume-offset where incompatible JSON is used since key of the entry is not string. Prior blocking issues have to be fixed first.


Added a .torrent file for weights

Please verify that checksums in the torrent file match before merging this.

I think, it is bad idea. This has no place in the official documentation

Adding a torrent file for this is a good idea...
But...   this particular torrent file is odd in some way - it doesn't seem to work with deluge (popular torrent client), and also the magnet link seems dead.
Perhaps recreate without the padding and other special options?


kubectl get --ignore-not-found behavior unclear

What happened:
kubectl get exit code does not match what the --help description says will happen.
kubectl get -h
...
    --ignore-not-found=false:
	If the requested object does not exist the command will return exit code 0.

$ kubectl get pod --ignore-not-found=true ; echo "==>exit code=$?"
==>exit code=0

$ kubectl get pod --ignore-not-found=false ; echo "==>exit code=$?"
No resources found in default namespace.
==>exit code=0

$ kubectl get pod -l foo=bar --ignore-not-found=true ; echo "==>exit code=$?"
==>exit code=0

$ kubectl get pod -l foo=bar --ignore-not-found=false ; echo "==>exit code=$?"
No resources found in default namespace.
==>exit code=0

$ kubectl get pod foo --ignore-not-found=true ; echo "==>exit code=$?"
==>exit code=0

$ kubectl get pod foo --ignore-not-found=false ; echo "==>exit code=$?"
Error from server (NotFound): pods "foo" not found
==>exit code=1

What you expected to happen:
The requested object does not exist (there are no pods). And yet, --ignore-not-found=false still results in an exit code of 0. Although --ignore-not-found does change the stdout behavior (error messages are printed out or not), the exit code doesn't match expectations of the documentation regarding the exit code.
How to reproduce it (as minimally and precisely as possible):
See above. Just don't have any pods in the default namespace.
Environment:
kubectl version v1.29.1

To clarify, you are saying these two cases have the wrong exit code?
$ kubectl get pod --ignore-not-found=false ; echo "==>exit code=$?"
No resources found in default namespace.
==>exit code=0

$ kubectl get pod -l foo=bar --ignore-not-found=false ; echo "==>exit code=$?"
No resources found in default namespace.
==>exit code=0

And that they should have exit code 1 like this one?
$ kubectl get pod foo --ignore-not-found=false ; echo "==>exit code=$?"
Error from server (NotFound): pods "foo" not found
==>exit code=1

I think what is happening, is in case 1 and 2, you are not requesting a specific pod, so there is no NotFound error that occurs.
You can see what I mean if you use -v7 to look at the logs.  Here you can see the HTTP response is 200 OK:
 kubectl get pod -v7
I0503 16:34:23.156766   50407 loader.go:395] Config loaded from file:  /home/brian/.kube/config
I0503 16:34:23.162638   50407 round_trippers.go:463] GET https://k8s-master:6443/api/v1/namespaces/default/pods?limit=500
I0503 16:34:23.162662   50407 round_trippers.go:469] Request Headers:
I0503 16:34:23.162678   50407 round_trippers.go:473]     User-Agent: kubectl/v1.28.0 (linux/amd64) kubernetes/10a1216
I0503 16:34:23.162690   50407 round_trippers.go:473]     Accept: application/json;as=Table;v=v1;g=meta.k8s.io,application/json;as=Table;v=v1beta1;g=meta.k8s.io,application/json
I0503 16:34:23.213080   50407 round_trippers.go:574] Response Status: 200 OK in 50 milliseconds
No resources found in default namespace.

vs requesting a specific pod, where you can see the HTTP response is 404 NotFound:
$ kubectl get pod foo -v7
I0503 16:35:05.554206   50521 loader.go:395] Config loaded from file:  /home/brian/.kube/config
I0503 16:35:05.558568   50521 round_trippers.go:463] GET https://k8s-master:6443/api/v1/namespaces/default/pods/foo
I0503 16:35:05.558588   50521 round_trippers.go:469] Request Headers:
I0503 16:35:05.558603   50521 round_trippers.go:473]     User-Agent: kubectl/v1.28.0 (linux/amd64) kubernetes/10a1216
I0503 16:35:05.558614   50521 round_trippers.go:473]     Accept: application/json;as=Table;v=v1;g=meta.k8s.io,application/json;as=Table;v=v1beta1;g=meta.k8s.io,application/json
I0503 16:35:05.607220   50521 round_trippers.go:574] Response Status: 404 Not Found in 48 milliseconds
I0503 16:35:05.607768   50521 helpers.go:246] server response object: [{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "pods \"foo\" not found",
  "reason": "NotFound",
  "details": {
    "name": "foo",
    "kind": "pods"
  },
  "code": 404
}]
Error from server (NotFound): pods "foo" not found

So in case 1 and 2, the command is successfully returning an empty result, and in example 3, the command is failing because it could not find the specific pod you have specified.
I think that explains the behavior you are seeing. Whether it is the correct behavior I suppose is open for discussion.
The help text from the flag does imply that it only applies when you request a specific object, but maybe it isn't clear enough.
   --ignore-not-found=false:
	If the requested object does not exist the command will return exit code 0.

I guess we could print a warning if you use --ignore-not-found without requesting a specific object, saying that it has no effect.

Incidentally, I do think there is a related bug, when you use --ignore-not-found with --watch:
$ kubectl get pod foo --watch --ignore-not-found
Error from server (NotFound): pods "foo" not found
$ echo $?
1

In this case, I think the exit code should be 0.

Right. When reading that help text where it says "the requested object" - I assume "the requested object" means whatever I'm asking to get. And I am requesting an object when I use --selector or just a empty get (now, granted, I could be requesting multiple objects (plural) - but I really don't know what I have - that's why I'm getting them :)

The help text from the flag does imply that it only applies when you request a specific object, but maybe it isn't clear enough.

Yes. I think at minimum this is a problem that can easily be corrected - just make the help text more clear. It seems to me reading that help text that the exit code should be non-zero if the requested object (or objects, again I don't know how many there are) does not exist.

I guess kubectl could print a warning if you use --ignore-not-found without requesting a specific object, saying that it has no effect.

If that is the correct expected behavior, that would help also.
But, frankly, I think the behavior should change, too. If I ask to get resources, and I get nothing back, exit code should be 0 if --ignore-not-found=true and exit code should be 1 if --ignore-not-found=false. Saying "false" implies "do NOT ignore this if nothing is found - tell me with exit code 1".

I think, this KEP https://github.com/kubernetes/enhancements/issues/2551 will propose a standartization with respect to exit code and will fix this.

I'm not sure there's a bug here.
Fetching a collection of Pods (ie, when not specifying a particular Pod name) returns a collection. The collection has no Pods in it, but the list has succeeded and a collection is returned.
As an enhancement, we might provide a way to get a failure exit when you fetch a collection and it's empty.
IMO this is actually either a support request or a feature. Maybe we could improve the built-in help to explain the current behavior better.

Maybe we could improve the built-in help to explain the current behavior better.

Yes, that was suggested earlier and what I thought is fine to do in order to help address the confusion.
> The help text from the flag does imply that it only applies when you request a specific object, but maybe it isn't clear enough.

Yes. I think at minimum this is a problem that can easily be corrected - just make the help text more clear. It seems to me
reading that help text that the exit code should be non-zero if the requested object (or objects, again I don't know how
many there are) does not exist.


App: fix style of decision proposal with long descriptions

https://github.com/1Hive/honey-pot/pull/630


Missing 'Theme' export in NPM install option

Hi, love this css thank you for the port.
Implementing in a fresh 17.7 project looks like the 'Theme' function is missing.

app.js

console

../deps/primer_live/priv/static/primer-live.esm.js

The Theme hook is removed in 0.4.0 because that solution did not work for persisting the selected theme. Unfortunately I did not update all of the documentation.
theme/theme.ex includes the deprecation note:
Session for theme state has been removed
Using the session to store the theme state (for example using a AJAX call roundtrip) does not work as expected: when navigating to another LiveView page, the updated session data is not refetched and only becomes available after a page refresh. This means that the previous offered solution with PrimerLive.ThemeSessionController is no longer recommended and in fact removed.
Alternatives: database or cache
If you already have a database set up for storing data by session ID, it's a small step to integrate the theme state with it.

Database Session Store with Elixir and Plug (2021)

On the other hand, for a lightweight solution you may find caching simpler to start with. For example Cachex (which I've selected for primer-live.org).

Cachex with Phoenix (2020)
Use caching to speed up data loading in Phoenix LiveView

Handling user selection
Assuming you are providing a theme menu on the website, the option the user selects must be stored in persistent storage.
Here we're setting event callback "store_theme" in the theme menu:
# Some app component

<.action_menu>
  <:toggle class="btn btn-invisible">
    <.octicon name="sun-16" />
  </:toggle>
  <.theme_menu_options
    theme_state={@theme_state}
    update_theme_event="store_theme"
  />
</.action_menu>

The callback is invoked whenever a theme menu option is clicked. See attr update_theme_event for documentation of the arguments.
# App LiveView

def handle_event(
  "store_theme",
  %{"data" => data, "key" => key, "value" => _},
  socket
) do
  # Persist new theme state ...

  {:noreply, socket}
end


support search by fullname without space#67

http://personfindersandayo.appspot.com/global/home.html

LGTM. Please rerun tools/all_tests and merge the pull request if it all succeeds.

all_tests passed(∩´∀｀)∩ﾜｰｲ


Make profile_tasks variable thread local to prevent race condition.

The profile_tasksvariable is currently not thread local. This is in conflict with its use in drjit-core: There it is set within jitc_set_flags, which can be called from multiple threads. All the drjit-core flags are therefore thread local. This commit makes the profile_tasks variable thread local to be consistent with the way flags are handled in drjit-core.

Accessing TLS variables has a shockingly high cost on some OSes. I can look at this after getting back from vacation, but my gut feeling is that we don't want TLS reads in a perf-sensitive threading library.

I see, yes it's good to be cautious. We don't want to have a performance cost for this.
As you probably guessed, the reason I am fixing this is because our (latest) threading sanitizer caught the potential race condition in accessing this variable. I am always happy to push back fixes to the open source version, but only if they don't worsen the public code obviously :)


Feature/avif target size

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@a75bd07). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master      #22   +/-   ##
=========================================
  Coverage          ?   78.91%
=========================================
  Files             ?        5
  Lines             ?      370
  Branches          ?        0
=========================================
  Hits              ?      292
  Misses            ?       44
  Partials          ?       34

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 a75bd07...40fe1e9. Read the comment docs.


Implement efficient aggregation strategies

Description
As a staker, I want aggregations to be efficiently packed in blocks so that I can maximise my rewards.
Acceptance Criteria

Teku proposer rewards over time better or not significantly worse than other clients' rewards.

A simple idea for selecting higher priority MatchingDataAttestationGroup's would be to keep a Bitlist that holds the superset of all aggregation bits in each group.  We could then take this bitlist, unset any seenAggregationBits, and count the remaining set bits to get the number of unique validators in each group.   We could then prioritize groups with higher counts for unique validators.

Useful reference: https://lighthouse-blog.sigmaprime.io/optimising-attestation-packing.html

Closing as there is no evidence that Teku's current packing strategy is poor. Teku produces a disproportionate number of blocks for operators who use Vouch, suggesting that Teku's attestation packing is at least as good as others'.


variable is declared but never used with --noUnusedLocals and spread (React)

TypeScript Version:  2.3.1
Code
// hello.tsx
import * as React from 'react';
export class SelectInput extends React.Component<any,any> {
  render() {
    let cls = 'hello';
    return (<select {...this.props} className={cls}>{this.props.children}</select>);
  }
}

package.json:
{
  "dependencies": {
    "@types/react": "^15.0.24",
    "react": "^15.5.4",
    "typescript": "2.3.1"
  }
}

Expected behavior:
I expect the compiler to think that cls was used.
Actual behavior:
The compiler emits this error:
$ tsc --jsx react --noUnusedLocals hello.tsx
hello.tsx(5,9): error TS6133: 'cls' is declared but never used.

I should mention, I'm not sure if it's the same or different than:

https://github.com/Microsoft/TypeScript/issues/12766
https://github.com/Microsoft/TypeScript/issues/11324

Duplicate of https://github.com/Microsoft/TypeScript/issues/15478, should be fixed in TS 2.3.3.
The fix should be in typescript@next already, give it a try and let us know if you are still running into issues.


--dry-run should not run programs

--dry-run does cause bpftrace to exit, but only after its probes have fired thousands of times in this example:
# bpftrace --dry-run -e 't:sched:sched_switch { @ = count(); }' -d ast

AST after: parser
-------------------
Program
 tracepoint:sched:sched_switch
  =
   map: @
   call: count

[...]

AST after: ReturnPath
-------------------
Program
 tracepoint:sched:sched_switch
  =
   map: @ :: [count]
   call: count :: [count]

Attaching 1 probe...

@: 5396

This is a bit tricky b/c we want to actually attach the probes (to test that they can be attached and potentially see the logs if they cannot). But once a probe is attached, it starts firing (so bpftrace program is "running").
What we can do, though, is that we can minimize the time between attachment and termination so I crafted #3408 to address this. With the above script, I'm getting:
# bpftrace --dry-run -e 't:sched:sched_switch { @ = count(); }' -d ast
[...]
Attaching 1 probe...

@: 0

@viktormalik Do you think it would be easy to stop any script output (I'm looking at that empty map at the end)?

@jordalgo the output from probes should be suppressed already as we do not poll for perf events. It also makes sense to skip printing the map contents at the end, I crafted #3410 to do that. Thanks for the suggestion!


Unused duplicated methods in a Carousel.vue

eslint founds duplicates keys inside methods of Carousel. I don't know why prettier-eslint not.

Coverage increased (+6.7%) to 69.519% when pulling b09e6b7185cdcd3dc45b4bd955889b72894bf87d on tatyshev:duplicated-methods into cdf92d181caae0fa8a422c2c7331844a92522680 on SSENSE:master.

Hey @tatyshev, really good find.. not sure how this happened lol. I see that some of the duplicates have different functionality, I'll do some testing before I merge this just to make sure the correct method wasn't deleted.
Also, I'll investigate the eslint failure, definitely should have picked that up.
Thanks! :~)


chore(all): enable codecoverage

Opening a draft PR to test out functionality...

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@ddde9e1). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #528   +/-   ##
=======================================
  Coverage        ?   83.83%
=======================================
  Files           ?       88
  Lines           ?     2704
  Branches        ?        0
=======================================
  Hits            ?     2267
  Misses          ?      437
  Partials        ?        0


Chat completions crashes when asked for JSON response

Prerequisites
Please answer the following questions for yourself before submitting an issue.

[x] I am running the latest code. Development is very rapid so there are no tagged versions as of now.
[x] I carefully followed the README.md.
[x] I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
[x] I reviewed the Discussions, and have a new bug or useful enhancement to share.

Expected Behavior
Please provide a detailed written description of what you were trying to do, and what you expected llama-cpp-python to do.
Current Behavior
Using response_format={ "type": "json_object" } crashes
Environment and Context
I'm using:
from llama_cpp import Llama
llm = Llama("/Users/shakedz/local_models/Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf", n_ctx=4096, verbose=False)

Which were downloaded form here:
https://huggingface.co/lmstudio-community/Meta-Llama-3.1-8B-Instruct-GGUF/tree/main
This fails:
print(llm.create_chat_completion([{'role': 'user', 'content': 'What is the capital of France? Replay using a JSON: {"answer": "YOUR_ANSWER"}!'}], response_format={ "type": "json_object" }))

Due to:
libc++abi: terminating due to uncaught exception of type std::out_of_range: vector
[1]    25897 abort      /Users/shakedz/bitbucket/achilles/.venv/bin/python

But without the response_format:
print(llm.create_chat_completion([{'role': 'user', 'content': 'What is the capital of France? Replay using a JSON: {"answer": "YOUR_ANSWER"}!'}]))

It works:
{'id': 'chatcmpl-987cdac0-5398-44a7-b6ca-36c1121392dc', 'object': 'chat.completion', 'created':<PHONE_NUMBER>, 'model': '/Users/shakedz/local_models/Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf', 'choices': [{'index': 0, 'message': {'role': 'assistant', 'content': '{"answer": "Paris"}'}, 'logprobs': None, 'finish_reason': 'stop'}], 'usage': {'prompt_tokens': 56, 'completion_tokens': 6, 'total_tokens': 62}}

System

Apple M2 Max, 32 GB, Sonoma 14.5
Python 3.12.1
llama_cpp_python==0.2.85
installed using CMAKE_ARGS="-DGGML_METAL=on" pip install llama-cpp-python

Got the same issue, commented here... Apparently it worked once?

This was fixed by #1649 which will be part of v0.2.86.


Firewall type and certification

Hi
Can you please elaborate on the firewall type and whether it's been subject to certifications of any sort? E.g. is this layer 7 firewall as I would presume? or is this layer 4-7? Certifications?
Please be more specific, we want to understand the real protection we're getting from this firewall.
Thanks

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 5d6fa068-69da-7a32-6479-1145f14f2ed2
Version Independent ID: 952c3241-3f4c-b319-6457-02701b24d46d
Content: IP firewall for Azure Cosmos accounts
Content Source: articles/cosmos-db/firewall-support.md
Service: cosmos-db
GitHub Login: @kanshiG
Microsoft Alias: govindk

@sarah026 Thank you for your feedback! We will review and provide an update as appropriate.

@sarah026 This is being assigned to the content author to evaluate and update as appropriate.

Cosmos DB uses ACL list , for whitelisting the traffic. This is not full fledged Firewall in traditional sense. If you need more clarifications where we can discuss and understand - please reach out on<EMAIL_ADDRESS>

@sarah026 I hope you have taken this issue offline with Govind, if not please drop an email with your questions. We will close the issue here and offer further support via email.
#please-close


Update links on the generics page to handbook v2

This pull request updates links on the generics page to point to the new v2 handbook page.

Thank you!


Make ${PREFIX}/bin/nvcc a symlink so that CMake can use the compiler

CMake scans the verbose output of the compiler and requires a root directory that contains bin, lib, and include.

Yeah the message is expected
The shell dying is not. Unclear why that is happening atm
However we are planning to rip out the activation scripts with this PR. So it may be moot

I was interested, so I built this package locally - installing the package and activating the environment without c-compiler / cxx-compiler present now does not emit the message, or kill the shell. NB: When I built the package it didn't pass the tests included in the recipe, but I installed the package anyway as I didn't think that would be relevant for testing whether the activate issue is fixed.
As an aside, I think it kills the shell because in this line:
https://github.com/conda-forge/cuda-nvcc-feedstock/blob/9a05379857ea9e4e86c4ee096f26f14608f21765/recipe/activate.sh#L3
the script is effectively being sourced, so it's running in the current shell from which conda activate was called, and therefore the exit 1 exits the shell. Even if this activate script ends up ultimately being removed, I'd guess the issue can be worked around by only printing the error message and skipping the subsequent exports rather than exiting.

Ah... we forget to bump the build number?

Maybe we can bump it in #3, and then mark all build number 0 as broken?

Placing the compiler in ${PREFIX}/bin breaks CMake CUDA support since it expects that the relative include and lib/lib64 to have the CUDA bits which they won't.

Why can't we make those symlinks? For eg: cuda-cudart-dev does for lib (and weirdly not for include)

Placing the compiler in ${PREFIX}/bin breaks CMake CUDA support since it expects that the relative include and lib/lib64 to have the CUDA bits which they won't.

Why can't we make those symlinks? For eg: cuda-cudart-dev does for lib (and weirdly not for include)

Are you asking why we can't symlink everything currently in ${PREFIX}/targets/<arch>/include into ${PREFIX}/include. CMake expects a single common include for the entire CUDA Toolkit and doing so if there are two major reasons that I am aware of:

Concern over the relative common names that nvcc/cudart headers use
That would mean the ask about having both cuda-cccl and the thrust package installed wouldn't be possible as they both would own the same files.

Can we fix CUDA? For cross-compilation case, the layout of ${CUDA_NVCC_PATH}/../include does not make sense.

Meant CMake, not CUDA. edited the comment above

Can we fix CMake? For cross-compilation case, the layout of ${CUDA_NVCC_PATH}/../include does not make sense.

The above layout ( both the include symlink and targets/<arch>/include ) work with CMake. Very crudely what is used is based on if you are cross compiling or not.

If you are not cross compiling the include symlink will be used.
If you are cross compiling the targets/<arch>/include is used.

For this to work we need a common root for bin, include, nvvm, and targets

Can we make CMake do,

If you are not cross compiling the include symlink will be used and fallback to targets//include if not there
If you are cross compiling the targets//include is used.

The other option is to ask nvcc for these values just like CMake does for gcc, clang, etc.

Can we make CMake do,

If you are not cross compiling the include symlink will be used and fallback to targets/<arch>/include if not there
If you are cross compiling the targets/<arch>/include is used.

The other option is to ask nvcc for these values just like CMake does for gcc, clang, etc.

In short I believe changing CMake to support a custom new layout is a non-starter. It would require anything that uses CMake + conda only work with this new version ( 3.28? ) and that should be the absolute last choice.
CMake supports both CUDA Toolkits with and without nvcc. When nvcc does exist we scrape the compiler output TOP for the root of the install and use that. We don't scrape for all the different include directories via #$ INCLUDES=, and while that could be done it would need some significant changes.

I agree that requiring a new version of cmake should be the last choice, but what other choice do we have? This PR fixes CMake + native compilation at the expense of cross compilation (with or without cmake).

I guess it's not particularly this PR that breaks stuff, this PR + #3 .

I am confused on why my proposal to move everything to the
${PREFIX}/cuda/ layout doesn't work
On Tue, May 2, 2023 at 7:48 PM Isuru Fernando @.***>
wrote:

I guess it's not particularly this PR that breaks stuff, this PR + #3
https://github.com/conda-forge/cuda-nvcc-feedstock/pull/3 .
—
Reply to this email directly, view it on GitHub
https://github.com/conda-forge/cuda-nvcc-feedstock/pull/4#issuecomment-1532287801,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABUVTH6MPKWHK7OXAKARELXEGMOBANCNFSM6AAAAAAXC7SC7M
.
You are receiving this because you authored the thread.Message ID:
@.***>

That would require all the other packages like cuda-cudart to also adopt that convention.

Moving everything to $PREFIX/cuda seems to be the easiest solution to our problems here, and aligns better with other CUDA installer layouts.
Started a draft PR in cudart so we can work out the details there https://github.com/conda-forge/cuda-cudart-feedstock/pull/6

I looked into this a bit more, and I don't think we need to move the layout. We just need to have a cuda-nvcc-tools package and the fact that bin/nvcc is a symlink to targets/linux-x86_64/bin/nvcc becomes just an implmentation detail that only cmake relies on. I was able to get cmake to do a cross compilation identification of nvcc by hacking on the environment without changing the layout.

I looked into this a bit more, and I don't think we need to move the layout. We just need to have a cuda-nvcc-tools package and the fact that bin/nvcc is a symlink to targets/linux-x86_64/bin/nvcc becomes just an implmentation detail that only cmake relies on. I was able to get cmake to do a cross compilation identification of nvcc by hacking on the environment without changing the layout.

Can you share what environment changes you needed?


add cardType forumUrl to community games

use forum url once next release is out and it is supported

let's hold on to this. we need to figure out what to do when users update their games down in the thread.

I think I'd lean towards just choosing the first project on the page like it currently is - that's easy to have them update for themselves (and lots of the posts have been updating the main post as they move along already). That way it won't get confused if they share another game or something in the comments, and it's better for the forum too (the first post will be more likely to be kept up to date, so anyone using the forum will have a better experience).
That said, we have to wait for the release for this anyways, so we should think on it

@pelikhan added the raptor run game, should be good to go

If there was tagging for the game then the forum post(s) can be referred from that maybe (using a query string for the forum api). Also, this gallery could get generated dynamically either from a json pick list or be generated randomly as a subset of available posts.

@pelikhan this should be good now, just tested salvo and it loaded the most up to date version properly.
(doesn't look like travis ran on the last two commits though for some reason?)

yup something seems off with the build