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
void main() { | |
var barcode = '0023,023,45,567'; | |
var arrayBarcode = barcode.split(','); | |
var arrayZeroLeading = arrayBarcode.where((e) => e.startsWith('0')); | |
var arrayNonZeroLeading = arrayZeroLeading.map((e) => e.replaceFirst(RegExp('^0+'),'')).toList(); | |
var arrayOutput = arrayBarcode..addAll(arrayNonZeroLeading); | |
var barcodeOut = arrayOutput.toSet().join(','); | |
print(barcodeOut); |
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
void main() { | |
var barcode = '0023,023,45,567'; | |
var barcodeOut = barcode.split(',') | |
.map((e) => int.parse(e)) | |
.map((e) => e.toString()) | |
.toSet() | |
.join(','); | |
print(barcodeOut); | |
} |
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
void main() { | |
var barcode = '0023,023,45,567'; | |
var arrayBarcode = barcode.split(','); | |
var arrayZeroLeading = arrayBarcode.where((e) => e.startsWith('0')); | |
var arrayNonZeroLeading = arrayZeroLeading.map((e) => e.replaceFirst(RegExp('^0+'),'')).toList(); | |
var arrayOutput = arrayBarcode..addAll(arrayNonZeroLeading); | |
var barcodeOut = arrayOutput.toSet().join(','); | |
print(barcodeOut); |
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
void main() { | |
var barcode = '0023,023,23,45,567'; | |
var barcodeOut = barcode.split(',') | |
.map((e) => int.parse(e)) | |
.map((e) => e.toString()) | |
.toSet() | |
.join(','); | |
print(barcodeOut); | |
} |
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
enum Direction {up, down} | |
testEnum(Direction direction) { | |
switch (direction) { | |
case Direction.up: | |
print('Up'); | |
break; | |
case Direction.down: | |
print('down'); | |
break; |
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
main() { | |
} |
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
abstract class Foo { | |
Function execute; | |
} | |
class Bar1 implements Foo { | |
Function execute = (String s) => print('Bar1 execute s: $s'); | |
} | |
class Bar2 implements Foo { | |
Function execute = (int i) => print('Bar2 execute i: $i, i*2: ${i*2}'); |
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> | |
<!-- | |
Copyright (c) 2016, <your name>. All rights reserved. Use of this source code | |
is governed by a BSD-style license that can be found in the LICENSE file. | |
--> | |
<html> | |
<head> | |
<meta charset="utf-8"> |
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> | |
<!-- | |
Copyright (c) 2015, <your name>. All rights reserved. Use of this source code | |
is governed by a BSD-style license that can be found in the LICENSE file. | |
--> | |
<html> | |
<head> | |
<meta charset="utf-8"> |
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
part of mongo_dart; | |
class ClientFirst extends SaslStep { | |
String clientFirstMessageBare; | |
UsernamePasswordCredential credential; | |
String rPrefix; | |
ClientFirst(Uint8List bytesToSendToServer, this.credential, | |
this.clientFirstMessageBare, this.rPrefix) { | |
this.bytesToSendToServer = bytesToSendToServer; |
NewerOlder