v<IP_ADDRESS>.c

##.cc-window[aria-label="cookieconsent"] has been made redundant by ##.cc-window
##.social-links has been made redundant by ##[class*="social-links"]
##div[id*="ScriptRootC"] has been made redundant by ##[id*="ScriptRoot"]
##div[id^="MarketGid"] has been made redundant by ##[id*="MarketGid"]
##[id*="ScriptRootC"] has been made redundant by ##[id*="ScriptRoot"]
shareblue.com###heateor_ss_browser_popup_bg has been made redundant by ###heateor_ss_browser_popup_bg
eurogamer.net###newsletter-promo has been made redundant by ###newsletter-promo
tomshardware.com###responsive_ad has been made redundant by ###responsive_ad
economist.com###simplemodal-container has been made redundant by ###simplemodal-container
economist.com###simplemodal-overlay has been made redundant by ###simplemodal-overlay
thebalance.com##.ad-label has been made redundant by ##.ad-label
ratemyprofessors.com##.ad-placement has been made redundant by ##.ad-placement
fastcompany.com,independent.co.uk,thinkprogress.org##.ad-wrapper has been made redundant by ##.ad-wrapper
curbed.com,polygon.com,racked.com,recode.net,sbnation.com,theringer.com,theverge.com,vox.com##.c-related-list has been made redundant by ##.c-related-list
codeproject.com##.cc-window has been made redundant by ##.cc-window
realclearpolitics.com##.cc-window has been made redundant by ##.cc-window
longreads.com##.entry-footer has been made redundant by ##.entry-footer
knowyourmeme.com##.fb-share-button has been made redundant by ##.fb-share-button
avclub.com,deadspin.com,earther.com,gizmodo.com,jalopnik.com,jezebel.com,kotaku.com,lifehacker.com,splinternews.com,theinventory.com,theonion.com,theroot.com,thetakeout.com,univision.com##.footer-subscribe has been made redundant by ##.footer-subscribe
curbed.com,polygon.com,racked.com,recode.net,sbnation.com,theringer.com,theverge.com,vox.com##.m-ad has been made redundant by ##.m-ad
clickhole.com,cnet.com,pitchfork.com,thebookoflife.org,thenextweb.com,tinybuddha.com##.newsletter has been made redundant by ##.newsletter
avclub.com,deadspin.com,earther.com,gizmodo.com,jalopnik.com,jezebel.com,kotaku.com,lifehacker.com,splinternews.com,theinventory.com,theonion.com,theroot.com,thetakeout.com,univision.com##.recent-video has been made redundant by ##.recent-video
mirror.co.uk##.social-links has been made redundant by ##[class*="social-links"]
popularmechanics.com##.social-menu has been made redundant by ##.social-menu
forbes.com##.top-ad-container has been made redundant by ##.top-ad-container
dailymail.co.uk##.social-links-title has been made redundant by ##[class*="social-links"]
racked.com###newsletter-signup-short-form has been made redundant by curbed.com,polygon.com,racked.com,recode.net,sbnation.com,theringer.com,theverge.com,vox.com###newsletter-signup-short-form
<IP_ADDRESS> i1.services.social.microsoft.com.nsatc.net has been made redundant by <IP_ADDRESS> i1.services.social.microsoft.com
<IP_ADDRESS> services.social.microsoft.com.nsatc.net has been made redundant by <IP_ADDRESS> services.social.microsoft.com
<IP_ADDRESS> choice.microsoft.com.nsatc.net has been made redundant by <IP_ADDRESS> choice.microsoft.com
<IP_ADDRESS> oca.telemetry.microsoft.com.nsatc.net has been made redundant by <IP_ADDRESS> oca.telemetry.microsoft.com
<IP_ADDRESS> sqm.telemetry.microsoft.com.nsatc.net has been made redundant by <IP_ADDRESS> sqm.telemetry.microsoft.com
<IP_ADDRESS> telecommand.telemetry.microsoft.com.nsatc.net has been made redundant by <IP_ADDRESS> telecommand.telemetry.microsoft.com
<IP_ADDRESS> telemetry.microsoft.com.nsatc.net has been made redundant by <IP_ADDRESS> telemetry.microsoft.com
<IP_ADDRESS> watson.telemetry.microsoft.com.nsatc.net has been made redundant by <IP_ADDRESS> watson.telemetry.microsoft.com
<IP_ADDRESS> dq95d35.com  has been made redundant by <IP_ADDRESS> dq95d35.com
<IP_ADDRESS> endurableshop.com^ has been made redundant by <IP_ADDRESS> endurableshop.com
<IP_ADDRESS> obscenesidewalk.com  has been made redundant by <IP_ADDRESS> obscenesidewalk.com
<IP_ADDRESS> shallowsmile.com  has been made redundant by <IP_ADDRESS> shallowsmile.com
<IP_ADDRESS> sinceresofa.com  has been made redundant by <IP_ADDRESS> sinceresofa.com
<IP_ADDRESS> smilingwaves.com  has been made redundant by <IP_ADDRESS> smilingwaves.com
<IP_ADDRESS> advertisementafterthought.com has been made redundant by /advertisement/
||kinja.com/api/analytics/ has been made redundant by /api/analytics/
||youtube.com/api/stats/qoe? has been made redundant by /api/stats/
youtube.###ticker-content has been made redundant by youtube.###ticker

hello?


Any commands ran by "Admin.RunCommand" will target every players regardless of the argument.

Version channel
Stable (Default)
Loader version
249
What part of Adonis is this related to?
Command
What happened?
Whenever a command is ran through Admin.RunCommand gets run, the service.GetPlayers function will always return every player present on the server.
This is likely caused by line 515 in the Functions script that just returns all players if the "plr" argument is nil.
The commands affected are:

AFK
BreakDance
NoClip
Noobify
Ghostify
Shrek
LoopFling
Deadlands

And probably many others (basically any commands that use Admin.RunCommand over Commands.COMMAND.Function)
Relevant log output
No response

