This is an example to check connection state for a specific port number. It returns command output.
This is an example to check connection state for a specific port number. It returns command output.
Pointer Related: Array, Structure, Single Pointer (*), Double Pointer (**), Reference (&)
bool getBit(int num, int shift)
{
return ( (num & (1 << shift)) != 0);
}
int setBit(int num, int shift)
{
return ( num | (1 << shift));
}
int clearBit(int num, int shift)
{
int mask = ~ (1 << shift);
return num & mask;
}
int clearBitMSBthroughShiftBit(int num, int shift)
{
int mask = (1 << (shift )) -1;
return num & mask;
}
int clearBitMSBthroughShift0(int num, int shift)
{
int mask = ~ ((1 << (shift +1 )) -1);
return num & mask;
}
int updateBit(int num, int shift, int v) //set i-th bit = v
{
int mask = ~ (1 << shift);
return (num & mask) | (v << shift);
}
int val = 0x0D0C0B0A;
char c = *((char *)(&val));
if (c == 0x0A)
cout<< "little endian machine"<<endl;
else if(c == 0x0D)
cout<< "big endian machine"<<endl;
This app uses wireless network to connect your PC and then sends commands to control your player software. Now, it only supports UPMOST net-TV3 (network TV-BOX).
Development tool:
Reference: Data Structures and Algorithms with Object-Oriented Design Patterns in C++
#include <iostream> #include <stdexcept> // std::out_of_range using namespace std; template <class T>
When I designed a full adder using Cadence, the user interface of setting stimulus isn't convenient. This tool provides an easy way to setup a stimulus file.
After uploading the stimulus file to a unix server, using following command to change the format:
tr -d "\r" < dosfile >unixfile
This software records your daily expense and income. I use several Microsoft Access database files (*.mdb) to store data. To prevent an oversize database file, I split the database into several parts.
Futures:
Next version futures:
Features: