Most voted questions
150,413 questions
Sort by count of
-
9
votes2
answers423
viewsAll property in CSS. What is it for and how does it work?
I was looking at the CSS properties and met the all, I just found her a little confused. I know it has 4 states. It is them: initial, inherit, revert and unset. But I don’t understand exactly how…
cssasked 6 years, 3 months ago João Pedro Schmitz 2,974 -
9
votes4
answers701
viewsHow to create and use custom events
Researching I found Event and CustumEvent, both can be used to create events, and to control registrations, removals and emissions of the event should be used EventTarget, but I didn’t understand…
-
9
votes4
answers2878
viewsTwo "Return" in a function
How it works if there are two (+) return in a Python function? It would return the second value, or only the first? Example: def soma(a, b): x = a + b y = 'qualquer coisa' return x return y…
-
9
votes2
answers994
viewsWhat are side effects?
I was reading that reply and it has a table where it says that functional programming has no side effects and that OOP has, it generated me two doubts, being them: What are these side effects? Can…
-
9
votes3
answers166
viewsFind an expression in several elements of a list
Guys, I got a problem. I have 200 spreadsheets with some data from a survey, and I am importing into R and, because they are with different columns, I assign to each element of my list a different…
rasked 6 years, 4 months ago Jessica Voigt 883 -
9
votes3
answers2835
viewsWhat is the difference between <q>, <blockquote> and <cite> tags in HTML? And how to use them correctly?
What’s the difference between <q> and <blockquote> and <cite>, because everything seems to be for quote. Is there any good practice or correct way to use these tags correctly? We…
-
9
votes3
answers412
viewsHow to make a DIV with a crossed text. Type a text passing through a DIV
Is there any way to transpose a text div, like coming in from one side and coming out from the other? My idea would be something like these images. Where the text starts on one side and goes through…
-
9
votes2
answers1126
viewsWhat kind of data (double, float) should I use when representing a temperature?
My question is regarding the use of Double and of Float in Java exercises when having to declare a temperature (Celsius scale). Which one should I use in this case? I declared as Double, but the…
-
9
votes7
answers1322
viewsPush element from one array to another array
function that accepts a parameter and is a numerical matrix and will cross the array and if the element is even will push to the an array "even" and if it is odd will push to the array "odd" I tried…
javascriptasked 6 years, 5 months ago Isa 1,103 -
9
votes5
answers1894
viewsTest for string fill
When reading a post on good programming practices, more related to validating the filling of strings, I came across the following: Very slow check: string ret = String.Empty; if…
-
9
votes2
answers228
viewsIs Tuple the same as creating an object?
I’ve used the Tuple a few times and today came the doubt, that: public class User{ public String Name {get; set;} public String LastName {get; set;} } new User(){ Name = "Leonardo", LastName =…
-
9
votes2
answers1223
viewsWhy don’t you need the `&`in the `scanf();`?
I learned that the variable always has to have &, but in this example you don’t need and still show the result. Why you didn’t need the & in the scanf();? #include <stdio.h> int…
-
9
votes1
answer147
viewsPHP 7 - Why does a method that returns the primitive String type not generate an error when returning a Boolean value?
PHP 7 - Why a method that returns the primitive type String, does not generate error when returning a value Boolean? <?php class Foo { public function bar() : string { return true; } } $Foo = new…
-
9
votes1
answer302
viewsWhat is the Recyclerview?
I saw the class at documentation of Andorid, but I did not understand its functionality, where it should be used and with what purpose. The name referred me to something that doesn’t seem to be what…
-
9
votes1
answer812
viewsWhat does "Tree-Shaking" mean?
I closely follow the entire development of the Angular. I know the third generation of the rendering engine (the Ivy, code name for Render 3) will be released soon. Overall, the objectives for this…
-
9
votes1
answer732
viewsWhat is ~ (til) and (circumflex accent) in the Composer versioning scheme for?
In some cases, I see that some libraries that use the Composer, place ~ or ^ at the beginning of the library version, thus: "orchestra/testbench" : "^3.6" Or "phpunit/phpunit" : "~7.0" I wanted to…
commiserateasked 6 years, 6 months ago Wallace Maxters 102,340 -
9
votes3
answers623
viewsWhat is the Javascript Set object for?
I’ve asked a similar question about the Python language: What’s the set for in Python?. I wonder if that object Setin Javascript does the same things as set python makes. Example: var numbers = new…
-
9
votes3
answers189
viewsLEN function, know number of characters of a number
In the example below the result of the query instead of returning 7 is returned 5. DECLARE @valor money = 10.6879 SELECT LEN(@Valor) The impression I get is that when the number is the type money ,…
-
9
votes0
answers152
viewsError: Valuefactory tried to access the Value property of this instance
Every time I create any project Xamarin in the Visual Studio 2017 the following error is displayed when running the application: Erro: ValueFactory tentou acessar a propriedade Value dessa…
-
9
votes1
answer4461
viewsWhat is a middleware for?
I see in some courses some people highlight something like a middleware, example: middleware(authentication, authorization). I found the explanation rather superficial because it was not focus of…
-
9
votes3
answers619
viewsWhat is String.raw for in Javascript?
Well, that’s the question. I would like to know what the method is for String.raw in Javascript. I saw something in the documentation of MDN, but I did not understand very well the use Has something…
-
9
votes2
answers1974
viewsModify gradient colors in graphs in ggplot2
How do I modify the gradient colors of a graph in ggplot? Like, I’m not getting to put a continuous color scale between white and red, I’ve tried a variety of things but still haven’t answered me.…
-
9
votes1
answer1024
viewsGenerate classes with XSD or import WSDL [ANS / TISS]
To ANS provides the files .XSD, and the .WSDL for the implementation of the protocol TISS. Sand I type the code by . XSD, I have the classes structured correctly. Example: namespace TissV3 { class…
-
9
votes1
answer89
viewsCan the & (bitwise and) Java operator be used for interfaces?
Snippet source code from interface Comparator. Somebody explain to me how this is treated Comparator<T> & Serializable? public static <T, U extends Comparable<? super U>>…
-
9
votes2
answers562
viewsWhy assign NULL on a pointer after a free?
I see in many codes assign NULL on a pointer just after a free, guy: free(p); p = NULL; What good would that do?
-
9
votes3
answers2563
viewsIs it possible to apply sound effects to Hover or click css?
Can you transmit a sound effect by touching the mouse to an object, text, etc.? wanted that when you hover over some object with effect 'Hover' that a sound effect, being any type of sound that…
-
9
votes5
answers2767
viewsHTTP methods in practice
I’ve seen the W3C documentation some questions here at Sopt: What are the HTTP request methods, and what is the difference between them? What are the advantages of using the right HTTP methods? Why…
-
9
votes4
answers2034
viewsDoes React affect SEO?
Since HTML is generated via Javascript and until the page is loaded there is no useful HTML in it, SEO can be affected if I make a 100% web application in React - a call single page application?…
-
9
votes2
answers1951
viewsApp - Xamarin or Ionic?
I need to create an App and would like to know which of your technologies is the most suitable for mobile development. What is the main difference between Xamarin and Ionic? Which of the…
-
9
votes2
answers1801
viewsAsync/Await with threads (C# 7.2)
I have this code and as you can see I created two examples, Parallel and Notparallel. I expected both to return me 3000ms, because both should run async (2000 and 3000) and the total time would be…
-
9
votes1
answer344
viewsWhat is the difference between Collation UNICODE_CI_AI, UNICODE_CI and UNICODE
There is a difference between UNICODE_CI_AI, UNICODE_CI and UNICODE? What they are and what they interfere with in the database?
-
9
votes1
answer2436
viewsWhat is the purpose of the`reduce` function in Python?
In which cases is useful and how can I use the function reduce?
python python-3.x functional-programmingasked 6 years, 9 months ago Pedro von Hertwig Batista 3,434 -
9
votes2
answers4659
viewsWhat is the flush parameter of the print function?
I realized that there is the parameter flush in function print python: print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False) I know that: The parameter *objects sets the list of values to…
-
9
votes2
answers551
views". read" firebase security rules
I created the following security structure in Realtime Database: { "rules": { "receita": { "$chave": { ".write": "auth.uid === newData.child('usuario').val()", ".read": "auth.uid ===…
-
9
votes1
answer429
viewsHot key for "surround with" in Notepad++
The Phpstorm editor has a hot key for the "surround with" command, someone knows if Notepad++ has this feature and which hot key?
-
9
votes2
answers12801
viewsSerialize with pure Javascript
Using jQuery I can use the method .serialize() to return in string form all the form items with their respective values, for example, the form below, will return me:…
-
9
votes2
answers1582
viewsWhat is the difference in the syntax ptr = (int*) malloc (sizeof(int)) and ptr = malloc (sizeof(int))?
I have a question about dynamic allocation in C. At the time of allocating memory I have seen these two types of syntax: ptr = (int*) malloc (sizeof(int)); ptr = malloc (sizeof(int)); But I don’t…
-
9
votes3
answers318
viewsIndentation in statement "Else"
What is the difference in the indentation of else "out of" the if. In this case it is to return the prime numbers up to the nth 'n' value. First case: for i in range(2, n): for j in range(2, i): if…
-
9
votes3
answers1950
viewsError when compiling Angular 5 project "is Missing from the Typescript Compilation."
when I try to run the angular server to test the project it fails to build with the following error: ERROR in ./src/app/shared/objeto/Venda.ts Module build failed: Error:…
-
9
votes2
answers995
viewsLazy Loading EF Core, upload daughter entities and daughters?
I have a Web Api I’m developing using the DotNet Core and EF Cor but is with the Lazy Loading active, only that in some cases I need to load the entities daughters and daughters of daughters, I…
-
9
votes4
answers41980
viewsIs there any way to comment on multiple lines in Python?
To comment on a line, we use the #. I wonder if it is possible to comment multiple lines in Python 3. If so, how should I?
-
9
votes2
answers3332
viewsPreload, Prefetch and Preconnect, what are they for?
I see in several sites these values Preload, Prefetch and preconnect in the attr rel of certain links, but I did not understand exactly its functionality. What exactly are they for? When to use?…
-
9
votes2
answers2071
viewsWhen to use static methods mock?
@Fernandoschelb recently asked the question about how to mock static methods. It raised my doubts: If we can do it, when we should do it? What are the cases where static method mock is beneficial?…
-
9
votes2
answers1709
viewsThere is an "Else while"
Is there any way I can do that? As long as it’s one thing to do that, then when it’s another to do that? For example: var i = 0; while(i < 5){ //faça isso i++; } else { //faça aquilo } It’s…
-
9
votes2
answers750
viewsHow to improve the performance of my code with "for"?
I have the following code: for ($i=0; $i < 10; $i++) { for ($j=0; $j < 20; $j++) { for ($p=0; $p < 40; $p++) { echo $vaar[$i][$j][$p]; } } } I believe a code that contains a for inside…
-
9
votes1
answer1000
viewsWhat does __*(any word)__ or _* mean in Python?
Reading a book once in a while he puts __init__ or __init and I don’t know what this "_" means, I tried to search the internet some explanations, but I ended up making myself more difficult, someone…
-
9
votes2
answers1588
viewsData structure representing a deck of cards
I’m developing a project in Python, where I have to play a card game. I am in doubt about which data structure to use, according to the description provided: Each card must be represented by a pair…
-
9
votes1
answer3563
viewsWhat is the maximum size of a JSON file?
I will give an example to explain my doubt: I need to recover information from images coming from an API, this image bank returns JSON’s with information of the images I need, in all there are 33…
-
9
votes4
answers24927
viewsRegex - Picking text up to a given string
I would like to take the text up to the characters a) and if possible and separate responses also using Regex? pergunta pergunta pergunta pergunta pergunta pergunta pergunta pergunta pergunta…
-
9
votes1
answer158
viewsHow to compare relative run time of fast algorithms?
The @Sorack asked the following questions about performance: What’s the most performative way to convert an int into the sum of its digits? What’s the most performative way to convert int[] to int?…