当前位置: 首页 > 编程日记 > 正文

适合初学者的数据结构_数据结构101:图-初学者的直观介绍

适合初学者的数据结构

了解您每天使用的数据结构 (Get to know the data structures that you use every day)

Welcome! Let’s Start with Some Vital Context. Let me ask you something:✅ Do you use Google Search? ✅ Do you use Google Maps? ✅ Do you use social media sites?

欢迎! 让我们从一些重要的上下文开始。 让我问您一个问题: you您是否使用Google搜索? ✅您是否使用Google地图? ✅您是否使用社交媒体网站?

If your answer is “yes” to any of these questions, then you’ve definitely used graphs and you didn’t even know it! Surprised? I was, too! This article will give you a visual introduction to the world of graphs, their purpose, elements, and types.

如果您对以上任何一个问题的回答是“是”,那么您肯定使用过图表,甚至都不知道! 惊讶吗 我也是! Ť他的文章会给你一个视觉的介绍图,他们的目的,内容和类型的世界。

These data structures really caught my attention due to their amazing capabilities. They are so powerful that you won’t even imagine how diverse their real-world applications can be. Let’s begin! ?

这些数据结构的强大功能确实引起了我的注意。 它们是如此强大,以至于您甚至都无法想象它们在现实世界中的应用程序有多么多样化。 让我们开始!

实际应用-魔术开始了! (Real-World Applications — The Magic Begins!)

Graphs are used in diverse industries and fields:

图形用于各种行业和领域:

  • GPS systems and Google Maps use graphs to find the shortest path from one destination to another.

    GPS系统和Google Maps使用图形来查找从一个目的地到另一个目的地的最短路径。

  • Social Networks use graphs to represent connections between users.

    社交网络使用图形表示用户之间的联系。

  • The Google Search algorithm uses graphs to determine the relevance of search results.

    Google搜索算法使用图形来确定搜索结果的相关性。

  • Operations Research is a field that uses graphs to find the optimal path to reduce the cost of transportation and delivery of goods and services.

    运筹学是一个使用图形来找到最佳路径以降低运输和货物与服务成本的领域。

  • Even Chemistry uses graphs to represent molecules!!! ❤️

    甚至化学使用图 代表分子!!! ❤️

Their applications are amazing, right? Let’s start our journey through this world!

他们的应用程序很棒,对吗? 让我们开始这个世界的旅程!

认识图! (Meet Graphs!)

Now that you have some context, let’s start by talking about their main purpose and elements.

现在您有了一些上下文,让我们开始讨论它们的主要目的和元素。

Graphs are used to represent, find, analyze, and optimize connections between elements (houses, airports, locations, users, articles, etc.).

图形用于表示,查找,分析和优化元素(房屋,机场,位置,用户,商品等)之间的连接。

This is an example of what a graph looks like:

这是一个图形外观的示例:

建筑模块 (Building-Blocks)

I’m sure that you noticed two main elements in the diagram above: circles and thick lines connecting them. They are called, respectively, Nodes and Edges.

我确定您在上图中注意到了两个主要元素:圆圈和连接它们的粗线。 它们分别称为NodesEdges

Let’s see them in more detail! ?

让我们更详细地了解它们!

  • Nodes: they are the elements that create the network. They could represent houses, locations, airports, ports, bus stops, buildings, users, basically anything that you could represent as being connected to other similar elements in a network.

    节点:它们是创建网络的元素 。 它们可以表示房屋,位置,机场,港口,公交车站,建筑物,用户,基本上可以表示您连接到网络中其他类似元素的任何内容。

  • Edges: they are connections between the nodes. They could represent streets, flights, bus routes, a connection between two users in a social network, or anything that could possibly represent a connection between the nodes in the context that you are working with.

    边缘:它们是节点之间的连接 。 它们可以表示街道,航班,公交路线,社交网络中两个用户之间的连接,或者可能表示您正在使用的上下文中节点之间的连接的任何内容。

