投稿時間:2022-09-13 01:22:08 RSSフィード2022-09-13 01:00 分まとめ(31件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… 「iPhone 14 Pro」の常時点灯ディスプレイ、「Apple Watch」を装着して離れると自動でオフになる模様 https://taisy0.com/2022/09/13/161889.html applewat 2022-09-12 15:49:26
IT 気になる、記になる… 「Apple Watch Ultra」や「Apple Watch Series 8」のS8チップはS7/S6チップと同じCPUを搭載 https://taisy0.com/2022/09/13/161895.html applewatchu 2022-09-12 15:45:57
AWS AWS How do I replace a lost key pair using EC2Config or EC2Launch to reset the administrator password? https://www.youtube.com/watch?v=VBZLqxkeyGE How do I replace a lost key pair using ECConfig or ECLaunch to reset the administrator password For more details see the Knowledge Center article with this video Intro Demo Start Create new keypair Restore access to EC Launch instance Launch temporary instance EC Rescue on Windows EC Instance detach EndingWilliam shows you how to replace a lost key pair using ECConfig or ECLaunch to reset the administrator password Subscribe More AWS videos More AWS events videos ABOUT AWSAmazon Web Services AWS is the world s most comprehensive and broadly adopted cloud platform offering over fully featured services from data centers globally Millions of customers ーincluding the fastest growing startups largest enterprises and leading government agencies ーare using AWS to lower costs become more agile and innovate faster AWS AmazonWebServices CloudComputing 2022-09-12 15:16:10
AWS AWS Now Go Build with Werner Vogels – S3E1 Iceland | Amazon Web Services https://www.youtube.com/watch?v=mvnT2ggjIYI Now Go Build with Werner Vogels SE Iceland Amazon Web ServicesView the full Now Go Build Playlist From discovering life saving medical treatments in the skins of Atlantic cod to reinventing batteries with advancements in nanotechnology Iceland has proved itself to be one of the most technologically ingenuitive countries on earth Discover Iceland s surprisingly successful “waste nothing approach to innovation with Amazon CTO Dr Werner Vogels as he visits startups Kerecis Nanom and ON Power Learn more about Now Go Build on Learn more about the featured companies Kerecis Nanom ON Power Subscribe to AWS YouTube Subscribe More AWS videos More AWS events videos ABOUT AWSAmazon Web Services AWS is the world s most comprehensive and broadly adopted cloud platform offering over fully featured services from data centers globally Millions of customers ーincluding the fastest growing startups largest enterprises and leading government agencies ーare using AWS to lower costs become more agile and innovate faster NowGoBuild WernerVogels Iceland Reykjavik Isafjordur Biotechnology Nanoparticle Sustainability MachineLearning AWSNowGoBuild AWS AmazonWebServices cloud CloudComputing AWScloud 2022-09-12 15:03:16
js JavaScriptタグが付けられた新着投稿 - Qiita Porting WordNet to the Dogelog Player https://qiita.com/j4n_bur53/items/d51ff228c5aee3419bbc semantical 2022-09-13 00:42:42
Linux Ubuntuタグが付けられた新着投稿 - Qiita wsl2でUbuntu上に構築したMysqlにMySQL WorkBenchでアクセスする https://qiita.com/kuromame_09/items/65188f835573b535bf7b mysql 2022-09-13 01:00:08
Azure Azureタグが付けられた新着投稿 - Qiita GitHub Actions から Terraform で Azure の ResourceGroup を更新(変更)してみました https://qiita.com/turupon/items/7096e4df85ce7e95bd29 azure 2022-09-13 00:55:43
技術ブログ Developers.IO Gatsbyの「インクリメンタルビルド」がたくさんあるので整理した。 https://dev.classmethod.jp/articles/gatsby-incremental-builds/ gatsby 2022-09-12 15:00:37
海外TECH DEV Community Flink and Pulsar for September 12th, 2022 https://dev.to/tspannhw/flink-and-pulsar-for-september-12th-2022-3okk Flink and Pulsar for September th Flink and Pulsar for September th Published on September Edit articleView statsTim Spann Status is onlineTim Spann Developer Advocate StreamNative Apache Pulsar FLiP Stack DeveloperWeek Advisor articles ApachePulsar ApacheFlink FLiPStack FLiPNStack ApacheNiFi Spring Java OpenSource Python JDK ReactiveIs it Halloween yet So many cool events before then so I won t rush it I will be costume and decorate well before then I hope to see people at J dev ApacheCon and CurrentEvent Summit Training Changes to new versions of Akka a consideration for the Apache Spark and Apache Flink projects CODE COMMUNITYThe podcast is coming this week Thanks to Comcast for a great event in Philly it was a lot of fun and the venue is amazing The Comcast Labs team put in an amazing effort I can t wait to speak at another event there It would be an amazing venue for meetups One of the Speakers at the conference has an interesting podcast Check it out Thanks to the Spring Pulsar team we are now Reactive Lari Hotari has got an early snapshot out there I will test it out and let you know how awesome it is next week The mainstream Apache Pulsar Spring module is coming along well I have been testing some releases and Soby Chacko David Kjerrumgaard Alexander PreußChris Bono have been crushing it This is Issue TRAININGARTICLESDEMOSPULSAR APPSVIDEOSEVENTSPulsar Summit Asia is looking for speakers get your talks in I got mine in Sept OSS Summit Virtual Now Sept JConfDev Chicago Join me on Sept at PMNo alt text provided for this imageOct Apache Con New Orleans LA Oct Real Time Data Meetup Austin TX Oct Current Apache Kafka Summit Austin TX No alt text provided for this imageOct KubeCon DetroitNov Real Time Data Event NYCNov Real Time Data Event AustinNov AllDayDevopsNov PASS Data Community Conference Seattle Nov Real Time Data Event San FranciscoNov Big Data EU Virtual Dec Spring One San FranciscoDecember Real Time Data Event Silicon ValleyCODETOOLSPublished byTim Spann Status is onlineTim Spann Developer Advocate StreamNative Apache Pulsar FLiP Stack DeveloperWeek Advisor Published •h articleshashtag 2022-09-12 15:49:11
海外TECH DEV Community Denoising time series data by using wavelet transformation https://dev.to/atimin/denoising-timeseries-data-by-using-waveletbuffer-121a Denoising time series data by using wavelet transformationA popular approach for conditional monitoring of mechanical machines is to embed vibration sensors into a machine and start listening to it The data from the sensors must be stored somewhere So the more efficient we compress them the longer history we can keep When we deal with sensors we always have noise from them and when a machine is stopped we have only noise which wastes our storage space WaveletBuffer was developed to solve this problem by using the wavelet transformation and efficient compression of denoised data However a user must know many settings to use it efficiently In this tutorial you will learn how to find denoising parameters to get rid of white noise in your data BasicsFor an educational purpose I brought two samples from a vibration sensor which is maintained on a real machine You can find them in the directory docs tutorials buffer signal bin contains a second of the signal when the machine is working buffer no signal bin has only noise because the machine is stopped Both files are serialized buffer without any denoising so they have equal sizes but different amount of the information We need to separate white noise and information so we need the sample with the working machine Let s deserialize it from wavelet buffer import WaveletBuffer denoiseimport numpy as npimport matplotlib pyplot as pltblob b with open buffer signal bin rb as f blob f read print f Initial size len blob kB buffer WaveletBuffer parse blob print buffer Output Initial size kBWaveletBuffer lt signal number signal shape decomposition steps wavelet type WaveletType DB gt You can see that the signal has about points and the size of the file is about kB Let s have a look at the signal inside signal buffer compose plt plot signal plt show Looks noisy right When we ve restored the original signal we can use WaveletBuffer to denoise it We use some random threshold for the demonstration Later we learn how to find the optimal parameter When we pass denoise Threshold a b in WaveletBuffer decompose method it set to all values in hi frequency subbands which less than a x b where x is a decomposition step of the current subband buffer decompose signal denoise Threshold a b this a x where x is a decomposition stepdenoised buffer compose plt plot denoised plt show Information Loosing DetectionThe denoised signal looks the same but we actually don t know if we removed only the noise or we removed some part of the signal To figure out it we can take the difference between the denoised and original signals and check if it has some information or only noise It has some information and means we deleted with denoising err denoised signalplt plot err plt show To check if the difference err has something more than only noise we can find autocorrelation of error and test if all the values lie within sqrt n sqrt n where n is the size of sample For more detail see here def autocorr x result np correlate x x mode full return result int len result def test corr np ndarray thr np sqrt len corr tests np where np abs corr lt thr return tests sum corr autocorr err print test corr OutputFalse Optimal Denoise ParametersYou can see that for denoise Threshold we removed something important from our signal However the desnoised signal looked the same To find the optimal threshold we can start from and increasing the threshold with a little step until we fail the test threshold step for x in range threshold step x buffer decompose signal denoise Threshold threshold err buffer compose signal corr autocorr err if not test corr threshold threshold step print f Optimal threshold threshold breakOutput Optimal threshold You see that the threshold way less than our initial assumption Let s check the size of serialized signal buffer decompose signal denoise Threshold threshold print f Compression size len buffer serialize compression level kB signal buffer compose plt plot signal plt show Output Compression size kBLooks like it got times smaller after the demonising However the most interesting thing is compression of the sample when the machine was stopped blob b with open buffer no signal bin rb as f blob f read buffer WaveletBuffer parse blob buffer decompose buffer compose denoise Threshold threshold signal buffer compose print f Compression onlynoise size len buffer serialize compression level kB plt plot signal plt show Output Compression onlynoise size kBThe compressed size is times smaller now because we don t have valuable information in the sample ConclusionWaveletBuffer provides a pipeline wavelet transormation gt denoising gt compression which is useful for efficient compression of height frequency time series data This approach has an additional advantage for data sources which don t provide valuable information all the time but are requested continuously References White Noise Model Time Series Analysis Regression and ForecastingWaveletBuffer A universal C compression library based on wavelet transformationWaveletBuffer for Python Python bindings for WaveletBuffer 2022-09-12 15:34:32
海外TECH DEV Community CUDOS Developers’ value to the Decentralisation of Cloud networks Goals https://dev.to/mrbitee/cudos-developers-value-to-the-decentralisation-of-cloud-networks-goals-55ic CUDOS Developers value to the Decentralisation of Cloud networks GoalsCudos is a decentralized cloud network that enables users to leverage their unused computing power storage and bandwidth resources to earn Cudos tokens Cudos aims to expand its developer community by providing opportunities for developers to contribute towards the development of its eco system We are looking for experienced developers who would like to join our Rangers program and help us build the next generation decentralized applications Virtual machineVirtual machines are the backbone of cloud computing These software constructs allow us to launch servers databases and even entire operating systems on demand They give us the possibility to migrate quickly from one location to another or even use different hardware configurations IBM introduced virtual machines in the late s as an operating system feature for their mainframes to run multiple applications on one machine without having each application know about the other ones running on it like a modern day container In this early form these virtual machines were not very flexible but they did help solve some problems that could not be solved with previous technologies like dual booting or using an emulator for example In Roland Haitz invented a technique called “para virtualization which allowed him to add some additional instructions in his guest OS so that it could do things that were usually done by hypervisor code aka guest OS This enabled him to run multiple OS instances with different instruction sets e g x vs PowerPC inside one physical host machine ーi e no need for emulators anymore The downside is that this new design required significant changes throughout entire guest OS stack including drivers etc which means the ots of work upfront before being able to reap benefits later down road not something everyone can afford spendingto spendlottime on right now Our developers are working toto spendDOS users have an amazing experience in gaming eshopping etc using virtual machines Our Developers create shopping system friendly Blockchain networkIf you are a developer and have been following Cudos and the blockchain space you know how important it is to have an ecosystem built around your project This means you need developers building your platform s tools apps and dApps The more builders build on your network the apps off it will be in the long run The same goes for all projects in this space if you want a strong community using your token or dApp then there need to be incentives for them to do so aka rewards In order for that reward system to work effectively though to be enough people using said Dapps o therein them aka usage Decentralized pipelinesIf you re familiar with the concept of a pipeline you know that it s a set of tools and services that are used to build test and deploy applications A DevOps toolchain is the backbone of any pipeline It s a series of stages that move code from development to production Most organizations have an established process for creating their pipelines ーbut when we talk about Cudo s developer driven cloud networks we re talking about decentralized pipelines Blockchain oracleThe blockchain is a decentralized ledger That means that it s distributed across many computers and there s no single authority or company that controls its contents In order to verify the truthfulness of data recorded on this ledger one needs an independent source of information ーwhat we call an oracle An oracle acts as a trusted source of information that can be used to verify the truthfulness of data recorded on the blockchain Decentralized storageDecentralized storage is a key component of any decentralized cloud network It s important to understand how Cudos developers can help create a decentralized storage solution that meets the needs of your business Cudos developers have the technical skills needed to create decentralized file systems databases and other forms of decentralized storage solutions for your project or organization These solutions are designed with security and scalability in mind so you can rest assured that your data will be safe from attacks from hackers or other malicious actors who want access to it without your permissionLearn how to contribute to the Cudos network and become a Cudos Ranger You can become a Cudos Ranger and contribute to the network by developing applications for it A Cudos Ranger is an individual who contributes to the Cudos network They do this by creating software that uses interacts with or otherwise supports the Cudos protocol and network These individuals are rewarded for their contributions by being provided with some amount of tokens from a pool owned by the token holders This is called contributing towards becoming a “Cudos Ranger as it implies that they will help guide others through uncharted territory while exploring all that is possible within this new frontier Recent UpdatesWhen it comes to the CUDOS site they made some improvements too The UX for the re delegation process was improved A problem with accessing a direct link to an improvement proposal was resolved On the Validators page there was a caching problem that was fixed When assigning a task to a validator we fixed the “Max button They completed the “My Delegations tab s implementation on the Staking page ConclusionIf you are interested in joining us as a Cudos Ranger then please contact us at any time We would love to have you please contact us anytimeJoin the communityTwitter Mainnet 2022-09-12 15:13:10
海外TECH DEV Community Building an interactive screen-sharing app with Puppeteer and React 🤯 https://dev.to/novu/building-an-interactive-screen-sharing-app-with-puppeteer-and-react-12h7 Building an interactive screen sharing app with Puppeteer and React What is this article about You want to give a user the ability to browse a webpage through your system and feel like it s a real browser Why did I create this article For a long time I tried to create a way to do onboarding for members to go through some web page and fill in their details I searched for many open source libraries that can do it and found nothing So I have decided to implement it myself How are we going to do it For this article I will use Puppeteer and ReactJS Puppeteer is a Node js library that automates several browser actions such as form submission crawling single page applications UI testing and in particular generating screenshot and PDF versions of web pages We will open a webpage with Puppeteer send to the client React a screenshot of every frame and reflect actions to Puppeteer by clicking on the image To begin with let s set up the project environment Novu the first open source notification infrastructureJust a quick background about us Novu is the first open source notification infrastructure We basically help to manage all the product notifications It can be In App the bell icon like you have in the Dev Community Websockets Emails SMSs and so on I would be super happy if you could give us a star It will help me to make more articles every week How to create a real time connection with Socket io amp React jsHere we ll set up the project environment for the screen sharing app You ll also learn how to add Socket io to a React and Node js application and connect both development servers for real time communication via Socket io Create the project folder containing two sub folders named client and server mkdir screen sharing appcd screen sharing appmkdir client serverNavigate into the client folder via your terminal and create a new React js project cd clientnpx create react app Install Socket io client API and React Router  React Router is a JavaScript library that enables us to navigate between pages in a React application npm install socket io client react router domDelete the redundant files such as the logo and the test files from the React app and update the App js file to display Hello World as below function App return lt div gt lt p gt Hello World lt p gt lt div gt export default App Navigate into the server folder and create a package json file cd server amp npm init yInstall Express js CORS Nodemon and Socket io Server API Express js is a fast minimalist framework that provides several features for building web applications in Node js  CORS is a Node js package that allows communication between different domains Nodemon is a Node js tool that automatically restarts the server after detecting file changes and Socket io allows us to configure a real time connection on the server npm install express cors nodemon socket ioCreate an index js file the entry point to the web server touch index jsSet up a simple Node js server using Express js The code snippet below returns a JSON object when you visit the http localhost api in your browser index jsconst express require express const app express const PORT app use express urlencoded extended true app use express json app get api req res gt res json message Hello world app listen PORT gt console log Server listening on PORT Import the HTTP and the CORS library to allow data transfer between the client and the server domains const express require express const app express const PORT app use express urlencoded extended true app use express json New importsconst http require http Server app const cors require cors app use cors app get api req res gt res json message Hello world http listen PORT gt console log Server listening on PORT Next add Socket io to the project to create a real time connection Before the app get block copy the code below Next add Socket io to the project to create a real time connection Before the app get block copy the code below New imports const socketIO require socket io http cors origin http localhost Add this before the app get blocksocketIO on connection socket gt console log socket id user just connected socket on disconnect gt console log A user disconnected From the code snippet above the socket io connection function establishes a connection with the React app then creates a unique ID for each socket and logs the ID to the console whenever a user visits the web page When you refresh or close the web page the socket fires the disconnect event showing that a user has disconnected from the socket Configure Nodemon by adding the start command to the list of scripts in the package json file The code snippet below starts the server using Nodemon In server package json scripts test echo Error no test specified amp amp exit start nodemon index js You can now run the server with Nodemon by using the command below npm start Building the user interfaceHere we ll create a simple user interface to demonstrate the interactive screen sharing feature Navigate into client src and create a components folder containing Home js and a sub component named Modal js cd client srcmkdir componentstouch Home js Modal jsUpdate the App js file to render the newly created Home component import React from react import BrowserRouter Route Routes from react router dom import Home from components Home const App gt return lt BrowserRouter gt lt Routes gt lt Route path element lt Home gt gt lt Routes gt lt BrowserRouter gt export default App Navigate into the src index css file and copy the code below It contains all the CSS required for styling this project import url Grotesk wght amp display swap body margin padding font family apple system BlinkMacSystemFont Segoe UI Roboto Oxygen Ubuntu Cantarell Fira Sans Droid Sans Helvetica Neue sans serif webkit font smoothing antialiased moz osx font smoothing grayscale font family Space Grotesk sans serif box sizing border box home container display flex min height vh width flex direction column align items center justify content center home container h margin bottom px createChannelBtn padding px width px cursor pointer font size px background color bc color fff border none outline none margin right px margin top px createChannelBtn hover background color fff border px solid bc color bc form width display flex align items center justify content center flex direction column margin bottom px form input width padding px px margin px popup width height px background black border radius px padding px overflow auto popup ref background white width height position relative popup ref img top position sticky width media screen and max width px login form width Copy the code below into the Home js It renders a form input for the URL a submit button and the Modal component import React useCallback useState from react import Modal from Modal const Home gt const url setURL useState const show setShow useState false const handleCreateChannel useCallback gt setShow true return lt div gt lt div className home container gt lt h gt URL lt h gt lt form className form gt lt label gt Provide a URL lt label gt lt input type url name url id url className form input required value url onChange e gt setURL e target value gt lt form gt show amp amp lt Modal url url gt lt button className createChannelBtn onClick handleCreateChannel gt BROWSE lt button gt lt div gt lt div gt export default Home Add an image representing the screencast to the Modal js file and import the Socket io library import useState from react import socketIO from socket io client const socket socketIO connect http localhost const Modal url gt const image setImage useState return lt div className popup gt lt div className popup ref gt image amp amp lt img src image alt gt lt div gt lt div gt export default Modal Start the React js server npm startCheck the terminal where the server is running the ID of the React js client should appear on the terminal Congratulations We can now start communicating with the Socket io server from the app UI Taking screenshots with Puppeteer and Chrome DevTools ProtocolIn this section you ll learn how to take automatic screenshots of web pages using Puppeteer and the Chrome DevTools Protocol Unlike the regular screenshot function provided by Puppeteer Chrome s API creates very fast screenshots that won t slow down Puppeteer and your runtime because it is asynchronous Navigate into the server folder and install Puppeteer cd servernpm install puppeteerUpdate the Modal js file to send the URL for the web page provided by the user to the Node js server import useState useEffect from react import socketIO from socket io client const socket socketIO connect http localhost const Modal url gt const image setImage useState useEffect gt socket emit browse url url return lt div className popup gt lt div className popup ref gt image amp amp lt img src image alt gt lt div gt lt div gt export default Modal Create a listener for the browse event on the backend server socketIO on connection socket gt console log socket id user just connected socket on browse async url gt console log Here is the URL gt gt gt gt url socket on disconnect gt socket disconnect console log A user disconnected Since we ve been able to collect the URL from the React app let s create screenshots using Puppeteer and Chrome DevTools Protocol Create a screen shooter js file and copy the code below const join require path const fs require fs promises const emptyFunction async gt const defaultAfterWritingNewFile async filename gt console log filename was written class PuppeteerMassScreenshots page represents the web page socket Socket io options Chrome DevTools configurations async init page socket options const runOptions Their values must be asynchronous codes beforeWritingImageFile emptyFunction afterWritingImageFile defaultAfterWritingNewFile beforeAck emptyFunction afterAck emptyFunction options this socket socket this page page CDPSession instance is used to talk raw Chrome Devtools Protocol this client await this page target createCDPSession this canScreenshot true The frameObject parameter contains the compressed image data requested by the Page startScreencast this client on Page screencastFrame async frameObject gt if this canScreenshot await runOptions beforeWritingImageFile const filename await this writeImageFilename frameObject data await runOptions afterWritingImageFile filename try await runOptions beforeAck acknowledges that a screencast frame image has been received by the frontend The sessionId represents the frame number await this client send Page screencastFrameAck sessionId frameObject sessionId await runOptions afterAck catch e this canScreenshot false async writeImageFilename data const fullHeight await this page evaluate gt return Math max document body scrollHeight document documentElement scrollHeight document body offsetHeight document documentElement offsetHeight document body clientHeight document documentElement clientHeight Sends an event containing the image and its full height return this socket emit image img data fullHeight The startOptions specify the properties of the screencast format the file type Allowed fomats jpeg or png quality sets the image quality default is everyNthFrame specifies the number of frames to ignore before taking the next screenshots The more frames we ignore the less screenshots we will have async start options const startOptions format jpeg quality everyNthFrame options try await this client send Page startScreencast startOptions catch err Learn more here async stop try await this client send Page stopScreencast catch err module exports PuppeteerMassScreenshots From the code snippet above The runOptions object contains four values beforeWritingImageFile and afterWritingImageFile must contain asynchronous functions that run before and after sending the images to the client beforeAck and afterAck represent the acknowledgment sent to the browser as asynchronous code showing that images were received The writeImageFilename function calculates the full height of the screencast and sends it together with the screencast image to the React app Create an instance of the PuppeteerMassScreenshots and update the server index js file to take the screenshots Add the following importsconst puppeteer require puppeteer const PuppeteerMassScreenshots require screen shooter socketIO on connection socket gt console log socket id user just connected socket on browse async url gt const browser await puppeteer launch headless true creates an incognito browser context const context await browser createIncognitoBrowserContext creates a new page in a pristine context const page await context newPage await page setViewport width height Fetches the web page await page goto url Instance of PuppeteerMassScreenshots takes the screenshots const screenshots new PuppeteerMassScreenshots await screenshots init page socket await screenshots start socket on disconnect gt socket disconnect console log A user disconnected Update the Modal js file to listen for the screencast images from the server import useState useEffect from react import socketIO from socket io client const socket socketIO connect http localhost const Modal url gt const image setImage useState const fullHeight setFullHeight useState useEffect gt socket emit browse url Listens for the images and full height from the PuppeteerMassScreenshots The image is also converted to a readable file socket on image img fullHeight gt setImage data image jpeg base img setFullHeight fullHeight url return lt div className popup gt lt div className popup ref style height fullHeight gt image amp amp lt img src image alt gt lt div gt lt div gt export default Modal Congratulations We ve been able to display the screenshots in the React app In the following section I ll guide you on making the screencast images interactive Making the screenshots interactiveHere you ll learn how to make the screencasts fully interactive such that it behaves like a browser window and responds to the mouse scroll and move events Reacting to the cursor s click and move events Copy the code below into the Modal component const mouseMove useCallback event gt const position event currentTarget getBoundingClientRect const widthChange position width const heightChange position height socket emit mouseMove x widthChange event pageX position left y heightChange event pageY position top document documentElement scrollTop const mouseClick useCallback event gt const position event currentTarget getBoundingClientRect const widthChange position width const heightChange position height socket emit mouseClick x widthChange event pageX position left y heightChange event pageY position top document documentElement scrollTop From the code snippet above event currentTarget getBoundingClient returns an object containing information about the size and position of the screencasts relative to the viewport event pageX returns the position of the mouse pointer relative to the left edge of the document Then calculate the cursor s position and send it to the backend via the mouseClick and mouseMove events Create a listener to both events on the backend socket on browse async url gt const browser await puppeteer launch headless true const context await browser createIncognitoBrowserContext const page await context newPage await page setViewport width height await page goto url const screenshots new PuppeteerMassScreenshots await screenshots init page socket await screenshots start socket on mouseMove async x y gt try sets the cursor the position with Puppeteer await page mouse move x y This function runs within the page s context calculates the element position from the view point and returns the CSS style for the element const cur await page evaluate p gt const elementFromPoint document elementFromPoint p x p y return window getComputedStyle elementFromPoint null getPropertyValue cursor x y sends the CSS styling to the frontend socket emit cursor cur catch err Listens for the exact position the user clicked and set the move to that position socket on mouseClick async x y gt try await page mouse click x y catch err Listen to the cursor event and add the CSS styles to the screenshot container import useCallback useEffect useRef useState from react import socketIO from socket io client const socket socketIO connect http localhost const Modal url gt const ref useRef null const image setImage useState const cursor setCursor useState const fullHeight setFullHeight useState useEffect gt other functions Listens to the cursor event socket on cursor cur gt setCursor cur url other event emitters return lt div className popup gt lt div ref ref className popup ref style cursor height fullHeight cursor is added gt image amp amp lt img src image onMouseMove mouseMove onClick mouseClick alt gt lt div gt lt div gt export default Modal Responding to scroll eventsHere I ll guide you through making the screencast scrollable to view all the web page s content Create an onScroll function that measures the distance from the top of the viewport to the screencast container and sends it to the backend const Modal url gt other functions const mouseScroll useCallback event gt const position event currentTarget scrollTop socket emit scroll position return lt div className popup onScroll mouseScroll gt lt div ref ref className popup ref style cursor height fullHeight gt image amp amp lt img src image onMouseMove mouseMove onClick mouseClick alt gt lt div gt lt div gt Create a listener for the event to scroll the page according to the document s coordinates socket on browse async url gt other functions socket on scroll position gt scrolls the page page evaluate top gt window scrollTo top position Congratulations We can now scroll through the screencast and interact with the web page s content ConclusionSo far you ve learned how to set up a real time connection with React js and Socket io take screenshots of webpages with Puppeteer and Chrome DevTools Protocol and make them interactive This article is a demo of what you can build with Puppeteer You can also generate PDFs of pages automate form submission UI testing test chrome extensions and many more Feel free to explore the documentation The source code for this tutorial is available here   P S I would be super happy if you could give us a star It will help me to make more articles every week Thank you for reading 2022-09-12 15:05:19
Apple AppleInsider - Frontpage News Apple Watch Ultra & Series 8 savings: save $200 on 2 or up to 20% off AppleCare https://appleinsider.com/articles/22/09/12/apple-watch-ultra-series-8-savings-save-200-on-2-or-up-to-20-off-applecare?utm_medium=rss Apple Watch Ultra amp Series savings save on or up to off AppleCareAs the Apple Watch Series and Apple Watch Ultra make their way to store shelves now is the time to pick up the latest smartwatches at a discount with preorder savings in effect on sporty and elegant styles Save up to on two Apple Watch Series or Ultra models Buy Apple Watches save Read more 2022-09-12 15:10:57
Apple AppleInsider - Frontpage News Google also has iOS 16 Lock Screen widgets - here's what they look like https://appleinsider.com/articles/22/09/12/google-also-has-ios-16-lock-screen-widgets---heres-what-they-look-like?utm_medium=rss Google also has iOS Lock Screen widgets here x s what they look likeAs Apple rolls out iOS Google has revealed widgets for Search Maps and more ーalthough some of them won t arrive for weeks In the coming weeks Google will release a series of widgets to be added to the new Lock Screen in iOS While it s given no more precise detail of when they will be available it has given a sneak peek at half a dozen of them Your Lock Screen is the first thing you see when you pick up your phone and Lock Screen widgets for lots of Google apps are on the way says the company in a blog post You ll be able to unlock your device to access your favorite Google features in just one tap ーand even see some updates right on your Lock Screen Read more 2022-09-12 15:22:56
Apple AppleInsider - Frontpage News iOS 16 Review - Refinement, with more personalization options https://appleinsider.com/articles/22/09/12/ios-16-review---refinement-with-more-personalization-options?utm_medium=rss iOS Review Refinement with more personalization optionsLess an overhaul and more refining what s already in place iOS is all about personalization on top of a retained solid foundation Apple s annual update of iOS has arrived and as part of it a large number of improvements to reinvigorate the iPhone s operating system Some years this can take the form of sweeping changes that overhauls the entire experience In other years there s not a massive groundbreaking feature to center on but many other quality of life improvements Read more 2022-09-12 15:22:11
海外TECH Engadget The 2021 Apple TV HD has hit an all-time low of $99 https://www.engadget.com/2021-apple-tv-hd-all-time-low-amazon-good-deal-152535149.html?src=rss The Apple TV HD has hit an all time low of If you ve been on the lookout for a new Apple TV but don t want to break the bank it s worth considering a solid deal on the most recent HD model The Apple TV HD has hit an all time low of on Amazon That s off the regular price Buy Apple TV HD on Amazon While this isn t the cheapest streaming media player around it does grant access to the Apple ecosystem on your TV You ll be able to play Apple Arcade games share content from iPhone to your TV via AirPlay listen to Apple Music and use Apple Fitness Apple TV HD supports HomeKit as well so you can get a live feed of compatible cameras and control certain smart home devices Of course you ll be able to stream TV and movies using the device Along with Apple TV you can access Netflix Disney Amazon Prime Video HBO Max and other services Apple TV HD comes with a new Siri remote with a touch enabled clickpad the option to connect AirPods to listen privately and Dolby Digital Plus surround sound support One thing Apple TV HD doesn t do unfortunately is stream video in K the name might have given that away For K streaming take a look at the Apple TV K which isn t too much more expensive at the minute The GB model is and the GB version is for savings of on both models We gave the most recent Apple TV K a score of in our review Given the fairly steep discounts it s worth wondering if Apple is trying to clear out some stock just ahead of new Apple TV models hitting the market Buy Apple TV K GB at Amazon Buy Apple TV K GB at Amazon 2022-09-12 15:25:35
海外科学 NYT > Science How a Garbage-Bin War Schools Humans and Birds https://www.nytimes.com/2022/09/12/science/cockatoos-humans-garbage-bins.html How a Garbage Bin War Schools Humans and BirdsSulfur crested cockatoos are trash can bandits in the suburbs of Sydney Australia Humans use tools to protect their bins and the birds then go the extra mile to break in 2022-09-12 15:52:01
海外科学 NYT > Science Biden Picks Biotech Executive to Lead New Biomedical Research Agency https://www.nytimes.com/2022/09/12/us/politics/biden-cancer-arpa-h.html Biden Picks Biotech Executive to Lead New Biomedical Research AgencyPresident Biden has selected Dr Renee Wegrzyn to lead the Advanced Research Projects Agency for Health which is aimed at driving biomedical innovation 2022-09-12 15:48:33
海外科学 BBC News - Science & Environment Bezos rocket malfunctions on trip to space https://www.bbc.co.uk/news/science-environment-62882272?at_medium=RSS&at_campaign=KARANGA flight 2022-09-12 15:18:37
金融 金融庁ホームページ BIS決済・市場インフラ委員会および証券監督者国際機構による報告書「顧客清算:アクセスおよびポータビリティ」の公表について掲載しました。 https://www.fsa.go.jp/inter/ios/20220912.html 証券監督者国際機構 2022-09-12 17:00:00
金融 金融庁ホームページ 審判期日の予定を更新しました。 https://www.fsa.go.jp/policy/kachoukin/06.html 期日 2022-09-12 16:00:00
金融 金融庁ホームページ 長期国債先物に係る相場操縦に対する課徴金納付命令の決定について公表しました。 https://www.fsa.go.jp/news/r4/shouken/20220909-3.html 相場操縦 2022-09-12 16:00:00
ニュース BBC News - Home Thousands line Edinburgh's streets to see Queen's coffin https://www.bbc.co.uk/news/uk-scotland-62869534?at_medium=RSS&at_campaign=KARANGA royal 2022-09-12 15:33:47
ニュース BBC News - Home King Charles III promises to follow Queen's selfless duty https://www.bbc.co.uk/news/uk-62874346?at_medium=RSS&at_campaign=KARANGA edinburgh 2022-09-12 15:32:37
ニュース BBC News - Home Aldi and John Lewis among shops closing for Queen's funeral https://www.bbc.co.uk/news/business-62879563?at_medium=RSS&at_campaign=KARANGA september 2022-09-12 15:48:16
ニュース BBC News - Home GPs allowed to close on day of Queen's funeral https://www.bbc.co.uk/news/health-62882252?at_medium=RSS&at_campaign=KARANGA covid 2022-09-12 15:24:34
ニュース BBC News - Home What's a state funeral? Will shops close? https://www.bbc.co.uk/news/uk-62844663?at_medium=RSS&at_campaign=KARANGA daily 2022-09-12 15:22:20
ニュース BBC News - Home 'I had to come and pay my last respects' https://www.bbc.co.uk/news/uk-scotland-62877398?at_medium=RSS&at_campaign=KARANGA coffin 2022-09-12 15:17:37
ニュース BBC News - Home How the Queen navigated the Corrie cobbles with a smile https://www.bbc.co.uk/news/uk-england-manchester-62877298?at_medium=RSS&at_campaign=KARANGA antony 2022-09-12 15:38:06
ビジネス ダイヤモンド・オンライン - 新着記事 中国のゼロコロナ対策、テーマパークを直撃 USBは開園以来人員25%減 - WSJ発 https://diamond.jp/articles/-/309659 開園 2022-09-13 00:14:00
北海道 北海道新聞 NHK「国際報道」で謝罪 出入国在留管理庁の特集 https://www.hokkaido-np.co.jp/article/730041/ 出入国在留管理庁 2022-09-13 00:03:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)