|
Holle,
I would like to implement a system using Browser/Server architecture.
Server end will run Linux whereas clinet end will run Windows.
What computer programing language will be suitable for this application development.
Thanks
|
|
|
|
|
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Don't cross post. It is considered rude.
cy163@hotmail.com wrote: What computer programing language will be suitable for this application development.
Probably php if you are going to have the server on a linux box...
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Hi.
I was wondering if someone could tell me how to change the icon of the exe for the program? Is there was a way I could just do a define to use the bitmap or icon I want so that I can change it anytime?
Thanks in advance!
Stan the man
|
|
|
|
|
Do you mean the icon shown in the Windows Explorer windows?
If so, the system uses the icon resource with the lowest ID
by default (e.g. 1).
For the application while it's running, you can use the
WM_SETICON message (CWnd::SetIcon() in MFC).
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
You can use of LoadIcon and then SetIcon?
|
|
|
|
|
dear friend
what problem is following calculation? thanks
here gbest is a 3x4 array
for (int i =0;i<10;i++)
{
for (int j = 0;j<3;j++)
{
for (int k = 0;k<4;k++)
v[i][j][k] = w*v[i][j][k] + c1*rand()(pbestArray[i][j][k]-x[i][j][k]) + c2*rand()(gbest-x[i][j][k]);
x[i][j][k] = x[i][j][k] + v[i][j][k];
}
}
computer showed me:
error C2064: term does not evaluate to a function taking 1 arguments
error C2112: '-' : pointer subtraction requires integral or pointer operand
Li Zhiyuan
5/10/2006
|
|
|
|
|
if gbest is an array, shouldn't it have the dimensions at its side?
v[i][j][k] = w*v[i][j][k] + c1*rand()(pbestArray[i][j][k]-x[i][j][k]) + c2*rand()(gbest-x[i][j][k]);
shouldn't it be:
v[i][j][k] = w*v[i][j][k] + c1*rand()*(pbestArray[i][j][k]-x[i][j][k]) + c2*rand()*(gbest[i][j][k]-x[i][j][k]);
Hope this helps...
|
|
|
|
|
I guess pbestArray is a pointer to the array, so I think
pbestArray[i][j][k]-x[i][j][k]
should be
(*pbestArray)[i][j][k]-x[i][j][k]
And , as Joan Murt said, you should add "*" between rand() and ...(something after it).
May you good luck
============
Einstein
Seeing is believing.
|
|
|
|
|
It flicks only in one case.
When another window(A) cover the window(B) in my app, then I minimize A and the mouse cursor becomes in the client of B, then the B flicks. Here is the code in OnMouseMove , how to solve the problem? Thanks.
void CMyDlg::OnMouseMove(UINT nFlags, CPoint point)
{
Point pt(point.x,point.y);
m_pcs->DrawCom(m_pMemGraphics);
m_pcs->DrawCtl(m_pcs->GetSelDev(pt),m_pMemGraphics);
Invalidate(FALSE);
CDialog::OnMouseMove(nFlags, point);
}
|
|
|
|
|
Why are you calling Invalidate() there?
What does your WM_MOUSEMOVE handler do?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I check if the mouse cursor is on some area, then draw a bound box if it is.
|
|
|
|
|
You should be able to just draw to a client DC without
having to go through the WM_PAINT message.
If you must use Invalidate() there, maybe following it
with an immediate call to UpdateWindow() will help...so
there's no delay before the relulting WM_PAINT message is
processed.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello everyone,
How do you understand the comments from Bjarne about exception specification?
--------------------
(section 14.6.1 Checking Exception Specifications)
The way to think about exception-specifications is to assume that a function will throw any exception it can. The rules for compile-time checking exception-specifications outlaw easily detected absurdities.
--------------------
thanks in advance,
George
|
|
|
|
|
Compile-time checking means you know every situations, and you rule the world. Such as:
int a = 3;
if(a != 3) {
throw Err();
}
But the spirit of exception is "exception", which means you only know to handle "some" rules, but you won't know "the rest" part. Such as:
try {
bool b = The_API_from_some_DLL();
}
Maxwell Chen
|
|
|
|
|
Thanks Maxwell,
Your reply is clear and my question is almost answered. Bjarne's comment "outlaw easily detected absurdities" means?
regards,
George
|
|
|
|
|
George_George wrote: Bjarne's comment "outlaw easily detected absurdities" means?
Meaning: When you expect the enemy to enter your fort from the front gate (compile-time [easily detected absurdities] ), they might enter from tunnel or from the sky.
Maxwell Chen
|
|
|
|
|
Thanks Maxwell!
Cool!! You always have the same point as Bjarne's.
regards,
George
|
|
|
|
|
Do you want to know about try/catch?
|
|
|
|
|
Thanks Hamid,
I want to know how to understand the following comments from Bjarne about exception specification.
--------------------
(section 14.6.1 Checking Exception Specifications)
The way to think about exception-specifications is to assume that a function will throw any exception it can. The rules for compile-time checking exception-specifications outlaw easily detected absurdities.
--------------------
regards,
George
|
|
|
|
|
I think he wants to tell that you can control exceptions when your program is running.
|
|
|
|
|
Thanks Hamid,
What do you mean "control exceptions"?
regards,
George
|
|
|
|
|
for example you have an runtime error like file not found so if you didnt have any code for it,your program will be producting an error and finish your progra,.
|
|
|
|
|
Hi Hamid,
Does your reply relates to my original question?
regards,
George
|
|
|
|
|