CartesianIndex and @turbo loop

LV has been awesome for effortlessly speeding up code! Thanks!
I've recently run into some errors I don't know enough about to fix, reproduced with errors below with version v0.12.96. They're modifications of the image filtering example code. Currently the errors seem a bit too specific to me to address, and was hoping for help, or to report a bug if there's one.
In short my project involves kernels but over sparse, specific points rather than every index of a matrix so only convolving the kernel at specific CartesianIndex's seems elegant. The outerr issue seems to take offence with making the CartesianIndex itself, while the inerr issue is beyond me but may be related; maybe @turbo doesn't like the CartesianIndex being dynamically created? The nominal image filtering example works without problems. In a previous version of LV, I had a block of code similar to the inerr function below working.
using LoopVectorization, OffsetArrays

x = rand(10,10)
kern = Images.Kernel.gaussian((1, 1), (3, 3))

function outerr(x, kern)
    r = size(x,1)
    s = zero(eltype(x))
    @turbo for i=2:r-1
        idx = CartesianIndex(i,i)
        for K in CartesianIndices(kern)
            s += x[idx+K] + kern[K]
        end
    end
    s
end

function inerr(x, kern)
    r = size(x,1)
    s = zero(eltype(x))
    for i=2:r-1
        idx = CartesianIndex(i,i)
        @turbo for K in CartesianIndices(kern)
            s += x[idx+K] + kern[K]
        end
    end
    s
end

julia> outerr(x, kern)
ERROR: ArgumentError: type does not have a definite number of fields
Stacktrace:
 [1] fieldcount(t::Any)
   @ Base ./reflection.jl:764
 [2] _append_fields!(t::Expr, body::Expr, sym::Symbol, #unused#::Type{TypeVar})
   @ LoopVectorization ~/.julia/packages/LoopVectorization/umAIq/src/condense_loopset.jl:12
 [3] _append_fields!(t::Expr, body::Expr, sym::Symbol, #unused#::Type{UnionAll}) (repeats 3 times)
   @ LoopVectorization ~/.julia/packages/LoopVectorization/umAIq/src/condense_loopset.jl:19
 [4] #s166#66
   @ ~/.julia/packages/LoopVectorization/umAIq/src/condense_loopset.jl:34 [inlined]
 [5] var"#s166#66"(T::Any, ::Any, r::Any)
   @ LoopVectorization ./none:0
 [6] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any})
   @ Core ./boot.jl:580
 [7] outerr(x::Matrix{Float64}, kern::OffsetMatrix{Float64, Matrix{Float64}})
   @ Main /tmp/lv.jl:11
 [8] top-level scope
   @ REPL[4]:1

julia> inerr(x, kern)
ERROR: MethodError: no method matching _gesp(::LayoutPointers.StridedPointer{Float64, 2, 1, 0, (1, 2), Tuple{Static.StaticInt{8}, Int64}, Tuple{Static.StaticInt{1}, Static.StaticInt{1}}}, ::Static.StaticInt{1}, ::CartesianIndex{2}, ::Static.StaticInt{1})
Closest candidates are:
  _gesp(::LayoutPointers.FastRange, ::Static.StaticInt{1}, ::Any, ::Static.StaticInt{1}) at ~/.julia/packages/LoopVectorization/umAIq/src/vectorizationbase_compat/subsetview.jl:38
  _gesp(::LayoutPointers.AbstractStridedPointer{T, N, C, B, R, X, O} where {C, B, R, X<:Tuple{Vararg{Integer, N}}, O<:Tuple{Vararg{Integer, N}}}, ::Static.StaticInt{I}, ::Integer, ::Static.StaticInt{D}) where {I, N, T, D} at ~/.julia/packages/LoopVectorization/umAIq/src/vectorizationbase_compat/subsetview.jl:39
Stacktrace:
 [1] inerr(x::Matrix{Float64}, kern::OffsetMatrix{Float64, Matrix{Float64}})
   @ Main /tmp/lv.jl:25
 [2] top-level scope
   @ REPL[5]:

maybe @turbo doesn't like the CartesianIndex being dynamically created?

Yes. @turbo actually doesn't like CartesianIndex at all.
It has special handling for CartesianIndices, where it turns CartesianIndices{N} into N separate loops, thereby avoiding CartesianIndex altogether.
If someone is interested in fixing this, I can provide instructions/guidance.
Otherwise, this will have to wait for the LoopVectorization rewrite, which I'm trying to prioritize at the moment.
Thus, I wouldn't expect it be solved for the next half year+. I'm expecting it to be a while.

Without using CartesianIndices, we can opt for loops instead. I experimented with summing at different levels in the stack of for loops and came across what might be a bug in the ininsum function below. The major differences between the functions are where sums are accumulated, with ininsum accumulating at two different levels which results in a total (outer loop) sum of 0.0 when used with @turbo. The difference in total sums is probably due to fastmath, but can be surprisingly different sometimes.
using LoopVectorization, OffsetArrays, BenchmarkTools

x = rand(100,100)
kern = Images.Kernel.gaussian((1, 1), (3, 3))

function noturbosum(x, kern)
    ks = zero(eltype(x))
    @inbounds for i=2:size(x,1)-1
        for j in axes(kern,1), m in axes(kern,2)
            ks += x[i+j, i+m] * kern[j,m]
        end
    end
    ks
end

function outersum(x, kern)
    ks = zero(eltype(x))
    @turbo for i=2:size(x,1)-1
        for j in axes(kern,1), m in axes(kern,2)
            ks += x[i+j, i+m] * kern[j,m]
        end
    end
    ks
end

function insum(x, kern)
    ks = zero(eltype(x))
    @turbo for i=2:size(x,1)-1
        s1 = zero(eltype(x))
        for j in axes(kern,1), m in axes(kern,2)
            s1 += x[i+j, i+m] * kern[j,m]
        end
        ks += s1
    end
    ks
end

function in2sum(x, kern)
    ks = zero(eltype(x))
    @turbo for i=2:size(x,1)-1
        for j in axes(kern,1)
            s0 = zero(eltype(x))
            for m in axes(kern,2)
                s0 += x[i+j, i+m] * kern[j,m]
            end
            ks += s0
        end
    end
    ks
end

function ininsum(x, kern)
    ks = zero(eltype(x))
    @turbo for i=2:size(x,1)-1
        s1 = zero(eltype(x))
        for j in axes(kern,1)
            s0 = zero(eltype(x))
            for m in axes(kern,2)
                s0 += x[i+j, i+m] * kern[j,m]
            end
            s1 += s0
        end
        ks += s1
    end
    ks
end

println("outer ", noturbosum(x, kern))
println("outer ", outersum(x, kern))
println("in    ", insum(x, kern))
println("in2   ", in2sum(x, kern))
println("inin  ", ininsum(x, kern))

display(@btime outersum($x, $kern))
display(@btime insum($x, $kern))
display(@btime in2sum($x, $kern))
display(@btime ininsum($x, $kern))

noturbo 49.06428455119616
outer     46.612923559459894
in          46.447873809237635
in2        46.447873809237635
inin         0.0
  3.379 μs (0 allocations: 0 bytes)
46.612923559459894
  302.369 ns (0 allocations: 0 bytes)
46.447873809237635
  168.696 ns (0 allocations: 0 bytes)
46.447873809237635
  23.303 ns (0 allocations: 0 bytes)
0.0

I probably can't dedicate time to fixing CartesianIndices but would love instructions/guidance on doing SIMD with dual numbers (I noticed the https://github.com/JuliaSIMD/SIMDDualNumbers.jl package and was trying to grok it). For the functions I'm writing, I've found that manually using Dual numbers from FowardDiff.jl rather than going through their gradient/derivative functions interface is much more performant, but I'm not sure how to use them with SIMD/LV, etc., and would love guidance!

The difference in total sums is probably due to fastmath, but can be surprisingly different sometimes.

Differences that big are definitely bugs.
The bug in the first three was straightforward to fix, so I did.
inin is trickier, so I'll also leave that to the rewrite.
Adding @fastmath to noturbosum, I get:
julia> display(@btime noturbosum_nofm($x, $kern)) # no `@fastmath`, no `@turbo`
  965.667 ns (0 allocations: 0 bytes)
225.36596301915785

julia> display(@btime noturbosum($x, $kern)) # @fastmath, no @turbo
  991.838 ns (0 allocations: 0 bytes)
225.36596301915785

julia> display(@btime outersum($x, $kern))
  224.695 ns (0 allocations: 0 bytes)
225.365963019158

julia> display(@btime insum($x, $kern))
  378.662 ns (0 allocations: 0 bytes)
225.36596301915802

julia> display(@btime in2sum($x, $kern))
  273.545 ns (0 allocations: 0 bytes)
225.36596301915804

julia> display(@btime ininsum($x, $kern))
  125.409 ns (6 allocations: 304 bytes)
0.0

For the functions I'm writing, I've found that manually using Dual numbers from FowardDiff.jl rather than going through their gradient/derivative functions interface is much more performant, but I'm not sure how to use them with SIMD/LV, etc., and would love guidance!

You should be able to solve multiple ForwardDiff.gradients in parallel. You can see some examples here:
https://discourse.julialang.org/t/making-a-fast-evaluation-of-a-function-and-its-gradient/68884
Something I'd like to get around to eventually is supporting using VectorizationBase.Vecs for dual number partials to make sure they SIMD.

sorry to revive this, is it possible to give a hint what is causing the first error message?
ERROR: ArgumentError: type does not have a definite number of fields
Stacktrace: [etc]

I have a function with a single for loop which I want to call in a nested way:
@inline function integrate_avx(args)
    @turbo for i in 1:length(x)
        # stuff
        s += w[i] * (f(xm) + f(xp)) # a reduction
    end
    return s
end

then I want to write my 2D function based on the 1D, namely:
function integrate_avx(f::Function, xmin::SVector{2,T}, xmax::SVector{2,T},
                       x::AbstractVector{T}, w::AbstractVector{T}, h::T) where {T<:Real}
    function f1(x1::T) where {T<:Real}
        g1(y::T) where {T} = f(x1, y)
        res = integrate_avx(g1, xmin[2], xmax[2], x, w, h)
        return res
    end
    g2(x1::T) where {T} = f1(x1)
    res = integrate_avx(g2, xmin[1], xmax[1], x, w, h)
    return res
end

This gives me
ERROR: ArgumentError: type does not have a definite number of fields
Stacktrace:
  [1] fieldcount(t::Any)
    @ Base ./reflection.jl:895
  [2] _append_fields!(t::Expr, body::Expr, sym::Symbol, ::Type{Core.Box})
    @ LoopVectorization ~/.julia/packages/LoopVectorization/7gWfp/src/condense_loopset.jl:12
  [3] _append_fields!(t::Expr, body::Expr, sym::Symbol, ::Type{ScalarWave.TanhSinhQuadrature.var"#f1#104"{var"#77#78", SVector{2, Float64}, SVector{2, Float64}, Vector{Float64}, Vector{Float64}, Float64}})
    @ LoopVectorization ~/.julia/packages/LoopVectorization/7gWfp/src/condense_loopset.jl:19
  [4] _append_fields!(t::Expr, body::Expr, sym::Symbol, ::Type{ScalarWave.TanhSinhQuadrature.var"#g2#106"{ScalarWave.TanhSinhQuadrature.var"#f1#104"{var"#77#78", SVector{…}, SVector{…}, Vector{…}, Vector{…}, Float64}}})
    @ LoopVectorization ~/.julia/packages/LoopVectorization/7gWfp/src/condense_loopset.jl:19
  [5] _append_fields!(t::Expr, body::Expr, sym::Symbol, ::Type{Tuple{LayoutPointers.GroupedStridedPointers{…}, Float64, Float64, ScalarWave.TanhSinhQuadrature.var"#g2#106"{…}, ScalarWave.TanhSinhQuadrature.var"#g2#106"{…}, DataType}})
    @ LoopVectorization ~/.julia/packages/LoopVectorization/7gWfp/src/condense_loopset.jl:19
  [6] _append_fields!(t::Expr, body::Expr, sym::Symbol, ::Type{Tuple{Tuple{…}, Tuple{…}}})
     Use `show(err)` to see complete types.

