Provide Vavr randomizers

I recently discovered your library and it's quite useful, thank you!
That being said, we massively use Vavr (https://github.com/vavr-io/vavr) collections instead of JDK ones, because of their immutability and more functional features/APIs.
Of course Random Beans don't work OOTB with Vavr collections, we get this kind of exceptions:
io.github.benas.randombeans.api.ObjectGenerationException: Unable to generate a random instance of type class Foo
Caused by: io.github.benas.randombeans.api.ObjectGenerationException: Unable to create type: io.vavr.collection.List for field: strings of class: Foo
Caused by: io.github.benas.randombeans.api.ObjectGenerationException: Unable to create an instance of type: interface io.vavr.collection.List
Caused by: java.lang.InstantiationError: io.vavr.collection.List

I took a quick look at your code and documentation (in particular https://github.com/benas/random-beans/wiki/Supported-types) and came to the conclusion that it would be possible, at least by manually writing Randomizer classes in the same spirit as SetRandomizer, ListRandomizer, etc.
Would that make sense to add support for it?
Please note that most common Vavr collections (like List, Set, Map) provide factory methods to build from JDK List/Set/Map (e.g. io.vavr.collection.List.ofAll(java.lang.Iterable)).
I'm ok with helping (though I would let you the fun part of creating a new module etc. if you wish/accept to expose it as another Random Beans module) 😄.
Cheers

I cloned this repo and fiddled with the code to support at least a Vavr List type. I managed to make it work, but actually I had to touch inner code, I couldn't simply add a custom registry as I hoped to at first.
I modified io.github.benas.randombeans.FieldPopulator#generateRandomValue, created a new VavrPopulator (a copy of CollectionPopulator which builds a Vavr List type) and modified a few classes consequently.
Is this the right approach? If yes, how would you suggest we move on? Would you at least consider to be able to plug on the collection detection type? So that we can provide some kind of registry to handle Vavr types (which technically are not Collections, the only common ancestor they share with Collection is Iterable).
I appreciate any advice.
Cheers

Hi @Sir4ur0n
Thank you for this suggestion! I remember having the same suggestion for guava collections but I decided to not add support for it as it was moving very fast (I see they are at v27 now, at that time it was 14 IICR) and I was pretty sure I could not catch up.. Some people also wanted support for eclipse collections and now it's vavr's turn. It would be really awesome to add support for these third party libraries, but this also means a maintenance burden I simply could not support. I hope you understand this situation.
If you want to add support for vavr, please go ahead and do it in a repo of your own, I would be more than happy to help and add a reference to it on the home page of RB!
Now in regards to how I would implement this, the way to go IMO is to use a custom registry for vavr types.

I couldn't simply add a custom registry as I hoped to at first

What was the issue? Something like the following should be enough:
@Priority(-3) // more details on this here: https://github.com/benas/random-beans/wiki/Grouping-Randomizers
public class VavrRandomizerRegistry implements RandomizerRegistry {

    private final Map<Class<?>, Randomizer<?>> randomizers = new HashMap<>();

    @Override
    public void init(EnhancedRandomParameters parameters) {
        randomizers.put(io.vavr.collection.List.class, new ListRandomizer<>()); // todo implement a ListRandomizer for vavr's List type
        // register other randomizers for vavr types
    }

    @Override
    public Randomizer<?> getRandomizer(final Field field) {
        return getRandomizer(field.getType());
    }

    @Override
    public Randomizer<?> getRandomizer(Class<?> type) {
        return randomizers.get(type);
    }
}

Kr,
Mahmoud

Hi @benas
Thanks for your answer.
I perfectly understand you don't want to support other libraries like Vavr or Guava yourself (the maintenance burden would be high).
That being said, I don't see how to implement your solution with a registry. I guess in your example, VavrListRandomizer should implement Randomizer<io.vavr.collection.List<T>>, correct?
I don't see how this is possible, since I don't have any mean of creating a T.
public class VavrListRandomizer<T> implements Randomizer<List<T>> {

  @Override
  public List<T> getRandomValue() {
    // Impossible, generic type classes can't be captured
    return List(EnhancedRandom.random(T.class));
  }
}

Even if the above code was valid, it still wouldn't work, because of the use case where a Vavr List contains other Vavr structures:
import io.vavr.collection.List;
import io.vavr.collection.Set;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Wither
private static class Person {

  private int age;
  private List<String> names;
  private List<Set<Integer>> favoriteNumberSets;
}

By the way, the code I use to test my registry, is it correct?
EnhancedRandom er = aNewEnhancedRandomBuilder()
    .registerRandomizerRegistry(new VavrRandomizerRegistry()).build();
Person random = er.nextObject(Person.class);

As a reminder, Vavr collections don't extend java.util.Collection, so I can't extend CollectionRandomizer<T>.
For what it's worth, all Vavr collections extend java.lang.Iterable, so we could imagine Random Beans evolves to provide an IterableRandomizer<T>.
AFAICT collections have special support in Random Beans, they don't rely solely on registry (see CollectionPopulator).

Has anyone any idea on how to progress on this topic please? I'm really willing to help/contribute/provide a new library, but I need a pointer in the right direction (I could just fork this project but I think nobody would win in this scenario 😢 ).

Writing T.class won't work indeed. You need to either use a delegate randomizer (as with the CollectionRandomizer), something like:
public class VavrListRandomizer<T> implements Randomizer<List<T>> {

    private Randomizer<T> delegate;
    private int numberOfElements;

    public VavrListRandomizer(Randomizer<T> delegate, int numberOfElements) {
        this.delegate = delegate;
        this.numberOfElements = numberOfElements;
    }

    @Override
    public List<T> getRandomValue() {
        List<T> list = List.empty();
        for (int i = 0; i < numberOfElements; i++) {
            list = list.append(delegate.getRandomValue());
        }
        return list;
    }
}

or if you don't want to use a delegate, you can pass the type as parameter:
public class VavrListRandomizer<T> extends AbstractRandomizer<List<T>> {

    private Class<? extends T> type;

    public VavrListRandomizer(Class<? extends T> type) {
        this.type = type;
    }

    @Override
    public List<T> getRandomValue() {
        List<T> list = List.empty();
        int numberOfElements = random.nextInt();
        for (int i = 0; i < numberOfElements; i++) {
            list = list.append(EnhancedRandom.random(type));
        }
        return list;
    }
}

but in both cases, it will not be possible to use a registry as the type is erased at runtime. So probably my mistake to suggest a registry in the first place.
However, you can still use one of the above randomizers and register it for a field of type a vavr collection. For example:
class Person {
    List<String> nicknames; // io.vavr.collection.List
}

EnhancedRandom enhancedRandom = new EnhancedRandomBuilder()
                .randomize(FieldDefinitionBuilder.field().named("nicknames").ofType(List.class).inClass(Person.class).get(), new VavrListRandomizer<String>(String.class))
                .build();

Person person = enhancedRandom.nextObject(Person.class);

Does this help?

I guess this would work (haven't tried it) but I want a generic solution, because we have tens or hundreds of Java models (beans) which almost all use Vavr structures, so I don't want to write hundreds/thousands of lines with hardcoded field names (which is refactor-unfriendly).
I think random-beans could provide a generic way to plug on io.github.benas.randombeans.FieldPopulator#generateRandomValue (I know, easier said than done 😄 ): I managed to do what I need by creating a custom VavrPopulator, and adding this piece of code:
} else if (isCollectionType(fieldType)) {
  value = collectionPopulator.getRandomCollection(field, context);
} else if (io.vavr.collection.List.class.isAssignableFrom(fieldType)) {
  value = vavrPopulator.getRandomIterable(field, context);
}

inside this method.
However as said before, I'd rather not fork this project as much as possible, so I'm really hoping we can find a solution that fits everyone's needs 😄 @benas do you think this is feasible to add some plugging in the populator? Maybe something similar to the registry mechanism.
Example:
Each registry can provide a method that takes precedence in this method, and returns a Optional<Object> (or if you need further backward-compatibility, either return a non-null Object or null). If it's null then run the rest of your existing generateRandomValue method, otherwise return.
Dumb example:
private Object generateRandomValue(final Field field, final RandomizationContext context) {
  // customStuff would be similar to how registries work: anybody can register such a custom "thing", by accessing the Field and the RandomizationContext
  Object value = customStuff.generateRandomValue(field, context);
  if (value != null) {
    return value;
  }
  // Rest of the existing code
}

Let me know if it's impossible or too much hassle (in which case I'll fallback to forking 😞 ).
Thank you for your help!

Thanks for these additional details. I thought you had a couple of fields having vavr types, but if you tell me you have hundreds of them, then I fully understand why you need a generic solution. With that said, I can go back to using a registry 😄 This time by getting the generic field type at runtime and using the above VavrListRandomizer (the one without delegate). Here is how I was able to do it:
1. First the randomizer for a given vavr type (List here)
package io.github.benas.randombeans.vavr;

import io.github.benas.randombeans.api.EnhancedRandom;
import io.github.benas.randombeans.randomizers.AbstractRandomizer;
import io.vavr.collection.List;

public class VavrListRandomizer<T> extends AbstractRandomizer<List<T>> {

    private Class<? extends T> type;

    public VavrListRandomizer(Class<? extends T> type) {
        this.type = type;
    }

    @Override
    public List<T> getRandomValue() {
        List<T> list = List.empty();
        int numberOfElements = random.nextInt();
        for (int i = 0; i < numberOfElements; i++) {
            T random = EnhancedRandom.random(type);
            list = list.append(random);
        }
        return list;
    }
}

2. Then a registry that grabs the field type at runtime and returns the corresponding vavr randomizer configured with that type (similar code to CollectionPopulator)
package io.github.benas.randombeans.vavr;

import io.github.benas.randombeans.annotation.Priority;
import io.github.benas.randombeans.api.EnhancedRandomParameters;
import io.github.benas.randombeans.api.Randomizer;
import io.github.benas.randombeans.api.RandomizerRegistry;

import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

import static io.github.benas.randombeans.util.ReflectionUtils.isParameterizedType;

@Priority(-3) // more details on this here: https://github.com/benas/random-beans/wiki/Grouping-Randomizers
public class VavrRandomizerRegistry implements RandomizerRegistry {

    @Override
    public void init(EnhancedRandomParameters parameters) {
    }

    @Override
    public Randomizer<?> getRandomizer(final Field field) {
        Class<?> fieldType = field.getType();
        if (io.vavr.collection.List.class.isAssignableFrom(fieldType)) { // refactor this as needed and add support for other types
            Type fieldGenericType = field.getGenericType();
            if (isParameterizedType(fieldGenericType)) { // populate only parametrized types, raw types will be empty
                ParameterizedType parameterizedType = (ParameterizedType) fieldGenericType;
                Type type = parameterizedType.getActualTypeArguments()[0]; // todo sanity check. I'm also not sure if we need to go deep for things like List<Set<Integer>>
                return new VavrListRandomizer((Class<?>) type);
            }
        }
        return null;
    }

    @Override
    public Randomizer<?> getRandomizer(Class<?> type) {
        return null;
    }
}

3. And finally the example
class Person {
    List<String> nicknames;
    List<Integer> numbers;

    @Override
    public String toString() {
        return "Person{" +
                "nicknames=" + nicknames.asJava() +
                ",numbers=" + numbers.asJava() +
                '}';
    }

    public static void main(String[] args) {
        EnhancedRandom enhancedRandom = new EnhancedRandomBuilder()
                .registerRandomizerRegistry(new VavrRandomizerRegistry())
                .build();

        Person person = enhancedRandom.nextObject(Person.class);
        System.out.println("person = " + person);
    }
}

The sample correctly generates a person instance. So the registry works well with generic vavr types without having to register a randomizer for each field.
@Sir4ur0n What do you think?

I'm not on my computer to try, but I think this won't work if you have a
Person having a Vavr list of addresses and each address has a Vavr list of
tags (strings), because the random used to build each address is a new one,
not the one with the vavr randomizer registered, so it should fail when
building the vavr lost of addresses. Does that make sense?
Le mer. 12 déc. 2018 à 22:56, Mahmoud Ben Hassine<EMAIL_ADDRESS>a écrit :

Thanks for these additional details. I thought you had a couple of fields
having vavr types, but if you tell me you have hundreds of them, then I
fully understand why you need a generic solution. With that said, I can go
back to using a registry 😄 This time by getting the generic field type
at runtime and using the above VavrListRandomizer (the one without
delegate). Here is how I was able to do it:

First the randomizer for a given vavr type (List here)

package io.github.benas.randombeans.vavr;
import io.github.benas.randombeans.api.EnhancedRandom;
import io.github.benas.randombeans.randomizers.AbstractRandomizer;
import io.vavr.collection.List;
public class VavrListRandomizer extends AbstractRandomizer<List> {
private Class<? extends T> type;

public VavrListRandomizer(Class<? extends T> type) {

    this.type = type;

}

@Override

public List<T> getRandomValue() {

    List<T> list = List.empty();

    int numberOfElements = random.nextInt();

    for (int i = 0; i < numberOfElements; i++) {

        T random = EnhancedRandom.random(type);

        list = list.append(random);

    }

    return list;

}

}

Then a registry that grabs the field type at runtime and returns the
corresponding vavr randomizer configured with that type (similar code to
CollectionPopulator)

package io.github.benas.randombeans.vavr;
import io.github.benas.randombeans.annotation.Priority;
import io.github.benas.randombeans.api.EnhancedRandomParameters;
import io.github.benas.randombeans.api.Randomizer;
import io.github.benas.randombeans.api.RandomizerRegistry;
import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import static io.github.benas.randombeans.util.ReflectionUtils.isParameterizedType;
@Priority(-3) // more details on this here: https://github.com/benas/random-beans/wiki/Grouping-Randomizers
public class VavrRandomizerRegistry implements RandomizerRegistry {
@Override

public void init(EnhancedRandomParameters parameters) {

}

@Override

public Randomizer<?> getRandomizer(final Field field) {

    Class<?> fieldType = field.getType();

    if (io.vavr.collection.List.class.isAssignableFrom(fieldType)) { // refactor this as needed and add support for other types

        Type fieldGenericType = field.getGenericType();

        if (isParameterizedType(fieldGenericType)) { // populate only parametrized types, raw types will be empty

            ParameterizedType parameterizedType = (ParameterizedType) fieldGenericType;

            Type type = parameterizedType.getActualTypeArguments()[0]; // todo sanity check. I'm also not sure if we need to go deep for things like List<Set<Integer>>

            return new VavrListRandomizer((Class<?>) type);

        }

    }

    return null;

}

@Override

public Randomizer<?> getRandomizer(Class<?> type) {

    return null;

}

}

And finally the example

class Person {
List<String> nicknames;

List<Integer> numbers;

@Override

public String toString() {

    return "Person{" +

            "nicknames=" + nicknames.asJava() +

            ",numbers=" + numbers.asJava() +

            '}';

}

public static void main(String[] args) {

    EnhancedRandom enhancedRandom = new EnhancedRandomBuilder()

            .registerRandomizerRegistry(new VavrRandomizerRegistry())

            .build();

    Person person = enhancedRandom.nextObject(Person.class);

    System.out.println("person = " + person);

}

}
The sample correctly generates a person instance. So the registry works
well with generic vavr types without having to register a randomizer for
each field.
@Sir4ur0n https://github.com/Sir4ur0n What do you think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/benas/random-beans/issues/321#issuecomment-446759079,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABJfnWC2qt5EE1WTA3quaF2wYTc7pv7dks5u4XtxgaJpZM4Y5ryy
.

Sure! But that's not an issue as you can pass the enhancedRandom to the randomizer via the registry. Here is a sample with addresses:
package io.github.benas.randombeans.vavr;

import io.github.benas.randombeans.api.EnhancedRandom;
import io.github.benas.randombeans.randomizers.AbstractRandomizer;
import io.vavr.collection.List;

public class VavrListRandomizer<T> extends AbstractRandomizer<List<T>> {

    private Class<? extends T> type;
    private EnhancedRandom enhancedRandom;

    public VavrListRandomizer(Class<? extends T> type, EnhancedRandom enhancedRandom) {
        this.type = type;
        this.enhancedRandom = enhancedRandom;
    }

    @Override
    public List<T> getRandomValue() {
        List<T> list = List.empty();
        int numberOfElements = random.nextInt(10); // todo could be set to a value in EnhancedRandomParameters#getCollectionSizeRange taken from parameters in io.github.benas.randombeans.vavr.VavrRandomizerRegistry#init and propagated here
        for (int i = 0; i < numberOfElements; i++) {
            T random = enhancedRandom.nextObject(type);
            list = list.append(random);
        }
        return list;
    }
}

package io.github.benas.randombeans.vavr;

import io.github.benas.randombeans.annotation.Priority;
import io.github.benas.randombeans.api.EnhancedRandom;
import io.github.benas.randombeans.api.EnhancedRandomParameters;
import io.github.benas.randombeans.api.Randomizer;
import io.github.benas.randombeans.api.RandomizerRegistry;

import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

import static io.github.benas.randombeans.util.ReflectionUtils.isParameterizedType;

@Priority(-3) // more details on this here: https://github.com/benas/random-beans/wiki/Grouping-Randomizers
public class VavrRandomizerRegistry implements RandomizerRegistry {

    private EnhancedRandom enhancedRandom;

    @Override
    public void init(EnhancedRandomParameters parameters) {
    }

    @Override
    public Randomizer<?> getRandomizer(final Field field) {
        Class<?> fieldType = field.getType();
        if (io.vavr.collection.List.class.isAssignableFrom(fieldType)) { // refactor this as needed and add support for other types
            Type fieldGenericType = field.getGenericType();
            if (isParameterizedType(fieldGenericType)) { // populate only parametrized types, raw types will be empty
                ParameterizedType parameterizedType = (ParameterizedType) fieldGenericType;
                Type type = parameterizedType.getActualTypeArguments()[0];
                return new VavrListRandomizer((Class<?>) type, enhancedRandom);
            }
        }
        return null;
    }

    @Override
    public Randomizer<?> getRandomizer(Class<?> type) {
        return null;
    }

    public void setEnhancedRandom(EnhancedRandom enhancedRandom) {
        this.enhancedRandom = enhancedRandom;
    }
}

and the sample:
class Person {
    List<String> nicknames;
    List<Integer> numbers;
    List<Address> addresses;

    @Override
    public String toString() {
        return "Person{" +
                "nicknames=" + nicknames.asJava() +
                ",numbers=" + numbers.asJava() +
                ",addresses=" + addresses.asJava() +
                '}';
    }

    public static void main(String[] args) {
        EnhancedRandom enhancedRandom = new EnhancedRandomBuilder()
                .registerRandomizerRegistry(new VavrRandomizerRegistry())
                .build();

        Person person = enhancedRandom.nextObject(Person.class);
        System.out.println("person = " + person);
    }
}

class Address {
    List<String> tags;

    @Override
    public String toString() {
        return "Address{" +
                "tags=" + tags.asJava() +
                '}';
    }
}

generates for example:
person = Person{
   nicknames=[IbuAxb, oswsoUNEtOTaJRCuqmqjHVEigKR, eexxihCZLLBQvhCkkGEBAYKsjcfa, fC],
   numbers=[708490968, -494238257],
   addresses=[
      Address{tags=[HsEC]},
      Address{tags=[vHVRIlx, rFmHroKyFMAtcQskXz, JbDHprEovIWrgHaZkRMDnIMn, ngSRnPYnGHC, LMNVgewhQunqYdcSRguIsOalZUy, fqYHsXUJpyzZcdGnaTFqtEtlFc, OfZgFjlKPCxvzDlOaf, vnGFBhoIABanwFNKfaQJsLcawGfT]},
      Address{tags=[bgktNJkDRCnFMpOiTqqkD, jjcxxmAdKBu, kdoUblxoVnFTUCmNvUWpgXCgc, ZpflKkKZRSjwW, IAMfyHNtqU, ZmHwyZjdaPtVkpJtAHynNMDoEbnQP, GCrnREyiXYndOXXF]},
      Address{tags=[]},
      Address{tags=[Vl, mfTZseukew, anXIlqjrwZrU, LmTOGa, cxMaxc]},
      Address{tags=[OWleJQEwMaMTRZCTbzu, nnRsOHOl, DXEulnJctCnRkakaickq, NnZgklVuzqIycaNlMqGmoHs, tkzGaRkzWPDnFCGCxzHzunJL, LfEGCeBNQIsHUZzyOHYBs]},
      Address{tags=[uejtEVPGdEPCVdkGRUASskHnibcyU, RYaHlhOAUEWd, LlAZvpq]},
      Address{tags=[]}
   ]
}

Thank you, this seems to work fine! There were some missing parts in your example but I could easily figure them out.
I noticed Random-Beans doesn't support (yet? 😄 ) collections of collections (e.g. a List<Set<String>> or a List<List<String>>) but we almost never have this design in our models (and I actually think I can add support for it in my custom registry).
I will do this in our project code and if this works fine for some time, I propose to provide a tiny library for it. I'll let you know in case you want to link to it from your project.
Thanks again @benas I really appreciate the help!
Cheers

Thank you, this seems to work fine!

Great! Just saw that I pasted the wrong main method in the previous sample, I updated the snippet with the version where we need to set the enhancedRandom on the registry afterwards to be able to pass it to the randdomizer.

There were some missing parts in your example but I could easily figure them out.

Indeed, that was a quick PoC. Feel free to polish it as needed.

I noticed Random-Beans doesn't support (yet? 😄 ) collections of collections

That was deliberate as it will make things unnecessary complex for some rare use cases. I will add a note about it in the known limitation section of the docs.

I will do this in our project code and if this works fine for some time, I propose to provide a tiny library for it. I'll let you know in case you want to link to it from your project.

Sure! I will be more than happy to add a reference to it in the Extensions section.

Thanks again @benas I really appreciate the help!

Glad to be of help. Thank YOU for this interesting thread!
Best regards
Mahmoud


No way to set a SiteIcon outside TiddlyWiki

On the _account/_space page it should be possible to upload a SiteIcon for the current user.
Note if on the account page this would involve setting the current user site icon which might have implications on ControlView.

There's two SiteIcons when looking at a space: the icon for the space, which is the literal SiteIcon, and me, the author's SiteIcon. /_account could allow the latter but may not matter.
/_space needs to allow the former
Could be that /_account should be generated in the user's home domain (iframe-wise).

I'm going to add one to _space - this at least provides a root.
Pull incoming.

deployed in 1.0.78


v1.10 backports 2021-05-12

#15975 -- docs: improve and fix minor issues (@qmonnet)
#15942 -- Follow ups for host firewall support of endpoint routes (@pchaigno)
#16006 -- docs: update OpenShift getting started guide (@twpayne)
#16020 -- wireguard: Set wireguard and route MTU to detected MTU (@joamaki)
#16066 -- vendor: update wireguard library (@aanm)
#16017 -- daemon: store Cilium's configuration in a file (@aanm)
#16027 -- docs: Update SIG-Datapath meeting time. (@joestringer)
#16070 -- vendor: bump github.com/vishvananda/netlink to latest master (@tklauser)
#16068 -- test: Fix flake in ValidateEndpointsAreCorrect (@pchaigno)
#16056 -- jenkinsfiles: fix race detector pipelines (@nbusseneau)
#16045 -- docs: add 'endpointRoutes.enabled=true' to aws-cni (@bmcustodio)
#15979 -- docs: improve the aws-cni chaining page (@bmcustodio)
#15978 -- docs/ipsec: misc improvements (@kaworu)
#16057 -- Add XFRM In policy for traffic destined to the L7 proxy (@christarazi)

Once this PR is merged, you can update the PR labels via:
$ for pr in 15975 15942 16006 16020 16066 16017 16027 16070 16068 16056 16045 15979 15978 16057; do contrib/backporting/set-labels.py $pr done 1.10; done

Two PRs didn't get their commits correctly picked up by the scripts. I manually found them in the log and grabbed the shas. I'm not sure what confused the scripts. Is this common?
 * PR: 16006 -- docs: update OpenShift getting started guide (@twpayne) -- https://github.com/cilium/cilium/pull/16006
   Merge with 1 commit(s) merged at: Mon, 10 May 2021 13:56:34 +0000!
     Branch:     master (!)                          refs/pull/16006/head
                 ----------                          -------------------
     v (start)
     |  Warning: No commit correlation found!    via a4b7645a9b90303e54eee9e9edfc609402ac7cca ("docs: update OpenShift getting started guide")
     v (end)

     GS: Manually pulled up `421314d9b` from the git log

 * PR: 15979 -- docs: improve the aws-cni chaining page (@bmcustodio) -- https://github.com/cilium/cilium/pull/15979
   Merge with 1 commit(s) merged at: Tue, 11 May 2021 21:56:30 +0000!

My commits look good, but it seems like all the commits in the PR are not signed off by you, but rather the author references vagrant.

Thanks for pointing it out, that's really bizarre since I didn't even shut down this vagrant since last backport. Strange. I'll force push a fix

test-backport-1.10

test-1.19-5.4


Extensions share state

The sqlite extension used is the following: https://github.com/mergestat/dblite
It must be something with better-sqlite3 because when I try to replicate this using the sqlite3 cli this does not occur. So somehow better-sqlite3 shares state between connection with the extension... When looking into this at first I thought it had to do with this return code: SQLITE_OK_LOAD_PERMANENTLY (256) but when trying on the cli it didn't share the state...
const Database = require('better-sqlite3-default-extensions-helper')(require('better-sqlite3'));

const dbPath1 = 'path1';
const dbPath2 = 'path2';

const db1 = new Database(dbPath1);

db1.prepare("SELECT dblite_open('mysql', 'mydb', 'username:password@tcp(host:port)/scheme')").get();
db1.close();
const db2 = new Database(dbPath2);

console.log(db2.prepare("SELECT dblite_ping('mydb')").get()); // returns 1, so it found the connection even tho it was created on db1

I found it out, its because it only shares state when running in the same process.


Include Cleaner recommends removing header needed by template instantiation

Consider this simplified assert-style Check class:
check.h
#pragma once

#include <iosfwd>

class Check {
 public:
  Check(bool condition);

  template <typename T>
  std::ostream& operator<<(T&& streamed_type) {
    return stream() << streamed_type;
  }

  std::ostream& stream();
};

Most users of the class will not use operator<<. Thus, we can reduce the include tree size for most users by letting those that actually print a message include <iostream>. clangd however recommends removing such header. Doing so would break the build:
main.cc
#include "check.h"
#include <ostream>  // Warns: "Included header ostream is not used directly"

int main() {
  Check(false) << "Error message";
  return 0;
}

include-what-you-use correctly handles this.
System information
Output of clangd --version:
clangd version 19.0.0git (https://github.com/llvm/llvm-project.git 55e59083cb610f30ad21fe8c8cdb9900534937ec)
Features: linux
Platform: x86_64-unknown-linux-gnu

Editor/LSP plugin:
VSCode
Operating system:
Linux

hi @graveljp, sorry for late reply, but this is WAI per our include-what-you-spell policy, that's a core assumption that we should've document externally, sorry for lacking that.
This is what enables include-cleaner to be fast, simple and operate without humans. According to this policy, you don't have any spelling of an entity in your main.cc that requires inclusion of <ostream>. It's responsibility of check.h to make sure symbols it uses are defined in the compilation.
Recommended approach for such cases would look like:
check_with_ostream.h:
#pragma once
#include "check.h" // IWYU pragma: export
#include <ostream>

template <typename T>
std::ostream& Check::operator<<(T&& streamed_type) {
    return stream() << streamed_type;
}

this way people that need to depend on the version of the symbol with streaming capabilities can include check_with_ostream.h, and include-cleaner will recognize it as an alternative provider for check.h and won't recommend deletion of it (but it also won't insert it if missing).
In addition to that you can also add // IWYU pragma: keep to relevant sources, but I believe that's much more expensive.


Even Width

Hey @aristath,
I tried to make the toggle look even, compared to all other elements like dropdowns, etc.
before:

after:

Thanks @MapSteps, I've pushed this upstream - https://github.com/kirki-framework/control-checkbox/commit/c8a49ca7bc16f3df16398ab47a5b8ce2c4ab6715


Update microsoft-365-overview.md

Changed link for M365 business premium as it was routing to admin center help

@JohanFreelancer9 Please copy review

Issue#https://github.com/MicrosoftDocs/microsoft-365-docs/issues/9286

Docs Build status updates of commit ad9b3e0:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-365/enterprise/microsoft-365-overview.md
:bulb:Suggestion

Details

microsoft-365/enterprise/microsoft-365-overview.md

Line 118, Column 3: [Suggestion: docs-link-absolute - See documentation] Absolute link 'https://docs.microsoft.com//microsoft-365/business/' will be broken in isolated environments. Replace with a relative link.

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit 020a64b:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-365/enterprise/microsoft-365-overview.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit 5d61e32:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-365/enterprise/microsoft-365-overview.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit fec5703:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-365/enterprise/microsoft-365-overview.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit c1bd62a:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-365/enterprise/microsoft-365-overview.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

@kelleyvice-msft Please merge this PR. Thanks

Docs Build status updates of commit fc28333:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-365/enterprise/microsoft-365-overview.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Fixed and Extended Nav w/ Tabs + Fixed SideNav pushes the Header the to right

Description
When using fixed side nav, the other adjacent components needs to have 300 px padding per the documentation.. But this results in the header continuing over beyond the screen as follows (notice the missing right icon links)-

Repro Steps
Here's the code. It takes care of the issue where we need to put the sidenav out of fixed nave to make it clickable -
Markup -

                Logo
                menu

search

view_module

refresh

more_vert

Test 1

Test 2

Disabled Tab

Test 4

Test 5

First Sidebar Link

Second Sidebar Link

                    Dropdownarrow_drop_down

First

Second

Third

Fourth

Screenshots / Codepen
This is the assumed header that should display per the code from docs site -

When I remove the class navbar-fixed from the div that wraps the navbar, it works as expected

My primary investigation tells me it is because of this piece of css

@acburst - Happy to discuss the fix and contribute with a PR.

I'd be happy to look at a PR with some explanation and examples

@acburst - Cool! Could you elaborate on what kind of examples/explanation is required?

Thank you, it was driving me crazy! could you post the code you used for the padding please?

@iamrudra thank you, it was driving me crazy! could you post the code you used for the padding please?

I'm working around this using something along the lines of:

                    ...content...

and
.navbar-fixed-2 {
    position: relative;
    height: 56px;
    z-index: 997;
    position: fixed;
    width: 100%;
    top: 0;
}

Closed due inactivity. Feel free to reopen it, if it's still necessary.

I'm having the same issue. Is there any solution to this?


Is castling supported

I've tried doing castling and it doesn't seem to work.
I've tried the following:
0-0
0-0-0
00
000
o-o
o-o-o
oo
ooo

EDIT
While the readme answers my question, it didn't work nonetheless and I don't understand why. There was nothing inbetween my king and I see no reason why it wouldn't ahve worked. Is it possible to print the actual reason for being unable to move?

Hi, castling should be fully supported. You can confirm this by testing with the following FEN (specified in your uchess config):
r3k2r/8/8/8/8/8/8/R3K2R w KQkq - 0 1
And then inputting either of the following moves: O-O or O-O-O.
Please note that all of the following conditions are required for a legal castle:
Your king and rook have not moved.
Your king is NOT in check.
Your king does not pass through check.
No pieces between the king and rook.
If you have a board position that meets these criteria, and castling is not working, please provide the FEN (type fen into uchess), and I will be happy to take a look.

Hm thanks for the reply. I am quite sure I met the conditions. In my infinite wisdom I forgot to take a picture or anything ^^'

Ah, no worries, but I'm afraid I can't do much to diagnose it without a board position (at minimum). Move inputs are converted and processed by the notnil/chess package, which has a pretty robust test suite, but there's always a potential for things to get lost in translation. We can leave the issue open if you want to circle back with more data, or we can close it, and you can open a new issue if the problem happens again. I'm fine either way. Thanks!

Guess we can close this then. EIther way, is it possible to get more concrete errors instead of just Invalid?

I'll leave it open and investigate the possibility of doing so. I'll circle back.

:+1:


Add the ManagedClusterModule CRD and reconciler

The cluster-scoped ManagedClusterModule CRD is a new Module wrapper, that features a selector for ManagedClusters to target specific Spoke clusters.
The respective reconciler, hosted on the Hub cluster, creates a ManifestWork in the corresponding namespace, in order to deploy a Module in the Spoke cluster. When crafting the ManifestWork, the reconciler removes any build or sign sections.
Notes

KMM already supports building and signing kernel modules via the Module CRD. This reconciler will use the same features, in order to build and sign the kernel modules only on the Hub. This feature will be implemented in a future PR.

The ManagedClusterModuleStatus is also going to be implemented in a future PR.

Signed-off-by: Michail Resvanis<EMAIL_ADDRESS>Fixes #243
/cc @mresvanis

/lgtm


Added command itself print.

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

Project coverage is 89.30%. Comparing base (347b017) to head (168fa13).

Additional details and impacted files

@@           Coverage Diff           @@
##             main     #145   +/-   ##
=======================================
  Coverage   89.30%   89.30%
=======================================
  Files          96       96
  Lines       10447    10447
=======================================
  Hits         9330     9330
  Misses       1117     1117


Update MD file on new branch 2017-20-12_19-11-27

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

split/updateTestCon.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


process.env replacement broken with Vite aliases

Repro: Logout and go to http://localhost:3000/signin. You'll see process is not defined
process.env.NODE_ENV apparently gets special handling and continues to work in the DateTimeInput; e.g. when specifying specifying the start or end time on http://localhost:3000/Appointment/new.

This was fixed by #3259


Add New Instance

Promote the new instance m.netw0rk.io to give the user more options.

Sorry, we will not be listing Misskey's fork.
Thanks anyway🙏


Does the length of content in search results vary depending on the query language?

Hi, I'm building a langgraph using tavily and have a question.
When using tavily's basic search code in Python, I noticed that different sources of information are retrieved depending on the language of the query, even if the question is the same. When I use a language other than English (in my case, Korean), the length of the sentences in the content of the results is too short.
For example, in example1, when I ask "who is Messi?", the content length is quite long. However, in example2, when I ask the same question in Korean, the content part is shortened.
My question is, is there a way to output the entire content without shortening it? I need the full content because I use the search results as the retrieve values for RAG.
Additionally, are the sentences in the content part the entire text from the URL, or is there an algorithm that retrieves only part of the text?
Looking forward to your response! Thanks!
# example1
from tavily import TavilyClient
import os

TAVILY_API_KEY = os.getenv("TAVILY_API_KEY")
client = TavilyClient(api_key=TAVILY_API_KEY)

response = client.search("Who is Messi?")

response

>> {'query': 'Who is Messi?',
 'follow_up_questions': None,
 'answer': None,
 'images': [],
 'results': [{'title': 'Career of Lionel Messi - Wikipedia',
   'url': 'https://en.wikipedia.org/wiki/Career_of_Lionel_Messi',
   'content': "Lionel Messi's club career began with Barcelona, where he rose through the youth ranks, making his first-team debut in 2004.Over the next years, Messi became the club's all-time leading scorer, amassing numerous domestic and international accolades. During his tenure, Barcelona secured ten La Liga titles, seven Copa del Rey victories, and four UEFA Champions League victories.",
   'score': 0.79230356,
   'raw_content': None},
  {'title': "Lionel Messi | Biography, Barcelona, PSG, Ballon d'Or, Inter Miami ...",
   'url': 'https://www.britannica.com/biography/Lionel-Messi',
   'content': 'In early 2009 Messi capped off a spectacular 2008–09 season by helping FC Barcelona capture the club’s first “treble” (winning three major European club titles in one season): the team won the La Liga championship, the Copa del Rey (Spain’s major domestic cup), and the Champions League title. Messi’s play continued to rapidly improve over the years, and by 2008 he was one of the most dominant players in the world, finishing second to Manchester United’s Cristiano Ronaldo in the voting for the 2008 Ballon d’Or. At the 2014 World Cup, Messi put on a dazzling display, scoring four goals and almost single-handedly propelling an offense-deficient Argentina team through the group stage and into the knockout rounds, where Argentina then advanced to the World Cup final for the first time in 24 years. After Argentina was defeated in the Copa final—the team’s third consecutive finals loss in a major tournament—Messi said that he was quitting the national team, but his short-lived “retirement” lasted less than two months before he announced his return to the Argentine team. Messi helped Barcelona capture another treble during the 2014–15 season, leading the team with 43 goals scored over the course of the campaign, which resulted in his fifth world player of the year honour.',
   'score': 0.7444706,
   'raw_content': None},
  {'title': 'Lionel Messi - Wikipedia',
   'url': 'https://en.wikipedia.org/wiki/Lionel_Messi',
   'content': 'He scored twice in the last group match, a 3–2 victory over Nigeria, his second goal coming from a free kick, as they finished first in their group.[423] Messi assisted a late goal in extra time to ensure a 1–0 win against Switzerland in the round of 16, and played in the 1–0 quarter-final win against Belgium as Argentina progressed to the semi-final of the World Cup for the first time since 1990.[424][425] Following a 0–0 draw in extra time, they eliminated the Netherlands 4–2 in a penalty shootout to reach the final, with Messi scoring his team\'s first penalty.[426]\nBilled as Messi versus Germany, the world\'s best player against the best team, the final was a repeat of the 1990 final featuring Diego Maradona.[427] Within the first half-hour, Messi had started the play that led to a goal, but it was ruled offside. "[582] Moreover, several pundits and footballing figures, including Maradona, questioned Messi\'s leadership with Argentina at times, despite his playing ability.[583][584][585] Vickery states the perception of Messi among Argentines changed in 2019, with Messi making a conscious effort to become "more one of the group, more Argentine", with Vickery adding that following the World Cup victory in 2022 Messi would now be held in the same esteem by his compatriots as Maradona.[581]\nComparisons with Cristiano Ronaldo\nAmong his contemporary peers, Messi is most often compared and contrasted with Portuguese forward Cristiano Ronaldo, as part of an ongoing rivalry that has been compared to past sports rivalries like the Muhammad Ali–Joe Frazier rivalry in boxing, the Roger Federer–Rafael Nadal rivalry in tennis, and the Prost–Senna rivalry from Formula One motor racing.[586][587]\nAlthough Messi has at times denied any rivalry,[588][589] they are widely believed to push one another in their aim to be the best player in the world.[160] Since 2008, Messi has won eight Ballons d\'Or to Ronaldo\'s five,[590] seven FIFA World\'s Best Player awards to Ronaldo\'s five, and six European Golden Shoes to Ronaldo\'s four.[591] Pundits and fans regularly argue the individual merits of both players.[160][592] On 11 July, Messi provided his 20th assist of the league season for Arturo Vidal in a 1–0 away win over Real Valladolid, equalling Xavi\'s record of 20 assists in a single La Liga season from 2008 to 2009;[281][282] with 22 goals, he also became only the second player ever, after Thierry Henry in the 2002–03 FA Premier League season with Arsenal (24 goals and 20 assists), to record at least 20 goals and 20 assists in a single league season in one of Europe\'s top-five leagues.[282][283] Following his brace in a 5–0 away win against Alavés in the final match of the season on 20 May, Messi finished the season as both the top scorer and top assist provider in La Liga, with 25 goals and 21 assists respectively, which saw him win his record seventh Pichichi trophy, overtaking Zarra; however, Barcelona missed out on the league title to Real Madrid.[284] On 7 March, two weeks after scoring four goals in a league fixture against Valencia, he scored five times in a Champions League last 16-round match against Bayer Leverkusen, an unprecedented achievement in the history of the competition.[126][127] In addition to being the joint top assist provider with five assists, this feat made him top scorer with 14 goals, tying José Altafini\'s record from the 1962–63 season, as well as becoming only the second player after Gerd Müller to be top scorer in four campaigns.[128][129] Two weeks later, on 20 March, Messi became the top goalscorer in Barcelona\'s history at 24 years old, overtaking the 57-year record of César Rodríguez\'s 232 goals with a hat-trick against Granada.[130]\nDespite Messi\'s individual form, Barcelona\'s four-year cycle of success under Guardiola – one of the greatest eras in the club\'s history – drew to an end.[131] He still managed to break two longstanding records in a span of seven days: a hat-trick on 16 March against Osasuna saw him overtake Paulino Alcántara\'s 369 goals to become Barcelona\'s top goalscorer in all competitions including friendlies, while another hat-trick against Real Madrid on 23 March made him the all-time top scorer in El Clásico, ahead of the 18 goals scored by former Real Madrid player Alfredo Di Stéfano.[160][162] Messi finished the campaign with his worst output in five seasons, though he still managed to score 41 goals in all competitions.[161][163] For the first time in five years, Barcelona ended the season without a major trophy; they were defeated in the Copa del Rey final by Real Madrid and lost the league in the last game to Atlético Madrid, causing Messi to be booed by sections of fans at the Camp Nou.[164]',
   'score': 0.7350715,
   'raw_content': None},
  {'title': 'The life and times of Lionel Messi',
   'url': 'https://www.nytimes.com/athletic/4783674/2023/08/18/lionel-messi-profile-soccer/',
   'content': 'For Messi, it is major trophy number 44.. Despite turning 36 in June, he is as influential as ever. Here is the complete story of Lionel Andres Messi, widely regarded as one of the greatest ...',
   'score': 0.6631238,
   'raw_content': None},
  {'title': 'Lionel Messi | Paris Saint-Germain',
   'url': 'https://en.psg.fr/teams/first-team/squad/lionel-messi',
   'content': "Lionel\nMessi\nFirst Team\n30\nLionel\nMessi 30\nPlayer profile\nIt’s hard to find the words to describe a man that the football world knows simply as ‘The GOAT’. Lionel Messi: A Paris Saint-Germain legend\nMessi and Ramos play final match at the Parc\nLeo Messi finishes as Ligue 1’s top assist provider\nPictures of Lionel Messi with Paris Saint-Germain\nThanks, Leo!\n The all-time leading goal scorer for his country, the top scorer in the history of Spanish football, the top assist provider in the 21st century, Messi has broken all the records, but above all, inspired an entire generation of footballers around the world with his genius.\n Previous clubs\n2004-2021\nFC Barcelona\n778\nLionel Messi Related News\nLionel Messi's last game with Paris!\n Top goals: Paris-Clermont\nParis Saint-Germain\nServices\nLanguagues\nHelp\nJoin Us",
   'score': 0.62520933,
   'raw_content': None}],
 'response_time': 1.5}

# example2
from tavily import TavilyClient
import os

TAVILY_API_KEY = os.getenv("TAVILY_API_KEY")
client = TavilyClient(api_key=TAVILY_API_KEY)

response = client.search("메시는 누구야?")

response

>> {'query': '메시는 누구야?',
 'follow_up_questions': None,
 'answer': None,
 'images': [],
 'results': [{'title': "''쟤 누구야'' 10대 메시 처음 보고 전설이 내뱉은 한마디",
   'url': 'https://www.sportalkorea.com/news/view.php?gisa_uniq=2021032807561855&gomb=1',
   'content': "''쟤 누구야'' 10대 메시 처음 보고 전설이 내뱉은 한마디 ... 는 확실히 떡잎부터 남달랐던 괴물이었다. 메시는 축구사 최고로 평가받는다. 지난 2004년 바르셀로나를 통해 프로에 데뷔한 메시는 현재까지 768경기서 663골로 놀라운 득점 기록을 쓰고 있다. 34세 ...",
   'score': 0.9980808,
   'raw_content': None},
  {'title': '"쟤 누구야" 10대 메시 처음 보고 전설이 내뱉은 한마디 : 네이트 스포츠',
   'url': 'https://sports.news.nate.com/view/20210328n07730',
   'content': '지오 판 브롱크호스트에게 \'쟤 누구야\'라고 물어볼 만큼 아주 잘했었다"라고 돌아봤다. 지금은 바르셀로나 코치로 메시를 지도하는 라르손은 "메시는 현재 세계 최고의 선수가 됐다. 그가 한 모든 일은 엄청나다. 수년 동안 계속해서 같은 수준을 보여주는 건 ...',
   'score': 0.9901782,
   'raw_content': None},
  {'title': '"이제 넌 가만히 있고 알바가 올라갈 거야! 영어 괜찮지?"...메시가 인터 마이애미 동료에게 영어로 한 말',
   'url': 'https://yourfield.nexon.com/today/view/SK007_20240303_7101?type=all',
   'content': '메시는 바르셀로나 역대 최다 득점자다. 2021년 여름 바르셀로나와 재계약이 불발됐던 메시는 이후 파리 생제르맹에서 두 시즌을 보냈다. 지난해 7월 psg와 계약이 만료됐던 메시는 인터 마이애미에 입단했다. 메시는 미국 진출 후에도 마법을 일으켰다.',
   'score': 0.9854964,
   'raw_content': None},
  {'title': '메시, 21년간 뛴 바르셀로나 떠난다 - 조선일보',
   'url': 'https://www.chosun.com/sports/world-football/2021/08/07/PVH7XHZISVA7LFPI42UA74WYYM/',
   'content': '메시는 2000년 바르셀로나 유스팀과 계약했고, 2004년 10월 1군 무대에 데뷔했다. 바르셀로나에서 17시즌 778경기를 뛰면서 672골을 넣으며 구단 역대 최다 출장, 득점 기록을 세웠다. 정규리그 10회, uefa(유럽축구연맹) 챔피언스리그 4회 등 우승컵을 35번 들었다.',
   'score': 0.9783433,
   'raw_content': None},
  {'title': '메시: 결국 바르셀로나에 남는다 - BBC News 코리아',
   'url': 'https://www.bbc.com/korean/news-54038898',
   'content': 'BBC 스포츠 분석가, 앤디 웨스트. 메시는 결국 남는다. 하지만 이야기의 끝은 아직 멀었다. 메시는 인터뷰에서 바르셀로나 주제프 마리아 바르토메우 ...',
   'score': 0.9749169,
   'raw_content': None}],
 'response_time': 1.43}

Hello,
The content field in the search results provides the most query-related content from the scraped URL.
Tavily uses proprietary AI and algorithms to extract only the most relevant content, optimizing for context quality and size rather than including the entire text from the source.
If you need the entire content from a source, you can utilize the Tavily Extract API, which is designed to retrieve the raw content from a list of websites. This is particularly useful for applications like data collection, content analysis, RAG and research.
To get started, refer to the documentation here: Tavily Extract API Documentation.
We also encourage you to join our Tavily Community to stay updated on the latest features, share feedback, and connect with other developers working with Tavily.


⚠ TorrentLeech has degraded performance

In a923805, TorrentLeech ($TL) experienced degraded performance:

HTTP code: 200
Response time: 6350 ms

Resolved: TorrentLeech performance has improved in 2ba0690 after 7 minutes.


Add a gaussian blur feature

Hello guys!
Can u check this PR?
PS. I'm sorry about another one (5 mins later) im new to github =)

Could you please add related tests?
StyleCI is broken.

@Soullivaneuh hello!
I fixed string for StyleCI. But i think i cant add a test for Gaussian Blur. Its like smooth() or sepia() methods, and i dont know how i can test it) Sry)

