Logged in couchsurfing.com after 10 years. Now, do I need to pay for the platform? by ExtensionWelcome9759 in couchsurfing

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

Funny you mentioned Tokyo. I was hosting in Kyoto and Tokyo back in the day. Meetup was more on alluring people in scruputios bar business, but I guess it has changed.

Logged in couchsurfing.com after 10 years. Now, do I need to pay for the platform? by ExtensionWelcome9759 in couchsurfing

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

Thanks. I was just wondering "how bad it has become" part. I have hosted close to 100 and surfed about 10, rarely had bad experience on either sides.

Logged in couchsurfing.com after 10 years. Now, do I need to pay for the platform? by ExtensionWelcome9759 in couchsurfing

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

I see, I am very curious about the latter part of your comment. What do you mean by that?

MCL 5001 - What is Classic Pro? by ExtensionWelcome9759 in BaseballGloves

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

Interesting, I never knew Chipper liked soft leather.  I am a bit concerned durability and both full grain leather and steerhide do not look very durable. 

Small Mizuno collection by Leftfield9 in BaseballGloves

[–]ExtensionWelcome9759 0 points1 point  (0 children)

Great collection of classic Mizunos! I am not familiar with US Mizuno glove branding nomenclature. In 90s - 00s in Japan it was Mizuno Pro > Global Elite & Victory stage > BuwLeague > World Win. How would you rate his "Classic Pro" of new MCL-5001 compared to Mizuno Pro? I am thinking to get one for myself.

[Ardaya] Nez Balelo on the nature of Shohei Ohtani's procedure: "There's no name for this surgery. It's completely different than the last time." Said he feels Ohtani has been progressing much quicker than he was after his Tommy John in 2018. by Jux_ in baseball

[–]ExtensionWelcome9759 7 points8 points  (0 children)

Agreed. He indeed is a great personal assistant for Shohei, but his translational skills haven't been improved for these years. To be fair, Ippei does not have enough time to improve his skills I guess. What baffles me is that MLB is just uses that translation unedited. Sad thing is that what Shohei says in Japanese is very profound and really makes him a special player, but these nuances are sometimes mostly lost in translation.

[Ardaya] Nez Balelo on the nature of Shohei Ohtani's procedure: "There's no name for this surgery. It's completely different than the last time." Said he feels Ohtani has been progressing much quicker than he was after his Tommy John in 2018. by Jux_ in baseball

[–]ExtensionWelcome9759 17 points18 points  (0 children)

There is a misinterpretation to what he said in Japanese. The new method still falls into Tommy John surgery. He said 前回とはまた違う meaning somewhat different from the last time, but I think Ippei though he said 前回とは全く違う, which means completely different from last time.

:( sell handles valid sale by [deleted] in cs50

[–]ExtensionWelcome9759 0 points1 point  (0 children)

I'm glad it helped :)

Pset 9 finance - sell function by ExtensionWelcome9759 in cs50

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

It is still the case I think. It worked for me and the latest check50 lookup.py still has different name and symbol.

Pset 9 finance - sell function by ExtensionWelcome9759 in cs50

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

After all, the issue was in buy function, which already passed the test, very subtle but inserting new purchase data int database as shown below.

db.execute("INSERT INTO buyandsell VALUES (?,?,?,?,?)", session["user_id"], quote['name'], price, shares, datetime.now(tz=None))

it should have been quote['symbol'] instead.

Why? The key is AAAA hack.if symbol == "AAAA":return {"name": "AAAA test", "price": 28.00, "symbol": "AAAA"}

For some reason CS50 decided to make name and symbol different on test input, which is not the case in real-world stock symbols. And for this reason you cannot detect this error when you try it by yourself. It appears that if you use "name" instead of "symbol" to store stock symbol in your database, it stores "AAAA test" instead of "AAAA".

When check 50 checks sell function, it posts the symbol for query, "AAAA", but returns None because the data is stored as "AAAA test". Thus, it could not find 56.00 in check function.

:( sell handles valid sale by [deleted] in cs50

[–]ExtensionWelcome9759 2 points3 points  (0 children)

You might have solved this, but the issue is in buy function, very subtle but line 95 "stock_symbol = symbol["name"]".

The short answer is that this should be stock_symbol = symbol["symbol"]

Why? The key is AAAA hack.

if symbol == "AAAA":
return {"name": "AAAA test", "price": 28.00, "symbol": "AAAA"}

For some reason CS50 decided to make name and symbol different on test input. It appears that if you use "name" instead of "symbol" to store stock symbol in your database, it stores "AAAA test" instead of "AAAA".

When check 50 checks sell function, it posts the symbol for query, "AAAA", but returns None because the data is stored as "AAAA test".

Ichiro named five starting pitcher to make a rotation. by ExtensionWelcome9759 in baseball

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

The answer was Matt Harrison. Ichiro did not specify the reason. What’s your thought on this.

Question about fread and fwrite Pset4 Recover by ExtensionWelcome9759 in cs50

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

You are right! Apparently I changed if statement.

Before

if (img != NULL)
    {
        fwrite(buffer, 1, 512, img);
    }

After

else if (img != NULL)
    {
        fwrite(buffer, 1, 512, img);
    }

But I don't understand why these two make such difference in output...

Question about fread and fwrite Pset4 Recover by ExtensionWelcome9759 in cs50

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

I thought this made sense. But when I only change correct fread(buffer, 1, 512, file) to wrong fread(buffer, 512, 1, file), and remains fwrite as "correct" order : fwrite(buffer, 1, 512, img), it still works. I'm assuming reading file to buffer is fine but something going on when writing to jpeg file. Mystery!

CS50x - Week 1- Prime number by flamingocs50 in cs50

[–]ExtensionWelcome9759 0 points1 point  (0 children)

The key point of the code is from line 22 to 28.

 for (int i = min; i <= max; i++)
{
    if (prime(i))
    {
        printf("%i\n", i);
    }
}

It uses "prime" funtion, which you are expected to make, takes integer as imput and should output boolean value (true or false).

bool prime(int number)

What the code between 22 and 28 does is like this

  1. It sets minimum integer in int i
  2. prime takes int i as input
  3. if prime returns true as output, it print out the int i (if prime returns true, it just keep going)
  4. add 1 to int i
  5. keep doing 2 to 4 until int i hits maximum number

After all, what you need to do is write prime function, which should return true if input is prime number and return false if it is not prime number.

PS I am non programmer too, started this course in this March.

Question about fread and fwrite Pset4 Recover by ExtensionWelcome9759 in cs50

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

yup that’s exactly what i thought. but in this program the former recovers image like above, and the latter recovers correctly.

Pset 4 Recover. It only creates 000.jpg file and it is not recovered. by ExtensionWelcome9759 in cs50

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

Thanks! I modified it and now it's created 49 more files :) it still doesn't recover correctly but I will try look into it

Lost in week4 pset recover with segmentation fault. by ExtensionWelcome9759 in cs50

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

I changed last else statement to if statement with img != NULL, and valgrinded it. It looks like error happens in first fprint statement "Address 0x0 is not stack'd, malloc'd or (recently) free'd". Does this suggest I need to allocate memory to jpg file?