Using breakpoints option in Next JS causes Hydration error

Discussed in https://github.com/nolimits4web/swiper/discussions/5776

Originally posted by Sakkhor909 June  7, 2022
First of all, thank you for this amazing library.
Everything works fine until I use breakpoints
import { Swiper, SwiperSlide } from "swiper/react";
import Image from "next/image";

 <Swiper

        slidesPerView={1}

        breakpoints={{
          1024: {
            slidesPerView: 3,
          },
        }}

      >
        {Data.images.map((imgSrc, index) => {
          return (
            <SwiperSlide>
              <Image src={imgSrc} alt={Data.name + index} layout="fill" />
            </SwiperSlide>
          );
        })}
      </Swiper>

The error is shown on the next js page
Error: Hydration failed because the initial UI does not match what was rendered on the server.

Than same issue with me also

Same here

Using slidesPerView="auto" fixed the issue for me.

Using slidesPerView="auto" fixed the issue for me.
Sample Code for reference
<Swiper
        spaceBetween={10}
        slidesPerView="auto"
        breakpoints={{
          320: {
            slidesPerView: 1,
            spaceBetween: 30,
          },
          640: {
            slidesPerView: 1,
            spaceBetween: 10,
          },
          768: {
            slidesPerView: 2,
            spaceBetween: 20,
          },
          1024: {
            slidesPerView: 3,
            spaceBetween: 30,
          },
        }}
      >
              <SwiperSlide>Slide one</SwiperSlide>
      </Swiper>

Thank you for the solution. It works.

At the moment, No

          <Swiper
            slidesPerView={3}
            spaceBetween={20}
            breakpoints={{
              768: {
                slidesPerView: 4,
                spaceBetween: 20,
              },
              1024: {
                slidesPerView: 5,
                spaceBetween: 10,
              },
              1280: {
                slidesPerView: 6,
              },
              1440: {
                slidesPerView: 7,
              },
            }}
          >
            {[...Array(7).keys()].map((item) => (
              <SwiperSlide key={item}>
                Slide {item}
               </SwiperSlide>
            ))}
          </Swiper>

This is my solution. I have used Tailwind CSS, and wrapped Swiper with one more div, and gave width: 100%.
it works ok

Just want to clarify here, slidesPerView="auto" is not a fix, it's a workaround.

slidesPerView="auto" also resolved my issue. thanks @iampawan31

If you decide to use slidesPerView="auto" you have to take into account that you have to control the CLS (Web Vitals) since doing this causes the images to move, in the first render they will be loaded automatically while in the next one it will exist a design change.

Using slidesPerView="auto" fixed the issue for me.
Sample Code for reference
<Swiper
        spaceBetween={10}
        slidesPerView="auto"
        breakpoints={{
          320: {
            slidesPerView: 1,
            spaceBetween: 30,
          },
          640: {
            slidesPerView: 1,
            spaceBetween: 10,
          },
          768: {
            slidesPerView: 2,
            spaceBetween: 20,
          },
          1024: {
            slidesPerView: 3,
            spaceBetween: 30,
          },
        }}
      >
              <SwiperSlide>Slide one</SwiperSlide>
      </Swiper>

Thank you for the solution. It works.

Is anyone still getting hydration error even after using slidesperview ="auto" ?
<Swiper
          spaceBetween={50}
          slidesPerView="auto"
          loopedSlides={3}
          pagination={{
            el: ".my-custom-pagination-div",
            clickable: true,
            renderBullet: (index, className) => {
              return '' + "";
            },
          }}
          navigation={true}
          loop={true}
          centeredSlides={true}
          breakpoints={{
            992: {
              slidesPerView: 2,
            },
          }}
          onSlideChange={(swiperCore) => {
            const { activeIndex, snapIndex, previousIndex, realIndex } =
              swiperCore;
            setActiveApp(realIndex);
          }}

          // left and right carousels should be half
          // width of the slide
        >
          {data.map((item, index) => {
            return (
              <SwiperSlide key={index}>
                <DataCard
                  visits={visits}
                  item={item}
                  active={activeData === index}
                />
              </SwiperSlide>
            );
          })}

          {isDesktop && (
            <>
              <PrevOverlay />
              <NextOverlay />
            </>
          )}
        </Swiper>

Is anyone still getting hydration error even after using slidesperview ="auto" ?
<Swiper
          spaceBetween={50}
          slidesPerView="auto"
          loopedSlides={3}
          pagination={{
            el: ".my-custom-pagination-div",
            clickable: true,
            renderBullet: (index, className) => {
              return '' + "";
            },
          }}
          navigation={true}
          loop={true}
          centeredSlides={true}
          breakpoints={{
            992: {
              slidesPerView: 2,
            },
          }}
          onSlideChange={(swiperCore) => {
            const { activeIndex, snapIndex, previousIndex, realIndex } =
              swiperCore;
            setActiveApp(realIndex);
          }}

          // left and right carousels should be half
          // width of the slide
        >
          {data.map((item, index) => {
            return (
              <SwiperSlide key={index}>
                <DataCard
                  visits={visits}
                  item={item}
                  active={activeData === index}
                />
              </SwiperSlide>
            );
          })}

          {isDesktop && (
            <>
              <PrevOverlay />
              <NextOverlay />
            </>
          )}
        </Swiper>

Yes

Is anyone still getting hydration error even after using slidesperview ="auto" ?
<Swiper
          spaceBetween={50}
          slidesPerView="auto"
          loopedSlides={3}
          pagination={{
            el: ".my-custom-pagination-div",
            clickable: true,
            renderBullet: (index, className) => {
              return '' + "";
            },
          }}
          navigation={true}
          loop={true}
          centeredSlides={true}
          breakpoints={{
            992: {
              slidesPerView: 2,
            },
          }}
          onSlideChange={(swiperCore) => {
            const { activeIndex, snapIndex, previousIndex, realIndex } =
              swiperCore;
            setActiveApp(realIndex);
          }}

          // left and right carousels should be half
          // width of the slide
        >
          {data.map((item, index) => {
            return (
              <SwiperSlide key={index}>
                <DataCard
                  visits={visits}
                  item={item}
                  active={activeData === index}
                />
              </SwiperSlide>
            );
          })}

          {isDesktop && (
            <>
              <PrevOverlay />
              <NextOverlay />
            </>
          )}
        </Swiper>

I had a similar situation, but solved it by limiting Swiper calls to client-side. It may be a bit of a messy solution....
↓
const [isClient, setIsClient] = useState(false)
const createSwiper = () => {
  if (isClient) {
    return <SlideShowContainer />
  } else {
    <></>
  }
}
useEffect(() => {
  setIsClient(true)
}, [])

// use createSwiper()
const SwiperContainer = () => {
 return {createSwiper()}
}

