Questions tagged [repeat]

"repeat" refers to the action of doing something over again.

Note that this tag can often be replaced by the more specific or tags.

3161 questions
5
votes
1 answer

Clean up repetitive JavaScript code

I have created a "Wizard" using JavaScript and based on people's answers you get taken to certain results divs. It works the way I want, but this code is VERY repetitive. Is there a way to clean up this JavaScript…
Dawn
  • 175
  • 1
  • 14
5
votes
2 answers

How to repeat or retry conditionally with reactor

I use SpringBoot and reactive programming with Webflux. I want to repeat the service until data is available(something is returned apart from null) I have a service which insert some data into databse and there is 2nd service which consumes the…
rohit
  • 177
  • 4
  • 12
5
votes
1 answer

What is the use of repeat() when creating a tf.data.Dataset object?

I am reproducing the code of TensorFlow's Time series forecasting tutorial. They use tf.data to shuffle, batch, and cache the dataset. More precisely they do the following: BATCH_SIZE = 256 BUFFER_SIZE = 10000 train_univariate =…
NC520
  • 346
  • 3
  • 13
5
votes
2 answers

How can I set an image background to repeat?

I'm trying to set an image background to repeat along my entire grid. It's a small image, with a bit of random noise in to give it texture. Currently this is what I'm doing:
Only Bolivian Here
  • 35,719
  • 63
  • 161
  • 257
5
votes
2 answers

React Native: TextInput toUpperCase does not work on Android in onChangeText

I have a TextInput component that should transform the input to capitals whilst typing. My code is as follows: import React, {Component} from 'react'; import { View, StyleSheet, Text, TextInput, Button } from 'react-native'; export default class…
user2696806
  • 166
  • 9
5
votes
1 answer

How to denote at least one repetition in EBNF?

https://en.wikipedia.org/wiki/Extended_Backus–Naur_form The above article mentions that curly braces denote repetition of arbitrary times (incl. zero), while square brackets denote at most one repetition. What I want however, is at least one…
user4385532
5
votes
2 answers

using createPattern() with a canvas

I'm trying to get a repeating canvas pattern. Sadly all examples I could find repeat an image. So i tried this: function init() { var canvas = document.getElementById("bg"); var ctx = canvas.getContext("2d"); //creating a new canvas var canvas =…
funkysash
  • 198
  • 2
  • 12
5
votes
2 answers

Remove repeating list elements using recursion and pattern matching in Haskell

I'm making a function that removes elements that occur two or more times in a row in a list. It replaces them with one occurrence. I'm using only recursion and pattern matching (no library list functions). Examples of how the function should…
Coding Elf
  • 53
  • 4
5
votes
3 answers

Bash: repeat character a variable number of times

Per the questions and ruminations in: Writing a character N times using the printf command How can I repeat a character in Bash? I would like to learn how one might go about parameterizing the repeat value for a character/string. For example, the…
Kid Codester
  • 75
  • 1
  • 4
5
votes
2 answers

Repetition of array elements in MATLAB

I have a MATLAB array and want to make a repetition based on the number of array elements. Below is the example that I want. a = [2, 4, 6, 8] If I want 7 elements, the result is aa = [2, 4, 6, 8, 2, 4, 6] Or if I want 5 elements, aa = [2, 4, 6, 8,…
Edward M.
  • 221
  • 1
  • 5
  • 13
5
votes
4 answers

Regular Expression group repeated letters

I am trying to group all the repeated letters in a string. Eg: "aaaaaaabbbbbbbbc" => [['aaaaaaa'],['bbbbbbbb'],['c']] Using logic and Ruby, the only way I could find to reach my intention was: .scan(/(?:a+|A+)|(?:b+|B+)|(?:c+|C+)| .....…
misterwolf
  • 424
  • 4
  • 14
5
votes
1 answer

PHP SoapParam/SoapVar for complex type gives "object hasn't 'xxx' property" - repeating element

This question relates to the use of SoapParam and SoapVar in a PHP SOAP client to handle repeating elements, where requests cannot be framed as associative arrays. More particularly, it addresses a difficulty in using SoapParam/SoapVar for complex…
BillF
  • 1,034
  • 3
  • 13
  • 28
5
votes
2 answers

JSF 2.0: Re-rendering/updating a single item in ui:repeat using AJAX

My page consists of several areas which are created by iterating over a list of items using . Imagine this simplified example:
tlind
  • 251
  • 5
  • 16
5
votes
4 answers

Redux and Calendar repeating events

What should be the proper way of storing / handling repeating events in the redux store ? Problem: Let's say that we have a backend API that generates repeating events trough a complicated business logic.Some of the events might have the same ID.…
Goran.it
  • 5,991
  • 2
  • 23
  • 25
5
votes
1 answer

Vim: Repeating Commands "Till Condition" rather then "Count of Times"

It happens to me many times that I want to repeat a command in Vim till a certain condition is satisfied rather than just multiple times. For example, say I want to make this code tidier: Ogre::String GetConfigPath() const { return m_configPath;…
Rafid
  • 18,991
  • 23
  • 72
  • 108