Fix pattern

This pull request demonstrates how the pattern I proposed in the discussion we had in my repo should be implemented.
A few things of note:

You added some of the "extended" methods (e.g., where(), skip(), select()) to LinqBase. If the idea is still to have a minimal class that only provides the bare minimum, those methods should be added to LinqExtendedBase.
Overall, the set of filter methods is a bit confusing and creates breaking changes (which should be reflected by bumping the major version). The question is whether we could have multiple overloads of just a filter() method:

You renamed the filters() methods to applyFilters(). While I like the new name better, this is a breaking change.
You renamed the filter(...filters: IterableFilter<T>[]) method to filterWith(...filters: IterableFilter<T>[]). This is also a breaking change. I don't see why you needed to do this.
The remaining filter(filter: IterableFilter<T>): TLinq only takes a single parameter.

I removed a "filter" method that is actually a transformation (as you already stated in the documentation): filter<TResult>(filter: IterableValueTransform<T, TResult>): Linq<TResult>. This broke some unit tests, which I fixed by using transform(notNull) instead of filter(notNull). In my mind, a filter should only ever return sequences of the exact same type. However, notNull is a transformation (that even sits in your transformations subfolder) and should, therefore, be used as a parameter of the transform() function rather than a filter() function. I believe that removing that method solved one of your problems because all filter() overloads can now have a return type of TLinq.
You added methods to Linq<T> and LinqExtended<T>, which is not necessary with the proposed pattern. The idea of this pattern is to only create a concrete subclass with no additional methods as I demonstrate in this pull request (and previously in my repo). Further, the idea is to have an inheritance hierarchy like LinqBase<= LinqExtendedBase <= LinqEvenMoreExtendedBase, where this repo provides LinqBase and LinqExtendedBase and users could optionally add further abstract (e.g., LinqEvenMoreExtendedBase) or concrete subclasses. Subclasses "tap" into that hierarchy by extending from LinqBase, LinqExtendedBase, or LinqEvenMoreExtendedBase, not from Linq or LinqExtended.
Where methods implemented by LinqBase or LinqExtendedBase return a Linq<T> or LinqExtended<T>, those methods would have to be overridden by more derived classes wanting to return themselves or subclasses of themselves. The question I asked in our discussion was whether you'd have an idea on how this could be avoided. My attempts at using generic factory methods were not successful. Should this in fact be impossible to realize, overriding such methods in subclasses as currently done is the only option.
I changed the implementations of first(), last(), and single() and the corresponding xOrDefault() methods. Firstly, they should all take an optional predicate. Secondly, xOrDefault() should not take a default value if you want to mimic the .NET counterparts. Thus, my proposed implementations take a predicate but no default value. However, I added the defaultIfEmpty(defaultValue: T): TLinq method to deal with that.

This PR is not yet complete and we should discuss the shape of the API.
Lastly, I apologize for any unnecessary formatting changes that are introduced by Prettier. There is no .prettierrc, so we did not use the same settings.

Sorry, I commented in more detail on our other thread.  Please close that one if you think it's ok.

First off, as much as I would have liked to remove the filter method that acts as a transform, I cannot because it is a legitimate breaking change that is not an uncommon use case.
For example:
linqSequence.filter(nonNull);

A very common case in the tests.  nonNull is actually a transform but from a consumers perspective, it is a filter.  The type safety considers the result to be T but not the same so it isn't a pure transform.  The code that drives the method is not any different, it's simply a type safety problem.

You added methods to Linq and LinqExtended, which is not necessary with the proposed pattern.
Consider that one of the more common use cases for LINQ is iterating filtered results.  Linq<T> can still cover most of these use cases without incurring more download overhead.  I took into consideration the balance of the feature set for what default functionality it exposes.  For example, with the new LinqBase<T> pattern, the .where method (a very common use case) could remain available for all inherited classes.  The benefit simply outweighed the cost especially when this repo is designed with granularity in mind.  If someone wanted a lighter weight version of Linq<T> or even less from LinqBase<T> they could easily just use the filters, transforms, and resolutions by themselves (functionally) without a class and incur no additional overhead.

I changed the implementations of first(), last(), and single() and the corresponding xOrDefault() methods. Firstly, they should all take an optional predicate. Secondly, xOrDefault() should not take a default value if you want to mimic the .NET counterparts. Thus, my proposed implementations take a predicate but no default value. However, I added the defaultIfEmpty(defaultValue: T): TLinq method to deal with that.

I have a hard time agreeing with this one as I've previously spent a lot of time considering why it should or shouldn't be that way.
linqSequence
  .where(predicate)
  .firstOrDefault()
// vs
linqSequence
  .firstOrDefault(predicate)

Here's the problem:  You simply can't have the best of both worlds here.
Exposing a default value option is important in TypeScript because there might be a preference of returning null instead of undefined or 0 instead of undefined if it's a number.  Covering default value use cases would be a painful and probably bug ridden block of code.  This is not an issue in C# as it has a real type system that will return 0 as a default value for a number and null for a string, etc.  IMO, the former .where(predicate).firstOrDefault() is a more explicit, and simpler implementation.
As a side effect of this type of implementation, it can be difficult if not impossible to have a delegate as a parameter as it could be confused with an element in the collection.

Where methods implemented by LinqBase or LinqExtendedBase return a Linq or LinqExtended, those methods would have to be overridden by more derived classes wanting to return themselves or subclasses of themselves. The question I asked in our discussion was whether you'd have an idea on how this could be avoided.

Without overriding the where method explicitly I don't see this happening.  I might misunderstand your intent for your use-case.  But the .where(predicate) method should always return the same type that it belongs to.  This is now exactly how the inheritance behaves.  It's simply a filter.

I reviewed your changes.  I appreciate the work.  But changes going forward should work with the implemented base classes, etc.
Although I'm not enforcing every style nuance, this repo does use tabs for indent.
I do encourage you to take v1.2 as-is and attempt to make tweaks that might work in your favor and possibly attempt another PR.

Where methods implemented by LinqBase or LinqExtendedBase return a Linq or LinqExtended, those methods would have to be overridden by more derived classes wanting to return themselves or subclasses of themselves. The question I asked in our discussion was whether you'd have an idea on how this could be avoided.

Without overriding the where method explicitly I don't see this happening. I might misunderstand your intent for your use-case. But the .where(predicate) method should always return the same type that it belongs to. This is now exactly how the inheritance behaves. It's simply a filter.

Sorry, you misunderstood my question. Replace "Where methods" with "If methods" in my first sentence. It has nothing to do with the where(predicate: PredicateWithIndex<T>): TLinq method. This is about the methods that are currently explicitly returning a Linq<T> or LinqExtended<T> rather than a generic type such as TLinq. For example:

select<TResult>(selector: SelectorWithIndex<T, TResult>): Linq<TResult>
selectMany<TResult>(selector: SelectorWithIndex<T, Iterable<TResult>>): Linq<TResult>

AH!  Ok.  There's no way around that as you have to explicitly expose the TResult.  I wish there was, but there is not.
I added them as Iterable<T> to the base class because it did provide value for those common cases where the consumer would simply:
for(const e of linq(source)
    .where(predicate)
    .skip(10).take(10)
    .select(mapping)) {
    // Iterate filtered and mapped results.
}

Sadly, you have to override these TResult methods because you can't use the TLinq pattern to do that.
One thing I would love for TypeScript to allow was to override the typing in the sub-classes.   Like the new keyword in C#.
But as far as I know, that's not a thing. :(  So we have to override these in sub-classes.

I reviewed your changes. I appreciate the work. But changes going forward should work with the implemented base classes, etc. Although I'm not enforcing every style nuance, this repo does use tabs for indent. I do encourage you to take v1.2 as-is and attempt to make tweaks that might work in your favor and possibly attempt another PR.

Regarding the style, could you provide a .prettierrc (or .editorconfig) that reflects your style? Without something like that, it is hard to comply.
Regarding your v1.2, I see those base classes as an optional convenience feature. The "real meat" lies in the functions that are exposed through those classes. Do you agree with that statement?
In their current shape, the base classes do not provide enough of what I need to justify a dependency and the associated risk of incurring breaking changes to my public API. Further, as suggested by this PR, I am not entirely happy with the shape of the API offered by those base classes. Therefore, I don't think that I am going to use them.
For example, the single(), first(), and last() methods and their corresponding OrDefault() siblings as provided by LinqResolverBase (not sure why you did not call that LinqExtendedBase) are incompatible with their .NET counterparts and, therefore, do not offer the API that I want to provide (i.e., something that is compatible with the .NET world). In .NET, those methods allow you to specify a predicate, which I always use unless I don't need a predicate. In fact, ReSharper always proposes to replace .where(predicate).first(), for example, with .first(predicate). Thus, if I were to reimplement portions of my C# codebase in TypeScript, I would definitely need those methods.
While you would not see any occurrence of something like .where(predicate).first() in my codebase, you can of course still use that pattern even with my API ... unless you write C# code, have ReSharper, and accept the suggestions to streamline your code.

AH! Ok. There's no way around that as you have to explicitly expose the TResult. I wish there was, but there is not.
I added them as Iterable<T> to the base class because it did provide value for those common cases [...]

They don't have to return Iterable<TResult>. They can return Linq<TResult> or LinqExtended<TResult>, for example. However, that still means we'll have to override those methods in subclasses that want to return a more derived class.

Regarding the style, could you provide a .prettierrc (or .editorconfig) that reflects your style? Without something like that, it is hard to comply.

I originally had something like this but it was causing issues.  I'll look into it again.

In their current shape, the base classes do not provide enough of what I need to justify a dependency and the associated risk of incurring breaking changes to my public API.

I'm a bit shocked and confused by this as the changes (for the most part) were made in order to accommodate the inheritance you needed.  I wouldn't worry about further breaking changes (as I commented in the other thread).
If you can't use them, then you can't use them, and I can totally understand that as inheritance can end up just being bloat.
They then become a template (or possible guide) for you or others to write their own LINQ helper classes.
The changes I made yesterday, I did not make lightly.  I saw them as necessary.
https://github.com/OpenXmlDev/linq-to-xml/issues/1#issuecomment-1025156225

For example, the single(), first(), and last() methods and their corresponding OrDefault() siblings as provided by LinqResolverBase (not sure why you did not call that LinqExtendedBase)