ERROR: ArgumentError: type does not have a definite number of fields
Stacktrace:
  [1] fieldcount(t::Any)
    @ Base ./reflection.jl:895
  [2] _append_fields!(t::Expr, body::Expr, sym::Symbol, ::Type{Core.Box})

You have a Core.Box in your closure. Get rid of it.

thanks for your answer!
Indeed writing the closure a bit differently eliminates the above error.
But the "outer" call again is not suitable for simd ?
@inline function integrate(f::S, xmin::SVector{2,T}, xmax::SVector{2,T},
    x::AbstractVector{T}, w::AbstractVector{T}, h::T) where {T<:Real,S}
    @inline function f2(x1::T) where {T<:Real}
        return integrate_avx(y -> f(x1, y), xmin[2], xmax[2], x, w, h)
    end
    return integrate_avx(x1 -> f2(x1), xmin[1], xmax[1], x, w, h) # <- this doesn't pass the check_args
end

┌ Warning: #= /home/svretina/Codes/PhD/FastTanhSinhQuadrature.jl/src/FastTanhSinhQuadrature.jl:158 =#:
│ `LoopVectorization.check_args` on your inputs failed; running fallback `@inbounds @fastmath` loop instead.
│ Use `warn_check_args=false`, e.g. `@turbo warn_check_args=false ...`, to disable this warning.
└ @ FastTanhSinhQuadrature ~/.julia/packages/LoopVectorization/7gWfp/src/condense_loopset.jl:1148

As one aside
function integrate_avx(f::Function, xmin::SVector{2,T}, xmax::SVector{2,T},
                       x::AbstractVector{T}, w::AbstractVector{T}, h::T) where {T<:Real}
    function f1(x1::T) where {T<:Real}
        g1(y::T) where {T} = f(x1, y)
        res = integrate_avx(g1, xmin[2], xmax[2], x, w, h)
        return res
    end
    g2(x1::T) where {T} = f1(x1)
    res = integrate_avx(g2, xmin[1], xmax[1], x, w, h)
    return res
end

looks like it is going to be putting res in a Core.Box.
I would simplify to
function integrate_avx(f::Function, xmin::SVector{2,T}, xmax::SVector{2,T},
                       x::AbstractVector{T}, w::AbstractVector{T}, h::T) where {T<:Real}
    function f1(x1::T) where {T<:Real}
        g1(y::T) where {T} = f(x1, y)
        return integrate_avx(g1, xmin[2], xmax[2], x, w, h)
    end
    g2(x1::T) where {T} = f1(x1)
    return integrate_avx(g2, xmin[1], xmax[1], x, w, h)
end

to avoid that.
What are the types? Do you have a reproducer I can copy/paste?
You could try deving the package to modify the check functions to print the types when returning false, so you know what the particular problematic example was.
https://github.com/JuliaSIMD/LoopVectorization.jl/blob/3fbe248d3d7c2d4fc7c55dd85890b8cfec83be1d/src/condense_loopset.jl#L933-L977

The code is from here, but here is a MWE:
using StaticArrays
using LoopVectorization

@inline function ordinate(t::T) where {T<:Real}
    return @fastmath tanh(T(π) / 2 * sinh(t))
end
@inline function weight(t::T) where {T<:Real}
    @fastmath tmp = cosh(T(π) / 2 * sinh(t))
    return @fastmath ((T(π) / 2) * cosh(t)) / (tmp * tmp)
end

@inline function inv_ordinate(t::T) where {T<:Real}
    return @fastmath asinh(log((one(T) + t) / (one(T) - t)) / T(π))
end

function tanhsinh(::Type{T}, n::Int) where {T<:AbstractFloat}
    tmax = inv_ordinate(prevfloat(one(T)))
    h = tmax / n
    t = h:h:tmax
    x = ordinate.(t)
    w = weight.(t)
    N = length(x)
    if n < 100
        return SVector{N,T}(x), SVector{N,T}(w), h
    else
        return x, w, h
    end
end

# no simd
@inline function integrate(f::S, xmin::T, xmax::T, x::AbstractVector{T},
    w::AbstractVector{T}, h::T) where {T<:Real,S}
    @fastmath @inbounds begin
        Δx = (xmax - xmin) / 2
        x₀ = (xmax + xmin) / 2
        s = weight(zero(T)) * f(x₀)
        for i in 1:length(x)
            xp = x₀ + Δx * x[i]
            xm = x₀ - Δx * x[i]
            if xm > xmin
                s += w[i] * f(xm)
            end
            if xp < xmax
                s += w[i] * f(xp)
            end
        end
    end
    return Δx * h * s
end

# function using loopvectorization
@inline function integrate_avx(f::S, xmin::T, xmax::T, x::AbstractVector{T}, w::AbstractVector{T}, h::T) where {T<:Real,S}
    @fastmath Δx = (xmax - xmin) / 2
    @fastmath x₀ = (xmax + xmin) / 2
    @fastmath s = weight(zero(T)) * f(x₀)
    @turbo for i in 1:length(x)
        Δxxi = Δx * x[i]
        xp = x₀ + Δxxi
        xm = x₀ - Δxxi
        s += w[i] * (f(xm) + f(xp))
    end
    return @fastmath Δx * h * s
end

## 2D
# here I only use the avx version for the inner call
# if you call integrate_avx in the outter call ( in the return statement )
# the warning occurs
@inline function integrate(f::S, xmin::SVector{2,T}, xmax::SVector{2,T},
    x::AbstractVector{T}, w::AbstractVector{T}, h::T) where {T<:Real,S}
    @inline function f2(x1::T) where {T<:Real}
        return @inbounds integrate_avx(y -> f(x1, y), xmin[2], xmax[2], x, w, h)
    end
    return @inbounds integrate(x1 -> f2(x1), xmin[1], xmax[1], x, w, h)
end

x,w,h = tanhsinh(Float64, 40)
f(x,y) = x*y
lower = SVector{2,Float64}(0.0,0.0)
upper = SVector{2, Float64}(1.0,1.0)
integrate(f, lower, upper, x,w,h) # 0.2499999999999992

It works for me. I don't get the warning, and I see @turbo is getting used.

did you change the second call to
## 2D
# here I only use the avx version for the inner call
# if you call integrate_avx in the outter call ( in the return statement )
# the warning occurs
@inline function integrate(f::S, xmin::SVector{2,T}, xmax::SVector{2,T},
    x::AbstractVector{T}, w::AbstractVector{T}, h::T) where {T<:Real,S}
    @inline function f2(x1::T) where {T<:Real}
        return @inbounds integrate_avx(y -> f(x1, y), xmin[2], xmax[2], x, w, h)
    end
    return @inbounds integrate_avx(x1 -> f2(x1), xmin[1], xmax[1], x, w, h)
end

No, doing that, and I do see the warning.
You can't nest @turbos. Only one layer can SIMD.
You could write out loops manually and place an @turbo on the outermost loop, and it'll decide what to do with all the loops.

thanks a lot for the help!


ID explain other case net uses:
User feedback: something
(docket_review_conclusion)

Question ID
explain other case net uses

Details
On previous page I put in a past date for the date of the hearing in an effort to represent a situation where the tenant had a default judgment entered against them. Might be helpful to elaborate on this more and advise tenant to contact court to confirm whether a default judgment was entered. If so, perhaps it can generate a motion to set aside or direct the tenant to the blank motion to set aside.

Variable being sought
docket_review_conclusion

Package version
1.0

Maturity target
Level 2 - this needs to be fixed to meet expectations of a basic intake

Filename
docassemble.MOHUDEvictionProject:data/questions/MOHUDEvictionProject.yml

Closed as duplicate, comment added to other issue


Fix sever comparison for single digit

This fixes #1598 by making a comparison between 'x' and 'x.1', behave like 'x' is 'x.0' thus sorting it after 'x.1'

looks good, thanks!


Database migrations

Hi All,
Hopefully this is the right place to ask this question, please let me know if there is a better place to ask it.
I am trying to setup the database prior to deploying for AdminUI + API via docker (likely). I have a separate  IdentityServer.
I want to create a separate console app or assembly (and use dotnet ef) to create the database and do migrations.
In the mean time, I am trying to do it through my website for now:
serviceScope.ServiceProvider.GetRequiredService<IdentityServer4.EntityFramework.DbContexts.PersistedGrantDbContext>().Database.Migrate();
serviceScope.ServiceProvider.GetRequiredService<IdentityServer4.EntityFramework.DbContexts.ConfigurationDbContext>().Database.Migrate();
serviceScope.ServiceProvider.GetRequiredService<IdentityExpress.Identity.IdentityExpressDbContext>().Database.Migrate();

But it doesn't create three of the tables that are used by AdminUI:
ExtendedClients
ExtendedIdentityResources
ExtendedApiResources

How do I create those?
Thanks,
Ryan

Hi Ryan, these tables are automatically created by AdminUI on first run of the API half of the project. We do not support a way for you to manually run these migrations.
For support queries such as these, please email them directly to<EMAIL_ADDRESS>


Create an issue

If you have any idea and suggestion, feel free to create an issue

I have made some changes to the current code that translates the project being according to the industry standard. I would like you to consider merging the changes to the main branch.

@adity2911 Please create PR for it with the issue

kindly go through the PR and merge it

I request you to assign me this under the label GSSoC'23.


Removing the re-size for validation data, which breaking the validation accuracy of CIFAR training

Description
The dataloader for example/image-classification resizes the imagesize of validation dataset to 256 by default, and which breaks the validation accuracy of CIFAR10, this PR trying to fix it.
Below firgure is the validation accuracy trends without this fix (model is ResNet-50).

Checklist
Changes
example/image-classification/common/data.py
Comments

If this change is a backward incompatible change, why must this change be made.
Interesting edge cases to note here

@szha may I have your comments, I use this example for the regression tracking of mxnet with mkldnn backend, I'll be helpful if this issue can be addressed.
Thanks.

Does it affect the imagenet validation perf?

@zhreshold Thanks for the feedback, I use the pre-trained ResNet-50 model and validation-set of ImageNet-1k, and the accuracy with/w.o my changes are same: see test result:
Without my changes:
INFO:root:Finished with 126.286497 images per second
INFO:root:('accuracy', 0.753156969309463)
INFO:root:('top_k_accuracy_5', 0.9257512787723785)
With my changes:
INFO:root:Finished with 126.029153 images per second
INFO:root:('accuracy', 0.753156969309463)
INFO:root:('top_k_accuracy_5', 0.9257512787723785)
The imagenet validation perf and accuracy are same.
But without my changes, the validation accuracy trends of CIFAR10+ResNet50/VGG16 are as below, obviously it is not expected.

Seems this regression also goes into 1.3.0rc0 realese.

@zhreshold sorry for pushing, may I have you comments or approval?
Thanks.

@juliusshufan Thanks for the result, it's fair enough to go through. Again, thanks for the contribution!


build: add error_details definitions

DO NOT LAND YET
Add js & type definitions generated from error_details.proto.
Fixes: https://github.com/GoogleCloudPlatform/cloud-profiler-nodejs/issues/77

