Kto Hochet Statj Millionerom Delphi
Is there a generic way to skip field serialization at JSON marshalling in Delphi XE2 DataSnap? TBizObjects = class DataObject: TDataObject; -- skip this field on serializaing descendants end.
Contents • • • • • • • • • • Broadcast history [ ] The Russian version of the series premiered on October 1, 1999 on NTV. Initially, the program was called, 'O, schastlivchik!'
('Oh, Lucky Man!' ), presented by Dmitry Dibrov. The game combines the simplicity of the rules to provide an opportunity to win the top prize of 1 million rubles. The series gained enormous popularity among Russian audiences, and in 2000, was awarded a Taffy award for Best Entertainment Program.
On February 19, 2001, the program moved to channel ORT (Channel One) and was renamed to its current title to reflect the name of the franchise. Dibrov departed the show, and was succeeded by comedian. On September 17, 2005 the money tree was revised, with the top prize now worth 3 million rubles. On December 21, 2008 Dibrov returned to hosting the show once more. Payout structure [ ] Question number Question value (in Russian Rubles) (Yellow zones are the guaranteed levels) Former: Classic format (2001-2005) Current: Classic format (2005-present) Risk format (2010-present) 1 100 500 500 2 200 1,000 1,000 3 300 2,000 2,000 4 500 3,000 3,000 5 1,000 5,000 5,000 6 2,000 10,000 10,000 7 4,000 15,000 15,000 8 8,000 25,000 25,000 9 16,000 50,000 50,000 10 32,000 100,000 100,000 11 64,000 200,000 200,000 12 125,000 400,000 400,000 13 250,000 800,000 800,000 14 500,000 1,500,000 1,500,000 15 1,000,000 3,000,000 3,000,000 Old game's version [ ].
I tried the new Record type TTimeSpan in Delphi 2010. But I encourage a very strange problem. Assert(TTimeSpan.FromMilliseconds(5000).Milliseconds = 5000); This assertion does not pass.
The value of 'TTimeSpan.FromMilliseconds(5000).Milliseconds' is expected to be 5000, but it was 0. Attiny13 software uart bascom. I dig deeper: function TTimeSpan.GetMilliseconds: Integer; begin Result:= Integer((FTicks div TicksPerMillisecond) mod 1000); end; FTicks = 50000000 TicksPerMillisecond = 10000 FTick div TicksPerMillisecond = 50000000 div 10000 = 5000 (FTick div TicksPerMillisecond) mod 1000 = 5000 mod 1000 = 0 // I do not understand, why mod 1000 Integer((FTick div TicksPerMillisecond) mod 1000) = Integer(0) = 0 My code interpretation is correct, isn't it?
UPDATE: The method GetTotalMilliseconds (double precision) is implemented correctly. You are confusing the properties giving the total amount expressed in a given unit with the properties giving the portion of a value when you break it up into its components (days, hours, minutes, seconds, milliseconds, ticks). With those, you get the integer remainder for each category. So, Milliseconds will always be between 0 and 999 (Number Of Milliseconds Per Second - 1).
Or, another example, if you have 72 minutes, TotalMinutes is 72, but Minutes is 12. It is very much similar to the DecodeDateTime function to break up a TDateTime. And for what you want to achieve, you definitely need to use the TotalMilliseconds property, as TridenT pointed out, but the code for GetMilliseconds is indeed correct in TimeSpan.