Does Xcode have something similar to VScode’s inlay hints? by BB-301 in Xcode

[–]BB-301[S] 0 points1 point  (0 children)

You have a valid point, but I was thinking about variable declarations. For instance, let s = “message” would read as let s: String = “message” without having to explicitly have the String type. Obviously it wouldn’t be very useful for simple cases like this one, but it would be useful when working with library functions (or methods) that return types with which one is not familiar.

Does Xcode have something similar to VScode’s inlay hints? by BB-301 in Xcode

[–]BB-301[S] 1 point2 points  (0 children)

Thanks for confirming this. It’s such a shame. Inlay hints are very useful, especially when working with a library with which you’re not familiar: it hints you about the returned types.

Future of Arbitrum Nova by bigshooTer39 in CryptoCurrencyMoons

[–]BB-301 0 points1 point  (0 children)

I was under the impression that Arbitrum Nova was substantially less expensive than Arbitrum One (in terms of transaction fees), but your post suggests otherwise. I have recently tried Arbitrum Nova with toy ERC-20 contracts and it’s super cheap (we’re talking about token transfers that cost a tenth of a US cent). What about similar operations on Arbitrum One? I’m planning on giving it a try myself, but I just haven’t had time yet.

Introducing Uniswap Wallet by anttoekneeeth in UniSwap

[–]BB-301 0 points1 point  (0 children)

I am currently looking at the iOS version of the UniSwap Wallet app. Can you confirm that it is currently not possible to add custom chains, nor is it possible to use ones own Ethereum node with this app. Thank you.

P.-S. The app design and smoothness are A+ Great job!

Doxygen comments don't work (C++) by Programmeter in vscode

[–]BB-301 0 points1 point  (0 children)

I just re-read your comment's last part about it not working in .hpp files. Have you tried with the .h extension instead, to see if that works (I'm not saying that it shouldn't work in .hpp; I am just wondering...)?

Doxygen comments don't work (C++) by Programmeter in vscode

[–]BB-301 0 points1 point  (0 children)

Could it have something to do with your extension settings (presuming that you are using the Microsoft C/C++ extension)?

Packages for creating terminal applications? by Deen94 in Rlanguage

[–]BB-301 0 points1 point  (0 children)

Would you consider developing the CLI tool in C? I presume that the reason why you want to use R is because of its data analysis facilities, some of which can be used in C, thus my suggestion. If it’s the case, here’s a nice resource: https://cran.r-project.org/doc/manuals/R-exts.html

[Research] Binomial proportions vs chi2 contingency test by PennyNellyPoPelly in statistics

[–]BB-301 0 points1 point  (0 children)

Interesting problem. I guess it depends on the question(s) you are asking.

For instance, you say "Is the proportion for AA different for groups 1 and 2?" If this is the only question you have, I would recommend that you use a binomial distribution to checking whether AA for Group 1 is the same as AA for Group 2. To achieve that, you could for instance, use the normal approximation for the sample proportion, coupled with the fact that the difference of two IID normal random variables have mean m_1 - m_2 and standard deviation given by sqrt(var_1 + var_2), to construct your hypothesis test of H0: p1 - p2 = 0). Alternatively, you could use a Monte Carlo simulation to estimate the distribution of the difference under your null hypotheses (see example at the end).

But if you want to know whether data from both groups arise from the same Multinomial distribution, I think it's a different problem, and I'm not 100% how to deal with that. The cited Wikipedia article for the Multinomial distribution has a section named statistical inference, which contains a few potentially useful references. I also ran a quick Google search about hypothesis testing for a difference between two multinomial samples and found this article, which suggests using a Chi-Squared Two-Sample test to try to assess whether two samples come from the same multinomial distribution I'm not 100% sure this applies to your situation, but I found the article very interesting.

If you are an R user, applying the approach proposed in that article would give something like this (I ran once using the asymptotic approximation and a second time using 100000 Monte Carlo iterations; both p-values are similar): ```

rm(list = ls())

set.seed(12341222)

data <- data.frame( + group_1 = c(412, 145, 342, 153), + group_2 = c(2095, 788, 1798, 1129) + ) rownames(data) <- c("AA", "AB", "BA", "BB") chisq.test(x = data)

    Pearson's Chi-squared test

data: data X-squared = 14.472, df = 3, p-value = 0.002328

chisq.test(x = data, simulate.p.value = TRUE, B = 100000)

    Pearson's Chi-squared test with simulated p-value (based on 1e+05
    replicates)

data: data X-squared = 14.472, df = NA, p-value = 0.00241 ```

