A Pen by Ajil Oommen on CodePen.
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
a = [0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1] | |
a = [0] * a.count(0) + [1] * a.count(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
var convertINR = (currency) => { | |
var a = ['','one ','two ','three ','four ', 'five ','six ','seven ','eight ','nine ','ten ','eleven ','twelve ','thirteen ','fourteen ','fifteen ','sixteen ','seventeen ','eighteen ','nineteen ']; | |
var b = ['', '', 'twenty','thirty','forty','fifty', 'sixty','seventy','eighty','ninety']; | |
if ((currency = currency.toString()).length > 9) return 'overflow'; | |
n = ('000000000' + currency).substr(-9).match(/^(\d{2})(\d{2})(\d{2})(\d{1})(\d{2})$/); | |
if (!n) return; | |
var str = ''; |
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'; | |
void main() => runApp(MainApplication()); | |
class MainApplication extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp(home: HomePage()); | |
} | |
} |
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'; | |
import 'dart:async'; | |
void main() { | |
runApp(MainApplication()); | |
} | |
class MainApplication extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { |
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 'dart:async'; | |
class StreamedList<T> { | |
StreamController<List<T>> _controller = StreamController.broadcast(); | |
Stream<List<T>> get stream => _controller.stream; | |
List<T> get dataList => this._list; | |
List<T> _list = []; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<style> | |
select { | |
appearance: none; | |
outline: 0; | |
background: white; | |
background-image: none; |
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
#!/usr/bin/env bash | |
escapedPath="$(echo `pwd` | sed 's/\//\\\//g')" | |
if grep flutter pubspec.yaml > /dev/null; then | |
if [ -d "coverage" ]; then | |
# combine line coverage info from package tests to a common file | |
if [ ! -d "$MELOS_ROOT_PATH/coverage_report" ]; then | |
mkdir "$MELOS_ROOT_PATH/coverage_report" | |
fi |