All Questions

3
answers

Why do we have to use the self attribute as an argument in methods?

I watched a video lesson where it is said that every method is required to pass the self parameter in the method definition, as in the example below: class Complex(object): def __init__(self, real, imag): self._real = real...
asked on 10.01.2017 / 19:44
4
answers

At what stage of a project should the platform be chosen?

When a project is designed (i.e. a need is identified, and you decide to develop a computerized solution for it) one of the first things the customer asks is: on what platform should the software be developed? In what programming language? As we...
asked on 20.02.2014 / 21:56
2
answers

Intrinsic function to convert numeric to string

I'm trying to find out if there is any intrinsic COBOL function to convert a numeric date to string without having to use the REDEFINES clause: ( PIC S9(04) COMP) If yes, is it more costly to use REDEFINES ?     
asked on 30.01.2014 / 13:39
3
answers

Would it be necessary to have another programming language to create the assembler?

Would it be necessary to have another programming language to create the assembler? If so, which one? If not, what could you do to get started? I know that according to the years, just after the punched cards, came the assembly language. But,...
asked on 22.05.2017 / 06:38
3
answers

How to calculate perfect numbers quickly?

I'm trying to perform an exercise to show the perfect numbers present within a given range, but I can only do this to the perfect fourth number. If I increase the range, it takes a long time and does not respond: def perfeito(n_max): lista...
asked on 24.09.2018 / 19:56
3
answers

How to organize a project in node

I would like some idea of how I could organize a project in node.js, currently the files look like this: - router.js - controller L controllerUser.js L controllerAuth.js L ... - service L mongodbConnection.js L serviceUser....
asked on 03.06.2018 / 04:22
2
answers

Matplotlib + Latex: Writing text in the axes in Portuguese

From the beginning, the versions I have are: Ipython: 1.1.0 Matplotlib: 1.3.1 Latex: pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012 / Debian) OS: Ubuntu 12.04 I want to plot what is below, in an Ipython-Notebook session # Using the...
asked on 12.12.2013 / 13:08
1
answer

What is the difference in Kotlin between var and val?

Learning Kotlin I came across the following question, according to the documentation:    Classes in Kotlin can have properties. These can be declared as   mutable, using the var keyword or read-only using the val keyword. Classes in Kotl...
asked on 27.07.2017 / 17:40
2
answers

What is the difference between htmlspecialchars () and htmlentities ()?

I once had to use htmlentities () to solve a certain coding situation (the words with an accent were not with the characters) and I saw that there was this htmlspecialchars (). In Php.net, I saw the following definitions:    htmlentities -...
asked on 18.01.2016 / 16:57
2
answers

How to make the use-instructions screen when starting an app

When we download an app, often when it launches it displays a screen (or several) of the app's own usage instructions ?! I would like to know how to do that. If you can not put some code or tutorial address, at least the correct name so you can...
asked on 07.08.2015 / 19:05