Implement SmallStrideArray

This is a note to myself or anyone else who wants to take a stab at implementing an array type which stores up to N values as fixed size bits and then if the array gets too big it'll instead store them on the heap. From https://discourse.julialang.org/t/small-vectors/97121/5 a basic implementation looks like:
using StrideArrays
mutable struct SmallStore{SpillSize}
    inline::NTuple{SpillSize, UInt8}
    outline::Union{Vector{UInt8}, Nothing}
end;

function smallarray(::Type{T}, ::StaticInt{SpillSize}, size::Integer...) where {T, SpillSize}
    @assert isbitstype(T)
    N = prod(size) * sizeof(T)
    inline = Ref{NTuple{SpillSize, UInt8}}()[]
    if N <= SpillSize
        outline = nothing
        store = SmallStore{SpillSize}(inline, outline)
        ptr = pointer_from_objref(store)
    else
        outline = Vector{UInt8}(undef, N)
        store = SmallStore{SpillSize}(inline, outline)
        ptr = pointer(outline)
    end
    ptrA = PtrArray(Ptr{T}(ptr), size)
    strA = StrideArray(ptrA, store)
end;

Now here's a benchmark function comparing this smallarray to an array without a static lower size bound:
function foo_sa()
    SpillSize = static(10*8)
    if rand() < 0.95
        # 95% of the time our vector fits inline
        L = 10
    else
        # 5% of the time it'll be too big
        L = 10000
    end
    A = smallarray(Float64, SpillSize, L)
    A .= (1:L)
    sum(A)
end;

function foo()
    if rand() < 0.95
        L = 10
    else
        L = 10000
    end
    A = StrideArray{Float64}(undef, L)
    A .= (1:L)
    sum(A)
end;

julia> @benchmark foo_sa()
BenchmarkTools.Trial: 10000 samples with 997 evaluations.
 Range (min … max):  138.866 ns …   3.697 μs  ┊ GC (min … max):  0.00% … 78.22%
 Time  (median):     273.836 ns               ┊ GC (median):     0.00%
 Time  (mean ± σ):   321.531 ns ± 176.710 ns  ┊ GC (mean ± σ):  10.40% ± 15.50%

        ▃▆██▇▄▂
  ▁▁▂▃▅█████████▇▅▄▃▃▂▂▂▁▁▁▁▁▁▂▂▂▂▂▂▂▂▂▂▁▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▂
  139 ns           Histogram: frequency by time          932 ns <

 Memory estimate: 2.05 KiB, allocs estimate: 1.

julia> @benchmark foo()
BenchmarkTools.Trial: 9078 samples with 994 evaluations.
 Range (min … max):  269.175 ns …   2.844 μs  ┊ GC (min … max):  0.00% … 80.24%
 Time  (median):     475.920 ns               ┊ GC (median):     0.00%
 Time  (mean ± σ):   551.678 ns ± 220.005 ns  ┊ GC (mean ± σ):  11.35% ± 15.79%

        ▁▆█▇▅
  ▁▁▁▁▃▅██████▆▅▃▂▂▂▂▂▂▂▃▃▄▃▃▃▂▂▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▂
  269 ns           Histogram: frequency by time         1.53 μs <

 Memory estimate: 4.77 KiB, allocs estimate: 1.

I don't think this works. I made a few tweaks:
using StrideArrays
mutable struct SmallStore{SpillSize}
  inline::NTuple{SpillSize, UInt8}
  outline::Vector{UInt8}
  SmallStore{SpillSize}() where {SpillSize} = new{SpillSize}()
end;
# in case you want to check
is_small(x::SmallStore) = isdefined(x, :outline)

@inline function smallarray(::Type{T}, ::StaticInt{SpillSize}, size::Integer...) where {T, SpillSize}
  @assert isbitstype(T)
  N = prod(size)
  store = SmallStore{SpillSize*sizeof(T)}()
  ptr::Ptr{T} = if N <= SpillSize
    Ptr{T}(pointer_from_objref(store))
  else
    outline = store.outline = Vector{UInt8}(undef, N*sizeof(T))
    Ptr{T}(pointer(outline))
  end
  ptrA = PtrArray(ptr, size)
  strA = StrideArray(ptrA, store)
end

The performance benefit is only because allocating arrays in Julia is slowere than heap allocating other kinds of mutable structs. It is still heap allocated.
Testing:
function foo(p::Float64=0.95)
  if rand() < p
    L = 10
  else
    L = 10000
  end
  A = StrideArray{Float64}(undef, L)
  A .= (1:L)
  sum(A)
end;
function foo_sa(p::Float64=0.95)
  SpillSize = static(10)
  if rand() < p
    # 95% of the time our vector fits inline
    L = 10
  else
    # 5% of the time it'll be too big
    L = 10000
  end
  A = smallarray(Float64, SpillSize, L)
  A .= (1:L)
  sum(A)
end;

Note also that pointer_from_objref returns Ptr{Nothing} while pointer(::Vector{UInt8}) returns Ptr{UInt8}. Union splitting handles it, but I prefer to be explicit.
Results:
julia> @benchmark foo_sa(1.0)
BenchmarkTools.Trial: 10000 samples with 995 evaluations.
 Range (min … max):  25.801 ns …  3.244 μs  ┊ GC (min … max): 0.00% … 98.27%
 Time  (median):     27.859 ns              ┊ GC (median):    0.00%
 Time  (mean ± σ):   32.512 ns ± 72.335 ns  ┊ GC (mean ± σ):  7.66% ±  3.51%

   ▁▄▅▆▇▇█▆▆▄▂                   ▃▆▇▇▇▆▄▂ ▁▁                  ▃
  ████████████▇▆▆▆▇▇▇▇▇██▇▇█▇█▇▇██████████████▇▇█▆▆▇▇▇▇▇▆▅▇▇▅ █
  25.8 ns      Histogram: log(frequency) by time      38.3 ns <

 Memory estimate: 96 bytes, allocs estimate: 1.

julia> @benchmark foo(1.0)
BenchmarkTools.Trial: 10000 samples with 990 evaluations.
 Range (min … max):  44.371 ns …   5.864 μs  ┊ GC (min … max):  0.00% … 98.66%
 Time  (median):     54.521 ns               ┊ GC (median):     0.00%
 Time  (mean ± σ):   60.849 ns ± 149.926 ns  ┊ GC (mean ± σ):  10.62% ±  4.36%

    ▁▄▄                       ▄▇██▆▄▂▂▂▂▁▂▁▁▁▁▁▁▁              ▂
  ▅█████▇▅▅▅▄▅▆▅▅▄▄▅▅▅▁▅▄▅▄▄▅██████████████████████████▇█▇▇▇██ █
  44.4 ns       Histogram: log(frequency) by time      64.2 ns <

 Memory estimate: 144 bytes, allocs estimate: 1.

Which is the same difference (roughly 20ns) as
julia> @benchmark Ref{NTuple{80,UInt8}}()
BenchmarkTools.Trial: 10000 samples with 1000 evaluations.
 Range (min … max):   5.278 ns …  4.844 μs  ┊ GC (min … max):  0.00% … 99.41%
 Time  (median):      6.266 ns              ┊ GC (median):     0.00%
 Time  (mean ± σ):   10.707 ns ± 86.219 ns  ┊ GC (mean ± σ):  24.44% ±  3.42%

        ▁█▆
  ▂▂▂▂▂▅███▇▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▂▂▁▂▁▂▂▂▂▂▃▃▄▅▆▆▆▅▅▄▃▃▃▂▂ ▃
  5.28 ns         Histogram: frequency by time        11.6 ns <

 Memory estimate: 96 bytes, allocs estimate: 1.

julia> @benchmark Vector{UInt8}(undef, 80)
BenchmarkTools.Trial: 10000 samples with 996 evaluations.
 Range (min … max):  24.496 ns …   5.879 μs  ┊ GC (min … max):  0.00% … 99.21%
 Time  (median):     33.962 ns               ┊ GC (median):     0.00%
 Time  (mean ± σ):   40.066 ns ± 147.741 ns  ┊ GC (mean ± σ):  15.86% ±  4.41%

                                  ▂▄▆█▆▃
  ▁▁▁▁▁▁▁▂▂▂▃▃▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▂▄████████▆▄▃▃▂▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▂
  24.5 ns         Histogram: frequency by time         40.6 ns <

 Memory estimate: 144 bytes, allocs estimate: 1.

This:
function foo_malloc(p::Float64=0.95)
  if rand() < p
    L = 10
  else
    L = 10000
  end
  p = Libc.malloc(sizeof(Float64)*L)
  A = PtrArray(Ptr{Float64}(p), (L,))
  A .= (1:L)
  ret = sum(A)
  Libc.free(p)
  return ret
end;

Which is basically what slow automatic memory management in C++ is equivalent to -- except we need to do it manually in Julia, and is what SmallVector in C++ tries to avoid -- is still at least as fast as either foo or foo_sa.

All that said, Julia seems to crush C++ here, at least with my initial implementation.
C++:
------------------------------------------------------------------
Benchmark                        Time             CPU   Iterations
------------------------------------------------------------------
BM_VectorRandSum/95            228 ns          228 ns      3061537
BM_VectorRandSum/96            200 ns          199 ns      3504504
BM_VectorRandSum/97            171 ns          171 ns      4092254
BM_VectorRandSum/98            142 ns          142 ns      4923293
BM_VectorRandSum/99            114 ns          114 ns      6164543
BM_VectorRandSum/100          80.9 ns         80.9 ns      8655420
BM_VectorRandSumStd/95         230 ns          230 ns      3053542
BM_VectorRandSumStd/96         200 ns          200 ns      3490123
BM_VectorRandSumStd/97         172 ns          172 ns      4069675
BM_VectorRandSumStd/98         143 ns          143 ns      4899230
BM_VectorRandSumStd/99         114 ns          114 ns      6168466
BM_VectorRandSumStd/100       80.7 ns         80.6 ns      8683026

Julia:
julia> for p = 0.95:0.01:1.0
       @btime foo_sa($p)
       end
  180.275 ns (1 allocation: 2.45 KiB)
  139.010 ns (1 allocation: 1.74 KiB)
  97.402 ns (1 allocation: 1.04 KiB)
  61.998 ns (1 allocation: 579 bytes)
  31.178 ns (1 allocation: 96 bytes)
  25.810 ns (1 allocation: 96 bytes)

julia> for p = 0.95:0.01:1.0
       @btime foo($p)
       end
  185.083 ns (1 allocation: 2.35 KiB)
  149.837 ns (1 allocation: 1.56 KiB)
  118.411 ns (1 allocation: 1.17 KiB)
  84.967 ns (1 allocation: 628 bytes)
  57.507 ns (1 allocation: 144 bytes)
  44.419 ns (1 allocation: 144 bytes)

