我正在尝试ListView.builder从右向左进行水平滚动
我的代码:
SliverToBoxAdapter(
child: Container(
height: MediaQuery.of(context).size.height / 4.5,
margin: const EdgeInsets.only(bottom: 5.0, top: 10.0),
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: list.length,
itemBuilder: (BuildContext context, int index) {
return InkWell(/* ... */)
}
),
),
);
Run Code Online (Sandbox Code Playgroud) socallink.txt:
"脸谱", "推特", "推特", "谷歌加", "YouTube" 的, "Pinterest的", "Instagram的"
PHP:
$file = file_get_contents('./Temp/socallink.txt', true);
$a1 = array($file);
print_r($a1);
Run Code Online (Sandbox Code Playgroud)
结果:
Array
(
[0] => "Facebook","Twitter","Twitter","google-plus","youtube","pinterest","instagram"
)
Run Code Online (Sandbox Code Playgroud)
需要:
$a1['0']=facebook;
$a1['1']=Twitter;
Run Code Online (Sandbox Code Playgroud) 我更喜欢使用允许我构建整个页面的自定义启动画面。所以,我正在尝试从 android 和 ios 中删除默认启动
void main() async {
flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin();
SystemChrome.setPreferredOrientations(
[DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]);
runApp(MaterialApp(
title: 'Navigation Basics',
debugShowCheckedModeBanner: false,
home: new SplashPage(),
routes: {
// When navigating to the "/" route, build the FirstScreen widget.
'/home': (BuildContext context) => new FirstRoute(),
},
));
}
class SplashPage extends StatefulWidget {
@override
SplashPageState createState() => SplashPageState();
}
class SplashPageState extends State<SplashPage> {
void navigationToNextPage() {
Navigator.pushNamed(context, '/home');
}
startSplashScreenTimer() async {
var _duration = new Duration(seconds: 5);
return new Timer(_duration, …Run Code Online (Sandbox Code Playgroud) 我的 mysql 服务器遇到一些问题当我运行 top 命令时,它说 mysql 进程已占用 350-500% 的 CPU 我正在运行带有 49 GB RAM 的 centos 6
my.cnf 设置:
[mysqld]
# delayed_insert_timeout=20
net_write_timeout=60
#slow_query_log_file = /var/lib/mysql/mysqld_slow_queries.log
#long_query_time=10
#general_log = on
key_buffer=4024M
open_files_limit=154378
innodb_buffer_pool_size=4G
key_buffer_size=4G
query_cache_min_res_unit=7096
max_connections=100000
sort_buffer_size=100M
myisam_sort_buffer_size=128M
tmp_table_size=5042M
table_definition_cache=4000
innodb_additional_mem_pool_size=100M
default-storage-engine=MyISAM
read_buffer_size=100M
thread_cache_size=2042M
query_cache_size=2084M
join_buffer_size=100M
innodb_thread_concurrency=12
max_heap_table_size=5042M
net_read_timeout=60
max_allowed_packet=560M
query_cache_type=1
read_rnd_buffer_size=100M
innodb_flush_method=O_DIRECT
wait_timeout=60
innodb_file_per_table=1
skip-name-resolve
query_cache_limit=100M
table_open_cache=1000
interactive_timeout=9
[mysql]
#wait_timeout=15
#net_read_timeout=40
no-auto-rehash
#interactive_timeout=15
[mysql_safe]
log_error="/var/log/mysqld.log"
#wait_timeout=15
#net_read_timeout=40
#interactive_timeout=15
open-files-limit=154378
skip-name-resolve
[mysqlhotcopy]
#interactive-timeout=15
Run Code Online (Sandbox Code Playgroud)
MySQLTuner 的输出:
>> MySQLTuner 1.7.1 - Major …Run Code Online (Sandbox Code Playgroud)