Questions tagged as 'casting'

1
answer

Conversion error NSData in NSString

I have the following code to convert the body of a post request into a string let body: NSData = self.createBodyWithParameters(paramString, filePathKey: "image_name", imageDataKey: imageData!, boundary: boundary, nameParam: "dparam_string_post...
asked by 22.08.2016 / 08:58
1
answer

Unable to convert a DBNull object to other types

I am creating an application in which you can make reservations, in the mapper of the properties I have passed a method called "LoadProperties" in which I pass the data such as type, etc, the problem is when you I want to pass the user who has r...
asked by 15.07.2016 / 19:23
1
answer

Byte Cast [] to String and from String to Bytes

I explain, I have a query in SQL that returns me sometimes Int's and sometimes Doubles +--------+-----------+ | Algo | Resultado | +--------+-----------+ | Algo1 | 521 | +--------+-----------+ | Algo2 | 5.12 | +--------+--------...
asked by 09.03.2018 / 13:58
1
answer

Mold type in Delphi

I need to clarify on the issue of type molds in Delphi. I have written an example with two classes, TClassA and TClassB . TClassB inherit from TClassA . The code is as follows: program TEST; {$APPTYPE CONSOLE}...
asked by 25.08.2016 / 17:50
0
answers

Functions with dynamic_cast

I must carry out a program, which is a clinic which has a list of the Pregnant class, which is a base class from which pregnant women are derived. Pregnant women, pregnant women, pregnant women, mothers35 and pregnant women, high blood. I must i...
asked by 24.11.2018 / 02:02
1
answer

Cast error int ActionResult

I'm using VS 2017 for a tutorial but I get the error: You can not implicitly convert the long type to System.Web.MVC.ActionResult How do you fix that? The controller public class DefaultController : Controller { private TablaDato ta...
asked by 08.09.2018 / 05:31
1
answer

Serialization problem: java.lang.ClassCastException: java.lang.String can not be cast to java.util.ArrayList

I have the following code in which I need to return an object that serializes previously but it still gives me error at the time of casting even when my ArrayList is of Invoice type public void obtenerF() { try { Object...
asked by 25.04.2017 / 04:39
1
answer

Help with ClassCastException with reflection in hibernate

Someone can support me with this exception: java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType It happens when I run the following code in a DAO to use hibernate. The problem is in the get...
asked by 24.11.2016 / 20:21
2
answers

Why do not you let me do a casting?

How about, I'm trying to represent a function in java and create a class to represent sine, cos etc ... that is a child of the class Term, then I store each term in an ArrayList. The problem is that when executing send me this exception Ex...
asked by 17.01.2018 / 23:12