I would like to manipulate some nested models:
This is my nested model:
class Checkable < Volt::Model
field :name
field :accomplished, Volt::Boolean
end
[86] volt(main)> store._checklists[0]._checkables.size
=> #<Promise(70151870487780): 0>
[87] volt(main)> store._checklists[0]._checkables << Checkable.new( name: 'Boti', accomplished: true)
=> #<Promise(70151868502100): #<Volt::ArrayModel []>>
[88] volt(main)> store._checklists[0]._checkables.size
My question why the promise resolves to '0'. Sholdn't it be 1?
How can I add properly?
For this challenge you need to create a simple SELECT statement. Your task is to calculate the MIN, MEDIAN and MAX scores of the students from the results table.
Tables and relationship below:
Student Table
id
Name
Result
id
student_id
score
Resultant table:
SELECT MIN(score) as min,MAX(score) as max
FROM student s JOIN result r
ON(s.id=r.id)
GROUP BY score as median;
this is my code everything works apart from median
I get an HTTP 502 as well. What's more, when I load the site landing page, I get a continuous "Connection lost…Reconnecting in" n "seconds". In Safari, this counts down from 10 to 0 and repeats forever. In Chrome, it counts down from 10, then 15, then 20, then 25 seconds.
McCoy: She's *dead,* Jim!