- 博客(148)
- 收藏
- 关注
原创 laravel
<?phpuse Illuminate\Support\Facades\Route;/*|--------------------------------------------------------------------------| Web Routes|--------------------------------------------------------------------------|| Here is where you can register web.
2021-01-31 21:15:04
158
原创 composer
#安装composerphp -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"php composer-setup.phpphp -r "unlink('composer-setup.php');"#配置镜像composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/#5.4.* 代表5.4版
2021-01-29 10:38:20
152
原创 SwooleTalk
<?phpclass SwooleWebSocket{ private $webSocket; private $redis; public function __construct(){ $this->webSocket = new Swoole\WebSocket\Server("0.0.0.0", 9500); $this->webSocket->set([ "worker_num" =>
2021-01-27 20:22:22
131
原创 ElasticSearch - CURD
//简单查看健康状态GET 192.168.1.91:9200/_cat/health?v//查看有那些索引GET 192.168.1.91:9200/_cat/indices?v//建立一个索引PUT 192.168.1.91:9200/test_index?pretty//删除索引DELETE 192.168.1.91:9200/test_index//PUT 方法向索引中插入数据必须指定IDPUT 192.168.1.91:9200/students/_doc/1{ "name"
2021-01-14 19:26:43
128
原创 ElasticSearch 单节点启动
#下载eswget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.10.1-linux-x86_64.tar.gz#添加用于启动es的用户adduser es#创建数据目录mkdir -p /mydata/eschown es:es /mydata/es -Rmkdir /var/log/elasticsearch -pchown ElasticSearch:ElasticSearch /var/lo
2021-01-08 22:05:40
1045
原创 MongoDB
单节点启动wget https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.4/x86_64/RPMS/mongodb-org-server-4.4.2-1.el7.x86_64.rpmrpm -i mongodb-org-server#此时已自动创建mongod用户, 创建默认 /etc/mongod.confwget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-4.4
2021-01-02 01:01:26
161
原创 扫一扫 - flutter
import 'dart:io';import 'package:flutter/foundation.dart';import 'package:flutter/material.dart';import 'package:qr_code_scanner/qr_code_scanner.dart';const flashOn = 'FLASH ON';const flashOff = 'FLASH OFF';const frontCamera = 'FRONT CAMERA';const
2021-01-01 15:03:35
664
3
原创 读写硬盘数据类似cookie - flutter
import 'package:flutter/cupertino.dart';import 'package:flutter/material.dart';import 'package:shared_preferences/shared_preferences.dart';class FileReadAndWrite extends StatefulWidget { @override _FileReadAndWriteState createState() => _FileRead
2020-12-29 17:48:52
120
原创 检测网络状态 - flutter
import 'package:flutter/material.dart';import 'package:connectivity/connectivity.dart';class NetWorkDetection extends StatefulWidget { @override _NetWorkDetectionState createState() => _NetWorkDetectionState();}class _NetWorkDetectionState ext
2020-12-29 02:01:30
1059
原创 视频播放器 - flutter
import 'package:flutter/material.dart';import 'package:chewie/chewie.dart';import 'package:video_player/video_player.dart';class PlayVideo extends StatefulWidget { String title = "视频播放器"; @override _PlayVideoState createState() => _PlayVideoSt
2020-12-27 14:21:32
309
原创 选择上传图片什么的 - flutter
import 'package:dio/dio.dart';import 'package:http_parser/http_parser.dart';import 'package:flutter/material.dart';import 'package:flutter/rendering.dart';import 'package:flutter/services.dart';import 'package:image_pickers/image_pickers.dart';import
2020-12-26 18:21:52
155
原创 挤压盒子内部滚动 - flutter
Container( color: Colors.green, child: Column( children: [ Flexible(child: Container( color: Colors.yellow, child:SingleChildScrollView( child: Column( mainA
2020-12-22 17:37:38
171
原创 获取设备信息 -flutter
import 'dart:io';import 'package:flutter/material.dart';import 'package:flutter/services.dart';import 'package:device_info/device_info.dart';class DevInformation extends StatefulWidget { @override _DevInformationState createState() => _DevInfor
2020-12-18 15:43:31
500
2
原创 WebView - flutter
// Copyright 2018 The Chromium Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.// ignore_for_file: public_member_api_docsimport 'dart:async';import 'dart:convert';im
2020-12-18 10:58:29
412
原创 渲染html - flutter
import 'package:flutter/material.dart';import 'dart:convert';import 'package:dio/dio.dart';import 'package:flutter_html/flutter_html.dart';import 'package:flutter_html/html_parser.dart';import 'package:flutter_html/style.dart';class NewsContent .
2020-12-17 19:58:52
416
原创 下拉刷新 上拉加载更多 - flutter
import 'package:flutter/material.dart';import 'dart:convert';import 'package:dio/dio.dart';class NewsPage extends StatefulWidget { NewsPage({Key key}) : super(key: key); _NewsPageState createState() => _NewsPageState();}class _NewsPageState
2020-12-17 14:30:24
114
原创 Dio - flutter
import 'dart:convert';import 'package:flutter/material.dart';import 'package:dio/dio.dart';class DioExample extends StatefulWidget { var arguments; DioExample({arguments}); @override _DioExampleState createState() => _DioExampleState(argu
2020-12-16 00:29:43
166
原创 Http - flutter
import 'dart:convert';import 'dart:io';import 'package:flutter/material.dart';import 'package:http/http.dart' as http;class HttpExample extends StatefulWidget { HttpExample({arguments}); @override _HttpState createState() => _HttpState();}
2020-12-13 23:28:40
100
原创 Dialog提示框 - flutter
import 'package:flutter/cupertino.dart';import 'package:flutter/material.dart';import 'package:bot_toast/bot_toast.dart';import '../../components/MyDiglog.dart';class Time extends StatefulWidget { @override _TimeState createState() => _TimeStat
2020-12-13 14:17:22
333
原创 第三方插件 Swiper - flutter
import 'package:flutter/material.dart';import 'package:flutter_swiper/flutter_swiper.dart';class Point extends StatefulWidget { @override _PointState createState() => _PointState();}class _PointState extends State<Point> { List item = [
2020-12-11 22:30:01
764
原创 第三方时间插件flutter_cupertino_date_picker 1.0.26+2 - flutter
//需要修改with, Diagnosticableclass DateTimePickerTheme with Diagnosticable{ final cancelDefault = const Text('OK');
2020-12-11 16:43:11
466
原创 自带时间插件 - flutter
import 'package:date_format/date_format.dart';import 'package:flutter/cupertino.dart' as cup;import 'package:flutter/material.dart';import 'package:flutter_localizations/flutter_localizations.dart';class GoodsInfo extends StatefulWidget { var argume
2020-12-10 00:33:55
524
原创 Radio &Switch - flutter
import 'package:flutter/cupertino.dart';import 'package:flutter/foundation.dart';import 'package:flutter/material.dart';class GoodsInfo extends StatefulWidget { var arguments; GoodsInfo({this.arguments}); @override _GoodsInfoState createState
2020-12-08 01:02:37
225
原创 TextField & Checkbox & CheckboxListTile - flutter
import 'package:flutter/material.dart';class GoodsInfo extends StatefulWidget { var arguments; GoodsInfo({this.arguments}); @override _GoodsInfoState createState() => _GoodsInfoState(arguments:this.arguments);}class _GoodsInfoState extend
2020-12-06 20:08:12
172
原创 floatingActionButton - flutter
import 'package:flutter/material.dart';import 'package:flutter_app/pages/Search.dart';import 'package:flutter_app/pages/homePages/Home.dart';import 'package:flutter_app/pages/homePages/Point.dart';import 'package:flutter_app/pages/homePages/Time.dart';
2020-12-06 17:16:47
100
原创 Buttons - flutter
import 'package:flutter/cupertino.dart';import 'package:flutter/material.dart';class Time extends StatefulWidget { @override _TimeState createState() => _TimeState();}class _TimeState extends State<Time> { @override Widget build(Build
2020-12-05 23:54:20
113
原创 Drawer - flutter
Scaffold( //从屏幕最左侧拉出来的抽屉, 手机版QQ的个人设置就是怎么实现的 drawer: Center( child: Text("抽屉啊"), ), //和上面的区别是从右侧拉出来 endDrawer: Drawer( child: Column( children: [ //自定义的DrawerHeader Row(
2020-12-05 18:33:42
116
原创 AppBar 定义 顶部Tab切换 - flutter
使用DefaultTabController,Scaffold 嵌套 出现了双 appBar的解决方案, 一种是放在appBar的title里, 效果不理想.一种是在内层appBar的title是null, 调整appBar的toolbarHeightimport 'package:flutter/material.dart';import 'package:flutter_app/pages/HomeContent.dart';class Search extends StatefulWidget
2020-12-04 23:53:29
318
原创 pushReplacementNamed & pushAndRemoveUntil - flutter
Scaffold( appBar: AppBar( title: Text("GoodsInfo"), ), body: Center( child: RaisedButton( child: Text("下一步"), onPressed: (){ //替换当前Widget, /Search返回当前Widget的上一页, 而不是当前Widget. Navi
2020-12-04 13:03:12
2588
原创 命名路由 -flutter
import 'dart:io';import 'package:flutter/cupertino.dart';import 'package:flutter/material.dart';import 'package:flutter_app/routes/Route.dart';void main() => runApp(MyApp());class MyApp extends StatelessWidget { @override Widget build(BuildC
2020-12-03 23:51:59
119
原创 普通路由 - flutter
import 'package:flutter/material.dart';import 'package:flutter_app/pages/Search.dart';class Home extends StatefulWidget { @override _HomeState createState() => _HomeState();}class _HomeState extends State<Home> { @override Widget buil
2020-12-02 13:28:55
99
原创 BottomNavigationBar - flutter
import 'dart:io';import 'package:flutter/cupertino.dart';import 'package:flutter/material.dart';import 'pages/HomeContent.dart';void main() => runApp(MyApp());class MyApp extends StatelessWidget { @override Widget build(BuildContext context)
2020-12-02 11:06:38
93
原创 StatefulWidget - flutter
class Daemon extends StatefulWidget { @override _DaemonState createState() => _DaemonState();}class _DaemonState extends State<Daemon> { var list = <Widget>[]; var number = 0; @override Widget build(BuildContext context) {
2020-12-01 18:04:17
77
原创 Warp - flutter
class Layout extends StatelessWidget { @override Widget build(BuildContext context) { return Wrap( spacing: 5, //元素横向间隔 runSpacing: 5, //元素上下间隔 alignment: WrapAlignment.end, //最后一行元素的对其方式, 上面行的元素都占满了空间, 所以不存在对齐问题 ch
2020-11-30 17:02:49
113
原创 IconContainer - flutter
class IconContainer extends StatelessWidget { IconData icon; double iconSize; Color iconColor; double containerHeight; double containerWidth; Color containerColor; IconContainer(this.icon, {this.iconSize = 32.0, this.iconColor =
2020-11-30 12:35:48
303
原创 AspectRatio & Card - flutter
AspectRatio( aspectRatio: 2 / 3, //宽高比 child: Container( color: Colors.red, ) );ListView( children: [ Card( elevation: 5, //设置阴影 shape: const RoundedRectangleBorder(borderR.
2020-11-29 23:06:18
167
1
原创 Stack & Align & Positioned - flutter
Stack & AlignContainer( color: Colors.red, child: Stack( //这个盒子里的所有元素都覆盖重叠在一起 children: [ Align( //为某一个元素单独定位 alignment: Alignment.center, //上下左右正中心 child: Container(
2020-11-29 15:40:23
202
1
原创 Padding & Row & Column & Expanded - flutter
Padding( padding: EdgeInsets.fromLTRB(0, 0, 10, 10), child: Image.network( "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2767608770,826089718&fm=26&gp=0.jpg", width: 190, // h...
2020-11-28 17:43:04
298
原创 GridView - flutter
GridView 格式GridView.count( crossAxisCount:2, // 一共有几列 mainAxisSpacing: 10, //横向格间距 crossAxisSpacing: 10, //竖向格间距 children: [ Container( child: Column( children: [ Image.n
2020-11-28 15:03:09
119
原创 ListView - flutter
竖向列表Container( width: 300, child: ListView( children: [ ListTile( //ListTile为一种固定格式的元素, 有标题和副标题还可以加图标 leading: Icon(Icons.home), title: Text("what are you doing?"), subtitle:
2020-11-27 21:48:39
99
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人