sequence Questions

11

Solved

This problem is also known as 'transforming a "start-end" dataset to a panel dataset' I have a data frame containing "name" of U.S. Presidents, the years when they start and end...
Traynor asked 15/7, 2012 at 18:30

9

I have the data.frame below. I want to add a column 'g' that classifies my data according to consecutive sequences in column h_no. That is, the first sequence of h_no 1, 2, 3, 4 is group 1, the sec...
Hayrick asked 14/4, 2012 at 2:39

5

I have a vector of numbers x <- c(2,5,1,6) and I am trying to generate a sequence of values -- starting from 1 -- between and including the values in x so that I am left with the following s...
Arbour asked 24/4, 2017 at 14:46

7

I am creating sequence in SQL Server with the following code. But it displays error as unknown object type. Please give a solution Here's my code : create sequence seqval start with 100 increment...
Airplane asked 23/3, 2013 at 8:2

8

Solved

Is there an SQL instruction to retrieve the value of a sequence that does not increment it. Thanks. EDIT AND CONCLUSION As stated by Justin Cave It's not useful to try to "save" sequence number...
Vingtetun asked 18/4, 2012 at 13:20

2

Solved

Rich Hickey's Strange Loop transducers presentation tells us that there are two implementations of map in Clojure 1.6, one for sequences in clojure.core and one for channels in core.async. Now ...
Eskridge asked 30/10, 2014 at 12:23

2

Solved

my %f; for $*HOME.dir() -> $file { my $filename = $file.basename; %f{$filename}.push: $file, rand; } my $p = %f.pick; # just need any old random element say $p.^name; say "{$p.values.^nam...
Ligon asked 17/3, 2023 at 20:41

7

Solved

What is a fast/readable way to SELECT a relation from "nothing" that contains a list of numbers. I want to define which numbers by setting a start and end value. I am using Postgres SQL and SQLite,...
Cynar asked 16/7, 2013 at 10:0

2

Is there a simple (ie. non-hacky) and race-condition free way to create a partitioned sequence in PostgreSQL. Example: Using a normal sequence in Issue: | Project_ID | Issue | | 1 | 1 | | 1 | 2 |...
Digenesis asked 28/8, 2010 at 15:26

2

Solved

Let's say I have the following sequences: var s1: seq[int] = @[] var s2: seq[int] var s3: seq[int] = nil var s4: seq[int] = newSeq[int](4) Which of these are typically considered "empty"? And wh...
Gans asked 7/2, 2018 at 6:22

6

Solved

I'd like to use SEQUENCE support in Apache Derby 10.7. I've created the sequence with the following statement: CREATE SEQUENCE SAMPLE_SEQ AS INT MAXVALUE 999999 CYCLE; How can I select next/curr...
Sergias asked 20/4, 2011 at 10:48

5

Solved

I'm not entirely sure this is possible, and I definitely don't know what to search or how to concisely explain it, but this seems like quite a kotlin-y thing which I wouldn't be surprised if it was...
Furnary asked 1/6, 2017 at 19:50

5

Solved

Sorry I am new to SQLPlus stuffs! So here, I have a table called iowe, i have a four records pre-loaded into it. This is how it looks like: NAME AMOUNT Serial Number ---------- ---------- ---------...
Seibert asked 4/4, 2013 at 13:56

1

I'm working with integer sequences with non-repeating elements, for some reasons I am tring to remove duplicates by building a hashset. int * a = {123, 145, 210, 77}; int * b = {145, 77, 123, 210};...
Dogwatch asked 19/1, 2023 at 7:56

16

Solved

I have a table with over million rows. I need to reset sequence and reassign id column with new values (1, 2, 3, 4... etc...). Is any easy way to do that?
Ferriferous asked 13/1, 2011 at 8:37

38

Solved

How does Python's slice notation work? That is: when I write code like a[x:y:z], a[:], a[::2] etc., how can I understand which elements end up in the slice? See Why are slice and range upper-bound...
Hinckley asked 3/2, 2009 at 22:31

6

Solved

I'm writing a new ASP.NET Core Web API, and one of my requirements is to be able to leverage EF Core 3.1 to grab the next value of a sequence defined in my SQL Server as the ID for a record I need ...
Shockley asked 11/3, 2020 at 21:16

12

I have the following code: @Entity @Table(name = "my_table", schema = "my_schema") @SequenceGenerator(name = "my_table_id_seq", sequenceName = "my_table_id_seq", schema = "my_schema") public cla...
Andrew asked 9/4, 2010 at 9:37

5

Solved

I want to generate character sequence from 'a' to 'z'. In scala, I can generate character sequence very simply: ('a' to 'z') But in clojure, I end up with the following code: (->> (range ...
Prau asked 26/7, 2012 at 13:59

4

I have a web api post method that inserts a new row in my table in my Oracle database. I'm having trouble with the primary key of the table which is a sequence value. How do I do my_primary_key_seq...
Miguelinamiguelita asked 15/8, 2013 at 19:38

2

Solved

I've written a simple code: sub euler-ex ($x) of Seq { 1, { $x**++$ / [×] 1 .. ++$ } ... Inf } say " 5: " ~ euler-ex(5)[^20] ~ " = " ~ [+](euler-ex(5)[^20]); The output: 5: 1 ...
Snowstorm asked 1/11, 2022 at 16:43

3

Solved

I want to add a sequence to a column that might already have data, so I'm trying to start it beyond whatever's already there. Assuming there already is data, I would like to have done it this way: ...
Beanstalk asked 5/5, 2016 at 18:23

6

Solved

Let's say that I want to generate a data frame which contains a column with is structured in the following format. 2011-08-01 2011-08-02 2011-08-03 2011-08-04 ... I want to know if it's possibl...
Shanahan asked 24/9, 2011 at 1:10

10

Solved

I've got a list of objects List[Object] which are all instantiated from the same class. This class has a field which must be unique Object.property. What is the cleanest way to iterate the list of ...
Buchan asked 12/10, 2010 at 8:22

6

Solved

I want to infinitely repeat T elements in a Sequence<T>. This can't be done using kotlin.collections.asSequence. For example: val intArray = intArrayOf(1, 2, 3) val finiteIntSequence = intAr...
Luing asked 28/12, 2017 at 12:12

© 2022 - 2025 — McMap. All rights reserved.