Most voted questions
150,413 questions
Sort by count of
-
9
votes1
answer181
viewsCSS writing methodology using : in class name ( Tailwind CSS )
I know there are a multitude of CSS frameworks (Bootstrap, Materialize, Skeleton, Bulma, Foundation), as well as a multitude of methodologies for writing CSS (BEM, DRY, ITCSS, OOCSS) But I was doing…
-
9
votes2
answers253
viewsWhy is it good practice to generate unique user code?
Many enterprise systems use a customized unique identifier. You have the generation of id in the database and a custom code. When a customer search is done, the custom code (something like ZT2578B)…
-
9
votes5
answers639
viewsComplete number with "zeros" until the total size is 9!
I receive by parameter one Number.. ex: 18 and need to complement it with "zeros" until the total size is 9 numbers.. the result would be 180000000. If the value received is 678 for example, the…
-
9
votes1
answer188
viewsInstantiate a class from its name in a string, without using "Eval" and in Chrome (V75+)
I need to instantiate a class from a string. Turns out for some reason it doesn’t work the way I used to: class MinhaClasse{ meuMetodo(){ alert('Método Funciona!'); } } let nome_classe =…
-
9
votes1
answer668
viewsCan I accept a pull request locally? Via terminal or Github desktop?
I can accept pull request open locally, via terminal or Github desktop.
-
9
votes2
answers1354
viewsWhat are the differences between an image and a container?
I’m reading about the Docker and I was confused about what a container and a image, the understanding of both are not clear to me. Questions What is a container in the context of Docker? What is an…
-
9
votes2
answers215
viewsWhat are the alternatives for mcrypt_* functions?
The functions of the type mcrypt_* were discontinued in PHP 7.1.0 and removed in PHP 7.2.0 as shown in manual: Warning This Function was DEPRECATED in PHP 7.1.0, and REMOVED in PHP 7.2.0. I was…
-
9
votes3
answers2052
viewsConvert a comma-separated string to a multidimensional array
I have a string thus ... var listAdd = "1789, 3, 8 , 1788, 3, 8, 1790, 3, 9" How do I convert into a array as below? [1789,3,8], [1788,3,8], [1790,3,9] The code I’m trying isn’t working: var…
-
9
votes1
answer443
viewsIs Laravel’s Blade a programming language?
After a brief discussion of why the HTML is not a programming language, characterize that not because it is not able to perform calculations, make decisions, change information contained in some…
-
9
votes3
answers170
viewsHow to change property access level in an inheritance?
I have a class that when inherited I want one of its public attributes to become private, so that the user does not have access to the use of this variable in this class, but I do not know how to do…
-
9
votes2
answers568
views"Alert", "confirm" and "prompt" are considered bad practices?
Where I work some professionals do not like to use these features and said they are considered bad practice and were warned by other more experienced programmed not to use and end up replacing these…
-
9
votes1
answer1353
viewsHow to overload methods in Typescript?
I’m having trouble overloading methods in Typescript. The method to be overloaded is a Object Factory rect() one signature has four numerical parameters and the other signature has only one…
-
9
votes2
answers650
viewsWhat is Separation of Interests (Soc - Separation of Concerns)?
I noticed that we don’t have a question about this topic. Separation of Concerns (Soc), also known as: Separation of interests Separation of concerns Separation of responsibilities Separation of…
software-engineering software-project programming-principlesasked 5 years, 3 months ago Piovezan 15,850 -
9
votes4
answers7984
viewsHow to solve 3-hour accretion problem in Date attribute in Angular?
I have the following excerpt: let data = new Date(); console.log(data); // saída: Fri Oct 18 2019 08:23:27 GMT-0300 (Horário Padrão de Brasília) When making the request with the HttpClient Angular…
-
9
votes2
answers128
viewsIf abstract classes and interfaces cannot be instantiated, what is happening here?
I discovered that interfaces and abstract classes cannot be instantiated, but my teacher gave me an example that left me in doubt, because it seems very an instance of interface ActionListener.…
-
9
votes1
answer156
viewsWhat is Pattern matching in functional languages?
When reading about the functional paradigm, I realized that most languages have a common characteristic, the Pattern matching. Contextualizing for a programmer like me, accustomed to the…
-
9
votes2
answers710
viewsSelect "maximum" elements given a certain criterion in a "stream"
I have a collection of elements that I’m going through in a stream. Suppose it is to take the highest value element (integer) given a classification (string). This class is enough to exemplify my…
-
9
votes2
answers1119
viewsWhere is Session stored in ASP.NET Core and how best to use it?
Knowing that ASP.NET MVC when it comes to Session should be taken care not to abuse too much of such functionality due to its memory consumption by the server can "weigh" the application. Reading a…
-
9
votes1
answer109
viewsCan Functional Programming hinder the discovery of certain types of bugs?
As I understand it, functional programming (or at least a functional programming style) makes it easy to find and avoid bugs (it’s easy to test pure functions, immutability protects data,…
functional-programmingasked 5 years, 6 months ago Douglas 961 -
9
votes1
answer390
viewsHow does CSS media query prefers-color-Scheme work?
From what I understand, it can be used to apply different styles according to user preferences. .light, .dark { display: none; } @media (prefers-color-scheme: dark) { .dark { display: block; } }…
-
9
votes1
answer217
viewsHow will the null coalescence assignment operator work in PHP 7.4?
In version 7.4 of PHP was implemented the null coalescence assignment operator that promises to unify the behaviors of assignment and null coalescence operators, the latter being present since…
-
9
votes2
answers307
viewsChange color of the scenery with button
I am creating a scenario with Parallax and wanted to simulate color change in the mountains, for that, the color will be chosen by the user. I have 3 buttons for the effect. My problem is I don’t…
-
9
votes1
answer95
viewsWhat do the terms Memory Poisoning and HWPOISON mean?
I’m studying some things in the kernel GNU/Linux and found the above terms in the Memory Management/ Memory Allocation, would like to know the meaning of both and what they are ?…
-
9
votes2
answers132
viewsHow to correctly read documentation from an SQL command?
I was studying the concept of transactions and as always the reference was the documentation of Microsoft itself (in the case for the products of the same). In the link below there is the…
-
9
votes2
answers905
viewsShould I treat emails as case sensitive or insensitive?
It is common to have a register, mainly of login requesting an e-mail address. According to the RFC governing e-mails and domains the first is case sensitive, while the second is insensitive, which…
-
9
votes4
answers2928
viewsUppercase HTML vs CSS
I’d like to know the difference between using text-transform: uppercase in CSS and use uppercase letters directly in HTML. Is there any difference between the two? Which is the most recommended?…
-
9
votes3
answers559
viewsWhat’s the best way to play a Loop in math?
I needed to represent and document an arithmetic algorithm in a mathematical notation, the problem is I can’t find the best way to represent a compound loop for that. Suppose we have the simple…
-
9
votes1
answer242
viewsWhat is the difference between init and constructor?
I’m starting to learn Kotlin and I’d like to know the difference between init and constructor, or set directly in the example class: class House(var cor: String, var vagaGaragem: Int)…
kotlinasked 5 years, 10 months ago João Vitor Camargo de Alemida 151 -
9
votes2
answers813
viewsDraw circle in Html5
I’d like to draw that circle But that’s all I got here yet function draw() { var canvas = document.getElementById('circle'); if (canvas.getContext) { var ctx = canvas.getContext('2d'); var X =…
-
9
votes3
answers162
viewsHow do I validate an input as its content changes?
I’d like you to fill in a piece of data input this was being validated, that is, as it was filling a field 'nif' that alerted me an "invalid nif" message until it was correct and did not need to use…
javascriptasked 5 years, 11 months ago Marco Silva 351 -
9
votes3
answers566
viewsHow does Python handle and represent an array internally?
In Python any type of array is of class type list, see: array = ['Gato', 'Jake', 'Finn'] print(type(array)) Exit: <class 'list'> That is, every array is an object of list. However, there is…
python array characteristic-language python-internals cpythonasked 5 years, 11 months ago gato 22,329 -
9
votes2
answers130
viewsHow does the interpretation of HTML code work?
I’m making a tree to derive an HTML code. And I’m treating some particular cases. And one of those cases is just when someone opens a tag and doesn’t close it: <html> <body> <div>…
-
9
votes1
answer2490
viewsDoes the REST standard allow the use of query string?
Most frameworks I know use URL parameters as follows: /recurso/variavel For example /produtos/{nome} /produtos/{categoria} Some use between {} others <>, etc. To differentiate the searches is…
-
9
votes1
answer191
viewsWhat does the [&] operator mean before a function?
I’m trying to read the code of a function that’s defined like this: auto loop = [&](int ntensor, char** data, const int64_t* strides, int64_t n) { ... }; What does the [&] before function?…
-
9
votes1
answer119
viewsHow does PHP arrays work internally?
PHP handles arrays in a way different from other languages, apparently there are concepts of hashtable to associate values. How it works internally in the core language arrays?…
-
9
votes4
answers11232
viewsJPA Object References an Unsaved Transient instance - save the Transient instance before Flushing :
When trying to save the "Addresses" of "Client" JPA/Spring returns me the following error in "main" Caused by: org.hibernate.Transientpropertyvalueexception: Object References an Unsaved Transient…
-
9
votes2
answers1438
viewsWhat is wide/long data?
It is common to read/hear comments saying that the data is in format wide or long. Which means a table is in format wide? And long? Which packages/functions in R can be used to transform a table…
rasked 5 years, 12 months ago Tomás Barcellos 5,562 -
9
votes2
answers300
viewsDifference between "Function Operator" and "Function Factory"
To the chapter 11 of the book Advanced R, the author defines Function Operator as: A Function Operator is a Function that takes one (or more) functions as input and Returns a Function as output.…
-
9
votes1
answer183
viewsWhat is a Shiny app?
It is common to have to expose a data analysis in a more user-friendly format. In these cases it is also common to hear as a suggestion that this analysis be transformed into a shiny application.…
-
9
votes1
answer161
viewsDifference between Function Factory and closure
In the book Advanced R, to chapters 10 and 11, the author defines Function Factory as: "a Factory for making new functions" Translation Google Translate: a factory to do new functions. And closure…
-
9
votes3
answers22536
viewsHow to make a Mask in pure Javascript?
I need to create a mask (mask) in the phone contact forms that shows the following result in the form (00) 0 0000 - 0000 in Javascript without using Jquery. <div class="row clearfix"> <div…
-
9
votes1
answer307
viewsHow to fill column charts with hachuras using ggplot2
I would like to present column charts using the ggplot2, but I would like them to be filled with hachuras. Because it facilitates the understanding in case of photocopy in black and white! Using the…
-
9
votes2
answers643
viewsHow does the int function handle the n character?
I created a list: usuarios = ['123\n','123\n4'] I tried to turn the index 0 into integer using the int() int(usuarios[0]) Upshot: 123 But when I tried to do the same with index 1: int(usuarios[1])…
-
9
votes2
answers413
viewsWhat’s the difference between "Issues" and "Pull Requests"?
In a Github repository, what is the difference between "Issues" and "Pull Requests"?
-
9
votes1
answer877
views -
9
votes1
answer1094
viewsHow to read stdin in python?
Using the netcat to monitor a particular port on my device, using the shell command terminal, I can check the data received by it and send data back to the connected device, as for example, makes a…
-
9
votes2
answers687
viewsHow to make an Animation in CSS with drag effect. Place Blur in motion
I’m willing to put one loader animated in CSS with @keyframes on a page, but I would like to put a "drag effect" on it as if it gave a "blur" with a trace of Blur following the element when it…
-
9
votes2
answers102
viewsWhy should descriptors instances in Python be class attributes?
I’m studying descritores in Python and I found that they should be implemented as atributos de classe for example: class Descriptor: def __init__(self, obj): self.obj = obj def __get__(self,…
-
9
votes1
answer205
viewsHow to make the button outline follow the curvature of the elements?
I know that the outline is very important for usability and especially for the accessibility of the page, including here is a very interesting Webaim article about it:…
-
9
votes2
answers674
viewsDo I need to use Visual Studio to program in C#?
I want to learn C# to become one of my main languages, but my current PC is kind of outdated and ends up not running Visual Studio well, but with Visual Studio Code it’s okay, I need Visual Studio…