Most voted questions
150,413 questions
Sort by count of
-
4
votes1
answer68
viewsIn Assumptions on Timing - I don’t understand this concept of a book
Cited in the book that a critical region has 4 key points: Progress: Ensures that all threads are entering and leaving the critical region, avoiding deadlocks. Mutually Exclusive: Only one thread…
-
4
votes1
answer58
viewsString concatenation behavior in C
Why the following C code works? char *str = "A""B"; /* str = "AB" */ However I noticed that it is only in string statements, for example the following would not work: char *a = "A"; char *ab = a…
-
4
votes1
answer59
viewsWhat is Fog Computing?
What would be this term Fog computing (also known as fog or fog computing) that is used in some Iot projects?
-
4
votes1
answer742
viewsWhat is the livelock?
The term deadlock is well known in concurrent programming, but I came across the term livelock in my studies, and I wondered what that might be? What is livelock? And could you give some example…
-
4
votes2
answers1661
viewsLaravel: Cannot add Foreign key Constraint
I have two tables, the table users and empresas, with Model User and Empresa respectively. A user registration can manage a company, and for that, I need to define which id the user will access in…
-
4
votes2
answers164
viewsWhat would this . f be in Javascript?
Taking a look at a tutorial on Javascript I came across the following code snippet: let user = { name: "John" }; function sayHi() { console.log(`Hello ${this.name}`); } user.f = sayHi; // dúvida…
-
4
votes2
answers826
viewsHow to define the number of clusters in the Kmeans algorithm in R?
I’m studying the grouping algorithm Kmeans, and as a database for my study, I’m using the iris. base = iris The algorithm itself I managed to use without problems: base2 = base[3:4] kmeans =…
-
4
votes1
answer75
viewsWhen to use local classes in Java?
I learned that it is possible to declare classes within blocks as methods, for example: void exemplo() { class teste { } } But when local classes come in handy?…
-
4
votes5
answers3663
viewsHow to scan an array and insert the elements into HTML with JS
I am studying the DOM of JS and had some difficulties. I need to show the elements of this vector as li tags of HTML: let nomes = ["Diego", "Gabriel", "Lucas"]; My code is this: function gerar(){…
-
4
votes2
answers83
viewsForm closing without close()
Dear friends, I have a very simple form that is closing after clicking OK on Messagebox. I have already reviewed everything, compared it with other papers I have and I haven’t found the solution. If…
-
4
votes1
answer183
viewsDifference between the metacharacters b and B
The metacharacters \b and \B sane anchors that marks the boundaries of a string (where it starts, ends, or both). Works by the ASCII standard, containing only [A-Za-z0-9_]. That is, only parts of…
-
4
votes1
answer12477
viewsUpload image with Axios to a Node.JS server
I’m trying to upload an image using the library Axios, but she’s not getting into the back-end. Image input <input type="file" class="custom-file-input" id="file" name="file"> Note: My form…
-
4
votes1
answer103
viewsAccess data.frame information in R
I’m trying to develop a recommendation system using the R language. Basically, the system is music recommendation collecting information from a file where there is a certain amount of users and for…
rasked 4 years, 12 months ago Mateus Dias 93 -
4
votes1
answer138
viewsTake two values from Arduino and display in C#
I have two Ultrasonics linked in my Alpha, and I’m using this code to read their values normally: #include <Ultrasonic.h> Ultrasonic ultrasonic(11, 12); Ultrasonic ultrasonic1(8,9); const int…
-
4
votes1
answer665
viewsHow does the metacharacter t work in a regex?
I have this variable: y <- c('stack overflow', 'user number 2', 'nova\nlinha', 'nova \n linha') And these functions with their results: library(tidyverse) With \n: str_detect(string = y,…
-
4
votes2
answers405
viewsDaylight saving time at Jenkins
I have an instance of Jenkins running on a Windows Server 2016 and this server is on time. I have some Jobs set up to run with specific time, but they are running a one hour early, as if with…
-
4
votes0
answers90
viewsCreate an executable in c#
I am developing an application and I would like to know if it is possible to create an "executable" as an external program, for example: when clicking a button, it uses Savefiledialog to save the…
c#asked 5 years ago João silva 79 -
4
votes4
answers200
viewsFind character succeeded by another character using Regex
I am trying to assemble a regular expression that can identify and correct an invalid JSON. What I am trying to do specifically is the following, using as an example the following JSON: { "array":…
-
4
votes2
answers1240
viewsRecursion to Python List Inversion
I’m trying to create a recursive function that reverses the order of a certain list. As a beginner, I believe I’m making mistakes during the construction of the function. def inverter(lista, size):…
-
4
votes1
answer139
viewsPerform mutate in columns simultaneously
Hello, I have a dataframe where I want to apply the same function in several columns at the same time. I tried to use the dplyr::mutate_at but I don’t think I understand the logic of this operation.…
-
4
votes1
answer213
viewsStackoverflow error when compiling code in C#
I am doing an exercise in C# and I am not able to find the error in my code, because I have already checked the resolution of the problem and I can’t find the difference in the syntax of the code…
-
4
votes3
answers211
viewsSum of Total Positive and Negative Hours
I need to perform the sum of positive and negative hours for a virtual electronic point control. However, I am having difficulties to accomplish the sum, because the hours are not being correctly…
phpasked 5 years ago Aiden Pearce 331 -
4
votes1
answer66
viewsFollow the OCP principle or use "instanceof"
The OCP principle preaches: "open to extension, but closed to alteration". To achieve this we need to abstract, because with an abstraction we can extend without needing to change the one that uses…
-
4
votes2
answers3601
viewsHow to compare two different lists in Java?
I have two lists that share a common value between them. I wanted these selected objects to be filtered so that it is added to another list List<Objeto1> lista1 = new…
-
4
votes1
answer121
viewsHow, using git in Windows, indicate that the file is allowed to run in Unix environments?
I’m using git in development, and I’m willing to put the project gradle to be executed in the IC. To execute the gradle, just give a ./gradlew to start the process. However, when calling this in my…
-
4
votes2
answers182
viewscan I declare a variable in javascript so $variable?
I can declare a variable in javascript this way $variável ? If not. What would this syntax be ?
-
4
votes1
answer71
viewsWhat does Typevar’s covariant and contravariant of the Typing module mean?
When using the module typing Python, available in 3.5+ versions, it is possible to define new types using the structure TypeVar. from typing import TypeVar T = TypeVar('T') # Pode ser qualquer tipo…
-
4
votes1
answer289
viewsChr$ equivalent function in C#
I’m migrating a chunk of code in Visual Basic 6 and came across the following call: variavel = Chr$(27) & Chr(15) 1 - What would be the equivalent functions in C#? 2 - What is the difference…
-
4
votes1
answer110
viewsHow do computers store and interpret floating point numbers in binary?
In my course of systems analysis and development I started the matter of computational mathematics the subject was numerical bases and conversions, something that caught my attention is that they…
-
4
votes3
answers858
viewsWindows service does not start automatically
I just implemented a Windows service I just can’t get it to turn automatically when the windows is started. I don’t know if it was some thing in the programming or some configuration of the windows.…
-
4
votes2
answers89
viewsRearview Metacharacter x does not take the corresponding groups when I change the order of these
The rear-view metacharacter \x repeats something captured in some group () previous in regex. For example: library(stringr) a <- 'quero-quero' str_extract(string = a, pattern = regex(pattern =…
-
4
votes4
answers1049
viewsChanging HTML does not reflect on page - Asp . NET Core 3.0
I recently decided to test the ASP .Net core 3.0, I always changed HTML without the need to recompile the project, but in this version, I can’t change anything in HTML without the need to recompile…
-
4
votes1
answer96
viewsHow does provides...with and 'uses' work in modular Java?
In Java 9, as a result of the Jigsaw project, we gained the ability to define modules. The modules are very simple, but there are still two things that confuse me in them, which is the use of…
-
4
votes3
answers696
viewsHow to make a custom filter using the Bootstrap Selectpicker?
Good morning guys. I have a problem using Selectpicker to make a Combobox with the products I bring from BD with PHP. My problem is this: I need to make a "custom" filter because when I put inside…
-
4
votes4
answers89
viewsRepetition is not equivalent to one second
How much would be the limit value for a repeat to be compared to a second? For example: for x in range(0, 1000): print("1 segundo")
-
4
votes3
answers1637
viewsHow to iterate with two-dimensional array?
Hello, I am making a library to help in the creation of games and for that I would like to know how to iterate in two-dimensional arrays, I know that the array for one-dimensional is just to do:…
-
4
votes1
answer110
viewsWhat are the benefits of peer programming?
Programming was almost always done by a person, who creates, analyzes, tests and compiles the code, all by himself. Until a moment came programming in pairs, that said programming in pairs was more…
methodologyasked 5 years ago NinjaTroll 1,752 -
4
votes1
answer251
viewsCalling a v-on by Javascript
Good people, I have a form that uses Vue, where every time I write something it makes a request in the backend to save the data with the v-on:change and when I leave the field he does the same thing…
-
4
votes2
answers113
viewsGeneric types in Java method call
I wanted to understand how this works and the name they give it in Java. Follow the code snippet: public <I, O> SimpleStepBuilder<I, O> chunk(int chunkSize) { return new…
-
4
votes1
answer417
viewsHow to use auto.Rima to predict 24 periods or more in R?
I made a prediction using the auto.arima where my database is monthly values from Jan/2018 to Sep/2019. My training base is from Jan/2018 to Jun/2019: VL_TR_treino_5S = window(VL_TR_TS_5S,…
rasked 5 years ago Izak Mandrak 1,059 -
4
votes1
answer64
viewsDoes the programming language that follows only one paradigm have any advantage?
Programming languages that have only one paradigm such as Haskell (functional programming) or Smalltalk (object-oriented/message-oriented) benefit from focusing fully on that paradigm? What are the…
-
4
votes2
answers820
viewsAccept only numbers in the C#console app
Good evening, I’m trying to get the Console.Readline() command to read only numbers, ignoring characters, there’s a way ? example: static void main() { int x; Console.WriteLine("INSERINDO VALOR PARA…
-
4
votes1
answer54
viewsExpression generation for EF with dynamic properties
I’d like to conduct a search on where for Entity Framework passing the name of the property you would like to compare as a string. For example, I have the following classes: public class ClientData…
-
4
votes1
answer162
viewsWhere should I start designing my software?
I read an article by msdn about "overview of architecture software" and it seemed to me quite interesting showing part of the step by step to build a software, but I was in doubt about a question…
-
4
votes2
answers330
viewsIs it possible to have an app with multiple apps inside?
We are thinking about developing several apps to solve problems, and each app solves the problem of a sector. To avoid the user having to download the apps separately, we thought of making a Bundle…
-
4
votes2
answers1326
viewsHow to work with timezones without using a timestamp?
I was reading that answer, of the Stack Overflow in English, and I came across the following excerpt: For Mysql (or Mariadb), if you don’t need the time information consider using the DATE column…
-
4
votes0
answers53
viewsCriterion for modular decomposition
Drawn from: http://wiki.c2.com/? Encapsulationisnotinformationhiding (my emphasis): As the article Linked to at the top of the page mentions, "information Hiding" was introduced by Davidparnas in…
-
4
votes2
answers240
viewsHow to count repeat emails in a Mysql table?
I have a table where some registrations were made using the same email. I would like to count these repeated emails, for this I am using this way: SELECT COUNT(DISTINCT email) AS Contar FROM…
-
4
votes3
answers212
viewsHow to fill input data in BOOTSTRAP POPOVER
Personal I have a code with a modal that contains a Bootstrap popover and I would like this information balloon to contain the data of these inputs. Currently I can already get the data of the…
-
4
votes1
answer45
viewsWhat is the purpose of using a name for Javascript class expressions?
When using a class expression nominee in Javascript as in the example, I did not understand how to access _Name, whether it is possible to use it: let Nome = class _Nome { constructor(_nome) {…