Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [each]

An iterator function or language struct which can be used to iterate over arrays or lists.

each
0 votes
1 answer
20 views

Is it possible to limit results from Svelte {#each} loop by a certain amount?

I'm using an {#each} loop to showcase data, but I'm curious if Svelte has a way to limit the results by an integer. For example, if I had the following array and loop: const object = [1, 2, 3, 4, 5]; ...
Sam Sabin's user avatar
  • 742
0 votes
0 answers
15 views

How use each in cypress when element is detached from DOM after action [duplicate]

I have this cypress code and it works. I need to iterate through all the links on the page. After clicking on each link, a breadcrumb tab opens. After closing the tab, the page with the links returns. ...
randomWeirdo's user avatar
0 votes
0 answers
19 views

copy elements between dataframes on condition of equality of other dataframe elements

To simplify, I have two similar dataframes: df1 <- data.frame(a=seq(0, 100, by=5), b=rep(NA, times = 21)) df2 <- data.frame(a=seq(0, 100, by=10), b=seq(0, 10, by=1)) I wnat to assign df2$b ...
Marvin's user avatar
  • 1
0 votes
2 answers
35 views

Getting the first element in multiple divs jQuery

Trying to apply css to the first element in multiple divs with the same class. In the example below, it works in the first div, but not the second one. What's wrong with this picture? <script> ...
DeanH's user avatar
  • 515
1 vote
4 answers
53 views

Can I get all hyperlinks that contain "@" then open them in new tabs?

I'm trying to open all hyperlinks on a page with link text that includes the "@" symbol. Here's an example below [[email protected]](https://stackoverflow.com/2342342352) [[email protected]](...
Struggling programmer's user avatar
1 vote
1 answer
40 views

Sass Each Map loop on modifier classes with a default variant

I'm having trouble to avoid having duplicate code. I have an element which can have size modifiers to alter the appearance of the element: sm, md, lg. Let's say my element is called .element and my ...
Lennart van Deursen's user avatar
0 votes
0 answers
31 views

How to replace each() in `if-statement` (each() is deprecated in PHP 8) [duplicate]

I try to keep an old PHP application running, and I need to upgrade from PHP 7 to PHP 8. I replaced a lot each() with foreach() easily, but I stumble on this code (I am not PHP programmer): if (!(...
ZdPo Ster's user avatar
  • 342
1 vote
1 answer
103 views

How to use dynamically updated variable in Azure Pipeline each statement?

Here is a simple Azure Pipeline that illustrates my problem:- jobs: - job: BuildAndTest steps: - script: | echo "##vso[task.setvariable variable=nuGetPackagesToBuild;isoutput=true]...
GSFatPracctice's user avatar
1 vote
0 answers
100 views

Add variation price to WooCommerce swatches (using append)

I use a WooCommerce variation swatches plugin to convert the default select dropdown to clickable text buttons. Now I would like to add the price of that variation to the swatch. The plugin does not ...
arvanderkamp's user avatar
0 votes
2 answers
110 views

JavaScript function openFullscreen() , how to get it worked for several iframes on the page

On page I have an iframe with *.pdf file in src. <div class="node--view-mode-full"> <p><iframe allow="fullscreen" allowfullscreen="" frameborder="0&...
Артем's user avatar
0 votes
0 answers
55 views

how to get multiple pages from Web activity and For Each Activity in Azure Data Factory?

For Each Activity in Azure Data Factory Pipeline, how to copy the data from multiple pages? enter image description here enter image description here How to get data from pages by taking offset & ...
Vedd's user avatar
  • 1
0 votes
1 answer
58 views

jquery - how to pass DIV text in a set of elements to another set of elements?

I need to get the text of each H3 tag and add this text to the relevant (read more link ) in a P tag . I want this outcome : var headingContent = jQuery('.eael-grid-post-link').text(); jQuery("....
tonydorian's user avatar
0 votes
1 answer
23 views

Jquery if else structure on click each function

I have 6 divs, all with a general class name ".scene", and also have individual class names as ".scene1", ".scene2", ".scene3", ".scene4", "....
Igor Laszlo's user avatar
0 votes
1 answer
55 views

How to link the function of a button to a single marker of an array

I have an array with 20 element like this: they are showed on the map with a green marker, but I want that when i click on the button and some property are respected, the marker turns red. The problem ...
Anthony's user avatar
-3 votes
2 answers
43 views

How to iterate json object

I have the following json object and trying to iterate with jQuery each but it only returns one iteration. What am I not doing right? var data = "{ "SIEcat4": { "3001": { "test": "test"...
Kevin Lindmark's user avatar

15 30 50 per page
1
2 3 4 5
258