-
as seen on Programmers
- Search for 'Programmers'
I have always been skeptical of rewriting working code - porting code is no exception to this. However, with the advent of TDD and automated testing it is much more reasonable to rewrite and refactor code.
Does anyone know if there is a TDD tool that can be used for porting old code? Ideally you…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
This is very basic question from programming point of view but as I am in learning phase, I thought I would better ask this question rather than having a misunderstanding or narrow knowledge about the topic.
So do excuse me if somehow I mess it up.
Question:
Let's say I have class A,B,C and D…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Is there an accepted general term that subsumes the concepts of variables, class instances and arrays? Basically "any typed thing that needs memory". In C++, such a thing is called an object, but I'm looking for a more language-agnostic term.
§ 1.8 The C++ object model
1 The constructs in…
>>> More
-
as seen on Programmers
- Search for 'Programmers'
A lot of the code I've been working on recently, both professionally (read: at work) and in other spheres (read: at home, for friends/family/etc, or NOT FOR WORK), has been worked on, redesigned and re-implemented several times - where possible/required. This has been in an effort to make things smaller…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi there:
I might be doing a coding competition soon, I was wondering if anyone made one and what where the guidelines/ process.
I'd like to make the competition appealing to all devs, and I m trying to come up with ideas as to how.
the scenario is: There is an event running and we(of the coding…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
In a sequence of length n, where n=2k+3, that is there are k unique numbers appeared twice, how to find the three unique numbers that appeared only once using bit manipulation?
for example, in sequence 1 1 2 6 3 6 5 7 7 the three unique numbers are 2 3 5.
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I didn't know any better name for a title of the question.
For ex: on one of my previous questions one answered ((a)-(b))&0x80000000) 31 - this is kind of a too advanced for me and i can't really get what it means. I am not looking just for an answer of that, but i need someone to tell me some…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi.
I am trying to make a loop that loops through all different integers where exactly 10 of the last 40 bits are set high, the rest set low. The reason is that I have a map with 40 different values, and I want to sum all different ways ten of these values can be multiplied. (This is just out of…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have a fragment of bytes in a byte[]. The total size of the array is 4 and I want to convert this into a positive long number. For example if the byte array is having four bytes 101, 110, 10, 1 then i want to get the long number represented by binary sequence
00000000 00000000 00000000 00000000…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
I am stuck with a problem. I am working on a hardware which only does support 32 bit operations.
sizeof(int64_t) is 4. Sizeof(int) is 4.
and I am porting an application which assumes size of int64_t to be 8 bytes. The problem is it has this macro
BIG_MULL(a,b) ( (int64_t)(a) *…
>>> More