Most voted questions
150,413 questions
Sort by count of
-
4
votes2
answers54
viewsMark Previous Check (Parent) to Node
What I need is that when selected Item "Ball" which is a child node of check "1031-HUBCAP ...", the Father node is selected as well. Or Do not let select the child node if the parent node is not…
-
4
votes1
answer598
viewsConcatenate content from a String Array (JSON) generating a sentence
I’m trying to join the contents of an array of strings into one sentence, but I can only bring the whole content separated by commas. Detail, this array comes from a JSON file that is consumed by…
-
4
votes2
answers451
viewsValidate only one comma in input type ="text"
The problem I’m facing is that I can’t let the user type more than one comma into input (I am using ASP.NET with Behind in C#), but also I cannot use the input type="number" because the version of…
-
4
votes0
answers57
viewsEM algorithm error with while loop
Hello, my project needs the EM algorithm below, where are all the codes. The error is in the loop while, which is where the hope and maximization steps are. The error message is: "Error in while…
-
4
votes2
answers76
viewsclone, copy, changeable object on getter for security
In many articles and books it is cited that for security the correct is always deliver via getter a copy of mutable attributes. It can be a clone or a new instance containing the same values as your…
-
4
votes2
answers2021
viewsSum with dates and strtotime in PHP
In this small script of a service system, I save the beginning of the service (field DATETIME bank) and the estimated term of its end (field TIME at the bank). Look at: $d1 = "2019-09-23 12:30:00";…
-
4
votes1
answer155
viewsBar graph ggplot in R
I would like to know how to remove these letters a that appear in the bar chart caption in ggplot in R. I want you to have the bar values the same way it appears in the image, but when I run the…
-
4
votes1
answer3554
viewsHow to make a Bruteforce in Python?
I’m trying to create a Bruteforce program that can generate passwords with a size x of characters. The problem is that I can’t develop a logic for this. See my code below: chars = getAllChars() #…
-
4
votes2
answers95
viewsRemove specific set from the end of the regex array
GOAL I am trying to remove all elements of the array from the contents ":PM" with regex, but is returning me error. DETAILS The array will always contain ":PM", and it is only this part that I wish…
-
4
votes2
answers87
viewsSelect only 24 records per day
I need help to elaborate a query that selects only 24 records per day. For example: Day 1: 100 records Day 2: 50 records Day 3: 34 records I want to take only 24 of each day: 1, 2 and 3...(in this…
mysqlasked 5 years, 2 months ago Charles Fay 1,197 -
4
votes1
answer142
viewsProblem with System.Indexoutofrangeexception in C#
I need to create a class Marca and a Modelo, both related to cars, where model will know your brand and brand should know your models. Model Class: namespace AssocMatrizes.Model { class Modelo {…
-
4
votes1
answer47
viewsDoubt with scope js
I know that variable statements are all high for the whole of the scope, but I was left with a little doubt about this, the use of the word 'use Strict' avoids q declare variables like this a = 10…
javascriptasked 5 years, 2 months ago teste-90 181 -
4
votes5
answers583
viewsHow to sort json in php
I have the json example I’m using below: [ { "unidade": "124", "bloco": "Bloco B" }, { "unidade": "21", "bloco": "Bloco A" }, { "unidade": "94", "bloco": "Bloco A" }, { "unidade": "31", "bloco":…
-
4
votes1
answer147
viewsCreate vectors of new types in Julia
I can’t create vectors of new types in Juulia, they don’t work. The example program is this: # Meu tipo customizado struct Job id::Int64 order::Int64 time::Float64 end #Aqui eu crio o vetor v =…
-
4
votes2
answers305
viewsConcatenate URL(Search)
Guys, I’m not very good at logic, I’m more of the design area. My question is the following: I would like when the user typed in the search, it concatenates at the end of the url...for example:…
htmlasked 5 years, 2 months ago Thiago lourenço 89 -
4
votes2
answers242
viewsProblems with python code
I am practicing Tkinter and what I want is to create a button where the user chooses an image and then pass this image to perform another function with opencv. But when executing the code, the…
-
4
votes1
answer42
viewsTable does not add last request
Good morning guys, I’ll get straight to the point... I have this Success from my json where validating the following function: for(i=0; data.length>i ;i++) { let cliente = data[i].item; let…
-
4
votes5
answers3692
viewscreate "contain" function that says if an array contains a certain element and returns true
I tried several ways with the indexOf (is a requirement of the issue use), but I’m having a lot of difficulty because I’m learning everything over the internet. The code I’m trying to use does the…
-
4
votes2
answers256
viewsWhat is the relationship between software architecture and Patterns design?
What is the difference and similarities between software architecture and Pattern design? I did some research on Wikipedia and they looked very different: Model-View-Controller Architecture…
-
4
votes5
answers3418
viewsCheck the amount of negative elements in a JS array
I am initiating Javascript studies and I come across a question where I need to identify negative elements in an array and return the amount of these numbers. Remembering that there may be empty,…
-
4
votes1
answer36
viewsSave difference between arrays in a new array
The Script below returns the intersection between arrays within a new array, I wanted to save the difference, in case what does not belong, how to modify this script ? SCRIPT: values = [] a =…
pythonasked 5 years, 2 months ago Luis Henrique 697 -
4
votes3
answers1087
viewsHow do I convert Filelist to Array in Javascript?
In Javascript, when selecting return the selected values from a file input[type=file], it returns the values within a FileList. Example: document.querySelector('#files').addEventListener('change',…
javascriptasked 5 years, 2 months ago Wallace Maxters 102,340 -
4
votes1
answer112
viewsCSS, my class can inherit from Bootstrap
I have a system with old Look and Feel. The idea is to change to boorstrap. BUT with as little change as possible. Concrete example. The buttons use the fwButton css class. It would be possible to…
-
4
votes1
answer111
viewsCopy column data from one table to another
I have 2 tables "Orcamento" -> colunas ['id', 'cliente_id'] Essa tabela existe valores em 'cliente_id' "Ordem_servicos" -> colunas ['id', 'cliente_id', 'orcamento_id'] essa tabela não existe…
-
4
votes1
answer85
viewsWhat are the widgets?
I understand that the widgets would be the components available in the Android Studio palette, for example. Thus, the components of the palette below, not only those that are in the Widgets group…
-
4
votes1
answer129
viewsDoubt how to display the name of a dictionary key
It is possible to display the name of only one key of a dictionary? ex: notas_por_materias = { "Matematica" : 7, "Portugues" : 8, "Historia" : 10 } I can display a print showing the subject name and…
-
4
votes1
answer364
viewsMusic player with playlist
Eai, you guys! I’m trying to create a music player with playlist, but I’m not having much success, because when I click on some music the music player opens on another page and not on the main page…
-
4
votes2
answers316
viewsAutofocus for next field with Javascript + Maxlength
I’m trying to go to the next form field however the INPUTS are inside DIVS and I can’t make it work. It only works without DIVS, I’ve tried several combinations in the script and nothing. Script:…
javascriptasked 5 years, 2 months ago denis 366 -
4
votes3
answers214
viewsError: "Return should not be followed by an object expression"
I have this function that has a simple registration but is not registering My doubt would be on that return RES; which gives the error message below the code. //botao para cadastrar OS private void…
-
4
votes3
answers450
viewsComparison of Vector regardless of position
#include<stdio.h> main(){ int vetoresIguais= 0; int vetor[3] = {10,20,5}; int vetor1[3]= {20,50,15}; int i; int j; for(i = 0; i < 3; i++){ for(j = i; j < 3;j++){ if(vetor[i] ==…
casked 5 years, 2 months ago Daniel Soares 73 -
4
votes1
answer805
viewsHow can the use of 'const' constructors improve performance in Flutter?
In the documentation one of the recommendations to improve the performance of applications in Flutter says: Use constant widgets whenever possible and provide a const constructor... How to…
-
4
votes1
answer41
viewsLexically, what happens when we return a variable within a method that is declared in the function of that method?
Someone helps me understand the context of the execution of this code? myVar is declared in Global; myVar is declared in a(); b() is executed and myVar is declared in b(); myVar is not found in c():…
-
4
votes2
answers213
views -
4
votes3
answers144
viewsReturn last contributor who checked the car
I intend to return the last contributor who checked the car products before what you are currently checking. The car has to be the same and just in case there’s any product checked in the car like…
-
4
votes1
answer56
viewsHow do I take the position of a marker on a map and adc in a text field automatically each time I place this marker?
function onMapClick(e) { popup .setLatLng(e.latlng) .setContent("You clicked the map at " + e.latlng.toString()) .openOn(macarte); var marker= L.marker(e.latlng).addTo(macarte) }…
-
4
votes1
answer113
viewsHow should I assign strings in C#?
As far as I know, System.String no. NET (I don’t know if on other platforms the string type is also like this) is immutable, ie if I do: string a = "texto"; a = "outro texto"; Behind the scenes, by…
-
4
votes1
answer134
viewsNomenclature of tables with company name and system acronym
Is there any good reason to put the company name at the beginning of the table name? In almost every company I’ve gone through, it’s an adopted convention that you have to put the name of the…
-
4
votes1
answer59
viewsProblems to add element to HTML with jQuery
Everybody, good morning! All right ?! I’m going through a problem with jQuery and HTML in which I’m trying to add the elements when the mouse click is out of certain field[input]. This procedure…
-
4
votes1
answer117
viewsIs it bad practice to use "Guid" and "int" for the same bank?
In a project I’m developing I prioritize the use of Guid for PK because of the ease for me, but it has a table that would be more advantageous to use int. This is wrong?…
-
4
votes1
answer296
viewsImplementation Doubt in Object Orientation
I am implementing the whole book set exercise deitel 6th edition: Create the class IntegerSet. Each object IntegerSet can store integers in the range of 0 to 100. The set is represented by an array…
-
4
votes2
answers5329
viewsThe difference between req.params and req.query
I’m having a question about url parameters. Is the following, I know there’s a way I can rescue a parameter this way users/:id, Then I pick up with the req.params.id, but I saw a video that the guy…
node.jsasked 5 years, 2 months ago Edgar Silva 53 -
4
votes1
answer1240
viewsConvert Unix Timestamp to Datetime
I am trying to select the largest date from my table, however the dates are stored in Unix Timestamp format in a whole column type. I need to do this conversion because I need to calculate the…
-
4
votes1
answer6370
viewsHow to configure the Vscode terminal?
I am trying to configure my Vscode so that I can install libraries through the integrated terminal but I am having problems, it seems that Vscode does not "synchronize" with the standard terminal.…
-
4
votes2
answers2472
viewsFetch words between quotation marks through regular expression
The code below is returning me this error: Notice: Undefined offset: 1 Code: <?php $matches = array(); # Executa expressao $string1 = 'string(10) "CURITIBA" string(11) "SP"'; $pattern =…
-
4
votes1
answer149
viewsCURDATE() with day and time
In Mysql I have a table with field type DATETIME, with this value: 2019-08-01 15:30:00 For control, today is day 01/08/2019 15:05:00 I want to do a query that only shows if the date in the database…
-
4
votes1
answer87
viewsWhat happens to memory space after the use of a local variable?
At the end of the execution of a function its local variables are "destroyed", correct? The spaces in memory have any values, in C we can notice when ordering to print a variable that we did not…
-
4
votes0
answers1533
viewsAngular2+ ngx-Mask deleting value in dynamic mask change
I have a document field where the value can be CPF or CNPJ. <label for="cnpj" class="label-control"> <select class="labelSelect" name="tipoDoc" id="tipoDoc" [(ngModel)]="tipoDoc">…
-
4
votes1
answer3565
viewsHow to get the month in Portuguese using Carbon?
I’m having doubts on how to get the month’s value in full in Portuguese using the API of Carbon using the framework Laravel. Initially, I built this logic using PHP. if($data->month == 1){ $mes =…
-
4
votes1
answer200
viewsBash. What’s export for?
Looking at Bash scripts, I realized that variables can be created in the following ways: script1.sh: variable1=Ola export variable2="Ola de novo" Find out more about the difference between these two…
bashasked 5 years, 3 months ago Adolfo Correa 258 -
4
votes2
answers81
viewsHow to make the same event work several times in different elements?
I created a formula in which when clicking on a field its bottom edge changes color, and I used an onblur() so that the color returns to normal when clicking outside. However, I wanted this function…