Posts by Arthur Siqueira • 1,609 points
92 posts
-
-2
votes2
answers93
viewsQ: How to allow null values in a field that was originally NOT NULL in SQL?
I have a table created this way: CREATE TABLE usuarios ( id INT NOT NULL AUTO_INCREMENT, nome VARCHAR(64) NOT NULL, email VARCHAR(255) NOT NULL, PRIMARY KEY(id) ); But I want to change the field…
-
0
votes1
answer55
viewsQ: DOSBOX does not recognize some batch script commands, how to resolve?
I was making a simple script in batchand testing with Windows 10 CMD, and it ran normally. However, when trying to run the same script with DOSBOX, the system gave error in the use of GOTO, yielding…
-
1
votes1
answer181
viewsQ: How to convert a character to its corresponding hexadecimal in the ASCII Ruby table?
I am using Ruby and have the string "AwX" in hexadecimal. I can write to the screen using the following command: puts "\x41\x77\x58" But I want to do the reverse: I have a string "AwX", but I want…
-
2
votes2
answers2446
viewsA: Error code Parsing error: Unexpected token, expected ","?
In short, you’re trying to create an object and pass it the property of another object. That doesn’t make much sense, because it will be an object with an empty property, and you’re trying to…
-
1
votes1
answer97
viewsQ: Jdesktoppane does not remove closed screen rendering, how to proceed?
I created a basic screen with Netbeans that has a menu and a JDesktopPane that opens the JInternalFrame menu-referenced: As well as a function to open these JInternalFrame: private void…
-
0
votes2
answers57
viewsA: how to last values of a variable in several different functions, in javascript,
I would change the functions to directly receive the value, in addition to changing a lot of other things in your code: function calcularSoma(valor1, valor2) { let soma = valor1 + valor2; return…
-
1
votes1
answer205
viewsQ: How to recover data from Angular Route component?
I saw in the documentation Angular that it is possible to recover data stored in the property date (receiving an object) from a route. I have, in this case an application with the following routes:…
-
0
votes1
answer25
viewsQ: How to force Reactiveforms to validate only after trying to send the data?
I have a app simple where I did some tests with the Reactive forms of Angular, and I came across the following situation: I put a console.log in the validation function, and I realized that when…
-
1
votes1
answer86
viewsA: HM-10 does not return AT commands
You say you’re not using null at no time, but that doesn’t mean that you’re not RECEIVING null: if there is an error in reading the serial, it can return null, 0 or something bizarre. Maybe the real…
-
0
votes0
answers81
viewsQ: How to force element state of the HTML template?
Using the CSS framework Materialize, I came across the following situation. I own some fields <input> with <label> as the example: <label for="name">Nome</label> <input…
-
6
votes1
answer1809
viewsQ: How to concatenate object properties with Javascript?
I have two objects in Javascript, with the following data: const objeto1 = { prop1: 'a', prop2: 'b', prop3: 'c' } const objeto2 = { prop4: 'd', prop5: 'e', prop6: 'f' } I wanted to take all these…
-
0
votes1
answer563
viewsQ: What is the <Frameset> tag for?
I was reading this topic on the Mozilla page, and a piece caught my eye: Returns the element <body> or the <frameset> of the current document, or null if none of these elements exists.…
-
1
votes2
answers440
viewsA: How to do a subtraction operation between two columns of a dataframe and then add the result with another column?
the method list pop.() remove an object from the last position of the list and return it to the user. As presented, I believe the list has only two elements. try to access using brackets: y =…
pythonanswered Arthur Siqueira 1,609 -
6
votes2
answers1052
viewsA: What is the difference between foreach and map in Javascript?
According to the mozilla website: The method map() invokes the function callback passed by argument to each Array element and returns a new Array as a result. [...] The map method does not modify…
-
3
votes2
answers587
viewsA: What’s the difference between command, instruction and code?
According to the Wikipedia: A machine code program consists of a sequence of bytes that correspond to instructions to be executed by the processor. [...] A machine code instruction consists of a…
terminologyanswered Arthur Siqueira 1,609 -
1
votes1
answer1679
viewsQ: How to call functions of the parent component in the child component?
I have a child component staying at the father’s, as follows: Parent component: @Component({ selector: 'app-componente-pai', template: ` <p id="elemento">componente pai</p>…
-
0
votes1
answer106
viewsA: Do you have a way to Implement a C Executable for Mobile?
In short, you want to convert C to Android, that’s it? We have some success stories here, here, here and here. If we summarize the answer, we can only say that you will have to find a C/C++ compiler…
-
4
votes1
answer214
viewsQ: How to document CSS?
I was documenting the typescript of my Angular project using Jsdoc basing myself in this question, and I was left with the following doubt. How can I document my CSS classes and components of my…
-
0
votes1
answer83
viewsQ: How to store a variable in a specific chunk of the template?
I’m accessing data from an object: <div *ngFor="let objeto of objetos"> <div [ngClass]="{'minha-classe': !!pegaDados(objeto.id).isValido}"> {{ pegaDados(objeto.id).nome }} </div>…
angularasked Arthur Siqueira 1,609 -
0
votes1
answer529
viewsA: Open a browser and run a javascript directly on the console through another programming language
The answer is: depends on... If you want to simply run a Javascript script, you have to find a way to create an HTML file that has a tag <script> directed to the desired script, and then run…
-
2
votes2
answers238
viewsQ: How to compare only the date with Date objects?
I want to create a function group that compares dates in Typescript. So far I have the following: function amanhaOuDepois(date: Date): boolean{ if(date > (new Date())) return true; return false;…
-
0
votes1
answer155
viewsA: Dropdown materialize does not recognize click on smartphone in Chrome browser
Try to do this: Html: <div> <!-- Dropdown Trigger --> <div class='btn'> <a id="dropdown-trigger" data-target="status" onclick="abreDropdown"> Status </a> </div>…
-
1
votes1
answer912
viewsQ: How much reverse engineering is a crime?
Reverse engineering is the practice of opening a new technology and seeing how it works "under the table" (not necessarily producing some profitable content with this knowledge). But I see, in my…
-
15
votes1
answer127
viewsQ: Is there already a structured language for quantum processors?
Quantum processors have been in a long development process for many years. However, we "mere mortals" still do not have large-scale access to these powerful devices (something similar to what…
-
2
votes1
answer377
viewsQ: How to align text with the center of the div with Materialize?
I have a div with a text and an image: This div has a block of text that should be aligned with the center. To make the alignment, I used the class .valign-wrapper, that worked perfectly with the…
-
1
votes1
answer38
viewsA: How to display a typescript number with a specific formatting?
Following @Leandrade’s cue, I used the method Number.prototype.toLocaleString: escreverNaTela(){ let mensagem = this.montante.toLocaleString('pt-BR', {style: 'currency',currency: 'BRL'});…
typescriptanswered Arthur Siqueira 1,609 -
0
votes1
answer38
viewsQ: How to display a typescript number with a specific formatting?
I own a property montante in the object below, and I am presenting in the function escreverNaTela(): class Objeto{ constructor(private montante: number){} escreverNaTela(){ let mensagem = 'R$ ' +…
typescriptasked Arthur Siqueira 1,609 -
2
votes1
answer42
viewsQ: How to get the last n elements of an Observable?
I own a service that is receiving an array objeto API with the function below: getUltimosDados(n: number): Observable<Objeto[]>{ return this.httpClient.get<Objeto[]>(this.enderecoDaApi +…
-
0
votes2
answers897
viewsQ: How do I use the properties of a parent element in the child’s CSS?
I have a <div> with fixed values, and it has a <ul> internally, as shown below: <div id="personalizado"> <ul> <li>item</li>…
-
0
votes1
answer458
viewsQ: How to catch the length of a *ngFor?
I own a property elemento$ inside my component, whose type is Observable<Objeto[]>. I used the directive *ngFor to access the data individually and show them on the screen: <ul> <li…
angularasked Arthur Siqueira 1,609 -
1
votes1
answer89
viewsA: Js Chart does not work,saying variable has not been declared
The big mistake I realize is the lack of the tag <script> to the Chartjs. Step by step for proper functioning: Download the Chartjs Enter the tag script to the address where you saved the…
-
0
votes4
answers115
viewsA: Algorithm execution error in pascal
Replace the and. which appears at the end by end.: Program Crianca_Esperanca ; var D: integer; valor: real; Begin writeln('--------------------------------'); writeln(' CRIANÇA ESPERANÇA ');…
pascalanswered Arthur Siqueira 1,609 -
1
votes0
answers74
viewsQ: What are the differences between IBM COBOL and Opencobol compilers?
When starting at COBOL I was presented two compilers: the official of IBM, or IBM COBOL and the Opencobol. Knowing that IBM COBOL has been used in the industry for years, are there significant…
cobolasked Arthur Siqueira 1,609 -
13
votes3
answers690
viewsQ: What is a mainframe?
I was reading some old questions, and I came across a topic on COBOL where he talked about mainframes. What is a mainframe, and what is the difference between a mainframe and a server as we know it…
-
-2
votes1
answer405
viewsQ: How to make an element occupy the entire height of the div?
I have an element <aside>, and I want him to occupy all the height of <div> where it is inserted. However, I don’t know how to set the height relative to another element. How can I set…
-
3
votes1
answer59
viewsA: What is Fog Computing?
Basically, it is when we have several devices accessing the network in "peripheral" positions, without being large consumers or data emitters. An example is intelligent temperature controllers,…
-
0
votes2
answers2782
viewsQ: How to catch the children of an element with Javascript?
I own a <div> with several children, as shown below: <div id="minha-div> <span class="filhos-1" id="filho-1"><!-- outros aqui --></span> <p class="filhos-2"…
-
0
votes2
answers147
viewsQ: How to perform a query within a nodeList?
Using pure Javascript, I performed the following query: let elems = document.querySelectorAll("a.menu-item, span.menu-item"); After using the items of this nodeList, i needed to use other elements…
-
1
votes1
answer385
viewsQ: How to remove property inherited by the component?
When placing a side navigation icon, I noticed that a piece of it "leaked" out of the expected, which made it behave visually strange in the animation. I put a background-color: red for easy…
-
-1
votes1
answer104
viewsQ: How to Make a Field Mask in HTML with Pure Javascript?
I was developing a simple project, and I needed to use masks in a certain form. I opted, at that time, for the use of JQuery with the library Jquery Mask Plugin. $(document).ready(function(){…
-
12
votes4
answers1090
viewsQ: How to create an array filled with values from 0 to n in javascript?
I need to create an array that is filled with the values of 0 a n, as if using the function range(n), Python3, but using Javascript features. I thought I’d create a function: function…
-
2
votes1
answer342
viewsQ: Select is not initialized with default value
I created a component that has a type field <select> and receives a property [modelo] as input: if the template is null, the form is initialized empty; if it has content, it is initialized for…
-
0
votes1
answer39
viewsQ: Angular - how to pass given to component differently when clicking on different buttons?
I have a modal with a form on a page with a list of registered items: <div class="collection"> <div class="collection-item row" *ngFor="let data of data$ | async"> <div class="col…
-
0
votes1
answer111
viewsA: How to initialize two or more different date selectors in a form with Materialize?
I managed to make it work by changing the kind of event, of (click) for (focus): <div class="input-field"> <input id="enter_at" type="text" placeholder="dd/mm/yyyy"…
-
0
votes1
answer111
viewsQ: How to initialize two or more different date selectors in a form with Materialize?
After initializing a datepicker of Materialize CSS successfully, I realized I would need two datepickers in the same form. The problem is that I can only initialize one datepicker: HTML: <form…
-
8
votes2
answers182
viewsA: can I declare a variable in javascript so $variable?
Briefly, you can, as long as you don’t need protection. Javascript variables must meet the following requirements: shall be composed of letters, numbers, dollar ($) or underscore (_) should not…
-
2
votes2
answers253
viewsQ: Abnormal behavior when taking data from a Formgroup with Angular
I was finishing a form using Angular and Materialize and noticed that I was not receiving the data from fields generated with "datepicker" of Materialize, even if they have valid text. HTML:…
-
0
votes1
answer121
viewsQ: Input value property does not work with Angular
I’m having some problems with the property value of a text field: <div class="container"> <form class="row"> <div class="col s4 input-field"> <input id="campo" type="text"…
-
3
votes1
answer114
viewsQ: How to transform string into Date object with Typescript?
I am receiving from the HTML form a string containing the date selected in the pattern dd/mm/yyyy, and want to create an object Date from that string. The problem is that the Date only accepts…
-
3
votes2
answers1134
viewsQ: How to get an Observable from an array item?
Working with Observable and Rxjs, I came across the following problem. At a certain point in the code, my access to the bank is done as follows: getExemplo(id: number):Observable<Exemplo>{…