// Define Swiper
const SlideShowContainer = () => {
 return (
  <Swiper
   .....>
  </Swiper>
}

Is anyone still getting hydration error even after using slidesperview ="auto" ?
<Swiper
          spaceBetween={50}
          slidesPerView="auto"
          loopedSlides={3}
          pagination={{
            el: ".my-custom-pagination-div",
            clickable: true,
            renderBullet: (index, className) => {
              return '' + "";
            },
          }}
          navigation={true}
          loop={true}
          centeredSlides={true}
          breakpoints={{
            992: {
              slidesPerView: 2,
            },
          }}
          onSlideChange={(swiperCore) => {
            const { activeIndex, snapIndex, previousIndex, realIndex } =
              swiperCore;
            setActiveApp(realIndex);
          }}

          // left and right carousels should be half
          // width of the slide
        >
          {data.map((item, index) => {
            return (
              <SwiperSlide key={index}>
                <DataCard
                  visits={visits}
                  item={item}
                  active={activeData === index}
                />
              </SwiperSlide>
            );
          })}

          {isDesktop && (
            <>
              <PrevOverlay />
              <NextOverlay />
            </>
          )}
        </Swiper>

I had a similar situation, but solved it by limiting Swiper calls to client-side. It may be a bit of a messy solution....
↓
const [isClient, setIsClient] = useState(false)
const createSwiper = () => {
  if (isClient) {
    return <SlideShowContainer />
  } else {
    <></>
  }
}
useEffect(() => {
  setIsClient(true)
}, [])

// use createSwiper()
const SwiperContainer = () => {
 return {createSwiper()}
}

// Define Swiper
const SlideShowContainer = () => {
 return (
  <Swiper
   .....>
  </Swiper>
}

Is anyone still getting hydration error even after using slidesperview ="auto" ?
<Swiper
          spaceBetween={50}
          slidesPerView="auto"
          loopedSlides={3}
          pagination={{
            el: ".my-custom-pagination-div",
            clickable: true,
            renderBullet: (index, className) => {
              return '' + "";
            },
          }}
          navigation={true}
          loop={true}
          centeredSlides={true}
          breakpoints={{
            992: {
              slidesPerView: 2,
            },
          }}
          onSlideChange={(swiperCore) => {
            const { activeIndex, snapIndex, previousIndex, realIndex } =
              swiperCore;
            setActiveApp(realIndex);
          }}

          // left and right carousels should be half
          // width of the slide
        >
          {data.map((item, index) => {
            return (
              <SwiperSlide key={index}>
                <DataCard
                  visits={visits}
                  item={item}
                  active={activeData === index}
                />
              </SwiperSlide>
            );
          })}

          {isDesktop && (
            <>
              <PrevOverlay />
              <NextOverlay />
            </>
          )}
        </Swiper>

I had a similar situation, but solved it by limiting Swiper calls to client-side. It may be a bit of a messy solution....
↓
const [isClient, setIsClient] = useState(false)
const createSwiper = () => {
  if (isClient) {
    return <SlideShowContainer />
  } else {
    <></>
  }
}
useEffect(() => {
  setIsClient(true)
}, [])

// use createSwiper()
const SwiperContainer = () => {
 return {createSwiper()}
}

// Define Swiper
const SlideShowContainer = () => {
 return (
  <Swiper
   .....>
  </Swiper>
}

Using slidesPerView="auto" fixed the issue for me.
Sample Code for reference
<Swiper
        spaceBetween={10}
        slidesPerView="auto"
        breakpoints={{
          320: {
            slidesPerView: 1,
            spaceBetween: 30,
          },
          640: {
            slidesPerView: 1,
            spaceBetween: 10,
          },
          768: {
            slidesPerView: 2,
            spaceBetween: 20,
          },
          1024: {
            slidesPerView: 3,
            spaceBetween: 30,
          },
        }}
      >
              <SwiperSlide>Slide one</SwiperSlide>
      </Swiper>

it does not worked for me .
it seems the breakepoints' section working with window` object and its not accessible on Hydration .
so is there solution?

I don't know is it dirty or not? but i fixed it by the code :
  const [customSwiperOptions, setCustomSwiperOptions] = useState<SwiperOptions>();

  useEffect(() => {
    const options: SwiperOptions = {
      breakpoints: {

        320: {
          slidesPerView: 1,
        },
        640: {
          slidesPerView: 2,
        },
        768: {
          slidesPerView: 3,
        },
        1024: {
          slidesPerView: 4,
        },
        1280: {
          slidesPerView: 5,
        },
        1536: {
          slidesPerView: 6
        }
      }
    }
    setCustomSwiperOptions(options);
  }, [])

 {
          customSwiperOptions &&
          <Swiper modules={[Navigation, Pagination, Scrollbar, A11y]}
            spaceBetween={20}
            navigation
            breakpoints={customSwiperOptions.breakpoints}
            pagination={{ clickable: true }}
            scrollbar={{ draggable: true }}>
            {
              myItems.map((x) => {
                return <SwiperSlide key={x.id} className='p-2'> <Item data={x}></Item></SwiperSlide>
              })
            }
          </Swiper>
}

Even if we keep swiper client side isn't it causing a huge CLS ?

Using slidesPerView="auto" fixed the issue for me.
Sample Code for reference
<Swiper
        spaceBetween={10}
        slidesPerView="auto"
        breakpoints={{
          320: {
            slidesPerView: 1,
            spaceBetween: 30,
          },
          640: {
            slidesPerView: 1,
            spaceBetween: 10,
          },
          768: {
            slidesPerView: 2,
            spaceBetween: 20,
          },
          1024: {
            slidesPerView: 3,
            spaceBetween: 30,
          },
        }}
      >
              <SwiperSlide>Slide one</SwiperSlide>
      </Swiper>

That works, Thanks!!

Thanks it worked for me. :)

Thank you for this, I feel like this is the best solution on this thread

I don't know is it dirty or not? but i fixed it by the code :
  const [customSwiperOptions, setCustomSwiperOptions] = useState<SwiperOptions>();

  useEffect(() => {
    const options: SwiperOptions = {
      breakpoints: {

        320: {
          slidesPerView: 1,
        },
        640: {
          slidesPerView: 2,
        },
        768: {
          slidesPerView: 3,
        },
        1024: {
          slidesPerView: 4,
        },
        1280: {
          slidesPerView: 5,
        },
        1536: {
          slidesPerView: 6
        }
      }
    }
    setCustomSwiperOptions(options);
  }, [])

 {
          customSwiperOptions &&
          <Swiper modules={[Navigation, Pagination, Scrollbar, A11y]}
            spaceBetween={20}
            navigation
            breakpoints={customSwiperOptions.breakpoints}
            pagination={{ clickable: true }}
            scrollbar={{ draggable: true }}>
            {
              myItems.map((x) => {
                return <SwiperSlide key={x.id} className='p-2'> <Item data={x}></Item></SwiperSlide>
              })
            }
          </Swiper>
}

Thank you for this, I feel this is the best solution on this thread!

this is nice


Allow running uv self update behind firewalls

So there's a feature within the installation script that allows moving the standalone installer behind the firewall too, ARTIFACT_DOWNLOAD_URL can be configured via INSTALLER_DOWNLOAD_URL environment variable, so something like:
curl -LsSf https://magic.com/uv/uv-installer.sh | env INSTALLER_DOWNLOAD_URL=https://magic.com/uv sh

This will work assuming you mirror the GitHub release to https://magic.com/uv. This is great!
Now the problem is that self update is not so smart, would it be appetite to change https://github.com/astral-sh/uv/blob/main/crates/uv/src/commands/self_update.rs. So when the INSTALLER_DOWNLOAD_URL environment is set, instead of reaching out to GitHub, it would download the update from within that HTTP host. We can come up with some kind of version file there so that it can pull the latest version from there too.
If we agree, this is something I can contribute. 😊
Initially suggested at https://github.com/astral-sh/uv/issues/8069

hey @gaborbernat ! thanks so much for the detailed issue. we'd love to work with you on contributing this issue!! feel free to open up a PR and discuss there or here. we also have a discord if you want to work through things in a more synchronous way :) https://discord.gg/RUC4EwG3


Add restore options to each backup listed and latest backup

https://github.com/microsoft/service-fabric-explorer/pull/448

https://github.com/microsoft/service-fabric-explorer/pull/448


Feature request: Use different search engine in private browsing

A useful feature for me would be the ability to choose a different search engine in private-browsing mode instead of logging into Kagi. For example, I could set my search provider to Kagi, and in Kagi's settings I could choose to use DuckDuckGo in private-browsing mode.
My instinct is that this should be possible with the WebExtensions browser.search API in Firefox. Unfortunately it looks like Chromium's chrome.search API doesn't have the necessary features.

Can you explain the use case bit more. Why would you want to use a different search engine (not Kagi) in private browsing?
In addition there are browsers (like Orion) which allow to specify a different search engine for private browsing.

I'm not the OP, but I can hazard a guess: unlike approximately every other search engine available today, Kagi requires a login session tied to an individual user. You can have the greatest, most user-centric privacy policy on the planet, but that still ultimately requires users to trust Kagi to honor that policy as expected. There are numerous ways that this expectation could potentially be broken, with varying levels of probability. Some examples off the top of my head:

Kagi disregards their own privacy policy and collects/shares data that they explicitly promised not to (but are still fundamentally in a position to collect)
Some piece of software used by Kagi is misconfigured and includes identifying information in logs that were supposed to be anonymous
A user's interpretation of Kagi's privacy policy doesn't align with its legal meaning

Intentionally: a vague phrase like "only the data needed to provide and protect the service" is used to conceal some specific use that users might object to if it was clearly spelled out
Unintentionally: a user is aware of Kagi's high-level privacy commitments, but hasn't read the entire document and is unaware of data processing performed by third parties, e.g. Sentry (are their services truly essential? Some could argue yes, others no)

Kagi's values shift over time and become less privacy-friendly
Kagi receives an NSL or other government demand for user data that includes a gag order (a warrant canary is a good start, but their legality is tenuous at best)
Kagi is breached by a malicious actor that starts collecting data that was supposed to be immediately discarded

At least for me, it's possibilities like these -- however unlikely -- that make me hesitant to switch to Kagi in the first place, and would be doubly concerning in private browsing scenarios. Paying for a better service is an easy sell for me, but using a search engine that requires a unique login at all times is another matter entirely. Simply not signing into an account obviously isn't a perfect defense against all the examples above, but it's certainly a good start.
Assuming something along these lines is a common reason why some Kagi users would want to use another service to perform private searches, I also wonder if some sort of blinded token, along the lines of Privacy Pass, could be an acceptable solution. It might only be viable to offer to users on an unlimited plan, but an authentication mechanism that can prove that I've paid to use the service without ever giving any indication whatsoever of who I am is something that I'd find very interesting. Even if it may be a bit overkill for the average user, offering an option to enforce privacy cryptographically rather than just legally would also be a great marketing signal for some of Kagi's more paranoid prospective users.

@DanH42 You put that into much better words than I ever possibly could have, and you included a ton of nuance that I hadn't even considered. Thank you so much!!

Just in case, Firefox, in addition to the already mentioned Orion browser, also supports setting a different search engine for private browsing. See https://superuser.com/a/1527549
You'll need to

Go to about:config;
Set

    browser.search.separatePrivateDefault = true
    browser.search.separatePrivateDefault.ui.enabled = true

Go to search engine settings and choose one for your private windows.

And I personally prefer that to setting a Kagi's session link.


feat(demo): add welcome.smd, open on start

https://github.com/stencila/demo-codespace/issues/2

I've made some tweaks to the README and welcome files and think it is in a good place to merge. @jduckles could you have a quick look.

lgtm, #3 will have to change based on this as I think they'll be in a slight confict.


Move slug function to SDK and reuse it in the CLI and frontend

Drop slugify dependency too. See https://github.com/xataio/client-ts/pull/470#issuecomment-1191191189

The backend takes care of this now.


CA2214 - Different Message

Not sure where the conflict is, but I show this warning code as:
Warning	CA2214	contains a call chain that results in a call to a virtual method defined by the class. Review the following call stack for unintended consequences
Also, it shows up with the VS implementation of this dispose method on an abstract class

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

ID: 78518637-409c-e51b-5dfc-75449565ee49
Version Independent ID: bf378336-08a3-de6c-1c60-18907691342a
Content: CA2214: Do not call overridable methods in constructors - Visual Studio
Content Source: docs/code-quality/ca2214-do-not-call-overridable-methods-in-constructors.md
Product: visual-studio-dev15
GitHub Login: @gewarren
Microsoft Alias: gewarren

@JranZu Thanks for the feedback. It may be that the rule changed when it was ported from FxCop static code analysis to Roslyn analyzers.

@mavasani Do you know if the message for CA2214 changed from static code analysis to FxCop analyzers?
There's a SO question here from Visual Studio 2015 with the same warning mentioned in this issue ("'Derived.Derived()' contains a call chain that results in a call to a virtual method defined by the class...").
@JranZu Can you tell if the warning is coming from static code analysis or the Microsoft.CodeQuality.Analyzers package? (Look under the "Tool" column in the Error List - you might need to add this column.)

@gewarren Seems like the CA2214 FxCop analyzers port changed the diagnostic message to Do not call overridable methods in constructors. I am not sure if this was intentional or not. We can change the message if you feel it needs to be more descriptive.


Replace wsusserver::approvalrule with a formalized typed and provider

We should replace the wsusserver::approvalrule with a formalized type and provider in order to allow for:
1.) More efficient puppet runs.  Execs are not performant
2.) Improve maintability by getting rid of execs along with all the other problems they introduce.

When creating an approval rule in the WSUS Server GUI you can create an approval rule that targets a "Classification" (EX Critical Updates).  If you don't specify any products it will approval critical update for ALL products.  This makes sense since you cannot have an approval rule for critical updates that applies to no products.  They would never get applied!
37 Critical Updates
Created Approval Rule

When an Update is in "Critical Updates"
Approve the update for "all computers"
37 updates got approved without specifying a product
I saw auto approved updates for the following products

Windows Server 2012 R2

Microsoft SQL Server 2016


Rest Countries

Added featured

Add main page for showing all countries
Add single country page for showing each country details
Add search bar on the main page
Add back button in the single country page
Add design based of template

what is added new

[ ] changes added as requested

What is added
Requested changes added


[Suggestion] Add async (packets-based) scoreboards

Hi! Scoreboard api looks cool, but how about async update support?
There are working packets-based solutions (like this), so this is not something hard. Async scoreboards api would allow developers to create heavy calculation scoreboards during update (because there might be queries to the database, etc.).
This API can be called both synchronously and asynchronously because packets work the same way.
I think that ForkJoinPool would be perfect for these purposes.

Actually, I wanted to add async scoreboard system but I didn't prefer using packets because Spigot offers a stable API. I'll add this feature in the next version. Thanks for suggestion!

