AWS |
AWS Messaging and Targeting Blog |
Send SMS at scale to Indian recipients using Amazon Pinpoint |
https://aws.amazon.com/blogs/messaging-and-targeting/send-sms-at-scale-to-indian-recipients-using-amazon-pinpoint/
|
Send SMS at scale to Indian recipients using Amazon PinpointSMS has one of the highest open rates of all customer communications channels and is popular with application builders for both transactional use cases like appointment reminders or asynchronous use cases like a SMS chatbot Amazon Pinpoint supports SMS in over countries and territories but SMS sending requirements can vary by recipient destination SMS … |
2021-04-16 16:10:56 |
AWS |
AWS |
Bi-directional Replication in Amazon Aurora PostgreSQL |
https://www.youtube.com/watch?v=mLj4ZY0sTEw
|
Bi directional Replication in Amazon Aurora PostgreSQLYou may occasionally need to create scale out databases so that duplicate copies of data reside in multiple places for performance or business continuity purposes While this goal could seemingly be accomplished with traditional unidirectional replication such an architecture would be unlikely to meet the needs of an organization with multiple business units Traditionally this required difficult tradeoffs between performance availability cost and data integrity In some situations routine maintenance tasks like database upgrades can become a real issue if there s significant downtime involved in the upgrade process In this video we ll take a look at solving this challenge with Amazon Aurora PostgreSQL Learn more about Amazon Aurora at these links Amazon Aurora Amazon Aurora Resources Amazon Aurora FAQS nd Quadrant AWS Data Integration on HVR software Qlik Striim Orancle Data Integration Subscribe More AWS videos More AWS events videos AWS AWSDemo |
2021-04-16 16:36:18 |
Google |
Official Google Blog |
Ask a Techspert: How can we fight energy rush hours? |
http://feedproxy.google.com/~r/blogspot/MKuf/~3/qu4D_4Z0gvM/
|
Ask a Techspert How can we fight energy rush hours Editor s Note Do you ever feel like a fish out of water Try being a tech novice and talking to an engineer at a place like Google Ask a Techspert is a series on the Keyword asking Googler experts to explain complicated technology for the rest of us This isn t meant to be comprehensive but just enough to make you sound smart at a dinner party Returning from a weekend trip this past winter my husband and I watched in real time as our security camera cut to black and our Nest app reported the thermostat had lost power The entire neighborhood had no electricity thanks to an ice storm that caused a tree in our very own backyard to fall We returned to a dark cold home which stayed that way for two days until the power company made their way through downed trees and ice to reconnect us Suddenly the lights turned on the internet came back and best yet we heard the gentle whir of the heater We blasted the heat ーand I have to imagine the homes around us did too That likely created an “energy rush hour something the Nest team is working on reducing through its Rush Hour Rewards program which works with utility companies to reward you for saving energy using your Thermostat Nest is currently celebrating Earth Day with a discount You can get the Nest Thermostat for which coupled with utility rebates could make the thermostat free for people in certain areas But what exactly creates or constitutes an energy rush hour And what role do utility companies play I turned to Hannah Bascom head of energy partnerships for Google Nest Her job is to find ways for Google to partner with energy companies and services and this week to also answer my questions Let s start with the basics Tell me about energy rush hours Certain times of the year especially when it s very hot or cold everyone cranks their A C or heat in addition to all of the usual energy consuming things we already do so demand for energy is very high We call these energy rush hours Then my neighborhood definitely created an energy rush hour this winter during the ice storm So when everyone cranks their heat or A C what do the utility companies do When demand for energy spikes utility companies typically turn on additional power plants ーwhich are often very expensive and emit a lot of carbon dioxide And as more people need increasing amounts of energy in their homes and businesses energy rush hours happen more frequently We ve seen several examples of brownouts recently ーutilities didn t have enough power to supply everyone so they had to shut off power in certain places As extreme weather events become more common this could happen more regularly so utilities are considering building more power plants which is costly and could increase carbon emissions But it doesn t have to be that way Utilities can incentivize customers to use less energy How I can t imagine not blasting my heat when it was so cold Nest s Rush Hour Rewards is one way people automatically lower energy use during energy rush hours without being uncomfortable in their homes Think about using GPS during a traffic jam You re sitting on the highway and it reroutes you to side roads to get around the gridlock You reach the same destination you just took a slightly different way Rush Hour Rewards is like that Nest reroutes your home s energy usage during times of grid congestion but you still reach your destination ーwhich in this case is your comfort level When you enroll in the program your thermostat will use less energy during times of high demand but you ll stay comfortable And you get rewarded by your utility company because they don t have to fire up additional generators That reward could come in the form of bill credits or a sent check You may even be able to get an instant discount on a Nest Thermostat from your utility provider Just search for your utility and “Nest Thermostat to find discounts How many customers using Rush Hour Rewards does it take to offset a power plant It definitely depends on the scenario but here s one example There are lots of peaker plants ーthe kind of power plant a utility would bring online during an energy rush hour ーthat are megawatts in size which is equivalent to only thermostats participating in an event How does the Nest Thermostat know when an energy rush hour is coming up Your energy company or sometimes another entity that manages your electric grid monitors weather conditions and forecasts electricity demand When they predict demand will be high they call a rush hour Rush hours can also happen during grid emergencies like when power plants suddenly go offline due to mechanical failure or extreme weather Another fun fact is that virtual power plants help balance renewables like solar and wind on the grid What s a virtual power plant A virtual power plant is what s created when a bunch of different sources ーlike home batteries and smart thermostats ーcome together to help the grid like a power plant would Because energy output from these sources varies based on things like cloud cover and wind speed “mini energy rush hours occur more frequently when there isn t quite enough energy supply to meet demand People who participate in Rush Hour Rewards can help balance the grid demand with energy supply How does the Nest thermostat know what temperature is enough to keep me warm or cool but also enough to make a difference during an energy rush hour Your Nest thermostat is very smart It learns from your use what temperatures keep you comfortable and will make slight adjustments to those settings during or even before rush hours For example Nest may pre cool your house a little bit before a rush hour event starts so that it runs less A C during the rush hour Same goes for pre heating Right now only thermostats participate in rush hours but in the future your electric vehicle or even your whole home may be able to join in Related ArticleAsk a Techspert How does Wi Fi actually work We can t live without Wi Fi But how does it work and how can you make it better Read Article |
2021-04-16 17:00:00 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
JavaScript filter()の参照値でハマった話 |
https://qiita.com/toxxhixx/items/054f5c81ada9a162ee93
|
しばらくして、似たような処理を実装する場面があったので、今度はこのように実装。 |
2021-04-17 01:45:10 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
Canvas要素の使い方 |
https://qiita.com/Shiraishi39/items/56df7343b72e35f66e63
|
Canvas要素の基本的な使い方HTMLltcanvasidIDwidthheightgtltcanvasgtまずは、HTMLでCanvasを用意します。 |
2021-04-17 01:13:29 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Scratchで少数同士のかけ算をした時の解答の桁数がおかしい |
https://teratail.com/questions/333636?rss=all
|
scratch |
2021-04-17 01:59:21 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Bootstrapのアコーディオンが閉じない |
https://teratail.com/questions/333635?rss=all
|
Bootstrapのアコーディオンが閉じない前提・実現したいことBootstrapのアコーディオンを閉じられるようにしたい。 |
2021-04-17 01:29:39 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
VScodeでのコンパイル、実行 |
https://teratail.com/questions/333634?rss=all
|
VScodeでのコンパイル、実行VScodeで上記のコードを実行する際に、写真左側のFallIntjavaを左クリックしRunから実行すると写真の下部ターミナルの結果になります。 |
2021-04-17 01:16:18 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
Amazon linux2にCMLを入れてみる |
https://qiita.com/basabasakhr/items/fcf760ef007310f066ed
|
AmazonlinuxにCMLを入れてみる初めにCiscoのCMLをクラウド上で動かせるか試すため、CentosにCMLのインストールを試みる環境catetcosreleaseNAMEAmazonLinuxVERSIONIDamznIDLIKEcentosrhelfedoraVERSIONIDPRETTYNAMEAmazonLinuxANSICOLORCPENAMEcpeoamazonamazonlinuxHOMEURLインストールパスワードの設定デフォルトユーザーの「ecuser」にパスワードが設定されていないため、パスワード設定sudosupasswdecuserGUI環境の設定公式通りにMATEデスクトップとTigerVNCをインストールsudoamazonlinuxextrasinstallmatedesktopxsudobashcechoPREFERREDusrbinmatesessiongtetcsysconfigdesktopsudoyuminstalltigervncservervncpasswd起動時のサービス自動起動を有効化sudocplibsystemdsystemvncserverserviceetcsystemdsystemvncserverservicesudosedisltUSERgtecuseretcsystemdsystemvncserverservicesudosystemctldaemonreloadsudosystemctlenablevncserversudosystemctlstartvncserverxstartupへのMATE実行コマンドの追加灰色画面の防止vncxstartupexecmatesessionsystemdマネージャー再ロードとサービスの再起動sudosystemctldaemonreloadsudosystemctlrestartvncserver日本語の設定インストールsudoyuminstallibuskkcsudoyuminstallgooglenotosansjapanesefontsibusの設定をbashrcに記載します。 |
2021-04-17 01:24:35 |
golang |
Goタグが付けられた新着投稿 - Qiita |
Fatal error: read tcp 127.0.0.1:xxxx->127.0.0.1:yyyy: read: connection reset by peer |
https://qiita.com/yonaimineakio/items/5c0e4a6be1377ea40160
|
Fatalerrorreadtcpxxxxgtyyyyreadconnectionresetbypeer事象サーバ・クライアント間でTCPIPコネクションを確立している状態でクラアントからサーバにデータを送信すると以下のエラーが出てきた。 |
2021-04-17 01:01:21 |
Azure |
Azureタグが付けられた新着投稿 - Qiita |
購入したAzure予約インスタンスが他のユーザーから閲覧できない? |
https://qiita.com/shingo_kawahara/items/e98ec7c8cbecde6e5eae
|
サブスクリプションの所有者権限を持っているため、AユーザーではBユーザーで購入したReservedInstanceが閲覧できるものと思っていましたが、自分が購入したものしか閲覧できません。 |
2021-04-17 01:52:40 |
海外TECH |
Ars Technica |
Congressmen ask Biden admin to keep chip design software away from China |
https://arstechnica.com/?p=1757446
|
china |
2021-04-16 16:09:50 |
海外TECH |
DEV Community |
How to send e-mail in django ? |
https://dev.to/yash2115/how-to-send-e-mail-in-django-37ge
|
How to send e mail in django In django we can send e mail using SMTP Simple Mail Transfer Protocol service which is inbuilt package in python and also in django What is smtp SMTP Simple Mail Transfer Protocol is service that provides service to send receive and or relay outgoing mail between senders and receivers SMTP service takes your client email address you can also give multiple email address which you are using and it is formatted as smtp gmail com because let s take and example Gmail s SMTP server address is smtp gmail com and Twilio Send Grids is smtp sendgrid com You can generally find your SMTP server address in the account or settings section of your mail client Django email sending setupStep gt create one folder and name it as django emailStep gt Create django project using below command django admin startproject emails Directory previewStep gt Create django app in project created from above step and use command python manage py startapp mainDirectory previewStep gt Now install app in settings py and this file will be in emails folderDirectory previewStep gt Now you need to migrate the project using command python manage py migrateStep gt Go in settings py and go at the bottom and write code under static variableEMAIL BACKEND django core mail backends smtp EmailBackend EMAIL HOST smtp gmail com EMAIL HOST USER gmail account email id EMAIL HOST PASSWORD Your gmail password EMAIL USE TLS TrueEMAIL PORT Here in variable EMAIL HOST USER you need to write the email id which have two step verification off because we need to make some settings change on your g mail account And In variable EMAIL HOST PASSWORD you need you write your g mail account password Step gt Now open your favorite browser and follow below stepsGo in option Account Go in option Security and search for Less secure app access and turn that on because if you will not turn that on then django will not able to send the mail Directory previewStep gt Now create form py file in mail folder and write code below codeform pyfrom django import formsclass ContactMeForm forms Form first name forms CharField widget forms TextInput attrs class form control placeholder Enter first name required True last name forms CharField widget forms TextInput attrs class form control placeholder Enter last name required True emailid forms EmailField widget forms TextInput attrs class form control placeholder Enter email id required True phone number forms CharField widget forms TextInput attrs class form control placeholder Enter phone number subject forms CharField widget forms TextInput attrs class form control placeholder Enter subject required True message forms CharField widget forms Textarea attrs class form control placeholder Enter Message required True Step gt Now go in views py file and write below codeviews pyfrom django shortcuts import renderfrom main form import ContactMeFormfrom django core mail import send mail BadHeaderErrorfrom django http import HttpResponsefrom django contrib import messagesdef home request form ContactMeForm if request method POST form ContactMeForm request POST if form is valid form save send mail subject message fname lname email phonenumber subject message sedner recipient subject Contact form inquiry body first name form cleaned data first name last name form cleaned data last name email form cleaned data emailid phonenumber form cleaned data phone number subject form cleaned data subject message form cleaned data message message n join body values sender form cleaned data emailid recipient gameforyash gmail com try send mail subject message sender recipient fail silently True except BadHeaderError return HttpResponse Invalid header found messages success request Your respoce has been submited successfully context form form return render request home index html context Step gt Now create urls py file in main folderDirectory previewStep gt Open urls py created in main folder and write below codefrom django urls import pathfrom main import viewsurlpatterns path views home name home Step gt Now register urls py created in main folder to emails gt url py as shown belowfrom django contrib import adminfrom django urls import path includeurlpatterns path admin admin site urls path include main urls Step gt Now create templates folder in main folder and create home folder in templates folder and create index html in home folderSOME THING LIKE THIS main gt templates gt home gt index htmlDirectory previewStep gt Open index html and write below code lt DOCTYPE html gt lt html lang en gt lt head gt lt meta charset UTF gt lt meta http equiv X UA Compatible content IE edge gt lt meta name viewport content width device width initial scale gt lt title gt Document lt title gt lt link href beta dist css bootstrap min css rel stylesheet integrity sha eOJMYsdii scO bJGFsiCZc NDVNyr RDqrQlh rPckxlpbzKgwra crossorigin anonymous gt lt style gt marg margin lt style gt lt head gt lt body gt lt dev class marg gt lt form class form contact contact form container action url home method post id contactForm novalidate novalidate gt lt h gt Contact us form lt h gt csrf token lt div class row gt lt div class col sm gt lt div class form group gt lt label for first name gt Enter first name lt label gt form first name lt div gt lt div gt lt div class col sm gt lt div class form group gt lt label for last name gt Enter last name lt label gt form last name lt div gt lt div gt lt div class col gt lt div class form group gt lt label for email gt Enter Email id lt label gt form emailid lt div gt lt div gt lt div class col gt lt div class form group gt lt label for phone number gt Enter phone number lt label gt form phone number lt div gt lt div gt lt div class col gt lt div class form group gt lt label for subject gt Subject lt label gt form subject lt div gt lt div gt lt div class col gt lt div class form group gt lt label for Message gt Enter Message lt label gt form message lt div gt lt div gt lt div gt lt div class form group mt lg gt lt button type submit class btn btn outline success gt Send Message lt button gt lt div gt lt form gt lt dev gt lt script src beta dist js bootstrap bundle min js integrity sha JEWxMcGR pHjmWHWWPWintQrMbsZOdauHnUtxwoGvIDkLtSqmEkf crossorigin anonymous gt lt script gt lt body gt lt html gt Step gt Now start your django server using command python manage py runserver Step gt Fill the data and click on submit button and see your mail mail box you must see mailmail receivedIf you like this shot django mail sending tutorial then please like this blog and if you have any doubts the let me know in discussion box |
2021-04-16 16:43:08 |
海外TECH |
DEV Community |
Why is Graph Theory so amazing? - part 4, working with weights & Dijkstra |
https://dev.to/kruzzy/why-is-graph-theory-so-amazing-part-4-working-with-weights-dijkstra-450k
|
Why is Graph Theory so amazing part working with weights amp DijkstraIn the ending of the previous article we said that breadth first search can be modified to obtain completely different behaviours Today we are going to see how exactly we can modify BFS to obtain a brand new algorithm Firstly though we need to introduce the weighted graph notion This is the last articles in this mini series Why is Graph Theory so amazing as next week we re going to explore another interesting computing subject Weighted GraphsA weighted graph is a graph in which each edge has an attached weight or cost to it For example the graph above let it be called G represents a weighted graph the edge has weight the edge has weight and so on From a practical standpoint a weighted graph can mean a network of roads with each edge cost representing the distance between two cities or when working with live data a sort of time coefficient that can be affected by traffic events accidents maintenance work and so on Now we can ask the following question how can we go from a node i to a node j with minimal cost Computing The Shortest PathOne popular algorithm to compute the shortest path from a node to another is called Dijkstra s Algorithm after the Dutch computer scientist among other things Edsger Wybe Dijkstra In an interview given in Dijkstra said that the algorithm was designed without pen amp paper while sitting in cafe with his fiance The algorithm follows a pretty simplistic and elegant approach We can consider it a sibling of breadth first search of which I gave a more detailed overview in this article The main difference is the order in which the algorithm visits the nodes instead of expanding nodes in the order in which they were put in the queue in a First In First Out manner the algorithm remembers for each node the cost with which it has been reached expanding nodes reached with a lower cost first Let the starting node be called start and the node to which we want to find the cost be called finish Let cost be an array which contains the cost to reach each of the N nodes in our graph Formally the algorithm should follow the next steps mark all nodes as unvisited moreover mark the cost of node start with and the cost to get to any other node with a very high value put start in the queue while there are nodes left in the queue and we haven t found a cost for the finish node pop a node from the queue let it be called u if the node has already been visited i e we could get to it from multiple directions so we put it in the queue multiple times with different costs there is no need to visit it again as we have already expanded the best way to reach it continue the algorithm if the node hasn t already been visited search through its neighbours for any neighbour i we check whether coming from u can improve its respective cost i e if the current cost to get to i is greater than the cost to get to u plus the cost of the edge u i if so put i in the queue with the associated cost after looking at all the neighbours of u mark u as visited and go back to Now let us work towards an implementation of Dijkstra s algorithm Representing Weighted Graphs in MemoryYou may remember the adjacency list py file we wrote for the first article In order for that graph wrapping to handle weighted graphs we need to modify two fundamental things in its structure For a node i every entry in its neighbour list should now remember a tuple the node which it leads to and the cost of the edge The is valid tuple function which we used for checking user input should be modified to only check the first two elements of the tuple to be nodes specifically this line should be modified The length of the tuple should be modified to and as you can see we used the Python built in all function to check for the nodes We can modify our iterable x to only return the first two elements by changing it to x This Python syntax is called extended slicing When using it like start stop it returns an iterable object containing elements from index start to index stop of the iterable on which we applied the syntax Finally our line will become One other thing we have to keep into account is the way in which we extract the result of our lowest cost path yet in each step of the algorithm we consider a graph G with N nodes We can use a regular array to construct the queue of our candidates and look through all its entries every time that s N entries for each candidate in our shortest path We can optimise the runtime by using an appropiate data structure a binary heap with logarithmic minimum extraction and insertion doing roughly log N operations for each shortest path candidate Luckily the Python library contains a PriorityQueue collection which satisfies our needs for implementing the faster Dijkstra variant if we are not too interested in implementing a data structure such as this ourselves The algorithm I have described below only provides us with the cost of the path but not with the path itself However we can compute it quite simply if each time we computed a better candidate for a path cost we would remember the parent node the node which we expanded to get there in addition to the cost itself Then we can use recursion to go from parent to parent and print the nodes we encounter after making the recursive calls Below is the modified version of the graph wrapping and the implementation of the algorithm The snippet outputs the smallest path cost as with the route gt gt when we want to compute the cost between and Looking at the graph we can see that this is indeed the answer ConclusionThis week s article ends here This is the last entry in this mini series Why is Graph Theory so amazing during which I hope I offered a somewhat clear image on what graphs are and some fun ways to use them Unfortunately the subject is too broad to be treated in just a series of articles Next week we re gonna present a completely new aspect of Computer Science Until then you can pass the time by reading another article in the series |
2021-04-16 16:41:56 |
海外TECH |
DEV Community |
Vim CoC Explorer..Explorador de archivos más rápido de todos |
https://dev.to/teodev1611/vim-coc-explorer-explorador-de-archivos-mas-rapido-de-todos-oh4
|
Vim CoC Explorer Explorador de archivos más rápido de todosCoc Explorer un explorador de archivos inspirado en Vscode File explorer super configurable y hermoso con git status incluido Vamos a empezar con la instalación para empezar usarlos ACLARACIÓN Esta configuración a sido gracias a NikolaM Dev Limpiar los pluginsPara evitar cualquier conflicto con los otros file explorers para eso los borramos desde la función call plug begin y corremos PlugClean y damos y luego de eso procedemos a la instalación Instalar CoCPara ver si tenemos instalado Coc podemos hacerlo con el comando CocInfoDebería aparecer lo siguiente Si da comando no reconocido procedemos a instalar coc añadiendo esto a plugPlug neoclide coc nvim branch release Luego corremos so Y al final corremos PlugInstallLuego de esto cerramos neovim y volvemos a entrar Instalar CoC ExplorerUna vez instalado CoC podemos instalar CoC Explorer CocInstall coc explorer Te aparecera algo asi Una vez que este finalizado se veráde la siguiente manera Ahora procedemos a configurar Configurar Coc ExplorerPara empezar deberías tener un archivo coc settings json o lo creas Una vez aquíabre llaves y pega lo siguiente coc explorer explorer openAction for directory expandOrCollapse explorer git icon status added ✚ explorer git icon status deleted explorer git icon status renamed ➜ explorer git icon status unmerged ≠ explorer git icon status untracked explorer git icon status modified ✹ explorer git icon status ignored explorer git icon status mixed explorer icon enableNerdfont true explorer quitOnOpen true explorer file showHiddenFiles false explorer file column clip copy explorer file column clip cut explorer width explorer file hiddenRules extensions o a obj pyc filenames byebug DS Store patternMatches git node modules plugged explorer keyMappings global i false cancel default mapkey s toggleSelection lt tab gt actionMenu gk wait expandablePrev gj wait expandableNext h wait collapse l wait expandable expand open J wait toggleSelection normal j K wait toggleSelection normal k gl wait expand recursive gh wait collapse recursive lt LeftMouse gt expandable expanded collapse expand open o wait expanded collapse expand lt cr gt expandable expanded collapse expand open b open split plain v open vsplit C wait expandable cd open u wait gotoParent gs wait reveal select il preview labeling ic preview content ic false Il previewOnHover toggle labeling Il false Ic previewOnHover toggle content Ic false II previewOnHover disable yp copyFilepath yn copyFilename yy copyFile dd cutFile p pasteFile t delete d deleteForever n addFile N addDirectory r rename m rename lt dot gt toggleHidden R refresh help q quit lt esc gt esc X systemExecute gd listDrive f search F searchRecursive gf gotoSource file gb gotoSource buffer wait sourcePrev wait sourceNext i wait indentPrev i wait indentNext m wait markPrev modified m wait markNext modified d wait markPrev diagnosticError diagnosticWarning d wait markNext diagnosticError diagnosticWarning D wait markPrev diagnosticError D wait markNext diagnosticError gp wait markPrev git gn wait markNext git ga gitStage gr gitUnstage explorer file root template icon amp PROJECT root explorer buffer root template icon amp OPEN EDITORS explorer file child template git selection clip indent icon diagnosticError amp filename omitCenter modified readonly linkIcon amp link growRight omitCenter Esto daráa CoC Explorer una apariencia minimalista y con varios atajos si quieres leer mas sobre CoC Explorer puedes seguir aquíAhora vamos al vimrc y al init vim y colocamos lo siguiente esta configuración es para Windows siguiente a esta estarála de Linux y Mac COC EXPLORER CONFIG Disable netrw let g loaded netrw let g loaded netrwPlugin let g loaded netrwSettings let g loaded netrwFileHandlers let g loaded matchit let g coc explorer global presets vim root uri APPDATA Local nvim cocConfig root uri APPDATA Local nvim coc settings json tab position tab quit on open v true floating position floating open action strategy sourceWindow floatingTop position floating floating position center top open action strategy sourceWindow floatingLeftside position floating floating position left center floating width open action strategy sourceWindow floatingRightside position floating floating position right center floating width open action strategy sourceWindow simplify file child template selection clip indent icon filename omitCenter buffer sources name buffer expand v true git sources name git expand v true autocmd BufEnter if winnr amp amp amp filetype coc explorer q endifaugroup coc explorer if autocmd User CocNvimInit bd autocmd User CocNvimInit CocCommand explorer endifaugroup ENDif exists User CocGitStatusChange doautocmd lt nomodeline gt User CocGitStatusChangeendifnnoremap lt leader gt n CocCommand explorer lt CR gt nnoremap lt leader gt p CocCommand explorer preset floating lt CR gt Ahora la de Linux y Mac Para esto necesitamos ir a este repositorio de un amigo llamado NikolaM Dev el tiene la configuración para linux te la dejo aquíAhora recargamos vim y listo esto se abre con leader n o puedes cambiarlo AgradecimientosGracias por leer este post para cualquier cosa que desees agregar los comentarios si quieres enterarte de las ultimas novedades de mi configuración puedes seguirme en github aquíHecho con en Ecuador |
2021-04-16 16:40:49 |
海外TECH |
DEV Community |
A simple terminal UI dashboard for code review |
https://dev.to/apoclyps/a-simple-terminal-ui-dashboard-for-code-review-2g76
|
A simple terminal UI dashboard for code reviewReviews is a simple code review manager that lists the status of open pull requests across multiple organizations amp repositories as a terminal UI dashboard The project was created as a way to keep on top of multiple teams creating large amounts of pull requests across several repositories by having a single up to date view of the pull request s approval status and age The initial implementation can be found over on Github at and can be installed from PyPI Contributions and feedback are welcome It s in the very early stages of development and it has a long way to go but hopefully there is enough here for others to derive some value from it being released early Getting started with reviewsYou can immediately start using review by installing it from PyPI and using providing the following configuration before running it pip install reviewsexport REPOSITORY CONFIGURATION apoclyps code review manager apoclyps my dev space export GITHUB TOKEN your token reviews dashboard |
2021-04-16 16:19:04 |
海外TECH |
DEV Community |
Automated visual regression testing with TypeScript, Puppeteer, Jest and Jest Image Snapshot |
https://dev.to/csouchet/automated-visual-regression-testing-with-typescript-puppeteer-jest-and-jest-image-snapshot-3n0f
|
Automated visual regression testing with TypeScript Puppeteer Jest and Jest Image Snapshot IntroductionAs developers it is our job to ensure that our users get an experience with no regression Like any good developer when I add a feature or fix a bug I also create unit integration and end to end tests This assures that when the existing code is modified nothing is accidentally broken and confirms that user flows are functional Like many people I ve gotten used to using a manual process to visually check that the design looks as intended Refactoring adding a new component or updating a package can sometimes change the appearance of the application It can get laborious to click through every possible user journey and we are not immune to forgetting a test or to miss a small visual change So how can we make sure that the visuals are always correct and less painful to test I had heard of automatic testing for no visual regression before I looked into using Selenium some time ago but changed projects and no longer needed it Now that I have a need for visual checks in my current project I ve found there are different libraries easy to learn that can take screenshots of current web pages and compare generated screenshots with a screenshot baseline to find regressions in the user interface UI In this article I will explain how to use one of these libraries Jest Image Snapshot Jest matcher in a Typescript project Project exampleI will use the BPMN Visualization project version as an example This example has been simplified so it shows more clearly the configuration and features explained in this article The goal of this project is to load BPMN content and render it Automated visual tests will simplify our life with each refactoring addition of a new component update of the positioning algorithm of the different BPMN elements or update of the MxGraph rendering library PrerequisitesAs first step we need to install the required packages as devDependencies Jest its type definition A JavaScript Testing FrameworkJest is a fully featured testing framework developed by Facebook It needs very little configuration and works basically out of the box npm install D jest types jest Puppeteer its type definition A Node library to control Chrome or Chromium both in headless mode and with a user interface It is possible to perform most of the actions that are done manually on a browser and take screenshots npm install D puppeteer types puppeteer jest puppeteer Jest Image Snapshot its type definition A Jest matcher to perform image comparisonsnpm i D jest image snapshot types jest image snapshot ConfigurationLet s configure the previous libraries Configure JestI won t go into detail here on all the different ways to configure Jest If you already use Jest for your unit ee tests this is not new for you If you would like more explanations about Jest there are many great articles available In this example we have Jest configurations unit tests ee tests and performance tests We added the visual tests in the ee test suite Here I will just explain how we configure Jest for the ee tests First create the Jest configuration file jest config js at test ee directory This configuration sets the root directory to the root project directory runs ts files with ts jest module and looks for spec ts and test ts files under any subdirectory of test ee directory Configure PuppeteerSpecify the preset in the Jest configuration test ee jest config js as specified in the official documentation of Jest Create a new file test ee jest puppeteer config js for the Puppeteer configuration to run the server amp launch the browser once for all tests With this configuration we start a server on the port with a timeout of s start a browser with a timeout of minutes and pipe the browser process stdout and stderr into process stdout and process stderr Extend the Jest expect assertion mechanism to use Jest Image SnapshotThis is the part that might be new but with a little configuration we will be ready soon By default Jest doesn t know anything about Jest Image Snapshot and its assertion toMatchImageSnapshot So we ll need to extend Jest For that create a new file test ee jest image ts like the following To avoid extending Jest in each test file or import the previous file globally in all test files we need to configure Jest to run it immediately after the test framework has been installed in the environment with setupFilesAfterEnv Jest property in test ee jest config js Add a new commandTo simply the test execution add the following script in the package json file Now you can run your ee tests with the following command npm run test eeNote cross env is useful if you run the tests on different OS TestYou can find the different properties to customize Jest Image Snapshot in its README on Github Create a basic test with Jest Image SnapshotIf everything is configured correctly we are now ready to create our first visual regression test test ee bpmn rendering test ts by combining Puppeteer and Jest and Jest Image Snapshot After the test runs a new directory will be created image snapshots with an image for each toMatchImageSnapshot call The names of the snapshots are computed by default with testPath currentTestName counter and defaultIdentifier Example of generated snapshot bpmn rendering test ts no bpmn gateway visual regression snap pngNote Make sure that the snapshot files are committed in your source control so they are shared with other developers and CI environments Test on different machinesOne issue with one to one pixel matching is that there is a good chance that the test will be in error on a machine other than on which it was developed because every environment has slightly different ways of rendering the same application For example suppose that we want to run the tests on the CI environment every time we create a pull request to the master branch in GitHub Without any modifications to the code the test is passed locally but on the CI environment it fails with a message like this Error Expected image to match or be a close match to snapshot but was different from snapshot differing pixels And a new image file for the diff is stored in the image snapshots diff output directory with the name lt snapshot name gt diff png If we use the previous test we ll have something like this bpmn rendering test ts no bpmn gateway visual regression diff pngYou can modify the previous jest image snapshot configuration test ee bpmn rendering test ts and update the value of failureThreshold default value amp failureThresholdType default value pixel These properties are used to calculate the threshold of tolerated differences before the test fails Warning If you increase the failure threshold too much when there is too much difference between local and CI environments it may be impossible to detect visual regressions Order the snapshotsIf you have or more tests it can become complicated to find which screenshot corresponds to which test feature in the directory image snapshots Modify the customSnapshotsDir property to have a different value according to the tests test ee helpers visu utils ts test ee bpmn rendering test ts test ee bpmn navigation test ts Reuse the snapshotsSometimes the expected result snapshot is the same even after different actions To avoid having a lot of identical snapshots in the Github repository it s better to reuse a snapshot For that it s necessary to override the default customSnapshotIdentifier amp customDiffDir properties customSnapshotIdentifier the custom name to give this snapshot This prevents the name of the snapshots from being computed with testPath currentTestName counter and defaultIdentifier customDiffDir the custom absolute path of a directory to keep this diff in As we use the same snapshot in different tests to know which diff file corresponds to which test we need to set a different value according to the tests Example test ee helpers visu utils ts test ee diagram rendering test ts ConclusionWith so many operating systems web browsers and screen resolutions Visual Testing can be a powerful tool to assure that an application works well in all possible environments It is definitely worth trying it as a complement to other sets of tests Now you have everything you need to start your first visual regression test in Typescript with Jest amp Puppeteer Thank you for reading and I hope I helped or inspired you ReferencesGithub repository of BPMN Visualization Github repository of Jest image snapshot Puppeteer documentation How to use Puppeteer with Jest Main image made with |
2021-04-16 16:14:16 |
Apple |
AppleInsider - Frontpage News |
Apple Watch Support for Bike+ cut back due to GymKit implementation issues, says Peloton |
https://appleinsider.com/articles/21/04/16/apple-watch-support-for-bike-cut-back-on-apples-orders-says-peloton?utm_medium=rss
|
Apple Watch Support for Bike cut back due to GymKit implementation issues says PelotonGymKit syncs Apple Watch and exercise equipment metrics during a workout a system Peloton did not use correctly for Bike Bootcamp Apple Watch can still be used for standard cycling classes on Bike One of the key features of the Peloton Bike is the inclusion of GymKit This is a system that allows Apple Watch owners to track their workouts on select gym equipment with a tap Read more |
2021-04-16 16:56:07 |
海外TECH |
Engadget |
Apple Music pays a penny per stream, double Spotify's rate |
https://www.engadget.com/apple-music-streaming-payment-rate-spotify-162320807.html
|
overall |
2021-04-16 16:23:20 |
金融 |
金融庁ホームページ |
「主要行等向けの総合的な監督指針」等の一部改正(案)について公表しました。 |
https://www.fsa.go.jp/news/r2/20210416/20210416.html
|
行等 |
2021-04-16 17:00:00 |
金融 |
金融庁ホームページ |
「記述情報の開示の充実に向けた解説動画」の配信について公表しました。 |
https://www.fsa.go.jp/news/r2/singi/20210416.html
|
解説動画 |
2021-04-16 17:00:00 |
海外ニュース |
Japan Times latest articles |
BOJ likely to discuss raising economic outlook, sources say |
https://www.japantimes.co.jp/news/2021/04/16/business/economy-business/bank-of-japan-economic-outlook/
|
economy |
2021-04-17 02:46:50 |
海外ニュース |
Japan Times latest articles |
Tokyo Olympics chief commits to games as infections surge, amid fresh calls to postpone or cancel |
https://www.japantimes.co.jp/news/2021/04/16/national/medical-journal-tokyo-olympic-cancellation/
|
Tokyo Olympics chief commits to games as infections surge amid fresh calls to postpone or cancelJapan has exhibited poor performance in containing transmission along with limited testing capacity and a slow vaccination rollout health experts wrote in the British Medical |
2021-04-17 02:43:29 |
海外ニュース |
Japan Times latest articles |
Japan’s passport remains world’s most powerful — in theory |
https://www.japantimes.co.jp/news/2021/04/16/national/most-powerful-passport/
|
access |
2021-04-17 01:49:05 |
海外ニュース |
Japan Times latest articles |
COVID-19 is more deadly in Brazil than India, and no one knows why |
https://www.japantimes.co.jp/news/2021/04/16/world/brazil-india-fatalities-covid/
|
american |
2021-04-17 01:13:04 |
海外ニュース |
Japan Times latest articles |
Limited testing leaves COVID-19 app glitches overlooked |
https://www.japantimes.co.jp/news/2021/04/16/national/virus-app-glitches/
|
Limited testing leaves COVID app glitches overlookedThe glitches in the COCOA app for Android smartphones prevented users from being notified even if they had contact with individuals infected with the novel |
2021-04-17 01:10:22 |
海外ニュース |
Japan Times latest articles |
Shauna Coxsey heading to Tokyo Olympics with newfound need for speed |
https://www.japantimes.co.jp/sports/2021/04/16/olympics/summer-olympics/shauna-coxseys-olympic-speed/
|
Shauna Coxsey heading to Tokyo Olympics with newfound need for speedCoxsey says the one year delay the Olympics has made her even more excited even if the games will be muted by strict COVID protocols |
2021-04-17 02:46:22 |
海外ニュース |
Japan Times latest articles |
Australia ponders allowing Olympic athletes to jump line for vaccine |
https://www.japantimes.co.jp/sports/2021/04/16/olympics/summer-olympics/australia-athletes-vaccine/
|
Australia ponders allowing Olympic athletes to jump line for vaccineThe Australian Olympic Committee AOC has asked the government to allow athletes to jump the line as the country s national vaccine program struggles with roadblocks |
2021-04-17 01:59:14 |
ニュース |
BBC News - Home |
Peaky Blinders actress Helen McCrory dies aged 52 |
https://www.bbc.co.uk/news/entertainment-arts-56770593
|
harry |
2021-04-16 16:55:16 |
ニュース |
BBC News - Home |
Covid vaccine advice for pregnant women firmed up |
https://www.bbc.co.uk/news/health-56778146
|
advisers |
2021-04-16 16:26:34 |
ニュース |
BBC News - Home |
Covid-19: Pregnant women should be offered jab and UK infections back at September levels |
https://www.bbc.co.uk/news/uk-56775377
|
coronavirus |
2021-04-16 16:43:52 |
ニュース |
BBC News - Home |
Prince Philip funeral 'a profound chance for Queen to say goodbye' |
https://www.bbc.co.uk/news/uk-56769860
|
archbishop |
2021-04-16 16:01:16 |
ニュース |
BBC News - Home |
Indianapolis mass shooting: Eight dead at FedEx facility |
https://www.bbc.co.uk/news/world-us-canada-56770200
|
fedex |
2021-04-16 16:19:06 |
ニュース |
BBC News - Home |
Sheffield man praised after woman pulled from burning flat |
https://www.bbc.co.uk/news/uk-england-south-yorkshire-56773904
|
merrill |
2021-04-16 16:38:22 |
ニュース |
BBC News - Home |
'Fan pilots vital for return to normality' - World Snooker chair Hearn |
https://www.bbc.co.uk/sport/56774003
|
england |
2021-04-16 16:06:12 |
ニュース |
BBC News - Home |
Leclerc crashes as Bottas quickest in Emilia Romagna practice |
https://www.bbc.co.uk/sport/formula1/56773159
|
emilia |
2021-04-16 16:40:32 |
ニュース |
BBC News - Home |
Prince Philip: How can Prince Harry attend the funeral? |
https://www.bbc.co.uk/news/uk-56709506
|
duties |
2021-04-16 16:01:59 |
コメント
コメントを投稿