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
2 answers

Cartesian product match

I have two sets of incomplete types (i.e. struct names, missing generic parameters and lifetimes), and I need to have some code executed for each possible pair of combinations: // these are my types struct A { ... } struct B<'a, 'b, T> { ...…
peoro
  • 25,562
  • 20
  • 98
  • 150
5
votes
1 answer

Retry for-loop R loop if error

I have an R For loop that downloads data from a server and adds result to table however, I sometimes get an error stopping the loop. If I tell it to redo the last download and continue, it works for another while before the next error. The error…
Ron Crash
  • 53
  • 1
  • 5
5
votes
3 answers

Is there a regex flavor that allows me to count the number of repetitions matched by the * and + operators?

Is there a regex flavor that allows me to count the number of repetitions matched by the * and + operators? I'd specifically like to know if it's possible under the .NET Platform.
luvieere
  • 37,065
  • 18
  • 127
  • 179
5
votes
2 answers

How to go back to "repeat" in Prolog?

Is it possible to go back to a repeat in Prolog without calling the predicate and without making a new predicate? I have the following code test :- nl, write('Welcome.'),nl, repeat, write('Print this message again? (yes/no)'),nl, read(Ans),nl, ( …
Lord Rixuel
  • 1,173
  • 6
  • 24
  • 43
5
votes
5 answers

How can I repeat something for x minutes in Python?

I have a program (temptrack) where I need to download weather data every x minutes for x amount of hours. I have figured out how to download every x minutes using time.sleep(x*60), but I have no clue how to repeat this process for a certain amount…
ErikT
  • 606
  • 8
  • 15
5
votes
3 answers

Repeating or looping an argument

I am quite familiar with R as I've been using it for a few years now. Unfortunately, I am not very well versed in creating functions that involve looping or repetition of an equation. The problem goes as follows: I have a vector containing over 1000…
5
votes
4 answers

Repeat a scipy csr sparse matrix along axis 0

I wanted to repeat the rows of a scipy csr sparse matrix, but when I tried to call numpy's repeat method, it simply treats the sparse matrix like an object, and would only repeat it as an object in an ndarray. I looked through the documentation, but…
Erik
  • 6,470
  • 5
  • 36
  • 37
5
votes
4 answers

Connecting repeatable and non-repeatble backgrounds without a seam

I have a 700x300 background repeating seamlessly inside of the main content-div. Now I'd like to attach a div at the bottom of the content-div, containing a different background image that isn't repeatable, connecting seamlessly with the repeatable…
Stiggler
  • 2,800
  • 20
  • 21
5
votes
2 answers

How to repeat a character multiple times as a MATLAB array?

Given a single string value in a MATLAB character array: ['12 N'] How can I repeat this value X times in a new character array? For example: X = 5 ['12 N'; '12 N'; '12 N'; '12 N'; '12 N']
Borealis
  • 8,044
  • 17
  • 64
  • 112
5
votes
1 answer

Tile an image with SFML

I have a background image and it's only 256 x 256 when my window is 800 x 600. I'm not sure how to get the image to repeat itself across the whole window. I currently load the image in with: sf::Texture…
ryandonohue
  • 189
  • 4
  • 22
5
votes
1 answer

Using a sprite sheet with createPattern()

I can't seem to find any solid info on how to do this, so I'm wondering if someone can point me in the right direction. I have a large sprite sheet, let's call it textures.png. Each texture is 64x64 pixels and I need to be able to create patterns…
Rohan Deshpande
  • 694
  • 8
  • 22
5
votes
2 answers

Cocos2d v3 repeat texture

I was wondering how I should repeat a texture in Cocos2d 3. I have a background and I want to “tile” it across the screen. I have found this which is using ccTexParams with GL_REPEAT but those have been made private in version 3 of cocos. I have…
Matthijn
  • 3,126
  • 9
  • 46
  • 69
5
votes
4 answers

Generate and repeat number in C#

I want to generate an array that has 144 number from 1->36 in random order (so each number is repeated 4 times). Can we use Enumerable.Repeat and Enumerable.Range to do that. If yes than please explain to me how?
A New Chicken
  • 703
  • 1
  • 8
  • 18
5
votes
2 answers

TestNG retryAnalyzer only works when defined in methods @Test, does not work in class' @Test

This works as supposed, test fails (due to haltTesting()) and is repeated 2x public class A0001_A0003Test extends TestControl { private Kunde kunde = Kunde.FR_WEHLITZ; @Test(retryAnalyzer = TestRepeat.class, groups = {TestGroups.FAILED},…
MushyPeas
  • 2,469
  • 2
  • 31
  • 48
5
votes
3 answers

Repeat the delay in a UIView animation loop?

I'm trying to do a customized animation on view opacity like this: Delay for 5 seconds; (The view will keep opaque for 5 seconds) Animate from opacity value 1 to 0; Delay for 5 seconds; (The view will keep transparent for 5 seconds) Animate from…
X.Y.
  • 13,726
  • 10
  • 50
  • 63