This doesn't fix #77 alone, right? I expect we should also start using it. Or am I commenting against unfinished work? Apologies if so.

Well, since #75 hasn't landed yet, we could either consider this to 'fix' #77, and adjust #75, or wait for #75 to land and address the issue here.
I would be okay with either.

Ah, OK. I'm fine with either too.

I would like to close this PR at this point. It would be fairly easy to get back the definitions, and the issue #77 remains open to track the work needed.
If this is a mistake, go ahead and reopen.


Cannot pipe after gulp-jade

I have a simple testing folder:
./
  a.js
  gulpfile.js
  test.jade

a.js
console.log('Hello!');

gulpfile.js
var gulp = require('gulp');
var jade = require('gulp-jade');
var inlineSouce = require('gulp-inline-source');

gulp.task('default', function() {
  return gulp.src('*.jade')
    .pipe(jade())
    .pipe(inlineSouce())
    .pipe(gulp.dest('.'));
});

test.jade
doctype html
html
  head
    script(scr="a.js", inline)

However after running gulp, the output test.html doesn't include a.js inline as expected:
<!DOCTYPE html>

I can confirm this happening. The paths to inlined sources are messed up after the jade pipe. I wasn't able to fix it with rootpath option.

+1

I will take a look this weekend.

Any progress on this issue?

+1

Hi rhere I know this is a old post, hope someone can chip in or has resolved this?
I am having a similar problem with .nunjucks files using gulp-nunjucks-render
gulpfile.js

pipe(nunjucksRender({
    path: njkPaths,
    ext: "",
    data: ENV_VARS,
    envOptions: {
         trimBlocks: true,
         lstripBlocks: true
    }
}))
 .pipe(inlineSource({
    compress: false,
    saveRemote: true,
    handlers: [require("./nunjucksHandler.js")]
 }))

nunjucksHandler.js ?

const Nunjucks = require('nunjucks');

module.exports = function nunjucks(source, context) {
    return new Promise((resolve, reject) => {
        if (
            source.fileContent &&
            !source.content &&
            source.type == "text/css"
        ) {
            let content;
            try {
                content = Nunjucks.precompile(source.fileContent);
            } catch (err) {
                return reject(err);
            }
            // Need to expose templates for later use somehow...
            source.content = content
        }

        resolve();
    });
};

I was trying the precompile approach https://github.com/popeindustries/inline-source/issues/70#issuecomment-384548345 but got nowhere.
Thanks


feat: pull secrets from vault

The type of this PR is: Feat
This PR supports PHIRE-813
This PR is a re-attempt of https://github.com/artsy/force/pull/13827
Description
Let pods load key/value pairs from Hashicorp Vault. We will migrate secret configs from ConfigMap to Vault.

Should this wait for artsy/hokusai#412 and v2.2.0's release, or can it be merged?

Can be merged because Force is on Hokusai beta which has the Review App fix.


circular-buffer: Test overwrite on non-full buffer

Following suit with other language tracks:
Ruby:
https://github.com/exercism/xruby/commit/5560b7a0e032bdf4bca753d4aba4625340853d1c
Go:
https://github.com/exercism/xgo/commit/6b41d2f925a7b35140701a8290e7d9a6155ac315
Rust:
https://github.com/exercism/xrust/commit/e4990f1b0e8c9d16053012b13aaaeb03ac141383
Javscript:
https://github.com/exercism/xjavascript/commit/301dd0069e5cd60f336c6a622fac1ea9f3fd1357

Thank you


[SPARK-33234][INFRA] Generates SHA-512 using shasum

What changes were proposed in this pull request?
I am generating the SHA-512 using the standard shasum which also has a better output compared to GPG.
Why are the changes needed?
Which makes the hash much easier to verify for users that don't have GPG.
Because an user having GPG can check the keys but an user without GPG will have a hard time validating the SHA-512 based on the 'pretty printed' format.
Apache Spark is the only project where I've seen this format. Most other Apache projects have a one-line hash file.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
This patch assumes the build system has shasum (it should, but I can't test this).

Can one of the admins verify this patch?

Can one of the admins verify this patch?

What is your JIRA id, @emilianbold ?

Not sure what you mean, my Apache JIRA ID or what JIRA ID? Also, I wonder,
what for?
--emi
On Mon, Oct 26, 2020 at 2:08 AM Dongjoon Hyun<EMAIL_ADDRESS>wrote:

What is your JIRA id, @emilianbold https://github.com/emilianbold ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/spark/pull/30123#issuecomment-716236333, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAHSCQVACKKPQM7HWJ4KHMLSMS4WHANCNFSM4S2NIYFA
.

@emilianbold, Apache JIRA ID because the ticket (SPARK-33234) has to be assigned properly to you.

Your Apache JIRA ID, @emilianbold . As a recognition of your contribution, I want to assign SPARK-33234 to you as @HyukjinKwon explained.

Apparently my JIRA ID is emi
Regards,
--emi
On Mon, Oct 26, 2020 at 5:25 AM Dongjoon Hyun<EMAIL_ADDRESS>wrote:

Your Apache JIRA ID, @emilianbold https://github.com/emilianbold . As a
recognition of your contribution, I want to assign SPARK-33234
https://issues.apache.org/jira/browse/SPARK-33234 to you as @HyukjinKwon
https://github.com/HyukjinKwon explained.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/spark/pull/30123#issuecomment-716281394, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAHSCQVBFAD3INNICBAFWLTSMTT3JANCNFSM4S2NIYFA
.

?

Hm, this is what JIRA says:
Here are the details of your account:
        Username: emi
           Email<EMAIL_ADDRESS>       Full Name: Emilian Bold

--emi
On Mon, Oct 26, 2020 at 9:53 AM Dongjoon Hyun<EMAIL_ADDRESS>wrote:

?
[image: Screen Shot 2020-10-26 at 12 51 52 AM]
https://user-images.githubusercontent.com/9700541/97146674-78a15580-1725-11eb-8f1f-15d6e65cdd24.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/spark/pull/30123#issuecomment-716376432, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAHSCQSL2WXQT4GLAZ7QYCTSMUTHLANCNFSM4S2NIYFA
.

Finally, I assigned SPARK-33234 to you. Thank you!


-seq -timeout 15m still hitting timeout

go2hx's action runner is still hitting timeout when calling go2hxdoc:
./go2hxdoc -dir `npx haxelib libpath go2hx`stdgo -prefix npx -interp -jvm -hl -stats -force -seq -timeout 15m

What has perplexed me about this situation is that the -interp hxml is much simpler than the doc-generation hxml, yet the doc-generation hxml is running and producing xml output that is being further processed.
The working doc-generation hxml is being run  by invoking haxe without any -prefix:
https://github.com/go2hx/go2hxdoc/blob/27f9313b9df824954651647f5b9b9e38fbf5103b/go2hxdoc.go#L81
While the failing tests are being run with the -prefix npx flag (a " " is added to the end of CmdPrefix, if present, before this code executes):
https://github.com/go2hx/go2hxdoc/blob/27f9313b9df824954651647f5b9b9e38fbf5103b/haxedoc/haxedoc.go#L300
@PXshadow - please could we try it again without the -prefix npx flag?
I would expect the -interp tests to run, although the -hl and -jvm tests may fail, since their file paths may need to be corrected using filepath.Abs() as per: https://github.com/go2hx/go2hxdoc/commit/56a38b1eada0b3ca28ce7e4465b6663b1d6b616e

What has perplexed me about this situation is that the -interp hxml is much simpler than the doc-generation hxml, yet the doc-generation hxml is running and producing xml output that is being further processed.
The working doc-generation hxml is being run by invoking haxe without any -prefix:
https://github.com/go2hx/go2hxdoc/blob/27f9313b9df824954651647f5b9b9e38fbf5103b/go2hxdoc.go#L81
While the failing tests are being run with the -prefix npx flag (a " " is added to the end of CmdPrefix, if present, before this code executes):
https://github.com/go2hx/go2hxdoc/blob/27f9313b9df824954651647f5b9b9e38fbf5103b/haxedoc/haxedoc.go#L300
@PXshadow - please could we try it again without the -prefix npx flag?
I would expect the -interp tests to run, although the -hl and -jvm tests may fail, since their file paths may need to be corrected using filepath.Abs() as per: 56a38b1

It's running now without the -prefix npx The issue I think is still occurring @elliott5  feel free to look at the runner, it's now passing all of the current tests.

No issue anymore with the runner.


Test command center

Refs: https://github.com/microsoft/vscode/issues/149445

[ ] win @hediet
[ ] macos @misolori
[ ] linux @TylerLeonhardt

Complexity: 3
Create Issue

We have added a quick pick launcher that can be shown in the title bar, aka "Command Center". Please test that

window.experimental.commandCenter enables/disables the command center
the documentation for the setting points out what's required for the CC to show
enabling the CC replaces the "textual window title" with fwd, bwd-buttons and an input-like button
the input-like button triggers quick pick
its text shows the current workspace name
its tooltip shows the full workspace title (as shown when disabling the command center, e.g current file and workspace)
its dropdown opens quick pick in "help mode"
the CC is centred unless space is tight (enable classic custom menu on win, linux, web)
quick pick shows above the title bar when CC is enabled and below when disabled

Maybe add a placeholder when no folder is open

Yeah I reported that as https://github.com/microsoft/vscode/issues/150786


repeated warning during test

Hello,
While testing the model and running z_tes.sh, I got this repeated error messages:
guided_summarization/bart/fairseq/sequence_generator.py:1146: UserWarning: An output with one or more elements was resized since it had shape [7], which does not match the required output shape [9].This behavior is deprecated, and in a future PyTorch release outputs will not be resized unless they have zero elements. You can explicitly reuse an out tensor t by resizing it, inplace, to zero elements with t.resize_(0). (Triggered internally at  /pytorch/aten/src/ATen/native/Resize.cpp:19.)
out=eos_bbsz_idx,
guided_summarization/bart/fairseq/sequence_generator.py:1154: UserWarning: An output with one or more elements was resized since it had shape [7], which does not match the required output shape [9].This behavior is deprecated, and in a future PyTorch release outputs will not be resized unless they have zero elements. You can explicitly reuse an out tensor t by resizing it, inplace, to zero elements with t.resize_(0). (Triggered internally at  /pytorch/aten/src/ATen/native/Resize.cpp:19.)
out=eos_scores,
Does this warning affect the result of output? Also, I am wondering if there will be any clue of this to resolve this warning.
Thanks.

Yes, I encountered the same problem, but I don't know how to eliminate these warnings.


One step streaming

@paRodesch Can you check that this change reduces memory consumption but does not affect the result? The result should be numerically identical.

I tested the last version on the example here :
https://www.creatis.insa-lyon.fr/~rodesch/OS_exemple/
But I observe a numerical difference between case with/without streaming


Fix Juneteenth name bug

Fixes https://github.com/dr-prodigy/python-holidays/issues/594
Before:
>>> us_holidays=holidays.UnitedStates()
>>> us_holidays.get('June 20, 2022')
'Confederate Memorial Day (Observed)'

After:
>>> us_holidays=holidays.UnitedStates()
>>> us_holidays.get('June 20, 2022')
'Juneteenth National Independence Day (Observed)'

Merged in beta.. Thank you very much!
Cheers
dr-p

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

2 of 2 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.0005%) to 97.945%

Totals

Change from base Build<PHONE_NUMBER>:
0.0005%

Covered Lines:
5782

Relevant Lines:
5847

💛  - Coveralls


images won't load

