投稿時間:2023-07-27 03:17:53 RSSフィード2023-07-27 03:00 分まとめ(23件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia News] 新型折りたたみスマホ「Galaxy Z Fold5/Flip5」発表 薄く・軽くなり、閉じた時のスキマがなくなる https://www.itmedia.co.jp/news/articles/2307/27/news086.html galaxyzflip 2023-07-27 02:30:00
AWS AWS Desktop and Application Streaming Blog Build a customizable Virtual Desktop Infrastructure portal with NICE DCV https://aws.amazon.com/blogs/desktop-and-application-streaming/build-a-customizable-virtual-desktop-infrastructure-portal-with-nice-dcv/ Build a customizable Virtual Desktop Infrastructure portal with NICE DCVFully managed Virtual Desktop Infrastructure VDI solutions have become increasingly popular in recent years This is due to their ability to provide flexible and efficient access to remote desktop environments from anywhere Using a managed service reduces the burden of CAPEX risks maintenance and costly lengthy hardware upgrades AWS offers fully managed End User Computing … 2023-07-26 17:13:52
海外TECH MakeUseOf How Do Smart Bulbs Work? And Should You Buy Some? https://www.makeuseof.com/how-do-smart-bulbs-work/ popular 2023-07-26 17:31:22
海外TECH MakeUseOf What is DXVK and Why Should You Use It on Windows https://www.makeuseof.com/dxvk-windows-guide/ windows 2023-07-26 17:16:20
海外TECH MakeUseOf 6 Free 4-Week Training Plans for Short-Term Fitness Goals https://www.makeuseof.com/free-4-week-training-plans-short-term-fitness/ programs 2023-07-26 17:01:23
海外TECH DEV Community Dynamic Arrays vs Traditional Arrays, With Illustrations and Examples https://dev.to/ggorantala/dynamic-arrays-vs-traditional-arrays-with-code-examples-5dch Dynamic Arrays vs Traditional Arrays With Illustrations and ExamplesIn this article you will learn how to resize a static array Most of the advanced and complex data structures are built on arrays IntroductionArrays are fixed size You need to specify the number of elements your array will hold ahead of time Converting an array from fixed size to resizing itself is the most common use case for creating all complex data structures like ArrayList growable arrays and many more The other names of dynamic arrays are mutable arrays resizable arrays etc A dynamic array resizes or expands when you add more elements than the capacity of the array Strengths Fast lookupsRetrieving the element at a given index takes O time regardless of the array s length Array sizeYou can add as many elements as you need There is no limitation Dynamic arrays expand to hold them Cache friendlyJust like arrays dynamic arrays place items right next to each other in memory making efficient use of caches Weaknesses Size doubling appendsLet us consider an array with a capacity of elements But the elements we want to store in this array are more which means we have to double the size create a new array copy the old array elements and add new elements which takes O n time Costly insertsInserting an element at the end of the array takes O time But inserting an element at the start middle of the array takes O n time Why If we want to insert something into an array first we have to make space by scooting over everything starting at the index we re inserting into as shown in the image In the worst case we re inserting into the th index in the array prepending so we have to scoot over everything in the array That s O n time Inserting an element at the nd index and moving the rest of the element right shift each once The resultant array becomes A B C D E I recommend you read Array insertions and shifting algorithms link below with a clear explanation with code snippets and sketches to understand why these inserts are expensive at the start and middle Costly deletesDeleting an element at the end of the array takes O time which is the best case In computer science we only care about the worse case scenarios when working on algorithms But when we remove an element from the middle or start of the array we have to fill the gap by scooting over all the elements after it This will be O n if we consider a case of deleting an element from the th index Deleting an element at the rd index and filling the gap by left shifting the rest of the elements the resultant array becomes A B C D E Big O worst case time complexities Operation Worst Case Time Complexity Lookup access a value at a given index O Update a value at a given index O Insert at the beginning middle O N Insert at the end for dynamic array O N Insert at the end for Static array O N Append at the end O Delete at the beginning middle O N Delete at the end O copying the array O N How To Convert Array to Dynamic resizable array The previous lesson How to implement array like data structure taught you how to create implement an array like data structure Converting an array from fixed size to resizing itself is the most common use case for creating all complex data structures like ArrayList growable arrays and many more The other names of dynamic arrays are mutable arrays resizable arrays etc Why resize an array in the first place Arrays have fixed sizes If we were to make this fixed size array into a dynamic array it s doable but comes with a cost So why resize an array in the first place Why can t we use the existing array One thing to keep in mind about arrays is that they re fixed size which means you need to figure out how many elements they can hold before you start using them In other words how to make this a dynamic array that resizes itself when the array is full This approach is expensive as it occupies extra memory You will learn more about Memory Management later This is just for your understanding and traditionally this is how it s done for all the dynamic arrays like List HashMap etc in Java API A dynamic array expands as you add more elements So you don t need to determine the size ahead of time Thought processSteps to develop an approach for an array that resizes itself when more items are added The dynamic array needs to resize itself We need to find a way to resize the array when the array is full Copy all the previous items from the old static array to the new dynamic array De reference the old array and assign it to the new array In practice for each insert we are incrementing the size variable So let us check to see when an array is full if size data length array is full With this knowledge we can create a new array double the previous size int newData new int size Copy all the previous items in the old array into the new dynamic array copy all existing itemsfor int i i lt size i newData i data i With all these changes in place insert method looks something like this public void insert int element if the array is full resize it if data length size create a new array twice the size int newData new int size copy all existing items for int i i lt size i newData i data i data newData data size element size CodeFollowing is the Array we constructed in How to implement array like data structure article The final code is as follows package dev ggorantala ds arrays public class Array private int data private int size public Array int capacity data new int capacity size public void insert int element if the array is full resize it if data length size create a new array twice the size int newData new int size copy all existing items for int i i lt size i newData i data i data newData data size element size public boolean isOutOfBounds int index return index lt index gt size public void remove int index if isOutOfBounds index throw new IndexOutOfBoundsException for int i index i lt size i data i data i size public int get int index if index lt index gt size throw new IndexOutOfBoundsException return data index public int size return size public void print for int i i lt data length i System out print data i Dynamic array execution classLet us create an array with capacity as and insert numbers in it the size of the array becomes CodeFollowing is the execution classpackage dev ggorantala ds arrays public class DynamicArrayExecution private static final int INPUT new int public static void main String args Array array new Array for int value INPUT array insert value array remove removed element from array System out println array get System out println array size The extra o s are because of the array capacity which is array print Illustrations amp ExplanationWe gave our array like data structure with elements But we initialized the size to using Array array new Array A simple illustration is as follows So our array is ready to be loaded with input data Our array instance size is but we are inputting an array containing elements private static final int INPUT new int After adding the first elements from the input array our array has reached its maximum capacity Now the insert method doubles the array size and adds the next round of elements The following illustration explains After adding the first elements from the input array our array has reached its maximum capacity again Now the insert method doubles the array size and adds the next round of elements from the input array The following illustration explains The insert method doubles its size when the array is not sufficient and there are extra elements to add So the size increases from to then from to Note Do not get confused about the size variable and how it s doubling itself Check the insert method that does this trick when the array is full This is the reason you are seeing extra zeros for print method in above code This concludes the dynamic array topic In the next lessons you will learn about the Dimensional arrays with illustrations and sketches detailing indexes 2023-07-26 17:27:51
海外TECH DEV Community Roadmap for ReactJS Developers in 2023 | Zero to Hero https://dev.to/blackhorse0101/roadmap-for-reactjs-developers-in-2023-zero-to-hero-nhb Roadmap for ReactJS Developers in Zero to HeroHere is a roadmap that will take you from zero to hero as a React developer in whether you re just getting started or looking to advance your abilities Learn the fundamentals of JavaScriptAs JavaScript is the foundation of React having a firm grasp of its principles is crucial Start by studying objects loops conditionals functions and variables Learn the basics of HTML and CSSThe foundational languages of web development are HTML and CSS To design HTML elements style them and leverage CSS frameworks like Bootstrap or Material UI you should understand how to do all of these things Learn React basicsLearn the fundamentals of React first such as components props state and JSX Online courses YouTube tutorials or React documentation are good places to start Top Marketplace For Buying Source Code Pre built Websites For SaleCodemarketi is a new platform available for buying source code Get an industry specific website prebuilt for you Get…www codemarketi comDive deeper into React conceptsLearn more about advanced React ideas like React Router Redux React Hooks Context API and Server Side Rendering after you ve mastered the fundamentals Mastering React Hooks How to Use Them Effectively in Your React ApplicationsDevelopers can now use states and other React features in functional components thanks to React Hooks a potent new…medium com React Design Patterns You Should KnowOne of the most widely used front end frameworks is React and for good reason Its component based architecture…medium comPractice building projectsBuilding projects is the most effective method to learn React A to do list or a calculator are good places to start and you can work your way up to more difficult projects like an online store or social network Online Movie Streaming Website in React and Nodejs with Full Source CodeReact and Node js are two powerful technologies used to build web applications The React Node js Movie App is a…medium comLearn testingSoftware testing is a crucial component and React offers a variety of testing methods and modules With your React applications learn how to create unit tests and integration tests Learn about performance optimizationPerformance optimization becomes increasingly important as your applications expand Learn about code splitting lazy loading and other methods that can enhance the efficiency of your application Optimize Your Code Right Away with These React SuggestionsFor creating user interfaces React is a well liked and often used JavaScript library React has many wonderful…towardsdev comStay up to dateReact is always changing so it s important to keep up with the most recent developments and recommended techniques Attend conferences participate in online forums read blogs and keep up with the React documentation 2023-07-26 17:18:29
海外TECH DEV Community Unveiling AI-Logger: The Future of Debugging in Node.js https://dev.to/victorforissier/unveiling-ai-logger-the-future-of-debugging-in-nodejs-41l8 Unveiling AI Logger The Future of Debugging in Node jsDISCLAIMER The AI got a bit excited when writing this article The ai logger package is very cool but not that revolutionary GitHub LinkDo you ever feel overwhelmed by hard to decipher error messages while coding Or perhaps you ve found yourself wasting hours even days hunting down the elusive causes of bugs There s finally a powerful tool that could put an end to these common developer nightmares Introducing AI Logger a revolutionary Node js module that harnesses the power of OpenAI s language models to transform the way you debug your applications A Revolutionary Console EnhancementAt its core AI Logger is a simple yet transformative tool that seamlessly enhances console functionality with a novel method console ai This module translates complicated error logs into a more readable and comprehensive format suggesting potential causes and providing potential solutions By simply replacing your standard console log with console ai you can gain a deeper understanding of complex issues and expedite your debugging process AI Logger ensures the original error message can be logged preserving data integrity Taking Debugging to the Next LevelThis tool not only enhances debugging but it also offers unparalleled insights into application behavior This improvement of the development efficiency can have far reaching impacts from shortening project timelines to increasing the overall quality of your applications Setting up AI LoggerReady to bring your debugging game to a whole new level Here s how to get started Install the ModuleUse the npm package manager to install AI Logger with the following command npm install ai logger Get Your PolyFact TokenAI Logger uses the powerful PolyFact package to generate AI responses To use it you need to obtain a PolyFact token Here are the steps Navigate to app polyfact com Connect with your GitHub account Copy the generated token Once you have your token export it to your environment using export POLYFACT TOKEN lt your polyfact token gt Using AI LoggerTo start using AI Logger first import and initialize the module import extendConsole from ai logger extendConsole Now you can replace your regular console log or console error calls with console ai try code that might throw an error catch e console ai e AI Logger offers a multitude of features such as transforming error messages into a more understandable format outlining potential error causes suggesting possible solutions and ensuring original error messages are logged Customizing AI LoggerAI Logger is also highly customizable The extendConsole function can take an AILoggerOptions object which can contain the following options prompt Instructs the OpenAI model how to format the output sections Determines the sections of the output showOriginalError Indicates whether to log the original error showResultWithJsonFormat Specifies whether to show the formatted error message in JSON format For instance you could adjust the sections array to dictate which aspects of the error information should be displayed Here s how const sections ErrorSection ErrorSection Error ErrorSection Location In this case only the error message code and its location will be displayed This allows you to fine tune your error output to suit the unique needs of your application With AI Logger we re entering a new era of smart efficient debugging Try it out for yourself and see how this tool can revolutionize your development process Give us a star 2023-07-26 17:12:27
海外TECH DEV Community AI isn't the solution to all problems https://dev.to/geektrainer/ai-isnt-the-solution-to-all-problems-4odp AI isn x t the solution to all problemsThere s an old saying If the only tool you have is a hammer everything looks like a nail The basic message is if you re using a single solution you re likely to force its usage to solve every problem even if it isn t the best tool for the job This is a trap we often fall into when we re handed a new shiny tool like AI We immediately want to apply it to every scenario even when there are existing options which are better equipped I m seeing this quite a bit these days with AI with new products capturing the imagination of developers everywhere But before we reach for AI we need to stop to ask if this is the right tool or is a better tool already available As an example I recently attended a hackathon where a team was building an app to help developers create accessible websites They were asking questions about how to incorporate AI into the process using AI to detect accessibility shortcomings As it turns out this is a solved problem Looking at web development specifically there s a set of clearly defined standards There are numerous tools including Visual Studio Code extensions and GitHub actions which can detect and report on gaps in compliance Because detection is pattern based there isn t a need for the dynamic capabilities AI would bring to the table While it s certainly possible to build a new AI driven tool it wouldn t improve the process This falls into the hammer nail category However there is a space where AI an help developers improve the accessibility of the apps they build When we look at existing tools the feedback provided to developers is relatively generic An error might be raised indicating an alt attribute is missing from an img tag but it would likely lack explanatory context It s always better for someone to truly understand the rationale behind a rule rather than following the rule because someone said so Why is the alt attribute important What makes for good alt text What are the best practices Using a tool like GitHub Copilot Chat a developer could highlight a block of code and ask questions like the ones listed above It s a great opportunity to interactively learn more about accessibility the experience different users have on a website and how best to ensure the pages they build are usable by everyone The information will be contextual to their specific situation making it more relevant and impactful to the developer GitHub Copilot can also aid developers in creating accessible code GitHub Copilot offers suggestions based both on its model and the current development context If the HTML the developer is editing follows good accessibility practices GitHub Copilot is more likely to make suggestions which do the same A developer can also prompt GitHub Copilot by saying things like Create a link to login using the login png image ensuring accessibility which helps guide the suggestions generated In the end we use different tools with different technologies to help our developers create accessible web pages Extensions in the IDE alert to potential gaps Automation integrated into the CI process catch issues before they re merged into the codebase And finally AI helps the developer write better code gain context and learn about accessibility All of us have a propensity to fall into the trap of wanting to use the cool new technology anywhere and everywhere even if it s not an appropriate application We always need to stop for a minute to ensure we re using the right tool that we re not simply hammering everything as not everything is a nail AI doesn t replace existing tools and solutions it s another tool we can use to enhance and improve what we already have 2023-07-26 17:11:00
Apple AppleInsider - Frontpage News Tourists lost in Italian mountains saved by iPhone 14 Emergency SOS via satellite https://appleinsider.com/articles/23/07/26/tourists-lost-in-italian-mountains-saved-by-iphone-14-emergency-sos-via-satellite?utm_medium=rss Tourists lost in Italian mountains saved by iPhone Emergency SOS via satelliteTwo tourists rescued off a mountain may be the first save scored in Italy by the iPhone s Emergency SOS via satellite feature Emergency SOS via satelliteIn March Apple expanded the feature to six countries including Australia Belgium Luxembourg the Netherlands Portugal ーand fortunately for two tourists ーItaly Read more 2023-07-26 17:16:24
Apple AppleInsider - Frontpage News Even the upcoming macOS Sonoma update isn't safe from this malware https://appleinsider.com/articles/23/07/26/even-the-upcoming-macos-sonoma-update-isnt-safe-from-this-malware?utm_medium=rss Even the upcoming macOS Sonoma update isn x t safe from this malwareA recently discovered Mac malware known as Realst is currently employed in a large scale campaign to steal cryptocurrency wallets ーand even targets the still developing macOS Sonoma New Mac malware targets cryptocurrency walletsSecurity researcher iamdeadlyz uncovered the malware which is being distributed to both Windows and macOS users disguised as fake blockchain games The malicious software adopts deceptive names like Brawl Earth WildWorld Dawnland Destruction Evolion Pearl Olymp of Reptiles and SaintLegend Read more 2023-07-26 17:07:22
海外TECH Engadget Xbox home screen revamp provides quicker access to games https://www.engadget.com/xbox-home-screen-revamp-provides-quicker-access-to-games-173010398.html?src=rss Xbox home screen revamp provides quicker access to gamesMicrosoft isn t done refining the interface on your Xbox console The company is rolling out an updated home screen for Xbox Series X and One users that theoretically puts games within closer reach while giving you more room to customize the experience There s now a quick access menu that helps you jump to your collection Game Pass the Microsoft Store and common functions like search and settings You can pin favorite games and groups and there are curated lists of games to help discover titles The update should reach everyone within a few weeks At the same time a simpler layout creates more room for your custom background An option can change the background to match the game you ve selected in your recently played list somewhat like PlayStation s carousel A refreshed community row helps show what friends are doing while media spotlights and lists help you find new content to see or hear It s easier to buy games too At the same time PayPal has revealed that you can quot soon quot use Venmo to buy games apps and subscriptions in the Microsoft Store on Xbox in the US This will help you make use of spare Venmo funds of course but it will also give you a way to split payments if you can t justify an up front purchase The rethink comes eight months after Microsoft began publicly experimenting with a new Xbox interface The company has a history of frequent UI redesigns and tweaks particularly in the Xbox One era Sony in contrast is relatively conservative and rarely makes major changes to the PlayStation front end in the middle of a console cycle Microsoft s iteration may be frustrating if you re hoping for a consistent experience but it does suggest the company is responding to gamers feedback and hoping to stand out in the market This article originally appeared on Engadget at 2023-07-26 17:30:10
海外TECH Engadget Major automakers team up to create new North American EV charging network https://www.engadget.com/major-automakers-team-up-to-create-new-north-american-ev-charging-network-171532385.html?src=rss Major automakers team up to create new North American EV charging networkSeven major automakers have banded together to create a new charging network in North America with an eventual target of high powered charge points near urban and highway locations The companies involved with the venture include BMW General Motors Honda Hyundai Kia Mercedes and Stellantis The venture issued a statement on the move saying they are trying to “accelerate the transition to electric vehicles and “make zero emission driving even more attractive The goal of this venture is new charging points and the companies say they will “leverage public and private funds to get there After all the National Renewable Energy Laboratory NREL estimates that the country will need around fast chargers to accommodate the massive influx of EVs hitting the roads by This venture represents a good portion of these needs These stations will use the Combined Charging System CCS standard and the North American Charging Standard NACS It s worth mentioning that Tesla s superchargers use the NACS charging type and the company recently opened up the technology to other EV manufacturers This new joint program will formally begin operations sometime this year assuming it clears regulatory approval conditions and it plans on opening up its first stations next summer Each site will boast multiple chargers and plenty of amenities like canopies restaurants restrooms and integrated brick and mortar retail stores EV sales are expected to contribute to more than percent of total automobile sales by so the more charging stations available the better To that end some of the companies involved in this venture are also striking out on their own to build more charging stations GM for instance promises to build charging stations at car dealerships throughout the US and Canada This article originally appeared on Engadget at 2023-07-26 17:15:32
海外TECH Engadget NASA picks Lockheed Martin to build the nuclear rocket that’ll take us to Mars https://www.engadget.com/nasa-picks-lockheed-martin-to-build-the-nuclear-rocket-thatll-take-us-to-mars-170035659.html?src=rss NASA picks Lockheed Martin to build the nuclear rocket that ll take us to MarsNASA and DARPA have chosen aerospace and defense company Lockheed Martin to develop a spacecraft with a nuclear thermal rocket engine Announced in January the initiative ーin which BWX Technologies will provide the reactor and fuel ーis dubbed the Demonstration Rocket for Agile Cislunar Operations DRACO The agencies aim to showcase the tech no later than with an eye toward future Mars missions Nuclear thermal propulsion NTP has several advantages over chemically propelled rockets First it s two to five times more efficient allowing ships to travel faster and farther with greater agility In addition its reduced propellant needs leave more room on the spaceship for storing scientific equipment and other essentials It also provides more options for abort scenarios as the nuclear engines make it easier to alter the ship s trajectory for a quicker than expected return trip These factors combine to make NTP perhaps the ideal Mars travel method “These more powerful and efficient nuclear thermal propulsion systems can provide faster transit times between destinations said Kirk Shireman VP of Lunar Exploration Campaigns for Lockheed Martin “Reducing transit time is vital for human missions to Mars to limit a crew s exposure to radiation NASA DARPAThe NTP system will use a nuclear reactor to heat hydrogen propellant rapidly to extremely high temperatures That gas is funneled through the engine s nozzle creating the ship s thrust “This nuclear thermal propulsion system is designed to be extremely safe and reliable using High Assay Low Enriched Uranium HALEU fuel to rapidly heat a super cold gas such as liquid hydrogen BWX said today “As the gas is heated it expands quickly and creates thrust to move the spacecraft more efficiently than typical chemical combustion engines To help quell concerns about radioactive leaks in the Earth s atmosphere NASA and DARPA plan not to power up the reactor until the ship has reached a “nuclear safe orbit where any tragedies would occur outside the zone where it would affect Earth The agencies aim for a nuclear spacecraft demonstration by launched from a conventional rocket until it reaches “an appropriate location above low earth orbit Nuclear reactors will also likely play a key role in powering future Martian habitats with NASA testing small and portable versions of the tech as far back as Before NTP propels the first humans to Mars it could find use on much shorter flights as nuclear powered spacecraft could also make transporting material to the Moon more efficient “A safe reusable nuclear tug spacecraft would revolutionize cislunar operations said Shireman “With more speed agility and maneuverability nuclear thermal propulsion also has many national security applications for cislunar space This article originally appeared on Engadget at 2023-07-26 17:00:35
海外科学 NYT > Science Looming Retraction Casts Shadow Over Ranga Dias and Study of Superconductors https://www.nytimes.com/2023/07/26/science/ranga-dias-retraction-physics.html Looming Retraction Casts Shadow Over Ranga Dias and Study of SuperconductorsMisconduct allegations are leading scientists to question the work of Ranga Dias including his claimed discovery of a room temperature superconductor 2023-07-26 17:23:56
海外科学 NYT > Science For healthy older people, aspirin could cause more bleeding. https://www.nytimes.com/2023/07/26/health/aspirin-bleeding-stroke-heart-attack.html For healthy older people aspirin could cause more bleeding A new analysis of older people who have never had a heart attack or stroke suggests limited protective power of daily low dose aspirin and worrisome side effects 2023-07-26 17:59:49
海外TECH WIRED 8 Best Deals From the Nordstrom Anniversary Sale (2023): Dyson Hair Tools, Fellow Grinder, Strollers https://www.wired.com/story/nordstrom-anniversary-sale-deals-2023-1/ wired 2023-07-26 17:09:00
ニュース BBC News - Home Ship with 3,000 cars in blaze off Dutch coast https://www.bbc.co.uk/news/world-europe-66310280?at_medium=RSS&at_campaign=KARANGA ameland 2023-07-26 17:06:09
ニュース BBC News - Home Hunter Biden: Plea deal for president's son collapses in dramatic court hearing https://www.bbc.co.uk/news/world-us-canada-66314934?at_medium=RSS&at_campaign=KARANGA charges 2023-07-26 17:44:53
ニュース BBC News - Home Police chief Will Kerr faces serious sexual offence allegations https://www.bbc.co.uk/news/uk-northern-ireland-66317717?at_medium=RSS&at_campaign=KARANGA cornwall 2023-07-26 17:24:41
ニュース BBC News - Home Joe Lewis: Tottenham Hotspur-linked billionaire faces insider trading charges in US https://www.bbc.co.uk/news/world-us-canada-66274633?at_medium=RSS&at_campaign=KARANGA court 2023-07-26 17:44:13
ニュース BBC News - Home The Ashes 2023: Ben Stokes to use six-month gap to address knee issue https://www.bbc.co.uk/sport/cricket/66285711?at_medium=RSS&at_campaign=KARANGA The Ashes Ben Stokes to use six month gap to address knee issueEngland Test captain Ben Stokes will use a potential six month break from cricket to have serious conversations about his long term left knee problem 2023-07-26 17:01:38
GCP Cloud Blog More Control Loading the Maps JavaScript API https://cloud.google.com/blog/products/maps-platform/more-control-loading-maps-javascript-api/ More Control Loading the Maps JavaScript APIToday we re sharing three big improvements to how the Maps JavaScript API is loaded an API for flexible library loading the new inline bootstrap loader and a set of performance improvements Flexible library loadingThe Maps JavaScript API is made up of libraries which developers specify for inclusion when loading the API These libraries go beyond just showing a map on a website For example to access the Places API developers can load the Places Library However loading these libraries was inflexible and slowed initial loading times because until now they could only be specified on initial load of the Maps JavaScript API e g via the libraries places URL parameter  We now provide an API for dynamically importing libraries For example  await google maps importLibrary places  will load the Places Library when you decide it is needed which can be after a user action necessitates information about places Even better it s now possible to avoid using long namespaces like google maps places Place via const Place await google maps importLibrary places   though the google maps places namespace will continue being populated Multiple libraries can now also be imported in parallel code block StructValue u code u const placesLibrary geocodingLibrary await Promise all r n google maps importLibrary places r n google maps importLibrary geocoding r n u language u u caption lt wagtail wagtailcore rich text RichText object at xeceebd gt We ve also made it so that all classes of the Maps JavaScript API are available via google maps importLibrary as listed in documentation For example you can access the StreetViewPanorama class via const StreetViewPanorama await google maps importLibrary streetView Now you can control exactly when your Maps JavaScript API dependencies are loaded The new inline bootstrap loaderAnother common issue is that using the Maps JavaScript API lt script gt loader requires defining a callback parameter to a globally defined function We now recommend developers use our new inline bootstrap loader which allows developers to use google maps importLibrary immediately without needing to wait for the API to load This also means that you can avoid that pesky global callback and use Promises or async await to track when the Maps JavaScript API is ready  Instead of specifying a lt script gt tag with a URL you can include the new inline bootstrap loader a small bit of inline JavaScript This code takes your configuration parameters will construct the bootstrap URL for you and defines google maps importLibrary so that you can immediately begin using it No part of the Maps JavaScript API is loaded until google maps importLibrary is first called This new inline bootstrap loader is also safe to use multiple times per page though only the first configuration will be used And when using the new loader the google maps importLibrary Promise will correctly reject when there is an issue loading the Maps JavaScript API something the older callback mechanism didn t support Performance improvementsThis year we also made several changes to the Maps JavaScript API to automatically improve loading times for end users We have enabled Brotli compression for our static JavaScript files and introduced automatic lazy loading for maps that are offscreen Later this year we will also be upgrading our JavaScript to have more modern code output reducing file size by taking advantage of more browser built in features Why the Maps JavaScript API uses a lt script gt loaderA number of developers have asked us why we don t distribute via npm We regularly evaluate options for accessing the API and we very much recognize that a lt script gt tag might seem archaic in a world where most JS packages are distributed via npm  One important insight we ve gained is that many websitesーboth large and smallーthat adopt the Maps JavaScript API are not actively maintained and we want to make sure that we are doing what we can to keep those websites working The code that makes up our UI render is rather complex and it utilizes a large number of backend services under the hood Over the years innumerable changes in browsers and those backend services have required updates to the inner workings of the Maps JavaScript API in order to continue working correctly There have also been important accessibility privacy and security updates And since websites load the API directly from Google they have been able to automatically get all of those updates Even for actively maintained websites part of the value of using the Maps JavaScript API is avoiding many of the surprise breakages caused by these kinds of changes and the resulting high stress scramble to find and deploy fixes This means that you get to spend more time focused on your own objectives instead of dealing with dependency management  For those developers looking for something that bridges the gap between lt script gt loading and npm we offer the googlemaps js api loader package The new google maps importLibrary can also be used with js api loader via Loader importLibrary And for those developers looking for more control over when they adopt new releases of the Maps JavaScript API take a look at the options available Each version of the Maps JavaScript API is now available for an entire year For more information on Google Maps Platform visit our website 2023-07-26 17:30: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件)