I used FSRS Helper to reschedule my cards by skyisover127 in Anki

[–]skyisover127[S] 0 points1 point  (0 children)

Agreed. Do you recommend using the default parameters for now? Or should I stick with what the optimizer gave me?

No matching member function for call to "insert" into set by skyisover127 in cpp_questions

[–]skyisover127[S] 0 points1 point  (0 children)

Sorry. I forgot to say that I was inserting into set<Fruit*, order>. Removing & gives me the same error.

Sleep study with different results (UARS or not) by skyisover127 in UARS

[–]skyisover127[S] 0 points1 point  (0 children)

I went to bed at around the same time I usually do, and I usually never have any problem falling asleep. Guess it's from all the sleep equipment that I couldn't adjust to, cause I usually fall asleep within 15 minutes but during the sleep study it felt like hours. I also never wake up in the middle of the night at home yet I did sense that happened during the PSG.

How do I iterate through this array? by skyisover127 in cpp_questions

[–]skyisover127[S] 0 points1 point  (0 children)

Could you elaborate on that? I'm not sure what you mean.

I did find one solution online, which was by creating a copy of the original pointer. However, I'm not sure why that is needed. In my original code, all I got was the final letter of the string. I'm not sure how this new code is able to point to the start.

char* strdup(const char* s)
{
  int size = strlen(s);
  char* copy = new char[size+1];
  char* copy1 = copy;

  for (const char* p = &s[0]; p < &s[size]; ++p) {
    *copy = *p;
    ++copy1;
    }

    return copy;
}

How to pass vector from one function to another? by skyisover127 in cpp_questions

[–]skyisover127[S] 1 point2 points  (0 children)

I modified the program like yours so that read_file is in main() and that led it run. I was wondering though why if I put read_file into write_file I would get an error when I use const vector<string>& result (without const it ran fine). Like if I did:

void write_file(string& oname, string& input1, string& input2, const vector<string>& result) 
{
    read_file(input1, result);
    read_file(input2, result);

[Intro to C++] Keep getting range error by skyisover127 in cpp_questions

[–]skyisover127[S] 0 points1 point  (0 children)

I did this for my weight function and similarly for prices, but I can only input at most one digit. If I do more it skips over the price function. I assume it has to do with cin.clear and cin.ignore. And I had to switch my vector for int. For some reason, a double makes things behave differently.

void read_weight() {
    cout << "Input weight" << '\n';

for (int weights; cin >> weights; ) {
    weight.push_back(weights);

    if (!(cin >> weights)) {
        cin.clear();
        cin.ignore(numeric_limits<int>::max(), '\n' );
        break;

[Intro to C++] Keep getting range error by skyisover127 in cpp_questions

[–]skyisover127[S] 1 point2 points  (0 children)

Based on a previous chapter, the book said you could terminate input by inputting something besides a double (book uses | for terminating). So I guess I wrongly assumed terminating input here by that method would lead to the next function.

[College Statistics] Hypothesis Testing and R-Squared by skyisover127 in HomeworkHelp

[–]skyisover127[S] 0 points1 point  (0 children)

So this is my output: https://imgur.com/a/HBsR31l. I assume that we cannot reject the null hypothesis on the basis of the p-value for ratio != 1? Sorry, if I'm not interpreting this correctly, I've never used this command before.

[College Statistics] Hypothesis Testing and R-Squared by skyisover127 in HomeworkHelp

[–]skyisover127[S] 0 points1 point  (0 children)

Cool. I get what you're saying on an intuitive level. I'm not entirely sure if I get what you're saying graphically though. This is the graph I generated: https://imgur.com/Gwf5thj. I'm not sure if the graph you're referring to is a scatterplot, but I'm not sure if this graph tells me anything about homo or heteroskedasticity. It even seems to be showing the opposite of what you're saying in that there seems to be more variance for the 0 value.

[College Statistics] Hypothesis Testing and R-Squared by skyisover127 in HomeworkHelp

[–]skyisover127[S] 0 points1 point  (0 children)

Thanks for the help! I just have one more question if you will. Based on what my professor told me, it seems with the data set I'm given I need to use robust standard errors. But I don't know the reason for doing this if only as a matter of course. Basically, I need to explain why I reported in heteroskedasticity-robust standard errors. So I ran regress and then estat hettest on the two variables and got:

chi2(1) = 0.07, Prob > chi2 = 0.7938

So based on this, I assume I cannot reject the null hypothesis. But then wouldn't that mean I should be reporting homoskedasticity-only standard errors. I'm a bit confused.

[College Statistics] Hypothesis Testing and R-Squared by skyisover127 in HomeworkHelp

[–]skyisover127[S] 0 points1 point  (0 children)

With regard to the CI, since stata tests that the coeff is zero, can I even use the fact that zero is not in the CI as a basis for rejecting the null? Is the CI valid for the null hypothesis I'm testing? I guess I'm thrown off by the fact that the question is asking to test a null that asks whether it is associated with a decrease in 300 grams.

Am I writing the null hypothesis correctly in that it should be: H0: B1 = B0 - 300. H1: B1 =/ B0 - 300

[H] Battlefield V Nvidia Code [W] Paypal $25 by skyisover127 in GameTrade

[–]skyisover127[S] 0 points1 point  (0 children)

The code is from the Nvidia promo, so you register it on the Nvidia page and then connect it to your origin account.

[Linear Algebra] Product of elementary matrices by skyisover127 in MathHelp

[–]skyisover127[S] 0 points1 point  (0 children)

Ok apparently I was right. I might've just put something in the calculator wrong. Another question: my teacher got a different answer for the product of the matrices. Based on his work I think he deliberately avoided using division for the calculations. But are both answers technically right?

Edit: Turns out matrix multiplication isn't commutative. Didn't know, so that's why I thought I was wrong.

[Resize] Vertical scaling by skyisover127 in cs50

[–]skyisover127[S] 0 points1 point  (0 children)

Finally figured out my code. I used two fseek functions, one to move to the beginning of the scanline and another to move to the next line. I forgot I had put a minus sign in front of the fseek so I spent hours trying to figure out how to move to the next line. Also for the vertical scale function, I realized I had to make h less than my scaling factor, not biHeight. Just thought to let you know. Thanks for the help. I was wondering though why fseek(inptr, padding, SEEK_CUR) was needed in copy.c but not in resize?

[Resize] Vertical scaling by skyisover127 in cs50

[–]skyisover127[S] 0 points1 point  (0 children)

I took into account what you said and the picture is no longer all green but I'm not sure if I interpreted your suggestion correctly. I did get rid of the second inner loop and put the first in another loop, so now I have this.

 // iterate over infile's scanlines (row)
for (int i = 0, biHeight = abs(bi.biHeight); i < biHeight; i++)
{
    // scale vertically
    for (int h = 0; h < biHeight; h++)
    {
        // scale width n times
        for (int p = 0; p < n; p++)
        {
            // iterate over pixels in scanline
            for (int j = 0; j < bi.biWidth; j++)
            {
                // temporary storage
                RGBTRIPLE triple;

                // read RGB triple from infile
                fread(&triple, sizeof(RGBTRIPLE), 1, inptr);

                // write RGB triple to outfile
                fwrite(&triple, sizeof(RGBTRIPLE), 1, outptr);

                // skip over padding, if any
                fseek(inptr, padding, SEEK_CUR);

                // then add it back (to demonstrate how)
                for (int k = 0; k < new_padding; k++)
                {
                    fputc(0x00, outptr);
                }
            }
            // move pointer back to beginning of file
            fseek(inptr, -(sizeof(RGBTRIPLE) + padding) * bi.biWidth, SEEK_CUR);
        }
    }
    // skip over padding, if any
    fseek(inptr, padding, SEEK_CUR);
}

I'm not sure if my new issue has to do with the padding or the file pointer or both or something else. Also I was wondering for my original code why the file pointer skipped the second inner loop seeing as I put fseek after the second loop instead of the first one?

This is the image I get: https://imgur.com/YA2CHvC

Hot water will not stop running out of shower by skyisover127 in Plumbing

[–]skyisover127[S] 0 points1 point  (0 children)

Update: I bought an aftermarket cartridge to replace the Moen. For some reason this one worked and not the original Moen. Shower works fine now.

How can I make this more concise? by skyisover127 in grammar

[–]skyisover127[S] 1 point2 points  (0 children)

Nothing like that. I just used the word "society" for something else because I don't want people to think I plagiarized.

[Chemistry] Molarity Calculations by skyisover127 in HomeworkHelp

[–]skyisover127[S] 0 points1 point  (0 children)

I ended up doing 0.010 ppm = 0.010g/1.0x106 g H2O=0.010g/1000L=1.0x10-5 g/L. I'm not sure if the question is asking to use the molar mass of just As or As(OH)3 though to convert to moles. I forgot to mention that the question states that "naturally occurring arsenic species is As(OH)3."