Because it extended from LinqBase<T> and ultimately provided resolutions for other classes to inherit from.
In the end, the name matters little as it is exposed as default and any consumer can call it what they will.
I admit, I struggled with naming.  LinqExtendedBase didn't seem right to me as LinqExtended has a lot more purpose on it's own.

| ... incompatible with their .NET counterparts and, therefore, do not offer the API that I want to provide (i.e., something that is compatible with the .NET world). In .NET, those methods allow you to specify a predicate, which I always use unless I don't need a predicate. In fact, ReSharper always proposes to replace .where(predicate).first(), for example, with .first(predicate). Thus, if I were to reimplement portions of my C# codebase in TypeScript, I would definitely need those methods.
I think you have a fair point here.
I propose that it is completely safe to add an optional delegate to .first(predicate?) .last(predicate?) and .single(predicate?).

Keep in mind that .defaultIfEmpty() does not solve every case as .single() throws if there are more than one.  (As it does in .NET)

I changed the implementations of first(), last(), and single() and the corresponding xOrDefault() methods. Firstly, they should all take an optional predicate. Secondly, xOrDefault() should not take a default value if you want to mimic the .NET counterparts. Thus, my proposed implementations take a predicate but no default value. However, I added the defaultIfEmpty(defaultValue: T): TLinq method to deal with that.

I have a hard time agreeing with this one as I've previously spent a lot of time considering why it should or shouldn't be that way.
linqSequence
  .where(predicate)
  .firstOrDefault()
// vs
linqSequence
  .firstOrDefault(predicate)

Here's the problem: You simply can't have the best of both worlds here. Exposing a default value option is important in TypeScript because there might be a preference of returning null instead of undefined or 0 instead of undefined if it's a number. Covering default value use cases would be a painful and probably bug ridden block of code. This is not an issue in C# as it has a real type system that will return 0 as a default value for a number and null for a string, etc. IMO, the former .where(predicate).firstOrDefault() is a more explicit, and simpler implementation.
As a side effect of this type of implementation, it can be difficult if not impossible to have a delegate as a parameter as it could be confused with an element in the collection.

Looking at your code snippet above, linqSequence.firstOrDefault(predicate) is more concise, not less explicit, and suggested by ReSharper in C# instead of linqSequence.where(predicate).firstOrDefault(). If you look at the code in this PR, you will see that I added the following method, which does the job of filtering the sequence:
private filterSequence(predicate?: PredicateWithIndex<T>): Iterable<T> {
    return predicate ? where(predicate)(this.source) : this.source;
}

This is used by all methods offering an optional predicate. For example:
firstOrDefault(predicate?: PredicateWithIndex<T>): T | null {
    return firstOrDefault<T>()(this.filterSequence(predicate)) ?? null;
}

Talking about default values, consider the following code snippet, which shows exactly what one would do in .NET:
const result = linqSequence
    .defaultIfEmpty(defaultValue)
    .firstOrDefault()

What is the problem with that?
Yes, you can offer an overload in TypeScript that takes a default value. However, you should also offer an overload that corresponds to what you have in .NET.
Looking at your implementation of firstOrDefault<T>(defaultValue: T): IterableTransform<T, T>, it essentially reimplements what you have already implemented in your own implementation of defaultIfEmpty<T>(defaultValue: T): IterableFilter<T>. Why didn't you compose the two?

They don't have to return Iterable. They can return Linq or LinqExtended, for example. However, that still means we'll have to override those methods in subclasses that want to return a more derived class.

This makes an argument that there is no value in select and selectMany in the base classes.
You might be right.

In response to your above comment about firstOrDefault.
Explain to me how you would offer configuring a default value for .singleOrDefault() without things getting way more complicated than they are.   Remember that TS and C# are different.  0 is the default for a number in C# but not in TS.

In their current shape, the base classes do not provide enough of what I need to justify a dependency and the associated risk of incurring breaking changes to my public API.

I'm a bit shocked and confused by this as the changes (for the most part) were made in order to accommodate the inheritance you needed. I wouldn't worry about further breaking changes (as I commented in the other thread).

You would have to go "all in" and not introduce any conflicting or unwanted APIs for me to be able to extend those classes. You don't have to do that, of course. However, in that case, I am better off with my own root base class. No hard feelings here. Your base classes will add value for other users.

You would have to go "all in" and not introduce any conflicting or unwanted APIs for me to be able to extend those classes. You don't have to do that, of course. However, in that case, I am better off with my own root base class. No hard feelings here. Your base classes will add value for other users.

I would like to not touch the API at all.  I would like this repo to be complete and golden.
The changes I made were for the better because you showed me the benefit.
I would like to help make your work easier if I can and if it 'fits' it would prove to me that I don't need to make any more changes.

