Questions tagged [sequence]
A sequence is an ordered list of objects (or events). Like a set, it contains members (also called elements or terms), and the number of terms (possibly infinite) is called the length of the sequence. Unlike a set, order matters, and exactly the same elements can appear multiple times at different positions in the sequence. In a relational database, a sequence is an object that is used to generate unique numbers for a primary key.
sequence
6,067
questions
0
votes
0
answers
6
views
R function/package to find frequent consecutive patterns in bunch of sequences
So let's say I have a bunch of sequences consisting in series of numbers going from 1 to 25. (for example (x<- (1,16,2,2,3,6,18,16)). I just want to find in all those sequences if there is frequent ...
1
vote
0
answers
46
views
CSAPP 3e (global): Possible erratum for "Practice Problem 8.3" (p. 781)?
Due to the relative lack of popularity of CSAPP's global edition, I have been unable to figure out whether exercise problem 8.3 (partial screenshots shown above) is entirely correct. I have only found ...
0
votes
0
answers
34
views
Does seq() have rounding errors? [duplicate]
Why does seq() has some problems when going through 0?
Why does seq() not handle the following?
seq(-1.2, 0, by = 0.2) # [1] -1.2 -1.0 -0.8 -0.6 -0.4 -0.2 0.0
seq(-1.2, 0.2, by = 0.2) # [1] -1....
-2
votes
0
answers
61
views
How can Flat sequences occupy more memory than container sequences in Python? [duplicate]
Fluent python book describes two types of sequences: Container and Flat, with container sequences being able to hold items of different types but as reference to python objects, while flat sequences ...
0
votes
1
answer
49
views
Why is seq function output not consistent? [duplicate]
I am using seq function. While it gives correct output for positive numbers when used input is given using :, I am not sure why does the following 2 ways produce different outputs (when input starts ...
0
votes
0
answers
20
views
In Postgresql, how to reset all sequences in a schema so the current value of sequence will match the max values of the primary key
I am refreshing schema data in a Postgresql database. The best and easiest way to do it is dropping the schema and restore it from a backup from the source database. But in this case we are not ...
1
vote
2
answers
53
views
How to filter data with sequences missing sections of a specified size or greater?
I have a data frame with a sequence (Slice) of observations for each group. Many of the sequences are incomplete. This is a simplified version of the data:
Slice
GroupID
Observation
1
A
1
2
A
6
3
...
-1
votes
1
answer
33
views
How to increment range for ARRAYFORMULA function in Google Sheets across different rows
I am trying to create a Split calculator on google sheets for me and my friends whenver we go out to eat for something like Korean food.Sample Split Calculator
I have tried to use ARRAYFORMULA with ...
2
votes
1
answer
48
views
Kotlin Eratosthenes' Sieve Implementation Issues - Why is 4 Missing?
I have implemented the Sieve of Eratosthenes in Kotlin to generate prime numbers. I noticed an issue where the second version of my code does not work correctly, and I'm puzzled as to why the number 4 ...
1
vote
1
answer
41
views
Is there a visual tool to debug Kotlin Sequence in IntelliJ IDEA similar to Java Stream debug with Stream Trace?
I code in Kotlin and use Sequence a lot. I use IntelliJ IDEA and there is nice visual debug tool to introspect your Java Stream processing steps. Is there anything similar for Sequences?
There is ...
2
votes
3
answers
69
views
Generating a pseudorandom binary sequence with conditions in R
I am wanting to generate 5 blocks of pseudorandom binary sequences (to be stored in a data frame) with the following conditions for each block:
150 0s
25 1s
The sequence cannot begin or end with a ...
2
votes
3
answers
106
views
How to iterate over multiple ranges / sequences / numbers specified in var?
I can iterate over multiple ranges / sequences / numbers with constructions like:
for i in $(seq 1 3) 5 $(seq 7 9) 11; do echo $i; done
for i in {1..3} 5 {7..9} 11; do echo $i; done
But how to ...
0
votes
1
answer
41
views
How can I access a buffer or sequence in an unusual order?
I have a block of memory representing RGB values for a 8 row x 32 column matrix. When writing into this block of memory, it would be convenient to treat it as properly ordered. When reading from the ...
0
votes
0
answers
29
views
I have a list that contains 12 elements. I would like to make a function that subset the list based on a sequence every nth element
I have a list containing 12 data frames. I would like to subset/split the list after every third elements based on a sequence. And make a new data frame of the new subsetted list .
# my_list
...
0
votes
1
answer
104
views
How to retrieve SEQNO with TONWEB SDK
image from the object Hello stackoverflow community, this is my first question and I will try to be as much detailed as I can.
Question:
I am trying to retrieve SEQNO with TONWEB SDK but I am running ...