Categories
Mastering Development

How to make a button stop listening after being clicked

Hi guys i’m new to programming and I recently just learned javascript. Im trying to make this restaurant system where if you click on a table you can set it as clean, full, or dirty and it will change the tables border color. When I click on one table and change its color it works […]

Categories
Mastering Development

How To Make this table

I wish i can make this table Table that’s my array $column1=array(1,9,17,25,33,41,49,57); $column2=array(2,10,18,26,34,42,50,58); $column3=array(3,11,19,27,35,43,51,59); $column4=array(4,12,20,28,36,44,52,60); $column5=array(5,13,21,29,37,45,53,61); $column6=array(6,14,22,30,38,46,54,62); $column7=array(7,15,23,31,39,47,55,63); $column8=array(8,16,24,32,40,48,56,64); $totalArray=count($column1);

Categories
Mastering Development

Cox proportional hazard model

I am trying to run Cox proportional hazard model on a data of 4 groups. Here’s the data: I am using this code: time_Allo_NHL<- c(28,32,49,84,357,933,1078,1183,1560,2114,2144) censor_Allo_NHL<- c(rep(1,5), rep(0,6)) time_Auto_NHL<- c(42,53,57,63,81,140,176,210,252,476,524,1037) censor_Auto_NHL<- c(rep(1,7), rep(0,1), rep(1,1), rep(0,1), rep(1,1), rep(0,1)) time_Allo_HOD<- c(2,4,72,77,79) censor_Allo_HOD<- c(rep(1,5)) time_Auto_HOD<- c(30,36,41,52,62,108,132,180,307,406,446,484,748,1290,1345) censor_Auto_HOD<- c(rep(1,7), rep(0,8)) myData <- data.frame(time=c(time_Allo_NHL, time_Auto_NHL, time_Allo_HOD, time_Auto_HOD), censor=c(censor_Allo_NHL, censor_Auto_NHL, censor_Allo_HOD, […]

Categories
Ask Mathematics

Flatten the curve or End the Pandemic Early? : best way to make a decision?

I am trying to solve this reward/risk problem which would depend on an individual preference. I have two countries with 2 different hospitalization capabilities. Both of them wants to flatten the curve of a pandemic so they do not want to saturate their hospitals and at the same time they want to end the pandemic […]

Categories
Mastering Development

Encrypt with CryptoJS in JavaScript gives me different results from Java encryption

I am trying to replicate with CryptoJS an encryption done in Java using another library. The encryption’s result in Java is [111,60,-98,107,-60,5,-17,91,-52,60,-105,64,-88,31,97,-102,118,-39,-28,3,70,-12,21,-69,70,-22,-12,-91,102,-21,-88,5,82,-66,-122,34,14,-115,7,82,-55,38,-90,74,-4,62,104,104,61,-78,57,59,-51,31,84,-115,-45,-98,-87,-11,53,98,45,2,-52] and I know that this is the correct payload. So, I am replicating the same encryption with the same values but I don’t get the same array of bytes. The steps are: I […]

Categories
Linux Mastering Development

How to scan range of tcp and udp ports at a time using nmap?

I tried this command but its not scanning udp ports… nmap –open -p T:22,25,53,80,111,443,465,587,953,993,995,3306,5666,8891,U:53,68,111,323,715 13.235.13.13 What is the correct way for scanning udp + tcp ports at a time?

Categories
Ask Mathematics

Show that $3$ divides $p-2$ if and only if $3$ divides $p+1$, where $p$ ia a prime different from $3$..

I can observe this but unable to prove this result. If we start by taking the values of $p$ when $3|p+1$ and $p\neq 3$. We get the values of such $p$‘s: $5, 11, 17, 23, 41, 47, 53, 59, 71, 83, 89, \cdots $ In each case $3$ divides $p-2$. It also holds in the […]

Categories
Mastering Development

Matplotlib | Change in plot representation when applying logarithmic scale

Given a set of points to be represented on a 3D plot (as scatter plot) I thought it would be interesting to plot the same data in 2D instead of 3D thanks to hist2d and using weights. This data has low and high values (some orders of magnitud apart) so when represented as a hist2d […]

Categories
Mastering Development

why won’t my loop continue in windows forms app

I have made this windows forms app where I get a value from a serial port and translates it to a string which it displays in a text box. Or is supposed to at least. It seems as though something is preventing my code from looping, and thus do not work as intended. If I […]

Categories
Mastering Development

Unable to covert a JSON parsed response into an array

I am using the TMDb API to get data for my program in VB and I am trying to get an array of all the ids of the movies returned from the raw response of JSON, but it keeps coming up with an error. my code is in VB.net and my code looks like this: […]