ap_100

u/ap_100


r/Cricket•

Yesterday's match seemed optimal for Bracewell, handy off-spin that would have complimented Glenn Phillips when they were under siege and in the middle overs. He's a better bowler than Phillips as well.

Left hander coming in at 7 who can tonk it all over the park, the innings last year against Ireland and India earlier this year was incredible and in a very similar situation to what happened yesterday. Also NZ's ODI player of the year.

Adam Milne - arguably been the form pace bowler for NZ this year, yet was not included and they have persisted with Lockie Ferguson - who has and can be very hot and cold. Could Milne not be included in the squad in place of Southee? No disrespect to Southee

14

I made some awesome friends around the world from here and am keen to make some more.

Some of the things I enjoy are - Movies, TV Shows, Sports, Exercise (Running, Cycling) and of course making stupid jokes 🤣. I also love talking about space and nature if you're into that!

If you're keen to maybe become friends feel free to start a chat 😊, I've also got a couple questions if you want to break the ice.

  1. What is something you want to experience in life but haven't yet? (and why?)

  2. What never fails to make you smile?

  3. What is your favorite song at the moment?

one moee thing - replies might be a bit delayed as I live in New Zealand and might head off soon but will get back to you in

11

r/learnjavascript•

I have heaps of experience coding with Python, Java and C. I'm not sure if that benefits me if I want to learn javascript though. I'm still kind of unsure what the general concept of javascript is and how it works, so I would appreciate if someone could give me a run down of the basics. I've had experience with HTML/CSS, SQL and databases , although I haven't touched on these recently.

2613

r/learnmath•

So say you want to test if two programs are faster in a computer. You say program A is faster than B.

But your null hypothesis is "there is no difference, if people used both programs they would be equal in terms of time taken".

So you conduct your experiment and get your results. You get a p-value. The p-value is how likely you are to observe data as at least as extreme as your sample. So if p = 0.01, does this mean youll hardly see an "outlier"?

Anyways, so if p < alpha, we can reject the null hypothesis and say "there is a difference, program A is faster".

and if p > alpha, we can fail to reject the null hypothesis, which means we cant say for certain there is no difference.

a

38

r/learnmath•

So Zipf's law states that Pn is approximately n^-(alpha) and alpha is 1

Is Pn the probability that the nth ranked item will be used? so if the most frequently used item is used 1000 times, the say 4th most frequently used item will be used 1000 x 4^(-1) = 1000 x (1/4) = 250 times?

Is there any proofs to this law or any good material on it?

193

r/C_Programming•

I know the dup2 call moves a pointer to a file to a destination you specify but what does execl do and how do they work together? execl seems to use commands pulled out of thin air but they're obviously coming from somewhere, how many commands are there? ive only come across 'sort'.

35

r/learnprogramming•

So I know the wait() system called is used, or one of its uses is for the parent process to wait for the child process to execute and exit. But I was wondering what happens when you pass in the address of an integer as a parameter to this call?

for example

int foo = 0;

wait(&foo);

12


r/C_Programming•

Processes

Question

So when you call fork() a child process gets created alongside your main process, if your main process had a global variable does the child process create its own global variable? I'm kind of confused how this works i.e. what gets replicated?

3315

r/learnmath•

I'm trying to find the inverse of 3^-1 mod 31

first I found the gcd(31, 3)

31 = 3 * 10 + 1

since the gcd is 1 there is an inverse

now I have to write it in terms of 1

1 = 31 - 3(10)

I'm unsure what to do now, I put it into an online calculator and got 21, I'm not sure how to get that.

11

r/C_Programming•

Linked Lists

Question

So I've been playing around with linked lists and was wondering why this doesn't work (the node was not added to the front of the list)

int main() {
    node_t *linkedList = malloc(sizeof(node_t));
    linkedList->value = 1;
    linkedList->next = NULL;
    addToEndOfLinkedList(linkedList, 10);
    addToEndOfLinkedList(linkedList, 32);
    addToFrontOfLinkedList(linkedList, 83);
    printLinkedList(linkedList);
}

but when I changed it to this it did work (the node is added to the front and printed out).

int main() {
    node_t *linkedList = malloc(sizeof(node_t));
    linkedList->value = 1;
    linkedList->next = NULL;
  
310

r/C_Programming•

I was just wondering if there was a way to copy a string into memory instead of just one character using the memset function?

or is it best to just use malloc and then strcpy?

214

r/learnprogramming•

So I'm not sure how to word my question correctly but in C when you call a built in function why don't you have to assign it to something?

For example, if you call strncpy(), you just call it and that's it where as in say Python you have to assign the function call to a variable like foo = str(3)

14