Most voted questions
150,413 questions
Sort by count of
-
4
votes1
answer275
viewsError in java second degree equation algorithm
Good morning, could someone help me understand why my code is not doing the correct processing and why my conditional deviation is wrong? public void cap4ex3e(){ double a,b,c,delta,x1,x2; Scanner in…
-
4
votes0
answers771
viewsfatal: does not appear to be a git Repository
I’m trying to set up a private Git repository on shared hosting via SSH. I do the whole process of configuring the keys etc,e giving git init in the repository but when I put git remote add deploy…
-
4
votes1
answer101
views -
4
votes1
answer239
viewsDownload File via API + Lumen + Maatwebsite Excel
I have an Angular 5 application that requests the backend made in Lumen 5.6, in this backend, I have a function that creates an excel file, with the Maatwebsite Excel library, for download. However…
-
4
votes1
answer167
viewsCan an employee be an individual?
Was recommended, in this question, maintain the relationship between Pessoa Física and Funcionário as generalization (Employee extends Physical Person). I do not understand why it is not in this…
-
4
votes2
answers314
viewsNavigation Drawer customized and colorful
Hello, what I wanted to do was to be able to put colorful icons in the navigation, as I can do this? The images I have in my project are colorful but in navigation they only turn gray like this. I…
-
4
votes2
answers95
viewsWhat is the best way to define access to the methods of a class I want to use for unit testing?
I have a class Runnable, that does a lot of things in my system. When I created it, I didn’t want to instantiate its methods out of her scope. That’s why I wrote the methods like protected. Now, I’m…
-
4
votes1
answer904
viewsWhat would be the equivalent of find for lists in python?
What would be the equivalent of find used in strings to use in lists? For example, if it is a=['a','b','c'], as return to position 1 of 'b'?
-
4
votes3
answers459
viewsStore values in matrices
I am using codeblocks, I am beginner in programming, starting with C, on account of college. The error is this: In the part of the code where it stores the value of the average of the student, only…
-
4
votes2
answers128
viewsQuery conditional ordering in Mysql
I have a table called comentarios, formed by the columns: id, descricao, criado_em and comentario_pai, how it is possible to see in the photo. I need to create a query, in which the answers are…
-
4
votes1
answer101
viewsGet the least significant bit of an integer in Java
I’m trying to do a bit manipulation in java, but I have a certain problem. I’m storing any number in an int and trying to get the least significant bit of it, but I don’t know how to do that. For…
-
4
votes1
answer326
viewsReduce grammars in the Chomsky hierarchy
I know from Chomsky’s hierarchy, all regular grammar is also a context-free grammar. Similarly, I know that a context-free grammar is also a context-sensitive grammar and etc. I’d like to know how…
-
4
votes3
answers124
viewsHow can I use or name constants for response type fields?
There are situations in which we have fields that represent a type of response, whether boolean responses sim and não, S and N or with multiple responses like the status of something. For example…
-
4
votes1
answer1080
viewsHow to allow only numbers in a javascript prompt?
I want me to be able to put only numbers when inserting something in the prompt. var count = prompt("Teste"); How can I do it?
-
4
votes1
answer250
viewsAdd 1 minute to the hour
I have a problem solving an exercise. It may be easy but I’m not finding the right solution. I have the following class Time public final class Time { private final int hours; private final int…
-
4
votes1
answer455
viewsHow did the command-line interface (CLI) come about and what was this need?
If we look back about 10 years, I don’t remember having this feature for developing applications through CLI (command line interface) on Windows operating systems. Examples used today: Ionic CLI,…
-
4
votes2
answers58
viewsHow can I create a regular expression that accepts a certain number at most once
I am learning to use Regex and I would like to know if I can make it accept at most a number 2 in some sequence (can contain letters or numbers) Ex. "sskfdam09471928" Approved "asldk02210920139"…
-
4
votes2
answers184
viewsI cannot format date
I’m trying to format one date to look like another, the first comes straight from the bank but the other needs to be in the same format. Calendar cal = Calendar.getInstance(); SimpleDateFormat df =…
-
4
votes6
answers2089
viewsCheck if a String contains two words
I have a problem with this exercise here: Write a class that validates data (Validacao), with a method to validate a given name (ehNomeValido(nome)). The method must return true pass the following…
-
4
votes5
answers286
viewsRegex to capture dimensions of a product with unit of measure
I have a python function to capture the dimensions of a product in Lxcxa format but I can’t make it work for cases where the unit of measure between the values appears, regex is this one: def…
-
4
votes1
answer102
viewsDoubts about branchs structure and repositories
I’m starting to study and use DVCS (versioning programs: GIT, Mercurial). I tried to reassemble a folder structure using branches but the result was not as expected. I wanted to understand how the…
gitasked 6 years, 4 months ago hyperpixel 389 -
4
votes1
answer95
viewsHow to use dplyr within a function?
Let’s say I wanted to create a function that internally uses some functions of dplyr or any package from tidyverse using this kind of syntax. For illustration purposes: exemplo <- function(df,…
-
4
votes1
answer216
viewsIs it good practice to use virtual functions in non-derivative classes?
When I was learning C++ I read in a book in the polymorphism chapter about virtual functions that the virtual keyword was meant to indicate that that function was going to be overwritten in another…
c++asked 6 years, 4 months ago Samuel Ives 1,676 -
4
votes1
answer181
viewsHow to replace each occurrence of a regular expression match with a different value?
I have a text (html code) with several images in standard HTML format: <img src="X" atributos /> I need the value of the attribute src is replaced by the identifier CID:# where # is a unique…
-
4
votes1
answer1006
viewsOverload method is polymorphism?
I’m having trouble understanding the concept of polymorphism in Java, I read two articles of the same portal now and I was more confused, because for my interpretation they contradict each other:…
-
4
votes1
answer664
viewsWeather API - Cities with accent give error
I have the following Endpoint in which you receive in the URI the name of the city and the state: @RequestMapping(value= "/clima/{nomeCidade}/{ufCidade}/agora", method = {RequestMethod.GET,…
-
4
votes2
answers475
viewsWhy in Python 0.03 % 0.01 = 0.009999999999998 and not 0?
>>> 0.03 % 0.01 0.009999999999999998 Why gives this result, the rest of the division being 0? And also, instead of 3, give: >>> 0.03 // 0.01 2.0…
-
4
votes1
answer1856
viewsHow to take Dunnett’s test on R?
Assuming that I performed the ANOVA test on my data and gave significantly different, I would like to perform the Dunnett test precisely to compare my treatments with the control group. I should use…
-
4
votes1
answer52
viewsPush a tag to the remote
I need to push to my remote repository a single tag, v0.0.1. I know there’s a git push --tags, but this command, as per your documentation, pushes all tags. What is the command to push a single tag…
gitasked 6 years, 4 months ago Jefferson Quesado 22,370 -
4
votes5
answers16554
viewsHow to change all selected words at once in Vscode
Hello would like to know how to change all words at once in the visual studio code thank you
visual-studio-codeasked 6 years, 4 months ago André Tripode Colognesi 157 -
4
votes1
answer748
viewsHow to extract content from the Web (Web scraping) with C#?
I recently learned how to make web scraping and I got it on some sites, but others I can’t. I noticed that in some of the ones I can’t get there’s an "#", what that means? Let me give you an example…
-
4
votes2
answers1017
viewsHow to insert a chart caption with two axes y in r?
As I insert the caption in this chart, like the bar would be the gross total and the line the net total? lines = 'Mes Acid Obt Jan 1450 102 Fev 1447 86 Mar 1461 87 Abr 1356 61 Mai 1398 80 Jun 1115…
-
4
votes2
answers487
viewsFilter array by first letter
I have an array of objects and I need to separate them by the letters of the alphabet, so I need to limit the items by the corresponding letter. Example: A - Aston Martin B - Bugatti…
-
4
votes2
answers267
viewsBehaviour of malloc(1) in C
If I use char *char_commandout = (char *) malloc(1);, the allocated byte will store the " 0" at position 0 of the vector or will allocate a space for the value I want to store (at position 0) and…
-
4
votes2
answers940
viewsStatus Exited (0) after a Docker-Compose up command
I’m starting to work with Docker now, I understand the concepts of images and containers but I’m having a problem running the command: $ docker-compose up I created a Dockerfile at the root of my…
-
4
votes1
answer112
viewsLogic of these bit-by-bit operations
It’s been a long time since I wanted to start in the world of emulators, I decided to stop trying to make an emulator of a complex system and start with a very basic one, a CHIP-8 emulator, which is…
-
4
votes1
answer137
viewsWorking Dynamic Selectors (Or Multiple Selectors) in Jquery
I have a Javascript code (Jquery) that takes characters from a DIV and plays this result for another DIV. For the DIV where I take the characters I created a function that adds a class dynamically,…
-
4
votes1
answer216
viewsProblem with the sum of 10 numbers with for
I have a doubt in an algorithm that sums 10 numbers with the repetition command for. soma_numero := soma_numero + idade; When I declare the soma_numero as 0 before the for the algorithm runs…
-
4
votes0
answers721
viewsFastreport 5.6.2 - Why didn’t you generate . bpl files
I performed the Procedures to install the Fastreport in the Delphi 10.2 I compile the sources of Fastreport but the files .bpl does not appear in the Folder. What must be done? I followed those…
-
4
votes1
answer6892
viewsHow to save figure in Python with matplotlib?
Any figure I try to save in Jupyter Notebook saves a blank file, what kind of error might be occurring as it does not accuse any error? import numpy as np import matplotlib.pyplot as plt data1 =…
-
4
votes2
answers926
viewsHow to reference the webservices of eSocial by Visual Studio?
I already followed the instructions of this question read, reread, and repeated the tutorial by Pedro Gaspar. And I can’t get eSocial webservices referenced by Visual Studio. What I’ve done so far…
-
4
votes1
answer461
viewsUpdate cart status without leaving the page | Woocommerce 3.4+
<?php global $woocommerce; if ( sizeof( WC()->cart->get_cart() ) < 1 ) { ?> <div style="width: 25%;" class="footer-section <?php echo esc_html($woo);?>"> <a…
-
4
votes1
answer137
viewsDestructuring of Arrays
I’m lost, where is the logic of the code? const contatos = [ { nome: 'Alex Júnior', numero: '1234-5678' }, { nome: 'Carolina Moya', numero: '1234-6789' }, { nome: 'Fernando Jorge', numero:…
javascriptasked 6 years, 4 months ago user106463 -
4
votes3
answers902
viewsRETURN THE SUM OF MAXIMUM 3 SQL VALUES
I have a table and I need to return the following: check based on recipient column, add the 3 largest amount of that recipient, bring in query only if the sum of the 3 largest ones are >= 1024:…
-
4
votes1
answer92
viewsHow can Stack expressions handle stack variables?
I’m learning C# and I’m reading about Brazilian expressions. The question is: how does it work and why does it work? public delegate void Test(); public void Foobar(ref Test del) { int var = 10; del…
-
4
votes1
answer145
viewsShould I feed my website through the API or not?
If I am developing a site that has an integrated API, for example Laravel, I own a site and an API in the same project What is the best way to feed the site? I must create a controller which will…
-
4
votes2
answers114
viewsWhat do you call the previous month in the R?
I need the R to tell me month before we are, that is, we are in "2018-05" and I need it to give me "2018-04". So far my solution has been: format(Sys.Date()-as.integer(format(Sys.Date(),…
-
4
votes2
answers276
viewsUsing a select with UNION or other mysql parameter
I am developing cash flow from my company and am encountering a difficulty. I have two different tables. A table is a tb_compras(id, fornecedor, nfe, valor, data) and then I have another table…
-
4
votes2
answers588
viewsHow do I correctly access elements of a dynamic matrix via pointer?
As many know (I believe) a multidimensional matrix is stored in memory in a linear way, that is, each line of the matrix goes in memory one after the other. To illustrate I elaborated the following…
-
4
votes2
answers1502
viewsIs there a more optimized way to "multiply" a string without using repetition?
I’m creating an algorithm in Javascript, and I’m already finding it very heavy. Now I need a string "multiplied" N times. I wonder if it is possible to do this without using a repeat. For example,…