如果没有连接会发生什么? (What Happens If There Is No Connection?)

If two nodes are not connected by an edge, that means that there is no direct connection between them. But don’t panic! You might still be able to go from one node to another by following a sequence of edges, similar to driving through several streets to reach your final destination.

如果两个节点之间没有通过边缘连接,则意味着它们之间没有直接连接。 但是不要惊慌! 通过遵循一系列的边缘,您仍然可能能够从一个节点转到另一个节点,这类似于在多条街道上行驶到达最终目的地。

For example, in the diagram below, even though there is no direct connection (edge) between the purple node (left) and the yellow node (right), you can go from the purple node to the orange node, to the pink node, to the green node, and finally reach the yellow node.

例如,在下图中,即使紫色节点 (左)和黄色节点 (右)之间没有直接连接( ),也可以从紫色节点转到橙色节点,再到粉红色节点,到绿色节点,最后到达黄色节点。

This is a key aspect of graphs, that you can search for the element that you are looking for by following the paths available.

这是图形的关键方面,您可以按照可用的路径搜索要查找的元素。

符号和术语 (Notation & Terminology)

It’s very important to learn the formal “language” to work with graphs:

学习使用图形的形式化“语言”非常重要:

  • |V| = Total number of vertices (nodes) in the graph.

    |V| =图形中的顶点总数( 节点 )。

  • |E| = Total number of connections (edges) in the graph.

    |E| =图形中的连接总数( )。

In the example below, |V| = 6 because there are six nodes (circles) and|E| = 7 because there are seven edges (lines).

在下面的示例中, |V| = 6 |V| = 6因为有六个节点(圆形)和|E| = 7 |E| = 7 因为有七个边缘(线)。

图的类型 (Types of Graphs)

Graphs are classified based on the characteristics of their edges (connections). Let’s take a look them in detail! ?

图形根据其边缘(连接)的特征进行分类。 让我们详细看一下!

1️⃣有向图 (1️⃣ Directed Graphs)

In directed graphs, edges have a direction. They go from one node to another, and there is no way to return to the initial node through that edge.

在有向图中,边具有方向。 它们从一个节点转到另一个节点,并且无法通过该边缘返回到初始节点。

As you can see in the diagram below, the edges (connections) now have arrows that point to a specific direction. Think of these edges as one-way streets. You can go in one direction and reach your destination, but you can’t return through that same street, so you need to find an alternative path.

如下图所示, 边缘(连接)现在具有指向特定方向的箭头。 将这些边缘视为单向街道。 您可以沿一个方向到达目的地,但无法沿着同一条街返回,因此您需要找到一条替代路径。

For example, if we create a graph for a pizza delivery service, representing a city, two houses (nodes) may be connected by a one-way street (edge). You could get from house A to house B through this street, but you couldn’t go back, so you would have to take an alternative path.

例如,如果我们为代表一个城市的比萨饼配送服务创建一个图形,则可能通过一条单向街道(边缘)连接两个房屋(节点)。 您可以通过这条街从房屋A到达房屋B,但是您不能回去,因此您必须采取其他方法。

Note: In a directed graph, you may not be able return at all to your initial location if there is no path with the appropriate directions. In the diagram below, you can see that you can successfully go from the purple node to the green node, but notice that there is no way to return from the green node to the purple node because the edges are “one-way streets.”

注意:在有向图中,如果没有适当方向的路径, 您可能根本无法返回到您的初始位置 。 在下图中,您可以看到您可以成功地从紫色节点转到绿色节点,但是请注意,由于边缘为“单向街道”,因此无法从绿色节点返回至紫色节点。

2️⃣无向图 (2️⃣ Undirected Graphs)

In this type of graph, edges are undirected (they do not have a specific direction). Think of undirected edges as two-way streets. You can go from one node to another and return through that same “path”.

在此类图形中,边是无向的(它们没有特定的方向)。 将无方向的边缘视为两条街道。 您可以从一个节点转到另一个节点,然后通过相同的“路径”返回。

Note: When you see a diagram of a graph where the edges don’t have arrows pointing in a specific direction, you can assume that the graph is undirected.

注意:当您看到图形的图表时,其边缘没有指向特定方向的箭头,则可以假定该图形是无向的。

For our pizza delivery service, this would mean that the delivery motorcycle can go from the source to the destination through the same street or path (To their relief!).

对于我们的披萨外送服务,这意味着外送摩托车可以通过同一条街道或小路从源头到目的地 (使他们感到宽慰!)。

In the graph below, you could go from the purple node to the green node and back through the same path, so you don’t reach a point no return. ?

在下面的图形中,您可以从紫色节点转到绿色节点,然后通过同一路径返回 ,因此您不会到达无法返回的地步。 ?

重量? —是的,重量! (Weights? — Yes, Weights!)

1️⃣加权图 (1️⃣ Weighted Graphs)

In weighted graphs, each edge has a value associated with it (called weight). This value is used to represent a certain quantifiable relationship between the nodes they connect.

在加权图中,每个边都有一个与之关联的值(称为权重) 。 此值用于表示它们连接的节点之间的某种可量化关系。

For example, weights could represent distance, time, the number of connections shared between two users in a social network, or anything that could be used to describe the connection between nodes in the context that you are working with.

例如,权重可以表示距离,时间,社交网络中两个用户之间共享的连接数,或者可以用来描述您正在使用的上下文中节点之间的连接的任何内容。

These weights are used by Dijkstra’s Algorithm to optimize routes by finding the shortest or least expensive paths between nodes in a network. (Stay tuned for an article on Dijkstra’s Algorithm!).

Dijkstra的算法使用这些权重通过查找网络中节点之间的最短或最便宜路径来优化路由。 (敬请关注有关Dijkstra算法的文章!)。

2️⃣未加权图 (2️⃣ Unweighted Graphs)

In contrast, unweighted graphs do not have weights associated with their edges. An example of this type of graph can be found in social networks, where edges represent the connection between two users. The connection cannot be quantified. Therefore, the edge has no weight.

相反,未加权图的边缘没有权重。 在社交网络中可以找到这种图形的示例,其中边缘代表两个用户之间的连接。 无法量化连接。 因此,边缘没有重量。

Note: You may have noticed that, so far, our graphs only have one edge connecting each pair of nodes. It’s natural to ask if there could be more than one edge between a pair of nodes. Actually, this is possible with Multigraphs! They can have multiple edges connecting the same pair of nodes.

注意:您可能已经注意到,到目前为止,我们的图只有一条边连接每对节点。 很自然地问一对节点之间是否可以有多个边缘。 一个 ctually,这是可以采用M ultigraphs! 它们可以具有连接同一对节点的多个边。

边数! —一个重要因素 (Number of Edges! — An Important Factor)

It’s very important to know if a graph has many or few edges because this is a crucial factor to decide how you will represent this data structure in your code. Let’s see the different types! ?

知道图形的边缘是多还是少是非常重要的,因为这是决定如何在代码中表示此数据结构的关键因素。 让我们看看不同的类型!

1️⃣密集图 (1️⃣ Dense Graphs)

Dense graphs have many edges. But, wait! ⚠️ I know what you must be thinking, how can you determine what qualifies as “many edges”? This is a little bit too subjective, right? ? I agree with you, so let’s quantify it a little bit:

密集图具有许多边缘。 可是等等! ⚠️我知道您必须在想什么,如何确定哪些符合“许多优势”? 这有点太主观了吧? ? 我同意您的意见,因此让我们对其进行量化:

Let’s find the maximum number of edges in a directed graph. If there are |V| nodes in a directed graph (in the example below, six nodes), that means that each node can have up to |v| connections (in the example below, six connections).

让我们找到有向图的最大边数。 如果有| V| 有向图中的两个节点(在下面的示例中为六个节点),这意味着每个节点最多可以具有|个节点。 v| 连接(在下面的示例中,为六个连接)。

