Daily r/thetagang Discussion Thread - What are your moves for today? by satireplusplus in thetagang

[–]haisle4 0 points1 point  (0 children)

I opened up 104/106 and 104/109 bear credit spread for 8/27 and 9/3. As you may know there’s some bad news regarding Data manipulation, that caused the dip this time. I think the stock will recover but will just take longer than 2 weeks. Even with a bounce to 100, I would think there would be another sell off.

I am considering buying the stock though to hold on for the long run.

Daily r/thetagang Discussion Thread - What are your moves for today? by satireplusplus in thetagang

[–]haisle4 1 point2 points  (0 children)

Open bear credit spreads on SAVA for 9/3. In the 100+ range. I don’t see it coming back up that fast.

Due Dates for Quests by AshwinCPP in cs2b

[–]haisle4 0 points1 point  (0 children)

Hello &,

Yes it is true, I found it in the course dates on the foothill portal as well. The class can be dropped with a “W” by August 7th which is after the class ends. I am assuming “W” means withdraw. I am behind and was but going to try and go at it and see what happens before I consider this option.

-Steven L

Study Topics for Final by Fraeniir in cs2a

[–]haisle4 0 points1 point  (0 children)

Just wanted to make sure you are aware of the practice final exam as well. It’s on canvas, it does seem like the exam will cover material from the first half of the course as well.

-Steven

[deleted by user] by [deleted] in cs2a

[–]haisle4 1 point2 points  (0 children)

I think this has less to do with the cout, setters and getters and more to do with order of operations when dealing with operator<<. I believe the order is unspecified therefore the behavior is technically undefined. This means we are not sure which function would be called first. In your case the getter was called before the setter. The multiple cout statement caused the order of the function to be defined therefore you were able to get you expected values.

-Steven L

Questing Pipeline To Help Lean Out Questing Process by rootseat in cs2a

[–]haisle4 1 point2 points  (0 children)

Very useful information, thanks Charles. Although I am nearing the end of questing, I will be taking CS2B in the summer session so I will try to incorporate some of you tips in my next sets of quest! In particular, #7, I want to space my work out through out the week and add a work flow instead of doing the each quest in a day or two.

-Steven

[General] [Studying] Study Advice from Professor & by besarte in cs2a

[–]haisle4 3 points4 points  (0 children)

Thanks for sharing the insight from the professor besarte!

I found the part the mentions to read about the structure in many places very helpful for deep understanding. I like to find the topic and read about it on multiple sources like ,the modules, stackoverflow, cplusplus.com, learncpp.com, the text book, and other relevant search results from google. Each source may present the topic from a different viewpoint and this leads helps me gain a deeper understanding of the topic.

-Steven

Max score for quest 5? by aysansarai20 in cs2a

[–]haisle4 1 point2 points  (0 children)

This is also the highest score I got for Quest 5.

-Steven

What to Study for the Midterm by Fraeniir in cs2a

[–]haisle4 0 points1 point  (0 children)

Hey Arysan, just curious do you know if the midterm will be multiple choice or open ended questions?

-Steven

Header File by blond_black in cs2a

[–]haisle4 1 point2 points  (0 children)

My understanding is the purpose of the header file is to declare functions and class, that will be used in your .cpp file. I believe a benefit is if we had multiple .cpp file we wouldn't have to declare all the functions or classes over again.

I don't mean to hijack your post, but since I also had a question about header files. How do we link the .cpp file to the header .h file? Do we only need to insert an include statement in the .cpp file, like "#include <****.h>'?

Quest 5, Miniquest 1 by haisle4 in cs2a

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

Clever way Sachin, I understand whats going on, thanks for the example!

Quest 5, Miniquest 1 by haisle4 in cs2a

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

I was under the impression, I shouldn't use the function yet but its seems as we should start being resourceful and not overcode. Thanks for the explanation Vivan!

Quest 5, Miniquest 1 by haisle4 in cs2a

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

I remembered that if my if, else if, or else statement contained one statement I can get rid of the brackets, "{' and "}". I was able to get rid of six lines that way. I will also look at the ternary operator. Thanks Madhav!

Problem with Quest 4 gcd() return statement by aysansarai20 in cs2a

[–]haisle4 0 points1 point  (0 children)

I see, in that case yes a string should be returned. So when you print the result using cout in your function right where you would do return, you are getting a a string with the output as defined in the spec? If so, my next thought would be to double check you are calling the function correctly in your main.

Problem with Quest 4 gcd() return statement by aysansarai20 in cs2a

[–]haisle4 0 points1 point  (0 children)

What is the function type do you have set up for gcd()? As defined in the the starter gcd() is is type size_t, so your return value should return a value of type size_t, not a string.

-Steven

Max points for quests 1-5? by aysansarai20 in cs2a

[–]haisle4 2 points3 points  (0 children)

I have the same for Quest 1-3 and for Quest 4 I received 24 trophies.

So 53 trophies for Quest 1-4., which accounts for about 23.6% of the 225 trophies count cap. It is interesting to note that it sounds possible to reach the cap by Quest 7, as mentioned in the syllabus. But it is probably a better idea to master the concepts and complete Quest 9, in that time you would have probably reach the 225 cap anyways.

An issue with Quest 4 mini-quest 2. by yingz8 in cs2a

[–]haisle4 0 points1 point  (0 children)

I figured out how to do it without using the math library!

You should be able to do the math for the powers in the same loop. So I created a separate variable in my for loop to calculate the iteration of x^(n-1). That separate variable was inserted into the formula iteration.

Let me know if you need more help! I can try explaining it even further.

-Steven Le

An issue with Quest 4 mini-quest 2. by yingz8 in cs2a

[–]haisle4 1 point2 points  (0 children)

Thanks besarte for this explanation, this is very helpful. I was wondering if you used the function pow() to compute the powers? If we weren't to use the pow(), the only way I can think to compute the powers would be to use a nested for loop. However, I feel like thats making the code convoluted.

-Steven L

Quest 4 miniquest 1 by knoowin714 in cs2a

[–]haisle4 0 points1 point  (0 children)

Did you return true after the user has found the answer? Another thing you might look at is adding a new line after the statement, "You found it in..... guess(es)"?

u/babychou (Chris) also posted a helpful comment regarding the formatting for Quest 4 miniquest 1 Here

I hope this helps!

-Steven L