Most voted questions
150,413 questions
Sort by count of
-
5
votes1
answer695
viewsSELECT within variable in PROCEDURE
I’m not getting the result of a select within a variable. I want to add the column turno inside my WHERE. The problem is I get the value of @turnos in the following 3 formats: 1 - 'A' 2 - 'A','B' 3…
-
5
votes1
answer423
viewsWhat is the use of arrays in r?
vector, matrix, data.frame and list are widely used in data analysis and tag peguntas r here in the website. In particular, I see no applicability of array in r. For example: vec_1 <- c(2:4)…
-
5
votes1
answer1144
viewsHow to train a decision tree in R?
Let’s say I have the following data sets. set.seed(123) n <- nrow(iris) indices <- sample(n, n * 0.8) treino <- iris[indices, ] teste <- iris[-indices, ] How could I use the R to train a…
-
5
votes2
answers70
viewsHow to check the absence of a pointing device on the page on desktops?
In a project that aims to work only on desktop devices (desktop PC or notebook) it is mandatory to use a mouse (or pointing device, which can be a touchpad). If the user accesses from a mobile…
-
5
votes1
answer687
viewsHow to use the Foreign Key annotation in C#?
I am layman and would love to learn about. I will use in the example Model A and B not to get confused: I saw about the Model A take note Foreign Key in prop virtual Model B virModelB referencing a…
-
5
votes2
answers2215
viewsWhat is the difference between using a "Constraint" in "Foreign key" or not?
When creating a table in Mysql I used to create fields CONSTRAINT FOREIGN KEY how are you following to create the foreign key: CREATE TABLE socio ( id_socio INTEGER NOT NULL, nome VARCHAR(256) NOT…
-
5
votes0
answers63
viewsProgressibar with Steps position gets wrong
I’m having trouble leaving in the correct position of the flow with progress <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/checkout_hsv_scrollview"…
-
5
votes2
answers185
viewsWhat is the relation of the <figure> tag to the main stream in HTML?
Reading about the tag <figure> I found this text in MDN documentation: The HTML Element <figure> represents the independent content, often with a caption (<figcaption>), and is…
-
5
votes1
answer82
viewsSelect the dataframe with the highest number of rows in a R-list
Hello, I am drawing a loop and at a certain precise moment select the dataframe with the highest number of lines within a list. Example: df1 <- data.frame(a = 1:15) df2 <- data.frame(b = 1:35)…
rasked 5 years, 8 months ago Jessica Voigt 883 -
5
votes3
answers673
viewsHow to go through the data.frame cases using `dplyr`?
I am trying to analyze the cases (lines) of a data.frame with dplyr, but without success. I created two functions for this: f1 <- function(x) { c(s = sum(x), m = mean(x), v = var(x)) } f2 <-…
-
5
votes4
answers5739
viewsHow to separate the letters of a string that are inserted into a list and place them in an array?
I have a list with the word "test", arranged in such a way: ['teste','teste','teste','teste','teste'] I would like to turn this list into a matrix, in which the letters are separated from each…
-
5
votes2
answers504
viewsPop up an icon in the middle of my image by hovering the mouse
I am trying to bring up a zoom icon on top of an image while passing the mouse over it (The screen has several images, the icon should appear only in the image that the user passed the mouse) I…
-
5
votes1
answer410
viewsR - How to calculate the density from the accumulated curve based on the Cox regression model
I calculated the accumulated probability (cdf) of my data, based on the probability of exceedance (Edf), using the Cox regression model. So far ok, no problem at all. However, does anyone know if…
-
5
votes1
answer181
viewsHow to parallelize on multiple levels in R?
I’ve been researching how to parallelize for in R and found the package foreach, which, from what I understand and correct me if I’m wrong, replaces the for as follows: library(foreach) vetor <-…
-
5
votes2
answers64
viewsAbout CSS flexbox: equal values for properties other than CSS
I am studying the language documentations, and it occurred to me the following doubt: Both the property align-content as to property align-items accepts the values: flex-start flex-end stretch And…
-
5
votes1
answer131
viewscode-prettify does not work with linear code (a single line)
I’m using the Google library to format code: Google code-prettify It works very well in almost every case, but as my text comes in a single string, it doesn’t work as well. It works well for:…
javascriptasked 5 years, 8 months ago Dorathoto 7,426 -
5
votes2
answers68
viewsHelp with flexbox
I’m struggling to do this with flexbox. With float was very easy as it organizes easily. .slider > div > img { width: 100%; height: 100%; } .slider > div.item-1 { width: 60%; height: 500px;…
-
5
votes2
answers196
viewsHow to Optimize/Simplify CSS
I created a photo album using a list and customizing with CSS, but when I see the CSS became huge, I don’t think I know how to make my code more functional, someone can give me tips? @charset…
cssasked 5 years, 8 months ago Filipe Petter 61 -
5
votes1
answer100
viewsAmount of index influence on performance?
I have a relatively large database. And the consultation in it varies a lot and I have some doubts regarding performance: 1- Create multiple indexes, taking into account the Where (E.condicao = '1')…
-
5
votes3
answers254
viewsSearch id of relative element of relative
Goal Fetch the id the "father’s father" of an element. Test scenario function filhoPai(filho){ var filhoId = '#' + filho; var pai = $(filhoId).parent().attr('id'); alert(filho + ' - ' + pai) }…
-
5
votes4
answers720
viewsChange comma per point
I want when a user type , (comma), this is replaced by . (point). But when I insert the script below, it shows no result. Can someone help me find the mistake? function substituiPonto(){ valor =…
javascriptasked 5 years, 8 months ago Moises Moraes 137 -
5
votes2
answers5035
viewsWhat is the range() function in Python for?
What is the function for range() in Python? What is its real use? It’s just a numerical list?
-
5
votes2
answers156
viewsPin tabs bar below navigation bar (navs x navbar)
Goal Create a tabs menu bar, below a menu bar, both fixed. Test scenario <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script…
-
5
votes2
answers1131
viewsSQL QUERY using MAX function
I’m having a problem with a basic consultation of SQL, is for a migration of database. The query aims to bring data from the table of ASSOCIADOS/CLIENTES, but beyond this table I have another…
-
5
votes3
answers144
viewsIs there any way to pass the parameters to a constant function?
I’m trying to do the following, I have this connection to Influxdb: InfluxDBClient('localhost', 8086, 'root', 'root', 'example') But I want to turn these parameters into a constant, so I don’t have…
-
5
votes0
answers48
viewsUse of Else outside an if
I was writing a program that would give me all prime numbers between 1 and a certain number that should be informed by the user. After several adjustments to the code, I came to the following final…
-
5
votes2
answers190
viewsRestart the layout
I made two buttons that set Adapter in recyclerview, each arrow button a different layout, but only doing so findViewById(R.id.layout2).setOnClickListener(new View.OnClickListener() { @Override…
-
5
votes2
answers130
viewsR - cut digits
Would someone like to tell me how I can cut digits in the R? Example: ano <- c(1999,2000,2001,2002,2003) And only to return: #[1] 99 00 01 02 03…
-
5
votes1
answer79
viewsHow do I get a value from a cell in R?
I imported my data that was in a spreadsheet from Excel to the R, by placing them in a variable called umParticipante. However, when I make the following code: umParticipante.nome <-…
-
5
votes2
answers1140
viewsHow do you input one input into the other?
Hello I’m new here and I’m having a big doubt... I have this code: <!DOCTYPE html> <html> <head> <title></title> </head> <body> <h2>Este campo é…
-
5
votes2
answers11728
viewsWhat characterizes a "basic CRUD" project?
Round and a half comes up a question talking about application "basic CRUD". I understand that the application contains basically the so-called "sign up screens", from which manipulate tables in…
-
5
votes1
answer7465
viewsHow to undo the last push done on Github?
I’m trying to learn Git and in the middle of my tests I made a push incorrect for Github. I did the reset of the latter commit and tried to give a push again thinking that it would remove the commit…
-
5
votes4
answers110
viewsMaintain select element value when cloning with jQuery and deleting Labels
Test scenario function addReg(){ var reg = $('#registro').clone().removeAttr('id'); reg.children('label').remove(); $('#formX').append(reg); } <link…
-
5
votes1
answer456
viewsUsing C# Threads for the First Time
I’m trying to make use of C# Threads for the first time, I’m a beginner in the subject, so I’m sorry for the question if it’s too basic. I am using the code below to use such procedure: private…
-
5
votes2
answers3064
viewsSwap line break " n" for " r n" in Richtextbox
I have a RichTextBox that needs to count the breaks of lines as "\r\n", but she’s counting as "\n". Example: "Hello, (User squeezes Enter)world!" To RichTextBox interpret like this: "Olá," + "\n" +…
-
5
votes1
answer203
viewsWhat is the importance of specifying the size of a field in the field?
I would like to know if it really is, and why it is important to pre-specify the size of some string/text/... field in the Migrations in the Laravel. From what I imagine, maybe these specifications…
-
5
votes3
answers150
viewsTwo equal programs providing different outputs
I’m developing a program that’s one of those classic programming exercises that involves the Fibonacci sequence. The program is simple, it asks the user to enter a term of the sequence and the…
-
5
votes1
answer181
viewsReturn date reversed in PHP
I am preparing a report based on the initial date (start_date) and final date (end_date). My return from filter comes through the POST, if I use then print_r($_POST), I note that the date comes in…
-
5
votes1
answer3676
viewsWhat are software components?
"Component" is a word used in various contexts and I imagine that it is difficult to define generically. By definition it is a part that makes up a whole. For example, a subsystem. It is also said…
-
5
votes2
answers661
viewsHow to transform the class of a "factor" column into "date" within a data.frame?
I have a base extracted in csv (dados_base), with the period from Dec/2017 to Jan/2019, which has three columns: USUARIO, DT_PAGTO and VL_PED_PG, where the first field represents users with the…
-
5
votes2
answers186
viewsWhat is the use of the ".Random.Seed" vector?
I realized that in the r there is a hidden vector in the globalenv(), called .Random.seed. Even with the globalenv() with no object, .Random.seed is still available when using the function ls with…
-
5
votes1
answer98
viewsCan Union and struct be considered operators?
One union or a struct can be considered operators? As well as return, goto and sizeof?…
-
5
votes4
answers4136
viewsCount equal values in one data frame and store in another in R
I need to count the equal values of a column in a data frame (database with the total name) and store the total in a column of another data frame (database with the unique name) that contains the…
-
5
votes2
answers127
viewsHow to use Groupby according to parameter?
I have my Model account as below: public class Conta { public int Id {get;set;} public int ClienteId {get;set;} public Cliente Cliente {get;set;} public int ContaBancariaId {get;set;} public…
-
5
votes1
answer1014
viewsDifference between 'Regular language' for 'irregular language'
Reading a question about basic programming concepts, I come across the following statement: Let A and B be two languages over the binary alphabet, that is, over the alphabet composed only of 0’s and…
computer-science computer-theory automata formal-languagesasked 5 years, 9 months ago Luiz Augusto 2,482 -
5
votes2
answers1319
viewsJust take a commit from a github project?
I’m following a step-by-step project of a course, there they make a video lesson and at the end of it they commit to the github with the content made of that project in that class... In order to do…
-
5
votes2
answers69
viewsSort a Select by criteria outside the database
I would like to create a SELECT with the personal relationship here of my company. SELECT função, nome FROM responsavel; So far so good. But as ordered by the Manager, passing by the Incumbent,…
-
5
votes2
answers4293
viewsBreak and Continue on foreach Java 8
How to give a break or a continue in an iteration using forEach, in the example below, I could use the same forEach for the execution of the validation? List<Contratos> contratos= /* populando…
-
5
votes1
answer1933
viewsSwap String part in all dataframe columns
I have a dataframe in the following template: lista = [] lista.append(['A1','2','A3']) lista.append(['4','A5','6']) lista.append(['A7','8','9']) df = pd.DataFrame(lista, columns=['A', 'B', 'C']) df:…
-
5
votes2
answers1202
viewsJava Runtime could not be Located in Visual Studio Code
I already have JDK installed, but Visual Studio Code does not recognize and presents the following message: What must I do for him to recognize? For I have the Language Support For Java(TM),…