This file contains 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 (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. 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/foundation.dart'; | |
import 'package:flutter/gestures.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; |
This file contains 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/widgets.dart'; | |
typedef NotificationBuilderCallback<T extends Notification> = Widget Function( | |
BuildContext context, T? notification); | |
typedef NotificationCondition<T extends Notification> = bool Function( | |
T notification); | |
class NotificationConsumer<T extends Notification> extends StatefulWidget { | |
final NotificationBuilderCallback<T> builder; |
This file contains 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/widgets.dart'; | |
typedef NotificationBuilderCallback<T extends Notification> = Widget Function( | |
BuildContext context, T? notification); | |
typedef NotificationCondition<T extends Notification> = bool Function( | |
T notification); | |
class NotificationConsumer<T extends Notification> extends StatefulWidget { | |
final NotificationBuilderCallback<T> builder; |
This file contains 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 random | |
iterations = 10000 | |
change_selection = True | |
winning_result = [] | |
for i in range(iterations): | |
doors = [0, 0, 0] | |
doors[random.randint(0, 2)] = 1 |
This file contains 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
// Original source code is by The Flutter Authors and I changed it slightly to meet my needs. | |
import 'dart:math' as math; | |
import 'package:flutter/gestures.dart' show DragStartBehavior; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter/services.dart'; | |
import 'package:flutter/widgets.dart'; | |
import 'date_utils.dart' as utils; |
This file contains 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 sys | |
import json | |
input_file = sys.argv[1] | |
output_file = sys.argv[2] | |
output_file = open(output_file, 'w') | |
def to_vcf_string(first_name, last_name, phone): | |
vcf_lines = [] |
This file contains 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 pyproj | |
class ITMConverter(): | |
def __init__(self): | |
self.wgs84 = pyproj.Proj('epsg:4326') | |
self.itm = pyproj.Proj('epsg:2157') | |
def convert_to_wgs(self, easting, northing): | |
return pyproj.transform(self.itm, self.wgs84, easting, northing) | |
This file contains 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 CategoriesPage extends StatelessWidget { | |
static MaterialPageRoute getRoute() => MaterialPageRoute( | |
settings: RouteSettings(name: 'Categories'), | |
builder: (context) => CategoriesPage()); | |
} |
This file contains 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 MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
navigatorObservers: [AppNavigatorObserver()], | |
home: HomePage(), | |
); | |
} | |
} |
NewerOlder