text:
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. 😉

authors: ThomasBarnekow electricessence

repo: tsdotnet/linq


text:
'make installer' fails when building without some options (e.g. NOSRT)

Bug description:
I get a pkg installer error after building without some options (e.g. NOSRT = 1)
As per the error, the cause is a blank line placed in the control file where NOSRT is removed by the 'sed' function.
How to reproduce:
Build from source without some option (e.g. make NOSRT=1)
Once complete, from tsduck repo folder:

make installer

Expected behavior:
Install continues - no errors
Errors and logs:
dpkg-deb: error: parsing file '/home/jasonh/tsduck/pkg/installers/tmp/DEBIAN/control' near line 9 package 'tsduck':
blank line in value of field 'Depends'
make[2]: *** [Makefile:29: deb-tools] Error 2
make[1]: *** [Makefile:19: installer] Error 2
make: *** [Makefile:150: installer] Error 2`
Environment:
Ubuntu 22.04 running in wsl2 (Windows)
Additional information:
'sed' script output from pkg/deb/Makefile (see missing line)
Result in tmp/DEBIAN/control (empty line)
 libssl3,

 libedit2,
 libusb-1.0-0,
 libpcsclite1,
 libcurl4,

Hi @Wahwahboy
You must use the same options for the build of the binaries and the build of the packages.
If you used make NOSRT=1 to build the binaries, you must use make NOSRT=1 installer to build the packages. Otherwise, the packages are built assuming that SRT is used and libsrt is replaced with the actual package with which the binaries were built, meaning an empty line since the binaries were built without SRT.
In practice, there is no need to separate the two phases, binaries and packages. Just run make NOSRT=1 installer from scratch, it will build the binaries and then the packages in a consistent way.

Understood - thanks.
Apologies for raising as a bug
Amazing tool btw

source: gharchive/issue

authors: Wahwahboy lelegard

repo: tsduck/tsduck

license_type: permissive

license_source: github-api


text:
Protected2 and copy constructor continuity analyzer

Rather than expose PIDState, I opted to just expose the per-PID duplicate count and last packet.  There were already methods for exposing the first and last CCs.
The enablement of the copy constructor is needed for forward packet CC analysis without affecting the "main" ContinuityCounter object for a stream.

Also, I believe that I did the doxygen documentation correctly (including the one use of @ref), but I didn't confirm it with certainty by building with doxygen.

Hi Aaron,
Thanks for the fix. I merged it.
I had to fix a GCC warning (see the CI log). I also added a getLastPacket() in addition to your lastPacket() because returning a large structure by value is usually inefficient in the absence of a dedicated "move constructor" and "move assignment".

source: gharchive/pull-request

authors: alevinsn lelegard


text:
E: Ran out of header data space (oauth2_proxy implementation)

In an implementation we setting up with oauth2_proxy, we have a problem in some cases that the hard coded max header size of 20k is not enough.
Some users have a lot of groups + a large cookie size makes it difficult to fit everything in the 20k
It could help if the max header would be a lot larger or if it could be customized through a parameter.
For the users that have a "too large" header, we clearly get the following error :
E: Ran out of header data space

It's controled by the lws_context_creation_info.max_http_header_data param of libwebsockets, hardcoded to 20k.
I can accept a PR that adding a command line option for it, or wait for the next release, may do it myself.

A new version with an significant increase of the hardcoded value would help us out a lot.
I am trying it myself but I have some issue getting ttyd statically compiled with all the prereq libraries on SLES15SP4. (and I'm not going to bother you with that ;) )
I will add a PR for an optional parameter.
Thank you for your reply.

Ok I was finally able to build it correctly myself.
I was able to solve our problem by changing :
info.max_http_header_data = 20480;
into
info.max_http_header_data = 65535;
65535 is also the max value possible as the variable in the libwebsockets library is an unsigned short...
I hope this helps...

If you allow me to publish a branch I can create a PR for this.

#1088

license: mit

license_source: bigquery


text:
Dynamic parameter from URL to execute command

Hello,
I was wondering if it is possible to catch a dynamic parameter in the url in order to inject it to the specified command for ttyd ?
Like
http://localhost:8080/?myParam=test
And then the command would be
echo ${myParam}
And result in
echo test
Thanks

Duplicate of #143, closing.

I need this particular functionnality for a team projet, is there any way we can hire you or pay you to get this functionnality ?

No, I can't promise I will have time on it, this is a hobby project.
Well, there was a PR(#34) for this feature, but I didn't merge it for security concerns at that time.

@spichtjules Please take a look at the --url-arg option on master.

@tsl0922 A big thanks ! That's exactly what i was looking for


text:
apps for support grpc gen and grpc clean ?

.
├── LICENSE
├── README.md
├── _build
│   └── default
├── apps
│   └── test
├── config
│   ├── sys.config
│   └── vm.args
├── grpc_test.iml
├── rebar.config
├── rebar.lock

@god-ch hm? What are you asking?

authors: god-ch tsloughter


text:
Livestream Page needs fixing

I don't know if you guys have access to this page, but this still needs styling.

Links not readable (depends on theme color)
Main screen container needs fixing
Text box still on light mode

@ohitsmerenz what theme color are you using? I tried with a few colors and not able to see this bug.

@tsriram I'm using dark grey theme color. It's a custom color from the color palette.

authors: ohitsmerenz tsriram

repo: tsriram/twitter-web-night-mode


text:
store repositories in s3

I would like to suggest adding a feature to store repositories in s3.
This would mainly be for high availability purposes.
I can already do this with latest docker-registry, so Gandalf is the only thing left I can't reliably replicate.
This would only be for the file storage, mongodb entries would be replicated separately using mongo clustering
A usage example would be having two different  servers running gandalf, sharing an s3 bucket to store files, and connecting to a shared mongodb cluster

I think that this feature is more related to the setup itself than to code. Unfortunately, git + ssh will still require us to use an old style hierarchical filesystem, or something that looks like one. So we could use a FUSE module that allows users to mount S3 buckets in local directories, making all the S3 calls when running filesystem operations.
I will run some experiments with this approach and try to document it, if everything goes fine!

I had considered that approach but have run into issues doing similar things in the past with the fuse s3 module.  Maybe it could work out though.  When I get a chance I'll try it out as well
Thanks

authors: fsouza jblancett

repo: tsuru/gandalf


text:
Creation of docker-compose file

Added a docker-compose.yml file to ease the management of the project-image
Adapted the README.md to give instructions about how to run the project using docker compose

Thanks!

authors: ChaseOxide victormatheusEK

repo: ttu-ttu/ebook-reader


text:
{'message': 'Error creating conversation'}

from requests import post
ok = post('http://localhost:8080/create-conversation')
print(ok.text)

https://github.com/tuhinpal/bingchat-api#post-deploy
Read this. Also make sure you have the Bing Chat beta access.

alryt

repo: tuhinpal/bingchat-api

license: MIT


text:
setting ServiceServer output timeout to infinite

I just realized for servers we never want to timeout anything in the output buffer, since we cannot just drop a response if the request has timed out, otherwise the client will end up getting the wrong responses for requests.

ha..that's a nasty lil bug. :+1:

Yeah, I'm almost thinking we might want to totally remove the buffer from OutputController, since I think it is very application specific how timeouts are handled, and anything pushing into the output controller will have to deal with the buffer being full anyway, so the buffer doesn't allow us to ignore backpressure.  So it might be better to just remove the extra complexity.  Not sure on that though, certainly out of scope for this PR.

authors: DanSimon nsauro

repo: tumblr/colossus


text:
Are there any plans to have a package for Golang? (I'd love to help with that too)

Hi there,
First, thank you for starting work on Limbo—it sounds like an exciting project!
I was wondering if there are any plans to develop a package for Golang? If such a package isn’t currently in the roadmap, I’d be thrilled to contribute to making it happen. I have experience in Golang and would be happy to collaborate. Let me know if this aligns with your goals for the project and how I could get involved.
Looking forward to your thoughts!
Cheers

Hey @dhanielsales, we absolutely want Limbo to be packaged for Go, but I am not aware of anyone actively working on it.
As Limbo implements a subset of the SQLite C API, https://github.com/mattn/go-sqlite3, for example, should be straight-forward to port.
Of course, some Go folks dislike cgo so much they did:
https://github.com/ncruces/go-sqlite3
Curious to hear from you and other Gophers what's the best strategy to make this happen! And absolutely happy to take contributions here either in bindings/go or as an external package!

Hello there, building this project would be awesome!
Here is a benchmark for different sqlite3 drivers in go - https://github.com/cvilsmeier/go-sqlite-bench, this includes both cgo and pure go drivers along non database/sql drivers.
There is not a clear winner, this design choice/decision would be upon you.  Can absolutely use a cgo example as the port would be straightforward, the current libsql go driver also uses cgo as well or can go in the other direction!
The only thing I would like to add is the obvious fact that it would be better to have this as database/sql driver as it's defacto in go and would allow for drop in replacements in most projects.
Looking forward to hearing your thoughts and to work on this!!

I'm on team avoid CGO, and I would likely contribute to this as well :+1:

Yeah, I'm on avoid CGO team as well, so cound on me to help with it!

+1 for pure Go. Package management and distribution is much smoother without cgo dependencies in my experience. Happy to chip in on the implementation!

also interested in contributing!

authors: PThorpe92 Tejasmadhukar dhanielsales nikoksr penberg petern48

repo: tursodatabase/limbo


text:
How to viz the learned sparse regional attention?

Dear authors,
Thanks for your interesting paper.
Can you please share with us the source code that uses for the visualization of the learned sparse regional attention? I'd like to reproduce Fig. 5 in your paper.
Thank you so much!

Thanks for using SST.
I'm sorry that we can not provide you with our visualization code right now because the viz code is quite dirty and incompatible with the current codebase.
Basically, we first save the attention weights of the last block and some related position information (e.g., voxel coordinates, window ID). Then we randomly pick queries in foreground objects and paint the point cloud with the corresponding attention weights in Open3D.

Thank you so much! 👍

Thank you so much! 👍

Hello, have you realized the visualization of the learned sparse regional attention? I also want to draw a picture like Figure 5.

authors: Abyssaledge maudzung yinheyanxian

repo: tusen-ai/SST


text:
pangraph is not on Hackage!

pangraph is sufficiently amazing, that its absence on hackage is.. noticeable! : -)
Are there plans for such a release?

Oh, wow, this is unexpected :-)
The library is in a very draft state at the moment -- I'm not sure it's ready to be used by others. We do use in our graph analysis project though and so far it was fit for our purpose.
@deepfire How do you intend to use it? I presume, to parse GraphML files, as I don't think pangraph can do anything else at this point.
@thisiswhereitype Do you plan to release the library on Hackage soon? If yes, we could discuss a release plan here. As a starting point, I'd advise to switch to an existing XML parser to ease future maintenance.

@snowleopard, GraphML parsing, indeed.  Although at the moment I'm discovering that things aren't quite that smooth in the GraphML land.. lack of a true standard being one.

@deepfire Yes, GraphML is a bit messy. Fortunately, in our project we only need to extract nodes and edges without any labels such as weight, etc. What are your requirements?

@snowleopard, ideally, I'd love to be able to use some generic, widely accepted graph format for knowledge representation -- but initially, "just" reading and writing yEd files would be exactly enough.

I see. Could you link to a precise definition of the yEd file format?

Here's what I managed to obtain:

http://www.yworks.com/xml/schema/graphml/1.1/doc/http___www.yworks.com_xml_graphml/index.html
http://yed.yworks.com/support/qa/5288/importing-graphml-with-labels
http://yed.yworks.com/support/qa/1663/generated-graphml-with-labels-and-layout
http://yed.yworks.com/support/qa/2991/appearance-of-graphml-primer-examples-in-yed -- context

Thanks! That looks like quite a lot of stuff...
The idea behind pandoc is to convert graphs between various formats, but since the overlap between all formats is very small -- just the connectivity info -- most of these conversions will be lossy. So, I'm not quite sure whether it makes sense to make a fully-featured parser for yEd a part of pandoc. I think it makes sense to have it as a separately maintained Hackage library, which will be used by pandoc to extract the transferable connectivity data.
@deepfire What do you think?

@snowleopard, personally, the interesting parts (outside the overlap you mention) are:

node coordinates & dimensions
plaintext node labels -- here are options, since yEd provides for multiple labels per node

Also, if I understand it correctly, the minimal transferable connectivity data is available as generic GraphML tags -- no yEd-specific nodes need to be descended into.

@deepfire Thanks! This sounds reasonable. Coordinates are useful for many graph representations, and so are node labels.
Let's wait for a response from @thisiswhereitype. I believe is currently in full exam mode :)

@deepfire  @snowleopard and I have discussed and agreed the library was not ready for release on Hackage as it is still in need of some polishing as mentioned briefly above. The yEd idea looks interesting but I must finish my exams before I can take time to code. Please let me know if you have any questions.

Just to document here the list of things to be done before the release:

[ ] Switch to an existing XML library.
[ ] Switch the API from Strings to ByteStrings.
[ ] Make pangraph datatypes abstract, isolating them from users, i.e. have nodes :: Pangraph -> [Node], and nodeLabel :: Node -> ByteString etc. to access the graph.
[ ] Implement yEd parsing as a useful test case.

I have been investigating how to implement the successor to the Graph types in my rewrite considering the above comment. I was thinking data Pangraph = Graph [Node] [Arc] where Node Arc are just a list of ByteString attributes. But is Data.Array a viable option as it can avoid indexing a O(n) list which would allow the library to operate on a large graph?
Also I encountered a few negative opinions about ByteString :
https://mail.haskell.org/pipermail/haskell-cafe/2010-August/082033.html
http://stackoverflow.com/questions/7357775/text-or-bytestring
Considering this is it worth providing interfaces to multiple string types? While still working with ByteString underneath due to its speed.

The string landscape will change really, really drastically, once Backpack arrives -- due to a whole new dimension of modularity, so a personal guess is that it's not worth the added complexity for now.

Another point is that arrays are more-or-less awful for arbitrary mutation, whereas maps are better -- and Data.IntMap is particularly good -- IIRC it's very optimized.

I will just use a ByteString interface for now, can always add more if needed. Reading about Int.Map it seems there will speed gains there. My concern was how will this effect the API but looking through Int.Map has toList methods.

I will just use a ByteString interface for now, can always add more if needed

@thisiswhereitype Sounds like a good plan.

My concern was how will this effect the API

As a first step I suggest to stick to the API I described here: https://github.com/tuura/pangraph/issues/7#issuecomment-274069387
Do the simplest useful thing first. You can expand later if need be, plus we'll iterate during the code review.

I have been working on the agreed plan and after trying out ideas I have today committed the core types and getters API. https://github.com/thisiswhereitype/pangraph/blob/rewrite/src/Pangraph.hs
I have had a good go at using Hexml and Bytestring. Both of which I am working on to implement.

I have another commit up on my development branch. The Pangraph API is updated with the discussion on the previous commit. Due to git being hard I also committed the some other parts I was working on. My plan is to abstract the concept of parsing an XML based file into an internal API for extracting a Pangraph type from it. This will take a little longer then writing a parser for Hexml -> Pangraph for graphML but it should hopefully save time in the long run for implementing other XML graph formats.

I have just released a commit to my branch which meets the following agreed goals. Namely:

[ x] Switch to an existing XML library.
[ x] Switch the API from Strings to ByteStrings.
[ x] Make pangraph datatypes abstract, isolating them from users, and using nodes :: Pangraph -> [Node], and nodeLabel :: Node -> ByteString etc. to access the graph.
[ ] Implement yEd parsing as a useful test case.

It should be quick to add a parse template for Workcraft and I will investigate yEd. Also I need to rewrite most of the readme and Haddock seems to be necessary for a Hackage release.   @deepfire @snowleopard

@thisiswhereitype This is a good start, but I've added a bunch of comments to your commit here:
https://github.com/thisiswhereitype/pangraph/commit/30f9f45381d42261fb4dc22fe8f7d445aa2cfada

I have addressed the all the comments on the commit except the abstraction of Attributes, Keys and Values Which I will do next. Also related is discussion ongoing in #11 regarding algebraic graphs.

https://hackage.haskell.org/package/pangraph :tada:

Congratulations!

authors: deepfire snowleopard thisiswhereitype

repo: tuura/pangraph


text:
Mockdata: Add a sql script that inserts mock storage locations

Description
Currently there are no mock storage locations in DAMAP to show of this part of the frontend. The mock data can not be added into the DB by default, since  institutions would need to remove it before deploying, which is a hazzle.
Proposed solution
Write a sql script, that adds the test data directly into the deployed postgresql container.

We decided to not include the script in the project, since in its basic form its already contained in CUSTOMISING.md.

repo: tuwien-csd/damap-backend


text:
🛑 Speedtest Plotter is down

In 14b015a, Speedtest Plotter (https://speed.eighty-three.me) was down:

HTTP code: 523
Response time: 1571 ms

Resolved: Speedtest Plotter is back up in bcb08bc.

repo: tuxpeople/monitoring


text:
SOF-1154 Now support calling CleanupAllShows command in Viz

Now able to parse along a cleanupAllShows attribute when calling the cleanup command in Viz

Codecov Report

Merging #37 (98c4a01) into develop (8aa3cb8) will increase coverage by 69.17%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##           develop       #37       +/-   ##
=============================================
+ Coverage    30.82%   100.00%   +69.17%
=============================================
  Files           55        19       -36
  Lines         8291       521     -7770
  Branches      2103        50     -2053
=============================================
- Hits          2556       521     -2035
+ Misses        5220         0     -5220
+ Partials       515         0      -515

Impacted Files
Coverage Δ

...ckages/timeline-state-resolver-types/src/vizMSE.ts
100.00% <ø> (ø)

...ne-state-resolver/src/integrations/vizMSE/index.ts

...ages/timeline-state-resolver/src/devices/device.ts

...te-resolver/src/integrations/shotoku/connection.ts

...line-state-resolver/src/devices/deviceContainer.ts

...eline-state-resolver/src/integrations/obs/index.ts

...ne-state-resolver/src/integrations/pharos/index.ts

...state-resolver/src/integrations/hyperdeck/index.ts

...solver/src/integrations/panasonicPTZ/connection.ts

...te-resolver/src/integrations/sisyfos/connection.ts

... and 27 more

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

authors: LindvedKrvang codecov-commenter


text:
Installation stuck

Hi. Thank you very much for your effort. I am one of "Mac and Subtitleedit" lover.
In the installation, the process stacked with some warning and dialogue.

"subtitleeditw" does not open wine.
My environment is as attached. I have used wine on my machine several times.
Any thoughts on this?

I have the same issue. after installation "subtitleeditw" doesn't open anything.
➜  subtitle-edit-mac-wine-main brew install --cask --no-quarantine wine-stable
==> Caveats
wine-stable supports both 32-bit and 64-bit. It is compatible with an existing
32-bit wine prefix, but it will now default to 64-bit when you create a new
wine prefix. The architecture can be selected using the WINEARCH environment
variable which can be set to either win32 or win64.

To create a new pure 32-bit prefix, you can run:
  $ WINEARCH=win32 WINEPREFIX=~/.wine32 winecfg

See the Wine FAQ for details: https://wiki.winehq.org/FAQ#Wineprefixes

==> Downloading https://github.com/Gcenx/macOS_Wine_builds/releases/download/6.0.2/wine-stable-6.0.2-osx64.tar.xz
Already downloaded: /Users/alizarezade/Library/Caches/Homebrew/downloads/52f16c47ae7fdd8fb00c46e2b777d54fcfa338acd4385fc3ce2b4f2368d5a340--wine-stable-6.0.2-osx64.tar.xz
All formula dependencies satisfied.
==> Installing Cask wine-stable
Warning: macOS's Gatekeeper has been disabled for this Cask
==> Moving App 'Wine Stable.app' to '/Applications/Wine Stable.app'
==> Linking Binary 'appdb' to '/usr/local/bin/appdb'
==> Linking Binary 'winehelp' to '/usr/local/bin/winehelp'
==> Linking Binary 'msiexec' to '/usr/local/bin/msiexec'
==> Linking Binary 'notepad' to '/usr/local/bin/notepad'
==> Linking Binary 'regedit' to '/usr/local/bin/regedit'
==> Linking Binary 'regsvr32' to '/usr/local/bin/regsvr32'
==> Linking Binary 'wine' to '/usr/local/bin/wine'
==> Linking Binary 'wine64' to '/usr/local/bin/wine64'
==> Linking Binary 'wineboot' to '/usr/local/bin/wineboot'
==> Linking Binary 'winecfg' to '/usr/local/bin/winecfg'
==> Linking Binary 'wineconsole' to '/usr/local/bin/wineconsole'
==> Linking Binary 'winedbg' to '/usr/local/bin/winedbg'
==> Linking Binary 'winefile' to '/usr/local/bin/winefile'
==> Linking Binary 'winemine' to '/usr/local/bin/winemine'
==> Linking Binary 'winepath' to '/usr/local/bin/winepath'
==> Linking Binary 'wineserver' to '/usr/local/bin/wineserver'
🍺  wine-stable was successfully installed!
➜  subtitle-edit-mac-wine-main ./install-mac.command
INSTALLING https://github.com/SubtitleEdit/ on macOS

1. Go to https://github.com/SubtitleEdit/subtitleedit/releases
2. In 'Latest release', right click the ZIP with 'Portable version' (e.g. 'SE360.zip') and copy link address
3. Paste it here and press Enter:
https://github.com/SubtitleEdit/subtitleedit/releases/download/3.6.3/SE363.zip
Thank you, proceeding with installation...
Warning: The Ruby Homebrew installer is now deprecated and has been rewritten in
Bash. Please migrate to the following command:
  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

==> Checking for `sudo` access (which may request your password)...
Password:
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew

Press RETURN to continue or any other key to abort:
==> /usr/bin/sudo /usr/sbin/chown -R alizarezade:admin /usr/local/Homebrew
==> Downloading and installing Homebrew...
Updating files: 100% (2720/2720), done.
HEAD is now at c75aaed83 Merge pull request #12513 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-ast-1.14.0
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics data has been sent yet (nor will any be during this install run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

==> Next steps:
- Run brew help to get started
- Further documentation:
    https://docs.brew.sh

Warning: tesseract 4.1.3 is already installed and up-to-date.
To reinstall 4.1.3, run:
  brew reinstall tesseract
Warning: Cask 'wine-crossover' is already installed.

To re-install wine-crossover, run:
  brew reinstall wine-crossover
Warning: winetricks 20210825 is already installed and up-to-date.
To reinstall 20210825, run:
  brew reinstall winetricks
warning: taskset/cpuset not available on your platform!
------------------------------------------------------
warning: Your version of wine  is no longer supported upstream. You should upgrade to 5.x
------------------------------------------------------
Executing mkdir -p /Users/alizarezade
ls: /Users/alizarezade/.wine//drive_c: No such file or directory
grep: /Users/alizarezade/.wine//*.reg: No such file or directory
------------------------------------------------------
WINEPREFIX INFO:
Drive C:

Registry info:
/Users/alizarezade/.wine//*.reg:
------------------------------------------------------
------------------------------------------------------
warning: wine cmd.exe /c echo '%AppData%' returned empty string, error message "/usr/local/bin/winetricks: line 3455: /usr/local/bin/wine: Bad CPU type in executable"
------------------------------------------------------
warning: taskset/cpuset not available on your platform!
------------------------------------------------------
warning: Your version of wine  is no longer supported upstream. You should upgrade to 5.x
------------------------------------------------------
Executing mkdir -p /Users/alizarezade
ls: /Users/alizarezade/.wine//drive_c: No such file or directory
grep: /Users/alizarezade/.wine//*.reg: No such file or directory
------------------------------------------------------
WINEPREFIX INFO:
Drive C:

Registry info:
/Users/alizarezade/.wine//*.reg:
------------------------------------------------------
------------------------------------------------------
warning: wine cmd.exe /c echo '%AppData%' returned empty string, error message "/usr/local/bin/winetricks: line 3455: /usr/local/bin/wine: Bad CPU type in executable"
------------------------------------------------------
warning: taskset/cpuset not available on your platform!
------------------------------------------------------
warning: Your version of wine  is no longer supported upstream. You should upgrade to 5.x
------------------------------------------------------
Executing mkdir -p /Users/alizarezade
ls: /Users/alizarezade/.wine//drive_c: No such file or directory
grep: /Users/alizarezade/.wine//*.reg: No such file or directory
------------------------------------------------------
WINEPREFIX INFO:
Drive C:

Registry info:
/Users/alizarezade/.wine//*.reg:
------------------------------------------------------
------------------------------------------------------
warning: wine cmd.exe /c echo '%AppData%' returned empty string, error message "/usr/local/bin/winetricks: line 3455: /usr/local/bin/wine: Bad CPU type in executable"
------------------------------------------------------
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   646  100   646    0     0    928      0 --:--:-- --:--:-- --:--:--   928
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file ./se.zip: Permission denied
  0 9706k    0   594    0     0    326      0  8:28:10  0:00:01  8:28:09   718
curl: (23) Failed writing body (0 != 594)
Archive:  ./se.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of ./se.zip or
        ./se.zip.zip, and cannot find ./se.zip.ZIP, period.
override rw-r--r--  root/staff for ./se.zip?
Ready! Now open Terminal.app and type
subtitleeditw
to run the GUI or
subtitleeditw /help
to run the CLI

I have the same issue. after installation "subtitleeditw" doesn't open anything.
➜  subtitle-edit-mac-wine-main brew install --cask --no-quarantine wine-stable
==> Caveats
wine-stable supports both 32-bit and 64-bit. It is compatible with an existing
32-bit wine prefix, but it will now default to 64-bit when you create a new
wine prefix. The architecture can be selected using the WINEARCH environment
variable which can be set to either win32 or win64.

To create a new pure 32-bit prefix, you can run:
  $ WINEARCH=win32 WINEPREFIX=~/.wine32 winecfg

See the Wine FAQ for details: https://wiki.winehq.org/FAQ#Wineprefixes

==> Downloading https://github.com/Gcenx/macOS_Wine_builds/releases/download/6.0.2/wine-stable-6.0.2-osx64.tar.xz
Already downloaded: /Users/alizarezade/Library/Caches/Homebrew/downloads/52f16c47ae7fdd8fb00c46e2b777d54fcfa338acd4385fc3ce2b4f2368d5a340--wine-stable-6.0.2-osx64.tar.xz
All formula dependencies satisfied.
==> Installing Cask wine-stable
Warning: macOS's Gatekeeper has been disabled for this Cask
==> Moving App 'Wine Stable.app' to '/Applications/Wine Stable.app'
==> Linking Binary 'appdb' to '/usr/local/bin/appdb'
==> Linking Binary 'winehelp' to '/usr/local/bin/winehelp'
==> Linking Binary 'msiexec' to '/usr/local/bin/msiexec'
==> Linking Binary 'notepad' to '/usr/local/bin/notepad'
==> Linking Binary 'regedit' to '/usr/local/bin/regedit'
==> Linking Binary 'regsvr32' to '/usr/local/bin/regsvr32'
==> Linking Binary 'wine' to '/usr/local/bin/wine'
==> Linking Binary 'wine64' to '/usr/local/bin/wine64'
==> Linking Binary 'wineboot' to '/usr/local/bin/wineboot'
==> Linking Binary 'winecfg' to '/usr/local/bin/winecfg'
==> Linking Binary 'wineconsole' to '/usr/local/bin/wineconsole'
==> Linking Binary 'winedbg' to '/usr/local/bin/winedbg'
==> Linking Binary 'winefile' to '/usr/local/bin/winefile'
==> Linking Binary 'winemine' to '/usr/local/bin/winemine'
==> Linking Binary 'winepath' to '/usr/local/bin/winepath'
==> Linking Binary 'wineserver' to '/usr/local/bin/wineserver'
🍺  wine-stable was successfully installed!
➜  subtitle-edit-mac-wine-main ./install-mac.command
INSTALLING https://github.com/SubtitleEdit/ on macOS

1. Go to https://github.com/SubtitleEdit/subtitleedit/releases
2. In 'Latest release', right click the ZIP with 'Portable version' (e.g. 'SE360.zip') and copy link address
3. Paste it here and press Enter:
https://github.com/SubtitleEdit/subtitleedit/releases/download/3.6.3/SE363.zip
Thank you, proceeding with installation...
Warning: The Ruby Homebrew installer is now deprecated and has been rewritten in
Bash. Please migrate to the following command:
  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

==> Checking for `sudo` access (which may request your password)...
Password:
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew

Press RETURN to continue or any other key to abort:
==> /usr/bin/sudo /usr/sbin/chown -R alizarezade:admin /usr/local/Homebrew
==> Downloading and installing Homebrew...
Updating files: 100% (2720/2720), done.
HEAD is now at c75aaed83 Merge pull request #12513 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-ast-1.14.0
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics data has been sent yet (nor will any be during this install run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

==> Next steps:
- Run brew help to get started
- Further documentation:
    https://docs.brew.sh

Warning: tesseract 4.1.3 is already installed and up-to-date.
To reinstall 4.1.3, run:
  brew reinstall tesseract
Warning: Cask 'wine-crossover' is already installed.

To re-install wine-crossover, run:
  brew reinstall wine-crossover
Warning: winetricks 20210825 is already installed and up-to-date.
To reinstall 20210825, run:
  brew reinstall winetricks
warning: taskset/cpuset not available on your platform!
------------------------------------------------------
warning: Your version of wine  is no longer supported upstream. You should upgrade to 5.x
------------------------------------------------------
Executing mkdir -p /Users/alizarezade
ls: /Users/alizarezade/.wine//drive_c: No such file or directory
grep: /Users/alizarezade/.wine//*.reg: No such file or directory
------------------------------------------------------
WINEPREFIX INFO:
Drive C:

Registry info:
/Users/alizarezade/.wine//*.reg:
------------------------------------------------------
------------------------------------------------------
warning: wine cmd.exe /c echo '%AppData%' returned empty string, error message "/usr/local/bin/winetricks: line 3455: /usr/local/bin/wine: Bad CPU type in executable"
------------------------------------------------------
warning: taskset/cpuset not available on your platform!
------------------------------------------------------
warning: Your version of wine  is no longer supported upstream. You should upgrade to 5.x
------------------------------------------------------
Executing mkdir -p /Users/alizarezade
ls: /Users/alizarezade/.wine//drive_c: No such file or directory
grep: /Users/alizarezade/.wine//*.reg: No such file or directory
------------------------------------------------------
WINEPREFIX INFO:
Drive C:

Registry info:
/Users/alizarezade/.wine//*.reg:
------------------------------------------------------
------------------------------------------------------
warning: wine cmd.exe /c echo '%AppData%' returned empty string, error message "/usr/local/bin/winetricks: line 3455: /usr/local/bin/wine: Bad CPU type in executable"
------------------------------------------------------
warning: taskset/cpuset not available on your platform!
------------------------------------------------------
warning: Your version of wine  is no longer supported upstream. You should upgrade to 5.x
------------------------------------------------------
Executing mkdir -p /Users/alizarezade
ls: /Users/alizarezade/.wine//drive_c: No such file or directory
grep: /Users/alizarezade/.wine//*.reg: No such file or directory
------------------------------------------------------
WINEPREFIX INFO:
Drive C:

Registry info:
/Users/alizarezade/.wine//*.reg:
------------------------------------------------------
------------------------------------------------------
warning: wine cmd.exe /c echo '%AppData%' returned empty string, error message "/usr/local/bin/winetricks: line 3455: /usr/local/bin/wine: Bad CPU type in executable"
------------------------------------------------------
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   646  100   646    0     0    928      0 --:--:-- --:--:-- --:--:--   928
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file ./se.zip: Permission denied
  0 9706k    0   594    0     0    326      0  8:28:10  0:00:01  8:28:09   718
curl: (23) Failed writing body (0 != 594)
Archive:  ./se.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of ./se.zip or
        ./se.zip.zip, and cannot find ./se.zip.ZIP, period.
override rw-r--r--  root/staff for ./se.zip?
Ready! Now open Terminal.app and type
subtitleeditw
to run the GUI or
subtitleeditw /help
to run the CLI

same

authors: azarezade homunet louis-mps

repo: twardoch/subtitle-edit-mac-wine

license: Unlicense


text:
  "vertical-align" style of Link Text is always "top".

hi all.
I using Bootstrap 3.
I made Link Button using "btn" class. but text of button is always top.
I wrote css and set style="vertical-align: middle;" in <a> tag and btn class, but it's not work.
When using <button> tag and <input> tag, there are not problem. its "vertical-align" is always "middle".
this image is official site of Bootstrap changed style myself.
please give me some advice. thank you.

use line-height

authors: MiyakoG devashishgaurav

repo: twbs/bootstrap


text:
Resizing smaller makes content bigger than it is prior to resize

I have a very simple content for which I'm using bootstrap.css.  It is used to have responsive design like resizing for smaller size.  When Resizing to a small size, the code starts to resize the content but just before it starts doing it it makes everything bigger then it was originally.  You can see it here in this GIF image
How do I send a repro by the way because I have zipped the little project to test it.  The only thing I can offer in this Issue tracker when writing this is an image.

This media queries seems to work only in Internet Explorer 11 but seems not working in other browsers

Repro Project VS 2013 : https://onedrive.live.com/redir?resid=B1312569CC884E6!3076&authkey=!AOfXSZ27nnjSK-o&ithint=file%2Czip

We require a JSBin or JSFiddle. We do not open zips, tars, other archives or personal projects for security reasons. Please post a JSBin of an isolated example.

Ah sorry, it's my first time,  I'll do a JSBin once at home.  I'll get the trick  :)

On JSBin it's not acting like the project and yet everything is there the same visual, css and reference to bootstrap
http://jsbin.com/dubomujapo/1/edit?html,css,output
When I resize the image is responsive but not the table but it is in my project and it's the same html content any idea ?

@GearTheWorld sounds to me like you may have some CSS which is causing that. Only thing I can think of if you aren't using the .table-responsive class on the table.

Everything you see in JSbin is what I have nothing else.  Now the question is how it uses media-queries on my MVC app and not on JSbin however it has the same things.  HTML, CSS and REFERENCES
I'm lost...

I suggest asking on StackOverflow at this point. It seems to be a problem specific to your use of Bootstrap, rather than with Bootstrap itself. I'd say though: check you don't have any further JS or CSS in your actual project that may be causing this change in styling.

authors: GearTheWorld kkirsche patrickhlauke


text:
Is there a way to do scrollTo in BS?

Hi,
is there a way to do scrollTo little more automatic in Bootstrap?
I mean something like this:
<button class="scrollTo" data-scrollto="target_id">scrollTo</button>

Target

but without that js part. Only with using class="scrollTo" and data-scrollto="target_id" attributes. It would be fine to have it. Also it could work with anchors and add #fragment to window.location.
What do you think about it?

Thanks, but we'll pass for now.

authors: camohub cvrebert


text:
Does official bootstrap themes work with Bootstrap 4 alpha?

v4 was announced here http://blog.getbootstrap.com/2015/08/19/bootstrap-4-alpha/, along with themes.
However, do those official themes work with Bootstrap 4?

The v4 alpha was announced, and the official themes do not work with v4-alpha.

authors: mdo tonyxiao


text:
.modal-dialog on narrow SM screen has no horizontal margin

Refs https://github.com/twbs/bootstrap/issues/19969#issuecomment-221954529

Testcase: https://jsfiddle.net/x1qpe0mm/

(The test requires the viewport to be between 544px and 599px.)

A left/right padding to the .modal-dialog would do the job:
@media (min-width: 544px) {
  .modal-dialog {
    max-width: 600px;
    margin: 30px auto;
    padding: 0 10px;
  }
}

authors: RyanZim cvrebert rwaltenberg


text:
Responsive .rounded-- classes.

extend the round borders for switch the media breakpoints
//
// Border
//

.border-0        { border: 0 !important; }
.border-top-0    { border-top: 0 !important; }
.border-right-0  { border-right: 0 !important; }
.border-bottom-0 { border-bottom: 0 !important; }
.border-left-0   { border-left: 0 !important; }

//
// Border-radius
//

@each $breakpoint in map-keys($grid-breakpoints) {
  @include media-breakpoint-up($breakpoint) {
    $infix: breakpoint-infix($breakpoint, $grid-breakpoints);

	.rounded#{$infix}        { @include border-radius($border-radius); }
	.rounded#{$infix}-top    { @include border-top-radius($border-radius); @include border-bottom-radius(0); }
	.rounded#{$infix}-right  { @include border-right-radius($border-radius); @include border-left-radius(0); }
	.rounded#{$infix}-bottom { @include border-bottom-radius($border-radius); @include border-top-radius(0); }
	.rounded#{$infix}-left   { @include border-left-radius($border-radius); @include border-right-radius(0); }
	.rounded#{$infix}-circle { border-radius: 50%; }
	.rounded#{$infix}-0 {  border-radius: 0;	}

  }
}

Why?

you can make elements like a navbar on large screen with round borders and on small screen without them
or
you can make cards on large screen with image on left side have "rounded-lg-left" on small screen is the image on top you can reset the corners "rounded-sm-top"
and it is simular to the other utilities eg margins , paddings, display ....

Thanks, but we'll pass on this.

I'm not sure if you look at closed issues, but I have a use case for this. On a smaller screen, I would have a form's button be below the input field and would want rounded bottom corners. On a larger screen it would be inline and I would want rounded right corners.

I could use this as well.
Use Case: I have a row of buttons that butts up to one another horizontally on a large screen.   Looks best with no rounding, maybe on the first and last.  On a smaller screen, I'd like the rounding to be dynamic.

Thanks. Awesome.

+1

I could use this as well. On desktop screens nav list items look nicer with rounded top corners, but when collapsed on smaller screens only the top element should have the rounding applied. @mdo  can you expand on your reasons for passing?

I have the same use case need as @cersos above.

can you expand on your reasons for passing?

At the time I decided this, the primary reason was one of usage and file size, which I think still apply today. Not that many people want this, and the expansion from today's classes across five built-in breakpoints is a significant jump.
Always happy to revisit past decisions, and in v5 we'll have a new utility API to customize. Keep the feedback coming.

Tailwind has utilities like this which are both really useful, but also make their package quite large.
This isn't such a problem when using their project with a package manager as you can use something like Purgecss to remove unused classes, but in the case of Bootstrap I can understand why they haven't made every utility class responsive as it could become unwieldy quickly!

authors: PUncle anthony0030 cersos jonnysp jordanambra lauracabre leegellie mdo nextgenthemes simondrabble


text:
Util.getSelectorFromElement and absolute path ( href="C:\web#tab-content-id" )

Hello,
i noticed that the method Util.getSelectorFromElement isn't removing an absolute path defined before the ID in the href attibute.
with this example:
href="C:\web\#tab-content-id"
the document.querySelector("C:\web\#tab-content-id") will always fail to find an element.
using the data-target attribute is a solution. But it's just a circumvention of the problem.
(also, the documentation doesn't explain that trick)

Hi @Ronan-Lenor,
Sorry but I don't understand your use case here.
document.querySelector only allow valid CSS selector

Sorry but that's not our job to substring when you put wrong data in our plugins. Please follow our documentation and put valid selector on the href attribute or data-target

Well, can you mention somewhere in the online Documentation that href is used as a selector (where an unaware developer seeing an URI field). And then explain that the data-target attribute can be used as a fallback?

it's written here:

yup, seen that didn't help to understand it was a Selector, as defined by mozilla
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors
is it ok to rewrite it like that:
"Tab should have either a data-target or an href using a selector for a container node in the DOM."
and that would be great if you could put "selector" with a link to the Mozilla documentation.
=P

We added that about our selectors : https://github.com/twbs/bootstrap/blob/v4-dev/site/docs/4.1/getting-started/javascript.md#selectors
Bootstrap use selectors through data api see: https://getbootstrap.com/docs/4.1/getting-started/javascript/#data-attributes
And you can put only strings on data attributes 👍

Nice details (that i didn't saw) about the selectors.
but i still think that the usage of the href attribute "alone" (as it is write: "either a data-target OR an href") is lacking the mention that bootstrap expect it to be a selector while it's URI field.
or maybe there's a section in the documentation, that i haven't see, mentioning that every html tags handled by bootstrap and that have a href attribute, is expecting a selector?

authors: Johann-S Ronan-Lenor


text:
set min-height for form-control textarea

set min-height for .form-control textarea

prevent user from shrink textarea
set minimum height equals default input height

before
after

📷 Chrome 75 / Mac OS X 10.14.6

To fix also #28901, is it better add min-height to .form-control and remove the specific heights?

@ysds, that would reintroduce https://github.com/twbs/bootstrap/issues/18842, unless https://github.com/twbs/bootstrap/pull/28917 is merged.

@m5o Would you add the min-height to .form-control and form-select directory and remove the specific height from those? Also need to modify the sizing options and the combinations with .input-groups.

@ysds done, hopefully as you requested.
🤔 I don't know if, for consistency, it would make sense to set min-height also to .form-file

.form-file use position: absolute, so would have to use height.

umm, confirmed

@MartijnCuppens Can you re-review, please?

Are we sure about backporting this BTW?

#18842 still seemed to be an issue. I've pushed a working fix (219e1c68ce6405778bcaf865841cc89f3d80b7c6) and also committed a fix for the input groups.

@MartijnCuppens: this doesn't apply clean on v4-dev-xmr. Can you backport it manually please?

I'm afraid we can't backport this easily since .form-controls can be selects too in v4. To make this work we'll need to rewrite quite a lot and this might introduce breaking changes.

authors: MartijnCuppens XhmikosR m5o mdo ysds


text:
Add z-index utility

I have added z-index levels - utils. Fixes #31054 and relates to #29985
Preview: https://deploy-preview-31486--twbs-bootstrap.netlify.app/docs/5.0/utilities/z-index/

We should discuss about values here:

I'm quite sure -1 would be used;
Why going to 5? Wouldn't 2 be enough, at this point?

Also, keep in mind we already have z-index values out there: we might do a bit more when it comes to this, maybe?

Also, keep in mind we already have z-index values out there: we might do a bit more when it comes to this, maybe?

Maybe first we need to map all scss files with z-index variables and then generate the z-index utils

LJC

The examples divs are in the same order as their indexes, which doesn't illustrate their meaning (not sure if this is really an issue, thoughts?)
The table of contents looks redundant
Not sure if "stack" is descriptive enough, maybe rename it to z-index?

The examples divs are in the same order as their indexes, which doesn't illustrate their meaning (not sure if this is really an issue, thoughts?)
The table of contents looks redundant
Not sure if "stack" is descriptive enough, maybe rename it to z-index?

okass, i can do that

I realized we also mention z-indexes in "Extend / Approach": https://v5.getbootstrap.com/docs/5.0/extend/approach/#z-index-scales
I guess we should mention those utilities and their scale here, too.

Closing due to conflicts. See #37317 as replacement.

authors: DoubleRR7244 MartijnCuppens MauricioHernanCabrera ffoodd mdo


text:
Docs: missing aria-hidden on some decorative SVGs

Description

Add aria-hidden on decorative SVGs to make sure they are ignored by assistive technologies.
Motivation & Context

Type of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Refactoring (non-breaking change)
[ ] Breaking change (fix or feature that would change existing functionality)

Checklist

[x] I have read the contributing guidelines
[x] My code follows the code style of the project (using npm run lint)
[x] My change introduces changes to the documentation
[x] I have updated the documentation accordingly
[ ] I have added tests to cover my changes
[ ] All new and existing tests passed

Live previews

https://deploy-preview-40756--twbs-bootstrap.netlify.app
https://deploy-preview-40756--twbs-bootstrap.netlify.app/docs/components/tooltips/
https://deploy-preview-40756--twbs-bootstrap.netlify.app/docs/examples/features/
https://deploy-preview-40756--twbs-bootstrap.netlify.app/docs/utilities/position/

Related issues

Just for info, after some discussions with the accessibility team, they confirmed that aria-hidden is needed on SVGs until now, even if most of assistive technologies will ignore SVGs that do not contain texts. They rely on criterion WCAG 1.1.1 saying:

Non-text Content (Level A)
Success Criterion (SC)
All non-text content that is presented to the user has a text alternative that serves the equivalent purpose, except for the situations listed below.
[...]
Decoration, Formatting, Invisible
> If non-text content is pure decoration, is used only for visual formatting, or is not presented to users, then it is implemented in a way that it can be ignored by assistive technology.

The last paragraph says we must do what is needed to ensure that decorative elements are ignored, and the only way to do it, is to use aria-hidden.
I'm going to make another PR about the tooltip icon's label (#40808 ) so that we can at least fix this label issue...

Hi @patrickhlauke could you please add your review? I added aria-hidden everywhere in the examples, like we talked about...
Thanks 😄

did a big cleanup here https://github.com/twbs/bootstrap/pull/40756/commits/2e1f1161d1572ba700677b8f753ee84ee93f2f5d ... merging now (though I'd still say in most cases it's unnecessary to add aria-hidden when it's a) overriden by the aria-label of its parent/ancestor, or b) is completely empty of text nodes)

authors: hannahiss patrickhlauke


text:
Fix Nix Mix

Describe the bug
The Nix build is currently reporting warnings like this:
trace: warning: crane cannot find name attribute in /nix/store/i70apg8wmqwaw1d20w56yr3hyjvr4f21-source/Cargo.toml, consider setting `pname = "...";` explicitly
trace: warning: crane cannot find version attribute in /nix/store/i70apg8wmqwaw1d20w56yr3hyjvr4f21-source/Cargo.toml, consider setting `version = "...";` explicitly

To Reproduce
nix build

Expected behavior
No warnings or errors.
Additional context
https://github.com/ipetkov/crane/pull/237#issuecomment-1473931031

I don't know how things work in Nix wrt Cargo, but I would tend to blame the fact that pname is set but not version here and here. Since name is pname+version, that should lead to the two errors above.

See also this: https://github.com/ipetkov/crane/issues/281

authors: Niols torhovland

repo: tweag/topiary


text:
Automated testing of web playground.

Fixes #365.

I've left a few comments, but no blockers (I think). I'll approve, but with the caveat that it's probably worth having a second opinion!

@ErinvanderVeen @nbacquey


text:
Build HTML indentation

hi, I'm using twig for my projects (built on Parcel) and I'm having a problem with formatting after the build. Can you please advise me how to format the html correctly? Thanks a lot!
Example:
`
                                <p class="category-title__description">
                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas volutpat accumsan turpis. Phasellus cursus est ac arcu bibendum vehicula.
                </p>
                        </div>
        </div>