Keeping an open mind (me).
Adding .first, .single and .last (and their respective .orDefault() methods is very new for LinqExtended.
They could be done different.
But you have to explain to me how you would solve the default problem as I mentioned above.

In response to your above comment about firstOrDefault.
Explain to me how you would offer configuring a default value for .singleOrDefault() without things getting way more complicated than they are. Remember that TS and C# are different. 0 is the default for a number in C# but not in TS.

Firstly, to be honest, I almost never (> 99% of the cases) set a default value with DefaultIfEmpty() in C#. Therefore, I would likely not miss anything if there was no option to set a default value, be it with defaultIfEmpty(defaultValue: T) or by way of an optional parameter of firstOrDefault(), for example.
Secondly, I use those methods to make assertions about the sequences. For example, where I expect exactly one element, I use Single() and not First() or even FirstOrDefault(). Where I expect zero or one element, I use SingleOrDefault(), not FirstOrDefault(), for example. When SingleOrDefault() returns null, this is just a case that needs to be treated somehow.
For example, in Open XML, the w:document element can have zero or one w:body children. Assuming document represents the w:document XElement, if you try to get the body element by calling document.elements(W.body).singleOrDefault() and that returns null, you'd have to add a new w:body XElement to its parent w:document before you can continue. If the result is not null, you can work with it.
If I had to produce a default value for singleOrDefault(), I would do the following:
const value = linqSequence
    .defaultIfEmpty(defaultValue)
    .singleOrDefault();

This would return defaultValue in case linqSequence was empty. It would still throw if the sequence contained more than one element. That would be totally fine because, if I use singleOrDefault(), this is exactly what I want. Thus, my rules would be as follows:

Don't use single() if you do not want to assert that the sequence contains exactly one element.
Don't use singleOrDefault() if you do not want to assert that the sequence contains zero or one element.

@ThomasBarnekow ... Here's a thought I just had.
In respect to the .orDefault methods...
Remember that in C# default is specific to that type.
But what about:
.firstOrUndefined() // no value param required or expected.
.firstOrUndefined(predicate)

It would then be possible to allow for
firstOrDefault<T>(T defaultValue,  predicate?: PredicateWithIndex<T>) : T

I think you're missing the point here.
https://github.com/tsdotnet/linq/pull/3#issuecomment-1025199411
Without potentially adding a lot of code, .firstOrDefault<number>() will behave differently than .FirstOrDefault<double>() in C#.

BTW, I have no qualms adding this as an overload:
firstOrDefault<T>(T defaultValue,  predicate?: PredicateWithIndex<T>) : T

You would have to go "all in" and not introduce any conflicting or unwanted APIs for me to be able to extend those classes. You don't have to do that, of course. However, in that case, I am better off with my own root base class. No hard feelings here. Your base classes will add value for other users.

I would like to not touch the API at all. I would like this repo to be complete and golden. The changes I made were for the better because you showed me the benefit. I would like to help make your work easier if I can and if it 'fits' it would prove to me that I don't need to make any more changes.

I do accept that you would like to not touch the API at all. Mind you I also don't ask you to do that (the main purpose of this PR was to show you how to correctly implement the pattern, which you should still consider doing). But since you somehow wanted me to inherit from your base classes, I am just explaining to you what you would have to do for me to be able to do that (i.e., accept the PR in its essence). The changes you would have to make are more involved than what you would want to do -- which is completely fine. Therefore, I still need to establish my own root class, which is already done and fully covered by unit tests.
The beauty of your project is that it offers functions (filters, transformations, resolutions) that can be combined in any desired way. This is why I use it.

I think you're missing the point here. #3 (comment)
Without potentially adding a lot of code, .firstOrDefault<number>() (TS) will behave differently than .FirstOrDefault<double>() in C#. (Because you'd have to cover all cases for all types)
Your point is well taken about .DefaultIfEmpty(). I can't remember seeing it.

It's taken a while, but now I think I got your point on the default values. My use cases almost always deal with reference types (e.g., XElement, XAttribute, string), where null is indeed the default value, so sequences of value types where the default value would be 0 or false, for example, are not "high on my list". If you wanted to treat them correctly all the time, wouldn't you have to require a default value parameter as in the overload below?

firstOrDefault<T>(T defaultValue, predicate?: PredicateWithIndex<T>) : T

Would there even be an option to deal with that in code alone, i.e., without providing a default value? The value types that require special treatment would be number, bigint, and boolean, right? How do you determine the element type of an empty sequence?

@ThomasBarnekow Here is my proposed change.
https://github.com/tsdotnet/linq/pull/5/files#diff-fa0157cfacfede9e5e324cac6b8d5a2f2031fe7c9d9cd95b87db1404fd68d4cf
If you approve, I will merge and publish as v1.3

The .d.ts looks like this now: (if approved)
/**
 * @author electricessence / https://github.com/electricessence/
 * @license MIT
 */
import { PredicateWithIndex } from '@tsdotnet/common-interfaces';
import LinqBase from "./LinqBase";
export default abstract class LinqExtendedBase<T, TLinq extends LinqExtendedBase<T, TLinq>> extends LinqBase<T, TLinq> {
    constructor(source: Iterable<T>, create: (source: Iterable<T>) => TLinq);
    /**
     * Returns all the entries in the sequence as a new array.
     * @return {T[]}
     */
    toArray(): T[];
    /**
     * Returns the number of entries in a sequence.
     * If a predicate is provided, filters the count based upon the predicate.
     * Otherwise counts all the entries in the sequence.
     * @param {PredicateWithIndex<T>} predicate
     * @return {boolean}
     */
    count(predicate?: PredicateWithIndex<T>): number;
    /**
     * Returns true if the predicate ever returns true; otherwise false.
     * If no predicate is provided, returns true if the sequence has any entries.
     * @param {PredicateWithIndex<T>} predicate
     * @return {boolean}
     */
    any(predicate?: PredicateWithIndex<T>): boolean;
    /**
     * Returns false if the predicate ever returns false; otherwise true.
     * @param {PredicateWithIndex<T>} predicate
     * @return {boolean}
     */
    all(predicate: PredicateWithIndex<T>): boolean;
    /**
     * Returns the expected single element; otherwise throws an InvalidOperationException.
     */
    single(predicate?: PredicateWithIndex<T>): T;
    /**
     * Returns the expected single element; otherwise the provided default value.
     */
    singleOrDefault(defaultValue: T, predicate?: PredicateWithIndex<T>): T;
    /**
     * Returns the expected single element; otherwise undefined.
     */
    singleOrUndefined(predicate?: PredicateWithIndex<T>): T | undefined;
    /**
     * Returns the first element of the sequence.
     */
    first(predicate?: PredicateWithIndex<T>): T;
    /**
     * Returns the first element of the sequence or the default value if no element is found.
     */
    firstOrDefault(defaultValue: T, predicate?: PredicateWithIndex<T>): T;
    /**
     * Returns the first element of the sequence; otherwise undefined.
     */
    firstOrUndefined(predicate?: PredicateWithIndex<T>): T | undefined;
    /**
     * Returns the last element of the sequence.
     */
    last(predicate?: PredicateWithIndex<T>): T;
    /**
     * Returns the last element of the sequence or the default value if no element is found.
     */
    lastOrDefault(defaultValue: T, predicate?: PredicateWithIndex<T>): T;
    /**
     * Returns the last element of the sequence; otherwise undefined.
     */
    lastOrUndefined(predicate?: PredicateWithIndex<T>): T | undefined;
}

Ok after refining and reviewing, I can't see this class going backwards.
I'm going to approve the PR and publish.

You'll also note I renamed it to LinqExtendedBase as you suggested.

Here are my thoughts:

Looking at some of the methods (e.g., toArray()) in conjunction with those that you added to LinqBase, how did you determine what should already be added to LinqBase vs. LinqExtendedBase? If you want to extend the API of Linq<T> already, wouldn't it make sense to also consider other very frequent or simple methods as well?
Regarding the OrUndefined() methods, I would return null instead of undefined to signal the absence of a value. Therefore, if you wanted to add a method like that, I would call it OrNull() rather than OrUndefined(). However, I think I am even fine with the OrDefault() methods returning null in TypeScript / JavaScript. That is a language-specific "trait". For example, earlier today, I played with the following overloads:

firstOrDefault(): T | null;
firstOrDefault(predicate: PredicateWithIndex<T>): T | null;
firstOrDefault(defaultValue: T): T;

However, it looks like you have already made up your mind and merged your PR.

So as I mentioned before, YOU CANNOT mix and match these methods in TS.
firstOrDefault(): T | null;
firstOrDefault(predicate: PredicateWithIndex<T>): T | null;
firstOrDefault(defaultValue: T): T;

The proposed above would have the side effect of not being able to differentiate between a collection of delegates as a default value or the default value itself...
Like so:
linq([x=>'a', x=>'b',x=>'c']).firstOrDefault(x=>'d') // What is supposed to happen here?

| Regarding the OrUndefined() methods, I would return null instead of undefined to signal the absence of a value.
Keep in mind that:

null == undefined but null !== undefined.
null  in JavaScript is used quite often and tends to represent what is says 'a null value'.  null is also (get ready) an object.  So typeof(null) == 'object' So there is a lot of screwy things that can happen with it.  https://stackoverflow.com/questions/18808226/why-is-typeof-null-object  things that can happen with null.
undefined tends to mean what it means the value or key is 'missing'.  And that is exactly what you are asking of the API.  Is the value missing?

So as I mentioned before, YOU CANNOT mix and match these methods in TS.
firstOrDefault(): T | null;
firstOrDefault(predicate: PredicateWithIndex<T>): T | null;
firstOrDefault(defaultValue: T): T;

The proposed above would have the side effect of not being able to differentiate between a collection of delegates as a default value or the default value itself...
Like so:
linq([x=>'a', x=>'b', x=>'c']).firstOrDefault(x=>'d') // What is supposed to happen here?

Consider the following type definition:
export interface SelectorWithIndex<TSource, TResult>
{
    (source: TSource, index: number): TResult;
}

export type PredicateWithIndex<T> = SelectorWithIndex<T, boolean>;

The expression x=>'d' is not a PredicateWithIndex<T> because 'd' is not a boolean. Therefore, the TypeScript compiler will complain. However, it is possible to construct a case where the default value and the predicate would not be distinguishable. However, that would be a pretty artificial edge case.
const sequence = linqIterable<(source: any) => boolean>([
  () => true,
  () => false,
  () => true,
]).firstOrDefault(() => true);

In the above case, the parameter would be deemed a predicate. You'd have to a combination of where(), defaultIfEmpty() and a parameterless firstOrDefault().

Thinking about the default value again, there might be better ways for specifying value as opposed to using a parameter of the OrDefault() functions. For example, it might be a parameter passed to:

the constructors of Linq<T> or LinqExended<T> classes,
the linq() or linqExtended() methods,
defaultIfEmpty() transformation, which might ultimately be used by the above mechanisms.

The reason for having to specify a non-undefined or non-null default value for iterables of number, bigint, or boolean is related to the language. It is easy to return either undefined or null. To return 0 for number or bigint or false for boolean, you could specify that either when creating a sequence (using the constructor or factory functions) or using defaultIfEmpty().
What do you think? In my API, I will not add default value parameters to the OrDefault() methods.

https://github.com/tsdotnet/linq/pull/3#issuecomment-1025235691
I say again.  You'll have to trust me on this one.  Mixing these overloads in TS/JS is a disaster waiting to happen.
That said, the current changes avoid that problem completely and facilitate all possible behaviors.

https://github.com/tsdotnet/linq/pull/3#issuecomment-1025239845
This is exactly what I'm trying to avoid which is a more convoluted solution to the problem.
Things will start to permute in ways that create complexity.
Consider that if you added a property called '.defaultValue' to LinqExtendedBase<T> or even a fluent API method like .setDefault(value:T).  What if it wasn't set? Then unexpected behavior?  You would probably have to have an entirely new LinqExtendedWithDefault<T> class (for typing purposes) that allows you to overload .firstOrDefault() that adds type safety.

BTW if you like ReSharper, I suggest you try WebStorm to code your TS. 😉


New release to crates.io

@reem Please publish new release to crates.io

Build failed. I will try to update.

Should be fixed now.

Can you remove the release commit? I usually do those after PRs, instead of merging them as part of the PR.

Ok


Model class rest_framework_jwt.blacklist.models.BlacklistedToken doesn't declare an explicit app_label

Hello,
With or without installed blacklist app (with or without migrated) I am getting this error:
RuntimeError: Model class rest_framework_jwt.blacklist.models.BlacklistedToken doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
I am not using blacklisting at all. My project is a simple project with extended AbstractUser
In accounts app I am using simple import:
from rest_framework_jwt.settings import api_settings

jwt_payload_handler = api_settings.JWT_PAYLOAD_HANDLER
jwt_encode_handler = api_settings.JWT_ENCODE_HANDLER
jwt_response_payload_handler = api_settings.JWT_RESPONSE_PAYLOAD_HANDLER
expire_delta = api_settings.JWT_REFRESH_EXPIRATION_DELTA

User = get_user_model()

I would be grateful for any clues
Logs:

Traceback (most recent call last):
  File "manage.py", line 21, in <module>
    main()
  File "manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "MY_ROUTElib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "MY_ROUTElib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "MY_ROUTElib/python3.7/site-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "MY_ROUTElib/python3.7/site-packages/django/core/management/commands/runserver.py", line 60, in execute
    super().execute(*args, **options)
  File "MY_ROUTElib/python3.7/site-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "MY_ROUTElib/python3.7/site-packages/django/core/management/commands/runserver.py", line 95, in handle
    self.run(**options)
  File "MY_ROUTElib/python3.7/site-packages/django/core/management/commands/runserver.py", line 102, in run
    autoreload.run_with_reloader(self.inner_run, **options)
  File "MY_ROUTElib/python3.7/site-packages/django/utils/autoreload.py", line 579, in run_with_reloader
    start_django(reloader, main_func, *args, **kwargs)
  File "MY_ROUTElib/python3.7/site-packages/django/utils/autoreload.py", line 564, in start_django
    reloader.run(django_main_thread)
  File "MY_ROUTElib/python3.7/site-packages/django/utils/autoreload.py", line 272, in run
    get_resolver().urlconf_module
  File "MY_ROUTElib/python3.7/site-packages/django/utils/functional.py", line 80, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "MY_ROUTElib/python3.7/site-packages/django/urls/resolvers.py", line 564, in urlconf_module
    return import_module(self.urlconf_name)
  File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "MY_ROUTE_MY_ROUTE/core/urls.py", line 42, in <module>
    path('api/auth/', include('accounts.urls')),
  File "MY_ROUTElib/python3.7/site-packages/django/urls/conf.py", line 34, in include
    urlconf_module = import_module(urlconf_module)
  File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "MY_ROUTE_MY_ROUTE/accounts/urls.py", line 6, in <module>
    from accounts.views import TemporaryProfileApiView
  File "MY_ROUTE_MY_ROUTE/accounts/views.py", line 16, in <module>
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "MY_ROUTElib/python3.7/site-packages/django/utils/autoreload.py", line 54, in wrapper
    fn(*args, **kwargs)
  File "MY_ROUTElib/python3.7/site-packages/django/core/management/commands/runserver.py", line 117, in inner_run
    self.check(display_num_errors=True)
  File "MY_ROUTElib/python3.7/site-packages/django/core/management/base.py", line 390, in check
    include_deployment_checks=include_deployment_checks,
  File "MY_ROUTElib/python3.7/site-packages/django/core/management/base.py", line 377, in _run_checks
    return checks.run_checks(**kwargs)
  File "MY_ROUTElib/python3.7/site-packages/django/core/checks/registry.py", line 72, in run_checks
    new_errors = check(app_configs=app_configs)
  File "MY_ROUTElib/python3.7/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique
    all_namespaces = _load_all_namespaces(resolver)
  File "MY_ROUTElib/python3.7/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces
    url_patterns = getattr(resolver, 'url_patterns', [])
  File "MY_ROUTElib/python3.7/site-packages/django/utils/functional.py", line 80, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "MY_ROUTElib/python3.7/site-packages/django/urls/resolvers.py", line 571, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "MY_ROUTElib/python3.7/site-packages/django/utils/functional.py", line 80, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "MY_ROUTElib/python3.7/site-packages/django/urls/resolvers.py", line 564, in urlconf_module
    return import_module(self.urlconf_name)
  File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "MY_ROUTE_MY_ROUTE/core/urls.py", line 42, in <module>
    path('api/auth/', include('accounts.urls')),
  File "MY_ROUTElib/python3.7/site-packages/django/urls/conf.py", line 34, in include
    urlconf_module = import_module(urlconf_module)
  File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "MY_ROUTE_MY_ROUTE/accounts/urls.py", line 6, in <module>
    from accounts.views import TemporaryProfileApiView
  File "MY_ROUTE_MY_ROUTE/accounts/views.py", line 16, in <module>
    from accounts.serializers import TemporaryProfileSerializer
  File "MY_ROUTE_MY_ROUTE/accounts/serializers.py", line 13, in <module>
    jwt_payload_handler = api_settings.JWT_PAYLOAD_HANDLER
  File "MY_ROUTElib/python3.7/site-packages/rest_framework/settings.py", line 220, in __getattr__
    val = perform_import(val, attr)
  File "MY_ROUTElib/python3.7/site-packages/rest_framework/settings.py", line 166, in perform_import
    return import_from_string(val, setting_name)
  File "MY_ROUTElib/python3.7/site-packages/rest_framework/settings.py", line 177, in import_from_string
    return import_string(val)
  File "MY_ROUTElib/python3.7/site-packages/django/utils/module_loading.py", line 17, in import_string
    module = import_module(module_path)
  File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "MY_ROUTElib/python3.7/site-packages/rest_framework_jwt/utils.py", line 17, in <module>
    from rest_framework_jwt.blacklist.models import BlacklistedToken
  File "MY_ROUTElib/python3.7/site-packages/rest_framework_jwt/blacklist/models.py", line 13, in <module>
    class BlacklistedToken(models.Model):
  File "MY_ROUTElib/python3.7/site-packages/django/db/models/base.py", line 111, in __new__
    "INSTALLED_APPS." % (module, name)
RuntimeError: Model class rest_framework_jwt.blacklist.models.BlacklistedToken doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

Hmm I can only come up with some scenarios:

You're using the wrong package? Try: import rest_framework_simplejwt instead of rest_framework_jwt.

You didn't add the blacklist app to INSTALLED_APPS but somehow the api setting that you may or may not have set in your settings.py for blacklist rotation is set to True.

@Andrew-Chen-Wang You literally saved my day. I don´t know how did that happen but I made a spelling mistake. The first solution was indeed a hit. Thank you Andrew!
I have some open source projects if you´d like to collaborate. Cheers!

No problem! Sure, we can collaborate. Ping me in a repository, and I'll take a look!


CMake 3.20rc3: "Policy CMP0115 is not set" & "Policy CMP0120 is not set"

I've just tried the CMake 3.20rc3 release and vs 3.19.4 there are 7 new warnings building ITK master:
See: https://open.cdash.org/build/7079554/configure
There seem to be basically two:
CMake Warning (dev) at CMake/ITKModuleTest.cmake:62 (add_executable):
  Policy CMP0115 is not set: Source file extensions must be explicit.  Run
  "cmake --help-policy CMP0115" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

and
  Policy CMP0120 is not set: The WriteCompilerDetectionHeader module is
  removed.  Run "cmake --help-policy CMP0120" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

I don't really know CMake so have no patch to offer...

Isn't this addressed in PR #2376 ?

The CMP0115 ones, probably. The CMP0120 ones I'm not sure.
I created this issue before you created your PR.  I thought it was why you made your PR. :)

