Questions tagged [variable-length]

Refers to anything whose length can vary

Refers to anything whose length can vary

290 questions
0
votes
1 answer

Array wont work with small sentences

If I change the text to two words the program wont output anything. Not a clue on how to fix this, thanks in advance. public class test { public static void main(String args[]) { String text = "The cat sat on the mat!"; //Change the string to…
Joe
  • 9
  • 1
0
votes
2 answers

Working with strings - Public int length()

I'm completely new to programming, and I'm having difficulties understanding my assignment, and how I proceed solving it. The assignment is introduced by saying: The String class defines a length accessor method with the following header: public int…
JensJakob92
  • 5
  • 1
  • 4
0
votes
1 answer

How do I recode missing data so that my variable lengths are the same in R

So I have two variables which are SAT scores in Verbal(SATV) and Quantitative(SATQ). There are 500 rows. There are 7 NA's in the SATQ. My goal is to run lm() and gvlma() with SATV and SATQ as IVs. But I get an errors saying that R won't run my code…
0
votes
0 answers

Converting Variable Length Byte Values into an integer

Given an input stream of bytes in the following format, is there a better way of extracting integer values? The low order 7 bits of a byte to represent the value or part of the value The high order bit is an "escape" or "continuation" bit so: 0x7F …
EAKAE
  • 153
  • 1
  • 11
0
votes
1 answer

Append varchar2 length in Oracle

I have an oracle procedure which appends varchar2: var1 varchar2(32767); if nvl(length(var1),0) + length(var2||var3||var2||chr(10)||var4||chr(10)||chr(10)) < 32767 then var1:= var1||var2||var3||var2||chr(10)||var4||chr(10)||chr(10); end if; While…
user1051434
  • 167
  • 1
  • 5
  • 17
0
votes
1 answer

is there a method to get the number of bits turned on in the BitSet in Java?

I want to get the number of bits turned on in a BitSet. here is a program to calculate even numbers. Ofcourse, there are easier ways to calculate even numbers, this is just for understanding of how to use BitSets. here is the code: Public class Test…
brain storm
  • 30,124
  • 69
  • 225
  • 393
0
votes
1 answer

Length of multidimensional array with smarty

I want to know the length of a multidimensional array in smarty. I have:{foreach itme=$i from=$var}{/foreach} I try with {$var.$id|@count} but not work. How can I have the length for use this in a {for} cicle?
Beb Pratza Ballus
  • 221
  • 1
  • 5
  • 14
0
votes
1 answer

Get CSSKeyframesRule length

I'm iterating through a CSS keyframe in order to change the original to a new animation based on the keyframe that is closest the current behavior of the element being animated. I use the function below to obtain the keyframe rules by iterating…
Zach Saucier
  • 24,871
  • 12
  • 85
  • 147
0
votes
1 answer

How do I store a LONG list of names in a macro in Stata?

I need to store a very long list of variable names in Stata and after something like 250 characters, no more characters can be stored in a local or global macro. Currently, I'm using many different globals to store the names of the many regressors…
0
votes
1 answer

ruby excercise for name.lenth.t_s

the excercise in the book says that I should ask for the names individually and then get the name length. I am stuck on the 8th line? Is that what I am supposed to do to get the name? puts "What\'s your first name?" first = gets.chomp …
jazzlark
  • 35
  • 3
0
votes
3 answers

Element length and index with simple html dom

I'm using Simple HTML DOM to get a certain element like this: foreach($html->find('img') as $d) { echo $d->outertext; } This will echo all the images. Let's say for example I only need image with index (meaning relative to all images) number…
Youss
  • 4,196
  • 12
  • 55
  • 109
0
votes
3 answers

C++ as in Java?: vector of vectors with *variable* length of int

My model would best use some v int[30][i][N_i]; structure that is 30 vectors of tuples of ints, where v[0] is a dummy, v[1] are plain ints (N_0 of them), v[2] are pairs of int (N_1 pairs) ... v[29] would be 29-tuples of int (N_29 of them) This is…
Michael
  • 63
  • 5
0
votes
1 answer

Python: Various Lists To Cartesian Product, Variable Length

I want to create words or rather combinations from three different arrays. The output should be a Cartesian product with itself and the other array with variable length. Example: array1 = ["a", "b", "c"] array2 = ["x", "y", "z"] Cartesian product of…
hellerve
  • 508
  • 1
  • 6
  • 30
0
votes
1 answer

does BIT fill unused space past 1 byte?

My tables will probably have very large row lengths. If I'm reading correctly, a BIGINT with a value of 1 will take up the full 8 bytes. http://dev.mysql.com/doc/refman/5.5/en/storage-requirements.html This seems horribly inefficient. Does a BIT…
user1382306
0
votes
2 answers

Shift and masking in C

I have this problem. I have a payload that dinamically change its length. If I don't cut this payload, I will have also informations that are rubbish for me. So I want to cut the payload in base of my payload length. I have this part of…
sharkbait
  • 2,980
  • 16
  • 51
  • 89