A temporary but stupid fix is replacing line 1193 in Admin.lua by end, false, args), however a better fix would be using a fake player, but to be honest I don't want to look too deep into it, as the RunCommand function doesn't seem to be used that often, and should be replaced by either Commands.COMMAND.Function or Admin.RunCommandAsPlayer in all of the concerned commands.
You can achieve the temporary fix via a plugin that replaces Admin.RunCommand:
return function(Vargs)
	Vargs.Server.Admin.RunCommand = function(coma: string, ...)
		local _, com = Admin.GetCommand(coma)
		if com then
			local cmdArgs = com.Args or com.Arguments
			local args = Admin.GetArgs(coma, #cmdArgs, ...)

			Vargs.Service.TrackTask(`Command: {coma}`, com.Function, function(err)
				warn(`Encountered an error while running a command: {coma}\n{err}\n{debug.traceback()}`)
			end, false, args) -- no idea how bad of an idea this is lol
		end
	end;
end

Definitely agreeing that Admin.RunCommand should be replaced for alternatives like Admin.RunCommandAsPlayer instead. For now, I've made a quick PR that resolves the issue by using false instead of nil.
A future PR that migrates over to better alternatives will probably be done for the long run.


storage: use buckets in BoltDB backend

Splitting 1-byte prefix seems to increas restore time by about  25% under heavy workload. However this difference is actually flat 25s gained only during first persist cycle (on master branch it takes 25s, while here it takes 1s). When restoring is done from the 10-th block, running times don't differ at all. Same thing with KeepOnlyLatestState: true.
Single-node benchmark performance difference is negligible.

Keys in bucket aren't stripped because it is prohibited to put empty key in bucket. With stripping implementation will become more complicate and I expect no performance gains because of the need to append prefix in Seek.
Some other bucketing strategies can be discussed, however it is obvious that most of the load is due to MPT.
Stats regarding keys in DB for this bench (100 blocks, 10k tx per block, single storage.Put for the same contract per tx):

DataMPT (stores MPT nodes) contains ~4M keys. Splitting this into another 256 buckets decreases B-tree depth from 4 to 3. The distribution is uniform because keys are hashes, so this makes sense.
DataTransaction and STStorage contain ~1M keys.
Other prefixes contain much less keys.

TODO:

Extend dump generation to include random NEO + GAS transfers.
Check if creating separate buckets for frequently used contracts (NEO, GAS) affects running time.
Use sub buckets for MPT.

Moving NEO/GAS contract storage to a separate bucket also doesn't affect restore time.

OK, I've played with it a little and no matter what I do nothing really changes, it's all at the level of test tolerance. So just adding buckets doesn't magically improve performance and thus it's not worth doing.


Race condition with avatar animations ?

Reported by @Donorhan
I made a minimalist world to repro.
Apparently, it works fine every time on first world launch.
But after a publish action, sometimes it works, and sometimes it doesn't.
https://github.com/user-attachments/assets/40ce47d1-bfef-4b6a-8cbe-c6c5170343a8

-- This is Cubzh's default world script.
-- We'll provide more templates later on to cover specific use cases like FPS games, data storage, synchornized shapes, etc.
-- Cubzh dev team and devs from the community will be happy to help you on Discord if you have questions: discord.gg/cubzh

Config = {
    -- using item as map
    Map = "aduermael.hills",
    -- items that are going to be loaded before startup
    Items = {
        "jacksbertox.crate"
    }
}

local CRATE_START_POSITION = Number3(382, 290, 153)

-- Client.OnStart is the first function to be called when the world is launched, on each user's device.
Client.OnStart = function()

    -- Setting up the ambience (lights)
    -- other possible presets:
    -- - ambience.dawn
    -- - ambience.dusk
    -- - ambience.midnight
    -- The "ambience" module also accepts
    -- custom settings (light colors, angles, etc.)
    local ambience = require("ambience")
    ambience:set(ambience.noon)

    -- The sfx module can be used to play spatialized sounds in one line calls.
    -- A list of available sounds can be found here:
    -- https://docs.cu.bzh/guides/quick/adding-sounds#list-of-available-sounds
    sfx = require("sfx")
    -- There's only one AudioListener, but it can be placed wherever you want:
    Player.Head:AddChild(AudioListener)

    -- Requiring "multi" module is all you need to see other players in your game!
    -- (remove this line if you want to be solo)
    require("multi")

    -- This function drops the local player above the center of the map:
    dropPlayer = function()
        Player.Position = Number3(Map.Width * 0.5, Map.Height + 10, Map.Depth * 0.5) * Map.Scale
        Player.Rotation = { 0, 0, 0 }
        Player.Velocity = { 0, 0, 0 }
    end

    -- Add player to the World (root scene Object) and call dropPlayer().
    World:AddChild(Player)
    dropPlayer()

    -- A Shape is an object made out of cubes.
    -- Let's instantiate one with one of our imported items:
    crate = Shape(Items.jacksbertox.crate)
    World:AddChild(crate)
    crate.Physics = PhysicsMode.StaticPerBlock
    -- By default, the pivot is at the center of the bounding box,
    -- but since want to place this one with ground positions, let's
    -- move the pivot to the bottom:
    crate.Pivot.Y = 0
    crate.Position = CRATE_START_POSITION
    crateOwner = nil

    -- USER INTERFACE (buttons & labels)
    -- What can be seen as a 2D layer on top of your app is in fact built
    -- with the same features as all the rest (Shapes, Texts, Quads, Rays, etc.),
    -- but rendered with an orthographic camera.
    -- That's what "uikit" module does, here's how to use it:

    local uikit = require("uikit")
    local margin = 8

    -- Adding a button to change the ambience (light, fog)
    local btn = uikit:createButton("Noon")
    local ambiences = {
        {name = "Dawn", value = ambience.dawn},
        {name = "Noon", value = ambience.noon},
        {name = "Dusk", value = ambience.dusk},
        {name = "Midnight", value = ambience.midnight},
        -- The ambience module allows to define custom ambiences like this:
        {name = "Crazy", value = {
            sky = { skyColor = Color(0,0,255), horizonColor = Color(255,0,0), abyssColor = Color(0,255,0), lightColor = Color(30,186,108) },
            fog = { near = 100, far = 500, color = Color(194, 0, 62) }}}
    }
    local currentAmbience = 2
    -- It's a good habit to place uikit elements within parentDidResize() callbacks,
    -- because elements usually need to be re-positioned when the window is resized
    -- or screen rotated.
    btn.parentDidResize = function()
        btn.pos.X = margin
        btn.pos.Y = Screen.Height - Screen.SafeArea.Top - btn.Height - margin
    end
    -- Calling parentDidResize manually once to place elements:
    btn:parentDidResize()
    -- onRelease is called after click/touch down & up events on the button:
    btn.onRelease = function()
        currentAmbience = currentAmbience + 1
        if currentAmbience > #ambiences then currentAmbience = 1 end
        ambience:set(ambiences[currentAmbience].value)
        btn.Text = ambiences[currentAmbience].name
    end

    -- Adding a label to display number of jumps:
    nbJumps = 0
    jumpsLabel = uikit:createText("Jumps: " .. nbJumps, Color.White)
    -- We want the label position to be updated whenever its parent or content is resized.
    -- Instead of defining that twice, let's create a function:
    local updateLabelPosition = function()
        jumpsLabel.pos.X = Screen.Width - Screen.SafeArea.Right - jumpsLabel.Width - margin
        jumpsLabel.pos.Y = Screen.Height - Screen.SafeArea.Top - jumpsLabel.Height - margin
    end
    jumpsLabel.parentDidResize = updateLabelPosition
    jumpsLabel.contentDidResize = updateLabelPosition
    -- call updateLabelPosition() now for initial placement.
    updateLabelPosition()
end

-- jump function, triggered with Action1
-- (space bar on PC, button 1 on mobile)
Client.Action1 = function()
	local avatar = require("avatar")
	local npc = avatar:get({
            defaultAnimations = true,
            didLoad = function(err)
                --npc.Animations.Walk.Loop = true
                --npc.Animations.Walk:Play()
            end
        })
    npc.Animations.Walk:Play()

	World:AddChild(npc)
	npc.Position = Player.Position + Number3(0,15,0)

--    if Player.IsOnGround then
--        Player.Velocity.Y = 100
--        nbJumps = nbJumps + 1
--        jumpsLabel.Text = "Jumps: " .. nbJumps
--        sfx("hurtscream_1", {Position = Player.Position, Volume = 0.4})
--    end
end

-- Client.Tick is executed up to 60 times per second on player's device.
Client.Tick = function(_)
    -- Detect if player is falling and use dropPlayer() when it happens!
    if Player.Position.Y < -500 then
        dropPlayer()
        -- It's funnier with a message.
        Player:TextBubble("💀 Oops!", true)
    end
end

-- Triggered when posting message with chat input
Client.OnChat = function(payload)
    -- <0.0.52 : "payload" was a string value.
    -- 0.0.52+ : "payload" is a table, with a "message" key
    local msg = type(payload) == "string" and payload or payload.message

    Player:TextBubble(msg, 3, true)
    sfx("waterdrop_2", {Position = Player.Position, Pitch = 1.1 + math.random() * 0.5})

    -- We can modify the message before it is sent.
    -- payload.message = payload.message .. " my suffix"

    -- If true is returned, the payload is "consumed".
    -- This prevents it to be sent to others.
    -- return true
end

-- Pointer.Click is called following click/touch down & up events,
-- without draging the pointer in between.
-- Let's use this function to add a few interactions with the scene!
Pointer.Click = function(pointerEvent)

    -- Cast a ray from pointer event,
    -- do different things depending on what it hits.
    local impact = pointerEvent:CastRay()
    if impact ~= nil then
        if impact.Object == Player then
            -- clicked on local player -> display message + little jump
            Player:TextBubble("Easy, I'm ticklish! 😬", 1.0, true)
            sfx("waterdrop_2", {Position = Player.Position, Pitch = 1.1 + math.random() * 0.5})
            Player.Velocity.Y = 50

        elseif impact.Object == Map and impact.Block ~= nil then
            -- clicked on Map block -> display block info

            -- making an exception if player is holding the crate to place it
            if crateEquiped and crateOwner == Player.ID and impact.FaceTouched == Face.Top then
                -- The position of the impact can be computed from the origin of the ray
                -- (popointerEvent.Position here), its direction (pointerEvent.Direction),
                -- and the distance:
                local impactPosition = pointerEvent.Position + pointerEvent.Direction * impact.Distance

                Player:EquipRightHand(nil)
                World:AddChild(crate)
                crate.Physics = PhysicsMode.StaticPerBlock
                crate.Scale = 1
                crate.Pivot.Y = 0
                crate.Position = impactPosition
                crateEquiped = false

                -- send event to inform server and other players that
                -- crate as been placed. Of course this code is not
                -- needed if you turn off multiplayer.
                local e = Event()
                e.action = "place_crate"
                e.owner = Player.ID
                e.pos = crate.Position
                e:SendTo(Server, OtherPlayers)

                sfx("wood_impact_1", {Position = crate.Position})

                crateOwner = nil

                return
            end

            local b = impact.Block
            local t = Text()
            t.Text = string.format("coords: %d,%d,%d\ncolor: %d,%d,%d",
                                b.Coords.X, b.Coords.Y, b.Coords.Z,
                                b.Color.R, b.Color.G, b.Color.B)
            t.FontSize = 44
            t.Type = TextType.Screen -- display text in screen space
            t.BackgroundColor = Color(0,0,0,0) -- transparent
            t.Color = Color(255,255,255)
            World:AddChild(t)

            local blockCenter = b.Coords + {0.5,0.5,0.5}
            -- convert block coordinates to world position:
            t.Position = impact.Object:BlockToWorld(blockCenter)

            -- Timer to request text removal in 1 second
            Timer(1.0, function()
                t:RemoveFromParent()
            end)

        elseif not crateEquiped and impact.Object == crate then
            if impact.Distance < 80 then

                crate.Physics = PhysicsMode.Disabled
                Player:EquipRightHand(crate)
                crate.Scale = 0.5
                crateEquiped = true
                crateOwner = Player.ID

                -- inform server and other players
                -- that crate has been picked
                local e = Event()
                e.action = "picked_crate"
                e:SendTo(Server, OtherPlayers)

                sfx("wood_impact_5", {Position = crate.Position, Pitch = 1.2})

            else
                Player:TextBubble("I'm too far to grab it!", 1, true)
                sfx("waterdrop_2", {Position = Player.Position, Pitch = 1.1 + math.random() * 0.5})
            end
        end
    end
end

-- This function is executed on each user's device
-- when an event arrives, from another player or server.
Client.DidReceiveEvent = function(e)
    if e.action == "picked_crate" then
        crate.Physics = PhysicsMode.Disabled
        e.Sender:EquipRightHand(crate)
        crateOwner = e.Sender.ID
        crate.Scale = 0.5
        crateEquiped = true
        sfx("wood_impact_1", {Position = crate.Position})

    elseif e.action == "set_crate_owner" then
        local p = Players[e.owner]
        if p then
            crate.Physics = PhysicsMode.Disabled
            e.Sender:EquipRightHand(crate)
            crateOwner = e.Sender.ID
            crate.Scale = 0.5
            crateEquiped = true
            sfx("wood_impact_1", {Position = crate.Position})
        end

    elseif e.action == "place_crate" then
        if crateOwner ~= nil then
            local p = Players[crateOwner]
            if p then
                p:EquipRightHand(nil)
            end
            crateOwner = nil
        end
        World:AddChild(crate)
        crate.Physics = PhysicsMode.StaticPerBlock
        crate.Scale = 1
        crate.Pivot.Y = 0
        crate.Position = e.pos
        crateEquiped = false
        sfx("wood_impact_5", {Position = e.pos, Pitch = 1.2})

    elseif e.action == "message" then
        print(e.Sender.Username .. ": " .. e.message)
        e.Sender:TextBubble(e.message, 3, true)
        sfx("waterdrop_2", {Position = e.Sender.Position, Pitch = 1.1 + math.random() * 0.5})
    end
end

-----------------
-- Server code --
-----------------

-- Function executed when the server starts.
Server.OnStart = function()
    cratePosition = CRATE_START_POSITION
    crateOwner = nil
end

-- All we need to do on the server is remember who's
-- carrying the crate, or where it is currently placed,
-- to inform newcomers.
Server.DidReceiveEvent = function(e)
    if e.action == "picked_crate" then
        -- print(e.Sender.Username .. " has the crate")
        crateOwner = e.Sender.ID
    elseif e.action == "place_crate" then
        cratePosition = e.pos
        crateOwner = nil
    end
end

-- Executed when players are joining.
Server.OnPlayerJoin = function(player)
    if crateOwner == nil then
        local e = Event()
        e.action = "place_crate"
        e.pos = cratePosition
        e:SendTo(player)
    else
        local e = Event()
        e.action = "set_crate_owner"
        e.owner = crateOwner
        e:SendTo(player)
    end
end

-- if player carryoing the crate leaves,
-- we should place the crate back where it's been picked.
Server.OnPlayerLeave = function(player)
    if crateOwner ~= nil and player.ID == crateOwner then
        local e = Event()
        e.action = "place_crate"
        e.pos = cratePosition
        e:SendTo(Players)
        crateOwner = nil
    end
end

-- Server.Tick is executed up to 60 times per second on the server.
Server.Tick = function(dt)
    -- nothing needed here in that script
end

Simpler repro code:
Client.OnStart = function() end

Client.Action1 = function()
    local avatar = require("avatar")
    local npc = avatar:get({
        defaultAnimations = true,
        didLoad = function()
        end,
    })
    npc.Animations.Walk:Play()

    World:AddChild(npc)
    npc.Position = Camera.Position + Camera.Forward * 40 + Number3(0, -15, 0)
end


fix: adjust condor templates XDM schemas

This PR moves the _adobe_corpnew.digitalData.hemingway namespace in the schema to _adobe_corpnew.digitalData.asset.assetInfo to align with the existing mapping in the backend.
Test URLs:

Before: https://stage--express--adobecom.hlx.page/express/templates/flyer/christmas
After: https://adjust-condor-templates--express--adobecom.hlx.page/express/templates/flyer/christmas

@ramboz  good to get this merged?

Yes, all good on my end 👍🏼


Add company contributions for the Auto Enrolment

Quote from a Reddit comment:

Auto-enrolment might be a bad name for that input, auto-enrolment is just how you enrolled with some minimum contributing amounts
The minimum contributions amounts are a total of at least 8% with 3% coming from employer on earnings between £6,240 and £50,270

Need to add support to also calculate the employer contributions, and emoployer/employee contribution percentages need to be separate inputs.

Only had a quick look so this might be covered by the above but, my pension contribution is a percentage rather than fixed amount, if that's not covered by the above, could we please get the option for percentage.

Your pension contribution will be calculated with the auto-enrolment box input which is in %, but I guess it has a terrible name. I will change that. Apparently I've not done enough research on pensions!
A new input box is needed for the employer contribution/match.

My employer makes an automatic contribution to the company pension. This doesn't come out of my salary, it is separate and on top of my salary. Is there a place to include this in the website? I guess it's free from tax so is essentially separate from any tax calculations. Would still be cool to see it included in the overall money received.

@jrothlis Yep, this is exactly what this issue is about!
The thing is, I actually spent a couple of days looking into pension schemes and contribution types, and I know even less than before I started my research. It turned out to be super complicated with different types of contributions, pension plan types, funding sources, and reliefs. I think I might have to consult a pension / tax advisor before doing any more work here... Or I could add this functionality and worry about the rest later.


index.html.md:194: Create the problem, solution and...

The puzzle 18-4441ee8f from #18 has to be resolved:
https://github.com/raboley/the-heroes-journey/blob/0bf6429da363dcfbc82551585f411b90b51fb1d1/source/index.html.md#L194-L194
The puzzle was created by @raboley on 05-Jul-20.
Estimate: 15 minutes,  role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

The puzzle 18-4441ee8f has disappeared from the source code, that's why I closed this issue.


Remove duplicate access log entries

After getting some advice over at https://github.com/nginxinc/docker-nginx/issues/39#issuecomment-137470214, I managed to fix this issue.
Fixes #216

cc/ @wader @jgallen23

awesome!  thanks @md5

nice, thanks @md5. Closed my PR.

Ping @jwilder

Thanks @md5!

:+1:


Properly record stack traces

I really like this library, but it has caused me some headaches related to network errors. Continuations are resumed with the Exception thrown by OkHttp, but unfortunately that Exception contains no indication about where the network request was started. This is because OkHttp internally uses a thread pool and thus the stack trace only includes internal OkHttp code.
This PR changes the await function to record the current stacktrace before enqueuing the request. In case of receiving an Exception from OkHttp, it is set as the cause of the previously recorded stack trace.
The resulting stacktrace looks like this (note the CallAwaitTest.kt:24!):
java.io.IOException: Exception occurred while awaiting Call.
	at ru.gildor.coroutines.okhttp.CallAwaitKt.await(CallAwait.kt:18)
	at ru.gildor.coroutines.okhttp.CallAwaitKt.await$default(CallAwait.kt:17)
	at ru.gildor.coroutines.okhttp.CallAwaitTest$awaitExceptionRecorded$1.doResume(CallAwaitTest.kt:24)
	at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resume(CoroutineImpl.kt:42)
	at kotlinx.coroutines.experimental.DispatchedKt.resumeCancellable(Dispatched.kt:224)
	at kotlinx.coroutines.experimental.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:29)
	at kotlinx.coroutines.experimental.CoroutineStart.invoke(CoroutineStart.kt:109)
	at kotlinx.coroutines.experimental.AbstractCoroutine.start(AbstractCoroutine.kt:166)
	at kotlinx.coroutines.experimental.BuildersKt__BuildersKt.runBlocking(Builders.kt:44)
	at kotlinx.coroutines.experimental.BuildersKt.runBlocking(Unknown Source)
	at ru.gildor.coroutines.okhttp.CallAwaitTestKt.testBlocking(CallAwaitTest.kt:101)
	at ru.gildor.coroutines.okhttp.CallAwaitTestKt.access$testBlocking(CallAwaitTest.kt:1)
	at ru.gildor.coroutines.okhttp.CallAwaitTest.awaitExceptionRecorded(CallAwaitTest.kt:20)
