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 CaeserCipherTests { | |
@Test | |
fun `should decipher the caeser cipher`() { | |
val alphabet = arrayOf("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z") | |
assertThat(alphabet).hasSize(26) | |
val cipher = "GBKXGMK UXOKTZ TKYZ XKYARZ" | |
val possiblePlaintexts = mutableListOf<String>() | |
val buffer = StringBuilder() |
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/material.dart'; | |
class MyInherited extends StatefulWidget { | |
final Widget child; | |
MyInherited({Key key, this.child}) : super(key: key); | |
@override | |
MyInheritedState createState() => new MyInheritedState(); |
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 TicketClipper extends CustomClipper<Path> { | |
final double radius; | |
TicketClipper(this.radius); | |
@override | |
Path getClip(Size size) { | |
var path = new Path(); | |
path.lineTo(0.0, size.height); | |
path.lineTo(size.width, size.height); |
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
[diff "image"] | |
command = /path/to/diff-images.sh |
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:built_value/built_value.dart'; | |
part '$CLASS_NAME$.g.dart'; | |
abstract class $CLASS_NAME$ implements Built<$CLASS_NAME$, $CLASS_NAME$Builder> { | |
$CLASS_NAME$._(); | |
factory $CLASS_NAME$([updates($CLASS_NAME$Builder b)]) = _$$$CLASS_NAME$; | |
} |
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 _$MY_INHERITED_WIDGET_NAME$Inherited extends InheritedWidget { | |
_$MY_INHERITED_WIDGET_NAME$Inherited({ | |
Key key, | |
@required Widget child, | |
@required this.data, | |
}) : super(key: key, child: child); | |
final $MY_INHERITED_WIDGET_NAME$InheritedWidgetState data; | |
@override |
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 CrossfadeTitle extends AnimatedWidget { | |
final Widget primaryTitle; | |
final Widget secondaryTitle; | |
const CrossfadeTitle({ | |
Key key, | |
Listenable listenable, | |
this.primaryTitle, | |
this.secondaryTitle, | |
}) : super(key: key, listenable: listenable); |
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 2018-present the Flutter authors. All Rights Reserved. | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
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 AccentColorOverride extends StatelessWidget { | |
const AccentColorOverride({Key key, this.color, this.child}) | |
: super(key: key); | |
final Color color; | |
final Widget child; | |
@override | |
Widget build(BuildContext context) { | |
return Theme( |
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 io.reactivex.Flowable | |
import io.reactivex.FlowableTransformer | |
import org.reactivestreams.Publisher | |
import java.util.concurrent.atomic.AtomicBoolean | |
import java.util.concurrent.atomic.AtomicInteger | |
/** | |
* @author Stefan Mitev | |
*/ |
NewerOlder