Questions tagged [variable-length]

Refers to anything whose length can vary

Refers to anything whose length can vary

290 questions
5
votes
2 answers

How do I expand a long number (ending in e+##) to show in expanded form?

So, this may be a simple question but I'm having some trouble finding the answer anywhere. Take for example I have a simple program where I want to divide a by b like so: def main(): a = 12345678900000000 b = 1.25 answer = (a / b) …
Vale
  • 1,003
  • 1
  • 9
  • 22
5
votes
2 answers

Two-dimensional variable-length array in Cobol

How do you go about defining a two-dimensional MxN array in Cobol of which both M and N are of variable length? Here's the message I get in Net Express when attempting to have a variable array inside another: COBCH0144S OCCURS DEPENDING subsidiary…
James P.
  • 19,313
  • 27
  • 97
  • 155
5
votes
1 answer

Odd behavior of function with variable number of parameters in C

I have the following C function with a variable number of arguments, which is supposed to search the char* word through a hashtable and write true or false in a file which, if specified, is the second parameter; otherwise, it is stdout. It works…
thehousedude
  • 611
  • 6
  • 16
4
votes
2 answers

How to get the length of character type variable in RPGLE?

Is there any easy way to directly return the length of character and type variable in RPGLE? The length I am talking about here is not the length specified in the D-spec. I am talking about the actual number of meaningful characters in a string.…
God_of_Thunder
  • 753
  • 3
  • 20
  • 46
4
votes
1 answer

MVC 3.0 Editing a variable length list and using the PRG pattern

I created a view with a variable length list as described here: http://blog.stevensanderson.com/2010/01/28/editing-a-variable-length-list-aspnet-mvc-2-style/. I am trying to use the PRG pattern with action filters as described at point 13 here:…
harmen
  • 163
  • 2
  • 8
4
votes
2 answers

Does having variable-length columns slow selects on InnoDB table?

With MyISAM having variable length columns (varchar, blob) on the table really slowed queries so that I encountered advices on the net to move varchar columns into separate table. Is that still an issue with InnoDB? I don't mean cases where…
Vladislav Rastrusny
  • 29,378
  • 23
  • 95
  • 156
4
votes
2 answers

Is it faster to use n = len(s) instead of using len(s) directly?

Often to save some time, I would like we to use n = len(s) in my local function. I am curious about which call is faster or they are the same? while i < len(s): # do something vs while i < n: # do something There should not be too much…
Pythoner
  • 5,265
  • 5
  • 33
  • 49
4
votes
1 answer

Interpreting ASN.1 indefinite-lenght encoding with multiple encapsulated octet-strings

I have a BER structure like this... $ openssl asn1parse -inform der -in test.der -i -dump ????:d=4 hl=2 l=inf cons: cont [ 0 ] ????:d=5 hl=3 l= 240 prim: OCTET STRING 0000 - AABBCCDD ????:d=5 hl=2 l= 8 prim: OCTET…
duesee
  • 141
  • 1
  • 9
4
votes
1 answer

Receiving a "Variable Lengths Differ" error in predict

I have been receiving a the above message while trying to test the accuracy of my model. The plan was to predict the last 15 time points and compare them to the actual data for error values, but for some reason I got the "Variable Lengths Differ"…
MattLH
  • 41
  • 1
  • 1
  • 2
4
votes
1 answer

Fortran - Length of Integer / Number of positions used

This is probably a very basic question but I can't seem to find the answer on google or through searching though this forum (most likely due to poor phraseology of the problem). I am looking for an intrinsic Fortran function to give me the number of…
1QuickQuestion
  • 417
  • 6
  • 16
4
votes
2 answers

Objective-c - Passing in variables to a variable-length method

I've got an array with items, and I want to pass these in to a variable-length method. How do you do that? I.e., I've got this (for example): NSArray *array = [NSArray arrayWithObjects:@"1", @"2", @"3", nil]; [[UIAlertView alloc]…
quano
  • 18,812
  • 25
  • 97
  • 108
4
votes
5 answers

How to implement a variable-length ‘string’-y in C

I’ve googled quite a bit, but I can’t find information on how variable-length strings are generally implemented in higher-level languages. I’m creating my own such language, and am not sure where to start with strings. I have a struct describing the…
ELLIOTTCABLE
  • 17,185
  • 12
  • 62
  • 78
3
votes
1 answer

Lua parameters not expanding properly

I am pretty new to Lua and maybe this is a noobie question but why is the below code failing? As far as I understand foo returns two parameters and since in Lua you can pass as many parameters as your heart desires the first passes just fine but the…
A.Hristov
  • 481
  • 1
  • 4
  • 13
3
votes
1 answer

minLength textField attribute in Flutter

I'm trying to create a password textfield and I want the user to enter at least 8 characters. I really like the way the visible maxLength character counter on textfields work when a maxlength is set, and I was wondering if there is any equivalent…
3
votes
1 answer

Maximum length of a vector in R is only 349?

I would like to use a very long vector in R, but it seems that when I create a vector, the maximum length/number of values in the vector is 349. See below for code for vector1 and vector2. I can create vector1 with 349 values without a problem, but…
Sylvia Rodriguez
  • 1,203
  • 2
  • 11
  • 30
1 2
3
19 20