I am working on integrating with several music players. At the moment my favorite is exaile.
In the new version they are migrating the database format from SQLite3 to an internal Pickle format. I wanted to know if there is a way to access pickle format files without having to reverse engineer the format by hand.
I know there is the cPi...
I'm connecting to a bluetooth socket like so,
SOCKET s = socket(AF_BTH, SOCK_STREAM, BTHPROTO_RFCOMM);
SOCKADDR_BTH bthSockAddr;
bthSockAddr.btAddr = addr;
bthSockAddr.addressFamily = AF_BTH;
bthSockAddr.port = BT_PORT_ANY;
bthSockAddr.serviceClassId = SerialPortServiceClass_UUID;
if ( 0==connect( sOut, (sockaddr*)&bthSockAddr,sizeof...
Hi, I am using glib,
it has a lot of functions that return strings that should be freed myself.Can I, pass these functions to other functions?
Example: function1 returns a string that must be freed for the caller.
function2 returns a pointer to a string that must be freed also.
gchar *string = function2(function1("something"));
g_fre...
A few months ago I had to write a small tool to program the eeprom of a rtl8139-card. It's basically the rtl8139-diag tool stripped down to read/write the eeprom.
This tool has to be extend to be able to program the eeprom of rtl8101-cards now. This was not a problem, as the interface to the eeprom is similar to the one of the rtl8139. ...
In C, there appear to be differences between various values of zero -- NULL, NUL and 0.
I know that the ASCII character '0' evaluates to 48 or 0x30.
The NULL pointer is usually defined as:
#define NULL 0l
In addition, there is the NUL character '\0' which seems to evaluate to 0 as well.
Are there times when these three values can n...
In visual studio 2003's project settings, I specified the java.exe as the program to execute when debugging. I set the working directory in which the JNI dlland JNI jar is available.
I set the class paths and the command line arguments which I would pass to java in the program arguments.
The java file which I am using is compiled with ...
Hey guys,
Do you guys know how to run terminal commands from you GUI application? I need the coding for my app. For example, if I type "netstat" in terminal it will give me all the ports. I want to this from my xcode app. Is that possible? BTW it's not just the "netstat" command it could be "sudo.... "
Thanks,
Kevin
...
I have a need to calculate the minimum area rectangle (smallest possible rectangle) around the polygon.
The only input i have is the number of points in polygon.
soryy for the incomplete information . Yes i have the co-ordinates of the points also
Thanks
...
Is it possible to stringify a character in a preprocessor macro without it including the (')s
example:
#define S(name, chr) const char * name = #name chr
usage:
S(hello, 'W'); //should expand to 'const char * hello = "helloW"
Thanks a bunch!,
Andrew
...
struct node{
int data;
struct node * next;
};
How does the compiler allocate memory for "next" member in when we have not yet allocated memory for the structure "struct node"
...
Hello.
I'm a complete novice in everything except maybe breathing, so sorry if I'm not being clear, but here goes:
I have a function in C which writes bytes to a circuit via an I2C bus, and in the header file it looks like this:
BOOL WINAPI JidaI2CWrite(HJIDA hJida, DWORD dwType, BYTE bAddr, LPBYTE pBytes, DWORD dwLen);
hJida: Bo...
Hi,
I have a C++ program using OpenMP, which will run on several machines that may have or not have OpenMP installed.
How could I make my program know if a machine has no OpenMP and ignore those "#include ", OpenMP directives (like "#pragma omp parallel ...") and/or library functions (like "tid = omp_get_thread_num();") ?
Thanks and r...
I have on occasion used a header file purely to import a group of related header files that describe the interfaces on all public components of a module. This was done for convenience. Anyone using the module need only import the one header file.
Is this practice recommended, and if so does said practice have a name? I am trying to name...
Hi there ,
I have ported a C program to a C++ Template Meta program .Now i want to compare the runtime .
Since there is almost no runtime in the C++ program , how should i compare these 2 programs.
Can i compare C runtime with C++ compile time ? or is it just not comparable ?
...
I have a libpq program that is routinely inserting numbers into a database. These numbers, which I'm expecting to grow quite large, are stored int the uint64_t type. I'm wanting to send the integer to libpq as binary, but Postgres won't be able to tell its unsigned. Is there a way to specify an unsigned integer in Postgres or libpq?
...
Is it advisable to directly jump onto C# with knowing just a mere bit of C (just some basics) or even may be without knowing C ?
...
I think the problem is pretty common. You have some input string, and have to call a function depending on the content of the string. Something like a switch() for strings.
Think of command line options.
Currently I am using:
using std::string;
void Myclass::dispatch(string cmd, string args) {
if (cmd == "foo")
cmd_foo(arg...
Does any one know if there is a way to dump only a chunk of memory to disk using VS? Basically, I want to give it an address and a length, and have it write the memory to disk. That way I can do a binary diff.
Thanks.
...
Hi,
I'm trying to get the numerical (double) value from a byte array of 16 elements, as follows:
unsigned char input[16];
double output;
...
double a = input[0];
distance = a;
for (i=1;i<16;i++){
a = input[i] << 8*i;
output += a;
}
but it does not work.
It seems that the temporary variable that contains the result of the lef...
I thought I understood the basics of pointers, but after checking out some documentation on some sqlite3 methods I got thrown, so now I am unsure if my understanding is correct.
Here is a call to an sqlite3 method:
char* dataFilePath = "foobar.sqlite";
if (sqlite3_open(dataFilePath, &database) != SQLITE_OK) {...}
And here is the func...