As for the CMP0115 warnings we will not know for sure unless the branch is tested on the builds of interest, but I'd dare to say that the mentioned PR will certainly address them. Let me know if you try the patch set before it gets hopefully merged.

I think we should just merge it.  I made an analogous change in VTK and it worked there.

BTW I've had to downgrade cmake on Rogue17, but it's still on Rogue19.

@jhlegarreta so your change fixed the CMP0115 warnings.
There are still the 4 CMP0120 warnings left:
https://open.cdash.org/build/7088839/configure

@jhlegarreta so your change fixed the CMP0115 warnings.

:+1:

There are still the 4 CMP0120 warnings left:

I will leave these to whoever can devote time to them.

@bradking perhaps you know how to address the CMP0120 ones in ITK?  If I update cmake on all my bots, it will colour the dashboard a fair bit...

The CMP0120 documentation lists alternatives to WriteCompilerDetectionHeader.  ITK (and vxl/vcl) need to be updated to use one of those.
@seanm as a temporary solution for your dashboard builds pending a fix to this issue, you can add CMAKE_POLICY_DEFAULT_CMP0120:STRING=OLD to the initial cache.  That will silence these warnings for now.
Note however that setting the policy to OLD is not a proper solution to this issue in ITK itself.  The WriteCompilerDetectionHeader is deprecated, and so ITK needs to be ported away from it.

Workaround inhttps://github.com/InsightSoftwareConsortium/ITK/pull/2464 but we should address this properly in ITK 5.3


[improve][broker]Avoid runtime check hasFilter in EntryFilterSupport

Motivation
A minor improve for entries fiilter by avoid runtime check has filter or not  in EntryFilterSupport and make the code more clear.
Modifications
Add a protected final field hasFilter in EntryFilterSupport
Verifying this change

[x] Make sure that the change passes the CI checks.

Documentation

[ ] doc
[ ] doc-required
[x] doc-not-needed
[ ] doc-complete

Matching PR in forked repository
PR in forked repository:https://github.com/AnonHxy/pulsar/pull/10

Codecov Report

Merging #18066 (b0eb8be) into master (6c65ca0) will decrease coverage by 8.01%.
The diff coverage is 28.57%.

@@             Coverage Diff              @@
##             master   #18066      +/-   ##
============================================
- Coverage     34.91%   26.90%   -8.02%
+ Complexity     5707     3509    -2198
============================================
  Files           607      393     -214
  Lines         53396    43410    -9986
  Branches       5712     4462    -1250
============================================
- Hits          18644    11680    -6964
+ Misses        32119    29868    -2251
+ Partials       2633     1862     -771

Flag
Coverage Δ