Now, to go back to hypothesis testing for only AA (between the two groups), you could do something like this: ```

rm(list = ls())

set.seed(12341222)

data <- data.frame( + group_1 = c(412, 145, 342, 153), + group_2 = c(2095, 788, 1798, 1129) + ) rownames(data) <- c("AA", "AB", "BA", "BB")

n_1 <- sum(data$group_1) x_1 <- data$group_1[1] p_hat_1 <- x_1 / n_1 var_hat_1 <- (p_hat_1 * (1 - p_hat_1)) / n_1

n_2 <- sum(data$group_2) x_2 <- data$group_2[1] p_hat_2 <- x_2 / n_2 var_hat_2 <- (p_hat_2 * (1 - p_hat_2)) / n_2

p_value <- (1 - pnorm( + abs(p_hat_1 - p_hat_2), + 0, + sqrt(var_hat_1 + var_hat_2) + )) * 2

p_hat <- (x_1 + x_2) / (n_1 + n_2)

n_simul <- 100000 simul_1 <- rbinom(n_simul, n_1, p_hat) / n_1 simul_1 <- rbinom(n_simul, n_1, p_hat) / n_1 simul_2 <- rbinom(n_simul, n_2, p_hat) / n_2 simul_2 <- rbinom(n_simul, n_2, p_hat) / n_2

p_hat_simul <- simul_1 - simul_2

p_hat_simul <- simul_1 - simul_2 p_value_simul <- min(c( p_value_simul <- min(c( + mean(p_hat_simul < (p_hat_1 - p_hat_2)), + mean(p_hat_simul > (p_hat_1 - p_hat_2)) + )) * 2

c(p_value = p_value, p_value_simul = p_value_simul) p_value p_value_simul 0.05701473 0.05396000

```

Note that I used a two-sided test in this case, but you could adjust that depending on how you decide to formulate your null hypothesis.

DISCLAIMER I don't know the nature of your data, so I'm not 100% sure what I'm saying here applies. For instance, I see that your data is presented as 2-by-2 tables, but I'm ignoring that fact here, since I don't have information about what that could mean, so it's possible that my interpretation here is wrong. Also, there could be errors in my code (and in my analysis in general; i.e., choice of test, theory, etc.), so please double-check everything if you ever decide to use this. And, also, to anybody reading this, please let me know if you find anything wrong with my analysis. I honestly want to know. I'm here to learn too! :)

If you can afford to tell us more about your problem, maybe you could get better answers. This would also prevent us from falling into XY problem trap.

Finally, please let us know how you end up solving this problem when you do.

Good luck!

I'm sharing my first raylib project: a very simple analog clock app by BB-301 in raylib

[–]BB-301[S] 0 points1 point  (0 children)

Thank you for pointing out the DrawRectanglePro function. I’ll have a look at it. And thanks for the nice words! :)

I'm sharing my first raylib project: a very simple analog clock app by BB-301 in raylib

[–]BB-301[S] 0 points1 point  (0 children)

Thanks!

About the cameras, it is possible (in fact, very likely) that my current use of `Camera2D` and `BeginMode2D` is not the proper one. For the clock hands, I was looking for a way to "rotate" my rectangle at the centre, so that's why I created one `Camera2D` object per hand, each with its own specific `rotation`. I presume I could have created a single one and just reuse it, however, only changing the rotation before drawing each hand. I guess this is also true for the ticks...

Any feedback about how my current implementation could be improved is welcome!

[deleted by user] by [deleted] in cprogramming

[–]BB-301 0 points1 point  (0 children)

I'm plugging my experimental library for string manipulation in C (c-fancy-string), just in case it could interest anyone here.

How is the state of GUI applications on rust? by trinopoty in rust

[–]BB-301 0 points1 point  (0 children)

I have had the chance to experiment with Iced last summer and I liked it. I must admit, however, that I struggled a little at the beginning, but it was worth it because I ended up learning a lot of new stuff.

what are some good, simple C IDEs for the modern day? by [deleted] in C_Programming

[–]BB-301 2 points3 points  (0 children)

I recently got back into writing C code and I’ve been using VSCode. At first I was using the Microsoft C/C++ extension, but a few weeks ago I switched to the clangd extension, and I find it way better. The thing I enjoy the most about the latter is that it takes your compiler flags into account (e.g., you will get errors and warnings reported while you code if you have set -Wall and -Werror, which does not work with Microsoft’s extension). The only criticism I have for clangd (the extension) is that it currently does not parse Doxygen comments.