Questions tagged as 'cast'

2
answers

C Cast vs C ++ Cast

What is the difference between using the cast of C: float t = 5.0f; int v = (int)t; For the C ++ cast: float t = 5.0f; int v = static_cast<int>(t);     
asked by 06.10.2017 / 14:34
1
answer

Difference between "Object (myobject)" and "(myobject as Object)"?

I wanted to know the difference between using Object(meuobjeto) and (meuobjeto as Object) based on the code below: var mc:MovieClip = new MovieClip(); //Um objeto MovieClip trace(mc as String); //null trace(mc as MovieClip); //[...
asked by 29.10.2014 / 18:56
1
answer

Field int as string

I'm working on a code for a college job, but I'm having problems, even though the "home" is set to INT, netbeans continues to display:    "Incompatible types: String can not be converted to int" Below is the code, thank you! package tic...
asked by 07.10.2016 / 03:33
2
answers

Java.lang.String error can not be cast to when capturing data in Jcomobox to save

I have the button event saved, when I click to save, the following appears: Java.lang.String cannot be cast to org.nomedopacote.modelo.Funcionario cbNomeUsuario - This is the name of Jcomobox that is getting a List Officer....
asked by 25.05.2014 / 20:38
2
answers

Auto Cast with TypeScript?

Straight to the point: Is there a way to perform auto cast using an interface as a template in Ionic (TypeScript + Angular 5)? If not, can Lint recognize that an object coming from the server is not within the expected interface contract?...
asked by 01.03.2018 / 22:50
1
answer

Is there any difference between "new" and "reinterpret_cast" for a memory buffer?

I would like to know if there is any difference in the final product of these two codes: //------ Declaração curta class ClasseA { public: int valor; Classe() { iniciar(); } ClasseA * iniciar() { valor = 10; return this; } } int...
asked by 06.10.2017 / 18:19
1
answer

Doubt cast struct pointer

I can not understand the meaning of this cast : the function will execute and return a type type_t , which is a typedef to void* . Then a cast is made to header_t* , which is a struct , but I can no...
asked by 23.12.2015 / 19:53
1
answer

How to simulate a cast of a class in PHP (other than stdClass)?

It seems to me that in java there is a way to make casts to make a given object instance another. Example: MyClass variable = (MyClass) my_other_class; In php it is possible to do casts of types, and even for object, which in the case is...
asked by 05.08.2015 / 18:04
1
answer

String Cast for int Hibernate

Does anyone know how to do a cast from String to int within Query in this search, the variable "searchString"? @Query("SELECT s FROM StoreOrder s INNER JOIN s.user u WHERE lower(u.fullname) LIKE %:searchString% OR u.totalamount=:...
asked by 20.03.2015 / 18:07
0
answers

Problems with Where

I'm using MariaDB and I have a problem in the WHERE clause of the bank. The query is inside Excel which brings me periods from the bank through the month filter. But I was asked to change for a period of time, but it is bringing me an empty...
asked by 14.12.2018 / 16:01