Hi,
I am trying to use the Python C API to define a new class inside a module that would expose certain functionality written in C to Python code. I specifically want to have it in the form of a class and not a set of module functions.
However, I can't find anything regarding this particular task in the official documentation. The clos...
Hello, given the following structure:
struct nmslist_elem_s {
nmptr data;
struct nmslist_elem_s *next;
};
typedef struct nmslist_elem_s nmslist_elem;
Where:
typedef void* nmptr;
Is it possible to write a MACRO that retrieves the data from the element and cast it to the right type:
MACRO(type, element) that expands to *((ty...
Is there an API that will delete all the values under a specific registry key?
for example, I have the following key
HKEY_CURRENT_USER\Software\MyCompany\Program\Myconfig
under it I have
(Default)
SomeVal
SomeOtherVal
YetSomeOtherVat
...
There might be 10, 20, 100 values there. It depends what you set on the application.
Is there a ...
Recently came across pidgin. Its great, and does what I want, but I am not too keen on the GPL license. Other any alternatives, with less restrictive licenses?
I would prefer the library to be C or C++, as I am most familiar with those languages, but a an IM library implemented in python would be interesting too.
...
You are going on a one-way indirect flight trip that includes billions an unknown very large number of transfers.
You are not stopping twice in the same airport.
You have 1 ticket for each part of your trip.
Each ticket contains src and dst airport.
All the tickets you have are randomly sorted.
You forgot the original departure ai...
Anybody know of documentation on how to link libhoard as a static library in linux?
...
I'm currently working on a project which involves multiple clients connected to a server and waiting for data. I'm using select and monitoring the connection for incoming data. However, the client just continues to print nothing, acting as if select has discovered incoming data. Perhaps I'm attacking this wrong?
For the first piece of d...
I'm looking for test vectors for AES-256 in CBC mode with essiv:sha256 for the IV-generation,
and for testvectors for AFMerge. Both are used in cryptsetup (a Linux program for disk encryption.)
...
Hi,
I'm using unix system() calls to gunzip and gzip files. With very large files sometimes (i.e. on the cluster compute node) these get aborted, while other times (i.e. on the login nodes) they go through. Is there some soft limit on the time a system call may take? What else could it be?
...
This is what I get for pampering myself with high-level programming languages.
I have a function which writes a 32-bit value to a buffer, and a uint64_t on the stack. Is the following code a sane way to store it?
uint64_t size = 0;
// ...
getBytes((uint32_t*)&size+0x1);
I'm assuming that this would be the canonical, safe style:
ui...
I was wondering how I could allocate (and De-Allocate) an array of char pointers (char*[64]) in C. I've looked around on the web for examples but they all focus on other datatypes or one dimension arrays.
...
Lets say I have 4 verticies and their texture coordinates. How could I then figure out the texture coords of a 5th vertex?
Thanks
say I have:
v1 = (0,0) tex coord(1,0)
v2....
v3...
v4...
v5 = (15,15) tex coord = ??
yea linear interpolation I suppose,
To figure out the coords I do:
vec.x / polywidth;
vec.y / polyheight;
...
Is there any crossplatform C\C++ lib for files searching? (on hard drive) What I need is simple - be able to find all images on users computer in all folders and subfolders with sise >= 200kb.
How to do such thing? Can any one help me? Please.
...
in an effort to only ask what I'm really looking for here... I'm really only concerned if it's considered bad practice or not to declare an array like below where the size could vary. If it is... I would generally malloc() instead.
void MyFunction()
{
int size;
//do a bunch of stuff
size = 10; //but could have been somethi...
Hi!
I'm experimenting with a piece of C code. Can anyone tell me why is VC 9.0 with SP1 crashing for me? Oh, and the code is meant to be an example used in a discussion why something like
void main (void)
is evil.
struct foo { int i; double d; } main (double argc, struct foo argv)
{
struct foo a;
a.d=0;
a.i=0;
re...
Looks like linux doesnt implement pthread_suspend and continue, but I really need em.
I have tried cond_wait, but it is too slow. The work being threaded mostly executes in 50us but occasionally executes upwards of 500ms. The problem with cond_wait is two-fold. The mutex locking is taking comparable times to the micro second executi...
I've got a one to all broadcast method for a hypercube, written using MPI:
one2allbcast(int n, int rank, void *data, int count, MPI_Datatype dtype)
{
MPI_Status status;
int mask, partner;
int mask2 = ((1 << n) - 1) ^ (1 << n-1);
for (mask = (1 << n-1); mask; mask >>= 1, mask2 >>= 1)
{
if (rank & mask2 == 0)
{
pa...
main()
{
char a,b
a='A';
b='B';
strcat(b,a);
printf("a:%s b:%s",a,b);
}
...
what is the best ns2 bluetooth extension to research scatternet formation?
is it blueware or blueHoc or UCBT?
...
I am suffering from an unexpected behavior; here is the problem definition:
I have applications communicating on a LAN via UDP protocol. I am reading the IP address and port number from a text file. Initially the IP address and port number are working nicely but, after some time, the IP address that is stored in a char array is corrup...