unittests
26.90% <28.57%> (-8.02%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.


GPG-key list is only available on Git Bash

How to reproduce the problem

Open windows CMD and initrepo.
Type your local repo name.
GPG key list is not shown.

I can repro this on my end. As a workaround, use initrepo in git bash as you usually do until a fix is released.

I could also add an error message for dependencies such as gpg. If its command fails, display possible causes.

Fixed in 7d7ae2a


adding a timer

My quizgame is missing a timer.
i would want to add a timer for each question, and encourage users to answer within a certain time limit. This can add an element of challenge to the game. As a bonus, i would like to modify the length of the timer for each question depending on the difficulty.

I do this !


ERROR when Uglify

I am using the drafjs-mention-plugin, but when I try to build in the production, I got this error.
The version of the mention-plugin is 2.1.0
ERROR in vendor.c0939953.js from UglifyJs
I digging into the node_modules/find-with-regex/build/index.js
I found that maybe it's the first line of the following code that causing this error
import 'draft-js';

var findWithRegex = function findWithRegex(regex, contentBlock, callback) {
  // Get the text from the contentBlock
  var text = contentBlock.getText();
  var matchArr = void 0;
  var start = void 0; // eslint-disable-line
  // Go through all matches in the text and return the indizes to the callback
  while ((matchArr = regex.exec(text)) !== null) {
    // eslint-disable-line
    if (matchArr.index === regex.lastIndex) {
      regex.lastIndex++;
    }
    start = matchArr.index;
    callback(start, start + matchArr[0].length);
  }
};

+1, build version of<EMAIL_ADDRESS>(build/index.js) contains not builded source

@mbutsykin I found that the npm version matters, in my case if the npm version is v3.x.x it brokes. However I tried to switch to v6.0.0 it works fine. Is it the same in your case?

We reverted to 1.0.2 to overcome this issue.

fixed in latest version!

thanks for the report folks!


Search function not working properly (hangs, doesn't return results)

System OS
Windows
Python Version
3.10 (CPython)
Install Source
GitHub
Install version / commit hash
4.2.5
Expected Behavior vs Actual Behavior
Search results take ages, often hanging. Have tried updating and reinstalling.
Steps to reproduce - Ensure to include actual links!

Search for song
Wait for results

Traceback
?

Other details
No response

https://github.com/spotDL/spotify-downloader/issues/2142


Rate limit

when traning show below message:
error_code=rate_limit_exceeded error_message='Rate limit reached for default-text-embedding-ada-002 in organization org-xx on requests per min. Limit: 3 / min. Please try again in 20s. Contact us through our help center at help.openai.com if you continue to have issues. Please add a payment method to your account to increase your rate limit. Visit https://platform.openai.com/account/billing to add a payment method.
then ask question,message is:
Retrying langchain.chat_models.openai.acompletion_with_retry.._completion_with_retry in 1.0 seconds as it raised RateLimitError: Rate limit reached for default-gpt-3.5-turbo in organization org-xxx on requests per min. Limit: 3 / min. Please try again in 20s. Contact us through our help center at help.openai.com if you continue to have issues. Please add a payment method to your account to increase your rate limit. Visit https://platform.openai.com/account/billing to add a payment method..
Do you have any suggestions?

me too

Probably your accrount is new, I would suggest adding payment method and to wait a day or two


[BUG] Hover text color

Describe the bug
Need more information about this bug, but there is a situation where the hover text changes from the white on black to a light color that is not readable.
I've seen it, but I can't replicate it.

Is there a screenshot of this bug? What is the DOM that is overwriting this to an unreadable layout?


MQTT in Home Assistant

I have flashed the ESP32 and this is the captive portal:

No sensors appairs in Home Assistant mqtt... What I have to do?

Can you telnet to <IP_ADDRESS> from you computer?
telnet <IP_ADDRESS>
Put in "help" and get an answer?
Check if infos are written to MQTT.
Use a tool like MQTTExplorer.
If you connect to your MQTT server (<IP_ADDRESS>) you should see entries on top level named "pytes".
There must be also a top level Entry named "homeassistant" for HA auto discovery.

In HA there must be the integration "MQTT" installed.
This integration has an auto discovery feature which looks in "homeassistant" in MQTT.

Is it mandatory to have the RS232 adapter connected for the mqtt connection to work?
I only have the ESP32. I haven't received the RS232 adapter yet...

Without an RS232 adapter you don't get entities but the error Message should not show up if MQTT server is available and properly configured.
Looks like your MQTT IP USER or PASSWORD is not correct.
Normally Homeassitant IP and an Homeassistant User and his Password.
And you have "Mosquito Broker" installed as an agent in Homeassitant.

Without an RS232 adapter you don't get entities but the error Message should not show up if MQTT server is available and properly configured.
Looks like your MQTT IP USER or PASSWORD is not correct.
Normally Homeassitant IP and an Homeassistant User and his Password. And you have "Mosquito Broker" installed as an agent in Homeassitant.

IP, USER and PASSWORD are correct. The same I use in MQTT Exploerer:

If MQTT explorer works, the ESP32 should also.
Double check user and pasword please.
Looks like all is on the same network (192.168.1.x).
MQTT uses a normal TCP/IP connection on port 1883 on default.
Can you ping/telnet the ESP32 from homeassistant console?
If you remove the comment from line 1 in src/main.cpp you enable SIMULATION and no serial is needed.

If MQTT explorer works, the ESP32 should also.
Double check user and pasword please.
Looks like all is on the same network (192.168.1.x). MQTT uses a normal TCP/IP connection on port 1883 on default. Can you ping/telnet the ESP32 from homeassistant console?
If you remove the comment from line 1 in src/main.cpp you enable SIMULATION and no serial is needed.

I have check 3 times user and password. And I ping the ESP32 from Homeassistant without problem:

Hi again,
My ESP32 is like this. Could be this the problem?

You are right,
I was totally out of my mind coding the mqttServer config.
Please adjust line 78 for now for your needs.
I'll will fix the code these days.

You are right, I was totally out of my mind coding the mqttServer config.
Please adjust line 78 for now for your needs. I'll will fix the code these days.

Ok.
I'll do it this afternoon when I get home. I'll let you know how the change has gone.

You are right, I was totally out of my mind coding the mqttServer config.
Please adjust line 78 for now for your needs. I'll will fix the code these days.

I adjust line 78 with
IPAddress mqttServer(192, 168, 1, 82);
and all it´s same. It doesn´t work

Is there anything else I have to edit to make it work?
I'm about to give up :-(

Please change line 766 to your user and password.
As i said forgot to use the configured values for MQTT. Sorry.
Otherwise there should be time on weekend to fix and debug it myself.

Please change line 766 to your user and password. As i said forgot to use the configured values for MQTT. Sorry.
Otherwise there should be time on weekend to fix and debug it myself.

Are these user and password respectively?

Please change line 766 to your user and password. As i said forgot to use the configured values for MQTT. Sorry.
Otherwise there should be time on weekend to fix and debug it myself.

Line changed and now this is MQTT Explorer test:

MQTT is now connected. :-)
If you wanna see simulated data as long you have no serial connected remove the "//" in line 1 to define SIMULATION

Done!
Only this:

You have to connect RX and TX via wire on the ESP32 for SIMULATION to work.
Or wait for your level shifter.

You have to connect RX and TX via wire on the ESP32 for SIMULATION to work. Or wait for your level shifter. Simulation writes to pytes2 instead of pytes. And auto discover to pytes2_discover instead of homeassistant.

Connecting RX and TX via wire:

But no new entities in homeassistant

I need more info of your background.
Are you new to HA and MQTT?
Homeassistant is mostly plug and play but you need to know some basics.
The MQTT integration in Homeassistant (HA) looks in the "homeassistant" topic in MQTT for autodiscovery.
The simulation intentionally writes to "pytes2_discover" instead of "homeassistant" otherwise tye entities will show up in your HA and need to get rid of them in your history afterwards.
If you want to see them in your HA change the string "pytes2_discover" to "homeassistant".
The simulation was intented for me to see if the MQTT topics are filled in correct and the communication works.
MQTT is an universal tool. If you don't to use HA you can easily use any other home atomation system subscribing to the pytes(2) topics "pytes2/bat/1/volt" for example like NodeRed.
You have to get the whole picture.
eboxToMqtt -> MQTT (topics: "homeassistant" for autodiscovery and "pytes" for values) -> homeassitant: MQTT integration

Hi again!
I have received the level shifter, I have connected it to the ESP32 and the Pytes, and the entities still do not appear in HA. I think there must be some other parameter in the configuration that needs to be changed and you don't remember it... Could this be?

SIMULATION was already disabled

Could you tell me exactly what command I have to use to know if there is communication with the batteries?

No homeassistant topic appears. Only the one in the following image:

MQTT integration already had it up and running in HA, and entities don't show up in HA

I don't know what else  :to try anymore. I am totally heartbroken :-((

Before you can go further Step 2 has to function.
Otherwise no data will be filled in MQTT and due to this there are no entitys in HA.
Things to test

Putty/Telnet to <IP_ADDRESS> (your esp32)
type in the command "help" and press ENTER
you should get:

This is the help direct from your battery's.
If this doesn't work the Serial connection is not established.
Possible causes:

RX/TX cables switched
Wrong PINs used on your ESP32
Connection Problems
Wrong Layout on western jack
Wrong port used on your battery (Console is the right one)
...

I checked your ESP32 photo.
You used the wrong pins.
You have to use the serial Interface on the ESP32.
On your ESP32 Board it is on the pins marked RXD and TXD not G16 and G17.
https://medesign.seas.upenn.edu/uploads/Guides/NodeMCUPinout.png
If it doesn't work just switch the RX and TX Cable and give it a try.
Try put in "help" as command in telnet and press ENTER.
If you get help youre nearly done.
I'll bet the is the last problem.
If "help" worked and no entities showing up please show the content of "homeassistant" in MQTT explorer.

A doubt:

I checked your ESP32 photo. You used the wrong pins. You have to use the serial Interface on the ESP32. On your ESP32 Board it is on the pins marked RXD and TXD not G16 and G17.
https://medesign.seas.upenn.edu/uploads/Guides/NodeMCUPinout.png
If it doesn't work just switch the RX and TX Cable and give it a try.
Try put in "help" as command in telnet and press ENTER. If you get help youre nearly done. I'll bet the is the last problem. If "help" worked and no entities showing up please show the content of "homeassistant" in MQTT explorer.

Any change here?

Sorry i also have mixed up things.
G16 and G17 on you board is correct!
If "help" doesn't work just try connecting them the other way round.
Can you send detailed photos of ESP32, level shifter, western connector and your pytes front panel?

Sorry i also have mixed up things. G16 and G17 on you board is correct! If "help" doesn't work just try connecting them the other way round.
Can you send detailed photos of ESP32, level shifter, western connector and your pytes front panel?

All tests done. Everything remains the same. The "help" command still doesn't work.

I rechecked the serial pins with your kind of ESP32 board these are correct (G16 and G17).
The last thing i see, is Green and Green/White are the other way round on my connection on the level shifter and Yellow and Green are the other way round.
so:
16/green on txd on ttl side of level shifter
17/yellow on rxd on ttl side of level shifter
green on txd on rs232 side of level shifter
green/white on rxd on rs232 side of level shifter

Working!!!

Here was the problem:

The instructions are not correct. It would be necessary to rectify them so that the same does not happen to other people...

Thank you for all!!!

Yeah !!!
Congrats to try so hard.

MQTT config is fixed


Gradle branch failing with Java 7

Looks like a linking issue (linking to Java-8-compiled jars) - perhaps a lower Gradle version would solve this?
https://travis-ci.org/NLeSC/osmium/builds/80663517

The testsets plugin is Java 8 only. That is why #20 is on hold.


text/template: Why is there no support for "kebab-case" template variables?

Hi
Is there a particular reason template variables can't contain dashes?
I'm aware of the index function. Just wondering why not support templates with kebab case directly using the prettier syntax.
The fix seems pretty simple in
template/parse/lex.go
// isAlphaNumeric reports whether r is an alphabetic, digit, or underscore.
func isAlphaNumeric(r rune) bool {
	return r == '_' || unicode.IsLetter(r) || unicode.IsDigit(r) || r == '-'
}

What side effects can this change have?
Thanks.
What version of Go are you using (go version)?

$ go version
1.16

Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env

What did you do?
https://play.golang.org/p/NT4dgt0abWi
package main

import (
	"text/template"
	"os"
)

func main() {

	vals := map[string]string{"hello-world": "world!"}

	tmpl, err := template.New("test").Parse("{{ .hello-world }} items")
	if err != nil { panic(err) }
	err = tmpl.Execute(os.Stdout, vals)
	if err != nil { panic(err) }
}

What did you expect to see?
world! items
What did you see instead?
panic: template: test:1: bad character U+002D '-'

Identifiers (names) in Go can only contain alphanumeric characters and underscores; it seems sane to have the same restriction on text/template. It is a different syntax, but it's still aimed at being Go-like.


Dark theme should apply to the frame/border too when in window mode

What would you like to be added:
When dark theme is used, the frame at the top where it says "Lens - The Kubernetes IDE" should also be dark.

Why is this needed:
Because the dark theme is great but the white bar is a bit annoying,
Environment you are Lens application on:

Kubernetes distribution: Minikube
Desktop OS: Windows 10

Good issue, thanks, we'll look into doing this through Electron.

coordinate with #2478


[Carbondata-3999] Fix permission issue of indexServerTmp directory

Why is this PR needed?
When dir "/indexservertmp" is not existing,then select query with indexserver will create a dir "/indexservertmp/[queryid]" with permission 755,and the permission of dir "/indexservertmp" is also 755,it will cause permission issue.
What changes were proposed in this PR?
When select query with indexserver,first check if the dir "/indexservertmp" is existing,and if not,then create dir "/indexservertmp" with permission 777
Does this PR introduce any user interface change?

No

Is any new testcase added?

No

Build Failed  with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbon_PR_Builder_2.4.5/2593/

Build Failed  with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbonPRBuilder2.3/4343/

retest this please

Build Success with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbonPRBuilder2.3/4346/

Build Success with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbon_PR_Builder_2.4.5/2596/

Build Success with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbonPRBuilder2.3/4443/

Build Failed  with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbon_PR_Builder_2.4.5/2690/

retest this please

Build Failed  with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbon_PR_Builder_2.4.5/2692/

Build Failed  with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbonPRBuilder2.3/4445/

retest this please

Build Success with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbonPRBuilder2.3/4453/

Build Success with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbon_PR_Builder_2.4.5/2699/

retest this please

Build Failed  with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbonPRBuilder2.3/4564/

Build Failed  with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbon_PR_Builder_2.4.5/2813/

retest this please

Build Failed  with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbonPRBuilder2.3/4576/

Build Failed  with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbon_PR_Builder_2.4.5/2827/

retest this please

Build Success with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbonPRBuilder2.3/4626/

Build Success with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbon_PR_Builder_2.4.5/2872/

retest this please

Build Success with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbonPRBuilder2.3/4651/

Build Success with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbon_PR_Builder_2.4.5/2895/

LGTM


Update dependencies Cargo uses

Namely update to serde 1.0.0!

@bors: r+

r? @brson
(rust_highfive has picked a reviewer for you, use r? to override)

:pushpin: Commit 0b59f17 has been approved by alexcrichton

:hourglass: Testing commit 0b59f17 with merge 67cb898...

:sunny: Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 67cb898b862c9d6f89d9f6d7cb1622cbb1ed2307 to master...


WarpOS support

@ajenbo @arczi84 Here comes support for WarpOS as well, oh boy

Not to be confused with OS/2 Warp I take it :)

