|
Hi Maximilien,
Your comments are great!
I can not change,
1. the business rules;
2. the organization of departments.
I can change, any data structures, like how to represent budget/organization relationship. Do you have any smarter solutions?
regards,
George
|
|
|
|
|
Maximilien wrote: Each department will need to have a "budget controling" parent; so effectivally, the "budget controling" parent will also be the organisational parent.
if goo's budget is not controled by foo it must be controled by another departement; and in any organisations, if that was the case, then goo will not be under foo.
A Department can get its budget from any number of "budget-givers". But it can only have exactly one organisational parent I cant imagine otherwise.
George_George, you probably need to separate budget and organisation and build two hierarchies.
Probably quite early in the design, you will need a tool to graphically depict the relationships in your database.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
int compute(int n)
{
if(n>0)
{
n=compute(n-3)+compute(n-1)
return n;
}
return 1;
}
void main()
{
x=compute(5);
cout<<x;
}
o/p:9 can anybody explain in detail the flow
|
|
|
|
|
I can tell you why it doesn't work: it goes into infinite recursion.
I was wrong.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
modified on Friday, April 18, 2008 10:19 AM
|
|
|
|
|
CPallini wrote: it goes into infinite recursion.
While I don't know exactly what it computes, it does indeed terminate.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Yes, it is true, I was wrong.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
sorry i am late
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
it working fine for me.. it not going in infinite recursion!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
|
philiptabraham wrote: can anybody explain in detail the flow
If it works, wikipedia can explain how it works and in great detail. Read on Recursive Function[^]
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Rajesh R Subramanian wrote: If it works
Good point, indeed.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Nah! I said that because the OP seems to be *wondering* how it works. That code should work, BTW [insert very much unsure smiley here]. I don't have a compiler here though.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Rajesh R Subramanian wrote: I don't have a compiler here though.
If don't have .. invent one...
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
philiptabraham wrote: o/p:9 can anybody explain in detail the flow
1/ Fire up visual studio.
2/ Compile your program.
3/ set a breakpoint in main.
4/ Assuming VS6, press f11 to step into compute. put n in your watch window.
5/ press f11 a lot, until the program is finished.
6/ Enjoy your new shiny enlightenment. Fight evil monks on bleak mountains.
Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
|
|
|
|
|
Iain Clarke wrote: 5/ press f11 a lot, until the program is finished.
press f11 a lot and a lot and a lot... Since the program experiences infinite recursion.
I was wrong.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
modified on Friday, April 18, 2008 10:21 AM
|
|
|
|
|
Well, no one said the road to enlightenment would be easy!
Maybe step 4.5 should have been "make yourself comfortable, with a barrel of castlemaine 6X."
Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
|
|
|
|
|
Alcoholic!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
that the right way to debug a program
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
It won't until you fix at least two syntax errors.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
plus inclusion of header file
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Ok!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
Did you try with other movie files? what was result?
|
|
|
|
|
Yes I tried running with other movie files. It works fine with mpg files but just not avi... I there any way to fix this?
|
|
|
|
|
If your try was successful maybe problem is of your file but if you think your file doesnt have,check clock.avi on the windows directory and also see does mci has tick on the System conkfiguration Utility?
|
|
|
|