[...]
Caused by: java.io.IOException
	at ru.gildor.coroutines.okhttp.CallAwaitTest$client$1.intercept(CallAwaitTest.kt:89)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
	at okhttp3.RealCall$AsyncCall.execute(RealCall.java:147)
	at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Before the change, it used to be simply:
Caused by: java.io.IOException
	at ru.gildor.coroutines.okhttp.CallAwaitTest$client$1.intercept(CallAwaitTest.kt:89)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
	at okhttp3.RealCall$AsyncCall.execute(RealCall.java:147)
	at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Since of course recording a stack trace causes a very minor performance cost and the original Exception is now only the cause, this behavior can be disabled using an optional parameter to await.
While I was already working on the library anyway, I also updated the versions of its dependencies.

Also, in case you're ok with this change, I'd be glad to contribute it as well for your Retrofit library.

I will update okhttp with some chages and Kotlin 1.3 and will than check your pull request

Just FYI, if you update OkHttp, you'll need to change your test to include this: .body(ResponseBody.create(null, ByteArray(0))) as done by this PR as well.
Thanks in advance for checking my PR!

@cbruegg Thanks for your PR, I released version 1.0 to bintray without your changes but  I think that recording of stacktraces maybe beneficial for many users of okhttp.
My only concern, that I wouldn't enable by default and probably provide some API to enable it by default (similar to kotlinx.coroutine debug mode).  I plan to work on it today or tomorrow
Thanks again

Thanks for your feedback! That's a valid point. Although actually, I'd
recommend testing first whether this problem still exists when coroutines
debug mode is turned on. I'll try and take a look later today.
Andrey Mischenko<EMAIL_ADDRESS>schrieb am So., 17. März 2019,
04:41:

@cbruegg https://github.com/cbruegg Thanks for your PR, I released
version 1.0 to bintray without your changes but I think that recording of
stacktraces maybe beneficial for many users of okhttp.
My only concern, that I wouldn't enable by default and probably provide
some API to enable it by default (similar to kotlinx.coroutine debug mode).
I plan to work on it today or tomorrow
Thanks again
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/gildor/kotlin-coroutines-okhttp/pull/2#issuecomment-473613290,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAKtPferLh_WEeZV9_P6QlqSn47h_peTks5vXbl-gaJpZM4XD1xR
.

@cbruegg I agree, this is what I want to add to README, that I still want to provide this way to debug requests, I would recommend use coroutines debug mode because it allows you to see suspend point where the exception happened this is usually enough for most cases.
But capturing full stack trace also gives additional info about stack before suspend but also you pay the price of 1 additional exception with stack trace per call, so it's also not free

@cbruegg I'm working on stack recording, you can check the current state on master, I also plan to migrate your tests for stack recording from this PR
Also, I added a section about different ways of debugging to README, so hope it would be helpful
I'm closing your existing PR, if you have some additions please create a new one, I plan to release it in a few days


Create Your First Integration Package and Integration Flow

Tutorial URL: https://developers.sap.com/tutorials/cp-starter-integration-cpi-create-iflow.html
Step 1.
Incorrect description:
Click the Discover tab (pencil icon) to access your workspace.
Should be:
Click the Design tab (pencil icon) to access your workspace.

Hi @jkopcinski ,
Thanks for reaching out to us
We made corrections from our end and it will be updated at the earliest.

Thank you for your feedback. The issue seems to be resolved, so I am closing the issue.
If you still have questions, feel free to reopen the issue.


stripe: Change pricing for plus plan.

This also now allows user to upgrade to plus plan from pricing page.

Do we have test coverage for the new code path of upgrading to Plus directly?

The screenshots look good to me!

Do we have test coverage for the new code path of upgrading to Plus directly?

Oops! Added those for invoice and card payment.

Merged, thanks @amanagr!


Send relevant entities instead of devices in callback

Codecov Report

Merging #1257 (e0ab1e7) into devel (112e9fe) will increase coverage by 0.26%.
The diff coverage is 100.00%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
@@            Coverage Diff             @@
##            devel    #1257      +/-   ##
==========================================
+ Coverage   90.45%   90.71%   +0.26%
==========================================
  Files          49       49
  Lines        5836     5828       -8
==========================================
+ Hits         5279     5287       +8
+ Misses        557      541      -16

Files
Coverage Δ

hahomematic/central/__init__.py
84.74% <100.00%> (+0.22%)
:arrow_up:

hahomematic/platforms/device.py
88.32% <100.00%> (+2.85%)
:arrow_up:

hahomematic/platforms/entity.py
98.17% <100.00%> (-0.31%)
:arrow_down:

hahomematic/platforms/generic/__init__.py
96.66% <ø> (+3.01%)
:arrow_up:

hahomematic/platforms/hub/__init__.py
91.73% <100.00%> (+0.66%)
:arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


WICKET-6714: Fixed regresssion about converting URLs to paths.

During WICKET-6714 a regression has been introduced regarding handling paths with spaces. URL.getFile() doesn't decode URLs with spaces correctly, resulting in wrongly generated paths. While the slashes in the following example are not that much of a problem, "%20" vs. " " is, because only the latter exists in the file system.

/C:/Users/tschoening/Documents/Eclipse/Java%20Sm-Mtg%20bug_2590/de.am_soft.sm_mtg.view.report/build/resources/test/in/_other/./

vs.

C:\Users\tschoening\Documents\Eclipse\Java Sm-Mtg bug_2590\de.am_soft.sm_mtg.view.report\build\resources\test\in\_other\.

The change additionally makes the returned path more in-line with the documented behaviour of that method:

The real path returned will be in a form appropriate to the computer and operating system on which the servlet container is running, including the proper path separators.

I've searched the code base for similar problems and added commits to fix those for your review as well. Feel free to suggest splitting those commits if you think that's necessary. This PR is against wicket-8.x because MASTER doesn't work currently on my Windows.

Many thanks!
Please create a separate issue and pull request for the other improvements.

The fix for the regression has been merged already, the other two commits are separated into individual PRs #414 and #415 for further discussion.


Android APK HTML app title showing up as "0x0"

I'm guessing this is due to https://github.com/devunwired/apktools/issues/14
My AndroidManifest.xml has <application ... android:label="@string/app_name"> and fastlane-plugin-s3 seems to use label attributes to determine the app title to put in the download HTML for Android, but the string name it resolves is "0x0" producing a download page that looks like:

