ndslice.algorithm

PR is available in Mir v0.16.0-alpha2
Benchmarks: https://github.com/libmir/mir/tree/master/benchmarks/ndslice
ndslice.algorithm

[x] ndMap (multidimensional map type of Slice(N, xxx))
[x] ndFold (single tensor, multiple functions and seeds)
[x] ndReduce (single seed, multiple tensors)

[x] Add vectorization and fastmath flags

[x] ndEach (no seed, multiple tensors)

[x] Add vectorization and fastmath flags

[x] ndAll (multiple tensors)
[x] ndAny (multiple tensors)
[x] ndFind (multiple tensors) [reworked]
[x] ndCmp (multidimensional propagation)
[x] ndEqual (multiple tensors)

ndCanFindNeedle and ndFindNeedle was removed.
ndslice.slice

[x] optimize memory allocations using ndFold.
[x] add opCmp using ndCmp

ndslice.package

[x] Update example

See Also
https://github.com/ldc-developers/ldc/issues/1669
Asked Questions

What if I want to implement my own algorithm that is not part of Phobos? It seems like I would want to be able to use LikePtr in such a situation to interface seamlessly with the rest of ndslice.

You can use random access range interface and sliced function. @LikePtr is for optimisation reasons. It may be exposed in the future, but I need to write a proper documentation of how it should be used first. The number of use cases for @LikePtr is very small, and all of them seems should be a part of the package.

To come back to the bigger picture: Do we really need nd versions of all "scalar" functions like each, all, any and so on?

Yes, but not all "scalar" functions should be adopted. Current list of functions is enough.
For example:

We do not need special sorting algorithms, because we need flattened slice anyway. If a slice is not flattened user may use byElement to get random access range of all elements or make a copy/index.

We don't need ndSwap(a, b) because we can just do ndEach!swap(a, b).

We don't need ndCount because it can be easily implemented with ndReduce.

I understand why map might be a bit non-trivial – it needs to preserve the input structure in the output. But wouldn't it be much more powerful and DRYer to offer a "flat" range interface for the operations for which structure is irrelevant? For example, in pseudocode ndAll!fun(a, b) == all!fun(zip(a.flattened, b.flattened)) (discounting for tuple expansion of the fun parameters). I suppose something like that probably even exists in ndslice already.

Yes, for performance reasons. flattened is called byElement, it is selector operator.

I'm sure this has crossed your mind while designing the functions – why did you opt to go for the special ndslice variants instead? Potentially using the extra structural information for extra performance? (If it only comes down to auto-vectorization, that shouldn't really matter, though.) You could also think about adding annotation forwarding support of some kind (extra members, UDAs, …) to the length-preserving std.algorithm functions to propagate along the structure information.

I add this module because performance reasons. N is dimension count:

byElement requires additional computations :

One more add operations for forward access (empty, front, popFront).
N-1 div/mod pairs plus 2*N-1 more add for random and backward access. div/mod are expensive.

byElement requires N+1 additional general purpose registers. This is bad for iterating few matrixes in the lockstep.
ndX implementations has multidimension do-while loop optimisation.

ndMap could also be implemented by reshape ∘ map ∘ reshape, I suppose.

This is true only for Slices, which have continues in-memory representation. Numpy just copies all ndarray, if the ndarray can not be reshaped.
The result of ndMap is a Slice. The result of map is the range, and if we want to use ndslice module with map, we need to sliced again. The real problem is that byElement has slow random access primitive to build a slice on top :
auto lazyMap = sl.byElement.map!fun.sliced(sl.shape);

auto lazyMap = sl.ndMap!fun;

In the same time #4647 provides vectorised  operations like +=, this PR also have vectorised algorithms. In addition, Mir will have BLAS soon, see current benchmark. Mir has the same performance for large matrixes as OpenBLAS, this means that Mir's generic gemm SIMD kernels are optimal. For small matrixes I need to write generic SIMD transposition kernels for packing, but this is small effort comparing with gemm SIMD kernels.

Being very much a bystander only—so this might be entirely unfounded—it seems like there is some danger of ndslice bit-by-bit involving into its own little parallel universe. To put it in a slightly more cynical way, if we can't use standard ranges to implement any on a multidimensional array ourselves, we might need to revise our marketing materials.

I don't think so. ndslice extends our universe. We have different types of ranges. ndslice is just the next after random access range:

Any slice is random access range composed of elements with dimension equals to N-1.
byElement is random access range, with fast forward iteration (as much fast as possible with Range API).
Slice can be created on top of any random access range with length. For example DOK format for sparse tensors was implemented in Mir, just creating a tiny wrapper on standard associative arrays.
ndX functions provide optimal multidimensional iteration pattern. We don't need ndSwap for example, because we can just write ndEach!swap. So, please do not think that I am rewriting std.algorithm: current functions provide only optimal loop construction with different stop criteria.

ping @John-Colvin @wilzbach: multidimensional map is here :-)

First, is it really nessesary for all of the planned stuff to be in this one PR? You could build up the module PR by PR in order to make this easier to review. Even though it might seem odd to have a module with only one function in it, that would only be temporary and that's fine for std.experimental.
Secondly, I have a slight problem with the names of the planned functions. One of the main benefits of ndslice that I laid out in my article is that it feels like it's a part of the rest of the language because you don't have to use a whole bunch specialized functions in order to get the functionality you want. This is one of my main gripes with numpy: in your code you have numpy code, and then you have Python code, and they don't mix well.
With these planned functions, instead of doing the natural thing someSlice.map!func you have to remember to do someSlice.ndmap!func. This is easily remedied, just use the same names as the respective std.algorithm functions so it feels like you're still using the normal range functions; no special casing required.

First, is it really nessesary for all of the planned stuff to be in this one PR?

No, only ndslice.computation. The list is just a plan for set of PRs.

Secondly, I have a slight problem with the names of the planned functions. One of the main benefits of ndslice that I laid out in my article is that it feels like it's a part of the rest of the language because you don't have to use a whole bunch specialized functions in order to get the functionality you want. This is one of my main gripes with numpy: in your code you have numpy code, and then you have Python code, and they don't mix well.
With these planned functions, instead of doing the natural thing someSlice.map!func you have to remember to do someSlice.ndmap!func. This is easily remedied, just use the same names as the respective std.algorithm functions so it feels like you're still using the normal range functions; no special casing required.

Both map and ndmap are valid for ndslices, but they are doing different things. ndmap is not an optimised map for Slice, but multidimensional map. You can still use map for slices if you import all ndslice package. std.algorithm provides only single dimension logic. With new module ndslice would be consistent with other Phobos anyway. In NumPy you can not write fast code in python, if this code requires index access. In ndslice, you can do all things in single language. The module provides efficient multidimensional functional style subroutines.

I would also be curious about the rationale behind the ndXXX naming scheme, which has the smell of a design mistake.

@klickverbot  As was wrote for @JackStouffer both map and ndmap are valid:
Original matrix
0 1 2
3 4 5
6 7 8

map for 2D case
The result is random access range.
fun(0 1 2)
fun(3 4 5)
fun(6 7 8)

map for 2D case
The result is 2D slice, all operations on slices can be used.
fun(0) fun(1) fun(2)
fun(3) fun(4) fun(5)
fun(6) fun(7) fun(8)

ndmap is most convenient name for me, and I would like to avoid Camel case names for basic subroutines if possible. This is much more simpler to keep all logic in mind if a name is like chinese hieroglyph. This is common for math. For example, findRoot is better then fr, but spr2 is better then symmetricPackedRank2Operation. nd prefix is already used in the package name and ndarray function (the same name exists in NumPy).

The naming logic is:

verb + ed - names that changes lengths and strides for a slice (iteration module)
noun - an alternative type of Slice or iterator for the same data (selection module)
nd + noun - lazy computation (computation module)
nd + verb - computation (computation module)

ping @John-Colvin @wilzbach: multidimensional map is here :-)

Looks great - I started to play with it & it feels exactly how I imagined it. Great job!

Both map and ndmap are valid for ndslices, but they are doing different things. ndmap is not an optimised map for Slice, but multidimensional map.

:+1: from my side. Maybe you should add that further abstractions can be done with pack and other high-level selection routines.

ndfold (multiple functions and seeds)
ndreduce (multiple arguments, single seed)

This could be very confusing. Can't you have two overloads?

How do I map over just some dimensions (e.g. rows or columns in a 2D matrix)?

You can use packed slices, see my comment to the unittest ;-)

How do I map over just some dimensions (e.g. rows or columns in a 2D matrix)?

ndslice is much more powerful then NumPy and Julia in case of dimension abstraction. It has zero cost abstraction for tensors composed of tensors (composed of tensors and etc). See the last example for diagonal, (3D, diagonal plain). You can use pack to pack dimensions (tensor of tensors) and transposed, swapped, and evertPack to swap dimension.

I am open for alternative function names
Please suggest you variants!

ndfold (multiple functions and seeds)
ndreduce (multiple arguments, single seed)
This could be very confusing. Can't you have two overloads?

The reason that have different argument order:
ndfold - first argument is a slice
ndreduce first argument is a seed

Current coverage is 88.69% (diff: 95.39%)

No coverage report found for master at aa017e5.

Powered by Codecov. Last update aa017e5...a54b453

Please rebase so that .travis.yml is updated and we can see the coverage report!

rebased

To come back to the bigger picture: Do we really need nd versions of all "scalar" functions like each, all, any and so on?

Yes, in the same time we do not need special sorting algorithms, because we need flattened slice anyway. If a slice is not flattened user may use byElement to get random access range of all elements or to make a copy/index. I will think about what kind indexing will be helpful for sorting.

I understand why map might be a bit non-trivial – it needs to preserve the input structure in the output –, but wouldn't it be much more powerful and DRYer to offer a "flat" range interface for such operations? For example, in pseudocode ndAll!fun(a, b) == all!fun(zip(a.flattened, b.flattened)) (discounting for tuple expansion of the fun parameters). I suppose something like this might even already exist in ndslice.

Yes, for performance reasons. flattened is called byElement, it is selector operator.

I'm sure this has crossed your mind while designing the functions – why did you opt to go for the special slice functions instead? Potentially using the extra structural information for extra performance? (If it only comes down to auto-vectorization, that shouldn't really matter, though.) You could also think about adding annotation forwarding support of some kind (extra members, UDAs, …) to the length-preserving std.algorithm functions to propagate along the structure information. map could also be implemented on top of that with reshape, I suppose.

I add this module because performance reasons. N is dimension count:

byElement requires additional computations :

One more add operations for forward access (empty, front, popFront).
N-1 div/mod pairs plus 2*N-1 more add for random and backward access. div/mod are expensive.