Hello, thank you for the nice tool.
I`m facing a little issue, while I am generating pdf from URL images won't load.
Its my configuration:
image: gotenberg/gotenberg:7
command:
- "gotenberg"
- "--chromium-allow-insecure-localhost=true"
- "--chromium-ignore-certificate-errors=true"
- "--chromium-disable-web-security=true"
- "--chromium-allow-file-access-from-files=true"
- "--api-timeout=60s"
- "--chromium-disable-javascript=false"
- "--log-level=debug"
I searched a lot but I could not find any possible solution. Do I misconfigure something?
Thank you.

Hello @NamioL,
It may be related to the network configuration of your infrastructure. Where are the images hosted?

Sorry for disturbing, issue was on my side, Gotenberg works perfect ( thank you for that ).

Thank you for your answer.


Image Plugin - Image size in List view is incorrect

Description
The size of images appears to be 1000 time larger than they really are.
In the capture below, the image is described as 2560MB when in reality, if I open the specific entity and download the file it is only 2.6MB.

Example entity: BBP Only

https://bbpgitlab.epfl.ch/nise/fusion/studio-plugins/-/merge_requests/12

The MR is incorrect.


Problem counter doesn't update and problems not uploaded to github

I installed LeetHub on my chrome today. linked my github, but when I started solving questions from leetcode it doesn't update anything.

Probably using new version of Leetcode?
I found out that this PR is about to be merged.

Clone repo
Authorize with Github
Switch to the PR (gh pr checkout 576)
remove node_modules
remove npm.lock
npm run setup
upload again to the extensions.
link with existing repo

Should work.


Try to use GHC for preprocessing

Given a cabal package we want all it's exposed and internal modules as actual Haskell source files. All preprocessors (happy, alex, cpp, c2hs, ...) should be run. We want all modules of all dependencies as well. We could tell GHC to stop after preproceccing with the -E flag. We then have to trick cabal into copying these files upon installation.

GHC does not like --print-libdir and -E at the same time but Cabal uses --print-libdir

If we use GHC we also use GHC's package database and ghc-pkg and all that. We have to be careful not to mess with those.

Another attempt could be to keep temporary files by using -tmpdir

In haskell-modules we take the approach of supplying our own GHC to cabal-install. We supply our own script that calls GHC normally and for our preprocessing.

Eventually we want to get rid of the haskell-package and haskell-modules sections in this package.

See https://ghc.haskell.org/trac/ghc/ticket/10869 for a feature request that would make that easier.

Maybe we can adapt ghc-shake.

Another possibly useful tool is cabal-cargs.

https://ghc.haskell.org/trac/ghc/ticket/10869 has been fixed! Thanks!
But we can't convince cabal to keep temporary files.
Stack has --keep-tmp-files but does not yet support GHC 8.8.

Perhaps cabal-helper is useful.


exposing Lazy

Hey @turboMaCk!
I would like to be able to use Lazy.map in order to lift regular list functions (such as take) into LList. Would you mind exposing the Lazy module to users?
My immediate use case is to implement a trunk tree function that prunes all but the first children. I can do that like
trunk : Tree a -> Tree a
trunk (Tree a branches) =
    case LList.head branches of
        Just tree ->
            Tree a <| LList.singleton <| trunk tree

        Nothing ->
            Tree a LList.empty

But with Lazy.map I would be able to
trunk : Tree a -> Tree a
trunk (Tree a branches) =
    Tree a <| Lazy.map (List.map trunk << List.take 1) branches

which would not only be terser, but actually keep laziness too.
If exposing the entirety of Lazy seems like an overkill, an alternative I see is exposing a function like LList.liftLazy or some such, which would be just Lazy.map for LLists.
Also, I saw lazy fold functions in LList, but they are not exposed. They would solve my problem, but exposing a more general interface would obviate the need for exposing such lazy-lifted list functions one by one.

I think we can expose Lazy module. It seems elm/lazy won't be making come back. It will require some updates in documentation of the module since it uses some syntax that is no longer valid in elm. Do you want to open the PR for this?

I can come around to do it in the following days!


But this ticket specifically refers to loading states of components, so for example, if it takes 0.5 seconds on load before content loads in to market cards, we'll have a loading state of the card, basically a blank card, you've prob seen this pattern on twitter/facebook.


Fix data race in BucketedBytes pool

[x] I added CHANGELOG entry for this change.
[x] Change is not relevant to the end user.

Changes
Previous test didn't detect the data race: we copied the bytes header to the bytes.Buffer so when appending to the slice we were not modifying the original one.
However, the usage of this in bucketChunkReader.save() actually modifies the referenced slice, so the test was modified to test that it can be done safely.
The race condition happened because we were reading the referenced slice capacity after putting it back to the pool, when someone else might already retrieved and modified it.
Verification
The test was updated to match the real-life usage of the pool.
Before modifying the implementation, this was the data race reported by the updated test:
==================
WARNING: DATA RACE
Read at 0x00c0000bc900 by goroutine 36:
  github.com/thanos-io/thanos/pkg/pool.(*BucketedBytes).Put()
      /Users/oleg/w/github.com/thanos-io/thanos/pkg/pool/pool.go:124 +0x1f9
  github.com/thanos-io/thanos/pkg/pool.TestRacePutGet.func1()
      /Users/oleg/w/github.com/thanos-io/thanos/pkg/pool/pool_test.go:108 +0xfa
  github.com/thanos-io/thanos/pkg/pool.TestRacePutGet·dwrap·3()
      /Users/oleg/w/github.com/thanos-io/thanos/pkg/pool/pool_test.go:119 +0x65

Previous write at 0x00c0000bc900 by goroutine 27:
  github.com/thanos-io/thanos/pkg/pool.TestRacePutGet.func1()
      /Users/oleg/w/github.com/thanos-io/thanos/pkg/pool/pool_test.go:94 +0x1fa
  github.com/thanos-io/thanos/pkg/pool.TestRacePutGet·dwrap·3()
      /Users/oleg/w/github.com/thanos-io/thanos/pkg/pool/pool_test.go:119 +0x65

Goroutine 36 (running) created at:
  github.com/thanos-io/thanos/pkg/pool.TestRacePutGet()
      /Users/oleg/w/github.com/thanos-io/thanos/pkg/pool/pool_test.go:119 +0x257
  testing.tRunner()
      /usr/local/Cellar/go/1.17/libexec/src/testing/testing.go:1259 +0x22f
  testing.(*T).Run·dwrap·21()
  1 Fix data race in BucketedBytes pool
      /usr/local/Cellar/go/1.17/libexec/src/testing/testing.go:1306 +0x47

Goroutine 27 (running) created at:
  github.com/thanos-io/thanos/pkg/pool.TestRacePutGet()
      /Users/oleg/w/github.com/thanos-io/thanos/pkg/pool/pool_test.go:119 +0x257
  testing.tRunner()
      /usr/local/Cellar/go/1.17/libexec/src/testing/testing.go:1259 +0x22f
  testing.(*T).Run·dwrap·21()
      /usr/local/Cellar/go/1.17/libexec/src/testing/testing.go:1306 +0x47
==================

Marking this change as not relevant for the end user because the data race is really minor and can't cause data corruption.


Not a bug. I need help understanding how to delete one object from Firestore in Firebase.

Describe the bug
I have this line of code
var task: FirestoreTask = collection.update(auth.localid, data)
with data being a dictionary with data for multiple objects. My issue is that when i delete one of the objects and click save, it doesn't erase the object from the database. Instead if i logout of my program and log back it the erased object is back. My best guess is that update is seeing it's missing from the dictionary i'm saving and the database then merging them so that what i removed is still there.
I've looked into the wiki page trying to find something that might work but every route i look trying to figure it out is out of date from what i see.
Tried
var del_task: FirestoreTask = firestore_collection.delete("DOCUMENT_ID")
var document = await del_task.task_finished
and it did nothing for the database. Never got an error message for it so i guess it worked but it didn't send to the database.
It's not a bug more so as i'm trying to figure out how to delete a single object from the files and i'm not seeing how to do that other then completely erasing the data by saving a empty dictionary, which weirdly enough to me, works without issue. Then saving the data in the application.
To Reproduce
Not a bug, unless update is supposed to remove an object if not present or firetask delete is supposed to go to the database.
Expected behavior
A clear and concise description of what you expected to happen, for example:
Environment:

OS: Windows 11 Home
Browser: Chrome

Hm, that is very weird. I would expect at least delete to work.
According to the Test Harness that we've implemented, which you can find here, for the delete task, you should try awaiting the delete_document signal instead of task_finished. It will return a true false value to you that will say whether or not the document was successfully deleted. I'd also connect to task_error on the task, to see if an error is being thrown. You can see these different signals here: https://github.com/GodotNuts/GodotFirebase/blob/4.x/addons/godot-firebase/firestore/firestore_task.gd#L26

ok. So that corrected the issue with firestore_collection.delete("DOCUMENT_ID"). However i realize now that delete() wasn't what i was looking for. Apologies. I'm trying to delete a single document field from a document. So if you could point me in the direction of where i should look to figure that out I'd be very grateful.

I think for that, it may be the case that you can do one of two things: put the document into memory for your app, delete it from Firestore, remove the field, then upload it with the same name as if it was the same document, or you can look into seeing if _merge_dict has a bug that accidentally merges those values back into the document after coming back. Here's where you'd look for that:
https://github.com/GodotNuts/GodotFirebase/blob/4.x/addons/godot-firebase/firestore/firestore_task.gd#L180
One thing you might also try is when completing your update, instead of awaiting task_finished again, try awaiting update_document. This is after you remove the value from the dictionary and then call update with that as the payload.

Okay, I've looked into this and added a test case for our test harness. Deleting an item is not properly working. I will attempt to fix this today, along with a few other things. I'll leave this open until I've fixed it.

Alright, I have fixed this with the most recent #399 pull request, so I'm closing this for now. The Asset Store may take a minute to be updated, but GitHub itself has the latest.
To remove a field from your document now, just call document.remove_field("field_name"). This only works at the root level for now, but when you do that and call update, it will correctly remove the field from the document.


Add Blog Category

Blog Category
Sub Category
Link to Post from Category Page
Link to Category from Post Page
Refactor as One page structure


RDKTV-21748: Removing OSD name Updated to FA on Feature Abort

Reason for change: OSD name is set as "NA" by default and set to "FA" when Feature Abort command is received. Changing this values to empty string "" Test Procedure: Steps mentioned in ticket
Risks: Low
Signed-off-by: Dhivya Ilangovan<EMAIL_ADDRESS>

Created new PR to avoid multiple commits
https://github.com/rdkcentral/rdkservices/pull/3791


Replace call_user_func

Based on
https://github.com/fab2s/call_user_func
and
https://github.com/symfony/symfony/pull/29309
thanks @fab2s

Thanks


Synthesis time is high on a Jetson TX2 GPU

@keithito I was able to successfully run the model using the latest implementation from this project on a NVIDIA Jetson TX2 HW with GPU support using CUDA. I used the default hparams as specified by the project but found that the synthesis time for any length of text, be it a single word or > 15 words is roughly the same and it is around 6 to 8 secs and I could also see that the GPU is not fully utilized(i.e. mostly the usage is 30 to 40%).
is there a way to improve the synthesis time to be < 2 secs by improving the CPU utilization or do you have any suggestions on these lines for improvement?

your frozen model is ckpt or pb on tx2?

How to load a frozen graph for synthesis?


Update panduit_pdu.yml

Added GroupTable, serial number and firmware.  Also updated the provider to match other PDU's.

@i3149 or @thezackm can you review this PR please?


Implement some DomainFunctions in a separate sub-module

There are some standard functions like SQRT, SIN etc. that are probably best implemented in a separate module. Think of a way to making registering these functions easy.

Done


web room bridge

This should show a list of id that are in the room on the dashboard.

the big part of this was beea19f - there now is the roomstate package which implements a Manager, which supplies the following methods:
func (m *Manager) AddEndpoint(who refs.FeedRef, edp muxrpc.Endpoint)
func (m *Manager) Has(who refs.FeedRef) (muxrpc.Endpoint, bool)
func (m *Manager) List() []string
func (m *Manager) Register(sink broadcasts.RoomChangeSink)
func (m *Manager) Remove(who refs.FeedRef)

Has(ref) can be used to get a muxrpc client to that peer, if it's connected. Right now only List() is used on the dashboard landing page.

Fixes #9


Feat/extended tests

List of changes

Added extended test cases
Fixed delegation timeout issue
Fixed formatting issue

Checklist

related issue
[x] My changes generate no new warnings
[x] My code follows the style guidelines of this project
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the changelog
[ ] I have added tests that prove my fix is effective or that my feature works

@NabinKawan Could you please rebase the PR?


feature: support parsing more languages beyond C++

This is a long-term issue and right now we're dependent on building on top of tree-sitter's generated AST, in terms of how far we can extend here.
It'd be ideal if I can come up with a custom solution to .svelte files too, as a personal side mission.

I think the bigger and more immediate place to extend this would be further into how we really use C++ codebases themselves. Not every header file is going to be used in a codebase conversion and a filter on dead source code could be an area to focus on.


Vulnerability roundup 84: samba-4.10.11: 2 advisories

search, files

[ ] CVE-2020-10700 CVSSv3=7.5 (nixos-19.09)
[ ] CVE-2020-10704 CVSSv3=7.5 (nixos-19.09)

Scanned versions: nixos-19.09: 31dcaa5eb67. May contain false positives.

19.09 is EOL


Use :user-invalid and :user-valid pseudo-classes to indicate visually when client-side validation has failed for an input after user interaction

Describe the issue
This issue is a follow-on to #47, but proposes the use of :user-valid and :user-invalid pseudo-classes in addition to the aria-* attributes to apply valid/invalid styles to an input.
Current Behavior
Currently, when doing client-side validation using HTML attributes (no JavaScript), an invalid user input entry is not highlighted visually.
Expected Behavior
I would expect client-side validated inputs with which the user has interacted (indicated by the :user-valid or :user-invalid pseudo-classes) to show the proper validation styling.
Reproduction URL
https://jsfiddle.net/L2p4rmy1/1/
Environment
As linked above, the necessary pseudo-classes are supported across all major browsers.

Codepen Example
Heres some css to make this work for :user-valid and :user-invalid
input:user-valid,
input:user-invalid {
	padding-right: calc(1.5em + .75rem);
	background-repeat: no-repeat;
	background-position: right calc(.375em + .1875rem) center;
	background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}
textarea:user-valid,
textarea:user-invalid {
	padding-right: calc(1.5em + .75rem);
	background-position: top calc(.375em + .1875rem) right calc(.375em + .1875rem);
	background-repeat: no-repeat;
	background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}
input:user-invalid,
textarea:user-invalid {
	border-color: var(--pico-form-element-invalid-border-color);
	background-image: var(--pico-icon-invalid);
}
input:user-valid,
textarea:user-valid {
	border-color: var(--pico-form-element-valid-border-color);
	background-image: var(--pico-icon-valid);
}

And then to add the text after the element you can put a <small data-invalid="This is invalid" data-valid="validation passed!"></small> after the element
/********** To include a message after the element with info ************/
input:user-valid + small[data-valid]::after,
textarea:user-valid + small[data-valid]::after {
	content: attr(data-invalid);
	color: var(--pico-form-element-valid-border-color);
}
textarea:user-invalid + small[data-invalid]::after,
input:user-invalid + small[data-invalid]::after {
	content: attr(data-invalid);
	color: var(--pico-form-element-invalid-border-color);
}

input:user-valid + small[data-valid]::after,
input:user-invalid + small[data-invalid]::after,
textarea:user-valid + small[data-valid]::after,
textarea:user-invalid + small[data-invalid]::after {
	display:block;
}

After playing with this some more, I've realized it will take more css to completely ensure the invalid and valid states are correct.
Input checkbox and radio types need to be accounted for, probably file and reset as well.
Select needs to be accounted for.
I'll be playing with my codepen for a little while to add these other form input types to ensure compatibility with them all, and will edit/update when completed.

When I have fought with this in the past, I ended up using CSS to change .field_with_errors to display: inline. That's a big hammer, and clearly not going to fix everything that redefining the proc would do. But as a quick fix, it does keep the layout intact when an additional div (with implicit block display) is layered into the layout from breaking up those special formatting contexts.

When I have fought with this in the past, I ended up using CSS to change .field_with_errors to display: inline. That's a big hammer, and clearly not going to fix everything that redefining the proc would do. But as a quick fix, it does keep the layout intact when an additional div (with implicit block display) is layered into the layout from breaking up those special formatting contexts.

check this out
I added a validation.scss to my fork and it seems to be working great. The codepen above has most of it in there as well in the plan css. And using the <small data-invalid="error message" data-valid="validation passes on the front end"> tags for the error message, just gotta put the small tag after the element to validate.


PEAR-1668: Make portal v2's basepath configurable

Description
Checklist

[ ] Added proper unit tests
[ ] Left proper TODO messages for any remaining tasks
[ ] Scanned for web accessibility with aXe, and mitigated or documented
flagged issues

Screenshots/Screen Recordings (if Appropriate)

heads up that i'll be making the changes to the annotations browser url in this branch/pr: https://gdc-ctds.atlassian.net/browse/PEAR-1696


Fix MacOS instructions

Need to tap weaveworks/tap before eksctl can be installed.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Don't have write access, so up to you guys to merge or not.


Change default install path from /opt to ~/sdk

Most of the users which install the SDK haven't prepared their system to allow the user to install things into /opt. /opt is the default install path for the SDK but should be changed to ~/sdk

Could be changed somewhere around here:
https://github.com/openembedded/openembedded-core/blob/master/meta/files/toolchain-shar-extract.sh#L143
https://github.com/openembedded/openembedded-core/blob/master/meta/files/toolchain-shar-extract.sh#L58
I guess the SDKPATH variable could be changed somehow.

It is not feasible you will encounter build failures:
For instance: gcc-crosssdk-initial_6.2.bb:do_compile
configure: error: --with-native-system-header-dir argument ~/sdk/poky/2.2.1/sysroots/x86_64-pokysdk-linux/usr/include must be an absolute directory

Won't fix.


Undo / Redo feature

Implement an undo / redo feature.
https://threejs.org/editor/ has an undo/redo feature.
Main implementation in this file https://github.com/mrdoob/three.js/blob/master/editor/js/History.js
each action is a command
https://github.com/mrdoob/three.js/tree/master/editor/js/commands
We probably need to hook our events componentadd, componentremove, entityupdate, entityidchange, objectremove, entitycreated, entityclone, etc with a system like that.
Initially discussed in https://github.com/aframevr/aframe-inspector/issues/21

You can sponsor $500 to vincentfretin fully or partially to work on this feature. Find other work you can sponsor at https://github.com/c-frame/sponsorship

This feature could then be backported to aframe-inspector if the changes are not too heavy and @dmarcos agrees to review it and merge there.

Note: this could be implemented step by step, not all at once, to simply allow undo of certain actions first and then add others later

Yeah. We can do it in the inspector if can be implemented simply and reliably

I discussed a bit with @kfarr on the implementation, just writing down what I just said.
If you look at for example SetPositionCommand command in threejs editor so https://github.com/mrdoob/three.js/blob/master/editor/js/commands/SetPositionCommand.js
and used from transformControls:
https://github.com/mrdoob/three.js/blob/4fdc32283d7aa0502889e8bde57221bb4b69feeb/editor/js/Viewport.js#L111
or from the ui:
https://github.com/mrdoob/three.js/blob/4fdc32283d7aa0502889e8bde57221bb4b69feeb/editor/js/Menubar.Edit.js#L99
The equivalent of that in aframe inspector is the entityupdate event with component "position"
We use entityupdate event in three places
https://github.com/aframevr/aframe-inspector/blob/0b8b8d54d967b425d937b81133c8cc340bde1017/src/lib/viewport.js#L80
https://github.com/aframevr/aframe-inspector/blob/0b8b8d54d967b425d937b81133c8cc340bde1017/src/lib/entity.js#L38
https://github.com/aframevr/aframe-inspector/blob/0b8b8d54d967b425d937b81133c8cc340bde1017/src/components/components/Mixins.js#L53
This code where we call setAttribute and emit the entityupdate event
https://github.com/aframevr/aframe-inspector/blob/0b8b8d54d967b425d937b81133c8cc340bde1017/src/lib/viewport.js#L78-L85
would need to be rewritten to be something like
editor.execute( new EntityUpdateCommand( editor,  {component, entity, property, value}))
and it's in EntityUpdateCommand.execute that we do the setAttribute and emit entityupdate.
A command may be updatable, see
https://github.com/mrdoob/three.js/blob/134ff886792734a75c0a9b30aa816d19270f8526/editor/js/History.js#L54-L58
if last command is of the same type as the previous one the same entity and component during a window of 500ms keep the last one, so that part https://github.com/mrdoob/three.js/blob/134ff886792734a75c0a9b30aa816d19270f8526/editor/js/History.js#L42-L45
that needs to be properly modified.

Cool. Thanks for the elaboration. It doesn't look too complicated?

@dmarcos see https://github.com/3DStreet/3dstreet/pull/676 that implements undo position/rotation/scale and any change in a component. Currently mixin is not handled.
Are you interested that I do a similar PR to aframe-inspector? 95% of the changes would be the same.

Yeah thanks! Question. Would it be possible to have an undo / redo component independent of the inspector? That might be useful for the community

You would still need some changes in the inspector to replace setAttribute+emit('entityupdate') by another event emit('updateentity') that would actually do the setAttribute+emit('entityupdate'). And if you want the undo module out of the core, we need a way to unregister the default updatentity handler and replace by another that uses the history undos/redos stack.
For the shortcuts, it seems there was previously a way to create module with some shortcuts registerModuleShortcut
https://github.com/aframevr/aframe-inspector/blob/b792e9113c416f758caccf154acf558c6f538e36/src/index.js#L19
https://github.com/aframevr/aframe-inspector/blob/b792e9113c416f758caccf154acf558c6f538e36/src/lib/shortcuts.js#L112-L123
https://github.com/aframevr/aframe-inspector/blob/b792e9113c416f758caccf154acf558c6f538e36/src/lib/shortcuts.js#L183-L216
but not clear how to use that. It seems to be dead code from a modules attempt that was partially removed, see https://github.com/aframevr/aframe-inspector/issues/523#issuecomment-338615746

First version of the A-Frame editor with undo/redo and copy a-scene HTML to clipboard features:
https://x.com/vincentfretin/status/1861726540196708776


Post values no longer included

Issue in ./help/sources/connectors/adobe-applications/mapping/analytics.md
This document references post values which I believe are no longer included in the ADC.
"Select fields (known as “postvalues”) require more advanced transformations before they can successfully mapped from Adobe Analytics fields to Experience Data Model (XDM). Performing these advanced transformations involves the use of Adobe Experience Platfrom Query Service and prebuilt functions (called Adobe-defined functions) for sessionization, attribution, and deduplication."

Thank you for submitting this issue. We will review the documentation and make the necessary updates as quickly as possible. Tracking internally in PLAT-158961.


Unblock version by footer

Description

Unblock the hidden version toggle caused by the footer of the page.
The footer should only show up when scrolled to the bottom of the page now
Related Issue

[ ] Closes #264
[ ] Related to #

Checklist

[x] Checked that the pre-commit linting/style checks pass
[ ] Included tests that prove the fix is effective or that the new feature works
[ ] Added necessary documentation (docstrings and/or example notebooks)
[ ] If you are a pro: each commit corresponds to a relevant logical change

Modules affected

[ ] MMM
[ ] CLV

Type of change

[ ] New feature / enhancement
[ ] Bug fix
[x] Documentation
[ ] Maintenance
[ ] Other (please specify):

📚 Documentation preview 📚: https://pymc-marketing--714.org.readthedocs.build/en/714/

This looks good to me in the build on desktop as well as mobile!


Abstract code & Remove redundant code & Simplfy code.

Please answer these questions before submitting pull request

Why submit this pull request?
[ ] Bug fix
[ ] New feature provided
[x] Improve performance

Simplfy code & Abstract code for common use. & Remove redundant code.

hello , @wu-sheng , how could i config the check style, it just tells me the reason for the error is checkstyle.

If you run mvn package locally, it shows what is the error. Import codeStyle.xml to your IDE.
CI has log size limit, could show that.

I need to remind you, you should change the codes based on your code style. SkyWalking is contributed by 120+ contributors, from dozens of companies, all over the world. I am so sure, each one has a different coding style.
If there is a bug and less check invocation, the improvement of PR is good. If just code style, I think we can't accept it, and should not. Because there is no rule we can say which kind of codes is better in worldwide.

I am going to close this pull request, please consider what I said above. Too many coding style changes in this pull request.

I need to remind you, you should change the codes based on your code style. SkyWalking is contributed by 120+ contributors, from dozens of companies, all over the world. I am so sure, each one has a different coding style.
If there is a bug and less check invocation, the improvement of PR is good. If just code style, I think we can't accept it, and should not. Because there is no rule we can say which kind of codes is better in worldwide.

en, thanks for your reminder. this patch is not the code style at all.

en, thanks for your reminder. this patch is not the code style at all.

I commented why I think it is a coding style thing.


openssl: fix Darwin cross infinite recursion

stdenv depends on openssl, and isGNU depends on stdenv.

Motivation for this change
Fixes https://github.com/NixOS/nixpkgs/issues/126829.
Thanks to @sternenseemann for figuring out what was going on here.
Haven't tested myself because I don't have Darwin.
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes

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

[x] Fits CONTRIBUTING.md.

@OfBorg build pkgsCross.aarch64-darwin.nix

Eval looks good:
$ nix-instantiate -A pkgsCross.aarch64-darwin.hello --argstr system x86_64-darwin
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
/nix/store/r5zq68sqm7qbwkfq9yflwwq00pg5qgwd-hello-aarch64-apple-darwin-2.10.drv

But this will fail when not using darwin as the build platform as well, so it is a fragile fix in any case (not sure if we need to care about this cross compilation direction?).
$ nix-instantiate -A pkgsCross.aarch64-darwin.hello --argstr system x86_64-linux
error: infinite recursion encountered, at undefined position
(use '--show-trace' to show detailed location information)

For reference this is the full trace:
$ nix-instantiate -A pkgsCross.aarch64-darwin.hello --argstr system x86_64-linux --show-trace
error: while evaluating the attribute 'stdenv' of the derivation 'hello-aarch64-apple-darwin-2.10' at /home/lukas/src/nix/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:201:11:
while evaluating the attribute 'defaultBuildInputs' of the derivation 'stdenv-linux' at /home/lukas/src/nix/nixpkgs/pkgs/stdenv/generic/default.nix:93:14:
while evaluating the attribute 'disallowedRequisites' of the derivation 'apple-framework-CoreFoundation-11.0.0' at /home/lukas/src/nix/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:201:11:
while evaluating the attribute 'nativeBuildInputs' of the derivation 'MacOSX-SDK-11.0.0' at /home/lukas/src/nix/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:201:11:
while evaluating the attribute 'buildInputs' of the derivation 'pbzx-1.0.2' at /home/lukas/src/nix/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:201:11:
while evaluating the attribute 'buildInputs' of the derivation 'xar-1.6.1' at /home/lukas/src/nix/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:201:11:
while evaluating the attribute 'buildInputs' of the derivation 'libxml2-2.9.12' at /home/lukas/src/nix/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:201:11:
while evaluating the attribute 'postPatch' of the derivation 'python3-3.8.9' at /home/lukas/src/nix/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:201:11:
while evaluating 'spliceReal' at /home/lukas/src/nix/nixpkgs/pkgs/top-level/splice.nix:28:16, called from /home/lukas/src/nix/nixpkgs/pkgs/top-level/splice.nix:72:65:
while evaluating 'tryGetOutputs' at /home/lukas/src/nix/nixpkgs/pkgs/top-level/splice.nix:63:25, called from /home/lukas/src/nix/nixpkgs/pkgs/top-level/splice.nix:78:30:
while evaluating 'getOutputs' at /home/lukas/src/nix/nixpkgs/pkgs/top-level/splice.nix:66:22, called from /home/lukas/src/nix/nixpkgs/pkgs/top-level/splice.nix:65:12:
while evaluating 'genAttrs' at /home/lukas/src/nix/nixpkgs/lib/attrsets.nix:313:21, called from /home/lukas/src/nix/nixpkgs/pkgs/top-level/splice.nix:66:29:
while evaluating 'optionalAttrs' at /home/lukas/src/nix/nixpkgs/lib/attrsets.nix:353:25, called from /home/lukas/src/nix/nixpkgs/pkgs/top-level/splice.nix:65:24:
while evaluating the attribute 'bash' at /home/lukas/src/nix/nixpkgs/pkgs/top-level/all-packages.nix:10236:3:
while evaluating 'addMetaAttrs' at /home/lukas/src/nix/nixpkgs/lib/meta.nix:15:28, called from /home/lukas/src/nix/nixpkgs/pkgs/top-level/all-packages.nix:10236:10:
while evaluating 'callPackageWith' at /home/lukas/src/nix/nixpkgs/lib/customisation.nix:117:35, called from /home/lukas/src/nix/nixpkgs/pkgs/top-level/all-packages.nix:10236:19:
while evaluating 'makeOverridable' at /home/lukas/src/nix/nixpkgs/lib/customisation.nix:67:24, called from /home/lukas/src/nix/nixpkgs/lib/customisation.nix:121:8:
while evaluating anonymous function at /home/lukas/src/nix/nixpkgs/pkgs/shells/bash/4.4.nix:1:1, called from /home/lukas/src/nix/nixpkgs/lib/customisation.nix:69:16:
while evaluating the attribute 'cc.bintools' at /home/lukas/src/nix/nixpkgs/pkgs/stdenv/generic/default.nix:166:14:
while evaluating the attribute 'llvmPackages.clang' at /home/lukas/src/nix/nixpkgs/pkgs/development/compilers/llvm/11/default.nix:107:5:
while evaluating the attribute 'libstdcxxClang' at /home/lukas/src/nix/nixpkgs/pkgs/development/compilers/llvm/11/default.nix:109:5:
while evaluating 'wrapCCWith' at /home/lukas/src/nix/nixpkgs/pkgs/top-level/all-packages.nix:12077:5, called from /home/lukas/src/nix/nixpkgs/pkgs/development/compilers/llvm/11/default.nix:109:22:
while evaluating 'callPackageWith' at /home/lukas/src/nix/nixpkgs/lib/customisation.nix:117:35, called from /home/lukas/src/nix/nixpkgs/pkgs/top-level/all-packages.nix:12091:7:
while evaluating 'makeOverridable' at /home/lukas/src/nix/nixpkgs/lib/customisation.nix:67:24, called from /home/lukas/src/nix/nixpkgs/lib/customisation.nix:121:8:
while evaluating anonymous function at /home/lukas/src/nix/nixpkgs/pkgs/build-support/cc-wrapper/default.nix:8:1, called from /home/lukas/src/nix/nixpkgs/lib/customisation.nix:69:16:
while evaluating the attribute 'installPhase' of the derivation 'libSystem-11.0.0' at /home/lukas/src/nix/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:201:11:
infinite recursion encountered, at undefined position

Nix still doesn't build but that's out of scope for this fix. Thanks!

For the record, I think we need to solve this differently. I fear that this workaround which only tackles one specific case may not be enough in the long run. I'll try to have a look at the new trace tomorrow and see if I can come up with anything.
I think at the very least we should keep #126829 (with a modified title) open for now.


changed auto controls into subvi's

When new files are created they aren't tracked, meaning they aren't included in the commit. The subVI files are missing, so add them to the commit to track them.


setting to be able to use makeElementDraggableAndEditable.js without editable?

instead of having to download an extra file to get the reduced capability

https://github.com/hchiam/slides/issues/47


srcObject fix for safari webcam

This change is

Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion.

demos/teachable_gaming/teachable_gaming.ts, line 198 at r1 (raw file):

          (stream) => {
            try {
              this.webcamVideoElement.srcObject = stream;

is there a way to test for this without a try/catch? e.g. test if this.webcamVideoElement.srcObject != null ? if not no worries.
I just feel like try/catch should be last resort since it's a catch all and we might miss other errors.

Comments from Reviewable


handle errors from flush to avoid possible panics

I encountered occasional panics due to lame_encode_flush returning -3. I think this is due to the finalizer calling e.Close directly and then Close being called afterward.

Makes sense. Haven't come across that behaviour. Will merge it tomorrow after a closer look


Security Fix for Command Injection - huntr.dev

https://huntr.dev/users/Asjidkalam has fixed the Command Injection vulnerability 🔨. Asjidkalam has been awarded $25 for fixing the vulnerability through the huntr bug bounty program 💵. Think you could fix a vulnerability like this?
Get involved at https://huntr.dev/
Q | A
Version Affected | ALL
Bug Fix | YES
Original Pull Request | https://github.com/418sec/gulp-tape/pull/2
Vulnerability README | https://github.com/418sec/huntr/blob/master/bounties/npm/gulp-tape/1/README.md
User Comments:
📊 Metadata *
Command injection vulnerability
Bounty URL: https://www.huntr.dev/bounties/1-npm-gulp-tape
⚙ Description *
gulp-tape is a to run Tape tests in Gulp, this package are vulnerable to Command Injection. It is possible to inject arbitrary commands as part of gulp-tape options.
💻 Technical Description *
The use of the child_process function exec() is highly discouraged if you accept user input and don't sanitize/escape them. I replaced it with execFile() which mitigates any possible Command Injections as it accepts input as arrays.
🐛 Proof of Concept (PoC) *
Install the package and run the below code:
var root = require("gulp-tape");
var gulp = require("gulp");
var options = {
  name: "& touch JHU.txt"
}
gulp.src("./gulp-tape.js")
  .pipe(root(options));

🔥 Proof of Fix (PoF) *
After applying the fix, run the PoC again and no files will be created. Hence command injection is mitigated.

👍 User Acceptance Testing (UAT)
Only execFile is used, no breaking changes introduced.

@yuanqing can you please merge this fix and cut a new release as soon as possible?


Upgrade LUFA to modern alternative?

Hello, unfortunately LUFA only supports older AVR boards.
How about something like https://github.com/NicoHood/HID or https://github.com/hathach/tinyusb so that it would be compatible with modern boards?

My first prototypes used the HID library but it quickly became clear it doesn't allow the kind of low-level USB access I need to trick the PS4. I'll take a look at tinyusb.

I'll also keep digging around and see whether I can find any other alternatives.

I can't seem to find anything else, please let me know if there is anything I can do to help.

It is, but it's also badly designed and next to impossible to extend or use in "advanced" situations. LUFA on the other hand enables the user to do pretty much anything with its callback-based API. I'm hoping tinyusb follows the same philosophy.

I've been having a problem getting TinyUsb to work with my board.
I'm thinking of recreating the LUFA interface, but using the Arduino USBAPI under the hood.
Could you tell which which LUFA functionality this library is using and in which files so that I can recreate the LUFA interface?

I use basically all of the low-level device (not host) USB APIs. At first I tried using the Arduino built-in USB code but it didn't have some of the core functionality I needed, so I doubt you can do that. It would probably be simpler to implement a driver for your board directly in LUFA (http://www.fourwalledcubicle.com/files/LUFA/Doc/210130/html/_page__writing_board_drivers.html) or maybe add support for your board in the Arduino LUFA project (https://github.com/Palatis/Arduino-Lufa) wouldn't it ?

Yes, you're probably right. It does seem fairly daunting to me since I've never done anything like that before, but I guess that's what needs to be done!


Added doc showing how to run a premade scenario

closing this for now, lets do something that targets better #519


Blake3 in React - Cannot Read Properties of Undefined

I am importing the blake3 package to use in my front-end React application so I can create a front-end demo to use.
I have used the code in the example
  import blake3 from 'blake3'   const hashed = blake3.hash('foo') // => Buffer
However I get an error of
Server Error TypeError: Cannot read properties of undefined (reading 'hash')

It looks like you're using a JS implementation of BLAKE3, presumably this one? You might want to take a look at the quickstart examples if you're having trouble getting started? Hopefully that clears everything up, but if you suspect there's a real bug, you'll want to file it there.


Fixed a broken markdown link to the Azure Portal

@catslovedata : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#sign-off
Thanks @catslovedata. Love your alias. :-)


Update walkthrough-analyzing-c-cpp-code-for-defects.md

Fix list formatting in See also

@stephenegriffin : Thanks for your contribution! The author(s) have been notified to review your proposed change.


cancelable(false) doesn't work on 5.1

Dialog disappears when click outside it, bug can be reproduced on earlier os
Device: Nexus 7 2013, android 5.1.1

Unable to reproduce.
Make sure you're using a newer version of the library.


Change GRANT for root to localhost

This makes sure connections on the machine itself work and is also more secure. Root access to MySQL shouldn't be enabled everywhere by default.

Good catch.  Also without this change, some of the usual scripts to secure mysql would drop the root user, as in:
DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '<IP_ADDRESS>', '::1');

(Therefore, #339.)

Apparently my changes actually break it. Connections through sequel pro (which I use the most). Strange, on other servers default localhost is OK. Will investigate further, but all input welcomed

I'm stumped. changing it as is in master (with host as %) off course works, except when combined with some security scripts. When I change the host to localhost, I can't connect to the mysql server at all. Not with the -S option, not on port 3306. When I adapt the script so both % and localhost are used (see below), the localhost host is not in the users table. When % is first, it's fine, when % is second, it doesn't work.
I can't figure this out ATM, any input is greatly appreciated.

CREATE USER 'root'@'%' IDENTIFIED BY '#{Shellwords.escape(new_resource.initial_root_password)}' ;
GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION ;
CREATE USER 'root'@'localhost' IDENTIFIED BY '#{Shellwords.escape(new_resource.initial_root_password)}' ;
GRANT ALL ON *.* TO 'root'@'localhost' WITH GRANT OPTION ;

Also, it seems like if I replace the create user and grant from only host % to hosts % and localhost, the test db isn't deleted :s

Turns out "localhost" and "<IP_ADDRESS>" are two different things in MySQL.
Try the IP?
-s
On Sat, Jun 13, 2015 at 8:03 PM, Dieter Blomme<EMAIL_ADDRESS>wrote:

Also, it seems like if I replace the create user and grant from only host
% to hosts % and localhost, the test db isn't deleted :s
—
Reply to this email directly or view it on GitHub
https://github.com/chef-cookbooks/mysql/pull/341#issuecomment-111764953.

I've read through the documentation. When connecting over the socket, it should be localhost. <IP_ADDRESS> is indeed for port based connections. The strange thing is that when % host is first, and then localhost, the localhost based user is never added. Maybe the SQL is wrong?

As I noted in #339, I I'm pretty sure we need two grants, one for TCP, and another for the socket.
Also, can you fix up the serverspec tests in this PR? I cant merge until they're fixed... I tried to fix them up myself, then realized the #339 thing.
-s

I'll take another look this week to fix the PR!

Thanks Dieter!
-s
On Sun, Jun 14, 2015 at 7:36 PM, Dieter Blomme<EMAIL_ADDRESS>wrote:

I'll take another look this week to fix the PR!
—
Reply to this email directly or view it on GitHub
https://github.com/chef-cookbooks/mysql/pull/341#issuecomment-111885717.

No problem, but it'll have to wait for another week, I'm off to a festival for the (long) weekend. Just wanted to let know it's still on the todo-list :)

Just my 2 cents as a MySQL dba. You should never have user root@%. You should only have user root@localhost and/or<EMAIL_ADDRESS> Also @daften are you connecting remotely or locally when you are using the -S  and -P(--port) options? You can designate -h even locally, but if you don't it will always default to localhost. You would have to specficially put in <IP_ADDRESS>

Hey,
@someara I updated the pull request and am running the kitchen tests now, but it seems to work. However, it seems I can't create the localhost user then, even not from the cli.
@geleman  the mysql snippet is below, can you point out what is wrong with it please, I can't figure out why this wouldn't work.

That all looks good to me, but I have a question. Why wouldn't you want to check for localhost? A bigger question is why the root@localhost is dropped at the install initially? I'm still working my way through chef stuff and it's pretty exciting. I will tell you from my point of view on initial startup of mysql I drop all root users except localhost and <IP_ADDRESS>. I disable dns and endsure all other users are dropped and permissions of those users as well. The mysql_secure_installation is a great guide for doing that. I'm only mentioning all this because it seems there is a desire to harden the install from the jump.

Thanks for the feedback.
Hardening the install is what we're trying to do now, but like you said, it seems the root@localhost user can't be created at all for some reason. Even after I only insert the<EMAIL_ADDRESS>user, i can't insert the root@localhost user through the cli. I'm hoping @geleman can help me figure this out, because for the life of me, I can't find it atm.

I found your problem and this is because as I said earlier if you have @% i will always default to @local host is there is no other host designated.
Here is the output from a current install I am test:
mysql> select user, host from user;
+------+------+
| user | host |
+------+------+
| root | %    |
+------+------+
1 row in set (0.00 sec)
mysql> select user();
+----------------+
| user()         |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)
mysql> create user 'root'@'localhost' identified by 'change_me';
ERROR 1396 (HY000): Operation CREATE USER failed for 'root'@'localhost'
mysql>
As you can see you are trying to create a user you are currently logged in has because the @% is being used to defaul to localhost. Even if you create the <IP_ADDRESS> user:
mysql> create user<EMAIL_ADDRESS>identified by 'change_me';
Query OK, 0 rows affected (0.00 sec)
mysql> select user, host from user;
+------+-----------+
| user | host      |
+------+-----------+
| root | %         |
| root | <IP_ADDRESS> |
+------+-----------+
2 rows in set (0.00 sec)
and log in using the -h <IP_ADDRESS> option
[vagrant@mysql2 logs]$ mysql -S /tmp/mysqld.sock -uroot -pchange_me -h <IP_ADDRESS>
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.6.25 MySQL Community Server (GPL)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
you still default to the localhost user:
mysql> select user();
+----------------+
| user()         |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)
So this is your issue. This goes back to my question why is the root@localhost user dropped in the intial install because it is create on the initialization of the system tables. This can only be corrected in 1 of two ways.

Fix the install to not drop the root@localhost user
Create another user on install with full permissions in order to create the root@localhost user.

Also you will have to still grant all with grant option to that <IP_ADDRESS> host user
I'm sure we an agree #2 isn't the safe way.
I have also found another issue with the install.
 I'll fix this tonight!
Can you explain the last problem further please?

When you do a fresh install of mysql those permissions are created on the test db and you have to explicitly delete those permissions. If you look through the mysql_secure_installation script you will see where it is done. I like nice clean installs with as few permissions hanging out there for users. These aren't necessarily dangerous but the do have the anonymous user and that isn't a good thing.

I suspect just changing this:
https://github.com/chef-cookbooks/mysql/blob/e303d0ff88ac1d55f655cf6ef3dfbf67906d5846/libraries/helpers.rb#L150-L156
... to have both 'localhost' and '<IP_ADDRESS>' instead of '%' should do the
trick
-s
On Wed, Jun 24, 2015 at 5:55 AM, geleman<EMAIL_ADDRESS>wrote:

When you do a fresh install of mysql those permissions are created on the
test db and you have to explicitly delete those permissions. If you look
through the mysql_secure_installation script you will see where it is done.
I like nice clean installs with as few permissions hanging out there for
users. These aren't necessarily dangerous but the do have the anonymous
user and that isn't a good thing.
—
Reply to this email directly or view it on GitHub
https://github.com/chef-cookbooks/mysql/pull/341#issuecomment-114859889.

@someara sadly no, that's what i mention in my comments and @geleman explains in the comment above yours ;)

The solution is not deleting the root users during the install. This is where the problem starts. Instead of a delete from mysql.user you can run and update password for root@localhost. Deleting the other users would be best and also delete all users/host from the db table as well.

I'm attempting this solution
def init_records_script
  <<-EOS
    set -e
    rm -rf /tmp/#{mysql_name}
    mkdir /tmp/#{mysql_name}

    cat > /tmp/#{mysql_name}/my.sql <<-EOSQL

#DELETE FROM mysql.user ;
#CREATE USER 'root'@'%' IDENTIFIED BY '#{Shellwords.escape(new_resource.initial_root_password)}' ;
#GRANT ALL ON . TO 'root'@'%' WITH GRANT OPTION ;
UPDATE mysql.user SET Password=PASSWORD('#{Shellwords.escape(new_resource.initial_root_password)}');
DELETE FROM mysql.user WHERE USER LIKE '';
DELETE FROM mysql.user WHERE user = 'root' and host NOT IN ('<IP_ADDRESS>','localhost');
DROP DATABASE test;
DELETE FROM MYSQL.DB WHERE DB LIKE 'test%'
FLUSH PRIVILEGES;
DROP DATABASE IF EXISTS test ;
EOSQL

Aren't you dropping test db twice now, without a check the first time?

Yeah I updated the comment after I saw that mistake

I've updated the pull request with all comments included (I think). Tests are updated and I used the new sql init script from @geleman. However the tests still fail, but I don't think the init script is the reason, the error message is
No resource, method, or local variable named `create_stop_system_service' for `Chef::Provider::MysqlService ""'

