- CanIUse PageTransitionEvent: https://caniuse.com/#feat=page-transition-events
- CanIUse PageTransitionEvent persisted: https://caniuse.com/#feat=mdn-api_pagetransitionevent_persisted
- Описание pageshow event на MDN: https://developer.mozilla.org/en-US/docs/Web/API/Window/pagehide_event
- Описание pagehide event на MDN: https://developer.mozilla.org/en-US/docs/Web/API/Window/pageshow_event
Тут перечислены не законы, последние слово всегда за здравым смыслом. Тут перечислены лишь направление, куда надо стремиться. Принципы, которые должны помочь, когда не знаешь, что выбрать.
- Пользователь. Если что-то сильно мешает UX или есть критическая ошибка, то в первую очередь мы спасаем пользователей. Для этого иногда надо взять ответственность на себя, переубедить толпу, написать плохой код.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div id="demo"> | |
<h1>Latest Vue.js Commits</h1> | |
<template v-for="branch in branches"> | |
<input type="radio" | |
:id="branch" | |
:value="branch" | |
name="branch" | |
v-model="currentBranch"> | |
<label :for="branch">{{ branch }}</label> |
So there were a few threads going around recently about a challenge to write the longest sequence of keywords in Javascript:
- https://twitter.com/bterlson/status/1093624668903268352
- https://news.ycombinator.com/item?id=19102367
There are, however, a few problems:
- Application has tree structure with folders for each "feature"
- Feature folders are named with lowerCamelCase → myComponentDashboard
- Feature can contain any number of components and nested features
- Components are named using UpperCamelCase → MyWidgetComponent.vue
- Component can have translation .yml file named correspondingly → MyWidgetComponent.yml
- If component requires more than 2 files: .vue and .yml file - folder is created with the same name → MyWidgetComponent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var API_KEY = "ВАШ_API_КЛЮЧ"; | |
function suggest(resource, query) { | |
var http = new ActiveXObject("MSXML2.XMLHTTP"); | |
http.open("POST", "http://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/" + resource, false); | |
http.setRequestHeader("Content-Type", "application/json"); | |
http.setRequestHeader("Authorization", "Token " + API_KEY); | |
var data = "{ \"query\": \"" + query + "\" }"; | |
http.send(data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim http | |
Set http = CreateObject("WinHttp.WinHttpRequest.5.1") | |
timeout = 2000 'milliseconds | |
http.SetTimeouts timeout, timeout, timeout, timeout | |
query = "7719402047" | |
request = "{ ""query"": """ & query & """ } " | |
http.Open "POST", "https://suggestions.dadata.ru/suggestions/api/4_1/rs/findById/party" | |
http.SetRequestHeader "Content-Type", "application/json" |
NewerOlder