The above was with Clang, to make for an "apples to apples" comparison (although it's LLVM for Clang vs LoopVectorization.jl for Julia).
GCC does better:
------------------------------------------------------------------
Benchmark                        Time             CPU   Iterations
------------------------------------------------------------------
BM_VectorRandSum/95            253 ns          252 ns      2776761
BM_VectorRandSum/96            204 ns          204 ns      3438600
BM_VectorRandSum/97            156 ns          156 ns      4494820
BM_VectorRandSum/98            108 ns          108 ns      6508854
BM_VectorRandSum/99           60.4 ns         60.4 ns     11642662
BM_VectorRandSum/100          12.0 ns         12.0 ns     58292473
BM_VectorRandSumStd/95         251 ns          251 ns      2768944
BM_VectorRandSumStd/96         204 ns          204 ns      3417125
BM_VectorRandSumStd/97         156 ns          156 ns      4503724
BM_VectorRandSumStd/98         108 ns          108 ns      6442773
BM_VectorRandSumStd/99        60.5 ns         60.5 ns     11682902
BM_VectorRandSumStd/100       12.0 ns         12.0 ns     58312134

But even base Julia arrays do about as well as foo:
julia> function foo_base(p::Float64=0.95)
         if rand() < p
           L = 10
         else
           L = 10000
         end
         A = Vector{Float64}(undef, L)
         A .= (1:L)
         sum(A)
       end;

julia> for p = 0.95:0.01:1.0
       @btime foo_base($p)
       end
  190.326 ns (1 allocation: 1.96 KiB)
  173.919 ns (1 allocation: 1.72 KiB)
  127.940 ns (1 allocation: 1.09 KiB)
  91.293 ns (1 allocation: 629 bytes)
  60.696 ns (1 allocation: 224 bytes)
  45.951 ns (1 allocation: 144 bytes)

One thing to be aware of is that malloc/free is way faster on Linux than MacOS for whatever reason. I've often found that malloc/free was barely slower than alloc (at least when using the malloc from StaticTools.jl but it should be the same or similar to the LibC one).
I wonder if it would be advantageous here to make the SmallStore.outline  just store a malloc'd pointer and then if it spills, register a finalizer that frees the pointer?

We could use a library for better cross platform consistency, e.g. mimalloc:
julia> using mimalloc_jll

julia> function foo_mimalloc(p::Float64=0.95)
           if rand() < p
               L = 10
           else
               L = 10000
           end
           p = @ccall mimalloc_jll.libmimalloc.malloc((sizeof(Float64)*L)::Int)::Ptr{Float64}
           A = PtrArray(Ptr{Float64}(p), (L,))
           A .= (1:L)
           ret = sum(A)
           @ccall mimalloc_jll.libmimalloc.free(p::Ptr{Float64})::Nothing
           return ret
       end;

julia> for p = 0.95:0.01:1.0
       @btime foo_mimalloc($p)
       end
  77.858 ns (0 allocations: 0 bytes)
  64.301 ns (0 allocations: 0 bytes)
  47.716 ns (0 allocations: 0 bytes)
  47.642 ns (0 allocations: 0 bytes)
  31.010 ns (0 allocations: 0 bytes)
  29.257 ns (0 allocations: 0 bytes)

I wonder if it would be advantageous here to make the SmallStore.outline just store a malloc'd pointer and then if it spills, register a finalizer that frees the pointer?

If we immitated the C++ implementations, we wouldn't use an extra pointer.
We'd set the PtrArray's pointer to this, and then when it comes time to free, we'd check whether that pointer equals the pointer_from_objref. If so, we don't have to do anything, if not, we know we allocated it and thus free it.
So I guess the equivalent here would be to conditionally register a finalizer that unconditionally frees the pointer. I guess the finalizer would have to enclose the pointer, since it would be registered on the mutable struct SmallStorage?

This at least does not seem great:
using mimalloc_jll
@inline function smallarrayv2(::Type{T}, ::StaticInt{SpillSize}, size::Integer...) where {T, SpillSize}
  @assert isbitstype(T)
  N = prod(size)
  store = Ref{NTuple{SpillSize*sizeof(T),UInt8}}()
  ptr::Ptr{T} = if N <= SpillSize
    Ptr{T}(pointer_from_objref(store))
  else
    p = @ccall mimalloc_jll.libmimalloc.malloc((sizeof(T)*N)::Int)::Ptr{T}
    finalizer(store) do _
      @ccall mimalloc_jll.libmimalloc.free(p::Ptr{T})::Nothing
    end
    Ptr{T}(p)
  end
  ptrA = PtrArray(ptr, size)
  strA = StrideArray(ptrA, store)
end;
function foo_sav2(p::Float64=0.95)
  SpillSize = static(10)
  if rand() < p
    # 95% of the time our vector fits inline
    L = 10
  else
    # 5% of the time it'll be too big
    L = 10000
  end
  A = smallarrayv2(Float64, SpillSize, L)
  A .= (1:L)
  sum(A)
end;
for p = 0.95:0.01:1.0
  @btime foo_sav2($p)
end

julia> for p = 0.95:0.01:1.0
         @btime foo_sav2($p)
       end
  217.347 ns (1 allocation: 96 bytes)
  165.084 ns (1 allocation: 96 bytes)
  113.404 ns (1 allocation: 96 bytes)
  72.094 ns (1 allocation: 96 bytes)
  42.431 ns (1 allocation: 96 bytes)
  26.142 ns (1 allocation: 96 bytes)

Bypassing the GC also puts us at risk of not collecting often enough. CUDA has had problems related to this.

Interestingly, a large part of the overhead can be reduced by using union splitting:
@inline function smallarray3(::Type{T}, ::StaticInt{SpillSize}, size::Integer...) where {T, SpillSize}
    @assert isbitstype(T)
    N = prod(size)
    if N <= SpillSize
        data = Ref{NTuple{SpillSize, T}}()
        p = Ptr{T}(pointer_from_objref(data))
    else
        data = Vector{T}(undef, N)
        p = Ptr{T}(pointer(data))
    end
    StrideArray(PtrArray(p, size), data)
end

function foo_sa3(p=0.95)
    SpillSize = static(10*8)
    if rand() < p
        # 95% of the time our vector fits inline
        L = 10
    else
        # 10% of the time it'll be too big
        L = 10000
    end
    A = smallarray3(Float64, SpillSize, L)
    if A.data isa Ref
        A .= 1:L
        sum(A)
    elseif A.data isa Vector
        A .= 1:L
        sum(A)
    end
end;

@benchmark foo_sa3(0.95)
#+RESULTS:
: BenchmarkTools.Trial: 10000 samples with 998 evaluations.
:  Range (min … max):  123.737 ns …   1.197 μs  ┊ GC (min … max):  0.00% … 42.66%
:  Time  (median):     232.936 ns               ┊ GC (median):     0.00%
:  Time  (mean ± σ):   276.552 ns ± 149.186 ns  ┊ GC (mean ± σ):  14.95% ± 18.50%
:
:        ▁▄▇██▆▂▁
:   ▂▂▃▄▆████████▆▅▄▃▃▂▂▂▂▂▂▁▁▁▂▂▁▁▁▁▂▁▂▁▁▂▁▂▂▂▂▂▃▃▃▃▃▃▃▃▂▂▂▂▂▂▂▂ ▃
:   124 ns           Histogram: frequency by time          832 ns <
:
:  Memory estimate: 2.04 KiB, allocs estimate: 0.

@benchmark foo_sa3(1)

#+RESULTS:
: BenchmarkTools.Trial: 10000 samples with 997 evaluations.
:  Range (min … max):  19.388 ns … 33.952 ns  ┊ GC (min … max): 0.00% … 0.00%
:  Time  (median):     20.461 ns              ┊ GC (median):    0.00%
:  Time  (mean ± σ):   20.478 ns ±  0.384 ns  ┊ GC (mean ± σ):  0.00% ± 0.00%
:
:                                                █▄▂
:   ▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▂▂▂▂▂▂▂▂▂▃▅████▆▄▃▃▃▂▂▂▂▂▂ ▃
:   19.4 ns         Histogram: frequency by time        20.8 ns <
:
:  Memory estimate: 0 bytes, allocs estimate: 0.

versus
@benchmark foo(0.95)
#+RESULTS:
: BenchmarkTools.Trial: 10000 samples with 995 evaluations.
:  Range (min … max):  150.392 ns …   1.750 μs  ┊ GC (min … max):  0.00% … 64.06%
:  Time  (median):     311.940 ns               ┊ GC (median):     0.00%
:  Time  (mean ± σ):   374.021 ns ± 210.603 ns  ┊ GC (mean ± σ):  15.74% ± 19.04%
:
:     ▃▅▆▇████▇▇▆▆▅▄▃▃▂▂▁                ▁▁▁ ▂▁▁▁▁                ▃
:   ▄█████████████████████▇▆▅▆▅▄▆▇▇▇████▇██████████████▇▇██▇▇█▇▆▇ █
:   150 ns        Histogram: log(frequency) by time       1.24 μs <
:
:  Memory estimate: 2.10 KiB, allocs estimate: 1.

#+RESULTS:
: BenchmarkTools.Trial: 10000 samples with 995 evaluations.
:  Range (min … max):  27.839 ns … 922.522 ns  ┊ GC (min … max): 0.00% … 95.64%
:  Time  (median):     29.337 ns               ┊ GC (median):    0.00%
:  Time  (mean ± σ):   31.730 ns ±  34.729 ns  ┊ GC (mean ± σ):  5.95% ±  5.24%
:
:   ▁▁▃▅▆██▇▆▃▂▁                                          ▁▁▁    ▂
:   ██████████████████▇▇▆▆▄▅▃▄▄▃▃▄▃▄▃▁▃▁▁▃▃▃▁▃▁▃▄▃▃▃▁▃▁▄▇███████ █
:   27.8 ns       Histogram: log(frequency) by time      41.9 ns <
:
:  Memory estimate: 144 bytes, allocs estimate: 1.

I think you've messed up the type, it's not a RefValue{Float64} but a RefValue{NTuple{Int(SpillSize), Float64}}, you'll notice that foo_sa3(1) doesn't return anything currently.
function foo_sa3(p=0.95)
    SpillSize = static(10*8)
    if rand() < p
        # 95% of the time our vector fits inline
        L = 10
    else
        # 10% of the time it'll be too big
        L = 10000
    end
    A = @inline smallarray3(Float64, SpillSize, L)
    if A.data isa Base.RefValue{NTuple{Int(SpillSize), Float64}}
        A .= 1:L
        sum(A)
    elseif A.data isa Vector{Float64}
        A .= 1:L
        sum(A)
    end
end

Julia can already tell that smallarray3 returns a union of two values though it doesn't seem to union spilt automatically here.
Do we need to use StrideArray, is there no way to preserve data whilst returning PtrArray?

This is what I've managed, apart from having to free the data manually this seems pretty good to me.
@inline function smallarray5(::Type{T}, ::StaticInt{SpillSize}, size::Integer...) where {T, SpillSize}
    @assert isbitstype(T)
    N = prod(size)
    if N <= SpillSize
        data = Ref{NTuple{SpillSize, T}}()
        t = Base.@_gc_preserve_begin data
        p = Ptr{T}(pointer_from_objref(data))
    else
        data = Vector{T}(undef, N)
        t = Base.@_gc_preserve_begin data
        p = Ptr{T}(pointer(data))
    end
    return PtrArray(p, size), t
end

function foo_sa5(p=0.95)
    SpillSize = static(10*8)
    if rand() < p
        # 95% of the time our vector fits inline
        L = 10
    else
        # 10% of the time it'll be too big
        L = 10000
    end
    A, t = smallarray5(Float64, SpillSize, L)
    A .= 1:L
    result = sum(A)
    .Base.@_gc_preserve_end t
    return result
end

And using malloc instead
@inline function smallarray7(::Type{T}, ::StaticInt{SpillSize}, size::Integer...) where {T, SpillSize}
    @assert isbitstype(T)
    N = prod(size)
    data = Ref{NTuple{SpillSize, T}}()
    t = Base.@_gc_preserve_begin data
    if N <= SpillSize
        p = Ptr{T}(pointer_from_objref(data))
        malloced = false
    else
        p = Ptr{T}(Libc.malloc(sizeof(T)*N))
        malloced = true
    end
    return PtrArray(p, size), t, malloced
end

function foo_sa7(p=0.95)
    SpillSize = static(10*8)
    if rand() < p
        # 95% of the time our vector fits inline
        L = 10
    else
        # 10% of the time it'll be too big
        L = 10000
    end
    A, t, malloced = smallarray7(Float64, SpillSize, L)
    A .= 1:L
    result = sum(A)
    Base.@_gc_preserve_end t
    if malloced
        Libc.free(A.ptr)
    end
    return result
end

On master (similar results on 1.9.3)
julia> for p = 0.95:0.01:1.0
              @btime foo_sa5($p)
              end
  289.597 ns (0 allocations: 2.04 KiB)
  220.990 ns (0 allocations: 1.57 KiB)
  134.724 ns (0 allocations: 1.02 KiB)
  74.590 ns (0 allocations: 481 bytes)
  13.412 ns (0 allocations: 0 bytes)
  13.652 ns (0 allocations: 0 bytes)

julia> for p = 0.95:0.01:1.0
              @btime foo_malloc($p)
              end
  179.266 ns (0 allocations: 0 bytes)
  104.274 ns (0 allocations: 0 bytes)
  98.520 ns (0 allocations: 0 bytes)
  59.149 ns (0 allocations: 0 bytes)
  30.460 ns (0 allocations: 0 bytes)
  24.373 ns (0 allocations: 0 bytes)

julia> for p = 0.95:0.01:1.0
              @btime foo_sa7($p)
              end
  160.715 ns (0 allocations: 0 bytes)
  110.330 ns (0 allocations: 0 bytes)
  81.979 ns (0 allocations: 0 bytes)
  47.535 ns (0 allocations: 0 bytes)
  13.363 ns (0 allocations: 0 bytes)
  13.130 ns (0 allocations: 0 bytes)

Got one way working of not having to manually free
@inline function smallarray8(f, ::Type{T}, ::StaticInt{SpillSize}, size::Integer...) where {T, SpillSize}
    @assert isbitstype(T)
    N = prod(size)
    data = Ref{NTuple{SpillSize, T}}()
    t = Base.@_gc_preserve_begin data
    if N <= SpillSize
        p = Ptr{T}(pointer_from_objref(data))
        malloced = false
    else
        p = Ptr{T}(Libc.malloc(sizeof(T)*N))
        malloced = true
    end
    A = PtrArray(p, size)

    result = @inline f(A)

    Base.@_gc_preserve_end t
    malloced && Libc.free(p)
    return result
end

function foo_sa8(p=0.95)
    SpillSize = static(10*8)
    if rand() < p
        # 95% of the time our vector fits inline
        L = 10
    else
        # 10% of the time it'll be too big
        L = 10000
    end
    return smallarray8(Float64, SpillSize, L) do A
        A .= 1:length(A)
        return sum(A)
    end
end

julia> for p = 0.95:0.01:1.0
         @btime foo_sa8($p)
       end
  168.676 ns (0 allocations: 0 bytes)
  111.845 ns (0 allocations: 0 bytes)
  83.425 ns (0 allocations: 0 bytes)
  43.680 ns (0 allocations: 0 bytes)
  15.290 ns (0 allocations: 0 bytes)
  14.998 ns (0 allocations: 0 bytes)

This is just as fast as foo_sa7 it's just run to run variation.

I'm a bit late to the party here, but has there been any consideration into using a set of compile time know sizes that easily inline similar to the table that Julia uses to allocate other structs on stack https://github.com/JuliaLang/julia/blob/8e77b63fa7636f84767329dd298817d0a36b5ae3/src/julia_internal.h#L359.l? This would be easier to align with with how Julia naturally manages allocations. Explicit support for a limited number of byte sizes might also make it easier to explore local caching and arenas without using Julia finalize

Managed to hack in allocas.
struct SmallVector{T, N} <: AbstractVector{T}
    ptr::Ptr{T}
    heap::Union{Nothing, Vector{T}}
    length::Int
    # function SmallVector{T, N}(length::Integer) where {T, N}
    #     @assert isbitstype(T)
    #     if length <= N
    #         ptr = Core.Intrinsics.unsafe_alloca(T, N) # pretty sure alloca lifetime ends in this constructor
    #         heap = nothing
    #     else
    #         heap = Vector{T}(undef, length); ptr = pointer(heap)
    #     end
    #     new{T, N}(ptr, heap, length)
    # end
end

function Base.getindex(x::SmallVector, i)
    heap = x.heap; GC.@preserve heap begin
        unsafe_load(x.ptr, i)
    end
end

function Base.setindex!(x::SmallVector, v, i)
    heap = x.heap; GC.@preserve heap begin
        unsafe_store!(x.ptr, v, i)
    end
end

Base.IndexStyle(::SmallVector) = IndexLinear()
Base.size(x::SmallVector) = (x.length,)

function foo_sa(p=0.95)
    if rand() < p
        L = 10
    else
        L = 10000
    end

    N = 80
    T = Float64

    if L <= N
        ptr = Core.Intrinsics.unsafe_alloca(T, N)
        heap = nothing
    else
        heap = Vector{T}(undef, L); ptr = pointer(heap)
    end
    sv = SmallVector{Float64, 80}(ptr, heap, L)

    sv .= 1:L
    sum(sv)
end

using BenchmarkTools
for p = 0.95:0.01:1.0
    @btime foo_sa($p)
end

julia> for p = 0.95:0.01:1.0
                     @btime foo_sa($p)
                     end
  273.878 ns (0 allocations: 2.11 KiB)
  192.794 ns (0 allocations: 1.49 KiB)
  117.619 ns (0 allocations: 881 bytes)
  55.911 ns (0 allocations: 400 bytes)
  21.000 ns (0 allocations: 80 bytes)
  10.108 ns (0 allocations: 0 bytes)

@Zentrik can I see how you added the unsafe_alloca intrinsice?

https://github.com/Zentrik/julia/tree/unsafe-alloca should work on wsl ubuntu and windows.

Oh that's very interesting! I expected this to have the same problem that adding it with llvmcall would have, which is that even if the llvmcall is inlined, there is a stackrestore instruction that gets put in so that multiple alloca calls end up just all having the same pointer, but the way you've done it here with intrinsics has the "wrong" inlining behaviour, but that behaviour is exactly what we want!
This is really cool, thanks for sharing.

You need to inline at the Julia level. @inline always works when the callsite is inferred.
alwaysinline will not work, because LLVM remembers the scope/lifetime of the alloca to be limited to that alwaysinline function.
The pointer may still be valid outside of it, but it could suddenly alias other stack objects!


Added function for unobfuscated profileDiffs, filtered id while updating profileDiffs

Date: 17 Nov 2024

Developer Name: Rahul Goyal

Issue Ticket Number

Closes #2223

Description

Added a new fetch profile diff function to obtain unobfuscated contact details for updateUser function called fetchProfileDiffUnobfuscated
Implemented fetchProfileDiffUnobfuscated in updateUser controller
Updated model for users.js addOrUpdate function to remove id from data while setting / updating data.

Documentation Updated?

[ ] Yes
[x] No

Under Feature Flag

[ ] Yes
[x] No

Database Changes

[ ] Yes
[x] No

Breaking Changes

[ ] Yes
[x] No

Development Tested?

[x] Yes
[ ] No

Test Coverage

Testing done in #2256

@RahulGoyal-tech please fix the title

@RahulGoyal-tech please fix the title

Done.


Modularize Client Docs: ISPN-10526

Related to JIRA ISPN-10526
Initial attempt at modularizing connecting_clients docs
Change name to client docs

@oraNod  Fresh client PR

@joaedwar hi again, it also looks like stories.adoc needs to include the assembly.
https://raw.githubusercontent.com/joaedwar/infinispan/ISPN-10526/documentation/src/main/asciidoc/titles/clients/stories.adoc
should point to assembly_clients.adoc


unrecognized selector sent to instance

The app crashes when it gets to this line of code:
VoipPushNotification.registerVoipToken();
This is the error in the XCode console:
2020-04-30 19:20:49.552892-0400 myApp[265:6055] [RNVoipPushNotificationManager] voipRegistration
2020-04-30 19:20:49.633725-0400 myApp[265:6055] -[AppDelegate pushRegistry:didUpdatePushCredentials:forType:]: unrecognized selector sent to instance 0x283c83580
2020-04-30 19:20:49.634672-0400 myApp[265:6055] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AppDelegate pushRegistry:didUpdatePushCredentials:forType:]: unrecognized selector sent to instance 0x283c83580'
*** First throw call stack:
(0x1bff0f180 0x1bf0e79f8 0x1bfe2b9bc 0x1ec728220 0x1bff149c8 0x1bff1665c 0x1e16ae0b8 0x1048776f4 0x104878c78 0x1048866fc 0x1bfea0b20 0x1bfe9ba58 0x1bfe9afb4 0x1c209c79c 0x1ec6fcc38 0x1009a0d34 0x1bf95e8e0)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Never mind, wrong installation

