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
// Dart 会先 Extend 继承 | |
// 之后才会以线性 linear 的方式去 Mixin | |
// linear 意味着最后一个 with 的 mixins 的 functions 会覆盖前面的 | |
class A { | |
void a() { | |
print(runtimeType.toString() + ": a"); |
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(const ScrollMetricsDemo()); | |
class ScrollMetricsDemo extends StatefulWidget { | |
const ScrollMetricsDemo({Key? key}) : super(key: key); | |
@override | |
State<ScrollMetricsDemo> createState() => ScrollMetricsDemoState(); | |
} |
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
/** 全局设置 -----------------------------------------------------------------------------------------------*/ | |
/** 背景设置 */ | |
/* div#fakebody { | |
background-color:#fff; | |
} | |
*/ | |
#example-container { | |
width:800px; |
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
from typing import List | |
from langdetect import detect | |
import fast_langdetect | |
from wtpsplit import WtP | |
wtp = WtP("wtp-bert-mini") | |
def detect_lang(text: str) -> str: | |
result = str(detect(text)) |