Adam Szewczyk wrote:Greetings,
I am trying to translate following java code into c++ code.
I do not understand what Configuration.DEBUG is doing. What is the c++ equivalent for it? Will omitting it affect " if then " performance significantly?
mark patindol wrote:
Al Sweigart wrote:My preference for C++ ternary operators is probably just an old habit. But I do like how it reads "this-condition, this-value-if-true, this-value-if-false" instead of Python's "this-value, if-this-condition-is-true, or-else-this-value-if-the-previous-condition-was-false"
Al Sweigart wrote:Anand's comments cover a lot of it.
Al Sweigart wrote:Though I wish the ternary operator was more like Java or C++.
Campbell Ritchie wrote:That I think is C++ code because of the bool keyword, not C.
Campbell Ritchie wrote:I presume the == and != operators are overloaded on Strings.
Campbell Ritchie wrote:I suspect the greatest overhead is in the format time function. What complexity does that run in?
Alaa Nassef wrote:I took a look in the amazon sample, and it says that the code in the book is using python 3, and might not run correctly, if at all, on python 2.
Carey Brown wrote:The first thing that would help is stating the requirements clearly.
Carey Brown wrote:You are computing the elapsed time from the start of the week, ie the previous Sunday at 0 a.m..
Alex Monari wrote:For work reasons I'm required to discuss the efficiency of the function below by manually stepping through the code. I needed some pointers as to how to go about that.