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
data_list = [] | |
while (True): | |
raw_data = input('paste maps string here: ' if len(data_list) == 0 else '') | |
if (raw_data.strip() == ''): | |
break | |
data_list.append(raw_data) | |
#print('====') | |
#print(data_list) | |
#print('====') |
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 OverlayBasic extends StatefulWidget { | |
@override | |
_OverlayBasicState createState() => _OverlayBasicState(); | |
} | |
class _OverlayBasicState extends State<OverlayBasic> { | |
OverlayEntry _entry; |
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(List<String> args) async { | |
print('hello2'); | |
var t1 = DateTime.now().millisecondsSinceEpoch; | |
// replace callFuns() with callFuns2() | |
await callFuns(); | |
var t2 = DateTime.now().millisecondsSinceEpoch; | |
print('cost ${t2 - t1}'); | |
} | |
// cost 5015 |
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
def flutterArchVersion = '<修改成你的 version>' | |
def flutterGroupName = '<修改成你的 group>' | |
def localProperties = new Properties() | |
def flutterSdk = '' | |
def localPropertiesFile = rootProject.file('.android/local.properties') | |
if (localPropertiesFile.exists()) { | |
localPropertiesFile.withReader('UTF-8') { reader -> | |
localProperties.load(reader) | |
} |
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 'package:toast/toast.dart'; | |
class FixedToastView { | |
static final FixedToastView _singleton = new FixedToastView._internal(); | |
factory FixedToastView() { | |
return _singleton; | |
} |
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:math'; | |
import 'package:flutter/material.dart'; | |
import 'package:loading/indicator.dart'; | |
class FixedBallSpinFadeLoaderIndicator extends Indicator { | |
var scaleDoubles = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]; | |
var alphas = [255, 255, 255, 255, 255, 255, 255, 255]; | |
@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
import 'dart:async'; | |
import 'dart:collection'; | |
import 'dart:ui'; | |
import 'package:flutter/material.dart'; | |
/// https://gist.github.com/yrom/ac4f30b26ee02ce3bd3a1d260bb9ffb4 | |
const maxframes = 60; |
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 CircleTextWidget extends SingleChildRenderObjectWidget { | |
CircleTextWidget({ | |
Key key, | |
Widget child, | |
}) : super(key: key, child: child); | |
@override | |
RenderCircleText createRenderObject(BuildContext context) => | |
RenderCircleText(); | |
} |
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
// https://www.freecodecamp.cn/challenges/caesars-cipher | |
function rot13(str) { // LBH QVQ VG! | |
// 请把你的代码写在这里 | |
var a = 'A'.charCodeAt(); | |
var z = a + 25; | |
var r = []; | |
for (var i = 0; i < str.length; i++) { | |
var code = str[i].charCodeAt(); | |
if (code >= a && code <= z) { |
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
// https://www.freecodecamp.cn/challenges/seek-and-destroy | |
function destroyer(arr) { | |
// 请把你的代码写在这里 | |
var argLen = arguments.length; | |
if (argLen > 1) { | |
var args = Array.from(arguments); | |
var c = args.slice(1); | |
return arr.filter(function(v) { |
NewerOlder