Questions tagged [variable-length]

Refers to anything whose length can vary

Refers to anything whose length can vary

290 questions
0
votes
1 answer

Gather list of tibbles of different lengths - a for loop?

I'm working on code to batch process excel worksheets, for import into a relational database. Each excel sheet represents data for a different elephant family, with a set of individuals and their presence/absence on different dates. I need this to…
0
votes
1 answer

Express conditions on two consecutive variable length relationships?

How to express a conditions for two consecutive variable length relationships? Consider this partial query MATCH(t1:Type{myID: 1})-[r:relType]->(:Type)-[rels:relType*0..]-(t2:Type{myID:100}) WHERE r.attr1>10 Basically I am trying to saying that…
roschach
  • 8,390
  • 14
  • 74
  • 124
0
votes
1 answer

create string-format using re.compile() and extend to check length

I need to check format and length of an email in ONE command. dont want to use if len(.... ) == ...: used re.compile(some conditions) EMAIL_FORMAT = re.compile(r"[^@]+@[^@]+\.[^@]+") I want to extend this to also check the length --> need to keep…
user7074788
0
votes
1 answer

Does utf-8 encoding need character length?

From what I understand, casual binary serialization implementations of non-static structures (like an array or a vector) would usually state the structure's "length" as the first word (usually a 64bit uint), then proceed to encode each entity's…
Athan Clark
  • 3,886
  • 2
  • 21
  • 39
0
votes
1 answer

Scapy - layer's length field

I'm trying to build PTPv2 protocol using Scapy. There are few message types in this protocol, so I use ConditionalField to describe the different fields options: class PTPv2(Packet): name = "Precision Time Protocol V2" fields_desc = [ …
Shir
  • 1,157
  • 13
  • 35
0
votes
1 answer

variable-length array in struct with TI compiler in C (socket programming)

I'm writing code that dealing with data received from udp in application layer. This is the function prototype used for receiving data from udp int my_recv_UDP(int s, void* mem, int len, struct…
Andy Lin
  • 397
  • 1
  • 2
  • 21
0
votes
4 answers

Finding length of all values in an ArrayList

For a program I'm attempting to have a nested for loop repeat along the lines of this: for(int i = 0;i < ArrayList.size();i++){ for(int x = 0;x
Sumtinlazy
  • 337
  • 5
  • 17
0
votes
2 answers

Javascript: Varying width multi dimension array

I want to create a 2D array, with varying width. I have initialized the outer array as I know the number of rows. var listofcities = new Array(lengthofcites); //i get this lengthofcitles from another routine Now, I will get the list of facilities…
0
votes
2 answers

Find list length of sublist that made from list and int

as per the title, how to find list length of sublist that made from list and int. For example, give a list ListNo=[[6,2,5],[3,10],4,1] it should return LengthSubList 3,2,1,1. I make the following code, LengthSubList=[len(x) for x in ListNo] But,…
mpx
  • 3,081
  • 2
  • 26
  • 56
0
votes
2 answers

Pass variable-length-arguments to variable-length-arguments with different sizes

Suppose I have a method like below: public void setTask(String... args) { //... } How can I create a special version of the above method that has a fixed value for the first member of args like below? (args[0] always has a fixed value and…
Mir-Ismaili
  • 13,974
  • 8
  • 82
  • 100
0
votes
2 answers

How to detect (length of) numbering in a numbered title?

Is there a way (either a trained model or a deterministic function) in python3 that returns the length of numbering in a title. For example, "I. This is a big title" ---> length=len("I.")=2 "1.10 This a small title" ---> length=len("1.10")=4 "A)b)…
dada
  • 1,390
  • 2
  • 17
  • 40
0
votes
0 answers

Fill an empty matrix with data of different lengths

Hi i have written a code that supposed to get finance data from Fred. Its supposed to get all the data and them put the data into an empty matrix. This seem a litle bit harder than i thought. For example: tickers = c("AAA", "BAA",…
A.Salehi
  • 33
  • 8
0
votes
2 answers

Read variable length messages over SPI using Low Level (LL) api on STM32 MCU

My system is composed by an STM32NUCLEO board and a slave device connected over SPI. The slave device sends commands with a variable length: possible lengths are 4, 8, 10, 14 bits. I'm trying to detect these messages on my nucleo board using the LL…
Alexis
  • 576
  • 1
  • 10
  • 29
0
votes
0 answers

Length of continuous characters in fortran 77 with handed over character *(*)

I am currently porting some software from an old Power Hawk to an iHawk Concurrent system. My fortran compiler is the Concurrent cf77 . No, I don't have the option to switch to gfortran, I need some compiler flags of this compiler. In multiple *.f…
0
votes
2 answers

Cannot invoke length() on the primitive type int

I am trying to limit a users input for their student ID to a length of 8 characters but when I use input.length() it tells me I cannot invoke length() on a primitive type int. Is there any way I can easily fix/achieve what I desire another way? The…
Cian
  • 1
  • 2