Posts by Fillipe • 555 points
20 posts
-
0
votes0
answers43
viewsQ: Error in condition in Fortran
Because the code: program acosseno implicit double precision(a-h,o-z) PARAMETER(n=5) dimension x(n) dimension y(n) alfa=0.6D0 k1 = 3 k2 = 5 print *, "Alfa is: ", alfa open(1,file='a.dat') x(1) =…
-
2
votes1
answer1286
viewsQ: Django: how to use Forms.Validationerror and display messages in the template
I would like to inform a message to the user (in the html template) when identifying an existing email on the registration page. In Forms.py I use the function clean_email to check if there is an…
-
3
votes1
answer1208
viewsQ: Multiple users and authentication - Django
I am developing a project in Django that has two types of users: Client and Accountant. Each one is authentic and has keys that identify them differently. The Customer has as its primary key its…
-
12
votes1
answer996
viewsQ: Estimate the Poisson - R distribution
I have a grafo and calculated the distribution of degrees and degree as follows: dd <- degree_distribution(graph) d <- degree(graph) From that, I cherished the Power Law, to see if my…
-
2
votes1
answer243
viewsQ: Linetype and Shape in ggplot2 on R
I am using the following code to plot 3 functions: ggplot(data.frame(x = c(0, 2)), aes(x)) + stat_function(fun = exp, geom = "line")+ stat_function(fun = dnorm ,geom = "line")+ stat_function(fun =…
-
1
votes1
answer124
viewsQ: Plot of the degree distribution of a graph in R
I have a graph and I want to plot the degree distribution. Example: > library(igraph) > g <- make_ring(10) > degree(g) [1] 2 2 2 2 2 2 2 2 2 2 > g2 <- sample_gnp(1000, 10/1000)…
-
4
votes2
answers381
viewsQ: combine vectors per line in R by filling voids
I have two vectors: a <- c(1,2,3,4) b <- c(1,2) I want to create a matrix combining the vectors per line that looks like this: 1 2 3 4 1 2 0 0 That is, unite two vectors by rows and fill the…
-
4
votes2
answers4518
viewsQ: Select multiple lines of a data.frame from the highest R values
I have the following date.frame in R: df <- data.frame(x = c(10,10,2,3,4,8,8,8), y = c(5,4,6,7,8,3,2,4)) df x y 1 10 5 2 10 4 3 2 6 4 3 7 5 4 8 6 8 3 7 8 2 8 8 4 First point: I would like to get…
-
5
votes1
answer210
viewsQ: Plot grid histograms with fixed Y-axis - R
I would like to plot two (or more) histograms in R where the Y axis prevails a global value for all histograms. I don’t want overlapping histograms, I want overlapping histograms. The more histogram…
-
1
votes1
answer160
viewsQ: Python / R Check density peaks in ggplot2
I have two sets of data formed as follows: A= {id1: 0.3, id2: 0.1, id3: 0.3 ... idn: 0.2} B= {id1: 0.01, id2: 0.04, id3: 0.75 ... idn: 0.9} I used the function ggplot R to plot the densities values…
-
2
votes2
answers22203
viewsA: What’s the difference between failure, defect and error?
Glitch: Imagine the second line of code: if (x < 10):{ //WHOLE } The programmer forgot to put the "=", in case the correct code would be: if(x <= 10){ //WHOLE } i.e., failure, is any external…
-
0
votes0
answers371
viewsQ: Plot graphs - R
Does anyone know a library, in R, for plotting graphs with large amounts of vertices ( close to 3,000 vertices)?
-
3
votes1
answer1008
viewsQ: Histogram R. Changing the values of the axes!
I have a variable with the following value: > pontos c d b a 0.6666667 1.0000000 0.3333333 0.6666667 hist(dots, main="dots ", xlab="p", ylab= "f") the result is: My values of the X axis will…
-
1
votes0
answers62
viewsQ: get.shortest.paths in time graph
I’m using the "igraph" library and I’m working with dynamic graphs. I have the following graph: VertexFrom VertexTo TimeStart TimeStop to c 1 1 a d 2 2 b d 2 2 c d 3 3 d b 3 That is, v1 is connected…
-
1
votes0
answers186
viewsQ: Help with using the igraph and timeorded library in R
I’m using the lib 'igraph' and 'timeorded' (http://www.benjaminblonder.org/timeorderednetworks/) to work with time graphs. I have the following time graph: "graph.txt": a c 1 1 a d 2 2 b d 2 2 c d 3…
-
2
votes1
answer60
viewsQ: Checks for a vertex in R
I am using igraph on R. I have the following graph: Is there any function in R, which returns me a boolean value, which verifies the existence of a vertex?…
-
1
votes1
answer42
viewsQ: Changing list by reference in R
I have the following problem. I have 5 graphs (per hour, it won’t matter the structure of each graph, only that I have 5 graphs) and put them inside a list in R. I will make changes to these graphs…
-
3
votes1
answer237
viewsQ: "Join" two graphs in R
I’m using the library igraph to create two graphs in R: g.v1 <- graph.full(6, directed= TRUE) E(g.v1)$weight <- 1 g.merchant <- graph.empty(1, directed=TRUE) E(g.merchant)$weight <- 1…
-
0
votes1
answer1363
viewsQ: Push 'infinitely' keyboard button
I am running a python3.5 test using the pyautogui library. My goal is for the algorithm to press buttons for me. import pyautogui while True: pyautogui.press('f1') In this case, it is pressing F1. I…
-
4
votes1
answer733
viewsQ: Lexical Analyzer using LEX
I am using the LEX generator to do a lexical analysis of a simple C++ code. The following code is from the generator: %{ #include<stdio.h> %} extern FILE *yyin; %% "<" {printf("(Identifier,…