Skip to content

Instantly share code, notes, and snippets.

View Headmast's full-sized avatar

Kirill Klebanov Headmast

  • Agro.Club
  • Voronezh, Russia
View GitHub Profile
[0.0, 17.007101, 83.904419, 0.0, 50.419121, 47.011906, 0.0, 0.0, 2.2058024, 0.0, 28.004116, 0.0, 0.0, 0.0, 0.0, 18.095213, 75.095024, 0.0, 11.983303, 0.0, 99.468056, 51.393108, 12.194879, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 78.581047, 0.0, 39.67189, 0.0, 10.972634, 0.0, 127.56865, 0.0, 136.00815, 6.7585721, 0.0, 0.0, 7.8997512, 0.0, 54.836536, 0.0, 0.0, 0.0, 41.611252, 0.0, 0.0, 0.0, 0.0, 66.96405, 0.0, 0.0, 0.0, 0.0, 144.59749, 0.0, 0.0, 36.406845, 0.0, 24.47216, 4.9228153, 0.0, 0.0, 0.0, 12.270489, 28.24144, 106.61999, 0.0, 0.0, 0.0, 20.194645, 0.0, 0.0, 0.0, 0.0, 0.0, 49.66177, 0.0, 0.0, 0.0, 55.275803, 68.704971, 0.0, 42.494678, 107.92912, 0.0, 0.0, 78.643585, 101.43092, 0.0, 28.625479, 0.0, 0.0, 0.0, 6.6150308, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 14.039377, 0.0, 0.0, 4.2611904, 0.0, 50.275177, 0.0, 20.328835, 0.0, 0.0, 0.0, 0.0, 12.464252, 33.346313, 0.0, 0.0, 92.671036, 28.846947, 0.0, 0.0, 40.404903, 0.0, 0.0, 0.0, 152.82652, 0.0, 12.566879, 0.0, 8.1055088, 0.0, 34.516331, 25.217623, 26.813557, 64.761749
@Headmast
Headmast / 2-2-base-dart.md
Last active September 30, 2020 08:03
Var and const in Dart.
int a;

void awesomeFunction() {
  double b;
  int b1;
  var text = "Hello world";
  //text = a; //error: A value of type 'int' can't be assigned to a variable of type 'String'.
  dynamic dyn;
 dyn = text; // No error, works perfect.
@Headmast
Headmast / readme.md
Last active September 30, 2020 08:02 — forked from benstr/readme.md
Gist Markdown Cheatsheet

#Heading 1 ##Heading 2 ###Heading 3 ####Heading 4 #####Heading 5 ######Heading 6


Paragraph

void main() {
  int a = 9145;
  print('Value $a is even ${a.isEven}.');
}
void main() {
  print('I \u{2665} dart');
}
void main() {
  //a
  var list = <int>[1,2,3,4,5,6,7,8];
  print('list: ${list}');
  //b
  print('list: ${list.length}');
  //c
  list.sort((a,b)=> b.compareTo(a));
 print('list: ${list}');
void main() {  
  //a
  Map numberBook = {
    "Иван":2264865,
    "Татьяна":89523366684,
    "Олег":89452256575
  };
  //b
 print('NumberBook ${numberBook}');
void main() {
  //a
  Set mySet = {'Москва', 'Вашингтон', 'Париж'};
  mySet.add('Вашингтон');
  //b
  print('MySet length ${mySet.length}');
  // In set we can add only unique element.
  
 //c
String getMonthName(int index) {
    var months = ['January', 'February', 'March', 'April','May','June', 'July', 'August', 'September', 'October', 'November', 'December'];
  if (index >= 0 && index < 12) {
    return months[index];
  } else {
    return 'Invalin months index';
  }
}
void evenNumbers() {
  print('Print all even number');
  for (int i = 0; i <= 100; i = i+2) {
    print(i);
  }
}