Questions tagged [variable-length]

Refers to anything whose length can vary

Refers to anything whose length can vary

290 questions
1
vote
3 answers

Can you get .length of number of svgs to create a rating score?

Not sure if this is doable, but is there a way you can use .length or another method to get the rating score of something which is usually displayed in svg form? In the below HTML in each svg there's a "g fill" which determines what is…
leek1234
  • 470
  • 2
  • 9
1
vote
0 answers

Decompress varint64 stream of variable-length integers into the qword elements of an __m256i with AVX2

Varint64 data is varlen data format. Varint64: Divide uint64 into 8 8bits, each 8bits contains the highest flag bit and the lower 7 data bits. When the flag bit is 1, it indicates that the next 8bit still belongs to this uint64, otherwise it is the…
Songmeng
  • 46
  • 4
1
vote
1 answer

How to (log) transform *args arguments without losing structure

I am attempting to apply statistical tests to some datasets with variable numbers of groups. This causes a problem when I try to perform a log transformation for said groups while maintaining the ability to perform the test function (in this case…
Tim Stack
  • 3,209
  • 3
  • 18
  • 39
1
vote
1 answer

How to make list have correct number of variables inside them depending on length of one variable

I am pretty new to coding and am working on writing hangman to enhance my skills I want the code to be able to detect how long a word is and then put that length into the correct number of variables in a array. I don't really know how to describe…
user15189469
1
vote
1 answer

len() vs __len__: TypeError: 'float' object cannot be interpreted as an integer

I met a weird bug and I don't think it's my code's problem. Here are the objects I have got: Boundary: represents domain and range, such that [1, 10], it has a low attribute and a high attribute, in this case low = 1 and high=10 Lim: represents…
Weilory
  • 2,621
  • 19
  • 35
1
vote
1 answer

How to display cart items length in WooCommerce

I WooCommerce I would like to display the length of the items in the cart. How to display cart items length in WooCommerce? Maybe there is a shortcode for that?
user14041846
1
vote
4 answers

Write named list of strings with variable length and number of strings to a text file in R

I'm relatively new R user and still learning the basics. I have a named list xx those entries looks like this: > xx[100:105] $`15LOX-1` [1] "207328_at" $`16.1` [1] "215946_x_at" $`16.2` [1] NA $`16.3A5` [1] "200983_x_at" "200984_s_at"…
yuk
  • 19,098
  • 13
  • 68
  • 99
1
vote
0 answers

Can I set variable as data type length in SQL?

I have a variable that is a hex with reversed bytes. To reverse bytes I found the solution with type binary and reversing it depends on its size. Since I have to reverse bytes of variable @card which can be different sizes I was thinking of…
1
vote
0 answers

LearningShapelet with variable-length time-series returns nan in predictions array

I am working with variable-length time series. In particular, I am using the tslearn tool. I transformed data so that they fit the allowed format for tslearn: X_train, X_test, y_train, y_test = train_test_split(data, Y,…
1
vote
1 answer

Ruby: How to generate strings of variable bits length with only alphanumeric characters?

I am trying to solve the following problem using Ruby: I have a requirement to generate strings with variable bits length which contain only alphanumeric characters. Here is what I have already found: Digest::SHA2.new(bitlen = 256).to_s # =>…
Marian13
  • 7,740
  • 2
  • 47
  • 51
1
vote
1 answer

Javascript - Check length/amount of items in each object in array?

var test = [ {test1: 1, test2: 2}, {test3: 3} ]; console.log(test[0].length); Im basically trying to find a new to find the length of for example test[0] which would be 2, and test[1] which would be 1. Im not good at…
1
vote
2 answers

Get length of array of unsigned chars in C

How can I get length of array which is array of unsigned char*? This is my array: unsigned char ot[] = { 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x0, 0x0, 0x0, 0x0, 0x0 }; I tried to use strlen() like this: int length =…
tomsk
  • 967
  • 2
  • 13
  • 29
1
vote
2 answers

GIF format - separate variable-length codes

I trying to parse GIF format and have one problem with reading image data. This data represented like bit array, containing variable-length values. ex: 0010-1010-0010-0000-00111-10000-11111... Sometimes length of the code increases, but I can't…
skkap
  • 338
  • 2
  • 12
1
vote
2 answers

SAS: Additional options for proc import - Faulty variable format

I am trying to import several .txt files in to SAS. The values are separated by semi colons and each file has several million observations. The problem I have is when importing the file one of the variables gets the wrong formatting. The original…
Jonas Lundin
  • 37
  • 1
  • 5
1
vote
1 answer

Differences in indexing of vector between using length and a sequence

I am setting up a vector data, and want to extract a part of it. I tried two methods, as shown below. I thought these should have the same output, but results are different. Why? data1<- c( 1, 2, 3, 4, 5 ) data1[ length( data1 ) - 2 : length(…
Ala
  • 25
  • 2