`

Good question! Have we implemented the spaceless filter?

No, unfortunately I don't need that. I thought if I use twig my HTML will break (indentation). I need repair only indentation. Thaks a lot!

Whitespace and indentation doesn't break HTML. You could pass it through an HTML prettifier or similar, or we could create a Twig.js extension to pass it through a prettifier too.

The whitespace depends on how you format the template itself, but that is up to you and not something that Twig itself handles. Since this is a JavaScript implementation of Twig we attempt to match the PHP version as closely as possible. If you are seeing a difference in outputted whitespace from the PHP version, please open a new issue with an example of it working as expected on https://twigfiddle.com/ and what twig.js produces using this template.

authors: RobLoach fadrnym willrowe


text:
feat(http): Don't force depend on tls

Previously a compile time error would trigger if no tls backend was selected.
TODO: document behaviour

While I agree TLS should be optional (for example, when using the http-proxy it isn't needed at all), the proxy itself won't benefit from this change because it won't actually depend on twilight-http anymore when the pending PR gets merged.
I'd rather like to see this PR shift towards a HTTP-only client that doesn't support TLS rather than disabling the networking parts.

5052f1f658c48f41 might not be wanted as rustdoc is unable to highlight optional function argumets (https://github.com/rust-lang/rust/issues/43781#issuecomment-1019825544)

Actually, let's drop use_http entirely on next

Clippy failure is unrelated.

authors: 7596ff Gelbpunkt vilgotf

repo: twilight-rs/twilight

license: ISC


text:
Is it possible to disable 2FA for another user, other than yourself (current_user)?

Hi there,
Firstly, I apologise if this is a daft question and I've totally misunderstood/overlooked something simple, though I'm hoping someone can help point me in the right direction.
I'm currently trying to implement an (admin-only) feature, allowing Authy 2FA to be disabled for a particular user.
Initially I made use of the user_disable_authy_path route helper, without supplying any additional arguments:
 <%= link_to "Disable two-factor authentication", user_disable_authy_path, method: 'POST', class: "btn btn-outline-danger" %>

During testing, however, I realised that this wants to disable 2FA for the current_user, rather than the user instance being viewed by the admin.
After searching in GitHub to see how other open-source repos are using the user_disable_authy_path path, I saw a handful of people passing in an id parameter, so I gave that a try:
<%= link_to "Disable two-factor authentication", user_disable_authy_path(id: @user.id), method: 'POST', class: "btn btn-outline-danger" %>

Unfortunately, as far as I can tell, 2FA is still being disabled on current_user, rather than @user.
From reading the authy-devise source code, I think I've found the line where resource is being consistently set to current_user:
https://github.com/twilio/authy-devise/blob/c5955b88dfd561180eecd9d93b708bd76839539a/app/controllers/devise/devise_authy_controller.rb#L184
Is there a way to override this behaviour such that resource can be set to an arbitrary userrecord?
Thanks in advance for any help 🙏
Dave J

You are right in that the resource is the current_user. But, given the authorisation on the POST_disable_authy action also only checks that they are the current user, you wouldn't want that action to be able to disable 2FA for an arbitrary user, because any user could disable 2FA for any other user.
Instead, I would build your own action, within your admin section, that could disable 2FA for a user, but is also only available to admins.
Thanks for the kind mention on Twitter earlier btw! Its been too long!

Hi @philnash 👋
Thanks for your speedy reply!
Thanks, the existing behaviour makes complete sense and, as you suggest, I'll build something custom for this admin functionality.
I'd say let's meet up for beer/coffee once the COVID restrictions lift, though since you've moved over to Australia, that might be easier said than done 😂.
Take care and keep up the great work 🙏🏼

Awesome, let me know if there's anything else I can help with. And yes, a beer/coffee would be great were I not now the other side of the world! 😄

repo: twilio/authy-devise


text:
prettier not working

as per config "singleQuote": false
Only double quotes should be allowed. Single quotes should be converted to double quotes.
@johnjacobkenny @PuruVJ

It's working perfectly for my editor when I press the format shortcut keys.
I've introduced some changes in the twitter branch. When they get merged, it might get fixed for you.

I had to click Format Document and then select Prettier then it is working

Shortcut keys weren't working for you?

authors: PuruVJ proful

repo: twindle-co/twindle


text:
error installing constantly : ERROR conda.core.link:_execute(481):

Hi,
I tried to install SCRAPY by typing conda install scrapy
It gives an error with constantly. Then I tried to install constantly alone and I have an permission error:
PermissionError(13, 'Permission denied')
Here is what I have when the terminal get stuck:

mic@ubuntu:~$ conda install constantly
Solving environment: done
Package Plan
environment location: /home/mic/anaconda3
added / updated specs:
constantly
The following NEW packages will be INSTALLED:
constantly: 15.1.0-py36_0
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: failed
ERROR conda.core.link:_execute(481): An error occurred while installing package >defaults::constantly-15.1.0-py36_0'.
PermissionError(13, 'Permission denied')
Attempting to roll back.
Rolling back transaction: done
PermissionError(13, 'Permission denied')

Anyone can help me with this ??

For the verbose output:

mic@ubuntu:~$ conda install -v constantly
Solving environment: ...working... done
Package Plan
environment location: /home/mic/anaconda3
added / updated specs:
constantly
The following NEW packages will be INSTALLED:
constantly: 15.1.0-py36_0

Proceed ([y]/n)? y
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... ===> LINKING PACKAGE: defaults::constantly-15.1.0-py36_0 <===
prefix=/home/mic/anaconda3
source=/home/mic/.conda/pkgs/constantly-15.1.0-py36_0
===> REVERSING PACKAGE LINK: defaults::constantly-15.1.0-py36_0 <===
prefix=/home/mic/anaconda3
failed
An error occurred while installing package 'defaults::constantly-15.1.0-py36_0'.
PermissionError(13, 'Permission denied')
Attempting to roll back.
Rolling back transaction: ...working... done
Traceback (most recent call last):
File "/home/mic/anaconda3/lib/python3.6/site-packages/conda/core/link.py", line 535, in _execute_actions
action.execute()
File "/home/mic/anaconda3/lib/python3.6/site-packages/conda/core/path_actions.py", line 364, in execute
force=context.force)
File "/home/mic/anaconda3/lib/python3.6/site-packages/conda/gateways/disk/create.py", line 280, in create_link
mkdir_p(dst)
File "/home/mic/anaconda3/lib/python3.6/site-packages/conda/gateways/disk/init.py", line 60, in mkdir_p
makedirs(path)
File "/home/mic/anaconda3/lib/python3.6/os.py", line 210, in makedirs
makedirs(head, mode, exist_ok)
File "/home/mic/anaconda3/lib/python3.6/os.py", line 220, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/home/mic/anaconda3/lib/python3.6/site-packages/constantly'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mic/anaconda3/lib/python3.6/site-packages/conda/core/link.py", line 472, in _execute
cls._execute_actions(pkg_idx, axngroup)
File "/home/mic/anaconda3/lib/python3.6/site-packages/conda/core/link.py", line 553, in _execute_actions
reverse_excs,
conda.CondaMultiError: [Errno 13] Permission denied: '/home/mic/anaconda3/lib/python3.6/site-packages/constantly'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mic/anaconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in call
return func(*args, **kwargs)
File "/home/mic/anaconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main
exit_code = do_call(args, p)
File "/home/mic/anaconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "/home/mic/anaconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute
install(args, parser, 'install')
File "/home/mic/anaconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install
handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv)
File "/home/mic/anaconda3/lib/python3.6/site-packages/conda/cli/install.py", line 285, in handle_txn
unlink_link_transaction.execute()
File "/home/mic/anaconda3/lib/python3.6/site-packages/conda/core/link.py", line 225, in execute
self._execute(tuple(concat(interleave(itervalues(self.prefix_action_groups)))))
File "/home/mic/anaconda3/lib/python3.6/site-packages/conda/core/link.py", line 500, in _execute
rollback_excs,
conda.CondaMultiError: [Errno 13] Permission denied: '/home/mic/anaconda3/lib/python3.6/site-packages/constantly'

repo: twisted/constantly


text:
Image API Fix & Makefile

fixing the typo on the image api action, changing from /image/build -> /build
updating the base image to alpine 3.6
making a new cleanup modifications to Makefile

hi @liron-l ... any chance you can take a look at this one? :-) .. would hate to run off a fork

hi @liron-l  ... i've made the changes you requested .. One thing I changes was the VERSION on the Makefile .. which i figured it would be nice to just change from the cli version?? .. but retain the override. If prefer not, just say and i'll revert though :-)

fixed a quick typo at in Makefile .. needed a $$ no $ on the awk command .. :-)

Thanks @gambol99, I'm not sure parsing the code to fetch the version is considered optional.
You can do everything directly in the makefile, specifically:

Define the version in the make file
Use ldflag to push the version to the binary as part of go build. see:

```--ldflags "-X \"locationtogetversion.Version=$(version)\" ```