Should be here: https://github.com/Gregwar/Image/blob/master/tests/ImageTests.php
If you can't assert data, at least just run the method to see if it's running.
cc @Gregwar

@Soullivaneuh, ok i added a simple test for this filter;

and one more comment:
i have tried to run phpinit for this repo, but it failed with this message:
Configuration read from /var/www/GregwarImage/phpunit.xml.dist
PHP Fatal error:  Class 'Gregwar\Cache\Cache' not found in /var/www/GregwarImage/Image.php on line 122
is that ok?

@yamilovs you need to run composer install first

@Gregwar oh thanks for this comment. Its also work for me now)

@Gregwar what do you think of https://github.com/Gregwar/Image/pull/104/files#r45178153?

Hello guys! any progress here?

ping @Gregwar
I realy would like this feature in your library and in a symfony2 bundle =)

+1 for this PR!

+1 for this PR!

@Soullivaneuh is it ok for you?

Thanks for contributing


What should I add "comparxiv" to "vim ~/.zshrc"

Hi,
After I install comparxiv, it has not added to the path.
The error is "zsh: command not found: comparxiv".
How to add it to the path? Thanks in advance!

I this still a problem? The command should be available after installation "out of the box".

Thanks, dude! I have met another problem.
“sh: pdflatex: command not found"
It seems that there is no pdflatex even though I have installed the texlive.
Is there any way to solve the problem?
Thanks in advance.

