|
Hi,
I have an application basically written in VS 2003, then I upgraded to 2005, now I'm running 2008 and I cant use any of the .Net 3 components so please tell me how to upgrade my app to be .Net 3 compatible
Thank you guys!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
I don't see why you can't, there's no such thing as a .NET 2.5 project, your project is .NET 3.5 ( not 3.0 ) or it's not.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Christian,
It's good to see you , I always get optimistic when the answer is from you
You see, I had to use the element host thing to include some wpf controls but i just cant reference any of the .net 3 dlls when it's not the case when i create a new app in .net 3/3.5
i'm sure i just need to find a way to convert my whole app to support .net 3/3.5 but i dont know how to do it, there should be some tool somewhere withing the ide i suppose
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
It seems probable to me that your project did not include references to the .NET 3 dlls, and you just need to add those references.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: ..references to the .NET 3 dlls, and you just need to add those references.
I thought so too at first but it's not possible when the project is not based on .Net 3 framework from the moment it is created!
You just cant include any dll with the version 3.x.x as it will be disabled!
Please try now to see what I mean, I'm sure you will be surprised as I am now
Create a new solution based on a version less than 3 and try to reference anything from .Net 3.
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Oh - there's a setting in 2008 that sets what framework you're building against, it DOES support 2.0. Perhaps the conversion is set to that by default, and you need to change that in the project settings ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
Glad to help
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
See, I told ya, there's always a good reason to be optimistic when I see your name in my thread
Thanks Christian!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
I am developing an internet cafe software and i want to know how can i get the total minutes from datetime1 to datetime2
for example:
14 Jun 2008 19:20:15 to 15 Jun 2008 21:53:45
|
|
|
|
|
This will work:
TimeSpan span = t2 - t1;
double minutes = span.TotalMinutes;
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
(datetime2 - datetime1).MinutesTotalMinutes like Greeeg said
Sorry for the mistake
Eslam Afifi
modified on Sunday, June 15, 2008 2:51 PM
|
|
|
|
|
|
in my country, our currency is (Dinar) and we have small units called fils (three decimals)
we have coins 50fils and 100fils
1 Dinar (BD) is 1,000 fils (10 coins)
I want to round to the nearest 50 or 100 fils based on user's setting.. for example:
if the amount is 0.513 and round is 50 then it will be 0.550 but if round to 100 it will be 0.600
if the amount is 1.148 and round is 50 then it will be 1.150 but if round to 100 it will be 1.200
how can i do that?
|
|
|
|
|
This is not rounding; you're taking the ceiling to 0.05 or 0.1 (in case it's not an integer amount of money)
A hint,
0.513 ceiling to 0.05 = 0.5 + 0.05 = 0.55
1.148 ceiling to 0.1 = 1.1 + 0.1 = 1.2
But you want 1.000 to return 1.000 not 1.05 or 1.1 so you'll take that into account. And use decimal not float or double.
Eslam Afifi
|
|
|
|
|
there is a class, say
class a
{
int i,j,k;
}
then, another class is derived as,
class b:a
{
int a,b,c;
}
now how many locations in the memory the object of class b will occupy, i mean wat will be the size of object of class b.
3 or 6 ???
i have tried to use sizeof operator.
But the compiler is giving error !
|
|
|
|
|
|
|
You're welcome.
Eslam Afifi
|
|
|
|
|
Well
I have a problem with converting.
I would like to convert 96.78 to int. I used Convert.ToInt32(total) and it turned out 97. I want my result is 96. I also used String.format but it has the same result.
|
|
|
|
|
Do you always want the value rounded down? Then use Math.Floor :
Convert.ToInt32(Math.Floor(total)
modified 12-Sep-18 21:01pm.
|
|
|
|
|
(Int32)96.78 will return 96, as desired.
|
|
|
|
|
I'm looking for an implementation or example or even just the logic for what must be an extremely common scenario:
Suppose we have N objects (where N is large). These objects are being accessed over time, but the pattern of access changes. Some are more popular at one time of the day, another i more popular at another time.
I would like to have a list of the top M (M << N) most requested objects for the last T minutes.
Keeping a log of all requests for all objects for the last T minutes is inpractical. Even keeping a list M items long in memory is stretching the friendship. It needs to be fast and efficient.
It doesn't need to be 100% accurate. Just close.
I've got something close based on rolling averages but it's not quite right. I know as soon as the answer is given I'll go 'Why didn't I think of that' but my brain is stuck, possibly because of the Adam Sandler movie I watched last night.
cheers,
Chris Maunder
CodeProject.com : C++ MVP
|
|
|
|
|
Sounds like you need a Priority Queue[^] (Wikipedia Link[^]), as used in many scheduling algorithms (process creation and much more). Each access to an object in the queue should increase the object's priority (could be a property, like a time stamp).
Or did I misunderstand your problem?
regards
modified on Sunday, June 15, 2008 11:50 AM
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I don't have much experience and this is primitive and slow and it’s certainly not what you’re looking for but here are my thoughts anyway. You have N objects and you want to get the top M of N each T period. I think you would associate an integer with each object and keep them in a list or something. Each time an object is accessed you increase the integer. Each T period you sort them and get the top M instead of maintaining them in a sorted structure.
About the rolling averages, this is the first time I hear about this and I don’t understand it. Doesn’t it depend on storing the last average and calculating a new average based on the current one? It’d be great if you explain it a little. Thank you.
Eslam Afifi
|
|
|
|