Am I doing something weird by using a resource value reference instead of a hardwired name? Is there a way around this?

This is easy enough to resolve by fetching the title within Fastfile and passing the args:
html_template_params: {
      title: "my title",
},


transparent pixels changing color

This appears to be an ImageMagick issue that I can't quite get a handle on. Since it's not technically your problem, I wouldn't blame you for wanting to fix upstream, but I think I have a workaround that's actually sensible at this level.
Imagine you have a single-pixel image that's rgba(255,255,255,0.5).
Some versions of IM will composite this on your canvas as rgba(255,255,255,0.5). And there was much rejoicing.
Some versions of IM will composite this on your canvas as rgba(127,127,127,0.5), which is boo.
I explicitly set the compositing mode to "copy", and that fixed the issue for me, sprite-packer.js:166:
var convertParams = ['-size', '', 'xc:' + this.options.background, '-strip', '-compose', 'copy'];

http://www.imagemagick.org/script/compose.php
This makes sense for me when I'm working with sprites with a transparent background. But maybe it doesn't make sense if the user specifies a background? Should it be conditional?
if (this.options.background === 'none') { // or transparent?
    convertParams = convertParams.concat(['-compose', 'copy']);
}

Anyway, if you wontfix, feel free to close this issue.
Cheers,
-Beej

Thanks for reporting. From what I see in the documentation you linked, the 'copy' mode should be safe even for solid background. It should have the same effect as the default 'over' mode because the sprites never overlay each other. So your fix makes sense but I have to find a time to test it.


Playwright option "restart:false" doesn't work on last release for electron application.

Hi,
I realize a PoC on CodeceptJS w/ Playwright as helper and my application is an Electron application.
I need to use parameter "restart" but it doesn't work since version 3.1.0 and still doesn't work in last version.
I tried to downgrade but that doesn't resolve my issue. And I don't find answer on Slack channel.
Someone is or has been in my situation and find a solution ?
Thank you in advence.

Sorry, there is no way to test electron app without restarting it.


CLDC-3547: Validate against incomplete schemes being used in logs

This doesn't currently include a script to clear data on logs that currently use an incomplete scheme (and have been allowed to do so because weirdly it does have active locations). There are a few hundred of these, all linked to one of 3 schemes - I've raised with Rachel that we should probably start by giving users the opportunity to complete the schemes as that would fix the problem and clearing data on logs would mean they had a lot to manually re-enter. Will hold off on any scripts until that's resolved.


Starting multiple Stargate nodes with C* 3.11 may experience schema disagreement

When starting 2 or more stargate nodes at the same time while using C* 3.11 as the backend there is a potential for schema disagreement which manifests as
ERROR [Native-Transport-Requests-1] 2021-03-25 20:24:03,774 QueryMessage.java:129 - Unexpected error during query
java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.apache.cassandra.exceptions.ConfigurationException: Column family ID mismatch (found 0a8bac40-8da8-11eb-b9d6-3784f6de5a75; expected 0a7a9540-8da8-11eb-a6b7-cf8e2a7d4c99)
	at org.apache.cassandra.utils.FBUtilities.waitOnFuture(FBUtilities.java:443)
	at org.apache.cassandra.service.MigrationManager.announce(MigrationManager.java:572)
	at org.apache.cassandra.service.MigrationManager.announceNewColumnFamily(MigrationManager.java:369)
	at org.apache.cassandra.service.MigrationManager.announceNewColumnFamily(MigrationManager.java:354)
	at org.apache.cassandra.service.MigrationManager.announceNewColumnFamily(MigrationManager.java:349)
	at org.apache.cassandra.cql3.statements.CreateTableStatement.announceMigration(CreateTableStatement.java:89)
	at org.apache.cassandra.cql3.statements.SchemaAlteringStatement.execute(SchemaAlteringStatement.java:123)
	at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:225)
	at io.stargate.db.cassandra.impl.StargateQueryHandler.process(StargateQueryHandler.java:160)
	at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:116)
	at io.stargate.db.cassandra.impl.CassandraPersistence$CassandraConnection.lambda$executeRequestOnExecutor$0(CassandraPersistence.java:439)
	at io.stargate.db.cassandra.impl.CassandraPersistence.lambda$runOnExecutor$1(CassandraPersistence.java:271)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:165)
	at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:113)
	at java.lang.Thread.run(Thread.java:748)

Needs more investigation but at first glance this appears to be related to multiple stargate nodes starting at once and all trying to create the keyspace for table based auth. A potential work around is to start stargate with -Dstargate.auth_tablebased_init=false to avoid this issue with concurrent schema changes in 3.11.

We saw exactly this when we were first deploying against a multi-node 3.11 cluster. -Dstargate.auth_tablebased_init=false did indeed prevent the schema disagreements happening.

Workaround exists and C* 3.11 persistence is deprecated. Closing as won't fix.


TypeError when err.response is undefined in http-manager

Hit an uncaught exception reading err.response.body when err.response is undefined in http-manager.
https://github.com/thelinmichael/spotify-web-api-node/blob/master/src/http-manager.js#L34

I'll open a PR

Same issue here using https://flows.nodered.org/node/node-red-contrib-spotify


Explain project-scoped feed authentication

The task does support project-scoped feeds but it doesn't explain how. Support was merged into the task in https://github.com/microsoft/azure-pipelines-tasks/pull/10657 but the docs were not updated. Looking at the changes in that PR it seems that you can prefix feednames with the project name and a forward slash, is that correct? Like this:
- task: PipAuthenticate@1
  inputs:
    artifactFeeds: projectName/feedName

I also needed to manually add the "project-scoped build service" user to the feed permissions as a Reader to resolve this error:
https://pkgs.dev.azure.com:443 "GET /<organization>/<project>/_packaging/<feed>/pypi/simple/pip/ HTTP/1.1" 403 367
Status code 403 not in (200, 203, 300, 301)
Could not fetch URL<EMAIL_ADDRESS>403 Client Error: Forbidden - User '<guid>' lacks permission to complete this action. You need to have 'ReadPackages'. (DevOps Activity ID: DA44B94C-8794-4153-A26C-A2D440EFBF82) for url: https://pkgs.dev.azure.com/<organization>/<project>/_packaging/<feed>/pypi/simple/pip/ - skipping

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

ID: 77227c6d-c042-d4b9-9801-ecb3547e1c33
Version Independent ID: af8571a9-604a-6cf7-43ea-a714c42b95e7
Content: Python Pip Authenticate - Azure Pipelines
Content Source: docs/pipelines/tasks/package/pip-authenticate.md
Product: devops
Technology: devops-cicd
GitHub Login: @chasewilson
Microsoft Alias: phwilson

I can see how you would label this as doc enhancement but I think you should also update the default permissions for new project scoped feeds. They don't work out of the box.

@Korijn Apologizes for the delayed response and thank you for your feedback. The issue has been addressed and yes, you are correct: project scoped feeds must use the following syntax projectName/feedName and add permissions to the build service.


Reg Part 1: External users can't upload stat dec docs [8]

Describe the Bug:
External users are unable to upload statutory declaration documents as part of the Registration Part 1 flow because our next server now has a body size limit of 1 MB, which isn't large enough for document upload.
Probability (how likely the bug is to happen, scored from 1-5): 4
(For example, probability of 5 is something like "it happens to all users every time they log in."
Probability of 1 "only happens to certain users when a really specific and unlikely path is followed.")
Effect (how bad the bug is when it does happen, scored from 1-5): 4
(For example, effect of 5 is "the entire app crashes and makes it unusable for all users" or "the bug causes the wrong data to be saved, with critical information (e.g. payment) being affected."
Effect of 1 is "It makes some styling look a little bit weird.")
Steps to reproduce the behaviour:

Try to upload a statutory declaration document (in Operations tile) larger than 1 MB file size
Fail.

Screenshots:
Additional information:

have received report that it's currently affecting 1 operator

Error log from frontend pod:
h [Error]: Body exceeded 1 MB limit.
To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/functions/server-actions#size-limitation
at /usr/src/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:7358
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async rm (/usr/src/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:6342)
at async rq (/usr/src/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:18:1249)
at async doRender (/usr/src/app/node_modules/next/dist/server/base-server.js:1395:30)
at async cacheEntry.responseCache.get.routeKind (/usr/src/app/node_modules/next/dist/server/base-server.js:1556:28)
at async NextNodeServer.renderToResponseWithComponentsImpl (/usr/src/app/node_modules/next/dist/server/base-server.js:1464:28)
at async NextNodeServer.renderPageComponent (/usr/src/app/node_modules/next/dist/server/base-server.js:1861:24)
at async NextNodeServer.renderToResponseImpl (/usr/src/app/node_modules/next/dist/server/base-server.js:1899:32)
at async NextNodeServer.pipeImpl (/usr/src/app/node_modules/next/dist/server/base-server.js:912:25) {
statusCode: 413
}

initial findings: in dev I wasn't able to upload a 1MB PDF file (got the same error message in dev as above); a 50KB PDF file upload was successful but slow (approx. 5 seconds)
the bug that the external user reported was that the "Submit" button is greyed out for them, which is the only UI indicator we have that the file is in the process of being uploaded. Maybe the upload is timing out on file sizes that should be considered reasonable?

~Maybe this became a problem when we moved to Next 14?

https://github.com/vercel/next.js/discussions/57973
https://github.com/vercel/next.js/discussions/53989


Update ed25519-hash-custom-keccak.h

No, using -I passed to gcc to specify the include paths during the build should work.


Add new backends & support multi-modal LM

We add new backend kernels (W4A16 GEMM / GEMV) for better inference speed. We also support multi-modal models (VILA and LLaVA) in this PR.
Note: We changed the weight packing format in this PR. Please re-quantize the model or use tinychat/offline-weight-repacker.py to repack the old awq checkpoints.

@ys-2020 how much inference speed improvements for batch=1 and GEMV by introducing this new kernel?


How to tell RichTextFX to apply a style to what is about to be typed?

If you load up most rich text editors such as Microsoft word you can toggle the bold button and then start typing in bold text. You can then deselect the bold button and continue typing in regular text.
In my own editor, segments are styled with a TextStyle which uses Optionals for bold, itallic and so on (pretty much used the structure the richtextdemo uses). Here is what I've tried:
When the user clicks the bold button, we change the initialSegStyle of the GenericTextArea with initialSegStyle.bold = style.bold and then request focus back into the text area.
This so far works:

Now if I deselect bold, I'm expecting all previous text to stay bold and when I start typing the text will be normal. This happens instead:

Upon typing a letter (a in this case) the entire paragraph becomes regular. Likewise I can now press the bold button and type anything for it all to become bold again.
Some suggestions on how to implement this would be great!