If the steps above are not clear, just make the version static in the makefile (that is, not related to the binary), and I will push your changes.

hi @liron-l .. like this i.e. take the version from the Makefile passing via the flags .. note I keep the image separate but default to app version, purely to retain a 'latest' image ... If you happy, i'll rebase and squash the commits

Sure @gambol99 just set the default version to something reasonable (e.g., version = "1.0.0").

hi @liron-l .. done :-)

Thanks @gambol99

repo: twistlock/authz


text:
Added Stale issues and PRs GitHub action

Description of changes:
There are some issues and PRs that have been not active on the repo for a while and look to have been abandoned by their original creators. Please accept this PR so that github actions can handle dealing with stale PRs and issues.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

The cron schedule defined in the yaml is that it'll run every day at midnight

repo: twitchtv/twirp


text:
forms margin

There is different viewing in Firefox 10.0.2 and Chrome 17.0.963.56 m. In Firefox there are more space then in Chrome, Chrome do not have at all space HTML elements are:  between fieldset  label and item with div class="control-group"
I am using Bootstrap 2.0.1 version.

Could you provide a screenshot showing the difference?

Format:

Format:
also providing the source code of that.
<form class="form-horizontal" id="order-form" action="">
	<fieldset>
		<legend>Order</legend>

			Status *

				<select class="span5" name="Order[status]" id="Order_status">
					<option value=""></option>
					<option value="200">New</option>
					<option value="150">Confirmed</option>
					<option value="100">Sent</option>
					<option value="1" selected="selected">Canceled</option>
				</select>

			Create Time

				<input class="span5" disabled="disabled" name="Order[create_time]" id="Order_create_time" type="text" value="2012-03-02 16:54:04" />

			Product Code

				<input class="span5" maxlength="20" disabled="disabled" name="Order[product_code]" id="Order_product_code" type="text" value="PRWJ16O26F1KTFV" />

			Product Title

				<input class="span5" maxlength="60" disabled="disabled" name="Order[product_title]" id="Order_product_title" type="text" value="asdfasdf" />

			Product Price

				<input class="span5" disabled="disabled" name="Order[product_price]" id="Order_product_price" type="text" value="33.00" />

	</fieldset>

		<button class="btn btn-primary" type="submit" name="yt0"> Save</button>
		<button class="btn" type="reset" name="yt1"> Reset</button>

</form>

Same is in bootstrap Demo forms section "Horizontal forms".

It seems like the images are not available. It would be nice if you could fix that. Try uploading them to http://imgur.com

updated.

This seems to be bug in Webkit. Apparently it ignores the margin rules.
Here is a fiddle demonstrating that it has nothing to do with Bootstrap.

Yup, there is another issue related to this we closed awhile back. There's not too much we can do about it unfortunately :. We'll readdress in the future if at all possible.

authors: mainerror markdotto rikius

repo: twitter/bootstrap