byElement requires N+1 additional general purpose registers. This is bad for iterating few matrixes in the lockstep.
ndX implementations has multidimension do-while loop optimisation.

The result of ndMap is a Slice. The result of map is the range, and if we want to use ndslice module with map, then is will looks like. The real problem is that byElement has slow random access primitive to build a slice on top :
auto lazyMap = sl.byElement.map!fun.sliced(sl.shape);

auto lazyMap = sl.ndMap!fun;

ndslice.algorithm does not provide vectorisation. Note, that numpy has not real vectorisation, it just manually unrolls loops. For true vectorisation, the data should be continuous in memory. But ndslice and numpy may have slices with strides.
In the same time #4647 provides vectorised  operations like +=. In addition, Mir will have BLAS soon, see current benchmark. Mir has the same performance for large matrixes as OpenBLAS, this means that Mir's generic gemm SIMD kernels are optimal. For small matrixes I need to write generic SIMD transposition kernels for packing, but this is small effort comparing with gemm SIMD kernels.

Being very much a bystander only—so this might be entirely unfounded—it seems like there is some danger of ndslice bit-by-bit involving into its own little parallel universe. To put it another way, if we can't use standard ranges to implement any on a multidimensional array ourselves, we might need to revise our marketing materials.

I don't think so. For me it ndslice extends our universe. We have different types of ranges. ndslice is just the next after random access range:

Any slice is random access range composed of elements with dimension equals to N-1.
byElement is random access range, with fast forward iteration (as much fast as possible).
Slice can be created on top of any random access range with strides. For example DOK format for sparse tensors was implemented in Mir, just creating a tiny wrapper on standard associative arrays.
ndX functions is provide optimal multidimensional iteration pattern. We don't need ndSwap for example, because we can just write ndEach!swap. So, please do not think that I am rewriting std.algorithm: current functions provide only optimal loop construction with different stop criteria.

ndMap could also be implemented by reshape ∘ map ∘ reshape, I suppose.

This is true only for Slices , which have continues in memory representation. Numpy just reallocate all ndarray, if it can not be reshaped :-)

@klickverbot I have added you thoughts (with your recent fixes) and my answers (with some fixes) to the PR description. Feel free to edit it :-)

The PR is ready for review!

