Search Results

Search: Posts Made By: WebKruncher
Forum: Programming 12-17-2008
10,245
Posted By WebKruncher
C++
The Michael R Sweet reference looks really good - I'll keep this handy. But, it shows only the C interface. The samples demonstrate the critical components, and understanding it is a necessary...
Forum: Programming 07-04-2008
5,373
Posted By WebKruncher
I suspected as much
I suspect that you are dealing with an inter-process message queue of some sort, can you give me more details? Are you referring to an MKS message queue? I'll be glad to demonstrate wrapping it in...
Forum: Programming 07-04-2008
5,373
Posted By WebKruncher
SourceForge example
User manual for XML-RPC for C/C++ (http://xmlrpc-c.sourceforge.net/doc/#clientexample)
Forum: Programming 07-03-2008
2,646
Posted By WebKruncher
OO / STL approach
Here's another way to do it - I barely tested it, but it looks like it works.

namespace cpp_stl_method
{
using namespace std;

#define whitespaces ((char*)" \f\v\r\n\t")
inline void...
Forum: Programming 07-02-2008
5,544
Posted By WebKruncher
pathnames
I didn't spend much time testing this, but I think it'll work fine.

#include <iostream>
#include <cstdlib>

using namespace std;

int main(int argc, char *argv[])
{
string separator="/";...
7,305
Posted By WebKruncher
FileKruncher
There are so many ways to skin this cat, but my favorite is the stl. If you use two custom streams, and tweak your buffers to the rightt size, you can do just about any kind of file comparison you...
Forum: Programming 05-23-2008
18,801
Posted By WebKruncher
Which desktop?
I might be able to help work through this, but honestly, it's not something that I've done before in a Linux environment.
Are you using the KDE or Gnome?
Forum: Programming 05-22-2008
18,801
Posted By WebKruncher
Keyboard interrupts?
What OS? Are you trying to write a device driver or a low level hook? Or, do you want to use high level apis and capture events for your applications? Are you working in the context of a GUI?
Forum: Programming 05-20-2008
12,422
Posted By WebKruncher
getline
better control of the input is achieved by using getline...

cout<<"Please type something:"<<endl;
string line;
getline(cin,line);
cout<<"You entered:"<<line<<endl;
Forum: Programming 05-20-2008
31,972
Posted By WebKruncher
args
argv is a double pointer to strings. Just dumping the pointer to stdout won't work out very well. Consider traversing the array, using argc to resolve the end of the list of pointers.

#include...
Forum: Programming 05-20-2008
16,153
Posted By WebKruncher
stringstream
Use sstream.

#include <sstream>
using namespace std;

int main()
{
stringstream ss;
ss<<"Formatted date example (H:M:S):"<<hour<<":"<<min<<":"<<sec<<endl;
cout<<ss.str().c_str();
...
Forum: Programming 03-06-2008
6,385
Posted By WebKruncher
hmmm, I better go look closer at the ISO, but I...
hmmm, I better go look closer at the ISO, but I think set<> is always sorted.
See set - C++ Reference (http://www.cplusplus.com/reference/stl/set/)
GCC seems to think the set is sorted.

If the...
Forum: Programming 03-06-2008
6,385
Posted By WebKruncher
algorithms, libraries, re-inventions
I'm having a little trouble understanding your pseudo code, but it sounds like it might be best to just approach the problem as if it is one array, and one sort. Then, if the second array needs to...
Forum: Programming 03-06-2008
6,385
Posted By WebKruncher
Maps
I think I can help you out, but I might need a better understanding of what you're trying to do. The map class might be what you're looking for. If your not used to templates, the syntax is a bit...
Forum: Programming 12-26-2007
39,894
Posted By WebKruncher
hmmm
That's getting to what I'm after. I've never seen the innards of the WaitForMultiple... stuff (though I make pretty good use of the api's). I've never used the used the motif libraries. I really...
Forum: Programming 12-23-2007
39,894
Posted By WebKruncher
The waiting is the hardest part
So, I'm looking at WaitFor.c in the xorg-server/os source files. I see where it selects it's clients, but I don't see where it selects anything triggered off of a clock. I also see time() checks in...
Forum: Programming 12-23-2007
39,894
Posted By WebKruncher
cool - thanks
I'll have to look at that.
Can you do this on every OS?
Forum: Programming 12-22-2007
39,894
Posted By WebKruncher
samples?
Do you know of any samples of select being used as a cron trigger?
Forum: Programming 12-22-2007
14,449
Posted By WebKruncher
good point
no matter what language you use, it's important to try to keep generic things generic. I like the C++ templates approach. It gets a bit complicated, but it's well worth it because it provides an...
Forum: Programming 12-22-2007
14,449
Posted By WebKruncher
Great find!
mikes serial device resources look really good.

The way I look at it, the most important thing to consider is that the device may not do what you think it will. The utility needs to have a way of...
Forum: Programming 12-20-2007
39,894
Posted By WebKruncher
Great feedback!
This might be about the coolest site I've ever seen. Anyway, diplomacy is over-rated :)

I don't disagree at all about the performance hit. I came up with the C++ object just to pack all of...
Forum: Programming 12-19-2007
39,894
Posted By WebKruncher
timing is everything :)
interesting - I didn't even realize this was for use in a battery powered device. I guess there are a billion things it could be used for, and there are probably billion different ways to do it.
...
Forum: Programming 12-18-2007
39,894
Posted By WebKruncher
I disagree
True, but then the function can only act as a cron manager. The object is meant to be used from within a game loop. That seems far more useful than a discrete utility designed only to sleep for...
Forum: Programming 12-18-2007
39,894
Posted By WebKruncher
curious
What poor implementation? Did I make a mistake in the code? Does it not work?
Forum: Programming 12-18-2007
9,906
Posted By WebKruncher
I would do it with the STL
maybe a map<string,string> would do the trick.
Showing results 1 to 25 of 29

 
All times are GMT -4. The time now is 06:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy