Aurora Boeralis card that varies size according to mouse position
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 789ce360b3657bbcc8f6d4445576bb355a497689a76339ec55b81cedf2b8df72dbb56c4cb63b57a7c163aff228df5e416d1aafbde987627b8edb2b04eccea65bd82b9e4b17b4175c1760ef901cc9c8f3ffffbbfbff252525ff5b3004fd676536f8bf92c19dc7cee7cc591006008a42275a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'dart:math'; | |
| void main() { | |
| print(gcd([144, 96, -24, -1200, 671])); | |
| } | |
| int gcd(List<int> els) { | |
| final minF = els.reduce((a, b) { | |
| assert(b != 0, "element cannot be zero"); | |
| return min(a, b.abs()); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/foundation.dart'; | |
| typedef ValueComputation<T, O> = T Function(O value); | |
| class ComputedValueNotifier<T> extends ValueNotifier<T> { | |
| final Listenable _parent; | |
| final ValueGetter<T> _compute; | |
| factory ComputedValueNotifier.fromListenable( | |
| Listenable notifier, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { IOfferJson, IDType, IntervalType } from '@/interfaces/Offer'; | |
| interface ICreditCardInfo { | |
| installmentsNumber: number; | |
| installmentsPrice: number; | |
| discountPercentage: number; | |
| isVisible: boolean; | |
| paramToDisplay?: string; | |
| isActive: boolean; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class TRexGame extends BaseGame{ | |
| TRex tRex; | |
| Horizon horizon; | |
| GameOverPanel gameOverPanel; | |
| TRexGameStatus status = TRexGameStatus.waiting; | |
| double currentSpeed = GameConfig.speed; | |
| TRexGame({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Runner.prototype.scheduleNextUpdate = function () { | |
| if (!this.updatePending) { | |
| this.updatePending = true; | |
| this.raqId = requestAnimationFrame(this.update.bind(this)); | |
| } | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Runner.prototype.update = function () { | |
| this.updatePending = false; | |
| var now = getTimeStamp(); | |
| var deltaTime = now - (this.time || now); | |
| this.time = now; | |
| if (this.playing) { | |
| this.clearCanvas(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** only executes the last callback sent of a unique id**/ | |
| const finalTimeout = (function() { | |
| const timers = {}; | |
| return function(callback, ms, uniqueId) { | |
| if (!uniqueId) { | |
| uniqueId = 'default'; | |
| } | |
| if (timers[uniqueId]) { | |
| window.clearTimeout(timers[uniqueId]); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright 2015 The Chromium Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| import 'dart:math' as math; | |
| import 'package:flutter_test/flutter_test.dart'; | |
| import 'package:flutter/gestures.dart'; | |
| import 'gesture_tester.dart'; | |
| void main() { |
NewerOlder