mac 怎么用wireshark抓 flutter web开发网页的包-chrome

wireshark 版本   Version 3.4.5

mac。 版本 11.3.1

在。/users/mac/documents  新建一个文件 权限777 , sslkeylog.log

wireshark 这样设置

 

 

 

命令行执行 :  /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome –user-data-dir=/tmp/chrome –ssl-key-log-file=/users/mac/documents/sslkeylog.log

会启动一个新的chrome。然后打开wireshark 就能抓包到这个chrome 的http和 https 包


 

但是。flutter 启动web的方法是 :

flutter  run -d chrome

这种方法怎么带参数 , 比如像这样:

flutter-web-admin-dashboard-ecommerce-main % flutter run -d chrome –chrome-args=”–user-data-dir=/tmp/chrome –ssl-key-log-file=/users/mac/documents/sslkeylog.log”

 

这个网页提出的同样的问题: https://github.com/dart-lang/webdev/issues/1080

 

解决方法是: 先用flutter run -d chrome 运行,然后用 这个命令打开的chrome

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome –user-data-dir=/tmp/chrome –ssl-key-log-file=/users/mac/documents/sslkeylog.log

打开flutter 网页的地址

 

 

flutter how to add getx package to exist project

  •  先安装package

  • 运行

get package

  • 执行

启动 cli 工具

 

  • 执行

看是否显示getx的版本 , 能正确显示版本说明到此为止正确

  • 比如现有的目录是这样的  /lib/widgets/layout/sms.dart

想给sms.dart文件加一个controller ,  可以执行 :

 

以上命令来自于 :https://github.com/jonataslaw/get_cli

 

 

 

 

mysql 表中找出涨停

SELECT * FROM oi2109_20210521

select lastprice,count(*) as NumberOfCount
from oi2109_20210521
group by lastprice
having count(*)=(select count(*) as NumberOfCount
from oi2109_20210521
group by lastprice
order by NumberOfCount desc
limit 1);

select max(lastprice) AS maxvalues ,happentime AS tims
from ap2110_20210521
group by lastprice
order by maxvalues ,happentime DESC
limit 1

SELECT lastprice from ap2110_20210521 ORDER by happentime DESC LIMIT 1

select max(lastprice) from ap2110_20210521

SELECT “111”,IF((SELECT lastprice from ap2110_20210521
ORDER by happentime DESC LIMIT 1 )
= (select max(lastprice) AS lastprice from ap2110_20210521)
,’true’,’false’);

SELECT book_name,isbn_no,
IF((SELECT COUNT(*) FROM book_mast WHERE pub_lang=’English’)>
(SELECT COUNT(*) FROM book_mast WHERE pub_lang<>’English’),
(CONCAT(“Pages: “,no_page)),(CONCAT(“Price: “,book_price)))
AS “Page / Price”
FROM book_mast;

delete FROM oi2109_20210412 WHERE happentime > ‘2021-04-12 22:58:59’

flutter 怎么让datatable 也能自适应宽度

SizedBox.expand results in the DataTable taking an infinite height which the SingleChildScrollView won’t like. Since you only want to span the width of the parent, you can use a LayoutBuilder to get the size of the parent you care about and then wrap the DataTable in a ConstrainedBox.

来自网站: https://stackoverflow.com/questions/56625052/how-to-make-a-multi-column-flutter-datatable-widget-span-the-full-width

 

 

如何检查flutter textfield 是否包含unicode字符

 

来源于网站: https://stackoverflow.com/questions/55607305/how-can-i-check-if-a-textfield-contains-unicode-characters-in-flutter-dart

 

修改后成为:

 

 

这个网址也可以看一下; https://dev.to/stack-labs/flutter-utf8-textfield-length-limiter-and-char-counter-31o7

如何用flutter做web

这个命令是启动web 开发

  • 查看当前channel

  • 切换channel

  • 顺序是:先切换channel 再启动web
  • 左边导航条怎么实现子菜单

https://stackoverflow.com/questions/45559580/expansion-panel-list-in-flutter

  • 怎么在网页上画图表

https://whereisdarran.com/2020/02/charts-for-flutter-and-flutter-web/

  • 怎么执行js

https://medium.com/flutter-community/using-javascript-code-in-flutter-web-903de54a2000

https://fireship.io/snippets/using-js-with-flutter-web/

 

  • 画table 和 带换页的table

https://medium.com/codechai/flutter-web-and-paginateddatatable-3779da7683e

 

  • 怎么画bootstrap 风格的页面
bootstrap就是指 网页能随着缩放拉伸,自动适应设备的大小, 布局可能随页面的大小而变
用这个package :  responsive_builder: ^0.3.0
————–
以下是仿 movider

python how to cal math

  • numpy生成随机数:

a = np.random.randint(0,20,(5,))

在0和20之间生成5个随机整数


计算刚才生成数组的梯度 (gradient)

np.gradient(a)


梯度能看作导数吗?  不能

  • 导数 : Derivative

可以用numpy计算, 也能用sympy

python 怎么计算导数 :   要算导数,首先要有函数,对于时间序列,并没有拟合函数,似乎也没必要有

 

 

 

怎么用python画柱状k线

来源: https://www.programmersought.com/article/17884763118/