Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Microsoft AI-102 Exam - Topic 6 Question 70 Discussion

Actual exam question for Microsoft's AI-102 exam
Question #: 70
Topic #: 6
[All AI-102 Questions]

You are developing a method that uses the Computer Vision client library. The method will perform optical character recognition (OCR) in images. The method has the following code.

During testing, you discover that the call to the GetReadResultAsync method occurs before the read operation is complete.

You need to prevent the GetReadResultAsync method from proceeding until the read operation is complete.

Which two actions should you perform? Each correct answer presents part of the solution. (Choose two.)

NOTE: Each correct selection is worth one point.

Show Suggested Answer Hide Answer
Suggested Answer: B, C

Contribute your Thoughts:

0/2000 characters
Chery
5 months ago
Agreed, verifying the status is crucial for proper execution.
upvoted 0 times
...
Luisa
5 months ago
Whoa, I didn't expect the read operation to be async like that!
upvoted 0 times
...
Ayesha
5 months ago
Removing the Guid.Parse(operationId) doesn't seem right.
upvoted 0 times
...
Milly
5 months ago
I think wrapping it in a loop with a delay is a bit hacky.
upvoted 0 times
...
Mary
6 months ago
Definitely need to check the results.Status value.
upvoted 0 times
...
Merrilee
6 months ago
I’m confused about the status checks. Should we be looking at the results.Status or the txtHeaders.Status? I feel like both options B and C could be relevant.
upvoted 0 times
...
Sharika
6 months ago
I practiced a similar question where we had to wait for an operation to complete. I think wrapping the call in a loop with a delay could be a workaround, so maybe option D?
upvoted 0 times
...
Steffanie
6 months ago
I'm not entirely sure, but I feel like removing the Guid.Parse might not help with the timing issue. It seems more related to checking the status.
upvoted 0 times
...
Vivan
6 months ago
I remember we discussed how important it is to check the status of operations in asynchronous methods. I think option B might be the right choice.
upvoted 0 times
...
Antione
6 months ago
Alright, let's see here. The question is asking how to prevent the GetReadResultAsync method from proceeding until the read operation is complete. I'm thinking either adding code to verify the results status or wrapping the call in a loop with a delay could work. I'll need to double-check the details, but those seem like the most promising options.
upvoted 0 times
...
Caprice
6 months ago
Okay, I think I've got it. The issue is that the GetReadResultAsync method is being called before the read operation is finished. So I'll need to either verify the results status or wrap the call in a loop with a delay to make sure it waits for the operation to complete.
upvoted 0 times
...
Karma
6 months ago
Hmm, the key seems to be ensuring the read operation is complete before calling GetReadResultAsync. I'm thinking either B or D could work, but I'll need to double-check the details.
upvoted 0 times
...
Bettina
6 months ago
This looks like a tricky one. I'll need to carefully read through the code and question to make sure I understand what's going on before attempting to solve it.
upvoted 0 times
...
Sharika
7 months ago
This one looks tricky, but I think I can handle it. I'll start by carefully analyzing the code and the question to make sure I understand the problem. Then I'll evaluate the options and choose the two that best address the issue.
upvoted 0 times
...
Mireya
7 months ago
This one seems pretty straightforward. I think the answer is B - to retrieve information from an external resource.
upvoted 0 times
...
Deeann
7 months ago
Okay, I've got this. The full-cost price is usually set by an absorption-costing calculation, which includes both variable and fixed costs. Option C looks like the best answer.
upvoted 0 times
...
Alverta
11 months ago
Wait, did Valene just suggest removing a parameter? What is this, a comedy show?
upvoted 0 times
...
Valene
12 months ago
You guys are overthinking this. Just remove the Guid.Parse(operationId) parameter and you're good to go! Easy peasy.
upvoted 0 times
Denny
10 months ago
Let's give it a try and see if it works.
upvoted 0 times
...
Deandrea
10 months ago
Agreed, that should solve the issue.
upvoted 0 times
...
Katie
11 months ago
I think we should remove the Guid.Parse(operationId) parameter.
upvoted 0 times
...
...
Galen
12 months ago
I'm not so sure about D. Isn't that a bit hacky? I'd go with B and C - verify the status of both the results and the txtHeaders to be safe.
upvoted 0 times
Catrice
11 months ago
I agree with you. It's better to be safe than sorry. Let's go with B and C.
upvoted 0 times
...
Paris
11 months ago
I think B and C are good choices. Verifying both results and txtHeaders status sounds like a solid plan.
upvoted 0 times
...
...
Maurine
1 year ago
I'm leaning towards B and D as well. Checking the status before proceeding and adding a delay loop seems like the logical solution here.
upvoted 0 times
Quentin
10 months ago
Yes, B and D together should prevent the method from proceeding too early.
upvoted 0 times
...
Bambi
10 months ago
That makes sense, verifying the status and adding a delay should solve the issue.
upvoted 0 times
...
Renea
11 months ago
Agreed, and D will help by adding a delay before proceeding.
upvoted 0 times
...
Nikita
11 months ago
I think B is necessary to verify the results status.
upvoted 0 times
...
...
Kathryn
1 year ago
Hmm, I think B and D are the way to go. Verifying the results.Status value and wrapping the GetReadResultAsync call in a loop with a delay should do the trick.
upvoted 0 times
Asuncion
11 months ago
Yes, that sounds like the right approach. Verifying the status and adding a delay will ensure the read operation is complete before proceeding.
upvoted 0 times
...
Lawana
12 months ago
I agree, verifying the results.Status value and adding a delay in a loop should solve the issue.
upvoted 0 times
...
...
Gilbert
1 year ago
I suggest adding code to verify the results.Status value as well. That way we can ensure everything is in order.
upvoted 0 times
...
Tony
1 year ago
I agree with Rosalyn. We need to make sure the read operation is complete before proceeding.
upvoted 0 times
...
Rosalyn
1 year ago
I think we should remove the Guid.Parse(operationId) parameter.
upvoted 0 times
...

Save Cancel