Thanks, dude. It's working now!

Perfect!


Quick update on getting started for Croeseid testnet

Fix cli show keys commands;
Update create-validator tx, added auto gas flags.

/staging

I think I will suggest the following to #70 first:
--min-self-delegation="1" \
--gas auto \
--gas-adjustment=1.5


Use strongSelf local variable

This line is added in PR #3325, I reckon it's supposed to use strongSelf rather than self.

Current coverage is 87.44% (diff: 100%)

Merging #3762 into master will not change coverage

@@             master      #3762   diff @@
==========================================
  Files            45         45
  Lines          6227       6227
  Methods        1104       1104
  Messages          0          0
  Branches        416        416
==========================================
  Hits           5445       5445
  Misses          779        779
  Partials          3          3

Powered by Codecov. Last update 4f3c694...25ded0a

Unless this change has been made outside of this merge, this looks fairly important to me.

Any chance we can look into whether this is a proper fix or not? Top 1 crash in my app(and also https://github.com/AFNetworking/AFNetworking/issues/3876) might be caused by this.

@jshier Any chance that you could look into this?

This commit is implemented in newest 3.2.1 version release but the problem referenced in #3876 still persists.

This has been fixed.


Picker on IOS in landscape mode rotates to portrait after selecting item

I have gone through these following points

[x]   Check latest documentation: https://docs.nativebase.io/
[x]   Check for existing open/closed issues for a possible duplicate before creating a new issue: https://github.com/GeekyAnts/NativeBase/issues
[x]   Use the latest NativeBase release: https://github.com/GeekyAnts/NativeBase/releases
[x]   Check examples from NativeBase KitchenSink

Issue Description
Open app in Landscape mode and go to Picker.
Click Picker, new screen with options opens.
Select an option from the Picker items in the new screen.
node, npm, react-native, react and native-base version, expo version if used, xcode version
"expo": "^34.0.4",
"native-base": "^2.13.5",
"react": "^16.8.3",
"react-native": "^0.59.8",

Expected behaviour
After selecting an option you return to the main screen in the orientation you were before (Landscape)
Actual behaviour
App orientation is set to Portrait.
Steps to reproduce
import React, { useState, useEffect } from 'react';
import {
  Body, Right, Left, Icon, Header, Button, Title, Picker, View
} from 'native-base';

function LanguagePicker() {
  const [language, setLanguage] = useState( 'nl');

  function handleChangeLanguage(value) {
    setLanguage(value);
  }

  return (
    <View style={{flex: 1, height: '100%', justifyContent: 'center'}}>
    <Picker
      mode="dropdown"
      iosHeader="Select language"
      iosIcon={<Icon name="arrow-down" />}
      placeholder="Select language"
      placeholderStyle={{ color: '#000' }}
      style={{ width: '100%' }}
      itemTextStyle={{ color: '#000000' }}
      selectedValue={language}
      onValueChange={value => handleChangeLanguage(value)}
    >
      <Picker.Item label="Nederlands" key="0" value="nl" />
      <Picker.Item label="English" key="1" value="en" />
    </Picker>
    </View>
  );
}

export default LanguagePicker;

Is the bug present in both iOS and Android or in any one of them?
Only IOS, and only when in Landscape.
I tested this also on snack.expo (with own device, snack has only portrait mode!). Here is link to code: https://snack.expo.io/@anniekvandijk/language-dropdown

I'm also having this issue.

Hi, thanks for the report. Any chance you can confirm if this existed in an earlier version of native-base as well?

I do not know. It's my first time I used native-base for a project i just started. Sorry...

Tested on react-native 60.5.
Are you sure it's not an expo issue?

Now I think you are right. Did not think of Expo for this Issue. I do not have an apple dev account yet, so I could not test this with a build. Thx for testing 😊👍.
I will post the issue in the Expo repo.

Now I think you are right. Did not think of Expo for this Issue. I do not have an apple dev account yet, so I could not test this with a build. Thx for testing 😊👍.
I will post the issue in the Expo repo.

Did you ever open a ticket in the Expo repo? I'm having the same issue with an Expo project of mine and haven't yet determined if it's Expo or React Native.

Hi @anniekvandijk , as we have tested it and found no issue, closing this now. Let us know if the issue still persists.


support non-interactive token validation (i.e. composable proofs)

context: https://en.wikipedia.org/wiki/Fiat–Shamir_heuristic

cf. https://eprint.iacr.org/2019/1021

cf. https://arxiv.org/abs/1906.07221

note: zk-STARKs are the only post-quantum composable proofs but they are too large to use for JWTs because most HTTP servers/proxies have a limit of 8KB and a zk-STARK is dozens or hundreds of KB; however there are post-quantum DSAs available in the pqcrypto crate.


React native apps crash in any editable text field when tapping on a emoji in the suggestion bar in gboard

Steps to Reproduce

Install gboard on your mobile device (a lot of devices come with this default keyboard, but for devices that don't, the keyboard can be installed on both iOS and android)
Go to Settings on the device and select gboard as the default keyboard
There's also an option in the gboard's preferences to show emoji suggestions and it has to be turned on
Open any react native app and tap in any editable text field
Type a word that's going to suggest an emoji (like for example star will suggest a star emoji, beer will suggest a beer emoji, etc.)
Tap on the emoji in the suggestion bar

Expected Behavior

The emoji is inputted as text with no further outcome

Actual Behavior

React native apps crash in any editable text field when tapping on a emoji in the suggestion bar in gboard (google keyboard)

Please see the videos attached bellow:
2018_05_04_16_16_25.zip
2018_05_04_16_17_04.zip
2018_05_04_16_17_42.zip

I do believe my issue contains all the relevant information needed to reproduce this issue on any environment.


feature: option to download chrome binary on cold start rather than bundling in function zip

Currently, the Serverless plugin bundles the headless chrome binary in the artifacts that's uploaded during Lambda function deployment. This is great for function invocation because we don't have to waste time downloading the binary on a Lambda function's cold start, saving time. However, it means uploading a zip file that's around 48 MB which can be painfully slow during development. It also means there's little room left for other dependencies. Therefore, this feature enhancement would make it an option to download on invocation, rather than on zip bundling.
This feature would be implemented in the @serverless-chrome/lambda package, and exposed in the serverless plugin (with the appropriate artefact optimisations—e.g don't include the headless_shell binary.)
While the article is not entirely accurate, this feature is inspired by this blog post.

Any update on this? Need any help?


A question about  about the validation code

Thank you for providing such a convenient code, but I have some questions about it. On the line 75 of eval.py, you directly use the image after crop for performance verification. Is this accurate? Another question is why not apply ms+flip to inference?

Are you talking about the DeepLabV3 code?
As I mentioned, we strictly followed the DeepLab-V3+ pytorch implementation from https://github.com/VainF/DeepLabV3Plus-Pytorch, and trained with our pseudo labels.

But I looked at his Deeplabv2 library, it does not use resize_eval. I read other articles, none of the libraries use Resize_eval. If you use Resize_eval, the model results will be significantly improved

Are you talking about the DeepLabV3 code?
As I mentioned, we strictly followed the DeepLab-V3+ pytorch implementation from https://github.com/VainF/DeepLabV3Plus-Pytorch, and trained with our pseudo labels.

Another question is, if you use resize_eval, what do you do when you submit the test set?

For DeepLab-V2, we did not use Resize_eval.
The result of DeepLab-V3 is our additional experiment after publishing, so we skip the test-mIoU and report only the val-mIoU following the [DeepLabV3 implementation])(https://github.com/VainF/DeepLabV3Plus-Pytorch).
I recommend you measure the val-mIoU and test-mIoU without Resize_eval or use other DeepLabV3 implementations because our contribution in WSSS is the high-quality of pseudo-labels.

For DeepLab-V2, we did not use Resize_eval.
The result of DeepLab-V3 is our additional experiment after publishing, so we skip the test-mIoU and report only the val-mIoU following the DeepLabV3 implementation.
I recommend you measure the val-mIoU and test-mIoU without Resize_eval or use other DeepLabV3 implementations because our contribution in WSSS is the high-quality of pseudo-labels.

Thank you for your reply. But I still have a question. In the article, the result of your Deeplabv2 on the validation set is 71.2%, but why is there only 70.4% in this library? In addition, is it convenient for you to upload the code for submitting the test set?


Relax the bounds on HashSet: Debug

This looks to be just an oversight.
The bounds on HashMap are similarly loose:
https://github.com/rust-lang/hashbrown/blob/1e1bb230bc376f6db99e08c055fd758d142aa72d/src/map.rs#L1540-L1545
And std::collections::HashSet has always only bounded T by Debug and not Eq/Hash here.

@bors r+

:pushpin: Commit 69e3da9e44bf592d3450453230360cceec06583c has been approved by Amanieu

:hourglass: Testing commit 69e3da9e44bf592d3450453230360cceec06583c with merge 612057bccc3a4ecfed9fad3fae1182bd49225526...

:sunny: Test successful - checks-actions
Approved by: Amanieu
Pushing 612057bccc3a4ecfed9fad3fae1182bd49225526 to master...


Allow hue fixups in Bezier and expose interpolation as a plugin

Resolves #217
Resolves #204

@gir-bot lgtm


Week2

Added content to week2.md

I just pushed another commit 94bc7c5 to this branch, but I don't see it on this pull request.  Not sure how to proceed.

I don't see 94bc7c5 - can you paste the full SHA and/or link to where you can see it on GitHub?

https://github.com/neu-se/CS4530-Spring-2022/commit/3b0f0d9a748fb7d675f955e9eac80b886fbb1d66
Here's what I got when I pushed.
@.*** MINGW64 ~/Dropbox/Work/cs4350-5500/CS 4530 Spring
2022/WebSite (week2)
$ git push
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 8 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 459 bytes | 459.00 KiB/s, done.
Total 4 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To github.com:neu-se/CS4530-Spring-2022.git
94ba7c5..3b0f0d9  week2 -> week2
On Wed, Jan 19, 2022 at 2:28 PM Jonathan Bell @.***>
wrote:

I don't see 94bc7c5 - can you paste the full SHA and/or link to where you
can see it on GitHub?
—
Reply to this email directly, view it on GitHub
https://github.com/neu-se/CS4530-Spring-2022/pull/4#issuecomment-1016797026,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAR3CMDWKUKHW4JWHE5IICLUW4GF5ANCNFSM5MKXNB4A
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID:
@.***>

There was a typo in your original message - the copy/pasted log shows 94ba7c5..3b0f0d9 . Both of those commits are here - you can see them listed on this page, they are sorted between the comments.
It is also deployed - https://61e86170b1c47200071da0b6--objective-mclean-ad778c.netlify.app/modules/week2-knowledge-sharing-design-doc
However, if you had open a deploy preview from an earlier commit and refreshed it, you would still see the old contents - each deploy preview gets its own unique URL. If you visit the link that the bot put in the PR ( https://deploy-preview-4--objective-mclean-ad778c.netlify.app/ ) it will take you to the latest commit.

I understand almost none of your message :(
I know I gave you the wrong 6 character code, sorry.  I can never remember
whether the push message is oldrev..newrev or newrev..oldrev.
On Wed, Jan 19, 2022 at 2:38 PM Jonathan Bell @.***>
wrote:

There was a typo in your original message - the copy/pasted log shows
94ba7c5
https://github.com/neu-se/CS4530-Spring-2022/commit/94ba7c5c77c57b54b38d432c0e0cf0d7b1a68c7b
..3b0f0d9
https://github.com/neu-se/CS4530-Spring-2022/commit/3b0f0d9a748fb7d675f955e9eac80b886fbb1d66
. Both of those commits are here - you can see them listed on this page,
they are sorted between the comments.
It is also deployed -
https://61e86170b1c47200071da0b6--objective-mclean-ad778c.netlify.app/modules/week2-knowledge-sharing-design-doc
However, if you had open a deploy preview from an earlier commit and
refreshed it, you would still see the old contents - each deploy preview
gets its own unique URL. If you visit the link that the bot put in the PR (
https://deploy-preview-4--objective-mclean-ad778c.netlify.app/ ) it will
take you to the latest commit.
—
Reply to this email directly, view it on GitHub
https://github.com/neu-se/CS4530-Spring-2022/pull/4#issuecomment-1016804228,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAR3CMDDBBHG7P2IDSCLFSTUW4HKFANCNFSM5MKXNB4A
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID:
@.***>

Lesson 2.1: Looks ok. Slide 11 and 13 could use some pictures

These lessons look fantastic, thank you! I see only two small issues:

Lesson 2.1 slide 13: Is it too gross to drop one of the UML diagrams of one of the design patterns there, just so that there is a bit more to look at?
Lesson 2.4 slide 2: Is it intentional that the scale of UML diagrams is an empty slide? :)

Added pictures as per Jon's suggestion.  Also adopted some of PPT's "Design Ideas" for a few slides; see if you like the way they look.  (Some of these could become visual cues we use throughout the course)

Sure. Thanks


Enum field with @NotNull causes generated Qxxx.class error.

Can repeat with the latest example-java8 project. Just try to add @NotNull annotation with status field in Order class, then compilation happen.

Just try to add @NotNull annotation with status field in Order class

Made that change - no issue, no exception, all working fine.
Please update with details that reproduce the error and include the compilation error or close this issue.
Thanks, Rob.

User io.ebean.annotation.NotNull no problem.
I was confused for a long time, which NotNull should I use.

Ah right.  Cool, found and fixed - thanks.


Build error due to link to removed page

When I run pnpm build I get the following error:
Error: 404 /tutorial/ondestroy (linked from /tutorial/auto-subscriptions)

There are two ways to fix it.

remove that link (#315)
revert removed onDestroy exercise, and make it simpler (#316)

I personally recommend 2, because for someone like me who comes from other programming languages, I learned a lot from the onDestroy exercise.
Indeed, the onDestroy exercises were complex, but I think it can be made simpler.

I have created two different PRs (as Draft just to avoid both being merged).
Please merge the one that is more suitable.

@Rich-Harris
Thank you for the explanation! It made a lot of sense.


Imports/includes

Being able to split code across files is crucial for writing maintainable and reusable software. No strong feelings regarding syntax and actual implementation.

Let's prioritize finding an approach that optimizes for build time.

Also consider IDEs as clients - see https://rust-analyzer.github.io/blog/2020/07/20/three-architectures-for-responsive-ide.html

@lanmonster , could you drop a docs link about how included/imports work now or link to a commit?


Can't cast vote: Unable to find the required tokens in your wallet

This is a Bug Report
:tophat: Description
When I'm trying to cast a vote, the modal window appears with the message "Unable to find the required tokens in your wallet".

In browser console:
VOTE
checking for WEI
NOT HAS TOKEN

(tokens are actually on my address)
:clipboard: Additional Data

Sovereign deployment where you found the issue: https://votest.democracy.earth/
Browser & version: Firefox 63.0.1 Metamask 5.0.2

I solved this by manually removing these items from local storage:
Meteor.loginToken
Meteor.loginTokenExpires
Meteor.userId

@xuhcc thanks for reporting this issue and glad you resolved, this is part of more fine-tuning that will be coming in the next few weeks. Will close this issue for now but please feel free to reopen if it persists


Document sentinel bug

In the schema-api-startup example a sentinel file is used to make sure the core isn't re-created if the container is restarted. This works fine however, if you do a docker-compose pull followed by a docker-compose up -d (or whatever the equivalent docker commands are) the sentinel file is lost and it will error because it attempts to re-create the core.

I'm not sure about this... it depends how you mounted where the core goes. If you're only creating the container, with no mounted volumes, so that you end up with sentinel and core in just the container overlay, then the sentinel approach ought to work as-is. Basically the core and the sentinel ought to be in the same spot. Once you start mounting volumes, you should have sentinel and core in the same place.
Anyway, now that we have /var/solr, this example should be updated to use that; and then change it to not use a sentinel but check for the core directory.

Admittedly, this was a while ago so I wasn't as familiar with it as I am now. I'm now using the solr-precreate script which appears to check for the /var/solr directory. I wasn't aware that we didn't need to mount the volumes though, so thanks for the tip. It appears after stopping the containers, without volumes my index is still there which is the desired behaviour..

It appears after stopping the containers, without volumes my index is still there which is the desired behaviour

Right; you can can start/stop those containers and retain the data in your overlay filesystem. Obviously when you remove the container, the data is also gone.
And it's possible that you'd get better performance out of mounted volumes.


文件上传大概100M的文件上传报这个

read /var/folders/t8/3jsdccj553j7jl8zxtysqb2r0000gn/T/multipart-1340971199: file already closed

Check the config of MaxBytes and Timeout.

The issue has been fixed. The problem was with the file order. I appreciate your help.


Read input file and process groups of keywords. Also tracking a delim…

…iter to read file fields

Looks good, except merge to the development branch instead of main so we can test the integration first


consider always passing down dispatch regardless of what mapDispatchToProps does

I'm experimenting with composing several higher-order-components, like so:
compose(
  connect(mapStateToProps),
  authorize(unauthorizedAction),
  loadData(loadDataAction)
)(MyComponent);

It would be really nice if I could count on connect-ed components always having dispatch defined. Because if I do this:
compose(
  connect(mapStateToProps, { someAction, anotherAction }),
  authorize(unauthorizedAction),
  loadData(loadDataAction)
)(MyComponent);

...then my dispatch goes away in the connected component, and I have to implement a much more awkward mapDispatchToProps in order to get it back.
It's worth noting that redux-form also suffers from this problem.
IMO, being able to rely on some consistent props in a connected component would make this kind of third-party composition a lot easier.

Can you elaborate on why you need dispatch after binding action creators?
Usually components want it one way or the other way, or there's potential for confusion.

Mostly because it's cleaner to have the sub-components know what actions they want by reference, rather than by name. I could do this:
compose(
  connect(mapStateToProps, { unauthorizedAction, loadDataAction, someAction, anotherAction }),
  authorize('unauthorizedAction'),
  loadData('loadDataAction')
)(MyComponent);

...but then I've got duplication and magic strings. My real use case is that the sub-components might want a map of several actions, so they can't just look for a well-known name in the parent props.
It also makes it clearer which actions are used by which HOCs.

Can you give me some idea as to how e.g. authorize looks?
What would authorize(unauthorizedAction) do?

I thought about this a lot over the weekend and realized that I made the classic mistake of prescribing the solution rather than describing the problem.
I think there is the potential for different kinds of useful higher-order-components that would have some or all of the following characteristics:

they need to hook something in the React component lifecycle, so they want to be HOCs vs. some other kind of composition
they have some internal state that they maintain in the Redux store
they dispatch their own actions for managing that state, some of which may also be part of their public API
they act on some external state that has to be passed in by the application
they encapsulate or coordinate some behavior which requires external actions to be passed in by the application

redux-form is one example: it maintains the intermediate form state in the store; it exposes public actions for initializing/reseting the form; it depends on external actions for validation/form submission/etc.
My internal "authorize" HOC would: maintain the set of roles assigned to the current user and only render the wrapped component if the user was authorized; expose actions for intializing/updating the assigned roles; execute some application-dependent behavior on sucess/failue (maybe present a dialog for the user to request permission, or sign them out, or whatever the app wants to do).
I'm also thinking about an "ensureData" HOC that would ensure that the remote data required by a component was loaded, and manage the client-side caching of that data. It would maintain some internal bookkeeping information, expose actions for invalidating the cache, and would depend on external actions for actually loading the data.
So my question becomes: when a component wants to compose several of these concerns, what is the best way to get them the Redux bits that they need?
One approach is that there is a single connect()-ed component at the top of the chain, and all the dependencies required further down would be threaded through a single connect() call. That can be kind of awkward even for a single component (see: Doing the connect()ing Yourself for redux-form). I think that approach would become increasingly messy as you compose additional concerns.
redux-form works around this by providing its own wrapper around connect() to ensure that it gets its state from the store and a handle so it can dispatch() its own actions. I was a little puzzled when I first saw that, because I knew the client of the form would also need stuff from the store, and would also have to dispatch, so you'd wind up having a component structure like:
<Connect>
  <MyFormWrapper>
    <Connect>
      <MyForm />
    </Connect>
  </MyFormWrapper>
</Connect>

The nested <Connect>s seemed odd to me.
But the more I think about it, the more I'm coming around to the idea that that is the best way to achieve separation of concerns. Each HOC has it's own relationship with the store, and trying to roll up multiple components' needs into a single connect() call seems to be mixing up things that should be separate.
This makes my hypothetical example look like:
<Connect>
  <Authorize>
    <Connect>
      <EnsureData>
        <Connect>
          <MyFormWrapper>
            <Connect>
                <MyForm />
            </Connect>
          </MyFormWrapper>
        </Connect>
      </EnsureData>
    </Connect>
  </Authorize>
</Connect>

...which looks a bit crazy. But maybe that is just the world we live in when we compose with HOCs rather than mixins?

@erikras Thoughts?

I have certainly noticed that, as my application grows, I have many connected components nested inside other connected components, as @jdefontes has rendered in his last comment. I have been operating under the assumption that the redux listener system is probably robust enough to notify all the elements when a change occurs.
The way my pre-flux isomorphic React app was structured involved passing down all the data from the initial route component all the way to the farthest leaves, which gets disgusting very quickly, and avoiding that via state stored in the context is one of the biggest benefits of the Flux architecture.
I agree with @jdefontes' conclusion:

Each HOC has it's own relationship with the store, and trying to roll up multiple components' needs into a single connect() call seems to be mixing up things that should be separate.

Shall we close then?

I'm closing but let me know if you're not satisfied with nested smart components.

Thanks for the discussion.
Just one further observation... if you try to force a tree of HOCs to share a top level <Connect> then the whole tree gets notified when any of the various HOCs state changes, which becomes pathological in the case of, say, redux-form, where every keystroke updates the store. When you nest <Connect>s, each one of them gets separately notified, but they have the very nice property of acting as a guard for their children, and only updating the children if the state they care about has changed. So I see that as another vote for nested  <Connect>s.
I agree with @erikras that, even setting aside the question of HOCs, it is just too damn convenient to not have a few nested <Connects> in a real app. Threading props through a deep component tree is a PITA and doesn't separate concerns very well. The previous version of my app using vanilla Flux had nested components that individually subscribed to the stores they cared about, so nesting <Connect>s is the functional equivalent of that for me. Viva Redux! (and redux-form is awesome too! ;-)

After my exploration of redux and its advantages / tradeoffs I have concluded that this is the one piece I strongly dislike: no convenient / modular way to nest components. Most apps I build consist of numerous  "smart components" with demanding (i.e. complex) business rules that will require their own reducer and selector.
I would like to expand upon the issue above and highlight that the selector for each nested component becomes more tedious, error prone, and coupled as the application and its atom gain width / depth.
Normally I write applications to be "secured" via different containers entirely for public or secure inner applications, where an intercepted statusCode 401 moves people from secure back out to public. This is just the first depth of higher order components (HOC).
<Connect>
    <App>
        <Connect>
            <Secure>
                <Connect>
                    <Root>
                    </Root>
                </Connect>
            </Secure>
        </Connect>
    </App>
</Connect>

The selector for each of these components becomes immediately annoying.
{
    app: {
        secure: {
            root: {
                lotsOfRootState: ''
                , ... furtherNestedHOCs
            }
            , someSecureState: ''
        }
        , public: {
            login: {
                someLoginState: ''
            }
            , somePublicState: ''
        }
    }
    , someGlobalState: ''
}

let rootSelector = (state) => {
    return {
        ...app.secure.root
    }
}

let Root = connect(rootSelector)(root)

Now, luckily the atom for these pieces -can- be flat, since there's no real state sharing between a secure / public app or the root. We could even use a special "global" state indicator for those key pieces of app knowledge.
{
    _meta: {
        isAuthenticated: true
    }
    , root: { }

}

mapStateToPropsSecure = (state) => {
    return {
        ...state.meta
    }
}

mapStateToPropsRoot = (state) => {
    return {
        ...state.root
    }
}

The problem arises when you get into any real nesting of related components.
<Connect>
    <Root>
        <Connect>
            <GroupManager>
                <Connect>
                    <Group>
                        <Item />
                        <Item />
                        <Item />
                        <Item />
                        <Item />
                    </Group>
                </Connect>
            </GroupManager>
        </Connect>
    </Root>
</Connect>

Assume those <Item />'s originate from a this.props.items.map() inside the <Group>, but each item is complex enough to justify its own reducer (for the reason that we don't want to manage a collection of complex HOCs inside another HOC. Those would look something like this:
let groupReducer = (state, action) => {
    // ...
    // do some state processing
    // ...

    return {
        group: {
            someGroupState: ''
            , items: state.group.items.map(itemReducer)
        }
    }
}

let itemReducer = (state, action) => {
    // ...
    // do some state processing
    // ...

    return {
        item: {
            itemState: ''
            , moreItemState: ''
        }
    }
}

This means that rather than <Item some-prop={} /> being declared in the <Group> view, an <Item> would become a connect(selector)(Item) component that extracts necessary state form the atom.

@gaearon
I fiund thus question by you (on S.O.) and another one by @ide (i just commented on that too so i apologize for the inadvertent loop) grappling with the effecf of this same exact issue, which was not satisfied IMO with the batchedupdate answer (you are still going to have overhead that grows with the complexity of the component tree)
https://github.com/rackt/redux/issues/125
http://stackoverflow.com/questions/25701168/at-what-nesting-level-should-components-read-entities-from-stores-in-flux
I think the answer on S.O. is not ideal... leaving it to the programmer is not a comforting solution
have you any updated insight?

I don't understand what exactly you are asking. Please create a new SO question and link to it?

My question is it seems that both in this thread and on S.O. there are two points of view on how to compose components with Redux.

Have a connector at the root of the component tree with state being pushed down to descendants as props and all descendants being pure stateless components

All components in a component tree are stateful and have a connector

I understand from the S.O. thread that there are tradeoffs and benefits to each of the above approaches but I don't understand what the ideal way would be. Is it 1 or 2 or a combination of both as suggested in the accepted S.O. answer? Or is it some other model. I'm trying to understand how best to compose components when using Redux.
Your analysis in that S.O. post is very clear, and you seem to have been looking for the right solution but it's not clear what that is, and more importantly how composition should be done in Redux.

Both approaches are extreme. We suggest taking the middle approach.
Try to create presentational components and use them when possible. However when you feel like you're passing data through components in the middle that don't use it, it's a good signal that it's time to create a container component for that presentational component.
So basically create containers when you feel like some particular component has become hard to reuse because it requires too much unrelated data that parent components don't care about.
I strongly suggest you to watch the last 10 videos of my course because they deal with this particular question: https://egghead.io/series/getting-started-with-redux


Upgrade golangci-lint to 1.19.1

Fix whitespace and stylecheck error.
Disable godox.
preparing pion/.goassets#4

Codecov Report

Merging #47 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #47   +/-   ##
=======================================
  Coverage   82.48%   82.48%
=======================================
  Files          15       15
  Lines        1496     1496
=======================================
  Hits         1234     1234
  Misses        180      180
  Partials       82       82

Impacted Files
Coverage Δ

test/util.go
80.85% <ø> (ø)
:arrow_up:

packetio/buffer.go
100% <ø> (ø)
:arrow_up:

test/stress.go
79.59% <ø> (ø)
: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 2a6620c...26fa037. Read the comment docs.


Send clipboard to remote neovim process

Run neovide from wsl:
$ neovide.exe --wsl file.txt

1)write random symblos
2) press v in normal mode

3) "+y
4) doesn't copy to clipboard.
With the paste the situation is similar.
if i run without --wsl flag this will work correctly.

Does the same thing happen with other neovim guis? I believe this is an upstream issue that can't be fixed in neovide.

No! this is doesn't work only in neovide's wsl mod! in nvim-qt and neovide without wsl flag its works correctly

The struggle is that unless the neovim process can get access to the os clipboard from within wsl, I don't think this is something that can be solved...
I think this would require an upstream implementation of externalizing of the clipboard which to my knowledge doesn't exist today.

This is possible on WSL2 --- I have it currently working with just a set clipboard+=unnamedplus in my init.vim

@djsavvy  ,thanks, but it didn't work

@djsavvy Sadly didn't work for me either

For posterity, a solution would be to do what ianyepan says here, but you need to add it to a folder like /usr/local/bin, it cannot be a folder you artificially added to path in .profile or the like.
My problem was that I added win32yank.exe to ~/.local/bin, which was a folder I added to path in .profile.


After Upgrading to msal v2 in angular, MSAL Guard not considering the --base-href parameter while redirecting after loggin in

Core Library
MSAL.js v2 (@azure/msal-browser)
Core Library Version
2.14.2
Wrapper Library
MSAL Angular (@azure/msal-angular)
Wrapper Library Version
2.0.0
Description
I was using msal v1 and it was working fine. I tried to update to v2 and I made all the configuration. Application was working on my local computer. But I am facing issue while deploying to server.
I don't host my application on a root path instead in a folder named "mywebsite", So while building the application I use the following command.
ng build --base-href=/mywebsite/
Application is running fine in this URL www.test.com/mywebsite. Please find the below logs.

But After the login it is redirecting me to
https://www.test.com/abc instead of www.test.com/mywebsite/abc and it says page can't be found.
But if I access the url directly www.test.com/mywebsite/abc, application is working fine without any issues
Please let me know how to fix this issue.
Error Message
404 Error: This page www.test.com/abc can't be found
No webpage was found for the web address: https://www.test.com/abc

Msal Logs
No response
MSAL Configuration
export function MSALInstanceFactory(): IPublicClientApplication{
  return new PublicClientApplication({
    auth: {
      clientId: 'xxxxx',
      authority: 'https://login.microsoftonline.com/xxxx',
      redirectUri: 'https://www.test.com/mywebsite'
    },
    cache: {
      cacheLocation: BrowserCacheLocation.LocalStorage,
      storeAuthStateInCookie: isIE, // set to true for IE 11
    },
    system: {
      loggerOptions: {
        loggerCallback,
        logLevel: LogLevel.Info,
        piiLoggingEnabled: false,
      },
    },
  });
}

export function MSALInterceptorConfigFactory(): MsalInterceptorConfiguration {
  const protectedResourceMap = new Map<string, Array<string>>();
  protectedResourceMap.set('https://www.test.com/api/v1', ['api://xxxx']);
  protectedResourceMap.set('https://graph.microsoft.com/v1.0/m', ['user.read']);

  return {
    interactionType: InteractionType.Redirect,
    protectedResourceMap
  }
}

export function MSALGuardConfigFactory(): MsalGuardConfiguration {
  return {
    interactionType: InteractionType.Redirect,
    authRequest: {
      scopes: ["user.read",
    "openid",
    "profile",'api://xxxx']
    }
  };
}

Relevant Code Snippets
const routes: Routes = [
  {
    path: "abc",
    loadChildren: () => import("./abc/abc.module").then((m) => m.AbcModule),
    canActivate: [MsalGuard],
  },
  {
    path: "help",
    component: HelpComponent,
  },
  {
    path: "home",
    component: HomeComponent,
  },
  { path: "**", redirectTo: "home" },
];

export function isInIframe() {
  return window !== window.parent && !window.opener;
}

@NgModule({
  imports: [
    RouterModule.forRoot(routes, {
      useHash: false,
      initialNavigation: isInIframe() ? "disabled" : undefined,
    }),
  ],
  exports: [RouterModule],
})
export class AppRoutingModule {}

Reproduction Steps
Open a URL which has MSALGuard
Expected Behavior
It should redirect to https://www.test.com/mywebsite/abc
instead of https://www.test.com/abc
Identity Provider
Azure AD / MSA
Browsers Affected (Select all that apply)
Chrome, Edge
Regression
No response
Source
External (Customer)

we are using the "@azure/msal-browser": "^2.14.0" in angular 10.  Created the azure app service root and subfolder virtual directory, deployed the angular applications respectively into root and subfolder.
For example
Root site :  https://domain.com/
Subfolder site :  https://domain.com/site1
we are this build command for
root app: ng build --configuration=dev
subfolder site : ng build --configuration=dev --base-href /site1/
Scenario 1:
when browse the url https://domain.com/site1, but it redirects to the root app (https://domain.com/) instead of subfolder site (https://domain.com/site1).
Scenario 2
when browse the url https://domain.com/, it's login to root app. then if click on subfolder site (https://domain.com/site1), it works fine that redirecting to subfolder site(site1). when refresh from the page from subfolder site(site1). MSAL browser redirects to root app instead of subfolder site(site1).
Expected Behavior
when refresh the page from https://domain.com/site1 It should redirect to https://domain.com/site1 instead of https://domain.com/
Please provide the solution if anyone has fixed the issue.

Apologies for the delay, we'll look into fixing this soon, thanks!

As a workaround, make sure that the correct base url is set in the base element that is rendered on the page. We'll look into making the interceptor smarter to be able to pick up a base url that is passed via the command line.

Hello @jasonnutter , Thanks for looking into this issue. Could you please let me know where to add this base element ?
Because, when I use this command to build ng build --base-href=/mywebsite/, It will automatically add the base element to index.html. Please find the index.html which is generated using this command. But still it doesn't work.
<!doctype html>

  <meta charset="utf-8">
  <title>NexGenPIRL</title>
  <base href="/mywebsite/">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="./assets/images/LIILogo.png">
  <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="styles.543307f9231b15d56c24.css">

  <app-root></app-root>
  <app-redirect></app-redirect>

@johnvinosh Unfortunately, I am unable to reproduce your issue. When setting --base-href (and correct redirect uri in msal), I get redirected back to the correct app. Can you please try reproducing this with one of our samples? https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-angular-v2-samples

Hello @jasonnutter , I can able to reproduce the issue using Angular 10 Sample App which is taken from this repository.
Angular 10 Sample
Please find the steps which I did to reproduce the issue.

Downloaded the sample app from Angular 10 Sample
Ran npm install
Updated the cliendId, authority and redirectUri in app.module.ts
Updated the graph url in app.module.ts and profile.component.ts
Ran build command ng build --base-href=/mywebsite/
Build generated the folder in dist.
Renamed the folder to 'mywebsite'
Deployed the folder to my tomcat server.
App was running fine in the following URL https://www.test.com/mywebsite. Please find the screenshot for the same.

Now when I click on Login, Everything was working fine. It is redirected to the login in screen and it is coming back to the https://www.test.com/mywebsite URL.

But here is the issue. Without logging in, Click on the Profile button. MSALGuard is redirecting me to login screen.

Once After login is completed it is navigating back to https://www.test.com/profile instead of https://www.test.com/mywebsite/profile and shows page cannot found.

But if I navigate to the URL https://www.test.com/mywebsite/profile manually, It is working fine.

@jasonnutter You are right. After commenting out that line. It is working now as expected.
But just want to understand, What will be the impact of removing it. Will there be any performance issues ?
Will it be fixed on future release ?

@johnvinosh The custom navigation client is provided to make navigating between pages in your site (in the context of MSAL) faster, so removing will mean actions like navigating between the redirect uri and redirect start page will take longer (as it will no longer use the Angular router).
And yes, we'll look into fixing this.


Add support to angular 13

What kind of change does this PR introduce? (check one with "x")

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior? (You can also link to an open issue here)
Fixes #2042
What is the new behavior?
Ivy partial compilation
Does this PR introduce a breaking change? (check one with "x")

[x] Yes
[ ] No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information:
Add enabled ivy partial compilation

any idea when this will be merged?

Any updates on when this will be added?

I wonder when will this be get merged ?

When can this PR be merged?

I don't have idea, but I still waiting.

I'm also patiently awaiting the decision on this!

Any updates on this?

would be great if this PR can be merged! Thank you

@ricardochl The package step is not working for me: https://github.com/swimlane/ngx-datatable/pull/2056#issuecomment-1059280952 I tried both the master and your branch.

do you guys know approx. when this can be merged? Thank you!

Any update when it can be merged?

Any update on this? Thanks

I have taken @ricardochl patch and published the library as @achimha/ngx-datatable version 21.0.1 for Angular 13. To use it, you have to change your package.json and also your import statements. I did not find any issues using it in Angular 13.