There are some more tips: instead of int + TimeUnit, it is more beautiful and more convenient to use Duration. Wherever ticks are specified as a unit of time, Duration support will also be useful (for example, I want to update the scoreboard every second, in which case .expire(Duration.ofSeconds(1)) will be prettier than .expire(20)).
I don't know where to discuss such minor edits, creating an issue for this seems to me something stupid. Maybe I'll make a pull request with some improvements like this.

Okay, I think it's finished (https://github.com/hakan-krgn/hCore/commit/d2735444fe503937d21667fd73174b3155bfb9c2)


Testing Github Private Repo OnWebhook with Github APPS integration on pac-e2e-ns-wt2hp

Add a new PR for testing

Pipelines as Code CI/git-clone-private has successfully validated your commit.
Namespace: pac-e2e-ns-wt2hp
PipelineRun: git-clone-private-v24n4

Task Statuses:

StatusDurationName

✅ Succeeded
12 seconds
git-clone-from-catalog


Missing y291ga hack file in latest release 0.2.2  asset

I got 4 Yi 1080p Home Camera Family Pack, model prefix RFUS, out of box FW version <IP_ADDRESS>02111291330, based on README.md, I should download file with prefix y291ga, then it missing from the latest release page
official app reminder for latest official FW <IP_ADDRESS>_202207191613, I hold for the upgrade (I like to apply the hack Allwinner-v2)

Some users have had problems with the update, there is an issue about this problem.
The fw for this version is pushed but not released.
You can find a beta here: https://github.com/roleoroleo/yi-hack-Allwinner-v2/issues/316


Set flag to enable Jacoco Coverage XML generation

Set flag to enable Jacoco Coverage XML generation. Fixes https://github.com/ballerina-platform/ballerina-lang/issues/30381

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@9164cd6). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             master        #2   +/-   ##
==========================================
  Coverage          ?   100.00%
==========================================
  Files             ?         2
  Lines             ?         4
  Branches          ?         3
==========================================
  Hits              ?         4
  Misses            ?         0
  Partials          ?         0

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9164cd6...7a1c2fe. Read the comment docs.


adding Threat Model and corresponding md file

What type of PR is this:
/kind documentation
What does this PR do / why we need it:
Save the Threat Model (defined in json format), and  basic documentation with important links
Which issue(s) this PR fixes:

Fixes #5794
PR acceptance criteria:

[ ] Unit test

[ ] Integration test

[x] Documentation

How to test changes / Special notes to the reviewer:
No tests required

/approve

/lgtm

/override ci/prow/v4.10-integration-e2e
/override ci/prow/unit


Fix incorrect keywords.

Fix wrong keywords in ncdump and ncgen man page.

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

Thanks!


reflect: add a function for treating C memory as a Go slice

