There are several ways to list serial ports under Windows but I'm not sure what is the proper way: the way that does detect all serial ports that are available.
One good code example is http://www.naughter.com/enumser.html - where there are 9 (nine!) ways of enumerating serial devices.
The question is: what is the optimal way of doing ...
Hey everybody,
Thank you all before I start.
I am facing a serious issue with sprintf.
suppose my code snippet is :
sprintf(Buffer,"Hello World");
sprintf(Buffer,"Good Morning");
sprintf(Buffer,"Good Afternoon");
.
.
.
Some hundred sprints....
If i do like this, its getting overwritten.
How can I avoid overwritting using sprint...
insertion_procedure (int a[], int p [], int N)
{
int i,j,k;
for (i=0; i<=N; i++) p[i] = i;
for (i=2; i<=N; i++)
{
k = p[i];
j = 1;
while (a[p[j-1]] > a[k]) {p[j] = p[j-1]; j--}
p[j] = k;
}
}
What would be few good whitebox test cases for this particular insertion procedure?
...
Hi,
i am trying to display characters like £ on a device which runs under linux .
it is using utf-8 charset format .
when i get to display a string which contains special characters, it displays other characters too .
if i print the string on the console it appears ok, but when i parse the string to load each letter font on the screen i...
does anyone know how to initialise the 16-bit timers in M4-64/32?
...
I want to get the current date (day, mon and year). I found out there are some functions in C to do that like ctime (get the string of time), localtime and gmtime. I tried with following code but the output are different. I get this output:
The date and time is Tue Apr 20 2010 (which is correct)
The year is : 110
The year is : 110.
D...
Gtk how should I calculate width of the string in pixels.
I have created a markup string using g_markup_printf_escaped and I want to calculate width of the string in pixels not in chars.
Does Pango provides any function to calculate string length in pixels?
Depending on font type, size and weight.
Thanks,
pp.
...
It is easy to display the status of a Windows service or to control it (start/stop) from a GUI application but the question if how about receiving/sending notifications from the service? Like: service telling to the user monitoring it that it needs attention.
Please consider that you can have several controllers started at any time in a...
Trying to get Height and Width of GtkEventBox.
Tried following Things.
GtkRequisition requisition;
gtk_widget_get_child_requisition(widget, &requisition);
// Getting requisition.height 0
----------------------------------------------------------
widget->allocation-x //getting 0
widget->allocation-height //getting -1
------------...
Hello everyone,
I am trying to write Python wrap for C code which uses struct.
modules.c:
struct foo
{
int a;
};
struct foo bar;
modulues.i
%module nepal
%{
struct foo
{
int a;
}
%}
extern struct foo bar;
But during compiling I am given error:
In function ‘Swig_var_bar_set’:
error: ‘bar’ undeclared (fi...
I am trying to cast data to a struct from a parameter passed into my method, I need the data to be passed to a global variable as it is needed elsewhere in my application.
I have tried the following but I get errors saying that diceResult is an undeclared identifier
Here is the code itself:
//Structure to hold dice data
typedef struct...
In this maximally clipped source example, the manifest constant FOOBAR is being redefined. This is deliberate, and there is extra code in the live case to make use of each definition.
The pragma was added to get rid of a warning message, but then a note appeared, and I don't seem to find a way to get rid of the note.
I've been able to ...
what are the best bluetooth emulators/simulators?
i have a project for the security course, and i chose bluetooth as my topic.
so i need to create encryption algorithms using a bluetooth simulator and test them. i have already searched for the best emulaters, and the results were google anroid, and NS2.
is there any emul...
Just looking on resources that break down how frames per second work. I know it has something to do with keeping track of Ticks and figure out how many ticks occured between each frame. But I never ran into any resources on why exactly you have to use the methods you use in order to get a smooth frame work. I am trying to get a thourough...
Given a date of birth, how would I go about calculating an age in C?
For example, if today's date is 20/04/2010 and the date of birth given is 12/08/86, then age will be 23 years, 8 months, and 8 days.
Any suggestions would be appreciated.
Thanks!
...
Hi,
Can you please tell me if there is any library which format HTTP response?
And I can use that with a raw socket?
Thank you.
...
Hello,
Hopefully my title was descriptive enough to attract the right help.
I want to write a function that will return 1 thing, and modify a provided pointer in another.
My current function declaration is . . .
char * replaceURLS(char * body)
What I want to do is copy all of body's data into a new string, and set body to point to ...
What happens when I MPI_Send to a process that has finished?
I am learning MPI, and writing a small sugar distribution-simulation in C. When the factories stop producing, those processes end. When warehouses run empty, they end. Can I somehow tell if the shop's order to a warehouse did not succeed(because the warehouse process has ended...
i have some parsed data in two files. i need to send these to a webserver of a website. i also need to be logged into the webserver first. i am new to this web interaction thing. i just need to know how might i go about doing this. i am learning the libcurl library so i guess it can send standard HTTP POST messages. i will make a simple ...
I'm trying to port the unix utility ldd to windows, because dependency walker and cygcheck don't quite give me the usage I'm looking for. (also for the learning experience)
Ive been looking all over MSDN, for a windows API that lists dll dependencies of an executable, or even the storage format in the complied exe (just to filter it ou...