HTML5入门:Sublime Text 安装与Package Control及Emmet插件实战

需积分: 12 0 下载量 147 浏览量 更新于2024-09-13 收藏 878B MD 举报
在HTML5_day01的学习笔记中,主要介绍了Sublime Text这款流行的代码编辑器。Sublime Text以其出色的功能和特性,成为Web开发者首选的工具之一。以下是关于Sublime Text的详细介绍: 1. **Sublime Text**简介: Sublime Text是一个跨平台的轻量级文本编辑器,支持多种编程语言,如HTML5、PHP、JavaScript和CSS等。它具有高度可定制性和性能优势,包括快速的文件操作、即时编译和强大的插件生态系统。 2. **Sublime Text优点**: - **跨平台性**:无论是在Windows、Mac还是Linux上,都能无缝运行。 - **扩展性强**:通过安装插件,可以增强其功能,满足各种开发需求。 - **高效编辑**:快速的代码输入和提交,使得开发流程更为顺畅。 - **实时反馈**:内置的控制台功能,允许开发者实时查看输出结果。 - **丰富的插件支持**:如Package Control,方便管理和安装插件,提升开发效率。 3. **Sublime Text安装**: 官方下载地址为[官方网站](https://www.sublimetext.com/),请移除“cn”后缀,遵循英文安装指引,避免使用中文路径以确保兼容性和稳定性。 4. **Package Control**: Package Control是Sublime Text中的插件管理器,它简化了插件的安装和更新过程。通过这个工具,用户可以方便地搜索、安装和管理众多第三方开发的实用插件。 5. **Emmet插件**: Emmet是一款强大的代码缩写工具,极大地提高了编写HTML和CSS的效率。以下是Emmet的一些核心功能: - **初始化**:通过简单的符号(如`<pclass="p1"id="p11"></p>`)快速生成指定结构的代码。 - **类和ID自动生成**:通过`p.p1#p11`快速插入带有class和id的元素。 - **嵌套结构**:使用符号`>`表示嵌套关系,如`ui>li*5+Tab<ul>`可以生成五个li元素嵌套在ul中。 - **提升标签**:通过`^`符号提升标签层级,如`p>span`可以将span提升到p标签内。 - **代码块分组**:通过圆括号定义代码块,如`(p>span) * 3`生成三个相同的代码块。 - **多元素定义**:使用星号(*)表示重复,如`div*(id="myDiv")`会根据星号数量创建多个具有相同id的div元素。 HTML5_day01的内容着重于Sublime Text的基础配置和Emmet插件的实用技巧,这对于学习和提升HTML5开发效率来说是非常重要的基础知识。通过掌握这些工具,开发者能够更高效地编写和维护复杂的网页结构。

/var/folders/gk/ryl0f4y10m9ccnhw_1vlpjzh0000gn/T/ipykernel_41405/1920266051.py:2: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy device_df['cluster_label'] = db.labels_ /var/folders/gk/ryl0f4y10m9ccnhw_1vlpjzh0000gn/T/ipykernel_41405/1920266051.py:8: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy device_df['hour'] = device_df['timestamp'].map(lambda x: time.localtime(x).tm_hour) /var/folders/gk/ryl0f4y10m9ccnhw_1vlpjzh0000gn/T/ipykernel_41405/1920266051.py:9: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy device_df['is_night'] = device_df['hour'].map(lambda x: 1 if x >= 22 or x < 6 else 0) /var/folders/gk/ryl0f4y10m9ccnhw_1vlpjzh0000gn/T/ipykernel_41405/1920266051.py:10: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy device_df['is_daytime'] = device_df['hour'].map(lambda x: 1 if x >= 10 or x < 17 else 0) /var/folders/gk/ryl0f4y10m9ccnhw_1vlpjzh0000gn/T/ipykernel_41405/1920266051.py:11: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy device_df['is_weekend'] = device_df['timestamp'].map(lambda x: 1 if datetime.datetime.utcfromtimestamp(x).weekday() >= 5 else 0) /var/folders/gk/ryl0f4y10m9ccnhw_1vlpjzh0000gn/T/ipykernel_41405/1920266051.py:18: UserWarning: Boolean Series key will be reindexed to match DataFrame index. night_cnt = device_cluster_df[device_df['is_night'] == 1]['event_day'].drop_duplicates().count() /var/folders/gk/ryl0f4y10m9ccnhw_1vlpjzh0000gn/T/ipykernel_41405/1920266051.py:19: UserWarning: Boolean Series key will be reindexed to match DataFrame index. daytime_cnt = device_cluster_df[device_df['is_daytime'] == 1]['event_day'].drop_duplicates().count() /var/folders/gk/ryl0f4y10m9ccnhw_1vlpjzh0000gn/T/ipykernel_41405/1920266051.py:20: UserWarning: Boolean Series key will be reindexed to match DataFrame index. weekend_cnt = device_cluster_df[device_df['is_weekend'] == 1]['event_day'].drop_duplicates().count() /var/folders/gk/ryl0f4y10m9ccnhw_1vlpjzh0000gn/T/ipykernel_41405/1920266051.py:21: UserWarning: Boolean Series key will be reindexed to match DataFrame index. weekday_cnt = device_cluster_df[device_df['is_weekend'] == 0]['event_day'].drop_duplicates().count() ​解释一下这段信息为什么出现

2023-07-12 上传

/var/folders/gk/ryl0f4y10m9ccnhw_1vlpjzh0000gn/T/ipykernel_35021/1920266051.py:2: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy device_df['cluster_label'] = db.labels_ /var/folders/gk/ryl0f4y10m9ccnhw_1vlpjzh0000gn/T/ipykernel_35021/1920266051.py:8: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy device_df['hour'] = device_df['timestamp'].map(lambda x: time.localtime(x).tm_hour) /var/folders/gk/ryl0f4y10m9ccnhw_1vlpjzh0000gn/T/ipykernel_35021/1920266051.py:9: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy device_df['is_night'] = device_df['hour'].map(lambda x: 1 if x >= 22 or x < 6 else 0) /var/folders/gk/ryl0f4y10m9ccnhw_1vlpjzh0000gn/T/ipykernel_35021/1920266051.py:10: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy device_df['is_daytime'] = device_df['hour'].map(lambda x: 1 if x >= 10 or x < 17 else 0) /var/folders/gk/ryl0f4y10m9ccnhw_1vlpjzh0000gn/T/ipykernel_35021/1920266051.py:11: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy device_df['is_weekend'] = device_df['timestamp'].map(lambda x: 1 if datetime.datetime.utcfromtimestamp(x).weekday() >= 5 else 0) /var/folders/gk/ryl0f4y10m9ccnhw_1vlpjzh0000gn/T/ipykernel_35021/1920266051.py:18: UserWarning: Boolean Series key will be reindexed to match DataFrame index. night_cnt = device_cluster_df[device_df['is_night'] == 1]['event_day'].drop_duplicates().count() /var/folders/gk/ryl0f4y10m9ccnhw_1vlpjzh0000gn/T/ipykernel_35021/1920266051.py:19: UserWarning: Boolean Series key will be reindexed to match DataFrame index. daytime_cnt = device_cluster_df[device_df['is_daytime'] == 1]['event_day'].drop_duplicates().count() /var/folders/gk/ryl0f4y10m9ccnhw_1vlpjzh0000gn/T/ipykernel_35021/1920266051.py:20: UserWarning: Boolean Series key will be reindexed to match DataFrame index. weekend_cnt = device_cluster_df[device_df['is_weekend'] == 1]['event_day'].drop_duplicates().count() /var/folders/gk/ryl0f4y10m9ccnhw_1vlpjzh0000gn/T/ipykernel_35021/1920266051.py:21: UserWarning: Boolean Series key will be reindexed to match DataFrame index. weekday_cnt = device_cluster_df[device_df['is_weekend'] == 0]['event_day'].drop_duplicates().count()jupyter notebook出现这段报错的原因

2023-07-12 上传