• int --> Stringint n = 3; String str = n.toString(); // "3"String --> intString str = "10"; int n = int.parse(str); // 10String --> doubleString str = "10.6"; double d = doulbe.parse(str); // 10double --> Stringdouble d = 14.96515; String str = d.toStringA...
  • Nginx搭建HTTP文件服务器实现文件的下载,需要在nginx.conf中配置如下:server { listen 80; server_name localhost; index index.html index.htm; root c:\file; #charset koi8-r; #access_log logs/host.access.log main; #nginx指定下载目录配置 location ~ ^(.*)/$ { ...
  • git提交(commit)后从暂存区中撤销部分文件:git rm --cached <file> git commit -m '再次提交即可'通过以上操作即可从暂存区中撤销部分文件
  • 在项目中如果我们实体对应的表中包含数据库的关键字,就会出现如下异常信息:### Error querying database. Cause: java.sql.SQLSyntaxErrorException: (conn=684898) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'order,parent FROM typecho_metas ### T...
  • Image widgetFlutter中一个用来展示图片的widget。Image支持如下几种类型的构造函数:new Image - 用于从ImageProvider获取图像;new Image.asset - 使用key 从AssetBundle获得的图像;new Image.network - 从网络URL中获取图片;new Image.file - 从本地文件中获取图片;new Image.memory - 用于从Uint8List获取图像;在加载项目中的图片资源时,为了让Image能够根据像素密度自动适配不同分辨率的图片,请使用AssetImage指定图像,并确保在widget树...
  • Flutter命令行工具是开发人员(或代表开发人员的IDE)与Flutter交互的方式。对于与Dart相关的命令,可以使用Dart命令行工具。以下是如何使用Flutter工具创建、分析、测试和运行应用程序: flutter create my_app cd my_app flutter analyze flutter test flutter run lib/main.dart要使用Flutter运行pub命令,请执行以下操作:flutter pub get flutter pub outdated flutter pub upgrade要查看Flutter支持的所有命令:flu...
  • Decoration是一个装饰类。这个类提供了所有装饰的抽象接口。具体示例请参见BoxDecoration。decoration : 装饰器接口,Decoration是个抽象接口,BoxDecoration是它其一个具体实现类,Decoration装饰器的绘 制最终会由BoxPainter来完成,实现一个Decoration装饰器可以通过createBoxPainter方法来获取一个BoxPainter,最终通过BoxPainter来进行绘制。position: 是个枚举类型,用来控制装饰器在哪里绘制,取值有background跟foreground,前者代表是在背景绘制,后者是在...