Questions tagged [variable-length]

Refers to anything whose length can vary

Refers to anything whose length can vary

290 questions
-3
votes
1 answer

Manipulating an Fsharp list

Ok so i've been playing around with F# the last few days and found some tutorials kicking around online (no solutions!) If i had the following list- let new = [ (1808,"RS"); (1974,"UE"); (1066,"UE"); (3005,"RS"); (2007,"UE"); (2012,"UE"); …
-3
votes
1 answer

Array length undefined

I'm trying to get the length of a multidimensional Array as follows, but when I test it with alert() I get undefined. I would like to know how many items has the parent array (myArray), as I would like then to use it in a cycle…
don
  • 4,113
  • 13
  • 45
  • 70
-4
votes
1 answer

Python: How do add variable length leading zeros to a binary string?

I am looking to add leading zeros to my_string = '01001010' to ensure that a minimum of 'length' bits string, where length >= len(my_string)
-4
votes
1 answer

python 3.6 Length function for many conditions

I have a situation where if len(a) = 0 a = '' if len(b) = 0 b = '' if len(c) = 0 c = '' If len( any object) is zero , declare it as null. I have to keep doing this for all the alphabets . What is the best way to code it. Additional…
Hyder Tom
  • 373
  • 4
  • 14
-6
votes
1 answer

What is the correct way to retrieve length of an array added a field in nested struct in golang

I have a nested struct and I need to find the length of an array which is one of the fields in the struct. Here are the structs : type TextEntry struct{ name string Doc []DocEntry } type DocEntry struct { rank: int last: string …
1 2 3
19
20