Questions tagged as 'classes'

6
answers

Is there a JavaScript class?

I'm studying JavaScript and saw some explanations that left me with doubts. Here in StackOverflow I saw several questions about whether to create an abstract class in JavaScript. But my question is: Is it possible to create a class in JavaSc...
asked by 15.01.2016 / 17:55
0
answers

Instantiate class when starting application

I wonder if you can instantiate a class and use it throughout my application without having to instantiate it and import it. I have my app.component: import { Component, OnInit } from '@angular/core'; import { AnalyticsService } from './@core/...
asked by 08.01.2018 / 16:44
1
answer

Create separate method to call activity

I created a script where I intend to call separate activities But it is not working package com.example.john.new_login; import android.content.Context; import android.content.Intent; import com.example.john.new_login.login.Cadastro; i...
asked by 09.12.2017 / 21:01
1
answer

Why this "Call to undefined method Database :: Prepare ()" error in PHP 5.2?

I am using the following class to connect to the MySQL database class Database { private static $link = null; private static function getLink() { if (self::$link) { return self::$link; } $ini...
asked by 17.11.2017 / 20:21
1
answer

Operations between various classes

Well, I'm relatively new to programming in Java! It is the following I have a Super Class of User name of which there are 2 subclasses Citizen and Autarchy, within the class Citizen I have created an ArrayList that will guard the Prizes of this...
asked by 05.11.2017 / 04:08
0
answers

Call a method of a class from a function within the class itself? C ++

I created the "checkCase4" function in my Tree class and inside it I call 2 methods of the class itself (rotate_left and rotate_right). Function: void checkCase4(Node *child, Node *grand) { if (child == child->parent->right &&...
asked by 18.11.2017 / 18:39
2
answers

Installing and configuring the composer on my localhost

To use the local composer should I install it in the folder where my projects are located? In case C: / Users / Eu / Jobs ... And as there are several projects (sites), for each one I must have composer.json right? But what about the libr...
asked by 14.10.2017 / 14:36
0
answers

Error: Could not find or load main class [duplicate]

I already tried: Could not locate or load the main class file.java I'm starting to learn how to use java. Code: class main { public static void main (String[]args){ System.out.println("Ola mundo"); } }     
asked by 30.09.2017 / 20:41
2
answers

error: use of deleted function 'Fight: Fight ()'

Good afternoon, I'm trying several problems compiling the code below in code :: blocks with g ++ and I'd like to get help, thanks in advance. Main.cpp content: #include "Lutador.cpp" #include <iostream> #include <string> int ma...
asked by 23.09.2017 / 22:08
1
answer

Error "TS1005: ';' expected "when compiling class with TypeScript

I am studying TypeScript classes through official documentation: link . I used exactly the same sample code from the documentation: class Greeter { greeting: string; constructor(message: string) { this.greeting = message;...
asked by 11.10.2017 / 13:55