投稿時間:2022-04-08 02:34:39 RSSフィード2022-04-08 02:00 分まとめ(42件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
AWS AWS Join AWS Data Exchange Data with Amazon Redshift Spectrum Data | Amazon Web Services https://www.youtube.com/watch?v=tB_hvJE0qcE Join AWS Data Exchange Data with Amazon Redshift Spectrum Data Amazon Web ServicesIn this video you ll learn how to join data from AWS Data Exchange with your data in Amazon Redshift Using the method shown you can export third party data from AWS Data Exchange directly to Amazon Simple Storage Service or Amazon S create an external schema for this data and run queries on this data from your Redshift cluster For more information on this topic please visit the resource below 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 AWSDataexchange RedShiftSpectrum AWS AmazonWebServices CloudComputing 2022-04-07 16:28:50
AWS AWS Pliny on AWS: Customer Story | Amazon Web Services https://www.youtube.com/watch?v=3TmHXE0rYU0 Pliny on AWS Customer Story Amazon Web ServicesIn this episode of AWS Community Chats Aley Hammer is joined with James Manner the Co Founder of Pliny James begins by telling us about Pliny and the problem they are solving for their customers why they selected AWS as their cloud provider and gives insights into how their technology benefits their customers Learn more at 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 Pliny OcularCardiologyPlatform CloudBasedOcularService AWS AmazonWebServices CloudComputing 2022-04-07 16:22:07
AWS AWSタグが付けられた新着投稿 - Qiita CloudTrailのConsoleLoginイベントが見えないので調べた https://qiita.com/emiki/items/45d0ada76e6ca46b5994 awscloudtrail 2022-04-08 01:52:15
Azure Azureタグが付けられた新着投稿 - Qiita AZ-500用備忘録 https://qiita.com/daijiman/items/459ad7e1fe0c1d2a6f1c microsoftdefenderfor 2022-04-08 01:38:53
Git Gitタグが付けられた新着投稿 - Qiita 業務時のGitなどの操作 https://qiita.com/iguchan_4649/items/195b0fcdde62e4256c55 自分のために 2022-04-08 01:06:18
Ruby Railsタグが付けられた新着投稿 - Qiita vscode rails環境構築時のエラー rails s https://qiita.com/masatom86650860/items/92522d33cf25b46e8840 pumagtrailsapplicationst 2022-04-08 01:10:00
Ruby Railsタグが付けられた新着投稿 - Qiita 業務時のGitなどの操作 https://qiita.com/iguchan_4649/items/195b0fcdde62e4256c55 自分のために 2022-04-08 01:06:18
海外TECH Ars Technica Buying a new car? This database might help save thousands in dealer markups https://arstechnica.com/?p=1846526 deals 2022-04-07 16:25:10
海外TECH Ars Technica Project “Zuck Bucks”: Meta plans virtual coin after cryptocurrency flop https://arstechnica.com/?p=1846539 plummets 2022-04-07 16:23:26
海外TECH MakeUseOf How to Use Google Drive for Desktop https://www.makeuseof.com/google-drive-for-desktop/ cloud 2022-04-07 16:45:13
海外TECH MakeUseOf The 5 Best VPN Add-Ons for Opera https://www.makeuseof.com/best-opera-vpn-add-ons/ browser 2022-04-07 16:30:14
海外TECH MakeUseOf How to Add Handy Widgets to the Game Bar in Windows 11/10 https://www.makeuseof.com/windows-game-bar-add-widgets/ handy 2022-04-07 16:15:13
海外TECH MakeUseOf A New Tomb Raider Game Is Coming: Everything We Know So Far https://www.makeuseof.com/new-tomb-raider-game-coming-everything-we-know-so-far/ explore 2022-04-07 16:13:29
海外TECH MakeUseOf Osheep "All-Terrain" 500W Modular eScooter Review: Promising City Scooter With Serious Problems https://www.makeuseof.com/osheep-all-terrain-500w-modular-escooter-review/ Osheep amp quot All Terrain amp quot W Modular eScooter Review Promising City Scooter With Serious ProblemsAs long as you re only riding on flat city roads it s lovely Just don t veer off the beaten track But did this really need to be crowdfunded 2022-04-07 16:05:15
海外TECH DEV Community Event loop https://dev.to/yo08315171/event-loop-439g Event loopThis is my first dev blogpost and doesn t matter if it is just couple of sentences Couple of sentences are still better than not writing at all This week I m writing brief about Event Loop Event LoopJavascript engine runs chunks of JS code on a single thread process Usually it co exists with hosting environment like Browser or Node JS Typical job of the JS engine is to just run the chunks on demand basis Overall orchestration of when to run a chunk of code is handled by the hosting environment Event Loop Event Loop as the name says it is loop which iterates over the events Each iteration of the loop is called as Tick in which it tries to execute the events scheduled in the callback queue These events are nothing but the callbacks functions Imagine you are fetching a resource over REST API and it is an asynchronous event and when it is complete in due time you would like your function invoked with response of API This function is nothing but the Callback which gets executed by the event loop when the API is successful There are other different queues other than callback queues in the Event loop like Job Queues and there is special way timers setTimeout are handled in Event loop 2022-04-07 16:17:35
海外TECH DEV Community Details of 4 best opensource projects about big data you should try out(Ⅰ) https://dev.to/qazmkop/details-of-4-best-opensource-projects-about-big-data-you-should-try-outi-30k9 Details of best opensource projects about big data you should try out Ⅰ Two weeks ago I published best opensource projects about big data you should try out in which I mentioned that I would go through each of the open source products in detail and compare them next Starting today I ll look at each of the four open source products mentioned in this article Since I ve been using LakeSoul lately I ll introduce it first Next week I ll introduce Iceberg IntroductionLakeSoul is a streaming batch integrated table storage framework built on The Apache Spark engine It has highly extensible metadata management ACID transactions efficient and flexible UPSERT operations Schema evolution and batch integration processing LakeSoul specifically optimizes the row and column level incremental updates high concurrent entries and batch scan reads for data on top of the Data Lake cloud storage The storage separation architecture of cloud native computing makes deployment very simple while supporting huge data volumes at a very low cost LakeSoul supports high performance write throughput in hashed partition primary key UPsert scenarios through lSM tree which can reach MB s core on object storage systems such as S The highly optimized Merge on Reading implementation also ensures Read performance LakeSoul manages metadata through Cassandra to achieve high scalability of metadata LakeSoul s main features are as follows Elastic framework The computing and storage are completely separated Without fixing nodes and disks computing and storage have their own elastic capacity Many optimizations for the cloud storage have been done like concurrency consistency in the object storage incremental update etc With LakeSoul there is no need to maintain fixed storage nodes and the cost of object storage on the cloud is only of the local disk which significantly reduces storage and operation costs Efficient and scalable metadata management LakeSoul uses Cassandra to manage metadata which can efficiently handle modification on metadata and support multiple concurrent writes It solves the problem of slow metadata parsing after long running in data Lake systems such as Delta Lake which use files to maintain metadata and can only be written at a single point ACID transactions Undo and Redo mechanism ensures that the committing are transactional and users will never see inconsistent data Multi level partitioning and efficient upsert LakeSoul supports range and hash partitioning and a flexible upsert operation at row and column levels The upsert data are stored as delta files which significantly improves the efficiency and concurrency of writing data and the optimized merge scan provides efficient MergeOnRead performance Streaming and batch unification Streaming Sink is supported in LakeSoul which can handle streaming data ingesting historical data filling in batch interactive queries and other scenarios simultaneously Schema evolution Users can add new fields at any time and quickly populate the new fields with historical data LakeSoul mainly applies to the following scenarios Incremental data need to be written efficiently in large batches in real time and concurrent updates at the row or column level Detailed query and update on an extensive time range with huge amount of historical data while hoping to maintain a low cost The query is not fixed and the resource consumption changes significantly which is expected that the computing resources can be flexible and scalable independently High concurrent writes are required and metadata is too large for Delta Lake to meet performance requirements For data updates to primary keys Hudi s MergeOnRead does not meet update performance requirements Operating environmentHardware Recommended CPU at least robust quad core GHz or other CPUs of the same levelMemory more than GBHard disk S AS Hard disk GB or largersoftwareOperating system LinuxBig data system Spark X Main functions of LakesoulLakesoul implements the Spark streaming batch integration framework The main functions include batch write streaming write create and delete tables delete data partitions automatic file merge insert or update tables change data capture CDC and hash operations on primary keys BatchLog in to the system specify the data storage path and use Spark Write to save data to the specified path In Write you need to specify the storage format as Lakesoul and specify the primary key partition key and the number of partition buckets Stream writeUsing Spark WriteStream to write data in the Lakesoul format you can also set the Trigger interval range partition key hashBucketNum and checkpoints path Read dataTo read data you need to specify a data read path There are two data read modes One is spark You need to select the read format as Lakesoul and use load to load data in a customized path The other is Lakesoul ForPath directly loads the specified path data Insert or update operation Upsert Upsert Update or insert Updates data when it exists and inserts data when it does not exist Using LakeSoulTable Upsert to perform the function requires passing in the data source UpdateTo update the data table contents in LakesOUL import the LakesoulTable package directly and pass in the data source to be updated using the Update function drop tableDelete the data table in LakesOUL and import the LakesoulTable package to use the drop table functionDelete table dataTo delete the data of the specified table in LakesOUL use the delete function in LakesoulTable pass in the selected delete condition to delete the data under the specified condition or delete all data without specifying itDelete the partitionTo drop a specified partition in the LakesOUL table use the drop partition function in LakesoulTable and pass in the specified partition key File mergeIn the running process of the system there will be a large number of incremental files especially when the writing is lost Lakesoul provides file merge capabilities which can be specified for partition merge all merge or automatic mergeSparkSqlTo query data in the LakesOUL table using Spark SQL set schema to LakesOUL For example select from Lakesoul Table Hash primary key operationIf data is partitioned and sorted based on hash keys Lakesoul optimizes Join Intersect and Except operations to reduce data shuffle and sort time and improve operational efficiency When used hash key and hashBucketNum are specified Automatic merging of metadataLakesoul supports metadata merge automatically and you need to set up the spark Dmetasoul Lakesoul Schema The auto merge Enabled true so the user specifies the metadata content when writing the data manual the CDCThe operations add delete modify of relational databases such as Mysql and Oracle can be accessed into Lakesoul through data Change capture CDC and stored in real time Mysql gt Debezium gt Kafka gt SparkStreaming gt Lakesoul After building a complete framework the system can add delete and modify data in real time and get the latest data when querying The upSERt function is required The above is the detailed information about LakeSoul and there is more information on its Github homepage for reference In the following story I will introduce the detailed information about Iceberg and make a comparison between them which is beneficial for me to learn about data lake better If it is helpful to you please read it or share it I also hope you can give me guidance and suggestions for my study Thank you 2022-04-07 16:10:26
海外TECH DEV Community Simulating a 7-segment display (pt1) - A little computer science for the inquisitive developer https://dev.to/tracygjg/simulating-a-7-segment-display-pt1-a-little-computer-science-for-the-inquisitive-developer-21gk Simulating a segment display pt A little computer science for the inquisitive developer The Project Part OneWe are going to simulate a segment display and Binary Coded Decimal BCD encoder in vanilla HTML CSS and JS The step by step process will commence by preparing the HTML page to exercise the simulation Next we will create and locate the segments using CSS and finally we will use JS to map a selected digit to the display segments but this will itself be done in several stages The last stage being the most academic of the three will be covered by part two of this post DataDuring the project we will need to reference the following Truth table several times The first section left refers to the digit that user can select from a dropdown select for presentation as a segment display SD The middle section documents the binary encoded value of the decimal using first bits binary digits that will be used as input lines wires into the BCD Binary Coded Decimal modules The right side of the table documents the seven output lines from the BCD module that align to each of the segments of the SD Truth Table Input lines Output lines Dec A B C D a b c d e f g Steps Overview Step One Direct representation of the digit as input to the SDWe will initially ignore the BCD encoder and map the selected digit directly to energise the wires required in order to get the segment display to represent the digit appropriately Decimal digit V Decimal string a b c d e f g Binary digits bits string Seven segment display Going by truth table above this stage will map the selected Decimal digit directly to the Output lines to light up the appropriate segments of the display The HTML Select element value will be mapped to a bit binary pattern as a string Step Two Simulated BCD mapping Input lines to Output lines We will convert the selected digit in decimal to a bit binary value string representing of the Input lines This will be passing in to the simulated BCD that will convert the binary value to Output lines used to energise the segment display Decimal digit V Decimal string A B C D Binary digits string Binary Coded Decimal Mapping object a b c d e f g Binary digits string Seven segment display Again with reference to the Truth table above this stage has the select element issuing a decimal value for encoding by a simulated BCD component The output from the BCD will be the bit binary value required by the segment display Step Three Simulated BCD with logic circuitsFinally we will replace the mapping of the Input lines to Output lines in the BCD module Instead we will use logical expressions required to simulate the operation of the BCD module Decimal digit V Decimal string A B C D Binary digits string Binary Coded Decimal Boolean Logic a b c d e f g Binary digits string Seven segment display In this final stage the select element will issue a bit binary string representing the user selected decimal value The bit value will be translated into bits via the BCD using Boolean logic before it is sent to the SD Let s get startedA physical segment display has LED Light Emitting Diodes or LCD Liquid Crystal Display areas arranged so each represents a single segment of a digit Each segment has a wire that is energised to switch the segment on or off and is often labelled a g illustrated in the diagram at the top of this post The source code for this post can be found in this JSFiddle Structuring the screen with HTMLTo begin with we need the HTML to present the decimal selection section and the segments of the segment display section lt main gt lt section gt lt label for decimal gt Decimal lt label gt lt select id decimal gt lt option gt lt option gt lt option gt lt option gt lt option gt lt option gt lt option gt lt option gt lt option gt lt option gt lt option gt lt option gt lt option gt lt option gt lt option gt lt option gt lt option gt lt option gt lt option gt lt option gt lt select gt lt section gt lt section class seven segment gt lt div class segment id seg a gt lt div gt lt div class segment id seg b gt lt div gt lt div class segment id seg c gt lt div gt lt div class segment id seg d gt lt div gt lt div class segment id seg e gt lt div gt lt div class segment id seg f gt lt div gt lt div class segment id seg g gt lt div gt lt section gt lt main gt Styling the content with CSSThe segment display will need quite a bit of styling so we will apply the styling gradually We will style the section element as the container for the seven segments with a grey background width of px and height px We also need to set the positioning to relative so we can position the div segments absolutely Segments will have a basic styling and a specific styling The default off colour will be a light grey AAA orientated vertically px wide by px long and positioned absolutely Segment specific styling will apply the orientation position and hexagonal shape using pseudo elements To keep things simple we will delay shaping the segments so the initial CSS looks like this section width float left seven segment background color width px height px position relative segment border px solid width height px position absolute box sizing border box segLit border color yellow The segments will be energised by applying a segLit class that changes the border color property to yellow The segment specific styling uses pseudo elements for the pointy ends of each segment to for the narrow hexagonal shape This is achieved using an element with no width or height but a solid transparent border of px wide The pointy ends are positioned just outside of the segment as assumes the same colour through the inherit value segment before segment after width height border style solid border width px border color transparent position absolute content Quite rightly it is not considered good practice to use Id s in CSS given the specificity and access limitations it produces However in this learning project we will to uniquely reference each segment of the display First we append the appropriate pointy ends to each segment seg c before seg f before seg g before border left width border right color inherit top px left px seg c after seg f after seg g after border right width border left color inherit top px right px seg a before seg b before seg d before seg e before border top width border bottom color inherit top px left px seg a after seg b after seg d after seg e after border bottom width border top color inherit bottom px left px Finally we resize and position the segments absolutely within the seven segment element Segments c f and g are horizontal short and wide so need to be resized as follows and will be slightly wider purely for personal preference seg c seg f seg g width px height Segments a and b are aligned to the right segments c f and g are inset from the left as are d and e but not by as much seg a seg b right px seg c seg f seg g left px seg d seg e left px Segment g is vertically centred whilst segment c is clamped to the bottom and f to the top seg g top px seg c bottom px seg f top px Lastly segments a and e are inset from the top whilst b and d are inset from the bottom seg a seg e top px seg b seg d bottom px That is the styling done Next we start wiring up using JavaScript Enabling the simulation with JavaScriptAs stated at the beginning of this post we will be simulating the SD and BCD in three stages Simulate the segment displaySimulate the output of the Binary Converted Decimal module by mapping the inputSimulate the internal wiring of the logic gates within the BCD moduleBut before we do that stage we need to establish some infrastructure such as Define arrays containing the bit input lines and bit output lines as binary strings const inputLines const outputLines Enable connections between the HTML Document Object Model DOM and the JavaScript engine function getSevenSegmentDisplayWires return document getElementsByClassName segment reduce interface domSeg gt interface domSeg id replace seg isLit gt domSeg classList isLit add remove segLit function attachDecimalChangeEvent changeEventHandler wires document getElementById decimal addEventListener change evt gt changeEventHandler wires evt target value Now we can simulate the wires connecting each of the seven segments of the display const sevenSegmentDisplayWires getSevenSegmentDisplayWires Stage One Simulate the segment displayWe have the mechanism to illuminate the individual segments of the display according to the state of each wire now we need a mechanism to the take a specific Output lines argument and display and entire digit function simulatedBCD Presentation outputWires sevenSegmentDisplayWires a outputWires sevenSegmentDisplayWires b outputWires sevenSegmentDisplayWires c outputWires sevenSegmentDisplayWires d outputWires sevenSegmentDisplayWires e outputWires sevenSegmentDisplayWires f outputWires sevenSegmentDisplayWires g outputWires The simulatedBCD Presentation function can be used in conjunction with the outputLines array to link the decimal output from the select element to the display const decimalSelection attachDecimalChangeEvent simulatedBCD Presentation outputLines This decimalSelection function connects the simulatedBCD Presentation function to change event of the dropdown component so the outputLines can be selected and sent to the simulated SD via the simulatedBCD Presentation function Stage Two Simulate the BCD by mapping input to output linesIn the next two states we still use the simulatedBCD Presentation function but we wrap it in another function so the that takes the inputLines data passes it through a simulated BCD and the output is sent to the SD const decimalSelection attachDecimalChangeEvent simulatedMappedBCD inputLines function simulatedMappedBCD inputWires const outputWires outputLines inputLines indexOf inputWires simulatedBCD Presentation outputWires The above simulatedMappedBCD function as the name suggests just does a mapping operation between the inputLines to outputLines Stage Three Simulate the BCD to include the Boolean logicThe third stage of simulating the BCD will be covered by the next post in this two part series 2022-04-07 16:07:45
海外TECH DEV Community Using the FileReader API to preview images in React https://dev.to/logrocket/using-the-filereader-api-to-preview-images-in-react-3emi Using the FileReader API to preview images in ReactWritten by Joseph Mawa️ IntroductionImages make up a significant proportion of data transmitted on the internet More often than not clients have to upload image files from their devices to the server To ensure users upload image files of the correct type quality and size most web applications have features for previewing images In the browser environment clients can initiate image upload by browsing files using an input element or the drag and drop API You can then use the URL API or the FileReader API to read the image files and preview them Though previewing images with the URL API is straightforward using the FileReader API can be daunting Therefore in this article you will learn how to preview images in a React application with the FileReader API We shall cover both single and batch image previews Contents How to browse image files in React Introduction to the FileReader API How to preview single image before upload in React with the FileReader API How to preview multiple images before upload in React with the FileReader API Conclusion How to browse image files in ReactIf you want to add file upload functionality to your web application an input element of type file comes in handy It enables users to select single or multiple files from storage in their computer or mobile device lt input type file accept image multiple gt The above input element will look like a button when rendered by the browser Clicking it will open the operating system s built in file chooser dialog The user can then select the image files for upload The input element has the accept attribute for restricting the file type Its value is a string consisting of file type specifiers separated by commas The value of the accept attribute is image in the input element above It enables us to browse and upload images of any format To upload image files of a specific format you can restrict the value of the accept attribute For example setting its value to image png or png only accepts PNG images With the multiple boolean attribute set to true a user can select multiple image files On the other hand a user can browse only one image file if its value is false It is worth noting that a boolean attribute s value is true if the attribute is present on an element and false if omitted The browser emits the change event after a user completes the file selection Therefore you should listen for the change event on the input element You can do it like so in React lt form gt lt p gt lt label htmlFor file gt Upload images lt label gt lt input type file id file onChange changeHandler accept image multiple gt lt p gt lt form gt In the change event handler you can access the FileList object It is an iterable whose entries are File objects The File objects contain read only metadata such as the file name type and size const changeHandler e gt const files e target for let i i lt files length i const file files i OR const file files item i Introduction to the FileReader APIThe FileReader API provides an interface for asynchronously reading the contents of a file from a web application As highlighted in the previous section you can use an input element of type file to browse files from a user s computer or mobile device Selecting image files this way returns a FileList object whose entries are File objects The FileReader API then uses the File object to asynchronously read the file the user has selected It is worth mentioning that you can not use the FileReader API to read the contents of a file from the user s file system using the file s pathname The FileReader API has several asynchronous instance methods for performing read operations These methods include readAsArrayBuffer readAsBinaryString readAsDataURL readAsTextIn this article we shall use the readAsDataURL method The readAsDataURL method takes the file object as an argument and asynchronously reads the image file into memory as data URL It emits the change event after completing the read operation const fileReader new FileReader fileReader onchange e gt const result e target fileReader readAsDataURL fileObject You can read the documentation for a detailed explanation of the other FileReader instance methods How to preview single image before upload in ReactIn this section we shall look at how to preview a single image before uploading in React with the FileReader API It assumes you have a React project set up already The code below shows how to read and preview a single image in React with the FileReader API We are using an input element of type file to browse image files Because we want to preview a single image I have omitted the multiple boolean attribute on the input element import useEffect useState from react const imageMimeType image png jpg jpeg i function App const file setFile useState null const fileDataURL setFileDataURL useState null const changeHandler e gt const file e target files if file type match imageMimeType alert Image mime type is not valid return setFile file useEffect gt let fileReader isCancel false if file fileReader new FileReader fileReader onload e gt const result e target if result amp amp isCancel setFileDataURL result fileReader readAsDataURL file return gt isCancel true if fileReader amp amp fileReader readyState fileReader abort file return lt gt lt form gt lt p gt lt label htmlFor image gt Browse images lt label gt lt input type file id image accept png jpg jpeg onChange changeHandler gt lt p gt lt p gt lt input type submit label Upload gt lt p gt lt form gt fileDataURL lt p className img preview wrapper gt lt img src fileDataURL alt preview gt lt p gt null lt gt export default App As illustrated in the above example you can listen for the change event on the input element The change event handler is invoked after a client completes the file selection You can access the File object representing the selected file and update state in the event handler Since the HTML markup in the browser is editable it is necessary to check the MIME type of the selected file before starting the read process Though it is unlikely that an ordinary user would edit the HTML elements on a web page it prevents anyone from easily breaking your app After uploading your files you will have to do a similar check on the server side At this point you can also check the size of the selected file to make sure it does not exceed a maximum limit Since reading the selected file is a side effect we use the useEffect hook As highlighted in the previous section you start by creating an instance of FileReader The readAsDataURL method of the FileReader API reads the file asynchronously and emits the load event after completing the reading process It is possible for the component to unmount or rerender before completing the read process You will need to abort before unmounting if the read process is incomplete To prevent memory leaks React disallows state updates after unmounting a component Therefore we need to check whether the component is still mounted before updating state in the load event handler We access the file s data as a base encoded string and update the state after completing the read process After that you can render the image preview For simplicity I have not added any styling to the form element in the above example How to preview multiple images before upload in ReactIn this section we shall look at how to preview multiple images before uploading in React with the FileReader API Like the previous section it assumes you have a React project set up already Reading and previewing multiple images is similar to previewing a single image We shall modify the code in the previous section slightly To browse and select several image files you need to set the value of the multiple boolean attribute to true on the input element One noticeable difference is that we are looping through the FileList object in the useEffect Hook and reading the contents of all the selected files before updating the state We are storing the data URL of each image file in an array and updating state after reading the last file The code below is a modification of the previous example for previewing images in a batch import useEffect useState from react const imageTypeRegex image png jpg jpeg gm function App const imageFiles setImageFiles useState const images setImages useState const changeHandler e gt const files e target const validImageFiles for let i i lt files length i const file files i if file type match imageTypeRegex validImageFiles push file if validImageFiles length setImageFiles validImageFiles return alert Selected images are not of valid type useEffect gt const images fileReaders let isCancel false if imageFiles length imageFiles forEach file gt const fileReader new FileReader fileReaders push fileReader fileReader onload e gt const result e target if result images push result if images length imageFiles length amp amp isCancel setImages images fileReader readAsDataURL file return gt isCancel true fileReaders forEach fileReader gt if fileReader readyState fileReader abort imageFiles return lt div className App gt lt form gt lt p gt lt label htmlFor file gt Upload images lt label gt lt input type file id file onChange changeHandler accept image png image jpg image jpeg multiple gt lt p gt lt form gt images length gt lt div gt images map image idx gt return lt p key idx gt lt img src image alt gt lt p gt lt div gt null lt div gt export default App We keep references to the FileReader instances in an array for canceling any file reading process in the cleanup function when the component re renders or unmounts to avoid memory leaks When using a routing library like React Router a user can navigate away from the current page and the component unmounts before completing the file reading process Therefore it is necessary to do cleanup as highlighted above In the above example we are asynchronously reading the files in a loop and updating state after Because of the asynchronous nature of the file reading process it is impossible to know which file we shall complete reading last Therefore we have to check the number of files read in the load event handler before updating state You can achieve the same with promises The code below shows a modification of the useEffect Hook to use promises instead It is cleaner and easier to think about than using loops like in the previous method useEffect gt const fileReaders let isCancel false if imageFiles length const promises imageFiles map file gt return new Promise resolve reject gt const fileReader new FileReader fileReaders push fileReader fileReader onload e gt const result e target if result resolve result fileReader onabort gt reject new Error File reading aborted fileReader onerror gt reject new Error Failed to read file fileReader readAsDataURL file Promise all promises then images gt if isCancel setImages images catch reason gt console log reason return gt isCancel true fileReaders forEach fileReader gt if fileReader readyState fileReader abort imageFiles ConclusionMost web applications that require image upload from a client s storage device also come with features for previewing images Among other reasons previewing an image ensures your clients upload image files of the appropriate type quality and size You can initiate file upload from a client s device with an input element of type file or using the drag and drop interface After selecting images you can preview them using the URL API or the FileReader API Though using the URL API may be straightforward the FileReader API is not As highlighted in the article you preview images singly or in a batch Hopefully this article gave you insights on image previews in React using the FileReader API Let me know what you think in the comments section below Full visibility into production React appsDebugging React applications can be difficult especially when users experience issues that are hard to reproduce If you re interested in monitoring and tracking Redux state automatically surfacing JavaScript errors and tracking slow network requests and component load time try LogRocket LogRocket is like a DVR for web and mobile apps recording literally everything that happens on your React app Instead of guessing why problems happen you can aggregate and report on what state your application was in when an issue occurred LogRocket also monitors your app s performance reporting with metrics like client CPU load client memory usage and more The LogRocket Redux middleware package adds an extra layer of visibility into your user sessions LogRocket logs all actions and state from your Redux stores Modernize how you debug your React apps ーstart monitoring for free 2022-04-07 16:07:09
海外TECH DEV Community Hello, world! https://dev.to/tinway/hello-world-2mc hello 2022-04-07 16:04:27
海外TECH DEV Community How to Create an Explainer Video for Your App https://dev.to/kennedyrose/how-to-create-an-explainer-video-for-your-app-35ff How to Create an Explainer Video for Your App of people prefer watching a video explaining your product rather than reading copy about it Video explainers can often educate users quicker by showing quick visualizations explaining the product rather than just forcing them to scroll through text explaining what the product does Write a ScriptWrite a few bullet points outlining what you want to go over You will want to briefly explain the problem then explain how your product solves the problem If it helps pretend each bullet point is a slide in a slideshow Then expand your bullets into sentences explaining any additional detail about those sections a user might want Keep your language simple and informal Read through it and make sure it isn t too short or long Keep the length around to seconds Make sure to include a call to action at the end so watchers know exactly what to do if they re ready to sign up Record the Voice OverTo easily record yourself from your computer On Mac Use Quicktime Player to record your voice over On Windows Use Voice Recorder to record your voice over You are probably your best voice actor It s free people like hearing from the founder and having a personal touch to your products is usually a good idea However if you don t want to record the voice over yourself hiring voice actors from Voices com is really easy You pretty much just upload a script hear a few lines read by a bunch of different actors and then hire the best one to read the full script Editing the Video TogetherYou ve got a lot of options here But I d recommend Canva if you don t have video editing experience There s lots of templates available for you to use and you ll only have to drag amp drop in your images and change some text Turn each one of those sections from our bullet points earlier into its own scene with a new animation or video of your product Recording a Video of Your ProductIf applicable your explainer video should also show some of your actual product in action Show people what it looks like to get value out of your product You don t have to show everything start to finish unless it s quick but just show a few key features that will help your audience understand your product better On Mac To record a screen capture press Cmd Shift and then hit the record button On Windows Use the Game Bar to record your screen MusicYou ll probably want music unless you re making a tutorial video In which case just speech is fine You can buy cheap royalty free music at Audio Jungle There is a lot of free music out there but the quality is spotty I wouldn t recommend going free on this one unless you get lucky and find the perfect free track AnimationsWhat would an explainer be without some animations Canva has some animations built in but you can find a lot of other great free animations on the Lottie Files site Just find the one you want and download it as a gif Then you should be able to import that to Canva or whatever other software you re using to edit video What s Next If you want to take your explainer video even further you can try A B testing a few explainer videos with a new script or new visualizations You can also try adapting your video for other platforms like social networks 2022-04-07 16:04:02
海外TECH DEV Community Documentation is highly valued, but often overlooked https://dev.to/luos/documentation-is-highly-valued-but-often-overlooked-55mk Documentation is highly valued but often overlookedIn open source projects documentation is highly valued but often overlooked When you encounter documentation problems help a maintainer and open a change request to improve them Licenses are by far the most important type of documentation for users and contributors Documentation helps build engaged communities When communicating about a project use language that is clear and accessible to people who are not born English or do not read English fluently This survey was initiated by Github in but many issues are still relevant in We are an open source project please feel free to comment if you have any tips for improving documentation Source 2022-04-07 16:01:56
Apple AppleInsider - Frontpage News Apple updates Pages, Keynote, and Numbers for the first time in six months https://appleinsider.com/articles/22/04/07/apple-updates-pages-keynote-and-numbers-for-the-first-time-in-six-months?utm_medium=rss Apple updates Pages Keynote and Numbers for the first time in six monthsApple released a relatively small update to its iWork suite of apps that includes Pages Keynote and Numbers Apple updates iWork apps to version The word processing application Pages now has the ability to publish directly to Apple Books with file sizes up to GB Users also get more options for placing page numbers and setting font size Read more 2022-04-07 16:39:25
Apple AppleInsider - Frontpage News Here's what differentiates MLB on Apple TV+ versus regular broadcasts https://appleinsider.com/articles/22/04/07/heres-what-differentiates-mlb-on-apple-tv-versus-regular-broadcasts?utm_medium=rss Here x s what differentiates MLB on Apple TV versus regular broadcastsBaseball game broadcasts vary across the wide array of stations and networks hosting the games Apple s Friday Night Baseball broadcasts will stand apart both technically and with the talent they select to broadcast the games Here s how Apple says that the broadcasts will be produced by MLB Network s production team in partnership with Apple Each game broadcast utilizes high tech cameras tailored for sports broadcasts including high speed Phantom cameras the high resolution Megalodon comprising a Sony aR camera with Sony FE mm f GM lens mounted on a DJI Ronin S gimbal associated monitor and battery backpack Sound is mixed for Dolby with spatial audio enabled Friday Night Baseball will also include new probability based forecasts of different outcomes of the play plus highlights and live look ins from around the league during the game Also during the game there will be on screen call outs about batters walk up songs from Apple Music trivia quizzes with Siri and rules analysis and live interpretation from former MLB umpire Brian Gorman Read more 2022-04-07 16:30:36
Apple AppleInsider - Frontpage News Mac Studio vs 14-inch MacBook Pro: the $1,999 shootout https://appleinsider.com/inside/14-inch-macbook-pro/vs/mac-studio-vs-14-inch-macbook-pro-the-1999-shootout?utm_medium=rss Mac Studio vs inch MacBook Pro the shootoutIf you have burning a hole in your pocket and want a Mac getting a inch MacBook Pro or a Mac Studio is a great idea Here s how the identically priced workstations compare to each other Mac Studio left inch MacBook Pro right On the ever running computing treadmill you re practically forced to consider upgrading your system every few years You have to judge whether your existing computing platform is enough for what you want to do and if you want to spend money on a new one Read more 2022-04-07 16:24:39
海外TECH Engadget Activision Blizzard gives 1,100 QA testers full-time jobs and higher base pay https://www.engadget.com/activision-blizzard-qa-testers-hiring-pay-increase-165142140.html?src=rss Activision Blizzard gives QA testers full time jobs and higher base payActivision Blizzard is converting all of its temporary and contingent quality assurance contractors in the US to full time employees Many of the workers will receive a pay rise ーthe minimum hourly rate is going up to per hour Developing 2022-04-07 16:51:42
海外TECH Engadget Epic Games and Lego team up to build a kid-friendly metaverse https://www.engadget.com/epic-games-lego-family-friendly-metaverse-164223209.html?src=rss Epic Games and Lego team up to build a kid friendly metaverseEpic Games and The Lego Group are building a new family friendly virtual world The companies haven t revealed too many details just yet though they plan to quot shape the future of the metaverse to make it safe and fun for children and families quot The pair have agreed on three principles they ll adhere to as they quot build an immersive creatively inspiring and engaging digital experience quot for people of all ages to enjoy They pledged to Protect children s right to play by making safety and wellbeing a priority Safeguard children s privacy by putting their best interests first Empower children and adults with tools that give them control over their digital experience Epic and Lego didn t announce a timeline for when their collective vision of a virtual world will open for business Of course Epic runs perhaps the foremost example of a kid friendly metaverse in Fortnite The battle royale modes countless crossovers concerts movie nights and creative islands have helped Fortnite become a massively popular virtual space where people go to hang out Lego has experience in virtual worlds as well Along with its long running series of licensed games including one that just dropped this week in Lego Star Wars The Skywalker Saga it was behind a sandbox game called Lego Worlds While that didn t prove to be quite the Minecraft competitor Lego would have hoped perhaps its collaboration with Epic will stand a better chance Their take on the metaverse is also likely to compete with Roblox That platform has an enormous player base of mostly young people and measures in place to shield them from adult content 2022-04-07 16:42:23
海外TECH Engadget Barnes & Noble is finally offering an audiobook service https://www.engadget.com/barnes-and-noble-audiobooks-nook-162147596.html?src=rss Barnes amp Noble is finally offering an audiobook serviceBarnes amp Noble finally has a direct answer to Amazon s purchase of Audible The bookseller has launched a B amp N Audiobooks service in the US that lets you either buy recordings or pay per month for a subscription that offers one recurring monthly credit You ll have access to more than titles through the web as well as the Nook apps for Android and iOS The launch is arguably overdue Amazon bought audiobook heavyweight Audible in and has both woven it into services and expanded its offerings with original books and services like the all you can read Audible Plus plan That investment has helped Audible dominate the market for years and that s not including longstanding competition from Apple Kobo and others Barnes amp Noble is entering a very well established market as a relative outsider The bookshop might not be deterred however Barnes amp Noble chief James Daunt has been leading an e book revival at the company that includes much needed hardware upgrades An audiobook service could help with that strategy by letting B amp N match its competitors core features even if it s unlikely to topple its biggest rivals any time soon 2022-04-07 16:21:47
海外TECH Engadget 'Slow Horses' makes me glad I forgot to cancel Apple TV+ https://www.engadget.com/slow-horses-apple-tv-plus-160047710.html?src=rss x Slow Horses x makes me glad I forgot to cancel Apple TV Confession time I d never read any John LeCarréuntil after I d seen the film of Tinker Tailor Soldier Spy It s a brilliant movie and one that sent me scuttling to read the Karla trilogy and then watch the two excellent Alec Guinness adaptations After devouring the first two episodes of Apple TV s Slow Horses I can think of no higher compliment than to say that I m bulk buying the book series it was adapted from in short order Slow Horses is an adaptation of Mick Herron s series of Slough House novels featuring a group of British spies trapped in administrative purgatory MI agents who have committed high profile mistakes but know far too much to be fired are dumped in the dingy Slough House There they are given harmless busywork too demeaning for real spies to undertake all the while being tormented and demeaned by division chief Jackson Lamb played by Gary Oldman It s this world that former superstar spy River Cartwright Jack Lowden is thrust into after his own notorious error while out in the field There he s given jobs like searching a dodgy journalist s trash can and acting as a courier between offices It s hardly a spoiler to suggest that Cartwright s arrival triggers something of a major case for the rejects to handle which has mostly kicked off by the time the second episode finishes What Slow Horses has to offer beyond the enjoyment of a modern day thriller done right is a sense of pulpy fun A sequence in the second episode I can t spoil plays out with the beats of a Chuck Jones cartoon rather than an entirely gritty espionage potboiler It helps too that the show isn t trying to make everyone a two dimensional cut out which can so often be the case when prestige TV attempts to make spy fi The series was created by the unfortunately named Will Smith the British standup actor and writer who far as we know has never slapped Chris Rock on stage The dialog sparkles not surprising given that Smith has written for Avenue Veep and The Thick of It It s also clear eyed about its politics offering something approaching nuance concerning the benefits and burdens of living in a surveillance state Much has already been made about the fact that this is Gary Oldman s first starring role in a TV series But Apple also spent big to recruit serial award winner Kristin Scott Thomas and Jonathan Pryce who appears as a former spymaster who has lost none of his imperial pomp Mentions too to Olivia Cooke s Sid Baker a vastly more talented spy who despite slumming it in Slough House is actually allowed to undertake real espionage work and Saskia Reeves as Lamb s long suffering assistant Standish I ll admit I get a kick out of watching the once and hopefully future George Smiley playing a cracked mirror version of that same character Lamb is trapped in the grimy whiskey and tobacco stained late s and Oldman has never looked grander than as a man in ruins Even at this early stage there are hints that Lamb was once a spectacular agent whose fall from grace was similarly staggering but the series isn t teasing it out in mystery box fashion There are two reasons I m recommending this to you Firstly because I thought it was good and I feel like sharing cool stuff is part of my job But also because the only reason I even started Slow Horses was because I d forgotten to cancel my TV subscription I saw the email hit my inbox and felt resentful at yet another £ that I d wasted on something I ve not used at all I keep meaning to use that money to subscribe to Disney now that my kids are old enough to sit through a whole movie in one sitting Ted Lasso aside TV in my mind remains the home of mostly middle of the road fare that aspires to do well enough on either coast and much of the middle It didn t help that The Morning Show left me cold and I can t imagine myself watching Jason Momoa wandering around a forest in in See You can t fault Apple for not wanting to just throw a fortune at its TV department and flood its service with forgettable originals But that deliberate process of slowly building up its catalog has always made me feel a bit like a chump for paying for the privilege of not wanting to watch what was on offer And yet after Slow Horses I decided to take a gamble and watch Severance I m only a few episodes deep and it s not one of those shows you can or should binge over a couple of bloodshot nights but it is good It s a left field exploration of the nature of memory personality and corporate life that defies easy explanation Also check out our interview with creator Dan Erickson If I needed to have a grand theory about All Of This and I m not sure at this point that I do it s that TV needs to get weirder Yes it has the cash to buy as many prestige TV series as it wants but we re swimming in worthy often dull series looking at you WeCrashed I ve still not bothered with either of the two two Tom Hanks films Apple rescued from the ignominy of a COVID era cinema release But shows like Severance and Slow Horses one a highbrow exploration of something the latter the televisual equivalent of a luxury dirty burger Neither of which you could imagine HBO even in its post Netflix anxiety pomp buying Hopefully we ll see more of this sort of thing in the future and I can feel a bit less resentful about paying for TV Read moreApple becomes the first streamer to win a Best Picture Oscar WeCrashed on AppleTV promises the world but delivers very little Ted Lasso takes home best comedy series at the Critics Choice AwardsEngadget s interview with Dan Erickson the creator of Severance 2022-04-07 16:00:47
Cisco Cisco Blog Transforming Customer Experience with Cisco AI Chatbots https://blogs.cisco.com/networking/transforming-customer-experience-with-cisco-ai-chatbots Transforming Customer Experience with Cisco AI ChatbotsThe Cisco Networking Bot cnBOT  is designed to empower internal support personnel customers guests and partners by providing digitized Cisco product information in an intuitive way 2022-04-07 16:00:44
海外TECH CodeProject Latest Articles Deploying to Azure Arc via Azure Application Services Part 3: Deploying a Multi-cloud Azure App Service Web App https://www.codeproject.com/Articles/5329095/Deploying-to-Azure-Arc-via-Azure-Application-Ser-3 Deploying to Azure Arc via Azure Application Services Part Deploying a Multi cloud Azure App Service Web AppIn this article we learn how to deploy an Azure App Service web app written in Java to an Arc hosted Kubernetes cluster hosted in another cloud service 2022-04-07 16:54:00
海外科学 NYT > Science These Birds Aren’t Lost. They’re Adapting. https://www.nytimes.com/2022/04/07/science/vagrants-lost-birds.html These Birds Aren t Lost They re Adapting Bird watchers love to see vagrants or birds that have traveled far outside their range But scientists say they have a lot to teach us in a world facing ecological change 2022-04-07 16:47:59
海外科学 NYT > Science Methane Emissions Soared to a Record in 2021, Scientists Say https://www.nytimes.com/2022/04/07/climate/methane-emissions-record.html Methane Emissions Soared to a Record in Scientists SayFor the second year in a row concentrations of the potent planet warming gas jumped by the largest amount since measurements began four decades ago 2022-04-07 16:39:05
金融 金融庁ホームページ LIBORの恒久的な公表停止に備えた対応について更新しました。 https://www.fsa.go.jp/policy/libor/libor.html#LIBOR-01 libor 2022-04-07 17:00:00
金融 金融庁ホームページ 金融安定理事会による「LIBORからの円滑な移行対応を歓迎するステートメント」について掲載しました。 https://www.fsa.go.jp/inter/fsf/20220407/20220407.html libor 2022-04-07 17:00:00
金融 金融庁ホームページ FATF声明について掲載しました。 https://www.fsa.go.jp/inter/etc/20220407/20220407.html 声明 2022-04-07 17:00:00
ニュース BBC News - Home Bucha murders: German report says Russian troops discussed killings https://www.bbc.co.uk/news/world-europe-61028380?at_medium=RSS&at_campaign=KARANGA spiegel 2022-04-07 16:46:46
ニュース BBC News - Home Sabina Nessa: Family calls absent-from-court murderer a coward https://www.bbc.co.uk/news/uk-england-london-61026497?at_medium=RSS&at_campaign=KARANGA nessa 2022-04-07 16:48:12
ニュース BBC News - Home Unite official under investigation by police https://www.bbc.co.uk/news/uk-politics-61029515?at_medium=RSS&at_campaign=KARANGA bribery 2022-04-07 16:27:57
ニュース BBC News - Home Video appears to show killing of captive Russian soldier https://www.bbc.co.uk/news/61025388?at_medium=RSS&at_campaign=KARANGA soldier 2022-04-07 16:07:52
ニュース BBC News - Home Aintree: Clan Des Obeaux wins second consecutive Betway Bowl https://www.bbc.co.uk/sport/horse-racing/61023607?at_medium=RSS&at_campaign=KARANGA grand 2022-04-07 16:20:25
ニュース BBC News - Home Masters 2022: Tiger Woods recovers to par the first at Augusta https://www.bbc.co.uk/sport/av/golf/61030229?at_medium=RSS&at_campaign=KARANGA augusta 2022-04-07 16:05:39
ビジネス ダイヤモンド・オンライン - 新着記事 「プレミアム優待倶楽部」株主優待利回りランキング! 全69銘柄の配当+優待利回り(2022年4月時点)を比較 して最もお得な「プレミアム優待倶楽部」銘柄を公開! - 株主優待情報 https://diamond.jp/articles/-/242963 「プレミアム優待倶楽部」株主優待利回りランキング全銘柄の配当優待利回り年月時点を比較して最もお得な「プレミアム優待倶楽部」銘柄を公開株主優待情報「プレミアム優待倶楽部」の株主優待利回りランキング年月時点を発表「プレミアム優待倶楽部」のポイントがもらえる株主優待株「全銘柄」の配当株主優待利回りを算出して、利回りが高い順番にランキングを作成して公開します「プレミアム優待倶楽部」とは、付与されたポイントを、食品や電化製品、旅行・各種体験など、多彩な商品と交換できるサービス。 2022-04-08 01:30:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

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

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