@someara the tests fail for the same reason on latest master it seems, could there be something else wrong in the test suite or the cookbook?

I'm getting this error also. Chef just update to 12.4 from 12.3 and I think that is the problem

There might be a couple issues in the script also. mysql.db or mysql.user should be lower case and not Capitalized. I was writing in a hurry as usual. However we have a much larger issue at hand. Vagrant is updating to Chef 12.4.0 where as 3 hours ago it was 12.3.0 and since that time I get this error
NameError
==> mysql1: ---------
==> mysql1: No resource, method, or local variable named create_stop_system_service' for Chef::Provider::MysqlService ""'
same as @daften

On Ubuntu 14.04 it seems to work though, must be something with the specific classes for the type of init daemon used.

I'm reverting my vagrant to use 12.3.0 to see if it comes up right now.

12.3.0 works for me. I will try and run the init script now because I removed when everything started to fail. Did the init script work for you @daften?

It worked for me on ubuntu 14.04 it seems, the tests seem to run, now verifying manually.

The manual verification worked on ubuntu. I'm using kitchen to converge and test atm and I have some other stuff to do, so I'll get back to this tomorrow, hopefully @someara will know more about the chef error, we'll probably need to open a separate PR to fix that. Thanks so much for all the work on this @geleman ! ;)

