Questions tagged [variable-length]

Refers to anything whose length can vary

Refers to anything whose length can vary

290 questions
2
votes
1 answer

Read indices stored in a list

I have a dataset which is stored as a list. I want to be able to retrieve different pieces of the data and alter them. The indices of pieces I need are stored in a different list. For example: data_list = [[[1,2],[3,4]],[5,6]] indices =…
broha
  • 21
  • 3
2
votes
1 answer

"ValueError: The shape of the input to "Flatten" is not fully defined" with variable length LSTM

Here's my code: from keras.layers import LSTM, Bidirectional, Dense, Input, Flatten from keras.models import Model input = Input(shape=(None, 100)) lstm_out = Bidirectional(LSTM(10, return_sequences=True))(input) something =…
th4t gi
  • 139
  • 2
  • 5
2
votes
2 answers

How to filter by pattern in a variable length Cypher query

I have a very simple graph with 5 nodes (named n1 - n5), 1 node type (:Node) and 2 relationship types (:r1, :r2). The nodes and relationships are arranged as follows (apologies for the ascii…
dave135
  • 25
  • 4
2
votes
2 answers

Finding longest length out of 3 different vectors in R

I do not know if there is a function for this but I have 3 dataframes with different lengths. I was wondering if there is a way to find which one is the largest length and load that into a variable. For example: x <- c(1:10) y <- c(1:20) z <-…
Jake
  • 454
  • 5
  • 26
2
votes
1 answer

How does path search work on Cypher and what types of filtering can be done during expansion?

I'm trying to understand Neo4j's mechanics when dealing with path searches. I studied the query patterns and execution plan operators in the developer manual, but I still have some questions. Please correct me if I'm wrong, but from the content I…
2
votes
1 answer

c how does function receive variable length argument?

if I had a function receiving variable length argument void print_arg_addr (int n, ...) I can use these three macro to parse the argument va_start(ap,v) va_arg(ap,t) va_end(ap) In my understanding, va_start lets ap point to second…
user3094631
  • 425
  • 3
  • 13
2
votes
2 answers

Neo4J Cypher: filter out variable length paths by criteria

How could I imply restrictions on variable length path? I have all possible paths from some start node query: CREATE INDEX ON :NODE(id) MATCH all_paths_from_Start = (start:Person)-[:FRIENDSHIP*1..20]->(person:Person) WHERE start.id = 128 AND…
VB_
  • 45,112
  • 42
  • 145
  • 293
2
votes
3 answers

length field in Object Class

Sorry if this question have been asked before. I have some doubts regarding length field of Object class. Correct me if i am wrong, Every class impilcitly extends Object class thats why we can access every methods like equals,clone,hashcode etc So…
FaisalAhmed
  • 3,469
  • 7
  • 46
  • 76
2
votes
1 answer

Cypher Access Nodes of Variable Length Path

I have the following problem: I have a MATCH clause like this one: MACTH (A)-[*1..]->(B) Now, if this pattern matches, I need to somehow duplicate the -[*1..]-> part and replace all node in it tat have a specific type with nodes of another type. for…
lo tolmencre
  • 3,804
  • 3
  • 30
  • 60
2
votes
1 answer

Javascript not logging length correctly

I'm having this issue with javascript right now where if I would console log the element itself it will show the length in chrome but it doesn't show the length correctly when I use .length. Chrome console
Kevib
  • 37
  • 3
2
votes
3 answers

Python class: Why can't I use the method len() inside __eq__(self, other)?

https://gist.github.com/rjurney/1e8454af8e44312d02d7 class FrozenSortedTuple: """A frozenset that cares about order of tuples. And is not actually frozen.""" def __init__(self, vals): if type(vals) not in [list, set, tuple]: raise…
rjurney
  • 4,824
  • 5
  • 41
  • 62
2
votes
2 answers

Java: Why does matrixes accept lines greater than the predefined length?

For instance: int[][] matrix = new int[3][1]; int[] vector = {1,2,3,4,5}; matrix[0] = vector; It compiles and runs normally, even though vector has a greater length than a line of matrix would stand for. Why does Java accept this?
Mr Guliarte
  • 739
  • 1
  • 10
  • 27
2
votes
1 answer

Generating all permutations when length varies

Background: I am working with a qualitative data coding scheme that contains seven ordered levels of codes. Five of these contain a single option and two contain two mutually exclusive options. A given code can be a concatenation of up to seven…
spearmint
  • 70
  • 6
2
votes
1 answer

where to place default value parameter in variable-length function in c++?

in variable-length parameters function, the '...' must be place last. And default value enabled parameters must be last, too. so, how about both needed in the same one function? Now I have a log utility: void MyPrint(int32_t logLevel, const char…
kim
  • 43
  • 4
2
votes
1 answer

Editing a variable length list within another

Can Steven Sanderson's approach here be modified to edit a variable length collection within another variable length collection without dirty hacks? The problem is that when there is one collection within another the prefix for the fields in child…
NVM
  • 5,442
  • 4
  • 41
  • 61