Most voted questions
150,413 questions
Sort by count of
-
5
votes2
answers71
viewsWhen to use these commands?
What are the criteria I use to apply the commands getch(); , the return0; and the system("pause") at the end of a programme?
casked 5 years, 11 months ago Benedito Póvoa 57 -
5
votes1
answer123
viewsWhy is it possible to store a string on a char pointer?
Why char stores a single character and the pointer points to its value in memory, so it shouldn’t have just one character? Example: char *str = "Ola"; Why str does not store only one character?…
-
5
votes2
answers1147
viewsColor scale adjustment on R
Good afternoon, I created a bar chart using an indicator to fill the colors of the bars, where the nearest red is bad, and the nearest green is good. It turns out that it adjusted according to the…
-
5
votes2
answers1974
viewsPick URL with regular link expression
I am trying to extract only the URL if an expression is validated with the tag [monitory]. The expression I use is this: (?=<a.*\[monitory\].*href=["|'][http:|https:]?[\/\/]).*?["|']> And for…
-
5
votes2
answers120
viewsHow to use C#quotes?
I’m starting to program in C# and I’m feeling some difficulty with quotation marks when I need to paste some text. In Python I could use the triple quotes to paste some text that there was line…
-
5
votes1
answer78
viewsType Object in PHP
I’m practicing some code in PHP when I come across this: <?php $a = (object) ["a" => "b"]; $b = (object) ["a" => "c"]; $y = $a <=> $b; echo $y; $v=[1,2,3] <=> [1,2,3]; echo $v;…
-
5
votes3
answers141
viewsResult range
I have a table where records are saved every 3 seconds 24 hours a day Table: myTable dado1 dado2 dado3 data "135,05" "134,69" "135,10" "2018-11-13 15:38:16" "132,00" "131,91" "132,61" "2018-11-13…
-
5
votes2
answers255
viewsReturn the highest value between columns and the row ID of that highest value
Let’s say I have two columns in my table, column A and B. +-----+-----+-----+ | ID | A | B | +-----+-----+-----+ | 1 | 500 | 681 | +-----+-----+-----+ | 2 | 980 | 101 | +-----+-----+-----+ | 3 | 110…
-
5
votes2
answers1116
viewsWhat are the scopes of the variables in the ADVPL and when to use each one?
I am taking a code from a colleague to give maintenance. I find myself with this code here: Static Function Conv2Json(cCpo) Local cRet := "" Local cSeparador := "" aCpo := StrtoKArr(cCpo, ';')…
-
5
votes3
answers914
viewsExpand or Minimize code snippet in eclipse
It would be possible to minimize or expand only a code snippet inside a block {...}, example below: using the IDE eclipse?…
-
5
votes2
answers1771
viewsLogic for grouping data in javascript array
I’m having trouble grouping some data using the Javascript. I have the following array of objects that return from database and shipping to the view: var object = [ { data: 1, categories: "Branca",…
-
5
votes3
answers125
viewsAsync Function javascript
I am making an API in Node.js and I have a function I call through the post, but before forwarding to the precise repository I run the function getProduto(idProd, produto), but is doing the…
-
5
votes1
answer695
viewsProblems with modal/boostrap
Hello, I have a problem on my site, I would like when I click on the modal button, it closes and opens the modal again(the following code is a summary code of what I need), in this code, when I open…
-
5
votes1
answer50
viewsProblem creating a data.frame
I want to export several results to excel and for that I need to first leave them in the ideal format, but I am facing problems because I want them to be stacked in a single column. This is an…
-
5
votes2
answers259
viewsThe UL LI losing formatting after I put it on line... Why did the "balls" of my LI disappear?
I have an unordered list <ul><li> I wish it to stay horizontal, not vertical, but when I put it to stay in line with display: inline-block my indicative "balls" are gone! Note that the…
-
5
votes1
answer490
viewsStereo camera calibration via openCV chessboard
I am trying to calibrate a stereo camera using openCV, but the function findChessboardCorners is always returning False, I believe it is in function of high image distortion. Any hint of…
-
5
votes2
answers193
viewsColumn that fills the screen according to width
I’m trying to do something that should be simple, but my CSS skills are lame. I would like to make a login screen with a fixed column on the right, as in the image below, but I would like the right…
cssasked 5 years, 11 months ago itamarluiz 59 -
5
votes3
answers139
viewsLists within lists: Even when sliced, there is connection between lists
I’m studying lists and there’s a behavior I don’t understand. I know that when I equate one list with another, a connection between them is created. And that when I slice a list, I create a copy of…
-
5
votes1
answer38
viewsLaravel + Android
I am starting my studies in the framework Aravel and saw that it is very useful to create websites, however, is it possible to consume these routes in native android ? Because routes are usually…
-
5
votes2
answers240
viewsHow to make a sequence of boxes with the triangular border on the right, on top of the other, box with CSS?
I didn’t know a better title to describe my need, but in fact, I would like to be able to make a sequence of boxes whose right edge was in a triangular shape, superimposed on the subsequent box.…
-
5
votes1
answer59
viewsDoubt how to measure the number of words between two specific words in a string in R
Hello, People! I’m working on a function in R that measures the amount of words between two specific words, I’m calling the function worDistance, it works as follows, you insert two arguments, given…
rasked 5 years, 12 months ago Henry Gonçalves 53 -
5
votes1
answer992
viewsImage segmentation with Canny Edge Opencv
I’m trying to target the edge of both the iris and the pupil using Canny Edge from Opencv. However all the parameters I used do not meet the criterion of leaving well delimited the two edges. The…
-
5
votes1
answer452
viewsbar graph ggplot 2 vectors side by side
Can anyone tell me if it is possible to make this chart with the bars side by side without using data frames or "melt"? v1=c(100,120,140) v2=c(125, 102,104) a=data.frame(year=factor(2003:2005))…
-
5
votes2
answers2226
viewsSwitch string to high box and remove blanks
I’m trying to make a program in Python 3 that should turn the typed text into upper box and remove blanks. I would like to know what is wrong with my code since it is not eliminating the whitespace.…
-
5
votes1
answer112
viewsProblems comparing two Ipv6 addresses
Lately I’ve been working on several "test codes" to exercise the "head", specifically codes involving the API of sockets of Unix. The most recent code I wrote was a simple server that receives a new…
-
5
votes5
answers713
viewsindexof does not find element in an array
The indexOf() is returning me -1 even though I have this element, I am doing so: pessoas = []; pessoas.push({"nome": "Pedro"}) pessoas.push({"nome": "João"}) pessoas.push({"nome": "Maria"})…
-
5
votes1
answer66
viewsHow to return a Promise from an Angularfireobject using @angular/fire in Angular(V6+)
Hello, I’m working on a project in Angular where I need to return a Promisein a particular service. My code is like this: import { Injectable } from '@angular/core'; import { AngularFireDatabase }…
-
5
votes3
answers193
viewsRegex for this format xxxxxxxxxxxx_v2
How can I make a regex that accepts in this format below: 1q2e5g6s4t5s2u1i5dy1s9u14i2s5u9o_v2 1q2e5g6s4t5s2u1i5dy1s9u14i2s5u9o has 32 characters and then has _v2 - the last 3 are always _v2.…
regexasked 6 years ago Matheus Miranda 5,375 -
5
votes1
answer73
viewsstruct character array
I’m having to remember programming in c++ to teach a beginner class in programming logic. Subject that I haven’t seen in years. One struct was declared however when entering a string, the stream…
-
5
votes1
answer148
viewsFortran variables 77
I got a code on Fortran 77 where there’s a line like this: DATA ZERO/0D0/,HALF/0.5D0/,ONE/1D0/,TWO/2D0/,THREE/3D0/,FOUR/4D0/ I’m transposing it to PHP. I’d like to know what D0 is after the values…
fortranasked 6 years ago Maurício Biléssimo 351 -
5
votes1
answer57
viewsPHP xf0 represents 0xF0?
If \xF0 represents a hexa as well as 0xF0, because their exit is different? echo "\xF0"; echo 0xF0; I can’t really find any information on that notation \xF0 in the PHP manual.…
-
5
votes1
answer7037
viewsWhen to use querySelector instead of getElementById?
I looked for some information on the internet about this already, including in Soen, however I could not reach an exact conclusion. I must point out that the issue is not only about performance, but…
javascriptasked 6 years ago Máttheus Spoo 1,746 -
5
votes1
answer218
viewsWhat is the purpose of the nextTick() method?
I used the method nextTick() sometimes, especially when I need to change something in the DOM, however, I don’t understand exactly what its purpose is. Can anyone give me examples of their right…
-
5
votes0
answers422
viewsProtocol NBR 14522
I am developing software for communication with meter via serial port, and I am able to send the commands via serial, follow the codes: int serial_open(const char *device, int baud) { struct termios…
-
5
votes1
answer1124
viewsWhat is the difference between Numeric and integer vectors?
In R, identical vectors (containing the same numbers) can assume the classes numeric and integer. For example: x<-(1:5) class(x) [1] "integer" x<-c(1,2,3,4,5) class(x) [1] "numeric" Why does…
-
5
votes2
answers470
viewsWhat are the dangers of accepting a branch merge with Behind commits?
Sometimes when I make one merge request in a project, it appears that there are commits Behind, I understand that, this happens due to the fact that at the time of creating my branch, based on the…
gitasked 6 years ago MarceloBoni 6,385 -
5
votes3
answers354
viewson('change') shoot every click
How do I so that every time I choose an option it fires an event. In the example below it is already with the selected One. I wanted even if I choose him again he shoots without having to trade…
jqueryasked 6 years ago Matheus Soares 53 -
5
votes1
answer672
viewsWhat are Mutexes and when is it advisable to use this feature?
I read about Mutexes and the class Mutex. However, I cannot understand clearly what Mutex is and what this class does. Since I would like to know if I can use this feature to prevent my desktop…
-
5
votes1
answer86
viewsMove a great Wordpress site own to Wordpress.com
I would like some help to move a large 11 year site with 38 Gb storage for wordpress.com. I found some instructions in the official help database, but I’m not sure if we can follow them without…
-
5
votes1
answer402
viewsWhat is a fault tolerant (fault tolerance) system?
When talking about high-scale systems, much is heard of having a fault-tolerant system (fault-Tolerant). See the description of the Elixir programming language: Elixir is built on top of the Erlang…
-
5
votes3
answers97
viewsWhy does the first element of the vector come out as zero without having stored this value there?
Why the following code prints a 0 at the beginning of the output? #include <stdio.h> #include <limits.h> // Escreva um programa que leia do teclado 8 valores, e em seguida os // imprima…
-
5
votes1
answer53
viewsHow can I make the word not break in half? And leave at most 40 characters per line?
valor = '''In the beginning God created the heavens and the earth. Now the earth was formless and empty, darkness was over the surface of the deep, and the Spirit of God was hovering over…
-
5
votes2
answers1223
viewsWhat is a nodeList object in Javascript?
I know that in Javascript we have arrays common, which, most languages have. But my doubts are about a nodeList in Javascript. What is an object nodeList in Javascript? How can I access elements of…
javascriptasked 6 years ago João Pedro Schmitz 2,974 -
5
votes1
answer117
viewsLoop Error in R
I created this loop: library(forecast) a=1 b=60 while(b<=(NROW(tsarroz))){ janela=dput(tsarroz [a:b]) serie=ts(janela,freq=6) HW=HoltWinters(serie) prev=forecast(HW,6)…
-
5
votes2
answers97
viewsWhy can’t I access the array of integers in the main() function?
I cannot access the positions of the vector of integers that I loaded in the function loads. In that function I can correctly access the data with: printf("%d\n", n[i]); But in function main(),…
-
5
votes1
answer384
viewsError: In Ops.factor
I’m working with a weather data.frame and I want to know if the data is within the reading limits of the equipment. For this purpose the tolerance limits adopted for temperature (temp_med, temp_max…
rasked 6 years ago Luana Tavares 51 -
5
votes3
answers349
viewsWhat are the advantages of using PHP’s sprintf function?
I can see an advantage in using the function sprintf in place of concatenation: readability. In addition to readability, what are the other advantages of sprintf() in relation to concatenation? Is…
-
5
votes1
answer96
viewsWhat are the criteria for failbit and badbit in a Std::istream?
In a C++ exercise, it is proposed to store a data (numeric, integer - eg.: 4 or -3650) entered by the user through the console. This is an exercise to deal with exceptions and "defensive…
-
5
votes2
answers5954
viewsWhat is the difference between using toString() and JSON.stringify()?
var arr = [1,2,3]; arr.toString(); // "1,2,3" JSON.stringify(arr); // "[1,2,3]"
-
5
votes4
answers3500
viewsHow to increase the space between text and underline in CSS?
When we’re using a text-decoration: underline we have an underlining applied to it. However my doubt is the following: It is possible to change the distance between text and underline? If yes, it…
cssasked 6 years ago João Pedro Schmitz 2,974