The problem is that you are actually changing the style object that is being applied to the previously type text. To change the style of future text without affecting past text you need to assign a new style object. Maybe something like this:
initialSegStyle = initialSegStyle.copy();  // first replace segment style with new style object
initialSegStyle.bold = style.bold;

or like this: initialSegStyle = initialSegStyle.updateBold( style.bold ); where updateBold is:
public TextStyle updateBold( boolean boldValue ) {
    return new TextStyle( boldValue, italic, underline, strikethrough, fontSize, fontFamily, textColor, backgroundColor );
}

I wasn't able to get it to work for a while. Looked into the code and saw I could set:
useInitialStyleForInsertion = true
Which looks like it would do the job, but it doesn't looks like initialTextStyle has any public setters and it is final, so I am unable to do initialTextStyle= initialTextStyle.updateBold( style.bold );.
I was however able to set textInsertionStyle = style which appears to have given me the functionality I wanted.

Yeah, the formal method for that is setTextInsertionStyle( style )


Recurrence fails if tasks has dataview fields in it

Please check that this issue hasn't been reported before.

[X] I searched previous Bug Reports didn't find any similar reports.

Expected Behavior
When I complete a task that has dataview fields in it, like this:
- [ ] test 🔁 every week on Monday when done 📅 2023-08-23 [something:: else]

the task is completed, but a new task is not created.
If you remove the dataview field, recurrence works normally and a new task with an appropriate due date is created.
Current behaviour
A new task should be created and it should inherit all dataview fields
Steps to reproduce
Take this task:
- [ ] test 🔁 every week on Monday when done 📅 2023-08-23 [something:: else]

and complete it. It will not create a new iteration.
If you uncomplete it, remove the dataview field and complete it again, it should create the new task just fine.
Which Operating Systems are you using?

[ ] Android
[ ] iPhone/iPad
[ ] Linux
[X] macOS
[ ] Windows

Obsidian Version
1.3.7 (Installer 1.1.9)
Tasks Plugin Version
4.5.0
Checks

[X] I have tried it with all other plugins disabled and the error still occurs

Possible solution
No response

Hi @stoilis,
You don't say what your settings are, but I'll assume it's Tasks emoji format.
Your options are:

convert everything to dataview format
put all dataview fields before the tasks fields

Please could you have a read of these sections of the documentation, and then you will see that this is the current documented behaviour.

https://publish.obsidian.md/tasks/Getting+Started/Auto-Suggest#What+do+I+need+to+know+about+the+order+of+items+in+a+task%3F
https://publish.obsidian.md/tasks/Reference/Task+Formats/About+Task+Formats
https://publish.obsidian.md/tasks/Reference/Task+Formats/Tasks+Emoji+Format
https://publish.obsidian.md/tasks/Reference/Task+Formats/Dataview+Format

There are some links to known issues - I think you will find that this behaviour is written up - so please up-vote the relevant feature requests. Many thanks.

Thank you for letting me know - I’m glad you got it working. I hope that the plugin will become more flexible in future, but there is just a lot of requests still to do….


All previous used categories do not show up in category dropdown list

I created new events in June & July all with categories.  Categories showed up in the categories dropdown list when I was adding the events.  Then I created new events for August and there are no categories in the categories dropdown list.

The category dropdown list should be populated only by categories for existing events in the current view frame. Were there already events created in August when you started creating new events?

