Get the job done with limited budget

As expected, we outsource to India and China.
I look for people who did the same work before to create a win-win situation.
A half year work for a typical employee only takes our contractor a month, because it is a matter of customization instead of creation.
The challenge for us is to precisely describe what we want, and find people.
CSTO has a good pool of talents even though the site itself could be better.
Seeking live HLS stream on Android troubled us and we solved it in a week on CSTO.
(Thanks to ZhangLong, our Android contractor)


Engineering as co-founder

Five years later, I am going back to my business blog.
I co-founded MaxxSports in 2015, and joined full-time in May 2017.
This blog will serve as preparation of our future formal technical documentation, while our streaming/recording/AI system evolves.
The live streaming and DVR have been released to users.
One of our new projects is to let the cameras follow the players in a hockey game.
OpenCV and TensorFlow is heavily involved.


A functor from scratch that works with std bind2nd

For a functor to work with bind2nd, it usually derives from binary_function.
However, making one from scratch is not much work as illustrated in the following.

struct FunctorAdd //takes two parameters, operator() returns the sum of the two.
int operator()(const int & i, const int & j) const 
{ return i+j; 
typedef int result_type;
typedef int first_argument_type;
typedef int second_argument_type;
void Test_bind2nd()
int a[] = {0, 2, 3 };
int c = count_if ( a, a + 3, bind2nd(FunctorAdd(), 0) ); //bind2nd is a system adapter in std
//count the ones that are not 0
_ASSERT(c == 2); //this proves FunctorAdd works well with bind2nd

Find out the length of array

void TestLengthArray()
	enum {E_ARRAY_LEN = 2};
	int *a = new int[E_ARRAY_LEN];
	size_t iSize = _msize(a) / sizeof a[0];
	_ASSERT(iSize == E_ARRAY_LEN); //here we got the length of the array

MSDN didn’t mention if _msize can be used for ‘new’; it just seems working.
This is not supported by the standard, but good to know it’s possible at runtime.