for future reference anyone stepping into this, I received this error when the uuid was a single number(due to a parse int in back end), after fixing that it worked again

how did u fixed this @utiq

how did u fixed this @utiq

@fukemy @whoiswentz sorry guys, I don't remember; that was a long time ago.
Maybe follow the recommendation from @mrcarjul


Whole navigation stack is rebuilt in every stack change

See counter output on every page

Solved, thanks to this.


Clear or Reset Votes

As a facilitator of Lean Coffee events, using the Leaner Coffee Power-up in Trello, I need the ability to clear or reset all votes on a board, either at one time, or individually by column or card, so that I can persistently use the same board over multiple Lean Coffee sessions with the same audience.

Makes sense. I may already have some code to this effect, which I use while debugging. Shouldn't be too hard to make it a feature. I'll see if I can get some time to work on it this weekend.

That would be great. I also miss this. To run a second time we end up having to add our faces to vote.

This shows how long it's been since I worked on this project... this feature was already partially implemented in #14, by adding a "Clear all votes from this list" menu item to the list menu (i.e. by "column", @henry-pozzetta).

I may still look into adding this at the board level, assuming I can find a UX that's not too intrusive. I'll keep this issue updated with any decisions, of course.

This shows how long it's been since I worked on this project... this feature was already partially implemented in #14, by adding a "Clear all votes from this list" menu item to the list menu (i.e. by "column", @henry-pozzetta).

That will do! Thanks for that


Insider build 21327 issue

This was not tested by me but one user reported that when my program with FluentWPF is open "when trying to move any window, they move with a delay like slow motion". I've asked him to try it with FluentWPF sample app and he reported the same problem. Started happening right after update to W10 to insider build 21327.

I'm experiencing something similar - when running my app, if Acrylic is on, the my 4k display has some weird issues, but my other screen (@1080p) is fine. we are talking super slow motion mouse movement etc. easy to reproduce, a pain to diagnose. I'm looking into the issue see if i can get any work arounds but am pulling my hair out. I guess rolling back on windows update is an option - but it might just be delaying the issue.

submitted a PR that resolves this - however, i can reproduce it without a FluentWPF app too - the preview on tasks in the taskbar can cause it too.

Hi @milos12345 and @madninjaskillz
Thanks for the information.
I'll try it when next insider preveiw released.
(Currently, the latest windows10 iso is 21286)
If the problem still occurs, I'd like to inspect this issue.
Please wait for a while.

I have tested it now with Windows 11 - 21H2 build 22000.100 and the issue is still there

This is how it looks on Win 11 (official dev build 22000.100 ) the latest alpha of FluentWPF.

Same lag regardless of the blur effect type.

The lag happens if there is anything behind the window (on clean desktop the lag is not noticeable)
Another issue is that blur effect is shown only on move, while the window is opaque otherwise. I think it would be fine if fw:AcrylicWindow.Enabled="False" was while window was being moved/resized, and restored once mouse is released.