No.
So you are saying that by design I have to recreate my events when they have been used previously in a prior view frame?  They should be persistent.
___________
Dan Doenges
952-240-0967
From: hajohns<EMAIL_ADDRESS>Sent: Wednesday, June 29, 2016 9:43 AM
To: Microsoft/vsts-team-calendar<EMAIL_ADDRESS>Cc: Doenges, Dan<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [Microsoft/vsts-team-calendar] All previous used categories do not show up in category dropdown list (#74)
The category dropdown list should be populated only by categories for existing events in the current view frame. Were there already events created in August when you started creating new events?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/vsts-team-calendar/issues/74#issuecomment-229378022, or mute the threadhttps://github.com/notifications/unsubscribe/ATRapVahdzSAjZx0EdwRLNx7JMk7Wt_Tks5qQoSAgaJpZM4JBM6Z.

CONFIDENTIAL-

This email and any files transmitted with it are confidential, and may also be legally privileged. If you are not the intended recipient, you may not review, use, copy, or distribute this message. If you receive this email in error, please notify the sender immediately by reply email and then delete this email.


Add jest runner for go tests

Just wanted to share this with you, tested out how to add a jest test runner for go and how it performs, here are the results:

Current: 8.27s total execution time
Jest Runner: 163.44s total execution time

So, yeah, you were right 🤷♂

Well, at least a good experiment :thumbsup:


Regarding Device Rooted Issue

Hi
I have installed rootbeer sample app from playstore  in multiple device ,  I have found an issue in my device that's occurring device rooted. But when I integrate code in our app and handling condition then its not rooted on same device.
I have implemeted below code , but  always gets else condition found. but playstore apps find rooted. pls check screen shots and code.
val rootBeer = RootBeer(this)
if (rootBeer.isRooted) {
//we found indication of root
println("====>" +"Rooted ")
} else {
//we didn't find indication of root
println("====>" +"Not Rooted ")
}

Selinux is returning a false positive.


Fixed short array syntax typo in 'Quick start' doc

Fixes #43

Thanks for the PR @rodion-arr, I've fixed this and another thing in a different PR but it's hugely appreciated.


Created c2-c4 background data and adjusted a4 emissions

The background dataset for c2-c4 lives in references/background_data/c2-c4.csv
The bill of materials lives in data/template_models/{template model name}/bom
You can use the following code to loop through the template models to access them.
from pathlib import Path

# set the path of the main directory for the project
main_directory = Path(__file__).parents[2]
tm_directory = main_directory.joinpath('data/template_models')

# create a list of the names of the template models
template_model_list = []
for temp_model_name in tm_directory.glob("*"):
    if '.gitkeep' not in temp_model_name.name:
        template_model_list.append(temp_model_name.name)

# loop through each template model to access the individual boms
for template_model in template_model_list:
    # insert code here to access individual boms, e.g:
    # bom_df = pd.read_csv(tm_directory.joinpath(f'{template_model}/bom/{template_model}_bom.csv')

@Mhtaba76 for reference for #31


Fix NavButton sizing on Android

Automated message from Dropbox CLA bot
@borisyankov, it looks like you've already signed the Dropbox CLA. Thanks!

Tested on both Android and iOS to make sure nothing is broken inadvertently.


Category Solver Bug?

Unsure if this is a bug or if I'm just using the cat solver in a sketchy spot
Trying to show equivalence of the different notions of cones. The following does not work, and gives a levels issue at the ×F term. However, if you uncomment the additional refl it goes through.
My initial thought is that solveCat! C should behave the same on definitionally equal terms, but maybe there is some reflection weirdness going on here
    Cone→CONE : Cone D c → (CONE ⟅ c , D ⟆) .fst
    Cone→CONE record-cone .N-ob x =  record-cone .coneOut x
    Cone→CONE record-cone .N-hom {x}{y} f =
      (fst (((λFr J C (Fst C J) ^opF) ×F Id) ⟅ c , D ⟆) .F-hom f
        ⋆⟨ C ⟩
        record-cone .coneOut y)
--        ≡⟨ refl ⟩
--    Constant J C c .F-hom f ⋆⟨ C ⟩ record-cone .coneOut y
        ≡⟨ solveCat! C ⟩
          record-cone .coneOut y
        ≡⟨ sym (record-cone .coneOutCommutes f) ⟩
      (record-cone .coneOut x
        ⋆⟨ C ⟩
        snd (((λFr J C (Fst C J) ^opF) ×F Id) ⟅ c , D ⟆) .F-hom f) ∎

Because it uses reflection, the solver definitely does not respect definitional equality. It tries to parse the goal without normalizing calls to Category._*_ and Category.id. No idea what's going on in this particular case tho

Ah, that makes sense
Closing this non-bug then


Add note about javascript code style to README.

In particular, we want to make explicit the requirement that code should include JSDoc comments for documentation.
Fixes #13

LGTM. Thanks for doing this.


Strip flickers towards the end

First of all, thank you for this amazing project. It is incredible how easy it was setting everything up and watch it come to life. Your YouTube channel is a great inspiration and my head is swarming with so many new ideas for projects. :slightly_smiling_face:
Nevertheless, since I'm a rather newbie on things like Arduino and LED strips I have encountered some issues where I'm not sure where to look for the reason behind them and I'm looking for some help. If this is the wrong place than please let me know.
My setup is as following:

NodeMCU v3
WS2812B 5m LED strip with 60 LEDs / m (should be 300 in total, but I have not counted them)
MeanWell RS-150-5 power supply (130W, 5 Volts, 26 Amps)

The difference in my setup to this project is that my strip is using 5V instead of 12V, so I don't need the DC-DC converter. Also I'm not using a logic shifter to shift the data signal I get from pin D5 from 3V to 5V. Aside from that it's the same thing.
Now, when I switch on the strip with solid light everything is fine (well almost, the LEDs towards the end are noticably dimmer than at the beginning, but that should be solvable by injecting power half way through, I believe). But I do get solid colors and all LEDs light up (again, I'm not 100% sure since the strip is still rolled up on the coil it was delivered on).
Okay, solid works. But when I turn on animations, there is some visible flickering towards the end of the strip. This happens on all animations. What's more puzzling is that on animations where the light is traveling down (and/or up, like sinelon) the strip some LEDs don't light up on each loop.
The question I have is, what's the cause of this? A faulty LED strip, the NodeMCU or could it be a software error? Or is it as simple as the missing logic shifter?
Looking forward to your answers.

You need to provide 5V power feeds to both ends, you are getting voltage drop across the strong

No, I haven't tried injecting power to the other side yet (no pun intended).
I have uploaded two videos of the flickering.
https://youtu.be/1ME0uWs6-eA
https://youtu.be/9XuRzFD0oO4
Is this flickering caused by low voltage on the far end? Solid colors work flawless. I would like to know the physics behind the flickering, if anyone can explain that.

Try my code
https://pastebin.com/RMPasRAU
https://pastebin.com/ZLmpYK87
There is more effects and i think i know why its flickering i had the same problem with my ws2813

Because he deleted these lines form his code
#define FASTLED_INTERRUPT_RETRY_COUNT 0
#define FASTLED_ALLOW_INTERRUPTS 0
I re added them in mine plus i have some more effects or just add these 2 lines to the top of his code and it will be good

Thank you @zombiehunter1 and @encor50 . I will try the ``FASTLED_ALLOW_INTERRUPTS 0` thingy tonight. From what I read at the official FastLED documentation this could indeed solve my issues. Also I will checkout the added effects. Since I'm going to mount my strip behind my flatscreen tv I'm looking for more effects anyway. Running lights (light sinelon, police, etc.) are cool if the strip is visible, but probably not behind a TV.

Okay, I tried the two paramaters @encor50 suggested. Unfortunately no success. :disappointed:
I did try another thing: I manually set the number of LEDs to 200 (instead of 300 which are acutally in/on the strip). Sure enough the solid effect only lights up about two thirds of the strip. Sometimes when I change color or brightness the remaining 100 LEDs change color as well. It seems to be completely random, I could not make out a pattern or reproduce at will. Just clicking around in the HA light widget atm.
Effects light sinelon or police also travel only up to the set amount of LEDs, but the LEDS at the end randomly flicker in the same colors as the effect has.

Check your cables ? If all good connected
And change the chipset to WS2812B

Since I don't have much time to spent on my hobby (wife + two kids, one only seven month old) I was hoping that this has happened to somebody in the past already. I did change the chipset to WS2812B right before uploading the sketch for the first time (like this:)
#define CHIPSET WS2812B

The last thing that remains which I didn't try yet is injecting more power on the other end. Given that my power supply can deliver enough Amps can I just wire the end of the strip to the beginning?  This won't fry my circuits, right? 😅

This is the correct wiring, remember it's not a current problem it's a voltage problem.  the first led will receive 5v but as we get further down the string the voltage will be less due to resistance in the wire. the ws28xx chips need a stable 5 volts to work correctly.
My first experience with this was with a string 50 10mm ws2812's .  I had the same problem  powering both ends fixed it.

Well, this sounds promising. Going to try that tonight. Will report back here.

I hooked up power to the other end of the strip, but unfortunately this didn't change anything. The sinelon effect for instance seems even worse than before. A lot of the LEDs don't light up when they should and some show the wront color (colors and affected LEDs change randomly on each loop).

I've decided to attach the strip to my TV regardless of the current issues. I was hoping that the flickering would go away when the strip length reduces. Unfortunately, no. :disappointed:
Now I have one more issue. The LEDs at the top are noticably dimmer when the brightness is set to max.
Full brightness:

Brightness set to 50%:

What's weird about this: I inject power to both ends of the strip and the strip is not 5m anymore but only about 3m, which is 179 LEDs in total. When I touch the upper corner joints the brightness changes, so naturally I assumed that the connection is too "flaky" (excuse my choice of words, I'm not an english native). But what I mean is that the resistance at the joints is too high and I'm dealing with some sort of voltage drop(?). So I used some wire to bridge over the joints in parallel, but the brightness didn't change at all. This occures more visibly when the color is set to white, but it is still noticable when using other colors like green or purple (of course, only when brightness is set to max).
I'm not planning to illuminate the whole room with my moodlight, so for the time I'll guess I just leave it as it is and don't set the strip to full brightness. And I wanted to share (intermediate) result with you guys, since it already looks amazing:

(Unfortunately you cannot really see the flickering when converting the videos I shot on my phone to GIF.)

I have the same problem. Powering at both ends made colors better but did not fix this.
I tried some test code from Adafruit_NeoPixel.h, that works without any issues. So I believe either it is something to do with Fastled, probably.
@riker09 Did you try changing the Fastled option NEO_KHZ800 to NEO_KHZ400? I'll play with options tonight and report if I get anything.
If nothing works, I''ll try to reimplement it using Adafruit_NeoPixel instead of FastLED

@jainsarthak I was just messing around with my moodlight tonight and bought a voltage meter to see if I'm dealing with voltage drop. Matter of fact, I do. Running a second power line to one of the upper cornes significantly improves brightness of the top led strip. Not to full brightness though, but it was just an experiment to see where my brightness issues were coming from. I'm going to order some more wires and will inject power on both top corners, that should take care of that.
The flickering is still another mystery to me. I did try to use Adafruit_NeoPixel.h, but my strip would not light up at all. I tried to keep the OTA and WiFi part from Bruhs original implementation intact, since the NodeMCU is mounted behind my wall-mounted TV and thus difficult to reach via USB cable. I was able to flash it a couple of times but then it seemed I broke something. Had to unmount my TV today, commented out NeoPixel stuff and got it back to status quo.
Here's the code that I tried which didn't work out:
#include <ArduinoJson.h>
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include "FastLED.h"
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#include <Adafruit_NeoPixel.h>

/************ WIFI and MQTT Information (CHANGE THESE FOR YOUR SETUP) ******************/
const char* ssid = "My WiFi"; //type your WIFI information inside the quotes
const char* password = "My super secret wifi pasword";
const char* mqtt_server = "<IP_ADDRESS>";
const char* mqtt_username = "mqtt";
const char* mqtt_password = "hahahaha";
const int mqtt_port = 1883;

/**************************** FOR OTA **************************************************/
#define SENSORNAME "tv_moodlight" //change this to whatever you want to call your device
#define OTApassword "hahahaha" //the password you will need to enter to upload remotely via the ArduinoIDE
int OTAport = 8266;

/************* MQTT TOPICS (change these topics as you wish)  **************************/
const char* light_state_topic = "home/tv_moodlight";
const char* light_set_topic = "home/tv_moodlight/set";

const char* on_cmd = "ON";
const char* off_cmd = "OFF";
const char* effect = "solid";
String effectString = "solid";
String oldeffectString = "solid";

/****************************************FOR JSON***************************************/
const int BUFFER_SIZE = JSON_OBJECT_SIZE(10);
#define MQTT_MAX_PACKET_SIZE 512

/*********************************** FastLED Defintions ********************************/
#define NUM_LEDS    179
#define DATA_PIN    5
//#define CLOCK_PIN 5
#define CHIPSET     WS2812B
#define COLOR_ORDER GRB
#define MILLION 1000000

byte realRed = 0;
byte realGreen = 0;
byte realBlue = 0;

byte red = 255;
byte green = 255;
byte blue = 255;
byte brightness = 255;

/******************************** GLOBALS for NeoPixel *******************************/
#ifdef __AVR__
  #include <avr/power.h>
#endif

// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
//   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, DATA_PIN, NEO_GRB + NEO_KHZ800);

/******************************** GLOBALS for fade/flash *******************************/
bool stateOn = false;
bool startFade = false;
bool onbeforeflash = false;
unsigned long lastLoop = 0;
int transitionTime = 0;
int effectSpeed = 0;
bool inFade = false;
int loopCount = 0;
int stepR, stepG, stepB;
int redVal, grnVal, bluVal;

bool flash = false;
bool startFlash = false;
int flashLength = 0;
unsigned long flashStartTime = 0;
byte flashRed = red;
byte flashGreen = green;
byte flashBlue = blue;
byte flashBrightness = brightness;

/********************************** GLOBALS for EFFECTS ******************************/
//RAINBOW
uint8_t thishue = 0;                                          // Starting hue value.
uint8_t deltahue = 10;

//CANDYCANE
CRGBPalette16 currentPalettestriped; //for Candy Cane
CRGBPalette16 gPal; //for fire

//NOISE
static uint16_t dist;         // A random number for our noise generator.
uint16_t scale = 30;          // Wouldn't recommend changing this on the fly, or the animation will be really blocky.
uint8_t maxChanges = 48;      // Value for blending between palettes.
CRGBPalette16 targetPalette(OceanColors_p);
CRGBPalette16 currentPalette(CRGB::Black);

//TWINKLE
#define DENSITY     80
int twinklecounter = 0;

//RIPPLE
uint8_t colour;                                               // Ripple colour is randomized.
int center = 0;                                               // Center of the current ripple.
int step = -1;                                                // -1 is the initializing step.
uint8_t myfade = 255;                                         // Starting brightness.
#define maxsteps 16                                           // Case statement wouldn't allow a variable.
uint8_t bgcol = 0;                                            // Background colour rotates.
int thisdelay = 20;                                           // Standard delay value.

//DOTS
uint8_t   count =   0;                                        // Count up to 255 and then reverts to 0
uint8_t fadeval = 224;                                        // Trail behind the LED's. Lower => faster fade.
uint8_t bpm = 30;

//LIGHTNING
uint8_t frequency = 50;                                       // controls the interval between strikes
uint8_t flashes = 8;                                          //the upper limit of flashes per strike
unsigned int dimmer = 1;
uint8_t ledstart;                                             // Starting location of a flash
uint8_t ledlen;
int lightningcounter = 0;

//FUNKBOX
int idex = 0;                //-LED INDEX (0 to NUM_LEDS-1
int TOP_INDEX = int(NUM_LEDS / 2);
int thissat = 255;           //-FX LOOPS DELAY VAR
uint8_t thishuepolice = 0;
int antipodal_index(int i) {
  int iN = i + TOP_INDEX;
  if (i >= TOP_INDEX) {
    iN = ( i + TOP_INDEX ) % NUM_LEDS;
  }
  return iN;
}

//FIRE
#define COOLING  55
#define SPARKING 120
bool gReverseDirection = false;

//BPM
uint8_t gHue = 0;

WiFiClient espClient;
PubSubClient client(espClient);
struct CRGB leds[NUM_LEDS];

/********************************** START SETUP*****************************************/
void setup() {
  Serial.begin(115200);
  FastLED.addLeds<CHIPSET, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS);

  setupStripedPalette( CRGB::Red, CRGB::Red, CRGB::White, CRGB::White); //for CANDY CANE
  gPal = HeatColors_p; //for FIRE

  setup_wifi();
  client.setServer(mqtt_server, mqtt_port);
  client.setCallback(callback);

  //OTA SETUP
  ArduinoOTA.setPort(OTAport);
  // Hostname defaults to esp8266-[ChipID]
  ArduinoOTA.setHostname(SENSORNAME);

  // No authentication by default
  ArduinoOTA.setPassword((const char *)OTApassword);

  ArduinoOTA.onStart([]() {
    Serial.println("Starting");
  });
  ArduinoOTA.onEnd([]() {
    Serial.println("\nEnd");
  });
  ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
    Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
  });
  ArduinoOTA.onError([](ota_error_t error) {
    Serial.printf("Error[%u]: ", error);
    if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed");
    else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed");
    else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed");
    else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed");
    else if (error == OTA_END_ERROR) Serial.println("End Failed");
  });
  ArduinoOTA.begin();

  Serial.println("Ready");
  Serial.print("IP Address: ");
  Serial.println(WiFi.localIP());

  strip.begin();
  strip.show();
}

/********************************** NEOPIXEL SAMPLES*****************************************/

// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
  for(uint16_t i=0; i<strip.numPixels(); i++) {
    strip.setPixelColor(i, c);
    strip.show();
    delay(wait);
  }
}

void rainbow(uint8_t wait) {
  uint16_t i, j;

  for(j=0; j<256; j++) {
    for(i=0; i<strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel((i+j) & 255));
    }
    strip.show();
    delay(wait);
  }
}

// Slightly different, this makes the rainbow equally distributed throughout
void rainbowCycle(uint8_t wait) {
  uint16_t i, j;

  for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel
    for(i=0; i< strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));
    }
    strip.show();
    delay(wait);
  }
}

//Theatre-style crawling lights.
void theaterChase(uint32_t c, uint8_t wait) {
  for (int j=0; j<10; j++) {  //do 10 cycles of chasing
    for (int q=0; q < 3; q++) {
      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
        strip.setPixelColor(i+q, c);    //turn every third pixel on
      }
      strip.show();

      delay(wait);

      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
        strip.setPixelColor(i+q, 0);        //turn every third pixel off
      }
    }
  }
}

//Theatre-style crawling lights with rainbow effect
void theaterChaseRainbow(uint8_t wait) {
  for (int j=0; j < 256; j++) {     // cycle all 256 colors in the wheel
    for (int q=0; q < 3; q++) {
      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
        strip.setPixelColor(i+q, Wheel( (i+j) % 255));    //turn every third pixel on
      }
      strip.show();

      delay(wait);

      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
        strip.setPixelColor(i+q, 0);        //turn every third pixel off
      }
    }
  }
}

// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
  WheelPos = 255 - WheelPos;
  if(WheelPos < 85) {
    return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
  }
  if(WheelPos < 170) {
    WheelPos -= 85;
    return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
  }
  WheelPos -= 170;
  return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}

/********************************** START SETUP WIFI*****************************************/
void setup_wifi() {

  delay(10);
  // We start by connecting to a WiFi network
  Serial.println();
  Serial.print("Connecting to ");
  Serial.println(ssid);

  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, password);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println("");
  Serial.println("WiFi connected");
  Serial.println("IP address: ");
  Serial.println(WiFi.localIP());
}

/*
  SAMPLE PAYLOAD:
  {
    "brightness": 120,
    "color": {
      "r": 255,
      "g": 100,
      "b": 100
    },
    "flash": 2,
    "transition": 5,
    "state": "ON"
  }
*/

/********************************** START CALLBACK*****************************************/
void callback(char* topic, byte* payload, unsigned int length) {
  Serial.print("Message arrived [");
  Serial.print(topic);
  Serial.print("] ");

  char message[length + 1];
  for (int i = 0; i < length; i++) {
    message[i] = (char)payload[i];
  }
  message[length] = '\0';
  Serial.println(message);

  if (!processJson(message)) {
    return;
  }

  if (stateOn) {

    realRed = map(red, 0, 255, 0, brightness);
    realGreen = map(green, 0, 255, 0, brightness);
    realBlue = map(blue, 0, 255, 0, brightness);
  }
  else {

    realRed = 0;
    realGreen = 0;
    realBlue = 0;
  }

  Serial.println(effect);

  startFade = true;
  inFade = false; // Kill the current fade

  sendState();
}

/********************************** START PROCESS JSON*****************************************/
bool processJson(char* message) {
  StaticJsonBuffer<BUFFER_SIZE> jsonBuffer;

  JsonObject& root = jsonBuffer.parseObject(message);

  if (!root.success()) {
    Serial.println("parseObject() failed");
    return false;
  }

  if (root.containsKey("state")) {
    if (strcmp(root["state"], on_cmd) == 0) {
      stateOn = true;
    }
    else if (strcmp(root["state"], off_cmd) == 0) {
      stateOn = false;
      onbeforeflash = false;
    }
  }

  // If "flash" is included, treat RGB and brightness differently
  if (root.containsKey("flash")) {
    flashLength = (int)root["flash"] * 1000;

    oldeffectString = effectString;

    if (root.containsKey("brightness")) {
      flashBrightness = root["brightness"];
    }
    else {
      flashBrightness = brightness;
    }

    if (root.containsKey("color")) {
      flashRed = root["color"]["r"];
      flashGreen = root["color"]["g"];
      flashBlue = root["color"]["b"];
    }
    else {
      flashRed = red;
      flashGreen = green;
      flashBlue = blue;
    }

    if (root.containsKey("effect")) {
      effect = root["effect"];
      effectString = effect;
      twinklecounter = 0; //manage twinklecounter
    }

    if (root.containsKey("transition")) {
      transitionTime = root["transition"];
    }
    else if ( effectString == "solid") {
      transitionTime = 0;
    }

    flashRed = map(flashRed, 0, 255, 0, flashBrightness);
    flashGreen = map(flashGreen, 0, 255, 0, flashBrightness);
    flashBlue = map(flashBlue, 0, 255, 0, flashBrightness);

    flash = true;
    startFlash = true;
  }
  else { // Not flashing
    flash = false;

    if (stateOn) {   //if the light is turned on and the light isn't flashing
      onbeforeflash = true;
    }

    if (root.containsKey("color")) {
      red = root["color"]["r"];
      green = root["color"]["g"];
      blue = root["color"]["b"];
    }

    if (root.containsKey("color_temp")) {
      //temp comes in as mireds, need to convert to kelvin then to RGB
      int color_temp = root["color_temp"];
      unsigned int kelvin  = MILLION / color_temp;

      temp2rgb(kelvin);

    }

    if (root.containsKey("brightness")) {
      brightness = root["brightness"];
    }

    if (root.containsKey("effect")) {
      effect = root["effect"];
      effectString = effect;
      twinklecounter = 0; //manage twinklecounter
    }

    if (root.containsKey("transition")) {
      transitionTime = root["transition"];
    }
    else if ( effectString == "solid") {
      transitionTime = 0;
    }

  }

  return true;
}

/********************************** START SEND STATE*****************************************/
void sendState() {
  StaticJsonBuffer<BUFFER_SIZE> jsonBuffer;

  JsonObject& root = jsonBuffer.createObject();

  root["state"] = (stateOn) ? on_cmd : off_cmd;
  JsonObject& color = root.createNestedObject("color");
  color["r"] = red;
  color["g"] = green;
  color["b"] = blue;

  root["brightness"] = brightness;
  root["effect"] = effectString.c_str();

  char buffer[root.measureLength() + 1];
  root.printTo(buffer, sizeof(buffer));

  client.publish(light_state_topic, buffer, true);
}

/********************************** START RECONNECT*****************************************/
void reconnect() {
  // Loop until we're reconnected
  while (!client.connected()) {
    Serial.print("Attempting MQTT connection...");
    // Attempt to connect
    if (client.connect(SENSORNAME, mqtt_username, mqtt_password)) {
      Serial.println("connected");
      client.subscribe(light_set_topic);
      setColor(0, 0, 0);
      sendState();
    } else {
      Serial.print("failed, rc=");
      Serial.print(client.state());
      Serial.println(" try again in 5 seconds");
      // Wait 5 seconds before retrying
      delay(5000);
    }
  }
}

/********************************** START Set Color*****************************************/
void setColor(int inR, int inG, int inB) {
  for (int i = 0; i < NUM_LEDS; i++) {
    leds[i].red   = inR;
    leds[i].green = inG;
    leds[i].blue  = inB;
  }

  FastLED.show();

  Serial.println("Setting LEDs:");
  Serial.print("r: ");
  Serial.print(inR);
  Serial.print(", g: ");
  Serial.print(inG);
  Serial.print(", b: ");
  Serial.println(inB);
}

/********************************** START MAIN LOOP*****************************************/
void loop() {

  if (!client.connected()) {
    reconnect();
  }

  if (WiFi.status() != WL_CONNECTED) {
    delay(1);
    Serial.print("WIFI Disconnected. Attempting reconnection.");
    setup_wifi();
    return;
  }

  client.loop();

  ArduinoOTA.handle();

  // Some example procedures showing how to display to the pixels:
  colorWipe(strip.Color(255, 0, 0), 50); // Red
  colorWipe(strip.Color(0, 255, 0), 50); // Green
  colorWipe(strip.Color(0, 0, 255), 50); // Blue
  // Send a theater pixel chase in...
  theaterChase(strip.Color(127, 127, 127), 50); // White
  theaterChase(strip.Color(127, 0, 0), 50); // Red
  theaterChase(strip.Color(0, 0, 127), 50); // Blue
  rainbow(20);
  rainbowCycle(20);
  theaterChaseRainbow(50);

}

/**************************** START TRANSITION FADER *****************************************/
// From https://www.arduino.cc/en/Tutorial/ColorCrossfader
/* BELOW THIS LINE IS THE MATH -- YOU SHOULDN'T NEED TO CHANGE THIS FOR THE BASICS
  The program works like this:
  Imagine a crossfade that moves the red LED from 0-10,
    the green from 0-5, and the blue from 10 to 7, in
    ten steps.
    We'd want to count the 10 steps and increase or
    decrease color values in evenly stepped increments.
    Imagine a + indicates raising a value by 1, and a -
    equals lowering it. Our 10 step fade would look like:
    1 2 3 4 5 6 7 8 9 10
  R + + + + + + + + + +
  G   +   +   +   +   +
  B     -     -     -
  The red rises from 0 to 10 in ten steps, the green from
  0-5 in 5 steps, and the blue falls from 10 to 7 in three steps.
  In the real program, the color percentages are converted to
  0-255 values, and there are 1020 steps (255*4).
  To figure out how big a step there should be between one up- or
  down-tick of one of the LED values, we call calculateStep(),
  which calculates the absolute gap between the start and end values,
  and then divides that gap by 1020 to determine the size of the step
  between adjustments in the value.
*/
int calculateStep(int prevValue, int endValue) {
  int step = endValue - prevValue; // What's the overall gap?
  if (step) {                      // If its non-zero,
    step = 1020 / step;          //   divide by 1020
  }

  return step;
}
/* The next function is calculateVal. When the loop value, i,
   reaches the step size appropriate for one of the
   colors, it increases or decreases the value of that color by 1.
   (R, G, and B are each calculated separately.)
*/
int calculateVal(int step, int val, int i) {
  if ((step) && i % step == 0) { // If step is non-zero and its time to change a value,
    if (step > 0) {              //   increment the value if step is positive...
      val += 1;
    }
    else if (step < 0) {         //   ...or decrement it if step is negative
      val -= 1;
    }
  }

  // Defensive driving: make sure val stays in the range 0-255
  if (val > 255) {
    val = 255;
  }
  else if (val < 0) {
    val = 0;
  }

  return val;
}

/**************************** START STRIPLED PALETTE *****************************************/
void setupStripedPalette( CRGB A, CRGB AB, CRGB B, CRGB BA) {
  currentPalettestriped = CRGBPalette16(
                            A, A, A, A, A, A, A, A, B, B, B, B, B, B, B, B
                            //    A, A, A, A, A, A, A, A, B, B, B, B, B, B, B, B
                          );
}

/********************************** START FADE************************************************/
void fadeall() {
  for (int i = 0; i < NUM_LEDS; i++) {
    leds[i].nscale8(250);  //for CYCLon
  }
}

/********************************** START FIRE **********************************************/
void Fire2012WithPalette()
{
  // Array of temperature readings at each simulation cell
  static byte heat[NUM_LEDS];

  // Step 1.  Cool down every cell a little
  for ( int i = 0; i < NUM_LEDS; i++) {
    heat[i] = qsub8( heat[i],  random8(0, ((COOLING * 10) / NUM_LEDS) + 2));
  }

  // Step 2.  Heat from each cell drifts 'up' and diffuses a little
  for ( int k = NUM_LEDS - 1; k >= 2; k--) {
    heat[k] = (heat[k - 1] + heat[k - 2] + heat[k - 2] ) / 3;
  }

  // Step 3.  Randomly ignite new 'sparks' of heat near the bottom
  if ( random8() < SPARKING ) {
    int y = random8(7);
    heat[y] = qadd8( heat[y], random8(160, 255) );
  }

  // Step 4.  Map from heat cells to LED colors
  for ( int j = 0; j < NUM_LEDS; j++) {
    // Scale the heat value from 0-255 down to 0-240
    // for best results with color palettes.
    byte colorindex = scale8( heat[j], 240);
    CRGB color = ColorFromPalette( gPal, colorindex);
    int pixelnumber;
    if ( gReverseDirection ) {
      pixelnumber = (NUM_LEDS - 1) - j;
    } else {
      pixelnumber = j;
    }
    leds[pixelnumber] = color;
  }
}

/********************************** START ADD GLITTER *********************************************/
void addGlitter( fract8 chanceOfGlitter)
{
  if ( random8() < chanceOfGlitter) {
    leds[ random16(NUM_LEDS) ] += CRGB::White;
  }
}

/********************************** START ADD GLITTER COLOR ****************************************/
void addGlitterColor( fract8 chanceOfGlitter, int red, int green, int blue)
{
  if ( random8() < chanceOfGlitter) {
    leds[ random16(NUM_LEDS) ] += CRGB(red, green, blue);
  }
}

/********************************** START SHOW LEDS ***********************************************/
void showleds() {

  delay(1);

  if (stateOn) {
    FastLED.setBrightness(brightness);  //EXECUTE EFFECT COLOR
    FastLED.show();
    if (transitionTime > 0 && transitionTime < 130) {  //Sets animation speed based on receieved value
      FastLED.delay(1000 / transitionTime);
      //delay(10*transitionTime);
    }
  }
  else if (startFade) {
    setColor(0, 0, 0);
    startFade = false;
  }
}
void temp2rgb(unsigned int kelvin) {
    int tmp_internal = kelvin / 100.0;

    // red
    if (tmp_internal <= 66) {
        red = 255;
    } else {
        float tmp_red =<PHONE_NUMBER>46 * pow(tmp_internal - 60, -0.1332047592);
        if (tmp_red < 0) {
            red = 0;
        } else if (tmp_red > 255) {
            red = 255;
        } else {
            red = tmp_red;
        }
    }

    // green
    if (tmp_internal <=66){
        float tmp_green = 99.4708025861 * log(tmp_internal) -<PHONE_NUMBER>661;
        if (tmp_green < 0) {
            green = 0;
        } else if (tmp_green > 255) {
            green = 255;
        } else {
            green = tmp_green;
        }
    } else {
        float tmp_green =<PHONE_NUMBER>283 * pow(tmp_internal - 60, -0.0755148492);
        if (tmp_green < 0) {
            green = 0;
        } else if (tmp_green > 255) {
            green = 255;
        } else {
            green = tmp_green;
        }
    }

    // blue
    if (tmp_internal >=66) {
        blue = 255;
    } else if (tmp_internal <= 19) {
        blue = 0;
    } else {
        float tmp_blue =<PHONE_NUMBER>231 * log(tmp_internal - 10) -<PHONE_NUMBER>307;
        if (tmp_blue < 0) {
            blue = 0;
        } else if (tmp_blue > 255) {
            blue = 255;
        } else {
            blue = tmp_blue;
        }
    }
}

Note: I did remove the effects from the original code since the fastLED is disabled anyw. Im guessing the FastLED include interfers with NeoPixel somehow=

@riker09 your strip is not lighting up with Adafruit_NeoPixel because NeoPixel does not translate your GPIO pin to DPIN. for example I use Nodemcu and for me DATA_PIN 1 in FastLED is same as pin 5 in Adafruit_NeoPixel. Both of these send data to pin labeled "D1" on my microcontroller.
You are using pin 5, that I believe will become 14 as per this:
https://github.com/FastLED/FastLED/blob/master/platforms/esp/8266/fastpin_esp8266.h#L68
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, DATA_PIN, NEO_GRB + NEO_KHZ800);

OMG this fixed the flickering
#define FASTLED_ALLOW_INTERRUPTS 0
got from https://github.com/krzychb/EspFire2012/commit/524b8baae437201a1ede71cf3fb61beaa1362a10

I did have the #define FASTLED_ALLOW_INTERRUPTS 0 thing in my configuration before, but that didn't change anything so I threw it away again. But according to issue #60 I have to define this before including the FastLED library. So this needs to go in line 4.
I will try that as soon as I find some time and will report my findings back here.

I'd live to know if that actually works or not. I have some WS2811 lying around and I know I could not use them with ESP8266 directly due to timing issues with more than approx 60 LEDs some time ago.
Also, do you use 3.3V-5V level shifters? I've had some success driving them directly from 3.3V.

I was having terrible flickering issues/wrong colours/leds remaining on etc. I am using WS2811 12v strip with 69 LEDs. And using an ESP-01.
I found that I needed to have 12v ground attached to the 3.3v ground of the ESP. This completely fixed my issues. There is no reference to this in the Bruh instructions but found reference to it elsewhere online.
I am now just having a couple of small issues where with an effect running certain sections of the strip will flicker slightly. Will try the #define FASTLED_ALLOW_INTERRUPTS 0 suggested above and report back. Good job for Arduino OTA!

Similar problem, using #define FASTLED_ALLOW_INTERRUPTS 0 just before declaring the FastLED library sorted my problem too. Thanks!

Compiled and uploaded with #define FASTLED_ALLOW_INTERRUPTS 0. Perfect now!
Thanks guys.
Just waiting for a couple of Wemos D1s to arrive and I can sort my LED strip round the TV.

My additional wire arrived today, so I'll probably do some soldering tonight. The OTA broke for some reason, otherwise I would've tried the #define FASTLED_ALLOW_INTERRUPTS 0 already. But now I have to dismount my TV anyway... :)
I do not use a 3.3V -> 5V level shifter. My WS2812B is directly hooked up to PIN 5 of my NodeMCU.
@Philje123 When I initially wired everything together I also had some terrible flickering because the NodeMCU and the strip were not sharing a common ground. I found a hint about this somewhere on the internet. Good to see that I'm not the only one who ran into this issue. Maybe the documentation could use some improvements?

It should still work without the level shifter depending on the length of cable from your NodeMCU to the strip. Since the signal only has to get to the first LED and is then repeated along the chain.
I tried without the level shifter and the common ground and it seemed to work ok. But kept the shifter in the circuit since I already had it and to make sure it worked.
As for OTA I found you have to have all the upload settings matching the device you are trying to update.
And yes I think the documentation needs to mention the common ground. I wonder why this problem is not always encountered.

I wonder why this problem is not always encountered.

Because it's common knowledge. And that's also the reason why it's not explained, maybe it was obvious for the writer and he didn't think writing that down.
As for level shifting, the datasheet says it requires 5V signal, it may work at 3.3V depending on how strong the voltage is. YMMV though and if you experience problems this is the first thing I'd investigate.
For those who tried #define FASTLED_ALLOW_INTERRUPTS 0: do you experience that your WiFi is flaky or sometimes doesn't respond to commands?

Well I wouldn't say it's common knowledge. All the wiring diagrams I've seen (including this one) does not show a common ground connection.
It also seemed strange to me to have the 12v ground tied to the 3.3v ground.
I'll keep an eye on it over the next few days but so far it hasn't affected the wifi.

The Wifi was fine. I have made a reasonably long strip (about 280) of WS2811 for round the edge of the house at Christmas. For that I needed to inject power at least 3 points, as I was dropping to about 2.8V in the middle.
Without using the #define FASTLED_ALLOW_INTERRUPTS 0 , I found that the lights in the middle of the chain were flickering when using some of the effects. - most noticeably with the Rainbow effect.

I did it. The top strip is as bright as the rest of the strip thanks to some injected power. The flickering is gone thanks to the define bugfix. Thanks to all the little hints I got from this thread. You guys are amazing. And since this looks like a valid workaround I will go ahead and close this issue.


Revert "[BEAM-7277] Add PostCommit test suite for Python 3.7"

Reverts apache/beam#8564
Reason: Breaks postcommit tests.

Run Python Postcommit


Fix Workspace Cron Permissions

When I submitted #538 it looks like I overlooked the crontab file
permissions for the Laradock user. This change ensure that all
crons added during build are set to the correct permission level.

@sixlive Thank you


Remove legacy FIPS_mode functions

This is the alternative to #11075 which did a deprecation.

Checklist

[x] documentation is added or updated
[ ] tests are added or updated

OMC vote is in progress to decide between this and #11075 so putting a hold on both.

Block removed.  These functions are to be removed.
An independent review is required.

This pull request is ready to merge

Thanks for everyone's input. Merged to master.


Fix grpc enum generation

for ... in will iterate over all entries on the prototype, which results in
enums getting numbered definitions.
e.g.
enum { ACTION = 0, DRAMA = 1 } will create a config with the values
ACTION, DRAMA, 0 and 1
Use Object.entries to only generate the enum config for ownProperties
of the enum proto object.

Thank you for the fix @rufman !


Added wildcard to dotnet build command file path argument

Hi Lotte,
I noticed the dotnet build command has the path set statically which would require a user to manually change the path in the workflow when using the package starter.
I changed it src***.sln so that it will find the sln no matter where it is in the src folder or what its name is.

I was unable to create a workflow in github for my repo. As it couldn't find the yml file and won't let me specify the yml file path, annoying...
Are you able to trigger the action on your repo for my branch to see it still passes?

Hey @mattou07,
When you use the template, the file .github/workflows/release.yml should have all 'PackageStarter' references replaced with the name that you used when calling the template
So if you specified the name parameter as 'HelloWorld' when using the template, line 26 in the .yml file should be:
run: dotnet build src\HelloWorld\HelloWorld.csproj --configuration Release
When you push to GitHub, the presence of this .yml file in that specific folder should mean that there is a "Release Package" action in your repo. This is a screenshot from me testing the output of running the template on a private project:

Do you have an action called "Release Package" in the Actions tab of your repo? This action should be run when you push a tag on the git repo.
The action needs to be building and releasing the package project, not the whole solution.

You also need to have set up a secret in your Git repo called NUGET_API_KEY - I need to finish the instructions ASAP!

Okay no worries, I will close my PR. I did not know that it would get replaced. What caught my eye is both the build project and push to nuget use different paths to find their files. Thanks for clarifying!
`

name: Build project
run: dotnet build src\PackageStarter\PackageStarter.csproj --configuration Release

name: Push to NuGet
run: dotnet nuget push ***.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
`