@Cowcat5150 Please remove the devilutionx-wos.lha binary package from the repo and add it as a release here instead: https://github.com/Cowcat5150/devilutionX/releases

@Cowcat5150 when doing updates, do a merge or rebase rather than copy the changed files manually. It can cause conflicts and the commit history gets messy.

@MBeijer For unknown reasons, files in some dirs got copied without capital letters and as a result there were 2 files for each one. This is the strange last commit.

@MBeijer @AJenbo Latest commit (of yours) comes with some problems: itoa seems to be missing when trying to compile (Source/control.cpp SDL_itoa call). Reenabling char *itoa like it was in old miniwin/misc.h gets through to the link stage, but then no itoa function is found. Had to recreate an itoa function....  Then calling cmake .. -DBINARY_RELEASE as I do, doesn't work as it act like debug on, faster on, binary off, dist off, etc.....And dreaded gnu++_concurrence_error starts to show for MOS emulating Warpos (a known bug).


Data export doc

no screenshots yet
hold off

@viv-liu - Microsoft authors need to make updates through the private repository so the updates can be staged and validated by the current validation rules. Read about article authors working in the public repo for more information.
Follow the instructions in the Contributor Guide - GitHub account setup topic - Step 2.a. to join the MicrosoftDocs organization. These steps will give you access to the private repos, and then you can continue with the rest of the onboarding process.
Would you submit your updates through the private repo and close this pull request?
Thanks

Ok, thanks


Beams: Use keys and new template mode addBeamMarkup

I did some changes to remove code duplication and hence improve maintainability because when refining the beaming logic, the code doesn't have to be changed in multiple places.
It sort of reverses the logic, i.e. instead of starting from a <note>/<chord>/<rest> and looking for a corresponding <beam>/<beamSpan>, the keys start at the <beam>/<beamSpan>s and find the elements they are anchored to.  I expect this to be more efficient because:

there are less <beam>/<beamSpan> elements than <note>s/<chord>s/<rest>s elements - i.e. the number of tests should be lower
when starting from <note>/<chord>/<rest>, we don't know whether a beam was specified using <beam>s or <beamSpan>, so we have to check for both things. When starting from <beam>/<beamSpan> this problem does not occur.

This new solution is also more robust. In the also included beams test case, the first beam fails to render correctly as the last element in it is a <handShift> - which is a perfectly valid (though maybe not a very clever) place to put a <handShift>.
A similar approach could be taken e.g. for slurs and hairpins.

Shouldn't that work on tuplets, too? Could you do it?

Maybe this approach could work for a number of things. I'll see what I can do, but right now I'm not sure when.


Defining new aliases not possible

Defining a new aliases with webmum is not possible (for me).
 There was an error running the query [Column count doesn't match value count at row 1]
But if I define one directly via mysql it is shown in the webpage.
I'm not sure, where the problem lies.

Only editing existing entries works fine.

I can confirm this problem and will have a look at it. Thx for your report!

The SQL query on creation is:
INSERT INTO `aliases` (`source`, `destination` ) VALUES<EMAIL_ADDRESS><EMAIL_ADDRESS>NULL);

... which of course cannot work. Maybe @ohartl can fix this?

Ups, i will fix it.


Integrate components from Goflow-Kube

It integrates the following components from the old Goflow-Kube repository:

Kube metadata enricher and Informers. There is already a Kube Enricher with its own informers but the output transformation was not the same as the Goflow-Kube payload. In later PRs we can work on merging both and/or adapting the dependant services to the new format.
End-to-End pipeline test directly taken from Goflow-Kube to verify the compatiblity of the output messages.
Some changes done to the API to improve testability of the code.

Codecov Report

Merging #120 (a8ec50c) into main (e0d95f2) will increase coverage by 3.69%.
The diff coverage is 58.59%.

@@            Coverage Diff             @@
##             main     #120      +/-   ##
==========================================
+ Coverage   54.63%   58.32%   +3.69%
==========================================
  Files          47       52       +5
  Lines        2709     3141     +432
==========================================
+ Hits         1480     1832     +352
- Misses       1129     1184      +55
- Partials      100      125      +25

Flag
Coverage Δ