Not a problem. I'm seeing if it works as of now myself. As I said earlier I'm new to chef so I'm not familiar with kitchen as of yet.

@geleman  you can find more here: http://kitchen.ci/
it's very useful to run test suites against a multitude of actual VM's. You can use a second Vagrantfile to merge against the default Vagrantfile kitchen uses (haven't tried that yet). More info should be discussed outside this topic probably ;)

It doesn't work on omnios yet, but the master branch doesn't either. And it doesn't for for mysql5.7 as a service, working on that right now.

What part the init script or the 12.4 update?

Everything works for the provisioning, but the tests fail and If i just provision I can't login to mysql. Try it e.g. by using kitchen converge service57-single-centos-510 and then kitchen login service57-single-centos-510 (you'll need chefdk off course).

I am on the road for vacation until July 6th. I will try to look at it if I get an opportunity.

Thanks @geleman for everything already, I'll try and figure it out, but I'm not sure I'll find it. :)

If you can post the error I might be able to help. Also give the error  for mysql login. Check error log for Mysql as well it might help.

If you can post the error I might be able to help. Also give the error  for mysql login. Check error log for Mysql as well it might help.

So after testing everything (I think), it seems only MySQL5.7 tests fail due to changes in this PR.

@geleman There is no error, login for root@localhost just failed is what I get when I try to login by using -h <IP_ADDRESS>. It's not the provisioning that fails, it's just that it doesn't do what I expect it to do apparently.