Why? Because each node could potentially connect with all other nodes and with itself (see “loop” below). Therefore, the maximum number of edges that the graph can have is |V|*|V| , which is the total number of nodes multiplied by the maximum number of connections that each node can have.

为什么? 因为每个节点都可能与所有其他节点及其自身连接 (请参见下面的“循环”) 因此, 图形可具有 最大边数为|V|*|V| ,即节点总数乘以每个节点可以拥有的最大连接数。

When the number of edges in the graph is close to the maximum number of edges, the graph is dense.

当图中的边数接近最大边数时,图是密集的。

Note: “Loops” occur when a node has an edge that connects it to itself. Strange and interesting, right? ?

注意当节点具有将其自身连接到其上的边时,就会发生“循环”。 奇怪而有趣,对吗? ?

2️⃣稀疏图 (2️⃣ Sparse Graphs)

Sparse Graphs have few edges. As you can see in the diagram below, there aren’t many connections between the nodes.

稀疏图几乎没有边缘。 如下图所示,节点之间没有太多的连接。

When the number of edges in the graph is significantly fewer than the maximum number of edges, the graph is sparse.

当图中的边数明显少于最大边数时,则该图稀疏。

Meet️见面周期! (⭕️ Meet Cycles!)

Now let’s see a vital concept to understand graphs, cycles.

现在,让我们看一个重要的概念来理解图形,循环。

You probably noticed that if you follow a sequence of connections in a graph, you may find a path that will take you back to the same node. This is like “walking in circles”, exactly as if you were driving around your city and you took a path that could take you back to your initial location.

您可能已经注意到,如果遵循图中的一系列连接,则可能会找到一条将您带回到同一节点路径。 这就像“绕圈走”一样,就像您在城市周围开车一样,走了一条可以带您回到初始位置的路径。

In graphs, these “circular” paths are called “cycles”. They are valid paths that start and end at the same node. For example, in the diagram below, you can see that if you start at any node, you can return to that same node by following the edges.

在图中,这些“圆形”路径称为“循环”。 它们是在同一节点处开始和结束的有效路径。 例如,在下图中,您可以看到,如果您从任意一个节点开始,则可以通过沿边缘返回到同一节点。

Cycles are not always “isolated” because they can be part of a larger graph. You can detect them by starting your search on a specific node and finding a path that takes you back to that same node.

周期并非总是“隔离的”,因为它们可以成为较大图形的一部分。 您可以通过在特定节点上开始搜索并找到将您带回到同一节点的路径来检测它们。

综上所述… (In Summary…)

  • Graphs are awesome data structures that you use every day through Google Search, Google Maps, GPS, and social media.

    图形是您每天通过Google搜索,Google地图,GPS和社交媒体使用的出色数据结构

  • They are used to represent elements that share connections.

    它们用于表示共享连接的元素

  • The elements in the graph are called Nodes and the connections between them are called Edges.

    图中的元素称为节点 ,它们之间的连接称为

  • Graphs can be directed, when their edges have a specific orientation, similar to one-way streets, or undirected, when their edges don’t have a specific orientation, similar to two-way streets.

    图表可以定向,当其边缘有一个特定的方向,类似的单行道,或无向,当其边缘不具有特定的方向,类似于双向街道。

  • Edges can have a value associated with them, called weight.

    边缘可以具有与之关联的值,称为weight

  • If a graph has many edges, it’s called a dense graph. Otherwise, if it has few edges, it’s called a sparse graph.

    如果图具有许多边,则称为密集图。 否则,如果边缘很少,就称为稀疏图。

  • A series of connections can form a cycle if they create a path that lets you to return to the same node.

    如果一系列连接创建可让您返回同一节点的路径,则可以形成一个循环

Continue learning about these amazing data structures! It will be totally worth it for your future as a developer. I’m learning about data structures right now, and I find them completely fascinating. ❤️

