|
|
It returns 29,dont worry your code is correct.
|
|
|
|
|
|
BTW does your problem solve I think it was about threads,right?
|
|
|
|
|
Hamid. wrote: does your problem solve
That Delete file problem??nop. I failed to find a working solution.
Any way I updated my article. I have metioned the problem and have asked to tell me if any one finds some other solutions.
|
|
|
|
|
2 down votes . Seems some body doesn't like the idea.
|
|
|
|
|
Now see it again, its 3.3(dont forget our gold members ).
|
|
|
|
|
Hamid. wrote: Now see it again, its 3.3
Thanks Buddy..
|
|
|
|
|
Its 3.5 now
Learn from the mistakes of others, you may not live long enough to make them all yourself.
|
|
|
|
|
Thanks BadKarma, So you does some Good-Karma's also, haaaa?
|
|
|
|
|
Yeah,
thats the Dark Side of me
Learn from the mistakes of others, you may not live long enough to make them all yourself.
|
|
|
|
|
Should I repeat myself?
int daysOfMonth(int month, int year)
{
switch( month )
{
case 4:
case 6:
case 9:
case 11:
return 30;
case 2:
return year % 400 ? year % 100 ? year % 4 ? 28 : 29 : 28 : 29;
default:
return 31;
}
}
:-D
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
|
|
|
|
|
Other code of your magic site,right?
|
|
|
|
|
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
|
|
|
|
|
There is an unjustified low-vote here[^]. I wish you were there.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Done, wily old fox.
Now could you down vote a unjustified criticism here [^]
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
|
|
|
|
|
You're such a badass.
Thanks for the vote BTW.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
You know? I've been showing what you did (this leap year thing) to my Team Lead and we both were laughing out loud in the office. He said "this guy is a good programmer and has an excellent sense of humor too", for which I said "I know".
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Oh, thank you
BTW I was really embarassed, clicking firstly the vote button (I just intended to reply).
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
|
|
|
|
|
I would like some basic orientation in setting up a time limit in a demo.
I assume that the time of initial installation is stored somewhere. Where should it be stored ?
I am writing in C with Visual Studio 6,7, or 8.
Raymond Mercier
|
|
|
|
|
RaymondM wrote: Where should it be stored ?
It can be stored (encrypted) in either the registry or a .ini file.
"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
|
|
|
|
|
David,
Sometimes I think along those lines, but I wonder if the user can still 'get at' the data.
I wondered also if the time could be stored in a private file in the server. Then whenever the program is run it would open the path to the server to check that file.
What do commercial programmers do ?
Raymond
|
|
|
|
|
Key locked applications usually use an encryption algorithm that produces a large key and distributes the bits of the data source (in your case the expiry date) throughout the key. In this way it is impossible for the user to modify the date. Any attempt to modify the key to change the expiry date will invalidate the key completely and lock the application up.
See this article[^] for details on how you may go about adding a product key to your application.
Personally I don't like the "phone home" method of software validation, since I use a laptop and spend a fair bit of time developing disconnected from the internet (not always off a network, but that is a different matter).
Graham
Librarians rule, Ook!
|
|
|
|
|
RaymondM wrote: I wondered also if the time could be stored in a private file in the server
Your application does not run "without" a server/network ?
RaymondM wrote: What do commercial programmers do ?
We had (not now) a limited (not save/export and the like) features demo available for download (different than the paid application)
We found that having a timed demo/application is not worth it, either they run it, or they don't; if with a limited feature demo they find that they like it, they will buy it.
IN ANY CASES, if people want your application, they will find a way to get it ANYWAY.
This signature was proudly tested on animals.
|
|
|
|
|
Thanks to all who have taken the trouble to reply, especially for the link to the AES code.
I think now that the 'phone home' method is a bad idea.
I had put out a limited feature demo, but did feel that it would be better to make it time limited. My experience is that either scheme can lead to a sale.
Raymond
|
|
|
|