unittests
58.32% <58.59%> (+3.69%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

pkg/config/config.go
50.00% <ø> (ø)

pkg/pipeline/transform/kubernetes/kubernetes.go
14.37% <0.00%> (-0.18%)
:arrow_down:

pkg/pipeline/transform/transform.go
100.00% <ø> (ø)

pkg/pipeline/transform/netobserv/meta.go
33.62% <33.62%> (ø)

pkg/pipeline/pipeline.go
91.89% <40.00%> (-8.11%)
:arrow_down:

pkg/test/utils.go
65.51% <40.00%> (-13.44%)
:arrow_down:

pkg/pipeline/transform/netobserv/enrich.go
53.40% <53.40%> (ø)

pkg/pipeline/pipeline_builder.go
53.84% <55.55%> (+0.21%)
:arrow_up:

pkg/test/ipfix.go
69.86% <69.86%> (ø)

pkg/pipeline/ingest/ingest_collector.go
80.50% <80.00%> (+80.50%)
:arrow_up:

... and 6 more

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 e0d95f2...a8ec50c. Read the comment docs.


Simplify lets more

Copies currently generate many extraneous lets (visible in many tests in bazel run builder:copy_test output). These exist to guard against the possibility of slices being generated as part of the copy, but many times these are not needed. The simplifier should be able to find and remove such lets.

By remove do you mean the let is unreferenced, or that the let can be substituted in safely?

The let can be substituted in safely. Here's an example that shows both (from bazel run -c dbg builder:copy_test -- --gtest_filter=*flip_y):
let _2 = buffer_max(out, 2) {
 let _1 = buffer_min(out, 2) {
  let _0 = buffer_max(out, 0) {
   let _ = buffer_min(out, 0) {
    serial loop(y in [buffer_min(out, 1), buffer_max(out, 1)], 1) {
     slice_dim(out, 1, y) {
      in = make_buffer(buffer_at(in, <>, (0 - y)), buffer_elem_size(in), {
        {[max(buffer_min(in, 0), _), min(buffer_max(in, 0), _0)], buffer_stride(in, 0), buffer_fold_factor(in, 0)},
        {[max(buffer_min(in, 2), _1), min(buffer_max(in, 2), _2)], buffer_stride(in, 2), buffer_fold_factor(in, 2)}
      }) {
       call(<fn>, {in}, {out})
      }
     }
    }
   }
  }
 }
}

It's the slice_dim that makes this interesting. That slice_dim causes dimension 2 to become dimension 1. So lets _ and _0 can be substituted safely, but lets _1 and _2 cannot.
I think it'd be fine to not substitute any lets that cross a relevant crop/slice, i.e. not substitute any lets in this case. But examples like this:
let _2 = buffer_max(out, 1) {
 let _1 = buffer_min(out, 1) {
  let _0 = buffer_max(out, 0) {
   let _ = buffer_min(out, 0) {
    in1 = make_buffer(buffer_base(in1), buffer_elem_size(in1), {
      {[max(buffer_min(in1, 0), _), min(buffer_max(in1, 0), _0)], buffer_stride(in1, 0), buffer_fold_factor(in1, 0)},
      {[max(buffer_min(in1, 1), _1), min(buffer_max(in1, 1), _2)], buffer_stride(in1, 1), buffer_fold_factor(in1, 1)}
    }) {
     call(<fn>, {in1}, {out})
    }
   }
  }
 }
}

There are no slices or anything else that affect the lets at all, I think we should substitute these.

Before evaluating, we want to lift loop-invariant lets, right? Evaluating a variable is much cheaper than evaluating an entire expressions

Definitely. There's a separate issue for LICM: #15. We should only substitute lets if we aren't substituting into a loop. In the above examples (that results from copies) there are no loops.

I just noticed (looking at this again) that there is a loop in the first example, so that also suggests not substituting these lets even if we did understand it was safe from the slice_dim.

I did some thinking that is related to this issue. Until now, I had been thinking that it's fine to just give up substituting if it's going to be tricky, but that's really not true. The commit I tagged above basically fixes up substitution logic so it can handle things like substituting buffer bounds expressions into crops and slices.
We still need to be careful about how we decide to substitute lets (this issue), but we can at least ignore things like slices causing problems (once that commit lands).

Fixed by #129


Improved output of datafuson-cli with empty results

Is your feature request related to a problem or challenge?
As @Jefffrey @crepererum  and @berkaysynnada  pointed out on https://github.com/apache/arrow-datafusion/pull/8895 (see https://github.com/apache/arrow-datafusion/pull/8895#discussion_r1456993754), the handling of results that have no rows could potentially be improved
datafusion-cli
seleDataFusion CLI v34.0.0
❯ select * from (values (1));
+---------+
| column1 |
+---------+
| 1       |
+---------+
1 row in set. Query took 0.009 seconds.

❯ select * from (values (1)) where column1 = 2;
0 rows in set. Query took 0.003 seconds.

Note there is nothing printed out from select * from (values (1)) where column1 = 2; (not even headers) when there are no results
Describe the solution you'd like
It would be nice to print out headers even when there was no result:
So something like:
select * from (values (1)) where column1 = 2;
+---------+
| column1 |
+---------+
+---------+

Describe alternatives you've considered
We can also do nothing
Additional context
This issue itself isn't particularly pressing in my opinion

I can help with this problem.
maybe it can be assign to me

@alamb

BTW I think the tests added in https://github.com/apache/arrow-datafusion/pull/8896 are sufficient -- if you make this change I think the existing tests can be updated and no new tests are needed


Cut new release after adding support for new metadata schema and enable PackageProvider

0.5d LE

The Docker image used in testing is oapass/deposit-pass-docker:1.0.0-3.4-SNAPSHOT@sha256:299e8c6bb8a861e2147f13d728fee898e61d2be5554ae405d8ddb29b50419fe8  according to the CMF rollout doc.
The code used in that Docker image is no longer the tip of master, so a 1.0.0-3.4-maint branch has been prepared, which branches from master at a9df23 (a9df23 is the commit in that image).  The 1.0.0-3.4-maint branch will be used to cut the release.
There have been some bugs fixed since that image was used for testing, so those commits ought to be included in the release.

Release of core deposit services is complete from the 1.0.0-3.4-maint branch:

https://github.com/OA-PASS/deposit-services/releases/tag/1.0.0-3.4

Package providers needs to be released next, followed by a PR to pass-docker


symbolics: use devito floor instead of Undefined Function

Fix issue with floor function
Fixes #2053

To be improved, see #2064


Shouldnt have to login after signup

After signing up to Melodiy, the user shouldn't have to login with the newly created account. The registration request should give us our auth token so we can be signed in, instantly.

API now returns a JWT token when the user registers, client will be updated soon.

Thanks for the feature request it has been completed in dev branch which should be released in 1-2weeks.


Is it possible to get ids of matching documents along with keywords in response from SKG

Following is the sample response given in README page.
{ "data": [
  {
    "type": "jobtitle",
    "values": [
      {
        "id": "",
        "name": "Data Scientist",
        "relatedness": 0.989,
        "popularity": 86.0,
        "foreground_popularity": 86.0,
        "background_popularity": 142.0,
        "compare": [
          {
            "type": "skills.v3",
            "values": [
              {
                "id": "",
                "name": "Machine Learning",
                "relatedness": 0.97286,
                "popularity": 54.0,
                "foreground_popularity": 54.0,
                "background_popularity": 356.0
              },
              {
                "id": "",
                "name": "Predictive Modelling",
                "relatedness": 0.94565,
                "popularity": 27.0,
                "foreground_popularity": 27.0,
                "background_popularity": 384.0
              },
              {
                "id": "",
                "name": "Artificial Neural Networks",
                "relatedness": 0.94416,
                "popularity": 10.0,
                "foreground_popularity": 10.0,
                "background_popularity": 57.0
              },
              {
                "id": "",
                "name": "Apache Hadoop",
                "relatedness": 0.94274,
                "popularity": 50.0,
                "foreground_popularity": 50.0,
                "background_popularity": 1418.0
              },
              {
                "id": "",
                "name": "Java (Programming Language)",
                "relatedness": 0.76606,
                "popularity": 37.0,
                "foreground_popularity": 37.0,
                "background_popularity": 17442.0
              }
            ]
          }
        ]
      }
    ]
  }
 ]
}

For each word in the response, is it possible to get ids of documents having that word?
             {
                "document_ids": ["id1", "id2", "id3"...],
                "name": "Machine Learning",
                "relatedness": 0.97286,
                "popularity": 54.0,
                "foreground_popularity": 54.0,
                "background_popularity": 356.0
              }

If it is possible to do so then it would be a really powerful feature because then I can traverse from word_set1 to document_set1 and from document_set1 to word_set2 to document_set2 and so on  AND keep track of the traversal (because it would be captured in the JSON response).  I can then create a graph of words where link between the words represents set of documents and know which documents are in common.
Is it possible to do something like this currently?
Thanks for the great plugin BTW!

I try to get in the http://localhost:8983/solr/knowledge-graph/rel
but the error -->{"error":{"msg":"KnowledgeGraphHandler requires POST data","code":400}}

Are you just pasting that URL into a browser window?  That is a "GET" call, rather than a POST.  You might want to read up on REST API calls and how to use them.   Maybe read this:  https://mlsdev.com/blog/81-a-beginner-s-tutorial-for-understanding-restful-api


Add support for Web Pixel events

What are you trying to accomplish?

Add support for Web Pixel events. The events should be emitted only  after checkout has been presented.
Emit presented message every time checkout loads (this applies to offsite payments mainly) to keep receiving Web Pixel events.

How to test
Use the following Storefront config:
STOREFRONT_DOMAIN = shop1.shopify.payment-apps-wgvz.jose-alvarez.eu.spin.dev
STOREFRONT_ACCESS_TOKEN = b877504bef9f8b9adb731cea4b1732d2

Start a checkout using the MobileBuyIntegration sample app
Check in the console that Web Pixel events were emitted
Pay using "Bogus payments" and complete the offsite payment
In the thank you page, check in the console that Web Pixel events are still emitted.

Before you merge
Testing

[x] I've added tests to support my implementation

Contribution guidelines

[x] I have read and agree with the Contribution Guidelines.
[x] I have read and agree with the Code of Conduct.

Documentation

[ ] I've updated any documentation related to these changes.
[ ] I've updated the README.

Versioning

[ ] I have bumped the version number in the .podspec file.
[ ] I have bumped the version number in the README.
[ ] I have added a Changelog entry.

After merging
If your changes required a version bump, please add an entry under the Releases page - doing so will trigger a CI workflow to publish the latest Cocoapod.

Looking good. It's quite a big PR so lot's to review here.
Couple of questions:

Can we batch web pixels events, such that checkoutDidEmitWebPixelEvent can receive multiple events? This would reduce the number of times the event is called.
Can we use a name other than analytics for these messages over the bridge? They seem exclusive to web pixels now and if we want to start sending other analytics events in future, this may be difficult to detangle later.

It's worth mentioning that his code was already reviewed here: https://github.com/Shopify/checkout-sheet-kit-swift/pull/84
The only new change is this:

Emit presented message every time checkout loads (this applies to offsite payments mainly) to keep receiving Web Pixel events.

Can we batch web pixels events, such that checkoutDidEmitWebPixelEvent can receive multiple events? This would reduce the number of times the event is called.

Why do we need to reduce the number of times it is called? It's just parsing a JSON and forwarding an object to the app. I would let the app developers handle this.

Can we use a name other than analytics for these messages over the bridge? They seem exclusive to web pixels now and if we want to start sending other analytics events in future, this may be difficult to detangle later.

I think this should be discussed with the team as it would require changes through multiple repos now as the name was already agreed. I don't mind which name we use, I think analytics is a good name and doesn't restrict it to Web Pixels in case we want to extend this in the future, but I think it should be treated in a new issue if we do the change to tackle all the required changes in the different repos.

It's worth mentioning that his code was already reviewed here: #84

Not by me though 😄  I've been pushing for batched events from the start.

Why do we need to reduce the number of times it is called? It's just parsing a JSON and forwarding an object to the app. I would let the app developers handle this.

It's more efficient to batch them. Especially if the external pixel provider accepts batched events. It's less work for the app and less battery consumption. Though it really depends on the number of events being sent. If we have a handful of web pixels events it's not a big deal, but we've coded the analytics bridge event to send them one-by-one. If we re-use this later for non-web pixels events then we'll see a pretty large increase here.

I think this should be discussed with the team as it would require changes through multiple repos now as the name was already agreed. I don't mind which name we use, I think analytics is a good name and doesn't restrict it to Web Pixels in case we want to extend this in the future, but I think it should be treated in a new issue if we do the change to tackle all the required changes in the different repos.

Cool, yeah happy to hear what others think @cianBuckley @kiftio

It's more efficient to batch them. Especially if the external pixel provider accepts batched events. It's less work for the app and less battery consumption.

This is not necessarily true. There are no network requests involved or anything that could consume extra resources by streaming the events. They are already in memory in the device when the Web Pixels Manager produces them. There are several things to consider here like error handling (if the app crashes we could lose the batched events), the need of using the data in real time vs introducing a latency by batching the event, big batches of data could introduce spikes in CPU and memory usage that could reduce the UX for some users, etc. As the data is already in memory I would let the app
developers decide in each case how to handle the data.

This is not necessarily true. There are no network requests involved or anything that could consume extra resources by streaming the events. They are already in memory in the device when the Web Pixels Manager produces them. There are several things to consider here like error handling (if the app crashes we could lose the batched events), the need of using the data in real time vs introducing a latency by batching the event, big batches of data could introduce spikes in CPU and memory usage that could reduce the UX for some users, etc. As the data is already in memory I would let the app developers decide in each case how to handle the data.

If the replay queue has 10 events when you subscribe, then you have to iterate over each of them and send them as individual events to the SDK. If the consumer is then firing them over to several external web pixels APIs, they will have to make 10 network request * the number of providers.
Since we know up front that many of the events occur at the same time, it's helpful to batch them to reduce the overall number of requests made by the consuming app.
By not batching, we may be forcing consumers to batch

This is not necessarily true. There are no network requests involved or anything that could consume extra resources by streaming the events. They are already in memory in the device when the Web Pixels Manager produces them. There are several things to consider here like error handling (if the app crashes we could lose the batched events), the need of using the data in real time vs introducing a latency by batching the event, big batches of data could introduce spikes in CPU and memory usage that could reduce the UX for some users, etc. As the data is already in memory I would let the app developers decide in each case how to handle the data.

If the replay queue has 10 events when you subscribe, then you have to iterate over each of them and send them as individual events to the SDK. If the consumer is then firing them over to several external web pixels APIs, they will have to make 10 network requests * the number of providers.
Since we know up front that many of the events occur at the same time, it's helpful to batch them to reduce the overall number of requests made by the consuming app.
By not batching, we may be forcing consumers to batch

Hey @markmur I think batching would be good, but I think individual events should match up with the web-pixels API folks might be used to. There may also be a few things to think through, e.g:

Flushing events on error, cancel and complete, to ensure nothing is dropped. (also when the view is being reclaimed for memory?)
Default batch size and whether clients can configure that
Whether batching is an optional thing clients opt into, and you can get immediate individual events if preferred

It'd also be good to check if the main analytics provider SDKs already batch internally (if they support batched events).
Maybe it's a nice later improvement?

Let's discuss internally


Update node version to node20

Update the runtime used by the argocd-diff-action to node20
Update README instruction to use latest actions/checkout@v4

@aaron-weisberg-qz @michaelellenburg-qz you were the last one committing into this repository 🥳
Do you think you could merge this?


fix(whats-new): fix invalid date error message

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


Windows10: Space name on Windows is not the same like I have in tracim directly

At present
Some of space not show the good name of space. I think it is because some space have emoji inside name.
Expected
The good name is show or something inform user about "some caracters can't be showing correctly"

Yes names are live modified to avoid crash because of emojis :(
This case of errors will be solved by https://github.com/buxx/trsync/issues/45

Solved by last update


BLDC ESC

Do you have any interest in getting this code running on this board: https://github.com/rosmo-robot/Open-Core-M5stack/tree/main/v2.1#readme
communicating with  this firmware: https://github.com/rosmo-robot/Rosmo_ESC_firmware
On this ESC https://github.com/rosmo-robot/Rosmo_ESC
I could arrange to get you parts if you'd hack it together.
Update: I flashed it to my Open Core board, It brings up Wifi network and I can connect, but no webpage is loaded

Hello, sorry for the late response.
We can definitely try using the firmware on your board! But we will definitely need to make some updates. What are you most interested in? Getting the web page running?
Regarding your update, what IP address did you use to check the web-page? The correct one is <IP_ADDRESS>.
I would definitely like to play around with your hardware if this is still relevant.

ah, I actually think I know, why it doesn't load the web-page! Ip-address assumption was quite silly from my side. To get the web-page you need to load it to the SPIFFS.

It can be easily done using PlatformIO:

open the project in VSCode;

open PlatformIO menu

press "Upload Filesystem Imga" option and wait for it to finish.

After that you should have working web-page on your device.

I didn't thought someone would be interested in this project, which is one again silly from my part. I will update the readme to better explain how to run the project for the first time and how it can be enchanced.

Updated the readme. Hope now it will be more intuitive

Sounds good!

Cool that works, thanks.
So it looks like we mostly need to edit from here to make it work: https://github.com/701lab/ESP32-robot-car-controller/blob/main/src/main.cpp#L60
With the I2C stuff from https://github.com/rosmo-robot/Rosmo_ESC_firmware/blob/master/src/RosmoI2CCommander.h#L15

Yes, this is correct. You will need to enable desired I2C, disable UART and change the communication code at the location you pointed to.


Engdocs 490

Updated step 4 on PAT topic

@usha-mandya @thaJeztah When I remove the #5 the table doesn't render correctly. Is there a tag to use to keep the table format?

Hmm, it shows there's a merge conflict; perhaps that's what causing it.
But I'd have to look from my computer (could also be some indentation issue somewhere, but those are hard to spot on mobile 🤔🙃😅)

@thaJeztah Ahh ok, I accidentally used this branch for this new update & it was already merged into Master.

I tried rebasing your PR to get rid of the extra commits, and I think it looks OK after that.
What I did:
To rebase this PR and get rid of the commits from the other PR, you can check out your branch, then start an interactive rebase;
git rebase -i upstream/master

That should open your default editor showing the commits in this PR, looking something like;
pick 58e12d6efb updated downgrade and add seats
pick e9eaa9648d removed header
pick 7d1351f783 revised step 4

# Rebase 401c940a80..7d1351f783 onto 401c940a80 (3 commands)

If you remove the first two lines, your're removing those commits from the PR:
pick 7d1351f783 revised step 4

# Rebase 401c940a80..7d1351f783 onto 401c940a80 (3 commands)

Save the file to complete the rebase, which should show something like:
Successfully rebased and updated refs/heads/ENGDOCS-490.

Then force-push your changes to github (make sure you push to the right remote :D);
git push -f -u origin

While at it, I made some changes (in the last commit);
access-tokens: markdown touch-ups, and some copy edits

wrap lines to ~80 characters
indent second lines for bullets to make them look slightly more as bullet-lists (also when looking at the source)
Split the "Modify existing tokens" into three steps. Doing so, we could include the "You can also view the number of tokens that are activated and deactivated in the toolbar." note as regular text. The bullet already had 2 images and a note, which made it a bit "cluttered"
Added a step to "save" the changes. It's trivial, but felt like it made the topic "finished".
Changed the mention of the "Docker Hub CLI and API" to a note, so that it's standing out a bit more, and somewhat clearer that it's not really part of the instructions.

Let me add a screenshot of that last section

@usha-mandya @jerae-duffin PTAL (let me know if you like those last changes I made 😅 )

@thaJeztah Looks good. Thanks


kanidm: fix 1.3 build and permit hydra to build it

Add back kanidm 1.3 support. I actually meant to do this in the multi-version PR. 🤦
Permit hydra to build kanidm 1.3. This is a large build and there are no known vulnerabilities. It will ease transition for users.

Closes #363595
Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[ ] Fits CONTRIBUTING.md.

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

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 363662

x86_64-linux

:white_check_mark: 2 packages built:

kanidm (kanidm_1_4)
kanidmWithSecretProvisioning


Can I use the repo to send events to scrcpy server on Android from a recorded getevent ?

I have the following recorded scroll:
[<PHONE_NUMBER>85] 0003 0039 000002c5
[<PHONE_NUMBER>85] 0003 0030 00000008
[<PHONE_NUMBER>85] 0003 0035 00000186
[<PHONE_NUMBER>85] 0003 0036 0000029c
[<PHONE_NUMBER>85] 0001 014a 00000001
[<PHONE_NUMBER>85] 0000 0000 00000000
[<PHONE_NUMBER>93] 0003 0035 00000185
[<PHONE_NUMBER>93] 0003 0036 000002b0
[<PHONE_NUMBER>93] 0000 0000 00000000
[<PHONE_NUMBER>16] 0003 0035 00000184
[<PHONE_NUMBER>16] 0003 0036 000002d1
[<PHONE_NUMBER>16] 0000 0000 00000000
[<PHONE_NUMBER>30] 0003 0035 00000183
[<PHONE_NUMBER>30] 0003 0036 0000030b
[<PHONE_NUMBER>30] 0000 0000 00000000
[<PHONE_NUMBER>69] 0003 0030 00000007
[<PHONE_NUMBER>69] 0003 0035 00000180
[<PHONE_NUMBER>69] 0003 0036 000003a1
[<PHONE_NUMBER>69] 0000 0000 00000000
[<PHONE_NUMBER>48] 0003 0030 00000006
[<PHONE_NUMBER>48] 0003 0035 0000017f
[<PHONE_NUMBER>48] 0003 0036 000003c9
[<PHONE_NUMBER>48] 0000 0000 00000000
[<PHONE_NUMBER>33] 0003 0036 000003f1
[<PHONE_NUMBER>33] 0000 0000 00000000
[<PHONE_NUMBER>75] 0003 0030 00000005
[<PHONE_NUMBER>75] 0003 0035 00000180
[<PHONE_NUMBER>75] 0003 0036 0000041c
[<PHONE_NUMBER>75] 0000 0000 00000000
[<PHONE_NUMBER>05] 0003 0039 ffffffff
[<PHONE_NUMBER>05] 0001 014a 00000000
[<PHONE_NUMBER>05] 0000 0000 00000000

I want to replay it using scrcpy, can it be done ?

Of course, you can send this series of events. However, scrolling events on android itself is not reproducible.

scrolling

I see you have the "swipe" option, it is not different from scroll I guess I meant swipe.
I need someone to do a job for me, so please tell me if you know anyone:
I need to send the events as recorded in getevents.
I need to change the device ID used in the motion event over scrcpy (to be sent from the client side)

What's the format of your recorded scroll? To begin with, you need to parse it. Then, you can use scrcpy-client to construct events and dispatch them manually.

Please refer to the getevent's document https://source.android.com/devices/input/getevent. However, it is hard to use scrcpy to dispatch all kinds of native android events, you can consider ADB's sendevent instead.

Please refer to the getevent's document https://source.android.com/devices/input/getevent. However, it is hard to use scrcpy to dispatch all kinds of native android events, you can consider ADB's sendevent instead.

The issue is that android 10 locked it access to sendevent, I am looking for a solution to that.
What will be the different from scrcpy to real touch screen since I know it send the ACTION_DOWN, MOVE, ACTION_UP what the software we controll over in android will see different ? I know touch id is one of them

There are so many differences... You will find that scrcpy has much fewer operations than the sendevent.


Change var statement to new format.

[Enter feedback here]

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

ID: 83cd166c-9e60-e6b5-1985-5dd04d3261f2
Version Independent ID: 45bf2f1f-a453-0e2e-c115-050c9d621cb3
Content: Implicitly typed local variables - C# Programming Guide
Content Source: docs/csharp/programming-guide/classes-and-structs/implicitly-typed-local-variables.md
Product: dotnet-csharp
Technology: csharp-fundamentals
GitHub Login: @BillWagner
Microsoft Alias: wiwagn

From https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/strings/
I tryed to use  "var jh = (firstName: "Jupiter", lastName: "Hammon", born: 1711, published: 1761);"
but my VS Comm 17 would not allow it
When I used "var jh = new { firstName = "Jupiter", lastName = "Hammon", born = 1711, published = 1761 }; ",
It was good.
Please change web document page.

Hi 👋 @WmHBollinger
Thank you so much for posting this issue. We really appreciate it.
The difference is these two statements, is that the first is using a newer language level feature called tuples. It is perfectly valid C#, assuming you're using the correct version. The second statement, is an anonymous type - and has been around since C# 2 I believe.
You could get the latest version of Visual Studio Community 2019 - https://visualstudio.microsoft.com/downloads/. That would solve this problem.