object tag

32 questions


1 answers
129 views
0
(Python) How do I write code?

class Account: def __init__(self, money): self.__money = moneyclass AccountManager: def __init__(self): self.__accList[] def newAcc(self): global Name global money self.__accList.append(Name) ##...

2 years ago

1 answers
85 views
0
To check if object properties are undefined

What is the best way to check if object properties are undefined in JavaScript?

2 years ago

1 answers
83 views
0
I need to check if the variable is a string, what should I do?

So far, we've used the isNaN function to check whether the variable is a string or an object, but it doesn't seem to work properlyI wonder if I did it the right way.if(isNaN(element)) element = docume...

2 years ago

1 answers
78 views
0
After changing the key name in the Json Array, it should be combined with other Json Arrays.

To draw a multi-line arm chart A total of four types of JsonArray must be combined. In addition, the key names of the four JsonArray are duplicated, so xx1, xx2, and... and so on It is not easy becaus...


2 answers
122 views
0
[javascript] Is the object a function?

Hi, everyone. var color = 'red';function foo() { var color = 'blue'; // 2 function bar() { console.log(color); // 1 } return bar;}When you want to get the color variable of the foo function from the ...

2 years ago

1 answers
83 views
0
The most efficient way to copy objects

What is the most efficient way to copy JavaScript objects? What I've seen so far is obj = eval(uneval(o));It's like this, but it's only available on Firefox right now. obj = JSON.parse(JSON.stringify(...

2 years ago

1 answers
78 views
0
Javascript: How do you turn an array into an object?

Hello.Array below const data = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]];I want to change it to the object below.const data = [ { a: 1, b: 2, c: 3, d: 4 }, { a: 5, b: 6, c: 7, d: 8 }, { a: 9, b: 1...

2 years ago

1 answers
120 views
0
How to copy objects from Java

DummyBean dum = new DummyBean();dum.setDummy(foo);System.out.println(dum.getDummy()); // prints 'foo'DummyBean dumtwo = dum;System.out.println(dumtwo.getDummy()); // prints 'foo'dum.setDummy(bar);Syst...

2 years ago

1 answers
55 views
0
About Java object generation (?)

When you create an object in Java, There are times when you use Box-Box, such as Box<String> box = new Box<>();There are times when I use Set-HashSet, such as Set<String>set1 = new H...

2 years ago

1 answers
55 views
0
How to access each member in JavaScript

var validation_messages = { key_1: { your_name: jimmy, your_msg: hello world }, key_2: { your_name: billy, your_msg: foo equals bar }}For example, I'd like to see a member of an object.How do you ...

2 years ago
« - 3 - »

© 2024 OneMinuteCode. All rights reserved.