See if you can kill the server and start it up manually with skip grant tables. If you can login check the user table and credentials. It may just be something with 5.7. There have been alot of updates so that might be the issue. I just won't be able to check for a few days

Will try, but all the skip-grant-tables options and so have never been my friends in the past :)
Thanks!

It seems like default there only is a root@localhost user, so only socket based login is allowed. Maybe for 5.7 conditionally adapting the script so a<EMAIL_ADDRESS>user is inserted?

IMO I think you only need @localhost. You always add <IP_ADDRESS> after the fact. I've never really seen many use the loop back on a regular occasion.

But it seems mysql<5.7 actually inserts<EMAIL_ADDRESS>by default, should we remove that then too? With this cookbook which allows multiple instances, local port based access over loop back might be handy.
Either we adapt the tests for 5.7 so <IP_ADDRESS> isn't in there, we insert <IP_ADDRESS> for 5.7 or we only allow localhost everywhere. Which is best IYO?

I can't really speak for sure on 5.7 but the loop back is inserted as a default along with local host and ::1 in 5.5 and 5.6. Not sure on ::1 for before 5.5

If it's there then leave it I say. I thought you were saying it wasn't there at all.

No, I mean, on 5.7, it's not there at all by default. I removed the init sql script and provisioned again, and only root@localhost is there on mysql 5.7 :)