继续学习这些惊人的数据结构! 对于您作为开发者的未来,这将完全值得。 我现在正在学习数据结构,并且发现它们完全令人着迷。 ❤️

The important thing is to not stop questioning. Curiosity has its own reason for existing. — Albert Einstein

重要的是不要停止质疑。 好奇的存在是有其原因的。 - 艾尔伯特爱因斯坦

谢谢! (Thank you!)

I really hope that you liked my article. ❤️Follow me on Twitter.

我真的希望你喜欢我的文章。 ❤️跟我来 推特

翻译自: https://www.freecodecamp.org/news/data-structures-101-graphs-a-visual-introduction-for-beginners-6d88f36ec768/

适合初学者的数据结构

相关文章:

深入解析CSS样式层叠权重值

本文为转载内容,源地址:http://www.ofcss.com/2011/05/26/css-cascade-specificity.html 读到《重新认识CSS的权重》这篇,在文章最后给出了便于记忆的顺序: “important > 内联 > ID > 类 > 标签 | 伪类 | 属性选择 &…

VUE做一个公共的提示组件,显示两秒自动隐藏,显示的值父组件传递给子组件

需求&#xff1a;VUE做一个公共的提示组件&#xff0c;显示两秒自动隐藏&#xff0c;显示的值由父组件动态传给子组件。 效果图&#xff1a; 实现步骤&#xff1a; 1.创建一个子组件 Toptips.vue (它就是公共提示组件)&#xff0c; optips.vue代码如下&#xff1a; <temp…

Linux课堂随笔---第四天

用户账户简介 在Linux系统中有三大类用户&#xff0c;分别是root用户&#xff0c;系统用户和普通用户。 在Linux系统中&#xff0c;root用户UID为0&#xff0c;root用户的权限是最高的&#xff0c;普通用户无法执行的操作&#xff0c;root用户都能完成。所以也被称为超级用户。…

初级开发人员的缺点_作为一名初级开发人员,我如何努力克服自己的挣扎

初级开发人员的缺点by Syeda Aimen Batool通过Syeda Aimen Batool 作为一名初级开发人员&#xff0c;我如何努力克服自己的挣扎 (How I’m working to overcome my struggles as a junior developer) I believe the other name for coding is the “struggle”. And if you ar…

lintcode-136-分割回文串

136-分割回文串 给定一个字符串s&#xff0c;将s分割成一些子串&#xff0c;使每个子串都是回文串。 返回s所有可能的回文串分割方案。 样例 给出 s "aab"&#xff0c;返回 [ ["aa", "b"], ["a", "a", "b"] ] 标…

微信小程序把繁琐的判断用Js简单的解决

场景&#xff1a; 订单列表&#xff0c;有很多种订单状态&#xff0c;根据不同的订单状态要显示不同的css。 适用场景&#xff1a;需要根据数组下标判断不同的显示。 示例代码&#xff1a; this.data.order [{"_type":"1","custName":"…

数论(Lucas定理) HDOJ 4349 Xiao Ming's Hope

题目传送门 题意&#xff1a;求C (n,0),C (n,1),C (n,2)...C (n,n)中奇数的个数 分析&#xff1a;Lucas 定理&#xff1a;A、B是非负整数&#xff0c;p是质数。AB写成p进制&#xff1a;Aa[n]a[n-1]...a[0]&#xff0c;Bb[n]b[n-1]...b[0]。则组合数C(A,B)与C(a[n],b[n])*C(a[n-…

docker容器虚拟化技术_Docker,虚拟机和容器的全面介绍

docker容器虚拟化技术by shota jolbordi通过Shota Jolbordi Docker has been a buzzword for tech people for the last several years, and the more times goes by, the more often you hear about it. We’re seeing it more in job requirements, and more companies are …

IOS中的响应者链

响应者链就是当子视图不响应,父视图有响应事件,父视图响应 #import "RootViewController.h" #import "ResponderView.h" interface RootViewController ()endimplementation RootViewController- (void)viewDidLoad {[super viewDidLoad];// Do any additi…

