8,270 reputation
12938
bio website hewgill.com
location Auckland, New Zealand
age 44
visits member for 3 years, 10 months
seen 6 hours ago

Software geek.

Twitter: @ghewgill


6h
awarded  Enlightened
6h
awarded  Nice Answer
9h
comment What would the register-machine bytecode for this code look like?
That's true, there are many ways to write functionally equivalent code. I could have used a register other than eax, for example. The example I gave matches the original arithmetic expression pretty well.
9h
comment Why Increment Pointers?
@ThomasEding: Yes, that's what would happen if you increment it while it's pointing to the last element of the array. It's not valid to increment it further than one past the end, because at that point it's no longer pointing to an element of the array.
14h
comment Why Increment Pointers?
No, incrementing a pointer that points to anything except an array element is undefined behaviour. However, if you are doing something low level and not portable, then incrementing a pointer is usually nothing more than accessing the next thing in memory, whatever that may happen to be.
14h
comment Why Increment Pointers?
Yep, with C++ you are responsible for avoiding programming errors such as access outside the bounds of an array.
14h
answered Why Increment Pointers?
16h
comment Problem with PHP login
You're missing a semicolon on the mysqli_query line.
16h
answered What would the register-machine bytecode for this code look like?
17h
comment Java object oriented programming style
Generally, because main is static and you can't use instance variables from within a static method.
17h
comment Java object oriented programming style
That's the method called main.
17h
comment Java object oriented programming style
In Java, all code must be part of a method. What exactly do you mean by "directly writing the code in the class"?
1d
revised Vlookup in python
formatting
2d
comment Are there technical limitations or language features that prevent my Python script from being as fast as an equivalent C++ program?
Yes, it can. See PyPy for the state of the art in Python compilers.
Jul
4
awarded  Guru
Jul
3
comment How does the “Fourth Dimension” work with arrays?
@Manu343726: I carefully said Programs, not Computers. That's one of the great things about software.
Jul
3
awarded  Enlightened
Jul
3
awarded  Good Answer
Jul
3
comment How does the “Fourth Dimension” work with arrays?
@RichardTingle: Sorry, perhaps my notation wasn't clear. Each tuple represents an array element, and the numbers within the tuple represent the coordinate of that element. It looks like you're thinking of a notation for representing the actual array contents.
Jul
3
awarded  Nice Answer