Most voted questions
150,413 questions
Sort by count of
-
5
votes1
answer150
viewsCase of use of the SRP concept in a real application
I’m studying some concepts of OOP and I see a lot about the issue of SRP, "separating actions into classes etc". at the level of testing, I decided to create a small system for registering users in…
-
5
votes1
answer142
viewsDouble map the same entity
I’m trying to map the same entity twice into another public class Conveniado { public int Id { get; set; } public string Nome { get; set; }…
-
5
votes2
answers200
viewsHow to create a Stopwords using R
Hi, I need to do a task and I’m not getting into a logical reasoning. My scenario is: I have a DF with several columns, I need to "read column 3", identify the words and sort. Example: DF nome rua…
-
5
votes3
answers3023
viewsCompilation and execution error difference
A build error would be the one the IDE already warns about even before compiling, such as missing a semicolon, correct? But what about the error of execution? It would be for example a Exception?…
-
5
votes2
answers78
viewsDeleting columns containing NA s in their last 5 rows
I have this personal dataframe, set.seed(1) df <- data.frame(A = 1:50, B = 11:60, c = 21:70) head(df) df.final <- as.data.frame(lapply(df, function(cc) cc[ sample(c(TRUE, NA), prob = c(0.85,…
-
5
votes1
answer69
viewsExtract dataframes from lists with dataframes under given criteria in R
I organized my list of dataframes like this: df.1<-as.data.frame(matrix(rnorm(10),10,80)) df.1.in.list<-split.default(df.1, gl(10, 8)) On the list df.1.in.list i would like to keep the…
-
5
votes1
answer349
viewsWhat is Reduced Motion Media Query?
I recently saw that there is the concept of Reduced Motion Media Query in the CSS, which apparently is a response to the animation settings in the client’s browser and is used in code primarily by…
-
5
votes1
answer23453
viewsHow to filter, select and count data on a pandas.Dataframe?
How to get quantity of records based on multiple columns of a given name? My dataframe looks something like this: import pandas as pd df = pd.DataFrame([["1111", True, True, False, True, True],…
-
5
votes2
answers2346
viewsAlign image next to text while respecting vertical spacing
I’m trying to get the images aligned to the right, respecting the spacing between the tags <p>, but it’s getting like this: I need something like that: My HTML code is as follows:…
-
5
votes2
answers76
viewsSQL SERVER Counting the data of a record
I came across the following situation: The table below is a Checklist and has a column of covenants, the others are questions answered with yes(1), no(0) and semPreenchimento(null or 9). I wanted to…
-
5
votes1
answer1383
viewsIn HTML how to increase the space between Tds without using cellspacing cellpadding?
My idea is to make a table where it has a spacing between cells, as in the image: But according to the Mozilla documentation for example, it is possible to confirm that the attributes cellspacing=""…
-
5
votes1
answer122
viewsIs there any way to use a "custom-attribute" as the value of a CSS property?
I would like to know if there is a possibility of using a custom-attribute of the kind data-*=" " as value for a CSS style or even use this custom date as a value for a variable in the CSS. To…
-
5
votes1
answer570
viewsHow to leave the background of a text the size of the text and not the paragraph?
How do I make for the background-color of h4 be only the width of the text. I can’t delimit a fixed width because I don’t know the size of the text and I can’t use display:inline-block why need the…
-
5
votes1
answer1146
viewsDynamic stack - C
I’m studying dynamic stack from the code below: #include <stdio.h> #include <stdlib.h> #define tam 50 // ---- Estruturas para os tipos…
-
5
votes1
answer50
viewsProblem using ggplot by group
This is my dataframe: structure(list(ind = structure(c(177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L,…
-
5
votes3
answers1003
viewsHow to make a select within a condition?
How can I create a script in SQL where a SELECT, and as the result of a column of this first, performs a certain condition of another table? example: select * from tabela as t SE t.saldo = 0 entao…
-
5
votes2
answers6999
viewsLink href to id div
Well I know we can make links by directing the click href for a page id using #. #content1, #content2, #content3, #content4 { height: 50vh; border: 1px solid red; } <a href="#content1">…
-
5
votes1
answer3138
viewsWhy when using ON DUPLICATE KEY UPDATE or REPLACE, do we have change in 2 lines?
Example When executing any of the 2 commands, the message is returned: 2 Row(s) affected Query: ON DUPLICATE KEY UPDATE: INSERT INTO `banco`.`tabela` (`id`, `resumo`, `descricao`, `grupo`,…
-
5
votes2
answers397
viewsMYSQL - Check if PK exists if it does UPDATE if it does not exist
I didn’t want to have to do two transactions in the database, currently I’ve been doing SELECT first to know if the record already exists in the table, then I do either INSERT or UPDATE depending on…
mysqlasked 6 years, 1 month ago SneepS NinjA 7,691 -
5
votes2
answers188
viewsInclude html fields in the title panel
I’m using bootstrap, and I use a panel title at the beginning of the form, which informs the name of the form I’m in right I would like to put in the case the current date if it is a new…
-
5
votes1
answer138
viewsScroll Infinity ASP NET MVC C#
Good afternoon, I am implementing an infinite list in Asp net mvc and I have some questions about what is the best way to do this. I implemented using partial view, making a request via ajax and…
-
5
votes2
answers446
viewsHow to take 2 PHP arrays and join in 1 string
I have 2 PHP arrays that come from a form $_POST['qtd'] and $_POST['ing']: array(2) { [0]=> string(1) "1" [1]=> string(1) "2" } array(2) { [0]=> string(1) "a" [1]=> string(1) "b" } It…
-
5
votes2
answers1821
viewsHow to implement a queue using two stacks
Hello, I need to implement a queue using two stacks, IE, I need to insert an integer on stack 1, and when removing an element all items on stack 1 should be transferred to stack 2, making it look…
-
5
votes2
answers410
viewsPrivate class in Javascript
I’m looking for a way to make both attributes and methods invisible so they’re not accessible from outside the class. But I also wanted to use the modern approach to do this (class Nomeclass{}).…
-
5
votes2
answers1048
viewsForeach PHP JSON json_decode How to print sub array
Good morning folks! My question is this. I created a foreach to access the data below an API $token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; $headers = array('Authorization: Token ' . $token); $ch_subs =…
-
5
votes1
answer68
viewsGitlab does not display all changes
In one of the Gitlab repositories it turns out that 93000 lines were added in a commit. When I search for this commit locally, using commands like git log, git show for example, I have a return,…
-
5
votes2
answers235
viewsHow can you clone cards on my website?
what is occurring is the following. I am currently trying to solve a big problem, two of the company’s online stores that I serve are having a problem with card cloning. I don’t have much experience…
-
5
votes1
answer186
viewsProblems with graphs in Java
I’m making a URI issue and in the lobby they ask so. Input: The input ends in EOF. For each test case, the first line contains two positive integers C and P that represent respectively the number of…
-
5
votes1
answer228
viewsA Rigger can "undo/undo" the action that triggers it?
Example scenario I have a table telefones where I have a Trigger that is fired while performing the instruction Insert. Doubt I can use the Trigger for verify a condition and before the return,…
-
5
votes1
answer41
viewsSelect by days of the month returning 0 when there is no record of that day
I have a company call database, for example let’s say the table has only: -- TABELA CHAMADO -- id (id do chamado) inicio (data de inicio do chamado) id_criador (id do usuário que abriu o chamado)…
-
5
votes3
answers738
viewsWhat is the $() [dollar sign followed by parentheses] for in BASH?
I’ve seen some examples of code in the BASH where it’s used $() to be able to execute a command. For example: sudo chown -R $(whoami) . What this means followed by the enclosed command in…
bashasked 6 years, 1 month ago Wallace Maxters 102,340 -
5
votes1
answer728
viewsWhat is and what is the explanation for type-safe in C#?
Not being able to understand the concept of type-safe in C# and what is its use, since C# is type-safe.
-
5
votes1
answer782
viewsHow to create Trigger for all tables in a bank automatically?
Example scenario I have a database with 1,000 tables. One table call log. Goal I would like to create a Trigger "standard" in each of these tables, automatically. That one Trigger, whenever there is…
-
5
votes2
answers103
viewsHttpstatuscode does not exist code 207, 208 and 226
What to do when class HttpStatusCode there is no code 207, 208 and 226 ? Someone already asked the question on Github: https://github.com/dotnet/corefx/issues/4382, I don’t think they did an…
-
5
votes2
answers1079
viewsHow to do a random query in Mysql without repeating data?
I’m creating a site type images type Pinterest that, in addition to other things, need to combine the following features: Infinite Scrool (I’m applying this code here:…
-
5
votes1
answer486
viewsApplying datepicker to a dynamic input with Jquery
I have a form where you can add several fields with datepicker. However, when adding a new field to the form, the Jquery datepicker is not loaded. This is the JS responsible for cloning and adding…
-
5
votes2
answers97
viewsWhat are the consequences of not working on data typing?
I want to create an application where the client can create a new form or table, in which he can choose the data type of the field, such as number, text, binary, etc. An "easy" solution would be to…
-
5
votes1
answer696
viewsHow to set up languages in Asp.net Core
I’m setting up the AddLocalization So the problem is that Resources are in a separate class library of the project and I don’t know how to set up. services.AddLocalization(options =>…
-
5
votes2
answers933
viewsTake the index of a value in an array
How do I get an index of a value of mine array? For example: char[] letras = new char[]{'a','b','c','d'}; In letras, i would like to pick up the value index b for example. How do I do this in C#?…
-
5
votes2
answers908
viewsWhat is the real PHP interface utility?
I know what interface is used as a common pattern. But it doesn’t seem useful. Because what good it is to create an interface that only has the name of the methods? I have to encode each of them in…
-
5
votes1
answer105
viewsAverage is not calculated
I need to write a code that reads only 20 integer values, at the end add the positive numbers and average the negative numbers. It normally adds up the positives but when it arrives at the time of…
-
5
votes1
answer132
viewsComparison of hours in Laravel
I’m trying to create a method that will return the amount of minutes since the last insertion in the bank. That’s the way I did it, but I’m making a mistake: $now = Carbon::now(); $minutes =…
-
5
votes2
answers212
viewsUPDATE is a DELETE followed by an INSERT?
On another issue (In Trigger we have INSERTED, DELETED, but the "UPDATED"?) this doubt arose as to the form of the database execution, due to the form that the Trigger access an altered record.…
-
5
votes3
answers1422
viewsConvert string with HTML tags into an array
Consider the following string: var texto = 'Esse é um texto de <span class="red"> teste </span>'; I need to transform the string into an array separating by space, ie: var palavras =…
javascriptasked 6 years, 2 months ago Filipe Moraes 8,737 -
5
votes1
answer616
views.txt with C password?
I’m dealing with file manipulation . txt and I wanted to know how to create a file . txt with a C password, so that this file cannot be opened by the notepad or other program without the password.…
-
5
votes2
answers544
viewsIs there any way to access a CSS value?
I’m trying to adjust a css image on my site, and I want to extend the image on the whole screen, only for that I have to assign to my image: margin-left, to correct the positioning of the screen.…
cssasked 6 years, 2 months ago Vinicius Morais 1,293 -
5
votes1
answer2507
viewsFind and show the way - maze in C
Guys, someone can help me. I need to implement a recursive function that gets a maze and a current position. The labyrinth is given by an array of characters ("char") where ːX' represents a wall,…
-
5
votes1
answer72
viewsAtomic Types in C language
What is the difference between primitive and atomic type ? What are atomic types for ? In which situations they are applied ?
-
5
votes1
answer663
viewsWhat would be the best HTTP response to inform the client that it cannot delete a single record?
I have an application where I established the following business rule related to user registration: The user may have multiple addresses linked to him, but it is mandatory that he has at least one…
-
5
votes1
answer1694
viewsTorque calculator in C
I have this function that converts decimal to binary, but then how do I sum the bits, or use the & (and), etc. ? Use the operator & do we have to count to 2 decimal places? Ex: 25 & 25…