MySQL闪退问题的解决

刚刚学习了数据库&#xff0c;并且安装了MySQL&#xff0c;正当高兴之余&#xff0c;发现我的MySQL出现了闪退的显现。上网搜了好久的解决方案。最后解决了这个问题&#xff0c;也舒心了。 问题从这里开始&#xff1a; 接着我打开MySQL&#xff0c;寻思能不能用&#xff0c;结果…

HTML封装AJAX请求,在请求里面写登录的逻辑 ajax 网络请求 post

调用方法&#xff1a; 先引用config.js&#xff0c;然后调用封装网络请求。 里面三个参数 1.url&#xff0c; 2.请求需要提交的数据, 3.请求类型 // 获取二维码、背景图片接口 getScheduleInfo() {var url /v1/basketball/getQRCode.do;var params {phone: 13977284414}co…

oye pandora_我尝试了Pandora出色的功能优先级排序方法。 这是我学到的。

oye pandoraby Josh Temple通过乔什坦普尔 我尝试了Pandora出色的功能优先级排序方法。 这是我学到的。 (I tried Pandora’s brilliant method for feature prioritization. Here’s what I learned.) 潘多拉(Pandora)的方法和3美元的便签纸如何使利益相关者的管理变得轻而易…

2016-2017-2软件工程课程总结

2016-2017-2软件工程课程总结 本学期的软件工程课程终于在大家的共同努力下圆满落幕了&#xff0c;我们的暑假也正式开启&#xff0c;终于有时间写写这门课的总结了。 在2016年下半学期末的时候课程组就决定使用邹欣老师的书《构建之法》&#xff0c;由课程组长王瑞老师带领入构…

asp.net mvc jqgrid 同一个页面查询不同的表,jqgrid显示不同表的表头和数据并且分页...

基于我上一篇文章<a href"http://www.cnblogs.com/alasai/p/4765756.html">asp.net mvc excel导入</a>中不同的部门上传不同的excel文件类型&#xff0c;当在同一个页面查询时怎么办呢。 解决方案&#xff1a;根据传过来的表名和时间参数一次性把数据全部…

降维后的高维特征的参数_高维超参数调整简介

降维后的高维特征的参数by Thalles Silva由Thalles Silva 高维超参数调整简介 (An introduction to high-dimensional hyper-parameter tuning) 优化ML模型的最佳做法 (Best practices for optimizing ML models) If you ever struggled with tuning Machine Learning (ML) mo…

细细品味大数据--初识hadoop

初识hadoop 前言 之前在学校的时候一直就想学习大数据方面的技术&#xff0c;包括hadoop和机器学习啊什么的&#xff0c;但是归根结底就是因为自己太懒了&#xff0c;导致没有坚持多长时间&#xff0c;加上一直为offer做准备&#xff0c;所以当时重心放在C上面了&#xff08;虽…

js中Array数组中的常用方法汇总

Array的push与unshift方法性能比较分析从原理就可以知道&#xff0c;unshift的效率是较低的。原因是&#xff0c;它每添加一个元素&#xff0c;都要把现有元素往下移一个位置。unshift比push要慢差不多100倍&#xff01;Array有一个叫做reverse的方法&#xff0c;能够把一个数组…

vue写一个通用的toast弹窗 toast 弹窗 提示

效果图 代码 <!DOCTYPE html> <html lang"en"><head><title>弹窗</title><meta charset"UTF-8"><meta name"viewport" content"widthdevice-width, initial-scale1.0, user-scalableno, minimum-s…

我对Node.js Core的首次贡献中学到了什么

by Yael Hermon通过Yael Hermon 我对Node.js Core的首次贡献中学到了什么 (What I Learned from My First Contribution To Node.js Core) A couple of weeks ago my very first PR for Node.js core was merged! A few days later, I decided to tweet about it and share ho…

SHA204A加密芯片配置

