Flutter belongs to product logic. Native belongs to platform boundaries.
能共享的,应当共享。 不能自然共享的,不要强行共享。
UI 默认用 Flutter。 业务逻辑默认用 Dart。
| #!/bin/bash | |
| # 检查参数是否为空 | |
| if [ $# -eq 0 ]; then | |
| echo "用法: $0 <目标地址>" | |
| echo "示例: $0 8.8.8.8" | |
| echo " $0 www.example.com" | |
| echo "功能: 持续ping指定目标,按Ctrl+C显示统计结果" | |
| exit 1 | |
| fi |
| #!/bin/bash | |
| # 参数校验 | |
| if [ $# -lt 2 ]; then | |
| echo "用法: $0 <路径部分> <输出目录>" | |
| echo "示例: $0 '2025-4/' './strm_output'" | |
| exit 1 | |
| fi | |
| API_BASE_URL="https://ani.v300.eu.org" |
| package main | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| ) |
With this AutoHotKey script, you can use most macOS style shortcuts (eg, cmd+c, cmd+v, ...) on Windows with a standard PC keyboard.
Note that:
cmd + shift + ↑ / ↓ / ← / → (select text between cursor and top / bottom / beginning of line / end of line), You should disable the Between input languages shotcut from Control Panel\Clock, Language, and Region\Language\Advanced settings > Change lanugage bar hot keys due to conflicting.| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import numpy as np | |
| from numpy import linalg as LA | |
| class Activation: | |
| def f(self, x, **args): | |
| raise NotImplementedError("Should have implemented this") |
| from threading import BoundedSemaphore | |
| from concurrent.futures import ProcessPoolExecutor | |
| class MaxQueuePool: | |
| """This Class wraps a concurrent.futures.Executor | |
| limiting the size of its task queue. | |
| If `max_queue_size` tasks are submitted, the next call to submit will block | |
| until a previously submitted one is completed. |
| $win_user = "ipc" | |
| $linux_user = "ipc" | |
| $package = "CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc" | |
| $base_path = "C:\Users\" + $win_user + "\AppData\Local\Packages\" + $package + "\LocalState\rootfs" | |
| $dirs = @("\bin", "\sbin", "\usr\bin", "\usr\sbin", "\home\" + $linux_user + "\.cargo\bin") | |
| $dirs | ForEach { Add-MpPreference -ExclusionProcess ($base_path + $_ + "\*") } | |
| Add-MpPreference -ExclusionPath $base_path |