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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
5 views

How to get nrow=ncol for DESeq2?

enter image description here enter image description here Hello, I am unsure how to get nrow=ncol to create the data matrix for DESeq2. The number of variables are the same, but the first column of my ...
king's user avatar
  • 1
0 votes
1 answer
65 views

create a vector with sequences of arbitrary length

I want to create a vector of length n which will contain sequences of arbitrary length I made a code that does this, but it seems unreliable and a little ridiculous to me. n <- 300 vals <- c(-1,...
mr.T's user avatar
  • 225
-2 votes
0 answers
26 views

How can we write multiple sequences inside fork and join of system verilog?

task task_name(); //Having a task to combine multiple sequences which needs to be verified if (condtn): begin fork ##1 a ##0 b ##1c; ##1 a ##1 b ##0 c ##1 d; //Sequences join end endtask ...
Priya Ramakrishnan's user avatar
1 vote
1 answer
60 views

How to filter "productive" amino acid sequences [closed]

I have a fasta file with different amino acid sequences, for example: >abc HSTSDSAQTMFPVALLLLAAGSCVKGEQLTQPTSVTVQPGQRLTITCQVSYSLGTYFTAW IRQPAGKGLEWIGMRSTGASYYKDSLKNKFSIDLDTSSKTVTLNGQNVQPEDTAVYYCAR ...
Silvia's user avatar
  • 21
0 votes
0 answers
30 views

Converting [samples, time-steps, features] into 2D input shape

I have a 3D input sequence prepared for LSTM, i.e., (samples, time-steps, features) or (100,20,5) for instance. And I want to compare the LSTM results with XGBoost which can only take 2D input. The ...
Mz Irn's user avatar
  • 1
0 votes
1 answer
23 views

How to create a string sequence in SQLAlchemy

I am currently developing an API for invoices. And I want to create an Invoice table with invoiceNumber field that would be auto incrementing but as a string. Something like this: INV00001 INV00002 ...
Vitalij Gurin's user avatar
0 votes
1 answer
21 views

Finding a number in a finite sequence programmatically

I'm working on an arduino project with 8 LEDs that will cycle through a set of 4 colors. I've created an array of colors and am trying to figure out if there's a programmatic way to calculate which ...
Robbert's user avatar
  • 6,493
2 votes
2 answers
93 views

Peeking into an iterator

Is there a way in Kotlin to "peek" into the next element of an iterator without advancing it? For an example use case, consider this function for merging two pre-sorted sequences: fun merge(...
k314159's user avatar
  • 5,324
3 votes
1 answer
36 views

Graphing a sequence of functions in matlab

I want to graph the first 10 terms of the succession of functions. For this I tried to do the following code in MATLAB: n_max = 10; x = linspace(0, 1, 1000); fn_values = zeros(n_max, length(x)); for ...
Wrloord's user avatar
  • 135
4 votes
5 answers
83 views

generate sequence of consecutive and overlapping numeric blocks

From this x <- 1:10 block.size <- 3L I would like to generate a sequence of consecutive and overlapping blocks of length 3 like so: 1,2,3 2,3,4 3,4,5 4,5,6 5,6,7 6,7,8 7,8,9 8,9,10 I found ...
umbe1987's user avatar
  • 2,946
2 votes
0 answers
77 views

How to find starting point and endpoint at coordinate list?

I'm reaching out for help with an algorithm. I created a random dataset 'coords_list' by following the process below. import matplotlib.pyplot as plt import numpy as np x = np.linspace(0, 10000, 100) ...
Jhonson's user avatar
  • 21
1 vote
1 answer
62 views

How to generate move sequences from initial state to goal state in python?

I have 8 rows x 7 columns grid. There are 2 players and each player controls 5 colored blocks and 1 colored ball. Different player have different colored blocks and ball (i.e. player 0 has white ...
PleaseDon'tBanMe's user avatar
0 votes
0 answers
14 views

Why Can't My PDI Access Oracle Sequences When It Can Access Other Database Objects?

I'm using Pentaho Data Integration and facing an issue where it can't access sequences in my Oracle database, even though it has access to other database objects (functions, tables, views) The exact ...
André Moreira's user avatar
-2 votes
1 answer
39 views

sequence twice continously (1,2) based on another value in sql server

I need to sequence 1,2 based on another column value empid. Per column value i need to have two values in sequence output column ex dummy data empid deptid 1 1 needed o/p empid deptid sequence 1 ...
Sathish Kumar's user avatar
0 votes
0 answers
34 views

How to alter sequence in SQL Server with last inserted id [duplicate]

I store test data with fixed ID (regarding FK needed) in several tables. After inserted, I'd like to set the sequence correctly. I've tried without success the following SQL ALTER SEQUENCE ...
SONC's user avatar
  • 1
1 vote
0 answers
28 views

How to elegantly split a vector of consecutive integers into k groups (as list elements) in R? Group should be as equally sized as possible [duplicate]

Let's assume I have a vector containing integers from 1 to 100. > 1:100 [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 [25] 25 26 27 28 ...
Aku-Ville Lehtimäki's user avatar
3 votes
1 answer
49 views

Create sequence of repeated values, with length based on a vector

How can I populate column ‘Night’ with a sequence of numbers, each repeating 3 times, and with the sequence restarting based on column ‘Site’? I’ve created a table showing what I want to achieve. This ...
Stacey Harwood's user avatar
-4 votes
0 answers
72 views

Python Spacy Issue

The provided Python script utilizes the spaCy natural language processing library to calculate the similarity between a set of predefined questions and a list of text examples. It first tokenizes the ...
Krishna Kumar's user avatar
1 vote
1 answer
106 views

Problems in trying to prove non-duplicate-element sequence in Dafny

Suppose we have a sequence s, and all of the elements are different from others. I describe this property as follow predicate all_element_different(s: seq<int>) { forall i,j :: 0 <= i < ...
MogicFrog's user avatar
1 vote
1 answer
52 views

Find the number of different integers in an interval in a dynamic array

Given an array of integers a[i] of length N and Q queries. 1 <= N, Q <= 10^5 1 <= a[i] <= 10^6 There are 2 types of queries. They consists of : Two integers l and r. After processing this ...
Tomek Swiecki's user avatar
0 votes
0 answers
24 views

How to set NSbutton's image to sequence frame animation

It is the first time to develop a Mac app by myself. I want to set a button,after clicking it, the image of the button will be displayed in the form of sequence frame animation. I set the "image ...
BROWN TOM's user avatar
0 votes
0 answers
50 views

Check if some elements in a Scala's object sequence exist in other list and fulfill condition

I have two sequences of objects Seq[A] and Seq[B]. Seq[A] is a list of objects, that have this form case class A (tipo: String, label: String, code: String) And the B type ...
ahabrahante's user avatar
0 votes
0 answers
24 views

hibernate 5 - custom sequences - mariaDB 11

When hibernate try to run this query to get the next Value from sequence Query :- Query is: select next_val as id_val from my_sequence_table for update I got this exception :- Caused by: java.sql....
omarAhmed's user avatar
0 votes
1 answer
42 views

Resetting the Last_NUMBER in sequence by looking up a value from a table

I have a sequence called SEQ_SYNTAX. I need to set the last_number value of this sequence by looking up a value from another table called INCREMENTS. I can get the value from increments table by doing ...
rvpals's user avatar
  • 189
1 vote
0 answers
34 views

Fixing all sequences in PostgreSQL 15 after migrating with logical replication from PostgreSQL 11

I've run into a problem recently during migration of PostgreSQL 11 to PostgreSQL 15 with logical replication. As one of the cons of using logical replication, sequence data does not replicate between ...
VKL's user avatar
  • 11
0 votes
1 answer
32 views

Round robin with record limitation

I have to build a hive SQL query for the following requirement I have an customer table. I need to divide the total table record by 6 (i.e suppose table contain 600 records each month 100 record upto ...
user22073463's user avatar
0 votes
0 answers
47 views

COUNTIF isn't recognized as a formula

I'm trying to count the number of Sundays in any user given month/year. The problem is that Excel doesn't recognize the formula and throws the message: There's a problem with this formula. Not trying ...
Rodrigo Mota's user avatar
0 votes
1 answer
38 views

Filter similar DNA sequences using R

I have two tables containing DNA sequences from an early stage (TIMEPOINT_1) and a later stage (TIMEPOINT_2). I would like to filter the TIMEPOINT_2 table for sequences from the TIMEPOINT_1 table that ...
Gerald Vasquez Aleman's user avatar
0 votes
0 answers
27 views

create an oracle sequence mechanism with starting as AAA001 once AAA999 it should increment by AAB001 and so [duplicate]

We are new to PLSQL technology . we need the below function or logic for create an oracle sequence mechanism with starting as AAA001 once AAA999 it should increment by AAB001 and so on . Ex: AAA001 ...
Sathish Kumar's user avatar
0 votes
1 answer
38 views

Oracle 19.17 Reference a sequence as default of Primary Key column fails with ORA 02262

This command used with an existing table and sequence fails with ORA 02262 Error Occurs while type checking column default expression MESSAGES TABLE INFO ID NUMBER(38) Primary Key ALTER TABLE ...
Mark R's user avatar
  • 11
0 votes
1 answer
57 views

Using SQL sequences

How can I put sql sequences like the one below into liquibase changelog file (xml)? Is it even possible? CREATE SEQUENCE sequence_option_1 START WITH COALESCE((SELECT MAX(id) FROM entity WHERE source =...
xMann999's user avatar
1 vote
3 answers
63 views

Identify sequences in alphanumeric strings in R

I am attempting to create a flag for when transaction IDs are sequential. For reasons that I will not get into here, these can be a red flag. The problem that I am having is that the IDs are not ...
coult's user avatar
  • 117
0 votes
0 answers
20 views

Process for processing data visualization

I am currently developing a website that provides visualized data based on user-entered search queries. However, I've encountered issues during the data processing phase after visualizing the data ...
HEO.JY's user avatar
  • 11
0 votes
1 answer
53 views

Common List Index Out Of Range Issue, Why? [duplicate]

import scipy.special s = [1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 6, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1,...
John Smith's user avatar
-1 votes
1 answer
33 views

Postgres sequence from table

I have a table. ID name col lev 1 "Rack 1" 9 7 2 "Rack 2" 6 7 3 "Rack 3" 6 7 4 "Rack 4" 7 7 I want to crate a second table ...
Rodrigo's user avatar
  • 33
0 votes
1 answer
26 views

Identify the individual corresponding to a representative sequence

I tried (unsuccessfuly) to identify the individual corresponding to a representative sequence, using function seqrep() from the R package TraMineR. I read Gabadinho, A., and G. Ritschard (2013), "...
Jacques-Antoine's user avatar
0 votes
1 answer
55 views

Select rows per group with consecutive 1s

I have a dataframe that I want to subset by selecting only consecutive values of "1". Specifically, I have a dataframe that looks like this: library(tidyverse) library(zoo) df <- data....
mto23's user avatar
  • 303
0 votes
0 answers
11 views

Symfony bundle config import - expand/merge 2 sequences

There's a configuration in the PHP Symfony 6.3 application defined as ->arrayNode('main_list')->scalarPrototype() Now to this config I want to import following bundle yamls: @BundleOneBundle/...
jave.web's user avatar
  • 13.9k
0 votes
1 answer
46 views

Scala Spark Column Parser with Seq and case class

I have a Address DataFrame with three columns like : "addressId", "customerId", "address". The values in the Address.csv looks like : A100,C100,"100, ABC Street,...
Mohit Rane's user avatar
0 votes
1 answer
29 views

SQL generate_series and use it for join

I am trying to generate a list of dates on Redshift to join it with another table with a start and end date of events so that I can have a list of event ids for each date. This query produces the list ...
Kiara's user avatar
  • 1
0 votes
2 answers
40 views

Iterate through two objects sequences in Scala and return true if a condition is fulfilled

I have two sequences of objects Seq[A] and Seq[B]. Seq[A] is a list of objects, that have this form case class A(type: String, label: String, code: String) And Seq[B] is a ...
ahabrahante's user avatar
12 votes
5 answers
1k views

Check for 5 consecutive TRUE values from the back of a vector

I have the following data: x <- c(F, T, T, T, F, T, T, T, T, T) names(x) <- letters[1:10] y <- c(T, F, T, T, T, F, T, T, T, T) names(y) <- letters[1:10] z <- c(T, T, F, T, T, T, T, T, F,...
Shawn Brar's user avatar
  • 1,376
1 vote
1 answer
54 views

Plotting .log file containing timestamp and constant value

I have a text file containing timestamps and values in two columns. The data looks like this: 00:00:08 3.78E-7 00:02:10 3.78E-7 00:05:00 3.78E-7 00:06:00 3.78E-7 ... Since the values are ...
Saradindu Samanta's user avatar
0 votes
1 answer
34 views

How to sort integers in a sequence in Dafny?

As the title says, I wanna sort a sequence(rather than an array, which is easier). But I got a lot of problems(e.g. conversion between different datatypes, since sequences are immutable). And even ...
MogicFrog's user avatar
0 votes
2 answers
42 views

XSLT: delete duplicates + set sequence

I need to delete duplicates from xml + set correct sequence i.e. 10, 20, 30 etc. My xml: <?xml version="1.0" encoding="UTF-8"?> <serviceInvocationRequests> <...
Maksim Sirotkin's user avatar
-1 votes
3 answers
137 views

while loop stop working with big numbers c#

My while loop works fine with 10_000, but it takes time to load with 100_000 and doesn't work with 10_000_000. I don't understand why, it's a machine, and it should be fast no matter the numbers. So I ...
Vita's user avatar
  • 55
0 votes
0 answers
11 views

When I change interactive sequences on the slide timeline in powerpoint during a slide show, the changes don't take effect until a slideshow restart

I'm new here, so please forgive any transgressions. I am writing some code which will copy a picture shape on a slide, move the copy to a new place on the slide and add some animations to the new ...
user9890014's user avatar
0 votes
1 answer
43 views

Sequence column based on another column (PostgreSQL)

I have Spring Data - JPA application with this PostgreSQL table: id object_id document_name bdc8b35b 1 file1_for_obj_1 ea4746ab 2 file1_for_obj_2 cd4f235c 1 file2_for_obj_1 2d7d5af9 1 ...
NeverSleeps's user avatar
  • 1,469
6 votes
5 answers
101 views

'safe' seq() idiom in base R?

There is a well-known infelicity in base R that seq(0) returns c(1, 0), not integer(0) as one might expect. I can write my own "safe seq()" function: sseq <- function(n) if (n==0) integer(...
Ben Bolker's user avatar
  • 212k
-2 votes
1 answer
45 views

Required Comment in New Column based on criteria of other columns in power query [closed]

This is a table where I need to find out which invoice material batches were used sequentially or not sequentially, in simple words to find out which invoices were billed in multiple batches in a ...
Amar Gunjal's user avatar

1
2 3 4 5
120