If it's not there by default I wouldn't add it. Inserting into mysql system tables is frowned upon. That is why I suggested the new init script. It doesn't add just takes away what you don't need.

With new init script you mean the one you made based on mysql_secure_installation right?
Seems fine by me, I'll adapt the test cases so connection is made through socket instead of over loopback for mysql5.7

Yes. Localhost from what I have always seen is the preferred connection type.

password as field name is replaced with authentication string in 5.7 it seems. i'll try to create a fix in a couple of hours :D

OK, I think it works everywhere now, except for omnios, but those tests fail on master too, I think there's something else wrong.
@someara : can you take another look and give feedback on this please? :)

Indeed I can! testing now
On Fri, Jun 26, 2015 at 6:15 PM, Dieter Blomme<EMAIL_ADDRESS>wrote:

OK, I think it works everywhere now, except for omnios, but those tests
fail on master too, I think there's something else wrong.
@someara https://github.com/someara : can you take another look and
give feedback on this please? :)
—
Reply to this email directly or view it on GitHub
https://github.com/chef-cookbooks/mysql/pull/341#issuecomment-115907003.

Tests pass, huzzah! Thanks everyone!

Awesome work @daften

Team effort @geleman , couldn't have done it without your help. Awesome! :)

@Daten MySQL dba everywhere are rejoicing with this change :)

@daften MySQL dba everywhere are rejoicing with this change :)


Regex doesn't match ^ & $

Regex doesn't match ^ (start line) or $ (end line).
Problem is both in RegExp field and in Existing field.

Closing as duplicate #22


Error when enabling backend plugin

Hello,
I am running YOURLS docker version 1.8.2 & Sleeky version 2.4.1.
Backstory:
I tried the latest sleeky version (2.5) and the frontend did not appear correct at all and the backend had the error:
"Plugin generated unexpected output. Error was: "
when I try to enable the plugin in the admin area. It doesn't even tell me what the error is!
After trying version 2.4.1, I got the frontend to display nice and correct. The backend, however, still has the same problems. I have tried going to YOURLS v1.8.1 & 1.8
Both still have the same issue with the backend.
FYI, I have no other custom plugins installed.
If the issue is with my configuration, what am I doing incorrectly?

I'm having the same problem after loggin in

I'm having the same problem after loggin in

Hello! I actually figured it out.
The environment variable: YOURLS_PRIVATE
has to be set to TRUE
If set to FALSE, then SLEEKY backend will not work. YOURLS_PRIVATE determines if your admin panel is password protected or not. You probably want that anyways. Hope this helps!

Thanks, I'll try it

so @MexHigh does it did the trick ?

@JOduMonT Sorry I forgot to answer. Unfortunately, that didn't help with me either. My instance was private before too.


Running gimme-aws-creds --register_device replaces all existing configuration

Similar to #77 except even more surprising. After updating to version 1.1.0 I received the error No device token in configuration.  Try running --register_device again. After running gimme-aws-creds --register_device all of my profiles were gone from my config file.

I've encountered this behavior on commit 01d7e22 as well.

Issue still present in version 1.1.1 (installed with pip3)

This should be fixed in 1.1.2; see #103.


Reduce the number of warnings in the CI

@bendichter requested me to work to reduce some warnings. In the last two weeks the number has been reduced from around 600 before any warning reduction related PR to around 300 with #481
I think that now most of the low hanging fruit has been taken and the remaining ones have to do with other packages or require modify our tests slightly. So this is to document the work that has been done and establish a roadmap ahead:

[x] dict_deep_update warnings #481
[x] numpy np.int and np.float deprecation warnings #459. (there are some PRs in roiextractors and spikeextractors here as well)
[x] Warnings for in the spot group creation #466.

The remaining warnings come from different sources. I list them here in no particular order.
As I mentioned, I think that most of the low-hanging fruit has already been picked and I will add this as low-priority unless @bendichter things it should be higher:

[x] Deprecationg warning for scipy.io.matlab.mio5_params in roi-extractor.
[x] Warning for non description used in test_si (this probably should be solved when we address issue #287
[ ]  warn("could not find TwoPhotonSeries, using ImagingExtractor to create an nwbfile") roiextractors.

As I mentioned, there is also a bunch of errors that come from other libraries. Not clear if they could be solved by updating their version (I think this should be the case for some of the pandas warnings).
Here is a log from running pytest on main on my system for future reference.
warnings_main.txt

I think that we done with the most numerous warnings. Looking at the current state of affairs it seems that most of the remaining warnings correspond to the movie interface which I will get rid when I fix them so they run faster ( see #449). Then, the are some warnings corresponding to missing metadata that should be address after #501.
The only two remaining issues that I think we should settle to close this issue are two pending PRs in sipkeextractors:
https://github.com/SpikeInterface/spikeextractors/pull/673
https://github.com/SpikeInterface/spikeextractors/pull/675
Could we merge those so we can close this @alejoe91 @bendichter ?
Then we should be able to close this issue for good.

We are down from 700 to 100 warnings now. The remaining ones seem to be related to lack of metadata and electrode information which should be fixed once we start to systematically add metadata to our examples. Then there is the MovieInterface.


Create an Item from an inner attribute

My goal is to have an attribute #![allow(non_camel_case_types)] in a generated Mod. I tried to use ExtCtxt::item, but it requires a ItemKind, and non of it's variants correspond. Is it a bug?

Inner attributes are just attributes on the mod (they are not items). If you generated the mod you can attach attributes yourself.
I'm not quite sure what the larger situation here is.

I work on bindgen https://github.com/crabtw/rust-bindgen/blob/master/src/gen.rs#L179.

Mod only contains Items and a span

Where are you creating the Mod itself? Inner attributes are a field on the Mod, not contents.

The mod itself is an item, you need to generate an Item with an ItemKind::Mod with attribute on it

(closing, this isn't related to syntex, you may want to ask further questions on #rust-internals on Mozilla IRC)

Ok, sorry.


Use local time zone for alarms

This PR makes use of the tzlocal library to evaluate alarms in local time instead of utc.
This fixes #60 on my system. Please double check :-)

Thank you @arniebarni, it works fine here too, so merging!

Has this been released. I have 2.19 with same behavior


Automatically add a Cc: when seeing a reply on the Git mailing list

Whenever somebody on the Git mailing list replies to a patch or cover letter, chances are that they want to see the next iteration of it. It would be wonderful, therefore, if GitGitGadget could automatically add them to the Cc: footer (adding one if necessary) unless they were already mentioned in said footer.

Ideally, with a message from the bot on the PR saying "I updated the CC list", I guess ?

Ideally, with a message from the bot on the PR saying "I updated the CC list", I guess ?

Good idea!

While at it, a /cc command would probably not hurt, either. This will need to be implemented in handleComment(). The idea would be to add a new method to the GitHubGlue class to retrieve the first comment, append a footer, and the update the first comment with the new contents.
This would also require adjustments in the Azure Function.
By virtue of having a single agent in the agent pool used by GitGitGadget's PR handler, we do not really have to worry about concurrent edits. Or maybe we do, as PR authors could edit the comment manually at the same time?

PR #297 has been opened to address the first part of this.  A separate PR will be done for the /cc command after the PR gets accepted.
The question about concurrent updates has not been addressed.

Fixed via #297

PR #306 has been opened to add the /cc command.


chore: 🤖 add channel to release config

Description

Breaking Changes

JIRA Link

Checklist

[ ] Updated the Readme.md (if required) ?

/fast-forward


jshint —> semistandard

I've added ignores for any templates. I was also wondering if we should add semistandard as a linter option in the generator?

:shipit:
I'm not sure if we want semistandard to be the default for apps.  We've done it for plugins, which makes sense, but we ought to provide options for the app linter.

Agreed, I'll create a new issue for that.


[Semantic API] CCE in SymbolFactory

Description:
Consider the following source where I intentionally have redeclared the same symbol a at the cursor position.
function func1(string a, int b, function(int,int) returns string a<curosr>) returns function (int, function (int,int) r)  {

}

The following st is observed.

Steps to reproduce:
Try above code segment.

This is no longer reproducible.


Latest Lyrics.lua I have been using

This is the current core Lyrics I have been running without issues or leaks.  Not sure where I missed this pull request.  This code did fix some fade issues with the text going to 0 opacity.  It also uses a much simpler ACTIVE flag and seems to be highly stable so far.

Thanks, yeah I'm not sure how that happened, but I've went ahead and merged it.

Thanks, yeah I'm not sure how that happened, but I've went ahead and merged it.