Hi there.
Currently Windows11 seems that doesn't support acrylic effect with SetWindowCompositionAttribute API. So that,  I turnd off acrylic effect in FluentWPF 0.10.0.
See also(#130, #42)
I'll close this issue, and track the problems about acrylic effect in #130.

@milos12345 video-drivers installed in your system? I asking because window borders are squared.
Blur problems can be of the same "nature"


Update mockito and maven-javadoc-plugin to fix NullPointerException

Coverage increased (+0.05%) to 81.803% when pulling 700f59b2d3d4dce32a3ae103e320f554025c045f on kaibadash:hotfix/fix_test into 3819b155edf9132acc75bb6af66dcef1b98c64b2 on bramp:master.

Your diff seemed to change all the whitespace in pom.xml which made it hard to review.
However, we have since updated the various plugins/deps, so this shouldn't be a problem anymore. Thanks for your PR.


Errors on supervisor core log after 2021.12.0 update of HA [Bug]

Describe the issue
Supervisor core log contains errors
How to reproduce the issue
When have OMV integration installed, update HA core to 2021.12.0 and see the supervisor log
Expected behavior
No listings in supervisor core log
Screenshots
None
Software versions

Home Assistant version: 2021.12.0
openmediavault integration version: 1.1.7
openmediavault software version:  5.6.21-2

Traceback/Error logs
2021-12-11 23:52:49 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.omv_cpu_load (<class 'custom_components.openmediavault.sensor.OMVSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-11 23:52:49 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.omv_memory (<class 'custom_components.openmediavault.sensor.OMVSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-11 23:52:49 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.omv_uptime (<class 'custom_components.openmediavault.sensor.OMVSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-11 23:52:49 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.omv_disk2 (<class 'custom_components.openmediavault.sensor.OMVFileSystemSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-11 23:52:49 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.omv_disk4 (<class 'custom_components.openmediavault.sensor.OMVFileSystemSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-11 23:52:49 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.omv_disk1 (<class 'custom_components.openmediavault.sensor.OMVFileSystemSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-11 23:52:49 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.omv (<class 'custom_components.openmediavault.sensor.OMVFileSystemSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-11 23:52:49 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.omv_disk3 (<class 'custom_components.openmediavault.sensor.OMVFileSystemSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-11 23:52:49 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.omv_2 (<class 'custom_components.openmediavault.sensor.OMVFileSystemSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-11 23:52:49 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.omv_sda (<class 'custom_components.openmediavault.sensor.OMVDiskSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-11 23:52:49 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.omv_sdb (<class 'custom_components.openmediavault.sensor.OMVDiskSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-11 23:52:49 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.omv_sdc (<class 'custom_components.openmediavault.sensor.OMVDiskSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-11 23:52:49 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.omv_sdd (<class 'custom_components.openmediavault.sensor.OMVDiskSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-11 23:52:49 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.omv_sde (<class 'custom_components.openmediavault.sensor.OMVDiskSensor'>) implements device_state_attributes. Please report it to the custom component author.

Additional context
The log is kindly asking to inform the author, so here I'm, listening bravely ;-)

I think this was fixed in #61
Can you install master and confirm?

So I went to HACS, OMV integration, clicked Re-download, restarted the whole server, but nothing changed.
Do I need another steps to do?

And, @tomaae , this looks not only OMV problem, there are more HACS integrations with the same error ;-)

Select "master" from version selection in redownload window:

Yes, I know. It was in breaking changes for this release. I'm currently holding off updating my main instance for at least a week because of that.
I will have time to start updating my integrations starting monday

@tomaae I don't think #61 has been merged yet :)

it was, but its not in a release, just master

Yes, now downloaded master, errors are gone ;-)

good to hear :)

Solved

Why was this not released? I only came to know about this fix, because I checked closed issues before raising a new issue. I would never have thought myself to install master to fix this and I am pretty sure that I am not the only one.


Add outcome to buildfinished event

Changes
This PR addresses a missing field of, outcome, that should exist in the build.finished event.
This follows the outcome of taskRun.finished, except that it utilizes an enum value instead. Users should be able to pass any string they want to, but we should also have some sane enums so consumers and producers do not have several ways of representing the same thing.
Submitter Checklist
As the author of this PR, please check off the items in this checklist:

[x] Has the primer doc been updated if a design decision is involved
[x] Have the JSON schemas been updated if the specification changed
[x] Has spec version and event versions been updated according to the versioning policy
[x] Meets the CDEvents contributor standards

@xibz - main is now open for v0.5 development - could you rebase this PR?

This PR overlaps somewhat with #238 . Should they be combined?

See also #215


Remove double underscore usage

The uniprocessor space header contained identifiers using double
underscores. These are reserved for the implementation and usage
in user code can thus create problems.

It did not cause issues for me fortunately :) I simply noticed the double underscores when reading the code and I figured it was an easy fix and might help someone in the future.
I added a prefix which is unique to the macro (ppj for possibly pending job etc.) So technically one could nest the macro's although nesting the same macro will still cause issues.


Question: no-store versus no-cache for Antiforgery

This question is related to how caching and Antiforgery was handled for https://github.com/aspnet/Antiforgery/issues/105.
Looking at https://github.com/aspnet/Antiforgery/blob/3fc090e2fee47884af7968031e40876fcb6549ae/src/Microsoft.AspNetCore.Antiforgery/Internal/DefaultAntiforgery.cs#L70-L72 ...

Explicitly set the cache headers to 'no-cache'. This could override any user set value but this is fine as a response with antiforgery token must never be cached.

and thus SetDoNotCacheHeaders() ...
https://github.com/aspnet/Antiforgery/blob/3fc090e2fee47884af7968031e40876fcb6549ae/src/Microsoft.AspNetCore.Antiforgery/Internal/DefaultAntiforgery.cs#L370-L379
@JunTaoLuo said ref ...

The proposal is to disable caching when antiforgery is used regardless of whether cookies are being set.

RFC 7234 doesn't guarantee that storage will not occur tho ...

<IP_ADDRESS>.  no-cache
The "no-cache" request directive indicates that a cache MUST NOT use a stored response to satisfy the request without successful validation on the origin server.

Wondering: Why doesn't Antiforgery set no-store rather than no-cache?

Setting no-store would help in cases when the user clicks the browser's back button.

I suppose the language in the in-line comment isn't completely clear but we wanted to prevent serving cached content when antiforgery is being used. no-cache would have been sufficient for this since the response cannot be served unless validated with the origin which should generate a new response. However, as a precaution, we might want to consider also sending no-store to prevent any storage of the response in the first place.

Setting no-store would help in cases when the user clicks the browser's back button.

The language in https://tools.ietf.org/html/rfc7234#section-6 is still a little ambiguous (but much better than rfc 2616). "This does not prohibit the history mechanism from telling the user that a view might be stale or from honoring cache directives (e.g., Cache-Control: no-store)." This suggests that cache directives should be honored but the older versions of some browsers did not since they treated history lists and caches differently (e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=441751).
cc @muratg
Also consider referring to http://stackoverflow.com/questions/49547/how-to-control-web-page-caching-across-all-browsers for other headers we might want to send for compatibility with more/older browsers.

we wanted to prevent serving cached content when antiforgery is being used.

Does that intent include preventing serving cached content when the user clicks the back button?

I think we should do this one as well.  @Eilon @rynowak thoughts?

@kichalla When will the fix for this be released?

@snluu it will be in the 2.0 release of ASP.NET Core, which will be out later this year. We'll have previews before then, though.

@Eilion :( that's unfortunate. Can we ship this out as a bug fix (1.1.2), or can you suggest a workaround? The page I'm working on requires "no-store", but unfortunately is always overwritten by Antiforgery with "no-cache".

@snluu I think you should be able to just set that header as well wherever you use anti-forgery, right? You could perhaps encapsulate this in your own filter attribute / HTML helper or wherever it is that you need this.

Antiforgery is able to override that, unfortunately. I have have this class below, and confirmed that the code was executed and set the header, and then the header got overwritten by Antiforgery:
    internal sealed class NoCacheAttribute : ActionFilterAttribute
    {
        public bool NoStore { get; set; }

        public override void OnResultExecuting(ResultExecutingContext context)
        {
            if (NoStore)
            {
                context.HttpContext.Response.Headers["Cache-Control"] = "no-cache, no-store, max-age=0";
            }
            else
            {
                context.HttpContext.Response.Headers["Cache-Control"] = "no-cache, max-age=0";
            }

            context.HttpContext.Response.Headers["Pragma"] = "no-cache";
            context.HttpContext.Response.Headers["Expires"] = "-1";

            base.OnResultExecuting(context);
        }

    }

@Eilon Antiforgery is able to override that, unfortunately. I have have this class below, and confirmed that the code was executed and set the header, and then the header got overwritten by Antiforgery:
    internal sealed class NoCacheAttribute : ActionFilterAttribute
    {
        public bool NoStore { get; set; }

        public override void OnResultExecuting(ResultExecutingContext context)
        {
            if (NoStore)
            {
                context.HttpContext.Response.Headers["Cache-Control"] = "no-cache, no-store, max-age=0";
            }
            else
            {
                context.HttpContext.Response.Headers["Cache-Control"] = "no-cache, max-age=0";
            }

            context.HttpContext.Response.Headers["Pragma"] = "no-cache";
            context.HttpContext.Response.Headers["Expires"] = "-1";

            base.OnResultExecuting(context);
        }

    }

@snluu We have had some success using the following code:

@shaunluttin, fantastic! Thanks for the workaround.
@Eilon I'm sure a lot of folks will be grateful to have this (and maybe other items with the bug tag) rolled out to an update before 2.0 :)

I came across the same issue today and couldn't seem to get the workaround proposed by @shaunluttin to work. In the end I ended up implementing the IAntiforgery service and then internally constructing the DefaultAntiforgery class, this allowed me to change what I needed in the headers, a little overkill but seems to be working fine for me now.
namespace CPC.Mx.Common
{
    public class MXAntiforgery : IAntiforgery
    {
        private readonly DefaultAntiforgery _default;

        public MXAntiforgery(IOptions<AntiforgeryOptions> antiforgeryOptionsAccessor,
            IAntiforgeryTokenGenerator tokenGenerator,
            IAntiforgeryTokenSerializer tokenSerializer,
            IAntiforgeryTokenStore tokenStore,
            ILoggerFactory loggerFactory)
        {
            _default = new DefaultAntiforgery(antiforgeryOptionsAccessor,
                tokenGenerator,
                tokenSerializer,
                tokenStore,
                loggerFactory);
        }

        public AntiforgeryTokenSet GetAndStoreTokens(HttpContext httpContext)
        {
            var result = _default.GetAndStoreTokens(httpContext);
            httpContext.Response.Headers[HeaderNames.CacheControl] = new StringValues(new[] { "no-cache", "max-age=0", "must-revalidate", "no-store" });
            httpContext.Response.Headers[HeaderNames.Pragma] = "no-cache";

            return result;
        }

        public AntiforgeryTokenSet GetTokens(HttpContext httpContext)
        {
            return _default.GetTokens(httpContext);
        }

        public Task<bool> IsRequestValidAsync(HttpContext httpContext)
        {
            return _default.IsRequestValidAsync(httpContext);
        }

        public Task ValidateRequestAsync(HttpContext httpContext)
        {
            return _default.ValidateRequestAsync(httpContext);
        }

        public void SetCookieTokenAndHeader(HttpContext httpContext)
        {
            _default.SetCookieTokenAndHeader(httpContext);
        }
    }
}

Lastly I just registered this in Startup using services.AddSingleton<IAntiforgery, MXAntiforgery>();


[Modules] Enable AAD authentication

Description
Changes to enable AAD authentication and set AAD admins to the PostgreSQL flexibleServers.  Changed the  administratorLogin and administratorLoginPassword parameters to optional to set AAD authentication only
#3563
Pipeline references

Pipeline

Type of Change

[ ] Bugfix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Update to documentation

Checklist

[x] I'm sure there are no other open Pull Requests for the same update/change
[x] My corresponding pipelines / checks run clean and green without any errors or warnings
[x] My code follows the style guidelines of this project
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation (readme)
[x] I did format my code

Hey @ppotturi , thank you very much for the added child-module.
Would you happen to have a test environment & pipeline badge available to show us that the change works as expected? This ideally means we should also add a test case where an instance with AAD auth is deployed.
If not, we could offer to open a dev branch on our end, merge the PR in there and implement the test on your behalf before merging to main.

Hey @ppotturi , thank you very much for the added child-module.
Would you happen to have a test environment & pipeline badge available to show us that the change works as expected? This ideally means we should also add a test case where an instance with AAD auth is deployed.
If not, we could offer to open a dev branch on our end, merge the PR in there and implement the test on your behalf before merging to main.

I have no test environment or a pipeline to show. Please open a dev branch at your end and add tests please.


Banker_Algorithm_Greedy_Approach.cpp

Updated,kindly check

@PrajwalDev9 Extension of the file is missing

Updated

Updated extension,done
On Mon, Oct 10, 2022 at 3:47 PM SIDDHARTH PANDEY @.***>
wrote:

@.**** requested changes on this pull request.
@PrajwalDev9 https://github.com/PrajwalDev9 Extension of the file is
missing
—
Reply to this email directly, view it on GitHub
https://github.com/siddharth25pandey/CPP-Programming/pull/515#pullrequestreview-1135785165,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARNUE6MMJY3X57JTYTO5PFLWCPUJ7ANCNFSM6AAAAAARARNPQI
.
You are receiving this because you were mentioned.Message ID:
@.***>


Osram Lightify Plug state problem

The state of my Osram Lightify Plug is reported as off when it should be on.
When the switch is off and I turn it on, it is briefly reported as on, then shows as off again:
[4/2/2017, 6:17:34 AM] [Hue] TV: homekit power changed from 0 to 1
[4/2/2017, 6:17:37 AM] [Hue] TV: set homekit power from 1 to 0

When the switch is on (but shows as off), I can't turn it off:
[4/2/2017, 6:18:55 AM] [Hue] TV: homekit power changed from 0 to 1
[4/2/2017, 6:18:57 AM] [Hue] TV: set homekit power from 1 to 0

I can only turn it off by tapping it to make it appear on, then tap it again before it is reported as off again:
[4/2/2017, 6:21:35 AM] [Hue] TV: homekit power changed from 0 to 1
[4/2/2017, 6:21:36 AM] [Hue] TV: homekit power changed from 1 to 0

The output is always the same. Is this normal? Anything I can do to help debug this?

Here are the outputs with -D:
[4/2/2017, 6:25:13 AM] [Hue] Philips hue: hue bridge request #9: get /config
[4/2/2017, 6:25:13 AM] [Hue] Philips hue: hue bridge request #9: ok
[4/2/2017, 6:25:13 AM] [Hue] Philips hue: hue bridge request #10: get /lights
[4/2/2017, 6:25:13 AM] [Hue] Philips hue: hue bridge request #10: ok
[4/2/2017, 6:25:15 AM] [Hue] TV: homekit power changed from 0 to 1
[4/2/2017, 6:25:15 AM] [Hue] Philips hue: hue bridge request #11: put /lights/4/state {"on":true}
[4/2/2017, 6:25:15 AM] [Hue] Philips hue: hue bridge request #11: ok
[4/2/2017, 6:25:18 AM] [Hue] Philips hue: hue bridge request #12: get /config
[4/2/2017, 6:25:18 AM] [Hue] Philips hue: hue bridge request #12: ok
[4/2/2017, 6:25:18 AM] [Hue] Philips hue: hue bridge request #13: get /lights
[4/2/2017, 6:25:18 AM] [Hue] Philips hue: hue bridge request #13: ok
[4/2/2017, 6:25:18 AM] [Hue] TV: set homekit power from 1 to 0
[4/2/2017, 6:25:23 AM] [Hue] Philips hue: hue bridge request #14: get /config
[4/2/2017, 6:25:23 AM] [Hue] Philips hue: hue bridge request #14: ok
[4/2/2017, 6:25:23 AM] [Hue] Philips hue: hue bridge request #15: get /lights
[4/2/2017, 6:25:23 AM] [Hue] Philips hue: hue bridge request #15: ok

[4/2/2017, 6:27:27 AM] [Hue] Philips hue: hue bridge request #13: get /config
[4/2/2017, 6:27:27 AM] [Hue] Philips hue: hue bridge request #13: ok
[4/2/2017, 6:27:27 AM] [Hue] Philips hue: hue bridge request #14: get /lights
[4/2/2017, 6:27:27 AM] [Hue] Philips hue: hue bridge request #14: ok
[4/2/2017, 6:27:32 AM] [Hue] TV: homekit power changed from 0 to 1
[4/2/2017, 6:27:32 AM] [Hue] Philips hue: hue bridge request #15: put /lights/4/state {"on":true}
[4/2/2017, 6:27:32 AM] [Hue] Philips hue: hue bridge request #16: get /config
[4/2/2017, 6:27:32 AM] [Hue] Philips hue: hue bridge request #15: ok
[4/2/2017, 6:27:32 AM] [Hue] Philips hue: hue bridge request #16: ok
[4/2/2017, 6:27:32 AM] [Hue] Philips hue: hue bridge request #17: get /lights
[4/2/2017, 6:27:32 AM] [Hue] Philips hue: hue bridge request #17: ok
[4/2/2017, 6:27:32 AM] [Hue] TV: set homekit power from 1 to 0
[4/2/2017, 6:27:37 AM] [Hue] Philips hue: hue bridge request #18: get /config
[4/2/2017, 6:27:37 AM] [Hue] Philips hue: hue bridge request #18: ok
[4/2/2017, 6:27:37 AM] [Hue] Philips hue: hue bridge request #19: get /lights
[4/2/2017, 6:27:37 AM] [Hue] Philips hue: hue bridge request #19: ok

[4/2/2017, 6:28:17 AM] [Hue] Philips hue: hue bridge request #34: get /config
[4/2/2017, 6:28:17 AM] [Hue] Philips hue: hue bridge request #34: ok
[4/2/2017, 6:28:17 AM] [Hue] Philips hue: hue bridge request #35: get /lights
[4/2/2017, 6:28:17 AM] [Hue] Philips hue: hue bridge request #35: ok
[4/2/2017, 6:28:18 AM] [Hue] TV: homekit power changed from 0 to 1
[4/2/2017, 6:28:18 AM] [Hue] Philips hue: hue bridge request #36: put /lights/4/state {"on":true}
[4/2/2017, 6:28:19 AM] [Hue] Philips hue: hue bridge request #36: ok
[4/2/2017, 6:28:19 AM] [Hue] TV: homekit power changed from 1 to 0
[4/2/2017, 6:28:19 AM] [Hue] Philips hue: hue bridge request #37: put /lights/4/state {"on":false}
[4/2/2017, 6:28:19 AM] [Hue] Philips hue: hue bridge request #37: ok
[4/2/2017, 6:28:22 AM] [Hue] Philips hue: hue bridge request #38: get /config
[4/2/2017, 6:28:22 AM] [Hue] Philips hue: hue bridge request #38: ok
[4/2/2017, 6:28:22 AM] [Hue] Philips hue: hue bridge request #39: get /lights

Does the Hue app report the OSRAM plug-in unit as unreachable?  In Eve (or another HomeKit app than the iOS built-in Home) does it show Status Fault?
As of v0.3.12, homebridge-hue reports a light as off when reachable is false, see issue #80.  This was requested by people (whose women are) using 20th century wall switches to power off smart lights.  Maybe I should have made this behaviour optional after all...  Also, homebridge-hue should give an explanatory log (or at least debug) message.
Come to think of it, I don't see any scenario where you'd want to power off a plug-in unit using a wall switch - you'd probably connect your appliance directly to the switched power outlet.

You are right. The Hue app reports it as unreachable, although it works just fine. Eve shows fault (code 1) too. I will go back to v0.3.11 and let you know if this fixes it.

I can confirm v0.3.11 works as expected. It sounds like the behavior should really be optional.

It sounds like the behavior should really be optional.

Indeed.  v0.3.14 defaults to the v0.3.11 behaviour.  The v0.3.12 behaviour can be enabled for lights by setting wallSwitch in config.json.  Plug-in units always use default behaviour.

homebridge-hue should give an explanatory log (or at least debug) message.

In v0.3.14 as well.

👍


<EMAIL_ADDRESS>is using wrong version of @floating-ui/dom after package update

Describe the bug
After updating the package, we had an issue related to the versions of packages, I decided to report it here and I hope it will be useful for someone.
We were also experiencing this bug https://github.com/floating-ui/floating-ui/issues/2311 and after this PR https://github.com/floating-ui/floating-ui/pull/2326  is merged. I have updated the packages but the bug was still persisting.
It took us some quite time until we realised that<EMAIL_ADDRESS>requires<EMAIL_ADDRESS>and our dependency versions did not look correct and it were not automatically updated. So my dependency versions of the packages looked like this:
"<EMAIL_ADDRESS>  version "1.2.7"
  resolved<EMAIL_ADDRESS>  integrity sha512-DyqylONj1ZaBnzj+uBnVfzdjjCkFCL2aA9ESHLyUOGSqb03RpbLMImP1ekIQXYs4KLk9jAjJfZAU8hXfWSahEg==
  dependencies:
    "@floating-ui/core" "^1.2.6"

"<EMAIL_ADDRESS>  version "2.0.0"
  resolved<EMAIL_ADDRESS>  integrity sha512-Ke0oU3SeuABC2C4OFu2mSAwHIP5WUiV98O9YWoHV4Q5aT6E9k06DV0Khi5uYspR8xmmBk08t8ZDcz3TR3ARkEg==
  dependencies:
    "@floating-ui/dom" "^1.2.7"

"<EMAIL_ADDRESS>  version "0.24.1"
  resolved<EMAIL_ADDRESS>  integrity sha512-qjCKUZDEz/4bnJmu4gn66TqsoX912/re8JGEi3pXazsphmyh327l0UpTgpBAT3WkNbnzAH7Adt3wKlLMNtfupw==
  dependencies:
    "@floating-ui/react-dom" "^2.0.0"
    aria-hidden "^1.1.3"
    tabbable "^6.0.1"

Since @floating-ui/react is not directly using @floating-ui/dom but it is like this @floating-ui/react --> @floating-ui/react-dom --> @floating-ui/dom  and since based on rolling versions here https://github.com/floating-ui/floating-ui/pull/2326#issuecomment-1546026895 only @floating-ui/react and @floating-ui/dom were released, @floating-ui/dom was not automatically updated for us because @floating-ui/react-dom were still the same and using old version of  @floating-ui/dom
So, we just deleted all versions for the entire floating-ui dependency tree, so it will just install everything again and now it is just working because ^ versioning.
Nevertheless, I think you should change rolling version configurations that it will update @floating-ui/react-dom to use new version of @floating-ui/dom as well because an update of the packages are happening based on dependency sequences of the packages and package manager doesn't update the packages if it does not have direct dependency :)

Well @floating-ui/react doesn't require<EMAIL_ADDRESS>it's optional. (But fixes that issue). The ^ versioning and @floating-ui/react-dom not being updated is fine in this case.
Re-installing the package to get all deps to latest seems fine to me - new installations will get the latest version.

Going to close since this release cycle is expected. Re-installing for latest everything is the recommended strategy


DOM hint element when extension is solving or finished solving a captcha

Do you have plans to add some kind of (optional) hint to the DOM of a website which indicates if the extension is currently solving a captcha and/or finished solving a captcha?
I am using the "automation build" version of the extension with a Python Selenium script and it would be easier in some cases to know when solving of the captcha is finished or still in progress.
A (hidden) element in the DOM with a unique id and a status value would be nice.

Most CAPTCHAs also already natively expose such events.
DOM
Turnstile, hCaptcha and Text CAPTCHA will all put their token into a hidden<input> element you can check for updates (reCAPTCHA uses a hidden textarea element).
Events
Additionally, since all CAPTCHAs (except text captcha) use iframes, you can listen in on their communication by just listening to message events. They will all dispatch a "done" event from the iframe to your main javascript context with the CAPTCHA token.

Thank you for the reply. I will try your suggestions. I didn't thought about checking for the token or the message events.


... button should stay visible when opening context menu

Testing #223080

Just like here:

I cannot reproduce it on Mac. I suspect this is tree/toolbar related issue in windows?
@hediet Can you please check if you see similar behaviour in other trees?

I don't know of other trees that have such a context menu button.
Also, it reproduces consistently on all windows devices.

Ok, I can reproduce this with custom menu (not with native menu).
@sbatten Any idea how this should get fixed?

I think this got closed by mistake?

@sbatten A friendly ping for your insights here.

This is the property that needs to be set on the dropdown for this to stay visible: https://github.com/microsoft/vscode/blob/d91b89d9a831b9ba8790dd020b094abe225d02f5/src/vs/base/browser/ui/dropdown/dropdown.ts#L169

@sbatten
Using this option is causing following behaviour. Menu is getting trimmed.

@sandy081 yes, unfortunately that's how it works with the shadow dom. You either need to tweak the parent tree to avoid overflow clipping or live with the item disappearing.

I think this should not be closed, as it is a true UI bug.
I understand that there might be more important bugs to fix, but this is very basic UI which I think we have to get right.


Status bar enhancement

it only shows how many minutes left but I also want to check what I planned to do for this period on the status bar.
For example:
Recent task 40 mins left [|||||||||||  ] Next task
It is useful for me when I focus on writing.

Maybe just text will be even better?
Recent task (95%) >>> Next task

@dxcore35 Or give a option to choose which one ? I think showing the left mins is useful for me to know the time.

Yes. the time is better.
Recent task (-5min) >>> Next task
Let's not bother the dev for giving so many customisation yet :D Maybe after v1 the functions can be more customised.... otherwise development of core functions will take ages.

Some great ideas here!
A few separate things that could be done.
Keep the time remaining in the status bar but present a % (e.g. 95% as text over the progress bar itself). This could be done once the percentage reaches a certain minimum to make sure there are not issues with rendering the text over the boundary between the filled and unfilled portion of the progress bar. Here's an example:

I'm conscious of not taking up too much space within the status bar which may include other things such as backlinks, word count, git status (from other 3rd party plugin) etc.
The information on the current task and next task could be presented within a card that would be displayed on hovering over the status item, e.g.:

It is very very good idea! @lynchjames
But

can you make the width of the progress bar smaller?
or can you make it circular? by this it will take even less space

Seems like so cool, I think it is enough for me. But if people could change the view mode of this, things can be better?

It is very very good idea! @lynchjames
But

can you make the width of the progress bar smaller?
or can you make it circular? by this it will take even less space

The width could be reduced, I just picked 150px because it seemed about right but no better reason!
The height is also pretty constrained on the status to > 18px but I think that would be enough for a small circular progress bar.
I'll try something out think of a few display options for the status bar.

You are amazing!

A couple of different status bar layout combinations are now available in 0.3.2.


Optimizing the game simulation

Is there room for improvement in the speed/memory efficiency of the simulation of the game? I'd like to make this aspect of training as fast as possible. If this seems possible and worthwhile, where and how would you recommend I start (ex. Cython)? Thanks!

Hi!  Do you mean the Atari emulator?  I've looked into this a little bit.  Within the emulator, the code is pretty serial, so there's no obvious boost from e.g. vectorizing math or anything.  So the best I could come up with was to 1) make sure the rlpyt env does as little extraneous work as possible, so all the time is in the emulator, (worst culprit to watch out for is slow resizing of the images) and 2) parallelize the sampling so that multiple serial emulators could run efficiently on multiple CPUs.  The alternating-parallel-gpu sampler is usually best for Atari...all the bells and whistles.
Nvidia recently ported Atari to run on GPU, though, and it's fast if you can run a LOT of environments in parallel.  I haven't tried it with rlpyt, but might be worth looking into:
https://news.developer.nvidia.com/new-open-source-gpu-accelerated-atari-emulator-for-reinforcement-learning-now-available/
Hope that helps!

Thank you!


Islamabad Spelling Typo

[Enter feedback here]
Spelling of Islamabad is wrong.

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

ID: 99fb49a6-2817-fe15-b8b3-07a16710bc3f
Version Independent ID: 1c6ed24b-c7c5-2464-50f3-cb92f8c9c527
Content: Time Zones - Microsoft Advertising API
Content Source: advertising/bingads-13/guides/time-zones.md
Service: bing-ads
GitHub Login: @rgaritta
Microsoft Alias: v-rgaritta

Hi. first time contributing after joining a Microsoft course and have amended the spelling of this - I was looking for something that ma be easy to help with; I hope I haven't broken anything by doing so!

@Prige78 I had already opened a PR with the same exact fix here - https://github.com/MicrosoftDocs/Advertising/pull/40
But it turns out the service is currently using the wrong spelling so it can only be merged after the spelling is fixed in the service.


IP addresses not displayed when using bridged network

Yep

I think now it is possible to use qemu-guest-agent for ip address detection. Centos cloud image has it preinstalled.

Now it's possible to use qemu guest agent for ip address detection https://github.com/subuk/vmango/commit/0ab5d9b5f49b2c098593fbf154d1361e187caa91


Remove clipBehavior from OverflowBar in <IP_ADDRESS>.0.pre66

Remove clipBehavior in Overflow_bar.
lib > src > flutter > flex.dart in velocity_x-4.1.2.
below is error message when build.
..AppData/Local/Pub/Cache/hosted/pub.dev/velocity_x-4.1.2/lib/src/flutter/flex.dart:454:7: Error: No named parameter with the name 'clipBehavior'.
clipBehavior: clipBehavior,
^^^^^^^^^^^^
../../flutter_windows_3.7.4-stable/flutter/packages/flutter/lib/src/widgets/overflow_bar.dart:57:9: Context: Found this candidate, but the arguments don't match.
const OverflowBar({
^^^^^^^^^^^

i am also facing the same issue

pub.dev/velocity_x-4.1.2/lib/src/flutter/flex.dart:454:7: Error: No named parameter with the name 'clipBehavior'.
clipBehavior: clipBehavior,
I'm also facing  this issue

i am also facing the same issue

I have the same issue

I am also facing the same issue, when I try to build project on Mac, but windows works fine

Fixed in v4.2.0


Does this library support queries for .vn .ai .es and other suffixes?

Does this library support queries for .vn .ai .es and other suffixes?
As far as I know, the public whois servers for these domains prohibit public queries of whois information.
Wonder if there is any other way to solve this?
Thanks

What's your objective? Whois data or status?
If the latter, I recommend trying the Domainr API: https://domainr.com/api.


split out test deps and move simulations out of src/

This is a start towards cutting down the core lasp src to only what is needed (meaning keeping the simulations and test code out of the main src).
I moved deps for tests to the test profile and moved simulations related modules (I may have missed some) to simulations/.
There is still work to do with cleaning up lasp_sup and such, and I'd like to figure out getting erlcloud and webmachine out of the dependencies.
I'm also not sure about the eredis dep, this may end up needing to stay in the main deps and included in the release like erlcloud is currently? If they are just needed in the release you use for experiements I'd move them to a profile specific to that for building the release with experiment related deps that are included in the release.

Critical to our experiments, we need to be able to build a rel and ship it to Amazon / Google, etc.
How does this change the behavior when a release gets built?

The release could still be built with those deps. I'll update the release to include those apps.

Can you branch off the membership branch for this?

Sure. Looks like I have a number of other changes, like with xref, to get done as well.

I need to figure out a good way to have it start the webmachine worker when the release runs but not otherwise.

Also, lasp_marathon_simulations is used in a number of modules that seem to be core to functionality, while it (at least based on the module name) should be moved out to simulations/.

Can you retarget this for unstable?

I'm nervous to merge this until I'm able to run some experiments on Google Cloud to verify.  I'll try to do that over the next day or so.

Gah, can you handle this conflict?

Merging to run experiments.


Yargs V2

Yargs re-structure, added the notion of option priority, cleaned pwmetrics constructor to match information in README and added utils object functionality for deep object merging.
I also added the notes specified by @paulirish in https://github.com/paulirish/pwmetrics/pull/51
Fixes: https://github.com/paulirish/pwmetrics/issues/48 and https://github.com/paulirish/pwmetrics/issues/53.
Still need to add tests and fix https://github.com/paulirish/pwmetrics/issues/47, suggestions are welcome on what to do with the data from all runs (save externally?)
@denar90 What do you think?

This is a WIP, @paulirish I noticed when travis failed that the test/fixtures do not match what is in the README about the configurations. Could you please say which one you want to follow, so that I may change the code accordingly or provide an example to follow?

@pedro93 thanks for nice PR 👍

Okay I know this isn't done, but it'll be easier to only have one branch in flight. Merging this into the yargs branch (and the #51 PR)
We can still iterate on things there. Hopefully we can merge to master soon, too. :)


Adding note about returning on extract_ methods

Proposed changes:
Adding additional information i saw by observing/trying Rasa actions when validating forms.
This is something I saw by observing, I'm not enterly sure that this is the default behavior, but when I return only {} the message was processed as other intent e.g.
Bot: Where are you hosting your applications?
Me: I don't know
Bot: Bye! # <--- This is what I wanted to avoid and did so by returning {"the-slot": None}
Bot: You can be hosting your applications on-premise or the cloud.
Bot: Where are you hosting your applications?

Status (please check what you already did):

[ ] added some tests for the functionality
[x] updated the documentation
[ ] updated the changelog (please check changelog for instructions)
[ ] reformat files using black (please check Readme for instructions)

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Please also sign the CLA 🙏🏻 as suggested here.

@josejulio thank you for your contribution! Could you please share detailed instructions to reproduce your issue to understand the behaviour and make sure the docs improvements are accurate?

When my extract_ method didn't return any value (or None) the intent recognotion would still try to guess the intent and continue from there (uttering whatever is on the model)
If I'm returning the slot and it's value (even if is None) , the intent recognition doesn't follow and I can decide from the extract_ / validate_ methods what to tell/utter to the user.
Does it make sense?


unifying docker  and non docker environments to share data

Checklist

[ ] I have followed the Contributor Guidelines.
[ ] The code has been thoroughly tested in my local development environment with flake8 and pylint.
[ ] The code is both Python 2 and Python 3 compatible.
[ ] The code follows the PEP8 styling guidelines with 4 spaces indentation.
[ ] This Pull Request relates to only one issue or only one feature
[ ] I have referenced the corresponding issue number in my commit message
[ ] I have added the relevant documentation.
[ ] My branch is up-to-date with the Upstream master branch.

Changes proposed in this pull request
unifying docker  and non docker environments to share data and rename ~/.owasp-nettacker to ./.data instead to be more clear.
Your development environment

OS: mac os & docker
OS Version: 11.1
Python Version: x

I also updated the docks in the wiki :)

I also updated the docks in the wiki :)

the CI use docker, and docker use python 2.7, we can keep the docker as our general maintainer for the code now. OS won't be a factor anymore.

the CI use docker, and docker use python 2.7, we can keep the docker as our general maintainer for the code now. OS won't be a factor anymore.

i will close #357

i will close #357


Added support for modifying associatePublicIpAddress

This fixes #59. This enables modification of default subnet associateIpAddress behavior. By default, it leaves it as null or in other words default

Looks good from my side.

LGTM


Can't sync library on Xcode

I can't sync library on Xcode version 12.2.
Android  working normal.
Please have a look:
https://ibb.co/GtDnB61
Thanks

Maybe a duplicate of https://github.com/bdlukaa/native_admob_flutter/issues/41

I use pod update and it working.
Closed.


adds ReactSVGPanZoom to examples list

What I did
Added an example that use latest version of storybook

That's beautiful, and quite an amazing example! thanks for sharing!

@ndelangen  Thanks for your good job! This project is extremely useful!


Incorrect tagging, unable to build with the V3 beta

The repo have an incorrect tagging.
The master branch is tagged for the latest beta tag, that tag is about 2 month old commit.
the fluent-mysql dependecy will pull in this version, which cannot be build with the rest V3 betas.
Please remove this tag and tag the latest beta commit.
Regards

Should be fixed with https://github.com/vapor/mysql/releases/tag/3.0.0-beta.4


IPFS Node config initialised with 0 for all local address ports

Remove ~/.ipfs
Start IPFS Desktop
Confirm "Install IPFS"
Open IPFS node config

  "Addresses": {
    "API": "/ip4/<IP_ADDRESS>/tcp/0",
    "Announce": null,
    "Gateway": "/ip4/<IP_ADDRESS>/tcp/0",
    "NoAnnounce": null,
    "Swarm": [
      "/ip4/<IP_ADDRESS>/tcp/0"
    ]
  },

The ports are all set to 0 which is weird, and it means that I can't connect to the desktop ipfs api from ipfs-companion

@dryajov are these the default values for node.init on js-ipfsd-ctl?

Here https://github.com/ipfs-shipyard/ipfs-desktop/blob/42e7e15916d7fef1e8b3fe3555db2cb8a61930da/src/index.js#L191
We call .init on the node object returned from
https://github.com/ipfs-shipyard/ipfs-desktop/blob/42e7e15916d7fef1e8b3fe3555db2cb8a61930da/src/index.js#L211-L216

Yes they are. SInce once of the most frequent use cases of ipfsd-ctl is tests and the ability to run several daemons in parallel we defaulted to that.

Thanks @dryajov 😄
@olizilla so I just need to change them to the other "defaults". Should I use these (from go-ipfs defaults)?
Swarm listening on /ip4/<IP_ADDRESS>/tcp/4001
Swarm listening on /ip4/<IP_ADDRESS>/tcp/4001
Swarm listening on /ip4/<IP_ADDRESS>/tcp/4001
Swarm listening on /ip4/<IP_ADDRESS>/tcp/4001
Swarm listening on /ip4/<IP_ADDRESS>/tcp/4001
Swarm listening on /ip4/<IP_ADDRESS>/tcp/4001
Swarm listening on /ip4/<IP_ADDRESS>/tcp/4001
Swarm listening on /ip4/<IP_ADDRESS>/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
Swarm listening on /p2p-circuit/ipfs/QmXhZ1nkKXTerQzKzhL4GVs53Ng11euGtoiGrDi2EqaSsB
Swarm announcing /ip4/<IP_ADDRESS>/tcp/4001
Swarm announcing /ip4/<IP_ADDRESS>/tcp/4001
Swarm announcing /ip4/<IP_ADDRESS>/tcp/4001
Swarm announcing /ip4/<IP_ADDRESS>/tcp/4001
Swarm announcing /ip4/<IP_ADDRESS>/tcp/4001
Swarm announcing /ip4/<IP_ADDRESS>/tcp/4001
Swarm announcing /ip4/<IP_ADDRESS>/tcp/4001
Swarm announcing /ip4/<IP_ADDRESS>/tcp/4001
Swarm announcing /ip6/::1/tcp/4001
API server listening on /ip4/<IP_ADDRESS>/tcp/5001
Gateway (readonly) server listening on /ip4/<IP_ADDRESS>/tcp/8080

@dryajov Is there a way to use ipfsd and have it initialised with the same defaults that you'd get if you installed go-ipfs manually, without having to copy/paste the defaults across... seems like it'll just keep getting out of sync.

We used to have that with non-disposable nodes (https://github.com/ipfs/js-ipfsd-ctl/blob/151303ce495b456188d2201421706358afcd5b5d/src/factory-daemon.js#L108), but it was removed at some point.
On the other hand, those values should not be changed frequently if at all by either go or js ipfs, setting them up once in ipfs-desctop should be OK - IMO.

We can init them manually for now. I'd guess that new sections get added from time to time, and it'd be nice to have a way to ask ipfsd-ctl to init with defaults, so I'll raise an issue there.

Thanks @olizilla!

@hacdias Hello, I wonder if i can open certain file in IPFS through http://<IP_ADDRESS>:8080/ or http://<IP_ADDRESS>:5001/ or so in your reply.
It seems not working at all, and i cannot find any setting on the port...

HI @CPCer, we need more information to be able to help you. Are you having an issue with IPFS Desktop? Are you running it from source, or are you running official 0.3 release. If you'd like help getting set up, then irc.freenode.net#ipfs would work better for that conversation, as this your problem may not be the same as the topic in this GitHub issue.

@hacdias yes, I'd go ahead and initialise them from the go-ipfs defaults for now. If you have time to figure out a PR for adding a flag to let ipfsd-ctl do it for us, then that'd be rad too.
I'd go ahead and duplicate them in desktop first though as it's a blocker for us right now.

@olizilla just in terms of ports or everything?
{
  "Datastore": {
    "StorageMax": "10GB",
    "StorageGCWatermark": 90,
    "GCPeriod": "1h",
    "Spec": {
      "mounts": [
        {
          "child": {
            "path": "blocks",
            "shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
            "sync": true,
            "type": "flatfs"
          },
          "mountpoint": "/blocks",
          "prefix": "flatfs.datastore",
          "type": "measure"
        },
        {
          "child": {
            "compression": "none",
            "path": "datastore",
            "type": "levelds"
          },
          "mountpoint": "/",
          "prefix": "leveldb.datastore",
          "type": "measure"
        }
      ],
      "type": "mount"
    },
    "HashOnRead": false,
    "BloomFilterSize": 0
  },
  "Addresses": {
    "Swarm": [
      "/ip4/<IP_ADDRESS>/tcp/4001",
      "/ip6/::/tcp/4001"
    ],
    "Announce": [],
    "NoAnnounce": [],
    "API": "/ip4/<IP_ADDRESS>/tcp/5001",
    "Gateway": "/ip4/<IP_ADDRESS>/tcp/8080"
  },
  "Mounts": {
    "IPFS": "/ipfs",
    "IPNS": "/ipns",
    "FuseAllowOther": false
  },
  "Discovery": {
    "MDNS": {
      "Enabled": true,
      "Interval": 10
    }
  },
  "Ipns": {
    "RepublishPeriod": "",
    "RecordLifetime": "",
    "ResolveCacheSize": 128
  },
  "Bootstrap": [
    "/dnsaddr/bootstrap.libp2p.io/ipfs/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN",
    "/dnsaddr/bootstrap.libp2p.io/ipfs/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa",
    "/dnsaddr/bootstrap.libp2p.io/ipfs/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb",
    "/dnsaddr/bootstrap.libp2p.io/ipfs/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt",
    "/ip4/<IP_ADDRESS>/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",
    "/ip4/<IP_ADDRESS>/tcp/4001/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM",
    "/ip4/<IP_ADDRESS>/tcp/4001/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu",
    "/ip4/<IP_ADDRESS>/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64",
    "/ip4/<IP_ADDRESS>/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd",
    "/ip6/2604:a880:1:20::203:d001/tcp/4001/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM",
    "/ip6/2400:6180:0:d0::151:6001/tcp/4001/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu",
    "/ip6/2604:a880:800:10::4a:5001/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64",
    "/ip6/2a03:b0c0:0:1010::23:1001/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd"
  ],
  "Gateway": {
    "HTTPHeaders": {
      "Access-Control-Allow-Headers": [
        "X-Requested-With",
        "Range"
      ],
      "Access-Control-Allow-Methods": [
        "GET"
      ],
      "Access-Control-Allow-Origin": [
        "*"
      ]
    },
    "RootRedirect": "",
    "Writable": false,
    "PathPrefixes": []
  },
  "API": {
    "HTTPHeaders": null
  },
  "Swarm": {
    "AddrFilters": null,
    "DisableBandwidthMetrics": false,
    "DisableNatPortMap": false,
    "DisableRelay": false,
    "EnableRelayHop": false,
    "ConnMgr": {
      "Type": "basic",
      "LowWater": 600,
      "HighWater": 900,
      "GracePeriod": "20s"
    }
  },
  "Reprovider": {
    "Interval": "12h",
    "Strategy": "all"
  },
  "Experimental": {
    "FilestoreEnabled": false,
    "ShardingEnabled": false,
    "Libp2pStreamMounting": false
  }
}

@olizilla fyi - I'm working on the flag thingy.

It's being worked on. For what I see it seems to be almost complete.
Ref.: https://github.com/ipfs/js-ipfsd-ctl/pull/220

@dryajov could you release a new version with those changes? 😄

ping @diasdavid

Closed with a06b204. Thanks!


Update Meta “authors”

Automatically generated by Netlify CMS

👷 Deploy Preview for drama-of-the-world processing.

Name
Link

🔨 Latest commit
a7f65bf9e3518aa7de1ca725af7d73e7f448c75d

🔍 Latest deploy log
https://app.netlify.com/sites/drama-of-the-world/deploys/626fe96ab306fe00089b88aa


Fix performance of applications listing page

this makes a big difference?

Yes huge difference. Discovered it was getting called per-link


restore add raster layer functionality

Restores "Add Map Layer" option in the Meta menu

Menu text changed to "Add raster tile layer"
Adding the raster layer sets the map style to a new style with only the raster layer and the geojson data/draw layers
Adding the raster layer appends a button to the style selection UI
User can switch between the custom style and the core styles until reload
If user adds another raster layer when one has already been added, it will overwrite the existing one

Use https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.jpg to test


build: Move to official domain.

This may not work right away, let's merge when the dns has propogated.

Preview is broken, weird cert stuff... gonna figure out what's going on (it seems to be auto upgrading to https, which is unexpected)


Updates for VS Code

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: mattztest sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

mixed-reality-docs/CONTRIBUTING.md
:white_check_mark:Succeeded
View

mixed-reality-docs/images/explorer_save.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/source_control_commit.png
:white_check_mark:Succeeded
View

mixed-reality-docs/images/sync_back.png
:white_check_mark:Succeeded
View

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


how to received notification correctly

Hi,
So here is my code i am pretty desperate because i already follow many tuto from youtube or i check stackoverflow i didn't find any response. so here is my probleme :
emulator -> send notification to : iphone/ android phone
android phone -> receive notification
iphone -> didn't receive notification
so what i want is where in my code is wrong because i can't receive notification
what i already check is  :

notification is already on.
i use google firebase i have an APNs Auth Key

here is my code :
Appdelegate :
class AppDelegate: UIResponder, UIApplicationDelegate, MessagingDelegate, UNUserNotificationCenterDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    // Override point for customization after application launch.
    UserDefaults.standard.setValue(false, forKey: "_UIConstraintBasedLayoutLogUnsatisfiable")
    //google places key
    GMSPlacesClient.provideAPIKey("google key")

    // Configure Firebase
    FirebaseApp.configure()
    Messaging.messaging().delegate = self
    UNUserNotificationCenter.current().delegate = self
    UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { (granted, error) in
        if granted {
            print("User gave permissions for local notifications")
        }
    }
    application.registerForRemoteNotifications()

    return true
}

// Handle failing to register for push notifications
func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
    print("Failed to register for remote notifications: \(error.localizedDescription)")
}

func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
     print(response)
 }

// Handle receiving an FCM registration token
func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {
    print("FCM registration token: \(fcmToken ?? "000")")
    // Do something with the token
}

func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
    print("Received push notification: \(userInfo)")

    // Handle the push notification here

    completionHandler(UIBackgroundFetchResult.newData)
}

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {

    // Set APNS device token in FCM instance
    Messaging.messaging().setAPNSToken(deviceToken, type: .prod)

    // Retrieve FCM token
    Messaging.messaging().token { token, error in
        if let error = error {
            print("Error retrieving FCM token: \(error.localizedDescription)")
        } else if let token = token {
            print("FCM token: \(token)")
        }
    }
}

}
how i get my token on my ViewController:
func getToken(id: String, type: String) {
// Declare observer as an UnsafeMutablePointer
var observer: UnsafeMutablePointer<NSObjectProtocol?>?
observer = UnsafeMutablePointer<NSObjectProtocol?>.allocate(capacity: 1)
// Set up observer to wait for FCM token refresh
observer?.pointee = NotificationCenter.default.addObserver(forName: Notification.Name.MessagingRegistrationTokenRefreshed, object: nil, queue: .main) { [weak self] notification in
guard let self = self else { return }
guard let token = Messaging.messaging().fcmToken else {
print("Error fetching FCM registration token: No token found in notification")
return
}
print("FCM registration token: (token)")
self.firebaseToken = token
self.setToken(id: id, type: type, token: token)
// Remove observer
if let observer = observer {
NotificationCenter.default.removeObserver(observer.pointee!)
observer.deallocate()
}
}
    // Retrieve FCM token
    if let token = Messaging.messaging().fcmToken {
        // FCM token may be immediately available
        print("FCM registration token: \(token)")
        self.firebaseToken = token
        self.setToken(id: id, type: type, token: token)
        // Remove observer
        if let observer = observer {
            NotificationCenter.default.removeObserver(observer.pointee!)
            observer.deallocate()
        }
    }
}

