Posts by Leonardo Vinicius • 335 points
26 posts
-
1
votes1
answer101
viewsQ: Transforming object array into a specific data structure
I have some information saved in the database that I would like to display in a structure defined by me. When making a SELECT * FROM table an array of information is returned, as shown below. I…
-
0
votes1
answer985
viewsQ: Convert Javascript array to a Javascript object?
The array Javascript below is the result of a query Mysql: json-database.json [ { "id": 1, "node_name": "SP2 - Virtual Private Serve Product", "children_name": "Virtual Private Server CPU",…
-
1
votes0
answers81
viewsQ: How to use Mysql’s SELECT + WHERE dynamically?
I need to search the Mysql database, however I may have one or more filters (maximum 6) in the WHERE clause. Example: SELECT * FROM 'table_name' WHERE coluna_1 = 'valor_1' or SELECT * FROM…
-
2
votes2
answers548
viewsQ: How to use Mysql SELECT + WHERE + IN with Javascript array?
How can I perform the following SQL query by passing a Javascript string array? SQL query performed in Mysql - status OK: SELECT * FROM tab_price_list AS PL WHERE PL.PartNumber IN ('HDW00008.ELEM',…
-
1
votes1
answer51
viewsQ: Delete key if all values are empty
I have an array of Javascript objects and wanted to check if certain keys/columns have the value "" (empty). If you delete this key from my Javascript object array, otherwise keep it the same.…
-
0
votes1
answer743
viewsQ: Angular NG-FOR and NG-IF
I am trying to create a sidebar with dynamic links, but there is an error. Component. import { Component, OnInit } from '@angular/core'; @Component({ selector: 'pl-access-full', templateUrl:…
-
-2
votes1
answer1333
viewsQ: Very slow docker in Windows 10
I recently installed Docker for Windows on my laptop, however it is very slow. I own a notebook DELL Latitude 7490 with 8gb RAM, 240gb SSD and intel processor I5 8° generation - Windows 10…
-
-1
votes1
answer181
viewsQ: How to generate a Javascript Object Array dynamically
I want to "assemble" a JSON object array with data from the database, but some challenges have arisen. I have the following selection field with a method that is called every time the value is…
-
0
votes1
answer82
viewsQ: How to read the following code in python?
I found a code in Python, but I’m not getting how it works. from itertools import permutations n = 8 cols = range(n) contador = 0 for vec in permutations(cols): if n == len(set(vec[i]+i for i in…
-
1
votes1
answer37
viewsQ: Control the data that Mysql sends to Nodejs
I developed a Project that "clones" a proposal and its products, in addition to making some updates, but the return that this procedure returns to my Nodejs is not very useful to me. It is possible…
-
0
votes0
answers47
viewsQ: Check if one or more server(s) AD is(not) active(s)
It is possible, through Javascript, to verify that an AD server is active? In my company there are 4 servers and I would like to know which is active to make an authentication via AD.
-
4
votes2
answers613
viewsQ: Nodejs - Mysql Error: Too Many Connections
I recently made a refactor of my code to adopt the MVC standard, because it was very disorganized! However, an error called "Too Many Connections" started to appear. This error causes my Node-mysql…
-
3
votes1
answer54
viewsQ: Database is not connecting!
My database isn’t connecting. When doing a refctoring of my code following the MVC standard the database stopped working. Follow link with the test files:…
-
-1
votes2
answers542
viewsQ: Insert multiple records into Mysql using NODEJS
How do I add multiple records at once in Mysql by passing an array of, for example, products? HTTP-POST request, where products is an array with an x number of products. FRONT-END…
-
0
votes1
answer70
viewsQ: Function running before my request response
In a modal I have a form with data that can be edited. If the user confirms the update the data is updated and then it will be forwarding the new page. But on this new page the information that…
-
2
votes2
answers485
viewsQ: INSERT INTO with Mysql filter
I am trying to create an INSERT INTO in an X table by making a filter in table Y, but I get a syntax error. I’ve researched what could be wrong, but not found. INSERT INTO products ( SELECT * FROM…
-
1
votes0
answers65
viewsQ: Angular 6 - Can Deactivate Guard is not working
I’m having trouble getting Can Deactivate to work on my app. In the form.component.html file I have the following code: <div class="form-group"> <label for="quoteType">Quote…
-
1
votes3
answers1246
viewsQ: Regular expression for 2 specific cases
I wanted two regexp to standardize a field. Follows the two values I need a regular expression. 1-167106651950 A number from 0 to 9, a mandatory dash and 12 more numbers from 0 to 9. SP4:01:342310…
-
1
votes2
answers1067
viewsQ: Bootstrap 4 Tooltip does not work properly at Angular 6
Below is the implementation of bootstrap in my application (angular.json) "styles": [ "src/styles.css", "./node_modules/bootstrap/dist/css/bootstrap.min.css" ], "scripts": […
-
1
votes2
answers2064
viewsQ: How to perform a function on one component and affect another component - Angular 6
I would like to know how I can through one component affect another component at angular 6. These components are not father and son. They are distinct. <app-navegacao></app-navegacao>…
-
0
votes1
answer902
viewsQ: How to pick up the text of a select with formBuilder? - Angular 6
I would like to take the value of the text and not the value of the select. <div class="form-group col-md-3"> <label for="ProductName">Product Name</label> <select…
-
-1
votes1
answer505
viewsQ: Doubt routerLink and route.navigate(<route I want>)?
'Cause when I use the routerLink the destination tab executes the commands inside the ngOnInit() and when I use the this.route.navigate([<rota de acesso>]) is not executed? I wonder if you…
-
1
votes1
answer4666
viewsQ: HTTP (Post) Bad Request 400 - How to resolve?
I am making a pole, but my server is not emitting an error(400). Below follows the server code. const express = require('express'); const app = express(); const bodyParser = require('body-parser');…
-
0
votes0
answers104
viewsQ: My HTTP(GET) request is not running on ngOnInit() - Angular 6
I have a CRUD at Angular 6 that connects to Node and mysql. When I access the homepage the getQuotes() function loads all the data I need. When I access the screen to update a record and perform…
-
-2
votes2
answers3399
viewsQ: Add a new literal object to an object array!
I would like to add a new item to my object array through a method, but I don’t know how to do it. public products: Array<Object> = [ {prodName: 'product 1', prodElement: 'element 1',…
-
-1
votes3
answers885
viewsQ: SQL server connection with angular 4 +
I would like to know how to make a connection to the SQL server database through Angular 4. I needed to know the procedures or an explanatory video. I’m a beginner in angular.