Works with Flutter 3.13 on Windows 11 (with Ubuntu 22.04 on WSL2)
- Install Ubuntu 22.02 on Microsoft Store
- Login Ubuntu
- Install Android-sdk
sudo apt-get update sudo apt-get install android-sdk export ANDROID_HOME=/usr/lib/android-sdk
Works with Flutter 3.13 on Windows 11 (with Ubuntu 22.04 on WSL2)
sudo apt-get update
sudo apt-get install android-sdk
export ANDROID_HOME=/usr/lib/android-sdk
| void main() { | |
| var s = 'Thu Jan 32 23:39:59 2021+444'; | |
| var t = parse2(s); | |
| print(t); | |
| } | |
| DateTime parse2(String formattedString) { | |
| final re = RegExp(r'^(\w{3}) ' // weekday | |
| r'(\w{3}) ' // month | |
| r'(\d{2}) ' // day in month |
| import 'dart:async'; | |
| import 'dart:math'; | |
| class API { | |
| void startMethod() { | |
| Timer(Duration(seconds: 2), onMethodDone); | |
| } | |
| bool onMethodDone() { | |
| final randomBool = Random().nextBool(); |
| import numpy as np | |
| from numpy.lib.shape_base import expand_dims | |
| def add_walls(board) -> np.ndarray: | |
| '''add 2 rows & columns around the board | |
| @param board: numpy 2d array | |
| @return: a new board | |
| ''' | |
| h, w = board.shape # get heigh & width | |
| # now sandwich it! |
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| final overlayCtnKey = GlobalKey(); | |
| @override |
| package main | |
| // solution to exercise from https://tour.golang.org/concurrency/7 | |
| // if running local, execute `go get golang.org/x/tour/tree` beforehand | |
| import ( | |
| "fmt" | |
| "golang.org/x/tour/tree" | |
| ) |
| import * as asn1js from 'asn1js'; | |
| import { getCrypto, getAlgorithmParameters, CertificationRequest, AttributeTypeAndValue } from 'pkijs/build' | |
| import { arrayBufferToString, toBase64 } from 'pvutils'; | |
| //https://github.com/PeculiarVentures/PKI.js/blob/31c10e9bb879cac59d710102adf4fd7bd61cd66c/src/CryptoEngine.js#L1300 | |
| const hashAlg = 'SHA-256' | |
| const signAlg = 'ECDSA' | |
| /** | |
| * @example | |
| * createPKCS10({ enrollmentID: 'user1', organizationUnit: 'Marketing', organization: 'Farmer Market', state: 'M', country: 'V' }) |