Search:
Type: Posts; User: sandodo
Search:
Search took 0.06 seconds.
-
March 8th, 2011, 11:09 PM
Hi All,
I am using the prototype design pattern to design a static library in linux.
the class architecture looks like below:
//Product.h
class Product
{
-
November 30th, 2010, 01:08 AM
-
November 29th, 2010, 09:01 PM
end to end is to mean that the message received at incoming socket to broadcasted to outgoing socket.
and our test model simulate the existing way of using queue. however, of course, we donot...
-
November 29th, 2010, 01:56 AM
thanks for your replies.
currently the throughput of one message end to end is about 50 micro-seconds, two queues (input_q and outgoing_q) take more than 10 micro-seconds out of the 50...
-
November 28th, 2010, 08:36 PM
we are using this queue for trading platform's backend server.
the queue itself will cost about 6 micro-seconds to enqueue and dequeue a message, if we want to introduce a new layer into the design...
-
November 26th, 2010, 02:12 AM
we cannot have reader thread keep running without waiting, and we want to have better throughput by read any messages enqueued as soon as possible, currently we use pthread_condwait() and...
-
November 25th, 2010, 10:23 PM
thanks a lot for pointing out a direction.
one question for the idea of one local queue per writer, how can we avoid the reader thread to avoid blocking by a writer which is a bit free?
and we...
-
November 24th, 2010, 11:14 PM
Hi All,
we have designed a FIFO queue with pthread mutex and its conditionWait(), inside the queue, we use std::deque, which is quite efficient. and we only enqueue & dequeue pointers to objects,...
-
let me remove my codes. :)
-
Thanks a lot to all of you. You guys are great.
All my best!
-
Thanks Paul McKenzie for the helpful link. :wave:
Thanks. the example of 1/3 cannot be represent by decimal number is very good.
However for
integer*2**i, cannot understand.........
-
Thanks! I searched, but didnot find the answer. Maybe not searching enough. :blush:
-
One question: I cannot tell why a float equal to 333.33 cannot be print correctly to screen? And after we run ff = f1 + f2; the result is not 333.33? does it mean that result of f1 + f2 will be...
-
In addition to FAQ:
Please note that using function sccanf() to convert string into f with float type,
sscanf(str_float, "%f", &f);
The result may not be what you want.
refer to the example...
-
the link provided by exterminator explain one more factor, a++ and ++a can be evaluated at the same time, which can mess up the memory. :ehh: so maybe undefined behavior will be more correct than...
-
yes, I guess it is the reason. Thanks a lot guys!
int operator *(const int & lhs, const int & rhs);
in the function operator , no compiler can guarantee that lhs will be processed before rhs,...
-
Yes, but I prefer you to think about the answer before run it in your platform.
I cannot answer why the output it is, so I think some expert can explain it. And thanks to explain more about...
-
This is the question for C++ expert, what will be the output of following codes and why?
Thanks a lot in advance!
#include <iostream>
int main()
{
int a = 5;
-
March 15th, 2007, 11:01 PM
Is it possible to reuse the functions in C for different data types in run time?
For example: I have functions to process link list: T represent any data types:
typedef struct {
...
-
January 19th, 2006, 04:09 AM
Thanks, but I tried to init den as following, and I changed the arguments type of const_str1 & const_str2 to const char*
const char* dent[] = {const_str1, const_str2};
the compiler reports...
-
January 19th, 2006, 03:46 AM
to microcode: it is for initialization of the array. maybe you can see more clearly as following example:
char* dent[] = {NULL, NULL};
for approach:
char const_str[] = "a test";
char*...
-
January 18th, 2006, 11:55 AM
no,
char* dent[] = {0}; is declared as an array of char * and dent[0] is init to be NULL
I am considering assign an array of char* to some char* variables passed into a function as arguments.
-
January 18th, 2006, 08:28 AM
Thanks for all your replies.
I think it is supposed to let programmer only modify the define of SOFTVERSION so that all other part of the codes know that now version changes to a new one.
And I...
-
January 18th, 2006, 07:16 AM
Sorry, the SOFTVERSION is actually a define
#define SOFTVERSION "5.46"
by the way, is it possible or isthere a way to do init a char* [] like this?
#define str "a string"
-
January 18th, 2006, 06:16 AM
Hi,
I see the initializition of a char array like this:
char ident[] = "@(#) You are running version "SOFTVERSION ;
SOFTVERSION is a char *;
Is this a valid char [] declaration & init...
|
Click Here to Expand Forum to Full Width
|