here is my send notification :

    func sendFCMNotification(toToken token: String, title: String, body: String) {
    let urlString = "https://fcm.googleapis.com/fcm/send"
    guard let url = URL(string: urlString) else { return }

    let notification = ["title": title, "body": body]
    let data: [String: Any] = ["notification": notification, "to": token]

    var request = URLRequest(url: url)
    request.allHTTPHeaderFields = ["Content-Type": "application/json", "Authorization": "key=Firebase server key"]
    request.httpMethod = "POST"
    request.httpBody = try? JSONSerialization.data(withJSONObject: data, options: [])

    let task = URLSession.shared.dataTask(with: request) { data, response, error in
        if let error = error {
            print("Error sending FCM notification: \(error.localizedDescription)")
        } else {
            if let httpResponse = response as? HTTPURLResponse {
                if httpResponse.statusCode == 200 {
                    print("FCM notification sent successfully.")
                } else {
                    print("Error sending FCM notification. HTTP response code: \(httpResponse.statusCode)")
                }
            }
        }
    }
    task.resume()
}

up

Are you able to receive notifications directly through APNs?

i have generating an APNs Token and send a notification with the FireBase but it didn't work


Document build requirements

The tool build_linux.sh is really Arch-specific since it requires these packages (notably, gendesk seems unique to Arch).
Maybe put that in the README somewhere?
python python-pip cairo desktop-file-utils gendesk

A separate issue from the above: the provided run-from-source steps (with python -m venv venv) will not work on Debian.  Debian users need to install these packages first:
python3 python-is-python3 python3-pip libcairo-dev build-essential

Bonus: I started writing a tentative Dockerfile to try to run build_linux.sh on my Debian system (in an Arch container), but it runs into an error at the python -m venv venv step:
FROM archlinux:base
WORKDIR /usr/local/app
COPY . .
RUN pacman -Sy
RUN pacman -S --noconfirm python python-pip cairo desktop-file-utils gendesk
RUN python -m venv venv

Alas, the error was not so informative:
=> ERROR [6/8] RUN python -m venv venv                                    4.9s
------
> [6/8] RUN python -m venv venv:
4.894 Error: Command '['/usr/local/app/venv/bin/python', '-m', 'ensurepip', '--upgrade',
'--default-pip']' returned non-zero exit status 1.
------

I see gendesk exists in the [https://docs.makedeb.org/using-the-mpr/introduction/](makedeb package repo), so we could possibly just use makedeb.

Thanks for pointing this out. The problem is, that I've never delivered and fully tested building linux package. Linux screenshots are made by running app from sources.
I will keep this thread/issue to not forget about it. And will try to make some updates in following days - I was working on some changes in UI, and perhaps I will add also some linux package (I like more arch package system, but debian ofc are more popular) or packages.
I will ping you here if I will push any changes regarding this topic.


log_input_data not working

Hi,
    @classmethod
    def get_md5_sums(cls, dir, md5_sums=None):
        """
        Recursively go through directories and subdirectories
        and generate tuples of (<file_path>, <md5sum>)
        returns: list of tuples
        """
        if not md5_sums:
            md5_sums = []
        elements = glob.glob(dir + "/*")
        for elem in elements:
            # if file, get md5 sum
            if os.path.isfile(elem):
                elem_md5 = cls.md5(elem)
                md5_sums.append((elem, elem_md5))
            # if directory, apply recursion
            if os.path.isdir(elem):
                md5_sums = cls.get_md5_sums(elem, md5_sums)
            else:
                continue

this method does not return anything.
mlflow.log_param("input_hash", input_data + "-" + input_hash) later would also use the list then. However, you cannot append a list and a string.
@Emiller88 how was this supposed to work again?

Hmm, gonna need to rethink this one, maybe some insight from @KevinMenden

Yes it should return the md5_sums list of course 😁
We could also restructure this a bit and use os.walk instead of the recursion, might be easier to read.
I might draft a PR later today when I get around to to do it.


Use "OUTPUT" for the "Compile Active File" task

Could you change the "Compile Active File" task (the button at the top-right of the opened C++ file) to report to the OUTPUT tab rather than to TERMINAL?
The reason is because it is inconvenient to navigate upon the errors and warnings inside the TERMINAL tab. Home and End buttons actually move the cursor to the begin/end of the command at the bottom of the tab rather than scroll the compilation output top/down. And PgUp/PgDown also do not scroll up/down

It sounds like this task comes from the C++ extension, so the feedback should go to them. However, in general, the errors and warnings output by tasks should end up the problems view. If that isn't happening then that's another thing you could report to the C++ extension.

@alexr00 The button added by the C++ extension plugs in to the VS Code Tasks system and all output for tasks goes to the Terminal, right?  I don't think we can change that unless we run the tasks ourselves, but that does not seem like the right approach.
If there is an issue with the problem matchers, then we can take a look at that on the extension side.

@bobbrow all that is correct! I also don't think that running the task yourself is the right approach. I agree improving the problem matching is the way to go.


wg-performance Status Update 2020-09-14

What was accomplished

fixed AMP deployment of worker-dom artifacts (https://github.com/ampproject/amphtml/pull/30141)
prototyped moving compilation of worker-dom to downstream repos. (https://github.com/ampproject/worker-dom/pull/937)
added amp-debug and amp-production binaries to worker-dom. (https://github.com/ampproject/worker-dom/pull/929)
prototyped adding content-visibility css automatically for valid AMP components.

Lessons Learned
What's Next

visual diffs for module build
improve compatibility of worker-dom Element.innerHTML setter.

Finished making SCS changes for SXG build (and by extension SXG build deployment is mostly complete), just waiting for review.


better validation for source URLs

If you put a bad URL into the Sources dialog and click "Update", you can get some interesting/confusing behavior.
E.g. a URL which is a 200 but doesn't send TileJSON --> cryptic parse error.
Or https://a.tiles.mapbox.com/v4/jfire.hj4lo84b.json (v4 API URL without access token) --> JS error, and Mapbox Studio is de-authorized.

@rmarianski and I are hitting this, too, when implementing the newer API_KEY bit of tilejson for Mapzen's MVT format vector tiles in https://github.com/mapzen/vector-datasource/issues/311.
In other words, loading the old (below) works fine:
http://vector.mapzen.com/osm/tilejson/mapbox.json

And loading the new (below) never loads at all in Studio 0.2.7 and Studio Classic 0.3.2 for me.
http://vector.dev.mapzen.com/osm/tilejson/mapbox.json

With the only difference being shown with the post append of ?api_key={api_key}:
http://vector.dev.mapzen.com/osm/all/{z}/{x}/{y}.mvt?api_key={api_key}

Is there a workaround now or should we hold off implementing that until #1077 lands?

@nvkelso @rmarianski
Works for me (kind of):

Looks like a server problem on your side.
What happens, when you open one of the 404 URLs with the browser?
Most of the time I get a timeout message, that also shows in Studio for me:

Requesting a single tile via browser, e.g.
http://vector.dev.mapzen.com/osm/all/12/2234/1420.mvt?api_key=<MY_API_KEY>

results in this:

or takes ~20 to ~30 seconds to deliver the one tile:

ClientConnected:	10:53:35.514
ClientBeginRequest:	10:53:35.741
GotRequestHeaders:	10:53:35.741
ClientDoneRequest:	10:53:35.741
Determine Gateway:	0ms
DNS Lookup: 		59ms
TCP/IP Connect:	61ms
HTTPS Handshake:	0ms
ServerConnected:	10:53:35.862
FiddlerBeginRequest:	10:53:35.862
ServerGotRequest:	10:53:35.863
ServerBeginResponse:	10:53:59.643
GotResponseHeaders:	10:53:59.643
ServerDoneResponse:	10:54:00.055
ClientBeginResponse:	10:54:00.056
ClientDoneResponse:	10:54:00.057

@nvkelso @rmarianski
If you change the request timeout in your local Mapbox Studio Classic here you should see tiles appear.
I set it to 60000 (1 minute) and most of the tiles appear, some still timeout.


Support "debugServer"

"debugServer" is a standard launch.json property that's supposed to be available for all debuggers. However, it is implemented by the default DebugAdapterDescriptorFactory, and the extension's custom factory does not support it. It should do so.
The logic is similar to the one for "attach" directing to the specified host/port. Basically, {"debugServer": <port>} should be equivalent to {"host": <IP_ADDRESS>, "port": <port>}, except that it should also apply to "launch".

Turns out VSCode extensibility docs are misleading on this - it's actually hardcoded to kick in before the adapter factories are even considered. The reason why it wasn't working for me was a misconfigured launch.json.


Add support for docker compose

Docker compose allows us to easily build and start the Django app and database services anywhere with a single command

If no further comments please merge

I don't really like an idea to get rid of top level directory nopayloaddb.

Why? All Django projects I could see contained their manage.py in the root dir.
I just don't see any reason to introduce another level of directories in this very small project at this time unless you like to type 😄
All commands in our scripts would need to include an extra "cd nopayload" or a nopayload/ prefix

Another thing is make migrations and migrate here in composer script. Do you know the way to run those command only at the very first launch?

These commands are useful and they don't drop the existing data. You can confirm this by running docker-compose before and after the API changes. In fact, if you run migrate after the model is changed you would see warnings and suggestions how to handle incompatibilities. I don't see any harm in that.


Parsing error for CycloneDX format from Veracode Agent-based SCA SBOMs

https://github.com/DefectDojo/django-DefectDojo/blob/c101e47b294863877cd68a82d0cc60f8017b45b1/dojo/tools/cyclonedx/parser.py#L28
On defectdojo 2.10.0
  File "/app/./dojo/tools/cyclonedx/parser.py", line 28, in _get_findings_xml
    nscan = ElementTree.parse(file)
  File "/usr/local/lib/python3.8/site-packages/defusedxml/common.py", line 100, in parse
    return _parse(source, parser)
  File "/usr/local/lib/python3.8/xml/etree/ElementTree.py", line 1202, in parse
    tree.parse(source, parser)
  File "/usr/local/lib/python3.8/xml/etree/ElementTree.py", line 601, in parse
    parser.feed(data)
  File "/usr/local/lib/python3.8/xml/etree/ElementTree.py", line 1695, in feed
    self._raiseerror(v)
  File "/usr/local/lib/python3.8/xml/etree/ElementTree.py", line 1602, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 0

nevermind ! the docs were not very clear, apparently the file has to end with .json for the import to work, I named mine .sbom and they are json