Questions tagged [object-class]

19 questions
4
votes
3 answers

Error in UseMethod("rescale") : no applicable method for 'rescale' applied to an object of class "c('haven_labelled', 'vctrs_vctr', 'double')"

I am getting the following error: Error in UseMethod("rescale") : no applicable method for 'rescale' applied to an object of class "c('haven_labelled', 'vctrs_vctr', 'double')" Here is my code for the plot: ggplot(data_q_agg3, aes(x = 'qmrcms', y…
Luke Thompson
  • 41
  • 1
  • 2
1
vote
1 answer

Override Object methods inside interface using default methods- Misleading error

Question: Need to understand why in case of Program 1 getting this misleading error, but in Program 2 it gives correct error? Also why unlike toString(), equals(Object), and hashCode(), overriding clone() and finalize() inside interface is…
1
vote
3 answers

How to make static array in Kotlin?

I am trying to make a static array in Kotlin. For doing this, I created an Object class, and inside that declared a mutableListOf(). When I try to add new Object PersonModel to array, I get red underline suggesting error in last line,…
1
vote
1 answer

Unable to split string to array and store to array object in Android Java

Is there any way to splits a string into an array and loop it into an array class in android java? Below is my code but it cannot loop Sample ScanResultProduct record ="P001,7,1,7,P002,8,2,16"; String ScanResultProduct[]; …
XDfox
  • 49
  • 7
1
vote
1 answer

Reference Comparison and Content Comparison in Java

I was learning about Reference (or Address) comparison and Content comparison. The below statement makes me confused: If a class does not override the equals method, then by default, it uses the equals(Object o) method of the closest parent class…
Superman
  • 221
  • 2
  • 11
1
vote
2 answers

What is the logic behind == returning false [toString()] when two reference variables are referring to same Object having same hashCode?

What is the logic behind == returning false when two reference variables are referring to same Object having same hash code values? public class One { public static void main(String[] args) { One o = new One(); One o1 =…
1
vote
2 answers

Check that a variable is an instance of a Class Object in WooCommerce

I am running a function whereby I check if a user has a refunded item/s on their previous order and if they do then apply a credit as a negative cart fee at checkout. The function is working for users who have placed an order before but is causing a…
1
vote
1 answer

Kotlin Memory allocation behaviour for object class and companion object

Kotlin provide a better way to create singleton object and companion object to access class member via class name. Cool this is !! But how the memory allocation work for both declaration, does this same work like static in java and remain retain…
CoDe
  • 11,056
  • 14
  • 90
  • 197
0
votes
0 answers

Error while Importing LDIF in Apache Directory Studio

I am connected to LDAP and trying to import one ldif file under one identity. While Importing the ldif when I am clicking on "finish", I am getting the error as "error while Importing ldif, it violated the schema because it contains attribute "xyz"…
0
votes
1 answer

Get a string when running an object class through str.replace(obj_cls, "new string")

I have an object class: class Color(object): def __init__(self, color): self.color = color I want to run the following commands: blue = Color("blue") print blue "The pen is {}".format(blue) "The pen is blue".replace(blue, "red") This…
Adam Sirrelle
  • 357
  • 8
  • 18
0
votes
1 answer

How to create "dynamic group" in ldap?

I want to create dynamic group in openldap with Apache Directory Studio but groupOfURLs object class not available.
Mohammad Reza Mousavi
  • 894
  • 1
  • 10
  • 18
0
votes
2 answers

Serialize/Deserialize Json Object class structure

Thank you in advance. I am really stuck on this one, but practicing. Thank you in advance for any help. I am able to successfully build this Json object in my code, but de-serializing it with the same Dictionary I used to build it, is not working…
Autonomic
  • 150
  • 4
  • 15
0
votes
0 answers

How to parse json file to be Array in object Class?

I got confused when Im try to parsing json in object class. Im using klaxon but I just wonder how to read the file because I cannot use activity or application to add it into buffered object. enter image description here
Hadisyah
  • 34
  • 4
0
votes
1 answer

How to retrieve every objectClass available with python-ldap?

Given a valid python-ldap context, how can I query all the objectClass available in the LDAP server? I suppose the result would be a list of ldap.schema.models.ObjectClass.
azmeuk
  • 4,026
  • 3
  • 37
  • 64
0
votes
1 answer

use object of S4 class SeqExpressionSet to plot PCA with ggplot2

I have made an object of S4 class SeqExpressionSet with EDASeq which I can then analyse with plotPCA. However the plotPCA function lacks the ability to fully adjust aesthetics. I was therefore wondering whether it is possible to change the dataset…
Jens
  • 33
  • 7
1
2