Posts by wldomiciano • 439 points
12 posts
-
1
votes1
answer743
viewsA: Angular NG-FOR and NG-IF
One possibility would be to first separate your array by time. Your component would look like this: import { Component } from '@angular/core'; @Component({ selector: 'pl-access-full', templateUrl:…
-
0
votes1
answer50
viewsA: JS variable does not save value
There are two things you can do: Change the type of the submit for button. That way he’d be like this: <input type="button" id="btn" value="ok"> Change your function to look like this:…
-
0
votes2
answers45
viewsA: Exception with variables
You would do so: #include <iostream> using namespace std; int main() { int x = 0; try { cin >> x; if (x == 0) throw "Tipo errado"; } catch(char const* msg) { cout << msg <<…
-
0
votes1
answer558
viewsA: How to split a 3-letter string
You can try importing the module re. import re # string de entrada string = "G70H74L10M90" # quebra a string, mas inclui strings vazias lista = re.split("(\S{3})", string) # remove strings vazias,…
pythonanswered wldomiciano 439 -
2
votes3
answers209
viewsA: Can the "main()" method be overwritten or overwritten?
No. The main method is the starting point of its application. If you overload it, it means that its signature will change and it will be treated as any method and your program cannot be run. Your…
-
3
votes2
answers196
viewsA: Do ( Casting ) of the return of Malloc(), Calloc() and Realloc() - C
On the question of words cast and casting, C specification uses two words with different meanings. A draft of the latest specification can be found in the link below.…
-
2
votes2
answers80
viewsA: Reading strings and saving them in arrays
I will leave my contribution more as an alternative, because we do not know if your teacher will accept the trick with split(). I used your idea of imposing a limit based on the size of the array.…
javaanswered wldomiciano 439 -
8
votes2
answers293
viewsA: Should different states of an HTML element be represented in different properties?
I am not a UX professional, so it is as a personal, user opinion that I say that your concern is extremely relevant and yes, it is important to make visually clear the states of the objects. In your…
uxanswered wldomiciano 439 -
2
votes1
answer190
viewsA: Read a txt file and store content in lists
To have 2 lists, each containing the numbers of a column the code below can help. int main() { std::ifstream file{"text.txt"}; std::vector<std::string> columnA; std::vector<std::string>…
-
4
votes1
answer62
viewsA: What’s wrong with my dynamic stack?
Is because you used the function init() before it is defined. Put her setting before the function main or leave it where it is and just add her prototype before the main. void init(Pilha *p); /* ...…
canswered wldomiciano 439 -
2
votes2
answers760
viewsA: Instantiate class with Static method
We cannot modify the signature of the method Main, because it is special. It marks the starting point and automatically called when we run our program. See more here. Static methods do not require…
-
1
votes3
answers213
viewsA: Why don’t I need to pass parameters to that function?
First thing to consider is that in Javascript functions are first class objects, which means that they can be assigned to variables and passed as argument to other functions in the same way as you…