seq Questions

2

I have a Windows Service that processes long running tasks and never shuts down unless forcefully done so (i.e. computer shutdown). I would like to keep the same Serilog instance alive the whole ti...
Layer asked 26/10, 2017 at 16:34

3

Solved

I'm an experienced Pandas user and am having trouble plugging values from my R frame into a function. The following function works with hard coded values >seq.Date(as.Date('2018-01-01'), as.Da...
Citizenry asked 24/4, 2018 at 8:18

4

Solved

A quick question that may be more of a rant (but I hope to be enlightened instead). In F# a string is compatible with Seq such that "abcd" |> Seq.map f will work on a string. This is a brilliant ...
Mistassini asked 2/2, 2013 at 23:52

1

Solved

I am wanting to be able to sum multiple fields of a sequence. I don't know how to do this without iterating over the sequence multiple times. My perception is that this is inefficient. Is there a c...
Campy asked 5/1, 2018 at 4:42

1

Solved

From the docs, I know that Nim arrays have a fixed length determined at compile time, whereas seqs have a variable length. I notice that seqs have more builtin tools. For example, in the sequtils ...
Televisor asked 10/12, 2017 at 13:50

1

Why can't I tail the result of a tail? I can call head on the sequence tail returns (and other variations), but a tail on a tail doesn't work (in 2017.10): > my $list = <a b c d e f g h i j&...
Imam asked 7/12, 2017 at 21:51

3

Solved

I want to produce such file (cartesian product of [1-3]X[1-5]): 1 1 1 2 1 3 1 4 1 5 2 1 2 2 2 3 2 4 2 5 3 1 3 2 3 3 3 4 3 5 I can do this using nested loop like: for i in $(seq 3) do for j in...
Drabeck asked 29/4, 2014 at 11:11

2

Solved

I'm having an issue where a query that's indexed refuses to use the index, because it's not selective enough (let's say 60 out of 130 million rows meet the condition) and so decides to use a seqsca...
Pardew asked 17/10, 2017 at 22:46

7

Solved

Is it possible to do something like this: start=1 end=10 echo {$start..$end} # Ouput: {1..10} # Expected: 1 2 3 ... 10 (echo {1..10})
Overly asked 31/5, 2011 at 17:20

2

Solved

Given an initial date, I want to generate a sequence of dates with monthly intervals, ensuring every element has the same day as the initial date or the last day of the month in case the same day w...
Collusive asked 7/4, 2016 at 14:23

2

In Scala Collection documentation, there is some clue to this question: Trait Seq has two subtraits LinearSeq, and IndexedSeq. These do not add any new operations, but each offers different perf...
Lonee asked 18/3, 2016 at 18:22

7

Solved

I want to generate missing values in a vector so that the missing value are grouped in sequences, to simulate periods of missing data of different length. Let's say I have a vector of 10 000 value...
Sandusky asked 16/6, 2017 at 13:23

3

Solved

Without Future, that's how I combine all smaller Seq into one big Seq with a flatmap category.getCategoryUrlKey(id: Int):Seq[Meta] // main method val appDomains: Seq[Int] val categories:Seq[Meta]...
Antisepsis asked 16/6, 2017 at 9:38

4

Solved

I am trying to generate a vector containing decreasing sequences of increasing length, such as 1, 2,1, 3,2,1, 4,3,2,1, 5,4,3,2,1, i.e. c(1, 2:1, 3:1, 4:1, 5:1) I tried to use a loop for this, but I...
Diaphaneity asked 28/3, 2017 at 8:29

2

Solved

My question is when entering Seq. why is there no Seq.tail function? In this code that does not convert a sequence to a list, there is no Seq.tail function available in the recursive function. Is ...
Krissykrista asked 20/3, 2017 at 19:15

4

Solved

I would like to create a sequence from two numbers, such that the occurrence of one of the numbers decreases (from n_1 to 1) while for the other number the occurrences are fixed at n_2. I've been...
Dimeter asked 17/3, 2017 at 13:13

2

Solved

I would like to log any json into serilog properties. I have read a lot about serilog and json, but it is a structured json logging, with a message template. So instead of logging this Log.Info(&qu...
Claire asked 3/1, 2017 at 17:30

1

Solved

I know that this is a little bit tricky but i wonder why it doesn't work! module Main where sillyDebug :: Int -> Int -> Int sillyDebug x y = (print x) `seq` (x + y) main :: IO () main = d...
Iq asked 2/2, 2017 at 4:57

6

Solved

The seq function in R would give me a sequence from x to y with a constant step m: seq(x, y, m) E.g. seq(1,9,2) = c(1,3,5,7,9). What would be the most elegant way to get a sequence from x to y ...
Toothpick asked 11/1, 2017 at 9:0

3

Solved

New F# developer, long time C# developer. As an exercise in learning F#, I'm working my way through Eric Lippert's series on graph coloring translating from his C# to F#. I'm currently working on p...
Inceptive asked 3/1, 2017 at 21:31

1

Solved

I read that using seq_along() allows to handle the empty case much better, but this concept is not so clear in my mind. For example, I have this data frame: df a b c d 1 1.2767671 0.133558438 1...
Clearcut asked 30/12, 2016 at 20:27

3

Solved

Perl 6 has lazy lists, but it also has unbounded Range objects. Which one should you choose for counting up by whole numbers? And there's unbounded Range with two dots: 0 .. * There's the Seq (...
Karr asked 12/10, 2016 at 20:50

2

I am using Visual Studio 2012, and the function that calls Console.ReadLine() will not execute let inSeq = readlines () in this simple program open System open System.Collections.Generic open Sy...
Belier asked 22/9, 2016 at 21:56

2

Solved

I am working with scala play 2 with slick. I have a Seq like val customerList: Seq[CustomerDetail] = Seq(CustomerDetail("id", "status", "name")) I want to add a CustomerDetail item in this cust...
Ruggles asked 6/9, 2016 at 6:11

2

Solved

I want: 01 02 03 ... 10, 11, 12 ... 97, 98, 99 I have tried using following: seq("01":"19") # Doesn't help paste0("0",seq("01":"19")) # Doesn't help Please suggest something!
Tittle asked 8/8, 2016 at 9:28

© 2022 - 2024 — McMap. All rights reserved.