Now that cgo supports exporting Go functions to C, it would be useful for Go functions to be able to read C memory without making unnecessary copies.  In particular, we would like to be able to read (and write) a C char* using functions that operate on a Go []byte (e.g. bytes.Reader or io.Reader.Read).
reflect.NewAt and reflect.ArrayOf get us partway there: we can treat the pointer to C memory as a Go pointer to an array of the correct underlying length, then use reflect.Value.Slice to convert that to a slice.  Unfortunately, reflect.ArrayOf strands a small amount of memory for a unique reflect.Type for every distinct length used: http://play.golang.org/p/lc3QnMnKP_
We could consider using reflect.SliceHeader instead, but it "cannot be used safely or portably" (https://golang.org/pkg/reflect/#SliceHeader).
So it seems that we don't have an efficient solution for this conversion.
The simplest solution seems like it would be to add a function to the reflect package to construct the slice directly.  Following the example of reflect.MakeSlice and reflect.NewAt, it could be something like:
    // SliceAt returns a slice value for the specified slice type, length, and capacity,
    // using p as the address of the first element and leaving its contents unchanged.
    func SliceAt(typ Type, len, cap int, p unsafe.Pointer) Value

We already have C.GoBytes that converts a unsafe.Pointer
and a length to []byte, why do we need another?
After converting the pointer to a byte slice, it's very easy
to convert to []T for arbitrary T.

We already have C.GoBytes that converts a unsafe.Pointer
and a length to []byte, why do we need another?

My understanding was that C.GoBytes makes a copy.  Is that not the case?
(If correct, that implies less efficiency - particularly for large arrays - and no mutative APIs such as io.Reader.Read.)

It doesn't work for element types other than byte.  (For example, you could envision a C API that wants to use an array of wchar_t or uint32_t.)

After converting the pointer to a byte slice, it's very easy to convert to []T for arbitrary T.

Not without copying the underlying array.  Or am I missing something?

You can convert a unsafe.Pointer p to any []T without copying
as follows:
(*[(1 << 31) / unsafe.Sizeof(T{})]T)(p)[:len:len]

That isn't portable: on 64-bit platforms it only expresses sizes up to 2GB.  (And you can't work around it by increasing the constant because then it doesn't work on 32-bit platforms.)
It also seems likely to interact poorly with analysis tools: it temporarily produces a pointer to an "array" with elements in invalid memory.

There is way to use correct cap on all platforms:
(*[1<<(^uint(0)>>27&63)/unsafe.Sizeof(T{}) - 1]T)(p)[:len:len]
If the code breaks some analysis tool, then it's a
bug of the analysis tool. The code is fully conforming
and portable. If p is not pointing to Go heap, it should
also work with future GC enhancements.

Expecting CGo users in general to come up with those constants on their own is fairly user-hostile, when we could just provide a function that does it correctly.

Where in the spec does it say that pointers to arrays with arbitrary lengths are valid?  gc is not the spec, and gc is also not the only Go implementation.  (One could easily envision a compiler that, say, sanity-checks that all pointers to arrays point to addresses that are mapped in the program's address space.)

Also, those constants aren't even correct on amd64:
$ cat test/foo.go
package main

import (
        "fmt"
        "reflect"
        "unsafe"
)

func main() {
        s := []byte("Hello, ⚛")
        n := len(s)
        p := reflect.ValueOf(s).Pointer()

        s2 := (*[1<<(^uint(0)>>27&63)/unsafe.Sizeof([]byte{}) - 1]byte)(p)[:n:n]
        fmt.Println(string(s2))
}

$ go run test/foo.go
# command-line-arguments
test/foo.go:14: type [384307168202282324]byte larger than address space
test/foo.go:14: cannot convert p (type uintptr) to type *[384307168202282324]byte

That comes from here:
https://tip.golang.org/src/cmd/compile/internal/gc/align.go?h=address+space
To me, the fact that even you - someone deeply familiar with the Go language and its implementations - couldn't get those constants right strongly suggests that we should not expect more casual cgo users to do so.

I agree that we should probably find a solution to this problem.  We want to make cgo easier & safer.
Using SliceHeader is ok, that "cannot be used safely" warning is aimed at people trying to store Go pointers in its Data field.  Storing C pointers in the Data field should be ok.  The rest of the warning is basically the same as the one for unsafe.Pointer.
It's still tricky, though, you'd have to do:
h := reflect.SliceHeader{uintptr(p), n, n}
s := *(*[]T)(unsafe.Pointer(&h))

(In an ideal world, SliceHeader.Data should be an unsafe.Pointer, not a uintptr.  Too late now.)
I'm hesitant to put the fix in reflect, it is too heavyweight.  Maybe just something in package unsafe?
// MakeSlice makes a slice out of ptr/len/cap and stores it to s.
func MakeSlice(s, ptr unsafe.Pointer, len, cap int)

Using SliceHeader is ok, that "cannot be used safely" warning is aimed at people trying to store Go pointers in its Data field.  Storing C pointers in the Data field should be ok.

If that's the case, then just a doc fix might be sufficient.  (I suggested a similar approach in some code I was reviewing and @ianlancetaylor said not to do it.)

I'm hesitant to put the fix in reflect, it is too heavyweight. Maybe just something in package unsafe?

Maybe?  But unsafe doesn't otherwise have anything to do with built-in data structures like slices, and it's not entirely clear to me how you'd get from that to a value of slice type.  Would you convert "s" to a pointer-to-slice, or to some other type (e.g. the slice itself)?  If it's a pointer-to-slice, is the slice header allocated on the Go heap?
reflect.Value.Interface() at least makes the answers to those questions consistent, which is why it seems like a more natural fit to me - and SliceAt isn't that far off from the existing reflect.MakeSlice and reflect.NewAt.

In particular, this snippet of existing reflect code would be equivalent to SliceAt modulo the memory leakage for the reflect.ArrayOf call:
    func SliceAt(typ reflect.Type, len, cap int, p unsafe.Pointer) reflect.Value {
      return reflect.NewAt(reflect.ArrayOf(len, typ.Elem()), p).Elem().Slice(0, len)
    }

You'd do something like this:
var s []T
unsafe.MakeSlice(unsafe.Pointer(&s), ptr, len, cap)
...use s...

Doing it this way gets around the polymorphic return type you would need if MakeSlice returned a slice, or the allocation you would need if MakeSlice returned an unsafe.Pointer to a slice.
I agree that this is functionality that unsafe hasn't had historically.  But I think it would be the right place for this operation.  On the other hand, reflect.NewAt has a similar feel, and maybe both it and MakeSlice should be together.

I don't see how to use reflect.SliceHeader safely unless we exempt it from the Go 1 guarantee or promise that we will never change the representation of slices.  Since in the past we've discussed changing the representation of slices, it seems unwise to commit to the current representation for all time and for all implementations.  Same for reflect.StringHeader, of course.

To use reflect.SliceHeader you need to use unsafe, and unsafe is exempt from the Go 1 guarantee.

FWIW, this is not just a cgo related issue, it already occurs in some of the syscal-wrappers. For example, an implementation of syscall.Mmap needs to do basically the same construction.  It would be helpful if there is an API - even under unsafe - available that hides the implementation details and memory-layout for slices away. (Assuming the API doesn't need to change or can be augmented with an refined version).

This doesn't seem exactly what reflect is for. And it's not specific to cgo either: this comes up in system calls like mmap. I could see possibly adding something like unsafe.Slice(p, n, m) with the right types (p is pointer to T, result is []T). That would be a language change.
I guess we could add reflect.UnsafeSlice(t, p, n, m) to return an interface{} or a Value holding a slice of type t with pointer p, len n, cap m. It's not really reflect but maybe it's fine. I guess it's more reflect than Swapper, although that's not a great argument.
Personally, I don't mind writing *(*[1<<30]T)(unsafe.Pointer(p))[:n:m].

I think it's too late to do this for Go 1.8 at least.

@bcmills, are you still interested in this?

Yes.  (But I'm not sure whether I'll have the bandwidth to implement it for 1.9.)

I'm interested, too, and it looks like I have the time until May to try and implement unsafe.Slice(p, n, m), as suggested by Russ.

@rsc, you mention "([1<<30]T)(unsafe.Pointer(p))[:n:m]", which I would consider acceptable as well.  However, the current limit on the ArrayLength in the declaration of an array does not allow for sizes larger than 1<<30, even on 64-bit, which breaks your approach when the data pointed to is larger than 2GB (like, when calling mmap on large files).  Wouldn't it make sense to change that current limit for ArrayLength on 64-bit platforms, instead of (or in addition to) adding an API for slice-creation?

The current limit on array size on amd64 is 1 << 50 bytes.  You can handle memory blocks larger than 2G.
Probably we should permit larger values for pointer to array types.

I wasn't aware of the distinction between [N]T and *[N]T regarding N, interesting.  Is it safe to assume that allowing values up to N==1<<50 for *[N]T is easier to implement than adding an unsafe.Slice(p, n, m) API?

It might be easier, but arguably the user experience is much worse.  See the discussion starting at https://github.com/golang/go/issues/13656#issuecomment-165618599.

Don't get me wrong, I would like to see unsafe.Slice(p, n, m).  But until then I would be happy to use (*[N]T)(unsafe.Pointer(p))[:n:m] with large enough N, if this is cheap to get.  Right now, even that doesn't work for larger N.

For the record, I proposed reflect.UnsafeSlice not unsafe.Slice. We're not adding to unsafe - that's a language change.

Rereading, I guess I mentioned both, but the point here is that if we do something for Go 1.9 it needs to be in reflect.

@oec are you (or anyone else on this thread) still planning on sending a reflect.UnsafeSlice CL for 1.9? I'm also interested in this feature and would be happy to do the work.

I think I'd rather leave this for Go 1.10 at this point. reflect is pretty awful too - I forgot that you'd have to return an interface{} or a reflect.Value.

@oec In case I wasn't clear [1<<N]byte already works today for constant N up to 50.

For the case of cgo we could implement this directly in cgo.
C.AsSlice(T, CPointer, Len)
That will evaluate to a []T that points into C memory with Len elements (the slice length and capacity will both be set to Len).  Passing T directly is weird but should work, and I don't see a better way.
That won't help people who are using mmap directly, though.

1.10 is probably fine for reflect or unsafe.  I like Ian's idea of adding a builtin for cgo: it nicely parallels C.GoString.  (So perhaps we should name it C.GoSlice?)
FWIW, I still think returning reflect.Value is the right thing for Go 1 due to the similarity to reflect.NewAt and reflect.MakeSlice.  At the very least, even if we did add to unsafe I think we would also need to add something to reflect too: presumably the unsafe variant would need at least one typed argument, so we'd be introducing an operation for concrete types that doesn't have a reflective equivalent.

@cespare, please go ahead, I don't think I could come up with implementation under reflect. for 1.9 anyways (unsafe. sounds much simpler, but I might be wrong).
@ianlancetaylor, I think I understand correctly: [1<<50]byte, but only *[1<<30-1]byte, correct?

@oec up to 50 should work in both forms on amd64.

@ianlancetaylor, thanks for the clarification, this is (very good) news to me, I must have missed that change.   (But I think the error messages for other platforms (like nacl-amd64p32 as on play.golang.org) could be improved by stating "constant NNN overflows int on this platform" and "array bound is too large on this platform")

@ianlancetaylor, coming back to your suggestion in https://github.com/golang/go/issues/13656#issuecomment-291947849.
I think we can omit the type argument: we can infer it from the type of the pointer. AsSlice would follow the type schema
AsSlice(*T, int) []T

for any type T, and if you want to use it with an 'unsafe.Pointer' you'd have to first cast that pointer to a concrete type:
var s []byte = C.AsSlice((*byte)(ptr), n)

It seems like this can't be done in reflect cleanly.
We could experiment with adding it to cgo, but we were also talking about passing the unmodified sources to the Go compiler and letting it do name lookups like C.foo. Adding a new "intrinsic" here would complicate that a little.
The alternative is to put it in unsafe, which is a language change.

It's #19367 that I'm thinking of. That's on hold for Go 2, so probably this should be too. (That would address this exact need.)

FWIW, I have implemented a library locally using reflect and based on the comments above.
Oddly, it appears that reflect does not enforce the same limits on array sizes as the compiler.
My solution for reflect would be roughly:
// SliceAt returns a view of the memory at p as a slice of elem.
// The elem parameter is the element type of the slice, not the complete slice type.
func SliceAt(elem Type, p unsafe.Pointer, n int) Value {
	return NewAt(bigArrayOf(elem), p).Elem().Slice3(0, n, n)
}

// bigArrayOf returns the type of a maximally-sized array of t.
//
// This works around the memory-stranding issue described in
// https://golang.org/issue/13656 by producing only one array type per element
// type (instead of one array type per length).
func bigArrayOf(t Type) Type {
	n := ^uintptr(0) / uintptr(t.Size())
	const maxInt = uintptr(^uint(0) >> 1)
	if n > maxInt {
		n = maxInt
	}
	return ArrayOf(int(n), t)
}

The problem is having to write (*[C]T)(unsafe.Pointer(v))[:n:n], for some C, T, v, and n.
A simpler way to write that entire expression would be ideal.
If that can't be fixed before Go2, perhaps an easier problem could be.
A lot of people much smarter than I am have written the constant C many different ways in this thread. It's the most magic part of the expression and the part that I am the least confident I am writing (well, copy-and-pasting) correctly.
If cgo (or runtime or somewhere appropriate) exported a constant with the correct value of C that is the largest possible C for the current platform that would, at least, make it easier to write portable, correct code.
I would much rather a solution to the whole problem be found and am only suggesting this if there is no better solution that can be implemented before Go2.

@jimmyfrasche It's an interesting idea but the maximum value for C depends on the size of T.

@ianlancetaylor if it's the maximum for the platform assuming a size of 1 you could use it to compute the correct value for arbitrary T. Still not pretty and far from ideal, but its use could be documented and explained on the wiki (which currently just has 1 << 30 without explanation now https://github.com/golang/go/wiki/cgo#turning-c-arrays-into-go-slices )

Going to close this since it seems clear that anything we do in reflect is going to be awful. Better to wait for #19367.

Hi @rsc @ianlancetaylor, I am also curious about the specification of the GC behavior when it does not interacts with slices/strings which Data field points to the C-allocated memory.
I have only found this paragraph from the cgo wiki.
This question relates this comment by @bcmills :

Where in the spec does it say that pointers to arrays with arbitrary lengths are valid? gc is not the spec, and gc is also not the only Go implementation. (One could easily envision a compiler that, say, sanity-checks that all pointers to arrays point to addresses that are mapped in the program's address space.)

Thanks!


Animation is not smooth on first fire

Description
I just installed the Rive to test it out on Android, it's working but not as expected.
So in Rive's Discord i found a dark mode switch project which is here
Dark mode switch
My knowledge about Rive is quite limited so simply i wanted to create a dark switch with a onPress event.
so when I press for first time the switch is switching but not with  animation, after second click its starting to work as expected.

 <TouchableOpacity
          onPress={() => {
            setIsDark(!isDark);
            riveRef.current.setInputState("State Machine 1", "isDark", isDark);
          }}
          autoplay={true}
          style={{width: 100, height: 50}}
        >
          <Text>FIRE</Text>
        </TouchableOpacity>
        <Rive
          ref={riveRef}
          resourceName="dark"
          style={{width: "100%", height: 40}}
          autoplay={false}
        />

https://user-images.githubusercontent.com/44513402/192143445-b4ec20f8-dc09-4878-8501-b5eca44d1af4.mov

Probably related to the native iOS sdk: https://github.com/rive-app/rive-ios/issues/269
I indeed have no issue on Android, my first animation being not smooth only happens on Android.


HDV: handle urbanized areas that have “—“ in name

The issue is in the transportation electrification regional scaling factor files...
What about state boundaries? Define a strategy here...overall primarily seems like a research question.
An example of the issue is as follows:
'Fayetteville--Springdale--Rogers, AR--MO'
How do we deal with regions that multiple regions and potentially multiple states?

Options:

centroid
area-based
population-based

I lean towards splitting the urban areas that across state boundaries into each state proportional to the population of that area in each state (if such information can be easily attained).


MSI related README fixes

This is under development.

I will be doing this in another PR. Closing.


chore: Update contributing and license links to correct location

PR Details

Update contributing and license links to the correct location
Description

Contributing guidelines link changed to '(./docs/CONTRIBUTING.md)'
License link changed to '(./LICENSE)'
Related Issue

https://github.com/Farfetch/react-context-responsive/issues/15#issue-672896953
Motivation and Context

How Has This Been Tested

Open the repository, and go to the Contributing section. The link should work.
Types of changes

[x] Docs change / refactoring / dependency upgrade
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

[ ] My code follows the code style of this project.
[x] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

Disclaimer
By sending us your contributions, you are agreeing that your contribution is made subject to the terms of our Contributor Ownership Statement

Just saw your commit message, it doesn't comply with commitlint settings, have you used --no-verify when creating the commit?

No, I didn't use --no-verify when creating the commit

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


device tracker attributes

@Danielhiversen this is probably a more "correct" implementation: battery is a passed in attribute to see, we should keep track of that.
Use the system provided device_state_attributes property.

I agree, sorry for messing it up :/

Yeah look better...

@lwis I do not think this was ready to merge. See my comment in the code.

@Danielhiversen I couldn't see any comments - sorry.

I think you're right, though. :(

Even though this has been merged already I'll ask here before opening an issue:
I use MQTT device trackers, and since 0.34 their history doesn't update and are always presented as home. The internal state is correctly set to not_home etc., so everything is still working. But at first I was irritated seeing me being home all day today, even thou I was not.
Mentioning here since in some way it may be related. Or not.

device_tracker component from 0.34 works on my system with owntrack/fritzbox.


JS sample with Vite + React?

Is it possible to add a vanilla JS sample with Vite + React?
We have Vite + React, but it is with TypeScript (https://github.com/microsoft/vscode-webview-ui-toolkit-samples/tree/main/frameworks/hello-world-react-vite)
VSCode plugin development is already very difficult, making it with typescript verbose samples is even worse

Hey @sovetski! I'd be open to that!
To be extra clear, however, is your hope that the Vite + React part of the extension (i.e. everything inside the webview-ui folder) be vanilla JS or that all code in the extension (everything inside src and webview-ui) be vanilla JS?

Hi @hawkticehurst, thank you for your quick answer!
To be honest, both webview-ui and src will be very good.
Because actually, when we want to debug something to understand how it works really (on src and other folders), verbose typescript make things more difficult, that is why I think it will be a good idea.

Of course! And sounds good, I'll put it on the backlog to create a sample that's entirely vanilla JS in that case!
And oh yeah interesting, I usually tend to find the typescript/type hints help a lot when developing VS Code extensions but I totally understand how TS can get in the way (there are definitely other areas of web-based programming where I muchhh prefer vanilla JS) so more than happy to offer an option for those who want to avoid TS 😊

Hi @sovetski!
Back with a final update: I'm very sorry to say that the toolkit is being deprecated and all development on these samples has come to a close.
There was an announcement a few days ago on the main toolkit repo where you can learn more details and leave any questions or comments you may have.
Beyond that, thank you so much filing this issue and apologies for never getting around to addressing it. It means a lot that you contributed to the improvement of this project. I wish you all the best in your future VS Code extension endeavors!


Made compatible with gradle-groovy-android-plugin v1.0.0

In gradle-groovy-android-plugin 1.0.0 plugin name was changed from groovyx.grooid.groovy-android to groovyx.android, so emerger shouldn't panic if it sees
apply plugin: 'groovyx.android' instead of apply plugin: 'groovyx.grooid.groovy-android'

Thanks
Just to get this straight... Would it be enough by checking that if version is >= 1.0.0 plugin name is "groovyx.android" ?

Sorry I didn't notice this was a PR. If everything goes ok, I'll be merging it during today or tomorrow morning :+1:

Update: It will take longer than expected because I'm planning to migrate emerger and grooid-templates under the same organization. This way it will be easier to maintain both projects. This means it will happen during the weekend.


Threshold vs height

Hi, I want animate large area (height), I try different pourcentage value for threshold but result are not good.
Is it possible to use a fixed value for threshold like `threshold: '100px' or is there any others way to fix that?
Thank you, Florian.

According to IntersectionObserver docs, threshold can be only a number or an array of numbers. Currently, sal.js doesn't support array of numbers. If you could create a demo with this particular issue, maybe I could help.

Thank you for your feedback, I try to create a demo of my issue.

@mciastek I can't create a demo but this is a real project with the issue : https://www.caveduvaldor.com
Open this link on a small devices view and look at the third section of the page, user think there is no content.
If we can set something like 100px it will always works but percentage value is an issue if the animated area is very height.

The threshold doesn't accept absolute values, only relative ones - it's mentioned in docs. It's not possible to pass 100px. You can use only floats or integers here. I can suggest to apply a custom animation to this tall section. The issue here is translate value, which by default is set to 20% of the height. You can add you custom animation, that will use translate with fixed value, like 100px. Then this section will be shifted down by 100px and user will need to scroll only 100px to see animation. Let me know if it helps you.

@mciastek thank you, I'll try to use a fixed offset ;)

Sure, I'm closing this PR. Reopen when needed.


Improve Anonymization process performance

AS a Data Scientist
I WANT TO improve anonymisation process performance
IN ORDER TO complete the anonymisation process in a more reasonable time
Acceptance Criteria:

[x]  logic of anonymisation process is reviewed
[x]  processing logic is imrpoved both tiem and resource wise

@kunnark

User story does not correspond to the style we have agreed upon;
ACs missing completely;
Regardless of the above, this issue is already marked as "Ready".

Code handed over to engineering side for including in the API.

@tarstarkvara please commit code as well.

@alimuhammadahmer is there a specific commit to relate to this issue?

Close as done by https://github.com/buerokratt/Data-Anonymizer/issues/56


Dashboard Issue - Creating Interactive Map

@JasonSills
Hello, after successfully creating two new tabs with unique information, I am unable to successfully create the map that goes with the information. It is able to run but when I do so, there is no map. I have attached a screenshot of what my browser looks like as well as the code that I am using when attempting to create the map. I would greatly appreciate some guidance. Thank you.

renderLeaflet({

  d10 <- dat %>%
    filter(Weather >= input$weather.of.day[1],
           Lightcondition <= input$condition.light[1],
           Gender_Drv1 %in% input$driver.1.gender,
           Unittype_One %in% input$driver.1.pedcy )

  d10$col.vec <- ifelse(test = d10$nohurt,
                        yes = "gray20",
                        no = ifelse(test = d10$inj,
                                    yes = "steelblue",
                                    no = "darkorange"))

  point.size <- d10$Totalinjuries + d10$Totalfatalities

  crash.details <- paste0("Time: ", d10$DateTime, "
",
                          "Total Fatalities: ", d10$Totalfatalities, "
",
                          "Total Injuries: ", d10$Totalinjuries, "
",
                          "Collision type: ", d10$Collisionmanner)

  tempe <- leaflet() %>%
    addProviderTiles("CartoDB.Positron") %>%
    setView(lng = -111.9278,
            lat = 33.39951,
            zoom = 13)

  addCircles(tempe,
             lng = d10$Longitude,
             lat = d10$Latitude,
             fillColor = d10$col.vec,
             fillOpacity = 0.5,
             stroke = FALSE,
             radius = 50 * (1 + 0.33 * point.size),
             popup = crash.details)

})

So I just realized that a map shows up in my lower left corner but does not showcase the information I am trying to relay.

@lindaalvarez
I cannot see the rest of your code, but it looks like you are missing:
Outputs
Traffic Accidents By Day and Time
Go back through the code and you will notice that before each code chunk with renderLeaflet you will find this text. This is telling shiny that the subsequent code chunk is the output and the title is Traffic Accidents By Day and Time. Without this, R thinks that you are still building this on the text before the earlier code chunk:
Traffic Accidents By Day and Time
Inputs {.sidebar}
This is for the sidebar and explains why you are getting a map in your sidebar.

Okay, I will go ahead and keep working on it and let you know if I keep running into issues. Thank you for taking your time to look at this! @JasonSills

Outputs
Driver Characteristics

renderLeaflet({

  d10 <- dat %>%
    filter(Weather >= input$weather.of.day,
           Lightcondition <= input$condition.light,
           SurfaceCondition <= input$surface.condition,
           Gender_Drv1 %in% input$driver.1.gender,
           Unittype_One %in% input$driver.1.pedcy )

  d10$col.vec <- ifelse(test = d10$nohurt,
                        yes = "gray20",
                        no = ifelse(test = d10$inj,
                                    yes = "steelblue",
                                    no = "darkorange"))

  point.size <- d10$Totalinjuries + d10$Totalfatalities

  crash.details <- paste0("Time: ", d10$DateTime, "
",
                          "Total Fatalities: ", d10$Totalfatalities, "
",
                          "Total Injuries: ", d10$Totalinjuries, "
",
                          "Weather", d10$Weather, "
",
                          "Light Condition", d10$Lightcondition, "
",
                          "SurfaceCondition", d10$SurfaceCondition, "
",
                          "Collision type: ", d10$Collisionmanner)

  tempe <- leaflet() %>%
    addProviderTiles("CartoDB.Positron") %>%
    setView(lng = -111.9278,
            lat = 33.39951,
            zoom = 13)

  addCircles(tempe,
             lng = d10$Longitude,
             lat = d10$Latitude,
             fillColor = d10$col.vec,
             fillOpacity = 0.5,
             stroke = FALSE,
             radius = 50 * (1 + 0.33 * point.size),
             popup = crash.details)

})

I was able to fix that error but now my code is not showing the appropriate dots and markers

This is what my site is looking like as of right now

Additional Conditions {data-orientation=rows}
Sidebar {.sidebar}
Driver Characteristics

radioButtons(inputId = "Weather",
             label = h4("Weather on Day of Accident"),
             choices = c("Sunny",
                         "Cloudy",
                         "Rain"),
             selected = "Cloudy")

selectizeInput(inputId = "Lightcondition",
               label = h4("Time of Day"),
                 choices = c("Morning",
                        "Afternoon",
                        "Evening"),
            selected = "Morning")

selectInput(inputId = "d1gender",
            label = h4("Driver 1 Gender"),
            choices = c("Male",
                        "Female",
                        "Unknown"),
            selected = "Male")

selectInput(inputId = "d2gender",
            label = h4("Driver 2 Gender"),
            choices = c("Male",
                        "Female",
                        "Unknown"),
            selected = "Male")

radioButtons(inputId = "SurfaceCondition",
            label = h4("Street Condition"),
            choices = c("No Pot Holes",
                        "Pot Holes",
                        "Unknown"),
            selected = "No Pot Holes")

radioButtons(inputId = "d1pedcy",
             label = h4("Driver 1 Transportation"),
             choices = c("Driver",
                         "Pedalcyclist",
                         "Pedestrian"),
             selected = "Driver")

radioButtons(inputId = "d2pedcy",
             label = h4("Driver 2 Transportation"),
             choices = c("Driver",
                         "Pedalcyclist",
                         "Pedestrian"),
             selected = "Driver")

Outputs
Driver Characteristics

renderLeaflet({

  d10 <- dat %>%
    filter(Weather >= input$weather.of.day,
           Lightcondition <= input$condition.light,
           SurfaceCondition <= input$surface.condition,
           Gender_Drv1 %in% input$driver.1.gender,
           Unittype_One %in% input$driver.1.pedcy )

  d10$col.vec <- ifelse(test = d10$nohurt,
                        yes = "gray20",
                        no = ifelse(test = d10$inj,
                                    yes = "steelblue",
                                    no = "darkorange"))

  point.size <- d10$Totalinjuries + d10$Totalfatalities

  crash.details <- paste0("Time: ", d10$DateTime, "
",
                          "Total Fatalities: ", d10$Totalfatalities, "
",
                          "Total Injuries: ", d10$Totalinjuries, "
",
                          "Weather", d10$Weather, "
",
                          "Light Condition", d10$Lightcondition, "
",
                          "SurfaceCondition", d10$SurfaceCondition, "
",
                          "Collision type: ", d10$Collisionmanner)

  tempe <- leaflet() %>%
    addProviderTiles("CartoDB.Positron") %>%
    setView(lng = -111.9278,
            lat = 33.39951,
            zoom = 13)

  addCircles(tempe,
             lng = d10$Longitude,
             lat = d10$Latitude,
             fillColor = d10$col.vec,
             fillOpacity = 0.5,
             stroke = FALSE,
             radius = 50 * (1 + 0.33 * point.size),
             popup = crash.details)

})

This is the complete code for that "tab". If you had a second to look into this and let me know where I am going wrong I would greatly appreciate it. Thank you for your time @JasonSills

@lindaalvarez
Without seeing the rest of your code, what has me wondering is this portion of the code:

  d10 <- dat %>%
    filter(Weather >= input$weather.of.day,
           Lightcondition <= input$condition.light,
           SurfaceCondition <= input$surface.condition,
           Gender_Drv1 %in% input$driver.1.gender,
           Unittype_One %in% input$driver.1.pedcy )

Have you tried substituting <= and >= with %in%?
Also, try reversing your inputs:
d10 <- dat %>%
  filter(Weather %in% input$Weather,
         Lightcondition %in% input$Lightcondition,
         SurfaceCondition <= input$SurfaceCondition,
         Gender_Drv1 %in% input$driver.1.gender,
         Unittype_One %in% input$driver.1.pedcy )

Again, I'm not seeing the rest of your code, but your inputs you have the terms used in the section I rewrote. For example, in this section of code:
radioButtons(inputId = "Weather",
             label = h4("Weather on Day of Accident"),
             choices = c("Sunny",
                         "Cloudy",
                         "Rain"),
             selected = "Cloudy")

inputID = "Weather". This is your input$ for your output section.

okay I will go ahead and work on that, I will let you know if I am not able to fix this. thank you again!

I was able to figure out where I went wrong @JasonSills - First I was not using the correct terms for the data set and secondly I was not writing my radio buttons and select input correctly.  This is a sample of my correct code!
radioButtons(inputId = "Weather",
label = h4("Weather"),
choices = c("Clear", "Cloudy", "Rain", "Blowing Sand Soil Dirt", "Fog Smog Smoke"),
selected = c("Clear"),
inline = TRUE)
selectInput(inputId = "LightCondition",
label = h4("Light Conditions"),
choices = c("Daylight", "Dark Lighted", "Dusk", "Dawn", "Dark Not Lighted"),
selected = "Daylight")


State-District wise data processing

Adding the district wise data that are needed for the district level maps on the front-end.

Changed the file name to "state_district_wise.json" since it's not "raw" anymore


A better repr

We need to define a better repr method

My suggestion is repr(img) can return  the size of the image something like <Single image 25, 26>

This has been resolved in 5ec16f0f4498342a54f3d698dd783d768a10c28a


Update interactjs to v1.4

Interact is now up to v1.4 and includes several bug fixes which would be nice to have.

Which bug fixes specifically, do you have any idea?

Personally, I'd benefit from the improved feature detection for pointer events in MSIE Web Browser Control. I said several knowing there are others fixes that may benefit others as well.

Any update on this? Would you be open to a PR?

Sure! Submit a PR

Sure! Submit a PR

I updated to the latest v1.5.3, and everything seems to work fine.


[2.1]-Add Close All,Close Others Options to script editor

Add 'Close All' 'Close Others' options to script editor menu.
Add Context Menu to script list of script editor.

Do we really need so many options? What's "Others"?

If you open too many files, it will be hard to manage so many files.
You must close files one by one,it's very annoying.
Close Others is in addition to the currently open file.
Sorry for my english.
What should it call it?

That option Close All  should save my life to avoid press too much Meta+W to close script files.

What about haveing a [x] (closing button) on the end of doc line? (2.1 and 3.0)

You must click that button one by one too.

@sersoong wouldn't Close Others be

close all scripts except the currently open one

Rename to Close Other Tabs,like firefox or chrome

@akien-mga Do we still merge improvements to 2.1 ?

Are you going to give up version 2.1?
This stable branch?

@sersoong The 2.1 version will be updated until 3.1 or 3.2 is out (at least another 6 months), so there is no need to worry now.

Do we still merge improvements to 2.1 ?

As long as they're implemented in the master branch too when relevant, and don't risk of affecting stability, yes.


B 17788 get table rest

Ticket
Discussion
Please see the testing section as I have pointed out an area for conversation within this PR.
Changes

Refactored GetTable section of the code to form new REST calls based on the GatewayService.
Changed TRDM package file structure and organization to try and improve readability. Such as moving the flow start to a trdm.go file and instead of the function being called LastTableUpdate it's now called BeginTGETFlow that creates the cron job which calls lastTableUpdate.
Made some minor touch ups to lastTableUpdate such as logger locations, variables, and the calling and handling of getTable.

Review
Please see documentation here and here to provide better feedback.
Testing
The code is now at a point of testing - though interestingly I've encountered a little hiccup when attempting to do so manually. In theory, as long as the server boots up with staging credentials it should attempt to call BeginTGETFlow. As of right now, I'm encountering a little issue with the AWS credentials provided, this may be due to the server automatically using dev creds and not being able to get overwritten with stg creds.  It is failing on my end due to having an empty 'roleArn'. I would encourage this as a topic of discussion within the PR.
If we can't test it properly within local, we may push it up to staging for it to just fail there. What should happen is on the local side you should be able to provide staging credentials (Such as using aws-vault), turn on the server, and it should be able to create a proper provider, form a good request, sign that request, and then attempt to send it to the gateway. However, right now it's failing due to creds before even sending it off.
NOTE
It should fail. But, we should get denied at gateway entry not on credential signage. See security reasons why it would fail locally here.

Warnings

:warning:
Please add the JIRA issue key to the PR title (e.g. MB-123)

  Generated by :no_entry_sign: dangerJS against af1fb4b2da2b0b060ab1c1f776d30fa8678e2a66

Test coverage on server failed.
Last run: Mon 13 Nov 2023 04:26:04 PM UTC
Refer to this report to see coverage details for the server app.
Documentation for test coverage can be found at this link.

The empty role arn could be due to something local.. still trying to discover more

There's a chance it may already be g2g, but want to verify all is good first of course


Mod Bootloops on Startup

Starting on a 1.18.2 fabric curseforge profile, only mods alter client-side gameplay such as iris and sodium. Stuck on perpetual mojang loading screen over and over again when i start up my launcher.

Please post your minecraft log

It doesn't crash, it just perpetually loads.
latest.log

Remove cosmetica
Duplicate of #261


Lenovo P1 Gen 6 with Ada generation AD104 12G 192bit for ML/LLM training

The Lenovo P1 is an excellent machine to run NVidia GPUs as a mobile option to building your own around desktop 4090's or A4500s
The machine complements the Macbook Pro 16 inch M1+ model with it's metal GPU under tensorflow

Make sure to get the 64G model - not the 96G one
https://forums.lenovo.com/t5/ThinkPad-P-and-W-Series-Mobile-Workstations/P1-Gen6-Bricked-after-BSOD-second-laptop-with-the-same-problem/m-p/5254145?page=2#6148028
Disable the intel GPU and reenable - to move to GPU 1

update windows
Install Google Chrome
Git + Git Bash
Java 21
Springsource Tool Suite 4.4
Gcloud SDK

https://cloud.google.com/sdk/auth_success
C:\soft\gcloiud>gcloud config get project
bigquery-ol

C:\soft\gcloiud>gcloud version
Google Cloud SDK 453.0.0
bq 2.0.98
core 2023.10.27
gcloud-crc32c 1.0.0
gsutil 5.27

Maven 3.9.5

https://maven.apache.org/download.cgi

runtime - run gpuburn on the GPU
micha@p1gen6 MINGW64 /c/wse_github/gpu-burn (master)
$ docker build -t gpu_burn .

micha@p1gen6 MINGW64 /c/wse_github/gpu-burn (master)
$ docker run --gpus all gpu_burn

==========
== CUDA ==
==========

CUDA Version 11.8.0

Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license

A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.

GPU 0: NVIDIA RTX 3500 Ada Generation Laptop GPU (UUID: GPU-25326b0f-ad93-c319-7027-b0029d4aee8e)
Using compare file: compare.ptx
Burning for 120 seconds.
10.8%  proc'd: 148 (13665 Gflop/s)   errors: 0   temps: 73 C
        Summary at:   Wed Nov  1 18:38:50 UTC 2023

23.3%  proc'd: 333 (13337 Gflop/s)   errors: 0   temps: 79 C
        Summary at:   Wed Nov  1 18:39:05 UTC 2023

35.8%  proc'd: 518 (13367 Gflop/s)   errors: 0   temps: 80 C
        Summary at:   Wed Nov  1 18:39:20 UTC 2023

45.8%  proc'd: 629 (13367 Gflop/s)   errors: 0   temps: 80 C
        Summary at:   Wed Nov  1 18:39:32 UTC 2023

56.7%  proc'd: 814 (13207 Gflop/s)   errors: 0   temps: 81 C
        Summary at:   Wed Nov  1 18:39:45 UTC 2023

69.2%  proc'd: 999 (13303 Gflop/s)   errors: 0   temps: 83 C
        Summary at:   Wed Nov  1 18:40:00 UTC 2023

79.2%  proc'd: 1110 (12973 Gflop/s)   errors: 0   temps: 82 C
        Summary at:   Wed Nov  1 18:40:12 UTC 2023

90.0%  proc'd: 1295 (13059 Gflop/s)   errors: 0   temps: 83 C
        Summary at:   Wed Nov  1 18:40:25 UTC 2023

100.0%  proc'd: 1480 (13182 Gflop/s)   errors: 0   temps: 84 C
Killing processes with SIGTERM (soft kill)

```\
![image](https://github.com/ObrienlabsDev/blog/assets/24765473/bb99a21d-62a7-4152-b10a-3c5d22fd9088)

NVidia tensor cores only
micha@p1gen6 MINGW64 /c/wse_github/gpu-burn (master)
$ cat Dockerfile
ARG CUDA_VERSION=11.8.0
ARG IMAGE_DISTRO=ubi8

FROM nvidia/cuda:${CUDA_VERSION}-devel-${IMAGE_DISTRO} AS builder

WORKDIR /build

COPY . /build/

RUN make

FROM nvidia/cuda:${CUDA_VERSION}-runtime-${IMAGE_DISTRO}

COPY --from=builder /build/gpu_burn /app/
COPY --from=builder /build/compare.ptx /app/

WORKDIR /app

CMD ["./gpu_burn", "-tc", "120"]
#CMD ["./gpu_burn", "120"]

   10  docker build -t gpu_burn .
   11  docker run --gpus all gpu_burn

micha@p1gen6 MINGW64 /c/wse_github/gpu-burn (master)
$ docker run --gpus all gpu_burn

==========
== CUDA ==
==========

CUDA Version 11.8.0

Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license

A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.

GPU 0: NVIDIA RTX 3500 Ada Generation Laptop GPU (UUID: GPU-25326b0f-ad93-c319-7027-b0029d4aee8e)
Using compare file: compare.ptx
Burning for 120 seconds.
10.8%  proc'd: 518 (47881 Gflop/s)   errors: 0   temps: 68 C
        Summary at:   Wed Nov  1 21:32:20 UTC 2023

21.7%  proc'd: 1073 (45284 Gflop/s)   errors: 0   temps: 72 C
        Summary at:   Wed Nov  1 21:32:33 UTC 2023

32.5%  proc'd: 1591 (46962 Gflop/s)   errors: 0   temps: 75 C
        Summary at:   Wed Nov  1 21:32:46 UTC 2023

43.3%  proc'd: 2146 (46766 Gflop/s)   errors: 0   temps: 78 C
        Summary at:   Wed Nov  1 21:32:59 UTC 2023

53.3%  proc'd: 2664 (46698 Gflop/s)   errors: 0   temps: 79 C
        Summary at:   Wed Nov  1 21:33:11 UTC 2023

64.2%  proc'd: 3219 (46535 Gflop/s)   errors: 0   temps: 78 C
        Summary at:   Wed Nov  1 21:33:24 UTC 2023

75.0%  proc'd: 3774 (45680 Gflop/s)   errors: 0   temps: 81 C
        Summary at:   Wed Nov  1 21:33:37 UTC 2023

85.8%  proc'd: 4292 (45082 Gflop/s)   errors: 0   temps: 81 C
        Summary at:   Wed Nov  1 21:33:50 UTC 2023

96.7%  proc'd: 4810 (46265 Gflop/s)   errors: 0   temps: 81 C
        Summary at:   Wed Nov  1 21:34:03 UTC 2023

100.0%  proc'd: 5032 (46172 Gflop/s)   errors: 0   temps: 82 C
Killing processes with SIGTERM (soft kill)
Using compare file: compare.ptx
Burning for 120 seconds.
Initialized device 0 with 12281 MB of memory (11119 MB available, using 10007 MB of it), using FLOATS, using Tensor Cores
Results are 268435456 bytes each, thus performing 37 iterations
Freed memory for dev 0
Uninitted cublas
done

Tested 1 GPUs:
        GPU 0: OK

Double on RTX-3500

micha@p1gen6 MINGW64 /c/wse_github/gpu-burn (master)
$ docker run --gpus all gpu_burn

==========
== CUDA ==
==========

CUDA Version 11.8.0

Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license

A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.

GPU 0: NVIDIA RTX 3500 Ada Generation Laptop GPU (UUID: GPU-25326b0f-ad93-c319-7027-b0029d4aee8e)
Using compare file: compare.ptx
Burning for 120 seconds.
51.7%  proc'd: 17 (298 Gflop/s)   errors: 0   temps: 74 C
        Summary at:   Wed Nov  1 21:39:54 UTC 2023

62.5%  proc'd: 17 (298 Gflop/s)   errors: 0   temps: 72 C
        Summary at:   Wed Nov  1 21:40:07 UTC 2023

75.0%  proc'd: 17 (298 Gflop/s)   errors: 0   temps: 70 C
        Summary at:   Wed Nov  1 21:40:22 UTC 2023

87.5%  proc'd: 17 (298 Gflop/s)   errors: 0   temps: 67 C
        Summary at:   Wed Nov  1 21:40:37 UTC 2023

100.0%  proc'd: 17 (298 Gflop/s)   errors: 0   temps: 65 C
        Summary at:   Wed Nov  1 21:40:52 UTC 2023

100.0%  proc'd: 34 (304 Gflop/s)   errors: 0   temps: 65 C
Killing processes with SIGTERM (soft kill)

CMD ["./gpu_burn", "-d", "120"]


Add owner UID and Notification setting field to Assignment Model

The Assignment is required to save the owner in order to specify the permission for who can get, update or remove it
Also, the Notification setting is used to specify when should we notify the user about this assignment

Note: The owner UID should be the foreign key from User Model

This has been implemented in #23


Firestore Native Mode (non-Datastore mode) support

I saw #1507 but wasn't sure why it was closed.
Are there any plans at this time to add native Firestore support?

I think the OP closed #1507 because they were looking for Firestore support in Datastore mode, which we already have.
Yes, we're planning to support Firestore, but we can't share any concrete timeline right now.
For others reading it, 👍 up this issue if you're interested in Spring Data Firestore support.

The Spring Data support for Firestore has been added in 1.2.0. Please create new issues based on testing of the new features.


Delegate method for "valueDidUpdate:" and "valueShouldUpdate:"

Hi @kapoorsahil are you asking for these delegate methods?
I am not thinking to add delegate. This stepper is a subclass of UIControl and you can use target action.

The target action is not a public method, hence can't be overridden when used via pods. I might be wrong, let me the the correct way to use it.

quantity.addTarget(self, action: #selector(fafa), for: UIControl.Event.valueChanged)
@objc func fafa(){
print("yea")
}


[supply] Also upload changelog when uploading bundle

Checklist

[x] I've run bundle exec rspec from the root directory to see all new and existing tests pass
[x] I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
[x] I've read the Contribution Guidelines
[x] I've updated the documentation if necessary.

Motivation and Context
This PR addresses the issue documented at https://github.com/fastlane/fastlane/issues/13616
New android bundle updates would not upload the changenotes for the new version.
Description
After uploading an apk, the existing code checks for new changenote metadata from the uploaded version and immediately uploads it. This was not occurring when uploading app bundles. This fix does the same thing for bundles, as it is doing for apks in the upload_binary_data(apk_path) function.
changes have been tested on our android code base, by utilising my local modified version of fastlane as documented at https://github.com/fastlane/fastlane/blob/master/Testing.md#test-your-local-fastlane-code-base-with-your-setup

I signed it!

Awesome catch!
Would it make sense to extract the shared logic to a upload_changelog_for_all_languages (or similarly named) method? Or is that overkill?

I did consider that, but was weary of getting into confusing naming conflicts related the changelogs.. there's already def upload_changelogs(language) - which doesn't take an explicit version number, so didn't want to cause confusion (especially as this is my first tinkering in this code base (and in ruby in general). Seemed like a rabbit hole for an otherwise quick fix atm ;)

Valid point.
What is the quickest way to create one of these aab files / bundles for testing this? (Windows, Android Studio installed)

The quickest might be to grab this example code https://www.raywenderlich.com/9043-android-app-bundles-getting-started - though of course you'll need to change the bundle ID and create a dummy app in your play store account.
You could otherwise try just building a bundle of any existing code directly out of Android Studio ie https://mobikul.com/android-app-bundles/ - if that works then the gradle(task: "bundleRelease") fastlane command should also work.

They sure don't make it easy to just test this with an existing app:

Allowing Google Play to manage your app signing key is a requirement to use the Android App Bundle, and to benefit from Google Play’s Dynamic Delivery.

anything I can do to help this along?

Could we get some help from you on that one @KrauseFx? Thanks

@joshdholtz


fix: LatestAttestationNonce constant name typo

Overview
Fixes typo
Checklist

[ ] New and updated code has appropriate documentation
[ ] New and updated code has new and/or updated testing
[ ] Required CI checks are passing
[ ] Visual proof for any user facing features like CLI or documentation updates
[ ] Linked issues closed with keywords

Codecov Report

Merging #2646 (aae155b) into main (3722119) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2646   +/-   ##
=======================================
  Coverage   20.62%   20.62%
=======================================
  Files         133      133
  Lines       15345    15345
=======================================
  Hits         3165     3165
  Misses      11877    11877
  Partials      303      303

Files
Coverage Δ

x/qgb/keeper/keeper_attestation.go
66.66% <100.00%> (ø)

x/qgb/types/keys.go
0.00% <ø> (ø)


Add more information to the setup.py for briefcase

Per https://packaging.python.org/tutorials/distributing-packages/#project-urls
we can have even more helpful information in our package and on our PyPI page by
adding urls to the setup.py

This looks great; this will take effect on the next package update. ping @freakboy3742


Clarify "pick" vs. "drop" in interactive rebase

Includes changes proposed in #526, plus a couple other minor adjustments.

🙌🏻🙌🏻🙌🏻

🙌🏻🙌🏻🙌🏻


added fallback configuration when using as nested addon

I had an issue where the this.hostBuildOptions configuration value was missing when I used this addon as a nested addon.
included: function(app, parentAddon) {
    this._super.included.apply(arguments);
}

Providing a default empty configuration object if its not found resolved this issue for me.

Thanks for submitting this PR! Sorry, that it took me so long to take a look.
It's interesting, that you're running into this problem, because hostBuildOptions should be set in the included(parent) hook. Addon#included(parent) docs.
I'm not sure, but included(parent) should be called even when used as a nested addon.
Do you happen to have an example at hand that produces this error?

Yeah If I can make an example maybe that reproduces it.  I forked the repo and I'm using the fork for now because this was blocking my addon development.
I can definitely say it's related to using the 'this._super.included.apply(arguments);' style of include hook.

Having this issue also, maybe this happens for recent version of ember-cli?

@nmcclay could you please output a warning, with a link to this comment, when the hostBuildOptions are empty?
If accessible in the context, please use the ui helper for that.
Then we can go ahead and merge this. ☺
We'll still have to investigate, what exactly is going wrong, so build options don't get lost, which could lead to harder to detect bugs. Any help is much appreciated!

sure, I'll post an update on Monday.

Updated with build message, I can confirm that this.ui works fine, even though this.hostBuildOptions is undefined.  The project that I encountered this issue with is using the treeForAddon, included (using this._super.included.apply(arguments); approach), & contentFor hooks.  I can't share much the source of this project though.  Hope this helps!

Comparing this with the Ember-CLI nested addon docs: I do seem to have narrowed in on a distinction between whether an addon that relies on ember-font-awesome uses:
this._super.included.apply(arguments);

in the include hook, which causes this issue.   But using the official Ember-CLI nested addon docs:
this._super.included.apply(this, arguments);

which causes a different issue that makes target.options['ember-font-awesome'] empty, causing a Cannot read property 'forEach' of undefined exception in its include hook.
It would be good to have some clarity here in regard to which style of nested addon hook is best used with ember-font-awesome and what can be done to allow a parent addon to configure it.

I encountered this error in my addon too. I use "official" way in included hook:
this._super.included.apply(this, arguments);

and to avoid a Cannot read property 'forEach' of undefined exception I added this line:
this.otherAssetPaths = [];

It would be great to have a proper solution.

I'm trying to move this addon from devDependencies to dependencies in my package.json file; however when I run ember s I'm getting this build error: "Cannot read property 'env' of undefined." It seems like this might be a PR that resolves the issue I'm having- could someone confirm that? If not, I can open a new issue.

I've been hesitant to merge this because I don't really understand what it does, but since it appears to solve a problem I think we should get it in. @nmcclay if you can rebase it I will merge it.

@jrjohnson so after changing my addon to use the method @synaptiko mentioned this issue has gone away completely for me.  If you'd still wish me to rebase and make this mergeable as a fix I'm happy to do that, but frankly I don't understand why this works anymore than you do so I'd be fine with just closing this and leaving it to you guys with 4.0 to document the expected nested addon configuration.

Thanks @nmcclay.
@MelSumner have you tried that solution? Is this change needed as well?


Under some condition it is possible for an import to fail, but TaskStatus to not be updated

Have observed this when csvkit threw a unicode error trying to import a latin1 file, but not sure where the breakdown is.

Is this due to an exception in after_return? Doesn't seem like there is anything in there that would fail? According to celery docs after_return should always be invoked.

Have tried everything I can think of to reproduce this. Have never seen it locally, only on alpha server. Race condition of some kind?

Unable to reproduce. Closing out.


fix: updated spacing names to be consistent with text sizes

Please verify the following:

[x] yarn test jest tests pass with new tests, if relevant

Describe your PR

Closes #2308

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Weblogic admin & managed severs are running from remote cloud Kube Pods but not ale to connect admin console URL from browser

I was following https://oracle.github.io/weblogic-kubernetes-operator/quickstart/create-domain/ and all operator,traeffic & admin , managed server pods( as in past admin server failed aftr 1 day, so this time set only 1 managed server) are running fine now.
@rjeberhard
$ kubectl get pods -n sample-domain1-ns
NAME                             READY   STATUS    RESTARTS   AGE
sample-domain1-admin-server      1/1     Running   0          22m
sample-domain1-managed-server1   1/1     Running   0          21m
$ kubectl get services -n sample-domain1-ns
NAME                                   TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                          AGE
sample-domain1-admin-server            ClusterIP   None                     30012/TCP,7001/TCP               22m
sample-domain1-admin-server-external   NodePort    <IP_ADDRESS>           30012:30012/TCP,7001:30701/TCP   22m
sample-domain1-cluster-cluster-1       ClusterIP   <IP_ADDRESS>            8001/TCP                         21m
sample-domain1-managed-server1         ClusterIP   None                     8001/TCP                         21m
Earlier the domain create script(create-domain.sh) successfully completed with below attached output:
create-domain-sh-script-output.txt
@markxnelson Please help as I am stuck for quite sometime now on this which is blocking my PoC.
..................last few lines after domain creation(create-domain.sh)..........................
Create domain sample-domain1 successfully.
domain.weblogic.oracle/sample-domain1 created
Domain sample-domain1 was created and will be started by the WebLogic Kubernetes Operator
Administration console access is available at http://c3.ams03.containers.cloud.ibm.com:30701/console
T3 access is available at t3://c3.ams03.containers.cloud.ibm.com:30012
The following files were generated:
/weblogicdomain/weblogic-domains/sample-domain1/create-domain-inputs.yaml
/weblogicdomain/weblogic-domains/sample-domain1/domain.yaml
Completed
But not able to open admin console URL from browser(with http://c3.ams03.containers.cloud.ibm.com:30701/console). Please let me know which IP to use to open. These pods are running from IBM Cloud environments. I am suspecting I have given something wrong setup in ..\weblogic-kubernetes-operator\kubernetes\samples\scripts\create-weblogic-domain\domain-home-in-image\create-domain-inputs.yaml
Specially I have doubt on below fields(are these restricting console to open on port 30701 ?
Port for the T3Channel of the NetworkAccessPoint
t3ChannelPort: 30012
Public address for T3Channel of the NetworkAccessPoint.  This value should be set to the
kubernetes server address, which you can get by running "kubectl cluster-info".  If this
value is not set to that address, WLST will not be able to connect from outside the
kubernetes cluster.
t3PublicAddress:  ------------- Question: Do I need to set this with any c3.ams03.containers.cloud.ibm.com or any other public IP?
Boolean to indicate if the channel should be exposed as a service
exposeAdminT3Channel: true
NodePort to expose for the admin server
adminNodePort: 30701
Boolean to indicate if the adminNodePort will be exposed
exposeAdminNodePort: true
Output of kubectl cluster-info
C:\Users\RANAJOYPAUL>kubectl cluster-info
Kubernetes master is running at https://c3.ams03.containers.cloud.ibm.com:31596
CoreDNS is running at https://c3.ams03.containers.cloud.ibm.com:31596/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
kubernetes-dashboard is running at https://c3.ams03.containers.cloud.ibm.com:31596/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy
Metrics-server is running at https://c3.ams03.containers.cloud.ibm.com:31596/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy
I can ping $ ping c3.ams03.containers.cloud.ibm.com
Pinging c3.ams03.containers.cloud.ibm.com [<IP_ADDRESS>] with 32 bytes of data:
Reply from <IP_ADDRESS>: bytes=32 time=154ms TTL=47
Reply from <IP_ADDRESS>: bytes=32 time=164ms TTL=47
Reply from <IP_ADDRESS>: bytes=32 time=211ms TTL=47
But I cant $ curl http://c3.ams03.containers.cloud.ibm.com:30701/console
curl: (7) Failed to connect to c3.ams03.containers.cloud.ibm.com port 30701: Timed out
So it seems 30701 is not open to ping from outside kubernetes cluster :-(
Seems after working on last two weeks I am quite close to completion, please help. @mriccell
Thanks in Advance

Thanks all, issue resolved as i needed to use my worked nodes public IP which opened the admin console. Thanks @mriccell & Team :-)


Raw query Insert?

I tried to use the raw API and i kept a json unmarshalling error. Is there something i am missing?
below is an example of my query:
var out []interface{}
	err = prod.DB.QueryRaw(`INSERT into "Product" (id, name) VALUES($1,$2)`, someBody.ID, someBody.Name,).Exec(context.Background(), &out)

the error is:
could not decode result.QueryRaw: unexpected end of JSON input

its driving me insane

What database are you using? Can you make sure the SQL query itself is valid?
I discovered another bug which most likely results in the actual error message being suppressed. I'm already working on it and will report back.

On another note, I'm wondering why you use a raw query for this instead of just using the type-safe CreateOne, would be great if you could let me know why you need to use raw.

I have improved error handling via #279. Can you please get the latest version via go get github.com/prisma/prisma-client-go@master, run go run github.com/prisma/prisma-client-go generate and try again? It should hopefully give a clearer error message.

One more thing: it's recommended to use ExecuteRaw instead of QueryRaw, since you are not querying for things but INSERT will return a "rows affected count". I'll clarify this in the docs via #282.

Yeah you're right. ExecuteRaw is the best choice. but i was curious about doing Insert on QueryRaw

Closing for now – please re-open if there should be still an issue with the go client.


systemd: Remove compatibility patch for Plasma

Motivation for this change
This will remove a backward-compatibility patch from systemd/logind that was required to support legacy Plasma. Specifically, the patch revealed a deprecated D-Bus interface that had been hidden, but not removed. Plasma has not used the deprecated interface for some time, so the patch is no longer required.
This is a follow-up to #141653. I have moved the changes to the staging branch and regenerated the patches as requested.
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[x] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Release notes)

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

[x] Fits CONTRIBUTING.md.

I tried building nixosTests.plasma5 on this PR, but it fails to build due to the build of /nix/store/fqm5myr4vd38abzs5wq7p7bf2xbnh7za-python3.9-afdko-3.5.1 failing.
Did you test this on your machine somehow?

The afdko seems to be a regression tracked here:

https://github.com/NixOS/nixpkgs/issues/141423.

I'll revert 3cb48a9 as proposed there and re-run the plasma tests.

I was able to run the plasma5 tests successfully, so let's merge this in :-)


Unit Testing and HAND/SRC Improvements

This pull request is a work in progress.
The focus for this pull is to include tests, since that's always important! Additionally, I am aiming to improve some of the HAND/SRC processes without modifying the actual functionality of the code. Overall, this pull will include:

Unit tests for all existing functions (aiming for 75%-80% coverage)
Minor improvements to HAND/SRC functions -- namely, trying to improve the workflow / efficiency of the extensive functions (i.e. loc_check()).
pkgdown GitHub action; no more building manually 😄
...maybe more?

@program-- this is very welcome. Can you please expand on

Minor improvements to HAND/SRC functions -- namely, trying to improve the workflow / efficiency of the extensive functions (i.e. loc_check()).

With a list of functions you will change, and the changes you envision. This can be edited as you work.
Thanks!

With a list of functions you will change, and the changes you envision. This can be edited as you work.

Will do @mikejohnson51! I will make edits to the main PR comment as I make changes to any functions, or add new comments if the list grows 😄

══ Test Results ═════════════════════════════════
Duration: 13.9 s

[ FAIL 3 | WARN 0 | SKIP 0 | PASS 36 ]

get_src() is having issues with testing, particularly with
sf::gdal_utils(util = "demprocessing",
               ...)

I don't think this is a big deal if end-users are passing in HAND rasters that are saved to disk, but it doesn't work when HAND rasters are saved in the OS default temp dir.
Error:
cannot open source dataset
CPL_gdaldemprocessing(source, destination, options, processing, colorfilename, oo, quiet)
...

I'm not sure what alternatives there are, but I might have get_src() write the HAND to a temp directory within the user's project and then delete it after the SRC is generated.


Avoid using wmi cmdlet rule

Looks good to me. Can you also add a markdown in Rule Documentation?

Thanks. Will add a md for this rule next.


Feature/mentor addreview

Description
Added basic form for a Mentor to submit a review for a mentee.
Video Link
https://www.loom.com/share/2bae75f485564332bdae29fbd35332b5
Trello Link
https://trello.com/c/cuvrr5sK/247-as-a-mentor-i-want-to-write-and-submit-a-review-about-a-mentee
Type of change

[x] New feature (non-breaking change which adds functionality)

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have removed unnecessary comments/console logs from my code
[x] My changes generate no new warnings
[x] I have checked my code and corrected any misspellings
[x] No duplicate code left within changed files
[x] Size of pull request kept to a minimum
[x] Pull request description clearly describes changes made & motivations for said changes

Looks great! Well done!

I’m working on this card:
https://trello.com/c/cuvrr5sK
I want to check for proper validations for whether Mentee exists in the database.

I’m working on this card: https://trello.com/c/cuvrr5sK I want to check for proper validations for whether Mentee exists in the database.

There is no backend or DS for this card. Thats my fault on the extra file i thought i deleted that. I wrote the code for both submission forms, while basic, the cards were there and I wanted to get something done. If you check PRs you can see them both.


[v1.1 backport] workflows: use GitHub arm64 runners instead of actuated

Backport of #3034 for deps update to work (like https://github.com/cilium/tetragon/pull/3136).

This one test has been failing here on the runner https://github.com/cilium/tetragon/issues/3144.


ImportError with 'pycompose' and unused operations in dsrb/eval.py

When running the test script test/test_benchmark.py, I encountered the following error:
ModuleNotFoundError: No module named 'pycompose'

After installing pycompose with pip install pycompose, I encountered another error:
ImportError: cannot import name 'pdse' from 'pycompose'

It seems that pycompose is only referenced in the script dsrb/eval.py, but it seem to be used in a way that I don't' comprehend. Specifically:

Lines 165-169:
se = pdse()
se.load_triangle_mesh(mesh.points, mesh.edges, mesh.faces)
occ = se.check_mesh_contains(points_iou)

occ = check_mesh_contains(mesh, points_iou)
out_dict['iou'] = self.compute_iou(occ, occ_tgt)

Here, the first three operations are overwritten by the fourth line.

Line 177:
ps = pdse(0)

In this case, ps is defined but never used.

Am I missing something? If so, could you provide a guide on how to make the script work with pycompose?

Hi, you can remove those lines, and also the import of pycompose. This package is not needed.
I pushed the fix. You can just do git pull.