alexa技能个数_如何在您的技能中使用Alexa演示语言
alexa技能个数
by Garrett Vargas
通过Garrett Vargas
如何在您的技能中使用Alexa演示语言 (How to use Alexa Presentation Language in your skill)
Amazon recently released the Alexa Presentation Language (APL). APL provides a richer display for multimodal skills. It is based on modern frameworks that separate display elements from data sources. It gives you the flexibility to include many visual elements such as graphics, images, and slideshows and lets you tailor the display for different devices.
亚马逊最近发布了Alexa Presentation Language(APL)。 APL为多模式技能提供了更丰富的展示。 它基于将显示元素与数据源分开的现代框架。 它使您可以灵活地包含许多视觉元素,例如图形,图像和幻灯片,并可以针对不同设备定制显示。
In this article, I’m going to walk through how I updated one of my skills to use APL. You can also use these tips and techniques if you are creating a new skill.
在本文中,我将逐步讲解如何更新一项技能以使用APL。 如果您要创建新技能,也可以使用这些技巧和技巧。
Most of my skills feature multimodal support using the Display Interface. I decided to learn APL by updating one of my existing skills. I focused on my Video Poker skill because I wasn’t happy with the existing customer experience.
我的大部分技能都使用显示界面提供多模式支持。 我决定通过更新现有技能之一来学习APL。 我专注于我的视频扑克技能,因为我对现有的客户体验不满意。
Video Poker presents users with a 5-card poker hand, with an ability to hold and discard cards before drawing to complete a hand. Users can do this by voice command (“keep the first card” or “keep the pair of jacks”), or by touching cards on a visual display. ListTemplate2 was the best way to do this with the Display Interface. However, this came with the limitation of only allowing three cards on the screen at a time and putting numbers beneath each card in the list.
Video Poker向用户展示了五张纸牌的扑克牌,并且能够在抽签完成之前握住和丢弃纸牌。 用户可以通过语音命令(“保留第一张卡”或“保留一对插Kong”)或触摸可视显示器上的卡来执行此操作。 ListTemplate2是使用显示界面执行此操作的最佳方法。 但是,这样做的局限性是一次只能在屏幕上显示三张卡片,并将数字放在列表中每张卡片的下方。
Using APL, I modified a ListTemplate2 layout to shrink the size of list items, reduce the spacing between them, and fit a full five card hand on the screen. I was able to remove the numbers from items in the list and put text indicating which held cards in a bold, red font. I was able to optimize the layout for different screen dimensions, such as smaller displays like the Echo Spot.
使用APL,我修改了ListTemplate2布局以缩小列表项的大小,减小它们之间的间距,并在屏幕上放满五张卡片。 我能够从列表中的项目中删除数字,并以粗体红色字体显示指示哪些卡的文本。 我能够针对不同的屏幕尺寸优化布局,例如像Echo Spot这样的小型显示器。
APL创作工具 (APL Authoring Tool)
The way I did this was through the APL Authoring Tool. This handy tool provides a list of different visual designs you can use as a baseline to create compelling visuals for your skill. It also allows you to save and upload layouts, so you can extract them to your skill code, or upload them if you make offline updates. For this use case, I started with the Image Forward List Sample, which is based on ListTemplate2.
我这样做的方法是通过APL创作工具 。 这个方便的工具提供了一系列不同的视觉设计,您可以将它们用作基线来创建具有吸引力的视觉效果。 它还允许您保存和上载布局,因此您可以将其提取到技能代码中,或者在进行离线更新时上载它们。 对于此用例,我从基于ListTemplate2的Image Forward List Sample开始。
Once you select this visual design in the tool, you’ll see a generic example of a list with cheese samples. You’ll see the APL document at the bottom of the screen separated into two tabs:
在工具中选择此视觉设计后,您将看到包含奶酪样品的清单的一般示例。 您将在屏幕底部看到APL文档,该文档分为两个选项卡:
- “Image Forward List Sample” which provides the layout提供布局的“图像转发列表样本”
- “Data JSON” tab which provides a view of the document data.“数据JSON”选项卡提供了文档数据的视图。
Take a moment to look through the JSON on both the Image Forward List Sample tab (the layout code) and the Data JSON tab (the content code). You’ll notice in the layout that there are several references to values enclosed in ${}
such as ${payload.listTemplate2ListData.listPage.listItems.length}
. If you look in the content file, you’ll see that this is a path to a value within the content. This is how APL binds data to the presentation layer and lets you make changes.
花一点时间浏览“图像转发列表样本”选项卡(布局代码)和“数据JSON”选项卡(内容代码)上的JSON。 您会在布局中注意到,对${}
包含的值有多个引用,例如${payload.listTemplate2ListData.listPage.listItems.length}
。 如果查看内容文件,您会看到这是内容中值的路径。 这就是APL将数据绑定到表示层并进行更改的方式。
更新数据源 (Updating Data Sources)
As a first step, I wanted to update the data so it would show card images and text relevant to my skill. That way, as I started to update the layout itself, I would be able to see how it would look with my actual images. The Authoring Tool shows your rendered screen images in real time, making it convenient to use as you attempt to perfect your layout. To update the data, I took the following steps:
第一步,我想更新数据,以便显示与我的技能有关的卡片图像和文本。 这样,当我开始更新布局本身时,我将能够看到它与实际图像的外观。 创作工具实时显示您渲染的屏幕图像,使您在尝试完善布局时使用起来非常方便。 要更新数据,我采取了以下步骤:
- Click on the Data JSON tab单击数据JSON选项卡
In the
listTemplate2Metadata
, change thetitle
andlogo
elements to something relevant to Video Poker在
listTemplate2Metadata
,将title
和logo
元素更改为与Video Poker相关的内容In this same element, change the
url
in thebackgroundImages.sources
fields to point to the background image I wanted to use在同一元素中,更改
backgroundImages.sources
字段中的url
以指向我要使用的背景图像In
listTemplate2ListData.listPage
, I updated each of the items in thelistItems
array. Specifically, I updated this array to have 5 items (my cards), withlistItemIdentifier
andtoken
set to “card.x” (where x ranged from 0–4). I removed thesecondaryText
since I only wanted one row of text (which would either be blank or say “HELD”). I updated theimage.sources
to point to URLs containing my card images. For now, I just selected some card images at random — my skill’s code will update the data during gameplay with the actual user’s hand在
listTemplate2ListData.listPage
,我更新了listItems
数组中的每个项目。 具体来说,我将该数组更新为5个项目(我的卡片),并将listItemIdentifier
和token
设置为“ card.x”(其中x的范围为0–4)。 我删除了secondaryText
因为我只想要一行文本(可以为空白或说“ HELD”)。 我更新了image.sources
以指向包含我的卡片图像的URL。 现在,我只是随机选择了一些卡片图像-我的技能代码将在游戏过程中使用实际用户的手来更新数据Update the hint text to use a transformation. Rather than hard-coding the hint string with the Alexa keyword, you can use a transform to change a hint into one that uses the wake word associated with the device, in case the user has changed it. You do this by removing the
hintText
from listTemplate2ListData and adding the following into your lastTemplate2Metadata:更新提示文本以使用转换。 您可以使用转换将提示更改为使用与设备关联的唤醒字的提示,而不用用Alexa关键字对提示字符串进行硬编码,以防用户更改了提示。 您可以通过去除做到这一点
hintText
从listTemplate2ListData并添加以下到您的lastTemplate2Metadata:
"properties": { "hintText": "select number 1"},"transformers": [ { "inputPath": "hintText", "transformer": "textToHint" }],
Once I had made these to the data sources, my image looked like this — pretty similar to the skill as it exists with the ListTemplate2 display which makes sense since at this point I’m still using the layout based on ListTemplate2 and have only made content changes.
一旦将这些设置为数据源,我的图像就会看起来像这样–与ListTemplate2显示器所具有的技能非常相似,这很有意义,因为在这一点上我仍在使用基于ListTemplate2的布局,并且仅使内容变化。
更新布局 (Updating the Layout)
Now for the fun part — updating the layout to get five images on the screen at one time. For this part, I made updates to the layout on the “Image Forward List Sample” tab. To make these changes, I clicked on the slider that lets you switch between a visual view of nested APL components to a raw JSON view. I find viewing the full document JSON easier to consume than clicking on each component and editing the JSON within the component. But you can play with it and follow whichever approach seems most natural to you.
现在开始有趣的部分-更新布局以一次在屏幕上获得五张图像。 对于这一部分,我对“图像转发列表样本”选项卡上的布局进行了更新。 要进行这些更改,我单击了滑块,使您可以在嵌套APL组件的可视视图与原始JSON视图之间切换。 我发现查看完整文档JSON比单击每个组件并在该组件内编辑JSON更容易使用。 但是您可以使用它,并按照您认为最自然的方法进行操作。
Before talking through the changes I made, I wanted to point out some of the elements of this layout template:
在讨论所做的更改之前,我想指出此布局模板的一些元素:
There is a
ListTemplate2
node in the JSON which provides two containers in anitems
node— one that applies to circular screens (like the Echo Spot) and the other for other screen types. In this blog, I’m going to focus on the non-Spot displays, but you should appreciate that you can also make changes specific to different screen layouts.有一个
ListTemplate2
其中提供两个容器在所述JSON节点items
节点-一个适用于圆形筛(如回声景点),另一个用于其他类型的屏幕。 在此博客中,我将重点介绍非点显示,但是您应该理解,您还可以针对不同的屏幕布局进行更改。Looking at the second container that we’ll be changing, you‘ll see a set of
items
including an Image (the background image), an AlexaHeader (the title on the screen), a Sequence (which is the list of cards), and an AlexaFooter (the hint at the bottom of the screen)查看我们将要更改的第二个容器,您将看到一组
items
包括图像(背景图像), AlexaHeader (屏幕上的标题), 序列 (卡列表),和AlexaFooter (屏幕底部的提示)You’ll see that the Sequence points to
HorizontalListItem
, which is another container in this JSON document. It contains items consisting of an Image and two Text elements (the primary text and the secondary text)您将看到Sequence指向
HorizontalListItem
,这是此JSON文档中的另一个容器。 它包含由一个Image和两个Text元素(主要文本和次要文本)组成的项目
With this context in mind, I made the following changes to this document:
考虑到这种情况,我对该文档进行了以下更改:
Within the
HorizontalListItem
, I changed the Image item dimensions — specifically I setheight
to 40vh andwidth
to 17vw. This sets the height of each card to 40% of the viewport height, and the width to 17% of the viewport width.在
HorizontalListItem
,我更改了Image项的尺寸-具体地说,将height
设置为40vh,将width
为17vw。 这会将每个卡的高度设置为视口高度的40%,并将宽度设置为视口宽度的17%。I then updated
midWidth
to 100. This makes the width of each list item smaller and allows the five card images to appear on the screen然后,我将
midWidth
更新为100。这使每个列表项的宽度变小,并允许五张卡片图像出现在屏幕上I changed
paddingLeft
andpaddingRight
to 6 to reduce the amount of space between elements我将
paddingLeft
和paddingRight
更改为6以减少元素之间的空间I added
paddingTop
and set it to 100 to add some separation between the header and the card images我添加了
paddingTop
并将其设置为100以在标题和卡片图像之间添加一些分隔- I got rid of the secondary Text element since I don’t have two lines of text on my display我没有第二个Text元素,因为我的显示屏上没有两行文本
I changed the primary Text element so it doesn’t draw the ordinal. So
text
in this element changed from<b>${ordinal}.</b>${data.textContent.priam
ryText.text} to <b>${data.textContent.pri
maryText.text}</b>.我更改了主要的Text元素,因此它不会绘制序数。 因此,此元素中的
text
从<b>${ordinal}.</b>${data.textContent.priam
ryText.text} to <b>${data.textContent.pri
maryText.text} </ b> 。Within this same element, I wanted the text to be red and centered. I achieved this by adding a
textAlign
field with a value of “center,” and acolor
field with a value of “red.”在同一元素内,我希望文本为红色且居中。 我通过添加值为“ center”的
textAlign
字段和值为“ red”的color
字段来实现此目的。In order to get the hint text from the appropriate location (now part of the metadata rather than the list data), I needed to update the AlexaFooter element to get the hint from
${payload.listTemplate2Metadata.properties.hintText}
为了从适当的位置(现在是元数据的一部分而不是列表数据的位置)获取提示文本,我需要更新AlexaFooter元素以从
${payload.listTemplate2Metadata.properties.hintText}
获取提示。
Finally, I needed to make the cards in my list selectable, so I could respond when the user touches one of them on the screen. To do this, I needed to change the items that were associated with the Sequence
element from a FullHorizontalListItem
to a TouchWrapper
which in turn contained a FullHorizontalListItem
. In code, that means that I changed this:
最后,我需要将列表中的卡设为可选,以便当用户触摸屏幕上的其中一张卡时可以做出响应。 为此,我需要将与Sequence
元素关联的项目从FullHorizontalListItem
更改为TouchWrapper
,后者又包含FullHorizontalListItem
。 在代码中,这意味着我更改了此代码:
"item": [ { "type": "FullHorizontalListItem", "listLength": "${payload.listTemplate2ListData.listPage.listItems.length}" }]
to this:
对此:
"item": [ { "type": "TouchWrapper", "onPress": { "type": "SendEvent", "arguments": [ "${data.token}" ] }, "item": { "type": "FullHorizontalListItem", "listLength": "${payload.listTemplate2ListData.listPage.listItems.length}" } }]
Note the onPress
element in this item. Specifically, the list of arguments. You can specify an array of different arguments to send to your skill when an item is selected. Because my existing code was processing the token of the selected card, I decided to continue to do the same to minimize the amount of code I needed to change. But you could also pass in ${ordinal}
which would tell you the index of the selected item without having to process the token.
请注意此项中的onPress
元素。 具体来说,是参数列表。 您可以指定一组不同的参数,以在选择某项时发送给您的技能。 因为我现有的代码正在处理所选卡的令牌,所以我决定继续执行相同的操作,以最大程度地减少需要更改的代码量。 但是,您也可以传入${ordinal}
,它可以告诉您所选项目的索引,而无需处理令牌。
技能代码更新 (Updates to the Skill Code)
Once you’ve made changes within the Authoring Tool, you can select the Export Code button which will package up your layout and data files into one JSON file for you. I chose to use two different JSON files in my code, one called main which I used for the layout and another called datasources which I used for the data. I like keeping the separation of layout and content in my source code as a general best practice. It was surprising that Amazon’s Authoring Tool didn’t encourage this too.
在创作工具中进行更改后,可以选择“导出代码”按钮,它将为您将布局和数据文件打包为一个JSON文件。 我选择在代码中使用两个不同的JSON文件,一个称为main,用于布局,另一个称为数据源,用于数据。 我喜欢将布局和内容分离在源代码中,这是一般的最佳做法。 令人惊讶的是,亚马逊的创作工具也没有鼓励这样做。
Now that we’ve downloaded the document and content, we need to make code changes to incorporate it and update the data as the user plays with our skill. We can do this by manipulating data elements and then passing them back to the skill. I used Alexa’s response interceptor functionality (which I talk about in a separate blog post). I load the data source in from a JSON file, then update the cards and text within the structure before sending it off to Alexa. I do that with the following code:
现在,我们已经下载了文档和内容,我们需要进行代码更改以将其合并并在用户使用我们的技能进行更新时更新数据。 我们可以通过处理数据元素,然后将其传递回技能来做到这一点。 我使用了Alexa的响应拦截器功能(我在另一篇博客文章中谈到)。 我从JSON文件加载数据源,然后更新结构中的卡和文本,然后将其发送给Alexa。 我使用以下代码进行操作:
const main = require('./main.json');const datasource = require('./datasource.json');
function drawTable(handlerInput) { const event = handlerInput.requestEnvelope; const attributes = handlerInput.attributesManager.getSessionAttributes(); const game = attributes[attributes.currentGame]; let i; let cardText; let url;
// Update the images for (i = 0; i < game.cards.length; i++) { const card = game.cards[i]; url = GetCardURL(card); cardText = (card.hold) ? 'HELD' : ''; datasource.listTemplate2ListData.listPage.listItems[i] .textContent.primaryText.text = cardText; datasource.listTemplate2ListData.listPage.listItems[i] .image.sources[0].url = url; datasource.listTemplate2ListData.listPage.listItems[i] .image.sources[1].url = url; } // Give an appropriate hint if (game.state === 'FIRSTDEAL') { if (game.cards[0].hold) { datasource.listTemplate2ListData.hintText = 'discard the first card'; } else { datasource.listTemplate2ListData.hintText = 'hold the first card'; } datasource.listTemplate2Metadata.title = 'Select cards to hold or say Deal'; } else { datasource.listTemplate2ListData.hintText = 'deal'; datasource.listTemplate2Metadata.title = 'Your last hand'; } } return handlerInput.responseBuilder .addDirective({ type: 'Alexa.Presentation.APL.RenderDocument', version: '1.0', document: main, datasources: datasource, });}
The second place I had to make a code change was to handle the user touching one of the items in my list. In my old code, I was parsing item tokens of the form “card.x” where x is the ordinal position of the card in the list. With a Display Interface, this meant looking for an ElementSelected
request. In APL, your code will receive an APL.Presentation.APL.UserEvent
, and you can process the request as follows to determine which card was selected:
我必须进行代码更改的第二个地方是让用户触摸列表中的一项。 在我的旧代码中,我正在解析形式为“ card.x”的项目令牌,其中x是列表中卡的顺序位置。 对于显示界面,这意味着寻找ElementSelected
请求。 在APL中,您的代码将收到APL.Presentation.APL.UserEvent
,您可以按以下方式处理请求,以确定选择了哪张卡:
module.exports = { canHandle(handlerInput) { const request = handlerInput.requestEnvelope.request; // Was this a touch item selected? if (request.type === 'Alexa.Presentation.APL.UserEvent') { return ((request.source.type === 'TouchWrapper') && (request.source.handler === 'Press')); } return false; }, handle(handlerInput) { let index; const event = handlerInput.requestEnvelope; // Was this a touch item selected? if (event.request.type === 'Alexa.Presentation.APL.UserEvent') { const cards = event.request.arguments[0].split('.'); if (cards.length === 2) { index = cards[1]; } // Do something with the selected card...
} },};
With these changes, I had a much cleaner looking Video Poker skill, which is sure to delight my customers more than the older format I was using. I’ve just started scratching the surface in terms of APL’s capabilities. But I can tell it will open up a new world of possibilities for voice-driven multimodal skills! Let me know in the comments about your own learnings with this new framework.
进行了这些更改之后,我的视频扑克技能变得更加清晰,这肯定会让我的客户满意,而我使用的是较旧的格式。 我才刚刚开始了解APL的功能。 但我可以说,这将为语音驱动多模式技能开辟新的可能性! 在评论中让我知道您对这个新框架的了解。
翻译自: https://www.freecodecamp.org/news/how-to-use-alexa-presentation-language-in-your-skill-3c49961825c5/
alexa技能个数
相关文章:

HTML与XML总结
阅览《孙欣HTML》和《刘炜XML》过了一段时间,在这里学到的内容用思维导图来概括。HTML与XML都是标记语言。 同样点: HTML文档与XML文档有类似的结构。前者是(head和body)后者是(声明和主体),大致…

ant PageHeaderWrapper 返回上一页
PageHeaderWrapper 返回上一页实现代码: <PageHeaderWrappertitle{false}content{<a onClick{() > router.goBack()}><Icon type"left" />返回</a>}breadcrumb{{routes: [{ path: /, breadcrumbName: 首页 },{ path: /pay_orde…

ruby 新建对象_Ruby面向对象编程的简介
ruby 新建对象by Saul Costa由Saul Costa Object-oriented programming (OOP) is a programming paradigm organized around objects. At a high level, OOP is all about being able to structure code so that its functionality can be shared throughout the application.…

ASP.NET导出文件FileResult的使用
本文给大家讲一下ASP.NET MVC中如何使用FileResult来导出文件,首先网上相关例子有很多大神都有讲,我在这只是稍微说一点不同——为什么我的导出没有反应呢? 这个问题,我找了半天也没有找到,最后是在一个网友的评论中体…

【AHOI 2016初中组】 自行车比赛 - 贪心
题目描述 小雪非常关注自行车比赛,尤其是环滨湖自行车赛。一年一度的环滨湖自行车赛,需要选手们连续比赛数日,最终按照累计得分决出冠军。今年一共有 N 位参赛选手。每一天的比赛总会决出当日的排名,第一名的选手会获得 N 点得分&…

【Ant Design Pro 三】样式动态绑定 react样式绑定
第一步,创建样式文件,在页面目录下根据自己习惯创建一个less文件,用来写样式类 第二部,引用该文件 import styles from ./details.less; //details.less 代码: .menu {width: 95%; } .navigation-menu{width: 90%; …

react hooks使用_如何使用React和Hooks检测外部点击
react hooks使用by Andrei Cacio通过安德烈卡西奥(Andrei Cacio) 如何使用React和Hooks检测外部点击 (How to detect an outside click with React and Hooks) “外部点击”是什么意思? (What does “Outside Click” mean?) You can think of it as the “anti-b…

正则表达式(1)
正则表达式的概念 正则表达式是一个字符串,使用单个字符串来描述、用来定义匹配规则,匹配一系列符合某个句法规则的字符串。在开发中,正则表达式通常被用来检索、替换那些符合某个规则的文本。 正则表达式的匹配规则 字符类:[abc]…

Android 曲线动画animation,类似加入购物车动画
按照惯例先放效果图:图中小球做抛物线运动 资源图片 1.首先布局文件activity_main.xml,布局很简单,就一个测试按钮 1 <RelativeLayout xmlns:android"http://schemas.android.com/apk/res/android"2 xmlns:tools"http:…

小程序音频播放报10001 解决方案 errCode:10001, errMsg:errCode:602,err:error,not found param
音频播放有两种方式: 第一种: innerAudioContext.src audioSrc;innerAudioContext.play(); 第二种: innerAudioContext.autoplay true;innerAudioContext.src audioSrc; 之前使用第一种,华为手机不能正常播放,…

在线学位课程_您在四年制计算机科学学位课程中学到的知识
在线学位课程by Colin Smith通过科林史密斯 您在四年制计算机科学学位课程中学到的知识 (What you learn in a 4 year Computer Science degree) I recently wrote an article on whether you need a computer science degree to get a job in tech. I thought that going ove…

Swift学习笔记-协议(Protocols)
1.0 翻译:geek5nan 校对:dabing1022 2.0 翻译:futantan 校对:小铁匠Linus 定稿:shanksyang 本页包含内容: 协议的语法(Protocol Syntax)对属性的规定(Property Requireme…

JavaScript简单重写构造器的原型
1 //简单重写原型对象:2 3 //一个构造函数Person4 function Person(){5 6 }7 //重写Person的原型8 //把Person的原型赋值给一个新的对象 是我们重写的过程9 Person.prototype{ 10 // 对于构造器 如果我们不给他写,则构造器就是Object的构造器了 …

node.js cannot find module
找不到模块的解决方案 : 把node_module整个文件夹删掉,然后npm clean cache,看下package.json里有没有express的依赖项,有的话直接npm install,没有的话 npm install express --save。 有人说 npm clean cache 命令变成了 npm cache clean,可以都试一下

我在React Native中构建时获得的经验教训
by Amanda Bullington通过阿曼达布林顿(Amanda Bullington) 我在React Native中构建时获得的经验教训 (Lessons I learned while building in React Native) When I received an offer for a software engineering role to build an app in React Native, I wasn’t sure what…

【Ant Design Pro 五】箱套路由在菜单栏显示返回上一页
效果图: 场景:从菜单栏进入子页面,但是子页面默认不在路由显示,完成操作后需要返回上级页面。所以要在菜单栏中加返回的功能。 实现代码: import React from react; import { Button, Card, Icon } from antd; impor…

[002] The Perks of Being a Wallflower - 读后记
The Perks of Being a Wallflower 今天(2015年10月30日 18:26:17)读完"The Perks of Being a Wallflower". 本书290页,我是在小米pad上完成阅读的,epub格式,花费四天时间,每天至少5小时. 生词很多,就不一一列出了. 使用透析法并不强求完全的正确理解原文.强调完整的阅…

ios集成firebase_如何将Firebase与您的应用程序集成
ios集成firebaseYou’ve probably heard about Firebase, but may not know much about how it works and how it fits in with your application. Well, you’ve come to the right place. We’ll go over what Firebase is and how to integrate it with your Android projec…

PLSQL创建Oracle定时任务
转自:http://www.cnblogs.com/yx007/p/6519544.html#_label0转载于:https://www.cnblogs.com/good-tomorrow/p/7443817.html

判断h5是不是在小程序中
执行代码: if (ua.indexOf(MicroMessenger) -1) {//说明不在微信中// 走不在小程序的逻辑 } else {wx.miniProgram.getEnv(function(res) {if (res.miniprogram) {// 走在小程序的逻辑} else {// 走不在小程序的逻辑}}) }

CSS3关于过渡效果的问题
首先trasition:transform只是单单表示后面只要有含有的tranform的所有属性可以参与动画,而trasition:all表示后面所有动画属性都可以参动画,当父容器有relative时,子容器有absolute,子容器会跟着父容器相对定位。当你想要然后一个…

在线学位课程_如何选择计算机科学学位课程
在线学位课程by Colin Smith通过科林史密斯 如何选择计算机科学学位课程 (How to choose a Computer Science degree program) I remember combing through the countless computer science programs online and feeling a bit lost on what I should be looking for. I ended…

Dubbo 入门实例 本地伪集群测试Demo
1. 概述 Dubbo是一个分布式服务框架,致力于提供高性能和透明化的RPC远程服务调用方案,以及SOA服务治理方案 Dubbo是阿里巴巴SOA服务化治理方案的核心框架,每天为2,000个服务提供3,000,000,000次访问量支持,并被广泛应用于阿里巴…

Vue源码终笔-VNode更新与diff算法初探
写完这个就差不多了,准备干新项目了。 确实挺不擅长写东西,感觉都是罗列代码写点注释的感觉,这篇就简单阐述一下数据变动时DOM是如何更新的,主要讲解下其中的diff算法。 先来个正常的html模板: <body><div id…

JS获取当月每天的日期,JS获取本周每天的日期
获取当前月每天的日期,获取当前周每天的日期实现代码: 调用代码: console.log(-----------------, getNowM(), getWeekDay()) 结果:我今天是2020-2-28日 封装方法: function getDay(num, str) {var today new Dat…

@Scheduled注解的scheduler属性什么作用
注解是 Spring Framework 提供的一种机制,用于定义计划任务,即周期性执行的任务。 注解可以应用于方法上,以指示 Spring 容器在特定的时间间隔或按照某种调度规则来调用该方法。 属性是 注解的一个可选属性,它的作用是允许开发者指定一个自定义的 对象来控制任务的调度方式。默认情况下, 注解使用 Spring 内部的 来执行任务,但如果需要更高级的定制化需求,可以通过 属性指定一个自定义的 实现。自定义调度器:共享调度器资源:高级调度需求:假设你想使用 作为调度器,并且希望所有带有

自行车车把会吧车刮坏吗_花10分钟即可开始使用车把
自行车车把会吧车刮坏吗by Wing Puah永帕(Wing Puah) 花10分钟即可开始使用车把 (Take 10 minutes to get started with Handlebars) Nowadays front-end development is no longer about building static HTML markup and compiling SASS files. The rise of Single Page App…

每天一个linux命令(33):df 命令
linux中df命令的功能是用来检查linux服务器的文件系统的磁盘空间占用情况。可以利用该命令来获取硬盘被占用了多少空间,目前还剩下多少空间等信息。 1.命令格式: df [选项] [文件] 2.命令功能: 显示指定磁盘文件的可用…

一:HDFS 用户指导
1.hdfs的牛逼特性 Hadoop, including HDFS, is well suited for distributed storage and distributed processing using commodity hardware. It is fault tolerant, scalable, and extremely simple to expand. MapReduce, well known for its simplicity and applicability …

uni-app 封装企业微信config
第一步,在项目根目录加一个html文件, index.html 代码如下: <!DOCTYPE html> <html lang"zh-CN"><head><meta charset"utf-8"><meta http-equiv"X-UA-Compatible" content"I…