Most voted questions
150,413 questions
Sort by count of
-
6
votes1
answer419
viewsHow to rename a Constraint in mysql?
I created a Constraint primary key in my table as follows: CONSTRAINT PK_user_type PRIMARY KEY(id) But now I need to rename it: CONSTRAINT PK_type PRIMARY KEY(id) Based on this, I have the following…
-
6
votes2
answers139
viewsWhat are the consequences of leaving the system without closing the tables?
What are the consequences of Quit / Quit of a system without closing the database tables? This harms something in the database? I should or should not close the system tables? procedure…
delphiasked 6 years ago Edu Mendonça 2,564 -
6
votes4
answers324
viewsInterpretation of loop of repetition
I’m having trouble understanding the following code that is presented as a book exercise. $a = true; $b = -2; $c = 7; for ( ; $b < $c || $a; $b++){ if ($c + $b * 2 > 20) $a = false; echo $b."…
-
6
votes3
answers320
viewsOn fixed footer position only at the bottom of the page
I have a layout with menu fixed to the left, the page content occupying the rest of the space and a footer also fixed: * { margin: 0; padding: 0; text-align: center; } nav { z-index: 2; width: 25%;…
-
6
votes1
answer170
viewsGenerate new Migrations based on all models
I need to create an Migrations with all the models created (I ended up deleting the first Migration and I am not able to create the authentication database).
-
6
votes1
answer292
viewsWhat’s the use of padding Bootstrap’s container?
What’s the point of padding of container of Bootstrap if the row has a margin negative that cancels this padding? If I want my entire page to have one padding so it doesn’t stick to the edge like I…
-
6
votes2
answers354
viewsGenerate sequence in R
my logic is failing. But you could help me create a number array in R with this rule here? Vetor=1,222,2,223,3,224,4,.......,221,442 Thank you very much.
-
6
votes3
answers62
viewsBest way to apply a Pattern to the acronym
I have the following possible returns: AB A1 To The first will always be a letter, the second may or may not occur and may be letter or number. In Javascript it looks like this (Example): if…
-
6
votes1
answer499
viewsCOUNT(*) x COUNT(1) x COUNT(id)
I would like to understand better about the difference between these ways of using the counter: select COUNT(*) from tabela select COUNT(1) from tabela select COUNT(id) from tabela This question…
-
6
votes3
answers1376
viewsFill column of a data frame with data from another data frame in R
I have the following df (data1): ITEM CLASSIFICACAO 123 AZUL 456 AMARELO 789 234 VERDE 345 PRETO 456 567 678 ROSA I need to fill in the blank lines of the column CLASSIFICACAO using another data…
-
6
votes1
answer66
viewsWhy does (a < x < b) produce a result other than ((a < x) and (x < b))?
List all fields of all products whose cost plus 30% is greater than 8 and less than 10. That was my answer: SELECT * FROM `produtos` WHERE (8 < (pcusto*1.3) < 10); This is the feedback: SELECT…
-
6
votes4
answers7118
viewsChanging the name of a variable in a dataframe R
I have a dataframe with 34846 observations and 15 variables, I would like to know how to change the name of a variable. Example: I have the variable "Country" and I would like to rename it "Country"…
-
6
votes2
answers639
viewsHow to split the dataframes of a list based on a group variable, common in all of them?
I have a list with n dataframes. They have a common variable, called group. I want to analyze the dataframes only with the groups a and c of group. My goal: to return, within the list, these…
-
6
votes2
answers1944
viewsView or temporary table?
Analyzing a code problem I came across different approaches to similar problems where one has a view for data access, and another uses a temporary table. I searched and found this question which…
-
6
votes2
answers694
viewsWhat are semantic messages in Git?
Eventually, when I browse some of the Github repositories, I come across certain messages from commit standardized: feat(*): initiate re-write Or: refactor(*): remove unwanted files What are these…
-
6
votes2
answers505
viewsHow to limit the interval between two dates in the <input type="Month">?
Although there are 3 questions I believe that all apply to the same case about the "range/range" It is possible to limit the "range" between two dates in the <input type="month">? If yes,…
-
6
votes2
answers782
viewsHow to create a Restful API with asynchronous processing and response using C# + Angular(v5+)
Hello, I am working with C# and I have the following problem: Imagine I have a route to my API api/estoque/inventario where this route should make the calculation of the inventory of the entire…
-
6
votes1
answer740
viewsAdd sequence of numbers in Javascript
Let’s assume that the user type the value 40391, so I need to add incrementally all values from 1 up to 40390, which results in the value 815696245. Today I do it with a simple for but I realized…
-
6
votes1
answer376
viewsHow to specify a time when changing colors with :Hover?
<a href="#">link</a> a:hover{ color:blue; } With this script I can change the color of the text "link" when the mouse hovers over, but the color is changed instantly. I wanted the color…
-
6
votes1
answer472
viewsHow to reduce the spacing between printed characters with t in C++?
I wanted to place the columns closer so that it doesn’t happen as in figure 2. int i,j,elemento; for(i=0; i<elemento; i++){ for(j=-elemento; j<=elemento; j++){ if(i >= abs(j)) {…
-
6
votes1
answer142
viewsHow does "umask" work in PHP and when should we use it or not?
I was reading the documentation of umask and I came across this: When PHP is being used as a server module, the umask is Restored when each request is finished. Translating: When PHP is being used…
-
6
votes3
answers418
viewsIs it possible to create a letter seal element with CSS?
What is the best way or way to build an element similar to a CSS-only Letter Seal? (at the moment I didn’t want to have to use SVG) I’m trying to build this shape with HTML/CSS and the option I have…
-
6
votes3
answers1597
viewsHow to open a. php file that is in a subdirectory?
My index.php has this script inside it: <?php $pagina = empty($_GET['p']) ? 'home' : $_GET['p']; switch ($pagina): case 'contato': $titulo = 'Contato '; $keywords = ''; $descricao = ''; break;…
-
6
votes1
answer279
viewsObject-oriented PHP encapsulation
I have two models User and Post. When editing a post, I want to know if the user is the author of post (the post has an attribute user_id) to authorize the edition. If I have a method within the…
-
6
votes1
answer933
viewsInclusion billet box
Friends, I am trying to include a billet in the Box Webservice, however, when using the layout passed in the documentation, I am not successful. The error is this: (500 Internal Server Error)…
-
6
votes2
answers247
viewsInfinite scroll on one page with static data
I have the following extrusion and want to limit the amount of "class/posts" to be displayed. I want to create a button so that, when clicking, it displays and goes showing more and more…
-
6
votes3
answers3659
viewsIn Trigger we have INSERTED and DELETED. Why not "UPDATED"?
Example scenario: I have the table/fields: documentos id documento pessoa item qtd valor The system gives INSERT and then UPDATE on this table in a continuous sequence (which would not come to the…
-
6
votes1
answer58
viewsHow does an annonymous innerclass arrow a private instance variable?
Since Java does not actually have closures, but emulates behavior with a technique using Inner classes, the following code: class Test{ private int myField; private void doSomething(){…
-
6
votes1
answer41
viewsMy factorial function does not return the expected value! Language C
My teacher is starting to pass functions, and asked us to do a factorial function of a number, but it always returns the wrong value and I do not know what happens. Code: int fatorial(int n) { int…
-
6
votes2
answers78
viewsIn Java would a variable receive a function like in Javascript?
Example: var x = function (a, b) { return a * b }; Could it be? Or is it a feature of Javascript?
-
6
votes1
answer105
viewsWhat is currentColor and how do I use it in CSS?
What is the currentColor attribute in CSS? What is this attribute for and how best to use it? I would like some examples to better understand. If the element does not have a color or if the color is…
-
6
votes1
answer302
viewsDo you have anything like the C# namespaces in Java?
I noticed the size of the command to put a message on the screen in Java, wanted to know if it has how to decrease? As in C# that the programmer puts the word using "namespace"; and you can use the…
-
6
votes2
answers1324
viewsReturn 0 when SUM is NULL
When you find no results you return to me NULL, how can I make the search return me 0 when it is NULL? SELECT SUM(coluna1 + coluna2 + coluna3) FROM table WHERE nome='funalo' AND MONTH(data) = 09 AND…
-
6
votes1
answer183
viewsWhy is there no "Logical XOR" in C++?
I was thinking and I came up with this question: Why is there "Bitwise OR", "Bitwise AND" and "Bitwise XOR", if in Boolean logic there is only "Logical OR" and "Logical AND". There should be the…
-
6
votes3
answers1082
viewsHow to style "broken image" (when image does not load)
How would it be possible to make a CSS style for when the image is not loaded on the page? When you have the link to the image, but for some reason it is not loaded on the page, or if the link or…
-
6
votes2
answers929
viewsWhat is the difference between expressions : "int a" and "const int& a" as C++ function arguments?
Let’s assume I have two functions: int soma_a(int a, int b){ return a + b; } and int soma_b(const int& a, const int& b){ return a + b; } What would be the difference between soma_a and…
-
6
votes2
answers217
viewsWhat’s the difference between git reset -- <file_name> and git reset HEAD <file_name>?
To remove files from staged area I use the command: $ git reset HEAD <file_name> However I accidentally applied the command: $ git reset <file_name> I forgot the HEAD of command. In…
gitasked 6 years, 2 months ago Allan Dantas 359 -
6
votes1
answer148
viewsProblem with include causing unwanted space
I’m creating a page with some includes (top and footer) and where I put these includes a huge space appears with a strange code () (the code does not appear on the page, only on the…
-
6
votes3
answers5107
viewsWorking days and Java 8 API, how to check?
How do I verify that a day is useful using the Java 8 API? It is possible to check whether it is Saturday or Sunday, but how to check for example holiday like September 7 (Independence of Brazil) or…
-
6
votes1
answer6678
viewsChange APK subscription key on Playstore
Hi, I have an app on Google Play Store that was from another account and that went to my account, because it will not mess with it anymore and the customer asked us to work on the next version. The…
android ionic google google-play google-play-servicesasked 6 years, 3 months ago Alexandre Oliveira 135 -
6
votes1
answer111
viewsWhat is type reference?
Was reading regarding the key word ref and I came across a warning that said not to confuse reference passage with type reference. No doubt this warning left me confused and awakened more doubts…
-
6
votes2
answers99
viewsHow does the mini-code finder work?
I am asking this because I was minificar a JS and he gave me a code that I did not understand very well... My original code: $('input').each(function(a,b){if(b.value ==…
-
6
votes2
answers3155
viewsHow does Python overload polymorphism work?
I recently learned POO in Java and am now learning in Python. There is overload polymorphism (implement methods with equal names in the same class, which depending on the parameters you deliver to…
-
6
votes1
answer372
viewsExecution Time in Programming Solution Challenge
Hello, I need to ask the following question: https://olimpiada.ic.unicamp.br/pratique/p2/2017/f3/arranhaceu/ That is the statement: A residential skyscraper has N floors, numbered from 1 to N. The…
casked 6 years, 3 months ago Antony Leme 197 -
6
votes2
answers795
viewsWhat is http/ftp 220 status?
Contextualizing... when trying to connect to the hosting server, by FTP, always returns the 220 status and, after a few seconds, disconnects by time Being a status of type 2xx is not an error…
-
6
votes4
answers653
viewsCross values in array
I have a value X and I have a array with various values. I would like to search all the same values and smaller, which would enter into a combination that their sum would give the value X. Example:…
-
6
votes3
answers519
viewsHow does C# run on other platforms?
As a complement to this question, run C# on a system where . NET Framework is native, it is default to run the application executable. As far as I know, C# depends on the . NET Framework to be…
-
6
votes5
answers4944
viewsFunction to check palindrome
I have the challenge of writing a code to check if a text is a palindrome or not. I haven’t finished the code, at the moment, it’s like this: function checkPalindrome(str) { var direita = [];…
-
6
votes1
answer273
viewsWhat is the Map object for in Javascript?
This also seems to be another novelty of Javascript: the object Map. Unlike Set, that I already have an idea of how it works and saw in other languages, the Map is something I didn’t get to see in…
-
6
votes2
answers645
viewsWhat is the <output> tag for?
I wonder what the tag is for <output>. I saw this example here on the Internet: <form onsubmit="return false" oninput="o.value = a.valueAsNumber + b.valueAsNumber"> <input name="a"…