1、参考配置文章&#xff1a;http://blog.csdn.net/a5882230/article/details/522148452、可以选slot configuration 1作为密钥区&#xff0c;该区的配置应为&#xff1a;0x81 81&#xff0c;对应的data 0的数据就密钥数据。3、slot configuration的配置有7个参数&#xff0c;其…

[剑指offer] 二叉搜索树的后序遍历序列

二叉搜索树的后序遍历序列 P157 题目&#xff1a;输入一个数组&#xff0c;判断这个数组是不是一个二叉搜索树的后序遍历的结果。 solution&#xff1a;我们知道后序遍历序列的最后一个item是根节点&#xff0c;如果确实是二叉搜索树的后序遍历结果&#xff0c;那么在[0,N-2]中…

HbuilderX中的git的使用 git HbuilderXgit HbuilderX 使用git

【前戏】&#xff1a;得在HubilderX中找到 "工具"->"插件安装" -> "Git插件" 。 【提交代码】&#xff1a;&#xff08;1&#xff09;选中该项目的文件&#xff0c;右键&#xff0c;Git提交 &#xff08;2&#xff09;填写提交信息、查看…

Swift与Objective-C:与恐龙有关的趋势

by Colin Smith通过科林史密斯 Swift与Objective-C&#xff1a;与恐龙有关的趋势 (Swift vs. Objective-C: The trending up-and-comer vs. the dinosaur) Swift的简短历史 (A short history of Swift) I remember how pivotal it was when Swift was introduced at Apple’s …

我的JavaScript学习笔记

1. 那些老旧的实例可能会在 <script> 标签中使用 type"text/javascript"。现在已经不必这样做了。JavaScript 是所有现代浏览器以及 HTML5 中的默认脚本语言。 2. <head> 或 <body> 中的 JavaScript 您可以在 HTML 文档中放入不限数量的脚本。 …

获取枚举值上的Description特性说明

/// <summary> /// 获取枚举值上的Description特性说明 /// </summary> /// <typeparam name"T">枚举类型</typeparam> /// <param name"obj">枚举值</param> /// <returns></returns> public static str…

微信小程序实时获取用户经纬度

注意&#xff0c;使用这个功能之前手机得先打开位置信息。 现在app.json配置 {"pages": ["pages/map/map","pages/index/index","pages/register/register","pages/logs/logs"],"window": {"backgroundTex…

pwa js_如何在互联网信息亭中实现PWA和Barba.js

pwa jsby Nino Mihovilić由NinoMihovilić 如何在互联网信息亭中实现PWA和Barba.js (How to Implement a PWA and Barba.js into internet kiosks) The project we’ll describe here is an interactive internet kiosk that’s used as an extension for the LikeUs mobile …

Vant 组件库(VUE)的使用 Vant滚动选择器 选择器 传值

在 vue- cli 项目中安装 官方文档链接 npm ( 后面内容需要在控制台终端输入) # 通过 npm 安装 npm i vant -S 自动按需引入组件&#xff1a;babel-plugin-import 是一款 babel 插件&#xff0c;它会在编译过程中将 import 的写法自动转换为按需引入的方式 # 安装插件 npm…

MySQL的安装过程

&#xfeff;&#xfeff;近期对MySQL做了一些研究。曾经主要接触的是SQL SERVER。所以&#xff0c;今天对该安装过程做了一些总结以及使用过程中的一些心得。并分享给大家。记得前面。分享过一篇关于数据库的几种连接方式。而本系列文章。将以对数据库的详细操作为主。 MySQL是…

一个球从100米高度自由落下,每次落地后反弹回原高度的一半; * 再落下,求在第几次之后反弹高度小于0.1米, * 并计算在这一次落地时共经过多少米?...

package com.db2;/*** 一个球从100米高度自由落下&#xff0c;每次落地后反弹回原高度的一半&#xff1b; * 再落下&#xff0c;求在第几次之后反弹高度小于0.1米&#xff0c;* 并计算在这一次落地时共经过多少米&#xff1f;* * author denny**/ public class Demo1 {static …