At the end of many of the functions' examples, it has another function definition. Might it be easier to read if they are all at the top?
I think you should probably make a little more effort to make the examples simpler and clearer what you are trying to demonstrate. One I noticed was doing things by row/by column (when referring to it as packing, it's not as obvious to me). There's one where you find the minimum of the maximum of the rows. Why not just do the maximum of the rows and then another where you do the maximum of the columns? Then, if you want to make a more complicated example where you add more operations you can still do that. Keep examples simple!
I tend to agree with the points above about the naming of things ndXXX. I found most convincing the point about putting ndslice in a parallel universe. I would probably be very hesitant to go this route unless I really had no options. However, your best point (IMO) is that map and ndMap would give different behavior for slices. Is there any way around this? For instance, suppose you re-name ndMap to map with a template constraint and if you wanted the original map behavior (from your example above showing the difference between map and ndMap on a 2 dimensional matrix), you could do something like slice.pack!1.map!fun?
If you have a one-dimensional ndslice, is there any advantage to ndMap over map? I ask because map works with one-dimensional slices currently without needing byElement.

At the end of many of the functions' examples, it has another function definition. Might it be easier to read if they are all at the top?

It was already discussed above with @wilzbach

Is there any way around this?

New Phobos with ndslice im mind

However, your best point (IMO) is that map and ndMap would give different behavior for slices. Is there any way around this?

Yes, make std.algorithm Slice aware.

If you have a one-dimensional ndslice, is there any advantage to ndMap over map? I ask because map works with one-dimensional slices currently without needing byElement.

No, except that map generates few times more template bloat

I tend to agree with the points above about the naming of things ndXXX.

The point above was about the names like ndmap, but no they are like ndMap

I tend to agree with the points above about the naming of things ndXXX. I found most convincing the point about putting ndslice in a parallel universe. I would probably be very hesitant to go this route unless I really had no options.

nd is only index for one of modules. All others (existing and planned) do not need this prefix

I think you should probably make a little more effort to make the examples simpler and clearer what you are trying to demonstrate. One I noticed was doing things by row/by column (when referring to it as packing, it's not as obvious to me). There's one where you find the minimum of the maximum of the rows. Why not just do the maximum of the rows and then another where you do the maximum of the columns? Then, if you want to make a more complicated example where you add more operations you can still do that. Keep examples simple!

There are three example. The first one is basic level. The second one middle level. This is advanced level. You are referencing to the third!
Making good examples is art. Maybe I am not good at it, but max of maximums do not require map/ndMap at all. It can be done only with ndFold.

To your point about max of maximums, that's not what I meant. I was
referring to ndFold in the specific instance. I meant that you should
provide an example returning a slice that is just the maximum by row as the
example (and probably a separate example by column). It's simpler that way
and it makes it more clear how to do things by row/by column.
On Sun, Jul 31, 2016 at 1:07 AM, Ilya Yaroshenko<EMAIL_ADDRESS>wrote:

I think you should probably make a little more effort to make the examples
simpler and clearer what you are trying to demonstrate. One I noticed was
doing things by row/by column (when referring to it as packing, it's not as
obvious to me). There's one where you find the minimum of the maximum of
the rows. Why not just do the maximum of the rows and then another where
you do the maximum of the columns? Then, if you want to make a more
complicated example where you add more operations you can still do that.
Keep examples simple!
There are three example. The first one is basic level. The second one
middle level. This is advanced level. You are referencing to the third!
Making good examples is art. Maybe I am not good at it, but max of
maximums do not require map/ndMap at all. It can be done only with ndFold.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/dlang/phobos/pull/4652#issuecomment-236410743, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AMJWyiQQXUyOghDsbgHVnpZbN0BmbTGmks5qbC2ugaJpZM4JUbA2
.

Thanks, will add it!

@klickverbot
Recent changes:

ndFindNeedle and ndCanFindNeedle.
ndFind was reworked.
vectorizedSum and vectorizedEach will be added soon.

Oh, I can just add fastmath flag to to ndEach and ndReduce instead of new names

@jmh530 I have added example with transposed minimax problem for ndFold and ndReduce

PR is availeble in Mir v0.16.0-alpha1

On the subject of naming ndMap vs. map. I fleshed out my point about map with a template constraint a little more in the link below. The way I did it allows both map and ndMap to be called.
https://dl.dropboxusercontent.com/u/50303730/alt_ndMap.d

@9il Slightly unrelated question: what's the easiest way to create a Slice from a range of ranges? I'm trying to test these functions in a real word example.

@9il Slightly unrelated question: what's the easiest way to create a Slice from a range of ranges? I'm trying to test these functions in a real word example.

Just auto sl = anyRange.sliced; for slice on range and auto sl = anyRange.slice; for newly allocated slice
You need alpha3 (with recent fixes), see also benchmarks https://github.com/libmir/mir/tree/master/benchmarks/ndslice

@9il Doesn't work. Here is the code in question, it creates a range of ranges of doubles
auto data = File("test.csv")
        .byLine()
        .map!(a => splitter(a, ','))
        .map!(map!(mapFunc))
        .sliced;

Fails with
test2.d(37,9): Error: template mir.ndslice.slice.sliced cannot deduce function from argument types !()(MapResult!(map, MapResult!(__lambda1, ByLine!(char, char)))), candidates are:
../.dub/packages/mir-0.16.0-alpha3/mir/source/mir/ndslice/slice.d(47,6):        mir.ndslice.slice.sliced(Flag replaceArrayWithPointer = Yes.replaceArrayWithPointer, Flag allowDownsize = No.allowDownsize, Range, Lengths...)(Range range, Lengths lengths) if (!isStaticArray!Range && !isNarrowString!Range && allSatisfy!(isIndex, Lengths) && Lengths.length)
../.dub/packages/mir-0.16.0-alpha3/mir/source/mir/ndslice/slice.d(58,6):        mir.ndslice.slice.sliced(Flag replaceArrayWithPointer = Yes.replaceArrayWithPointer, Flag allowDownsize = No.allowDownsize, ulong N, Range)(Range range, auto ref size_t[N] lengths, size_t shift = 0) if (!isStaticArray!Range && !isNarrowString!Range && N)
../.dub/packages/mir-0.16.0-alpha3/mir/source/mir/ndslice/slice.d(142,1):        mir.ndslice.slice.sliced(Names...) if (Names.length && !anySatisfy!(isType, Names) && allSatisfy!(isStringValue, Names))
../.dub/packages/mir-0.16.0-alpha3/mir/source/mir/ndslice/slice.d(216,6):        mir.ndslice.slice.sliced(Flag replaceArrayWithPointer = Yes.replaceArrayWithPointer, Flag allowDownsize = No.allowDownsize, Range)(Range range) if (!isStaticArray!Range && !isNarrowString!Range && hasLength!Range)
dmd failed with exit code 1.

RoR are not supported of course

You need a range, not RoR.

Your range in not flat and it is not random access.

RoR are not supported of course
Your range in not flat and it is not random access.

Ok, seems like I need to allocate an array. Thanks.

@klickverbot I have added Select enumeration, which can be used to reverse or transpose data, and can be used for many matrix subroutines, for example to check if a matrix is symmetric. So noit has 5 significant differences comparing with std.algorithm:

It supports multidimensional iteration and map out of the box
It supports zip analog assumeSameStructure, which is faster
It allows to iterate efficiently multiple tensors without zip
It allows to add vectorization if the last stride == 1 (two versions of algorithms with RT check).
It allows to select triangular part of the data or half of the data

On the subject of naming ndMap vs. map. I fleshed out my point about map with a template constraint a little more in the link below. The way I did it allows both map and ndMap to be called.

I recall there was quite a discussion on the name issue and I think @9il made a strong point for nd, but there was no consensus on it. Could the advocates of map please rise again and make their point?

@wilzbach I think @JackStouffer above made the point originally and most succinctly.

Secondly, I have a slight problem with the names of the planned functions. One of the main benefits of ndslice that I laid out in my article is that it feels like it's a part of the rest of the language because you don't have to use a whole bunch specialized functions in order to get the functionality you want. This is one of my main gripes with numpy: in your code you have numpy code, and then you have Python code, and they don't mix well.

Think about the impact on code refactoring. Want to change from slices to ndslices, now you have to change every place you use an std.algorithm function.
Also, suppose you're writing some generic code that should work on any input range. This naming approach requires template specialization in order to get it work with ndslices.
Personally, I would prefer what is in ndslice.algorithm to eventually be a part of std.algorithm. That way I can just import std.algorithm : map and go to town.
Nevertheless, I think a those favoring naming things ndMap, etc, made a good point with respect to the fact that the behavior of map is different for ndMap. Thus, I think there should be some kind of way to toggle between them (perhaps there's a better way than what I suggested above).

Personally, I would prefer what is in ndslice.algorithm to eventually be a part of std.algorithm. That way I can just import std.algorithm : map and go to town.

I agree, that would be quite sweet, but I think there is still the problem of multi-dimensional mapping of ndslice.map and one-dimensional map in the std.algorithm.iteration.map case. However if as @jmh530 suggested we can make the assumption that a user always wants to use the multidimensional ndslice map for slices, this could work well. For example with pack a user could choose the dimensions he wants to use for n-mapping? In practice this could then look like this:
#!/usr/bin/env dub
/+ dub.sdl:
name "mir_test"
dependency "mir" version="~>0.16.0-beta2"
+/

void main() {
    import mir.ndslice;
    import std.stdio;
    import std.algorithm;

    auto a = iotaSlice(2, 3).ndMap!("a + a");
    writeln(a); // [[1, 2, 3], [4, 5, 6]]

    auto b = iotaSlice(2, 3).pack!1.ndMap!(a => a.maxPos.front);
    writeln(b); // [2, 5]
}

@9il what do you think about this?
I think I can remember a discussion on a different PR where it was agreed that internally using std.experimental is absolutely okay.

@9il what do you think about this?

This would not work for all other functions. API can be found here http://docs.mir.dlang.io/latest/mir_ndslice_algorithm.html

#4781 contains ndMap renamed to mapSlice and located in ndslice.selection. This PR will be closed  until DMD has new pragmas. Please help to move forward with new ndslice PRs!


Error overriding attributes of a function

I'm using a rust module I've written as an external crate for my Flutter app. I've been able to translate everything automatically so far which has been great!
I've overridden attributes for a few methods in one of the structs and everything works perfectly. I'm trying to do the same for a standalone function not in any struct, and now my app won't launch.
Struct method overriding
#![allow(unused_variables)]

use std::collections::HashMap;

use flutter_rust_bridge::frb;
use windows_rust_anc::zsi::ZSI;

#[frb(external)]
impl ZSI {
    #[frb(sync)]
    pub fn new(
        fs: u32,
        training_duration: u32,
        testing_duration: u32,
        goal_panel_db: f32,
        use_backfilter: bool,
        training_signal: Option<Vec<i32>>,
    ) -> Self {
    }

    #[frb(sync)]
    pub fn get_audio_device_mapping(&self) -> anyhow::Result<HashMap<String, u8>, anyhow::Error> {}

    #[frb(sync)]
    pub fn set_training_signal(&mut self, signal: Vec<i32>) {}
}

Function overriding
#![allow(unused_variables)]

use flutter_rust_bridge::frb;

#[frb(sync)]
pub fn backfilter_mute(muted: bool, channel: u8) {}

#[frb(sync)]
pub fn get_mic_on_off_mute(channel: u8) -> anyhow::Result<bool, anyhow::Error> {}

The methods are perfectly fine, even with the "unsatisfied" return types. However, after adding the function get_mic_on_off_mute, the app will no longer launch. I have the following error in my IDE. flutter_rust_bridge_codegen generate executes with no issues. The functions with no return types were perfectly fine and work exactly as expected as synchronous functions.
Error
mismatched types
  expected enum `Result<bool, anyhow::Error>`
found unit type `()

How can I fix this so that get_mic_on_off_mute also works as async?

Firstly, if you are controlling the third party crate, then an easier method is not to do overriding, but directly use things like /// flutter_rust_bridge: whatever_thing_here on the third party crate directly.
Secondly, also try anyhow::Result<bool> (and re-generate) and see whether it works.
Thirdly, it would be great to provide a minimal reproducible sample as well as error logs, then it is easier to see what is going on.

Thanks for your suggestions. I tried just anyhow::Result<bool> and that didn't work. However, removing the return type entirely worked. The app now launches and runs perfectly fine!

Looks great! Feel free to ping me if you have a reproducible sample.


Fix mobile navigation links to use router links instead of buttons

Fixes #812

Already solved in #813


Layout of NdLayout and Table

I want to show a table next to my data:
fit = {20: {'gamma': 0.01, 'kappa': 0.005, 'neff': 3.3379},
       40: {'gamma': 0.01, 'kappa': 0.005, 'neff': 3.3329},
      100: {'gamma': 0.01, 'kappa': 0.005, 'neff': 3.3229},
      120: {'gamma': 0.01, 'kappa': 0.005, 'neff': 3.3229},
      }
vdims = ['gamma','kappa','neff']
results = hv.Table([[p]+[k[v] for v in vdims] for p, k in fit.iteritems()], kdims=['Power'], vdims=vdims)
nld = hv.NdLayout({power: hv.Scatter([(1,f['neff'])]) for power, f in fit.iteritems()}, kdims=['Power'])
nld+results

Yield:
:Layout
   .NdLayout.I :NdLayout   [Power]
      :Scatter   [x]   (y)
   .Table.I    :Table   [Power]   (gamma,kappa,neff)

Instead of 5 plots.
In another notebook, I try it a bit more complicated. I try to add
:NdLayout   [Power]
   :Overlay
      .Scan.I    :Image   [Wavelength,Angle]   (z)
      .Curve.I   :Curve   [Angle]   (Wavelength)
      .Curve.II  :Curve   [Angle]   (Wavelength)
      .Curve.III :Curve   [Angle]   (Wavelength)
      .Curve.IV  :Curve   [Angle]   (Wavelength)

:Table   [Power]   (gamma,kappa,neff)

Result
TypeError
__init__() got multiple values for keyword argument 'uniform'

Did I miss something? Did I do it not the hv's way?

No that looks like a bug, will have to investigate.

So, somehow I was very confused both times this issue has been raised. See #365 for the current status on this. I'll close this issue since more discussion has taken place there.


[FEAT] Create xml file docker compose (despensa-rest-api)

Resolves #4

Description
Created the configuration XML file docker compose (despensa-rest-api).run.xml in the .run directory.

Thanks @Eduguimar


Make third party data require opt in

iD v2.17.0 has added a way to opt out of sending data to third party sites, but the default is send data, and one must opt out. I suggest flipping that, and making such third party request opt in. This small patch implements that change (I think). Opt in, rather that opt out, is the gold standard for privacy, and we should hold ourselves to high standards with human rights issues like privacy.
There are many conversations to be had about privacy and usability, and we should continue to have those conversations. In the mean time, this quick change makes us private-by-default until we can come to agreement and decide on the best way forward.
cf.: #7028 #7040 https://github.com/openstreetmap/openstreetmap-website/pull/2474
(whelp, I tried a PR in #7161 but I had some weird git history thing)

Sorry @rory but I strongly disagree.. I'm not comfortable intentionally breaking features in our software that provide value - and we have all previously agreed that letting users opt out of them is fine.  We put a lot of work and thought into the NSI feature, and while I'm not surprised, I'm seriously disappointed in you dropping your PR in here like this one day after the 2.17 release.   Please don't perform stunts like this or troll our repository in this way - it's not welcome.
Taken to the extreme, we'd also need to opt-out the user from seeing satellite imagery, and force them to go looking through menus to figure out how to turn it on. They wouldn't even be able to use the tutorial!
Also, we can't accept PRs that touch the Privacy policy like this.

Dear @bhousel, please avoid personal attacks. It's against Code of Conduct. Thanks.

Dear @bhousel, please avoid personal attacks. It's against Code of Conduct. Thanks.

@qeef If you really feel like I've made a personal attack and want to open a report, please email the OSM-US CoC team - details here.


Identify the protocol and the port for the device

The data that is received on the server logs is as follows. I'm not able to identify what protocol is this. What port should I send the data on?
,,01,868004022773884,$GPRMC,124421.000,A,2245.2116,N,07551.9939,E,0000,199.27,031116,,,A*79
,#01000110,0.5588539,-1.00,1.028,0,-1,0.000,0,28,BH,

868004022773884 is device id.

It's Xexun protocol, port 5006 in Traccar.

Just wanna ask how you were able to decipher the logs and identify the
protocol..
thanks.
On Nov 4, 2016 6:12 AM, "Anton Tananaev"<EMAIL_ADDRESS>wrote:

It's Xexun protocol, port 5006 in Traccar.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tananaev/traccar/issues/2507#issuecomment-258290020,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIJit3YGoSaPPUyl1kh6OT3MDikaeCD8ks5q6lxogaJpZM4KoUjH
.

I usually use this:
https://www.traccar.org/identify-protocol/
Actually it's not Xexun, but it's somewhat similar. I guess question mark symbols indicate that it's a binary protocol, so you should provide original HEX instead of converting it to text.

Thanks for the reply @tananaev
Here is the hex string that I received.
022c142c30312c3836383030343032323737333838342c244750524d432c3030323835392e3030302c412c323234332e373631392c4e2c30373535332e333938342c452c303030302c3237362e33382c3037313131362c2c2c442a37370d0a2c2330313030303131302c35322e37342c2d312e30302c312e3033322c302c2d312c302e3030302c302c32362c42482c03

It seems like this protocol is not supported yet. I need protocol documentation to implement it.

I am using TK500 gps device. Don't know which port to use

@mudrasonavane, please next time create a separate thread. Don't just comment on a random unrelated threads.
As for your device, check this page:
https://www.traccar.org/ports-for-tk-gt-and-other-gps-devices/

@tananaev Even I don't have the documentation. Will share with you once I have it. Closing the thread for now. Thanks for your help.


PYALLOCB : 1-A : Initial Version of Main Batch Flow

Critical Changes
Changes
Issues Closed
New Metadata
Deleted Metadata

Closing PR and moving branch to johnb/saved/20191004/pmt-alloc-batch-main


[Feat] BiDi/Page implements $

As part of the #9100, BiDi/Page should implement $.

https://pptr.dev/api/puppeteer.page._

Ah, sorry, there's Page.$ but not in BiDi: https://github.com/puppeteer/puppeteer/blob/8acafe2fd91b70b8bbbe10467b6a0b5894b964bb/packages/puppeteer-core/src/common/bidi/Page.ts#L40

Nik maybe you may want to tackle this :-) Feel free to unassign otherwise.


Edit and upload API ML videos to the YouTube channel

There are a couple of API ML videos that can be uploaded to the Zowe YouTube playlist.

Check whether there are style issues of the videos.
Add descriptions about these videos.
Upload them to the proper playlist.
Check whether they need to be embedded in Zowe docs.

Close for now. If any further input, will open a new one.


[Webportal] Fix export csv file error 'dur.toFormat is not a function'

fix #5225

Coverage remained the same at 33.933% when pulling 0c6daa60ab8f8a512496669133115ef2221b896f on yiyi/webportal/fix_export_csv into a5f5e1c22e45c63731356bbb092a3a2668f9d947 on master.

Coverage remained the same at 33.933% when pulling 0c6daa60ab8f8a512496669133115ef2221b896f on yiyi/webportal/fix_export_csv into a5f5e1c22e45c63731356bbb092a3a2668f9d947 on master.


Add a failing test for #582

This PR adds a failing test to demonstrate the issue described in #582
It shows that the package identity attribute works with Chef 11.x, but not with Chef 12.x
Someone wants to jump in for fixing this?

Hey @schisamo @lamont-granquist - any ideas here? I looked through commits and couldn't find a reason why this would have changed in Chef.

Just skimmed the solo_runner.rb code again, but couldn't find anything obvious in ChefSpec either.
The platform and version are correctly being passed to chef. During a real Chef convergence the identity attribute with package 'foo' { package_name: 'httpd' } works properly, too.
I tried to dig deeper, and my buest guess is that the culprit lies somewhere along these lines:
Which resource should be in here? package[foo] or package[httpd]?
https://github.com/sethvargo/chefspec/blob/master/lib/chefspec/coverage.rb#L145
https://github.com/sethvargo/chefspec/blob/master/lib/chefspec/coverage.rb#L80
Digging deeper, this is where the actual resource is being looked up in the run_context:
https://github.com/sethvargo/chefspec/blob/master/lib/chefspec/solo_runner.rb#L164-172

@sethvargo @schisamo @lamont-granquist using some println debugging I could track it down to this line (this is the place where the resource was not found by the name attribute, and is now being looked up by it's identity attribute):
https://github.com/sethvargo/chefspec/blob/master/lib/chefspec/solo_runner.rb#L170
More specifically: resource_name(resource) == type
What I see is that the resource is included in the resource collection, but it wouldn't match, because the type we are looking for is "package" but the actual resource_name(resource) is "yum_package".
Might it be, that in earlier Chef versions the resource_name(resource) was the declared type (i.e. "package") and nowadays this has changed to the actual type (i.e. "yum_package")?

Oh, I see there is Chef::Resource#declared_type:
http://www.rubydoc.info/gems/chef/Chef/Resource#declared_type-instance_method

So. more details:

Chef::Resource#declared_type was added in Chef 12.0.2 here

I now pushed a fix which uses #declared_type in favor of #resource_name, which should work with newer Chef versions >= 12.0.2 and older Chef versions < 12.0.2 too.
Travis-CI confirms this, i.e. the failing test I added is now green for all tested Chef versions in the matrix. The other failing tests are unrelated (fail on master too).

Good find, thanks!

:+1:

@sethvargo btw: planning a new chefspec release soon?


tf.keras.models.clone_model does not support custom model

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A
TensorFlow installed from (source or binary): pip
TensorFlow version (use command below): 2.2.0
Python version: Python 3.6.10 :: Anaconda, Inc.
Bazel version (if compiling from source): N/A
GCC/Compiler version (if compiling from source): N/A
CUDA/cuDNN version: CUDA 10.1
GPU model and memory: GeForce RTX 2080 Ti

Describe the current behavior
In TF2.2.0 release notes, it said

You can now use custom training logic with Model.fit by overriding Model.train_step
Easily write state-of-the-art training loops without worrying about all of the features Model.fit handles for you (distribution strategies, callbacks, data formats, looping logic, etc)

I have implemented my own custom model whose train_step is overwrited, And I want to create an identical model by API tf.keras.models.clone_model.
But, the problem there is that my custom train_step is gone.
Describe the expected behavior
tf.keras.models.clone_model should copy not only model's layers but also train_step.
Standalone code to reproduce the issue
#%%
import numpy as np
import tensorflow as tf
print(tf.__version__)

#%%
class Composite(tf.keras.Model):
    def __init__(self, *args, **kwargs):

        super(Composite, self).__init__(*args, **kwargs)

    def train_step(self, data):

        data_adapter = tf.python.keras.engine.data_adapter
        data = data_adapter.expand_1d(data)
        x, y, sample_weight = data_adapter.unpack_x_y_sample_weight(data)

        tf.print("HIHI! I'm in function train_step!")

        with tf.GradientTape() as tape:
            y_pred = self(x, training=True)
            loss = self.compiled_loss(
                y, y_pred, sample_weight, regularization_losses=self.losses)

        _minimize = tf.python.keras.engine.training._minimize
        _minimize(self.distribute_strategy, tape, self.optimizer, loss,
                self.trainable_variables)

        self.compiled_metrics.update_state(y, y_pred, sample_weight)
        return {m.name: m.result() for m in self.metrics}

in_ = tf.keras.layers.Input(shape=(10, ) )
x = tf.keras.layers.Dense(1)(in_)
model = Composite(inputs=in_, outputs=x)
model.compile(loss='binary_crossentropy',optimizer='SGD', metrics=['accuracy'])

X = np.zeros((10,10))
Y = np.zeros((10,1))
model.fit(X,Y,verbose=2)

# %%
new_model = tf.keras.models.clone_model(model)
new_model.compile(loss='binary_crossentropy',optimizer='SGD', metrics=['accuracy'])
new_model.fit(X,Y,verbose=2)

Other info / logs
there is the original model
HIHI! I'm in function train_step!
1/1 - 0s - loss: 0.0000e+00 - accuracy: 1.0000
<tensorflow.python.keras.callbacks.History at 0x7fa9603dd6a0>
there is the NEW model
1/1 - 0s - loss: 0.0000e+00 - accuracy: 1.0000
<tensorflow.python.keras.callbacks.History at 0x7fa96023bbe0>

From the console, you will see the output HIHI! I'm in function train_step! is gone when I run new_model.fit(X,Y,verbose=2)

An alternative solution is:
wrap_model = Composite(inputs=new_model.input, outputs=new_model.output)
wrap_model.compile(loss='binary_crossentropy',optimizer='SGD', metrics=['accuracy'])
wrap_model.fit(X,Y,verbose=2)

I don't think this is good solution but it is an acceptable choice.
If tf.keras.models.clone_model can not support custom model. It should be emphasized in the document.

Was able to reproduce the issue with TF v2.2 and TF-nightly. Please find the attached gist. Thanks!

Yes. Same problem here.

@CNOCycle When i executed the code in TF 2.6 I  am facing different error when called fit method. Please find the gist here.Thanks!

@saikumarchalla  because tf.python is hidden in newer TF. So I updated the testing code:
#%%
import numpy as np
import tensorflow as tf
print(tf.__version__)

#%%
class Composite(tf.keras.Model):
    def __init__(self, *args, **kwargs):

        super(Composite, self).__init__(*args, **kwargs)

    def unpack_x_y_sample_weight(self, data):
        """Unpacks user-provided data tuple."""
        if not isinstance(data, tuple):
            return (data, None, None)
        elif len(data) == 1:
            return (data[0], None, None)
        elif len(data) == 2:
            return (data[0], data[1], None)
        elif len(data) == 3:
            return (data[0], data[1], data[2])

    def train_step(self, data):

        x, y, sample_weight = self.unpack_x_y_sample_weight(data)

        tf.print("HIHI! I'm in function train_step!")

        with tf.GradientTape() as tape:
            y_pred = self(x, training=True)
            loss = self.compiled_loss(
                y, y_pred, sample_weight, regularization_losses=self.losses)

        self.optimizer.minimize(loss, self.trainable_variables, tape=tape)
        self.compiled_metrics.update_state(y, y_pred, sample_weight)
        return {m.name: m.result() for m in self.metrics}

in_ = tf.keras.layers.Input(shape=(10, ) )
x = tf.keras.layers.Dense(1)(in_)
model = Composite(inputs=in_, outputs=x)
model.compile(loss='binary_crossentropy',optimizer='SGD', metrics=['accuracy'])

X = np.zeros((10,10))
Y = np.zeros((10,1))

print("the original model")
model.fit(X,Y,verbose=2)

# %%
print("cloned model")
new_model = tf.keras.models.clone_model(model)
new_model.compile(loss='binary_crossentropy',optimizer='SGD', metrics=['accuracy'])
new_model.fit(X,Y,verbose=2)

print("the original model again")
model.fit(X,Y,verbose=2)

Here is the output
the original model
HIHI! I'm in function train_step!
1/1 - 0s - loss: 0.0000e+00 - accuracy: 1.0000
cloned model
1/1 - 0s - loss: 0.0000e+00 - accuracy: 1.0000
the original model again
HIHI! I'm in function train_step!
1/1 - 0s - loss: 0.0000e+00 - accuracy: 1.0000

<tensorflow.python.keras.callbacks.History at 0x7ff9a5852490>

Obviously, this issue has not been fixed

I think subclassed API model is not supported in the clone_model function, see the document
https://www.tensorflow.org/api_docs/python/tf/keras/models/clone_model
Args
--  model | Instance of Model (could be a Functional model or a Sequential model).
....
....

I thought that this problem has not been solved yet.

still has this issue in tf2.7, any progress in this bug?

@groovemaxRong you can post a feature request in the keras Github repo regarding this.

I am working with Tf 4.0 and am able to solve this issue with the following:
Here is an example of cloning a model having a custom layer class CustomLayer
class CustomLayer(tf.keras.layers.Layer):

    def __init__(self, **kwargs):
        super(CustomLayer, self).__init__()

    def call(self, input_tensor):
        return input_tensor

What you need to do is register this custom object with the Keras scope as follows:
custom_objects = {"CustomLayer": CustomLayer}
with tf.keras.utils.custom_object_scope(custom_objects):
    new_model = tf.keras.models.clone_model(model)


store eth txn hash for user challenge exit in postgres

This is to support BE and possibly MV. See: omisego/omg-block-explorer#28

Given now we're handling bugs (although indirectly) from code and DB fields that are not being used, I'll close this DB-only issue so we don't need to maintain what we don't use.
Feel free to submit a new issue when a user story arises and is promoted into an engineering cycle!


Rename master branch to main?

https://github.com/github/renaming

This repository is our up-to-date guidance on how and when to rename your default branch.

I don't read anything about the when. Is there an ominous reason to do this now?

Now is a good time, because GitHub now has good support for making the transition smooth. Previously they were still working on improving the process, I think the when in the notes is leftover from that.


fix: change value of depth tokens #198

Alaska Airlines Pull Request
Type of change:
Please delete options that are not relevant.

[ ] New capability
[x] Revision of an existing capability
[ ] Infrastructure change (automation, etc.)
[ ] Other (please elaborate)

Checklist:

[x] My update follows the CONTRIBUTING guidelines of this project
[x] I have performed a self-review of my own update

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.
Thank you for your submission!
-- Auro Design System Team

@sourcery-ai title

:tada: This PR is included in version 4.12.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Misleading failure when using --frozen --offline with no Cargo.lock

Problem
Trying to build a crate with:
cargo build --frozen --offline

when no Cargo.lock file is provided in the crate source repository leads to the following error message:
error: the lock file /path/to/Cargo.lock needs to be updated but --frozen was passed to prevent this
If you want to try to generate the lock file without accessing the network, remove the --frozen flag and use --offline instead.

which is either misleading or a bad suggestion (e.g. reproducible builds desired but Cargo.lock was forgotten).
On a side note, how this error message is formulated is confusing to me. Why would a Cargo.lock need to be updated if I pass --locked to it? Isn't it the whole point of --locked (or --frozen) to use possibly outdated but fixed-version crates? This suggests the user needs to fix something with their Cargo.lock. FWIW, the docs (https://doc.rust-lang.org/cargo/commands/cargo-build.html#manifest-options) do mention that if Cargo.lock file is missing cargo build will fail but the error message mislead me in believing my Cargo.lock file was outdated (whatever that means) instead of just having forgotten to push it. Still the docs do not provide more info on what needs to be done to make sure my Cargo.lock file is up-to-date.
Disclaimer: I integrate SW in build systems and have virtually no experience with cargo and rust at the moment.
Steps
No response
Possible Solution(s)
Check on Cargo.lock file presence when --locked or --frozen is passed. If missing, error out stating that in order to use --locked or --frozen a Cargo.lock file needs to be provided.
Notes
This was discovered for a project of mine when trying to build it with Buildroot using the cargo-pkg package type, c.f. https://git.busybox.net/buildroot/tree/package/pkg-cargo.mk#n101 where --offline and --locked are passed.
Version
No response

On a side note, how this error message is formulated is confusing to me. Why would a Cargo.lock need to be updated if I pass --locked to it? Isn't it the whole point of --locked (or --frozen) to use possibly outdated but fixed-version crates?

--locked and --frozen aren't about using whatever current exists but enforcing what currently exists is  viable
        --frozen                     Require Cargo.lock and cache are up to date
        --locked                     Require Cargo.lock is up to date

(keyword being "Require")
The problem is the current lockfile is incompatible with the manifests which is why it needs to be updated.  For example, if a manifest has a new dependency or a version requirement was changed to be incompatible with the lock file.
With a flag like --frozen, there are two choices

Ignore the lockfile and operate off of the in-memory version we would write out
Error because we can't respect the lock file

There might be cases where someone wants (1) but (2) is the more correct default because

The lock file is the de facto standard of truth (if nothing else, for traceability) and if you can't use it, thats an error)
This gives people a way to verify their lock file

which is either misleading or a bad suggestion (e.g. reproducible builds desired but Cargo.lock was forgotten).
...
Check on Cargo.lock file presence when --locked or --frozen is passed. If missing, error out stating that in order to use --locked or --frozen a Cargo.lock file needs to be provided.

The problem is that Cargo doesn't know your intention, just that the lock file doesn't line up with what Cargo expects for it. The wording could be specialized from saying "updated" in all cases to either saying "created" or "updated".  I'm having a hard time seeing how we could improve the remediation so it works in all contexts.  Saying the lock file "needs to be provided" is misleading in the local development case.

Given that --locked and --frozen both require a Cargo.lock to not only be updated, but to be present, it seems reasonable to say that the file is required but missing, or not present, when the file does not exist when these options are used.

I wanted to use trunk in 0.17.5 and needed to replace --frozen with --offline to make the build work.
error without my patch in nixpkgs or trunk/default.nix
this derivation will be built:
  /nix/store/xijny7a5y78zizn2ylfka5q8z5ava073-trunk-0.17.5.drv
building '/nix/store/xijny7a5y78zizn2ylfka5q8z5ava073-trunk-0.17.5.drv'...
unpacking sources
unpacking source archive /nix/store/wbrl5ilhb7wmmphyqimy78s48vvi1aq1-source
source root is source
Executing cargoSetupPostUnpackHook
unpacking source archive /nix/store/ni0syvy41kzp6l4ybm61nwdydl3iwr96-trunk-0.17.5-vendor.tar.gz
Finished cargoSetupPostUnpackHook
patching sources
Executing cargoSetupPostPatchHook
Validating consistency between /build/source//Cargo.lock and /build/trunk-0.17.5-vendor.tar.gz/Cargo.lock
Finished cargoSetupPostPatchHook
configuring
building
Executing cargoBuildHook
++ env CC_x86_64-unknown-linux-gnu=/nix/store/a64w6zy8w9hcj6b4g5nz0dl6zyd24c1x-gcc-wrapper-11.3.0/bin/cc CXX_x86_64-unknown-linux-gnu=/nix/store/a64w6zy8w9hcj6b4g5nz0dl6zyd24c1x-gcc-wrapper-11.3.0/bin/c++ CC_x86_64-unknown-linux-gnu=/nix/store/a64w6zy8w9hcj6b4g5nz0dl6zyd24c1x-gcc-wrapper-11.3.0/bin/cc CXX_x86_64-unknown-linux-gnu=/nix/store/a64w6zy8w9hcj6b4g5nz0dl6zyd24c1x-gcc-wrapper-11.3.0/bin/c++ cargo build -j 16 --target x86_64-unknown-linux-gnu --frozen --release --offline
error: the lock file /build/source/Cargo.lock needs to be updated but --frozen was passed to prevent this
If you want to try to generate the lock file without accessing the network, remove the --frozen flag and use --offline instead.
error: builder for '/nix/store/xijny7a5y78zizn2ylfka5q8z5ava073-trunk-0.17.5.drv' failed with exit code 101;
       last 10 log lines:
       > patching sources
       > Executing cargoSetupPostPatchHook
       > Validating consistency between /build/source//Cargo.lock and /build/trunk-0.17.5-vendor.tar.gz/Cargo.lock
       > Finished cargoSetupPostPatchHook
       > configuring
       > building
       > Executing cargoBuildHook
       > ++ env CC_x86_64-unknown-linux-gnu=/nix/store/a64w6zy8w9hcj6b4g5nz0dl6zyd24c1x-gcc-wrapper-11.3.0/bin/cc CXX_x86_64-unknown-linux-gnu=/nix/store/a64w6zy8w9hcj6b4g5nz0dl6zyd24c1x-gcc-wrapper-11.3.0/bin/c++ CC_x86_64-unknown-linux-gnu=/nix/store/a64w6zy8w9hcj6b4g5nz0dl6zyd24c1x-gcc-wrapper-11.3.0/bin/cc CXX_x86_64-unknown-linux-gnu=/nix/store/a64w6zy8w9hcj6b4g5nz0dl6zyd24c1x-gcc-wrapper-11.3.0/bin/c++ cargo build -j 16 --target x86_64-unknown-linux-gnu --frozen --release --offline
       > error: the lock file /build/source/Cargo.lock needs to be updated but --frozen was passed to prevent this
       > If you want to try to generate the lock file without accessing the network, remove the --frozen flag and use --offline instead.
       For full logs, run 'nix log /nix/store/xijny7a5y78zizn2ylfka5q8z5ava073-trunk-0.17.5.drv'.

my proposal
i only checked with trunk, not checked if all the other crates would work.
trunk/default.nix
{ lib, rustPlatform, fetchFromGitHub, pkg-config, openssl, libiconv }:

rustPlatform.buildRustPackage rec {
  pname = "trunk";
  version = "0.17.5";

  src = fetchFromGitHub {
    owner = "thedodd";
    repo = "trunk";
    rev = "v${version}";
    sha256 = "sha256-CRlSHOT4hMblfaTcX9Y2BN52RYjDSLaanoxOMccff40=";#sha256-/XVDjKK1Kv7Hk3RUf4v9PEGwarUGzj3+96mZoCKrUEw=";
  };

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ openssl ];

  # requires network
  checkFlags = [ "--skip=tools::tests::download_and_install_binaries" ];

  cargoSha256 = "sha256-WZ9EOQ00pOTqlO9G/Q58QMU2BMFfMY6JtTVzmMMKfys=";
  cargoBuildIgnoreFrozenFlag = true;
  cargoBuildFlags = [ "--offline" ];

  meta = with lib; {
    homepage = "https://github.com/thedodd/trunk";
    description = "Build, bundle & ship your Rust WASM application to the web";
    maintainers = with maintainers; [ freezeboy ];
    license = with licenses; [ asl20 ];
  };
}

nixpkgs
On the nixpkgs side I added a new option cargoBuildIgnoreFrozenFlag which is normally not set, so legacy --forzen is applied. But for newer revisions it can be used to remove --frozen and then the user can set whatever flags he wants with the already supported cargoBuildFlags.
PS C:\Users\joschie\Desktop\Projects\nixpkgs> git diff
diff --git a/pkgs/build-support/rust/hooks/cargo-build-hook.sh b/pkgs/build-support/rust/hooks/cargo-build-hook.sh
index 7503fae4cd7f..bfec1e35ed1f 100644
--- a/pkgs/build-support/rust/hooks/cargo-build-hook.sh
+++ b/pkgs/build-support/rust/hooks/cargo-build-hook.sh
@@ -1,4 +1,5 @@
 declare -a cargoBuildFlags
+declare -a cargoBuildIgnoreFrozenFlag

 cargoBuildHook() {
     echo "Executing cargoBuildHook"
@@ -24,6 +25,10 @@ cargoBuildHook() {
         cargoBuildFeaturesFlag="--features=${cargoBuildFeatures// /,}"
     fi

+    if [ "${cargoBuildIgnoreFrozenFlag}" != "1" ]; then
+        cargoBuildFlags="--frozen ${cargoBuildFlags}"
+    fi
+
     (
     set -x
     env \
@@ -33,7 +38,6 @@ cargoBuildHook() {
       "CXX_@rustTargetPlatform@=@cxxForHost@" \
       cargo build -j $NIX_BUILD_CORES \
         --target @rustTargetPlatformSpec@ \
-        --frozen \
         ${cargoBuildProfileFlag} \
         ${cargoBuildNoDefaultFeaturesFlag} \
         ${cargoBuildFeaturesFlag} \

There are ~30 usages of cargoBuildFlags in nixpkgs in this checkout.
I am on 22.05.4694.380be19fbd2d (Quokka).
shell.nix
let
  rust_overlay = import (fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz");
  pkgs1 = import <nixpkgs> { overlays = [ rust_overlay ]; };

  rust = pkgs1.rust-bin.stable.latest.default.override {
    extensions = [ "rustfmt" "clippy" ];
    targets = [
      "x86_64-unknown-linux-musl"
      "wasm32-unknown-unknown"
    ];
  };
  myRustPlatform = pkgs1.makeRustPlatform {
    cargo = pkgs1.rust-bin.stable.latest.minimal;
    rustc = pkgs1.rust-bin.stable.latest.minimal;
  };
  mytrunk = pkgs1.callPackage ./trunk/default.nix { rustPlatform=myRustPlatform; };
in
  with pkgs1;
  mkShell {
    buildInputs = [
      mytrunk
      rust
      git
      pkg-config
      just                     # task runner
      nodePackages.tailwindcss # build CSS files
      nodejs                   # required to install tailwind plugins
    ];
    SQLITE3_DIR = "${sqlite.dev}";
    SQLITE3_LIB_DIR = "${sqlite.out}/lib";
    SQLITE3_INCLUDE_LIB_DIR = "${sqlite.out}/include";
}


fix CLIENT_MULTI_STATEMENTS not used actually

in pr https://github.com/apache/doris/pull/36759, we try to output result depend CLIENT_MULTI_STATEMENTS,
but in MysqlProto::negotiate function, we call context.setCapability(context.getServerCapability()) function set capability in context use server default flags instead of client flags.
So here, we save  CLIENT_MULTI_STATEMENTS flag in MysqlChannel like flag CLIENT_DEPRECATE_EOF

run buildall


TypeError: undefined is not an object (evaluating 'window.webkit.messageHandlers.externalBus.postMessage')

Home Assistant release with the issue:
0.92.1
Last working Home Assistant release (if known):
0.91.x
Operating environment (Hass.io/Docker/Windows/etc.):

arch
x86_64

dev
false

docker
true

hassio
false

os_name
Linux

python_version
3.7.3

timezone
Europe/Zurich

version
0.92.1

virtualenv
false

mode
storage

resources
4

views
12

Component/platform:
n/a
Description of problem:
Same error in log, multiple times.
2019-04-27 18:51:17 ERROR (MainThread) [frontend.js.latest.201904240] https://IP/frontend_latest/chunk.4e658893eb3987694e23.js:1:973 TypeError: undefined is not an object (evaluating 'window.webkit.messageHandlers.externalBus.postMessage')
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
n/a
Traceback (if applicable):
n/a
Additional information:

This is a front-end issue, what is your browser version?

This has to do with iOS app and a fix was submitted and merged already. Here is the bug fix PR I think: https://github.com/home-assistant/home-assistant-polymer/pull/3130
So I would assume it will probably be included in 0.92.2 or something.


What's the 'react' way of accessing the active slides?

I want to change the width of an active slide based on a class it has, but I first need to grab it. How would you recommend I safely go about this? I tried doing refs, but that's apparently not safe. And I am passing my divs/slides as props. So basiaclly how do I go into  and access the active slides.

You probably figured this out already - but use the beforeChange prop

_onChange:  function( currentSlide, nextSlide ) { }

Yes, you can use beforeChange or afterChange methods for this usecase

I'm having trouble figuring out how to access to current slide element. The current slide index is passed into afterChange, but how do I use that to get a reference to the current slide element?

@joebanks10  maybe you can make it by native javascript, like this
onChange () => {
    document.querySelector('.slick-current').focus();
}

Has anyone found a correct solution to this problem? How do we access the elements within the current Slide without using querySelector since it's considered bad practice ??? Maybe with Refs? Please help.

+1 for solution - I would like to know which slide is active via a prop maybe?


Maya crashes when opening anim shots

Issue submitted via PipeBot
Reporting user: Owen Rand

Maya crashes when trying to open animation shots, the loading bar finishes and then Maya immediately crashes.

Duplicate of #200


Error:  attribute d: Expected number, "M 0 NaN".

Checklist

[ x] I updated the card to the latest version available : 2.0.02
[ x] I cleared the cache of my browser
[ x] I verified that I'm really running the lastest version in my browser console : APEXCHARTS-CARD v2.0.2
[ x] I checked if there is another issue opened with the same problem

Describe the bug
Apex charts throwing hundreds of errors in the console.
Looking at the console messages it appears to point back to this line:
"leading" == t ? this.leading && this.leading(e) : "string" == typeof a ? this.node.setAttributeNS(a, t, e.toString()) : this.node.setAttribute(t, e.toString()),

Version of the card
Version: 2.0.2
To Reproduce
I have 4 APEX charts on the view, they are displaying correctly. YAML configuration the same for each, here is one of them. The others are just different entities.
This is the configuration I used:
update_interval: 60s
update_delay: 1s
color_list:
  - Red
  - Green
show:
  loading: true
header:
  show: true
  title: Observatory Temperature
  show_states: true
  colorize_states: true
graph_span: 1day
all_series_config:
  stroke_width: 2
yaxis:
  - min: 0
    max: 40
series:
  - entity: sensor.netatmo_inside_observatory_temperature
    name: Inside
    show:
      extremas: true
  - entity: sensor.netatmo_outside_observatory_temperature
    type: area
    name: Outside
    show:
      extremas: true

Screenshots
see above
Expected behavior
these errors handles correctly in code and not appearing in the console.
Desktop (please complete the following information):

Chrome
Version 111.0.5563.65 (Official Build) (64-bit)

Additional context
Was seeing a lot of unresponsive displays and was digging into that and notices all these errors in the consoles. Appeared to have resolved the unresponsive issue by moving some other views onto standalone new dashboards  (was getting a lot of socket timeouts, think exceeded limits.)

Further to above, also see similar errors for;
Error:  attribute height: Expected length, "NaN".
Error:  attribute height: Expected length, "NaN".
both pointing back to apexcharts.


Broken docs for Gpio23

According to rust-analyzer I'm getting a Gpio23 object (which makes sense, I'm trying to hook up a LED to that GPIO for a test). When I try to find documentation for it however at https://esp-rs.github.io/esp-idf-hal/esp_idf_hal/gpio/index.html it only goes up to Gpio21!?
I presume this is due to this docs being built for a different module, but on docs.rs there is a dropdown to switch between build targets. It would be really useful to have that here.
For context: I'm using and targeting a traditional Xtensa ESP32 module (ESP32-WROVER-IE specifically on a ESP32-DevKitC, this was the only dev board with I2S support and traditional non-LE Bluetooth I could find in stock here in Sweden).
(At least it is possible to build the docs locally with cargo doc)

The hosted docu is build with the riscv target. docs.rs doesn't have support to cross-compile code for rust tier3 targets that need support of the "Zbuild-std"  feature. Additional problems arises with the way esp-idf-sys bindings are build and the underlying build process. That's why we have this github pages docs as a bandgap solution till we get it sorted out. Though building it locally is in your case a method to go.


Does Vulkan support an analog to DX SV_'s for conservative rasterization?

Particularly, SV_InnerCoverage?

If VkPhysicalDeviceConservativeRasterizationPropertiesEXT::fullyCoveredFragmentShaderInputVariable is true you can use the FullyCoveredEXT builtin from SPV_EXT_fragment_fully_covered, it's SV_InnerCoverage as a bool.

Looks like this is resolved?  Closing - please re-open if there's more to be done.  Thanks!


Sklearn 0.20 support

Replaced spherical_kmeans.py with version from
https://github.com/jasonlaska/spherecluster/tree/develop/spherecluster
This method was updated for sklearn 0.20 support, so it could be upgraded here too.

@ellie-icekler: Thank you so much for your contribution!!!


[TextField] clearValue() does not reset component height

I created a form with fields : "title" and "description" and they are contains in Dialog.
My procedure:

open Dialog
input text > 2 lines in "description" ,
dismiss Dialog ( use method clearValue() in onDismiss )
show Dialog again and "description" empty but still keep height.

Sorry about my english!

@mrphu3074 we've had some changes to TextField recently (especially regarding multi-line properties). I'm closing this for now.. but can you check if you're still experiencing this issue or not? Feel free to comment here.

@shaurya947  it's works. thanks


Allow hashable-1.5

AFAICT (via local testing), the version bump is enough.
There is Hashable1 (HashMap k) instance, but the additional constraints introduced in hashable-1.5 are satisfied.
ping to fix #489  too.

As a Hackage trustee I made a revision: https://hackage.haskell.org/package/unordered-containers-0.2.20/revisions/


fix a mistake

fix issue #13
After fixing, It looks like training is ok.

@chenht2010 good catch! and thanks for sharing it is training ok! 🙏


Add G000581, R000606 via #125

[x] I'm acknowledging that my submission is free of all known copyright in at least the United States. (In general, works of the federal government should satisfy this criteria.)

Vicente Gonzalez - G000581
Link: http://www.dems.gov/member/vincente-gonzalez/
Image: http://www.dems.gov/wp-content/uploads/2017/01/GonzalezV-TX15-e1485534799354.jpg
Why public domain: This is an official government portrait for the House Democratic Caucus. license

Jamie Raskin - R000606
Link: http://www.dems.gov/member/jamie-raskin/
Image: http://www.dems.gov/wp-content/uploads/2017/01/RaskinJ-MD08-e1485190310551.jpg
Why public domain: This is an official government portrait for the House Democratic Caucus

Thanks! Just two remaining:
Not found: congress/original/J000299.jpg
{'last': 'Johnson', 'official_full': 'Mike Johnson', 'first': 'Mike'}
---
Not found: congress/original/L000587.jpg
{'last': 'Lewis', 'official_full': 'Jason Lewis', 'first': 'Jason'}


Sci-IO Message

This will add definitions for the messages:

GenericIOSetOutputChannelsCommand
GenericIOStateOfInputChannelsMessage
GenericIOStateOfOutputChannelsMessage

yes, this should go from LF to CRLF

If we start 'normalizing' the line endings, the repository must additionally (to the .editorconfig) define 'normal' line endings before, i.e. in a .gitattributes file. Let's save that for later. I've reverted the line endings in the files in this PR for now.


container-crontab Readme link is misleading

The README for version 0.3.0 links to an Expression Generator and Explainer which uses a different cron format than is actually used here (7 fields instead of 5 or 6).
Not helpful.

When you say "supports all formats", you mean that If I already have a cron expression, I can paste it into the "Cron Expression" field at the top, and it will translate that to words.  Yes, that much is true.
For those not as familiar with cron formats (like myself), the first thing one would do on that page is
to try to generate a cron expression with the Cron expression generator - Quartz.  The expression it generates has 7 fields, and doesn't work with container-crontab.
The README says "...Use Cron Expression Generator & Explainer to quickly generate cron expressions...".  This line in the readme literally encourages a reader to use that tool - which then generates invalid expressions for this container.
Maybe something more like the folowing would be more appropriate:

Use the Cron Explainer page to describe cron expressions, or view examples (just don't use the Expression Generator, as those expressions are not compatible with crontainer-crontab).


Try to enforce link guidance.

/azp run azure-sdk - ci

There are too many other violations, particularly around relative links so I'm not going to enable the link guidance enforcement for the entire repo.


Address family validation fails when adding static routes to interface with dynamic gateway policy

[x] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
[x] I have searched the existing issues and I am convinced that mine is new.

Describe the bug
You can add static routes directly to an interface (without an actual gateway) by enabling "dynamic gateway policy" and adding a dynamic "dummy gateway". When adding static routes to such a "gateway", the address family is not validated correctly: You can add IPv4 routes to an IPv6 "gateway" and you can't add IPv6 routes at all.
To Reproduce
Steps to reproduce the behavior:

Go to 'Interfaces: [Interface]', set the 'IPv6 Configuration Type' to 'Static IPv6', enable 'Dynamic gateway policy', enter a valid IPv6 address, save and apply.
Go to 'System: Gateways: Single', add a gateway, select the previously configured interface, set 'Address Family' to IPv6, enter 'dynamic' in the 'IP address' field, save and apply.
Go to 'System: Routes: Configuration', add a route, enter a valid IPv6 network in the 'Network Address' field, select the previously configured 'Gateway', save.
See error messages: 'Specify a valid network matching the gateways ip protocol.', 'Specify a valid gateway from the list matching the networks ip protocol.'
Enter a valid IPv4 network in the 'Network Address' field, save again.
See error: Route gets saved despite the protocol mismatch.

Expected behavior
You should (only) be able to add IPv4 routes to IPv4 gateways / interfaces and IPv6 routes to IPv6 gateways / interfaces.
Describe alternatives you considered
Manually add IPv6 routes via shell.
Environment
OPNsense 21.7.a_255 (amd64, OpenSSL)

The Dynamic gateway policy option is intended to be able to omit an address for tunnel type devices (https://docs.opnsense.org/manual/interfaces.html), if you do want to set an address for the gateway, make sure to disable the dynamic option (in which case normal gateway rules should apply)

I do not want to set an address for the gateway and indeed tested this with a tunnel interface (WireGuard). Sorry I didn't mention that, wanted to keep it easy to reproduce. You can of course set the interface's 'IPv6 Configuration Type' to 'None' and let wg set the interface address. That's the only difference and it doesn't make a difference regarding the bug.

@maurice-w can you try https://github.com/opnsense/core/commit/384018c52233e85746e81ed0c2158d4307943802 ?

Thank you @AdSchellevis, that fixed it! Adding IPv6 routes works and so does the actual routing.
Btw, I stumbled over this while unsuccessfully trying to set up policy based routing with such a "gateway". That doesn't seem to work at all (neither IPv4 nor IPv6). Would you mind taking a look before I open another issue?
https://forum.opnsense.org/index.php?topic=22348

@maurice-w maybe better open a new ticket, I'm not sure what we're looking at here. destination routing with the dynamic gateways works (it's the same as openvpn uses), but maybe I'm overseeing a glitch elsewhere, although I thought I've seen functional OpenVPN cases which use the same type of routing.


Full revision of README

With the large refactor, courtesy of @AntonC9018 , the README will need a complete look over to ensure it's still correct, and to also add in any new features that haven't been described yet.

Yo, I am on the latest non-beta version, 0.24.0, and I cannot find ArgConfig.repeatableName, in which version may I find this as I desperately need it for my compiler (object linking).

Yo, I am on the latest non-beta version, 0.24.0, and I cannot find ArgConfig.repeatableName, in which version may I find this as I desperately need it for my compiler (object linking).

it's not released under a version, use the master branch, or make a fork and use it as a submodule

Is there a way in dub to specify to use whatever the HEAD of the master branch is?

I mean i could fork it but then I'd need to make it available on dub which is well, seems grifty.

Is there no motivation to get an early beta out perhaps for these new features, I mean clearly marked as a beta such that users like me can use it but stable-enjoyers can stray away from it. Would help out a lot <3

Hey, there is in fact a beta out on dub :)
https://code.dlang.org/packages/jcli - 0.25.0-beta.1
If you ever need to use a branch inside dub, you can use "~BRANCH_NAME" as the version string.

Thanks a tonne @BradleyChatha !
The one thing I am getting now, however, seems to be:
../../../../.dub/packages/jcli-master/jcli/subprojects/core/source/jcli/core/pattern.d(11,5): Deprecation: `jcli.core.pattern.Pattern.this`: `in` contract may throw but function is marked as `nothrow`
source/tlang/commandline/args.d(8,5): Error: template instance `CommandLineInterface!(commandline.commands)` template `CommandLineInterface` is not defined
source/tlang/commandline/args.d(8,73): Error: template instance `CommandLineInterface!(commandline.commands)` template `CommandLineInterface` is not defined

Has the template instantiation changed quite a bit?

Ah yeah, 0.25.0-beta.1 is a large rewrite.
Sorry for the annoyances, I can go try and get a version tagged in the older code that has the feature implemented for you though, will update you shortly.

... Although I think I'm attempting to fix the wrong problem here.
The actual problem is I really need to get the README fully up to date to address the new changes. For now if you look at this example, it should help you get to where you're going: https://github.com/BradleyChatha/jcli/tree/master/new_examples/across_modules
🤕 Again, I know this is a subpar experience, so I would just like to apologise.

No problem, I understand :). I will take a look at the code example you have posted and if I can get that working, else a tag that supports the feature I am looking for and the same templatised constructor would be the way to go :)

I'm struggling with the example you posted above, I think a tagged version would be best for now @BradleyChatha , later - when the readme is updated - I will be able to transition over

I'm struggling with the example you posted above, I think a tagged version would be best for now @BradleyChatha , later - when the readme is updated - I will be able to transition over

what did you not understand in the examples, you can ask me directly, I'm the one who wrote them

@AntonC9018 I'm struggling to find the symbol matchAndExecuteAcrossModules

https://github.com/BradleyChatha/jcli/blob/master/subprojects/commandgraph/source/jcli/commandgraph/cli.d#L174

So it compiles now, but it would seem as though nothing ever executes now, I just get the usage being displayed constantly:
module commandline.args;

import jcli.commandgraph.cli;

void parseCommandLine(string[] arguments)
{
    /* Create an instance of the JCLI command-line parser */
    // CommandLineInterface!(commandline.commands) commandLineSystem = new CommandLineInterface!(commandline.commands)();

    matchAndExecuteAcrossModules!(commandline.commands)(arguments);

    /* Parse the command-line arguments */
    // commandLineSystem.parseAndExecute(arguments);
}

Output:
tlang NO_PUBLISH_RELEASE

   compile:  Compiles the given file(s)
       lex:  Performs tokenization of the given file(s)
syntaxcheck:  Check the syntax of the program
 typecheck:  Perform typechecking on the program
      help:  Shows the help screen

So it compiles now, but it would seem as though nothing ever executes now, I just get the usage being displayed constantly:
module commandline.args;

import jcli.commandgraph.cli;

void parseCommandLine(string[] arguments)
{
    /* Create an instance of the JCLI command-line parser */
    // CommandLineInterface!(commandline.commands) commandLineSystem = new CommandLineInterface!(commandline.commands)();

    matchAndExecuteAcrossModules!(commandline.commands)(arguments);

    /* Parse the command-line arguments */
    // commandLineSystem.parseAndExecute(arguments);
}

Output:
tlang NO_PUBLISH_RELEASE

   compile:  Compiles the given file(s)
       lex:  Performs tokenization of the given file(s)
syntaxcheck:  Check the syntax of the program
 typecheck:  Perform typechecking on the program
      help:  Shows the help screen

it doesn't slice off the program name from the argument list, you need to do that manually.
Thanks for the help lads!


Error: You may need an appropriate loader to handle this file type.

At runtime, I get the following error. I think it might be due to style documents, such as sass in your code, which my app has no loader for. I havent dived into your source, so i cant be specific
ERROR in ./~/react-file-base64/src/js/components/react-file-base64.js
Module parse failed: /Users/macbook/go/src/github.com/tonyalaribe/titterv2/node_modules/react-file-base64/src/js/components/react-file-base64.js Unexpected token (68:6)
You may need an appropriate loader to handle this file type.
|   render(){
|     return (
|       <input
|         type="file"
|         onChange={ this.handleChange.bind(this) }
 @ ./app/containers/NewPost/index.js 52:0-43
Child html-webpack-plugin for "index.html":

Did you manage to solve this?

Hey @lrojas94, @tonyalaribe
I don't know what's wrong with that? Did I do wrong? :confused:

Actually, I was testing out. Still not sure why that happens, but just taking your FileBase64 class file works just fine :P. I don't really know much about node module builds, let alone webpack ones,  but I suppose it's related so some dependencies and how you call them.

@lrojas94 :(
Maybe it's caused by the sass file... I think, I need learn more about css in JS. So, the developer is not required to has sass loader in his projects.

I have the same issue

Hey Guys @tonyalaribe @vinu123 @lrojas94
You can review my last update to fix this issue https://github.com/BosNaufal/react-file-base64/commit/1f246e95fff299bffbc7a17133bed6beb9ce9f6d And please close this issue after it's solved :grin:
Just tell me if there's something wrong...

I'm having similar error
ERROR in ./~/react-file-base64/src/js/components/react-file-base64.js
Module parse failed: /Users/mfrejnik/www/react-comments/node_modules/react-file-base64/src/js/components/react-file-base64.js Unexpected token (70:6)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (70:6)
    at Parser.pp$4.raise (/Users/mfrejnik/www/react-comments/node_modules/webpack/node_modules/acorn/dist/acorn.js:2221:15)
    at Parser.pp.unexpected (/Users/mfrejnik/www/react-comments/node_modules/webpack/node_modules/acorn/dist/acorn.js:603:10)
    at Parser.pp$3.parseExprAtom (/Users/mfrejnik/www/react-comments/node_modules/webpack/node_modules/acorn/dist/acorn.js:1822:12)
    at Parser.pp$3.parseExprSubscripts (/Users/mfrejnik/www/react-comments/node_modules/webpack/node_modules/acorn/dist/acorn.js:1715:21)
    at Parser.pp$3.parseMaybeUnary (/Users/mfrejnik/www/react-comments/node_modules/webpack/node_modules/acorn/dist/acorn.js:1692:19)
    at Parser.pp$3.parseExprOps (/Users/mfrejnik/www/react-comments/node_modules/webpack/node_modules/acorn/dist/acorn.js:1637:21)
    at Parser.pp$3.parseMaybeConditional (/Users/mfrejnik/www/react-comments/node_modules/webpack/node_modules/acorn/dist/acorn.js:1620:21)
    at Parser.pp$3.parseMaybeAssign (/Users/mfrejnik/www/react-comments/node_modules/webpack/node_modules/acorn/dist/acorn.js:1597:21)
    at Parser.pp$3.parseParenAndDistinguishExpression (/Users/mfrejnik/www/react-comments/node_modules/webpack/node_modules/acorn/dist/acorn.js:1861:32)
    at Parser.pp$3.parseExprAtom (/Users/mfrejnik/www/react-comments/node_modules/webpack/node_modules/acorn/dist/acorn.js:1796:19)
 @ ./src/components/Main.js 15:21-49
webpack: Failed to compile.

I tried to install it in 2 different projects, with no success

Hey Guys @tonyalaribe @vinu123 @lrojas94
You can review my last update to fix this issue BosNaufal/react-file-base64@1f246e9 And please close this issue after it's solved 😁
Just tell me if there's something wrong...

I installed via npm which results in this version:
"react-file-base64": "^1.0.2",
This still gives me the error.

Solution:
import only react-file-base64.js component. You can find that under src/js/components/react-file-base64.js

Check PR #4. The issue should be solved now :) I posted some info about why and what was happening. The reason why @vinu123 solution works, is because of what I posted in the PR.

Still the same for react-file-base64@latest(1.0.2) - if this contains your changes:
ERROR in ./~/react-file-base64/src/js/components/react-file-base64.js
Module parse failed: /Users/wilfred.godfrey/www/ffxnz-quiz-authoring-frontend/node_modules/react-file-base64/src/js/components/react-file-base64.js Unexpected token (70:6)
You may need an appropriate loader to handle this file type.
...

It seems to be complaining about the jsx, though I have jsx babel transpiling working in the rest of the project.

@wjagodfrey Just use either my repo or the PR #4 I made which works:
npm install https://github.com/lrojas94/react-file-base64

Same problem.

I've uploaded a package just so in case anyone else encounters the issue here:
https://github.com/lrojas94/react-file-base64
You can install it using npm install react-filebase64. Hopefully the author will update this sometime, but it's been almost a year since this issue was opened, so I thought it would be nice to use an actual package rather than a github link :)

Hey all! @lrojas94 @tonyalaribe @vinu123 @mfrejnik @johhansantana @wjagodfrey @AlexanderKozhevin @divined.
I'm so sorry for making you waiting for merge...
But now it's just been published on npm. Thanks all for your great works! https://github.com/BosNaufal/react-file-base64/pull/4


Add way to specify different style for selected item

It would be nice to have a way for the selected item be instantiated separately or at least pass in a TextStyle to be used exclusively for the currently selected item.

TextStyle in Picker can be used.

Yes but I was requesting the possibility of passing an extra TextStyle that is exclusively used for the selected item, I don't think this is currently possible?

Yes, this is not supported.


wrong default values for maps leading to helm errors (non-table value of: )

Describe the bug
empty values for map in yaml do not allow override later on
Expected behavior
new values for map in yaml to be accepted
Steps to reproduce the bug
provide annotations for grafana.ingress.annotations
Version
istio: 1.1.1
kubectl: v1.10.11
Installation
after succesful install of helm-init
Environment
osx

Sorry this went unnoticed. I confirmed this is an issue, probably in other places as well. Needs to be fixed in https://github.com/istio/installer


Add honeycombio_trigger

See #2
Still TODO:

[ ] add extra test case modifying the trigger
[x] check issue with diffs (the entire block is replaced instead of just the fields)
[x] split off the query block as datasource honeycombio_query
[x] update documentation
[ ] can we validate query_json has exactly one calculation?

I'm planning to merge this PR and start separate smaller PR's for the remaining TODO's. @fitzoh do you still want to review/check this PR?

I'm planning to merge this PR and start separate smaller PR's for the remaining TODO's. @fitzoh do you still want to review/check this PR?

I'd say ship it.
I'm guessing you're not too worried about API stability at this point?
Can always go back and make some tweaks later


[DOC] Fixed documentation to specify that wildcards are not supported…

[ci skip]
[FIX] Resolves #8

Coverage remained the same at 91.977% when pulling 30884756f432ef10c7c638421edf6b90efcea317 on doc into e7ffa0d50f999c58502c7ff3d3981a8e10f16a53 on master.


How to revert back after after drop if condition not matched

Please check attached file
dragula.zip
m/bevacqua/dragula/blob/master/.github/contributing.markdown
[slack]: https://dragula.slack.com

This works perfectly for me:
.on('drop', function (el, target, source) {
    if (CONDITION) {
        $(el).remove();
        $(source).append(el);
    }
}


Change default renderType to createRoot in React 18

React 18 console warns when you run ReactDOM.render() rather than ReactDOM.createRoot().render(). I think single-spa-react should do a React version check and start defaulting to createRoot if it's at least react 18.

Here are the lines to change - should check whether it's react 18 or not when determining the default:
https://github.com/single-spa/single-spa-react/blob/025245b5b00b56991c38a70dd2ab189f7134b8d0/src/single-spa-react.js#L269-L270

You think a version check is what you want, or do you want to do an existence check?
if(ReactDOM.createRoot) {
  ... new stuff
} else {
  ... old stuff
}

It appears that createRoot isn't defined on ReactDOM in v17, so I think it would be safe?

Yeah probably just checking whether createRoot exists is enough. Experimental builds of react 16 and 17 had it, but those using the experimental builds probably would want to use createRoot since that was the whole purpose of using those builds.

Updated React 18 createRoot information here: https://github.com/reactwg/react-18/discussions/5

It seems that ReactDOM: typeof ReactDOM; (which is not correct for React v18+ users) should be updated from SingleSpaReactOpts, since React v18 has already be supported in the latest version, otherwise, it will raise a TypeScript incompatible error with following message:
TS2740: Type 'typeof import("/Users/hijiangtao/Documents/git/weekly-management/node_modules/@types/react-dom/client")' is missing the following properties from type 'typeof import("/Users/hijiangtao/Documents/git/weekly-management/node_modules/@types/react-dom/index")': findDOMNode, unmountComponentAtNode, createPortal, flushSync, and 5 more.

single-spa-react.d.ts(9, 3): The expected type comes from property 'ReactDOM' which is declared here on type 'SingleSpaReactOpts<AppProps>'

Published in v5.0.0

@filoxo In docs it still declared as render is the default renderType. I thought this PR referred in this issue changed the default renderType to createRoot 🤔

Published in v5.0.0

Link
https://github.com/single-spa/single-spa-react/releases/tag/v5.0.0
What's Changed
React 18 support. by @filoxo in https://github.com/single-spa/single-spa-react/pull/148

if upgrading from single-spa-react@4, replace ReactDOM with ReactDOMClient Change default renderType to createRoot. by @filoxo in https://github.com/single-spa/single-spa-react/pull/148

if your application is using React 17 and below, you must explicitly define the renderType option. For most, this is "render" but others are also supported.


Need to pin requests version

https://github.com/docker/docker-py/issues/3113
This is being encountered when installing toltecmk fresh, as it's not pinning the required requests version.

This should no longer be needed


Update Azure Active Directory documentation

Issue description
In .NET 5.0 we have switched from using V1 AAD APIs to using Microsoft.Identity.Web as part of addressing https://github.com/dotnet/aspnetcore/issues/22726. Our templates have been updated to use Microsoft.Identity.Web and Microsoft.Identity.Web.UI instead of the obsolete Microsoft.AspNetCore.Authentication.AzureAD.UI and Microsoft.AspNetCore.Authentication.AzureADB2C.UI. We should update our documentation in this area to reflect the new APIs, see https://docs.microsoft.com/en-us/aspnet/core/security/authentication/azure-active-directory/?view=aspnetcore-3.1
Software versions
Check the .NET target framework(s) being used, and include the version number(s).

[x] .NET Core (.NET 5 covers both)
[x] .NET Framework (.NET 5 covers both)
[ ] .NET Standard

If using the .NET Core SDK, include dotnet --info output. If using .NET Framework without the .NET Core SDK, include info from Visual Studio's Help > About Microsoft Visual Studio dialog.

dotnet --info output or About VS info
<replace>

cc @Tratcher  @jmprieur

For Blazor security node topics, I'm tracking the work on [RC1] Microsoft Identity Platform 2.0 for Blazor (dotnet/AspNetCore.Docs #19503). I plan to work it shortly after RC1 lands.

FYI it's not just blazor, this affects RazorPages, MVC, WebApi templates as well.

Yes ... I'm just cross-linking the issue for visibility.


bump egui to 0.27

Bump egui dependency to 0.27.
Did not bump winit yet as there are breaking changes.
Did not extensively test.

LGTM. Will release the next version at the end of the week.


Added support for cordova.plugins.diagnostic

Added support for cordova.plugins.diagnostic
https://www.npmjs.com/package/cordova.plugins.diagnostic

Please rebase dev-next and resubmit off of current state of dev-next

Please rebase off of dev-next and resubmit from the current state of dev next.


"来園者" needs to be replaced with "ゲスト"

Strongly recommend to replace "来園者" with "ゲスト" , I can see "来園者" is used as a localized Japanese word of "guest" in English, however, it should be "ゲスト" which stands for guest user of Microsoft Teams.
https://docs.microsoft.com/ja-jp/microsoftteams/plan-teams-governance-edu

ドキュメントの詳細
⚠ このセクションを編集しないでください。 docs.microsoft.com で必須です ➟ GitHub の問題のリンク。

ID: 815d1ce1-cb68-25b5-6a59-435461559495
Version Independent ID: 1f6ac386-4ca4-1cde-bae0-ed6df8c94d61
Content: IT 専門家向けの Microsoft Education のガバナンスに関するよくある質問 - Microsoft Teams
Content Source: Teams/plan-teams-governance-edu.md
Service: msteams
GitHub Login: @rmw2890
Microsoft Alias: Rowille

@hyoshioka0128 - Thank you for submitting this feedback.
I will get this over to for investigation. Thank you for reporting and making the docs better. Much appreciated.

@officedocsbot assign @scanum

@OfficeGlobal

@OfficeGlobal following up on this issue? Could you please update status? Thanks

@hyoshioka0128 , @scanum string was updated and published live. The issue is fixed

@hyoshioka0128 Thank you for submitting feedback. We understand that this issue has been resolved.
Please feel free to re-open this issue if there is a specific area of the docs that we can improve or make better. Thank you.

@officedocsbot close