All Questions
38
questions
0
votes
2
answers
124
views
How to find and check obects with all properties being empty in Matlab?
For example, I create a student with all properties being empty
classdef student < handle
properties
name
test
end
methods
function obj = student(name)
...
2
votes
1
answer
96
views
How to find objects with specific properties(another objects with specific properties) in Matlab?
For example, an object 'student' with a property 'test' , and 'test' is also an object with a property 'score'.
classdef student < handle
properties
name
test
end
...
1
vote
1
answer
41
views
Can a property of an object become other object's property, but still 'belongs to its owner'?
I don't know how to express 'property belongs to its owner' properly.
For example, I define classes 'student' and 'teacher'
classdef student < handle
properties
name
homework
...
0
votes
1
answer
68
views
why object's property is undefind?
what I want is if I did not call the object with new keyword then do not do this line
this.price = price
I created the constructor function and created the property price
and I created the object ...
0
votes
2
answers
736
views
Updating a property of another property in a class
I have very much a beginner question: I am sure I am missing something incredibly fundamental here
I have this simplified version of the code (use of arrays, etc.. is only for purposes of ...
1
vote
1
answer
65
views
JavaScript: How to fix an instance not being assigned property values properly
I create an instance of my Piece class and am trying to print out the value of the instance's quantity, but I keep getting undefined.
I look in the Google Chrome console, and console.log(temp) fine, ...
0
votes
1
answer
88
views
How can I check if a property exits in my object?
This is my object fields:
{#7139 ▼
+"id": array:9 [▼
"fieldName" => "id"
"type" => "integer"
"scale" => 0
"length" => null
"unique" => false
"nullable" => ...
0
votes
1
answer
2k
views
How to make Multiply function inside a Class Python
What am I missing here in the code or in function area? any pieces of advice? if anybody knows a very good place to study from it object-oriented programming please tell me and thanks.
class Square():...
0
votes
5
answers
41
views
Javascript : object properties aren't recognized
I have a foo object as follow :
var foo =
{
"timer" :
{
"hours" : 0,
"minutes" : 0,
"seconds" : 0,
"time" : new Date(1970, 0, 1, foo.timer.hours, foo....
0
votes
2
answers
118
views
Dynamic assignment of property names based on array values
I am trying to create a class that is going to generate dynamic class properties according to a user input.
There will be an array created from user input data. This array should work as an example:
$...
0
votes
1
answer
119
views
How to reference an Object based on a Key Value?
I have an array of objects: [obj1, obj2, obj3]
obj1 = {id:1,name:First}
obj2 = {id:2,name:Second}
...
But the object's array indexes are constantly changing. How else can I reference a specific ...
1
vote
1
answer
64
views
How to find objects by specifying the range of property value?
In Matlab I have defined a class and created a bunch of objects, how can I select a subset of all the objects by specifying a range for certain property?
For example, if I have a person class with ...
1
vote
1
answer
38
views
Access property of a returned object without a temporary variable
How does one access the properties of a returned object without a temporary object?
Or, to make myself clear, how do I turn this code into one line ?
temp = info(AFR)
Fs = temp.SampleRate
I tried
...
0
votes
1
answer
45
views
Referencing a property of a Function within the Function? [duplicate]
One of the many fascinating things about JavaScript is that functions are actually objects, and they can be constructed a number of ways, one of which is using its constructor directly:
var func = ...
0
votes
1
answer
171
views
JS property as return value from method of same object
Edited to include more info about what I'm trying to achieve.
The code below works fine, but when I uncomment the boardGen:.. and board:.. sections to make board of flexible size, no board is created,...