Most Popular Programming Languages 1965 - 2019

My poor COBOL!
And Visual Basic!!! (I still don't understand why C# but not VB.Net!)

Anyway, from 1965 to 2019 in less than 5 minutes; even my watch ran at the same speed :(


TELEMMGLPICT000004150914_trans_NvBQzQNjv4BqwR9CmnucIcqQaI247kVHKXq2BiOnVFyUjft454WEhhg.jpeg


The only Python I know :p
 
Upvote 0
BTW, the code is (surprisingly) simple and the same approach can be used for all kinds of transitions.

The main idea is to keep both the current values and the target values and limit the 'change per tick':
Code: Copy
Dim ct As CTItem = Items.Get(i)
ct.CurrentValue = CalcNewValue(ct.CurrentValue, ct.TargetValue, MaxDelta / FromValueToPixels)
ct.CurrentHeight = CalcNewValue(ct.CurrentHeight, height, MaxDelta)
ct.CurrentTop = CalcNewValue(ct.CurrentTop, i * height, MaxDelta)

Private Sub CalcNewValue (CurrentValue As Float, TargetValue As Float, MaxDelta As Float) As Float
   If CurrentValue <= TargetValue Then
       Return Min(TargetValue, CurrentValue + MaxDelta)
   Else
       Return Max(TargetValue, CurrentValue - MaxDelta)
   End If
End Sub
 
Upvote 0
Downloaded the Erel's project attached to post #3.
Before run it, I wanted to read it.
So I immediately noted a strange "type", CoolTimeline. What is it, I thought? Checked the libraries used... nothing.
Well, it should be a class, then.

A class wrote in a few minutes!!!
What envy !!!
:D:(



However, I know that this is due to the fact that Erel already has all the necessary future code in mind :p and that... he dictates the code, he doesn't type it :D
 
Upvote 0
Great¡¡
@Erel, you should publish it in the main forum in order the example be indexed.
 
Upvote 0
This is proof of concept. He will publish the proper class/view of B4X in few days, I presume.
This element is too specialized for me to create a library.
It shouldn't be too difficult to take the code and further extend it as needed.

@Erel, you should publish it in the main forum in order the example be indexed.
I will move the thread to the questions forum.
 
Upvote 0
ct.CurrentHeight = CalcNewValue(ct.CurrentHeight, height, MaxDelta) ' <------ ? This is not needed/useful
This is not demonstrated in the example but it can be a nice transition if you add more items at runtime (though you will need to make some additional changes and to remove the "SetNow" flag).
 
Upvote 0
Upvote 0
nice video
but the order at end 2019 i do not believe.
 
Upvote 0
Back
Top