Questions tagged as 'classes'

2
answers

Knowing how many ports are open in Java program

I have a program in Java to know how many ports are open but I'm not sure where to put the method to count the ports. Can I create a count method for open ports within the Porta class? package programa2; public class Programa2 {...
asked by 17.07.2016 / 21:44
2
answers

Revert a string and possibility of method addition on native objects in Python

In Python, we have method reverse within List . It reverses the order of a list . Example: [1, 2, 3].reverse() // [3, 2, 1] But this method is not present in a string. example (Python): myString = "The String" myS...
asked by 13.01.2015 / 16:07
2
answers

Using Flash Professional, how do I import classes from an ActionScript file?

In my project I have the ListLoader class, responsible for interpreting a list and uploading files described in it.   My goal is to be able to save this and other classes in a .as extension file and be able to import it into my current project a...
asked by 25.07.2014 / 17:24
4
answers

Changing CSS by class in JavaScript, is it possible?

I wonder if it is possible to make changes to the CSS of a class by JavaScript. We were able to get the divs by id with the document.getElementById("nomedaiddadiv"); command. Is there any command that does the same, but with the divs cl...
asked by 14.03.2018 / 18:55
1
answer

Stable vs. unstable ordering

What defines a stable sort algorithm? In this question I've been told a bit about stable and unstable ordering, but I still do not see the advantage of using an unstable one. In what cases can we use unstable ordering? Is it always prefe...
asked by 26.08.2018 / 23:01
1
answer

Doubt to create and work with class array in JAVA

I have a program with 2 classes. The player class that contains only the name attribute: public class player { String name; } And I have the Main class that has the function below and the same call in main Public class Principal{ public s...
asked by 08.06.2018 / 06:43
2
answers

What is the class to draw circle on Android?

I know the%% class for rectangle and for circle private Rect retangulo = new Rect(); What is the class to draw circle on Android?     
asked by 11.02.2017 / 01:14
2
answers

Overloading C ++ operators, is the auxiliary variable necessary in this case?

I'm studying through the book Introduction to Object Oriented Programming with C ++ (Antonio Mendes da Silva Filho), and I implemented an example of it as follows: #include <iostream> using namespace std; class Contador{ public:...
asked by 03.01.2017 / 16:17
1
answer

How to get variable value inside a function in a Class for another function?

I have a class for Image Upload, and I want to get the value of a variable within a function called salvar() ! I want to create a function called getNome() to get the name of the image with extension. But the variable with...
asked by 16.11.2016 / 04:52
1
answer

What is the difference between class implementation in C ++ and PHP?

I'm currently working on PHP and realized that at the time of implementing classes I can not just instantiate and then implement below the class using the :: scope selector. Example: class Lista{ public: Lista(){ first = last...
asked by 11.03.2015 / 19:41