types
How can I get the most specific class of an instance?
Supp开发者_如何学Goose I have the following classes: class A {} class B extends A {} A instA = new A();[详细]
2023-04-05 07:01 分类:问答Generic type from string value
I got a custom class, who relies on a generic type T to be passed along. I only know what type it is in string form, because that\'s how it\'s being sent. I\'ve been searching around but can\'t seem t[详细]
2023-04-05 05:55 分类:问答How to sum two objects?
I want to do an application that pareses text. So far, I have a class called Result, that holds the value and type each part of an equation.[详细]
2023-04-04 11:57 分类:问答How to copy primitive type memory in Java?
I have two chars = 4 bytes, that representing integer value (geted from stream). How can I copy these into a primitive 开发者_运维问答int variable?You are better off reading 4 bytes as an int from th[详细]
2023-04-04 11:50 分类:问答Javascript Decimals
How can I convert a integer type to a double/float type so it shows decimal points? For instance if I want to convert a number to a money format:[详细]
2023-04-04 09:49 分类:问答How can I detect whether my python class instance is cast as an integer or float?
I have a python class to calculate the number of bits when they have been specified using \"Kb\", \"Mb\" or \"Gb\" notation.I assigned a @property to the bits() method so it will always return a float[详细]
2023-04-04 08:43 分类:问答Values in $1, $2 .. variables always NULL
I am trying to create a parser with Bison (GNU bison 2.4.1) and flex (2.5.35) on my Ubuntu OS. I have something like this:[详细]
2023-04-04 07:36 分类:问答Class hierarchy of tokens and checking their type in the parser
I\'m attempting to write a reusable parsing library (for fun). I wrote a Lexer class which generates a sequence of Tokens. Token is a base class for a hierarchy of subclas开发者_StackOverflowses, eac[详细]
2023-04-04 06:29 分类:问答What is the difference between "object as type" and "((type)object)"? [duplicate]
This question already has answers here: Closed 11 years ago. Possible Duplicate: Direct casting vs 'as' operator?[详细]
2023-04-04 03:42 分类:问答Why does this Haskell complain about ambigous types when its extended?
The following returns True (because 2147483647 is a prime). length [f | f <- [2..(floor(sqrt 2147483647))], 2147483647 `mod` f == 0 ] == 0[详细]
2023-04-04 03:11 分类:问答